From 86c388588c15c28fc22bed7fc9b00a1060fdccec Mon Sep 17 00:00:00 2001 From: Koschei Date: Wed, 25 Sep 2024 01:22:58 +0800 Subject: [PATCH 001/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=20date=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.cpp | 2 +- src/observer/common/type/attr_type.h | 1 + src/observer/common/type/char_type.cpp | 27 +- src/observer/common/type/data_type.cpp | 4 +- src/observer/common/type/date_type.cpp | 40 ++ src/observer/common/type/date_type.h | 30 + src/observer/common/value.cpp | 28 + src/observer/common/value.h | 3 + src/observer/sql/parser/lex_sql.cpp | 875 +++++++++++++------------ src/observer/sql/parser/lex_sql.h | 310 +++++++-- src/observer/sql/parser/lex_sql.l | 1 + src/observer/sql/parser/yacc_sql.cpp | 776 +++++++++++----------- src/observer/sql/parser/yacc_sql.hpp | 59 +- src/observer/sql/parser/yacc_sql.y | 2 + 14 files changed, 1260 insertions(+), 898 deletions(-) create mode 100644 src/observer/common/type/date_type.cpp create mode 100644 src/observer/common/type/date_type.h diff --git a/src/observer/common/type/attr_type.cpp b/src/observer/common/type/attr_type.cpp index 88206cfb..52398413 100644 --- a/src/observer/common/type/attr_type.cpp +++ b/src/observer/common/type/attr_type.cpp @@ -12,7 +12,7 @@ See the Mulan PSL v2 for more details. */ #include "common/lang/string.h" #include "common/type/attr_type.h" -const char *ATTR_TYPE_NAME[] = {"undefined", "chars", "ints", "floats", "booleans"}; +const char *ATTR_TYPE_NAME[] = {"undefined", "chars", "ints", "floats", "booleans", "dates"}; const char *attr_type_to_string(AttrType type) { diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index 55a0e64e..b1b9a582 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -21,6 +21,7 @@ enum class AttrType INTS, ///< 整数类型(4字节) FLOATS, ///< 浮点数类型(4字节) BOOLEANS, ///< boolean类型,当前不是由parser解析出来的,是程序内部使用的 + DATES, ///< 日期类型(4字节) MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index 6c93114a..e4a5dd10 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -13,6 +13,17 @@ See the Mulan PSL v2 for more details. */ #include "common/type/char_type.h" #include "common/value.h" +static bool check_date(int y, int m, int d) +{ + // 定义每个月的天数 + static int mon[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + // 判断是否为闰年 + bool leap = (y % 400 == 0) || (y % 100 != 0 && y % 4 == 0); + // 检查年份、月份和日期的合法性 + return (y > 0 && y <= 9999) && (m > 0 && m <= 12) && + (d > 0 && d <= (mon[m] + (m == 2 && leap ? 1 : 0))); // 2月如果是闰年则加1天 +} + int CharType::compare(const Value &left, const Value &right) const { ASSERT(left.attr_type() == AttrType::CHARS && right.attr_type() == AttrType::CHARS, "invalid type"); @@ -29,6 +40,17 @@ RC CharType::set_value_from_str(Value &val, const string &data) const RC CharType::cast_to(const Value &val, AttrType type, Value &result) const { switch (type) { + case AttrType::DATES: { + static int y, m, d; + if (sscanf(val.value_.pointer_value_, "%d-%d-%d", &y, &m, &d) != 3) { + return RC::INVALID_ARGUMENT; + } + if (!check_date(y, m, d)) { + return RC::INVALID_ARGUMENT; + } + result.attr_type_ = AttrType::DATES; + result.set_date(y * 10000 + m * 100 + d); + } break; default: return RC::UNIMPLEMENTED; } return RC::SUCCESS; @@ -39,6 +61,9 @@ int CharType::cast_cost(AttrType type) if (type == AttrType::CHARS) { return 0; } + if (type == AttrType::DATES) { + return 1; + } return INT32_MAX; } @@ -48,4 +73,4 @@ RC CharType::to_string(const Value &val, string &result) const ss << val.value_.pointer_value_; result = ss.str(); return RC::SUCCESS; -} \ No newline at end of file +} diff --git a/src/observer/common/type/data_type.cpp b/src/observer/common/type/data_type.cpp index 021a30e8..dce24795 100644 --- a/src/observer/common/type/data_type.cpp +++ b/src/observer/common/type/data_type.cpp @@ -12,6 +12,7 @@ See the Mulan PSL v2 for more details. */ #include "common/type/float_type.h" #include "common/type/integer_type.h" #include "common/type/data_type.h" +#include "common/type/date_type.h" array, static_cast(AttrType::MAXTYPE)> DataType::type_instances_ = { make_unique(AttrType::UNDEFINED), @@ -19,4 +20,5 @@ array, static_cast(AttrType::MAXTYPE)> DataType::type_ make_unique(), make_unique(), make_unique(AttrType::BOOLEANS), -}; \ No newline at end of file + make_unique(), +}; diff --git a/src/observer/common/type/date_type.cpp b/src/observer/common/type/date_type.cpp new file mode 100644 index 00000000..bfd4f063 --- /dev/null +++ b/src/observer/common/type/date_type.cpp @@ -0,0 +1,40 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/11 * + * @Description : DateType source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "date_type.h" + +#include +#include +#include +#include + +int DateType::compare(const Value &left, const Value &right) const +{ + return common::compare_int((void *)&left.value_.int_value_, (void *)&right.value_.int_value_); +} + +RC DateType::to_string(const Value &val, string &result) const +{ + // 提取年、月、日 + int year = val.value_.int_value_ / 10000; // 获取年份 + int month = (val.value_.int_value_ / 100) % 100; // 获取月份 + int day = val.value_.int_value_ % 100; // 获取日期 + + // 使用字符串流构建结果字符串 + std::ostringstream oss; + oss << std::setw(4) << std::setfill('0') << year << '-' << std::setw(2) << std::setfill('0') << month << '-' + << std::setw(2) << std::setfill('0') << day; + + // 将结果赋值给 result + result = oss.str(); + return RC::SUCCESS; +} diff --git a/src/observer/common/type/date_type.h b/src/observer/common/type/date_type.h new file mode 100644 index 00000000..cf90f084 --- /dev/null +++ b/src/observer/common/type/date_type.h @@ -0,0 +1,30 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/11 * + * @Description : DateType header file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "common/type/data_type.h" + +/** + * @brief 日期类型 + * @ingroup DateType + */ +class DateType : public DataType +{ +public: + DateType() : DataType(AttrType::DATES) {} + ~DateType() override = default; + + int compare(const Value &left, const Value &right) const override; + + RC to_string(const Value &val, string &result) const override; +}; diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index b8f04914..19f72975 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -125,6 +125,10 @@ void Value::set_data(char *data, int length) value_.bool_value_ = *(int *)data != 0; length_ = length; } break; + case AttrType::DATES: { + value_.int_value_ = *(int *)data; + length_ = length; + } break; default: { LOG_WARN("unknown data type: %d", attr_type_); } break; @@ -154,6 +158,14 @@ void Value::set_boolean(bool val) length_ = sizeof(val); } +void Value::set_date(int val) +{ + reset(); + attr_type_ = AttrType::DATES; + value_.int_value_ = val; + length_ = sizeof(val); +} + void Value::set_string(const char *s, int len /*= 0*/) { reset(); @@ -190,6 +202,9 @@ void Value::set_value(const Value &value) case AttrType::BOOLEANS: { set_boolean(value.get_boolean()); } break; + case AttrType::DATES: { + set_date(value.get_int()); + } break; default: { ASSERT(false, "got an invalid value type"); } break; @@ -251,6 +266,11 @@ int Value::get_int() const case AttrType::BOOLEANS: { return (int)(value_.bool_value_); } + case AttrType::DATES: { + // 虽然 date 类型是用 int 存的,但是目前不需要 get_date 函数 + LOG_TRACE("failed to convert date to number. s=%d", value_.int_value_); + return 0; + } default: { LOG_WARN("unknown data type. type=%d", attr_type_); return 0; @@ -279,6 +299,10 @@ float Value::get_float() const case AttrType::BOOLEANS: { return float(value_.bool_value_); } break; + case AttrType::DATES: { + LOG_TRACE("failed to convert date to float. s=%d", value_.int_value_); + return 0; + } default: { LOG_WARN("unknown data type. type=%d", attr_type_); return 0; @@ -320,6 +344,10 @@ bool Value::get_boolean() const case AttrType::BOOLEANS: { return value_.bool_value_; } break; + case AttrType::DATES: { + LOG_TRACE("failed to convert date to boolean. s=%d", value_.int_value_); + return false; + } default: { LOG_WARN("unknown data type. type=%d", attr_type_); return false; diff --git a/src/observer/common/value.h b/src/observer/common/value.h index ebbc70a3..9468e499 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -18,6 +18,7 @@ See the Mulan PSL v2 for more details. */ #include "common/lang/memory.h" #include "common/type/attr_type.h" #include "common/type/data_type.h" +#include "common/type/date_type.h" /** * @brief 属性的值 @@ -34,6 +35,7 @@ class Value final friend class FloatType; friend class BooleanType; friend class CharType; + friend class DateType; Value() = default; @@ -112,6 +114,7 @@ class Value final private: void set_int(int val); void set_float(float val); + void set_date(int val); void set_string(const char *s, int len = 0); void set_string_from_other(const Value &other); diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 14ce1bc3..d75efe90 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,5 +1,4 @@ -#line 2 "lex_sql.cpp" -#line 2 "lex_sql.l" +#line 1 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -23,10 +22,7 @@ do { \ } \ while (0); - - - -#line 30 "lex_sql.cpp" +#line 25 "lex_sql.cpp" #define YY_INT_ALIGNED short int @@ -34,12 +30,36 @@ while (0); #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif +#ifdef yyget_lval +#define yyget_lval_ALREADY_DEFINED +#else +#define yyget_lval yyget_lval +#endif + +#ifdef yyset_lval +#define yyset_lval_ALREADY_DEFINED +#else +#define yyset_lval yyset_lval +#endif + +#ifdef yyget_lloc +#define yyget_lloc_ALREADY_DEFINED +#else +#define yyget_lloc yyget_lloc +#endif + +#ifdef yyset_lloc +#define yyset_lloc_ALREADY_DEFINED +#else +#define yyset_lloc yyset_lloc +#endif + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -73,6 +93,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -80,7 +101,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -111,38 +131,32 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) +#endif /* ! C99 */ -#define YY_USE_CONST +#endif /* ! FLEXINT_H */ -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ +/* begin standard C++ headers. */ -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T @@ -166,25 +180,29 @@ typedef void* yyscan_t; * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * - /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START - /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ,yyscanner ) - +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -196,11 +214,17 @@ typedef void* yyscan_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -215,14 +239,8 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) - #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -235,12 +253,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -263,7 +281,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -297,86 +315,79 @@ struct yy_buffer_state #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) - /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void yypop_buffer_state (yyscan_t yyscanner ); - -static void yyensure_buffer_stack (yyscan_t yyscanner ); -static void yy_load_buffer_state (yyscan_t yyscanner ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void yyfree (void * ,yyscan_t yyscanner ); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer - #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } - #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } - #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(n) 1 +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; +typedef flex_uint8_t YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 61 -#define YY_END_OF_BUFFER 62 +#define YY_NUM_RULES 62 +#define YY_END_OF_BUFFER 63 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -384,31 +395,31 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[183] = +static const flex_int16_t yy_accept[184] = { 0, - 0, 0, 0, 0, 62, 60, 1, 2, 60, 60, - 60, 44, 45, 56, 54, 46, 55, 6, 57, 3, - 5, 51, 47, 53, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 61, 50, 0, 58, 0, 59, 3, 0, - 48, 49, 52, 43, 43, 43, 43, 40, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 15, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 4, 22, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - - 43, 43, 43, 43, 32, 43, 43, 43, 28, 43, - 43, 43, 43, 43, 43, 43, 43, 19, 33, 43, - 43, 36, 43, 9, 11, 7, 43, 43, 43, 20, - 43, 8, 43, 43, 43, 24, 35, 43, 43, 16, - 43, 17, 43, 43, 43, 43, 29, 43, 43, 43, - 43, 34, 43, 39, 14, 43, 43, 43, 43, 43, - 12, 43, 43, 21, 30, 10, 26, 43, 42, 37, - 23, 43, 18, 43, 13, 27, 25, 38, 43, 41, - 31, 0 + 0, 0, 0, 0, 63, 61, 1, 2, 61, 61, + 61, 45, 46, 57, 55, 47, 56, 6, 58, 3, + 5, 52, 48, 54, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 62, 51, 0, 59, 0, 60, 3, 0, + 49, 50, 53, 44, 44, 44, 44, 41, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 15, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 4, 22, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + + 44, 44, 44, 44, 32, 44, 44, 44, 28, 44, + 44, 44, 44, 44, 44, 44, 44, 19, 33, 44, + 44, 37, 35, 44, 9, 11, 7, 44, 44, 44, + 20, 44, 8, 44, 44, 44, 24, 36, 44, 44, + 16, 44, 17, 44, 44, 44, 44, 29, 44, 44, + 44, 44, 34, 44, 40, 14, 44, 44, 44, 44, + 44, 12, 44, 44, 21, 30, 10, 26, 44, 43, + 38, 23, 44, 18, 44, 13, 27, 25, 39, 44, + 42, 31, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, @@ -440,7 +451,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[67] = +static const YY_CHAR yy_meta[67] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, @@ -451,55 +462,55 @@ static yyconst flex_int32_t yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static yyconst flex_int16_t yy_base[188] = +static const flex_int16_t yy_base[189] = { 0, - 0, 0, 0, 0, 484, 485, 485, 485, 465, 477, - 475, 485, 485, 485, 485, 485, 465, 485, 485, 54, - 485, 52, 485, 454, 53, 57, 60, 59, 70, 91, - 61, 67, 75, 456, 87, 77, 98, 113, 109, 58, - 119, 111, 485, 485, 465, 485, 463, 485, 86, 453, - 485, 485, 485, 0, 451, 126, 121, 450, 115, 137, + 0, 0, 0, 0, 487, 488, 488, 488, 468, 480, + 478, 488, 488, 488, 488, 488, 468, 488, 488, 54, + 488, 52, 488, 464, 53, 57, 60, 59, 70, 91, + 61, 67, 75, 466, 87, 77, 98, 113, 109, 58, + 119, 111, 488, 488, 475, 488, 473, 488, 86, 463, + 488, 488, 488, 0, 462, 126, 121, 461, 115, 137, 127, 143, 128, 139, 150, 157, 153, 160, 163, 168, - 173, 175, 186, 448, 180, 190, 199, 203, 193, 202, - 216, 201, 214, 447, 446, 225, 226, 228, 227, 230, - 237, 243, 239, 145, 231, 253, 250, 251, 256, 258, - - 260, 265, 271, 278, 264, 281, 285, 286, 445, 288, - 294, 290, 293, 299, 302, 310, 300, 444, 443, 307, - 312, 441, 316, 439, 438, 437, 317, 325, 340, 436, - 323, 433, 329, 334, 330, 432, 424, 327, 352, 423, - 355, 422, 361, 342, 363, 367, 419, 364, 368, 380, - 378, 412, 375, 404, 386, 381, 382, 397, 385, 392, - 395, 409, 407, 353, 347, 336, 275, 393, 263, 261, - 179, 399, 171, 416, 162, 99, 83, 74, 420, 73, - 69, 485, 473, 475, 477, 76, 75 + 173, 175, 186, 460, 180, 190, 199, 203, 193, 202, + 216, 201, 214, 459, 451, 225, 226, 228, 227, 230, + 237, 243, 251, 145, 231, 239, 256, 263, 264, 250, + + 253, 260, 271, 279, 268, 275, 286, 289, 449, 265, + 290, 292, 300, 301, 294, 305, 295, 448, 446, 315, + 309, 444, 442, 317, 441, 440, 438, 319, 320, 333, + 437, 327, 433, 329, 321, 344, 431, 430, 345, 346, + 428, 354, 425, 358, 350, 369, 371, 423, 361, 372, + 376, 374, 418, 389, 415, 382, 386, 390, 392, 393, + 399, 398, 394, 400, 368, 364, 357, 342, 406, 335, + 331, 179, 401, 171, 417, 162, 99, 83, 74, 414, + 73, 69, 488, 467, 469, 471, 76, 75 } ; -static yyconst flex_int16_t yy_def[188] = +static const flex_int16_t yy_def[189] = { 0, - 182, 1, 183, 183, 182, 182, 182, 182, 182, 184, - 185, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 182, 182, 184, 182, 185, 182, 182, 182, - 182, 182, 182, 187, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 182, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 0, 182, 182, 182, 182, 182 + 183, 1, 184, 184, 183, 183, 183, 183, 183, 185, + 186, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 183, 183, 185, 183, 186, 183, 183, 183, + 183, 183, 183, 188, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 183, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 0, 183, 183, 183, 183, 183 } ; -static yyconst flex_int16_t yy_nxt[552] = +static const flex_int16_t yy_nxt[555] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -519,52 +530,52 @@ static yyconst flex_int16_t yy_nxt[552] = 54, 54, 54, 73, 67, 87, 86, 68, 85, 69, 78, 54, 80, 54, 75, 79, 88, 54, 89, 54, 76, 83, 82, 77, 54, 91, 90, 54, 87, 92, - 86, 54, 85, 78, 54, 93, 54, 54, 79, 125, + 86, 54, 85, 78, 54, 93, 54, 54, 79, 126, 88, 89, 54, 94, 95, 54, 97, 54, 91, 54, 90, 96, 92, 54, 54, 98, 99, 102, 93, 103, - 54, 100, 125, 101, 54, 106, 94, 54, 95, 97, + 54, 100, 126, 101, 54, 106, 94, 54, 95, 97, 107, 104, 105, 54, 96, 54, 54, 54, 98, 99, 108, 102, 113, 103, 100, 112, 101, 109, 54, 106, 54, 115, 110, 107, 104, 105, 111, 116, 114, 54, 54, 54, 54, 108, 54, 54, 113, 118, 112, 121, 109, 54, 117, 54, 115, 110, 122, 54, 120, 111, - 124, 116, 114, 119, 54, 54, 123, 54, 126, 128, - 54, 118, 54, 121, 54, 54, 117, 54, 54, 54, - 122, 120, 129, 127, 124, 54, 119, 130, 133, 54, - 123, 126, 54, 128, 132, 54, 131, 136, 134, 54, - - 54, 135, 54, 137, 54, 129, 127, 54, 54, 139, - 130, 142, 133, 54, 54, 138, 54, 132, 144, 131, - 136, 54, 134, 143, 54, 135, 54, 137, 140, 141, - 54, 54, 147, 139, 148, 142, 151, 54, 138, 54, - 145, 54, 144, 54, 54, 146, 143, 158, 54, 149, - 54, 140, 141, 150, 54, 147, 54, 154, 148, 153, - 151, 54, 152, 145, 156, 157, 54, 54, 146, 54, - 155, 158, 149, 159, 160, 54, 150, 54, 54, 162, - 154, 54, 54, 153, 161, 152, 163, 156, 157, 54, - 164, 166, 54, 155, 54, 54, 54, 159, 160, 54, - - 54, 165, 162, 167, 170, 168, 54, 54, 161, 54, - 163, 54, 169, 54, 164, 166, 172, 174, 54, 171, - 179, 54, 173, 54, 165, 178, 54, 167, 170, 168, - 54, 175, 176, 54, 54, 169, 54, 54, 54, 180, - 172, 174, 171, 177, 179, 173, 54, 54, 178, 181, - 54, 54, 54, 54, 175, 54, 176, 54, 54, 54, - 54, 84, 54, 180, 54, 54, 177, 84, 48, 46, - 54, 53, 181, 43, 43, 45, 45, 47, 47, 49, - 48, 46, 44, 182, 5, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182 + 123, 116, 114, 119, 54, 54, 124, 54, 127, 128, + 54, 118, 125, 121, 54, 129, 117, 54, 54, 54, + 122, 120, 54, 134, 123, 54, 119, 133, 132, 54, + 124, 127, 128, 54, 130, 131, 125, 138, 135, 129, + + 54, 137, 136, 54, 54, 141, 54, 134, 54, 54, + 133, 132, 140, 143, 54, 54, 139, 130, 131, 54, + 145, 138, 135, 54, 137, 142, 136, 148, 141, 54, + 144, 54, 146, 54, 54, 54, 140, 143, 152, 139, + 147, 54, 149, 54, 145, 54, 150, 54, 142, 54, + 148, 157, 154, 144, 151, 146, 54, 153, 54, 54, + 54, 155, 152, 147, 54, 159, 149, 160, 54, 150, + 156, 54, 54, 161, 157, 54, 154, 151, 54, 158, + 153, 162, 54, 54, 155, 54, 54, 163, 54, 159, + 54, 160, 164, 156, 165, 167, 54, 161, 166, 168, + + 54, 169, 158, 54, 54, 162, 54, 54, 54, 171, + 163, 173, 54, 54, 54, 54, 164, 177, 165, 167, + 54, 166, 180, 168, 175, 169, 170, 172, 54, 54, + 174, 54, 54, 171, 176, 173, 178, 54, 179, 54, + 181, 177, 54, 182, 54, 54, 180, 54, 175, 170, + 172, 54, 54, 174, 54, 54, 54, 176, 54, 178, + 54, 179, 54, 54, 181, 54, 182, 43, 43, 45, + 45, 47, 47, 84, 54, 54, 54, 84, 48, 46, + 54, 53, 49, 48, 46, 44, 183, 5, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183 } ; -static yyconst flex_int16_t yy_chk[552] = +static const flex_int16_t yy_chk[555] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -573,60 +584,60 @@ static yyconst flex_int16_t yy_chk[552] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 40, 28, 27, 31, 187, 186, 28, 27, - 26, 32, 28, 181, 29, 25, 27, 180, 178, 33, - 32, 36, 40, 27, 28, 27, 31, 177, 49, 26, + 22, 26, 40, 28, 27, 31, 188, 187, 28, 27, + 26, 32, 28, 182, 29, 25, 27, 181, 179, 33, + 32, 36, 40, 27, 28, 27, 31, 178, 49, 26, 49, 35, 28, 27, 26, 30, 28, 33, 25, 36, - 27, 29, 37, 176, 32, 40, 27, 28, 27, 31, + 27, 29, 37, 177, 32, 40, 27, 28, 27, 31, 35, 30, 26, 39, 30, 42, 30, 38, 39, 59, 33, 37, 36, 41, 29, 57, 38, 42, 41, 38, 56, 61, 63, 35, 30, 59, 57, 30, 56, 30, 38, 60, 39, 64, 37, 38, 60, 62, 61, 94, 38, 42, 41, 38, 65, 63, 62, 67, 59, 64, - 57, 66, 56, 38, 68, 64, 175, 69, 38, 94, - 60, 61, 70, 65, 66, 173, 67, 71, 63, 72, - 62, 66, 64, 171, 75, 68, 69, 72, 64, 72, + 57, 66, 56, 38, 68, 64, 176, 69, 38, 94, + 60, 61, 70, 65, 66, 174, 67, 71, 63, 72, + 62, 66, 64, 172, 75, 68, 69, 72, 64, 72, 73, 70, 94, 71, 76, 73, 65, 79, 66, 67, 75, 72, 72, 77, 66, 82, 80, 78, 68, 69, 76, 72, 80, 72, 70, 79, 71, 76, 83, 73, 81, 82, 77, 75, 72, 72, 78, 83, 81, 86, 87, 89, 88, 76, 90, 95, 80, 87, 79, 90, - 76, 91, 86, 93, 82, 77, 91, 92, 89, 78, - 93, 83, 81, 88, 97, 98, 92, 96, 95, 97, - 99, 87, 100, 90, 101, 170, 86, 169, 105, 102, - 91, 89, 98, 96, 93, 103, 88, 99, 102, 167, - 92, 95, 104, 97, 101, 106, 100, 105, 103, 107, - - 108, 104, 110, 106, 112, 98, 96, 113, 111, 108, - 99, 112, 102, 114, 117, 107, 115, 101, 114, 100, - 105, 120, 103, 113, 116, 104, 121, 106, 110, 111, - 123, 127, 117, 108, 120, 112, 127, 131, 107, 128, - 115, 138, 114, 133, 135, 116, 113, 138, 134, 121, - 166, 110, 111, 123, 129, 117, 144, 131, 120, 129, - 127, 165, 128, 115, 134, 135, 139, 164, 116, 141, - 133, 138, 121, 139, 141, 143, 123, 145, 148, 144, - 131, 146, 149, 129, 143, 128, 145, 134, 135, 153, - 146, 149, 151, 133, 150, 156, 157, 139, 141, 159, - - 155, 148, 144, 150, 156, 151, 160, 168, 143, 161, - 145, 158, 153, 172, 146, 149, 158, 160, 154, 157, - 172, 163, 159, 162, 148, 168, 152, 150, 156, 151, - 174, 161, 162, 147, 179, 153, 142, 140, 137, 174, - 158, 160, 157, 163, 172, 159, 136, 132, 168, 179, - 130, 126, 125, 124, 161, 122, 162, 119, 118, 109, - 85, 84, 74, 174, 58, 55, 163, 50, 47, 45, - 34, 24, 179, 183, 183, 184, 184, 185, 185, 17, - 11, 10, 9, 5, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182 + 76, 91, 86, 96, 82, 77, 91, 92, 89, 78, + 91, 83, 81, 88, 100, 93, 92, 101, 95, 96, + 97, 87, 93, 90, 102, 97, 86, 98, 99, 110, + 91, 89, 105, 102, 91, 103, 88, 101, 100, 106, + 92, 95, 96, 104, 98, 99, 93, 106, 103, 97, + + 107, 105, 104, 108, 111, 110, 112, 102, 115, 117, + 101, 100, 108, 112, 113, 114, 107, 98, 99, 116, + 114, 106, 103, 121, 105, 111, 104, 117, 110, 120, + 113, 124, 115, 128, 129, 135, 108, 112, 128, 107, + 116, 132, 120, 134, 114, 171, 121, 130, 111, 170, + 117, 135, 130, 113, 124, 115, 168, 129, 136, 139, + 140, 132, 128, 116, 145, 139, 120, 140, 142, 121, + 134, 167, 144, 142, 135, 149, 130, 124, 166, 136, + 129, 144, 165, 146, 132, 147, 150, 145, 152, 139, + 151, 140, 146, 134, 147, 150, 156, 142, 149, 151, + + 157, 152, 136, 154, 158, 144, 159, 160, 163, 157, + 145, 159, 162, 161, 164, 173, 146, 163, 147, 150, + 169, 149, 173, 151, 161, 152, 154, 158, 180, 155, + 160, 175, 153, 157, 162, 159, 164, 148, 169, 143, + 175, 163, 141, 180, 138, 137, 173, 133, 161, 154, + 158, 131, 127, 160, 126, 125, 123, 162, 122, 164, + 119, 169, 118, 109, 175, 85, 180, 184, 184, 185, + 185, 186, 186, 84, 74, 58, 55, 50, 47, 45, + 34, 24, 17, 11, 10, 9, 5, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183 } ; /* The intent behind this definition is that it'll catch @@ -661,6 +672,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#line 675 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -669,7 +681,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 673 "lex_sql.cpp" +#line 684 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -699,8 +711,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -724,7 +736,7 @@ struct yyguts_t }; /* end struct yyguts_t */ -static int yy_init_globals (yyscan_t yyscanner ); +static int yy_init_globals ( yyscan_t yyscanner ); /* This must go here because YYSTYPE and YYLTYPE are included * from bison output in section 1.*/ @@ -734,44 +746,48 @@ static int yy_init_globals (yyscan_t yyscanner ); int yylex_init (yyscan_t* scanner); -int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy (yyscan_t yyscanner ); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug (yyscan_t yyscanner ); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug (int debug_flag ,yyscan_t yyscanner ); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in (yyscan_t yyscanner ); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in (FILE * in_str ,yyscan_t yyscanner ); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out (yyscan_t yyscanner ); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out (FILE * out_str ,yyscan_t yyscanner ); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -int yyget_leng (yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text (yyscan_t yyscanner ); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno (yyscan_t yyscanner ); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno (int line_number ,yyscan_t yyscanner ); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -YYSTYPE * yyget_lval (yyscan_t yyscanner ); +int yyget_column ( yyscan_t yyscanner ); -void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); +void yyset_column ( int _column_no , yyscan_t yyscanner ); - YYLTYPE *yyget_lloc (yyscan_t yyscanner ); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); + +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -779,33 +795,41 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (yyscan_t yyscanner ); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap (yyscan_t yyscanner ); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif +#ifndef YY_NO_UNPUT + +#endif + #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT - #ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); +static int yyinput ( yyscan_t yyscanner ); #else -static int input (yyscan_t yyscanner ); +static int input ( yyscan_t yyscanner ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -813,7 +837,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -824,7 +848,7 @@ static int input (yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -837,7 +861,7 @@ static int input (yyscan_t yyscanner ); else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -879,7 +903,7 @@ static int input (yyscan_t yyscanner ); #define YY_DECL_IS_OURS 1 extern int yylex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); #define YY_DECL int yylex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) @@ -894,7 +918,7 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -904,16 +928,11 @@ extern int yylex \ */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 75 "lex_sql.l" - - -#line 916 "lex_sql.cpp" - yylval = yylval_param; yylloc = yylloc_param; @@ -938,13 +957,19 @@ YY_DECL if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); } - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 75 "lex_sql.l" + + +#line 970 "lex_sql.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; @@ -960,7 +985,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -969,13 +994,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) - yy_c = yy_meta[(unsigned int) yy_c]; + if ( yy_current_state >= 184 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 485 ); + while ( yy_base[yy_current_state] != 488 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1173,77 +1198,77 @@ RETURN_TOKEN(FLOAT_T); case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(LOAD); +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token YY_BREAK case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATA); +RETURN_TOKEN(LOAD); YY_BREAK case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(INFILE); +RETURN_TOKEN(DATA); YY_BREAK case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); +RETURN_TOKEN(INFILE); YY_BREAK case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(GROUP); +RETURN_TOKEN(EXPLAIN); YY_BREAK case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(BY); +RETURN_TOKEN(GROUP); YY_BREAK case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(STORAGE); +RETURN_TOKEN(BY); YY_BREAK case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(FORMAT); +RETURN_TOKEN(STORAGE); YY_BREAK case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +RETURN_TOKEN(FORMAT); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(LBRACE); +yylval->string=strdup(yytext); RETURN_TOKEN(ID); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(RBRACE); +RETURN_TOKEN(LBRACE); YY_BREAK case 46: YY_RULE_SETUP -#line 125 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 124 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 47: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(EQ); +RETURN_TOKEN(COMMA); YY_BREAK case 48: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(EQ); YY_BREAK case 49: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LE); YY_BREAK case 50: YY_RULE_SETUP @@ -1253,34 +1278,33 @@ RETURN_TOKEN(NE); case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(NE); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(LT); YY_BREAK case 53: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(GE); YY_BREAK case 54: -#line 135 "lex_sql.l" +YY_RULE_SETUP +#line 133 "lex_sql.l" +RETURN_TOKEN(GT); + YY_BREAK case 55: #line 136 "lex_sql.l" case 56: #line 137 "lex_sql.l" case 57: -YY_RULE_SETUP -#line 137 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK +#line 138 "lex_sql.l" case 58: -/* rule 58 can match eol */ YY_RULE_SETUP #line 138 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); +{ return yytext[0]; } YY_BREAK case 59: /* rule 59 can match eol */ @@ -1289,16 +1313,22 @@ YY_RULE_SETUP yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 60: +/* rule 60 can match eol */ YY_RULE_SETUP -#line 141 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; +#line 140 "lex_sql.l" +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 61: YY_RULE_SETUP #line 142 "lex_sql.l" +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 62: +YY_RULE_SETUP +#line 143 "lex_sql.l" ECHO; YY_BREAK -#line 1302 "lex_sql.cpp" +#line 1331 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1377,7 +1407,7 @@ case YY_STATE_EOF(STR): { yyg->yy_did_buffer_switch_on_eof = 0; - if ( yywrap(yyscanner ) ) + if ( yywrap( yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -1430,6 +1460,7 @@ case YY_STATE_EOF(STR): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1442,9 +1473,9 @@ case YY_STATE_EOF(STR): static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) @@ -1473,7 +1504,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1486,21 +1517,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1509,11 +1540,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -1531,7 +1563,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); + yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -1541,7 +1573,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ,yyscanner); + yyrestart( yyin , yyscanner); } else @@ -1555,12 +1587,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } yyg->yy_n_chars += number_to_move; @@ -1576,15 +1611,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1593,10 +1628,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) - yy_c = yy_meta[(unsigned int) yy_c]; + if ( yy_current_state >= 184 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; @@ -1609,11 +1644,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - register int yy_is_jam; + int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; + char *yy_cp = yyg->yy_c_buf_p; - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1622,15 +1657,20 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) - yy_c = yy_meta[(unsigned int) yy_c]; + if ( yy_current_state >= 184 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 182); + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 183); + (void)yyg; return yy_is_jam ? 0 : yy_current_state; } +#ifndef YY_NO_UNPUT + +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) @@ -1656,7 +1696,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -1673,14 +1713,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ /* Reset buffer status. */ - yyrestart(yyin ,yyscanner); + yyrestart( yyin , yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap(yyscanner ) ) - return EOF; + if ( yywrap( yyscanner ) ) + return 0; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; @@ -1718,11 +1758,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); } - yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - yy_load_buffer_state(yyscanner ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. @@ -1751,7 +1791,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag @@ -1780,7 +1820,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1789,13 +1829,13 @@ static void yy_load_buffer_state (yyscan_t yyscanner) /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer(b,file ,yyscanner); + yy_init_buffer( b, file , yyscanner); return b; } @@ -1815,15 +1855,11 @@ static void yy_load_buffer_state (yyscan_t yyscanner) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ,yyscanner ); + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *) b ,yyscanner ); + yyfree( (void *) b , yyscanner ); } -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. @@ -1834,7 +1870,7 @@ extern int isatty (int ); int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flush_buffer(b ,yyscanner); + yy_flush_buffer( b , yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; @@ -1878,7 +1914,7 @@ extern int isatty (int ); b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -1910,7 +1946,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } @@ -1924,13 +1960,13 @@ void yypop_buffer_state (yyscan_t yyscanner) if (!YY_CURRENT_BUFFER) return; - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } @@ -1940,7 +1976,7 @@ void yypop_buffer_state (yyscan_t yyscanner) */ static void yyensure_buffer_stack (yyscan_t yyscanner) { - int num_to_alloc; + yy_size_t num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { @@ -1949,15 +1985,15 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1966,7 +2002,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc @@ -1986,7 +2022,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { @@ -1996,23 +2032,23 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return 0; + return NULL; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer(b ,yyscanner ); + yy_switch_to_buffer( b , yyscanner ); return b; } @@ -2025,29 +2061,29 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ,yyscanner ); + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -2056,7 +2092,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer(buf,n ,yyscanner); + b = yy_scan_buffer( buf, n , yyscanner); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -2072,9 +2108,11 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - (void) fprintf( stderr, "%s\n", msg ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2085,7 +2123,7 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ @@ -2112,7 +2150,7 @@ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) int yyget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -2125,7 +2163,7 @@ int yyget_lineno (yyscan_t yyscanner) int yyget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -2153,7 +2191,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; @@ -2180,51 +2218,51 @@ void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) } /** Set the current line number. - * @param line_number + * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int line_number , yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner); + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - yylineno = line_number; + yylineno = _line_number; } /** Set the current column. - * @param line_number + * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int column_no , yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "yyset_column called with no buffer" , yyscanner); + YY_FATAL_ERROR( "yyset_column called with no buffer" ); - yycolumn = column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * in_str , yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; + yyin = _in_str ; } -void yyset_out (FILE * out_str , yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; + yyout = _out_str ; } int yyget_debug (yyscan_t yyscanner) @@ -2233,10 +2271,10 @@ int yyget_debug (yyscan_t yyscanner) return yy_flex_debug; } -void yyset_debug (int bdebug , yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ @@ -2271,9 +2309,7 @@ void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ - int yylex_init(yyscan_t* ptr_yy_globals) - { if (ptr_yy_globals == NULL){ errno = EINVAL; @@ -2300,9 +2336,7 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ - -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; @@ -2312,20 +2346,20 @@ int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + yyset_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -2336,10 +2370,10 @@ static int yy_init_globals (yyscan_t yyscanner) * This function is called from yylex_destroy(), so don't allocate here. */ - yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack = NULL; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; + yyg->yy_c_buf_p = NULL; yyg->yy_init = 0; yyg->yy_start = 0; @@ -2352,8 +2386,8 @@ static int yy_init_globals (yyscan_t yyscanner) yyin = stdin; yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -2369,17 +2403,17 @@ int yylex_destroy (yyscan_t yyscanner) /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(yyscanner); } /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack ,yyscanner); + yyfree(yyg->yy_buffer_stack , yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack ,yyscanner ); + yyfree( yyg->yy_start_stack , yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time @@ -2397,18 +2431,21 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - register int i; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -2418,11 +2455,16 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - return (void *) malloc( size ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2430,21 +2472,22 @@ void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } void yyfree (void * ptr , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 142 "lex_sql.l" - +#line 143 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str,scanner),scanner); + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 2862800d..ee2a5fc0 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,8 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 6 "lex_sql.h" -#line 2 "lex_sql.l" +#line 5 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -27,10 +26,7 @@ do { \ } \ while (0); - - - -#line 34 "lex_sql.h" +#line 29 "lex_sql.h" #define YY_INT_ALIGNED short int @@ -38,12 +34,36 @@ while (0); #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif +#ifdef yyget_lval +#define yyget_lval_ALREADY_DEFINED +#else +#define yyget_lval yyget_lval +#endif + +#ifdef yyset_lval +#define yyset_lval_ALREADY_DEFINED +#else +#define yyset_lval yyset_lval +#endif + +#ifdef yyget_lloc +#define yyget_lloc_ALREADY_DEFINED +#else +#define yyget_lloc yyget_lloc +#endif + +#ifdef yyset_lloc +#define yyset_lloc_ALREADY_DEFINED +#else +#define yyset_lloc yyset_lloc +#endif + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -77,6 +97,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -84,7 +105,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -115,27 +135,23 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) +#endif /* ! C99 */ -#define YY_USE_CONST +#endif /* ! FLEXINT_H */ -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ +/* begin standard C++ headers. */ -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* An opaque pointer. */ @@ -157,7 +173,15 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE @@ -182,12 +206,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -210,7 +234,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -221,25 +245,25 @@ struct yy_buffer_state }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void yypop_buffer_state (yyscan_t yyscanner ); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void yyfree (void * ,yyscan_t yyscanner ); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(n) 1 +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -264,44 +288,48 @@ void yyfree (void * ,yyscan_t yyscanner ); int yylex_init (yyscan_t* scanner); -int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy (yyscan_t yyscanner ); +int yylex_destroy ( yyscan_t yyscanner ); + +int yyget_debug ( yyscan_t yyscanner ); + +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -int yyget_debug (yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_debug (int debug_flag ,yyscan_t yyscanner ); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner ); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_in (yyscan_t yyscanner ); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_in (FILE * in_str ,yyscan_t yyscanner ); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -FILE *yyget_out (yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -void yyset_out (FILE * out_str ,yyscan_t yyscanner ); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_leng (yyscan_t yyscanner ); +int yyget_lineno ( yyscan_t yyscanner ); -char *yyget_text (yyscan_t yyscanner ); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_lineno (yyscan_t yyscanner ); +int yyget_column ( yyscan_t yyscanner ); -void yyset_lineno (int line_number ,yyscan_t yyscanner ); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE * yyget_lval (yyscan_t yyscanner ); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); - YYLTYPE *yyget_lloc (yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -309,18 +337,18 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (yyscan_t yyscanner ); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap (yyscan_t yyscanner ); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -329,7 +357,12 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Number of entries by which start-condition stack grows. */ @@ -344,7 +377,7 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #define YY_DECL_IS_OURS 1 extern int yylex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); #define YY_DECL int yylex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) @@ -364,9 +397,154 @@ extern int yylex \ #undef YY_DECL #endif -#line 142 "lex_sql.l" +#ifndef yy_create_buffer_ALREADY_DEFINED +#undef yy_create_buffer +#endif +#ifndef yy_delete_buffer_ALREADY_DEFINED +#undef yy_delete_buffer +#endif +#ifndef yy_scan_buffer_ALREADY_DEFINED +#undef yy_scan_buffer +#endif +#ifndef yy_scan_string_ALREADY_DEFINED +#undef yy_scan_string +#endif +#ifndef yy_scan_bytes_ALREADY_DEFINED +#undef yy_scan_bytes +#endif +#ifndef yy_init_buffer_ALREADY_DEFINED +#undef yy_init_buffer +#endif +#ifndef yy_flush_buffer_ALREADY_DEFINED +#undef yy_flush_buffer +#endif +#ifndef yy_load_buffer_state_ALREADY_DEFINED +#undef yy_load_buffer_state +#endif +#ifndef yy_switch_to_buffer_ALREADY_DEFINED +#undef yy_switch_to_buffer +#endif +#ifndef yypush_buffer_state_ALREADY_DEFINED +#undef yypush_buffer_state +#endif +#ifndef yypop_buffer_state_ALREADY_DEFINED +#undef yypop_buffer_state +#endif +#ifndef yyensure_buffer_stack_ALREADY_DEFINED +#undef yyensure_buffer_stack +#endif +#ifndef yylex_ALREADY_DEFINED +#undef yylex +#endif +#ifndef yyrestart_ALREADY_DEFINED +#undef yyrestart +#endif +#ifndef yylex_init_ALREADY_DEFINED +#undef yylex_init +#endif +#ifndef yylex_init_extra_ALREADY_DEFINED +#undef yylex_init_extra +#endif +#ifndef yylex_destroy_ALREADY_DEFINED +#undef yylex_destroy +#endif +#ifndef yyget_debug_ALREADY_DEFINED +#undef yyget_debug +#endif +#ifndef yyset_debug_ALREADY_DEFINED +#undef yyset_debug +#endif +#ifndef yyget_extra_ALREADY_DEFINED +#undef yyget_extra +#endif +#ifndef yyset_extra_ALREADY_DEFINED +#undef yyset_extra +#endif +#ifndef yyget_in_ALREADY_DEFINED +#undef yyget_in +#endif +#ifndef yyset_in_ALREADY_DEFINED +#undef yyset_in +#endif +#ifndef yyget_out_ALREADY_DEFINED +#undef yyget_out +#endif +#ifndef yyset_out_ALREADY_DEFINED +#undef yyset_out +#endif +#ifndef yyget_leng_ALREADY_DEFINED +#undef yyget_leng +#endif +#ifndef yyget_text_ALREADY_DEFINED +#undef yyget_text +#endif +#ifndef yyget_lineno_ALREADY_DEFINED +#undef yyget_lineno +#endif +#ifndef yyset_lineno_ALREADY_DEFINED +#undef yyset_lineno +#endif +#ifndef yyget_column_ALREADY_DEFINED +#undef yyget_column +#endif +#ifndef yyset_column_ALREADY_DEFINED +#undef yyset_column +#endif +#ifndef yywrap_ALREADY_DEFINED +#undef yywrap +#endif +#ifndef yyget_lval_ALREADY_DEFINED +#undef yyget_lval +#endif +#ifndef yyset_lval_ALREADY_DEFINED +#undef yyset_lval +#endif +#ifndef yyget_lloc_ALREADY_DEFINED +#undef yyget_lloc +#endif +#ifndef yyset_lloc_ALREADY_DEFINED +#undef yyset_lloc +#endif +#ifndef yyalloc_ALREADY_DEFINED +#undef yyalloc +#endif +#ifndef yyrealloc_ALREADY_DEFINED +#undef yyrealloc +#endif +#ifndef yyfree_ALREADY_DEFINED +#undef yyfree +#endif +#ifndef yytext_ALREADY_DEFINED +#undef yytext +#endif +#ifndef yyleng_ALREADY_DEFINED +#undef yyleng +#endif +#ifndef yyin_ALREADY_DEFINED +#undef yyin +#endif +#ifndef yyout_ALREADY_DEFINED +#undef yyout +#endif +#ifndef yy_flex_debug_ALREADY_DEFINED +#undef yy_flex_debug +#endif +#ifndef yylineno_ALREADY_DEFINED +#undef yylineno +#endif +#ifndef yytables_fload_ALREADY_DEFINED +#undef yytables_fload +#endif +#ifndef yytables_destroy_ALREADY_DEFINED +#undef yytables_destroy +#endif +#ifndef yyTABLES_NAME_ALREADY_DEFINED +#undef yyTABLES_NAME +#endif + +#line 143 "lex_sql.l" -#line 371 "lex_sql.h" +#line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 25fc9f05..f1d82be0 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -110,6 +110,7 @@ ROLLBACK RETURN_TOKEN(TRX_ROLLBACK); INT RETURN_TOKEN(INT_T); CHAR RETURN_TOKEN(STRING_T); FLOAT RETURN_TOKEN(FLOAT_T); +DATE RETURN_TOKEN(DATE_T); // 增加 DATE 的 token LOAD RETURN_TOKEN(LOAD); DATA RETURN_TOKEN(DATA); INFILE RETURN_TOKEN(INFILE); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 87e43288..698fb67b 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -177,78 +177,79 @@ enum yysymbol_kind_t YYSYMBOL_INT_T = 25, /* INT_T */ YYSYMBOL_STRING_T = 26, /* STRING_T */ YYSYMBOL_FLOAT_T = 27, /* FLOAT_T */ - YYSYMBOL_HELP = 28, /* HELP */ - YYSYMBOL_EXIT = 29, /* EXIT */ - YYSYMBOL_DOT = 30, /* DOT */ - YYSYMBOL_INTO = 31, /* INTO */ - YYSYMBOL_VALUES = 32, /* VALUES */ - YYSYMBOL_FROM = 33, /* FROM */ - YYSYMBOL_WHERE = 34, /* WHERE */ - YYSYMBOL_AND = 35, /* AND */ - YYSYMBOL_SET = 36, /* SET */ - YYSYMBOL_ON = 37, /* ON */ - YYSYMBOL_LOAD = 38, /* LOAD */ - YYSYMBOL_DATA = 39, /* DATA */ - YYSYMBOL_INFILE = 40, /* INFILE */ - YYSYMBOL_EXPLAIN = 41, /* EXPLAIN */ - YYSYMBOL_STORAGE = 42, /* STORAGE */ - YYSYMBOL_FORMAT = 43, /* FORMAT */ - YYSYMBOL_EQ = 44, /* EQ */ - YYSYMBOL_LT = 45, /* LT */ - YYSYMBOL_GT = 46, /* GT */ - YYSYMBOL_LE = 47, /* LE */ - YYSYMBOL_GE = 48, /* GE */ - YYSYMBOL_NE = 49, /* NE */ - YYSYMBOL_NUMBER = 50, /* NUMBER */ - YYSYMBOL_FLOAT = 51, /* FLOAT */ - YYSYMBOL_ID = 52, /* ID */ - YYSYMBOL_SSS = 53, /* SSS */ - YYSYMBOL_54_ = 54, /* '+' */ - YYSYMBOL_55_ = 55, /* '-' */ - YYSYMBOL_56_ = 56, /* '*' */ - YYSYMBOL_57_ = 57, /* '/' */ - YYSYMBOL_UMINUS = 58, /* UMINUS */ - YYSYMBOL_YYACCEPT = 59, /* $accept */ - YYSYMBOL_commands = 60, /* commands */ - YYSYMBOL_command_wrapper = 61, /* command_wrapper */ - YYSYMBOL_exit_stmt = 62, /* exit_stmt */ - YYSYMBOL_help_stmt = 63, /* help_stmt */ - YYSYMBOL_sync_stmt = 64, /* sync_stmt */ - YYSYMBOL_begin_stmt = 65, /* begin_stmt */ - YYSYMBOL_commit_stmt = 66, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 67, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 68, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 69, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 70, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 71, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 72, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 73, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 74, /* attr_def_list */ - YYSYMBOL_attr_def = 75, /* attr_def */ - YYSYMBOL_number = 76, /* number */ - YYSYMBOL_type = 77, /* type */ - YYSYMBOL_insert_stmt = 78, /* insert_stmt */ - YYSYMBOL_value_list = 79, /* value_list */ - YYSYMBOL_value = 80, /* value */ - YYSYMBOL_storage_format = 81, /* storage_format */ - YYSYMBOL_delete_stmt = 82, /* delete_stmt */ - YYSYMBOL_update_stmt = 83, /* update_stmt */ - YYSYMBOL_select_stmt = 84, /* select_stmt */ - YYSYMBOL_calc_stmt = 85, /* calc_stmt */ - YYSYMBOL_expression_list = 86, /* expression_list */ - YYSYMBOL_expression = 87, /* expression */ - YYSYMBOL_rel_attr = 88, /* rel_attr */ - YYSYMBOL_relation = 89, /* relation */ - YYSYMBOL_rel_list = 90, /* rel_list */ - YYSYMBOL_where = 91, /* where */ - YYSYMBOL_condition_list = 92, /* condition_list */ - YYSYMBOL_condition = 93, /* condition */ - YYSYMBOL_comp_op = 94, /* comp_op */ - YYSYMBOL_group_by = 95, /* group_by */ - YYSYMBOL_load_data_stmt = 96, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 97, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 98, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 99 /* opt_semicolon */ + YYSYMBOL_DATE_T = 28, /* DATE_T */ + YYSYMBOL_HELP = 29, /* HELP */ + YYSYMBOL_EXIT = 30, /* EXIT */ + YYSYMBOL_DOT = 31, /* DOT */ + YYSYMBOL_INTO = 32, /* INTO */ + YYSYMBOL_VALUES = 33, /* VALUES */ + YYSYMBOL_FROM = 34, /* FROM */ + YYSYMBOL_WHERE = 35, /* WHERE */ + YYSYMBOL_AND = 36, /* AND */ + YYSYMBOL_SET = 37, /* SET */ + YYSYMBOL_ON = 38, /* ON */ + YYSYMBOL_LOAD = 39, /* LOAD */ + YYSYMBOL_DATA = 40, /* DATA */ + YYSYMBOL_INFILE = 41, /* INFILE */ + YYSYMBOL_EXPLAIN = 42, /* EXPLAIN */ + YYSYMBOL_STORAGE = 43, /* STORAGE */ + YYSYMBOL_FORMAT = 44, /* FORMAT */ + YYSYMBOL_EQ = 45, /* EQ */ + YYSYMBOL_LT = 46, /* LT */ + YYSYMBOL_GT = 47, /* GT */ + YYSYMBOL_LE = 48, /* LE */ + YYSYMBOL_GE = 49, /* GE */ + YYSYMBOL_NE = 50, /* NE */ + YYSYMBOL_NUMBER = 51, /* NUMBER */ + YYSYMBOL_FLOAT = 52, /* FLOAT */ + YYSYMBOL_ID = 53, /* ID */ + YYSYMBOL_SSS = 54, /* SSS */ + YYSYMBOL_55_ = 55, /* '+' */ + YYSYMBOL_56_ = 56, /* '-' */ + YYSYMBOL_57_ = 57, /* '*' */ + YYSYMBOL_58_ = 58, /* '/' */ + YYSYMBOL_UMINUS = 59, /* UMINUS */ + YYSYMBOL_YYACCEPT = 60, /* $accept */ + YYSYMBOL_commands = 61, /* commands */ + YYSYMBOL_command_wrapper = 62, /* command_wrapper */ + YYSYMBOL_exit_stmt = 63, /* exit_stmt */ + YYSYMBOL_help_stmt = 64, /* help_stmt */ + YYSYMBOL_sync_stmt = 65, /* sync_stmt */ + YYSYMBOL_begin_stmt = 66, /* begin_stmt */ + YYSYMBOL_commit_stmt = 67, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 68, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 69, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 70, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 71, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 72, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 73, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 74, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 75, /* attr_def_list */ + YYSYMBOL_attr_def = 76, /* attr_def */ + YYSYMBOL_number = 77, /* number */ + YYSYMBOL_type = 78, /* type */ + YYSYMBOL_insert_stmt = 79, /* insert_stmt */ + YYSYMBOL_value_list = 80, /* value_list */ + YYSYMBOL_value = 81, /* value */ + YYSYMBOL_storage_format = 82, /* storage_format */ + YYSYMBOL_delete_stmt = 83, /* delete_stmt */ + YYSYMBOL_update_stmt = 84, /* update_stmt */ + YYSYMBOL_select_stmt = 85, /* select_stmt */ + YYSYMBOL_calc_stmt = 86, /* calc_stmt */ + YYSYMBOL_expression_list = 87, /* expression_list */ + YYSYMBOL_expression = 88, /* expression */ + YYSYMBOL_rel_attr = 89, /* rel_attr */ + YYSYMBOL_relation = 90, /* relation */ + YYSYMBOL_rel_list = 91, /* rel_list */ + YYSYMBOL_where = 92, /* where */ + YYSYMBOL_condition_list = 93, /* condition_list */ + YYSYMBOL_condition = 94, /* condition */ + YYSYMBOL_comp_op = 95, /* comp_op */ + YYSYMBOL_group_by = 96, /* group_by */ + YYSYMBOL_load_data_stmt = 97, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 98, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 99, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 100 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -579,19 +580,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 65 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 140 +#define YYLAST 141 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 59 +#define YYNTOKENS 60 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 41 /* YYNRULES -- Number of rules. */ -#define YYNRULES 91 +#define YYNRULES 92 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 165 +#define YYNSTATES 166 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 309 +#define YYMAXUTOK 310 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -609,7 +610,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 56, 54, 2, 55, 2, 57, 2, 2, + 2, 2, 57, 55, 2, 56, 2, 58, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -635,23 +636,24 @@ static const yytype_int8 yytranslate[] = 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 58 + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 59 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 188, 188, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 219, 225, 230, 236, 242, 248, 254, - 261, 267, 275, 289, 299, 323, 326, 339, 347, 357, - 360, 361, 362, 365, 382, 385, 396, 400, 404, 413, - 416, 423, 435, 450, 475, 484, 489, 500, 503, 506, - 509, 512, 516, 519, 524, 530, 537, 542, 552, 557, - 562, 576, 579, 585, 588, 593, 600, 612, 624, 636, - 651, 652, 653, 654, 655, 656, 662, 667, 680, 688, - 698, 699 + 0, 189, 189, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 220, 226, 231, 237, 243, 249, 255, + 262, 268, 276, 290, 300, 324, 327, 340, 348, 358, + 361, 362, 363, 364, 367, 384, 387, 398, 402, 406, + 415, 418, 425, 437, 452, 477, 486, 491, 502, 505, + 508, 511, 514, 518, 521, 526, 532, 539, 544, 554, + 559, 564, 578, 581, 587, 590, 595, 602, 614, 626, + 638, 653, 654, 655, 656, 657, 658, 664, 669, 682, + 690, 700, 701 }; #endif @@ -671,19 +673,19 @@ static const char *const yytname[] = "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "STRING_T", - "FLOAT_T", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", - "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", - "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "NUMBER", "FLOAT", "ID", - "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", - "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", - "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", - "desc_table_stmt", "create_index_stmt", "drop_index_stmt", - "create_table_stmt", "attr_def_list", "attr_def", "number", "type", - "insert_stmt", "value_list", "value", "storage_format", "delete_stmt", - "update_stmt", "select_stmt", "calc_stmt", "expression_list", - "expression", "rel_attr", "relation", "rel_list", "where", - "condition_list", "condition", "comp_op", "group_by", "load_data_stmt", - "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR + "FLOAT_T", "DATE_T", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", + "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", + "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "NUMBER", + "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", + "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", + "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", + "show_tables_stmt", "desc_table_stmt", "create_index_stmt", + "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", + "number", "type", "insert_stmt", "value_list", "value", "storage_format", + "delete_stmt", "update_stmt", "select_stmt", "calc_stmt", + "expression_list", "expression", "rel_attr", "relation", "rel_list", + "where", "condition_list", "condition", "comp_op", "group_by", + "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; static const char * @@ -707,23 +709,23 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 50, 10, 11, -16, -16, -30, 2, -97, -5, -6, - -23, -97, -97, -97, -97, -97, -22, -7, 50, 31, - 35, -97, -97, -97, -97, -97, -97, -97, -97, -97, + 51, 6, 14, -16, -16, -38, 2, -97, -5, -3, + -24, -97, -97, -97, -97, -97, -23, -6, 51, 32, + 36, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -2, 17, 24, 37, -16, -97, -97, 47, -97, - -16, -97, -97, -97, -8, -97, 21, -97, -97, 38, - 40, 51, 49, 54, -97, -97, -97, -97, 76, 59, + -97, -2, 17, 23, 25, -16, -97, -97, 24, -97, + -16, -97, -97, -97, -8, -97, 45, -97, -97, 38, + 39, 52, 49, 54, -97, -97, -97, -97, 77, 59, -97, 60, -12, 46, -97, -16, -16, -16, -16, -16, - 48, 67, 71, 55, -41, 53, 56, 57, 58, -97, - -97, -97, -32, -32, -97, -97, -97, 90, 71, 93, - -46, -97, 69, -97, 83, -11, 94, 97, -97, 48, - -97, -41, 36, 36, -97, 82, -41, 110, -97, -97, - -97, 100, 56, 101, 68, -97, -97, 102, -97, -97, - -97, -97, -97, -97, -46, -46, -46, 71, 70, 74, - 94, 84, 105, -41, 107, -97, -97, -97, -97, -97, - -97, -97, -97, 108, -97, 86, -97, -97, 102, -97, - -97, 87, -97, 78, -97 + 47, 68, 67, 55, -42, 53, 56, 57, 58, -97, + -97, -97, -32, -32, -97, -97, -97, 91, 67, 94, + -47, -97, 69, -97, 83, -7, 95, 98, -97, 47, + -97, -42, 37, 37, -97, 82, -42, 111, -97, -97, + -97, -97, 101, 56, 102, 70, -97, -97, 100, -97, + -97, -97, -97, -97, -97, -47, -47, -47, 67, 71, + 74, 95, 84, 106, -42, 108, -97, -97, -97, -97, + -97, -97, -97, -97, 109, -97, 86, -97, -97, 100, + -97, -97, 87, -97, 78, -97 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -733,30 +735,30 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 90, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 91, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 46, 47, 66, 48, - 0, 65, 63, 54, 55, 64, 0, 31, 30, 0, - 0, 0, 0, 0, 88, 1, 91, 2, 0, 0, - 29, 0, 0, 0, 62, 0, 0, 0, 0, 0, - 0, 0, 71, 0, 0, 0, 0, 0, 0, 61, - 67, 56, 57, 58, 59, 60, 68, 69, 71, 0, - 73, 51, 0, 89, 0, 0, 35, 0, 33, 0, - 86, 0, 0, 0, 72, 74, 0, 0, 40, 41, - 42, 38, 0, 0, 0, 70, 53, 44, 80, 81, - 82, 83, 84, 85, 0, 0, 73, 71, 0, 0, - 35, 49, 0, 0, 0, 77, 79, 76, 78, 75, - 52, 87, 39, 0, 36, 0, 34, 32, 44, 43, - 37, 0, 45, 0, 50 + 20, 0, 0, 0, 0, 0, 47, 48, 67, 49, + 0, 66, 64, 55, 56, 65, 0, 31, 30, 0, + 0, 0, 0, 0, 89, 1, 92, 2, 0, 0, + 29, 0, 0, 0, 63, 0, 0, 0, 0, 0, + 0, 0, 72, 0, 0, 0, 0, 0, 0, 62, + 68, 57, 58, 59, 60, 61, 69, 70, 72, 0, + 74, 52, 0, 90, 0, 0, 35, 0, 33, 0, + 87, 0, 0, 0, 73, 75, 0, 0, 40, 41, + 42, 43, 38, 0, 0, 0, 71, 54, 45, 81, + 82, 83, 84, 85, 86, 0, 0, 74, 72, 0, + 0, 35, 50, 0, 0, 0, 78, 80, 77, 79, + 76, 53, 88, 39, 0, 36, 0, 34, 32, 45, + 44, 37, 0, 46, 0, 51 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -97, -97, 114, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -3, 12, -97, -97, -97, - -25, -83, -97, -97, -97, -97, -97, -4, 25, -77, - -97, 26, -96, 0, -97, 27, -97, -97, -97, -97, + -97, -97, 115, -97, -97, -97, -97, -97, -97, -97, + -97, -97, -97, -97, -97, -1, 11, -97, -97, -97, + -22, -83, -97, -97, -97, -97, -97, -4, 27, -77, + -97, 26, -96, 1, -97, 28, -97, -97, -97, -97, -97 }; @@ -764,9 +766,9 @@ static const yytype_int8 yypgoto[] = static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 123, 106, 153, 121, 33, - 144, 52, 156, 34, 35, 36, 37, 53, 54, 55, - 97, 98, 101, 114, 115, 134, 126, 38, 39, 40, + 28, 29, 30, 31, 32, 124, 106, 154, 122, 33, + 145, 52, 157, 34, 35, 36, 37, 53, 54, 55, + 97, 98, 101, 114, 115, 135, 127, 38, 39, 40, 67 }; @@ -776,39 +778,39 @@ static const yytype_uint8 yydefgoto[] = static const yytype_uint8 yytable[] = { 56, 103, 110, 45, 46, 47, 48, 49, 89, 46, - 47, 58, 49, 75, 118, 119, 120, 112, 41, 43, - 42, 44, 57, 113, 78, 79, 59, 60, 127, 61, - 62, 65, 63, 137, 46, 47, 48, 49, 66, 50, - 51, 150, 76, 77, 78, 79, 76, 77, 78, 79, - 68, 145, 147, 112, 80, 1, 2, 146, 148, 113, - 158, 3, 4, 5, 6, 7, 8, 9, 10, 69, - 72, 91, 11, 12, 13, 74, 70, 73, 14, 15, - 128, 129, 130, 131, 132, 133, 16, 83, 17, 71, - 81, 18, 82, 84, 85, 86, 87, 88, 90, 99, - 96, 92, 93, 94, 95, 100, 104, 102, 105, 107, - 108, 109, 111, 116, 117, 122, 124, 136, 138, 139, - 142, 141, 151, 143, 152, 157, 155, 159, 160, 161, - 164, 163, 64, 162, 140, 125, 149, 154, 0, 0, - 135 + 47, 58, 49, 75, 41, 57, 42, 112, 118, 119, + 120, 121, 43, 113, 44, 78, 79, 59, 128, 61, + 62, 60, 65, 138, 63, 46, 47, 48, 49, 66, + 50, 51, 151, 76, 77, 78, 79, 76, 77, 78, + 79, 68, 146, 148, 112, 73, 1, 2, 147, 149, + 113, 159, 3, 4, 5, 6, 7, 8, 9, 10, + 69, 91, 72, 11, 12, 13, 70, 74, 71, 80, + 14, 15, 129, 130, 131, 132, 133, 134, 16, 83, + 17, 81, 82, 18, 84, 85, 86, 87, 88, 90, + 96, 99, 100, 92, 93, 94, 95, 104, 102, 105, + 107, 108, 109, 111, 116, 117, 123, 125, 137, 139, + 140, 144, 142, 143, 152, 153, 158, 156, 160, 161, + 162, 165, 164, 64, 141, 126, 0, 163, 150, 0, + 155, 136 }; static const yytype_int16 yycheck[] = { - 4, 84, 98, 19, 50, 51, 52, 53, 20, 50, - 51, 9, 53, 21, 25, 26, 27, 100, 8, 8, - 10, 10, 52, 100, 56, 57, 31, 33, 111, 52, - 52, 0, 39, 116, 50, 51, 52, 53, 3, 55, - 56, 137, 54, 55, 56, 57, 54, 55, 56, 57, - 52, 134, 135, 136, 33, 5, 6, 134, 135, 136, - 143, 11, 12, 13, 14, 15, 16, 17, 18, 52, - 45, 75, 22, 23, 24, 50, 52, 30, 28, 29, - 44, 45, 46, 47, 48, 49, 36, 36, 38, 52, - 52, 41, 52, 44, 40, 19, 37, 37, 52, 32, - 52, 76, 77, 78, 79, 34, 53, 52, 52, 52, - 52, 21, 19, 44, 31, 21, 19, 35, 8, 19, - 52, 20, 52, 21, 50, 20, 42, 20, 20, 43, - 52, 44, 18, 158, 122, 109, 136, 140, -1, -1, - 113 + 4, 84, 98, 19, 51, 52, 53, 54, 20, 51, + 52, 9, 54, 21, 8, 53, 10, 100, 25, 26, + 27, 28, 8, 100, 10, 57, 58, 32, 111, 53, + 53, 34, 0, 116, 40, 51, 52, 53, 54, 3, + 56, 57, 138, 55, 56, 57, 58, 55, 56, 57, + 58, 53, 135, 136, 137, 31, 5, 6, 135, 136, + 137, 144, 11, 12, 13, 14, 15, 16, 17, 18, + 53, 75, 45, 22, 23, 24, 53, 50, 53, 34, + 29, 30, 45, 46, 47, 48, 49, 50, 37, 37, + 39, 53, 53, 42, 45, 41, 19, 38, 38, 53, + 53, 33, 35, 76, 77, 78, 79, 54, 53, 53, + 53, 53, 21, 19, 45, 32, 21, 19, 36, 8, + 19, 21, 20, 53, 53, 51, 20, 43, 20, 20, + 44, 53, 45, 18, 123, 109, -1, 159, 137, -1, + 141, 113 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -816,37 +818,37 @@ static const yytype_int16 yycheck[] = static const yytype_int8 yystos[] = { 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, - 18, 22, 23, 24, 28, 29, 36, 38, 41, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 78, 82, 83, 84, 85, 96, 97, - 98, 8, 10, 8, 10, 19, 50, 51, 52, 53, - 55, 56, 80, 86, 87, 88, 86, 52, 9, 31, - 33, 52, 52, 39, 61, 0, 3, 99, 52, 52, - 52, 52, 87, 30, 87, 21, 54, 55, 56, 57, - 33, 52, 52, 36, 44, 40, 19, 37, 37, 20, - 52, 86, 87, 87, 87, 87, 52, 89, 90, 32, - 34, 91, 52, 80, 53, 52, 75, 52, 52, 21, - 91, 19, 80, 88, 92, 93, 44, 31, 25, 26, - 27, 77, 21, 74, 19, 90, 95, 80, 44, 45, - 46, 47, 48, 49, 94, 94, 35, 80, 8, 19, - 75, 20, 52, 21, 79, 80, 88, 80, 88, 92, - 91, 52, 50, 76, 74, 42, 81, 20, 80, 20, - 20, 43, 79, 44, 52 + 18, 22, 23, 24, 29, 30, 37, 39, 42, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 79, 83, 84, 85, 86, 97, 98, + 99, 8, 10, 8, 10, 19, 51, 52, 53, 54, + 56, 57, 81, 87, 88, 89, 87, 53, 9, 32, + 34, 53, 53, 40, 62, 0, 3, 100, 53, 53, + 53, 53, 88, 31, 88, 21, 55, 56, 57, 58, + 34, 53, 53, 37, 45, 41, 19, 38, 38, 20, + 53, 87, 88, 88, 88, 88, 53, 90, 91, 33, + 35, 92, 53, 81, 54, 53, 76, 53, 53, 21, + 92, 19, 81, 89, 93, 94, 45, 32, 25, 26, + 27, 28, 78, 21, 75, 19, 91, 96, 81, 45, + 46, 47, 48, 49, 50, 95, 95, 36, 81, 8, + 19, 76, 20, 53, 21, 80, 81, 89, 81, 89, + 93, 92, 53, 51, 77, 75, 43, 82, 20, 81, + 20, 20, 44, 80, 45, 53 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 59, 60, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 74, 75, 75, 76, - 77, 77, 77, 78, 79, 79, 80, 80, 80, 81, - 81, 82, 83, 84, 85, 86, 86, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 88, 88, 89, 90, - 90, 91, 91, 92, 92, 92, 93, 93, 93, 93, - 94, 94, 94, 94, 94, 94, 95, 96, 97, 98, - 99, 99 + 0, 60, 61, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 75, 76, 76, 77, + 78, 78, 78, 78, 79, 80, 80, 81, 81, 81, + 82, 82, 83, 84, 85, 86, 87, 87, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 89, 89, 90, + 91, 91, 92, 92, 93, 93, 93, 94, 94, 94, + 94, 95, 95, 95, 95, 95, 95, 96, 97, 98, + 99, 100, 100 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -856,12 +858,12 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 8, 5, 8, 0, 3, 5, 2, 1, - 1, 1, 1, 8, 0, 3, 1, 1, 1, 0, - 4, 4, 7, 6, 2, 1, 3, 3, 3, 3, - 3, 3, 2, 1, 1, 1, 1, 3, 1, 1, - 3, 0, 2, 0, 1, 3, 3, 3, 3, 3, - 1, 1, 1, 1, 1, 1, 0, 7, 2, 4, - 0, 1 + 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, + 0, 4, 4, 7, 6, 2, 1, 3, 3, 3, + 3, 3, 3, 2, 1, 1, 1, 1, 3, 1, + 1, 3, 0, 2, 0, 1, 3, 3, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 0, 7, 2, + 4, 0, 1 }; @@ -1723,93 +1725,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 189 "yacc_sql.y" +#line 190 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1732 "yacc_sql.cpp" +#line 1734 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 219 "yacc_sql.y" +#line 220 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1741 "yacc_sql.cpp" +#line 1743 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 225 "yacc_sql.y" +#line 226 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1749 "yacc_sql.cpp" +#line 1751 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 230 "yacc_sql.y" +#line 231 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1757 "yacc_sql.cpp" +#line 1759 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 236 "yacc_sql.y" +#line 237 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1765 "yacc_sql.cpp" +#line 1767 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 242 "yacc_sql.y" +#line 243 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1773 "yacc_sql.cpp" +#line 1775 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 248 "yacc_sql.y" +#line 249 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1781 "yacc_sql.cpp" +#line 1783 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 254 "yacc_sql.y" +#line 255 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1791 "yacc_sql.cpp" +#line 1793 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 261 "yacc_sql.y" +#line 262 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1799 "yacc_sql.cpp" +#line 1801 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 267 "yacc_sql.y" +#line 268 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1809 "yacc_sql.cpp" +#line 1811 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 276 "yacc_sql.y" +#line 277 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1820,11 +1822,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1824 "yacc_sql.cpp" +#line 1826 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 290 "yacc_sql.y" +#line 291 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1832,11 +1834,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1836 "yacc_sql.cpp" +#line 1838 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 300 "yacc_sql.y" +#line 301 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1857,19 +1859,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1861 "yacc_sql.cpp" +#line 1863 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 323 "yacc_sql.y" +#line 324 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1869 "yacc_sql.cpp" +#line 1871 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 327 "yacc_sql.y" +#line 328 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1879,11 +1881,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1883 "yacc_sql.cpp" +#line 1885 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE */ -#line 340 "yacc_sql.y" +#line 341 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-3].number); @@ -1891,11 +1893,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = (yyvsp[-1].number); free((yyvsp[-4].string)); } -#line 1895 "yacc_sql.cpp" +#line 1897 "yacc_sql.cpp" break; case 38: /* attr_def: ID type */ -#line 348 "yacc_sql.y" +#line 349 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[0].number); @@ -1903,35 +1905,41 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; free((yyvsp[-1].string)); } -#line 1907 "yacc_sql.cpp" +#line 1909 "yacc_sql.cpp" break; case 39: /* number: NUMBER */ -#line 357 "yacc_sql.y" +#line 358 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1913 "yacc_sql.cpp" +#line 1915 "yacc_sql.cpp" break; case 40: /* type: INT_T */ -#line 360 "yacc_sql.y" +#line 361 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1919 "yacc_sql.cpp" +#line 1921 "yacc_sql.cpp" break; case 41: /* type: STRING_T */ -#line 361 "yacc_sql.y" +#line 362 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1925 "yacc_sql.cpp" +#line 1927 "yacc_sql.cpp" break; case 42: /* type: FLOAT_T */ -#line 362 "yacc_sql.y" +#line 363 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1931 "yacc_sql.cpp" +#line 1933 "yacc_sql.cpp" + break; + + case 43: /* type: DATE_T */ +#line 364 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 1939 "yacc_sql.cpp" break; - case 43: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 366 "yacc_sql.y" + case 44: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ +#line 368 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1944,19 +1952,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1948 "yacc_sql.cpp" +#line 1956 "yacc_sql.cpp" break; - case 44: /* value_list: %empty */ -#line 382 "yacc_sql.y" + case 45: /* value_list: %empty */ +#line 384 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 1956 "yacc_sql.cpp" +#line 1964 "yacc_sql.cpp" break; - case 45: /* value_list: COMMA value value_list */ -#line 385 "yacc_sql.y" + case 46: /* value_list: COMMA value value_list */ +#line 387 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -1966,56 +1974,56 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1970 "yacc_sql.cpp" +#line 1978 "yacc_sql.cpp" break; - case 46: /* value: NUMBER */ -#line 396 "yacc_sql.y" + case 47: /* value: NUMBER */ +#line 398 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 1979 "yacc_sql.cpp" +#line 1987 "yacc_sql.cpp" break; - case 47: /* value: FLOAT */ -#line 400 "yacc_sql.y" + case 48: /* value: FLOAT */ +#line 402 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 1988 "yacc_sql.cpp" +#line 1996 "yacc_sql.cpp" break; - case 48: /* value: SSS */ -#line 404 "yacc_sql.y" + case 49: /* value: SSS */ +#line 406 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 1999 "yacc_sql.cpp" +#line 2007 "yacc_sql.cpp" break; - case 49: /* storage_format: %empty */ -#line 413 "yacc_sql.y" + case 50: /* storage_format: %empty */ +#line 415 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2007 "yacc_sql.cpp" +#line 2015 "yacc_sql.cpp" break; - case 50: /* storage_format: STORAGE FORMAT EQ ID */ -#line 417 "yacc_sql.y" + case 51: /* storage_format: STORAGE FORMAT EQ ID */ +#line 419 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2015 "yacc_sql.cpp" +#line 2023 "yacc_sql.cpp" break; - case 51: /* delete_stmt: DELETE FROM ID where */ -#line 424 "yacc_sql.y" + case 52: /* delete_stmt: DELETE FROM ID where */ +#line 426 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2025,11 +2033,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2029 "yacc_sql.cpp" +#line 2037 "yacc_sql.cpp" break; - case 52: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 436 "yacc_sql.y" + case 53: /* update_stmt: UPDATE ID SET ID EQ value where */ +#line 438 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2042,11 +2050,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2046 "yacc_sql.cpp" +#line 2054 "yacc_sql.cpp" break; - case 53: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 451 "yacc_sql.y" + case 54: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 453 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2069,30 +2077,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2073 "yacc_sql.cpp" +#line 2081 "yacc_sql.cpp" break; - case 54: /* calc_stmt: CALC expression_list */ -#line 476 "yacc_sql.y" + case 55: /* calc_stmt: CALC expression_list */ +#line 478 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2083 "yacc_sql.cpp" +#line 2091 "yacc_sql.cpp" break; - case 55: /* expression_list: expression */ -#line 485 "yacc_sql.y" + case 56: /* expression_list: expression */ +#line 487 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2092 "yacc_sql.cpp" +#line 2100 "yacc_sql.cpp" break; - case 56: /* expression_list: expression COMMA expression_list */ -#line 490 "yacc_sql.y" + case 57: /* expression_list: expression COMMA expression_list */ +#line 492 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2101,99 +2109,99 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2105 "yacc_sql.cpp" +#line 2113 "yacc_sql.cpp" break; - case 57: /* expression: expression '+' expression */ -#line 500 "yacc_sql.y" + case 58: /* expression: expression '+' expression */ +#line 502 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2113 "yacc_sql.cpp" +#line 2121 "yacc_sql.cpp" break; - case 58: /* expression: expression '-' expression */ -#line 503 "yacc_sql.y" + case 59: /* expression: expression '-' expression */ +#line 505 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2121 "yacc_sql.cpp" +#line 2129 "yacc_sql.cpp" break; - case 59: /* expression: expression '*' expression */ -#line 506 "yacc_sql.y" + case 60: /* expression: expression '*' expression */ +#line 508 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2129 "yacc_sql.cpp" +#line 2137 "yacc_sql.cpp" break; - case 60: /* expression: expression '/' expression */ -#line 509 "yacc_sql.y" + case 61: /* expression: expression '/' expression */ +#line 511 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2137 "yacc_sql.cpp" +#line 2145 "yacc_sql.cpp" break; - case 61: /* expression: LBRACE expression RBRACE */ -#line 512 "yacc_sql.y" + case 62: /* expression: LBRACE expression RBRACE */ +#line 514 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2146 "yacc_sql.cpp" +#line 2154 "yacc_sql.cpp" break; - case 62: /* expression: '-' expression */ -#line 516 "yacc_sql.y" + case 63: /* expression: '-' expression */ +#line 518 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2154 "yacc_sql.cpp" +#line 2162 "yacc_sql.cpp" break; - case 63: /* expression: value */ -#line 519 "yacc_sql.y" + case 64: /* expression: value */ +#line 521 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2164 "yacc_sql.cpp" +#line 2172 "yacc_sql.cpp" break; - case 64: /* expression: rel_attr */ -#line 524 "yacc_sql.y" + case 65: /* expression: rel_attr */ +#line 526 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2175 "yacc_sql.cpp" +#line 2183 "yacc_sql.cpp" break; - case 65: /* expression: '*' */ -#line 530 "yacc_sql.y" + case 66: /* expression: '*' */ +#line 532 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2183 "yacc_sql.cpp" +#line 2191 "yacc_sql.cpp" break; - case 66: /* rel_attr: ID */ -#line 537 "yacc_sql.y" + case 67: /* rel_attr: ID */ +#line 539 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2193 "yacc_sql.cpp" +#line 2201 "yacc_sql.cpp" break; - case 67: /* rel_attr: ID DOT ID */ -#line 542 "yacc_sql.y" + case 68: /* rel_attr: ID DOT ID */ +#line 544 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2201,29 +2209,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2205 "yacc_sql.cpp" +#line 2213 "yacc_sql.cpp" break; - case 68: /* relation: ID */ -#line 552 "yacc_sql.y" + case 69: /* relation: ID */ +#line 554 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2213 "yacc_sql.cpp" +#line 2221 "yacc_sql.cpp" break; - case 69: /* rel_list: relation */ -#line 557 "yacc_sql.y" + case 70: /* rel_list: relation */ +#line 559 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2223 "yacc_sql.cpp" +#line 2231 "yacc_sql.cpp" break; - case 70: /* rel_list: relation COMMA rel_list */ -#line 562 "yacc_sql.y" + case 71: /* rel_list: relation COMMA rel_list */ +#line 564 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2234,55 +2242,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2238 "yacc_sql.cpp" +#line 2246 "yacc_sql.cpp" break; - case 71: /* where: %empty */ -#line 576 "yacc_sql.y" + case 72: /* where: %empty */ +#line 578 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2246 "yacc_sql.cpp" +#line 2254 "yacc_sql.cpp" break; - case 72: /* where: WHERE condition_list */ -#line 579 "yacc_sql.y" + case 73: /* where: WHERE condition_list */ +#line 581 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2254 "yacc_sql.cpp" +#line 2262 "yacc_sql.cpp" break; - case 73: /* condition_list: %empty */ -#line 585 "yacc_sql.y" + case 74: /* condition_list: %empty */ +#line 587 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2262 "yacc_sql.cpp" +#line 2270 "yacc_sql.cpp" break; - case 74: /* condition_list: condition */ -#line 588 "yacc_sql.y" + case 75: /* condition_list: condition */ +#line 590 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2272 "yacc_sql.cpp" +#line 2280 "yacc_sql.cpp" break; - case 75: /* condition_list: condition AND condition_list */ -#line 593 "yacc_sql.y" + case 76: /* condition_list: condition AND condition_list */ +#line 595 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2282 "yacc_sql.cpp" +#line 2290 "yacc_sql.cpp" break; - case 76: /* condition: rel_attr comp_op value */ -#line 601 "yacc_sql.y" + case 77: /* condition: rel_attr comp_op value */ +#line 603 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2294,11 +2302,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2298 "yacc_sql.cpp" +#line 2306 "yacc_sql.cpp" break; - case 77: /* condition: value comp_op value */ -#line 613 "yacc_sql.y" + case 78: /* condition: value comp_op value */ +#line 615 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2310,11 +2318,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2314 "yacc_sql.cpp" +#line 2322 "yacc_sql.cpp" break; - case 78: /* condition: rel_attr comp_op rel_attr */ -#line 625 "yacc_sql.y" + case 79: /* condition: rel_attr comp_op rel_attr */ +#line 627 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2326,11 +2334,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2330 "yacc_sql.cpp" +#line 2338 "yacc_sql.cpp" break; - case 79: /* condition: value comp_op rel_attr */ -#line 637 "yacc_sql.y" + case 80: /* condition: value comp_op rel_attr */ +#line 639 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2342,55 +2350,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2346 "yacc_sql.cpp" +#line 2354 "yacc_sql.cpp" break; - case 80: /* comp_op: EQ */ -#line 651 "yacc_sql.y" + case 81: /* comp_op: EQ */ +#line 653 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2352 "yacc_sql.cpp" +#line 2360 "yacc_sql.cpp" break; - case 81: /* comp_op: LT */ -#line 652 "yacc_sql.y" + case 82: /* comp_op: LT */ +#line 654 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2358 "yacc_sql.cpp" +#line 2366 "yacc_sql.cpp" break; - case 82: /* comp_op: GT */ -#line 653 "yacc_sql.y" + case 83: /* comp_op: GT */ +#line 655 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2364 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; - case 83: /* comp_op: LE */ -#line 654 "yacc_sql.y" + case 84: /* comp_op: LE */ +#line 656 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2370 "yacc_sql.cpp" +#line 2378 "yacc_sql.cpp" break; - case 84: /* comp_op: GE */ -#line 655 "yacc_sql.y" + case 85: /* comp_op: GE */ +#line 657 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2376 "yacc_sql.cpp" +#line 2384 "yacc_sql.cpp" break; - case 85: /* comp_op: NE */ -#line 656 "yacc_sql.y" + case 86: /* comp_op: NE */ +#line 658 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2382 "yacc_sql.cpp" +#line 2390 "yacc_sql.cpp" break; - case 86: /* group_by: %empty */ -#line 662 "yacc_sql.y" + case 87: /* group_by: %empty */ +#line 664 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2390 "yacc_sql.cpp" +#line 2398 "yacc_sql.cpp" break; - case 87: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 668 "yacc_sql.y" + case 88: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 670 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2400,20 +2408,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2404 "yacc_sql.cpp" +#line 2412 "yacc_sql.cpp" break; - case 88: /* explain_stmt: EXPLAIN command_wrapper */ -#line 681 "yacc_sql.y" + case 89: /* explain_stmt: EXPLAIN command_wrapper */ +#line 683 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2413 "yacc_sql.cpp" +#line 2421 "yacc_sql.cpp" break; - case 89: /* set_variable_stmt: SET ID EQ value */ -#line 689 "yacc_sql.y" + case 90: /* set_variable_stmt: SET ID EQ value */ +#line 691 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2421,11 +2429,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2425 "yacc_sql.cpp" +#line 2433 "yacc_sql.cpp" break; -#line 2429 "yacc_sql.cpp" +#line 2437 "yacc_sql.cpp" default: break; } @@ -2654,7 +2662,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 701 "yacc_sql.y" +#line 703 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 63a2545b..53b61172 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -79,33 +79,34 @@ extern int yydebug; INT_T = 280, /* INT_T */ STRING_T = 281, /* STRING_T */ FLOAT_T = 282, /* FLOAT_T */ - HELP = 283, /* HELP */ - EXIT = 284, /* EXIT */ - DOT = 285, /* DOT */ - INTO = 286, /* INTO */ - VALUES = 287, /* VALUES */ - FROM = 288, /* FROM */ - WHERE = 289, /* WHERE */ - AND = 290, /* AND */ - SET = 291, /* SET */ - ON = 292, /* ON */ - LOAD = 293, /* LOAD */ - DATA = 294, /* DATA */ - INFILE = 295, /* INFILE */ - EXPLAIN = 296, /* EXPLAIN */ - STORAGE = 297, /* STORAGE */ - FORMAT = 298, /* FORMAT */ - EQ = 299, /* EQ */ - LT = 300, /* LT */ - GT = 301, /* GT */ - LE = 302, /* LE */ - GE = 303, /* GE */ - NE = 304, /* NE */ - NUMBER = 305, /* NUMBER */ - FLOAT = 306, /* FLOAT */ - ID = 307, /* ID */ - SSS = 308, /* SSS */ - UMINUS = 309 /* UMINUS */ + DATE_T = 283, /* DATE_T */ + HELP = 284, /* HELP */ + EXIT = 285, /* EXIT */ + DOT = 286, /* DOT */ + INTO = 287, /* INTO */ + VALUES = 288, /* VALUES */ + FROM = 289, /* FROM */ + WHERE = 290, /* WHERE */ + AND = 291, /* AND */ + SET = 292, /* SET */ + ON = 293, /* ON */ + LOAD = 294, /* LOAD */ + DATA = 295, /* DATA */ + INFILE = 296, /* INFILE */ + EXPLAIN = 297, /* EXPLAIN */ + STORAGE = 298, /* STORAGE */ + FORMAT = 299, /* FORMAT */ + EQ = 300, /* EQ */ + LT = 301, /* LT */ + GT = 302, /* GT */ + LE = 303, /* LE */ + GE = 304, /* GE */ + NE = 305, /* NE */ + NUMBER = 306, /* NUMBER */ + FLOAT = 307, /* FLOAT */ + ID = 308, /* ID */ + SSS = 309, /* SSS */ + UMINUS = 310 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -114,7 +115,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 116 "yacc_sql.y" +#line 117 "yacc_sql.y" ParsedSqlNode * sql_node; ConditionSqlNode * condition; @@ -133,7 +134,7 @@ union YYSTYPE int number; float floats; -#line 137 "yacc_sql.hpp" +#line 138 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 328f775a..476bcdb3 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -89,6 +89,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, INT_T STRING_T FLOAT_T + DATE_T HELP EXIT DOT //QUOTE @@ -360,6 +361,7 @@ type: INT_T { $$ = static_cast(AttrType::INTS); } | STRING_T { $$ = static_cast(AttrType::CHARS); } | FLOAT_T { $$ = static_cast(AttrType::FLOATS); } + | DATE_T { $$ = static_cast(AttrType::DATES); } ; insert_stmt: /*insert 语句的语法解析树*/ INSERT INTO ID VALUES LBRACE value value_list RBRACE From 53200cefb0b9cea4ada4d23defe1c953f466b103 Mon Sep 17 00:00:00 2001 From: Koschei Date: Wed, 25 Sep 2024 01:40:49 +0800 Subject: [PATCH 002/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=20drop=20tab?= =?UTF-8?q?le?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/executor/command_executor.cpp | 6 +++ .../sql/executor/drop_table_executor.cpp | 36 ++++++++++++++++ .../sql/executor/drop_table_executor.h | 30 ++++++++++++++ src/observer/sql/stmt/drop_table_stmt.cpp | 22 ++++++++++ src/observer/sql/stmt/drop_table_stmt.h | 41 +++++++++++++++++++ src/observer/sql/stmt/stmt.cpp | 12 +++++- src/observer/storage/db/db.cpp | 24 +++++++++++ src/observer/storage/db/db.h | 2 + .../storage/default/default_handler.cpp | 30 +++++++++++--- src/observer/storage/table/table.cpp | 37 ++++++++++++++++- src/observer/storage/table/table.h | 5 +++ 11 files changed, 238 insertions(+), 7 deletions(-) create mode 100644 src/observer/sql/executor/drop_table_executor.cpp create mode 100644 src/observer/sql/executor/drop_table_executor.h create mode 100644 src/observer/sql/stmt/drop_table_stmt.cpp create mode 100644 src/observer/sql/stmt/drop_table_stmt.h diff --git a/src/observer/sql/executor/command_executor.cpp b/src/observer/sql/executor/command_executor.cpp index 0da5c4e0..949f9cf3 100644 --- a/src/observer/sql/executor/command_executor.cpp +++ b/src/observer/sql/executor/command_executor.cpp @@ -17,6 +17,7 @@ See the Mulan PSL v2 for more details. */ #include "event/sql_event.h" #include "sql/executor/create_index_executor.h" #include "sql/executor/create_table_executor.h" +#include "sql/executor/drop_table_executor.h" #include "sql/executor/desc_table_executor.h" #include "sql/executor/help_executor.h" #include "sql/executor/load_data_executor.h" @@ -42,6 +43,11 @@ RC CommandExecutor::execute(SQLStageEvent *sql_event) rc = executor.execute(sql_event); } break; + case StmtType::DROP_TABLE: { + DropTableExecutor executor; + rc = executor.execute(sql_event); + } break; + case StmtType::DESC_TABLE: { DescTableExecutor executor; rc = executor.execute(sql_event); diff --git a/src/observer/sql/executor/drop_table_executor.cpp b/src/observer/sql/executor/drop_table_executor.cpp new file mode 100644 index 00000000..ad5b8398 --- /dev/null +++ b/src/observer/sql/executor/drop_table_executor.cpp @@ -0,0 +1,36 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/15 * + * @Description : DropTableExecutor source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "sql/executor/drop_table_executor.h" + +#include "common/log/log.h" +#include "event/session_event.h" +#include "event/sql_event.h" +#include "session/session.h" +#include "sql/stmt/drop_table_stmt.h" +#include "storage/db/db.h" + +RC DropTableExecutor::execute(SQLStageEvent *sql_event) +{ + Stmt *stmt = sql_event->stmt(); + Session *session = sql_event->session_event()->session(); + ASSERT(stmt->type() == StmtType::DROP_TABLE, + "drop table executor can not run this command: %d", + static_cast(stmt->type())); + + auto *drop_table_stmt = dynamic_cast(stmt); + + const char *table_name = drop_table_stmt->table_name().c_str(); + RC rc = session->get_current_db()->drop_table(table_name); + + return rc; +} diff --git a/src/observer/sql/executor/drop_table_executor.h b/src/observer/sql/executor/drop_table_executor.h new file mode 100644 index 00000000..256b60e5 --- /dev/null +++ b/src/observer/sql/executor/drop_table_executor.h @@ -0,0 +1,30 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/15 * + * @Description : DropTableExecutor header file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "common/rc.h" + +class SQLStageEvent; + +/** + * @brief 删除表的执行器 + * @ingroup Executor + */ +class DropTableExecutor +{ +public: + DropTableExecutor() = default; + virtual ~DropTableExecutor() = default; + + RC execute(SQLStageEvent *sql_event); +}; diff --git a/src/observer/sql/stmt/drop_table_stmt.cpp b/src/observer/sql/stmt/drop_table_stmt.cpp new file mode 100644 index 00000000..1b26dedd --- /dev/null +++ b/src/observer/sql/stmt/drop_table_stmt.cpp @@ -0,0 +1,22 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/15 * + * @Description : DropTableStmt source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "drop_table_stmt.h" + +#include "event/sql_debug.h" + +RC DropTableStmt::create(Db *db, const DropTableSqlNode &drop_table, Stmt *&stmt) +{ + stmt = new DropTableStmt(drop_table.relation_name); + sql_debug("drop table statement: table name %s", drop_table.relation_name.c_str()); + return RC::SUCCESS; +} diff --git a/src/observer/sql/stmt/drop_table_stmt.h b/src/observer/sql/stmt/drop_table_stmt.h new file mode 100644 index 00000000..4acaa90e --- /dev/null +++ b/src/observer/sql/stmt/drop_table_stmt.h @@ -0,0 +1,41 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/15 * + * @Description : DropTableStmt header file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include +#include + +#include "sql/stmt/stmt.h" + +class Db; + +/** + * @brief 表示删除表的语句 + * @ingroup Statement + * @details 虽然解析成了stmt,但是与原始的SQL解析后的数据也差不多 + */ +class DropTableStmt : public Stmt +{ +public: + DropTableStmt(const std::string &table_name) : table_name_(table_name) {} + virtual ~DropTableStmt() = default; + + StmtType type() const override { return StmtType::DROP_TABLE; } + + const std::string &table_name() const { return table_name_; } + + static RC create(Db *db, const DropTableSqlNode &drop_table, Stmt *&stmt); + +private: + std::string table_name_; +}; diff --git a/src/observer/sql/stmt/stmt.cpp b/src/observer/sql/stmt/stmt.cpp index 61be9c1b..5bd8711a 100644 --- a/src/observer/sql/stmt/stmt.cpp +++ b/src/observer/sql/stmt/stmt.cpp @@ -12,8 +12,10 @@ See the Mulan PSL v2 for more details. */ // Created by Wangyunlai on 2022/5/22. // -#include "sql/stmt/stmt.h" #include "common/log/log.h" +#include "drop_table_stmt.h" +#include "sql/stmt/stmt.h" +#include "sql/stmt/update_stmt.h" #include "sql/stmt/calc_stmt.h" #include "sql/stmt/create_index_stmt.h" #include "sql/stmt/create_table_stmt.h" @@ -44,6 +46,7 @@ bool stmt_type_ddl(StmtType type) } } } + RC Stmt::create_stmt(Db *db, ParsedSqlNode &sql_node, Stmt *&stmt) { stmt = nullptr; @@ -55,6 +58,9 @@ RC Stmt::create_stmt(Db *db, ParsedSqlNode &sql_node, Stmt *&stmt) case SCF_DELETE: { return DeleteStmt::create(db, sql_node.deletion, stmt); } + case SCF_UPDATE: { + return UpdateStmt::create(db, sql_node.update, stmt); + } case SCF_SELECT: { return SelectStmt::create(db, sql_node.selection, stmt); } @@ -71,6 +77,10 @@ RC Stmt::create_stmt(Db *db, ParsedSqlNode &sql_node, Stmt *&stmt) return CreateTableStmt::create(db, sql_node.create_table, stmt); } + case SCF_DROP_TABLE: { + return DropTableStmt::create(db, sql_node.drop_table, stmt); + } + case SCF_DESC_TABLE: { return DescTableStmt::create(db, sql_node.desc_table, stmt); } diff --git a/src/observer/storage/db/db.cpp b/src/observer/storage/db/db.cpp index 74e9a169..60d10e11 100644 --- a/src/observer/storage/db/db.cpp +++ b/src/observer/storage/db/db.cpp @@ -161,6 +161,30 @@ RC Db::create_table(const char *table_name, span attribut return RC::SUCCESS; } +RC Db::drop_table(const char *table_name) +{ + // check table_name + auto it = opened_tables_.find(table_name); + if (it == opened_tables_.end()) { + LOG_WARN("%s has not been opened before.", table_name); + return RC::SCHEMA_TABLE_NOT_EXIST; + } + + // drop table + auto table = it->second; + auto rc = table->drop(); + if (rc != RC::SUCCESS) { + LOG_ERROR("Failed to drop table %s.", table_name); + return rc; + } + + opened_tables_.erase(table_name); + // release memory + delete table; + LOG_INFO("Drop table success. table name=%s", table_name); + return RC::SUCCESS; +} + Table *Db::find_table(const char *table_name) const { unordered_map::const_iterator iter = opened_tables_.find(table_name); diff --git a/src/observer/storage/db/db.h b/src/observer/storage/db/db.h index 8eee8943..cc8872f5 100644 --- a/src/observer/storage/db/db.h +++ b/src/observer/storage/db/db.h @@ -66,6 +66,8 @@ class Db RC create_table(const char *table_name, span attributes, const StorageFormat storage_format = StorageFormat::ROW_FORMAT); + RC drop_table(const char *table_name); + /** * @brief 根据表名查找表 */ diff --git a/src/observer/storage/default/default_handler.cpp b/src/observer/storage/default/default_handler.cpp index e310aa91..b47148f3 100644 --- a/src/observer/storage/default/default_handler.cpp +++ b/src/observer/storage/default/default_handler.cpp @@ -27,7 +27,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/table/table.h" #include "storage/trx/trx.h" -using namespace std; +// using namespace std; DefaultHandler::DefaultHandler() {} @@ -44,9 +44,9 @@ RC DefaultHandler::init(const char *base_dir, const char *trx_kit_name, const ch return RC::INTERNAL; } - base_dir_ = base_dir; - db_dir_ = db_dir; - trx_kit_name_ = trx_kit_name; + base_dir_ = base_dir; + db_dir_ = db_dir; + trx_kit_name_ = trx_kit_name; log_handler_name_ = log_handler_name; const char *sys_db = "sys"; @@ -102,7 +102,27 @@ RC DefaultHandler::create_db(const char *dbname) return RC::SUCCESS; } -RC DefaultHandler::drop_db(const char *dbname) { return RC::INTERNAL; } +RC DefaultHandler::drop_db(const char *dbname) +{ + if (dbname == nullptr || common::is_blank(dbname)) { + LOG_WARN("Invalid db name"); + return RC::INVALID_ARGUMENT; + } + + // 如果对应目录不存在,返回错误 + filesystem::path dbpath = db_dir_ / dbname; + if (!filesystem::is_directory(dbpath)) { + LOG_WARN("Db not exists: %s", dbname); + return RC::SCHEMA_DB_NOT_EXIST; + } + + error_code ec; + if (!filesystem::remove(dbpath, ec)) { + LOG_ERROR("Drop db fail: %s. error=%s", dbpath.c_str(), strerror(errno)); + return RC::IOERR_WRITE; + } + return RC::SUCCESS; +} RC DefaultHandler::open_db(const char *dbname) { diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 5396c9f1..250f783f 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -127,6 +127,41 @@ RC Table::create(Db *db, int32_t table_id, const char *path, const char *name, c return rc; } +RC Table::drop() +{ + auto rc = sync(); // 刷新所有脏页 + if (rc != RC::SUCCESS) { + return rc; + } + + auto table_name = name(); + error_code ec; + auto path = table_meta_file(base_dir_.c_str(), table_name); + if (!filesystem::remove(path, ec)) { + LOG_ERROR("Drop table meta fail: %s. error=%s", path.c_str(), strerror(errno)); + return RC::IOERR_WRITE; + } + + path = table_data_file(base_dir_.c_str(), table_name); + if (!filesystem::remove(path, ec)) { + LOG_ERROR("Drop table data fail: %s. error=%s", path.c_str(), strerror(errno)); + return RC::IOERR_WRITE; + } + + auto index_num = table_meta_.index_num(); + for (int i = 0; i < index_num; ++i) { + ((BplusTreeIndex *)indexes_[i])->close(); + auto index_name = table_meta_.index(i)->name(); + path = table_index_file(base_dir_.c_str(), table_name, index_name); + if (!filesystem::remove(path, ec)) { + LOG_ERROR("Drop table index data fail: %s. error=%s", path.c_str(), strerror(errno)); + return RC::IOERR_WRITE; + } + } + + return RC::SUCCESS; +} + RC Table::open(Db *db, const char *meta_file, const char *base_dir) { // 加载元数据文件 @@ -272,7 +307,7 @@ RC Table::make_record(int value_num, const Value *values, Record &record) for (int i = 0; i < value_num && OB_SUCC(rc); i++) { const FieldMeta *field = table_meta_.field(i + normal_field_start_index); - const Value & value = values[i]; + const Value &value = values[i]; if (field->type() != value.attr_type()) { Value real_value; rc = Value::cast_to(value, field->type(), real_value); diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index 089e13ae..e56024f7 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -54,6 +54,11 @@ class Table RC create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, span attributes, StorageFormat storage_format); + /** + * 删除一个表 + */ + RC drop(); + /** * 打开一个表 * @param meta_file 保存表元数据的文件完整路径 From 363a003c3049876e8a497807536b43028e559c36 Mon Sep 17 00:00:00 2001 From: Koschei Date: Wed, 25 Sep 2024 17:02:44 +0800 Subject: [PATCH 003/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=8D=95?= =?UTF-8?q?=E5=80=BC=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 3 +- src/observer/sql/operator/logical_operator.h | 1 + .../sql/operator/physical_operator.cpp | 1 + src/observer/sql/operator/physical_operator.h | 1 + .../sql/operator/update_logical_operator.cpp | 17 +++++ .../sql/operator/update_logical_operator.h | 36 ++++++++++ .../sql/operator/update_physical_operator.cpp | 68 ++++++++++++++++++ .../sql/operator/update_physical_operator.h | 49 +++++++++++++ .../sql/optimizer/logical_plan_generator.cpp | 70 ++++++++++++++----- .../sql/optimizer/logical_plan_generator.h | 4 +- src/observer/sql/optimizer/optimize_stage.cpp | 5 +- .../sql/optimizer/physical_plan_generator.cpp | 53 ++++++++++---- .../sql/optimizer/physical_plan_generator.h | 2 + src/observer/sql/stmt/update_stmt.cpp | 66 +++++++++++++++-- src/observer/sql/stmt/update_stmt.h | 24 ++++--- src/observer/storage/record/record.h | 26 +++++-- .../storage/record/record_manager.cpp | 27 ++++++- src/observer/storage/record/record_manager.h | 10 ++- src/observer/storage/table/table.cpp | 27 +++++++ src/observer/storage/table/table.h | 1 + src/observer/storage/trx/mvcc_trx.cpp | 5 ++ src/observer/storage/trx/mvcc_trx.h | 1 + src/observer/storage/trx/trx.cpp | 2 +- src/observer/storage/trx/trx.h | 7 +- src/observer/storage/trx/vacuous_trx.cpp | 5 ++ src/observer/storage/trx/vacuous_trx.h | 3 +- 26 files changed, 452 insertions(+), 62 deletions(-) create mode 100644 src/observer/sql/operator/update_logical_operator.cpp create mode 100644 src/observer/sql/operator/update_logical_operator.h create mode 100644 src/observer/sql/operator/update_physical_operator.cpp create mode 100644 src/observer/sql/operator/update_physical_operator.h diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index d465c7cf..c606c5cd 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -76,7 +76,8 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(LOGBUF_FULL) \ DEFINE_RC(LOG_FILE_FULL) \ DEFINE_RC(LOG_ENTRY_INVALID) \ - DEFINE_RC(UNSUPPORTED) + DEFINE_RC(UNSUPPORTED) \ + DEFINE_RC(VALUE_TOO_LONG) enum class RC { diff --git a/src/observer/sql/operator/logical_operator.h b/src/observer/sql/operator/logical_operator.h index 32fb13cd..b64c6fc6 100644 --- a/src/observer/sql/operator/logical_operator.h +++ b/src/observer/sql/operator/logical_operator.h @@ -39,6 +39,7 @@ enum class LogicalOperatorType JOIN, ///< 连接 INSERT, ///< 插入 DELETE, ///< 删除,删除可能会有子查询 + UPDATE, ///< 更新,更新可能会有子查询 EXPLAIN, ///< 查看执行计划 GROUP_BY, ///< 分组 }; diff --git a/src/observer/sql/operator/physical_operator.cpp b/src/observer/sql/operator/physical_operator.cpp index fa81906d..c3a4c5ec 100644 --- a/src/observer/sql/operator/physical_operator.cpp +++ b/src/observer/sql/operator/physical_operator.cpp @@ -24,6 +24,7 @@ std::string physical_operator_type_name(PhysicalOperatorType type) case PhysicalOperatorType::PREDICATE: return "PREDICATE"; case PhysicalOperatorType::INSERT: return "INSERT"; case PhysicalOperatorType::DELETE: return "DELETE"; + case PhysicalOperatorType::UPDATE: return "UPDATE"; case PhysicalOperatorType::PROJECT: return "PROJECT"; case PhysicalOperatorType::STRING_LIST: return "STRING_LIST"; case PhysicalOperatorType::HASH_GROUP_BY: return "HASH_GROUP_BY"; diff --git a/src/observer/sql/operator/physical_operator.h b/src/observer/sql/operator/physical_operator.h index a3b20ed3..63f5c6f2 100644 --- a/src/observer/sql/operator/physical_operator.h +++ b/src/observer/sql/operator/physical_operator.h @@ -50,6 +50,7 @@ enum class PhysicalOperatorType STRING_LIST, DELETE, INSERT, + UPDATE, SCALAR_GROUP_BY, HASH_GROUP_BY, GROUP_BY_VEC, diff --git a/src/observer/sql/operator/update_logical_operator.cpp b/src/observer/sql/operator/update_logical_operator.cpp new file mode 100644 index 00000000..98abfa26 --- /dev/null +++ b/src/observer/sql/operator/update_logical_operator.cpp @@ -0,0 +1,17 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/20 * + * @Description : UpdateLogicalOperator source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "update_logical_operator.h" + +UpdateLogicalOperator::UpdateLogicalOperator(Table *table, const char *attribute_name, const Value *value) + : table_(table), attribute_name_(attribute_name), value_(value) +{} diff --git a/src/observer/sql/operator/update_logical_operator.h b/src/observer/sql/operator/update_logical_operator.h new file mode 100644 index 00000000..4e8161fb --- /dev/null +++ b/src/observer/sql/operator/update_logical_operator.h @@ -0,0 +1,36 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/20 * + * @Description : UpdateLogicalOperator header file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "sql/operator/logical_operator.h" + +/** + * @brief 逻辑算子,用于执行udpate语句 + * @ingroup LogicalOperator + */ +class UpdateLogicalOperator : public LogicalOperator +{ +public: + explicit UpdateLogicalOperator(Table *table, const char *attribute_name, const Value *value); + ~UpdateLogicalOperator() override = default; + + LogicalOperatorType type() const override { return LogicalOperatorType::UPDATE; } + Table *table() const { return table_; } + const char *attribute_name() const { return attribute_name_; } + const Value *values() const { return value_; } + +private: + Table *table_ = nullptr; + const char *attribute_name_ = nullptr; + const Value *value_ = nullptr; +}; diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp new file mode 100644 index 00000000..0adde581 --- /dev/null +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -0,0 +1,68 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/17 * + * @Description : UpdatePhysicalOperator source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "update_physical_operator.h" + +#include + +RC UpdatePhysicalOperator::open(Trx *trx) +{ + if (children_.empty()) { + return RC::SUCCESS; + } + + std::unique_ptr &child = children_[0]; + + RC rc = child->open(trx); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to open child operator: %s", strrc(rc)); + return rc; + } + + trx_ = trx; + + while (OB_SUCC(rc = child->next())) { + Tuple *tuple = child->current_tuple(); + if (nullptr == tuple) { + LOG_WARN("failed to get current record: %s", strrc(rc)); + return rc; + } + + RowTuple *row_tuple = static_cast(tuple); + Record &record = row_tuple->record(); + records_.emplace_back(std::move(record)); + } + + child->close(); + + const FieldMeta *field_meta = table_->table_meta().field(attribute_name_); + // 先收集记录再更新 + // 记录的有效性由事务来保证,如果事务不保证删除的有效性,那说明此事务类型不支持并发控制,比如VacuousTrx + for (Record &old_record : records_) { + Record new_record; + // rid 得手动拷贝 + new_record.set_rid(old_record.rid()); + new_record.copy_data(old_record.data(), old_record.len()); + new_record.set_field(field_meta->offset(), field_meta->len(), value_); + rc = trx_->update_record(table_, old_record, new_record); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to update record: %s", strrc(rc)); + return rc; + } + } + + return RC::SUCCESS; +} + +RC UpdatePhysicalOperator::next() { return RC::RECORD_EOF; } + +RC UpdatePhysicalOperator::close() { return RC::SUCCESS; } diff --git a/src/observer/sql/operator/update_physical_operator.h b/src/observer/sql/operator/update_physical_operator.h new file mode 100644 index 00000000..f7af16be --- /dev/null +++ b/src/observer/sql/operator/update_physical_operator.h @@ -0,0 +1,49 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/17 * + * @Description : UpdatePhysicalOperator header file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "sql/operator/physical_operator.h" + +class Trx; +class UpdateStmt; + +/** + * @brief 物理算子,更新 + * @ingroup PhysicalOperator + */ +class UpdatePhysicalOperator : public PhysicalOperator +{ +public: + UpdatePhysicalOperator(Table *table, const char *attribute_name, const Value *value) + : table_(table), attribute_name_(attribute_name), value_(value) + {} + + virtual ~UpdatePhysicalOperator() = default; + + PhysicalOperatorType type() const override { return PhysicalOperatorType::UPDATE; } + const char *attribute_name() const { return attribute_name_; } + const Value *value() const { return value_; } + + RC open(Trx *trx) override; + RC next() override; + RC close() override; + + Tuple *current_tuple() override { return nullptr; } + +private: + Table *table_ = nullptr; + const char *attribute_name_ = nullptr; + Trx *trx_ = nullptr; + const Value *value_ = nullptr; + std::vector records_; +}; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 8c418b32..aed7b2e8 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -37,6 +37,9 @@ See the Mulan PSL v2 for more details. */ #include "sql/expr/expression_iterator.h" +#include "sql/stmt/update_stmt.h" +#include "sql/operator/update_logical_operator.h" + using namespace std; using namespace common; @@ -68,6 +71,12 @@ RC LogicalPlanGenerator::create(Stmt *stmt, unique_ptr &logical rc = create_plan(delete_stmt, logical_operator); } break; + case StmtType::UPDATE: { + UpdateStmt *update_stmt = static_cast(stmt); + + rc = create_plan(update_stmt, logical_operator); + } break; + case StmtType::EXPLAIN: { ExplainStmt *explain_stmt = static_cast(stmt); @@ -169,11 +178,10 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrvalue_type(), left->value_type()); if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { ExprType left_type = left->type(); - auto cast_expr = make_unique(std::move(left), right->value_type()); + auto cast_expr = make_unique(std::move(left), right->value_type()); if (left_type == ExprType::VALUE) { Value left_val; - if (OB_FAIL(rc = cast_expr->try_get_value(left_val))) - { + if (OB_FAIL(rc = cast_expr->try_get_value(left_val))) { LOG_WARN("failed to get value from left child", strrc(rc)); return rc; } @@ -183,11 +191,10 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrtype(); - auto cast_expr = make_unique(std::move(right), left->value_type()); + auto cast_expr = make_unique(std::move(right), left->value_type()); if (right_type == ExprType::VALUE) { Value right_val; - if (OB_FAIL(rc = cast_expr->try_get_value(right_val))) - { + if (OB_FAIL(rc = cast_expr->try_get_value(right_val))) { LOG_WARN("failed to get value from right child", strrc(rc)); return rc; } @@ -261,6 +268,34 @@ RC LogicalPlanGenerator::create_plan(DeleteStmt *delete_stmt, unique_ptr &logical_operator) +{ + Table *table = update_stmt->table(); + const char *attribute_name = update_stmt->attribute_name(); + const Value *value = update_stmt->values(); // 目前只用支持一个值 + FilterStmt *filter_stmt = update_stmt->filter_stmt(); + unique_ptr table_get_oper(new TableGetLogicalOperator(table, ReadWriteMode::READ_WRITE)); + + unique_ptr predicate_oper; + + RC rc = create_plan(filter_stmt, predicate_oper); + if (rc != RC::SUCCESS) { + return rc; + } + + unique_ptr update_oper(new UpdateLogicalOperator(table, attribute_name, value)); + + if (predicate_oper) { + predicate_oper->add_child(std::move(table_get_oper)); + update_oper->add_child(std::move(predicate_oper)); + } else { + update_oper->add_child(std::move(table_get_oper)); + } + + logical_operator = std::move(update_oper); + return rc; +} + RC LogicalPlanGenerator::create_plan(ExplainStmt *explain_stmt, unique_ptr &logical_operator) { unique_ptr child_oper; @@ -280,10 +315,10 @@ RC LogicalPlanGenerator::create_plan(ExplainStmt *explain_stmt, unique_ptr &logical_operator) { - vector> &group_by_expressions = select_stmt->group_by(); - vector aggregate_expressions; - vector> &query_expressions = select_stmt->query_expressions(); - function&)> collector = [&](unique_ptr &expr) -> RC { + vector> &group_by_expressions = select_stmt->group_by(); + vector aggregate_expressions; + vector> &query_expressions = select_stmt->query_expressions(); + function &)> collector = [&](unique_ptr &expr) -> RC { RC rc = RC::SUCCESS; if (expr->type() == ExprType::AGGREGATION) { expr->set_pos(aggregate_expressions.size() + group_by_expressions.size()); @@ -293,7 +328,7 @@ RC LogicalPlanGenerator::create_group_by_plan(SelectStmt *select_stmt, unique_pt return rc; }; - function&)> bind_group_by_expr = [&](unique_ptr &expr) -> RC { + function &)> bind_group_by_expr = [&](unique_ptr &expr) -> RC { RC rc = RC::SUCCESS; for (size_t i = 0; i < group_by_expressions.size(); i++) { auto &group_by = group_by_expressions[i]; @@ -309,8 +344,8 @@ RC LogicalPlanGenerator::create_group_by_plan(SelectStmt *select_stmt, unique_pt return rc; }; - bool found_unbound_column = false; - function&)> find_unbound_column = [&](unique_ptr &expr) -> RC { + bool found_unbound_column = false; + function &)> find_unbound_column = [&](unique_ptr &expr) -> RC { RC rc = RC::SUCCESS; if (expr->type() == ExprType::AGGREGATION) { // do nothing @@ -318,12 +353,11 @@ RC LogicalPlanGenerator::create_group_by_plan(SelectStmt *select_stmt, unique_pt // do nothing } else if (expr->type() == ExprType::FIELD) { found_unbound_column = true; - }else { + } else { rc = ExpressionIterator::iterate_child_expr(*expr, find_unbound_column); } return rc; }; - for (unique_ptr &expression : query_expressions) { bind_group_by_expr(expression); @@ -350,8 +384,8 @@ RC LogicalPlanGenerator::create_group_by_plan(SelectStmt *select_stmt, unique_pt // 如果只需要聚合,但是没有group by 语句,需要生成一个空的group by 语句 - auto group_by_oper = make_unique(std::move(group_by_expressions), - std::move(aggregate_expressions)); + auto group_by_oper = + make_unique(std::move(group_by_expressions), std::move(aggregate_expressions)); logical_operator = std::move(group_by_oper); return RC::SUCCESS; -} \ No newline at end of file +} diff --git a/src/observer/sql/optimizer/logical_plan_generator.h b/src/observer/sql/optimizer/logical_plan_generator.h index d02cb181..46e951ff 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.h +++ b/src/observer/sql/optimizer/logical_plan_generator.h @@ -25,6 +25,7 @@ class SelectStmt; class FilterStmt; class InsertStmt; class DeleteStmt; +class UpdateStmt; class ExplainStmt; class LogicalOperator; @@ -42,9 +43,10 @@ class LogicalPlanGenerator RC create_plan(FilterStmt *filter_stmt, std::unique_ptr &logical_operator); RC create_plan(InsertStmt *insert_stmt, std::unique_ptr &logical_operator); RC create_plan(DeleteStmt *delete_stmt, std::unique_ptr &logical_operator); + RC create_plan(UpdateStmt *update_stmt, std::unique_ptr &logical_operator); RC create_plan(ExplainStmt *explain_stmt, std::unique_ptr &logical_operator); RC create_group_by_plan(SelectStmt *select_stmt, std::unique_ptr &logical_operator); int implicit_cast_cost(AttrType from, AttrType to); -}; \ No newline at end of file +}; diff --git a/src/observer/sql/optimizer/optimize_stage.cpp b/src/observer/sql/optimizer/optimize_stage.cpp index 902c2ce8..81883f1a 100644 --- a/src/observer/sql/optimizer/optimize_stage.cpp +++ b/src/observer/sql/optimizer/optimize_stage.cpp @@ -77,10 +77,11 @@ RC OptimizeStage::generate_physical_plan( unique_ptr &logical_operator, unique_ptr &physical_operator, Session *session) { RC rc = RC::SUCCESS; - if (session->get_execution_mode() == ExecutionMode::CHUNK_ITERATOR && LogicalOperator::can_generate_vectorized_operator(logical_operator->type())) { + if (session->get_execution_mode() == ExecutionMode::CHUNK_ITERATOR && + LogicalOperator::can_generate_vectorized_operator(logical_operator->type())) { LOG_INFO("use chunk iterator"); session->set_used_chunk_mode(true); - rc = physical_plan_generator_.create_vec(*logical_operator, physical_operator); + rc = physical_plan_generator_.create_vec(*logical_operator, physical_operator); } else { LOG_INFO("use tuple iterator"); session->set_used_chunk_mode(false); diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index 9e946c2d..cb1ddfdc 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -43,6 +43,8 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/scalar_group_by_physical_operator.h" #include "sql/operator/table_scan_vec_physical_operator.h" #include "sql/optimizer/physical_plan_generator.h" +#include "sql/operator/update_logical_operator.h" +#include "sql/operator/update_physical_operator.h" using namespace std; @@ -75,6 +77,10 @@ RC PhysicalPlanGenerator::create(LogicalOperator &logical_operator, unique_ptr

(logical_operator), oper); } break; + case LogicalOperatorType::UPDATE: { + return create_plan(static_cast(logical_operator), oper); + } break; + case LogicalOperatorType::EXPLAIN: { return create_plan(static_cast(logical_operator), oper); } break; @@ -119,8 +125,6 @@ RC PhysicalPlanGenerator::create_vec(LogicalOperator &logical_operator, unique_p return rc; } - - RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, unique_ptr &oper) { vector> &predicates = table_get_oper.predicates(); @@ -277,6 +281,32 @@ RC PhysicalPlanGenerator::create_plan(DeleteLogicalOperator &delete_oper, unique return rc; } +RC PhysicalPlanGenerator::create_plan(UpdateLogicalOperator &update_oper, std::unique_ptr &oper) +{ + vector> &child_opers = update_oper.children(); + + unique_ptr child_physical_oper; + + RC rc = RC::SUCCESS; + if (!child_opers.empty()) { + LogicalOperator *child_oper = child_opers.front().get(); + + rc = create(*child_oper, child_physical_oper); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to create physical operator. rc=%s", strrc(rc)); + return rc; + } + } + + oper = unique_ptr( + new UpdatePhysicalOperator(update_oper.table(), update_oper.attribute_name(), update_oper.values())); + + if (child_physical_oper) { + oper->add_child(std::move(child_physical_oper)); + } + return rc; +} + RC PhysicalPlanGenerator::create_plan(ExplainLogicalOperator &explain_oper, unique_ptr &oper) { vector> &child_opers = explain_oper.children(); @@ -338,13 +368,13 @@ RC PhysicalPlanGenerator::create_plan(GroupByLogicalOperator &logical_oper, std: { RC rc = RC::SUCCESS; - vector> &group_by_expressions = logical_oper.group_by_expressions(); + vector> &group_by_expressions = logical_oper.group_by_expressions(); unique_ptr group_by_oper; if (group_by_expressions.empty()) { group_by_oper = make_unique(std::move(logical_oper.aggregate_expressions())); } else { - group_by_oper = make_unique(std::move(logical_oper.group_by_expressions()), - std::move(logical_oper.aggregate_expressions())); + group_by_oper = make_unique( + std::move(logical_oper.group_by_expressions()), std::move(logical_oper.aggregate_expressions())); } ASSERT(logical_oper.children().size() == 1, "group by operator should have 1 child"); @@ -366,8 +396,9 @@ RC PhysicalPlanGenerator::create_plan(GroupByLogicalOperator &logical_oper, std: RC PhysicalPlanGenerator::create_vec_plan(TableGetLogicalOperator &table_get_oper, unique_ptr &oper) { vector> &predicates = table_get_oper.predicates(); - Table *table = table_get_oper.table(); - TableScanVecPhysicalOperator *table_scan_oper = new TableScanVecPhysicalOperator(table, table_get_oper.read_write_mode()); + Table *table = table_get_oper.table(); + TableScanVecPhysicalOperator *table_scan_oper = + new TableScanVecPhysicalOperator(table, table_get_oper.read_write_mode()); table_scan_oper->set_predicates(std::move(predicates)); oper = unique_ptr(table_scan_oper); LOG_TRACE("use vectorized table scan"); @@ -377,14 +408,13 @@ RC PhysicalPlanGenerator::create_vec_plan(TableGetLogicalOperator &table_get_ope RC PhysicalPlanGenerator::create_vec_plan(GroupByLogicalOperator &logical_oper, unique_ptr &oper) { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; unique_ptr physical_oper = nullptr; if (logical_oper.group_by_expressions().empty()) { physical_oper = make_unique(std::move(logical_oper.aggregate_expressions())); } else { physical_oper = make_unique( - std::move(logical_oper.group_by_expressions()), std::move(logical_oper.aggregate_expressions())); - + std::move(logical_oper.group_by_expressions()), std::move(logical_oper.aggregate_expressions())); } ASSERT(logical_oper.children().size() == 1, "group by operator should have 1 child"); @@ -439,7 +469,6 @@ RC PhysicalPlanGenerator::create_vec_plan(ProjectLogicalOperator &project_oper, return rc; } - RC PhysicalPlanGenerator::create_vec_plan(ExplainLogicalOperator &explain_oper, unique_ptr &oper) { vector> &child_opers = explain_oper.children(); @@ -460,4 +489,4 @@ RC PhysicalPlanGenerator::create_vec_plan(ExplainLogicalOperator &explain_oper, oper = std::move(explain_physical_oper); return rc; -} \ No newline at end of file +} diff --git a/src/observer/sql/optimizer/physical_plan_generator.h b/src/observer/sql/optimizer/physical_plan_generator.h index bac779a0..e6cf6202 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.h +++ b/src/observer/sql/optimizer/physical_plan_generator.h @@ -23,6 +23,7 @@ class PredicateLogicalOperator; class ProjectLogicalOperator; class InsertLogicalOperator; class DeleteLogicalOperator; +class UpdateLogicalOperator; class ExplainLogicalOperator; class JoinLogicalOperator; class CalcLogicalOperator; @@ -49,6 +50,7 @@ class PhysicalPlanGenerator RC create_plan(ProjectLogicalOperator &logical_oper, std::unique_ptr &oper); RC create_plan(InsertLogicalOperator &logical_oper, std::unique_ptr &oper); RC create_plan(DeleteLogicalOperator &logical_oper, std::unique_ptr &oper); + RC create_plan(UpdateLogicalOperator &logical_oper, std::unique_ptr &oper); RC create_plan(ExplainLogicalOperator &logical_oper, std::unique_ptr &oper); RC create_plan(JoinLogicalOperator &logical_oper, std::unique_ptr &oper); RC create_plan(CalcLogicalOperator &logical_oper, std::unique_ptr &oper); diff --git a/src/observer/sql/stmt/update_stmt.cpp b/src/observer/sql/stmt/update_stmt.cpp index 92df6a6d..946f3dad 100644 --- a/src/observer/sql/stmt/update_stmt.cpp +++ b/src/observer/sql/stmt/update_stmt.cpp @@ -13,14 +13,70 @@ See the Mulan PSL v2 for more details. */ // #include "sql/stmt/update_stmt.h" +#include "sql/stmt/filter_stmt.h" -UpdateStmt::UpdateStmt(Table *table, Value *values, int value_amount) - : table_(table), values_(values), value_amount_(value_amount) +#include +#include + +UpdateStmt::UpdateStmt(Table *table, const char *attribute_name, const Value *values, FilterStmt *filter_stmt) + : table_(table), attribute_name_(attribute_name), values_(values), filter_stmt_(filter_stmt) {} -RC UpdateStmt::create(Db *db, const UpdateSqlNode &update, Stmt *&stmt) +RC UpdateStmt::create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt) { // TODO - stmt = nullptr; - return RC::INTERNAL; + const char *table_name = update_sql.relation_name.c_str(); + if (nullptr == db || nullptr == table_name || update_sql.attribute_name.empty()) { + LOG_WARN("invalid argument. db=%p, table_name=%p, attribute_name=%s", + db, table_name, update_sql.attribute_name.c_str()); + return RC::INVALID_ARGUMENT; + } + + // check whether the table exists + Table *table = db->find_table(table_name); + if (nullptr == table) { + LOG_WARN("no such table. db=%s, table_name=%s", db->name(), table_name); + return RC::SCHEMA_TABLE_NOT_EXIST; + } + + // check whether the field exists + auto field_meta = table->table_meta().field(update_sql.attribute_name.c_str()); + if (field_meta == nullptr) { + return RC::SCHEMA_FIELD_NOT_EXIST; + } + + // check whether the value valid + const Value *value = &update_sql.value; + if (value->attr_type() == AttrType::INTS && field_meta->type() == AttrType::FLOATS) { + // do nothing,但是好像不用考虑类型转换 + } else if (value->attr_type() != field_meta->type()) { + LOG_ERROR("Schema field type mismatch. Field: %s, Expected Type: %s, Provided Type: %s", + field_meta->name(), + attr_type_to_string(field_meta->type()), + attr_type_to_string(value->attr_type())); + return RC::SCHEMA_FIELD_TYPE_MISMATCH; + } else if (value->length() > field_meta->len()) { + LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", + field_meta->name(), + attr_type_to_string(field_meta->type()), + field_meta->offset(), + value->length(), + field_meta->len()); + return RC::VALUE_TOO_LONG; + } + + std::unordered_map table_map; + table_map.insert(std::pair(std::string(table_name), table)); + + FilterStmt *filter_stmt = nullptr; + RC rc = FilterStmt::create( + db, table, &table_map, update_sql.conditions.data(), static_cast(update_sql.conditions.size()), filter_stmt); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to create filter statement. rc=%d:%s", rc, strrc(rc)); + return rc; + } + + // everything alright + stmt = new UpdateStmt(table, update_sql.attribute_name.c_str(), value, filter_stmt); + return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/update_stmt.h b/src/observer/sql/stmt/update_stmt.h index 762a8019..cb451f98 100644 --- a/src/observer/sql/stmt/update_stmt.h +++ b/src/observer/sql/stmt/update_stmt.h @@ -18,6 +18,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/stmt/stmt.h" class Table; +class FilterStmt; /** * @brief 更新语句 @@ -27,18 +28,23 @@ class UpdateStmt : public Stmt { public: UpdateStmt() = default; - UpdateStmt(Table *table, Value *values, int value_amount); + UpdateStmt(Table *table, const char *attribute_name, const Value *values, FilterStmt *filter_stmt); -public: - static RC create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt); + StmtType type() const override { return StmtType::UPDATE; } + + Table *table() const { return table_; } + const char *attribute_name() const { return attribute_name_; } + const Value *values() const { return values_; } + FilterStmt *filter_stmt() const { return filter_stmt_; } + int value_amount() const { return value_amount_; } public: - Table *table() const { return table_; } - Value *values() const { return values_; } - int value_amount() const { return value_amount_; } + static RC create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt); private: - Table *table_ = nullptr; - Value *values_ = nullptr; - int value_amount_ = 0; + Table *table_ = nullptr; + const char *attribute_name_ = nullptr; + const Value *values_ = nullptr; + FilterStmt *filter_stmt_ = nullptr; + int value_amount_ = 0; }; diff --git a/src/observer/storage/record/record.h b/src/observer/storage/record/record.h index 6749804d..cba41d51 100644 --- a/src/observer/storage/record/record.h +++ b/src/observer/storage/record/record.h @@ -25,6 +25,8 @@ See the Mulan PSL v2 for more details. */ #include "storage/field/field_meta.h" #include "storage/index/index_meta.h" +#include + class Field; /** @@ -175,6 +177,7 @@ class Record this->data_ = data; this->len_ = len; } + void set_data_owner(char *data, int len) { ASSERT(len != 0, "the len of data should not be 0"); @@ -211,18 +214,27 @@ class Record return RC::SUCCESS; } - RC set_field(int field_offset, int field_len, char *data) + RC set_field(int field_offset, int field_len, const Value *&value) { - if (!owner_) { - LOG_ERROR("cannot set field when record does not own the memory"); - return RC::INTERNAL; - } + // 只警告不检查试试看 + // if (!owner_) { + // LOG_WARN("cannot set field when record does not own the memory"); + // return RC::INTERNAL; + // } if (field_offset + field_len > len_) { LOG_ERROR("invalid offset or length. offset=%d, length=%d, total length=%d", field_offset, field_len, len_); return RC::INVALID_ARGUMENT; } - - memcpy(data_ + field_offset, data, field_len); + // 实际数据长度 + auto len = std::min(field_len, value->length()); + // 如果是字符串类型,长度可变,要根据实际长度拷贝数据 + memcpy(data_ + field_offset, value->data(), len); + // 因为列数据是连续的,如果中间某些列加了'\0',会导致后面列没数据 + // 需要判断更新的字符串是否小于上限,只有小于才需要加'\0',而大于应该抛出异常 + // 除了字符串类型其他都是定长的 + if (len < field_len) { + data_[field_offset + len] = '\0'; + } return RC::SUCCESS; } diff --git a/src/observer/storage/record/record_manager.cpp b/src/observer/storage/record/record_manager.cpp index 00f403d9..c6128ef9 100644 --- a/src/observer/storage/record/record_manager.cpp +++ b/src/observer/storage/record/record_manager.cpp @@ -352,7 +352,7 @@ RC RowRecordPageHandler::delete_record(const RID *rid) RC RowRecordPageHandler::update_record(const RID &rid, const char *data) { - ASSERT(rw_mode_ != ReadWriteMode::READ_ONLY, "cannot delete record from page while the page is readonly"); + ASSERT(rw_mode_ != ReadWriteMode::READ_ONLY, "cannot update record from page while the page is readonly"); if (rid.slot_num >= page_header_->record_capacity) { LOG_ERROR("Invalid slot_num %d, exceed page's record capacity, frame=%s, page_header=%s", @@ -648,6 +648,31 @@ RC RecordFileHandler::delete_record(const RID *rid) return rc; } +RC RecordFileHandler::update_record(const char *data, const RID *rid) +{ + RC rc = RC::SUCCESS; + + unique_ptr record_page_handler(RecordPageHandler::create(storage_format_)); + + rc = record_page_handler->init(*disk_buffer_pool_, *log_handler_, rid->page_num, ReadWriteMode::READ_WRITE); + if (OB_FAIL(rc)) { + LOG_ERROR("Failed to init record page handler.page number=%d. rc=%s", rid->page_num, strrc(rc)); + return rc; + } + + rc = record_page_handler->update_record(*rid, data); + // 📢 这里注意要清理掉资源,否则会与insert_record中的加锁顺序冲突而可能出现死锁 + // delete record的加锁逻辑是拿到页面锁,删除指定记录,然后加上和释放record manager锁 + // insert record是加上 record manager锁,然后拿到指定页面锁再释放record manager锁 + record_page_handler->cleanup(); + if (OB_SUCC(rc)) { + // 因为这里已经释放了页面锁,并发时,其它线程可能又把该页面填满了,那就不应该再放入 free_pages_ + // 中。但是这里可以不关心,因为在查找空闲页面时,会自动过滤掉已经满的页面 + LOG_TRACE("update record on rid{%d,%d} success", rid->page_num, rid->slot_num); + } + return rc; +} + RC RecordFileHandler::get_record(const RID &rid, Record &record) { unique_ptr page_handler(RecordPageHandler::create(storage_format_)); diff --git a/src/observer/storage/record/record_manager.h b/src/observer/storage/record/record_manager.h index 810ec586..baf4fe5f 100644 --- a/src/observer/storage/record/record_manager.h +++ b/src/observer/storage/record/record_manager.h @@ -357,7 +357,7 @@ class PaxRecordPageHandler : public RecordPageHandler class RecordFileHandler { public: - RecordFileHandler(StorageFormat storage_format) : storage_format_(storage_format){}; + RecordFileHandler(StorageFormat storage_format) : storage_format_(storage_format) {}; ~RecordFileHandler(); /** @@ -388,6 +388,14 @@ class RecordFileHandler */ RC insert_record(const char *data, int record_size, RID *rid); + /** + * @brief 从指定文件中更新指定槽位的记录 + * + * @param data 记录内容 + * @param rid 待更新记录的标识符 + */ + RC update_record(const char *data, const RID *rid); + /** * @brief 数据库恢复时,在指定文件指定位置插入数据 * diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 250f783f..c05d281d 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -511,6 +511,33 @@ RC Table::delete_record(const Record &record) return rc; } +RC Table::update_record(const Record &old_record, const Record &new_record) +{ + RC rc = RC::SUCCESS; + // 维护索引,先删除后插入 + for (Index *index : indexes_) { + rc = index->delete_entry(old_record.data(), &old_record.rid()); + ASSERT(RC::SUCCESS == rc, + "failed to delete entry from index. table name=%s, index name=%s, rid=%s, rc=%s", + name(), index->index_meta().name(), old_record.rid().to_string().c_str(), strrc(rc)); + } + + // 尝试插入 + rc = insert_entry_of_indexes(new_record.data(), new_record.rid()); + // 出现重复键 + if (rc != RC::SUCCESS) { + // 因为有些索引还没有插入,删除失败不应该报错 + rc = delete_entry_of_indexes(new_record.data(), new_record.rid(), false); + ASSERT(RC::SUCCESS == rc, + "failed to rollback index data when insert index entries failed. table name=%s, rc=%s", + name(), strrc(rc)); + } + + // 最后更新记录 + rc = record_handler_->update_record(new_record.data(), &new_record.rid()); + return rc; +} + RC Table::insert_entry_of_indexes(const char *record, const RID &rid) { RC rc = RC::SUCCESS; diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index e56024f7..2ff716dd 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -83,6 +83,7 @@ class Table RC insert_record(Record &record); RC delete_record(const Record &record); RC delete_record(const RID &rid); + RC update_record(const Record &old_record, const Record &new_record); RC get_record(const RID &rid, Record &record); RC recover_insert_record(Record &record); diff --git a/src/observer/storage/trx/mvcc_trx.cpp b/src/observer/storage/trx/mvcc_trx.cpp index eefaef43..e74c6085 100644 --- a/src/observer/storage/trx/mvcc_trx.cpp +++ b/src/observer/storage/trx/mvcc_trx.cpp @@ -186,6 +186,11 @@ RC MvccTrx::delete_record(Table *table, Record &record) return RC::SUCCESS; } +RC MvccTrx::update_record(Table *table, Record &old_record, Record &new_record) +{ + return RC::SUCCESS; +} + RC MvccTrx::visit_record(Table *table, Record &record, ReadWriteMode mode) { Field begin_field; diff --git a/src/observer/storage/trx/mvcc_trx.h b/src/observer/storage/trx/mvcc_trx.h index 4a16ba0a..2d9ac190 100644 --- a/src/observer/storage/trx/mvcc_trx.h +++ b/src/observer/storage/trx/mvcc_trx.h @@ -78,6 +78,7 @@ class MvccTrx : public Trx RC insert_record(Table *table, Record &record) override; RC delete_record(Table *table, Record &record) override; + RC update_record(Table *table, Record &old_record, Record& new_record) override; /** * @brief 当访问到某条数据时,使用此函数来判断是否可见,或者是否有访问冲突 diff --git a/src/observer/storage/trx/trx.cpp b/src/observer/storage/trx/trx.cpp index 14ecfa78..2c35eff5 100644 --- a/src/observer/storage/trx/trx.cpp +++ b/src/observer/storage/trx/trx.cpp @@ -42,6 +42,6 @@ TrxKit *TrxKit::create(const char *name) delete trx_kit; trx_kit = nullptr; } - + return trx_kit; } diff --git a/src/observer/storage/trx/trx.h b/src/observer/storage/trx/trx.h index 5ff9af01..a1ad65da 100644 --- a/src/observer/storage/trx/trx.h +++ b/src/observer/storage/trx/trx.h @@ -143,9 +143,10 @@ class Trx Trx() = default; virtual ~Trx() = default; - virtual RC insert_record(Table *table, Record &record) = 0; - virtual RC delete_record(Table *table, Record &record) = 0; - virtual RC visit_record(Table *table, Record &record, ReadWriteMode mode) = 0; + virtual RC insert_record(Table *table, Record &record) = 0; + virtual RC delete_record(Table *table, Record &record) = 0; + virtual RC update_record(Table *table, Record &old_record, Record &new_record) = 0; + virtual RC visit_record(Table *table, Record &record, ReadWriteMode mode) = 0; virtual RC start_if_need() = 0; virtual RC commit() = 0; diff --git a/src/observer/storage/trx/vacuous_trx.cpp b/src/observer/storage/trx/vacuous_trx.cpp index 1b67a46a..95c1df18 100644 --- a/src/observer/storage/trx/vacuous_trx.cpp +++ b/src/observer/storage/trx/vacuous_trx.cpp @@ -36,6 +36,11 @@ RC VacuousTrx::insert_record(Table *table, Record &record) { return table->inser RC VacuousTrx::delete_record(Table *table, Record &record) { return table->delete_record(record); } +RC VacuousTrx::update_record(Table *table, Record &old_record, Record &new_record) +{ + return table->update_record(old_record, new_record); +} + RC VacuousTrx::visit_record(Table *table, Record &record, ReadWriteMode) { return RC::SUCCESS; } RC VacuousTrx::start_if_need() { return RC::SUCCESS; } diff --git a/src/observer/storage/trx/vacuous_trx.h b/src/observer/storage/trx/vacuous_trx.h index f558c19c..593ce866 100644 --- a/src/observer/storage/trx/vacuous_trx.h +++ b/src/observer/storage/trx/vacuous_trx.h @@ -46,6 +46,7 @@ class VacuousTrx : public Trx RC insert_record(Table *table, Record &record) override; RC delete_record(Table *table, Record &record) override; + RC update_record(Table *table, Record &old_record, Record &new_record) override; RC visit_record(Table *table, Record &record, ReadWriteMode mode) override; RC start_if_need() override; RC commit() override; @@ -63,4 +64,4 @@ class VacuousTrxLogReplayer : public LogReplayer virtual ~VacuousTrxLogReplayer() = default; RC replay(const LogEntry &) override { return RC::SUCCESS; } -}; \ No newline at end of file +}; From 90b27400d9ce3c6e51fab3c8bf454d44ecf8ea66 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 25 Sep 2024 23:37:20 +0800 Subject: [PATCH 004/308] =?UTF-8?q?=E5=AE=8C=E6=88=90not=20null,=20nullabl?= =?UTF-8?q?e=E7=9A=84=E8=AF=8D=E6=B3=95=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/3rd/googletest | 2 +- sql/test_null.sql | 1 + src/observer/sql/parser/lex_sql.cpp | 983 ++++++++++++++------------- src/observer/sql/parser/lex_sql.h | 310 +++++++-- src/observer/sql/parser/lex_sql.l | 3 + src/observer/sql/parser/parse_defs.h | 7 +- src/observer/sql/parser/yacc_sql.cpp | 834 ++++++++++++----------- src/observer/sql/parser/yacc_sql.hpp | 62 +- src/observer/sql/parser/yacc_sql.y | 27 +- 9 files changed, 1267 insertions(+), 962 deletions(-) create mode 100644 sql/test_null.sql diff --git a/deps/3rd/googletest b/deps/3rd/googletest index 974e18ee..6dae7eb4 160000 --- a/deps/3rd/googletest +++ b/deps/3rd/googletest @@ -1 +1 @@ -Subproject commit 974e18ee6f146a2418f9cea83170c640e7d622d6 +Subproject commit 6dae7eb4a5c3a169f3e298392bff4680224aa94a diff --git a/sql/test_null.sql b/sql/test_null.sql new file mode 100644 index 00000000..bd19bdc0 --- /dev/null +++ b/sql/test_null.sql @@ -0,0 +1 @@ +create table t1(a int not null, b char(4) nullable, c float); \ No newline at end of file diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 14ce1bc3..480e2d61 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,5 +1,4 @@ -#line 2 "lex_sql.cpp" -#line 2 "lex_sql.l" +#line 1 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -23,10 +22,7 @@ do { \ } \ while (0); - - - -#line 30 "lex_sql.cpp" +#line 25 "lex_sql.cpp" #define YY_INT_ALIGNED short int @@ -34,12 +30,36 @@ while (0); #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif +#ifdef yyget_lval +#define yyget_lval_ALREADY_DEFINED +#else +#define yyget_lval yyget_lval +#endif + +#ifdef yyset_lval +#define yyset_lval_ALREADY_DEFINED +#else +#define yyset_lval yyset_lval +#endif + +#ifdef yyget_lloc +#define yyget_lloc_ALREADY_DEFINED +#else +#define yyget_lloc yyget_lloc +#endif + +#ifdef yyset_lloc +#define yyset_lloc_ALREADY_DEFINED +#else +#define yyset_lloc yyset_lloc +#endif + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -73,6 +93,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -80,7 +101,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -111,38 +131,32 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) +#endif /* ! C99 */ -#define YY_USE_CONST +#endif /* ! FLEXINT_H */ -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ +/* begin standard C++ headers. */ -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T @@ -166,25 +180,29 @@ typedef void* yyscan_t; * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * - /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START - /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ,yyscanner ) - +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -196,11 +214,17 @@ typedef void* yyscan_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -215,14 +239,8 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) - #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -235,12 +253,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -263,7 +281,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -297,86 +315,79 @@ struct yy_buffer_state #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) - /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void yypop_buffer_state (yyscan_t yyscanner ); - -static void yyensure_buffer_stack (yyscan_t yyscanner ); -static void yy_load_buffer_state (yyscan_t yyscanner ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void yyfree (void * ,yyscan_t yyscanner ); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer - #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } - #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } - #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(n) 1 +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; +typedef flex_uint8_t YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 61 -#define YY_END_OF_BUFFER 62 +#define YY_NUM_RULES 64 +#define YY_END_OF_BUFFER 65 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -384,31 +395,33 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[183] = +static const flex_int16_t yy_accept[193] = { 0, - 0, 0, 0, 0, 62, 60, 1, 2, 60, 60, - 60, 44, 45, 56, 54, 46, 55, 6, 57, 3, - 5, 51, 47, 53, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 61, 50, 0, 58, 0, 59, 3, 0, - 48, 49, 52, 43, 43, 43, 43, 40, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 15, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 4, 22, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - - 43, 43, 43, 43, 32, 43, 43, 43, 28, 43, - 43, 43, 43, 43, 43, 43, 43, 19, 33, 43, - 43, 36, 43, 9, 11, 7, 43, 43, 43, 20, - 43, 8, 43, 43, 43, 24, 35, 43, 43, 16, - 43, 17, 43, 43, 43, 43, 29, 43, 43, 43, - 43, 34, 43, 39, 14, 43, 43, 43, 43, 43, - 12, 43, 43, 21, 30, 10, 26, 43, 42, 37, - 23, 43, 18, 43, 13, 27, 25, 38, 43, 41, + 0, 0, 0, 0, 65, 63, 1, 2, 63, 63, + 63, 47, 48, 59, 57, 49, 58, 6, 60, 3, + 5, 54, 50, 56, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 64, 53, 0, 61, 0, 62, 3, + 0, 51, 52, 55, 46, 46, 46, 46, 43, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 15, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 4, 22, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + + 46, 46, 46, 46, 46, 46, 46, 32, 46, 35, + 46, 46, 46, 28, 46, 46, 46, 46, 46, 46, + 46, 46, 19, 33, 46, 46, 39, 46, 9, 11, + 7, 46, 46, 46, 20, 46, 8, 46, 46, 46, + 24, 38, 36, 46, 46, 16, 46, 17, 46, 46, + 46, 46, 29, 46, 46, 46, 46, 34, 46, 42, + 14, 46, 46, 46, 46, 46, 46, 12, 46, 46, + 21, 30, 10, 26, 46, 45, 40, 23, 46, 46, + 18, 46, 13, 27, 25, 41, 46, 46, 44, 37, 31, 0 + } ; -static yyconst flex_int32_t yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, @@ -440,7 +453,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[67] = +static const YY_CHAR yy_meta[67] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, @@ -451,120 +464,126 @@ static yyconst flex_int32_t yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static yyconst flex_int16_t yy_base[188] = +static const flex_int16_t yy_base[198] = { 0, - 0, 0, 0, 0, 484, 485, 485, 485, 465, 477, - 475, 485, 485, 485, 485, 485, 465, 485, 485, 54, - 485, 52, 485, 454, 53, 57, 60, 59, 70, 91, - 61, 67, 75, 456, 87, 77, 98, 113, 109, 58, - 119, 111, 485, 485, 465, 485, 463, 485, 86, 453, - 485, 485, 485, 0, 451, 126, 121, 450, 115, 137, - 127, 143, 128, 139, 150, 157, 153, 160, 163, 168, - 173, 175, 186, 448, 180, 190, 199, 203, 193, 202, - 216, 201, 214, 447, 446, 225, 226, 228, 227, 230, - 237, 243, 239, 145, 231, 253, 250, 251, 256, 258, - - 260, 265, 271, 278, 264, 281, 285, 286, 445, 288, - 294, 290, 293, 299, 302, 310, 300, 444, 443, 307, - 312, 441, 316, 439, 438, 437, 317, 325, 340, 436, - 323, 433, 329, 334, 330, 432, 424, 327, 352, 423, - 355, 422, 361, 342, 363, 367, 419, 364, 368, 380, - 378, 412, 375, 404, 386, 381, 382, 397, 385, 392, - 395, 409, 407, 353, 347, 336, 275, 393, 263, 261, - 179, 399, 171, 416, 162, 99, 83, 74, 420, 73, - 69, 485, 473, 475, 477, 76, 75 + 0, 0, 0, 0, 512, 513, 513, 513, 493, 505, + 503, 513, 513, 513, 513, 513, 493, 513, 513, 54, + 513, 52, 513, 489, 53, 57, 60, 59, 70, 91, + 61, 67, 75, 484, 87, 95, 83, 98, 113, 118, + 111, 121, 115, 513, 513, 492, 513, 490, 513, 86, + 480, 513, 513, 513, 0, 479, 144, 128, 478, 132, + 138, 145, 156, 134, 153, 155, 166, 158, 160, 168, + 172, 178, 205, 183, 161, 190, 477, 195, 202, 182, + 216, 208, 193, 222, 220, 231, 476, 475, 219, 238, + 221, 243, 247, 257, 244, 261, 246, 255, 263, 267, + + 270, 271, 273, 274, 275, 282, 281, 280, 298, 474, + 293, 300, 303, 472, 305, 304, 321, 307, 313, 291, + 324, 326, 469, 467, 327, 333, 466, 334, 465, 464, + 463, 353, 337, 361, 461, 329, 460, 335, 347, 350, + 457, 455, 369, 359, 370, 444, 373, 438, 375, 376, + 387, 388, 435, 381, 391, 403, 392, 395, 393, 355, + 351, 409, 407, 411, 414, 410, 415, 406, 425, 423, + 343, 341, 285, 233, 413, 196, 173, 170, 432, 452, + 109, 437, 99, 78, 77, 74, 440, 447, 73, 69, + 63, 513, 500, 502, 504, 75, 71 + } ; -static yyconst flex_int16_t yy_def[188] = +static const flex_int16_t yy_def[198] = { 0, - 182, 1, 183, 183, 182, 182, 182, 182, 182, 184, - 185, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 182, 182, 184, 182, 185, 182, 182, 182, - 182, 182, 182, 187, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 182, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 0, 182, 182, 182, 182, 182 + 192, 1, 193, 193, 192, 192, 192, 192, 192, 194, + 195, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 192, 192, 194, 192, 195, 192, 192, + 192, 192, 192, 192, 197, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 192, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 0, 192, 192, 192, 192, 192 + } ; -static yyconst flex_int16_t yy_nxt[552] = +static const flex_int16_t yy_nxt[580] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, - 35, 34, 34, 36, 34, 37, 38, 39, 40, 41, - 42, 34, 34, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 34, 34, 36, 34, 37, 38, - 39, 40, 41, 42, 34, 34, 50, 54, 49, 51, - 52, 54, 54, 54, 54, 54, 54, 55, 63, 59, - 57, 54, 64, 54, 54, 56, 60, 54, 54, 54, - 71, 54, 81, 61, 65, 62, 70, 54, 50, 58, - - 49, 54, 63, 59, 57, 54, 64, 72, 56, 74, - 60, 66, 54, 54, 71, 81, 61, 65, 62, 70, - 73, 67, 58, 54, 68, 54, 69, 54, 80, 54, - 72, 75, 74, 54, 66, 54, 76, 83, 82, 77, - 54, 54, 54, 73, 67, 87, 86, 68, 85, 69, - 78, 54, 80, 54, 75, 79, 88, 54, 89, 54, - 76, 83, 82, 77, 54, 91, 90, 54, 87, 92, - 86, 54, 85, 78, 54, 93, 54, 54, 79, 125, - 88, 89, 54, 94, 95, 54, 97, 54, 91, 54, - 90, 96, 92, 54, 54, 98, 99, 102, 93, 103, - - 54, 100, 125, 101, 54, 106, 94, 54, 95, 97, - 107, 104, 105, 54, 96, 54, 54, 54, 98, 99, - 108, 102, 113, 103, 100, 112, 101, 109, 54, 106, - 54, 115, 110, 107, 104, 105, 111, 116, 114, 54, - 54, 54, 54, 108, 54, 54, 113, 118, 112, 121, - 109, 54, 117, 54, 115, 110, 122, 54, 120, 111, - 124, 116, 114, 119, 54, 54, 123, 54, 126, 128, - 54, 118, 54, 121, 54, 54, 117, 54, 54, 54, - 122, 120, 129, 127, 124, 54, 119, 130, 133, 54, - 123, 126, 54, 128, 132, 54, 131, 136, 134, 54, - - 54, 135, 54, 137, 54, 129, 127, 54, 54, 139, - 130, 142, 133, 54, 54, 138, 54, 132, 144, 131, - 136, 54, 134, 143, 54, 135, 54, 137, 140, 141, - 54, 54, 147, 139, 148, 142, 151, 54, 138, 54, - 145, 54, 144, 54, 54, 146, 143, 158, 54, 149, - 54, 140, 141, 150, 54, 147, 54, 154, 148, 153, - 151, 54, 152, 145, 156, 157, 54, 54, 146, 54, - 155, 158, 149, 159, 160, 54, 150, 54, 54, 162, - 154, 54, 54, 153, 161, 152, 163, 156, 157, 54, - 164, 166, 54, 155, 54, 54, 54, 159, 160, 54, - - 54, 165, 162, 167, 170, 168, 54, 54, 161, 54, - 163, 54, 169, 54, 164, 166, 172, 174, 54, 171, - 179, 54, 173, 54, 165, 178, 54, 167, 170, 168, - 54, 175, 176, 54, 54, 169, 54, 54, 54, 180, - 172, 174, 171, 177, 179, 173, 54, 54, 178, 181, - 54, 54, 54, 54, 175, 54, 176, 54, 54, 54, - 54, 84, 54, 180, 54, 54, 177, 84, 48, 46, - 54, 53, 181, 43, 43, 45, 45, 47, 47, 49, - 48, 46, 44, 182, 5, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182 + 35, 34, 36, 37, 34, 38, 39, 40, 41, 42, + 43, 34, 34, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 34, 36, 37, 34, 38, 39, + 40, 41, 42, 43, 34, 34, 51, 55, 50, 52, + 53, 55, 55, 55, 55, 55, 56, 55, 64, 60, + 58, 55, 65, 55, 55, 57, 61, 55, 55, 55, + 72, 55, 55, 62, 66, 63, 71, 55, 51, 59, + + 50, 55, 64, 60, 58, 55, 65, 73, 57, 55, + 61, 67, 55, 55, 72, 77, 62, 66, 63, 71, + 74, 68, 59, 55, 69, 55, 70, 55, 75, 55, + 73, 78, 55, 76, 67, 55, 79, 83, 77, 80, + 85, 86, 55, 74, 68, 84, 55, 69, 55, 70, + 81, 75, 55, 89, 78, 82, 76, 91, 55, 55, + 79, 83, 90, 80, 85, 86, 88, 55, 84, 55, + 55, 94, 55, 81, 55, 55, 92, 89, 82, 93, + 55, 91, 55, 95, 55, 90, 55, 55, 97, 96, + 88, 100, 55, 98, 94, 101, 55, 55, 110, 92, + + 99, 102, 109, 93, 55, 103, 95, 55, 104, 55, + 55, 97, 96, 118, 100, 115, 55, 98, 101, 55, + 111, 110, 55, 99, 102, 112, 109, 105, 103, 106, + 55, 104, 113, 55, 55, 55, 55, 118, 115, 114, + 117, 107, 108, 111, 119, 55, 122, 55, 112, 116, + 120, 105, 55, 106, 121, 113, 124, 55, 55, 123, + 55, 55, 114, 117, 107, 108, 126, 128, 119, 55, + 122, 55, 116, 120, 125, 55, 127, 55, 121, 124, + 130, 55, 129, 123, 55, 55, 133, 55, 55, 55, + 126, 128, 131, 132, 55, 55, 55, 125, 138, 55, + + 127, 134, 135, 130, 140, 55, 129, 55, 137, 139, + 133, 136, 55, 141, 55, 131, 132, 55, 55, 55, + 142, 55, 138, 143, 134, 135, 145, 55, 140, 151, + 144, 137, 150, 139, 136, 55, 141, 149, 55, 147, + 55, 55, 148, 55, 142, 146, 143, 55, 55, 55, + 145, 55, 151, 144, 154, 55, 150, 55, 153, 152, + 149, 55, 147, 160, 55, 55, 148, 55, 146, 55, + 155, 156, 157, 55, 158, 55, 161, 162, 154, 165, + 159, 153, 152, 55, 55, 163, 160, 55, 164, 55, + 55, 166, 167, 155, 156, 55, 157, 158, 168, 161, + + 162, 55, 55, 165, 159, 55, 55, 55, 163, 55, + 170, 171, 164, 169, 173, 166, 167, 55, 172, 175, + 55, 55, 168, 55, 55, 55, 174, 55, 55, 55, + 176, 179, 177, 180, 170, 171, 169, 55, 173, 55, + 182, 172, 183, 175, 178, 186, 55, 181, 184, 55, + 174, 55, 55, 176, 55, 179, 177, 180, 55, 185, + 189, 55, 187, 190, 182, 183, 55, 178, 186, 55, + 181, 55, 184, 188, 55, 55, 191, 55, 55, 55, + 55, 55, 185, 55, 189, 187, 55, 190, 55, 55, + 87, 55, 55, 55, 87, 49, 47, 188, 55, 191, + + 44, 44, 46, 46, 48, 48, 54, 50, 49, 47, + 45, 192, 5, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192 } ; -static yyconst flex_int16_t yy_chk[552] = +static const flex_int16_t yy_chk[580] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -573,60 +592,62 @@ static yyconst flex_int16_t yy_chk[552] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 40, 28, 27, 31, 187, 186, 28, 27, - 26, 32, 28, 181, 29, 25, 27, 180, 178, 33, - 32, 36, 40, 27, 28, 27, 31, 177, 49, 26, - - 49, 35, 28, 27, 26, 30, 28, 33, 25, 36, - 27, 29, 37, 176, 32, 40, 27, 28, 27, 31, - 35, 30, 26, 39, 30, 42, 30, 38, 39, 59, - 33, 37, 36, 41, 29, 57, 38, 42, 41, 38, - 56, 61, 63, 35, 30, 59, 57, 30, 56, 30, - 38, 60, 39, 64, 37, 38, 60, 62, 61, 94, - 38, 42, 41, 38, 65, 63, 62, 67, 59, 64, - 57, 66, 56, 38, 68, 64, 175, 69, 38, 94, - 60, 61, 70, 65, 66, 173, 67, 71, 63, 72, - 62, 66, 64, 171, 75, 68, 69, 72, 64, 72, - - 73, 70, 94, 71, 76, 73, 65, 79, 66, 67, - 75, 72, 72, 77, 66, 82, 80, 78, 68, 69, - 76, 72, 80, 72, 70, 79, 71, 76, 83, 73, - 81, 82, 77, 75, 72, 72, 78, 83, 81, 86, - 87, 89, 88, 76, 90, 95, 80, 87, 79, 90, - 76, 91, 86, 93, 82, 77, 91, 92, 89, 78, - 93, 83, 81, 88, 97, 98, 92, 96, 95, 97, - 99, 87, 100, 90, 101, 170, 86, 169, 105, 102, - 91, 89, 98, 96, 93, 103, 88, 99, 102, 167, - 92, 95, 104, 97, 101, 106, 100, 105, 103, 107, - - 108, 104, 110, 106, 112, 98, 96, 113, 111, 108, - 99, 112, 102, 114, 117, 107, 115, 101, 114, 100, - 105, 120, 103, 113, 116, 104, 121, 106, 110, 111, - 123, 127, 117, 108, 120, 112, 127, 131, 107, 128, - 115, 138, 114, 133, 135, 116, 113, 138, 134, 121, - 166, 110, 111, 123, 129, 117, 144, 131, 120, 129, - 127, 165, 128, 115, 134, 135, 139, 164, 116, 141, - 133, 138, 121, 139, 141, 143, 123, 145, 148, 144, - 131, 146, 149, 129, 143, 128, 145, 134, 135, 153, - 146, 149, 151, 133, 150, 156, 157, 139, 141, 159, - - 155, 148, 144, 150, 156, 151, 160, 168, 143, 161, - 145, 158, 153, 172, 146, 149, 158, 160, 154, 157, - 172, 163, 159, 162, 148, 168, 152, 150, 156, 151, - 174, 161, 162, 147, 179, 153, 142, 140, 137, 174, - 158, 160, 157, 163, 172, 159, 136, 132, 168, 179, - 130, 126, 125, 124, 161, 122, 162, 119, 118, 109, - 85, 84, 74, 174, 58, 55, 163, 50, 47, 45, - 34, 24, 179, 183, 183, 184, 184, 185, 185, 17, - 11, 10, 9, 5, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182 + 22, 26, 197, 28, 27, 31, 196, 191, 28, 27, + 26, 32, 28, 190, 29, 25, 27, 189, 186, 33, + 32, 185, 184, 27, 28, 27, 31, 37, 50, 26, + + 50, 35, 28, 27, 26, 30, 28, 33, 25, 36, + 27, 29, 38, 183, 32, 37, 27, 28, 27, 31, + 35, 30, 26, 181, 30, 41, 30, 39, 36, 43, + 33, 38, 40, 36, 29, 42, 39, 40, 37, 39, + 42, 43, 58, 35, 30, 41, 60, 30, 64, 30, + 39, 36, 61, 58, 38, 39, 36, 61, 57, 62, + 39, 40, 60, 39, 42, 43, 57, 65, 41, 66, + 63, 64, 68, 39, 69, 75, 62, 58, 39, 63, + 67, 61, 70, 65, 178, 60, 71, 177, 66, 65, + 57, 68, 72, 67, 64, 69, 80, 74, 75, 62, + + 67, 70, 74, 63, 76, 71, 65, 83, 72, 78, + 176, 66, 65, 83, 68, 80, 79, 67, 69, 73, + 76, 75, 82, 67, 70, 78, 74, 73, 71, 73, + 81, 72, 79, 89, 85, 91, 84, 83, 80, 79, + 82, 73, 73, 76, 84, 86, 89, 174, 78, 81, + 85, 73, 90, 73, 86, 79, 91, 92, 95, 90, + 97, 93, 79, 82, 73, 73, 93, 95, 84, 98, + 89, 94, 81, 85, 92, 96, 94, 99, 86, 91, + 97, 100, 96, 90, 101, 102, 100, 103, 104, 105, + 93, 95, 98, 99, 108, 107, 106, 92, 105, 173, + + 94, 101, 102, 97, 107, 120, 96, 111, 104, 106, + 100, 103, 109, 108, 112, 98, 99, 113, 116, 115, + 109, 118, 105, 111, 101, 102, 113, 119, 107, 120, + 112, 104, 119, 106, 103, 117, 108, 118, 121, 116, + 122, 125, 117, 136, 109, 115, 111, 126, 128, 138, + 113, 133, 120, 112, 125, 172, 119, 171, 122, 121, + 118, 139, 116, 136, 140, 161, 117, 132, 115, 160, + 126, 128, 132, 144, 133, 134, 138, 139, 125, 144, + 134, 122, 121, 143, 145, 140, 136, 147, 143, 149, + 150, 145, 147, 126, 128, 154, 132, 133, 149, 138, + + 139, 151, 152, 144, 134, 155, 157, 159, 140, 158, + 151, 152, 143, 150, 155, 145, 147, 156, 154, 157, + 168, 163, 149, 162, 166, 164, 156, 175, 165, 167, + 159, 164, 162, 165, 151, 152, 150, 170, 155, 169, + 167, 154, 168, 157, 163, 175, 179, 166, 169, 153, + 156, 182, 148, 159, 187, 164, 162, 165, 146, 170, + 182, 188, 179, 187, 167, 168, 180, 163, 175, 142, + 166, 141, 169, 180, 137, 135, 188, 131, 130, 129, + 127, 124, 170, 123, 182, 179, 114, 187, 110, 88, + 87, 77, 59, 56, 51, 48, 46, 180, 34, 188, + + 193, 193, 194, 194, 195, 195, 24, 17, 11, 10, + 9, 5, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192 } ; /* The intent behind this definition is that it'll catch @@ -661,6 +682,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#line 685 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -669,7 +691,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 673 "lex_sql.cpp" +#line 694 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -699,8 +721,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -724,7 +746,7 @@ struct yyguts_t }; /* end struct yyguts_t */ -static int yy_init_globals (yyscan_t yyscanner ); +static int yy_init_globals ( yyscan_t yyscanner ); /* This must go here because YYSTYPE and YYLTYPE are included * from bison output in section 1.*/ @@ -734,44 +756,48 @@ static int yy_init_globals (yyscan_t yyscanner ); int yylex_init (yyscan_t* scanner); -int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy (yyscan_t yyscanner ); +int yylex_destroy ( yyscan_t yyscanner ); + +int yyget_debug ( yyscan_t yyscanner ); + +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -int yyget_debug (yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_debug (int debug_flag ,yyscan_t yyscanner ); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner ); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_in (yyscan_t yyscanner ); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_in (FILE * in_str ,yyscan_t yyscanner ); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -FILE *yyget_out (yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -void yyset_out (FILE * out_str ,yyscan_t yyscanner ); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_leng (yyscan_t yyscanner ); +int yyget_lineno ( yyscan_t yyscanner ); -char *yyget_text (yyscan_t yyscanner ); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_lineno (yyscan_t yyscanner ); +int yyget_column ( yyscan_t yyscanner ); -void yyset_lineno (int line_number ,yyscan_t yyscanner ); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE * yyget_lval (yyscan_t yyscanner ); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); - YYLTYPE *yyget_lloc (yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -779,33 +805,41 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (yyscan_t yyscanner ); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap (yyscan_t yyscanner ); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif +#ifndef YY_NO_UNPUT + +#endif + #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT - #ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); +static int yyinput ( yyscan_t yyscanner ); #else -static int input (yyscan_t yyscanner ); +static int input ( yyscan_t yyscanner ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -813,7 +847,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -824,7 +858,7 @@ static int input (yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -837,7 +871,7 @@ static int input (yyscan_t yyscanner ); else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -879,7 +913,7 @@ static int input (yyscan_t yyscanner ); #define YY_DECL_IS_OURS 1 extern int yylex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); #define YY_DECL int yylex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) @@ -894,7 +928,7 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -904,16 +938,11 @@ extern int yylex \ */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 75 "lex_sql.l" - - -#line 916 "lex_sql.cpp" - yylval = yylval_param; yylloc = yylloc_param; @@ -938,13 +967,19 @@ YY_DECL if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); } - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 75 "lex_sql.l" + + +#line 980 "lex_sql.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; @@ -960,7 +995,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -969,13 +1004,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) - yy_c = yy_meta[(unsigned int) yy_c]; + if ( yy_current_state >= 193 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 485 ); + while ( yy_base[yy_current_state] != 513 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1173,132 +1208,147 @@ RETURN_TOKEN(FLOAT_T); case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(LOAD); +RETURN_TOKEN(NOT); YY_BREAK case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATA); +RETURN_TOKEN(NULL_T); YY_BREAK case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(INFILE); +RETURN_TOKEN(NULLABLE); YY_BREAK case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); +RETURN_TOKEN(LOAD); YY_BREAK case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(GROUP); +RETURN_TOKEN(DATA); YY_BREAK case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(BY); +RETURN_TOKEN(INFILE); YY_BREAK case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(STORAGE); +RETURN_TOKEN(EXPLAIN); YY_BREAK case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(FORMAT); +RETURN_TOKEN(GROUP); YY_BREAK case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +RETURN_TOKEN(BY); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(LBRACE); +RETURN_TOKEN(STORAGE); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(RBRACE); +RETURN_TOKEN(FORMAT); YY_BREAK case 46: YY_RULE_SETUP -#line 125 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 124 "lex_sql.l" +yylval->string=strdup(yytext); RETURN_TOKEN(ID); YY_BREAK case 47: YY_RULE_SETUP -#line 126 "lex_sql.l" -RETURN_TOKEN(EQ); +#line 125 "lex_sql.l" +RETURN_TOKEN(LBRACE); YY_BREAK case 48: YY_RULE_SETUP -#line 127 "lex_sql.l" -RETURN_TOKEN(LE); +#line 126 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 49: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(COMMA); YY_BREAK case 50: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(EQ); YY_BREAK case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(LE); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(NE); YY_BREAK case 53: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(NE); YY_BREAK case 54: -#line 135 "lex_sql.l" +YY_RULE_SETUP +#line 133 "lex_sql.l" +RETURN_TOKEN(LT); + YY_BREAK case 55: -#line 136 "lex_sql.l" +YY_RULE_SETUP +#line 134 "lex_sql.l" +RETURN_TOKEN(GE); + YY_BREAK case 56: -#line 137 "lex_sql.l" +YY_RULE_SETUP +#line 135 "lex_sql.l" +RETURN_TOKEN(GT); + YY_BREAK case 57: +#line 138 "lex_sql.l" +case 58: +#line 139 "lex_sql.l" +case 59: +#line 140 "lex_sql.l" +case 60: YY_RULE_SETUP -#line 137 "lex_sql.l" +#line 140 "lex_sql.l" { return yytext[0]; } YY_BREAK -case 58: -/* rule 58 can match eol */ +case 61: +/* rule 61 can match eol */ YY_RULE_SETUP -#line 138 "lex_sql.l" +#line 141 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 59: -/* rule 59 can match eol */ +case 62: +/* rule 62 can match eol */ YY_RULE_SETUP -#line 139 "lex_sql.l" +#line 142 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 60: +case 63: YY_RULE_SETUP -#line 141 "lex_sql.l" +#line 144 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK -case 61: +case 64: YY_RULE_SETUP -#line 142 "lex_sql.l" +#line 145 "lex_sql.l" ECHO; YY_BREAK -#line 1302 "lex_sql.cpp" +#line 1351 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1377,7 +1427,7 @@ case YY_STATE_EOF(STR): { yyg->yy_did_buffer_switch_on_eof = 0; - if ( yywrap(yyscanner ) ) + if ( yywrap( yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -1430,6 +1480,7 @@ case YY_STATE_EOF(STR): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1442,9 +1493,9 @@ case YY_STATE_EOF(STR): static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) @@ -1473,7 +1524,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1486,21 +1537,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1509,11 +1560,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -1531,7 +1583,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); + yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -1541,7 +1593,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ,yyscanner); + yyrestart( yyin , yyscanner); } else @@ -1555,12 +1607,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } yyg->yy_n_chars += number_to_move; @@ -1576,15 +1631,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1593,10 +1648,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) - yy_c = yy_meta[(unsigned int) yy_c]; + if ( yy_current_state >= 193 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; @@ -1609,11 +1664,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - register int yy_is_jam; + int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; + char *yy_cp = yyg->yy_c_buf_p; - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1622,15 +1677,20 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) - yy_c = yy_meta[(unsigned int) yy_c]; + if ( yy_current_state >= 193 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 182); + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 192); + (void)yyg; return yy_is_jam ? 0 : yy_current_state; } +#ifndef YY_NO_UNPUT + +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) @@ -1656,7 +1716,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -1673,14 +1733,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ /* Reset buffer status. */ - yyrestart(yyin ,yyscanner); + yyrestart( yyin , yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap(yyscanner ) ) - return EOF; + if ( yywrap( yyscanner ) ) + return 0; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; @@ -1718,11 +1778,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); } - yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - yy_load_buffer_state(yyscanner ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. @@ -1751,7 +1811,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag @@ -1780,7 +1840,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1789,13 +1849,13 @@ static void yy_load_buffer_state (yyscan_t yyscanner) /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer(b,file ,yyscanner); + yy_init_buffer( b, file , yyscanner); return b; } @@ -1815,15 +1875,11 @@ static void yy_load_buffer_state (yyscan_t yyscanner) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ,yyscanner ); + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *) b ,yyscanner ); + yyfree( (void *) b , yyscanner ); } -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. @@ -1834,7 +1890,7 @@ extern int isatty (int ); int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flush_buffer(b ,yyscanner); + yy_flush_buffer( b , yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; @@ -1878,7 +1934,7 @@ extern int isatty (int ); b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -1910,7 +1966,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } @@ -1924,13 +1980,13 @@ void yypop_buffer_state (yyscan_t yyscanner) if (!YY_CURRENT_BUFFER) return; - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } @@ -1940,7 +1996,7 @@ void yypop_buffer_state (yyscan_t yyscanner) */ static void yyensure_buffer_stack (yyscan_t yyscanner) { - int num_to_alloc; + yy_size_t num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { @@ -1949,15 +2005,15 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1966,7 +2022,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc @@ -1986,7 +2042,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { @@ -1996,23 +2052,23 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return 0; + return NULL; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer(b ,yyscanner ); + yy_switch_to_buffer( b , yyscanner ); return b; } @@ -2025,29 +2081,29 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ,yyscanner ); + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -2056,7 +2112,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer(buf,n ,yyscanner); + b = yy_scan_buffer( buf, n , yyscanner); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -2072,9 +2128,11 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - (void) fprintf( stderr, "%s\n", msg ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2085,7 +2143,7 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ @@ -2112,7 +2170,7 @@ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) int yyget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -2125,7 +2183,7 @@ int yyget_lineno (yyscan_t yyscanner) int yyget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -2153,7 +2211,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; @@ -2180,51 +2238,51 @@ void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) } /** Set the current line number. - * @param line_number + * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int line_number , yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner); + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - yylineno = line_number; + yylineno = _line_number; } /** Set the current column. - * @param line_number + * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int column_no , yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "yyset_column called with no buffer" , yyscanner); + YY_FATAL_ERROR( "yyset_column called with no buffer" ); - yycolumn = column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * in_str , yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; + yyin = _in_str ; } -void yyset_out (FILE * out_str , yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; + yyout = _out_str ; } int yyget_debug (yyscan_t yyscanner) @@ -2233,10 +2291,10 @@ int yyget_debug (yyscan_t yyscanner) return yy_flex_debug; } -void yyset_debug (int bdebug , yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ @@ -2271,9 +2329,7 @@ void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ - int yylex_init(yyscan_t* ptr_yy_globals) - { if (ptr_yy_globals == NULL){ errno = EINVAL; @@ -2300,9 +2356,7 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ - -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; @@ -2312,20 +2366,20 @@ int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + yyset_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -2336,10 +2390,10 @@ static int yy_init_globals (yyscan_t yyscanner) * This function is called from yylex_destroy(), so don't allocate here. */ - yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack = NULL; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; + yyg->yy_c_buf_p = NULL; yyg->yy_init = 0; yyg->yy_start = 0; @@ -2352,8 +2406,8 @@ static int yy_init_globals (yyscan_t yyscanner) yyin = stdin; yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -2369,17 +2423,17 @@ int yylex_destroy (yyscan_t yyscanner) /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(yyscanner); } /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack ,yyscanner); + yyfree(yyg->yy_buffer_stack , yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack ,yyscanner ); + yyfree( yyg->yy_start_stack , yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time @@ -2397,18 +2451,21 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - register int i; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -2418,11 +2475,16 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - return (void *) malloc( size ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2430,21 +2492,22 @@ void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } void yyfree (void * ptr , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 142 "lex_sql.l" - +#line 145 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str,scanner),scanner); + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 2862800d..b4fd1232 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,8 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 6 "lex_sql.h" -#line 2 "lex_sql.l" +#line 5 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -27,10 +26,7 @@ do { \ } \ while (0); - - - -#line 34 "lex_sql.h" +#line 29 "lex_sql.h" #define YY_INT_ALIGNED short int @@ -38,12 +34,36 @@ while (0); #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif +#ifdef yyget_lval +#define yyget_lval_ALREADY_DEFINED +#else +#define yyget_lval yyget_lval +#endif + +#ifdef yyset_lval +#define yyset_lval_ALREADY_DEFINED +#else +#define yyset_lval yyset_lval +#endif + +#ifdef yyget_lloc +#define yyget_lloc_ALREADY_DEFINED +#else +#define yyget_lloc yyget_lloc +#endif + +#ifdef yyset_lloc +#define yyset_lloc_ALREADY_DEFINED +#else +#define yyset_lloc yyset_lloc +#endif + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -77,6 +97,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -84,7 +105,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -115,27 +135,23 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) +#endif /* ! C99 */ -#define YY_USE_CONST +#endif /* ! FLEXINT_H */ -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ +/* begin standard C++ headers. */ -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* An opaque pointer. */ @@ -157,7 +173,15 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE @@ -182,12 +206,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -210,7 +234,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -221,25 +245,25 @@ struct yy_buffer_state }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void yypop_buffer_state (yyscan_t yyscanner ); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void yyfree (void * ,yyscan_t yyscanner ); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(n) 1 +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -264,44 +288,48 @@ void yyfree (void * ,yyscan_t yyscanner ); int yylex_init (yyscan_t* scanner); -int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy (yyscan_t yyscanner ); +int yylex_destroy ( yyscan_t yyscanner ); + +int yyget_debug ( yyscan_t yyscanner ); + +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -int yyget_debug (yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_debug (int debug_flag ,yyscan_t yyscanner ); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner ); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_in (yyscan_t yyscanner ); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_in (FILE * in_str ,yyscan_t yyscanner ); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -FILE *yyget_out (yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -void yyset_out (FILE * out_str ,yyscan_t yyscanner ); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_leng (yyscan_t yyscanner ); +int yyget_lineno ( yyscan_t yyscanner ); -char *yyget_text (yyscan_t yyscanner ); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_lineno (yyscan_t yyscanner ); +int yyget_column ( yyscan_t yyscanner ); -void yyset_lineno (int line_number ,yyscan_t yyscanner ); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE * yyget_lval (yyscan_t yyscanner ); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); - YYLTYPE *yyget_lloc (yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -309,18 +337,18 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (yyscan_t yyscanner ); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap (yyscan_t yyscanner ); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -329,7 +357,12 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Number of entries by which start-condition stack grows. */ @@ -344,7 +377,7 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #define YY_DECL_IS_OURS 1 extern int yylex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); #define YY_DECL int yylex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) @@ -364,9 +397,154 @@ extern int yylex \ #undef YY_DECL #endif -#line 142 "lex_sql.l" +#ifndef yy_create_buffer_ALREADY_DEFINED +#undef yy_create_buffer +#endif +#ifndef yy_delete_buffer_ALREADY_DEFINED +#undef yy_delete_buffer +#endif +#ifndef yy_scan_buffer_ALREADY_DEFINED +#undef yy_scan_buffer +#endif +#ifndef yy_scan_string_ALREADY_DEFINED +#undef yy_scan_string +#endif +#ifndef yy_scan_bytes_ALREADY_DEFINED +#undef yy_scan_bytes +#endif +#ifndef yy_init_buffer_ALREADY_DEFINED +#undef yy_init_buffer +#endif +#ifndef yy_flush_buffer_ALREADY_DEFINED +#undef yy_flush_buffer +#endif +#ifndef yy_load_buffer_state_ALREADY_DEFINED +#undef yy_load_buffer_state +#endif +#ifndef yy_switch_to_buffer_ALREADY_DEFINED +#undef yy_switch_to_buffer +#endif +#ifndef yypush_buffer_state_ALREADY_DEFINED +#undef yypush_buffer_state +#endif +#ifndef yypop_buffer_state_ALREADY_DEFINED +#undef yypop_buffer_state +#endif +#ifndef yyensure_buffer_stack_ALREADY_DEFINED +#undef yyensure_buffer_stack +#endif +#ifndef yylex_ALREADY_DEFINED +#undef yylex +#endif +#ifndef yyrestart_ALREADY_DEFINED +#undef yyrestart +#endif +#ifndef yylex_init_ALREADY_DEFINED +#undef yylex_init +#endif +#ifndef yylex_init_extra_ALREADY_DEFINED +#undef yylex_init_extra +#endif +#ifndef yylex_destroy_ALREADY_DEFINED +#undef yylex_destroy +#endif +#ifndef yyget_debug_ALREADY_DEFINED +#undef yyget_debug +#endif +#ifndef yyset_debug_ALREADY_DEFINED +#undef yyset_debug +#endif +#ifndef yyget_extra_ALREADY_DEFINED +#undef yyget_extra +#endif +#ifndef yyset_extra_ALREADY_DEFINED +#undef yyset_extra +#endif +#ifndef yyget_in_ALREADY_DEFINED +#undef yyget_in +#endif +#ifndef yyset_in_ALREADY_DEFINED +#undef yyset_in +#endif +#ifndef yyget_out_ALREADY_DEFINED +#undef yyget_out +#endif +#ifndef yyset_out_ALREADY_DEFINED +#undef yyset_out +#endif +#ifndef yyget_leng_ALREADY_DEFINED +#undef yyget_leng +#endif +#ifndef yyget_text_ALREADY_DEFINED +#undef yyget_text +#endif +#ifndef yyget_lineno_ALREADY_DEFINED +#undef yyget_lineno +#endif +#ifndef yyset_lineno_ALREADY_DEFINED +#undef yyset_lineno +#endif +#ifndef yyget_column_ALREADY_DEFINED +#undef yyget_column +#endif +#ifndef yyset_column_ALREADY_DEFINED +#undef yyset_column +#endif +#ifndef yywrap_ALREADY_DEFINED +#undef yywrap +#endif +#ifndef yyget_lval_ALREADY_DEFINED +#undef yyget_lval +#endif +#ifndef yyset_lval_ALREADY_DEFINED +#undef yyset_lval +#endif +#ifndef yyget_lloc_ALREADY_DEFINED +#undef yyget_lloc +#endif +#ifndef yyset_lloc_ALREADY_DEFINED +#undef yyset_lloc +#endif +#ifndef yyalloc_ALREADY_DEFINED +#undef yyalloc +#endif +#ifndef yyrealloc_ALREADY_DEFINED +#undef yyrealloc +#endif +#ifndef yyfree_ALREADY_DEFINED +#undef yyfree +#endif +#ifndef yytext_ALREADY_DEFINED +#undef yytext +#endif +#ifndef yyleng_ALREADY_DEFINED +#undef yyleng +#endif +#ifndef yyin_ALREADY_DEFINED +#undef yyin +#endif +#ifndef yyout_ALREADY_DEFINED +#undef yyout +#endif +#ifndef yy_flex_debug_ALREADY_DEFINED +#undef yy_flex_debug +#endif +#ifndef yylineno_ALREADY_DEFINED +#undef yylineno +#endif +#ifndef yytables_fload_ALREADY_DEFINED +#undef yytables_fload +#endif +#ifndef yytables_destroy_ALREADY_DEFINED +#undef yytables_destroy +#endif +#ifndef yyTABLES_NAME_ALREADY_DEFINED +#undef yyTABLES_NAME +#endif + +#line 145 "lex_sql.l" -#line 371 "lex_sql.h" +#line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 25fc9f05..966b7223 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -110,6 +110,9 @@ ROLLBACK RETURN_TOKEN(TRX_ROLLBACK); INT RETURN_TOKEN(INT_T); CHAR RETURN_TOKEN(STRING_T); FLOAT RETURN_TOKEN(FLOAT_T); +NOT RETURN_TOKEN(NOT); +NULL RETURN_TOKEN(NULL_T); +NULLABLE RETURN_TOKEN(NULLABLE); LOAD RETURN_TOKEN(LOAD); DATA RETURN_TOKEN(DATA); INFILE RETURN_TOKEN(INFILE); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 9593d57a..8cf12579 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -143,9 +143,10 @@ struct UpdateSqlNode */ struct AttrInfoSqlNode { - AttrType type; ///< Type of attribute - std::string name; ///< Attribute name - size_t length; ///< Length of attribute + AttrType type; ///< Type of attribute + std::string name; ///< Attribute name + size_t length; ///< Length of attribute + bool nullable; ///< 字段是否可以为空 }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 87e43288..ebf3a604 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -177,78 +177,82 @@ enum yysymbol_kind_t YYSYMBOL_INT_T = 25, /* INT_T */ YYSYMBOL_STRING_T = 26, /* STRING_T */ YYSYMBOL_FLOAT_T = 27, /* FLOAT_T */ - YYSYMBOL_HELP = 28, /* HELP */ - YYSYMBOL_EXIT = 29, /* EXIT */ - YYSYMBOL_DOT = 30, /* DOT */ - YYSYMBOL_INTO = 31, /* INTO */ - YYSYMBOL_VALUES = 32, /* VALUES */ - YYSYMBOL_FROM = 33, /* FROM */ - YYSYMBOL_WHERE = 34, /* WHERE */ - YYSYMBOL_AND = 35, /* AND */ - YYSYMBOL_SET = 36, /* SET */ - YYSYMBOL_ON = 37, /* ON */ - YYSYMBOL_LOAD = 38, /* LOAD */ - YYSYMBOL_DATA = 39, /* DATA */ - YYSYMBOL_INFILE = 40, /* INFILE */ - YYSYMBOL_EXPLAIN = 41, /* EXPLAIN */ - YYSYMBOL_STORAGE = 42, /* STORAGE */ - YYSYMBOL_FORMAT = 43, /* FORMAT */ - YYSYMBOL_EQ = 44, /* EQ */ - YYSYMBOL_LT = 45, /* LT */ - YYSYMBOL_GT = 46, /* GT */ - YYSYMBOL_LE = 47, /* LE */ - YYSYMBOL_GE = 48, /* GE */ - YYSYMBOL_NE = 49, /* NE */ - YYSYMBOL_NUMBER = 50, /* NUMBER */ - YYSYMBOL_FLOAT = 51, /* FLOAT */ - YYSYMBOL_ID = 52, /* ID */ - YYSYMBOL_SSS = 53, /* SSS */ - YYSYMBOL_54_ = 54, /* '+' */ - YYSYMBOL_55_ = 55, /* '-' */ - YYSYMBOL_56_ = 56, /* '*' */ - YYSYMBOL_57_ = 57, /* '/' */ - YYSYMBOL_UMINUS = 58, /* UMINUS */ - YYSYMBOL_YYACCEPT = 59, /* $accept */ - YYSYMBOL_commands = 60, /* commands */ - YYSYMBOL_command_wrapper = 61, /* command_wrapper */ - YYSYMBOL_exit_stmt = 62, /* exit_stmt */ - YYSYMBOL_help_stmt = 63, /* help_stmt */ - YYSYMBOL_sync_stmt = 64, /* sync_stmt */ - YYSYMBOL_begin_stmt = 65, /* begin_stmt */ - YYSYMBOL_commit_stmt = 66, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 67, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 68, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 69, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 70, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 71, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 72, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 73, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 74, /* attr_def_list */ - YYSYMBOL_attr_def = 75, /* attr_def */ - YYSYMBOL_number = 76, /* number */ - YYSYMBOL_type = 77, /* type */ - YYSYMBOL_insert_stmt = 78, /* insert_stmt */ - YYSYMBOL_value_list = 79, /* value_list */ - YYSYMBOL_value = 80, /* value */ - YYSYMBOL_storage_format = 81, /* storage_format */ - YYSYMBOL_delete_stmt = 82, /* delete_stmt */ - YYSYMBOL_update_stmt = 83, /* update_stmt */ - YYSYMBOL_select_stmt = 84, /* select_stmt */ - YYSYMBOL_calc_stmt = 85, /* calc_stmt */ - YYSYMBOL_expression_list = 86, /* expression_list */ - YYSYMBOL_expression = 87, /* expression */ - YYSYMBOL_rel_attr = 88, /* rel_attr */ - YYSYMBOL_relation = 89, /* relation */ - YYSYMBOL_rel_list = 90, /* rel_list */ - YYSYMBOL_where = 91, /* where */ - YYSYMBOL_condition_list = 92, /* condition_list */ - YYSYMBOL_condition = 93, /* condition */ - YYSYMBOL_comp_op = 94, /* comp_op */ - YYSYMBOL_group_by = 95, /* group_by */ - YYSYMBOL_load_data_stmt = 96, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 97, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 98, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 99 /* opt_semicolon */ + YYSYMBOL_NOT = 28, /* NOT */ + YYSYMBOL_NULL_T = 29, /* NULL_T */ + YYSYMBOL_NULLABLE = 30, /* NULLABLE */ + YYSYMBOL_HELP = 31, /* HELP */ + YYSYMBOL_EXIT = 32, /* EXIT */ + YYSYMBOL_DOT = 33, /* DOT */ + YYSYMBOL_INTO = 34, /* INTO */ + YYSYMBOL_VALUES = 35, /* VALUES */ + YYSYMBOL_FROM = 36, /* FROM */ + YYSYMBOL_WHERE = 37, /* WHERE */ + YYSYMBOL_AND = 38, /* AND */ + YYSYMBOL_SET = 39, /* SET */ + YYSYMBOL_ON = 40, /* ON */ + YYSYMBOL_LOAD = 41, /* LOAD */ + YYSYMBOL_DATA = 42, /* DATA */ + YYSYMBOL_INFILE = 43, /* INFILE */ + YYSYMBOL_EXPLAIN = 44, /* EXPLAIN */ + YYSYMBOL_STORAGE = 45, /* STORAGE */ + YYSYMBOL_FORMAT = 46, /* FORMAT */ + YYSYMBOL_EQ = 47, /* EQ */ + YYSYMBOL_LT = 48, /* LT */ + YYSYMBOL_GT = 49, /* GT */ + YYSYMBOL_LE = 50, /* LE */ + YYSYMBOL_GE = 51, /* GE */ + YYSYMBOL_NE = 52, /* NE */ + YYSYMBOL_NUMBER = 53, /* NUMBER */ + YYSYMBOL_FLOAT = 54, /* FLOAT */ + YYSYMBOL_ID = 55, /* ID */ + YYSYMBOL_SSS = 56, /* SSS */ + YYSYMBOL_57_ = 57, /* '+' */ + YYSYMBOL_58_ = 58, /* '-' */ + YYSYMBOL_59_ = 59, /* '*' */ + YYSYMBOL_60_ = 60, /* '/' */ + YYSYMBOL_UMINUS = 61, /* UMINUS */ + YYSYMBOL_YYACCEPT = 62, /* $accept */ + YYSYMBOL_commands = 63, /* commands */ + YYSYMBOL_command_wrapper = 64, /* command_wrapper */ + YYSYMBOL_exit_stmt = 65, /* exit_stmt */ + YYSYMBOL_help_stmt = 66, /* help_stmt */ + YYSYMBOL_sync_stmt = 67, /* sync_stmt */ + YYSYMBOL_begin_stmt = 68, /* begin_stmt */ + YYSYMBOL_commit_stmt = 69, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 70, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 71, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 72, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 73, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 74, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 75, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 76, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 77, /* attr_def_list */ + YYSYMBOL_attr_def = 78, /* attr_def */ + YYSYMBOL_nullable_constraint = 79, /* nullable_constraint */ + YYSYMBOL_number = 80, /* number */ + YYSYMBOL_type = 81, /* type */ + YYSYMBOL_insert_stmt = 82, /* insert_stmt */ + YYSYMBOL_value_list = 83, /* value_list */ + YYSYMBOL_value = 84, /* value */ + YYSYMBOL_storage_format = 85, /* storage_format */ + YYSYMBOL_delete_stmt = 86, /* delete_stmt */ + YYSYMBOL_update_stmt = 87, /* update_stmt */ + YYSYMBOL_select_stmt = 88, /* select_stmt */ + YYSYMBOL_calc_stmt = 89, /* calc_stmt */ + YYSYMBOL_expression_list = 90, /* expression_list */ + YYSYMBOL_expression = 91, /* expression */ + YYSYMBOL_rel_attr = 92, /* rel_attr */ + YYSYMBOL_relation = 93, /* relation */ + YYSYMBOL_rel_list = 94, /* rel_list */ + YYSYMBOL_where = 95, /* where */ + YYSYMBOL_condition_list = 96, /* condition_list */ + YYSYMBOL_condition = 97, /* condition */ + YYSYMBOL_comp_op = 98, /* comp_op */ + YYSYMBOL_group_by = 99, /* group_by */ + YYSYMBOL_load_data_stmt = 100, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 101, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 102, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 103 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -579,19 +583,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 65 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 140 +#define YYLAST 144 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 59 +#define YYNTOKENS 62 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 41 +#define YYNNTS 42 /* YYNRULES -- Number of rules. */ -#define YYNRULES 91 +#define YYNRULES 94 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 165 +#define YYNSTATES 170 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 309 +#define YYMAXUTOK 312 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -609,7 +613,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 56, 54, 2, 55, 2, 57, 2, 2, + 2, 2, 59, 57, 2, 58, 2, 60, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -635,23 +639,24 @@ static const yytype_int8 yytranslate[] = 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 58 + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 61 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 188, 188, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 219, 225, 230, 236, 242, 248, 254, - 261, 267, 275, 289, 299, 323, 326, 339, 347, 357, - 360, 361, 362, 365, 382, 385, 396, 400, 404, 413, - 416, 423, 435, 450, 475, 484, 489, 500, 503, 506, - 509, 512, 516, 519, 524, 530, 537, 542, 552, 557, - 562, 576, 579, 585, 588, 593, 600, 612, 624, 636, - 651, 652, 653, 654, 655, 656, 662, 667, 680, 688, - 698, 699 + 0, 193, 193, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 224, 230, 235, 241, 247, 253, 259, + 266, 272, 280, 294, 304, 328, 331, 344, 353, 365, + 369, 374, 380, 383, 384, 385, 388, 405, 408, 419, + 423, 427, 436, 439, 446, 458, 473, 498, 507, 512, + 523, 526, 529, 532, 535, 539, 542, 547, 553, 560, + 565, 575, 580, 585, 599, 602, 608, 611, 616, 623, + 635, 647, 659, 674, 675, 676, 677, 678, 679, 685, + 690, 703, 711, 721, 722 }; #endif @@ -671,14 +676,15 @@ static const char *const yytname[] = "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "STRING_T", - "FLOAT_T", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", - "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", - "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "NUMBER", "FLOAT", "ID", - "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", - "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", - "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", - "desc_table_stmt", "create_index_stmt", "drop_index_stmt", - "create_table_stmt", "attr_def_list", "attr_def", "number", "type", + "FLOAT_T", "NOT", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", "INTO", + "VALUES", "FROM", "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", + "EXPLAIN", "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", + "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", + "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", + "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", + "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", + "create_index_stmt", "drop_index_stmt", "create_table_stmt", + "attr_def_list", "attr_def", "nullable_constraint", "number", "type", "insert_stmt", "value_list", "value", "storage_format", "delete_stmt", "update_stmt", "select_stmt", "calc_stmt", "expression_list", "expression", "rel_attr", "relation", "rel_list", "where", @@ -693,7 +699,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-97) +#define YYPACT_NINF (-91) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -707,23 +713,23 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 50, 10, 11, -16, -16, -30, 2, -97, -5, -6, - -23, -97, -97, -97, -97, -97, -22, -7, 50, 31, - 35, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -2, 17, 24, 37, -16, -97, -97, 47, -97, - -16, -97, -97, -97, -8, -97, 21, -97, -97, 38, - 40, 51, 49, 54, -97, -97, -97, -97, 76, 59, - -97, 60, -12, 46, -97, -16, -16, -16, -16, -16, - 48, 67, 71, 55, -41, 53, 56, 57, 58, -97, - -97, -97, -32, -32, -97, -97, -97, 90, 71, 93, - -46, -97, 69, -97, 83, -11, 94, 97, -97, 48, - -97, -41, 36, 36, -97, 82, -41, 110, -97, -97, - -97, 100, 56, 101, 68, -97, -97, 102, -97, -97, - -97, -97, -97, -97, -46, -46, -46, 71, 70, 74, - 94, 84, 105, -41, 107, -97, -97, -97, -97, -97, - -97, -97, -97, 108, -97, 86, -97, -97, 102, -97, - -97, 87, -97, 78, -97 + 43, 1, 5, -17, -17, -45, 7, -91, -7, 14, + -20, -91, -91, -91, -91, -91, 26, 41, 43, 86, + 85, -91, -91, -91, -91, -91, -91, -91, -91, -91, + -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, + -91, 36, 37, 38, 39, -17, -91, -91, 56, -91, + -17, -91, -91, -91, 19, -91, 54, -91, -91, 40, + 42, 57, 51, 58, -91, -91, -91, -91, 80, 60, + -91, 62, -14, 48, -91, -17, -17, -17, -17, -17, + 49, 70, 69, 52, -49, 53, 55, 61, 63, -91, + -91, -91, 13, 13, -91, -91, -91, 87, 69, 96, + -24, -91, 72, -91, 83, -1, 99, 102, -91, 49, + -91, -49, -29, -29, -91, 84, -49, 115, -91, -91, + -91, -16, 55, 104, 71, -91, -91, 106, -91, -91, + -91, -91, -91, -91, -24, -24, -24, 69, 73, 76, + 101, -91, -91, 99, 88, 105, -49, 111, -91, -91, + -91, -91, -91, -91, -91, -91, 112, -91, -91, 89, + -91, -91, 106, -91, 34, 90, -91, -91, 79, -91 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -733,41 +739,41 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 90, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 93, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 46, 47, 66, 48, - 0, 65, 63, 54, 55, 64, 0, 31, 30, 0, - 0, 0, 0, 0, 88, 1, 91, 2, 0, 0, - 29, 0, 0, 0, 62, 0, 0, 0, 0, 0, - 0, 0, 71, 0, 0, 0, 0, 0, 0, 61, - 67, 56, 57, 58, 59, 60, 68, 69, 71, 0, - 73, 51, 0, 89, 0, 0, 35, 0, 33, 0, - 86, 0, 0, 0, 72, 74, 0, 0, 40, 41, - 42, 38, 0, 0, 0, 70, 53, 44, 80, 81, - 82, 83, 84, 85, 0, 0, 73, 71, 0, 0, - 35, 49, 0, 0, 0, 77, 79, 76, 78, 75, - 52, 87, 39, 0, 36, 0, 34, 32, 44, 43, - 37, 0, 45, 0, 50 + 20, 0, 0, 0, 0, 0, 49, 50, 69, 51, + 0, 68, 66, 57, 58, 67, 0, 31, 30, 0, + 0, 0, 0, 0, 91, 1, 94, 2, 0, 0, + 29, 0, 0, 0, 65, 0, 0, 0, 0, 0, + 0, 0, 74, 0, 0, 0, 0, 0, 0, 64, + 70, 59, 60, 61, 62, 63, 71, 72, 74, 0, + 76, 54, 0, 92, 0, 0, 35, 0, 33, 0, + 89, 0, 0, 0, 75, 77, 0, 0, 43, 44, + 45, 41, 0, 0, 0, 73, 56, 47, 83, 84, + 85, 86, 87, 88, 0, 0, 76, 74, 0, 0, + 0, 40, 38, 35, 52, 0, 0, 0, 80, 82, + 79, 81, 78, 55, 90, 42, 0, 39, 36, 0, + 34, 32, 47, 46, 41, 0, 48, 37, 0, 53 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -97, -97, 114, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -3, 12, -97, -97, -97, - -25, -83, -97, -97, -97, -97, -97, -4, 25, -77, - -97, 26, -96, 0, -97, 27, -97, -97, -97, -97, - -97 + -91, -91, 118, -91, -91, -91, -91, -91, -91, -91, + -91, -91, -91, -91, -91, -5, 17, -23, -91, -91, + -91, -22, -83, -91, -91, -91, -91, -91, -4, 35, + -66, -91, 33, -90, 8, -91, 30, -91, -91, -91, + -91, -91 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 123, 106, 153, 121, 33, - 144, 52, 156, 34, 35, 36, 37, 53, 54, 55, - 97, 98, 101, 114, 115, 134, 126, 38, 39, 40, - 67 + 28, 29, 30, 31, 32, 123, 106, 142, 156, 121, + 33, 147, 52, 160, 34, 35, 36, 37, 53, 54, + 55, 97, 98, 101, 114, 115, 134, 126, 38, 39, + 40, 67 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -775,40 +781,40 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 56, 103, 110, 45, 46, 47, 48, 49, 89, 46, - 47, 58, 49, 75, 118, 119, 120, 112, 41, 43, - 42, 44, 57, 113, 78, 79, 59, 60, 127, 61, - 62, 65, 63, 137, 46, 47, 48, 49, 66, 50, - 51, 150, 76, 77, 78, 79, 76, 77, 78, 79, - 68, 145, 147, 112, 80, 1, 2, 146, 148, 113, - 158, 3, 4, 5, 6, 7, 8, 9, 10, 69, - 72, 91, 11, 12, 13, 74, 70, 73, 14, 15, - 128, 129, 130, 131, 132, 133, 16, 83, 17, 71, - 81, 18, 82, 84, 85, 86, 87, 88, 90, 99, - 96, 92, 93, 94, 95, 100, 104, 102, 105, 107, - 108, 109, 111, 116, 117, 122, 124, 136, 138, 139, - 142, 141, 151, 143, 152, 157, 155, 159, 160, 161, - 164, 163, 64, 162, 140, 125, 149, 154, 0, 0, - 135 + 56, 103, 45, 139, 46, 47, 89, 49, 110, 41, + 57, 42, 140, 43, 141, 44, 58, 112, 128, 129, + 130, 131, 132, 133, 118, 119, 120, 59, 127, 46, + 47, 48, 49, 137, 113, 61, 46, 47, 48, 49, + 75, 50, 51, 76, 77, 78, 79, 153, 1, 2, + 60, 148, 150, 112, 3, 4, 5, 6, 7, 8, + 9, 10, 140, 162, 141, 11, 12, 13, 149, 151, + 113, 91, 78, 79, 14, 15, 76, 77, 78, 79, + 72, 62, 16, 63, 17, 74, 65, 18, 66, 73, + 80, 68, 69, 70, 71, 81, 83, 82, 84, 86, + 87, 85, 88, 90, 96, 99, 100, 102, 109, 104, + 105, 92, 93, 94, 95, 111, 107, 117, 108, 116, + 122, 124, 136, 138, 144, 161, 145, 146, 154, 155, + 157, 163, 164, 159, 169, 165, 64, 168, 158, 143, + 166, 167, 125, 135, 152 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { - 4, 84, 98, 19, 50, 51, 52, 53, 20, 50, - 51, 9, 53, 21, 25, 26, 27, 100, 8, 8, - 10, 10, 52, 100, 56, 57, 31, 33, 111, 52, - 52, 0, 39, 116, 50, 51, 52, 53, 3, 55, - 56, 137, 54, 55, 56, 57, 54, 55, 56, 57, - 52, 134, 135, 136, 33, 5, 6, 134, 135, 136, - 143, 11, 12, 13, 14, 15, 16, 17, 18, 52, - 45, 75, 22, 23, 24, 50, 52, 30, 28, 29, - 44, 45, 46, 47, 48, 49, 36, 36, 38, 52, - 52, 41, 52, 44, 40, 19, 37, 37, 52, 32, - 52, 76, 77, 78, 79, 34, 53, 52, 52, 52, - 52, 21, 19, 44, 31, 21, 19, 35, 8, 19, - 52, 20, 52, 21, 50, 20, 42, 20, 20, 43, - 52, 44, 18, 158, 122, 109, 136, 140, -1, -1, - 113 + 4, 84, 19, 19, 53, 54, 20, 56, 98, 8, + 55, 10, 28, 8, 30, 10, 9, 100, 47, 48, + 49, 50, 51, 52, 25, 26, 27, 34, 111, 53, + 54, 55, 56, 116, 100, 55, 53, 54, 55, 56, + 21, 58, 59, 57, 58, 59, 60, 137, 5, 6, + 36, 134, 135, 136, 11, 12, 13, 14, 15, 16, + 17, 18, 28, 146, 30, 22, 23, 24, 134, 135, + 136, 75, 59, 60, 31, 32, 57, 58, 59, 60, + 45, 55, 39, 42, 41, 50, 0, 44, 3, 33, + 36, 55, 55, 55, 55, 55, 39, 55, 47, 19, + 40, 43, 40, 55, 55, 35, 37, 55, 21, 56, + 55, 76, 77, 78, 79, 19, 55, 34, 55, 47, + 21, 19, 38, 8, 20, 20, 55, 21, 55, 53, + 29, 20, 20, 45, 55, 46, 18, 47, 143, 122, + 162, 164, 109, 113, 136 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -816,37 +822,37 @@ static const yytype_int16 yycheck[] = static const yytype_int8 yystos[] = { 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, - 18, 22, 23, 24, 28, 29, 36, 38, 41, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 78, 82, 83, 84, 85, 96, 97, - 98, 8, 10, 8, 10, 19, 50, 51, 52, 53, - 55, 56, 80, 86, 87, 88, 86, 52, 9, 31, - 33, 52, 52, 39, 61, 0, 3, 99, 52, 52, - 52, 52, 87, 30, 87, 21, 54, 55, 56, 57, - 33, 52, 52, 36, 44, 40, 19, 37, 37, 20, - 52, 86, 87, 87, 87, 87, 52, 89, 90, 32, - 34, 91, 52, 80, 53, 52, 75, 52, 52, 21, - 91, 19, 80, 88, 92, 93, 44, 31, 25, 26, - 27, 77, 21, 74, 19, 90, 95, 80, 44, 45, - 46, 47, 48, 49, 94, 94, 35, 80, 8, 19, - 75, 20, 52, 21, 79, 80, 88, 80, 88, 92, - 91, 52, 50, 76, 74, 42, 81, 20, 80, 20, - 20, 43, 79, 44, 52 + 18, 22, 23, 24, 31, 32, 39, 41, 44, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 82, 86, 87, 88, 89, 100, 101, + 102, 8, 10, 8, 10, 19, 53, 54, 55, 56, + 58, 59, 84, 90, 91, 92, 90, 55, 9, 34, + 36, 55, 55, 42, 64, 0, 3, 103, 55, 55, + 55, 55, 91, 33, 91, 21, 57, 58, 59, 60, + 36, 55, 55, 39, 47, 43, 19, 40, 40, 20, + 55, 90, 91, 91, 91, 91, 55, 93, 94, 35, + 37, 95, 55, 84, 56, 55, 78, 55, 55, 21, + 95, 19, 84, 92, 96, 97, 47, 34, 25, 26, + 27, 81, 21, 77, 19, 94, 99, 84, 47, 48, + 49, 50, 51, 52, 98, 98, 38, 84, 8, 19, + 28, 30, 79, 78, 20, 55, 21, 83, 84, 92, + 84, 92, 96, 95, 55, 53, 80, 29, 77, 45, + 85, 20, 84, 20, 20, 46, 83, 79, 47, 55 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 59, 60, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 74, 75, 75, 76, - 77, 77, 77, 78, 79, 79, 80, 80, 80, 81, - 81, 82, 83, 84, 85, 86, 86, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 88, 88, 89, 90, - 90, 91, 91, 92, 92, 92, 93, 93, 93, 93, - 94, 94, 94, 94, 94, 94, 95, 96, 97, 98, - 99, 99 + 0, 62, 63, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 77, 78, 78, 79, + 79, 79, 80, 81, 81, 81, 82, 83, 83, 84, + 84, 84, 85, 85, 86, 87, 88, 89, 90, 90, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, + 92, 93, 94, 94, 95, 95, 96, 96, 96, 97, + 97, 97, 97, 98, 98, 98, 98, 98, 98, 99, + 100, 101, 102, 103, 103 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -855,13 +861,13 @@ static const yytype_int8 yyr2[] = 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 2, 2, 8, 5, 8, 0, 3, 5, 2, 1, - 1, 1, 1, 8, 0, 3, 1, 1, 1, 0, - 4, 4, 7, 6, 2, 1, 3, 3, 3, 3, - 3, 3, 2, 1, 1, 1, 1, 3, 1, 1, - 3, 0, 2, 0, 1, 3, 3, 3, 3, 3, - 1, 1, 1, 1, 1, 1, 0, 7, 2, 4, - 0, 1 + 2, 2, 8, 5, 8, 0, 3, 6, 3, 2, + 1, 0, 1, 1, 1, 1, 8, 0, 3, 1, + 1, 1, 0, 4, 4, 7, 6, 2, 1, 3, + 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, + 3, 1, 1, 3, 0, 2, 0, 1, 3, 3, + 3, 3, 3, 1, 1, 1, 1, 1, 1, 0, + 7, 2, 4, 0, 1 }; @@ -1723,93 +1729,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 189 "yacc_sql.y" +#line 194 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1732 "yacc_sql.cpp" +#line 1738 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 219 "yacc_sql.y" +#line 224 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1741 "yacc_sql.cpp" +#line 1747 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 225 "yacc_sql.y" +#line 230 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1749 "yacc_sql.cpp" +#line 1755 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 230 "yacc_sql.y" +#line 235 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1757 "yacc_sql.cpp" +#line 1763 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 236 "yacc_sql.y" +#line 241 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1765 "yacc_sql.cpp" +#line 1771 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 242 "yacc_sql.y" +#line 247 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1773 "yacc_sql.cpp" +#line 1779 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 248 "yacc_sql.y" +#line 253 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1781 "yacc_sql.cpp" +#line 1787 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 254 "yacc_sql.y" +#line 259 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1791 "yacc_sql.cpp" +#line 1797 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 261 "yacc_sql.y" +#line 266 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1799 "yacc_sql.cpp" +#line 1805 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 267 "yacc_sql.y" +#line 272 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1809 "yacc_sql.cpp" +#line 1815 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 276 "yacc_sql.y" +#line 281 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1820,11 +1826,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1824 "yacc_sql.cpp" +#line 1830 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 290 "yacc_sql.y" +#line 295 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1832,11 +1838,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1836 "yacc_sql.cpp" +#line 1842 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 300 "yacc_sql.y" +#line 305 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1857,19 +1863,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1861 "yacc_sql.cpp" +#line 1867 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 323 "yacc_sql.y" +#line 328 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1869 "yacc_sql.cpp" +#line 1875 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 327 "yacc_sql.y" +#line 332 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1879,59 +1885,85 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1883 "yacc_sql.cpp" +#line 1889 "yacc_sql.cpp" break; - case 37: /* attr_def: ID type LBRACE number RBRACE */ -#line 340 "yacc_sql.y" + case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ +#line 345 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-3].number); - (yyval.attr_info)->name = (yyvsp[-4].string); - (yyval.attr_info)->length = (yyvsp[-1].number); - free((yyvsp[-4].string)); + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); + free((yyvsp[-5].string)); } -#line 1895 "yacc_sql.cpp" +#line 1902 "yacc_sql.cpp" break; - case 38: /* attr_def: ID type */ -#line 348 "yacc_sql.y" + case 38: /* attr_def: ID type nullable_constraint */ +#line 354 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[0].number); - (yyval.attr_info)->name = (yyvsp[-1].string); + (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); + (yyval.attr_info)->name = (yyvsp[-2].string); (yyval.attr_info)->length = 4; - free((yyvsp[-1].string)); + (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); // 处理NULL/NOT NULL标记 + free((yyvsp[-2].string)); + } +#line 1915 "yacc_sql.cpp" + break; + + case 39: /* nullable_constraint: NOT NULL_T */ +#line 366 "yacc_sql.y" + { + (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false + } +#line 1923 "yacc_sql.cpp" + break; + + case 40: /* nullable_constraint: NULLABLE */ +#line 370 "yacc_sql.y" + { + (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1907 "yacc_sql.cpp" +#line 1931 "yacc_sql.cpp" break; - case 39: /* number: NUMBER */ -#line 357 "yacc_sql.y" + case 41: /* nullable_constraint: %empty */ +#line 374 "yacc_sql.y" + { + (yyval.nullable_info) = true; // 默认情况为 NOT NULL + } +#line 1939 "yacc_sql.cpp" + break; + + case 42: /* number: NUMBER */ +#line 380 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1913 "yacc_sql.cpp" +#line 1945 "yacc_sql.cpp" break; - case 40: /* type: INT_T */ -#line 360 "yacc_sql.y" + case 43: /* type: INT_T */ +#line 383 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1919 "yacc_sql.cpp" +#line 1951 "yacc_sql.cpp" break; - case 41: /* type: STRING_T */ -#line 361 "yacc_sql.y" + case 44: /* type: STRING_T */ +#line 384 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1925 "yacc_sql.cpp" +#line 1957 "yacc_sql.cpp" break; - case 42: /* type: FLOAT_T */ -#line 362 "yacc_sql.y" + case 45: /* type: FLOAT_T */ +#line 385 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1931 "yacc_sql.cpp" +#line 1963 "yacc_sql.cpp" break; - case 43: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 366 "yacc_sql.y" + case 46: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ +#line 389 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1944,19 +1976,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1948 "yacc_sql.cpp" +#line 1980 "yacc_sql.cpp" break; - case 44: /* value_list: %empty */ -#line 382 "yacc_sql.y" + case 47: /* value_list: %empty */ +#line 405 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 1956 "yacc_sql.cpp" +#line 1988 "yacc_sql.cpp" break; - case 45: /* value_list: COMMA value value_list */ -#line 385 "yacc_sql.y" + case 48: /* value_list: COMMA value value_list */ +#line 408 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -1966,56 +1998,56 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1970 "yacc_sql.cpp" +#line 2002 "yacc_sql.cpp" break; - case 46: /* value: NUMBER */ -#line 396 "yacc_sql.y" + case 49: /* value: NUMBER */ +#line 419 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 1979 "yacc_sql.cpp" +#line 2011 "yacc_sql.cpp" break; - case 47: /* value: FLOAT */ -#line 400 "yacc_sql.y" + case 50: /* value: FLOAT */ +#line 423 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 1988 "yacc_sql.cpp" +#line 2020 "yacc_sql.cpp" break; - case 48: /* value: SSS */ -#line 404 "yacc_sql.y" + case 51: /* value: SSS */ +#line 427 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 1999 "yacc_sql.cpp" +#line 2031 "yacc_sql.cpp" break; - case 49: /* storage_format: %empty */ -#line 413 "yacc_sql.y" + case 52: /* storage_format: %empty */ +#line 436 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2007 "yacc_sql.cpp" +#line 2039 "yacc_sql.cpp" break; - case 50: /* storage_format: STORAGE FORMAT EQ ID */ -#line 417 "yacc_sql.y" + case 53: /* storage_format: STORAGE FORMAT EQ ID */ +#line 440 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2015 "yacc_sql.cpp" +#line 2047 "yacc_sql.cpp" break; - case 51: /* delete_stmt: DELETE FROM ID where */ -#line 424 "yacc_sql.y" + case 54: /* delete_stmt: DELETE FROM ID where */ +#line 447 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2025,11 +2057,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2029 "yacc_sql.cpp" +#line 2061 "yacc_sql.cpp" break; - case 52: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 436 "yacc_sql.y" + case 55: /* update_stmt: UPDATE ID SET ID EQ value where */ +#line 459 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2042,11 +2074,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2046 "yacc_sql.cpp" +#line 2078 "yacc_sql.cpp" break; - case 53: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 451 "yacc_sql.y" + case 56: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 474 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2069,30 +2101,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2073 "yacc_sql.cpp" +#line 2105 "yacc_sql.cpp" break; - case 54: /* calc_stmt: CALC expression_list */ -#line 476 "yacc_sql.y" + case 57: /* calc_stmt: CALC expression_list */ +#line 499 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2083 "yacc_sql.cpp" +#line 2115 "yacc_sql.cpp" break; - case 55: /* expression_list: expression */ -#line 485 "yacc_sql.y" + case 58: /* expression_list: expression */ +#line 508 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2092 "yacc_sql.cpp" +#line 2124 "yacc_sql.cpp" break; - case 56: /* expression_list: expression COMMA expression_list */ -#line 490 "yacc_sql.y" + case 59: /* expression_list: expression COMMA expression_list */ +#line 513 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2101,99 +2133,99 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2105 "yacc_sql.cpp" +#line 2137 "yacc_sql.cpp" break; - case 57: /* expression: expression '+' expression */ -#line 500 "yacc_sql.y" + case 60: /* expression: expression '+' expression */ +#line 523 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2113 "yacc_sql.cpp" +#line 2145 "yacc_sql.cpp" break; - case 58: /* expression: expression '-' expression */ -#line 503 "yacc_sql.y" + case 61: /* expression: expression '-' expression */ +#line 526 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2121 "yacc_sql.cpp" +#line 2153 "yacc_sql.cpp" break; - case 59: /* expression: expression '*' expression */ -#line 506 "yacc_sql.y" + case 62: /* expression: expression '*' expression */ +#line 529 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2129 "yacc_sql.cpp" +#line 2161 "yacc_sql.cpp" break; - case 60: /* expression: expression '/' expression */ -#line 509 "yacc_sql.y" + case 63: /* expression: expression '/' expression */ +#line 532 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2137 "yacc_sql.cpp" +#line 2169 "yacc_sql.cpp" break; - case 61: /* expression: LBRACE expression RBRACE */ -#line 512 "yacc_sql.y" + case 64: /* expression: LBRACE expression RBRACE */ +#line 535 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2146 "yacc_sql.cpp" +#line 2178 "yacc_sql.cpp" break; - case 62: /* expression: '-' expression */ -#line 516 "yacc_sql.y" + case 65: /* expression: '-' expression */ +#line 539 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2154 "yacc_sql.cpp" +#line 2186 "yacc_sql.cpp" break; - case 63: /* expression: value */ -#line 519 "yacc_sql.y" + case 66: /* expression: value */ +#line 542 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2164 "yacc_sql.cpp" +#line 2196 "yacc_sql.cpp" break; - case 64: /* expression: rel_attr */ -#line 524 "yacc_sql.y" + case 67: /* expression: rel_attr */ +#line 547 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2175 "yacc_sql.cpp" +#line 2207 "yacc_sql.cpp" break; - case 65: /* expression: '*' */ -#line 530 "yacc_sql.y" + case 68: /* expression: '*' */ +#line 553 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2183 "yacc_sql.cpp" +#line 2215 "yacc_sql.cpp" break; - case 66: /* rel_attr: ID */ -#line 537 "yacc_sql.y" + case 69: /* rel_attr: ID */ +#line 560 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2193 "yacc_sql.cpp" +#line 2225 "yacc_sql.cpp" break; - case 67: /* rel_attr: ID DOT ID */ -#line 542 "yacc_sql.y" + case 70: /* rel_attr: ID DOT ID */ +#line 565 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2201,29 +2233,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2205 "yacc_sql.cpp" +#line 2237 "yacc_sql.cpp" break; - case 68: /* relation: ID */ -#line 552 "yacc_sql.y" + case 71: /* relation: ID */ +#line 575 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2213 "yacc_sql.cpp" +#line 2245 "yacc_sql.cpp" break; - case 69: /* rel_list: relation */ -#line 557 "yacc_sql.y" + case 72: /* rel_list: relation */ +#line 580 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2223 "yacc_sql.cpp" +#line 2255 "yacc_sql.cpp" break; - case 70: /* rel_list: relation COMMA rel_list */ -#line 562 "yacc_sql.y" + case 73: /* rel_list: relation COMMA rel_list */ +#line 585 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2234,55 +2266,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2238 "yacc_sql.cpp" +#line 2270 "yacc_sql.cpp" break; - case 71: /* where: %empty */ -#line 576 "yacc_sql.y" + case 74: /* where: %empty */ +#line 599 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2246 "yacc_sql.cpp" +#line 2278 "yacc_sql.cpp" break; - case 72: /* where: WHERE condition_list */ -#line 579 "yacc_sql.y" + case 75: /* where: WHERE condition_list */ +#line 602 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2254 "yacc_sql.cpp" +#line 2286 "yacc_sql.cpp" break; - case 73: /* condition_list: %empty */ -#line 585 "yacc_sql.y" + case 76: /* condition_list: %empty */ +#line 608 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2262 "yacc_sql.cpp" +#line 2294 "yacc_sql.cpp" break; - case 74: /* condition_list: condition */ -#line 588 "yacc_sql.y" + case 77: /* condition_list: condition */ +#line 611 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2272 "yacc_sql.cpp" +#line 2304 "yacc_sql.cpp" break; - case 75: /* condition_list: condition AND condition_list */ -#line 593 "yacc_sql.y" + case 78: /* condition_list: condition AND condition_list */ +#line 616 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2282 "yacc_sql.cpp" +#line 2314 "yacc_sql.cpp" break; - case 76: /* condition: rel_attr comp_op value */ -#line 601 "yacc_sql.y" + case 79: /* condition: rel_attr comp_op value */ +#line 624 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2294,11 +2326,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2298 "yacc_sql.cpp" +#line 2330 "yacc_sql.cpp" break; - case 77: /* condition: value comp_op value */ -#line 613 "yacc_sql.y" + case 80: /* condition: value comp_op value */ +#line 636 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2310,11 +2342,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2314 "yacc_sql.cpp" +#line 2346 "yacc_sql.cpp" break; - case 78: /* condition: rel_attr comp_op rel_attr */ -#line 625 "yacc_sql.y" + case 81: /* condition: rel_attr comp_op rel_attr */ +#line 648 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2326,11 +2358,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2330 "yacc_sql.cpp" +#line 2362 "yacc_sql.cpp" break; - case 79: /* condition: value comp_op rel_attr */ -#line 637 "yacc_sql.y" + case 82: /* condition: value comp_op rel_attr */ +#line 660 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2342,55 +2374,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2346 "yacc_sql.cpp" +#line 2378 "yacc_sql.cpp" break; - case 80: /* comp_op: EQ */ -#line 651 "yacc_sql.y" + case 83: /* comp_op: EQ */ +#line 674 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2352 "yacc_sql.cpp" +#line 2384 "yacc_sql.cpp" break; - case 81: /* comp_op: LT */ -#line 652 "yacc_sql.y" + case 84: /* comp_op: LT */ +#line 675 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2358 "yacc_sql.cpp" +#line 2390 "yacc_sql.cpp" break; - case 82: /* comp_op: GT */ -#line 653 "yacc_sql.y" + case 85: /* comp_op: GT */ +#line 676 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2364 "yacc_sql.cpp" +#line 2396 "yacc_sql.cpp" break; - case 83: /* comp_op: LE */ -#line 654 "yacc_sql.y" + case 86: /* comp_op: LE */ +#line 677 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2370 "yacc_sql.cpp" +#line 2402 "yacc_sql.cpp" break; - case 84: /* comp_op: GE */ -#line 655 "yacc_sql.y" + case 87: /* comp_op: GE */ +#line 678 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2376 "yacc_sql.cpp" +#line 2408 "yacc_sql.cpp" break; - case 85: /* comp_op: NE */ -#line 656 "yacc_sql.y" + case 88: /* comp_op: NE */ +#line 679 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2382 "yacc_sql.cpp" +#line 2414 "yacc_sql.cpp" break; - case 86: /* group_by: %empty */ -#line 662 "yacc_sql.y" + case 89: /* group_by: %empty */ +#line 685 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2390 "yacc_sql.cpp" +#line 2422 "yacc_sql.cpp" break; - case 87: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 668 "yacc_sql.y" + case 90: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 691 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2400,20 +2432,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2404 "yacc_sql.cpp" +#line 2436 "yacc_sql.cpp" break; - case 88: /* explain_stmt: EXPLAIN command_wrapper */ -#line 681 "yacc_sql.y" + case 91: /* explain_stmt: EXPLAIN command_wrapper */ +#line 704 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2413 "yacc_sql.cpp" +#line 2445 "yacc_sql.cpp" break; - case 89: /* set_variable_stmt: SET ID EQ value */ -#line 689 "yacc_sql.y" + case 92: /* set_variable_stmt: SET ID EQ value */ +#line 712 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2421,11 +2453,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2425 "yacc_sql.cpp" +#line 2457 "yacc_sql.cpp" break; -#line 2429 "yacc_sql.cpp" +#line 2461 "yacc_sql.cpp" default: break; } @@ -2654,7 +2686,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 701 "yacc_sql.y" +#line 724 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 63a2545b..e10ad32b 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -79,33 +79,36 @@ extern int yydebug; INT_T = 280, /* INT_T */ STRING_T = 281, /* STRING_T */ FLOAT_T = 282, /* FLOAT_T */ - HELP = 283, /* HELP */ - EXIT = 284, /* EXIT */ - DOT = 285, /* DOT */ - INTO = 286, /* INTO */ - VALUES = 287, /* VALUES */ - FROM = 288, /* FROM */ - WHERE = 289, /* WHERE */ - AND = 290, /* AND */ - SET = 291, /* SET */ - ON = 292, /* ON */ - LOAD = 293, /* LOAD */ - DATA = 294, /* DATA */ - INFILE = 295, /* INFILE */ - EXPLAIN = 296, /* EXPLAIN */ - STORAGE = 297, /* STORAGE */ - FORMAT = 298, /* FORMAT */ - EQ = 299, /* EQ */ - LT = 300, /* LT */ - GT = 301, /* GT */ - LE = 302, /* LE */ - GE = 303, /* GE */ - NE = 304, /* NE */ - NUMBER = 305, /* NUMBER */ - FLOAT = 306, /* FLOAT */ - ID = 307, /* ID */ - SSS = 308, /* SSS */ - UMINUS = 309 /* UMINUS */ + NOT = 283, /* NOT */ + NULL_T = 284, /* NULL_T */ + NULLABLE = 285, /* NULLABLE */ + HELP = 286, /* HELP */ + EXIT = 287, /* EXIT */ + DOT = 288, /* DOT */ + INTO = 289, /* INTO */ + VALUES = 290, /* VALUES */ + FROM = 291, /* FROM */ + WHERE = 292, /* WHERE */ + AND = 293, /* AND */ + SET = 294, /* SET */ + ON = 295, /* ON */ + LOAD = 296, /* LOAD */ + DATA = 297, /* DATA */ + INFILE = 298, /* INFILE */ + EXPLAIN = 299, /* EXPLAIN */ + STORAGE = 300, /* STORAGE */ + FORMAT = 301, /* FORMAT */ + EQ = 302, /* EQ */ + LT = 303, /* LT */ + GT = 304, /* GT */ + LE = 305, /* LE */ + GE = 306, /* GE */ + NE = 307, /* NE */ + NUMBER = 308, /* NUMBER */ + FLOAT = 309, /* FLOAT */ + ID = 310, /* ID */ + SSS = 311, /* SSS */ + UMINUS = 312 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -114,7 +117,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 116 "yacc_sql.y" +#line 119 "yacc_sql.y" ParsedSqlNode * sql_node; ConditionSqlNode * condition; @@ -132,8 +135,9 @@ union YYSTYPE char * string; int number; float floats; + bool nullable_info; -#line 137 "yacc_sql.hpp" +#line 141 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 328f775a..83a86f4d 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -89,6 +89,9 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, INT_T STRING_T FLOAT_T + NOT + NULL_T + NULLABLE HELP EXIT DOT //QUOTE @@ -130,6 +133,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, char * string; int number; float floats; + bool nullable_info; } %token NUMBER @@ -146,6 +150,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type relation %type comp_op %type rel_attr +%type nullable_constraint %type attr_def_list %type attr_def %type value_list @@ -336,23 +341,41 @@ attr_def_list: ; attr_def: - ID type LBRACE number RBRACE + ID type LBRACE number RBRACE nullable_constraint { $$ = new AttrInfoSqlNode; $$->type = (AttrType)$2; $$->name = $1; $$->length = $4; + $$->nullable = $6; free($1); } - | ID type + | ID type nullable_constraint { $$ = new AttrInfoSqlNode; $$->type = (AttrType)$2; $$->name = $1; $$->length = 4; + $$->nullable = $3; // 处理NULL/NOT NULL标记 free($1); } ; + +nullable_constraint: + NOT NULL_T + { + $$ = false; // NOT NULL 对应的可空性为 false + } + | NULLABLE + { + $$ = true; // NULLABLE 对应的可空性为 true + } + | /* empty */ + { + $$ = true; // 默认情况为 NOT NULL + } + ; + number: NUMBER {$$ = $1;} ; From a59cf3fdba4b5831d32aa27bb735a02b6422f262 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 25 Sep 2024 23:57:21 +0800 Subject: [PATCH 005/308] =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=A1=A8=E5=85=83?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84nullable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 + src/observer/storage/field/field_meta.cpp | 52 ++++++++++++++--------- src/observer/storage/field/field_meta.h | 10 ++++- src/observer/storage/table/table_meta.cpp | 5 ++- src/observer/storage/trx/mvcc_trx.cpp | 32 +++++++++----- 5 files changed, 66 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82c7d19a..023a2be1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,8 @@ project(minidb) MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) +SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) + SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) diff --git a/src/observer/storage/field/field_meta.cpp b/src/observer/storage/field/field_meta.cpp index 9be3bf2e..93375119 100644 --- a/src/observer/storage/field/field_meta.cpp +++ b/src/observer/storage/field/field_meta.cpp @@ -25,16 +25,17 @@ const static Json::StaticString FIELD_OFFSET("offset"); const static Json::StaticString FIELD_LEN("len"); const static Json::StaticString FIELD_VISIBLE("visible"); const static Json::StaticString FIELD_FIELD_ID("FIELD_id"); +const static Json::StaticString FIELD_NULLABLE("nullable"); FieldMeta::FieldMeta() : attr_type_(AttrType::UNDEFINED), attr_offset_(-1), attr_len_(0), visible_(false), field_id_(0) {} -FieldMeta::FieldMeta(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id) +FieldMeta::FieldMeta(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable) { - [[maybe_unused]] RC rc = this->init(name, attr_type, attr_offset, attr_len, visible, field_id); + [[maybe_unused]] RC rc = this->init(name, attr_type, attr_offset, attr_len, visible, field_id, nullable); ASSERT(rc == RC::SUCCESS, "failed to init field meta. rc=%s", strrc(rc)); } -RC FieldMeta::init(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id) +RC FieldMeta::init(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable) { if (common::is_blank(name)) { LOG_WARN("Name cannot be empty"); @@ -52,7 +53,8 @@ RC FieldMeta::init(const char *name, AttrType attr_type, int attr_offset, int at attr_len_ = attr_len; attr_offset_ = attr_offset; visible_ = visible; - field_id_ = field_id; + field_id_ = field_id; + nullable_ = nullable; LOG_INFO("Init a field with name=%s", name); return RC::SUCCESS; @@ -70,6 +72,8 @@ bool FieldMeta::visible() const { return visible_; } int FieldMeta::field_id() const { return field_id_; } +bool FieldMeta::nullable() const { return nullable_; } + void FieldMeta::desc(std::ostream &os) const { os << "field name=" << name_ << ", type=" << attr_type_to_string(attr_type_) << ", len=" << attr_len_ @@ -78,12 +82,13 @@ void FieldMeta::desc(std::ostream &os) const void FieldMeta::to_json(Json::Value &json_value) const { - json_value[FIELD_NAME] = name_; - json_value[FIELD_TYPE] = attr_type_to_string(attr_type_); - json_value[FIELD_OFFSET] = attr_offset_; - json_value[FIELD_LEN] = attr_len_; - json_value[FIELD_VISIBLE] = visible_; + json_value[FIELD_NAME] = name_; + json_value[FIELD_TYPE] = attr_type_to_string(attr_type_); + json_value[FIELD_OFFSET] = attr_offset_; + json_value[FIELD_LEN] = attr_len_; + json_value[FIELD_VISIBLE] = visible_; json_value[FIELD_FIELD_ID] = field_id_; + json_value[FIELD_NULLABLE] = nullable_; } RC FieldMeta::from_json(const Json::Value &json_value, FieldMeta &field) @@ -93,12 +98,13 @@ RC FieldMeta::from_json(const Json::Value &json_value, FieldMeta &field) return RC::INTERNAL; } - const Json::Value &name_value = json_value[FIELD_NAME]; - const Json::Value &type_value = json_value[FIELD_TYPE]; - const Json::Value &offset_value = json_value[FIELD_OFFSET]; - const Json::Value &len_value = json_value[FIELD_LEN]; - const Json::Value &visible_value = json_value[FIELD_VISIBLE]; + const Json::Value &name_value = json_value[FIELD_NAME]; + const Json::Value &type_value = json_value[FIELD_TYPE]; + const Json::Value &offset_value = json_value[FIELD_OFFSET]; + const Json::Value &len_value = json_value[FIELD_LEN]; + const Json::Value &visible_value = json_value[FIELD_VISIBLE]; const Json::Value &field_id_value = json_value[FIELD_FIELD_ID]; + const Json::Value &nullable_value = json_value[FIELD_NULLABLE]; if (!name_value.isString()) { LOG_ERROR("Field name is not a string. json value=%s", name_value.toStyledString().c_str()); @@ -126,16 +132,22 @@ RC FieldMeta::from_json(const Json::Value &json_value, FieldMeta &field) return RC::INTERNAL; } + if (!nullable_value.isBool()) { + LOG_ERROR("Nullable id is not a bool value. json value=%s", nullable_value.toStyledString().c_str()); + return RC::INTERNAL; + } + AttrType type = attr_type_from_string(type_value.asCString()); if (AttrType::UNDEFINED == type) { LOG_ERROR("Got invalid field type. type=%d", type); return RC::INTERNAL; } - const char *name = name_value.asCString(); - int offset = offset_value.asInt(); - int len = len_value.asInt(); - bool visible = visible_value.asBool(); - int field_id = field_id_value.asInt(); - return field.init(name, type, offset, len, visible, field_id); + const char *name = name_value.asCString(); + int offset = offset_value.asInt(); + int len = len_value.asInt(); + bool visible = visible_value.asBool(); + int field_id = field_id_value.asInt(); + int nullable = nullable_value.asBool(); + return field.init(name, type, offset, len, visible, field_id, nullable); } diff --git a/src/observer/storage/field/field_meta.h b/src/observer/storage/field/field_meta.h index 03e9c797..3c78d03d 100644 --- a/src/observer/storage/field/field_meta.h +++ b/src/observer/storage/field/field_meta.h @@ -30,10 +30,14 @@ class FieldMeta { public: FieldMeta(); - FieldMeta(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id); + + FieldMeta( + const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable); + ~FieldMeta() = default; - RC init(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id); + RC init( + const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable); public: const char *name() const; @@ -42,6 +46,7 @@ class FieldMeta int len() const; bool visible() const; int field_id() const; + bool nullable() const; public: void desc(ostream &os) const; @@ -57,4 +62,5 @@ class FieldMeta int attr_len_; bool visible_; int field_id_; + bool nullable_; }; diff --git a/src/observer/storage/table/table_meta.cpp b/src/observer/storage/table/table_meta.cpp index f87cb894..29a750fe 100644 --- a/src/observer/storage/table/table_meta.cpp +++ b/src/observer/storage/table/table_meta.cpp @@ -67,7 +67,8 @@ RC TableMeta::init(int32_t table_id, const char *name, const std::vectorsize()); for (size_t i = 0; i < trx_fields->size(); i++) { const FieldMeta &field_meta = (*trx_fields)[i]; - fields_[i] = FieldMeta(field_meta.name(), field_meta.type(), field_offset, field_meta.len(), false /*visible*/, field_meta.field_id()); + fields_[i] = FieldMeta(field_meta.name(), field_meta.type(), field_offset, + field_meta.len(), false /*visible*/, field_meta.field_id(), field_meta.nullable()); field_offset += field_meta.len(); } @@ -80,7 +81,7 @@ RC TableMeta::init(int32_t table_id, const char *name, const std::vector{ - // field_id in trx fields is invisible. - FieldMeta("__trx_xid_begin", AttrType::INTS, 0 /*attr_offset*/, 4 /*attr_len*/, false /*visible*/, -1/*field_id*/), - FieldMeta("__trx_xid_end", AttrType::INTS, 0 /*attr_offset*/, 4 /*attr_len*/, false /*visible*/, -2/*field_id*/)}; + fields_ = vector{// field_id in trx fields is invisible. + FieldMeta("__trx_xid_begin", + AttrType::INTS, + 0 /*attr_offset*/, + 4 /*attr_len*/, + false /*visible*/, + -1 /*field_id*/, + false), + FieldMeta("__trx_xid_end", + AttrType::INTS, + 0 /*attr_offset*/, + 4 /*attr_len*/, + false /*visible*/, + -2 /*field_id*/, + false)}; LOG_INFO("init mvcc trx kit done."); return RC::SUCCESS; @@ -113,11 +124,10 @@ LogReplayer *MvccTrxKit::create_log_replayer(Db &db, LogHandler &log_handler) //////////////////////////////////////////////////////////////////////////////// -MvccTrx::MvccTrx(MvccTrxKit &kit, LogHandler &log_handler) : trx_kit_(kit), log_handler_(log_handler) -{} +MvccTrx::MvccTrx(MvccTrxKit &kit, LogHandler &log_handler) : trx_kit_(kit), log_handler_(log_handler) {} -MvccTrx::MvccTrx(MvccTrxKit &kit, LogHandler &log_handler, int32_t trx_id) - : trx_kit_(kit), log_handler_(log_handler), trx_id_(trx_id) +MvccTrx::MvccTrx(MvccTrxKit &kit, LogHandler &log_handler, int32_t trx_id) + : trx_kit_(kit), log_handler_(log_handler), trx_id_(trx_id) { started_ = true; recovering_ = true; @@ -445,9 +455,9 @@ RC find_table(Db *db, const LogEntry &log_entry, Table *&table) RC MvccTrx::redo(Db *db, const LogEntry &log_entry) { - auto *trx_log_header = reinterpret_cast(log_entry.data()); - Table *table = nullptr; - RC rc = find_table(db, log_entry, table); + auto *trx_log_header = reinterpret_cast(log_entry.data()); + Table *table = nullptr; + RC rc = find_table(db, log_entry, table); if (OB_FAIL(rc)) { return rc; } From ad4585ca9c5c52bc6c3eb93185d6a61ef09a6942 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 00:11:14 +0800 Subject: [PATCH 006/308] add test_sql in .gitignore --- .gitignore | 1 + .vscode/launch.json | 29 ----------------------------- .vscode/tasks.json | 32 -------------------------------- sql/test_null.sql | 1 - 4 files changed, 1 insertion(+), 62 deletions(-) delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/tasks.json delete mode 100644 sql/test_null.sql diff --git a/.gitignore b/.gitignore index 1de163bd..f04a2b3d 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,5 @@ GRTAGS GPATH GTAGS docs/book +test_sql #*# diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 18d82e74..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "cppdbg", - "request": "launch", - "name": "Debug", - "program": "${workspaceFolder}/${defaultBuildTask}/bin/observer", - "args": ["-f", "${workspaceFolder}/etc/observer.ini", "-P", "cli"], - "cwd": "${workspaceFolder}/${defaultBuildTask}/", - "internalConsoleOptions": "openOnSessionStart", - "osx": { - "MIMode": "lldb", - "externalConsole":true - } - }, - { - "type": "lldb", - "request": "launch", - "name": "LLDB", - "program": "${workspaceFolder}/${defaultBuildTask}/bin/observer", - "args": ["-f", "${workspaceFolder}/etc/observer.ini", "-P", "cli"], - "cwd": "${workspaceFolder}/${defaultBuildTask}/" - } - ] -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index c64205fa..00000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "label": "init", - "type": "shell", - "command": "sudo -E env PATH=$PATH bash ${workspaceFolder}/build.sh init" - }, - { - "label": "build_debug", - "type": "shell", - "command": "bash build.sh debug", - "problemMatcher": [], - "group": { - "kind": "build", - "isDefault": true - } - }, - { - "label": "build_release", - "type": "shell", - "command": "bash build.sh release" - }, - { - "label": "gen_parser", - "type": "shell", - "command": "cd ${workspaceFolder}/src/observer/sql/parser && bash gen_parser.sh" - } - ] -} diff --git a/sql/test_null.sql b/sql/test_null.sql deleted file mode 100644 index bd19bdc0..00000000 --- a/sql/test_null.sql +++ /dev/null @@ -1 +0,0 @@ -create table t1(a int not null, b char(4) nullable, c float); \ No newline at end of file From 370bf4cd4813880c3b18a25150255d39b90424c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 25 Sep 2024 16:55:43 +0000 Subject: [PATCH 007/308] =?UTF-8?q?=E5=88=9D=E6=AD=A5=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E8=81=9A=E5=90=88=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 1 + src/observer/common/value.h | 3 + src/observer/sql/expr/aggregator.h | 116 +++- src/observer/sql/expr/expression.cpp | 24 +- src/observer/sql/parser/expression_binder.cpp | 23 +- src/observer/sql/parser/lex_sql.cpp | 509 ++++++++------- src/observer/sql/parser/lex_sql.h | 303 +++++++-- src/observer/sql/parser/yacc_sql.cpp | 589 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 11 +- 9 files changed, 982 insertions(+), 597 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f7aeb5f..14824575 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) +SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) diff --git a/src/observer/common/value.h b/src/observer/common/value.h index ebbc70a3..9838da8e 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -89,6 +89,9 @@ class Value final void set_data(const char *data, int length) { this->set_data(const_cast(data), length); } void set_value(const Value &value); void set_boolean(bool val); + void set_null(){} + + bool is_null(){return false;} string to_string() const; diff --git a/src/observer/sql/expr/aggregator.h b/src/observer/sql/expr/aggregator.h index c1af3d65..b7c94b6d 100644 --- a/src/observer/sql/expr/aggregator.h +++ b/src/observer/sql/expr/aggregator.h @@ -34,4 +34,118 @@ class SumAggregator : public Aggregator public: RC accumulate(const Value &value) override; RC evaluate(Value &result) override; -}; \ No newline at end of file +}; + +class CountAggregator : public Aggregator +{ +public: + RC accumulate(const Value &value) override + { + // 只要传入的值类型不为未定义,就增加计数 + if (value.attr_type() != AttrType::UNDEFINED) { + count_++; + } + return RC::SUCCESS; + } + + RC evaluate(Value &result) override + { + result = Value(count_); // 返回计数结果 + return RC::SUCCESS; + } + +private: + int count_ = 0; // 计数器 +}; + +class AvgAggregator : public Aggregator +{ +public: + RC accumulate(const Value &value) override + { + // 类型匹配检查 + if (value_.attr_type() == AttrType::UNDEFINED) { + value_ = value; // 首次赋值 + count_ = 1; + return RC::SUCCESS; + } + + // 累加和计数 + Value::add(value_, value, value_); + count_++; + return RC::SUCCESS; + } + + RC evaluate(Value &result) override + { + if (count_ == 0) { + result = Value(0); // 避免除以零 + } else { + // 计算平均值 + Value avg = value_; + avg = Value(avg.get_float() / count_); // 这里假设 value_ 是 float 类型 + result = avg; + } + return RC::SUCCESS; + } + +private: + Value value_; // 累加的和 + int count_ = 0; // 计数器 +}; + +class MaxAggregator : public Aggregator +{ +public: + RC accumulate(const Value &value) override + { + // 首次赋值 + if (value_.attr_type() == AttrType::UNDEFINED) { + value_ = value; + return RC::SUCCESS; + } + // 更新最大值 + if (value.get_float() > value_.get_float()) { // 假设是 float 类型 + value_ = value; + } + return RC::SUCCESS; + } + + RC evaluate(Value &result) override + { + result = value_; // 返回最大值 + return RC::SUCCESS; + } + +private: + Value value_; // 最大值 +}; + +class MinAggregator : public Aggregator +{ +public: + RC accumulate(const Value &value) override + { + // 首次赋值 + if (value_.attr_type() == AttrType::UNDEFINED) { + value_ = value; + return RC::SUCCESS; + } + + // 更新最小值 + if (value.get_float() < value_.get_float()) { // 假设是 float 类型 + value_ = value; + } + return RC::SUCCESS; + } + + RC evaluate(Value &result) override + { + result = value_; // 返回最小值 + return RC::SUCCESS; + } + +private: + Value value_; // 最小值 +}; + diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 1c1aa48c..cb286a7f 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -91,7 +91,7 @@ RC CastExpr::cast(const Value &value, Value &cast_value) const RC CastExpr::get_value(const Tuple &tuple, Value &result) const { Value value; - RC rc = child_->get_value(tuple, value); + RC rc = child_->get_value(tuple, value); if (rc != RC::SUCCESS) { return rc; } @@ -102,7 +102,7 @@ RC CastExpr::get_value(const Tuple &tuple, Value &result) const RC CastExpr::try_get_value(Value &result) const { Value value; - RC rc = child_->try_get_value(value); + RC rc = child_->try_get_value(value); if (rc != RC::SUCCESS) { return rc; } @@ -154,8 +154,8 @@ RC ComparisonExpr::compare_value(const Value &left, const Value &right, bool &re RC ComparisonExpr::try_get_value(Value &cell) const { if (left_->type() == ExprType::VALUE && right_->type() == ExprType::VALUE) { - ValueExpr * left_value_expr = static_cast(left_.get()); - ValueExpr * right_value_expr = static_cast(right_.get()); + ValueExpr *left_value_expr = static_cast(left_.get()); + ValueExpr *right_value_expr = static_cast(right_.get()); const Value &left_cell = left_value_expr->get_value(); const Value &right_cell = right_value_expr->get_value(); @@ -553,6 +553,22 @@ unique_ptr AggregateExpr::create_aggregator() const aggregator = make_unique(); break; } + case Type::COUNT: { + aggregator = make_unique(); + break; + } + case Type::AVG: { + aggregator = make_unique(); + break; + } + case Type::MAX: { + aggregator = make_unique(); + break; + } + case Type::MIN: { + aggregator = make_unique(); + break; + } default: { ASSERT(false, "unsupported aggregate type"); break; diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 2daf85cf..025c1369 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -89,7 +89,7 @@ RC ExpressionBinder::bind_expression(unique_ptr &expr, vector&)> check_aggregate_expr = [&](unique_ptr &expr) -> RC { + function &)> check_aggregate_expr = [&](unique_ptr &expr) -> RC { RC rc = RC::SUCCESS; if (expr->type() == ExprType::AGGREGATION) { LOG_WARN("aggregate expression cannot be nested"); @@ -408,10 +408,10 @@ RC ExpressionBinder::bind_aggregate_expression( return RC::SUCCESS; } - auto unbound_aggregate_expr = static_cast(expr.get()); - const char *aggregate_name = unbound_aggregate_expr->aggregate_name(); + auto unbound_aggregate_expr = static_cast(expr.get()); + const char *aggregate_name = unbound_aggregate_expr->aggregate_name(); AggregateExpr::Type aggregate_type; - RC rc = AggregateExpr::type_from_string(aggregate_name, aggregate_type); + RC rc = AggregateExpr::type_from_string(aggregate_name, aggregate_type); if (OB_FAIL(rc)) { LOG_WARN("invalid aggregate name: %s", aggregate_name); return rc; @@ -440,7 +440,18 @@ RC ExpressionBinder::bind_aggregate_expression( } auto aggregate_expr = make_unique(aggregate_type, std::move(child_expr)); - aggregate_expr->set_name(unbound_aggregate_expr->name()); + // aggregate_expr->set_name(unbound_aggregate_expr->name()); + // set name 阶段 + string name; + switch (aggregate_type) { + case AggregateExpr::Type::COUNT: name = "COUNT(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::SUM: name = "SUM(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::AVG: name = "AVG(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::MAX: name = "MAX(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::MIN: name = "MIN(" + std::string(aggregate_expr->child()->name()) + ")"; break; + default: name = "UNKNOWN_AGGREGATE"; break; + } + aggregate_expr->set_name(name); rc = check_aggregate_expression(*aggregate_expr); if (OB_FAIL(rc)) { return rc; diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 14ce1bc3..572c854b 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,5 +1,4 @@ #line 2 "lex_sql.cpp" -#line 2 "lex_sql.l" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -23,10 +22,7 @@ do { \ } \ while (0); - - - -#line 30 "lex_sql.cpp" +#line 26 "lex_sql.cpp" #define YY_INT_ALIGNED short int @@ -34,12 +30,36 @@ while (0); #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif +#ifdef yyget_lval +#define yyget_lval_ALREADY_DEFINED +#else +#define yyget_lval yyget_lval +#endif + +#ifdef yyset_lval +#define yyset_lval_ALREADY_DEFINED +#else +#define yyset_lval yyset_lval +#endif + +#ifdef yyget_lloc +#define yyget_lloc_ALREADY_DEFINED +#else +#define yyget_lloc yyget_lloc +#endif + +#ifdef yyset_lloc +#define yyset_lloc_ALREADY_DEFINED +#else +#define yyset_lloc yyset_lloc +#endif + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -80,7 +100,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -111,38 +130,32 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) +#endif /* ! C99 */ -#define YY_USE_CONST +#endif /* ! FLEXINT_H */ -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ +/* begin standard C++ headers. */ -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T @@ -166,25 +179,29 @@ typedef void* yyscan_t; * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * - /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START - /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ,yyscanner ) - +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -196,11 +213,17 @@ typedef void* yyscan_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -215,14 +238,8 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) - #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -235,7 +252,7 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -263,7 +280,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -297,84 +314,77 @@ struct yy_buffer_state #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) - /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void yypop_buffer_state (yyscan_t yyscanner ); - -static void yyensure_buffer_stack (yyscan_t yyscanner ); -static void yy_load_buffer_state (yyscan_t yyscanner ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); -void *yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void yyfree (void * ,yyscan_t yyscanner ); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer - #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } - #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } - #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(n) 1 +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; +typedef flex_uint8_t YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (int) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; - #define YY_NUM_RULES 61 #define YY_END_OF_BUFFER 62 /* This struct is not used in this scanner, @@ -384,7 +394,7 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[183] = +static const flex_int16_t yy_accept[183] = { 0, 0, 0, 0, 0, 62, 60, 1, 2, 60, 60, 60, 44, 45, 56, 54, 46, 55, 6, 57, 3, @@ -408,7 +418,7 @@ static yyconst flex_int16_t yy_accept[183] = 31, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, @@ -440,7 +450,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[67] = +static const YY_CHAR yy_meta[67] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, @@ -451,7 +461,7 @@ static yyconst flex_int32_t yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static yyconst flex_int16_t yy_base[188] = +static const flex_int16_t yy_base[188] = { 0, 0, 0, 0, 0, 484, 485, 485, 485, 465, 477, 475, 485, 485, 485, 485, 485, 465, 485, 485, 54, @@ -475,7 +485,7 @@ static yyconst flex_int16_t yy_base[188] = 69, 485, 473, 475, 477, 76, 75 } ; -static yyconst flex_int16_t yy_def[188] = +static const flex_int16_t yy_def[188] = { 0, 182, 1, 183, 183, 182, 182, 182, 182, 182, 184, 185, 182, 182, 182, 182, 182, 182, 182, 182, 182, @@ -499,7 +509,7 @@ static yyconst flex_int16_t yy_def[188] = 186, 0, 182, 182, 182, 182, 182 } ; -static yyconst flex_int16_t yy_nxt[552] = +static const flex_int16_t yy_nxt[552] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -564,7 +574,7 @@ static yyconst flex_int16_t yy_nxt[552] = 182 } ; -static yyconst flex_int16_t yy_chk[552] = +static const flex_int16_t yy_chk[552] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -661,6 +671,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#line 675 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -669,7 +680,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 673 "lex_sql.cpp" +#line 684 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -724,7 +735,7 @@ struct yyguts_t }; /* end struct yyguts_t */ -static int yy_init_globals (yyscan_t yyscanner ); +static int yy_init_globals ( yyscan_t yyscanner ); /* This must go here because YYSTYPE and YYLTYPE are included * from bison output in section 1.*/ @@ -734,44 +745,48 @@ static int yy_init_globals (yyscan_t yyscanner ); int yylex_init (yyscan_t* scanner); -int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy (yyscan_t yyscanner ); +int yylex_destroy ( yyscan_t yyscanner ); + +int yyget_debug ( yyscan_t yyscanner ); -int yyget_debug (yyscan_t yyscanner ); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -void yyset_debug (int debug_flag ,yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner ); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); +FILE *yyget_in ( yyscan_t yyscanner ); -FILE *yyget_in (yyscan_t yyscanner ); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -void yyset_in (FILE * in_str ,yyscan_t yyscanner ); +FILE *yyget_out ( yyscan_t yyscanner ); -FILE *yyget_out (yyscan_t yyscanner ); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -void yyset_out (FILE * out_str ,yyscan_t yyscanner ); + int yyget_leng ( yyscan_t yyscanner ); -int yyget_leng (yyscan_t yyscanner ); +char *yyget_text ( yyscan_t yyscanner ); -char *yyget_text (yyscan_t yyscanner ); +int yyget_lineno ( yyscan_t yyscanner ); -int yyget_lineno (yyscan_t yyscanner ); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -void yyset_lineno (int line_number ,yyscan_t yyscanner ); +int yyget_column ( yyscan_t yyscanner ); -YYSTYPE * yyget_lval (yyscan_t yyscanner ); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); - YYLTYPE *yyget_lloc (yyscan_t yyscanner ); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -779,33 +794,41 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (yyscan_t yyscanner ); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap (yyscan_t yyscanner ); +extern int yywrap ( yyscan_t yyscanner ); +#endif #endif + +#ifndef YY_NO_UNPUT + #endif #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT - #ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); +static int yyinput ( yyscan_t yyscanner ); #else -static int input (yyscan_t yyscanner ); +static int input ( yyscan_t yyscanner ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -813,7 +836,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -837,7 +860,7 @@ static int input (yyscan_t yyscanner ); else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -879,7 +902,7 @@ static int input (yyscan_t yyscanner ); #define YY_DECL_IS_OURS 1 extern int yylex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); #define YY_DECL int yylex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) @@ -894,7 +917,7 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -904,16 +927,11 @@ extern int yylex \ */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 75 "lex_sql.l" - - -#line 916 "lex_sql.cpp" - yylval = yylval_param; yylloc = yylloc_param; @@ -938,13 +956,19 @@ YY_DECL if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); } - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 75 "lex_sql.l" + + +#line 970 "lex_sql.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; @@ -960,7 +984,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -970,9 +994,9 @@ YY_DECL { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 183 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 485 ); @@ -1298,7 +1322,7 @@ YY_RULE_SETUP #line 142 "lex_sql.l" ECHO; YY_BREAK -#line 1302 "lex_sql.cpp" +#line 1326 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1377,7 +1401,7 @@ case YY_STATE_EOF(STR): { yyg->yy_did_buffer_switch_on_eof = 0; - if ( yywrap(yyscanner ) ) + if ( yywrap( yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -1430,6 +1454,7 @@ case YY_STATE_EOF(STR): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1442,9 +1467,9 @@ case YY_STATE_EOF(STR): static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) @@ -1473,7 +1498,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1493,7 +1518,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); @@ -1509,11 +1534,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -1531,7 +1557,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); + yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -1541,7 +1567,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ,yyscanner); + yyrestart( yyin , yyscanner); } else @@ -1555,12 +1581,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } yyg->yy_n_chars += number_to_move; @@ -1576,15 +1605,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1594,9 +1623,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 183 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; @@ -1609,11 +1638,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - register int yy_is_jam; + int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; + char *yy_cp = yyg->yy_c_buf_p; - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1623,14 +1652,19 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 183 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 182); + (void)yyg; return yy_is_jam ? 0 : yy_current_state; } +#ifndef YY_NO_UNPUT + +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) @@ -1656,7 +1690,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -1673,14 +1707,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ /* Reset buffer status. */ - yyrestart(yyin ,yyscanner); + yyrestart( yyin , yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap(yyscanner ) ) - return EOF; + if ( yywrap( yyscanner ) ) + return 0; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; @@ -1718,11 +1752,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); } - yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - yy_load_buffer_state(yyscanner ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. @@ -1751,7 +1785,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag @@ -1780,7 +1814,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1789,13 +1823,13 @@ static void yy_load_buffer_state (yyscan_t yyscanner) /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer(b,file ,yyscanner); + yy_init_buffer( b, file , yyscanner); return b; } @@ -1815,15 +1849,11 @@ static void yy_load_buffer_state (yyscan_t yyscanner) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ,yyscanner ); + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *) b ,yyscanner ); + yyfree( (void *) b , yyscanner ); } -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. @@ -1834,7 +1864,7 @@ extern int isatty (int ); int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flush_buffer(b ,yyscanner); + yy_flush_buffer( b , yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; @@ -1878,7 +1908,7 @@ extern int isatty (int ); b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -1910,7 +1940,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } @@ -1924,13 +1954,13 @@ void yypop_buffer_state (yyscan_t yyscanner) if (!YY_CURRENT_BUFFER) return; - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } @@ -1940,7 +1970,7 @@ void yypop_buffer_state (yyscan_t yyscanner) */ static void yyensure_buffer_stack (yyscan_t yyscanner) { - int num_to_alloc; + yy_size_t num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { @@ -1949,15 +1979,15 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1966,7 +1996,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc @@ -1986,7 +2016,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { @@ -1996,23 +2026,23 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return 0; + return NULL; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer(b ,yyscanner ); + yy_switch_to_buffer( b , yyscanner ); return b; } @@ -2025,20 +2055,20 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; @@ -2046,8 +2076,8 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ,yyscanner ); + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -2056,7 +2086,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer(buf,n ,yyscanner); + b = yy_scan_buffer( buf, n , yyscanner); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -2072,9 +2102,11 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - (void) fprintf( stderr, "%s\n", msg ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2112,7 +2144,7 @@ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) int yyget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -2125,7 +2157,7 @@ int yyget_lineno (yyscan_t yyscanner) int yyget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -2180,51 +2212,51 @@ void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) } /** Set the current line number. - * @param line_number + * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int line_number , yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner); + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - yylineno = line_number; + yylineno = _line_number; } /** Set the current column. - * @param line_number + * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int column_no , yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "yyset_column called with no buffer" , yyscanner); + YY_FATAL_ERROR( "yyset_column called with no buffer" ); - yycolumn = column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * in_str , yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; + yyin = _in_str ; } -void yyset_out (FILE * out_str , yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; + yyout = _out_str ; } int yyget_debug (yyscan_t yyscanner) @@ -2233,10 +2265,10 @@ int yyget_debug (yyscan_t yyscanner) return yy_flex_debug; } -void yyset_debug (int bdebug , yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ @@ -2271,9 +2303,7 @@ void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ - int yylex_init(yyscan_t* ptr_yy_globals) - { if (ptr_yy_globals == NULL){ errno = EINVAL; @@ -2300,9 +2330,7 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ - -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; @@ -2312,20 +2340,20 @@ int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + yyset_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -2336,10 +2364,10 @@ static int yy_init_globals (yyscan_t yyscanner) * This function is called from yylex_destroy(), so don't allocate here. */ - yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack = NULL; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; + yyg->yy_c_buf_p = NULL; yyg->yy_init = 0; yyg->yy_start = 0; @@ -2352,8 +2380,8 @@ static int yy_init_globals (yyscan_t yyscanner) yyin = stdin; yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -2369,17 +2397,17 @@ int yylex_destroy (yyscan_t yyscanner) /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(yyscanner); } /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack ,yyscanner); + yyfree(yyg->yy_buffer_stack , yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack ,yyscanner ); + yyfree( yyg->yy_start_stack , yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time @@ -2397,18 +2425,21 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - register int i; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -2418,11 +2449,16 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - return (void *) malloc( size ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2430,11 +2466,13 @@ void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } void yyfree (void * ptr , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } @@ -2443,8 +2481,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #line 142 "lex_sql.l" - void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str,scanner),scanner); + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 2862800d..77b26a92 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -3,7 +3,6 @@ #define yyIN_HEADER 1 #line 6 "lex_sql.h" -#line 2 "lex_sql.l" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -27,10 +26,7 @@ do { \ } \ while (0); - - - -#line 34 "lex_sql.h" +#line 30 "lex_sql.h" #define YY_INT_ALIGNED short int @@ -38,12 +34,36 @@ while (0); #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif +#ifdef yyget_lval +#define yyget_lval_ALREADY_DEFINED +#else +#define yyget_lval yyget_lval +#endif + +#ifdef yyset_lval +#define yyset_lval_ALREADY_DEFINED +#else +#define yyset_lval yyset_lval +#endif + +#ifdef yyget_lloc +#define yyget_lloc_ALREADY_DEFINED +#else +#define yyget_lloc yyget_lloc +#endif + +#ifdef yyset_lloc +#define yyset_lloc_ALREADY_DEFINED +#else +#define yyset_lloc yyset_lloc +#endif + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -84,7 +104,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -115,27 +134,23 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) +#endif /* ! C99 */ -#define YY_USE_CONST +#endif /* ! FLEXINT_H */ -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ +/* begin standard C++ headers. */ -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* An opaque pointer. */ @@ -157,7 +172,15 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE @@ -182,7 +205,7 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -210,7 +233,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -221,25 +244,25 @@ struct yy_buffer_state }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void yypop_buffer_state (yyscan_t yyscanner ); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); -void *yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void yyfree (void * ,yyscan_t yyscanner ); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(n) 1 +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -264,44 +287,48 @@ void yyfree (void * ,yyscan_t yyscanner ); int yylex_init (yyscan_t* scanner); -int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy (yyscan_t yyscanner ); +int yylex_destroy ( yyscan_t yyscanner ); + +int yyget_debug ( yyscan_t yyscanner ); + +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -int yyget_debug (yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_debug (int debug_flag ,yyscan_t yyscanner ); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner ); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_in (yyscan_t yyscanner ); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_in (FILE * in_str ,yyscan_t yyscanner ); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -FILE *yyget_out (yyscan_t yyscanner ); + int yyget_leng ( yyscan_t yyscanner ); -void yyset_out (FILE * out_str ,yyscan_t yyscanner ); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_leng (yyscan_t yyscanner ); +int yyget_lineno ( yyscan_t yyscanner ); -char *yyget_text (yyscan_t yyscanner ); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_lineno (yyscan_t yyscanner ); +int yyget_column ( yyscan_t yyscanner ); -void yyset_lineno (int line_number ,yyscan_t yyscanner ); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE * yyget_lval (yyscan_t yyscanner ); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); - YYLTYPE *yyget_lloc (yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -309,18 +336,18 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (yyscan_t yyscanner ); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap (yyscan_t yyscanner ); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -329,7 +356,12 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Number of entries by which start-condition stack grows. */ @@ -344,7 +376,7 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #define YY_DECL_IS_OURS 1 extern int yylex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); #define YY_DECL int yylex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) @@ -364,9 +396,154 @@ extern int yylex \ #undef YY_DECL #endif +#ifndef yy_create_buffer_ALREADY_DEFINED +#undef yy_create_buffer +#endif +#ifndef yy_delete_buffer_ALREADY_DEFINED +#undef yy_delete_buffer +#endif +#ifndef yy_scan_buffer_ALREADY_DEFINED +#undef yy_scan_buffer +#endif +#ifndef yy_scan_string_ALREADY_DEFINED +#undef yy_scan_string +#endif +#ifndef yy_scan_bytes_ALREADY_DEFINED +#undef yy_scan_bytes +#endif +#ifndef yy_init_buffer_ALREADY_DEFINED +#undef yy_init_buffer +#endif +#ifndef yy_flush_buffer_ALREADY_DEFINED +#undef yy_flush_buffer +#endif +#ifndef yy_load_buffer_state_ALREADY_DEFINED +#undef yy_load_buffer_state +#endif +#ifndef yy_switch_to_buffer_ALREADY_DEFINED +#undef yy_switch_to_buffer +#endif +#ifndef yypush_buffer_state_ALREADY_DEFINED +#undef yypush_buffer_state +#endif +#ifndef yypop_buffer_state_ALREADY_DEFINED +#undef yypop_buffer_state +#endif +#ifndef yyensure_buffer_stack_ALREADY_DEFINED +#undef yyensure_buffer_stack +#endif +#ifndef yylex_ALREADY_DEFINED +#undef yylex +#endif +#ifndef yyrestart_ALREADY_DEFINED +#undef yyrestart +#endif +#ifndef yylex_init_ALREADY_DEFINED +#undef yylex_init +#endif +#ifndef yylex_init_extra_ALREADY_DEFINED +#undef yylex_init_extra +#endif +#ifndef yylex_destroy_ALREADY_DEFINED +#undef yylex_destroy +#endif +#ifndef yyget_debug_ALREADY_DEFINED +#undef yyget_debug +#endif +#ifndef yyset_debug_ALREADY_DEFINED +#undef yyset_debug +#endif +#ifndef yyget_extra_ALREADY_DEFINED +#undef yyget_extra +#endif +#ifndef yyset_extra_ALREADY_DEFINED +#undef yyset_extra +#endif +#ifndef yyget_in_ALREADY_DEFINED +#undef yyget_in +#endif +#ifndef yyset_in_ALREADY_DEFINED +#undef yyset_in +#endif +#ifndef yyget_out_ALREADY_DEFINED +#undef yyget_out +#endif +#ifndef yyset_out_ALREADY_DEFINED +#undef yyset_out +#endif +#ifndef yyget_leng_ALREADY_DEFINED +#undef yyget_leng +#endif +#ifndef yyget_text_ALREADY_DEFINED +#undef yyget_text +#endif +#ifndef yyget_lineno_ALREADY_DEFINED +#undef yyget_lineno +#endif +#ifndef yyset_lineno_ALREADY_DEFINED +#undef yyset_lineno +#endif +#ifndef yyget_column_ALREADY_DEFINED +#undef yyget_column +#endif +#ifndef yyset_column_ALREADY_DEFINED +#undef yyset_column +#endif +#ifndef yywrap_ALREADY_DEFINED +#undef yywrap +#endif +#ifndef yyget_lval_ALREADY_DEFINED +#undef yyget_lval +#endif +#ifndef yyset_lval_ALREADY_DEFINED +#undef yyset_lval +#endif +#ifndef yyget_lloc_ALREADY_DEFINED +#undef yyget_lloc +#endif +#ifndef yyset_lloc_ALREADY_DEFINED +#undef yyset_lloc +#endif +#ifndef yyalloc_ALREADY_DEFINED +#undef yyalloc +#endif +#ifndef yyrealloc_ALREADY_DEFINED +#undef yyrealloc +#endif +#ifndef yyfree_ALREADY_DEFINED +#undef yyfree +#endif +#ifndef yytext_ALREADY_DEFINED +#undef yytext +#endif +#ifndef yyleng_ALREADY_DEFINED +#undef yyleng +#endif +#ifndef yyin_ALREADY_DEFINED +#undef yyin +#endif +#ifndef yyout_ALREADY_DEFINED +#undef yyout +#endif +#ifndef yy_flex_debug_ALREADY_DEFINED +#undef yy_flex_debug +#endif +#ifndef yylineno_ALREADY_DEFINED +#undef yylineno +#endif +#ifndef yytables_fload_ALREADY_DEFINED +#undef yytables_fload +#endif +#ifndef yytables_destroy_ALREADY_DEFINED +#undef yytables_destroy +#endif +#ifndef yyTABLES_NAME_ALREADY_DEFINED +#undef yyTABLES_NAME +#endif + #line 142 "lex_sql.l" -#line 371 "lex_sql.h" +#line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 87e43288..ecbd7019 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -237,18 +237,19 @@ enum yysymbol_kind_t YYSYMBOL_calc_stmt = 85, /* calc_stmt */ YYSYMBOL_expression_list = 86, /* expression_list */ YYSYMBOL_expression = 87, /* expression */ - YYSYMBOL_rel_attr = 88, /* rel_attr */ - YYSYMBOL_relation = 89, /* relation */ - YYSYMBOL_rel_list = 90, /* rel_list */ - YYSYMBOL_where = 91, /* where */ - YYSYMBOL_condition_list = 92, /* condition_list */ - YYSYMBOL_condition = 93, /* condition */ - YYSYMBOL_comp_op = 94, /* comp_op */ - YYSYMBOL_group_by = 95, /* group_by */ - YYSYMBOL_load_data_stmt = 96, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 97, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 98, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 99 /* opt_semicolon */ + YYSYMBOL_aggr_func_expr = 88, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 89, /* rel_attr */ + YYSYMBOL_relation = 90, /* relation */ + YYSYMBOL_rel_list = 91, /* rel_list */ + YYSYMBOL_where = 92, /* where */ + YYSYMBOL_condition_list = 93, /* condition_list */ + YYSYMBOL_condition = 94, /* condition */ + YYSYMBOL_comp_op = 95, /* comp_op */ + YYSYMBOL_group_by = 96, /* group_by */ + YYSYMBOL_load_data_stmt = 97, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 98, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 99, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 100 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -577,18 +578,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 65 +#define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 140 +#define YYLAST 146 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 59 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 41 +#define YYNNTS 42 /* YYNRULES -- Number of rules. */ -#define YYNRULES 91 +#define YYNRULES 93 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 165 +#define YYNSTATES 170 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 309 @@ -642,16 +643,16 @@ static const yytype_int8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 188, 188, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 219, 225, 230, 236, 242, 248, 254, - 261, 267, 275, 289, 299, 323, 326, 339, 347, 357, - 360, 361, 362, 365, 382, 385, 396, 400, 404, 413, - 416, 423, 435, 450, 475, 484, 489, 500, 503, 506, - 509, 512, 516, 519, 524, 530, 537, 542, 552, 557, - 562, 576, 579, 585, 588, 593, 600, 612, 624, 636, - 651, 652, 653, 654, 655, 656, 662, 667, 680, 688, - 698, 699 + 0, 189, 189, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 220, 226, 231, 237, 243, 249, 255, + 262, 268, 276, 290, 300, 324, 327, 340, 348, 358, + 361, 362, 363, 366, 383, 386, 397, 401, 405, 414, + 417, 424, 436, 451, 476, 485, 490, 501, 504, 507, + 510, 513, 517, 520, 525, 531, 534, 540, 546, 551, + 561, 566, 571, 585, 588, 594, 597, 602, 609, 621, + 633, 645, 660, 661, 662, 663, 664, 665, 671, 676, + 689, 697, 707, 708 }; #endif @@ -681,9 +682,9 @@ static const char *const yytname[] = "create_table_stmt", "attr_def_list", "attr_def", "number", "type", "insert_stmt", "value_list", "value", "storage_format", "delete_stmt", "update_stmt", "select_stmt", "calc_stmt", "expression_list", - "expression", "rel_attr", "relation", "rel_list", "where", - "condition_list", "condition", "comp_op", "group_by", "load_data_stmt", - "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR + "expression", "aggr_func_expr", "rel_attr", "relation", "rel_list", + "where", "condition_list", "condition", "comp_op", "group_by", + "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; static const char * @@ -693,7 +694,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-97) +#define YYPACT_NINF (-101) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -707,23 +708,23 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 50, 10, 11, -16, -16, -30, 2, -97, -5, -6, - -23, -97, -97, -97, -97, -97, -22, -7, 50, 31, - 35, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -2, 17, 24, 37, -16, -97, -97, 47, -97, - -16, -97, -97, -97, -8, -97, 21, -97, -97, 38, - 40, 51, 49, 54, -97, -97, -97, -97, 76, 59, - -97, 60, -12, 46, -97, -16, -16, -16, -16, -16, - 48, 67, 71, 55, -41, 53, 56, 57, 58, -97, - -97, -97, -32, -32, -97, -97, -97, 90, 71, 93, - -46, -97, 69, -97, 83, -11, 94, 97, -97, 48, - -97, -41, 36, 36, -97, 82, -41, 110, -97, -97, - -97, 100, 56, 101, 68, -97, -97, 102, -97, -97, - -97, -97, -97, -97, -46, -46, -46, 71, 70, 74, - 94, 84, 105, -41, 107, -97, -97, -97, -97, -97, - -97, -97, -97, 108, -97, 86, -97, -97, 102, -97, - -97, 87, -97, 78, -97 + 64, 4, 18, -6, -6, -41, 20, -101, 6, 2, + -14, -101, -101, -101, -101, -101, -10, 9, 64, 51, + 49, -101, -101, -101, -101, -101, -101, -101, -101, -101, + -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, + -101, 1, 10, 12, 19, -6, -101, -101, -15, -101, + -6, -101, -101, -101, 40, -101, -101, 41, -101, -101, + 31, 33, 36, 46, 58, -101, -101, -101, -101, 72, + 62, -101, 66, 3, -6, 52, -101, -6, -6, -6, + -6, -6, 54, 69, 73, 56, -26, 57, 59, 60, + 63, -101, 11, -101, -101, -40, -40, -101, -101, -101, + 88, 73, 95, -31, -101, 77, -101, 85, 7, 101, + 104, -101, -101, 54, -101, -26, 94, -39, -39, -101, + 90, -26, 118, -101, -101, -101, 108, 59, 109, 76, + -101, -101, 110, -101, -101, -101, -101, -101, -101, -31, + -31, -31, 73, 78, 82, 101, 91, 114, -26, 115, + -101, -101, -101, -101, -101, -101, -101, -101, 116, -101, + 96, -101, -101, 110, -101, -101, 93, -101, 86, -101 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -733,41 +734,41 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 90, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 92, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 46, 47, 66, 48, - 0, 65, 63, 54, 55, 64, 0, 31, 30, 0, - 0, 0, 0, 0, 88, 1, 91, 2, 0, 0, - 29, 0, 0, 0, 62, 0, 0, 0, 0, 0, - 0, 0, 71, 0, 0, 0, 0, 0, 0, 61, - 67, 56, 57, 58, 59, 60, 68, 69, 71, 0, - 73, 51, 0, 89, 0, 0, 35, 0, 33, 0, - 86, 0, 0, 0, 72, 74, 0, 0, 40, 41, - 42, 38, 0, 0, 0, 70, 53, 44, 80, 81, - 82, 83, 84, 85, 0, 0, 73, 71, 0, 0, - 35, 49, 0, 0, 0, 77, 79, 76, 78, 75, - 52, 87, 39, 0, 36, 0, 34, 32, 44, 43, - 37, 0, 45, 0, 50 + 20, 0, 0, 0, 0, 0, 46, 47, 68, 48, + 0, 65, 63, 54, 55, 66, 64, 0, 31, 30, + 0, 0, 0, 0, 0, 90, 1, 93, 2, 0, + 0, 29, 0, 0, 0, 0, 62, 0, 0, 0, + 0, 0, 0, 0, 73, 0, 0, 0, 0, 0, + 0, 61, 0, 69, 56, 57, 58, 59, 60, 70, + 71, 73, 0, 75, 51, 0, 91, 0, 0, 35, + 0, 33, 67, 0, 88, 0, 68, 0, 0, 74, + 76, 0, 0, 40, 41, 42, 38, 0, 0, 0, + 72, 53, 44, 82, 83, 84, 85, 86, 87, 0, + 0, 75, 73, 0, 0, 35, 49, 0, 0, 0, + 79, 81, 78, 80, 77, 52, 89, 39, 0, 36, + 0, 34, 32, 44, 43, 37, 0, 45, 0, 50 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -97, -97, 114, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -3, 12, -97, -97, -97, - -25, -83, -97, -97, -97, -97, -97, -4, 25, -77, - -97, 26, -96, 0, -97, 27, -97, -97, -97, -97, - -97 + -101, -101, 122, -101, -101, -101, -101, -101, -101, -101, + -101, -101, -101, -101, -101, -3, 14, -101, -101, -101, + -20, -85, -101, -101, -101, -101, -101, -4, 39, -101, + -100, -101, 32, -99, 5, -101, 26, -101, -101, -101, + -101, -101 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 123, 106, 153, 121, 33, - 144, 52, 156, 34, 35, 36, 37, 53, 54, 55, - 97, 98, 101, 114, 115, 134, 126, 38, 39, 40, - 67 + 28, 29, 30, 31, 32, 128, 109, 158, 126, 33, + 149, 52, 161, 34, 35, 36, 37, 53, 54, 55, + 56, 100, 101, 104, 119, 120, 139, 131, 38, 39, + 40, 68 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -775,40 +776,40 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 56, 103, 110, 45, 46, 47, 48, 49, 89, 46, - 47, 58, 49, 75, 118, 119, 120, 112, 41, 43, - 42, 44, 57, 113, 78, 79, 59, 60, 127, 61, - 62, 65, 63, 137, 46, 47, 48, 49, 66, 50, - 51, 150, 76, 77, 78, 79, 76, 77, 78, 79, - 68, 145, 147, 112, 80, 1, 2, 146, 148, 113, - 158, 3, 4, 5, 6, 7, 8, 9, 10, 69, - 72, 91, 11, 12, 13, 74, 70, 73, 14, 15, - 128, 129, 130, 131, 132, 133, 16, 83, 17, 71, - 81, 18, 82, 84, 85, 86, 87, 88, 90, 99, - 96, 92, 93, 94, 95, 100, 104, 102, 105, 107, - 108, 109, 111, 116, 117, 122, 124, 136, 138, 139, - 142, 141, 151, 143, 152, 157, 155, 159, 160, 161, - 164, 163, 64, 162, 140, 125, 149, 154, 0, 0, - 135 + 57, 106, 114, 118, 74, 133, 134, 135, 136, 137, + 138, 58, 41, 45, 42, 75, 80, 81, 117, 46, + 47, 116, 49, 91, 46, 47, 43, 49, 44, 59, + 132, 112, 123, 124, 125, 61, 142, 60, 62, 151, + 153, 118, 63, 155, 46, 47, 48, 49, 64, 50, + 51, 66, 67, 69, 150, 152, 117, 78, 79, 80, + 81, 77, 70, 163, 71, 78, 79, 80, 81, 1, + 2, 72, 85, 94, 82, 3, 4, 5, 6, 7, + 8, 9, 10, 83, 73, 84, 11, 12, 13, 76, + 86, 88, 14, 15, 78, 79, 80, 81, 87, 89, + 16, 102, 17, 90, 93, 18, 99, 103, 105, 113, + 107, 108, 110, 92, 115, 111, 122, 95, 96, 97, + 98, 121, 127, 129, 75, 141, 143, 144, 147, 146, + 156, 148, 157, 160, 162, 164, 165, 168, 169, 166, + 65, 145, 159, 167, 140, 130, 154 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { - 4, 84, 98, 19, 50, 51, 52, 53, 20, 50, - 51, 9, 53, 21, 25, 26, 27, 100, 8, 8, - 10, 10, 52, 100, 56, 57, 31, 33, 111, 52, - 52, 0, 39, 116, 50, 51, 52, 53, 3, 55, - 56, 137, 54, 55, 56, 57, 54, 55, 56, 57, - 52, 134, 135, 136, 33, 5, 6, 134, 135, 136, - 143, 11, 12, 13, 14, 15, 16, 17, 18, 52, - 45, 75, 22, 23, 24, 50, 52, 30, 28, 29, - 44, 45, 46, 47, 48, 49, 36, 36, 38, 52, - 52, 41, 52, 44, 40, 19, 37, 37, 52, 32, - 52, 76, 77, 78, 79, 34, 53, 52, 52, 52, - 52, 21, 19, 44, 31, 21, 19, 35, 8, 19, - 52, 20, 52, 21, 50, 20, 42, 20, 20, 43, - 52, 44, 18, 158, 122, 109, 136, 140, -1, -1, - 113 + 4, 86, 101, 103, 19, 44, 45, 46, 47, 48, + 49, 52, 8, 19, 10, 30, 56, 57, 103, 50, + 51, 52, 53, 20, 50, 51, 8, 53, 10, 9, + 115, 20, 25, 26, 27, 33, 121, 31, 52, 139, + 140, 141, 52, 142, 50, 51, 52, 53, 39, 55, + 56, 0, 3, 52, 139, 140, 141, 54, 55, 56, + 57, 21, 52, 148, 52, 54, 55, 56, 57, 5, + 6, 52, 36, 77, 33, 11, 12, 13, 14, 15, + 16, 17, 18, 52, 45, 52, 22, 23, 24, 50, + 44, 19, 28, 29, 54, 55, 56, 57, 40, 37, + 36, 32, 38, 37, 52, 41, 52, 34, 52, 21, + 53, 52, 52, 74, 19, 52, 31, 78, 79, 80, + 81, 44, 21, 19, 30, 35, 8, 19, 52, 20, + 52, 21, 50, 42, 20, 20, 20, 44, 52, 43, + 18, 127, 145, 163, 118, 113, 141 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -818,20 +819,20 @@ static const yytype_int8 yystos[] = 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 28, 29, 36, 38, 41, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 78, 82, 83, 84, 85, 96, 97, - 98, 8, 10, 8, 10, 19, 50, 51, 52, 53, - 55, 56, 80, 86, 87, 88, 86, 52, 9, 31, - 33, 52, 52, 39, 61, 0, 3, 99, 52, 52, - 52, 52, 87, 30, 87, 21, 54, 55, 56, 57, - 33, 52, 52, 36, 44, 40, 19, 37, 37, 20, - 52, 86, 87, 87, 87, 87, 52, 89, 90, 32, - 34, 91, 52, 80, 53, 52, 75, 52, 52, 21, - 91, 19, 80, 88, 92, 93, 44, 31, 25, 26, - 27, 77, 21, 74, 19, 90, 95, 80, 44, 45, - 46, 47, 48, 49, 94, 94, 35, 80, 8, 19, - 75, 20, 52, 21, 79, 80, 88, 80, 88, 92, - 91, 52, 50, 76, 74, 42, 81, 20, 80, 20, - 20, 43, 79, 44, 52 + 71, 72, 73, 78, 82, 83, 84, 85, 97, 98, + 99, 8, 10, 8, 10, 19, 50, 51, 52, 53, + 55, 56, 80, 86, 87, 88, 89, 86, 52, 9, + 31, 33, 52, 52, 39, 61, 0, 3, 100, 52, + 52, 52, 52, 87, 19, 30, 87, 21, 54, 55, + 56, 57, 33, 52, 52, 36, 44, 40, 19, 37, + 37, 20, 87, 52, 86, 87, 87, 87, 87, 52, + 90, 91, 32, 34, 92, 52, 80, 53, 52, 75, + 52, 52, 20, 21, 92, 19, 52, 80, 89, 93, + 94, 44, 31, 25, 26, 27, 77, 21, 74, 19, + 91, 96, 80, 44, 45, 46, 47, 48, 49, 95, + 95, 35, 80, 8, 19, 75, 20, 52, 21, 79, + 80, 89, 80, 89, 93, 92, 52, 50, 76, 74, + 42, 81, 20, 80, 20, 20, 43, 79, 44, 52 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -843,10 +844,10 @@ static const yytype_int8 yyr1[] = 69, 70, 71, 72, 73, 74, 74, 75, 75, 76, 77, 77, 77, 78, 79, 79, 80, 80, 80, 81, 81, 82, 83, 84, 85, 86, 86, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 88, 88, 89, 90, - 90, 91, 91, 92, 92, 92, 93, 93, 93, 93, - 94, 94, 94, 94, 94, 94, 95, 96, 97, 98, - 99, 99 + 87, 87, 87, 87, 87, 87, 87, 88, 89, 89, + 90, 91, 91, 92, 92, 93, 93, 93, 94, 94, + 94, 94, 95, 95, 95, 95, 95, 95, 96, 97, + 98, 99, 100, 100 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -858,10 +859,10 @@ static const yytype_int8 yyr2[] = 2, 2, 8, 5, 8, 0, 3, 5, 2, 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, 0, 4, 4, 7, 6, 2, 1, 3, 3, 3, 3, - 3, 3, 2, 1, 1, 1, 1, 3, 1, 1, - 3, 0, 2, 0, 1, 3, 3, 3, 3, 3, - 1, 1, 1, 1, 1, 1, 0, 7, 2, 4, - 0, 1 + 3, 3, 2, 1, 1, 1, 1, 4, 1, 3, + 1, 1, 3, 0, 2, 0, 1, 3, 3, 3, + 3, 3, 1, 1, 1, 1, 1, 1, 0, 7, + 2, 4, 0, 1 }; @@ -1723,93 +1724,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 189 "yacc_sql.y" +#line 190 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1732 "yacc_sql.cpp" +#line 1733 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 219 "yacc_sql.y" +#line 220 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1741 "yacc_sql.cpp" +#line 1742 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 225 "yacc_sql.y" +#line 226 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1749 "yacc_sql.cpp" +#line 1750 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 230 "yacc_sql.y" +#line 231 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1757 "yacc_sql.cpp" +#line 1758 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 236 "yacc_sql.y" +#line 237 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1765 "yacc_sql.cpp" +#line 1766 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 242 "yacc_sql.y" +#line 243 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1773 "yacc_sql.cpp" +#line 1774 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 248 "yacc_sql.y" +#line 249 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1781 "yacc_sql.cpp" +#line 1782 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 254 "yacc_sql.y" +#line 255 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1791 "yacc_sql.cpp" +#line 1792 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 261 "yacc_sql.y" +#line 262 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1799 "yacc_sql.cpp" +#line 1800 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 267 "yacc_sql.y" +#line 268 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1809 "yacc_sql.cpp" +#line 1810 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 276 "yacc_sql.y" +#line 277 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1820,11 +1821,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1824 "yacc_sql.cpp" +#line 1825 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 290 "yacc_sql.y" +#line 291 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1832,11 +1833,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1836 "yacc_sql.cpp" +#line 1837 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 300 "yacc_sql.y" +#line 301 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1857,19 +1858,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1861 "yacc_sql.cpp" +#line 1862 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 323 "yacc_sql.y" +#line 324 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1869 "yacc_sql.cpp" +#line 1870 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 327 "yacc_sql.y" +#line 328 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1879,11 +1880,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1883 "yacc_sql.cpp" +#line 1884 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE */ -#line 340 "yacc_sql.y" +#line 341 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-3].number); @@ -1891,11 +1892,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = (yyvsp[-1].number); free((yyvsp[-4].string)); } -#line 1895 "yacc_sql.cpp" +#line 1896 "yacc_sql.cpp" break; case 38: /* attr_def: ID type */ -#line 348 "yacc_sql.y" +#line 349 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[0].number); @@ -1903,35 +1904,35 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; free((yyvsp[-1].string)); } -#line 1907 "yacc_sql.cpp" +#line 1908 "yacc_sql.cpp" break; case 39: /* number: NUMBER */ -#line 357 "yacc_sql.y" +#line 358 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1913 "yacc_sql.cpp" +#line 1914 "yacc_sql.cpp" break; case 40: /* type: INT_T */ -#line 360 "yacc_sql.y" +#line 361 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1919 "yacc_sql.cpp" +#line 1920 "yacc_sql.cpp" break; case 41: /* type: STRING_T */ -#line 361 "yacc_sql.y" +#line 362 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1925 "yacc_sql.cpp" +#line 1926 "yacc_sql.cpp" break; case 42: /* type: FLOAT_T */ -#line 362 "yacc_sql.y" +#line 363 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1931 "yacc_sql.cpp" +#line 1932 "yacc_sql.cpp" break; case 43: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 366 "yacc_sql.y" +#line 367 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1944,19 +1945,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1948 "yacc_sql.cpp" +#line 1949 "yacc_sql.cpp" break; case 44: /* value_list: %empty */ -#line 382 "yacc_sql.y" +#line 383 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 1956 "yacc_sql.cpp" +#line 1957 "yacc_sql.cpp" break; case 45: /* value_list: COMMA value value_list */ -#line 385 "yacc_sql.y" +#line 386 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -1966,56 +1967,56 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1970 "yacc_sql.cpp" +#line 1971 "yacc_sql.cpp" break; case 46: /* value: NUMBER */ -#line 396 "yacc_sql.y" +#line 397 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 1979 "yacc_sql.cpp" +#line 1980 "yacc_sql.cpp" break; case 47: /* value: FLOAT */ -#line 400 "yacc_sql.y" +#line 401 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 1988 "yacc_sql.cpp" +#line 1989 "yacc_sql.cpp" break; case 48: /* value: SSS */ -#line 404 "yacc_sql.y" +#line 405 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 1999 "yacc_sql.cpp" +#line 2000 "yacc_sql.cpp" break; case 49: /* storage_format: %empty */ -#line 413 "yacc_sql.y" +#line 414 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2007 "yacc_sql.cpp" +#line 2008 "yacc_sql.cpp" break; case 50: /* storage_format: STORAGE FORMAT EQ ID */ -#line 417 "yacc_sql.y" +#line 418 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2015 "yacc_sql.cpp" +#line 2016 "yacc_sql.cpp" break; case 51: /* delete_stmt: DELETE FROM ID where */ -#line 424 "yacc_sql.y" +#line 425 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2025,11 +2026,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2029 "yacc_sql.cpp" +#line 2030 "yacc_sql.cpp" break; case 52: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 436 "yacc_sql.y" +#line 437 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2042,11 +2043,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2046 "yacc_sql.cpp" +#line 2047 "yacc_sql.cpp" break; case 53: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 451 "yacc_sql.y" +#line 452 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2069,30 +2070,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2073 "yacc_sql.cpp" +#line 2074 "yacc_sql.cpp" break; case 54: /* calc_stmt: CALC expression_list */ -#line 476 "yacc_sql.y" +#line 477 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2083 "yacc_sql.cpp" +#line 2084 "yacc_sql.cpp" break; case 55: /* expression_list: expression */ -#line 485 "yacc_sql.y" +#line 486 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2092 "yacc_sql.cpp" +#line 2093 "yacc_sql.cpp" break; case 56: /* expression_list: expression COMMA expression_list */ -#line 490 "yacc_sql.y" +#line 491 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2101,99 +2102,115 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2105 "yacc_sql.cpp" +#line 2106 "yacc_sql.cpp" break; case 57: /* expression: expression '+' expression */ -#line 500 "yacc_sql.y" +#line 501 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2113 "yacc_sql.cpp" +#line 2114 "yacc_sql.cpp" break; case 58: /* expression: expression '-' expression */ -#line 503 "yacc_sql.y" +#line 504 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2121 "yacc_sql.cpp" +#line 2122 "yacc_sql.cpp" break; case 59: /* expression: expression '*' expression */ -#line 506 "yacc_sql.y" +#line 507 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2129 "yacc_sql.cpp" +#line 2130 "yacc_sql.cpp" break; case 60: /* expression: expression '/' expression */ -#line 509 "yacc_sql.y" +#line 510 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2137 "yacc_sql.cpp" +#line 2138 "yacc_sql.cpp" break; case 61: /* expression: LBRACE expression RBRACE */ -#line 512 "yacc_sql.y" +#line 513 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2146 "yacc_sql.cpp" +#line 2147 "yacc_sql.cpp" break; case 62: /* expression: '-' expression */ -#line 516 "yacc_sql.y" +#line 517 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2154 "yacc_sql.cpp" +#line 2155 "yacc_sql.cpp" break; case 63: /* expression: value */ -#line 519 "yacc_sql.y" +#line 520 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2164 "yacc_sql.cpp" +#line 2165 "yacc_sql.cpp" break; case 64: /* expression: rel_attr */ -#line 524 "yacc_sql.y" +#line 525 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2175 "yacc_sql.cpp" +#line 2176 "yacc_sql.cpp" break; case 65: /* expression: '*' */ -#line 530 "yacc_sql.y" +#line 531 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2183 "yacc_sql.cpp" +#line 2184 "yacc_sql.cpp" break; - case 66: /* rel_attr: ID */ -#line 537 "yacc_sql.y" + case 66: /* expression: aggr_func_expr */ +#line 534 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + } +#line 2192 "yacc_sql.cpp" + break; + + case 67: /* aggr_func_expr: ID LBRACE expression RBRACE */ +#line 541 "yacc_sql.y" + { + (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), (yyvsp[-1].expression)); + } +#line 2200 "yacc_sql.cpp" + break; + + case 68: /* rel_attr: ID */ +#line 546 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2193 "yacc_sql.cpp" +#line 2210 "yacc_sql.cpp" break; - case 67: /* rel_attr: ID DOT ID */ -#line 542 "yacc_sql.y" + case 69: /* rel_attr: ID DOT ID */ +#line 551 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2201,29 +2218,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2205 "yacc_sql.cpp" +#line 2222 "yacc_sql.cpp" break; - case 68: /* relation: ID */ -#line 552 "yacc_sql.y" + case 70: /* relation: ID */ +#line 561 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2213 "yacc_sql.cpp" +#line 2230 "yacc_sql.cpp" break; - case 69: /* rel_list: relation */ -#line 557 "yacc_sql.y" + case 71: /* rel_list: relation */ +#line 566 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2223 "yacc_sql.cpp" +#line 2240 "yacc_sql.cpp" break; - case 70: /* rel_list: relation COMMA rel_list */ -#line 562 "yacc_sql.y" + case 72: /* rel_list: relation COMMA rel_list */ +#line 571 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2234,55 +2251,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2238 "yacc_sql.cpp" +#line 2255 "yacc_sql.cpp" break; - case 71: /* where: %empty */ -#line 576 "yacc_sql.y" + case 73: /* where: %empty */ +#line 585 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2246 "yacc_sql.cpp" +#line 2263 "yacc_sql.cpp" break; - case 72: /* where: WHERE condition_list */ -#line 579 "yacc_sql.y" + case 74: /* where: WHERE condition_list */ +#line 588 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2254 "yacc_sql.cpp" +#line 2271 "yacc_sql.cpp" break; - case 73: /* condition_list: %empty */ -#line 585 "yacc_sql.y" + case 75: /* condition_list: %empty */ +#line 594 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2262 "yacc_sql.cpp" +#line 2279 "yacc_sql.cpp" break; - case 74: /* condition_list: condition */ -#line 588 "yacc_sql.y" + case 76: /* condition_list: condition */ +#line 597 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2272 "yacc_sql.cpp" +#line 2289 "yacc_sql.cpp" break; - case 75: /* condition_list: condition AND condition_list */ -#line 593 "yacc_sql.y" + case 77: /* condition_list: condition AND condition_list */ +#line 602 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2282 "yacc_sql.cpp" +#line 2299 "yacc_sql.cpp" break; - case 76: /* condition: rel_attr comp_op value */ -#line 601 "yacc_sql.y" + case 78: /* condition: rel_attr comp_op value */ +#line 610 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2294,11 +2311,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2298 "yacc_sql.cpp" +#line 2315 "yacc_sql.cpp" break; - case 77: /* condition: value comp_op value */ -#line 613 "yacc_sql.y" + case 79: /* condition: value comp_op value */ +#line 622 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2310,11 +2327,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2314 "yacc_sql.cpp" +#line 2331 "yacc_sql.cpp" break; - case 78: /* condition: rel_attr comp_op rel_attr */ -#line 625 "yacc_sql.y" + case 80: /* condition: rel_attr comp_op rel_attr */ +#line 634 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2326,11 +2343,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2330 "yacc_sql.cpp" +#line 2347 "yacc_sql.cpp" break; - case 79: /* condition: value comp_op rel_attr */ -#line 637 "yacc_sql.y" + case 81: /* condition: value comp_op rel_attr */ +#line 646 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2342,55 +2359,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2346 "yacc_sql.cpp" +#line 2363 "yacc_sql.cpp" break; - case 80: /* comp_op: EQ */ -#line 651 "yacc_sql.y" + case 82: /* comp_op: EQ */ +#line 660 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2352 "yacc_sql.cpp" +#line 2369 "yacc_sql.cpp" break; - case 81: /* comp_op: LT */ -#line 652 "yacc_sql.y" + case 83: /* comp_op: LT */ +#line 661 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2358 "yacc_sql.cpp" +#line 2375 "yacc_sql.cpp" break; - case 82: /* comp_op: GT */ -#line 653 "yacc_sql.y" + case 84: /* comp_op: GT */ +#line 662 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2364 "yacc_sql.cpp" +#line 2381 "yacc_sql.cpp" break; - case 83: /* comp_op: LE */ -#line 654 "yacc_sql.y" + case 85: /* comp_op: LE */ +#line 663 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2370 "yacc_sql.cpp" +#line 2387 "yacc_sql.cpp" break; - case 84: /* comp_op: GE */ -#line 655 "yacc_sql.y" + case 86: /* comp_op: GE */ +#line 664 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2376 "yacc_sql.cpp" +#line 2393 "yacc_sql.cpp" break; - case 85: /* comp_op: NE */ -#line 656 "yacc_sql.y" + case 87: /* comp_op: NE */ +#line 665 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2382 "yacc_sql.cpp" +#line 2399 "yacc_sql.cpp" break; - case 86: /* group_by: %empty */ -#line 662 "yacc_sql.y" + case 88: /* group_by: %empty */ +#line 671 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2390 "yacc_sql.cpp" +#line 2407 "yacc_sql.cpp" break; - case 87: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 668 "yacc_sql.y" + case 89: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 677 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2400,20 +2417,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2404 "yacc_sql.cpp" +#line 2421 "yacc_sql.cpp" break; - case 88: /* explain_stmt: EXPLAIN command_wrapper */ -#line 681 "yacc_sql.y" + case 90: /* explain_stmt: EXPLAIN command_wrapper */ +#line 690 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2413 "yacc_sql.cpp" +#line 2430 "yacc_sql.cpp" break; - case 89: /* set_variable_stmt: SET ID EQ value */ -#line 689 "yacc_sql.y" + case 91: /* set_variable_stmt: SET ID EQ value */ +#line 698 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2421,11 +2438,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2425 "yacc_sql.cpp" +#line 2442 "yacc_sql.cpp" break; -#line 2429 "yacc_sql.cpp" +#line 2446 "yacc_sql.cpp" default: break; } @@ -2654,7 +2671,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 701 "yacc_sql.y" +#line 710 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 328f775a..faf56c99 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -154,6 +154,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type storage_format %type rel_list %type expression +%type aggr_func_expr %type expression_list %type group_by %type calc_stmt @@ -530,9 +531,17 @@ expression: | '*' { $$ = new StarExpr(); } + | aggr_func_expr { + $$ = $1; // AggrFuncExpr + } // your code here ; - +aggr_func_expr: + ID LBRACE expression RBRACE + { + $$ = new UnboundAggregateExpr($1, $3); + } + ; rel_attr: ID { $$ = new RelAttrSqlNode; From 8a570c059986a432cc9546ea36c984d0b89eb89a Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 01:14:15 +0800 Subject: [PATCH 008/308] do parse --- src/observer/sql/parser/lex_sql.cpp | 379 ++++++------- src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/yacc_sql.cpp | 786 ++++++++++++++------------- src/observer/sql/parser/yacc_sql.hpp | 65 +-- 4 files changed, 625 insertions(+), 607 deletions(-) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 480e2d61..a79330f6 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -386,8 +386,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 64 -#define YY_END_OF_BUFFER 65 +#define YY_NUM_RULES 65 +#define YY_END_OF_BUFFER 66 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -395,29 +395,29 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[193] = +static const flex_int16_t yy_accept[194] = { 0, - 0, 0, 0, 0, 65, 63, 1, 2, 63, 63, - 63, 47, 48, 59, 57, 49, 58, 6, 60, 3, - 5, 54, 50, 56, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 64, 53, 0, 61, 0, 62, 3, - 0, 51, 52, 55, 46, 46, 46, 46, 43, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 15, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 4, 22, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - - 46, 46, 46, 46, 46, 46, 46, 32, 46, 35, - 46, 46, 46, 28, 46, 46, 46, 46, 46, 46, - 46, 46, 19, 33, 46, 46, 39, 46, 9, 11, - 7, 46, 46, 46, 20, 46, 8, 46, 46, 46, - 24, 38, 36, 46, 46, 16, 46, 17, 46, 46, - 46, 46, 29, 46, 46, 46, 46, 34, 46, 42, - 14, 46, 46, 46, 46, 46, 46, 12, 46, 46, - 21, 30, 10, 26, 46, 45, 40, 23, 46, 46, - 18, 46, 13, 27, 25, 41, 46, 46, 44, 37, - 31, 0 + 0, 0, 0, 0, 66, 64, 1, 2, 64, 64, + 64, 48, 49, 60, 58, 50, 59, 6, 61, 3, + 5, 55, 51, 57, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 65, 54, 0, 62, 0, 63, 3, + 0, 52, 53, 56, 47, 47, 47, 47, 44, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 15, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 4, 22, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + + 47, 47, 47, 47, 47, 47, 47, 32, 47, 36, + 47, 47, 47, 28, 47, 47, 47, 47, 47, 47, + 47, 47, 19, 33, 47, 47, 40, 35, 47, 9, + 11, 7, 47, 47, 47, 20, 47, 8, 47, 47, + 47, 24, 39, 37, 47, 47, 16, 47, 17, 47, + 47, 47, 47, 29, 47, 47, 47, 47, 34, 47, + 43, 14, 47, 47, 47, 47, 47, 47, 12, 47, + 47, 21, 30, 10, 26, 47, 46, 41, 23, 47, + 47, 18, 47, 13, 27, 25, 42, 47, 47, 45, + 38, 31, 0 } ; @@ -464,59 +464,59 @@ static const YY_CHAR yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[198] = +static const flex_int16_t yy_base[199] = { 0, - 0, 0, 0, 0, 512, 513, 513, 513, 493, 505, - 503, 513, 513, 513, 513, 513, 493, 513, 513, 54, - 513, 52, 513, 489, 53, 57, 60, 59, 70, 91, - 61, 67, 75, 484, 87, 95, 83, 98, 113, 118, - 111, 121, 115, 513, 513, 492, 513, 490, 513, 86, - 480, 513, 513, 513, 0, 479, 144, 128, 478, 132, + 0, 0, 0, 0, 515, 516, 516, 516, 496, 508, + 506, 516, 516, 516, 516, 516, 496, 516, 516, 54, + 516, 52, 516, 492, 53, 57, 60, 59, 70, 91, + 61, 67, 75, 494, 87, 95, 83, 98, 113, 118, + 111, 121, 115, 516, 516, 503, 516, 501, 516, 86, + 484, 516, 516, 516, 0, 483, 144, 128, 481, 132, 138, 145, 156, 134, 153, 155, 166, 158, 160, 168, - 172, 178, 205, 183, 161, 190, 477, 195, 202, 182, - 216, 208, 193, 222, 220, 231, 476, 475, 219, 238, - 221, 243, 247, 257, 244, 261, 246, 255, 263, 267, - - 270, 271, 273, 274, 275, 282, 281, 280, 298, 474, - 293, 300, 303, 472, 305, 304, 321, 307, 313, 291, - 324, 326, 469, 467, 327, 333, 466, 334, 465, 464, - 463, 353, 337, 361, 461, 329, 460, 335, 347, 350, - 457, 455, 369, 359, 370, 444, 373, 438, 375, 376, - 387, 388, 435, 381, 391, 403, 392, 395, 393, 355, - 351, 409, 407, 411, 414, 410, 415, 406, 425, 423, - 343, 341, 285, 233, 413, 196, 173, 170, 432, 452, - 109, 437, 99, 78, 77, 74, 440, 447, 73, 69, - 63, 513, 500, 502, 504, 75, 71 + 172, 178, 205, 183, 161, 190, 480, 195, 202, 182, + 216, 208, 193, 222, 220, 231, 479, 478, 219, 238, + 221, 243, 247, 257, 244, 261, 255, 270, 263, 267, + + 271, 274, 273, 280, 285, 282, 299, 284, 281, 476, + 301, 305, 306, 475, 278, 307, 322, 309, 330, 310, + 312, 324, 473, 472, 336, 331, 470, 469, 337, 468, + 467, 466, 338, 341, 345, 463, 346, 460, 352, 347, + 355, 458, 457, 375, 362, 378, 453, 388, 447, 361, + 372, 381, 382, 445, 384, 396, 401, 398, 427, 397, + 371, 369, 403, 400, 419, 408, 416, 421, 406, 422, + 426, 358, 287, 246, 233, 424, 196, 173, 170, 438, + 433, 109, 441, 99, 78, 77, 74, 452, 444, 73, + 69, 63, 516, 500, 502, 504, 75, 71 } ; -static const flex_int16_t yy_def[198] = +static const flex_int16_t yy_def[199] = { 0, - 192, 1, 193, 193, 192, 192, 192, 192, 192, 194, - 195, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 192, 192, 194, 192, 195, 192, 192, - 192, 192, 192, 192, 197, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 192, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 0, 192, 192, 192, 192, 192 + 193, 1, 194, 194, 193, 193, 193, 193, 193, 195, + 196, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 193, 193, 195, 193, 196, 193, 193, + 193, 193, 193, 193, 198, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 193, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 0, 193, 193, 193, 193, 193 } ; -static const flex_int16_t yy_nxt[580] = +static const flex_int16_t yy_nxt[583] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -546,44 +546,45 @@ static const flex_int16_t yy_nxt[580] = 55, 104, 113, 55, 55, 55, 55, 118, 115, 114, 117, 107, 108, 111, 119, 55, 122, 55, 112, 116, 120, 105, 55, 106, 121, 113, 124, 55, 55, 123, - 55, 55, 114, 117, 107, 108, 126, 128, 119, 55, + 55, 55, 114, 117, 107, 108, 126, 129, 119, 55, 122, 55, 116, 120, 125, 55, 127, 55, 121, 124, - 130, 55, 129, 123, 55, 55, 133, 55, 55, 55, - 126, 128, 131, 132, 55, 55, 55, 125, 138, 55, - - 127, 134, 135, 130, 140, 55, 129, 55, 137, 139, - 133, 136, 55, 141, 55, 131, 132, 55, 55, 55, - 142, 55, 138, 143, 134, 135, 145, 55, 140, 151, - 144, 137, 150, 139, 136, 55, 141, 149, 55, 147, - 55, 55, 148, 55, 142, 146, 143, 55, 55, 55, - 145, 55, 151, 144, 154, 55, 150, 55, 153, 152, - 149, 55, 147, 160, 55, 55, 148, 55, 146, 55, - 155, 156, 157, 55, 158, 55, 161, 162, 154, 165, - 159, 153, 152, 55, 55, 163, 160, 55, 164, 55, - 55, 166, 167, 155, 156, 55, 157, 158, 168, 161, - - 162, 55, 55, 165, 159, 55, 55, 55, 163, 55, - 170, 171, 164, 169, 173, 166, 167, 55, 172, 175, - 55, 55, 168, 55, 55, 55, 174, 55, 55, 55, - 176, 179, 177, 180, 170, 171, 169, 55, 173, 55, - 182, 172, 183, 175, 178, 186, 55, 181, 184, 55, - 174, 55, 55, 176, 55, 179, 177, 180, 55, 185, - 189, 55, 187, 190, 182, 183, 55, 178, 186, 55, - 181, 55, 184, 188, 55, 55, 191, 55, 55, 55, - 55, 55, 185, 55, 189, 187, 55, 190, 55, 55, - 87, 55, 55, 55, 87, 49, 47, 188, 55, 191, - - 44, 44, 46, 46, 48, 48, 54, 50, 49, 47, - 45, 192, 5, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192 + 128, 55, 130, 123, 55, 55, 134, 55, 55, 131, + 126, 129, 55, 133, 55, 55, 55, 125, 55, 55, + + 127, 55, 135, 143, 128, 136, 130, 132, 139, 140, + 134, 137, 131, 55, 138, 55, 133, 142, 147, 55, + 55, 55, 141, 55, 55, 135, 55, 143, 136, 146, + 132, 144, 139, 140, 137, 145, 55, 138, 55, 150, + 142, 147, 148, 149, 55, 55, 141, 153, 152, 151, + 55, 55, 55, 146, 144, 55, 154, 158, 145, 55, + 55, 55, 150, 155, 160, 148, 55, 149, 156, 55, + 153, 152, 55, 151, 157, 55, 55, 163, 159, 154, + 161, 158, 166, 55, 169, 55, 55, 155, 160, 55, + 164, 156, 55, 162, 165, 55, 55, 157, 55, 167, + + 163, 159, 55, 161, 171, 172, 166, 168, 169, 170, + 55, 55, 55, 164, 55, 55, 162, 55, 165, 174, + 55, 173, 55, 167, 175, 176, 178, 181, 171, 172, + 55, 168, 170, 55, 177, 55, 55, 179, 55, 180, + 55, 55, 184, 174, 173, 185, 183, 55, 175, 176, + 178, 181, 55, 182, 189, 55, 187, 177, 55, 55, + 179, 55, 186, 180, 190, 184, 55, 55, 188, 185, + 183, 55, 55, 192, 55, 191, 182, 55, 189, 187, + 55, 55, 55, 55, 55, 186, 55, 55, 190, 55, + 55, 188, 55, 87, 55, 55, 192, 55, 87, 191, + + 44, 44, 46, 46, 48, 48, 49, 47, 55, 54, + 50, 49, 47, 45, 193, 5, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193 } ; -static const flex_int16_t yy_chk[580] = +static const flex_int16_t yy_chk[583] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -592,62 +593,63 @@ static const flex_int16_t yy_chk[580] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 197, 28, 27, 31, 196, 191, 28, 27, - 26, 32, 28, 190, 29, 25, 27, 189, 186, 33, - 32, 185, 184, 27, 28, 27, 31, 37, 50, 26, + 22, 26, 198, 28, 27, 31, 197, 192, 28, 27, + 26, 32, 28, 191, 29, 25, 27, 190, 187, 33, + 32, 186, 185, 27, 28, 27, 31, 37, 50, 26, 50, 35, 28, 27, 26, 30, 28, 33, 25, 36, - 27, 29, 38, 183, 32, 37, 27, 28, 27, 31, - 35, 30, 26, 181, 30, 41, 30, 39, 36, 43, + 27, 29, 38, 184, 32, 37, 27, 28, 27, 31, + 35, 30, 26, 182, 30, 41, 30, 39, 36, 43, 33, 38, 40, 36, 29, 42, 39, 40, 37, 39, 42, 43, 58, 35, 30, 41, 60, 30, 64, 30, 39, 36, 61, 58, 38, 39, 36, 61, 57, 62, 39, 40, 60, 39, 42, 43, 57, 65, 41, 66, 63, 64, 68, 39, 69, 75, 62, 58, 39, 63, - 67, 61, 70, 65, 178, 60, 71, 177, 66, 65, + 67, 61, 70, 65, 179, 60, 71, 178, 66, 65, 57, 68, 72, 67, 64, 69, 80, 74, 75, 62, 67, 70, 74, 63, 76, 71, 65, 83, 72, 78, - 176, 66, 65, 83, 68, 80, 79, 67, 69, 73, + 177, 66, 65, 83, 68, 80, 79, 67, 69, 73, 76, 75, 82, 67, 70, 78, 74, 73, 71, 73, 81, 72, 79, 89, 85, 91, 84, 83, 80, 79, - 82, 73, 73, 76, 84, 86, 89, 174, 78, 81, + 82, 73, 73, 76, 84, 86, 89, 175, 78, 81, 85, 73, 90, 73, 86, 79, 91, 92, 95, 90, - 97, 93, 79, 82, 73, 73, 93, 95, 84, 98, + 174, 93, 79, 82, 73, 73, 93, 95, 84, 97, 89, 94, 81, 85, 92, 96, 94, 99, 86, 91, - 97, 100, 96, 90, 101, 102, 100, 103, 104, 105, - 93, 95, 98, 99, 108, 107, 106, 92, 105, 173, - - 94, 101, 102, 97, 107, 120, 96, 111, 104, 106, - 100, 103, 109, 108, 112, 98, 99, 113, 116, 115, - 109, 118, 105, 111, 101, 102, 113, 119, 107, 120, - 112, 104, 119, 106, 103, 117, 108, 118, 121, 116, - 122, 125, 117, 136, 109, 115, 111, 126, 128, 138, - 113, 133, 120, 112, 125, 172, 119, 171, 122, 121, - 118, 139, 116, 136, 140, 161, 117, 132, 115, 160, - 126, 128, 132, 144, 133, 134, 138, 139, 125, 144, - 134, 122, 121, 143, 145, 140, 136, 147, 143, 149, - 150, 145, 147, 126, 128, 154, 132, 133, 149, 138, - - 139, 151, 152, 144, 134, 155, 157, 159, 140, 158, - 151, 152, 143, 150, 155, 145, 147, 156, 154, 157, - 168, 163, 149, 162, 166, 164, 156, 175, 165, 167, - 159, 164, 162, 165, 151, 152, 150, 170, 155, 169, - 167, 154, 168, 157, 163, 175, 179, 166, 169, 153, - 156, 182, 148, 159, 187, 164, 162, 165, 146, 170, - 182, 188, 179, 187, 167, 168, 180, 163, 175, 142, - 166, 141, 169, 180, 137, 135, 188, 131, 130, 129, - 127, 124, 170, 123, 182, 179, 114, 187, 110, 88, - 87, 77, 59, 56, 51, 48, 46, 180, 34, 188, - - 193, 193, 194, 194, 195, 195, 24, 17, 11, 10, - 9, 5, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192 + 94, 100, 96, 90, 98, 101, 100, 103, 102, 97, + 93, 95, 115, 99, 104, 109, 106, 92, 108, 105, + + 94, 173, 101, 109, 94, 102, 96, 98, 105, 106, + 100, 103, 97, 107, 104, 111, 99, 108, 115, 112, + 113, 116, 107, 118, 120, 101, 121, 109, 102, 113, + 98, 111, 105, 106, 103, 112, 117, 104, 122, 118, + 108, 115, 116, 117, 119, 126, 107, 121, 120, 119, + 125, 129, 133, 113, 111, 134, 122, 133, 112, 135, + 137, 140, 118, 125, 135, 116, 139, 117, 126, 141, + 121, 120, 172, 119, 129, 150, 145, 140, 134, 122, + 137, 133, 145, 162, 150, 161, 151, 125, 135, 144, + 141, 126, 146, 139, 144, 152, 153, 129, 155, 146, + + 140, 134, 148, 137, 152, 153, 145, 148, 150, 151, + 156, 160, 158, 141, 164, 157, 139, 163, 144, 156, + 169, 155, 166, 146, 157, 158, 163, 166, 152, 153, + 167, 148, 151, 165, 160, 168, 170, 164, 176, 165, + 171, 159, 169, 156, 155, 170, 168, 181, 157, 158, + 163, 166, 180, 167, 181, 183, 176, 160, 189, 154, + 164, 149, 171, 165, 183, 169, 188, 147, 180, 170, + 168, 143, 142, 189, 138, 188, 167, 136, 181, 176, + 132, 131, 130, 128, 127, 171, 124, 123, 183, 114, + 110, 180, 88, 87, 77, 59, 189, 56, 51, 188, + + 194, 194, 195, 195, 196, 196, 48, 46, 34, 24, + 17, 11, 10, 9, 5, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193 } ; /* The intent behind this definition is that it'll catch @@ -682,7 +684,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 685 "lex_sql.cpp" +#line 687 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -691,7 +693,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 694 "lex_sql.cpp" +#line 696 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -977,7 +979,7 @@ YY_DECL #line 75 "lex_sql.l" -#line 980 "lex_sql.cpp" +#line 982 "lex_sql.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1004,13 +1006,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 193 ) + if ( yy_current_state >= 194 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 513 ); + while ( yy_base[yy_current_state] != 516 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1208,92 +1210,92 @@ RETURN_TOKEN(FLOAT_T); case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(NOT); +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token YY_BREAK case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(NULL_T); +RETURN_TOKEN(NOT); YY_BREAK case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(NULLABLE); +RETURN_TOKEN(NULL_T); YY_BREAK case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(LOAD); +RETURN_TOKEN(NULLABLE); YY_BREAK case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(DATA); +RETURN_TOKEN(LOAD); YY_BREAK case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(INFILE); +RETURN_TOKEN(DATA); YY_BREAK case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); +RETURN_TOKEN(INFILE); YY_BREAK case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(GROUP); +RETURN_TOKEN(EXPLAIN); YY_BREAK case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(BY); +RETURN_TOKEN(GROUP); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(STORAGE); +RETURN_TOKEN(BY); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(FORMAT); +RETURN_TOKEN(STORAGE); YY_BREAK case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +RETURN_TOKEN(FORMAT); YY_BREAK case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(LBRACE); +yylval->string=strdup(yytext); RETURN_TOKEN(ID); YY_BREAK case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(RBRACE); +RETURN_TOKEN(LBRACE); YY_BREAK case 49: YY_RULE_SETUP -#line 128 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 127 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 50: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(EQ); +RETURN_TOKEN(COMMA); YY_BREAK case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(EQ); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LE); YY_BREAK case 53: YY_RULE_SETUP @@ -1303,34 +1305,33 @@ RETURN_TOKEN(NE); case 54: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(NE); YY_BREAK case 55: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(LT); YY_BREAK case 56: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(GE); YY_BREAK case 57: -#line 138 "lex_sql.l" +YY_RULE_SETUP +#line 136 "lex_sql.l" +RETURN_TOKEN(GT); + YY_BREAK case 58: #line 139 "lex_sql.l" case 59: #line 140 "lex_sql.l" case 60: -YY_RULE_SETUP -#line 140 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK +#line 141 "lex_sql.l" case 61: -/* rule 61 can match eol */ YY_RULE_SETUP #line 141 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); +{ return yytext[0]; } YY_BREAK case 62: /* rule 62 can match eol */ @@ -1339,16 +1340,22 @@ YY_RULE_SETUP yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 63: +/* rule 63 can match eol */ YY_RULE_SETUP -#line 144 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; +#line 143 "lex_sql.l" +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 64: YY_RULE_SETUP #line 145 "lex_sql.l" +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 65: +YY_RULE_SETUP +#line 146 "lex_sql.l" ECHO; YY_BREAK -#line 1351 "lex_sql.cpp" +#line 1358 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1648,7 +1655,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 193 ) + if ( yy_current_state >= 194 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1677,11 +1684,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 193 ) + if ( yy_current_state >= 194 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 192); + yy_is_jam = (yy_current_state == 193); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2504,7 +2511,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 145 "lex_sql.l" +#line 146 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index b4fd1232..948954a8 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -542,7 +542,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 145 "lex_sql.l" +#line 146 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index ebf3a604..02f4860c 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -177,82 +177,83 @@ enum yysymbol_kind_t YYSYMBOL_INT_T = 25, /* INT_T */ YYSYMBOL_STRING_T = 26, /* STRING_T */ YYSYMBOL_FLOAT_T = 27, /* FLOAT_T */ - YYSYMBOL_NOT = 28, /* NOT */ - YYSYMBOL_NULL_T = 29, /* NULL_T */ - YYSYMBOL_NULLABLE = 30, /* NULLABLE */ - YYSYMBOL_HELP = 31, /* HELP */ - YYSYMBOL_EXIT = 32, /* EXIT */ - YYSYMBOL_DOT = 33, /* DOT */ - YYSYMBOL_INTO = 34, /* INTO */ - YYSYMBOL_VALUES = 35, /* VALUES */ - YYSYMBOL_FROM = 36, /* FROM */ - YYSYMBOL_WHERE = 37, /* WHERE */ - YYSYMBOL_AND = 38, /* AND */ - YYSYMBOL_SET = 39, /* SET */ - YYSYMBOL_ON = 40, /* ON */ - YYSYMBOL_LOAD = 41, /* LOAD */ - YYSYMBOL_DATA = 42, /* DATA */ - YYSYMBOL_INFILE = 43, /* INFILE */ - YYSYMBOL_EXPLAIN = 44, /* EXPLAIN */ - YYSYMBOL_STORAGE = 45, /* STORAGE */ - YYSYMBOL_FORMAT = 46, /* FORMAT */ - YYSYMBOL_EQ = 47, /* EQ */ - YYSYMBOL_LT = 48, /* LT */ - YYSYMBOL_GT = 49, /* GT */ - YYSYMBOL_LE = 50, /* LE */ - YYSYMBOL_GE = 51, /* GE */ - YYSYMBOL_NE = 52, /* NE */ - YYSYMBOL_NUMBER = 53, /* NUMBER */ - YYSYMBOL_FLOAT = 54, /* FLOAT */ - YYSYMBOL_ID = 55, /* ID */ - YYSYMBOL_SSS = 56, /* SSS */ - YYSYMBOL_57_ = 57, /* '+' */ - YYSYMBOL_58_ = 58, /* '-' */ - YYSYMBOL_59_ = 59, /* '*' */ - YYSYMBOL_60_ = 60, /* '/' */ - YYSYMBOL_UMINUS = 61, /* UMINUS */ - YYSYMBOL_YYACCEPT = 62, /* $accept */ - YYSYMBOL_commands = 63, /* commands */ - YYSYMBOL_command_wrapper = 64, /* command_wrapper */ - YYSYMBOL_exit_stmt = 65, /* exit_stmt */ - YYSYMBOL_help_stmt = 66, /* help_stmt */ - YYSYMBOL_sync_stmt = 67, /* sync_stmt */ - YYSYMBOL_begin_stmt = 68, /* begin_stmt */ - YYSYMBOL_commit_stmt = 69, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 70, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 71, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 72, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 73, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 74, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 75, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 76, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 77, /* attr_def_list */ - YYSYMBOL_attr_def = 78, /* attr_def */ - YYSYMBOL_nullable_constraint = 79, /* nullable_constraint */ - YYSYMBOL_number = 80, /* number */ - YYSYMBOL_type = 81, /* type */ - YYSYMBOL_insert_stmt = 82, /* insert_stmt */ - YYSYMBOL_value_list = 83, /* value_list */ - YYSYMBOL_value = 84, /* value */ - YYSYMBOL_storage_format = 85, /* storage_format */ - YYSYMBOL_delete_stmt = 86, /* delete_stmt */ - YYSYMBOL_update_stmt = 87, /* update_stmt */ - YYSYMBOL_select_stmt = 88, /* select_stmt */ - YYSYMBOL_calc_stmt = 89, /* calc_stmt */ - YYSYMBOL_expression_list = 90, /* expression_list */ - YYSYMBOL_expression = 91, /* expression */ - YYSYMBOL_rel_attr = 92, /* rel_attr */ - YYSYMBOL_relation = 93, /* relation */ - YYSYMBOL_rel_list = 94, /* rel_list */ - YYSYMBOL_where = 95, /* where */ - YYSYMBOL_condition_list = 96, /* condition_list */ - YYSYMBOL_condition = 97, /* condition */ - YYSYMBOL_comp_op = 98, /* comp_op */ - YYSYMBOL_group_by = 99, /* group_by */ - YYSYMBOL_load_data_stmt = 100, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 101, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 102, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 103 /* opt_semicolon */ + YYSYMBOL_DATE_T = 28, /* DATE_T */ + YYSYMBOL_NOT = 29, /* NOT */ + YYSYMBOL_NULL_T = 30, /* NULL_T */ + YYSYMBOL_NULLABLE = 31, /* NULLABLE */ + YYSYMBOL_HELP = 32, /* HELP */ + YYSYMBOL_EXIT = 33, /* EXIT */ + YYSYMBOL_DOT = 34, /* DOT */ + YYSYMBOL_INTO = 35, /* INTO */ + YYSYMBOL_VALUES = 36, /* VALUES */ + YYSYMBOL_FROM = 37, /* FROM */ + YYSYMBOL_WHERE = 38, /* WHERE */ + YYSYMBOL_AND = 39, /* AND */ + YYSYMBOL_SET = 40, /* SET */ + YYSYMBOL_ON = 41, /* ON */ + YYSYMBOL_LOAD = 42, /* LOAD */ + YYSYMBOL_DATA = 43, /* DATA */ + YYSYMBOL_INFILE = 44, /* INFILE */ + YYSYMBOL_EXPLAIN = 45, /* EXPLAIN */ + YYSYMBOL_STORAGE = 46, /* STORAGE */ + YYSYMBOL_FORMAT = 47, /* FORMAT */ + YYSYMBOL_EQ = 48, /* EQ */ + YYSYMBOL_LT = 49, /* LT */ + YYSYMBOL_GT = 50, /* GT */ + YYSYMBOL_LE = 51, /* LE */ + YYSYMBOL_GE = 52, /* GE */ + YYSYMBOL_NE = 53, /* NE */ + YYSYMBOL_NUMBER = 54, /* NUMBER */ + YYSYMBOL_FLOAT = 55, /* FLOAT */ + YYSYMBOL_ID = 56, /* ID */ + YYSYMBOL_SSS = 57, /* SSS */ + YYSYMBOL_58_ = 58, /* '+' */ + YYSYMBOL_59_ = 59, /* '-' */ + YYSYMBOL_60_ = 60, /* '*' */ + YYSYMBOL_61_ = 61, /* '/' */ + YYSYMBOL_UMINUS = 62, /* UMINUS */ + YYSYMBOL_YYACCEPT = 63, /* $accept */ + YYSYMBOL_commands = 64, /* commands */ + YYSYMBOL_command_wrapper = 65, /* command_wrapper */ + YYSYMBOL_exit_stmt = 66, /* exit_stmt */ + YYSYMBOL_help_stmt = 67, /* help_stmt */ + YYSYMBOL_sync_stmt = 68, /* sync_stmt */ + YYSYMBOL_begin_stmt = 69, /* begin_stmt */ + YYSYMBOL_commit_stmt = 70, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 71, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 72, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 73, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 74, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 75, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 76, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 77, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 78, /* attr_def_list */ + YYSYMBOL_attr_def = 79, /* attr_def */ + YYSYMBOL_nullable_constraint = 80, /* nullable_constraint */ + YYSYMBOL_number = 81, /* number */ + YYSYMBOL_type = 82, /* type */ + YYSYMBOL_insert_stmt = 83, /* insert_stmt */ + YYSYMBOL_value_list = 84, /* value_list */ + YYSYMBOL_value = 85, /* value */ + YYSYMBOL_storage_format = 86, /* storage_format */ + YYSYMBOL_delete_stmt = 87, /* delete_stmt */ + YYSYMBOL_update_stmt = 88, /* update_stmt */ + YYSYMBOL_select_stmt = 89, /* select_stmt */ + YYSYMBOL_calc_stmt = 90, /* calc_stmt */ + YYSYMBOL_expression_list = 91, /* expression_list */ + YYSYMBOL_expression = 92, /* expression */ + YYSYMBOL_rel_attr = 93, /* rel_attr */ + YYSYMBOL_relation = 94, /* relation */ + YYSYMBOL_rel_list = 95, /* rel_list */ + YYSYMBOL_where = 96, /* where */ + YYSYMBOL_condition_list = 97, /* condition_list */ + YYSYMBOL_condition = 98, /* condition */ + YYSYMBOL_comp_op = 99, /* comp_op */ + YYSYMBOL_group_by = 100, /* group_by */ + YYSYMBOL_load_data_stmt = 101, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 102, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 103, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 104 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -583,19 +584,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 65 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 144 +#define YYLAST 145 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 62 +#define YYNTOKENS 63 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 42 /* YYNRULES -- Number of rules. */ -#define YYNRULES 94 +#define YYNRULES 95 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 170 +#define YYNSTATES 171 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 312 +#define YYMAXUTOK 313 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -613,7 +614,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 59, 57, 2, 58, 2, 60, 2, 2, + 2, 2, 60, 58, 2, 59, 2, 61, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -640,23 +641,23 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 61 + 55, 56, 57, 62 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 193, 193, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 224, 230, 235, 241, 247, 253, 259, - 266, 272, 280, 294, 304, 328, 331, 344, 353, 365, - 369, 374, 380, 383, 384, 385, 388, 405, 408, 419, - 423, 427, 436, 439, 446, 458, 473, 498, 507, 512, - 523, 526, 529, 532, 535, 539, 542, 547, 553, 560, - 565, 575, 580, 585, 599, 602, 608, 611, 616, 623, - 635, 647, 659, 674, 675, 676, 677, 678, 679, 685, - 690, 703, 711, 721, 722 + 0, 194, 194, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 225, 231, 236, 242, 248, 254, 260, + 267, 273, 281, 295, 305, 329, 332, 345, 354, 366, + 370, 375, 381, 384, 385, 386, 387, 390, 407, 410, + 421, 425, 429, 438, 441, 448, 460, 475, 500, 509, + 514, 525, 528, 531, 534, 537, 541, 544, 549, 555, + 562, 567, 577, 582, 587, 601, 604, 610, 613, 618, + 625, 637, 649, 661, 676, 677, 678, 679, 680, 681, + 687, 692, 705, 713, 723, 724 }; #endif @@ -676,12 +677,12 @@ static const char *const yytname[] = "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "STRING_T", - "FLOAT_T", "NOT", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", "INTO", - "VALUES", "FROM", "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", - "EXPLAIN", "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", - "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", - "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", - "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", + "FLOAT_T", "DATE_T", "NOT", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", + "INTO", "VALUES", "FROM", "WHERE", "AND", "SET", "ON", "LOAD", "DATA", + "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", + "NE", "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", + "UMINUS", "$accept", "commands", "command_wrapper", "exit_stmt", + "help_stmt", "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", "create_index_stmt", "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", "number", "type", @@ -713,23 +714,24 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 43, 1, 5, -17, -17, -45, 7, -91, -7, 14, - -20, -91, -91, -91, -91, -91, 26, 41, 43, 86, - 85, -91, -91, -91, -91, -91, -91, -91, -91, -91, + 44, 6, 21, -17, -17, -22, 27, -91, 16, 4, + 23, -91, -91, -91, -91, -91, 24, 22, 44, 81, + 79, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, 36, 37, 38, 39, -17, -91, -91, 56, -91, - -17, -91, -91, -91, 19, -91, 54, -91, -91, 40, - 42, 57, 51, 58, -91, -91, -91, -91, 80, 60, + -91, 29, 31, 32, 34, -17, -91, -91, 57, -91, + -17, -91, -91, -91, 14, -91, 55, -91, -91, 37, + 38, 56, 47, 53, -91, -91, -91, -91, 82, 61, -91, 62, -14, 48, -91, -17, -17, -17, -17, -17, - 49, 70, 69, 52, -49, 53, 55, 61, 63, -91, - -91, -91, 13, 13, -91, -91, -91, 87, 69, 96, - -24, -91, 72, -91, 83, -1, 99, 102, -91, 49, - -91, -49, -29, -29, -91, 84, -49, 115, -91, -91, - -91, -16, 55, 104, 71, -91, -91, 106, -91, -91, - -91, -91, -91, -91, -24, -24, -24, 69, 73, 76, - 101, -91, -91, 99, 88, 105, -49, 111, -91, -91, - -91, -91, -91, -91, -91, -91, 112, -91, -91, 89, - -91, -91, 106, -91, 34, 90, -91, -91, 79, -91 + 49, 70, 69, 52, -50, 58, 60, 63, 64, -91, + -91, -91, 9, 9, -91, -91, -91, 92, 69, 95, + -45, -91, 73, -91, 83, -1, 96, 103, -91, 49, + -91, -50, -30, -30, -91, 84, -50, 116, -91, -91, + -91, -91, -16, 60, 105, 71, -91, -91, 107, -91, + -91, -91, -91, -91, -91, -45, -45, -45, 69, 74, + 72, 99, -91, -91, 96, 85, 112, -50, 113, -91, + -91, -91, -91, -91, -91, -91, -91, 114, -91, -91, + 88, -91, -91, 107, -91, 1, 89, -91, -91, 80, + -91 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -739,30 +741,31 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 93, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 94, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 49, 50, 69, 51, - 0, 68, 66, 57, 58, 67, 0, 31, 30, 0, - 0, 0, 0, 0, 91, 1, 94, 2, 0, 0, - 29, 0, 0, 0, 65, 0, 0, 0, 0, 0, - 0, 0, 74, 0, 0, 0, 0, 0, 0, 64, - 70, 59, 60, 61, 62, 63, 71, 72, 74, 0, - 76, 54, 0, 92, 0, 0, 35, 0, 33, 0, - 89, 0, 0, 0, 75, 77, 0, 0, 43, 44, - 45, 41, 0, 0, 0, 73, 56, 47, 83, 84, - 85, 86, 87, 88, 0, 0, 76, 74, 0, 0, - 0, 40, 38, 35, 52, 0, 0, 0, 80, 82, - 79, 81, 78, 55, 90, 42, 0, 39, 36, 0, - 34, 32, 47, 46, 41, 0, 48, 37, 0, 53 + 20, 0, 0, 0, 0, 0, 50, 51, 70, 52, + 0, 69, 67, 58, 59, 68, 0, 31, 30, 0, + 0, 0, 0, 0, 92, 1, 95, 2, 0, 0, + 29, 0, 0, 0, 66, 0, 0, 0, 0, 0, + 0, 0, 75, 0, 0, 0, 0, 0, 0, 65, + 71, 60, 61, 62, 63, 64, 72, 73, 75, 0, + 77, 55, 0, 93, 0, 0, 35, 0, 33, 0, + 90, 0, 0, 0, 76, 78, 0, 0, 43, 44, + 45, 46, 41, 0, 0, 0, 74, 57, 48, 84, + 85, 86, 87, 88, 89, 0, 0, 77, 75, 0, + 0, 0, 40, 38, 35, 53, 0, 0, 0, 81, + 83, 80, 82, 79, 56, 91, 42, 0, 39, 36, + 0, 34, 32, 48, 47, 41, 0, 49, 37, 0, + 54 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -91, -91, 118, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -5, 17, -23, -91, -91, - -91, -22, -83, -91, -91, -91, -91, -91, -4, 35, - -66, -91, 33, -90, 8, -91, 30, -91, -91, -91, + -91, -91, 120, -91, -91, -91, -91, -91, -91, -91, + -91, -91, -91, -91, -91, -5, 17, -24, -91, -91, + -91, -21, -83, -91, -91, -91, -91, -91, -4, 33, + -37, -91, 35, -90, 8, -91, 30, -91, -91, -91, -91, -91 }; @@ -770,9 +773,9 @@ static const yytype_int8 yypgoto[] = static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 123, 106, 142, 156, 121, - 33, 147, 52, 160, 34, 35, 36, 37, 53, 54, - 55, 97, 98, 101, 114, 115, 134, 126, 38, 39, + 28, 29, 30, 31, 32, 124, 106, 143, 157, 122, + 33, 148, 52, 161, 34, 35, 36, 37, 53, 54, + 55, 97, 98, 101, 114, 115, 135, 127, 38, 39, 40, 67 }; @@ -781,40 +784,40 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 56, 103, 45, 139, 46, 47, 89, 49, 110, 41, - 57, 42, 140, 43, 141, 44, 58, 112, 128, 129, - 130, 131, 132, 133, 118, 119, 120, 59, 127, 46, - 47, 48, 49, 137, 113, 61, 46, 47, 48, 49, - 75, 50, 51, 76, 77, 78, 79, 153, 1, 2, - 60, 148, 150, 112, 3, 4, 5, 6, 7, 8, - 9, 10, 140, 162, 141, 11, 12, 13, 149, 151, - 113, 91, 78, 79, 14, 15, 76, 77, 78, 79, - 72, 62, 16, 63, 17, 74, 65, 18, 66, 73, - 80, 68, 69, 70, 71, 81, 83, 82, 84, 86, - 87, 85, 88, 90, 96, 99, 100, 102, 109, 104, - 105, 92, 93, 94, 95, 111, 107, 117, 108, 116, - 122, 124, 136, 138, 144, 161, 145, 146, 154, 155, - 157, 163, 164, 159, 169, 165, 64, 168, 158, 143, - 166, 167, 125, 135, 152 + 56, 103, 45, 140, 46, 47, 89, 49, 110, 46, + 47, 48, 49, 141, 41, 142, 42, 112, 129, 130, + 131, 132, 133, 134, 118, 119, 120, 121, 128, 43, + 141, 44, 142, 138, 57, 75, 58, 46, 47, 48, + 49, 60, 50, 51, 76, 77, 78, 79, 154, 1, + 2, 59, 149, 151, 112, 3, 4, 5, 6, 7, + 8, 9, 10, 113, 163, 63, 11, 12, 13, 78, + 79, 91, 76, 77, 78, 79, 14, 15, 72, 61, + 62, 65, 66, 74, 16, 68, 17, 69, 70, 18, + 71, 73, 80, 81, 82, 84, 83, 85, 150, 152, + 113, 86, 87, 88, 90, 96, 99, 100, 102, 92, + 93, 94, 95, 109, 111, 104, 105, 123, 117, 107, + 108, 116, 125, 137, 139, 145, 156, 146, 147, 158, + 155, 160, 162, 164, 165, 166, 170, 169, 64, 159, + 144, 168, 167, 136, 126, 153 }; static const yytype_uint8 yycheck[] = { - 4, 84, 19, 19, 53, 54, 20, 56, 98, 8, - 55, 10, 28, 8, 30, 10, 9, 100, 47, 48, - 49, 50, 51, 52, 25, 26, 27, 34, 111, 53, - 54, 55, 56, 116, 100, 55, 53, 54, 55, 56, - 21, 58, 59, 57, 58, 59, 60, 137, 5, 6, - 36, 134, 135, 136, 11, 12, 13, 14, 15, 16, - 17, 18, 28, 146, 30, 22, 23, 24, 134, 135, - 136, 75, 59, 60, 31, 32, 57, 58, 59, 60, - 45, 55, 39, 42, 41, 50, 0, 44, 3, 33, - 36, 55, 55, 55, 55, 55, 39, 55, 47, 19, - 40, 43, 40, 55, 55, 35, 37, 55, 21, 56, - 55, 76, 77, 78, 79, 19, 55, 34, 55, 47, - 21, 19, 38, 8, 20, 20, 55, 21, 55, 53, - 29, 20, 20, 45, 55, 46, 18, 47, 143, 122, - 162, 164, 109, 113, 136 + 4, 84, 19, 19, 54, 55, 20, 57, 98, 54, + 55, 56, 57, 29, 8, 31, 10, 100, 48, 49, + 50, 51, 52, 53, 25, 26, 27, 28, 111, 8, + 29, 10, 31, 116, 56, 21, 9, 54, 55, 56, + 57, 37, 59, 60, 58, 59, 60, 61, 138, 5, + 6, 35, 135, 136, 137, 11, 12, 13, 14, 15, + 16, 17, 18, 100, 147, 43, 22, 23, 24, 60, + 61, 75, 58, 59, 60, 61, 32, 33, 45, 56, + 56, 0, 3, 50, 40, 56, 42, 56, 56, 45, + 56, 34, 37, 56, 56, 48, 40, 44, 135, 136, + 137, 19, 41, 41, 56, 56, 36, 38, 56, 76, + 77, 78, 79, 21, 19, 57, 56, 21, 35, 56, + 56, 48, 19, 39, 8, 20, 54, 56, 21, 30, + 56, 46, 20, 20, 20, 47, 56, 48, 18, 144, + 123, 165, 163, 113, 109, 137 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -822,37 +825,38 @@ static const yytype_uint8 yycheck[] = static const yytype_int8 yystos[] = { 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, - 18, 22, 23, 24, 31, 32, 39, 41, 44, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 82, 86, 87, 88, 89, 100, 101, - 102, 8, 10, 8, 10, 19, 53, 54, 55, 56, - 58, 59, 84, 90, 91, 92, 90, 55, 9, 34, - 36, 55, 55, 42, 64, 0, 3, 103, 55, 55, - 55, 55, 91, 33, 91, 21, 57, 58, 59, 60, - 36, 55, 55, 39, 47, 43, 19, 40, 40, 20, - 55, 90, 91, 91, 91, 91, 55, 93, 94, 35, - 37, 95, 55, 84, 56, 55, 78, 55, 55, 21, - 95, 19, 84, 92, 96, 97, 47, 34, 25, 26, - 27, 81, 21, 77, 19, 94, 99, 84, 47, 48, - 49, 50, 51, 52, 98, 98, 38, 84, 8, 19, - 28, 30, 79, 78, 20, 55, 21, 83, 84, 92, - 84, 92, 96, 95, 55, 53, 80, 29, 77, 45, - 85, 20, 84, 20, 20, 46, 83, 79, 47, 55 + 18, 22, 23, 24, 32, 33, 40, 42, 45, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 83, 87, 88, 89, 90, 101, 102, + 103, 8, 10, 8, 10, 19, 54, 55, 56, 57, + 59, 60, 85, 91, 92, 93, 91, 56, 9, 35, + 37, 56, 56, 43, 65, 0, 3, 104, 56, 56, + 56, 56, 92, 34, 92, 21, 58, 59, 60, 61, + 37, 56, 56, 40, 48, 44, 19, 41, 41, 20, + 56, 91, 92, 92, 92, 92, 56, 94, 95, 36, + 38, 96, 56, 85, 57, 56, 79, 56, 56, 21, + 96, 19, 85, 93, 97, 98, 48, 35, 25, 26, + 27, 28, 82, 21, 78, 19, 95, 100, 85, 48, + 49, 50, 51, 52, 53, 99, 99, 39, 85, 8, + 19, 29, 31, 80, 79, 20, 56, 21, 84, 85, + 93, 85, 93, 97, 96, 56, 54, 81, 30, 78, + 46, 86, 20, 85, 20, 20, 47, 84, 80, 48, + 56 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 62, 63, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 77, 78, 78, 79, - 79, 79, 80, 81, 81, 81, 82, 83, 83, 84, - 84, 84, 85, 85, 86, 87, 88, 89, 90, 90, - 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, - 92, 93, 94, 94, 95, 95, 96, 96, 96, 97, - 97, 97, 97, 98, 98, 98, 98, 98, 98, 99, - 100, 101, 102, 103, 103 + 0, 63, 64, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 78, 79, 79, 80, + 80, 80, 81, 82, 82, 82, 82, 83, 84, 84, + 85, 85, 85, 86, 86, 87, 88, 89, 90, 91, + 91, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 93, 93, 94, 95, 95, 96, 96, 97, 97, 97, + 98, 98, 98, 98, 99, 99, 99, 99, 99, 99, + 100, 101, 102, 103, 104, 104 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -862,12 +866,12 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 8, 5, 8, 0, 3, 6, 3, 2, - 1, 0, 1, 1, 1, 1, 8, 0, 3, 1, - 1, 1, 0, 4, 4, 7, 6, 2, 1, 3, - 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, - 3, 1, 1, 3, 0, 2, 0, 1, 3, 3, - 3, 3, 3, 1, 1, 1, 1, 1, 1, 0, - 7, 2, 4, 0, 1 + 1, 0, 1, 1, 1, 1, 1, 8, 0, 3, + 1, 1, 1, 0, 4, 4, 7, 6, 2, 1, + 3, 3, 3, 3, 3, 3, 2, 1, 1, 1, + 1, 3, 1, 1, 3, 0, 2, 0, 1, 3, + 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, + 0, 7, 2, 4, 0, 1 }; @@ -1729,93 +1733,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 194 "yacc_sql.y" +#line 195 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1738 "yacc_sql.cpp" +#line 1742 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 224 "yacc_sql.y" +#line 225 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1747 "yacc_sql.cpp" +#line 1751 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 230 "yacc_sql.y" +#line 231 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1755 "yacc_sql.cpp" +#line 1759 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 235 "yacc_sql.y" +#line 236 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1763 "yacc_sql.cpp" +#line 1767 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 241 "yacc_sql.y" +#line 242 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1771 "yacc_sql.cpp" +#line 1775 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 247 "yacc_sql.y" +#line 248 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1779 "yacc_sql.cpp" +#line 1783 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 253 "yacc_sql.y" +#line 254 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1787 "yacc_sql.cpp" +#line 1791 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 259 "yacc_sql.y" +#line 260 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1797 "yacc_sql.cpp" +#line 1801 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 266 "yacc_sql.y" +#line 267 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1805 "yacc_sql.cpp" +#line 1809 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 272 "yacc_sql.y" +#line 273 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1815 "yacc_sql.cpp" +#line 1819 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 281 "yacc_sql.y" +#line 282 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1826,11 +1830,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1830 "yacc_sql.cpp" +#line 1834 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 295 "yacc_sql.y" +#line 296 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1838,11 +1842,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1842 "yacc_sql.cpp" +#line 1846 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 305 "yacc_sql.y" +#line 306 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1863,19 +1867,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1867 "yacc_sql.cpp" +#line 1871 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 328 "yacc_sql.y" +#line 329 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1875 "yacc_sql.cpp" +#line 1879 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 332 "yacc_sql.y" +#line 333 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1885,11 +1889,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1889 "yacc_sql.cpp" +#line 1893 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 345 "yacc_sql.y" +#line 346 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -1898,11 +1902,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); free((yyvsp[-5].string)); } -#line 1902 "yacc_sql.cpp" +#line 1906 "yacc_sql.cpp" break; case 38: /* attr_def: ID type nullable_constraint */ -#line 354 "yacc_sql.y" +#line 355 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -1911,59 +1915,65 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); // 处理NULL/NOT NULL标记 free((yyvsp[-2].string)); } -#line 1915 "yacc_sql.cpp" +#line 1919 "yacc_sql.cpp" break; case 39: /* nullable_constraint: NOT NULL_T */ -#line 366 "yacc_sql.y" +#line 367 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1923 "yacc_sql.cpp" +#line 1927 "yacc_sql.cpp" break; case 40: /* nullable_constraint: NULLABLE */ -#line 370 "yacc_sql.y" +#line 371 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1931 "yacc_sql.cpp" +#line 1935 "yacc_sql.cpp" break; case 41: /* nullable_constraint: %empty */ -#line 374 "yacc_sql.y" +#line 375 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NOT NULL } -#line 1939 "yacc_sql.cpp" +#line 1943 "yacc_sql.cpp" break; case 42: /* number: NUMBER */ -#line 380 "yacc_sql.y" +#line 381 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1945 "yacc_sql.cpp" +#line 1949 "yacc_sql.cpp" break; case 43: /* type: INT_T */ -#line 383 "yacc_sql.y" +#line 384 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1951 "yacc_sql.cpp" +#line 1955 "yacc_sql.cpp" break; case 44: /* type: STRING_T */ -#line 384 "yacc_sql.y" +#line 385 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1957 "yacc_sql.cpp" +#line 1961 "yacc_sql.cpp" break; case 45: /* type: FLOAT_T */ -#line 385 "yacc_sql.y" +#line 386 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1963 "yacc_sql.cpp" +#line 1967 "yacc_sql.cpp" break; - case 46: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 389 "yacc_sql.y" + case 46: /* type: DATE_T */ +#line 387 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 1973 "yacc_sql.cpp" + break; + + case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ +#line 391 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1976,19 +1986,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1980 "yacc_sql.cpp" +#line 1990 "yacc_sql.cpp" break; - case 47: /* value_list: %empty */ -#line 405 "yacc_sql.y" + case 48: /* value_list: %empty */ +#line 407 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 1988 "yacc_sql.cpp" +#line 1998 "yacc_sql.cpp" break; - case 48: /* value_list: COMMA value value_list */ -#line 408 "yacc_sql.y" + case 49: /* value_list: COMMA value value_list */ +#line 410 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -1998,56 +2008,56 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 2002 "yacc_sql.cpp" +#line 2012 "yacc_sql.cpp" break; - case 49: /* value: NUMBER */ -#line 419 "yacc_sql.y" + case 50: /* value: NUMBER */ +#line 421 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2011 "yacc_sql.cpp" +#line 2021 "yacc_sql.cpp" break; - case 50: /* value: FLOAT */ -#line 423 "yacc_sql.y" + case 51: /* value: FLOAT */ +#line 425 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2020 "yacc_sql.cpp" +#line 2030 "yacc_sql.cpp" break; - case 51: /* value: SSS */ -#line 427 "yacc_sql.y" + case 52: /* value: SSS */ +#line 429 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2031 "yacc_sql.cpp" +#line 2041 "yacc_sql.cpp" break; - case 52: /* storage_format: %empty */ -#line 436 "yacc_sql.y" + case 53: /* storage_format: %empty */ +#line 438 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2039 "yacc_sql.cpp" +#line 2049 "yacc_sql.cpp" break; - case 53: /* storage_format: STORAGE FORMAT EQ ID */ -#line 440 "yacc_sql.y" + case 54: /* storage_format: STORAGE FORMAT EQ ID */ +#line 442 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2047 "yacc_sql.cpp" +#line 2057 "yacc_sql.cpp" break; - case 54: /* delete_stmt: DELETE FROM ID where */ -#line 447 "yacc_sql.y" + case 55: /* delete_stmt: DELETE FROM ID where */ +#line 449 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2057,11 +2067,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2061 "yacc_sql.cpp" +#line 2071 "yacc_sql.cpp" break; - case 55: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 459 "yacc_sql.y" + case 56: /* update_stmt: UPDATE ID SET ID EQ value where */ +#line 461 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2074,11 +2084,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2078 "yacc_sql.cpp" +#line 2088 "yacc_sql.cpp" break; - case 56: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 474 "yacc_sql.y" + case 57: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 476 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2101,30 +2111,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2105 "yacc_sql.cpp" +#line 2115 "yacc_sql.cpp" break; - case 57: /* calc_stmt: CALC expression_list */ -#line 499 "yacc_sql.y" + case 58: /* calc_stmt: CALC expression_list */ +#line 501 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2115 "yacc_sql.cpp" +#line 2125 "yacc_sql.cpp" break; - case 58: /* expression_list: expression */ -#line 508 "yacc_sql.y" + case 59: /* expression_list: expression */ +#line 510 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2124 "yacc_sql.cpp" +#line 2134 "yacc_sql.cpp" break; - case 59: /* expression_list: expression COMMA expression_list */ -#line 513 "yacc_sql.y" + case 60: /* expression_list: expression COMMA expression_list */ +#line 515 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2133,99 +2143,99 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2137 "yacc_sql.cpp" +#line 2147 "yacc_sql.cpp" break; - case 60: /* expression: expression '+' expression */ -#line 523 "yacc_sql.y" + case 61: /* expression: expression '+' expression */ +#line 525 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2145 "yacc_sql.cpp" +#line 2155 "yacc_sql.cpp" break; - case 61: /* expression: expression '-' expression */ -#line 526 "yacc_sql.y" + case 62: /* expression: expression '-' expression */ +#line 528 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2153 "yacc_sql.cpp" +#line 2163 "yacc_sql.cpp" break; - case 62: /* expression: expression '*' expression */ -#line 529 "yacc_sql.y" + case 63: /* expression: expression '*' expression */ +#line 531 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2161 "yacc_sql.cpp" +#line 2171 "yacc_sql.cpp" break; - case 63: /* expression: expression '/' expression */ -#line 532 "yacc_sql.y" + case 64: /* expression: expression '/' expression */ +#line 534 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2169 "yacc_sql.cpp" +#line 2179 "yacc_sql.cpp" break; - case 64: /* expression: LBRACE expression RBRACE */ -#line 535 "yacc_sql.y" + case 65: /* expression: LBRACE expression RBRACE */ +#line 537 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2178 "yacc_sql.cpp" +#line 2188 "yacc_sql.cpp" break; - case 65: /* expression: '-' expression */ -#line 539 "yacc_sql.y" + case 66: /* expression: '-' expression */ +#line 541 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2186 "yacc_sql.cpp" +#line 2196 "yacc_sql.cpp" break; - case 66: /* expression: value */ -#line 542 "yacc_sql.y" + case 67: /* expression: value */ +#line 544 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2196 "yacc_sql.cpp" +#line 2206 "yacc_sql.cpp" break; - case 67: /* expression: rel_attr */ -#line 547 "yacc_sql.y" + case 68: /* expression: rel_attr */ +#line 549 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2207 "yacc_sql.cpp" +#line 2217 "yacc_sql.cpp" break; - case 68: /* expression: '*' */ -#line 553 "yacc_sql.y" + case 69: /* expression: '*' */ +#line 555 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2215 "yacc_sql.cpp" +#line 2225 "yacc_sql.cpp" break; - case 69: /* rel_attr: ID */ -#line 560 "yacc_sql.y" + case 70: /* rel_attr: ID */ +#line 562 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2225 "yacc_sql.cpp" +#line 2235 "yacc_sql.cpp" break; - case 70: /* rel_attr: ID DOT ID */ -#line 565 "yacc_sql.y" + case 71: /* rel_attr: ID DOT ID */ +#line 567 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2233,29 +2243,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2237 "yacc_sql.cpp" +#line 2247 "yacc_sql.cpp" break; - case 71: /* relation: ID */ -#line 575 "yacc_sql.y" + case 72: /* relation: ID */ +#line 577 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2245 "yacc_sql.cpp" +#line 2255 "yacc_sql.cpp" break; - case 72: /* rel_list: relation */ -#line 580 "yacc_sql.y" + case 73: /* rel_list: relation */ +#line 582 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2255 "yacc_sql.cpp" +#line 2265 "yacc_sql.cpp" break; - case 73: /* rel_list: relation COMMA rel_list */ -#line 585 "yacc_sql.y" + case 74: /* rel_list: relation COMMA rel_list */ +#line 587 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2266,55 +2276,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2270 "yacc_sql.cpp" +#line 2280 "yacc_sql.cpp" break; - case 74: /* where: %empty */ -#line 599 "yacc_sql.y" + case 75: /* where: %empty */ +#line 601 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2278 "yacc_sql.cpp" +#line 2288 "yacc_sql.cpp" break; - case 75: /* where: WHERE condition_list */ -#line 602 "yacc_sql.y" + case 76: /* where: WHERE condition_list */ +#line 604 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2286 "yacc_sql.cpp" +#line 2296 "yacc_sql.cpp" break; - case 76: /* condition_list: %empty */ -#line 608 "yacc_sql.y" + case 77: /* condition_list: %empty */ +#line 610 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2294 "yacc_sql.cpp" +#line 2304 "yacc_sql.cpp" break; - case 77: /* condition_list: condition */ -#line 611 "yacc_sql.y" + case 78: /* condition_list: condition */ +#line 613 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2304 "yacc_sql.cpp" +#line 2314 "yacc_sql.cpp" break; - case 78: /* condition_list: condition AND condition_list */ -#line 616 "yacc_sql.y" + case 79: /* condition_list: condition AND condition_list */ +#line 618 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2314 "yacc_sql.cpp" +#line 2324 "yacc_sql.cpp" break; - case 79: /* condition: rel_attr comp_op value */ -#line 624 "yacc_sql.y" + case 80: /* condition: rel_attr comp_op value */ +#line 626 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2326,11 +2336,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2330 "yacc_sql.cpp" +#line 2340 "yacc_sql.cpp" break; - case 80: /* condition: value comp_op value */ -#line 636 "yacc_sql.y" + case 81: /* condition: value comp_op value */ +#line 638 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2342,11 +2352,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2346 "yacc_sql.cpp" +#line 2356 "yacc_sql.cpp" break; - case 81: /* condition: rel_attr comp_op rel_attr */ -#line 648 "yacc_sql.y" + case 82: /* condition: rel_attr comp_op rel_attr */ +#line 650 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2358,11 +2368,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2362 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; - case 82: /* condition: value comp_op rel_attr */ -#line 660 "yacc_sql.y" + case 83: /* condition: value comp_op rel_attr */ +#line 662 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2374,55 +2384,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2378 "yacc_sql.cpp" +#line 2388 "yacc_sql.cpp" break; - case 83: /* comp_op: EQ */ -#line 674 "yacc_sql.y" + case 84: /* comp_op: EQ */ +#line 676 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2384 "yacc_sql.cpp" +#line 2394 "yacc_sql.cpp" break; - case 84: /* comp_op: LT */ -#line 675 "yacc_sql.y" + case 85: /* comp_op: LT */ +#line 677 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2390 "yacc_sql.cpp" +#line 2400 "yacc_sql.cpp" break; - case 85: /* comp_op: GT */ -#line 676 "yacc_sql.y" + case 86: /* comp_op: GT */ +#line 678 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2396 "yacc_sql.cpp" +#line 2406 "yacc_sql.cpp" break; - case 86: /* comp_op: LE */ -#line 677 "yacc_sql.y" + case 87: /* comp_op: LE */ +#line 679 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2402 "yacc_sql.cpp" +#line 2412 "yacc_sql.cpp" break; - case 87: /* comp_op: GE */ -#line 678 "yacc_sql.y" + case 88: /* comp_op: GE */ +#line 680 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2408 "yacc_sql.cpp" +#line 2418 "yacc_sql.cpp" break; - case 88: /* comp_op: NE */ -#line 679 "yacc_sql.y" + case 89: /* comp_op: NE */ +#line 681 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2414 "yacc_sql.cpp" +#line 2424 "yacc_sql.cpp" break; - case 89: /* group_by: %empty */ -#line 685 "yacc_sql.y" + case 90: /* group_by: %empty */ +#line 687 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2422 "yacc_sql.cpp" +#line 2432 "yacc_sql.cpp" break; - case 90: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 691 "yacc_sql.y" + case 91: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 693 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2432,20 +2442,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2436 "yacc_sql.cpp" +#line 2446 "yacc_sql.cpp" break; - case 91: /* explain_stmt: EXPLAIN command_wrapper */ -#line 704 "yacc_sql.y" + case 92: /* explain_stmt: EXPLAIN command_wrapper */ +#line 706 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2445 "yacc_sql.cpp" +#line 2455 "yacc_sql.cpp" break; - case 92: /* set_variable_stmt: SET ID EQ value */ -#line 712 "yacc_sql.y" + case 93: /* set_variable_stmt: SET ID EQ value */ +#line 714 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2453,11 +2463,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2457 "yacc_sql.cpp" +#line 2467 "yacc_sql.cpp" break; -#line 2461 "yacc_sql.cpp" +#line 2471 "yacc_sql.cpp" default: break; } @@ -2686,7 +2696,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 724 "yacc_sql.y" +#line 726 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index e10ad32b..8f95538c 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -79,36 +79,37 @@ extern int yydebug; INT_T = 280, /* INT_T */ STRING_T = 281, /* STRING_T */ FLOAT_T = 282, /* FLOAT_T */ - NOT = 283, /* NOT */ - NULL_T = 284, /* NULL_T */ - NULLABLE = 285, /* NULLABLE */ - HELP = 286, /* HELP */ - EXIT = 287, /* EXIT */ - DOT = 288, /* DOT */ - INTO = 289, /* INTO */ - VALUES = 290, /* VALUES */ - FROM = 291, /* FROM */ - WHERE = 292, /* WHERE */ - AND = 293, /* AND */ - SET = 294, /* SET */ - ON = 295, /* ON */ - LOAD = 296, /* LOAD */ - DATA = 297, /* DATA */ - INFILE = 298, /* INFILE */ - EXPLAIN = 299, /* EXPLAIN */ - STORAGE = 300, /* STORAGE */ - FORMAT = 301, /* FORMAT */ - EQ = 302, /* EQ */ - LT = 303, /* LT */ - GT = 304, /* GT */ - LE = 305, /* LE */ - GE = 306, /* GE */ - NE = 307, /* NE */ - NUMBER = 308, /* NUMBER */ - FLOAT = 309, /* FLOAT */ - ID = 310, /* ID */ - SSS = 311, /* SSS */ - UMINUS = 312 /* UMINUS */ + DATE_T = 283, /* DATE_T */ + NOT = 284, /* NOT */ + NULL_T = 285, /* NULL_T */ + NULLABLE = 286, /* NULLABLE */ + HELP = 287, /* HELP */ + EXIT = 288, /* EXIT */ + DOT = 289, /* DOT */ + INTO = 290, /* INTO */ + VALUES = 291, /* VALUES */ + FROM = 292, /* FROM */ + WHERE = 293, /* WHERE */ + AND = 294, /* AND */ + SET = 295, /* SET */ + ON = 296, /* ON */ + LOAD = 297, /* LOAD */ + DATA = 298, /* DATA */ + INFILE = 299, /* INFILE */ + EXPLAIN = 300, /* EXPLAIN */ + STORAGE = 301, /* STORAGE */ + FORMAT = 302, /* FORMAT */ + EQ = 303, /* EQ */ + LT = 304, /* LT */ + GT = 305, /* GT */ + LE = 306, /* LE */ + GE = 307, /* GE */ + NE = 308, /* NE */ + NUMBER = 309, /* NUMBER */ + FLOAT = 310, /* FLOAT */ + ID = 311, /* ID */ + SSS = 312, /* SSS */ + UMINUS = 313 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -117,7 +118,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 119 "yacc_sql.y" +#line 120 "yacc_sql.y" ParsedSqlNode * sql_node; ConditionSqlNode * condition; @@ -137,7 +138,7 @@ union YYSTYPE float floats; bool nullable_info; -#line 141 "yacc_sql.hpp" +#line 142 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; From 8e89f99a2d18d0c19be36200c817811f1e0e77de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 25 Sep 2024 17:16:00 +0000 Subject: [PATCH 009/308] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=88=91=E7=9A=84cma?= =?UTF-8?q?ke-debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 14824575..cd786538 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) + SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) From 4e05ad9b739b61d559651aad44e002b1a6cf89c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 25 Sep 2024 17:33:41 +0000 Subject: [PATCH 010/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dyacc=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + CMakeLists.txt | 2 +- src/observer/sql/parser/lex_sql.cpp | 359 ++++++------ src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/yacc_sql.cpp | 796 ++++++++++++++------------- 5 files changed, 589 insertions(+), 571 deletions(-) diff --git a/.gitignore b/.gitignore index 1de163bd..7390ea40 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,5 @@ GRTAGS GPATH GTAGS docs/book +./test.sql #*# diff --git a/CMakeLists.txt b/CMakeLists.txt index cd786538..14824575 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) - +SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 572c854b..ba5ab5fd 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -385,8 +385,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 61 -#define YY_END_OF_BUFFER 62 +#define YY_NUM_RULES 62 +#define YY_END_OF_BUFFER 63 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -394,28 +394,28 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[183] = +static const flex_int16_t yy_accept[184] = { 0, - 0, 0, 0, 0, 62, 60, 1, 2, 60, 60, - 60, 44, 45, 56, 54, 46, 55, 6, 57, 3, - 5, 51, 47, 53, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 61, 50, 0, 58, 0, 59, 3, 0, - 48, 49, 52, 43, 43, 43, 43, 40, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 15, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 4, 22, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - - 43, 43, 43, 43, 32, 43, 43, 43, 28, 43, - 43, 43, 43, 43, 43, 43, 43, 19, 33, 43, - 43, 36, 43, 9, 11, 7, 43, 43, 43, 20, - 43, 8, 43, 43, 43, 24, 35, 43, 43, 16, - 43, 17, 43, 43, 43, 43, 29, 43, 43, 43, - 43, 34, 43, 39, 14, 43, 43, 43, 43, 43, - 12, 43, 43, 21, 30, 10, 26, 43, 42, 37, - 23, 43, 18, 43, 13, 27, 25, 38, 43, 41, - 31, 0 + 0, 0, 0, 0, 63, 61, 1, 2, 61, 61, + 61, 45, 46, 57, 55, 47, 56, 6, 58, 3, + 5, 52, 48, 54, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 62, 51, 0, 59, 0, 60, 3, 0, + 49, 50, 53, 44, 44, 44, 44, 41, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 15, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 4, 22, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + + 44, 44, 44, 44, 32, 44, 44, 44, 28, 44, + 44, 44, 44, 44, 44, 44, 44, 19, 33, 44, + 44, 37, 35, 44, 9, 11, 7, 44, 44, 44, + 20, 44, 8, 44, 44, 44, 24, 36, 44, 44, + 16, 44, 17, 44, 44, 44, 44, 29, 44, 44, + 44, 44, 34, 44, 40, 14, 44, 44, 44, 44, + 44, 12, 44, 44, 21, 30, 10, 26, 44, 43, + 38, 23, 44, 18, 44, 13, 27, 25, 39, 44, + 42, 31, 0 } ; static const YY_CHAR yy_ec[256] = @@ -461,55 +461,55 @@ static const YY_CHAR yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[188] = +static const flex_int16_t yy_base[189] = { 0, - 0, 0, 0, 0, 484, 485, 485, 485, 465, 477, - 475, 485, 485, 485, 485, 485, 465, 485, 485, 54, - 485, 52, 485, 454, 53, 57, 60, 59, 70, 91, - 61, 67, 75, 456, 87, 77, 98, 113, 109, 58, - 119, 111, 485, 485, 465, 485, 463, 485, 86, 453, - 485, 485, 485, 0, 451, 126, 121, 450, 115, 137, + 0, 0, 0, 0, 487, 488, 488, 488, 468, 480, + 478, 488, 488, 488, 488, 488, 468, 488, 488, 54, + 488, 52, 488, 464, 53, 57, 60, 59, 70, 91, + 61, 67, 75, 466, 87, 77, 98, 113, 109, 58, + 119, 111, 488, 488, 475, 488, 473, 488, 86, 463, + 488, 488, 488, 0, 462, 126, 121, 461, 115, 137, 127, 143, 128, 139, 150, 157, 153, 160, 163, 168, - 173, 175, 186, 448, 180, 190, 199, 203, 193, 202, - 216, 201, 214, 447, 446, 225, 226, 228, 227, 230, - 237, 243, 239, 145, 231, 253, 250, 251, 256, 258, - - 260, 265, 271, 278, 264, 281, 285, 286, 445, 288, - 294, 290, 293, 299, 302, 310, 300, 444, 443, 307, - 312, 441, 316, 439, 438, 437, 317, 325, 340, 436, - 323, 433, 329, 334, 330, 432, 424, 327, 352, 423, - 355, 422, 361, 342, 363, 367, 419, 364, 368, 380, - 378, 412, 375, 404, 386, 381, 382, 397, 385, 392, - 395, 409, 407, 353, 347, 336, 275, 393, 263, 261, - 179, 399, 171, 416, 162, 99, 83, 74, 420, 73, - 69, 485, 473, 475, 477, 76, 75 + 173, 175, 186, 460, 180, 190, 199, 203, 193, 202, + 216, 201, 214, 459, 451, 225, 226, 228, 227, 230, + 237, 243, 251, 145, 231, 239, 256, 263, 264, 250, + + 253, 260, 271, 279, 268, 275, 286, 289, 449, 265, + 290, 292, 300, 301, 294, 305, 295, 448, 446, 315, + 309, 444, 442, 317, 441, 440, 438, 319, 320, 333, + 437, 327, 433, 329, 321, 344, 431, 430, 345, 346, + 428, 354, 425, 358, 350, 369, 371, 423, 361, 372, + 376, 374, 418, 389, 415, 382, 386, 390, 392, 393, + 399, 398, 394, 400, 368, 364, 357, 342, 406, 335, + 331, 179, 401, 171, 417, 162, 99, 83, 74, 414, + 73, 69, 488, 467, 469, 471, 76, 75 } ; -static const flex_int16_t yy_def[188] = +static const flex_int16_t yy_def[189] = { 0, - 182, 1, 183, 183, 182, 182, 182, 182, 182, 184, - 185, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 182, 182, 184, 182, 185, 182, 182, 182, - 182, 182, 182, 187, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 182, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 0, 182, 182, 182, 182, 182 + 183, 1, 184, 184, 183, 183, 183, 183, 183, 185, + 186, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 183, 183, 185, 183, 186, 183, 183, 183, + 183, 183, 183, 188, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 183, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 0, 183, 183, 183, 183, 183 } ; -static const flex_int16_t yy_nxt[552] = +static const flex_int16_t yy_nxt[555] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -529,52 +529,52 @@ static const flex_int16_t yy_nxt[552] = 54, 54, 54, 73, 67, 87, 86, 68, 85, 69, 78, 54, 80, 54, 75, 79, 88, 54, 89, 54, 76, 83, 82, 77, 54, 91, 90, 54, 87, 92, - 86, 54, 85, 78, 54, 93, 54, 54, 79, 125, + 86, 54, 85, 78, 54, 93, 54, 54, 79, 126, 88, 89, 54, 94, 95, 54, 97, 54, 91, 54, 90, 96, 92, 54, 54, 98, 99, 102, 93, 103, - 54, 100, 125, 101, 54, 106, 94, 54, 95, 97, + 54, 100, 126, 101, 54, 106, 94, 54, 95, 97, 107, 104, 105, 54, 96, 54, 54, 54, 98, 99, 108, 102, 113, 103, 100, 112, 101, 109, 54, 106, 54, 115, 110, 107, 104, 105, 111, 116, 114, 54, 54, 54, 54, 108, 54, 54, 113, 118, 112, 121, 109, 54, 117, 54, 115, 110, 122, 54, 120, 111, - 124, 116, 114, 119, 54, 54, 123, 54, 126, 128, - 54, 118, 54, 121, 54, 54, 117, 54, 54, 54, - 122, 120, 129, 127, 124, 54, 119, 130, 133, 54, - 123, 126, 54, 128, 132, 54, 131, 136, 134, 54, - - 54, 135, 54, 137, 54, 129, 127, 54, 54, 139, - 130, 142, 133, 54, 54, 138, 54, 132, 144, 131, - 136, 54, 134, 143, 54, 135, 54, 137, 140, 141, - 54, 54, 147, 139, 148, 142, 151, 54, 138, 54, - 145, 54, 144, 54, 54, 146, 143, 158, 54, 149, - 54, 140, 141, 150, 54, 147, 54, 154, 148, 153, - 151, 54, 152, 145, 156, 157, 54, 54, 146, 54, - 155, 158, 149, 159, 160, 54, 150, 54, 54, 162, - 154, 54, 54, 153, 161, 152, 163, 156, 157, 54, - 164, 166, 54, 155, 54, 54, 54, 159, 160, 54, - - 54, 165, 162, 167, 170, 168, 54, 54, 161, 54, - 163, 54, 169, 54, 164, 166, 172, 174, 54, 171, - 179, 54, 173, 54, 165, 178, 54, 167, 170, 168, - 54, 175, 176, 54, 54, 169, 54, 54, 54, 180, - 172, 174, 171, 177, 179, 173, 54, 54, 178, 181, - 54, 54, 54, 54, 175, 54, 176, 54, 54, 54, - 54, 84, 54, 180, 54, 54, 177, 84, 48, 46, - 54, 53, 181, 43, 43, 45, 45, 47, 47, 49, - 48, 46, 44, 182, 5, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182 + 123, 116, 114, 119, 54, 54, 124, 54, 127, 128, + 54, 118, 125, 121, 54, 129, 117, 54, 54, 54, + 122, 120, 54, 134, 123, 54, 119, 133, 132, 54, + 124, 127, 128, 54, 130, 131, 125, 138, 135, 129, + + 54, 137, 136, 54, 54, 141, 54, 134, 54, 54, + 133, 132, 140, 143, 54, 54, 139, 130, 131, 54, + 145, 138, 135, 54, 137, 142, 136, 148, 141, 54, + 144, 54, 146, 54, 54, 54, 140, 143, 152, 139, + 147, 54, 149, 54, 145, 54, 150, 54, 142, 54, + 148, 157, 154, 144, 151, 146, 54, 153, 54, 54, + 54, 155, 152, 147, 54, 159, 149, 160, 54, 150, + 156, 54, 54, 161, 157, 54, 154, 151, 54, 158, + 153, 162, 54, 54, 155, 54, 54, 163, 54, 159, + 54, 160, 164, 156, 165, 167, 54, 161, 166, 168, + + 54, 169, 158, 54, 54, 162, 54, 54, 54, 171, + 163, 173, 54, 54, 54, 54, 164, 177, 165, 167, + 54, 166, 180, 168, 175, 169, 170, 172, 54, 54, + 174, 54, 54, 171, 176, 173, 178, 54, 179, 54, + 181, 177, 54, 182, 54, 54, 180, 54, 175, 170, + 172, 54, 54, 174, 54, 54, 54, 176, 54, 178, + 54, 179, 54, 54, 181, 54, 182, 43, 43, 45, + 45, 47, 47, 84, 54, 54, 54, 84, 48, 46, + 54, 53, 49, 48, 46, 44, 183, 5, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183 } ; -static const flex_int16_t yy_chk[552] = +static const flex_int16_t yy_chk[555] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -583,60 +583,60 @@ static const flex_int16_t yy_chk[552] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 40, 28, 27, 31, 187, 186, 28, 27, - 26, 32, 28, 181, 29, 25, 27, 180, 178, 33, - 32, 36, 40, 27, 28, 27, 31, 177, 49, 26, + 22, 26, 40, 28, 27, 31, 188, 187, 28, 27, + 26, 32, 28, 182, 29, 25, 27, 181, 179, 33, + 32, 36, 40, 27, 28, 27, 31, 178, 49, 26, 49, 35, 28, 27, 26, 30, 28, 33, 25, 36, - 27, 29, 37, 176, 32, 40, 27, 28, 27, 31, + 27, 29, 37, 177, 32, 40, 27, 28, 27, 31, 35, 30, 26, 39, 30, 42, 30, 38, 39, 59, 33, 37, 36, 41, 29, 57, 38, 42, 41, 38, 56, 61, 63, 35, 30, 59, 57, 30, 56, 30, 38, 60, 39, 64, 37, 38, 60, 62, 61, 94, 38, 42, 41, 38, 65, 63, 62, 67, 59, 64, - 57, 66, 56, 38, 68, 64, 175, 69, 38, 94, - 60, 61, 70, 65, 66, 173, 67, 71, 63, 72, - 62, 66, 64, 171, 75, 68, 69, 72, 64, 72, + 57, 66, 56, 38, 68, 64, 176, 69, 38, 94, + 60, 61, 70, 65, 66, 174, 67, 71, 63, 72, + 62, 66, 64, 172, 75, 68, 69, 72, 64, 72, 73, 70, 94, 71, 76, 73, 65, 79, 66, 67, 75, 72, 72, 77, 66, 82, 80, 78, 68, 69, 76, 72, 80, 72, 70, 79, 71, 76, 83, 73, 81, 82, 77, 75, 72, 72, 78, 83, 81, 86, 87, 89, 88, 76, 90, 95, 80, 87, 79, 90, - 76, 91, 86, 93, 82, 77, 91, 92, 89, 78, - 93, 83, 81, 88, 97, 98, 92, 96, 95, 97, - 99, 87, 100, 90, 101, 170, 86, 169, 105, 102, - 91, 89, 98, 96, 93, 103, 88, 99, 102, 167, - 92, 95, 104, 97, 101, 106, 100, 105, 103, 107, - - 108, 104, 110, 106, 112, 98, 96, 113, 111, 108, - 99, 112, 102, 114, 117, 107, 115, 101, 114, 100, - 105, 120, 103, 113, 116, 104, 121, 106, 110, 111, - 123, 127, 117, 108, 120, 112, 127, 131, 107, 128, - 115, 138, 114, 133, 135, 116, 113, 138, 134, 121, - 166, 110, 111, 123, 129, 117, 144, 131, 120, 129, - 127, 165, 128, 115, 134, 135, 139, 164, 116, 141, - 133, 138, 121, 139, 141, 143, 123, 145, 148, 144, - 131, 146, 149, 129, 143, 128, 145, 134, 135, 153, - 146, 149, 151, 133, 150, 156, 157, 139, 141, 159, - - 155, 148, 144, 150, 156, 151, 160, 168, 143, 161, - 145, 158, 153, 172, 146, 149, 158, 160, 154, 157, - 172, 163, 159, 162, 148, 168, 152, 150, 156, 151, - 174, 161, 162, 147, 179, 153, 142, 140, 137, 174, - 158, 160, 157, 163, 172, 159, 136, 132, 168, 179, - 130, 126, 125, 124, 161, 122, 162, 119, 118, 109, - 85, 84, 74, 174, 58, 55, 163, 50, 47, 45, - 34, 24, 179, 183, 183, 184, 184, 185, 185, 17, - 11, 10, 9, 5, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182 + 76, 91, 86, 96, 82, 77, 91, 92, 89, 78, + 91, 83, 81, 88, 100, 93, 92, 101, 95, 96, + 97, 87, 93, 90, 102, 97, 86, 98, 99, 110, + 91, 89, 105, 102, 91, 103, 88, 101, 100, 106, + 92, 95, 96, 104, 98, 99, 93, 106, 103, 97, + + 107, 105, 104, 108, 111, 110, 112, 102, 115, 117, + 101, 100, 108, 112, 113, 114, 107, 98, 99, 116, + 114, 106, 103, 121, 105, 111, 104, 117, 110, 120, + 113, 124, 115, 128, 129, 135, 108, 112, 128, 107, + 116, 132, 120, 134, 114, 171, 121, 130, 111, 170, + 117, 135, 130, 113, 124, 115, 168, 129, 136, 139, + 140, 132, 128, 116, 145, 139, 120, 140, 142, 121, + 134, 167, 144, 142, 135, 149, 130, 124, 166, 136, + 129, 144, 165, 146, 132, 147, 150, 145, 152, 139, + 151, 140, 146, 134, 147, 150, 156, 142, 149, 151, + + 157, 152, 136, 154, 158, 144, 159, 160, 163, 157, + 145, 159, 162, 161, 164, 173, 146, 163, 147, 150, + 169, 149, 173, 151, 161, 152, 154, 158, 180, 155, + 160, 175, 153, 157, 162, 159, 164, 148, 169, 143, + 175, 163, 141, 180, 138, 137, 173, 133, 161, 154, + 158, 131, 127, 160, 126, 125, 123, 162, 122, 164, + 119, 169, 118, 109, 175, 85, 180, 184, 184, 185, + 185, 186, 186, 84, 74, 58, 55, 50, 47, 45, + 34, 24, 17, 11, 10, 9, 5, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183 } ; /* The intent behind this definition is that it'll catch @@ -993,13 +993,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) + if ( yy_current_state >= 184 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 485 ); + while ( yy_base[yy_current_state] != 488 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1197,77 +1197,77 @@ RETURN_TOKEN(FLOAT_T); case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(LOAD); +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token YY_BREAK case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATA); +RETURN_TOKEN(LOAD); YY_BREAK case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(INFILE); +RETURN_TOKEN(DATA); YY_BREAK case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); +RETURN_TOKEN(INFILE); YY_BREAK case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(GROUP); +RETURN_TOKEN(EXPLAIN); YY_BREAK case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(BY); +RETURN_TOKEN(GROUP); YY_BREAK case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(STORAGE); +RETURN_TOKEN(BY); YY_BREAK case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(FORMAT); +RETURN_TOKEN(STORAGE); YY_BREAK case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +RETURN_TOKEN(FORMAT); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(LBRACE); +yylval->string=strdup(yytext); RETURN_TOKEN(ID); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(RBRACE); +RETURN_TOKEN(LBRACE); YY_BREAK case 46: YY_RULE_SETUP -#line 125 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 124 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 47: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(EQ); +RETURN_TOKEN(COMMA); YY_BREAK case 48: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(EQ); YY_BREAK case 49: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LE); YY_BREAK case 50: YY_RULE_SETUP @@ -1277,34 +1277,33 @@ RETURN_TOKEN(NE); case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(NE); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(LT); YY_BREAK case 53: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(GE); YY_BREAK case 54: -#line 135 "lex_sql.l" +YY_RULE_SETUP +#line 133 "lex_sql.l" +RETURN_TOKEN(GT); + YY_BREAK case 55: #line 136 "lex_sql.l" case 56: #line 137 "lex_sql.l" case 57: -YY_RULE_SETUP -#line 137 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK +#line 138 "lex_sql.l" case 58: -/* rule 58 can match eol */ YY_RULE_SETUP #line 138 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); +{ return yytext[0]; } YY_BREAK case 59: /* rule 59 can match eol */ @@ -1313,16 +1312,22 @@ YY_RULE_SETUP yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 60: +/* rule 60 can match eol */ YY_RULE_SETUP -#line 141 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; +#line 140 "lex_sql.l" +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 61: YY_RULE_SETUP #line 142 "lex_sql.l" +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 62: +YY_RULE_SETUP +#line 143 "lex_sql.l" ECHO; YY_BREAK -#line 1326 "lex_sql.cpp" +#line 1331 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1622,7 +1627,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) + if ( yy_current_state >= 184 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1651,11 +1656,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) + if ( yy_current_state >= 184 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 182); + yy_is_jam = (yy_current_state == 183); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2478,7 +2483,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 142 "lex_sql.l" +#line 143 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 77b26a92..8f6501ce 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -541,7 +541,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 142 "lex_sql.l" +#line 143 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index ecbd7019..23c93fd7 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -177,79 +177,80 @@ enum yysymbol_kind_t YYSYMBOL_INT_T = 25, /* INT_T */ YYSYMBOL_STRING_T = 26, /* STRING_T */ YYSYMBOL_FLOAT_T = 27, /* FLOAT_T */ - YYSYMBOL_HELP = 28, /* HELP */ - YYSYMBOL_EXIT = 29, /* EXIT */ - YYSYMBOL_DOT = 30, /* DOT */ - YYSYMBOL_INTO = 31, /* INTO */ - YYSYMBOL_VALUES = 32, /* VALUES */ - YYSYMBOL_FROM = 33, /* FROM */ - YYSYMBOL_WHERE = 34, /* WHERE */ - YYSYMBOL_AND = 35, /* AND */ - YYSYMBOL_SET = 36, /* SET */ - YYSYMBOL_ON = 37, /* ON */ - YYSYMBOL_LOAD = 38, /* LOAD */ - YYSYMBOL_DATA = 39, /* DATA */ - YYSYMBOL_INFILE = 40, /* INFILE */ - YYSYMBOL_EXPLAIN = 41, /* EXPLAIN */ - YYSYMBOL_STORAGE = 42, /* STORAGE */ - YYSYMBOL_FORMAT = 43, /* FORMAT */ - YYSYMBOL_EQ = 44, /* EQ */ - YYSYMBOL_LT = 45, /* LT */ - YYSYMBOL_GT = 46, /* GT */ - YYSYMBOL_LE = 47, /* LE */ - YYSYMBOL_GE = 48, /* GE */ - YYSYMBOL_NE = 49, /* NE */ - YYSYMBOL_NUMBER = 50, /* NUMBER */ - YYSYMBOL_FLOAT = 51, /* FLOAT */ - YYSYMBOL_ID = 52, /* ID */ - YYSYMBOL_SSS = 53, /* SSS */ - YYSYMBOL_54_ = 54, /* '+' */ - YYSYMBOL_55_ = 55, /* '-' */ - YYSYMBOL_56_ = 56, /* '*' */ - YYSYMBOL_57_ = 57, /* '/' */ - YYSYMBOL_UMINUS = 58, /* UMINUS */ - YYSYMBOL_YYACCEPT = 59, /* $accept */ - YYSYMBOL_commands = 60, /* commands */ - YYSYMBOL_command_wrapper = 61, /* command_wrapper */ - YYSYMBOL_exit_stmt = 62, /* exit_stmt */ - YYSYMBOL_help_stmt = 63, /* help_stmt */ - YYSYMBOL_sync_stmt = 64, /* sync_stmt */ - YYSYMBOL_begin_stmt = 65, /* begin_stmt */ - YYSYMBOL_commit_stmt = 66, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 67, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 68, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 69, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 70, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 71, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 72, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 73, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 74, /* attr_def_list */ - YYSYMBOL_attr_def = 75, /* attr_def */ - YYSYMBOL_number = 76, /* number */ - YYSYMBOL_type = 77, /* type */ - YYSYMBOL_insert_stmt = 78, /* insert_stmt */ - YYSYMBOL_value_list = 79, /* value_list */ - YYSYMBOL_value = 80, /* value */ - YYSYMBOL_storage_format = 81, /* storage_format */ - YYSYMBOL_delete_stmt = 82, /* delete_stmt */ - YYSYMBOL_update_stmt = 83, /* update_stmt */ - YYSYMBOL_select_stmt = 84, /* select_stmt */ - YYSYMBOL_calc_stmt = 85, /* calc_stmt */ - YYSYMBOL_expression_list = 86, /* expression_list */ - YYSYMBOL_expression = 87, /* expression */ - YYSYMBOL_aggr_func_expr = 88, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 89, /* rel_attr */ - YYSYMBOL_relation = 90, /* relation */ - YYSYMBOL_rel_list = 91, /* rel_list */ - YYSYMBOL_where = 92, /* where */ - YYSYMBOL_condition_list = 93, /* condition_list */ - YYSYMBOL_condition = 94, /* condition */ - YYSYMBOL_comp_op = 95, /* comp_op */ - YYSYMBOL_group_by = 96, /* group_by */ - YYSYMBOL_load_data_stmt = 97, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 98, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 99, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 100 /* opt_semicolon */ + YYSYMBOL_DATE_T = 28, /* DATE_T */ + YYSYMBOL_HELP = 29, /* HELP */ + YYSYMBOL_EXIT = 30, /* EXIT */ + YYSYMBOL_DOT = 31, /* DOT */ + YYSYMBOL_INTO = 32, /* INTO */ + YYSYMBOL_VALUES = 33, /* VALUES */ + YYSYMBOL_FROM = 34, /* FROM */ + YYSYMBOL_WHERE = 35, /* WHERE */ + YYSYMBOL_AND = 36, /* AND */ + YYSYMBOL_SET = 37, /* SET */ + YYSYMBOL_ON = 38, /* ON */ + YYSYMBOL_LOAD = 39, /* LOAD */ + YYSYMBOL_DATA = 40, /* DATA */ + YYSYMBOL_INFILE = 41, /* INFILE */ + YYSYMBOL_EXPLAIN = 42, /* EXPLAIN */ + YYSYMBOL_STORAGE = 43, /* STORAGE */ + YYSYMBOL_FORMAT = 44, /* FORMAT */ + YYSYMBOL_EQ = 45, /* EQ */ + YYSYMBOL_LT = 46, /* LT */ + YYSYMBOL_GT = 47, /* GT */ + YYSYMBOL_LE = 48, /* LE */ + YYSYMBOL_GE = 49, /* GE */ + YYSYMBOL_NE = 50, /* NE */ + YYSYMBOL_NUMBER = 51, /* NUMBER */ + YYSYMBOL_FLOAT = 52, /* FLOAT */ + YYSYMBOL_ID = 53, /* ID */ + YYSYMBOL_SSS = 54, /* SSS */ + YYSYMBOL_55_ = 55, /* '+' */ + YYSYMBOL_56_ = 56, /* '-' */ + YYSYMBOL_57_ = 57, /* '*' */ + YYSYMBOL_58_ = 58, /* '/' */ + YYSYMBOL_UMINUS = 59, /* UMINUS */ + YYSYMBOL_YYACCEPT = 60, /* $accept */ + YYSYMBOL_commands = 61, /* commands */ + YYSYMBOL_command_wrapper = 62, /* command_wrapper */ + YYSYMBOL_exit_stmt = 63, /* exit_stmt */ + YYSYMBOL_help_stmt = 64, /* help_stmt */ + YYSYMBOL_sync_stmt = 65, /* sync_stmt */ + YYSYMBOL_begin_stmt = 66, /* begin_stmt */ + YYSYMBOL_commit_stmt = 67, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 68, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 69, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 70, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 71, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 72, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 73, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 74, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 75, /* attr_def_list */ + YYSYMBOL_attr_def = 76, /* attr_def */ + YYSYMBOL_number = 77, /* number */ + YYSYMBOL_type = 78, /* type */ + YYSYMBOL_insert_stmt = 79, /* insert_stmt */ + YYSYMBOL_value_list = 80, /* value_list */ + YYSYMBOL_value = 81, /* value */ + YYSYMBOL_storage_format = 82, /* storage_format */ + YYSYMBOL_delete_stmt = 83, /* delete_stmt */ + YYSYMBOL_update_stmt = 84, /* update_stmt */ + YYSYMBOL_select_stmt = 85, /* select_stmt */ + YYSYMBOL_calc_stmt = 86, /* calc_stmt */ + YYSYMBOL_expression_list = 87, /* expression_list */ + YYSYMBOL_expression = 88, /* expression */ + YYSYMBOL_aggr_func_expr = 89, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 90, /* rel_attr */ + YYSYMBOL_relation = 91, /* relation */ + YYSYMBOL_rel_list = 92, /* rel_list */ + YYSYMBOL_where = 93, /* where */ + YYSYMBOL_condition_list = 94, /* condition_list */ + YYSYMBOL_condition = 95, /* condition */ + YYSYMBOL_comp_op = 96, /* comp_op */ + YYSYMBOL_group_by = 97, /* group_by */ + YYSYMBOL_load_data_stmt = 98, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 99, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 100, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 101 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -580,19 +581,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 146 +#define YYLAST 148 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 59 +#define YYNTOKENS 60 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 42 /* YYNRULES -- Number of rules. */ -#define YYNRULES 93 +#define YYNRULES 94 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 170 +#define YYNSTATES 171 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 309 +#define YYMAXUTOK 310 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -610,7 +611,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 56, 54, 2, 55, 2, 57, 2, 2, + 2, 2, 57, 55, 2, 56, 2, 58, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -636,23 +637,24 @@ static const yytype_int8 yytranslate[] = 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 58 + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 59 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 189, 189, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 220, 226, 231, 237, 243, 249, 255, - 262, 268, 276, 290, 300, 324, 327, 340, 348, 358, - 361, 362, 363, 366, 383, 386, 397, 401, 405, 414, - 417, 424, 436, 451, 476, 485, 490, 501, 504, 507, - 510, 513, 517, 520, 525, 531, 534, 540, 546, 551, - 561, 566, 571, 585, 588, 594, 597, 602, 609, 621, - 633, 645, 660, 661, 662, 663, 664, 665, 671, 676, - 689, 697, 707, 708 + 0, 190, 190, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 221, 227, 232, 238, 244, 250, 256, + 263, 269, 277, 291, 301, 325, 328, 341, 349, 359, + 362, 363, 364, 365, 368, 385, 388, 399, 403, 407, + 416, 419, 426, 438, 453, 478, 487, 492, 503, 506, + 509, 512, 515, 519, 522, 527, 533, 536, 542, 548, + 553, 563, 568, 573, 587, 590, 596, 599, 604, 611, + 623, 635, 647, 662, 663, 664, 665, 666, 667, 673, + 678, 691, 699, 709, 710 }; #endif @@ -672,19 +674,20 @@ static const char *const yytname[] = "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "STRING_T", - "FLOAT_T", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", - "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", - "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "NUMBER", "FLOAT", "ID", - "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", - "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", - "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", - "desc_table_stmt", "create_index_stmt", "drop_index_stmt", - "create_table_stmt", "attr_def_list", "attr_def", "number", "type", - "insert_stmt", "value_list", "value", "storage_format", "delete_stmt", - "update_stmt", "select_stmt", "calc_stmt", "expression_list", - "expression", "aggr_func_expr", "rel_attr", "relation", "rel_list", - "where", "condition_list", "condition", "comp_op", "group_by", - "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR + "FLOAT_T", "DATE_T", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", + "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", + "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "NUMBER", + "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", + "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", + "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", + "show_tables_stmt", "desc_table_stmt", "create_index_stmt", + "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", + "number", "type", "insert_stmt", "value_list", "value", "storage_format", + "delete_stmt", "update_stmt", "select_stmt", "calc_stmt", + "expression_list", "expression", "aggr_func_expr", "rel_attr", + "relation", "rel_list", "where", "condition_list", "condition", + "comp_op", "group_by", "load_data_stmt", "explain_stmt", + "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; static const char * @@ -708,23 +711,24 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 64, 4, 18, -6, -6, -41, 20, -101, 6, 2, - -14, -101, -101, -101, -101, -101, -10, 9, 64, 51, - 49, -101, -101, -101, -101, -101, -101, -101, -101, -101, + 65, 24, 25, -6, -6, -25, 20, -101, 5, 4, + -14, -101, -101, -101, -101, -101, -10, 9, 65, 52, + 50, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, 1, 10, 12, 19, -6, -101, -101, -15, -101, - -6, -101, -101, -101, 40, -101, -101, 41, -101, -101, - 31, 33, 36, 46, 58, -101, -101, -101, -101, 72, - 62, -101, 66, 3, -6, 52, -101, -6, -6, -6, - -6, -6, 54, 69, 73, 56, -26, 57, 59, 60, - 63, -101, 11, -101, -101, -40, -40, -101, -101, -101, - 88, 73, 95, -31, -101, 77, -101, 85, 7, 101, - 104, -101, -101, 54, -101, -26, 94, -39, -39, -101, - 90, -26, 118, -101, -101, -101, 108, 59, 109, 76, - -101, -101, 110, -101, -101, -101, -101, -101, -101, -31, - -31, -31, 73, 78, 82, 101, 91, 114, -26, 115, - -101, -101, -101, -101, -101, -101, -101, -101, 116, -101, - 96, -101, -101, 110, -101, -101, 93, -101, 86, -101 + -6, -101, -101, -101, 41, -101, -101, 57, -101, -101, + 21, 22, 47, 48, 45, -101, -101, -101, -101, 73, + 62, -101, 63, 3, -6, 53, -101, -6, -6, -6, + -6, -6, 55, 70, 74, 58, -37, 51, 59, 60, + 64, -101, 11, -101, -101, -46, -46, -101, -101, -101, + 89, 74, 96, -32, -101, 71, -101, 90, -1, 102, + 105, -101, -101, 55, -101, -37, 94, -40, -40, -101, + 91, -37, 118, -101, -101, -101, -101, 109, 59, 110, + 76, -101, -101, 111, -101, -101, -101, -101, -101, -101, + -32, -32, -32, 74, 78, 82, 102, 92, 114, -37, + 116, -101, -101, -101, -101, -101, -101, -101, -101, 117, + -101, 95, -101, -101, 111, -101, -101, 93, -101, 87, + -101 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -734,30 +738,31 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 92, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 93, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 46, 47, 68, 48, - 0, 65, 63, 54, 55, 66, 64, 0, 31, 30, - 0, 0, 0, 0, 0, 90, 1, 93, 2, 0, - 0, 29, 0, 0, 0, 0, 62, 0, 0, 0, - 0, 0, 0, 0, 73, 0, 0, 0, 0, 0, - 0, 61, 0, 69, 56, 57, 58, 59, 60, 70, - 71, 73, 0, 75, 51, 0, 91, 0, 0, 35, - 0, 33, 67, 0, 88, 0, 68, 0, 0, 74, - 76, 0, 0, 40, 41, 42, 38, 0, 0, 0, - 72, 53, 44, 82, 83, 84, 85, 86, 87, 0, - 0, 75, 73, 0, 0, 35, 49, 0, 0, 0, - 79, 81, 78, 80, 77, 52, 89, 39, 0, 36, - 0, 34, 32, 44, 43, 37, 0, 45, 0, 50 + 20, 0, 0, 0, 0, 0, 47, 48, 69, 49, + 0, 66, 64, 55, 56, 67, 65, 0, 31, 30, + 0, 0, 0, 0, 0, 91, 1, 94, 2, 0, + 0, 29, 0, 0, 0, 0, 63, 0, 0, 0, + 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, + 0, 62, 0, 70, 57, 58, 59, 60, 61, 71, + 72, 74, 0, 76, 52, 0, 92, 0, 0, 35, + 0, 33, 68, 0, 89, 0, 69, 0, 0, 75, + 77, 0, 0, 40, 41, 42, 43, 38, 0, 0, + 0, 73, 54, 45, 83, 84, 85, 86, 87, 88, + 0, 0, 76, 74, 0, 0, 35, 50, 0, 0, + 0, 80, 82, 79, 81, 78, 53, 90, 39, 0, + 36, 0, 34, 32, 45, 44, 37, 0, 46, 0, + 51 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -101, -101, 122, -101, -101, -101, -101, -101, -101, -101, + -101, -101, 123, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -3, 14, -101, -101, -101, - -20, -85, -101, -101, -101, -101, -101, -4, 39, -101, - -100, -101, 32, -99, 5, -101, 26, -101, -101, -101, + -20, -85, -101, -101, -101, -101, -101, -4, 40, -101, + -100, -101, 32, -99, 6, -101, 28, -101, -101, -101, -101, -101 }; @@ -765,9 +770,9 @@ static const yytype_int8 yypgoto[] = static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 128, 109, 158, 126, 33, - 149, 52, 161, 34, 35, 36, 37, 53, 54, 55, - 56, 100, 101, 104, 119, 120, 139, 131, 38, 39, + 28, 29, 30, 31, 32, 129, 109, 159, 127, 33, + 150, 52, 162, 34, 35, 36, 37, 53, 54, 55, + 56, 100, 101, 104, 119, 120, 140, 132, 38, 39, 40, 68 }; @@ -776,40 +781,40 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 57, 106, 114, 118, 74, 133, 134, 135, 136, 137, - 138, 58, 41, 45, 42, 75, 80, 81, 117, 46, - 47, 116, 49, 91, 46, 47, 43, 49, 44, 59, - 132, 112, 123, 124, 125, 61, 142, 60, 62, 151, - 153, 118, 63, 155, 46, 47, 48, 49, 64, 50, - 51, 66, 67, 69, 150, 152, 117, 78, 79, 80, - 81, 77, 70, 163, 71, 78, 79, 80, 81, 1, - 2, 72, 85, 94, 82, 3, 4, 5, 6, 7, - 8, 9, 10, 83, 73, 84, 11, 12, 13, 76, - 86, 88, 14, 15, 78, 79, 80, 81, 87, 89, - 16, 102, 17, 90, 93, 18, 99, 103, 105, 113, - 107, 108, 110, 92, 115, 111, 122, 95, 96, 97, - 98, 121, 127, 129, 75, 141, 143, 144, 147, 146, - 156, 148, 157, 160, 162, 164, 165, 168, 169, 166, - 65, 145, 159, 167, 140, 130, 154 + 57, 106, 114, 118, 74, 134, 135, 136, 137, 138, + 139, 80, 81, 45, 46, 47, 75, 49, 117, 46, + 47, 116, 49, 91, 123, 124, 125, 126, 58, 59, + 133, 112, 41, 43, 42, 44, 143, 60, 61, 62, + 152, 154, 118, 63, 156, 46, 47, 48, 49, 64, + 50, 51, 66, 67, 69, 151, 153, 117, 78, 79, + 80, 81, 77, 70, 164, 71, 78, 79, 80, 81, + 1, 2, 72, 94, 83, 84, 3, 4, 5, 6, + 7, 8, 9, 10, 85, 73, 87, 11, 12, 13, + 76, 82, 88, 86, 14, 15, 78, 79, 80, 81, + 89, 90, 16, 102, 17, 107, 93, 18, 99, 103, + 113, 105, 108, 110, 92, 115, 121, 111, 95, 96, + 97, 98, 122, 128, 130, 75, 144, 142, 145, 148, + 147, 157, 149, 158, 163, 161, 165, 166, 169, 167, + 170, 65, 146, 160, 168, 131, 141, 0, 155 }; -static const yytype_uint8 yycheck[] = +static const yytype_int16 yycheck[] = { - 4, 86, 101, 103, 19, 44, 45, 46, 47, 48, - 49, 52, 8, 19, 10, 30, 56, 57, 103, 50, - 51, 52, 53, 20, 50, 51, 8, 53, 10, 9, - 115, 20, 25, 26, 27, 33, 121, 31, 52, 139, - 140, 141, 52, 142, 50, 51, 52, 53, 39, 55, - 56, 0, 3, 52, 139, 140, 141, 54, 55, 56, - 57, 21, 52, 148, 52, 54, 55, 56, 57, 5, - 6, 52, 36, 77, 33, 11, 12, 13, 14, 15, - 16, 17, 18, 52, 45, 52, 22, 23, 24, 50, - 44, 19, 28, 29, 54, 55, 56, 57, 40, 37, - 36, 32, 38, 37, 52, 41, 52, 34, 52, 21, - 53, 52, 52, 74, 19, 52, 31, 78, 79, 80, - 81, 44, 21, 19, 30, 35, 8, 19, 52, 20, - 52, 21, 50, 42, 20, 20, 20, 44, 52, 43, - 18, 127, 145, 163, 118, 113, 141 + 4, 86, 101, 103, 19, 45, 46, 47, 48, 49, + 50, 57, 58, 19, 51, 52, 31, 54, 103, 51, + 52, 53, 54, 20, 25, 26, 27, 28, 53, 9, + 115, 20, 8, 8, 10, 10, 121, 32, 34, 53, + 140, 141, 142, 53, 143, 51, 52, 53, 54, 40, + 56, 57, 0, 3, 53, 140, 141, 142, 55, 56, + 57, 58, 21, 53, 149, 53, 55, 56, 57, 58, + 5, 6, 53, 77, 53, 53, 11, 12, 13, 14, + 15, 16, 17, 18, 37, 45, 41, 22, 23, 24, + 50, 34, 19, 45, 29, 30, 55, 56, 57, 58, + 38, 38, 37, 33, 39, 54, 53, 42, 53, 35, + 21, 53, 53, 53, 74, 19, 45, 53, 78, 79, + 80, 81, 32, 21, 19, 31, 8, 36, 19, 53, + 20, 53, 21, 51, 20, 43, 20, 20, 45, 44, + 53, 18, 128, 146, 164, 113, 118, -1, 142 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -817,37 +822,38 @@ static const yytype_uint8 yycheck[] = static const yytype_int8 yystos[] = { 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, - 18, 22, 23, 24, 28, 29, 36, 38, 41, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 78, 82, 83, 84, 85, 97, 98, - 99, 8, 10, 8, 10, 19, 50, 51, 52, 53, - 55, 56, 80, 86, 87, 88, 89, 86, 52, 9, - 31, 33, 52, 52, 39, 61, 0, 3, 100, 52, - 52, 52, 52, 87, 19, 30, 87, 21, 54, 55, - 56, 57, 33, 52, 52, 36, 44, 40, 19, 37, - 37, 20, 87, 52, 86, 87, 87, 87, 87, 52, - 90, 91, 32, 34, 92, 52, 80, 53, 52, 75, - 52, 52, 20, 21, 92, 19, 52, 80, 89, 93, - 94, 44, 31, 25, 26, 27, 77, 21, 74, 19, - 91, 96, 80, 44, 45, 46, 47, 48, 49, 95, - 95, 35, 80, 8, 19, 75, 20, 52, 21, 79, - 80, 89, 80, 89, 93, 92, 52, 50, 76, 74, - 42, 81, 20, 80, 20, 20, 43, 79, 44, 52 + 18, 22, 23, 24, 29, 30, 37, 39, 42, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 79, 83, 84, 85, 86, 98, 99, + 100, 8, 10, 8, 10, 19, 51, 52, 53, 54, + 56, 57, 81, 87, 88, 89, 90, 87, 53, 9, + 32, 34, 53, 53, 40, 62, 0, 3, 101, 53, + 53, 53, 53, 88, 19, 31, 88, 21, 55, 56, + 57, 58, 34, 53, 53, 37, 45, 41, 19, 38, + 38, 20, 88, 53, 87, 88, 88, 88, 88, 53, + 91, 92, 33, 35, 93, 53, 81, 54, 53, 76, + 53, 53, 20, 21, 93, 19, 53, 81, 90, 94, + 95, 45, 32, 25, 26, 27, 28, 78, 21, 75, + 19, 92, 97, 81, 45, 46, 47, 48, 49, 50, + 96, 96, 36, 81, 8, 19, 76, 20, 53, 21, + 80, 81, 90, 81, 90, 94, 93, 53, 51, 77, + 75, 43, 82, 20, 81, 20, 20, 44, 80, 45, + 53 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 59, 60, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 74, 75, 75, 76, - 77, 77, 77, 78, 79, 79, 80, 80, 80, 81, - 81, 82, 83, 84, 85, 86, 86, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 88, 89, 89, - 90, 91, 91, 92, 92, 93, 93, 93, 94, 94, - 94, 94, 95, 95, 95, 95, 95, 95, 96, 97, - 98, 99, 100, 100 + 0, 60, 61, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 75, 76, 76, 77, + 78, 78, 78, 78, 79, 80, 80, 81, 81, 81, + 82, 82, 83, 84, 85, 86, 87, 87, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 89, 90, + 90, 91, 92, 92, 93, 93, 94, 94, 94, 95, + 95, 95, 95, 96, 96, 96, 96, 96, 96, 97, + 98, 99, 100, 101, 101 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -857,12 +863,12 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 8, 5, 8, 0, 3, 5, 2, 1, - 1, 1, 1, 8, 0, 3, 1, 1, 1, 0, - 4, 4, 7, 6, 2, 1, 3, 3, 3, 3, - 3, 3, 2, 1, 1, 1, 1, 4, 1, 3, - 1, 1, 3, 0, 2, 0, 1, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 0, 7, - 2, 4, 0, 1 + 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, + 0, 4, 4, 7, 6, 2, 1, 3, 3, 3, + 3, 3, 3, 2, 1, 1, 1, 1, 4, 1, + 3, 1, 1, 3, 0, 2, 0, 1, 3, 3, + 3, 3, 3, 1, 1, 1, 1, 1, 1, 0, + 7, 2, 4, 0, 1 }; @@ -1724,93 +1730,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 190 "yacc_sql.y" +#line 191 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1733 "yacc_sql.cpp" +#line 1739 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 220 "yacc_sql.y" +#line 221 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1742 "yacc_sql.cpp" +#line 1748 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 226 "yacc_sql.y" +#line 227 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1750 "yacc_sql.cpp" +#line 1756 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 231 "yacc_sql.y" +#line 232 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1758 "yacc_sql.cpp" +#line 1764 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 237 "yacc_sql.y" +#line 238 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1766 "yacc_sql.cpp" +#line 1772 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 243 "yacc_sql.y" +#line 244 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1774 "yacc_sql.cpp" +#line 1780 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 249 "yacc_sql.y" +#line 250 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1782 "yacc_sql.cpp" +#line 1788 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 255 "yacc_sql.y" +#line 256 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1792 "yacc_sql.cpp" +#line 1798 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 262 "yacc_sql.y" +#line 263 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1800 "yacc_sql.cpp" +#line 1806 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 268 "yacc_sql.y" +#line 269 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1810 "yacc_sql.cpp" +#line 1816 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 277 "yacc_sql.y" +#line 278 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1821,11 +1827,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1825 "yacc_sql.cpp" +#line 1831 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 291 "yacc_sql.y" +#line 292 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1833,11 +1839,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1837 "yacc_sql.cpp" +#line 1843 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 301 "yacc_sql.y" +#line 302 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1858,19 +1864,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1862 "yacc_sql.cpp" +#line 1868 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 324 "yacc_sql.y" +#line 325 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1870 "yacc_sql.cpp" +#line 1876 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 328 "yacc_sql.y" +#line 329 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1880,11 +1886,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1884 "yacc_sql.cpp" +#line 1890 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE */ -#line 341 "yacc_sql.y" +#line 342 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-3].number); @@ -1892,11 +1898,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = (yyvsp[-1].number); free((yyvsp[-4].string)); } -#line 1896 "yacc_sql.cpp" +#line 1902 "yacc_sql.cpp" break; case 38: /* attr_def: ID type */ -#line 349 "yacc_sql.y" +#line 350 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[0].number); @@ -1904,35 +1910,41 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; free((yyvsp[-1].string)); } -#line 1908 "yacc_sql.cpp" +#line 1914 "yacc_sql.cpp" break; case 39: /* number: NUMBER */ -#line 358 "yacc_sql.y" +#line 359 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1914 "yacc_sql.cpp" +#line 1920 "yacc_sql.cpp" break; case 40: /* type: INT_T */ -#line 361 "yacc_sql.y" +#line 362 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1920 "yacc_sql.cpp" +#line 1926 "yacc_sql.cpp" break; case 41: /* type: STRING_T */ -#line 362 "yacc_sql.y" +#line 363 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1926 "yacc_sql.cpp" +#line 1932 "yacc_sql.cpp" break; case 42: /* type: FLOAT_T */ -#line 363 "yacc_sql.y" +#line 364 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1932 "yacc_sql.cpp" +#line 1938 "yacc_sql.cpp" + break; + + case 43: /* type: DATE_T */ +#line 365 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 1944 "yacc_sql.cpp" break; - case 43: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 367 "yacc_sql.y" + case 44: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ +#line 369 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1945,19 +1957,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1949 "yacc_sql.cpp" +#line 1961 "yacc_sql.cpp" break; - case 44: /* value_list: %empty */ -#line 383 "yacc_sql.y" + case 45: /* value_list: %empty */ +#line 385 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 1957 "yacc_sql.cpp" +#line 1969 "yacc_sql.cpp" break; - case 45: /* value_list: COMMA value value_list */ -#line 386 "yacc_sql.y" + case 46: /* value_list: COMMA value value_list */ +#line 388 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -1967,56 +1979,56 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1971 "yacc_sql.cpp" +#line 1983 "yacc_sql.cpp" break; - case 46: /* value: NUMBER */ -#line 397 "yacc_sql.y" + case 47: /* value: NUMBER */ +#line 399 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 1980 "yacc_sql.cpp" +#line 1992 "yacc_sql.cpp" break; - case 47: /* value: FLOAT */ -#line 401 "yacc_sql.y" + case 48: /* value: FLOAT */ +#line 403 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 1989 "yacc_sql.cpp" +#line 2001 "yacc_sql.cpp" break; - case 48: /* value: SSS */ -#line 405 "yacc_sql.y" + case 49: /* value: SSS */ +#line 407 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2000 "yacc_sql.cpp" +#line 2012 "yacc_sql.cpp" break; - case 49: /* storage_format: %empty */ -#line 414 "yacc_sql.y" + case 50: /* storage_format: %empty */ +#line 416 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2008 "yacc_sql.cpp" +#line 2020 "yacc_sql.cpp" break; - case 50: /* storage_format: STORAGE FORMAT EQ ID */ -#line 418 "yacc_sql.y" + case 51: /* storage_format: STORAGE FORMAT EQ ID */ +#line 420 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2016 "yacc_sql.cpp" +#line 2028 "yacc_sql.cpp" break; - case 51: /* delete_stmt: DELETE FROM ID where */ -#line 425 "yacc_sql.y" + case 52: /* delete_stmt: DELETE FROM ID where */ +#line 427 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2026,11 +2038,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2030 "yacc_sql.cpp" +#line 2042 "yacc_sql.cpp" break; - case 52: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 437 "yacc_sql.y" + case 53: /* update_stmt: UPDATE ID SET ID EQ value where */ +#line 439 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2043,11 +2055,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2047 "yacc_sql.cpp" +#line 2059 "yacc_sql.cpp" break; - case 53: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 452 "yacc_sql.y" + case 54: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 454 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2070,30 +2082,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2074 "yacc_sql.cpp" +#line 2086 "yacc_sql.cpp" break; - case 54: /* calc_stmt: CALC expression_list */ -#line 477 "yacc_sql.y" + case 55: /* calc_stmt: CALC expression_list */ +#line 479 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2084 "yacc_sql.cpp" +#line 2096 "yacc_sql.cpp" break; - case 55: /* expression_list: expression */ -#line 486 "yacc_sql.y" + case 56: /* expression_list: expression */ +#line 488 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2093 "yacc_sql.cpp" +#line 2105 "yacc_sql.cpp" break; - case 56: /* expression_list: expression COMMA expression_list */ -#line 491 "yacc_sql.y" + case 57: /* expression_list: expression COMMA expression_list */ +#line 493 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2102,115 +2114,115 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2106 "yacc_sql.cpp" +#line 2118 "yacc_sql.cpp" break; - case 57: /* expression: expression '+' expression */ -#line 501 "yacc_sql.y" + case 58: /* expression: expression '+' expression */ +#line 503 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2114 "yacc_sql.cpp" +#line 2126 "yacc_sql.cpp" break; - case 58: /* expression: expression '-' expression */ -#line 504 "yacc_sql.y" + case 59: /* expression: expression '-' expression */ +#line 506 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2122 "yacc_sql.cpp" +#line 2134 "yacc_sql.cpp" break; - case 59: /* expression: expression '*' expression */ -#line 507 "yacc_sql.y" + case 60: /* expression: expression '*' expression */ +#line 509 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2130 "yacc_sql.cpp" +#line 2142 "yacc_sql.cpp" break; - case 60: /* expression: expression '/' expression */ -#line 510 "yacc_sql.y" + case 61: /* expression: expression '/' expression */ +#line 512 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2138 "yacc_sql.cpp" +#line 2150 "yacc_sql.cpp" break; - case 61: /* expression: LBRACE expression RBRACE */ -#line 513 "yacc_sql.y" + case 62: /* expression: LBRACE expression RBRACE */ +#line 515 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2147 "yacc_sql.cpp" +#line 2159 "yacc_sql.cpp" break; - case 62: /* expression: '-' expression */ -#line 517 "yacc_sql.y" + case 63: /* expression: '-' expression */ +#line 519 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2155 "yacc_sql.cpp" +#line 2167 "yacc_sql.cpp" break; - case 63: /* expression: value */ -#line 520 "yacc_sql.y" + case 64: /* expression: value */ +#line 522 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2165 "yacc_sql.cpp" +#line 2177 "yacc_sql.cpp" break; - case 64: /* expression: rel_attr */ -#line 525 "yacc_sql.y" + case 65: /* expression: rel_attr */ +#line 527 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2176 "yacc_sql.cpp" +#line 2188 "yacc_sql.cpp" break; - case 65: /* expression: '*' */ -#line 531 "yacc_sql.y" + case 66: /* expression: '*' */ +#line 533 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2184 "yacc_sql.cpp" +#line 2196 "yacc_sql.cpp" break; - case 66: /* expression: aggr_func_expr */ -#line 534 "yacc_sql.y" + case 67: /* expression: aggr_func_expr */ +#line 536 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2192 "yacc_sql.cpp" +#line 2204 "yacc_sql.cpp" break; - case 67: /* aggr_func_expr: ID LBRACE expression RBRACE */ -#line 541 "yacc_sql.y" + case 68: /* aggr_func_expr: ID LBRACE expression RBRACE */ +#line 543 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), (yyvsp[-1].expression)); } -#line 2200 "yacc_sql.cpp" +#line 2212 "yacc_sql.cpp" break; - case 68: /* rel_attr: ID */ -#line 546 "yacc_sql.y" + case 69: /* rel_attr: ID */ +#line 548 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2210 "yacc_sql.cpp" +#line 2222 "yacc_sql.cpp" break; - case 69: /* rel_attr: ID DOT ID */ -#line 551 "yacc_sql.y" + case 70: /* rel_attr: ID DOT ID */ +#line 553 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2218,29 +2230,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2222 "yacc_sql.cpp" +#line 2234 "yacc_sql.cpp" break; - case 70: /* relation: ID */ -#line 561 "yacc_sql.y" + case 71: /* relation: ID */ +#line 563 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2230 "yacc_sql.cpp" +#line 2242 "yacc_sql.cpp" break; - case 71: /* rel_list: relation */ -#line 566 "yacc_sql.y" + case 72: /* rel_list: relation */ +#line 568 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2240 "yacc_sql.cpp" +#line 2252 "yacc_sql.cpp" break; - case 72: /* rel_list: relation COMMA rel_list */ -#line 571 "yacc_sql.y" + case 73: /* rel_list: relation COMMA rel_list */ +#line 573 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2251,55 +2263,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2255 "yacc_sql.cpp" +#line 2267 "yacc_sql.cpp" break; - case 73: /* where: %empty */ -#line 585 "yacc_sql.y" + case 74: /* where: %empty */ +#line 587 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2263 "yacc_sql.cpp" +#line 2275 "yacc_sql.cpp" break; - case 74: /* where: WHERE condition_list */ -#line 588 "yacc_sql.y" + case 75: /* where: WHERE condition_list */ +#line 590 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2271 "yacc_sql.cpp" +#line 2283 "yacc_sql.cpp" break; - case 75: /* condition_list: %empty */ -#line 594 "yacc_sql.y" + case 76: /* condition_list: %empty */ +#line 596 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2279 "yacc_sql.cpp" +#line 2291 "yacc_sql.cpp" break; - case 76: /* condition_list: condition */ -#line 597 "yacc_sql.y" + case 77: /* condition_list: condition */ +#line 599 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2289 "yacc_sql.cpp" +#line 2301 "yacc_sql.cpp" break; - case 77: /* condition_list: condition AND condition_list */ -#line 602 "yacc_sql.y" + case 78: /* condition_list: condition AND condition_list */ +#line 604 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2299 "yacc_sql.cpp" +#line 2311 "yacc_sql.cpp" break; - case 78: /* condition: rel_attr comp_op value */ -#line 610 "yacc_sql.y" + case 79: /* condition: rel_attr comp_op value */ +#line 612 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2311,11 +2323,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2315 "yacc_sql.cpp" +#line 2327 "yacc_sql.cpp" break; - case 79: /* condition: value comp_op value */ -#line 622 "yacc_sql.y" + case 80: /* condition: value comp_op value */ +#line 624 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2327,11 +2339,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2331 "yacc_sql.cpp" +#line 2343 "yacc_sql.cpp" break; - case 80: /* condition: rel_attr comp_op rel_attr */ -#line 634 "yacc_sql.y" + case 81: /* condition: rel_attr comp_op rel_attr */ +#line 636 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2343,11 +2355,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2347 "yacc_sql.cpp" +#line 2359 "yacc_sql.cpp" break; - case 81: /* condition: value comp_op rel_attr */ -#line 646 "yacc_sql.y" + case 82: /* condition: value comp_op rel_attr */ +#line 648 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2359,55 +2371,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2363 "yacc_sql.cpp" +#line 2375 "yacc_sql.cpp" break; - case 82: /* comp_op: EQ */ -#line 660 "yacc_sql.y" + case 83: /* comp_op: EQ */ +#line 662 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2369 "yacc_sql.cpp" +#line 2381 "yacc_sql.cpp" break; - case 83: /* comp_op: LT */ -#line 661 "yacc_sql.y" + case 84: /* comp_op: LT */ +#line 663 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2375 "yacc_sql.cpp" +#line 2387 "yacc_sql.cpp" break; - case 84: /* comp_op: GT */ -#line 662 "yacc_sql.y" + case 85: /* comp_op: GT */ +#line 664 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2381 "yacc_sql.cpp" +#line 2393 "yacc_sql.cpp" break; - case 85: /* comp_op: LE */ -#line 663 "yacc_sql.y" + case 86: /* comp_op: LE */ +#line 665 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2387 "yacc_sql.cpp" +#line 2399 "yacc_sql.cpp" break; - case 86: /* comp_op: GE */ -#line 664 "yacc_sql.y" + case 87: /* comp_op: GE */ +#line 666 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2393 "yacc_sql.cpp" +#line 2405 "yacc_sql.cpp" break; - case 87: /* comp_op: NE */ -#line 665 "yacc_sql.y" + case 88: /* comp_op: NE */ +#line 667 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2399 "yacc_sql.cpp" +#line 2411 "yacc_sql.cpp" break; - case 88: /* group_by: %empty */ -#line 671 "yacc_sql.y" + case 89: /* group_by: %empty */ +#line 673 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2407 "yacc_sql.cpp" +#line 2419 "yacc_sql.cpp" break; - case 89: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 677 "yacc_sql.y" + case 90: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 679 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2417,20 +2429,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2421 "yacc_sql.cpp" +#line 2433 "yacc_sql.cpp" break; - case 90: /* explain_stmt: EXPLAIN command_wrapper */ -#line 690 "yacc_sql.y" + case 91: /* explain_stmt: EXPLAIN command_wrapper */ +#line 692 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2430 "yacc_sql.cpp" +#line 2442 "yacc_sql.cpp" break; - case 91: /* set_variable_stmt: SET ID EQ value */ -#line 698 "yacc_sql.y" + case 92: /* set_variable_stmt: SET ID EQ value */ +#line 700 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2438,11 +2450,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2442 "yacc_sql.cpp" +#line 2454 "yacc_sql.cpp" break; -#line 2446 "yacc_sql.cpp" +#line 2458 "yacc_sql.cpp" default: break; } @@ -2671,7 +2683,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 710 "yacc_sql.y" +#line 712 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); From 0869c54a7ab535ad5daf65e77050e316a7cb0c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 25 Sep 2024 18:12:33 +0000 Subject: [PATCH 011/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dagg=E4=B8=AD=E6=AF=94?= =?UTF-8?q?=E8=BE=83=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/aggregator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/expr/aggregator.h b/src/observer/sql/expr/aggregator.h index b7c94b6d..42e6c474 100644 --- a/src/observer/sql/expr/aggregator.h +++ b/src/observer/sql/expr/aggregator.h @@ -105,7 +105,7 @@ class MaxAggregator : public Aggregator return RC::SUCCESS; } // 更新最大值 - if (value.get_float() > value_.get_float()) { // 假设是 float 类型 + if (value.compare(value_)>0) { value_ = value; } return RC::SUCCESS; @@ -133,7 +133,7 @@ class MinAggregator : public Aggregator } // 更新最小值 - if (value.get_float() < value_.get_float()) { // 假设是 float 类型 + if (value.compare(value_)<0) { value_ = value; } return RC::SUCCESS; From 30147396d20095046222b76882ad908fe23855f7 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 02:32:53 +0800 Subject: [PATCH 012/308] =?UTF-8?q?=E6=96=B0=E5=A2=9ENullType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.h | 1 + src/observer/common/type/data_type.cpp | 1 + src/observer/common/type/null_type.cpp | 72 ++++ src/observer/common/type/null_type.h | 27 ++ src/observer/common/value.cpp | 10 + src/observer/common/value.h | 7 + src/observer/sql/parser/yacc_sql.cpp | 536 +++++++++++++------------ src/observer/sql/parser/yacc_sql.y | 3 + 8 files changed, 394 insertions(+), 263 deletions(-) create mode 100644 src/observer/common/type/null_type.cpp create mode 100644 src/observer/common/type/null_type.h diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index b1b9a582..5549a7dd 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -22,6 +22,7 @@ enum class AttrType FLOATS, ///< 浮点数类型(4字节) BOOLEANS, ///< boolean类型,当前不是由parser解析出来的,是程序内部使用的 DATES, ///< 日期类型(4字节) + NULLS, ///< 空字段(1字节) MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; diff --git a/src/observer/common/type/data_type.cpp b/src/observer/common/type/data_type.cpp index dce24795..4020524b 100644 --- a/src/observer/common/type/data_type.cpp +++ b/src/observer/common/type/data_type.cpp @@ -20,5 +20,6 @@ array, static_cast(AttrType::MAXTYPE)> DataType::type_ make_unique(), make_unique(), make_unique(AttrType::BOOLEANS), + make_unique(AttrType::NULLS), make_unique(), }; diff --git a/src/observer/common/type/null_type.cpp b/src/observer/common/type/null_type.cpp new file mode 100644 index 00000000..87fbedb6 --- /dev/null +++ b/src/observer/common/type/null_type.cpp @@ -0,0 +1,72 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +#include "common/lang/comparator.h" +#include "common/lang/sstream.h" +#include "common/log/log.h" +#include "null_type.h" +#include "common/value.h" + +int NullType::compare(const Value &left, const Value &right) const +{ + ASSERT(left.attr_type() == AttrType::NULLS, "left type is not a null"); + ASSERT(right.attr_type() == AttrType::NULLS, "right type is not a null"); + if (right.attr_type() == AttrType::NULLS) { + return 0; + } + return INT32_MAX; +} + +RC NullType::to_string(const Value &val, string &result) const +{ + result = "NULL"; + return RC::SUCCESS; +} + +RC NullType::cast_to(const Value &val, AttrType type, Value &result) const +{ + ASSERT(val.attr_type() == AttrType::NULLS, "val type is not a null"); + switch (type) { + case AttrType::UNDEFINED: { + return RC::UNIMPLEMENTED; + } + case AttrType::CHARS: { + result.set_string(""); + break; + } + case AttrType::INTS: { + result.set_int(0); + break; + } + case AttrType::FLOATS: { + result.set_float(0.f); + break; + } + case AttrType::BOOLEANS: { + result.set_boolean(false); + break; + } + case AttrType::DATES: { + result.set_date(0); + break; + } + case AttrType::NULLS: { + result.set_null(); + break; + } + case AttrType::MAXTYPE: { + return RC::UNIMPLEMENTED; + } + default: { + return RC::UNIMPLEMENTED; + } + } + return RC::SUCCESS; +} diff --git a/src/observer/common/type/null_type.h b/src/observer/common/type/null_type.h new file mode 100644 index 00000000..7b959184 --- /dev/null +++ b/src/observer/common/type/null_type.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +#pragma once + +#include "common/type/data_type.h" + +class NullType : public DataType +{ + NullType() : DataType(AttrType::NULLS) {} + + ~NullType() override {} + + int compare(const Value &left, const Value &right) const override; + + RC to_string(const Value &val, string &result) const override; + + RC cast_to(const Value &val, AttrType type, Value &result) const override; +}; + diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 19f72975..581d54c9 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -20,6 +20,8 @@ See the Mulan PSL v2 for more details. */ #include "common/lang/string.h" #include "common/log/log.h" +Value::Value(NullValue) : attr_type_(AttrType::NULLS) { set_null(); } + Value::Value(int val) { set_int(val); } Value::Value(float val) { set_float(val); } @@ -135,6 +137,14 @@ void Value::set_data(char *data, int length) } } +void Value::set_null() +{ + reset(); + attr_type_ = AttrType::INTS; + length_ = 0; + value_.is_null_ = true; +} + void Value::set_int(int val) { reset(); diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 9468e499..b5bbbc36 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -20,6 +20,9 @@ See the Mulan PSL v2 for more details. */ #include "common/type/data_type.h" #include "common/type/date_type.h" +class NullValue +{}; + /** * @brief 属性的值 * @ingroup DataType @@ -36,6 +39,7 @@ class Value final friend class BooleanType; friend class CharType; friend class DateType; + friend class NullType; Value() = default; @@ -43,6 +47,7 @@ class Value final Value(AttrType attr_type, char *data, int length = 4) : attr_type_(attr_type) { this->set_data(data, length); } + explicit Value(NullValue); explicit Value(int val); explicit Value(float val); explicit Value(bool val); @@ -112,6 +117,7 @@ class Value final bool get_boolean() const; private: + void set_null(); void set_int(int val); void set_float(float val); void set_date(int val); @@ -124,6 +130,7 @@ class Value final union Val { + bool is_null_ = false; int32_t int_value_; float float_value_; bool bool_value_; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 02f4860c..ff9738df 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -582,18 +582,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 65 +#define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 145 +#define YYLAST 151 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 63 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 42 /* YYNRULES -- Number of rules. */ -#define YYNRULES 95 +#define YYNRULES 96 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 171 +#define YYNSTATES 172 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 313 @@ -653,11 +653,11 @@ static const yytype_int16 yyrline[] = 219, 220, 221, 225, 231, 236, 242, 248, 254, 260, 267, 273, 281, 295, 305, 329, 332, 345, 354, 366, 370, 375, 381, 384, 385, 386, 387, 390, 407, 410, - 421, 425, 429, 438, 441, 448, 460, 475, 500, 509, - 514, 525, 528, 531, 534, 537, 541, 544, 549, 555, - 562, 567, 577, 582, 587, 601, 604, 610, 613, 618, - 625, 637, 649, 661, 676, 677, 678, 679, 680, 681, - 687, 692, 705, 713, 723, 724 + 421, 425, 429, 435, 441, 444, 451, 463, 478, 503, + 512, 517, 528, 531, 534, 537, 540, 544, 547, 552, + 558, 565, 570, 580, 585, 590, 604, 607, 613, 616, + 621, 628, 640, 652, 664, 679, 680, 681, 682, 683, + 684, 690, 695, 708, 716, 726, 727 }; #endif @@ -700,7 +700,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-91) +#define YYPACT_NINF (-92) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -714,24 +714,24 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 44, 6, 21, -17, -17, -22, 27, -91, 16, 4, - 23, -91, -91, -91, -91, -91, 24, 22, 44, 81, - 79, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, 29, 31, 32, 34, -17, -91, -91, 57, -91, - -17, -91, -91, -91, 14, -91, 55, -91, -91, 37, - 38, 56, 47, 53, -91, -91, -91, -91, 82, 61, - -91, 62, -14, 48, -91, -17, -17, -17, -17, -17, - 49, 70, 69, 52, -50, 58, 60, 63, 64, -91, - -91, -91, 9, 9, -91, -91, -91, 92, 69, 95, - -45, -91, 73, -91, 83, -1, 96, 103, -91, 49, - -91, -50, -30, -30, -91, 84, -50, 116, -91, -91, - -91, -91, -16, 60, 105, 71, -91, -91, 107, -91, - -91, -91, -91, -91, -91, -45, -45, -45, 69, 74, - 72, 99, -91, -91, 96, 85, 112, -50, 113, -91, - -91, -91, -91, -91, -91, -91, -91, 114, -91, -91, - 88, -91, -91, 107, -91, 1, 89, -91, -91, 80, - -91 + 44, 16, 17, -17, -17, -53, -2, -92, -20, -1, + -21, -92, -92, -92, -92, -92, -5, 40, 44, 85, + 84, -92, -92, -92, -92, -92, -92, -92, -92, -92, + -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, + -92, 35, 36, 38, 39, -17, -92, -92, -92, 56, + -92, -17, -92, -92, -92, 20, -92, 59, -92, -92, + 45, 46, 53, 51, 60, -92, -92, -92, -92, 86, + 62, -92, 65, -14, 52, -92, -17, -17, -17, -17, + -17, 54, 71, 73, 57, 43, 55, 63, 64, 66, + -92, -92, -92, 14, 14, -92, -92, -92, 88, 73, + 99, -25, -92, 75, -92, 89, -16, 100, 106, -92, + 54, -92, 43, -30, -30, -92, 87, 43, 119, -92, + -92, -92, -92, -15, 63, 108, 74, -92, -92, 110, + -92, -92, -92, -92, -92, -92, -25, -25, -25, 73, + 76, 79, 104, -92, -92, 100, 83, 115, 43, 116, + -92, -92, -92, -92, -92, -92, -92, -92, 117, -92, + -92, 91, -92, -92, 110, -92, 34, 92, -92, -92, + 90, -92 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -741,42 +741,42 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 94, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 95, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 50, 51, 70, 52, - 0, 69, 67, 58, 59, 68, 0, 31, 30, 0, - 0, 0, 0, 0, 92, 1, 95, 2, 0, 0, - 29, 0, 0, 0, 66, 0, 0, 0, 0, 0, - 0, 0, 75, 0, 0, 0, 0, 0, 0, 65, - 71, 60, 61, 62, 63, 64, 72, 73, 75, 0, - 77, 55, 0, 93, 0, 0, 35, 0, 33, 0, - 90, 0, 0, 0, 76, 78, 0, 0, 43, 44, - 45, 46, 41, 0, 0, 0, 74, 57, 48, 84, - 85, 86, 87, 88, 89, 0, 0, 77, 75, 0, - 0, 0, 40, 38, 35, 53, 0, 0, 0, 81, - 83, 80, 82, 79, 56, 91, 42, 0, 39, 36, - 0, 34, 32, 48, 47, 41, 0, 49, 37, 0, - 54 + 20, 0, 0, 0, 0, 0, 53, 50, 51, 71, + 52, 0, 70, 68, 59, 60, 69, 0, 31, 30, + 0, 0, 0, 0, 0, 93, 1, 96, 2, 0, + 0, 29, 0, 0, 0, 67, 0, 0, 0, 0, + 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, + 66, 72, 61, 62, 63, 64, 65, 73, 74, 76, + 0, 78, 56, 0, 94, 0, 0, 35, 0, 33, + 0, 91, 0, 0, 0, 77, 79, 0, 0, 43, + 44, 45, 46, 41, 0, 0, 0, 75, 58, 48, + 85, 86, 87, 88, 89, 90, 0, 0, 78, 76, + 0, 0, 0, 40, 38, 35, 54, 0, 0, 0, + 82, 84, 81, 83, 80, 57, 92, 42, 0, 39, + 36, 0, 34, 32, 48, 47, 41, 0, 49, 37, + 0, 55 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -91, -91, 120, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -5, 17, -24, -91, -91, - -91, -21, -83, -91, -91, -91, -91, -91, -4, 33, - -37, -91, 35, -90, 8, -91, 30, -91, -91, -91, - -91, -91 + -92, -92, 121, -92, -92, -92, -92, -92, -92, -92, + -92, -92, -92, -92, -92, -3, 19, -22, -92, -92, + -92, -23, -84, -92, -92, -92, -92, -92, -4, 37, + -67, -92, 41, -91, 7, -92, 33, -92, -92, -92, + -92, -92 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 124, 106, 143, 157, 122, - 33, 148, 52, 161, 34, 35, 36, 37, 53, 54, - 55, 97, 98, 101, 114, 115, 135, 127, 38, 39, - 40, 67 + 28, 29, 30, 31, 32, 125, 107, 144, 158, 123, + 33, 149, 53, 162, 34, 35, 36, 37, 54, 55, + 56, 98, 99, 102, 115, 116, 136, 128, 38, 39, + 40, 68 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -784,40 +784,42 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 56, 103, 45, 140, 46, 47, 89, 49, 110, 46, - 47, 48, 49, 141, 41, 142, 42, 112, 129, 130, - 131, 132, 133, 134, 118, 119, 120, 121, 128, 43, - 141, 44, 142, 138, 57, 75, 58, 46, 47, 48, - 49, 60, 50, 51, 76, 77, 78, 79, 154, 1, - 2, 59, 149, 151, 112, 3, 4, 5, 6, 7, - 8, 9, 10, 113, 163, 63, 11, 12, 13, 78, - 79, 91, 76, 77, 78, 79, 14, 15, 72, 61, - 62, 65, 66, 74, 16, 68, 17, 69, 70, 18, - 71, 73, 80, 81, 82, 84, 83, 85, 150, 152, - 113, 86, 87, 88, 90, 96, 99, 100, 102, 92, - 93, 94, 95, 109, 111, 104, 105, 123, 117, 107, - 108, 116, 125, 137, 139, 145, 156, 146, 147, 158, - 155, 160, 162, 164, 165, 166, 170, 169, 64, 159, - 144, 168, 167, 136, 126, 153 + 57, 104, 45, 58, 141, 46, 90, 59, 111, 119, + 120, 121, 122, 46, 142, 60, 143, 113, 130, 131, + 132, 133, 134, 135, 41, 43, 42, 44, 129, 47, + 48, 49, 50, 139, 114, 62, 61, 47, 48, 49, + 50, 76, 51, 52, 77, 78, 79, 80, 155, 1, + 2, 63, 150, 152, 113, 3, 4, 5, 6, 7, + 8, 9, 10, 142, 164, 143, 11, 12, 13, 151, + 153, 114, 92, 46, 79, 80, 14, 15, 77, 78, + 79, 80, 73, 64, 16, 66, 17, 67, 75, 18, + 74, 69, 70, 84, 71, 72, 81, 47, 48, 85, + 50, 82, 83, 88, 86, 87, 89, 100, 91, 110, + 97, 101, 105, 103, 93, 94, 95, 96, 112, 106, + 108, 124, 109, 117, 118, 126, 138, 140, 146, 161, + 147, 148, 156, 157, 159, 163, 165, 166, 167, 65, + 170, 168, 160, 145, 169, 154, 171, 137, 0, 0, + 0, 127 }; -static const yytype_uint8 yycheck[] = +static const yytype_int16 yycheck[] = { - 4, 84, 19, 19, 54, 55, 20, 57, 98, 54, - 55, 56, 57, 29, 8, 31, 10, 100, 48, 49, - 50, 51, 52, 53, 25, 26, 27, 28, 111, 8, - 29, 10, 31, 116, 56, 21, 9, 54, 55, 56, - 57, 37, 59, 60, 58, 59, 60, 61, 138, 5, - 6, 35, 135, 136, 137, 11, 12, 13, 14, 15, - 16, 17, 18, 100, 147, 43, 22, 23, 24, 60, - 61, 75, 58, 59, 60, 61, 32, 33, 45, 56, - 56, 0, 3, 50, 40, 56, 42, 56, 56, 45, - 56, 34, 37, 56, 56, 48, 40, 44, 135, 136, - 137, 19, 41, 41, 56, 56, 36, 38, 56, 76, - 77, 78, 79, 21, 19, 57, 56, 21, 35, 56, - 56, 48, 19, 39, 8, 20, 54, 56, 21, 30, - 56, 46, 20, 20, 20, 47, 56, 48, 18, 144, - 123, 165, 163, 113, 109, 137 + 4, 85, 19, 56, 19, 30, 20, 9, 99, 25, + 26, 27, 28, 30, 29, 35, 31, 101, 48, 49, + 50, 51, 52, 53, 8, 8, 10, 10, 112, 54, + 55, 56, 57, 117, 101, 56, 37, 54, 55, 56, + 57, 21, 59, 60, 58, 59, 60, 61, 139, 5, + 6, 56, 136, 137, 138, 11, 12, 13, 14, 15, + 16, 17, 18, 29, 148, 31, 22, 23, 24, 136, + 137, 138, 76, 30, 60, 61, 32, 33, 58, 59, + 60, 61, 45, 43, 40, 0, 42, 3, 51, 45, + 34, 56, 56, 40, 56, 56, 37, 54, 55, 48, + 57, 56, 56, 41, 44, 19, 41, 36, 56, 21, + 56, 38, 57, 56, 77, 78, 79, 80, 19, 56, + 56, 21, 56, 48, 35, 19, 39, 8, 20, 46, + 56, 21, 56, 54, 30, 20, 20, 20, 47, 18, + 48, 164, 145, 124, 166, 138, 56, 114, -1, -1, + -1, 110 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -828,20 +830,20 @@ static const yytype_int8 yystos[] = 18, 22, 23, 24, 32, 33, 40, 42, 45, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 83, 87, 88, 89, 90, 101, 102, - 103, 8, 10, 8, 10, 19, 54, 55, 56, 57, - 59, 60, 85, 91, 92, 93, 91, 56, 9, 35, - 37, 56, 56, 43, 65, 0, 3, 104, 56, 56, - 56, 56, 92, 34, 92, 21, 58, 59, 60, 61, - 37, 56, 56, 40, 48, 44, 19, 41, 41, 20, - 56, 91, 92, 92, 92, 92, 56, 94, 95, 36, - 38, 96, 56, 85, 57, 56, 79, 56, 56, 21, - 96, 19, 85, 93, 97, 98, 48, 35, 25, 26, - 27, 28, 82, 21, 78, 19, 95, 100, 85, 48, - 49, 50, 51, 52, 53, 99, 99, 39, 85, 8, - 19, 29, 31, 80, 79, 20, 56, 21, 84, 85, - 93, 85, 93, 97, 96, 56, 54, 81, 30, 78, - 46, 86, 20, 85, 20, 20, 47, 84, 80, 48, - 56 + 103, 8, 10, 8, 10, 19, 30, 54, 55, 56, + 57, 59, 60, 85, 91, 92, 93, 91, 56, 9, + 35, 37, 56, 56, 43, 65, 0, 3, 104, 56, + 56, 56, 56, 92, 34, 92, 21, 58, 59, 60, + 61, 37, 56, 56, 40, 48, 44, 19, 41, 41, + 20, 56, 91, 92, 92, 92, 92, 56, 94, 95, + 36, 38, 96, 56, 85, 57, 56, 79, 56, 56, + 21, 96, 19, 85, 93, 97, 98, 48, 35, 25, + 26, 27, 28, 82, 21, 78, 19, 95, 100, 85, + 48, 49, 50, 51, 52, 53, 99, 99, 39, 85, + 8, 19, 29, 31, 80, 79, 20, 56, 21, 84, + 85, 93, 85, 93, 97, 96, 56, 54, 81, 30, + 78, 46, 86, 20, 85, 20, 20, 47, 84, 80, + 48, 56 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -852,11 +854,11 @@ static const yytype_int8 yyr1[] = 65, 65, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 78, 79, 79, 80, 80, 80, 81, 82, 82, 82, 82, 83, 84, 84, - 85, 85, 85, 86, 86, 87, 88, 89, 90, 91, - 91, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 93, 93, 94, 95, 95, 96, 96, 97, 97, 97, - 98, 98, 98, 98, 99, 99, 99, 99, 99, 99, - 100, 101, 102, 103, 104, 104 + 85, 85, 85, 85, 86, 86, 87, 88, 89, 90, + 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 93, 93, 94, 95, 95, 96, 96, 97, 97, + 97, 98, 98, 98, 98, 99, 99, 99, 99, 99, + 99, 100, 101, 102, 103, 104, 104 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -867,11 +869,11 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 8, 5, 8, 0, 3, 6, 3, 2, 1, 0, 1, 1, 1, 1, 1, 8, 0, 3, - 1, 1, 1, 0, 4, 4, 7, 6, 2, 1, - 3, 3, 3, 3, 3, 3, 2, 1, 1, 1, - 1, 3, 1, 1, 3, 0, 2, 0, 1, 3, - 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, - 0, 7, 2, 4, 0, 1 + 1, 1, 1, 1, 0, 4, 4, 7, 6, 2, + 1, 3, 3, 3, 3, 3, 3, 2, 1, 1, + 1, 1, 3, 1, 1, 3, 0, 2, 0, 1, + 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, + 1, 0, 7, 2, 4, 0, 1 }; @@ -1738,7 +1740,7 @@ YYLTYPE yylloc = yyloc_default; std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1742 "yacc_sql.cpp" +#line 1744 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ @@ -1747,7 +1749,7 @@ YYLTYPE yylloc = yyloc_default; (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1751 "yacc_sql.cpp" +#line 1753 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ @@ -1755,7 +1757,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1759 "yacc_sql.cpp" +#line 1761 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ @@ -1763,7 +1765,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1767 "yacc_sql.cpp" +#line 1769 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ @@ -1771,7 +1773,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1775 "yacc_sql.cpp" +#line 1777 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ @@ -1779,7 +1781,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1783 "yacc_sql.cpp" +#line 1785 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ @@ -1787,7 +1789,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1791 "yacc_sql.cpp" +#line 1793 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ @@ -1797,7 +1799,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1801 "yacc_sql.cpp" +#line 1803 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ @@ -1805,7 +1807,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1809 "yacc_sql.cpp" +#line 1811 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ @@ -1815,7 +1817,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1819 "yacc_sql.cpp" +#line 1821 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ @@ -1830,7 +1832,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1834 "yacc_sql.cpp" +#line 1836 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ @@ -1842,7 +1844,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1846 "yacc_sql.cpp" +#line 1848 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ @@ -1867,7 +1869,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1871 "yacc_sql.cpp" +#line 1873 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ @@ -1875,7 +1877,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.attr_infos) = nullptr; } -#line 1879 "yacc_sql.cpp" +#line 1881 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ @@ -1889,7 +1891,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1893 "yacc_sql.cpp" +#line 1895 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ @@ -1902,7 +1904,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); free((yyvsp[-5].string)); } -#line 1906 "yacc_sql.cpp" +#line 1908 "yacc_sql.cpp" break; case 38: /* attr_def: ID type nullable_constraint */ @@ -1915,7 +1917,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); // 处理NULL/NOT NULL标记 free((yyvsp[-2].string)); } -#line 1919 "yacc_sql.cpp" +#line 1921 "yacc_sql.cpp" break; case 39: /* nullable_constraint: NOT NULL_T */ @@ -1923,7 +1925,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1927 "yacc_sql.cpp" +#line 1929 "yacc_sql.cpp" break; case 40: /* nullable_constraint: NULLABLE */ @@ -1931,7 +1933,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1935 "yacc_sql.cpp" +#line 1937 "yacc_sql.cpp" break; case 41: /* nullable_constraint: %empty */ @@ -1939,37 +1941,37 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // 默认情况为 NOT NULL } -#line 1943 "yacc_sql.cpp" +#line 1945 "yacc_sql.cpp" break; case 42: /* number: NUMBER */ #line 381 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1949 "yacc_sql.cpp" +#line 1951 "yacc_sql.cpp" break; case 43: /* type: INT_T */ #line 384 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1955 "yacc_sql.cpp" +#line 1957 "yacc_sql.cpp" break; case 44: /* type: STRING_T */ #line 385 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1961 "yacc_sql.cpp" +#line 1963 "yacc_sql.cpp" break; case 45: /* type: FLOAT_T */ #line 386 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1967 "yacc_sql.cpp" +#line 1969 "yacc_sql.cpp" break; case 46: /* type: DATE_T */ #line 387 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1973 "yacc_sql.cpp" +#line 1975 "yacc_sql.cpp" break; case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ @@ -1986,7 +1988,7 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1990 "yacc_sql.cpp" +#line 1992 "yacc_sql.cpp" break; case 48: /* value_list: %empty */ @@ -1994,7 +1996,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.value_list) = nullptr; } -#line 1998 "yacc_sql.cpp" +#line 2000 "yacc_sql.cpp" break; case 49: /* value_list: COMMA value value_list */ @@ -2008,7 +2010,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 2012 "yacc_sql.cpp" +#line 2014 "yacc_sql.cpp" break; case 50: /* value: NUMBER */ @@ -2017,7 +2019,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2021 "yacc_sql.cpp" +#line 2023 "yacc_sql.cpp" break; case 51: /* value: FLOAT */ @@ -2026,7 +2028,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2030 "yacc_sql.cpp" +#line 2032 "yacc_sql.cpp" break; case 52: /* value: SSS */ @@ -2037,27 +2039,35 @@ YYLTYPE yylloc = yyloc_default; free(tmp); free((yyvsp[0].string)); } -#line 2041 "yacc_sql.cpp" +#line 2043 "yacc_sql.cpp" break; - case 53: /* storage_format: %empty */ -#line 438 "yacc_sql.y" + case 53: /* value: NULL_T */ +#line 435 "yacc_sql.y" + { + (yyval.value) = new Value(NullValue()); + } +#line 2051 "yacc_sql.cpp" + break; + + case 54: /* storage_format: %empty */ +#line 441 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2049 "yacc_sql.cpp" +#line 2059 "yacc_sql.cpp" break; - case 54: /* storage_format: STORAGE FORMAT EQ ID */ -#line 442 "yacc_sql.y" + case 55: /* storage_format: STORAGE FORMAT EQ ID */ +#line 445 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2057 "yacc_sql.cpp" +#line 2067 "yacc_sql.cpp" break; - case 55: /* delete_stmt: DELETE FROM ID where */ -#line 449 "yacc_sql.y" + case 56: /* delete_stmt: DELETE FROM ID where */ +#line 452 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2067,11 +2077,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2071 "yacc_sql.cpp" +#line 2081 "yacc_sql.cpp" break; - case 56: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 461 "yacc_sql.y" + case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ +#line 464 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2084,11 +2094,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2088 "yacc_sql.cpp" +#line 2098 "yacc_sql.cpp" break; - case 57: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 476 "yacc_sql.y" + case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 479 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2111,30 +2121,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2115 "yacc_sql.cpp" +#line 2125 "yacc_sql.cpp" break; - case 58: /* calc_stmt: CALC expression_list */ -#line 501 "yacc_sql.y" + case 59: /* calc_stmt: CALC expression_list */ +#line 504 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2125 "yacc_sql.cpp" +#line 2135 "yacc_sql.cpp" break; - case 59: /* expression_list: expression */ -#line 510 "yacc_sql.y" + case 60: /* expression_list: expression */ +#line 513 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2134 "yacc_sql.cpp" +#line 2144 "yacc_sql.cpp" break; - case 60: /* expression_list: expression COMMA expression_list */ -#line 515 "yacc_sql.y" + case 61: /* expression_list: expression COMMA expression_list */ +#line 518 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2143,99 +2153,99 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2147 "yacc_sql.cpp" +#line 2157 "yacc_sql.cpp" break; - case 61: /* expression: expression '+' expression */ -#line 525 "yacc_sql.y" + case 62: /* expression: expression '+' expression */ +#line 528 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2155 "yacc_sql.cpp" +#line 2165 "yacc_sql.cpp" break; - case 62: /* expression: expression '-' expression */ -#line 528 "yacc_sql.y" + case 63: /* expression: expression '-' expression */ +#line 531 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2163 "yacc_sql.cpp" +#line 2173 "yacc_sql.cpp" break; - case 63: /* expression: expression '*' expression */ -#line 531 "yacc_sql.y" + case 64: /* expression: expression '*' expression */ +#line 534 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2171 "yacc_sql.cpp" +#line 2181 "yacc_sql.cpp" break; - case 64: /* expression: expression '/' expression */ -#line 534 "yacc_sql.y" + case 65: /* expression: expression '/' expression */ +#line 537 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2179 "yacc_sql.cpp" +#line 2189 "yacc_sql.cpp" break; - case 65: /* expression: LBRACE expression RBRACE */ -#line 537 "yacc_sql.y" + case 66: /* expression: LBRACE expression RBRACE */ +#line 540 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2188 "yacc_sql.cpp" +#line 2198 "yacc_sql.cpp" break; - case 66: /* expression: '-' expression */ -#line 541 "yacc_sql.y" + case 67: /* expression: '-' expression */ +#line 544 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2196 "yacc_sql.cpp" +#line 2206 "yacc_sql.cpp" break; - case 67: /* expression: value */ -#line 544 "yacc_sql.y" + case 68: /* expression: value */ +#line 547 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2206 "yacc_sql.cpp" +#line 2216 "yacc_sql.cpp" break; - case 68: /* expression: rel_attr */ -#line 549 "yacc_sql.y" + case 69: /* expression: rel_attr */ +#line 552 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2217 "yacc_sql.cpp" +#line 2227 "yacc_sql.cpp" break; - case 69: /* expression: '*' */ -#line 555 "yacc_sql.y" + case 70: /* expression: '*' */ +#line 558 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2225 "yacc_sql.cpp" +#line 2235 "yacc_sql.cpp" break; - case 70: /* rel_attr: ID */ -#line 562 "yacc_sql.y" + case 71: /* rel_attr: ID */ +#line 565 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2235 "yacc_sql.cpp" +#line 2245 "yacc_sql.cpp" break; - case 71: /* rel_attr: ID DOT ID */ -#line 567 "yacc_sql.y" + case 72: /* rel_attr: ID DOT ID */ +#line 570 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2243,29 +2253,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2247 "yacc_sql.cpp" +#line 2257 "yacc_sql.cpp" break; - case 72: /* relation: ID */ -#line 577 "yacc_sql.y" + case 73: /* relation: ID */ +#line 580 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2255 "yacc_sql.cpp" +#line 2265 "yacc_sql.cpp" break; - case 73: /* rel_list: relation */ -#line 582 "yacc_sql.y" + case 74: /* rel_list: relation */ +#line 585 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2265 "yacc_sql.cpp" +#line 2275 "yacc_sql.cpp" break; - case 74: /* rel_list: relation COMMA rel_list */ -#line 587 "yacc_sql.y" + case 75: /* rel_list: relation COMMA rel_list */ +#line 590 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2276,55 +2286,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2280 "yacc_sql.cpp" +#line 2290 "yacc_sql.cpp" break; - case 75: /* where: %empty */ -#line 601 "yacc_sql.y" + case 76: /* where: %empty */ +#line 604 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2288 "yacc_sql.cpp" +#line 2298 "yacc_sql.cpp" break; - case 76: /* where: WHERE condition_list */ -#line 604 "yacc_sql.y" + case 77: /* where: WHERE condition_list */ +#line 607 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2296 "yacc_sql.cpp" +#line 2306 "yacc_sql.cpp" break; - case 77: /* condition_list: %empty */ -#line 610 "yacc_sql.y" + case 78: /* condition_list: %empty */ +#line 613 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2304 "yacc_sql.cpp" +#line 2314 "yacc_sql.cpp" break; - case 78: /* condition_list: condition */ -#line 613 "yacc_sql.y" + case 79: /* condition_list: condition */ +#line 616 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2314 "yacc_sql.cpp" +#line 2324 "yacc_sql.cpp" break; - case 79: /* condition_list: condition AND condition_list */ -#line 618 "yacc_sql.y" + case 80: /* condition_list: condition AND condition_list */ +#line 621 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2324 "yacc_sql.cpp" +#line 2334 "yacc_sql.cpp" break; - case 80: /* condition: rel_attr comp_op value */ -#line 626 "yacc_sql.y" + case 81: /* condition: rel_attr comp_op value */ +#line 629 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2336,11 +2346,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2340 "yacc_sql.cpp" +#line 2350 "yacc_sql.cpp" break; - case 81: /* condition: value comp_op value */ -#line 638 "yacc_sql.y" + case 82: /* condition: value comp_op value */ +#line 641 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2352,11 +2362,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2356 "yacc_sql.cpp" +#line 2366 "yacc_sql.cpp" break; - case 82: /* condition: rel_attr comp_op rel_attr */ -#line 650 "yacc_sql.y" + case 83: /* condition: rel_attr comp_op rel_attr */ +#line 653 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2368,11 +2378,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2372 "yacc_sql.cpp" +#line 2382 "yacc_sql.cpp" break; - case 83: /* condition: value comp_op rel_attr */ -#line 662 "yacc_sql.y" + case 84: /* condition: value comp_op rel_attr */ +#line 665 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2384,55 +2394,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2388 "yacc_sql.cpp" +#line 2398 "yacc_sql.cpp" break; - case 84: /* comp_op: EQ */ -#line 676 "yacc_sql.y" + case 85: /* comp_op: EQ */ +#line 679 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2394 "yacc_sql.cpp" +#line 2404 "yacc_sql.cpp" break; - case 85: /* comp_op: LT */ -#line 677 "yacc_sql.y" + case 86: /* comp_op: LT */ +#line 680 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2400 "yacc_sql.cpp" +#line 2410 "yacc_sql.cpp" break; - case 86: /* comp_op: GT */ -#line 678 "yacc_sql.y" + case 87: /* comp_op: GT */ +#line 681 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2406 "yacc_sql.cpp" +#line 2416 "yacc_sql.cpp" break; - case 87: /* comp_op: LE */ -#line 679 "yacc_sql.y" + case 88: /* comp_op: LE */ +#line 682 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2412 "yacc_sql.cpp" +#line 2422 "yacc_sql.cpp" break; - case 88: /* comp_op: GE */ -#line 680 "yacc_sql.y" + case 89: /* comp_op: GE */ +#line 683 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2418 "yacc_sql.cpp" +#line 2428 "yacc_sql.cpp" break; - case 89: /* comp_op: NE */ -#line 681 "yacc_sql.y" + case 90: /* comp_op: NE */ +#line 684 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2424 "yacc_sql.cpp" +#line 2434 "yacc_sql.cpp" break; - case 90: /* group_by: %empty */ -#line 687 "yacc_sql.y" + case 91: /* group_by: %empty */ +#line 690 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2432 "yacc_sql.cpp" +#line 2442 "yacc_sql.cpp" break; - case 91: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 693 "yacc_sql.y" + case 92: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 696 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2442,20 +2452,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2446 "yacc_sql.cpp" +#line 2456 "yacc_sql.cpp" break; - case 92: /* explain_stmt: EXPLAIN command_wrapper */ -#line 706 "yacc_sql.y" + case 93: /* explain_stmt: EXPLAIN command_wrapper */ +#line 709 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2455 "yacc_sql.cpp" +#line 2465 "yacc_sql.cpp" break; - case 93: /* set_variable_stmt: SET ID EQ value */ -#line 714 "yacc_sql.y" + case 94: /* set_variable_stmt: SET ID EQ value */ +#line 717 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2463,11 +2473,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2467 "yacc_sql.cpp" +#line 2477 "yacc_sql.cpp" break; -#line 2471 "yacc_sql.cpp" +#line 2481 "yacc_sql.cpp" default: break; } @@ -2696,7 +2706,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 726 "yacc_sql.y" +#line 729 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 42f53a20..e2a08b5c 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -432,6 +432,9 @@ value: free(tmp); free($1); } + |NULL_T { + $$ = new Value(NullValue()); + } ; storage_format: /* empty */ From c279b84c51ad637e43c057fcc77b771948e503f9 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 26 Sep 2024 02:50:03 +0800 Subject: [PATCH 013/308] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E5=A4=9A?= =?UTF-8?q?=E5=80=BC=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/operator/update_logical_operator.cpp | 5 +- .../sql/operator/update_logical_operator.h | 18 +- .../sql/operator/update_physical_operator.cpp | 7 +- .../sql/operator/update_physical_operator.h | 20 +- .../sql/optimizer/logical_plan_generator.cpp | 13 +- .../sql/optimizer/physical_plan_generator.cpp | 3 +- src/observer/sql/parser/parse_defs.h | 15 +- src/observer/sql/parser/yacc_sql.cpp | 652 +++++++++--------- src/observer/sql/parser/yacc_sql.hpp | 4 +- src/observer/sql/parser/yacc_sql.y | 43 +- src/observer/sql/stmt/update_stmt.cpp | 77 ++- src/observer/sql/stmt/update_stmt.h | 23 +- 12 files changed, 486 insertions(+), 394 deletions(-) diff --git a/src/observer/sql/operator/update_logical_operator.cpp b/src/observer/sql/operator/update_logical_operator.cpp index 98abfa26..c86b3d3a 100644 --- a/src/observer/sql/operator/update_logical_operator.cpp +++ b/src/observer/sql/operator/update_logical_operator.cpp @@ -12,6 +12,7 @@ #include "update_logical_operator.h" -UpdateLogicalOperator::UpdateLogicalOperator(Table *table, const char *attribute_name, const Value *value) - : table_(table), attribute_name_(attribute_name), value_(value) +UpdateLogicalOperator::UpdateLogicalOperator( + Table *table, std::vector field_metas, std::vector values) + : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)) {} diff --git a/src/observer/sql/operator/update_logical_operator.h b/src/observer/sql/operator/update_logical_operator.h index 4e8161fb..6d66291a 100644 --- a/src/observer/sql/operator/update_logical_operator.h +++ b/src/observer/sql/operator/update_logical_operator.h @@ -21,16 +21,16 @@ class UpdateLogicalOperator : public LogicalOperator { public: - explicit UpdateLogicalOperator(Table *table, const char *attribute_name, const Value *value); - ~UpdateLogicalOperator() override = default; + explicit UpdateLogicalOperator(Table *table, std::vector field_metas, std::vector values); + ~ UpdateLogicalOperator() override = default; - LogicalOperatorType type() const override { return LogicalOperatorType::UPDATE; } - Table *table() const { return table_; } - const char *attribute_name() const { return attribute_name_; } - const Value *values() const { return value_; } + LogicalOperatorType type() const override { return LogicalOperatorType::UPDATE; } + Table *table() const { return table_; } + const std::vector &field_metas() const { return field_metas_; } + const std::vector &values() const { return values_; } private: - Table *table_ = nullptr; - const char *attribute_name_ = nullptr; - const Value *value_ = nullptr; + Table *table_ = nullptr; + std::vector field_metas_; + std::vector values_; }; diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 0adde581..0ac3a0fc 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -44,15 +44,16 @@ RC UpdatePhysicalOperator::open(Trx *trx) child->close(); - const FieldMeta *field_meta = table_->table_meta().field(attribute_name_); // 先收集记录再更新 // 记录的有效性由事务来保证,如果事务不保证删除的有效性,那说明此事务类型不支持并发控制,比如VacuousTrx + Record new_record; for (Record &old_record : records_) { - Record new_record; // rid 得手动拷贝 new_record.set_rid(old_record.rid()); new_record.copy_data(old_record.data(), old_record.len()); - new_record.set_field(field_meta->offset(), field_meta->len(), value_); + for (int i = 0; i < field_metas_.size(); ++i) { + new_record.set_field(field_metas_[i].offset(), field_metas_[i].len(), values_[i]); + } rc = trx_->update_record(table_, old_record, new_record); if (rc != RC::SUCCESS) { LOG_WARN("failed to update record: %s", strrc(rc)); diff --git a/src/observer/sql/operator/update_physical_operator.h b/src/observer/sql/operator/update_physical_operator.h index f7af16be..c4ee340f 100644 --- a/src/observer/sql/operator/update_physical_operator.h +++ b/src/observer/sql/operator/update_physical_operator.h @@ -24,15 +24,15 @@ class UpdateStmt; class UpdatePhysicalOperator : public PhysicalOperator { public: - UpdatePhysicalOperator(Table *table, const char *attribute_name, const Value *value) - : table_(table), attribute_name_(attribute_name), value_(value) + UpdatePhysicalOperator(Table *table, std::vector field_metas, std::vector values) + : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)) {} - virtual ~UpdatePhysicalOperator() = default; + ~UpdatePhysicalOperator() override = default; - PhysicalOperatorType type() const override { return PhysicalOperatorType::UPDATE; } - const char *attribute_name() const { return attribute_name_; } - const Value *value() const { return value_; } + PhysicalOperatorType type() const override { return PhysicalOperatorType::UPDATE; } + const std::vector &field_metas() const { return field_metas_; } + const std::vector &values() const { return values_; } RC open(Trx *trx) override; RC next() override; @@ -41,9 +41,9 @@ class UpdatePhysicalOperator : public PhysicalOperator Tuple *current_tuple() override { return nullptr; } private: - Table *table_ = nullptr; - const char *attribute_name_ = nullptr; - Trx *trx_ = nullptr; - const Value *value_ = nullptr; + Trx *trx_ = nullptr; + Table *table_ = nullptr; + std::vector field_metas_; + std::vector values_; std::vector records_; }; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index aed7b2e8..06dd61e1 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -270,11 +270,12 @@ RC LogicalPlanGenerator::create_plan(DeleteStmt *delete_stmt, unique_ptr &logical_operator) { - Table *table = update_stmt->table(); - const char *attribute_name = update_stmt->attribute_name(); - const Value *value = update_stmt->values(); // 目前只用支持一个值 - FilterStmt *filter_stmt = update_stmt->filter_stmt(); - unique_ptr table_get_oper(new TableGetLogicalOperator(table, ReadWriteMode::READ_WRITE)); + auto table = update_stmt->table(); + auto &field_metas = update_stmt->field_metas(); + auto &values = update_stmt->values(); // 支持了多个值 + auto filter_stmt = update_stmt->filter_stmt(); + + auto table_get_oper = std::make_unique(table, ReadWriteMode::READ_WRITE); unique_ptr predicate_oper; @@ -283,7 +284,7 @@ RC LogicalPlanGenerator::create_plan(UpdateStmt *update_stmt, unique_ptr update_oper(new UpdateLogicalOperator(table, attribute_name, value)); + auto update_oper = std::make_unique(table, field_metas, values); if (predicate_oper) { predicate_oper->add_child(std::move(table_get_oper)); diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index cb1ddfdc..4b32bbc0 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -298,8 +298,7 @@ RC PhysicalPlanGenerator::create_plan(UpdateLogicalOperator &update_oper, std::u } } - oper = unique_ptr( - new UpdatePhysicalOperator(update_oper.table(), update_oper.attribute_name(), update_oper.values())); + oper = std::make_unique(update_oper.table(), update_oper.field_metas(), update_oper.values()); if (child_physical_oper) { oper->add_child(std::move(child_physical_oper)); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 9593d57a..26eaacfc 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -124,15 +124,24 @@ struct DeleteSqlNode std::vector conditions; }; +/** + * @brief 描述一个set语句 + * @ingroup SQLParser + */ +struct SetClauseSqlNode +{ + std::string field_name; ///< 更新的字段 + Value value; ///< 更新的值 +}; + /** * @brief 描述一个update语句 * @ingroup SQLParser */ struct UpdateSqlNode { - std::string relation_name; ///< Relation to update - std::string attribute_name; ///< 更新的字段,仅支持一个字段 - Value value; ///< 更新的值,仅支持一个字段 + std::string relation_name; ///< Relation to update + std::vector set_clauses; ///< 更新的set语句,支持多个字段和值 std::vector conditions; }; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 698fb67b..0607abd8 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -234,22 +234,24 @@ enum yysymbol_kind_t YYSYMBOL_storage_format = 82, /* storage_format */ YYSYMBOL_delete_stmt = 83, /* delete_stmt */ YYSYMBOL_update_stmt = 84, /* update_stmt */ - YYSYMBOL_select_stmt = 85, /* select_stmt */ - YYSYMBOL_calc_stmt = 86, /* calc_stmt */ - YYSYMBOL_expression_list = 87, /* expression_list */ - YYSYMBOL_expression = 88, /* expression */ - YYSYMBOL_rel_attr = 89, /* rel_attr */ - YYSYMBOL_relation = 90, /* relation */ - YYSYMBOL_rel_list = 91, /* rel_list */ - YYSYMBOL_where = 92, /* where */ - YYSYMBOL_condition_list = 93, /* condition_list */ - YYSYMBOL_condition = 94, /* condition */ - YYSYMBOL_comp_op = 95, /* comp_op */ - YYSYMBOL_group_by = 96, /* group_by */ - YYSYMBOL_load_data_stmt = 97, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 98, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 99, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 100 /* opt_semicolon */ + YYSYMBOL_setClauses = 85, /* setClauses */ + YYSYMBOL_setClause = 86, /* setClause */ + YYSYMBOL_select_stmt = 87, /* select_stmt */ + YYSYMBOL_calc_stmt = 88, /* calc_stmt */ + YYSYMBOL_expression_list = 89, /* expression_list */ + YYSYMBOL_expression = 90, /* expression */ + YYSYMBOL_rel_attr = 91, /* rel_attr */ + YYSYMBOL_relation = 92, /* relation */ + YYSYMBOL_rel_list = 93, /* rel_list */ + YYSYMBOL_where = 94, /* where */ + YYSYMBOL_condition_list = 95, /* condition_list */ + YYSYMBOL_condition = 96, /* condition */ + YYSYMBOL_comp_op = 97, /* comp_op */ + YYSYMBOL_group_by = 98, /* group_by */ + YYSYMBOL_load_data_stmt = 99, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 100, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 101, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 102 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -580,16 +582,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 65 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 141 +#define YYLAST 144 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 60 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 41 +#define YYNNTS 43 /* YYNRULES -- Number of rules. */ -#define YYNRULES 92 +#define YYNRULES 95 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 166 +#define YYNSTATES 170 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 310 @@ -644,16 +646,16 @@ static const yytype_int8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 189, 189, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 220, 226, 231, 237, 243, 249, 255, - 262, 268, 276, 290, 300, 324, 327, 340, 348, 358, - 361, 362, 363, 364, 367, 384, 387, 398, 402, 406, - 415, 418, 425, 437, 452, 477, 486, 491, 502, 505, - 508, 511, 514, 518, 521, 526, 532, 539, 544, 554, - 559, 564, 578, 581, 587, 590, 595, 602, 614, 626, - 638, 653, 654, 655, 656, 657, 658, 664, 669, 682, - 690, 700, 701 + 0, 193, 193, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 224, 230, 235, 241, 247, 253, 259, + 266, 272, 280, 294, 304, 328, 331, 344, 352, 362, + 365, 366, 367, 368, 371, 388, 391, 402, 406, 410, + 419, 422, 429, 442, 457, 463, 471, 481, 506, 515, + 520, 531, 534, 537, 540, 543, 547, 550, 555, 561, + 568, 573, 583, 588, 593, 607, 610, 616, 619, 624, + 631, 643, 655, 667, 682, 683, 684, 685, 686, 687, + 693, 698, 711, 719, 729, 730 }; #endif @@ -682,10 +684,11 @@ static const char *const yytname[] = "show_tables_stmt", "desc_table_stmt", "create_index_stmt", "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", "number", "type", "insert_stmt", "value_list", "value", "storage_format", - "delete_stmt", "update_stmt", "select_stmt", "calc_stmt", - "expression_list", "expression", "rel_attr", "relation", "rel_list", - "where", "condition_list", "condition", "comp_op", "group_by", - "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR + "delete_stmt", "update_stmt", "setClauses", "setClause", "select_stmt", + "calc_stmt", "expression_list", "expression", "rel_attr", "relation", + "rel_list", "where", "condition_list", "condition", "comp_op", + "group_by", "load_data_stmt", "explain_stmt", "set_variable_stmt", + "opt_semicolon", YY_NULLPTR }; static const char * @@ -695,7 +698,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-97) +#define YYPACT_NINF (-99) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -709,23 +712,23 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 51, 6, 14, -16, -16, -38, 2, -97, -5, -3, - -24, -97, -97, -97, -97, -97, -23, -6, 51, 32, - 36, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -2, 17, 23, 25, -16, -97, -97, 24, -97, - -16, -97, -97, -97, -8, -97, 45, -97, -97, 38, - 39, 52, 49, 54, -97, -97, -97, -97, 77, 59, - -97, 60, -12, 46, -97, -16, -16, -16, -16, -16, - 47, 68, 67, 55, -42, 53, 56, 57, 58, -97, - -97, -97, -32, -32, -97, -97, -97, 91, 67, 94, - -47, -97, 69, -97, 83, -7, 95, 98, -97, 47, - -97, -42, 37, 37, -97, 82, -42, 111, -97, -97, - -97, -97, 101, 56, 102, 70, -97, -97, 100, -97, - -97, -97, -97, -97, -97, -47, -47, -47, 67, 71, - 74, 95, 84, 106, -42, 108, -97, -97, -97, -97, - -97, -97, -97, -97, 109, -97, 86, -97, -97, 100, - -97, -97, 87, -97, 78, -97 + 62, 5, 11, -7, -7, -39, 27, -99, 16, 21, + 10, -99, -99, -99, -99, -99, 12, 24, 62, 81, + 79, -99, -99, -99, -99, -99, -99, -99, -99, -99, + -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, + -99, 30, 34, 35, 36, -7, -99, -99, 59, -99, + -7, -99, -99, -99, -18, -99, 60, -99, -99, 40, + 42, 61, 51, 56, -99, -99, -99, -99, 83, 65, + -99, 67, 4, 47, -99, -7, -7, -7, -7, -7, + 53, 74, 73, 57, 18, 55, 58, 63, 64, -99, + -99, -99, -35, -35, -99, -99, -99, 91, 73, 94, + -20, -99, 69, -17, -99, -99, 86, 1, 98, 96, + -99, 53, -99, 18, -40, -40, -99, 84, 18, 57, + -99, 113, -99, -99, -99, -99, 103, 58, 104, 70, + -99, -99, 105, -99, -99, -99, -99, -99, -99, -20, + -20, -20, -99, -99, 72, 76, 98, 85, 109, 18, + 110, -99, -99, -99, -99, -99, -99, -99, 111, -99, + 88, -99, -99, 105, -99, -99, 89, -99, 80, -99 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -735,41 +738,41 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 91, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 94, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 47, 48, 67, 49, - 0, 66, 64, 55, 56, 65, 0, 31, 30, 0, - 0, 0, 0, 0, 89, 1, 92, 2, 0, 0, - 29, 0, 0, 0, 63, 0, 0, 0, 0, 0, - 0, 0, 72, 0, 0, 0, 0, 0, 0, 62, - 68, 57, 58, 59, 60, 61, 69, 70, 72, 0, - 74, 52, 0, 90, 0, 0, 35, 0, 33, 0, - 87, 0, 0, 0, 73, 75, 0, 0, 40, 41, - 42, 43, 38, 0, 0, 0, 71, 54, 45, 81, - 82, 83, 84, 85, 86, 0, 0, 74, 72, 0, - 0, 35, 50, 0, 0, 0, 78, 80, 77, 79, - 76, 53, 88, 39, 0, 36, 0, 34, 32, 45, - 44, 37, 0, 46, 0, 51 + 20, 0, 0, 0, 0, 0, 47, 48, 70, 49, + 0, 69, 67, 58, 59, 68, 0, 31, 30, 0, + 0, 0, 0, 0, 92, 1, 95, 2, 0, 0, + 29, 0, 0, 0, 66, 0, 0, 0, 0, 0, + 0, 0, 75, 0, 0, 0, 0, 0, 0, 65, + 71, 60, 61, 62, 63, 64, 72, 73, 75, 0, + 77, 52, 0, 75, 54, 93, 0, 0, 35, 0, + 33, 0, 90, 0, 0, 0, 76, 78, 0, 0, + 53, 0, 40, 41, 42, 43, 38, 0, 0, 0, + 74, 57, 45, 84, 85, 86, 87, 88, 89, 0, + 0, 77, 56, 55, 0, 0, 35, 50, 0, 0, + 0, 81, 83, 80, 82, 79, 91, 39, 0, 36, + 0, 34, 32, 45, 44, 37, 0, 46, 0, 51 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -97, -97, 115, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -1, 11, -97, -97, -97, - -22, -83, -97, -97, -97, -97, -97, -4, 27, -77, - -97, 26, -96, 1, -97, 28, -97, -97, -97, -97, - -97 + -99, -99, 117, -99, -99, -99, -99, -99, -99, -99, + -99, -99, -99, -99, -99, -10, 13, -99, -99, -99, + -26, -83, -99, -99, -99, -99, 19, -99, -99, -4, + -25, -98, -99, 28, -87, 0, -99, 29, -99, -99, + -99, -99, -99 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 124, 106, 154, 122, 33, - 145, 52, 157, 34, 35, 36, 37, 53, 54, 55, - 97, 98, 101, 114, 115, 135, 127, 38, 39, 40, - 67 + 28, 29, 30, 31, 32, 128, 108, 158, 126, 33, + 150, 52, 161, 34, 35, 103, 104, 36, 37, 53, + 54, 55, 97, 98, 101, 116, 117, 139, 131, 38, + 39, 40, 67 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -777,40 +780,40 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 56, 103, 110, 45, 46, 47, 48, 49, 89, 46, - 47, 58, 49, 75, 41, 57, 42, 112, 118, 119, - 120, 121, 43, 113, 44, 78, 79, 59, 128, 61, - 62, 60, 65, 138, 63, 46, 47, 48, 49, 66, - 50, 51, 151, 76, 77, 78, 79, 76, 77, 78, - 79, 68, 146, 148, 112, 73, 1, 2, 147, 149, - 113, 159, 3, 4, 5, 6, 7, 8, 9, 10, - 69, 91, 72, 11, 12, 13, 70, 74, 71, 80, - 14, 15, 129, 130, 131, 132, 133, 134, 16, 83, - 17, 81, 82, 18, 84, 85, 86, 87, 88, 90, - 96, 99, 100, 92, 93, 94, 95, 104, 102, 105, - 107, 108, 109, 111, 116, 117, 123, 125, 137, 139, - 140, 144, 142, 143, 152, 153, 158, 156, 160, 161, - 162, 165, 164, 64, 141, 126, 0, 163, 150, 0, - 155, 136 + 56, 105, 115, 75, 119, 133, 134, 135, 136, 137, + 138, 112, 45, 41, 57, 42, 120, 114, 100, 43, + 72, 44, 78, 79, 89, 74, 122, 123, 124, 125, + 132, 46, 47, 48, 49, 142, 58, 76, 77, 78, + 79, 152, 154, 115, 46, 47, 48, 49, 59, 50, + 51, 92, 93, 94, 95, 60, 151, 153, 114, 76, + 77, 78, 79, 61, 63, 62, 163, 1, 2, 46, + 47, 91, 49, 3, 4, 5, 6, 7, 8, 9, + 10, 65, 66, 68, 11, 12, 13, 69, 70, 71, + 73, 14, 15, 81, 80, 82, 84, 85, 83, 16, + 90, 17, 86, 87, 18, 88, 96, 99, 100, 106, + 102, 107, 111, 113, 118, 129, 109, 110, 121, 127, + 141, 144, 145, 148, 147, 156, 149, 157, 160, 162, + 164, 165, 166, 169, 168, 64, 159, 167, 143, 130, + 146, 155, 0, 0, 140 }; static const yytype_int16 yycheck[] = { - 4, 84, 98, 19, 51, 52, 53, 54, 20, 51, - 52, 9, 54, 21, 8, 53, 10, 100, 25, 26, - 27, 28, 8, 100, 10, 57, 58, 32, 111, 53, - 53, 34, 0, 116, 40, 51, 52, 53, 54, 3, - 56, 57, 138, 55, 56, 57, 58, 55, 56, 57, - 58, 53, 135, 136, 137, 31, 5, 6, 135, 136, - 137, 144, 11, 12, 13, 14, 15, 16, 17, 18, - 53, 75, 45, 22, 23, 24, 53, 50, 53, 34, - 29, 30, 45, 46, 47, 48, 49, 50, 37, 37, - 39, 53, 53, 42, 45, 41, 19, 38, 38, 53, - 53, 33, 35, 76, 77, 78, 79, 54, 53, 53, - 53, 53, 21, 19, 45, 32, 21, 19, 36, 8, - 19, 21, 20, 53, 53, 51, 20, 43, 20, 20, - 44, 53, 45, 18, 123, 109, -1, 159, 137, -1, - 141, 113 + 4, 84, 100, 21, 21, 45, 46, 47, 48, 49, + 50, 98, 19, 8, 53, 10, 103, 100, 35, 8, + 45, 10, 57, 58, 20, 50, 25, 26, 27, 28, + 113, 51, 52, 53, 54, 118, 9, 55, 56, 57, + 58, 139, 140, 141, 51, 52, 53, 54, 32, 56, + 57, 76, 77, 78, 79, 34, 139, 140, 141, 55, + 56, 57, 58, 53, 40, 53, 149, 5, 6, 51, + 52, 75, 54, 11, 12, 13, 14, 15, 16, 17, + 18, 0, 3, 53, 22, 23, 24, 53, 53, 53, + 31, 29, 30, 53, 34, 53, 45, 41, 37, 37, + 53, 39, 19, 38, 42, 38, 53, 33, 35, 54, + 53, 53, 21, 19, 45, 19, 53, 53, 32, 21, + 36, 8, 19, 53, 20, 53, 21, 51, 43, 20, + 20, 20, 44, 53, 45, 18, 146, 163, 119, 111, + 127, 141, -1, -1, 115 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -820,20 +823,20 @@ static const yytype_int8 yystos[] = 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 29, 30, 37, 39, 42, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 79, 83, 84, 85, 86, 97, 98, - 99, 8, 10, 8, 10, 19, 51, 52, 53, 54, - 56, 57, 81, 87, 88, 89, 87, 53, 9, 32, - 34, 53, 53, 40, 62, 0, 3, 100, 53, 53, - 53, 53, 88, 31, 88, 21, 55, 56, 57, 58, + 72, 73, 74, 79, 83, 84, 87, 88, 99, 100, + 101, 8, 10, 8, 10, 19, 51, 52, 53, 54, + 56, 57, 81, 89, 90, 91, 89, 53, 9, 32, + 34, 53, 53, 40, 62, 0, 3, 102, 53, 53, + 53, 53, 90, 31, 90, 21, 55, 56, 57, 58, 34, 53, 53, 37, 45, 41, 19, 38, 38, 20, - 53, 87, 88, 88, 88, 88, 53, 90, 91, 33, - 35, 92, 53, 81, 54, 53, 76, 53, 53, 21, - 92, 19, 81, 89, 93, 94, 45, 32, 25, 26, - 27, 28, 78, 21, 75, 19, 91, 96, 81, 45, - 46, 47, 48, 49, 50, 95, 95, 36, 81, 8, - 19, 76, 20, 53, 21, 80, 81, 89, 81, 89, - 93, 92, 53, 51, 77, 75, 43, 82, 20, 81, - 20, 20, 44, 80, 45, 53 + 53, 89, 90, 90, 90, 90, 53, 92, 93, 33, + 35, 94, 53, 85, 86, 81, 54, 53, 76, 53, + 53, 21, 94, 19, 81, 91, 95, 96, 45, 21, + 94, 32, 25, 26, 27, 28, 78, 21, 75, 19, + 93, 98, 81, 45, 46, 47, 48, 49, 50, 97, + 97, 36, 81, 86, 8, 19, 76, 20, 53, 21, + 80, 81, 91, 81, 91, 95, 53, 51, 77, 75, + 43, 82, 20, 81, 20, 20, 44, 80, 45, 53 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -844,11 +847,11 @@ static const yytype_int8 yyr1[] = 62, 62, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 75, 76, 76, 77, 78, 78, 78, 78, 79, 80, 80, 81, 81, 81, - 82, 82, 83, 84, 85, 86, 87, 87, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 89, 89, 90, - 91, 91, 92, 92, 93, 93, 93, 94, 94, 94, - 94, 95, 95, 95, 95, 95, 95, 96, 97, 98, - 99, 100, 100 + 82, 82, 83, 84, 85, 85, 86, 87, 88, 89, + 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 91, 91, 92, 93, 93, 94, 94, 95, 95, 95, + 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, + 98, 99, 100, 101, 102, 102 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -859,11 +862,11 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 8, 5, 8, 0, 3, 5, 2, 1, 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, - 0, 4, 4, 7, 6, 2, 1, 3, 3, 3, - 3, 3, 3, 2, 1, 1, 1, 1, 3, 1, - 1, 3, 0, 2, 0, 1, 3, 3, 3, 3, - 3, 1, 1, 1, 1, 1, 1, 0, 7, 2, - 4, 0, 1 + 0, 4, 4, 5, 1, 3, 3, 6, 2, 1, + 3, 3, 3, 3, 3, 3, 2, 1, 1, 1, + 1, 3, 1, 1, 3, 0, 2, 0, 1, 3, + 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, + 0, 7, 2, 4, 0, 1 }; @@ -1725,93 +1728,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 190 "yacc_sql.y" +#line 194 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1734 "yacc_sql.cpp" +#line 1737 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 220 "yacc_sql.y" +#line 224 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1743 "yacc_sql.cpp" +#line 1746 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 226 "yacc_sql.y" +#line 230 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1751 "yacc_sql.cpp" +#line 1754 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 231 "yacc_sql.y" +#line 235 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1759 "yacc_sql.cpp" +#line 1762 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 237 "yacc_sql.y" +#line 241 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1767 "yacc_sql.cpp" +#line 1770 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 243 "yacc_sql.y" +#line 247 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1775 "yacc_sql.cpp" +#line 1778 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 249 "yacc_sql.y" +#line 253 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1783 "yacc_sql.cpp" +#line 1786 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 255 "yacc_sql.y" +#line 259 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1793 "yacc_sql.cpp" +#line 1796 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 262 "yacc_sql.y" +#line 266 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1801 "yacc_sql.cpp" +#line 1804 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 268 "yacc_sql.y" +#line 272 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1811 "yacc_sql.cpp" +#line 1814 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 277 "yacc_sql.y" +#line 281 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1822,11 +1825,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1826 "yacc_sql.cpp" +#line 1829 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 291 "yacc_sql.y" +#line 295 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1834,11 +1837,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1838 "yacc_sql.cpp" +#line 1841 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 301 "yacc_sql.y" +#line 305 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1859,19 +1862,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1863 "yacc_sql.cpp" +#line 1866 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 324 "yacc_sql.y" +#line 328 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1871 "yacc_sql.cpp" +#line 1874 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 328 "yacc_sql.y" +#line 332 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1881,11 +1884,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1885 "yacc_sql.cpp" +#line 1888 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE */ -#line 341 "yacc_sql.y" +#line 345 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-3].number); @@ -1893,11 +1896,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = (yyvsp[-1].number); free((yyvsp[-4].string)); } -#line 1897 "yacc_sql.cpp" +#line 1900 "yacc_sql.cpp" break; case 38: /* attr_def: ID type */ -#line 349 "yacc_sql.y" +#line 353 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[0].number); @@ -1905,41 +1908,41 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; free((yyvsp[-1].string)); } -#line 1909 "yacc_sql.cpp" +#line 1912 "yacc_sql.cpp" break; case 39: /* number: NUMBER */ -#line 358 "yacc_sql.y" +#line 362 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1915 "yacc_sql.cpp" +#line 1918 "yacc_sql.cpp" break; case 40: /* type: INT_T */ -#line 361 "yacc_sql.y" +#line 365 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1921 "yacc_sql.cpp" +#line 1924 "yacc_sql.cpp" break; case 41: /* type: STRING_T */ -#line 362 "yacc_sql.y" +#line 366 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1927 "yacc_sql.cpp" +#line 1930 "yacc_sql.cpp" break; case 42: /* type: FLOAT_T */ -#line 363 "yacc_sql.y" +#line 367 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1933 "yacc_sql.cpp" +#line 1936 "yacc_sql.cpp" break; case 43: /* type: DATE_T */ -#line 364 "yacc_sql.y" +#line 368 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1939 "yacc_sql.cpp" +#line 1942 "yacc_sql.cpp" break; case 44: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 368 "yacc_sql.y" +#line 372 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1952,19 +1955,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1956 "yacc_sql.cpp" +#line 1959 "yacc_sql.cpp" break; case 45: /* value_list: %empty */ -#line 384 "yacc_sql.y" +#line 388 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 1964 "yacc_sql.cpp" +#line 1967 "yacc_sql.cpp" break; case 46: /* value_list: COMMA value value_list */ -#line 387 "yacc_sql.y" +#line 391 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -1974,56 +1977,56 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1978 "yacc_sql.cpp" +#line 1981 "yacc_sql.cpp" break; case 47: /* value: NUMBER */ -#line 398 "yacc_sql.y" +#line 402 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 1987 "yacc_sql.cpp" +#line 1990 "yacc_sql.cpp" break; case 48: /* value: FLOAT */ -#line 402 "yacc_sql.y" +#line 406 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 1996 "yacc_sql.cpp" +#line 1999 "yacc_sql.cpp" break; case 49: /* value: SSS */ -#line 406 "yacc_sql.y" +#line 410 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2007 "yacc_sql.cpp" +#line 2010 "yacc_sql.cpp" break; case 50: /* storage_format: %empty */ -#line 415 "yacc_sql.y" +#line 419 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2015 "yacc_sql.cpp" +#line 2018 "yacc_sql.cpp" break; case 51: /* storage_format: STORAGE FORMAT EQ ID */ -#line 419 "yacc_sql.y" +#line 423 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2023 "yacc_sql.cpp" +#line 2026 "yacc_sql.cpp" break; case 52: /* delete_stmt: DELETE FROM ID where */ -#line 426 "yacc_sql.y" +#line 430 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2033,28 +2036,57 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2037 "yacc_sql.cpp" +#line 2040 "yacc_sql.cpp" break; - case 53: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 438 "yacc_sql.y" + case 53: /* update_stmt: UPDATE ID SET setClauses where */ +#line 443 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); - (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); - (yyval.sql_node)->update.attribute_name = (yyvsp[-3].string); - (yyval.sql_node)->update.value = *(yyvsp[-1].value); + (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); + (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].condition_list) != nullptr) { (yyval.sql_node)->update.conditions.swap(*(yyvsp[0].condition_list)); delete (yyvsp[0].condition_list); } - free((yyvsp[-5].string)); free((yyvsp[-3].string)); + delete (yyvsp[-1].set_clauses); + } +#line 2056 "yacc_sql.cpp" + break; + + case 54: /* setClauses: setClause */ +#line 458 "yacc_sql.y" + { + (yyval.set_clauses) = new std::vector; + (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); + delete (yyvsp[0].set_clause); + } +#line 2066 "yacc_sql.cpp" + break; + + case 55: /* setClauses: setClauses COMMA setClause */ +#line 464 "yacc_sql.y" + { + (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); + delete (yyvsp[0].set_clause); + } +#line 2075 "yacc_sql.cpp" + break; + + case 56: /* setClause: ID EQ value */ +#line 472 "yacc_sql.y" + { + (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause)->field_name = (yyvsp[-2].string); + (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); + free((yyvsp[-2].string)); } -#line 2054 "yacc_sql.cpp" +#line 2086 "yacc_sql.cpp" break; - case 54: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 453 "yacc_sql.y" + case 57: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 482 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2077,30 +2109,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2081 "yacc_sql.cpp" +#line 2113 "yacc_sql.cpp" break; - case 55: /* calc_stmt: CALC expression_list */ -#line 478 "yacc_sql.y" + case 58: /* calc_stmt: CALC expression_list */ +#line 507 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2091 "yacc_sql.cpp" +#line 2123 "yacc_sql.cpp" break; - case 56: /* expression_list: expression */ -#line 487 "yacc_sql.y" + case 59: /* expression_list: expression */ +#line 516 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2100 "yacc_sql.cpp" +#line 2132 "yacc_sql.cpp" break; - case 57: /* expression_list: expression COMMA expression_list */ -#line 492 "yacc_sql.y" + case 60: /* expression_list: expression COMMA expression_list */ +#line 521 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2109,99 +2141,99 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2113 "yacc_sql.cpp" +#line 2145 "yacc_sql.cpp" break; - case 58: /* expression: expression '+' expression */ -#line 502 "yacc_sql.y" + case 61: /* expression: expression '+' expression */ +#line 531 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2121 "yacc_sql.cpp" +#line 2153 "yacc_sql.cpp" break; - case 59: /* expression: expression '-' expression */ -#line 505 "yacc_sql.y" + case 62: /* expression: expression '-' expression */ +#line 534 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2129 "yacc_sql.cpp" +#line 2161 "yacc_sql.cpp" break; - case 60: /* expression: expression '*' expression */ -#line 508 "yacc_sql.y" + case 63: /* expression: expression '*' expression */ +#line 537 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2137 "yacc_sql.cpp" +#line 2169 "yacc_sql.cpp" break; - case 61: /* expression: expression '/' expression */ -#line 511 "yacc_sql.y" + case 64: /* expression: expression '/' expression */ +#line 540 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2145 "yacc_sql.cpp" +#line 2177 "yacc_sql.cpp" break; - case 62: /* expression: LBRACE expression RBRACE */ -#line 514 "yacc_sql.y" + case 65: /* expression: LBRACE expression RBRACE */ +#line 543 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2154 "yacc_sql.cpp" +#line 2186 "yacc_sql.cpp" break; - case 63: /* expression: '-' expression */ -#line 518 "yacc_sql.y" + case 66: /* expression: '-' expression */ +#line 547 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2162 "yacc_sql.cpp" +#line 2194 "yacc_sql.cpp" break; - case 64: /* expression: value */ -#line 521 "yacc_sql.y" + case 67: /* expression: value */ +#line 550 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2172 "yacc_sql.cpp" +#line 2204 "yacc_sql.cpp" break; - case 65: /* expression: rel_attr */ -#line 526 "yacc_sql.y" + case 68: /* expression: rel_attr */ +#line 555 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2183 "yacc_sql.cpp" +#line 2215 "yacc_sql.cpp" break; - case 66: /* expression: '*' */ -#line 532 "yacc_sql.y" + case 69: /* expression: '*' */ +#line 561 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2191 "yacc_sql.cpp" +#line 2223 "yacc_sql.cpp" break; - case 67: /* rel_attr: ID */ -#line 539 "yacc_sql.y" + case 70: /* rel_attr: ID */ +#line 568 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2201 "yacc_sql.cpp" +#line 2233 "yacc_sql.cpp" break; - case 68: /* rel_attr: ID DOT ID */ -#line 544 "yacc_sql.y" + case 71: /* rel_attr: ID DOT ID */ +#line 573 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2209,29 +2241,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2213 "yacc_sql.cpp" +#line 2245 "yacc_sql.cpp" break; - case 69: /* relation: ID */ -#line 554 "yacc_sql.y" + case 72: /* relation: ID */ +#line 583 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2221 "yacc_sql.cpp" +#line 2253 "yacc_sql.cpp" break; - case 70: /* rel_list: relation */ -#line 559 "yacc_sql.y" + case 73: /* rel_list: relation */ +#line 588 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2231 "yacc_sql.cpp" +#line 2263 "yacc_sql.cpp" break; - case 71: /* rel_list: relation COMMA rel_list */ -#line 564 "yacc_sql.y" + case 74: /* rel_list: relation COMMA rel_list */ +#line 593 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2242,55 +2274,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2246 "yacc_sql.cpp" +#line 2278 "yacc_sql.cpp" break; - case 72: /* where: %empty */ -#line 578 "yacc_sql.y" + case 75: /* where: %empty */ +#line 607 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2254 "yacc_sql.cpp" +#line 2286 "yacc_sql.cpp" break; - case 73: /* where: WHERE condition_list */ -#line 581 "yacc_sql.y" + case 76: /* where: WHERE condition_list */ +#line 610 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2262 "yacc_sql.cpp" +#line 2294 "yacc_sql.cpp" break; - case 74: /* condition_list: %empty */ -#line 587 "yacc_sql.y" + case 77: /* condition_list: %empty */ +#line 616 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2270 "yacc_sql.cpp" +#line 2302 "yacc_sql.cpp" break; - case 75: /* condition_list: condition */ -#line 590 "yacc_sql.y" + case 78: /* condition_list: condition */ +#line 619 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2280 "yacc_sql.cpp" +#line 2312 "yacc_sql.cpp" break; - case 76: /* condition_list: condition AND condition_list */ -#line 595 "yacc_sql.y" + case 79: /* condition_list: condition AND condition_list */ +#line 624 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2290 "yacc_sql.cpp" +#line 2322 "yacc_sql.cpp" break; - case 77: /* condition: rel_attr comp_op value */ -#line 603 "yacc_sql.y" + case 80: /* condition: rel_attr comp_op value */ +#line 632 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2302,11 +2334,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2306 "yacc_sql.cpp" +#line 2338 "yacc_sql.cpp" break; - case 78: /* condition: value comp_op value */ -#line 615 "yacc_sql.y" + case 81: /* condition: value comp_op value */ +#line 644 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2318,11 +2350,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2322 "yacc_sql.cpp" +#line 2354 "yacc_sql.cpp" break; - case 79: /* condition: rel_attr comp_op rel_attr */ -#line 627 "yacc_sql.y" + case 82: /* condition: rel_attr comp_op rel_attr */ +#line 656 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2334,11 +2366,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2338 "yacc_sql.cpp" +#line 2370 "yacc_sql.cpp" break; - case 80: /* condition: value comp_op rel_attr */ -#line 639 "yacc_sql.y" + case 83: /* condition: value comp_op rel_attr */ +#line 668 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2350,55 +2382,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2354 "yacc_sql.cpp" +#line 2386 "yacc_sql.cpp" break; - case 81: /* comp_op: EQ */ -#line 653 "yacc_sql.y" + case 84: /* comp_op: EQ */ +#line 682 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2360 "yacc_sql.cpp" +#line 2392 "yacc_sql.cpp" break; - case 82: /* comp_op: LT */ -#line 654 "yacc_sql.y" + case 85: /* comp_op: LT */ +#line 683 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2366 "yacc_sql.cpp" +#line 2398 "yacc_sql.cpp" break; - case 83: /* comp_op: GT */ -#line 655 "yacc_sql.y" + case 86: /* comp_op: GT */ +#line 684 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2372 "yacc_sql.cpp" +#line 2404 "yacc_sql.cpp" break; - case 84: /* comp_op: LE */ -#line 656 "yacc_sql.y" + case 87: /* comp_op: LE */ +#line 685 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2378 "yacc_sql.cpp" +#line 2410 "yacc_sql.cpp" break; - case 85: /* comp_op: GE */ -#line 657 "yacc_sql.y" + case 88: /* comp_op: GE */ +#line 686 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2384 "yacc_sql.cpp" +#line 2416 "yacc_sql.cpp" break; - case 86: /* comp_op: NE */ -#line 658 "yacc_sql.y" + case 89: /* comp_op: NE */ +#line 687 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2390 "yacc_sql.cpp" +#line 2422 "yacc_sql.cpp" break; - case 87: /* group_by: %empty */ -#line 664 "yacc_sql.y" + case 90: /* group_by: %empty */ +#line 693 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2398 "yacc_sql.cpp" +#line 2430 "yacc_sql.cpp" break; - case 88: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 670 "yacc_sql.y" + case 91: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 699 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2408,20 +2440,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2412 "yacc_sql.cpp" +#line 2444 "yacc_sql.cpp" break; - case 89: /* explain_stmt: EXPLAIN command_wrapper */ -#line 683 "yacc_sql.y" + case 92: /* explain_stmt: EXPLAIN command_wrapper */ +#line 712 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2421 "yacc_sql.cpp" +#line 2453 "yacc_sql.cpp" break; - case 90: /* set_variable_stmt: SET ID EQ value */ -#line 691 "yacc_sql.y" + case 93: /* set_variable_stmt: SET ID EQ value */ +#line 720 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2429,11 +2461,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2433 "yacc_sql.cpp" +#line 2465 "yacc_sql.cpp" break; -#line 2437 "yacc_sql.cpp" +#line 2469 "yacc_sql.cpp" default: break; } @@ -2662,7 +2694,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 703 "yacc_sql.y" +#line 732 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 53b61172..c3b6e922 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -130,11 +130,13 @@ union YYSTYPE std::vector * condition_list; std::vector * rel_attr_list; std::vector * relation_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; char * string; int number; float floats; -#line 138 "yacc_sql.hpp" +#line 140 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 476bcdb3..50bcb21e 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -128,6 +128,8 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, std::vector * condition_list; std::vector * rel_attr_list; std::vector * relation_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; char * string; int number; float floats; @@ -157,6 +159,8 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type expression %type expression_list %type group_by +%type setClause; +%type setClauses; %type calc_stmt %type select_stmt %type insert_stmt @@ -433,21 +437,46 @@ delete_stmt: /* delete 语句的语法解析树*/ free($3); } ; + update_stmt: /* update 语句的语法解析树*/ - UPDATE ID SET ID EQ value where + UPDATE ID SET setClauses where { $$ = new ParsedSqlNode(SCF_UPDATE); $$->update.relation_name = $2; - $$->update.attribute_name = $4; - $$->update.value = *$6; - if ($7 != nullptr) { - $$->update.conditions.swap(*$7); - delete $7; + $$->update.set_clauses.swap(*$4); + if ($5 != nullptr) { + $$->update.conditions.swap(*$5); + delete $5; } free($2); - free($4); + delete $4; } ; + +setClauses: + setClause + { + $$ = new std::vector; + $$->emplace_back(*$1); + delete $1; + } + | setClauses COMMA setClause + { + $$->emplace_back(*$3); + delete $3; + } + ; + +setClause: + ID EQ value + { + $$ = new SetClauseSqlNode; + $$->field_name = $1; + $$->value = std::move(*$3); + free($1); + } + ; + select_stmt: /* select 语句的语法解析树*/ SELECT expression_list FROM rel_list where group_by { diff --git a/src/observer/sql/stmt/update_stmt.cpp b/src/observer/sql/stmt/update_stmt.cpp index 946f3dad..a4b98355 100644 --- a/src/observer/sql/stmt/update_stmt.cpp +++ b/src/observer/sql/stmt/update_stmt.cpp @@ -18,17 +18,26 @@ See the Mulan PSL v2 for more details. */ #include #include -UpdateStmt::UpdateStmt(Table *table, const char *attribute_name, const Value *values, FilterStmt *filter_stmt) - : table_(table), attribute_name_(attribute_name), values_(values), filter_stmt_(filter_stmt) +#include + +UpdateStmt::UpdateStmt( + Table *table, std::vector field_metas, std::vector values, FilterStmt *filter_stmt) + : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)), filter_stmt_(filter_stmt) {} RC UpdateStmt::create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt) { // TODO const char *table_name = update_sql.relation_name.c_str(); - if (nullptr == db || nullptr == table_name || update_sql.attribute_name.empty()) { - LOG_WARN("invalid argument. db=%p, table_name=%p, attribute_name=%s", - db, table_name, update_sql.attribute_name.c_str()); + if (nullptr == db || nullptr == table_name || update_sql.set_clauses.empty()) { + std::ostringstream set_clauses_logger; + set_clauses_logger << "invalid argument. db=" << db << ", table_name=" << table_name; + set_clauses_logger << ", set_clauses=["; + for (const auto &clause : update_sql.set_clauses) { + set_clauses_logger << "{" << clause.field_name << ": " << clause.value.to_string() << "}, "; + } + set_clauses_logger << "]"; + LOG_WARN("%s", set_clauses_logger.str().c_str()); return RC::INVALID_ARGUMENT; } @@ -39,30 +48,40 @@ RC UpdateStmt::create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt) return RC::SCHEMA_TABLE_NOT_EXIST; } - // check whether the field exists - auto field_meta = table->table_meta().field(update_sql.attribute_name.c_str()); - if (field_meta == nullptr) { - return RC::SCHEMA_FIELD_NOT_EXIST; - } + auto table_meta = table->table_meta(); + std::vector field_metas; + std::vector values; + + for (auto &clause : update_sql.set_clauses) { + // check whether the field exists + auto field_meta = table_meta.field(clause.field_name.c_str()); + if (field_meta == nullptr) { + LOG_WARN("no such field. db=%s, table_name=%s", db->name(), table_name); + return RC::SCHEMA_FIELD_NOT_EXIST; + } + + // check whether the value valid + auto value = &clause.value; + if (value->attr_type() == AttrType::INTS && field_meta->type() == AttrType::FLOATS) { + // do nothing,但是好像不用考虑类型转换 + } else if (value->attr_type() != field_meta->type()) { + LOG_ERROR("Schema field type mismatch. Field: %s, Expected Type: %s, Provided Type: %s", + field_meta->name(), + attr_type_to_string(field_meta->type()), + attr_type_to_string(value->attr_type())); + return RC::SCHEMA_FIELD_TYPE_MISMATCH; + } else if (value->length() > field_meta->len()) { + LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", + field_meta->name(), + attr_type_to_string(field_meta->type()), + field_meta->offset(), + value->length(), + field_meta->len()); + return RC::VALUE_TOO_LONG; + } - // check whether the value valid - const Value *value = &update_sql.value; - if (value->attr_type() == AttrType::INTS && field_meta->type() == AttrType::FLOATS) { - // do nothing,但是好像不用考虑类型转换 - } else if (value->attr_type() != field_meta->type()) { - LOG_ERROR("Schema field type mismatch. Field: %s, Expected Type: %s, Provided Type: %s", - field_meta->name(), - attr_type_to_string(field_meta->type()), - attr_type_to_string(value->attr_type())); - return RC::SCHEMA_FIELD_TYPE_MISMATCH; - } else if (value->length() > field_meta->len()) { - LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", - field_meta->name(), - attr_type_to_string(field_meta->type()), - field_meta->offset(), - value->length(), - field_meta->len()); - return RC::VALUE_TOO_LONG; + field_metas.emplace_back(*field_meta); + values.emplace_back(value); } std::unordered_map table_map; @@ -77,6 +96,6 @@ RC UpdateStmt::create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt) } // everything alright - stmt = new UpdateStmt(table, update_sql.attribute_name.c_str(), value, filter_stmt); + stmt = new UpdateStmt(table, field_metas, values, filter_stmt); return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/update_stmt.h b/src/observer/sql/stmt/update_stmt.h index cb451f98..2f373774 100644 --- a/src/observer/sql/stmt/update_stmt.h +++ b/src/observer/sql/stmt/update_stmt.h @@ -16,6 +16,7 @@ See the Mulan PSL v2 for more details. */ #include "common/rc.h" #include "sql/stmt/stmt.h" +#include "storage/field/field_meta.h" class Table; class FilterStmt; @@ -28,23 +29,21 @@ class UpdateStmt : public Stmt { public: UpdateStmt() = default; - UpdateStmt(Table *table, const char *attribute_name, const Value *values, FilterStmt *filter_stmt); + UpdateStmt( + Table *table, std::vector field_metas, std::vector values, FilterStmt *filter_stmt); StmtType type() const override { return StmtType::UPDATE; } - Table *table() const { return table_; } - const char *attribute_name() const { return attribute_name_; } - const Value *values() const { return values_; } - FilterStmt *filter_stmt() const { return filter_stmt_; } - int value_amount() const { return value_amount_; } + Table *table() const { return table_; } + const std::vector &field_metas() const { return field_metas_; } + const std::vector &values() const { return values_; } + FilterStmt *filter_stmt() const { return filter_stmt_; } -public: static RC create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt); private: - Table *table_ = nullptr; - const char *attribute_name_ = nullptr; - const Value *values_ = nullptr; - FilterStmt *filter_stmt_ = nullptr; - int value_amount_ = 0; + Table *table_ = nullptr; + std::vector field_metas_; + std::vector values_; + FilterStmt *filter_stmt_ = nullptr; }; From 069c2c938b974bd8a8304b73cb3450488130813f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 26 Sep 2024 03:29:24 +0000 Subject: [PATCH 014/308] =?UTF-8?q?agg=E4=B8=AD=E7=89=B9=E6=AE=8A=E6=83=85?= =?UTF-8?q?=E5=86=B5=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- src/observer/sql/expr/expression.cpp | 3 + src/observer/sql/expr/expression.h | 21 +- src/observer/sql/parser/expression_binder.cpp | 1 + src/observer/sql/parser/gen_parser.sh | 2 +- src/observer/sql/parser/yacc_sql.cpp | 214 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 8 +- 7 files changed, 132 insertions(+), 119 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 14824575..f562437f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) +#SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index cb286a7f..56cc136b 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -515,6 +515,9 @@ RC ArithmeticExpr::try_get_value(Value &value) const UnboundAggregateExpr::UnboundAggregateExpr(const char *aggregate_name, Expression *child) : aggregate_name_(aggregate_name), child_(child) {} +UnboundAggregateExpr::UnboundAggregateExpr(const char *aggregate_name, std::unique_ptr child) + : aggregate_name_(aggregate_name), child_(std::move(child)) +{} //////////////////////////////////////////////////////////////////////////////// AggregateExpr::AggregateExpr(Type type, Expression *child) : aggregate_type_(type), child_(child) {} diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 7058fda4..5c66a10f 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -65,7 +65,7 @@ enum class ExprType class Expression { public: - Expression() = default; + Expression() = default; virtual ~Expression() = default; /** @@ -138,8 +138,8 @@ class Expression class StarExpr : public Expression { public: - StarExpr() : table_name_() {} - StarExpr(const char *table_name) : table_name_(table_name) {} + StarExpr() : table_name_() {} + StarExpr(const char *table_name) : table_name_(table_name) {} virtual ~StarExpr() = default; ExprType type() const override { return ExprType::STAR; } @@ -216,7 +216,7 @@ class FieldExpr : public Expression class ValueExpr : public Expression { public: - ValueExpr() = default; + ValueExpr() = default; explicit ValueExpr(const Value &value) : value_(value) {} virtual ~ValueExpr() = default; @@ -249,7 +249,7 @@ class ValueExpr : public Expression class CastExpr : public Expression { public: - CastExpr(std::unique_ptr child, AttrType cast_type); + CastExpr(std::unique_ptr child, AttrType cast_type); virtual ~CastExpr(); ExprType type() const override { return ExprType::CAST; } @@ -277,7 +277,7 @@ class CastExpr : public Expression class ComparisonExpr : public Expression { public: - ComparisonExpr(CompOp comp, std::unique_ptr left, std::unique_ptr right); + ComparisonExpr(CompOp comp, std::unique_ptr left, std::unique_ptr right); virtual ~ComparisonExpr(); ExprType type() const override { return ExprType::COMPARISON; } @@ -331,7 +331,7 @@ class ConjunctionExpr : public Expression }; public: - ConjunctionExpr(Type type, std::vector> &children); + ConjunctionExpr(Type type, std::vector> &children); virtual ~ConjunctionExpr() = default; ExprType type() const override { return ExprType::CONJUNCTION; } @@ -364,8 +364,8 @@ class ArithmeticExpr : public Expression }; public: - ArithmeticExpr(Type type, Expression *left, Expression *right); - ArithmeticExpr(Type type, std::unique_ptr left, std::unique_ptr right); + ArithmeticExpr(Type type, Expression *left, Expression *right); + ArithmeticExpr(Type type, std::unique_ptr left, std::unique_ptr right); virtual ~ArithmeticExpr() = default; bool equal(const Expression &other) const override; @@ -408,7 +408,8 @@ class ArithmeticExpr : public Expression class UnboundAggregateExpr : public Expression { public: - UnboundAggregateExpr(const char *aggregate_name, Expression *child); + UnboundAggregateExpr(const char *aggregate_name, Expression *child); + UnboundAggregateExpr(const char *aggregate_name, std::unique_ptr child); virtual ~UnboundAggregateExpr() = default; ExprType type() const override { return ExprType::UNBOUND_AGGREGATION; } diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 025c1369..331f31b2 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -379,6 +379,7 @@ RC check_aggregate_expression(AggregateExpr &expression) } break; case AggregateExpr::Type::COUNT: + case AggregateExpr::Type::MAX: case AggregateExpr::Type::MIN: { // 任何类型都支持 diff --git a/src/observer/sql/parser/gen_parser.sh b/src/observer/sql/parser/gen_parser.sh index 771fc772..ee463786 100755 --- a/src/observer/sql/parser/gen_parser.sh +++ b/src/observer/sql/parser/gen_parser.sh @@ -1,3 +1,3 @@ #!/bin/bash flex --outfile lex_sql.cpp --header-file=lex_sql.h lex_sql.l -`which bison` -d --output yacc_sql.cpp yacc_sql.y +bison -d --output yacc_sql.cpp yacc_sql.y diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 23c93fd7..48a952a0 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -581,7 +581,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 148 +#define YYLAST 144 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 60 @@ -651,10 +651,10 @@ static const yytype_int16 yyrline[] = 263, 269, 277, 291, 301, 325, 328, 341, 349, 359, 362, 363, 364, 365, 368, 385, 388, 399, 403, 407, 416, 419, 426, 438, 453, 478, 487, 492, 503, 506, - 509, 512, 515, 519, 522, 527, 533, 536, 542, 548, - 553, 563, 568, 573, 587, 590, 596, 599, 604, 611, - 623, 635, 647, 662, 663, 664, 665, 666, 667, 673, - 678, 691, 699, 709, 710 + 509, 512, 515, 519, 522, 527, 533, 536, 542, 552, + 557, 567, 572, 577, 591, 594, 600, 603, 608, 615, + 627, 639, 651, 666, 667, 668, 669, 670, 671, 677, + 682, 695, 703, 713, 714 }; #endif @@ -711,23 +711,23 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 65, 24, 25, -6, -6, -25, 20, -101, 5, 4, - -14, -101, -101, -101, -101, -101, -10, 9, 65, 52, - 50, -101, -101, -101, -101, -101, -101, -101, -101, -101, + 63, 21, 24, -6, -6, -25, 26, -101, 1, 4, + -16, -101, -101, -101, -101, -101, -14, 9, 63, 43, + 49, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, 1, 10, 12, 19, -6, -101, -101, -15, -101, - -6, -101, -101, -101, 41, -101, -101, 57, -101, -101, - 21, 22, 47, 48, 45, -101, -101, -101, -101, 73, - 62, -101, 63, 3, -6, 53, -101, -6, -6, -6, - -6, -6, 55, 70, 74, 58, -37, 51, 59, 60, - 64, -101, 11, -101, -101, -46, -46, -101, -101, -101, - 89, 74, 96, -32, -101, 71, -101, 90, -1, 102, - 105, -101, -101, 55, -101, -37, 94, -40, -40, -101, - 91, -37, 118, -101, -101, -101, -101, 109, 59, 110, - 76, -101, -101, 111, -101, -101, -101, -101, -101, -101, - -32, -32, -32, 74, 78, 82, 102, 92, 114, -37, - 116, -101, -101, -101, -101, -101, -101, -101, -101, 117, - -101, 95, -101, -101, 111, -101, -101, 93, -101, 87, + -101, 0, 10, 12, 13, -6, -101, -101, -15, -101, + -6, -101, -101, -101, 33, -101, -101, 37, -101, -101, + 19, 29, 46, 39, 53, -101, -101, -101, -101, 80, + 65, -101, 66, 3, -6, 48, -101, -6, -6, -6, + -6, -6, 54, 73, 74, 55, -37, 56, 58, 59, + 60, -101, 94, -101, -101, -46, -46, -101, -101, -101, + 95, 74, 96, -32, -101, 72, -101, 86, -1, 98, + 101, -101, -101, 54, -101, -37, 90, -40, -40, -101, + 87, -37, 114, -101, -101, -101, -101, 105, 58, 106, + 75, -101, -101, 104, -101, -101, -101, -101, -101, -101, + -32, -32, -32, 74, 76, 79, 98, 84, 111, -37, + 112, -101, -101, -101, -101, -101, -101, -101, -101, 113, + -101, 91, -101, -101, 104, -101, -101, 89, -101, 83, -101 }; @@ -759,10 +759,10 @@ static const yytype_int8 yydefact[] = /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -101, -101, 123, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -3, 14, -101, -101, -101, - -20, -85, -101, -101, -101, -101, -101, -4, 40, -101, - -100, -101, 32, -99, 6, -101, 28, -101, -101, -101, + -101, -101, 119, -101, -101, -101, -101, -101, -101, -101, + -101, -101, -101, -101, -101, -8, 11, -101, -101, -101, + -24, -85, -101, -101, -101, -101, -101, -4, 17, -101, + -100, -101, 28, -99, 2, -101, 25, -101, -101, -101, -101, -101 }; @@ -783,38 +783,38 @@ static const yytype_uint8 yytable[] = { 57, 106, 114, 118, 74, 134, 135, 136, 137, 138, 139, 80, 81, 45, 46, 47, 75, 49, 117, 46, - 47, 116, 49, 91, 123, 124, 125, 126, 58, 59, - 133, 112, 41, 43, 42, 44, 143, 60, 61, 62, - 152, 154, 118, 63, 156, 46, 47, 48, 49, 64, - 50, 51, 66, 67, 69, 151, 153, 117, 78, 79, - 80, 81, 77, 70, 164, 71, 78, 79, 80, 81, - 1, 2, 72, 94, 83, 84, 3, 4, 5, 6, - 7, 8, 9, 10, 85, 73, 87, 11, 12, 13, - 76, 82, 88, 86, 14, 15, 78, 79, 80, 81, - 89, 90, 16, 102, 17, 107, 93, 18, 99, 103, - 113, 105, 108, 110, 92, 115, 121, 111, 95, 96, - 97, 98, 122, 128, 130, 75, 144, 142, 145, 148, - 147, 157, 149, 158, 163, 161, 165, 166, 169, 167, - 170, 65, 146, 160, 168, 131, 141, 0, 155 + 47, 116, 49, 91, 123, 124, 125, 126, 58, 41, + 133, 42, 43, 60, 44, 59, 143, 62, 61, 63, + 152, 154, 118, 66, 156, 46, 47, 48, 49, 64, + 50, 51, 67, 69, 77, 151, 153, 117, 78, 79, + 80, 81, 73, 70, 164, 71, 72, 76, 1, 2, + 92, 82, 83, 94, 3, 4, 5, 6, 7, 8, + 9, 10, 84, 85, 86, 11, 12, 13, 78, 79, + 80, 81, 14, 15, 87, 95, 96, 97, 98, 88, + 16, 93, 17, 89, 90, 18, 102, 99, 105, 103, + 107, 108, 110, 111, 112, 115, 113, 121, 122, 128, + 130, 75, 144, 142, 145, 149, 147, 161, 148, 157, + 158, 163, 165, 166, 169, 167, 170, 65, 160, 146, + 168, 131, 0, 141, 155 }; static const yytype_int16 yycheck[] = { 4, 86, 101, 103, 19, 45, 46, 47, 48, 49, 50, 57, 58, 19, 51, 52, 31, 54, 103, 51, - 52, 53, 54, 20, 25, 26, 27, 28, 53, 9, - 115, 20, 8, 8, 10, 10, 121, 32, 34, 53, - 140, 141, 142, 53, 143, 51, 52, 53, 54, 40, - 56, 57, 0, 3, 53, 140, 141, 142, 55, 56, - 57, 58, 21, 53, 149, 53, 55, 56, 57, 58, - 5, 6, 53, 77, 53, 53, 11, 12, 13, 14, - 15, 16, 17, 18, 37, 45, 41, 22, 23, 24, - 50, 34, 19, 45, 29, 30, 55, 56, 57, 58, - 38, 38, 37, 33, 39, 54, 53, 42, 53, 35, - 21, 53, 53, 53, 74, 19, 45, 53, 78, 79, - 80, 81, 32, 21, 19, 31, 8, 36, 19, 53, - 20, 53, 21, 51, 20, 43, 20, 20, 45, 44, - 53, 18, 128, 146, 164, 113, 118, -1, 142 + 52, 53, 54, 20, 25, 26, 27, 28, 53, 8, + 115, 10, 8, 32, 10, 9, 121, 53, 34, 53, + 140, 141, 142, 0, 143, 51, 52, 53, 54, 40, + 56, 57, 3, 53, 21, 140, 141, 142, 55, 56, + 57, 58, 45, 53, 149, 53, 53, 50, 5, 6, + 74, 34, 53, 77, 11, 12, 13, 14, 15, 16, + 17, 18, 53, 37, 45, 22, 23, 24, 55, 56, + 57, 58, 29, 30, 41, 78, 79, 80, 81, 19, + 37, 53, 39, 38, 38, 42, 33, 53, 53, 35, + 54, 53, 53, 53, 20, 19, 21, 45, 32, 21, + 19, 31, 8, 36, 19, 21, 20, 43, 53, 53, + 51, 20, 20, 20, 45, 44, 53, 18, 146, 128, + 164, 113, -1, 118, 142 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -830,7 +830,7 @@ static const yytype_int8 yystos[] = 32, 34, 53, 53, 40, 62, 0, 3, 101, 53, 53, 53, 53, 88, 19, 31, 88, 21, 55, 56, 57, 58, 34, 53, 53, 37, 45, 41, 19, 38, - 38, 20, 88, 53, 87, 88, 88, 88, 88, 53, + 38, 20, 87, 53, 87, 88, 88, 88, 88, 53, 91, 92, 33, 35, 93, 53, 81, 54, 53, 76, 53, 53, 20, 21, 93, 19, 53, 81, 90, 94, 95, 45, 32, 25, 26, 27, 28, 78, 21, 75, @@ -2203,26 +2203,30 @@ YYLTYPE yylloc = yyloc_default; #line 2204 "yacc_sql.cpp" break; - case 68: /* aggr_func_expr: ID LBRACE expression RBRACE */ + case 68: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 543 "yacc_sql.y" { - (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), (yyvsp[-1].expression)); + if((*(yyvsp[-1].expression_list)).size() != 1) { + (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); + } else { + (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); + } } -#line 2212 "yacc_sql.cpp" +#line 2216 "yacc_sql.cpp" break; case 69: /* rel_attr: ID */ -#line 548 "yacc_sql.y" +#line 552 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2222 "yacc_sql.cpp" +#line 2226 "yacc_sql.cpp" break; case 70: /* rel_attr: ID DOT ID */ -#line 553 "yacc_sql.y" +#line 557 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2230,29 +2234,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2234 "yacc_sql.cpp" +#line 2238 "yacc_sql.cpp" break; case 71: /* relation: ID */ -#line 563 "yacc_sql.y" +#line 567 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2242 "yacc_sql.cpp" +#line 2246 "yacc_sql.cpp" break; case 72: /* rel_list: relation */ -#line 568 "yacc_sql.y" +#line 572 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2252 "yacc_sql.cpp" +#line 2256 "yacc_sql.cpp" break; case 73: /* rel_list: relation COMMA rel_list */ -#line 573 "yacc_sql.y" +#line 577 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2263,55 +2267,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2267 "yacc_sql.cpp" +#line 2271 "yacc_sql.cpp" break; case 74: /* where: %empty */ -#line 587 "yacc_sql.y" +#line 591 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2275 "yacc_sql.cpp" +#line 2279 "yacc_sql.cpp" break; case 75: /* where: WHERE condition_list */ -#line 590 "yacc_sql.y" +#line 594 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2283 "yacc_sql.cpp" +#line 2287 "yacc_sql.cpp" break; case 76: /* condition_list: %empty */ -#line 596 "yacc_sql.y" +#line 600 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2291 "yacc_sql.cpp" +#line 2295 "yacc_sql.cpp" break; case 77: /* condition_list: condition */ -#line 599 "yacc_sql.y" +#line 603 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2301 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; case 78: /* condition_list: condition AND condition_list */ -#line 604 "yacc_sql.y" +#line 608 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2311 "yacc_sql.cpp" +#line 2315 "yacc_sql.cpp" break; case 79: /* condition: rel_attr comp_op value */ -#line 612 "yacc_sql.y" +#line 616 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2323,11 +2327,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2327 "yacc_sql.cpp" +#line 2331 "yacc_sql.cpp" break; case 80: /* condition: value comp_op value */ -#line 624 "yacc_sql.y" +#line 628 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2339,11 +2343,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2343 "yacc_sql.cpp" +#line 2347 "yacc_sql.cpp" break; case 81: /* condition: rel_attr comp_op rel_attr */ -#line 636 "yacc_sql.y" +#line 640 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2355,11 +2359,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2359 "yacc_sql.cpp" +#line 2363 "yacc_sql.cpp" break; case 82: /* condition: value comp_op rel_attr */ -#line 648 "yacc_sql.y" +#line 652 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2371,55 +2375,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2375 "yacc_sql.cpp" +#line 2379 "yacc_sql.cpp" break; case 83: /* comp_op: EQ */ -#line 662 "yacc_sql.y" +#line 666 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2381 "yacc_sql.cpp" +#line 2385 "yacc_sql.cpp" break; case 84: /* comp_op: LT */ -#line 663 "yacc_sql.y" +#line 667 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2387 "yacc_sql.cpp" +#line 2391 "yacc_sql.cpp" break; case 85: /* comp_op: GT */ -#line 664 "yacc_sql.y" +#line 668 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2393 "yacc_sql.cpp" +#line 2397 "yacc_sql.cpp" break; case 86: /* comp_op: LE */ -#line 665 "yacc_sql.y" +#line 669 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2399 "yacc_sql.cpp" +#line 2403 "yacc_sql.cpp" break; case 87: /* comp_op: GE */ -#line 666 "yacc_sql.y" +#line 670 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2405 "yacc_sql.cpp" +#line 2409 "yacc_sql.cpp" break; case 88: /* comp_op: NE */ -#line 667 "yacc_sql.y" +#line 671 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2411 "yacc_sql.cpp" +#line 2415 "yacc_sql.cpp" break; case 89: /* group_by: %empty */ -#line 673 "yacc_sql.y" +#line 677 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2419 "yacc_sql.cpp" +#line 2423 "yacc_sql.cpp" break; case 90: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 679 "yacc_sql.y" +#line 683 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2429,20 +2433,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2433 "yacc_sql.cpp" +#line 2437 "yacc_sql.cpp" break; case 91: /* explain_stmt: EXPLAIN command_wrapper */ -#line 692 "yacc_sql.y" +#line 696 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2442 "yacc_sql.cpp" +#line 2446 "yacc_sql.cpp" break; case 92: /* set_variable_stmt: SET ID EQ value */ -#line 700 "yacc_sql.y" +#line 704 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2450,11 +2454,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2454 "yacc_sql.cpp" +#line 2458 "yacc_sql.cpp" break; -#line 2458 "yacc_sql.cpp" +#line 2462 "yacc_sql.cpp" default: break; } @@ -2683,7 +2687,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 712 "yacc_sql.y" +#line 716 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index e4728fe0..996c2464 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -539,9 +539,13 @@ expression: // your code here ; aggr_func_expr: - ID LBRACE expression RBRACE + ID LBRACE expression_list RBRACE { - $$ = new UnboundAggregateExpr($1, $3); + if((*$3).size() != 1) { + $$ = new UnboundAggregateExpr("max",new StarExpr() ); + } else { + $$ = new UnboundAggregateExpr($1, std::move((*$3)[0])); + } } ; rel_attr: From 741867a1f6a38e591c2860bf727e18ca5e9c1789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 26 Sep 2024 03:42:45 +0000 Subject: [PATCH 015/308] =?UTF-8?q?agg=E4=B8=AD=E7=89=B9=E6=AE=8A=E6=83=85?= =?UTF-8?q?=E5=86=B5=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + src/observer/sql/parser/yacc_sql.cpp | 442 ++++++++++++++------------- src/observer/sql/parser/yacc_sql.y | 4 + 3 files changed, 231 insertions(+), 216 deletions(-) diff --git a/.gitignore b/.gitignore index 7390ea40..af3871a9 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ GPATH GTAGS docs/book ./test.sql +./CMakeLists.txt #*# diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 48a952a0..3c8e4fbc 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -581,16 +581,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 144 +#define YYLAST 151 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 60 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 42 /* YYNRULES -- Number of rules. */ -#define YYNRULES 94 +#define YYNRULES 95 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 171 +#define YYNSTATES 172 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 310 @@ -651,10 +651,10 @@ static const yytype_int16 yyrline[] = 263, 269, 277, 291, 301, 325, 328, 341, 349, 359, 362, 363, 364, 365, 368, 385, 388, 399, 403, 407, 416, 419, 426, 438, 453, 478, 487, 492, 503, 506, - 509, 512, 515, 519, 522, 527, 533, 536, 542, 552, - 557, 567, 572, 577, 591, 594, 600, 603, 608, 615, - 627, 639, 651, 666, 667, 668, 669, 670, 671, 677, - 682, 695, 703, 713, 714 + 509, 512, 515, 519, 522, 527, 533, 536, 542, 550, + 556, 561, 571, 576, 581, 595, 598, 604, 607, 612, + 619, 631, 643, 655, 670, 671, 672, 673, 674, 675, + 681, 686, 699, 707, 717, 718 }; #endif @@ -697,7 +697,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-101) +#define YYPACT_NINF (-102) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -711,24 +711,24 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 63, 21, 24, -6, -6, -25, 26, -101, 1, 4, - -16, -101, -101, -101, -101, -101, -14, 9, 63, 43, - 49, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, 0, 10, 12, 13, -6, -101, -101, -15, -101, - -6, -101, -101, -101, 33, -101, -101, 37, -101, -101, - 19, 29, 46, 39, 53, -101, -101, -101, -101, 80, - 65, -101, 66, 3, -6, 48, -101, -6, -6, -6, - -6, -6, 54, 73, 74, 55, -37, 56, 58, 59, - 60, -101, 94, -101, -101, -46, -46, -101, -101, -101, - 95, 74, 96, -32, -101, 72, -101, 86, -1, 98, - 101, -101, -101, 54, -101, -37, 90, -40, -40, -101, - 87, -37, 114, -101, -101, -101, -101, 105, 58, 106, - 75, -101, -101, 104, -101, -101, -101, -101, -101, -101, - -32, -32, -32, 74, 76, 79, 98, 84, 111, -37, - 112, -101, -101, -101, -101, -101, -101, -101, -101, 113, - -101, 91, -101, -101, 104, -101, -101, 89, -101, 83, - -101 + 63, 20, 26, 10, 10, -38, 9, -102, 6, 5, + -10, -102, -102, -102, -102, -102, 18, 19, 63, 49, + 69, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, 29, 31, 36, 37, 10, -102, -102, -15, -102, + 10, -102, -102, -102, 39, -102, -102, 57, -102, -102, + 45, 46, 64, 58, 65, -102, -102, -102, -102, 85, + 70, -102, 71, -3, -6, 54, -102, 10, 10, 10, + 10, 10, 59, 77, 76, 60, -19, 61, 67, 68, + 72, -102, -102, 94, -102, -102, -46, -46, -102, -102, + -102, 101, 76, 104, -31, -102, 79, -102, 95, -1, + 105, 109, -102, -102, 59, -102, -19, 98, -40, -40, + -102, 96, -19, 122, -102, -102, -102, -102, 112, 67, + 113, 81, -102, -102, 114, -102, -102, -102, -102, -102, + -102, -31, -31, -31, 76, 83, 86, 105, 97, 118, + -19, 119, -102, -102, -102, -102, -102, -102, -102, -102, + 121, -102, 99, -102, -102, 114, -102, -102, 100, -102, + 89, -102 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -738,41 +738,41 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 93, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 94, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 47, 48, 69, 49, + 20, 0, 0, 0, 0, 0, 47, 48, 70, 49, 0, 66, 64, 55, 56, 67, 65, 0, 31, 30, - 0, 0, 0, 0, 0, 91, 1, 94, 2, 0, + 0, 0, 0, 0, 0, 92, 1, 95, 2, 0, 0, 29, 0, 0, 0, 0, 63, 0, 0, 0, - 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, - 0, 62, 0, 70, 57, 58, 59, 60, 61, 71, - 72, 74, 0, 76, 52, 0, 92, 0, 0, 35, - 0, 33, 68, 0, 89, 0, 69, 0, 0, 75, - 77, 0, 0, 40, 41, 42, 43, 38, 0, 0, - 0, 73, 54, 45, 83, 84, 85, 86, 87, 88, - 0, 0, 76, 74, 0, 0, 35, 50, 0, 0, - 0, 80, 82, 79, 81, 78, 53, 90, 39, 0, - 36, 0, 34, 32, 45, 44, 37, 0, 46, 0, - 51 + 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, + 0, 62, 69, 0, 71, 57, 58, 59, 60, 61, + 72, 73, 75, 0, 77, 52, 0, 93, 0, 0, + 35, 0, 33, 68, 0, 90, 0, 70, 0, 0, + 76, 78, 0, 0, 40, 41, 42, 43, 38, 0, + 0, 0, 74, 54, 45, 84, 85, 86, 87, 88, + 89, 0, 0, 77, 75, 0, 0, 35, 50, 0, + 0, 0, 81, 83, 80, 82, 79, 53, 91, 39, + 0, 36, 0, 34, 32, 45, 44, 37, 0, 46, + 0, 51 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -101, -101, 119, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -8, 11, -101, -101, -101, - -24, -85, -101, -101, -101, -101, -101, -4, 17, -101, - -100, -101, 28, -99, 2, -101, 25, -101, -101, -101, - -101, -101 + -102, -102, 126, -102, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, 0, 17, -102, -102, -102, + -17, -85, -102, -102, -102, -102, -102, -4, 38, -102, + -101, -102, 35, -100, 7, -102, 32, -102, -102, -102, + -102, -102 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 129, 109, 159, 127, 33, - 150, 52, 162, 34, 35, 36, 37, 53, 54, 55, - 56, 100, 101, 104, 119, 120, 140, 132, 38, 39, + 28, 29, 30, 31, 32, 130, 110, 160, 128, 33, + 151, 52, 163, 34, 35, 36, 37, 53, 54, 55, + 56, 101, 102, 105, 120, 121, 141, 133, 38, 39, 40, 68 }; @@ -781,40 +781,42 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 57, 106, 114, 118, 74, 134, 135, 136, 137, 138, - 139, 80, 81, 45, 46, 47, 75, 49, 117, 46, - 47, 116, 49, 91, 123, 124, 125, 126, 58, 41, - 133, 42, 43, 60, 44, 59, 143, 62, 61, 63, - 152, 154, 118, 66, 156, 46, 47, 48, 49, 64, - 50, 51, 67, 69, 77, 151, 153, 117, 78, 79, - 80, 81, 73, 70, 164, 71, 72, 76, 1, 2, - 92, 82, 83, 94, 3, 4, 5, 6, 7, 8, - 9, 10, 84, 85, 86, 11, 12, 13, 78, 79, - 80, 81, 14, 15, 87, 95, 96, 97, 98, 88, - 16, 93, 17, 89, 90, 18, 102, 99, 105, 103, - 107, 108, 110, 111, 112, 115, 113, 121, 122, 128, - 130, 75, 144, 142, 145, 149, 147, 161, 148, 157, - 158, 163, 165, 166, 169, 167, 170, 65, 160, 146, - 168, 131, 0, 141, 155 + 57, 107, 115, 119, 74, 135, 136, 137, 138, 139, + 140, 80, 81, 45, 92, 58, 75, 91, 59, 118, + 46, 47, 117, 49, 124, 125, 126, 127, 41, 45, + 42, 134, 46, 47, 43, 49, 44, 144, 60, 61, + 153, 155, 119, 62, 157, 46, 47, 48, 49, 66, + 50, 51, 78, 79, 80, 81, 152, 154, 118, 64, + 77, 46, 47, 48, 49, 165, 50, 51, 1, 2, + 93, 63, 67, 95, 3, 4, 5, 6, 7, 8, + 9, 10, 69, 73, 70, 11, 12, 13, 76, 71, + 72, 82, 14, 15, 78, 79, 80, 81, 83, 84, + 16, 85, 17, 86, 88, 18, 87, 94, 89, 90, + 103, 104, 100, 106, 113, 108, 96, 97, 98, 99, + 109, 111, 114, 116, 122, 112, 129, 123, 131, 75, + 145, 146, 143, 148, 149, 150, 158, 159, 164, 166, + 162, 167, 171, 168, 65, 170, 147, 161, 169, 132, + 156, 142 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { - 4, 86, 101, 103, 19, 45, 46, 47, 48, 49, - 50, 57, 58, 19, 51, 52, 31, 54, 103, 51, - 52, 53, 54, 20, 25, 26, 27, 28, 53, 8, - 115, 10, 8, 32, 10, 9, 121, 53, 34, 53, - 140, 141, 142, 0, 143, 51, 52, 53, 54, 40, - 56, 57, 3, 53, 21, 140, 141, 142, 55, 56, - 57, 58, 45, 53, 149, 53, 53, 50, 5, 6, - 74, 34, 53, 77, 11, 12, 13, 14, 15, 16, - 17, 18, 53, 37, 45, 22, 23, 24, 55, 56, - 57, 58, 29, 30, 41, 78, 79, 80, 81, 19, - 37, 53, 39, 38, 38, 42, 33, 53, 53, 35, - 54, 53, 53, 53, 20, 19, 21, 45, 32, 21, - 19, 31, 8, 36, 19, 21, 20, 43, 53, 53, - 51, 20, 20, 20, 45, 44, 53, 18, 146, 128, - 164, 113, -1, 118, 142 + 4, 86, 102, 104, 19, 45, 46, 47, 48, 49, + 50, 57, 58, 19, 20, 53, 31, 20, 9, 104, + 51, 52, 53, 54, 25, 26, 27, 28, 8, 19, + 10, 116, 51, 52, 8, 54, 10, 122, 32, 34, + 141, 142, 143, 53, 144, 51, 52, 53, 54, 0, + 56, 57, 55, 56, 57, 58, 141, 142, 143, 40, + 21, 51, 52, 53, 54, 150, 56, 57, 5, 6, + 74, 53, 3, 77, 11, 12, 13, 14, 15, 16, + 17, 18, 53, 45, 53, 22, 23, 24, 50, 53, + 53, 34, 29, 30, 55, 56, 57, 58, 53, 53, + 37, 37, 39, 45, 19, 42, 41, 53, 38, 38, + 33, 35, 53, 53, 20, 54, 78, 79, 80, 81, + 53, 53, 21, 19, 45, 53, 21, 32, 19, 31, + 8, 19, 36, 20, 53, 21, 53, 51, 20, 20, + 43, 20, 53, 44, 18, 45, 129, 147, 165, 114, + 143, 119 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -830,15 +832,15 @@ static const yytype_int8 yystos[] = 32, 34, 53, 53, 40, 62, 0, 3, 101, 53, 53, 53, 53, 88, 19, 31, 88, 21, 55, 56, 57, 58, 34, 53, 53, 37, 45, 41, 19, 38, - 38, 20, 87, 53, 87, 88, 88, 88, 88, 53, - 91, 92, 33, 35, 93, 53, 81, 54, 53, 76, - 53, 53, 20, 21, 93, 19, 53, 81, 90, 94, - 95, 45, 32, 25, 26, 27, 28, 78, 21, 75, - 19, 92, 97, 81, 45, 46, 47, 48, 49, 50, - 96, 96, 36, 81, 8, 19, 76, 20, 53, 21, - 80, 81, 90, 81, 90, 94, 93, 53, 51, 77, - 75, 43, 82, 20, 81, 20, 20, 44, 80, 45, - 53 + 38, 20, 20, 87, 53, 87, 88, 88, 88, 88, + 53, 91, 92, 33, 35, 93, 53, 81, 54, 53, + 76, 53, 53, 20, 21, 93, 19, 53, 81, 90, + 94, 95, 45, 32, 25, 26, 27, 28, 78, 21, + 75, 19, 92, 97, 81, 45, 46, 47, 48, 49, + 50, 96, 96, 36, 81, 8, 19, 76, 20, 53, + 21, 80, 81, 90, 81, 90, 94, 93, 53, 51, + 77, 75, 43, 82, 20, 81, 20, 20, 44, 80, + 45, 53 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -850,10 +852,10 @@ static const yytype_int8 yyr1[] = 70, 71, 72, 73, 74, 75, 75, 76, 76, 77, 78, 78, 78, 78, 79, 80, 80, 81, 81, 81, 82, 82, 83, 84, 85, 86, 87, 87, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 89, 90, - 90, 91, 92, 92, 93, 93, 94, 94, 94, 95, - 95, 95, 95, 96, 96, 96, 96, 96, 96, 97, - 98, 99, 100, 101, 101 + 88, 88, 88, 88, 88, 88, 88, 88, 89, 89, + 90, 90, 91, 92, 92, 93, 93, 94, 94, 94, + 95, 95, 95, 95, 96, 96, 96, 96, 96, 96, + 97, 98, 99, 100, 101, 101 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -865,10 +867,10 @@ static const yytype_int8 yyr2[] = 2, 2, 8, 5, 8, 0, 3, 5, 2, 1, 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, 0, 4, 4, 7, 6, 2, 1, 3, 3, 3, - 3, 3, 3, 2, 1, 1, 1, 1, 4, 1, - 3, 1, 1, 3, 0, 2, 0, 1, 3, 3, - 3, 3, 3, 1, 1, 1, 1, 1, 1, 0, - 7, 2, 4, 0, 1 + 3, 3, 3, 2, 1, 1, 1, 1, 4, 3, + 1, 3, 1, 1, 3, 0, 2, 0, 1, 3, + 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, + 0, 7, 2, 4, 0, 1 }; @@ -1735,7 +1737,7 @@ YYLTYPE yylloc = yyloc_default; std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1739 "yacc_sql.cpp" +#line 1741 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ @@ -1744,7 +1746,7 @@ YYLTYPE yylloc = yyloc_default; (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1748 "yacc_sql.cpp" +#line 1750 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ @@ -1752,7 +1754,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1756 "yacc_sql.cpp" +#line 1758 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ @@ -1760,7 +1762,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1764 "yacc_sql.cpp" +#line 1766 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ @@ -1768,7 +1770,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1772 "yacc_sql.cpp" +#line 1774 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ @@ -1776,7 +1778,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1780 "yacc_sql.cpp" +#line 1782 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ @@ -1784,7 +1786,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1788 "yacc_sql.cpp" +#line 1790 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ @@ -1794,7 +1796,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1798 "yacc_sql.cpp" +#line 1800 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ @@ -1802,7 +1804,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1806 "yacc_sql.cpp" +#line 1808 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ @@ -1812,7 +1814,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1816 "yacc_sql.cpp" +#line 1818 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ @@ -1827,7 +1829,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1831 "yacc_sql.cpp" +#line 1833 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ @@ -1839,7 +1841,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1843 "yacc_sql.cpp" +#line 1845 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ @@ -1864,7 +1866,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1868 "yacc_sql.cpp" +#line 1870 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ @@ -1872,7 +1874,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.attr_infos) = nullptr; } -#line 1876 "yacc_sql.cpp" +#line 1878 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ @@ -1886,7 +1888,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1890 "yacc_sql.cpp" +#line 1892 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE */ @@ -1898,7 +1900,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = (yyvsp[-1].number); free((yyvsp[-4].string)); } -#line 1902 "yacc_sql.cpp" +#line 1904 "yacc_sql.cpp" break; case 38: /* attr_def: ID type */ @@ -1910,37 +1912,37 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; free((yyvsp[-1].string)); } -#line 1914 "yacc_sql.cpp" +#line 1916 "yacc_sql.cpp" break; case 39: /* number: NUMBER */ #line 359 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1920 "yacc_sql.cpp" +#line 1922 "yacc_sql.cpp" break; case 40: /* type: INT_T */ #line 362 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1926 "yacc_sql.cpp" +#line 1928 "yacc_sql.cpp" break; case 41: /* type: STRING_T */ #line 363 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1932 "yacc_sql.cpp" +#line 1934 "yacc_sql.cpp" break; case 42: /* type: FLOAT_T */ #line 364 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1938 "yacc_sql.cpp" +#line 1940 "yacc_sql.cpp" break; case 43: /* type: DATE_T */ #line 365 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1944 "yacc_sql.cpp" +#line 1946 "yacc_sql.cpp" break; case 44: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ @@ -1957,7 +1959,7 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1961 "yacc_sql.cpp" +#line 1963 "yacc_sql.cpp" break; case 45: /* value_list: %empty */ @@ -1965,7 +1967,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.value_list) = nullptr; } -#line 1969 "yacc_sql.cpp" +#line 1971 "yacc_sql.cpp" break; case 46: /* value_list: COMMA value value_list */ @@ -1979,7 +1981,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1983 "yacc_sql.cpp" +#line 1985 "yacc_sql.cpp" break; case 47: /* value: NUMBER */ @@ -1988,7 +1990,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 1992 "yacc_sql.cpp" +#line 1994 "yacc_sql.cpp" break; case 48: /* value: FLOAT */ @@ -1997,7 +1999,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2001 "yacc_sql.cpp" +#line 2003 "yacc_sql.cpp" break; case 49: /* value: SSS */ @@ -2008,7 +2010,7 @@ YYLTYPE yylloc = yyloc_default; free(tmp); free((yyvsp[0].string)); } -#line 2012 "yacc_sql.cpp" +#line 2014 "yacc_sql.cpp" break; case 50: /* storage_format: %empty */ @@ -2016,7 +2018,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = nullptr; } -#line 2020 "yacc_sql.cpp" +#line 2022 "yacc_sql.cpp" break; case 51: /* storage_format: STORAGE FORMAT EQ ID */ @@ -2024,7 +2026,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = (yyvsp[0].string); } -#line 2028 "yacc_sql.cpp" +#line 2030 "yacc_sql.cpp" break; case 52: /* delete_stmt: DELETE FROM ID where */ @@ -2038,7 +2040,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2042 "yacc_sql.cpp" +#line 2044 "yacc_sql.cpp" break; case 53: /* update_stmt: UPDATE ID SET ID EQ value where */ @@ -2055,7 +2057,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2059 "yacc_sql.cpp" +#line 2061 "yacc_sql.cpp" break; case 54: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ @@ -2082,7 +2084,7 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2086 "yacc_sql.cpp" +#line 2088 "yacc_sql.cpp" break; case 55: /* calc_stmt: CALC expression_list */ @@ -2092,7 +2094,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2096 "yacc_sql.cpp" +#line 2098 "yacc_sql.cpp" break; case 56: /* expression_list: expression */ @@ -2101,7 +2103,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2105 "yacc_sql.cpp" +#line 2107 "yacc_sql.cpp" break; case 57: /* expression_list: expression COMMA expression_list */ @@ -2114,7 +2116,7 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2118 "yacc_sql.cpp" +#line 2120 "yacc_sql.cpp" break; case 58: /* expression: expression '+' expression */ @@ -2122,7 +2124,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2126 "yacc_sql.cpp" +#line 2128 "yacc_sql.cpp" break; case 59: /* expression: expression '-' expression */ @@ -2130,7 +2132,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2134 "yacc_sql.cpp" +#line 2136 "yacc_sql.cpp" break; case 60: /* expression: expression '*' expression */ @@ -2138,7 +2140,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2142 "yacc_sql.cpp" +#line 2144 "yacc_sql.cpp" break; case 61: /* expression: expression '/' expression */ @@ -2146,7 +2148,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2150 "yacc_sql.cpp" +#line 2152 "yacc_sql.cpp" break; case 62: /* expression: LBRACE expression RBRACE */ @@ -2155,7 +2157,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2159 "yacc_sql.cpp" +#line 2161 "yacc_sql.cpp" break; case 63: /* expression: '-' expression */ @@ -2163,7 +2165,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2167 "yacc_sql.cpp" +#line 2169 "yacc_sql.cpp" break; case 64: /* expression: value */ @@ -2173,7 +2175,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2177 "yacc_sql.cpp" +#line 2179 "yacc_sql.cpp" break; case 65: /* expression: rel_attr */ @@ -2184,7 +2186,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2188 "yacc_sql.cpp" +#line 2190 "yacc_sql.cpp" break; case 66: /* expression: '*' */ @@ -2192,7 +2194,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = new StarExpr(); } -#line 2196 "yacc_sql.cpp" +#line 2198 "yacc_sql.cpp" break; case 67: /* expression: aggr_func_expr */ @@ -2200,7 +2202,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2204 "yacc_sql.cpp" +#line 2206 "yacc_sql.cpp" break; case 68: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ @@ -2212,21 +2214,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2216 "yacc_sql.cpp" +#line 2218 "yacc_sql.cpp" break; - case 69: /* rel_attr: ID */ -#line 552 "yacc_sql.y" + case 69: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 551 "yacc_sql.y" + { + (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); + } +#line 2226 "yacc_sql.cpp" + break; + + case 70: /* rel_attr: ID */ +#line 556 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2226 "yacc_sql.cpp" +#line 2236 "yacc_sql.cpp" break; - case 70: /* rel_attr: ID DOT ID */ -#line 557 "yacc_sql.y" + case 71: /* rel_attr: ID DOT ID */ +#line 561 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2234,29 +2244,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2238 "yacc_sql.cpp" +#line 2248 "yacc_sql.cpp" break; - case 71: /* relation: ID */ -#line 567 "yacc_sql.y" + case 72: /* relation: ID */ +#line 571 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2246 "yacc_sql.cpp" +#line 2256 "yacc_sql.cpp" break; - case 72: /* rel_list: relation */ -#line 572 "yacc_sql.y" + case 73: /* rel_list: relation */ +#line 576 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2256 "yacc_sql.cpp" +#line 2266 "yacc_sql.cpp" break; - case 73: /* rel_list: relation COMMA rel_list */ -#line 577 "yacc_sql.y" + case 74: /* rel_list: relation COMMA rel_list */ +#line 581 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2267,55 +2277,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2271 "yacc_sql.cpp" +#line 2281 "yacc_sql.cpp" break; - case 74: /* where: %empty */ -#line 591 "yacc_sql.y" + case 75: /* where: %empty */ +#line 595 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2279 "yacc_sql.cpp" +#line 2289 "yacc_sql.cpp" break; - case 75: /* where: WHERE condition_list */ -#line 594 "yacc_sql.y" + case 76: /* where: WHERE condition_list */ +#line 598 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2287 "yacc_sql.cpp" +#line 2297 "yacc_sql.cpp" break; - case 76: /* condition_list: %empty */ -#line 600 "yacc_sql.y" + case 77: /* condition_list: %empty */ +#line 604 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2295 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; - case 77: /* condition_list: condition */ -#line 603 "yacc_sql.y" + case 78: /* condition_list: condition */ +#line 607 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2305 "yacc_sql.cpp" +#line 2315 "yacc_sql.cpp" break; - case 78: /* condition_list: condition AND condition_list */ -#line 608 "yacc_sql.y" + case 79: /* condition_list: condition AND condition_list */ +#line 612 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2315 "yacc_sql.cpp" +#line 2325 "yacc_sql.cpp" break; - case 79: /* condition: rel_attr comp_op value */ -#line 616 "yacc_sql.y" + case 80: /* condition: rel_attr comp_op value */ +#line 620 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2327,11 +2337,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2331 "yacc_sql.cpp" +#line 2341 "yacc_sql.cpp" break; - case 80: /* condition: value comp_op value */ -#line 628 "yacc_sql.y" + case 81: /* condition: value comp_op value */ +#line 632 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2343,11 +2353,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2347 "yacc_sql.cpp" +#line 2357 "yacc_sql.cpp" break; - case 81: /* condition: rel_attr comp_op rel_attr */ -#line 640 "yacc_sql.y" + case 82: /* condition: rel_attr comp_op rel_attr */ +#line 644 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2359,11 +2369,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2363 "yacc_sql.cpp" +#line 2373 "yacc_sql.cpp" break; - case 82: /* condition: value comp_op rel_attr */ -#line 652 "yacc_sql.y" + case 83: /* condition: value comp_op rel_attr */ +#line 656 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2375,55 +2385,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2379 "yacc_sql.cpp" +#line 2389 "yacc_sql.cpp" break; - case 83: /* comp_op: EQ */ -#line 666 "yacc_sql.y" + case 84: /* comp_op: EQ */ +#line 670 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2385 "yacc_sql.cpp" +#line 2395 "yacc_sql.cpp" break; - case 84: /* comp_op: LT */ -#line 667 "yacc_sql.y" + case 85: /* comp_op: LT */ +#line 671 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2391 "yacc_sql.cpp" +#line 2401 "yacc_sql.cpp" break; - case 85: /* comp_op: GT */ -#line 668 "yacc_sql.y" + case 86: /* comp_op: GT */ +#line 672 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2397 "yacc_sql.cpp" +#line 2407 "yacc_sql.cpp" break; - case 86: /* comp_op: LE */ -#line 669 "yacc_sql.y" + case 87: /* comp_op: LE */ +#line 673 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2403 "yacc_sql.cpp" +#line 2413 "yacc_sql.cpp" break; - case 87: /* comp_op: GE */ -#line 670 "yacc_sql.y" + case 88: /* comp_op: GE */ +#line 674 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2409 "yacc_sql.cpp" +#line 2419 "yacc_sql.cpp" break; - case 88: /* comp_op: NE */ -#line 671 "yacc_sql.y" + case 89: /* comp_op: NE */ +#line 675 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2415 "yacc_sql.cpp" +#line 2425 "yacc_sql.cpp" break; - case 89: /* group_by: %empty */ -#line 677 "yacc_sql.y" + case 90: /* group_by: %empty */ +#line 681 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2423 "yacc_sql.cpp" +#line 2433 "yacc_sql.cpp" break; - case 90: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 683 "yacc_sql.y" + case 91: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 687 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2433,20 +2443,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2437 "yacc_sql.cpp" +#line 2447 "yacc_sql.cpp" break; - case 91: /* explain_stmt: EXPLAIN command_wrapper */ -#line 696 "yacc_sql.y" + case 92: /* explain_stmt: EXPLAIN command_wrapper */ +#line 700 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2446 "yacc_sql.cpp" +#line 2456 "yacc_sql.cpp" break; - case 92: /* set_variable_stmt: SET ID EQ value */ -#line 704 "yacc_sql.y" + case 93: /* set_variable_stmt: SET ID EQ value */ +#line 708 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2454,11 +2464,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2458 "yacc_sql.cpp" +#line 2468 "yacc_sql.cpp" break; -#line 2462 "yacc_sql.cpp" +#line 2472 "yacc_sql.cpp" default: break; } @@ -2687,7 +2697,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 716 "yacc_sql.y" +#line 720 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 996c2464..9ac1148e 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -547,6 +547,10 @@ aggr_func_expr: $$ = new UnboundAggregateExpr($1, std::move((*$3)[0])); } } + |ID LBRACE RBRACE + { + $$ = new UnboundAggregateExpr("max",new StarExpr() ); + } ; rel_attr: ID { From e036c8ce2e6eeb4e17818e987777484b6deb9c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 26 Sep 2024 04:17:46 +0000 Subject: [PATCH 016/308] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=9A=90=E5=BC=8F?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- src/observer/common/type/date_type.h | 11 ++++++++-- src/observer/common/type/float_type.h | 22 ++++++++++++++++++- src/observer/common/type/integer_type.h | 29 ++++++++++++++++++++++++- 4 files changed, 59 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f562437f..14824575 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -#SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) +SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) diff --git a/src/observer/common/type/date_type.h b/src/observer/common/type/date_type.h index cf90f084..579f0a63 100644 --- a/src/observer/common/type/date_type.h +++ b/src/observer/common/type/date_type.h @@ -21,10 +21,17 @@ class DateType : public DataType { public: - DateType() : DataType(AttrType::DATES) {} + DateType() : DataType(AttrType::DATES) {} ~DateType() override = default; int compare(const Value &left, const Value &right) const override; - + int cast_cost(AttrType type) override + { + if (type == AttrType::DATES) + return 0; // DATE -> DATE + if (type == AttrType::INTS) + return 2; // DATE -> INT (需转换) + return INT32_MAX; // 不支持转换 + } RC to_string(const Value &val, string &result) const override; }; diff --git a/src/observer/common/type/float_type.h b/src/observer/common/type/float_type.h index fd4a7fcb..513580ba 100644 --- a/src/observer/common/type/float_type.h +++ b/src/observer/common/type/float_type.h @@ -11,7 +11,7 @@ See the Mulan PSL v2 for more details. */ #pragma once #include "common/type/data_type.h" - +#include /** * @brief 浮点型数据类型 * @ingroup DataType @@ -30,6 +30,26 @@ class FloatType : public DataType RC divide(const Value &left, const Value &right, Value &result) const override; RC negative(const Value &val, Value &result) const override; + int cast_cost(AttrType type) override { + if (type == AttrType::FLOATS) return 0; // FLOAT -> FLOAT + if (type == AttrType::INTS) return 1; // FLOAT -> INT (可能丢失精度) + if (type == AttrType::BOOLEANS) return 1; // FLOAT -> BOOL (非严格转换) + return INT32_MAX; // 不支持转换 + } + RC cast_to(const Value &val, AttrType type, Value &result) const override { + if (type == AttrType::FLOATS) { + result.set_float(val.get_float()); + return RC::SUCCESS; + } else if (type == AttrType::INTS) { + result.set_int(static_cast(val.get_float())); // 转换为整数(可能丢失精度) + return RC::SUCCESS; + } else if (type == AttrType::BOOLEANS) { + result.set_boolean(val.get_float() != 0.0f); // 非零为 true,零为 false + return RC::SUCCESS; + } + return RC::UNSUPPORTED; // 不支持的转换 + } + RC set_value_from_str(Value &val, const string &data) const override; RC to_string(const Value &val, string &result) const override; diff --git a/src/observer/common/type/integer_type.h b/src/observer/common/type/integer_type.h index dd8c48e5..1c82cd9a 100644 --- a/src/observer/common/type/integer_type.h +++ b/src/observer/common/type/integer_type.h @@ -12,6 +12,8 @@ See the Mulan PSL v2 for more details. */ #include "common/type/data_type.h" +#include + /** * @brief 整型类型 * @ingroup DataType @@ -19,7 +21,7 @@ See the Mulan PSL v2 for more details. */ class IntegerType : public DataType { public: - IntegerType() : DataType(AttrType::INTS) {} + IntegerType() : DataType(AttrType::INTS) {} virtual ~IntegerType() {} int compare(const Value &left, const Value &right) const override; @@ -32,4 +34,29 @@ class IntegerType : public DataType RC set_value_from_str(Value &val, const string &data) const override; RC to_string(const Value &val, string &result) const override; + + int cast_cost(AttrType type) override + { + if (type == AttrType::INTS) + return 0; // INT -> INT + if (type == AttrType::FLOATS) + return 1; // INT -> FLOAT + if (type == AttrType::BOOLEANS) + return 1; // INT -> BOOL (非严格转换) + return INT32_MAX; // 不支持转换 + } + RC cast_to(const Value &val, AttrType type, Value &result) const override + { + if (type == AttrType::INTS) { + result.set_int(val.get_int()); + return RC::SUCCESS; + } else if (type == AttrType::FLOATS) { + result.set_float(static_cast(val.get_int())); // 转换为浮点数 + return RC::SUCCESS; + } else if (type == AttrType::BOOLEANS) { + result.set_boolean(val.get_int() != 0); // 0 为 false,其他为 true + return RC::SUCCESS; + } + return RC::UNSUPPORTED; // 不支持的转换 + } }; \ No newline at end of file From 2ff0d93c343ec521a32ea0064646ac82e4558082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 26 Sep 2024 04:18:49 +0000 Subject: [PATCH 017/308] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=9A=90=E5=BC=8F?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 14824575..f562437f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) +#SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) From 933c2b928bf0c92daba1464a5aabb6ce053cb24e Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 12:38:20 +0800 Subject: [PATCH 018/308] =?UTF-8?q?=E4=BF=AE=E6=94=B9NullType=E7=9A=84?= =?UTF-8?q?=E4=B8=A4=E4=B8=AABUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/data_type.cpp | 3 ++- src/observer/common/type/null_type.h | 1 + src/observer/common/value.cpp | 5 +---- src/observer/common/value.h | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/observer/common/type/data_type.cpp b/src/observer/common/type/data_type.cpp index 4020524b..d169a0c0 100644 --- a/src/observer/common/type/data_type.cpp +++ b/src/observer/common/type/data_type.cpp @@ -13,6 +13,7 @@ See the Mulan PSL v2 for more details. */ #include "common/type/integer_type.h" #include "common/type/data_type.h" #include "common/type/date_type.h" +#include "common/type/null_type.h" array, static_cast(AttrType::MAXTYPE)> DataType::type_instances_ = { make_unique(AttrType::UNDEFINED), @@ -20,6 +21,6 @@ array, static_cast(AttrType::MAXTYPE)> DataType::type_ make_unique(), make_unique(), make_unique(AttrType::BOOLEANS), - make_unique(AttrType::NULLS), + make_unique(), make_unique(), }; diff --git a/src/observer/common/type/null_type.h b/src/observer/common/type/null_type.h index 7b959184..f2c7901c 100644 --- a/src/observer/common/type/null_type.h +++ b/src/observer/common/type/null_type.h @@ -14,6 +14,7 @@ See the Mulan PSL v2 for more details. */ class NullType : public DataType { +public: NullType() : DataType(AttrType::NULLS) {} ~NullType() override {} diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 581d54c9..aee385ce 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -139,10 +139,7 @@ void Value::set_data(char *data, int length) void Value::set_null() { - reset(); - attr_type_ = AttrType::INTS; - length_ = 0; - value_.is_null_ = true; + is_null_ = true; } void Value::set_int(int val) diff --git a/src/observer/common/value.h b/src/observer/common/value.h index b5bbbc36..52ecec87 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -130,7 +130,6 @@ class Value final union Val { - bool is_null_ = false; int32_t int_value_; float float_value_; bool bool_value_; @@ -139,4 +138,5 @@ class Value final /// 是否申请并占有内存, 目前对于 CHARS 类型 own_data_ 为true, 其余类型 own_data_ 为false bool own_data_ = false; + bool is_null_ = false; }; From 41325321b5a460544d38454bedf8518167dc0d51 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 12:42:11 +0800 Subject: [PATCH 019/308] # SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 023a2be1..f9f463f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ project(minidb) MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) -SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) +# SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) From fb1964dfcd2ee9035cc4c35c20af9a8bba083901 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 12:47:06 +0800 Subject: [PATCH 020/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8DDataType::type=5Finst?= =?UTF-8?q?ances=5F=E9=A1=BA=E5=BA=8F=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- src/observer/common/type/data_type.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f9f463f3..023a2be1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ project(minidb) MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) -# SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) +SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) diff --git a/src/observer/common/type/data_type.cpp b/src/observer/common/type/data_type.cpp index d169a0c0..3955a77c 100644 --- a/src/observer/common/type/data_type.cpp +++ b/src/observer/common/type/data_type.cpp @@ -21,6 +21,6 @@ array, static_cast(AttrType::MAXTYPE)> DataType::type_ make_unique(), make_unique(), make_unique(AttrType::BOOLEANS), - make_unique(), make_unique(), + make_unique(), }; From 2104f13971e8db091d6779793def79bb63735350 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 16:02:29 +0800 Subject: [PATCH 021/308] =?UTF-8?q?=E5=AE=8C=E6=88=90bitmap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/3rd/benchmark | 2 +- src/observer/common/value.h | 1 + src/observer/sql/parser/yacc_sql.cpp | 254 ++++++++++++++------------- src/observer/sql/parser/yacc_sql.y | 6 + src/observer/storage/table/table.cpp | 3 + 5 files changed, 141 insertions(+), 125 deletions(-) diff --git a/deps/3rd/benchmark b/deps/3rd/benchmark index f7547e29..3fd1e6a7 160000 --- a/deps/3rd/benchmark +++ b/deps/3rd/benchmark @@ -1 +1 @@ -Subproject commit f7547e29ccaed7b64ef4f7495ecfff1c9f6f3d03 +Subproject commit 3fd1e6a7aee12e6878d7e039f947ea81140b4f5a diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 52ecec87..89ae0b21 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -115,6 +115,7 @@ class Value final float get_float() const; string get_string() const; bool get_boolean() const; + bool is_null() const { return is_null_; } private: void set_null(); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index ff9738df..1ff08445 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -651,13 +651,13 @@ static const yytype_int16 yyrline[] = 0, 194, 194, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 225, 231, 236, 242, 248, 254, 260, - 267, 273, 281, 295, 305, 329, 332, 345, 354, 366, - 370, 375, 381, 384, 385, 386, 387, 390, 407, 410, - 421, 425, 429, 435, 441, 444, 451, 463, 478, 503, - 512, 517, 528, 531, 534, 537, 540, 544, 547, 552, - 558, 565, 570, 580, 585, 590, 604, 607, 613, 616, - 621, 628, 640, 652, 664, 679, 680, 681, 682, 683, - 684, 690, 695, 708, 716, 726, 727 + 267, 273, 281, 295, 305, 329, 332, 345, 357, 372, + 376, 381, 387, 390, 391, 392, 393, 396, 413, 416, + 427, 431, 435, 441, 447, 450, 457, 469, 484, 509, + 518, 523, 534, 537, 540, 543, 546, 550, 553, 558, + 564, 571, 576, 586, 591, 596, 610, 613, 619, 622, + 627, 634, 646, 658, 670, 685, 686, 687, 688, 689, + 690, 696, 701, 714, 722, 732, 733 }; #endif @@ -1902,80 +1902,86 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->name = (yyvsp[-5].string); (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); + if ((yyval.attr_info)->nullable) { + (yyval.attr_info)->length++; + } free((yyvsp[-5].string)); } -#line 1908 "yacc_sql.cpp" +#line 1911 "yacc_sql.cpp" break; case 38: /* attr_def: ID type nullable_constraint */ -#line 355 "yacc_sql.y" +#line 358 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); (yyval.attr_info)->length = 4; (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); // 处理NULL/NOT NULL标记 + if ((yyval.attr_info)->nullable) { + (yyval.attr_info)->length++; + } free((yyvsp[-2].string)); } -#line 1921 "yacc_sql.cpp" +#line 1927 "yacc_sql.cpp" break; case 39: /* nullable_constraint: NOT NULL_T */ -#line 367 "yacc_sql.y" +#line 373 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1929 "yacc_sql.cpp" +#line 1935 "yacc_sql.cpp" break; case 40: /* nullable_constraint: NULLABLE */ -#line 371 "yacc_sql.y" +#line 377 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1937 "yacc_sql.cpp" +#line 1943 "yacc_sql.cpp" break; case 41: /* nullable_constraint: %empty */ -#line 375 "yacc_sql.y" +#line 381 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NOT NULL } -#line 1945 "yacc_sql.cpp" +#line 1951 "yacc_sql.cpp" break; case 42: /* number: NUMBER */ -#line 381 "yacc_sql.y" +#line 387 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1951 "yacc_sql.cpp" +#line 1957 "yacc_sql.cpp" break; case 43: /* type: INT_T */ -#line 384 "yacc_sql.y" +#line 390 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1957 "yacc_sql.cpp" +#line 1963 "yacc_sql.cpp" break; case 44: /* type: STRING_T */ -#line 385 "yacc_sql.y" +#line 391 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1963 "yacc_sql.cpp" +#line 1969 "yacc_sql.cpp" break; case 45: /* type: FLOAT_T */ -#line 386 "yacc_sql.y" +#line 392 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1969 "yacc_sql.cpp" +#line 1975 "yacc_sql.cpp" break; case 46: /* type: DATE_T */ -#line 387 "yacc_sql.y" +#line 393 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1975 "yacc_sql.cpp" +#line 1981 "yacc_sql.cpp" break; case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 391 "yacc_sql.y" +#line 397 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1988,19 +1994,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1992 "yacc_sql.cpp" +#line 1998 "yacc_sql.cpp" break; case 48: /* value_list: %empty */ -#line 407 "yacc_sql.y" +#line 413 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 2000 "yacc_sql.cpp" +#line 2006 "yacc_sql.cpp" break; case 49: /* value_list: COMMA value value_list */ -#line 410 "yacc_sql.y" +#line 416 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -2010,64 +2016,64 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 2014 "yacc_sql.cpp" +#line 2020 "yacc_sql.cpp" break; case 50: /* value: NUMBER */ -#line 421 "yacc_sql.y" +#line 427 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2023 "yacc_sql.cpp" +#line 2029 "yacc_sql.cpp" break; case 51: /* value: FLOAT */ -#line 425 "yacc_sql.y" +#line 431 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2032 "yacc_sql.cpp" +#line 2038 "yacc_sql.cpp" break; case 52: /* value: SSS */ -#line 429 "yacc_sql.y" +#line 435 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2043 "yacc_sql.cpp" +#line 2049 "yacc_sql.cpp" break; case 53: /* value: NULL_T */ -#line 435 "yacc_sql.y" +#line 441 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2051 "yacc_sql.cpp" +#line 2057 "yacc_sql.cpp" break; case 54: /* storage_format: %empty */ -#line 441 "yacc_sql.y" +#line 447 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2059 "yacc_sql.cpp" +#line 2065 "yacc_sql.cpp" break; case 55: /* storage_format: STORAGE FORMAT EQ ID */ -#line 445 "yacc_sql.y" +#line 451 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2067 "yacc_sql.cpp" +#line 2073 "yacc_sql.cpp" break; case 56: /* delete_stmt: DELETE FROM ID where */ -#line 452 "yacc_sql.y" +#line 458 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2077,11 +2083,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2081 "yacc_sql.cpp" +#line 2087 "yacc_sql.cpp" break; case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 464 "yacc_sql.y" +#line 470 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2094,11 +2100,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2098 "yacc_sql.cpp" +#line 2104 "yacc_sql.cpp" break; case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 479 "yacc_sql.y" +#line 485 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2121,30 +2127,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2125 "yacc_sql.cpp" +#line 2131 "yacc_sql.cpp" break; case 59: /* calc_stmt: CALC expression_list */ -#line 504 "yacc_sql.y" +#line 510 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2135 "yacc_sql.cpp" +#line 2141 "yacc_sql.cpp" break; case 60: /* expression_list: expression */ -#line 513 "yacc_sql.y" +#line 519 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2144 "yacc_sql.cpp" +#line 2150 "yacc_sql.cpp" break; case 61: /* expression_list: expression COMMA expression_list */ -#line 518 "yacc_sql.y" +#line 524 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2153,99 +2159,99 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2157 "yacc_sql.cpp" +#line 2163 "yacc_sql.cpp" break; case 62: /* expression: expression '+' expression */ -#line 528 "yacc_sql.y" +#line 534 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2165 "yacc_sql.cpp" +#line 2171 "yacc_sql.cpp" break; case 63: /* expression: expression '-' expression */ -#line 531 "yacc_sql.y" +#line 537 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2173 "yacc_sql.cpp" +#line 2179 "yacc_sql.cpp" break; case 64: /* expression: expression '*' expression */ -#line 534 "yacc_sql.y" +#line 540 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2181 "yacc_sql.cpp" +#line 2187 "yacc_sql.cpp" break; case 65: /* expression: expression '/' expression */ -#line 537 "yacc_sql.y" +#line 543 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2189 "yacc_sql.cpp" +#line 2195 "yacc_sql.cpp" break; case 66: /* expression: LBRACE expression RBRACE */ -#line 540 "yacc_sql.y" +#line 546 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2198 "yacc_sql.cpp" +#line 2204 "yacc_sql.cpp" break; case 67: /* expression: '-' expression */ -#line 544 "yacc_sql.y" +#line 550 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2206 "yacc_sql.cpp" +#line 2212 "yacc_sql.cpp" break; case 68: /* expression: value */ -#line 547 "yacc_sql.y" +#line 553 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2216 "yacc_sql.cpp" +#line 2222 "yacc_sql.cpp" break; case 69: /* expression: rel_attr */ -#line 552 "yacc_sql.y" +#line 558 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2227 "yacc_sql.cpp" +#line 2233 "yacc_sql.cpp" break; case 70: /* expression: '*' */ -#line 558 "yacc_sql.y" +#line 564 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2235 "yacc_sql.cpp" +#line 2241 "yacc_sql.cpp" break; case 71: /* rel_attr: ID */ -#line 565 "yacc_sql.y" +#line 571 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2245 "yacc_sql.cpp" +#line 2251 "yacc_sql.cpp" break; case 72: /* rel_attr: ID DOT ID */ -#line 570 "yacc_sql.y" +#line 576 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2253,29 +2259,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2257 "yacc_sql.cpp" +#line 2263 "yacc_sql.cpp" break; case 73: /* relation: ID */ -#line 580 "yacc_sql.y" +#line 586 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2265 "yacc_sql.cpp" +#line 2271 "yacc_sql.cpp" break; case 74: /* rel_list: relation */ -#line 585 "yacc_sql.y" +#line 591 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2275 "yacc_sql.cpp" +#line 2281 "yacc_sql.cpp" break; case 75: /* rel_list: relation COMMA rel_list */ -#line 590 "yacc_sql.y" +#line 596 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2286,55 +2292,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2290 "yacc_sql.cpp" +#line 2296 "yacc_sql.cpp" break; case 76: /* where: %empty */ -#line 604 "yacc_sql.y" +#line 610 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2298 "yacc_sql.cpp" +#line 2304 "yacc_sql.cpp" break; case 77: /* where: WHERE condition_list */ -#line 607 "yacc_sql.y" +#line 613 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2306 "yacc_sql.cpp" +#line 2312 "yacc_sql.cpp" break; case 78: /* condition_list: %empty */ -#line 613 "yacc_sql.y" +#line 619 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2314 "yacc_sql.cpp" +#line 2320 "yacc_sql.cpp" break; case 79: /* condition_list: condition */ -#line 616 "yacc_sql.y" +#line 622 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2324 "yacc_sql.cpp" +#line 2330 "yacc_sql.cpp" break; case 80: /* condition_list: condition AND condition_list */ -#line 621 "yacc_sql.y" +#line 627 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2334 "yacc_sql.cpp" +#line 2340 "yacc_sql.cpp" break; case 81: /* condition: rel_attr comp_op value */ -#line 629 "yacc_sql.y" +#line 635 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2346,11 +2352,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2350 "yacc_sql.cpp" +#line 2356 "yacc_sql.cpp" break; case 82: /* condition: value comp_op value */ -#line 641 "yacc_sql.y" +#line 647 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2362,11 +2368,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2366 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; case 83: /* condition: rel_attr comp_op rel_attr */ -#line 653 "yacc_sql.y" +#line 659 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2378,11 +2384,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2382 "yacc_sql.cpp" +#line 2388 "yacc_sql.cpp" break; case 84: /* condition: value comp_op rel_attr */ -#line 665 "yacc_sql.y" +#line 671 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2394,55 +2400,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2398 "yacc_sql.cpp" +#line 2404 "yacc_sql.cpp" break; case 85: /* comp_op: EQ */ -#line 679 "yacc_sql.y" +#line 685 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2404 "yacc_sql.cpp" +#line 2410 "yacc_sql.cpp" break; case 86: /* comp_op: LT */ -#line 680 "yacc_sql.y" +#line 686 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2410 "yacc_sql.cpp" +#line 2416 "yacc_sql.cpp" break; case 87: /* comp_op: GT */ -#line 681 "yacc_sql.y" +#line 687 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2416 "yacc_sql.cpp" +#line 2422 "yacc_sql.cpp" break; case 88: /* comp_op: LE */ -#line 682 "yacc_sql.y" +#line 688 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2422 "yacc_sql.cpp" +#line 2428 "yacc_sql.cpp" break; case 89: /* comp_op: GE */ -#line 683 "yacc_sql.y" +#line 689 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2428 "yacc_sql.cpp" +#line 2434 "yacc_sql.cpp" break; case 90: /* comp_op: NE */ -#line 684 "yacc_sql.y" +#line 690 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2434 "yacc_sql.cpp" +#line 2440 "yacc_sql.cpp" break; case 91: /* group_by: %empty */ -#line 690 "yacc_sql.y" +#line 696 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2442 "yacc_sql.cpp" +#line 2448 "yacc_sql.cpp" break; case 92: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 696 "yacc_sql.y" +#line 702 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2452,20 +2458,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2456 "yacc_sql.cpp" +#line 2462 "yacc_sql.cpp" break; case 93: /* explain_stmt: EXPLAIN command_wrapper */ -#line 709 "yacc_sql.y" +#line 715 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2465 "yacc_sql.cpp" +#line 2471 "yacc_sql.cpp" break; case 94: /* set_variable_stmt: SET ID EQ value */ -#line 717 "yacc_sql.y" +#line 723 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2473,11 +2479,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2477 "yacc_sql.cpp" +#line 2483 "yacc_sql.cpp" break; -#line 2481 "yacc_sql.cpp" +#line 2487 "yacc_sql.cpp" default: break; } @@ -2706,7 +2712,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 729 "yacc_sql.y" +#line 735 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index e2a08b5c..ed23d354 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -349,6 +349,9 @@ attr_def: $$->name = $1; $$->length = $4; $$->nullable = $6; + if ($$->nullable) { + $$->length++; + } free($1); } | ID type nullable_constraint @@ -358,6 +361,9 @@ attr_def: $$->name = $1; $$->length = 4; $$->nullable = $3; // 处理NULL/NOT NULL标记 + if ($$->nullable) { + $$->length++; + } free($1); } ; diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index c05d281d..5e725e52 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -308,6 +308,9 @@ RC Table::make_record(int value_num, const Value *values, Record &record) for (int i = 0; i < value_num && OB_SUCC(rc); i++) { const FieldMeta *field = table_meta_.field(i + normal_field_start_index); const Value &value = values[i]; + if (value.is_null()) { + record_data[field->offset() + field->len() - 1] = 1; + } if (field->type() != value.attr_type()) { Value real_value; rc = Value::cast_to(value, field->type(), real_value); From b60704871bb801533ee23f6d252ebb16a0a3e35e Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 16:03:48 +0800 Subject: [PATCH 022/308] =?UTF-8?q?=E6=96=B0=E5=A2=9Enullable=E6=A3=80?= =?UTF-8?q?=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 3 ++- src/observer/storage/table/table.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index c606c5cd..b8835945 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -77,7 +77,8 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(LOG_FILE_FULL) \ DEFINE_RC(LOG_ENTRY_INVALID) \ DEFINE_RC(UNSUPPORTED) \ - DEFINE_RC(VALUE_TOO_LONG) + DEFINE_RC(VALUE_TOO_LONG) \ + DEFINE_RC(NOT_NULLABLE_VALUE) enum class RC { diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 5e725e52..9af4bd94 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -309,6 +309,9 @@ RC Table::make_record(int value_num, const Value *values, Record &record) const FieldMeta *field = table_meta_.field(i + normal_field_start_index); const Value &value = values[i]; if (value.is_null()) { + if (!field->nullable()) { + return RC::NOT_NULLABLE_VALUE; + } record_data[field->offset() + field->len() - 1] = 1; } if (field->type() != value.attr_type()) { From ae442364ba5affd15b66976881aa13834cc2c129 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 16:52:39 +0800 Subject: [PATCH 023/308] =?UTF-8?q?=E5=AE=8C=E6=88=90NULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.h | 14 +- src/observer/common/type/null_type.cpp | 45 +---- src/observer/common/type/null_type.h | 2 +- src/observer/common/value.cpp | 15 +- src/observer/common/value.h | 1 + src/observer/sql/expr/tuple.h | 9 +- src/observer/sql/parser/yacc_sql.cpp | 254 +++++++++++++------------ src/observer/sql/parser/yacc_sql.y | 10 +- 8 files changed, 175 insertions(+), 175 deletions(-) diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index 5549a7dd..79a52edf 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -17,13 +17,13 @@ See the Mulan PSL v2 for more details. */ enum class AttrType { UNDEFINED, - CHARS, ///< 字符串类型 - INTS, ///< 整数类型(4字节) - FLOATS, ///< 浮点数类型(4字节) - BOOLEANS, ///< boolean类型,当前不是由parser解析出来的,是程序内部使用的 - DATES, ///< 日期类型(4字节) - NULLS, ///< 空字段(1字节) - MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 + CHARS, ///< 字符串类型 + INTS, ///< 整数类型(4字节) + FLOATS, ///< 浮点数类型(4字节) + BOOLEANS, ///< boolean类型,当前不是由parser解析出来的,是程序内部使用的 + DATES, ///< 日期类型(4字节) + NO_TYPE_NULLS, ///< 空字段(1字节) + MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; const char *attr_type_to_string(AttrType type); diff --git a/src/observer/common/type/null_type.cpp b/src/observer/common/type/null_type.cpp index 87fbedb6..745b4881 100644 --- a/src/observer/common/type/null_type.cpp +++ b/src/observer/common/type/null_type.cpp @@ -16,9 +16,9 @@ See the Mulan PSL v2 for more details. */ int NullType::compare(const Value &left, const Value &right) const { - ASSERT(left.attr_type() == AttrType::NULLS, "left type is not a null"); - ASSERT(right.attr_type() == AttrType::NULLS, "right type is not a null"); - if (right.attr_type() == AttrType::NULLS) { + ASSERT(left.attr_type() == AttrType::NO_TYPE_NULLS, "left type is not a null"); + ASSERT(right.attr_type() == AttrType::NO_TYPE_NULLS, "right type is not a null"); + if (right.attr_type() == AttrType::NO_TYPE_NULLS) { return 0; } return INT32_MAX; @@ -32,41 +32,8 @@ RC NullType::to_string(const Value &val, string &result) const RC NullType::cast_to(const Value &val, AttrType type, Value &result) const { - ASSERT(val.attr_type() == AttrType::NULLS, "val type is not a null"); - switch (type) { - case AttrType::UNDEFINED: { - return RC::UNIMPLEMENTED; - } - case AttrType::CHARS: { - result.set_string(""); - break; - } - case AttrType::INTS: { - result.set_int(0); - break; - } - case AttrType::FLOATS: { - result.set_float(0.f); - break; - } - case AttrType::BOOLEANS: { - result.set_boolean(false); - break; - } - case AttrType::DATES: { - result.set_date(0); - break; - } - case AttrType::NULLS: { - result.set_null(); - break; - } - case AttrType::MAXTYPE: { - return RC::UNIMPLEMENTED; - } - default: { - return RC::UNIMPLEMENTED; - } - } + ASSERT(val.attr_type() == AttrType::NO_TYPE_NULLS, "val type is not a null"); + result.set_type(type); + result.set_null(); return RC::SUCCESS; } diff --git a/src/observer/common/type/null_type.h b/src/observer/common/type/null_type.h index f2c7901c..89cb837b 100644 --- a/src/observer/common/type/null_type.h +++ b/src/observer/common/type/null_type.h @@ -15,7 +15,7 @@ See the Mulan PSL v2 for more details. */ class NullType : public DataType { public: - NullType() : DataType(AttrType::NULLS) {} + NullType() : DataType(AttrType::NO_TYPE_NULLS) {} ~NullType() override {} diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index aee385ce..4d470556 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -20,7 +20,9 @@ See the Mulan PSL v2 for more details. */ #include "common/lang/string.h" #include "common/log/log.h" -Value::Value(NullValue) : attr_type_(AttrType::NULLS) { set_null(); } +Value::Value(NullValue) : attr_type_(AttrType::NO_TYPE_NULLS) { + set_null(); +} Value::Value(int val) { set_int(val); } @@ -35,6 +37,7 @@ Value::Value(const Value &other) this->attr_type_ = other.attr_type_; this->length_ = other.length_; this->own_data_ = other.own_data_; + this->is_null_ = other.is_null_; switch (this->attr_type_) { case AttrType::CHARS: { set_string_from_other(other); @@ -52,6 +55,7 @@ Value::Value(Value &&other) this->length_ = other.length_; this->own_data_ = other.own_data_; this->value_ = other.value_; + this->is_null_ = other.is_null_; other.own_data_ = false; other.length_ = 0; } @@ -65,6 +69,7 @@ Value &Value::operator=(const Value &other) this->attr_type_ = other.attr_type_; this->length_ = other.length_; this->own_data_ = other.own_data_; + this->is_null_ = other.is_null_; switch (this->attr_type_) { case AttrType::CHARS: { set_string_from_other(other); @@ -87,6 +92,7 @@ Value &Value::operator=(Value &&other) this->length_ = other.length_; this->own_data_ = other.own_data_; this->value_ = other.value_; + this->is_null_ = other.is_null_; other.own_data_ = false; other.length_ = 0; return *this; @@ -107,6 +113,7 @@ void Value::reset() attr_type_ = AttrType::UNDEFINED; length_ = 0; own_data_ = false; + is_null_ = false; } void Value::set_data(char *data, int length) @@ -137,8 +144,7 @@ void Value::set_data(char *data, int length) } } -void Value::set_null() -{ +void Value::set_null() { is_null_ = true; } @@ -242,6 +248,9 @@ const char *Value::data() const string Value::to_string() const { + if (is_null_) { + return "NULL"; + } string res; RC rc = DataType::type_instance(this->attr_type_)->to_string(*this, res); if (OB_FAIL(rc)) { diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 89ae0b21..fdbd3b60 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -96,6 +96,7 @@ class Value final void set_data(const char *data, int length) { this->set_data(const_cast(data), length); } void set_value(const Value &value); void set_boolean(bool val); + void set_null(bool is_null) { is_null_ = is_null; } string to_string() const; diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index a813770c..1f0cae4a 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -197,7 +197,14 @@ class RowTuple : public Tuple FieldExpr *field_expr = speces_[index]; const FieldMeta *field_meta = field_expr->field().meta(); cell.set_type(field_meta->type()); - cell.set_data(this->record_->data() + field_meta->offset(), field_meta->len()); + if (field_meta->nullable()) { + bool is_null = this->record_->data()[field_meta->offset() + field_meta->len() - 1] == 1; + cell.set_data(this->record_->data() + field_meta->offset(), field_meta->len() - 1); + cell.set_null(is_null); + } else { + cell.set_data(this->record_->data() + field_meta->offset(), field_meta->len()); + cell.set_null(false); + } return RC::SUCCESS; } diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 1ff08445..427fa832 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -651,13 +651,13 @@ static const yytype_int16 yyrline[] = 0, 194, 194, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 225, 231, 236, 242, 248, 254, 260, - 267, 273, 281, 295, 305, 329, 332, 345, 357, 372, - 376, 381, 387, 390, 391, 392, 393, 396, 413, 416, - 427, 431, 435, 441, 447, 450, 457, 469, 484, 509, - 518, 523, 534, 537, 540, 543, 546, 550, 553, 558, - 564, 571, 576, 586, 591, 596, 610, 613, 619, 622, - 627, 634, 646, 658, 670, 685, 686, 687, 688, 689, - 690, 696, 701, 714, 722, 732, 733 + 267, 273, 281, 295, 305, 329, 332, 345, 357, 380, + 384, 389, 395, 398, 399, 400, 401, 404, 421, 424, + 435, 439, 443, 449, 455, 458, 465, 477, 492, 517, + 526, 531, 542, 545, 548, 551, 554, 558, 561, 566, + 572, 579, 584, 594, 599, 604, 618, 621, 627, 630, + 635, 642, 654, 666, 678, 693, 694, 695, 696, 697, + 698, 704, 709, 722, 730, 740, 741 }; #endif @@ -1916,72 +1916,80 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); - (yyval.attr_info)->length = 4; + if ((yyval.attr_info)->type == AttrType::INTS) { + (yyval.attr_info)->length = 4; + } else if ((yyval.attr_info)->type == AttrType::FLOATS) { + (yyval.attr_info)->length = 4; + } else if ((yyval.attr_info)->type == AttrType::DATES) { + (yyval.attr_info)->length = 10; + } else { + ASSERT(false, "$$->type is invalid."); + } (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); // 处理NULL/NOT NULL标记 if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; } free((yyvsp[-2].string)); } -#line 1927 "yacc_sql.cpp" +#line 1935 "yacc_sql.cpp" break; case 39: /* nullable_constraint: NOT NULL_T */ -#line 373 "yacc_sql.y" +#line 381 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1935 "yacc_sql.cpp" +#line 1943 "yacc_sql.cpp" break; case 40: /* nullable_constraint: NULLABLE */ -#line 377 "yacc_sql.y" +#line 385 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1943 "yacc_sql.cpp" +#line 1951 "yacc_sql.cpp" break; case 41: /* nullable_constraint: %empty */ -#line 381 "yacc_sql.y" +#line 389 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NOT NULL } -#line 1951 "yacc_sql.cpp" +#line 1959 "yacc_sql.cpp" break; case 42: /* number: NUMBER */ -#line 387 "yacc_sql.y" +#line 395 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1957 "yacc_sql.cpp" +#line 1965 "yacc_sql.cpp" break; case 43: /* type: INT_T */ -#line 390 "yacc_sql.y" +#line 398 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1963 "yacc_sql.cpp" +#line 1971 "yacc_sql.cpp" break; case 44: /* type: STRING_T */ -#line 391 "yacc_sql.y" +#line 399 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1969 "yacc_sql.cpp" +#line 1977 "yacc_sql.cpp" break; case 45: /* type: FLOAT_T */ -#line 392 "yacc_sql.y" +#line 400 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1975 "yacc_sql.cpp" +#line 1983 "yacc_sql.cpp" break; case 46: /* type: DATE_T */ -#line 393 "yacc_sql.y" +#line 401 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1981 "yacc_sql.cpp" +#line 1989 "yacc_sql.cpp" break; case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 397 "yacc_sql.y" +#line 405 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1994,19 +2002,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1998 "yacc_sql.cpp" +#line 2006 "yacc_sql.cpp" break; case 48: /* value_list: %empty */ -#line 413 "yacc_sql.y" +#line 421 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 2006 "yacc_sql.cpp" +#line 2014 "yacc_sql.cpp" break; case 49: /* value_list: COMMA value value_list */ -#line 416 "yacc_sql.y" +#line 424 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -2016,64 +2024,64 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 2020 "yacc_sql.cpp" +#line 2028 "yacc_sql.cpp" break; case 50: /* value: NUMBER */ -#line 427 "yacc_sql.y" +#line 435 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2029 "yacc_sql.cpp" +#line 2037 "yacc_sql.cpp" break; case 51: /* value: FLOAT */ -#line 431 "yacc_sql.y" +#line 439 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2038 "yacc_sql.cpp" +#line 2046 "yacc_sql.cpp" break; case 52: /* value: SSS */ -#line 435 "yacc_sql.y" +#line 443 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2049 "yacc_sql.cpp" +#line 2057 "yacc_sql.cpp" break; case 53: /* value: NULL_T */ -#line 441 "yacc_sql.y" +#line 449 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2057 "yacc_sql.cpp" +#line 2065 "yacc_sql.cpp" break; case 54: /* storage_format: %empty */ -#line 447 "yacc_sql.y" +#line 455 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2065 "yacc_sql.cpp" +#line 2073 "yacc_sql.cpp" break; case 55: /* storage_format: STORAGE FORMAT EQ ID */ -#line 451 "yacc_sql.y" +#line 459 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2073 "yacc_sql.cpp" +#line 2081 "yacc_sql.cpp" break; case 56: /* delete_stmt: DELETE FROM ID where */ -#line 458 "yacc_sql.y" +#line 466 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2083,11 +2091,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2087 "yacc_sql.cpp" +#line 2095 "yacc_sql.cpp" break; case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 470 "yacc_sql.y" +#line 478 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2100,11 +2108,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2104 "yacc_sql.cpp" +#line 2112 "yacc_sql.cpp" break; case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 485 "yacc_sql.y" +#line 493 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2127,30 +2135,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2131 "yacc_sql.cpp" +#line 2139 "yacc_sql.cpp" break; case 59: /* calc_stmt: CALC expression_list */ -#line 510 "yacc_sql.y" +#line 518 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2141 "yacc_sql.cpp" +#line 2149 "yacc_sql.cpp" break; case 60: /* expression_list: expression */ -#line 519 "yacc_sql.y" +#line 527 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2150 "yacc_sql.cpp" +#line 2158 "yacc_sql.cpp" break; case 61: /* expression_list: expression COMMA expression_list */ -#line 524 "yacc_sql.y" +#line 532 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2159,99 +2167,99 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2163 "yacc_sql.cpp" +#line 2171 "yacc_sql.cpp" break; case 62: /* expression: expression '+' expression */ -#line 534 "yacc_sql.y" +#line 542 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2171 "yacc_sql.cpp" +#line 2179 "yacc_sql.cpp" break; case 63: /* expression: expression '-' expression */ -#line 537 "yacc_sql.y" +#line 545 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2179 "yacc_sql.cpp" +#line 2187 "yacc_sql.cpp" break; case 64: /* expression: expression '*' expression */ -#line 540 "yacc_sql.y" +#line 548 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2187 "yacc_sql.cpp" +#line 2195 "yacc_sql.cpp" break; case 65: /* expression: expression '/' expression */ -#line 543 "yacc_sql.y" +#line 551 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2195 "yacc_sql.cpp" +#line 2203 "yacc_sql.cpp" break; case 66: /* expression: LBRACE expression RBRACE */ -#line 546 "yacc_sql.y" +#line 554 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2204 "yacc_sql.cpp" +#line 2212 "yacc_sql.cpp" break; case 67: /* expression: '-' expression */ -#line 550 "yacc_sql.y" +#line 558 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2212 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; case 68: /* expression: value */ -#line 553 "yacc_sql.y" +#line 561 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2222 "yacc_sql.cpp" +#line 2230 "yacc_sql.cpp" break; case 69: /* expression: rel_attr */ -#line 558 "yacc_sql.y" +#line 566 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2233 "yacc_sql.cpp" +#line 2241 "yacc_sql.cpp" break; case 70: /* expression: '*' */ -#line 564 "yacc_sql.y" +#line 572 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2241 "yacc_sql.cpp" +#line 2249 "yacc_sql.cpp" break; case 71: /* rel_attr: ID */ -#line 571 "yacc_sql.y" +#line 579 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2251 "yacc_sql.cpp" +#line 2259 "yacc_sql.cpp" break; case 72: /* rel_attr: ID DOT ID */ -#line 576 "yacc_sql.y" +#line 584 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2259,29 +2267,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2263 "yacc_sql.cpp" +#line 2271 "yacc_sql.cpp" break; case 73: /* relation: ID */ -#line 586 "yacc_sql.y" +#line 594 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2271 "yacc_sql.cpp" +#line 2279 "yacc_sql.cpp" break; case 74: /* rel_list: relation */ -#line 591 "yacc_sql.y" +#line 599 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2281 "yacc_sql.cpp" +#line 2289 "yacc_sql.cpp" break; case 75: /* rel_list: relation COMMA rel_list */ -#line 596 "yacc_sql.y" +#line 604 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2292,55 +2300,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2296 "yacc_sql.cpp" +#line 2304 "yacc_sql.cpp" break; case 76: /* where: %empty */ -#line 610 "yacc_sql.y" +#line 618 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2304 "yacc_sql.cpp" +#line 2312 "yacc_sql.cpp" break; case 77: /* where: WHERE condition_list */ -#line 613 "yacc_sql.y" +#line 621 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2312 "yacc_sql.cpp" +#line 2320 "yacc_sql.cpp" break; case 78: /* condition_list: %empty */ -#line 619 "yacc_sql.y" +#line 627 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2320 "yacc_sql.cpp" +#line 2328 "yacc_sql.cpp" break; case 79: /* condition_list: condition */ -#line 622 "yacc_sql.y" +#line 630 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2330 "yacc_sql.cpp" +#line 2338 "yacc_sql.cpp" break; case 80: /* condition_list: condition AND condition_list */ -#line 627 "yacc_sql.y" +#line 635 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2340 "yacc_sql.cpp" +#line 2348 "yacc_sql.cpp" break; case 81: /* condition: rel_attr comp_op value */ -#line 635 "yacc_sql.y" +#line 643 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2352,11 +2360,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2356 "yacc_sql.cpp" +#line 2364 "yacc_sql.cpp" break; case 82: /* condition: value comp_op value */ -#line 647 "yacc_sql.y" +#line 655 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2368,11 +2376,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2372 "yacc_sql.cpp" +#line 2380 "yacc_sql.cpp" break; case 83: /* condition: rel_attr comp_op rel_attr */ -#line 659 "yacc_sql.y" +#line 667 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2384,11 +2392,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2388 "yacc_sql.cpp" +#line 2396 "yacc_sql.cpp" break; case 84: /* condition: value comp_op rel_attr */ -#line 671 "yacc_sql.y" +#line 679 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2400,55 +2408,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2404 "yacc_sql.cpp" +#line 2412 "yacc_sql.cpp" break; case 85: /* comp_op: EQ */ -#line 685 "yacc_sql.y" +#line 693 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2410 "yacc_sql.cpp" +#line 2418 "yacc_sql.cpp" break; case 86: /* comp_op: LT */ -#line 686 "yacc_sql.y" +#line 694 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2416 "yacc_sql.cpp" +#line 2424 "yacc_sql.cpp" break; case 87: /* comp_op: GT */ -#line 687 "yacc_sql.y" +#line 695 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2422 "yacc_sql.cpp" +#line 2430 "yacc_sql.cpp" break; case 88: /* comp_op: LE */ -#line 688 "yacc_sql.y" +#line 696 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2428 "yacc_sql.cpp" +#line 2436 "yacc_sql.cpp" break; case 89: /* comp_op: GE */ -#line 689 "yacc_sql.y" +#line 697 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2434 "yacc_sql.cpp" +#line 2442 "yacc_sql.cpp" break; case 90: /* comp_op: NE */ -#line 690 "yacc_sql.y" +#line 698 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2440 "yacc_sql.cpp" +#line 2448 "yacc_sql.cpp" break; case 91: /* group_by: %empty */ -#line 696 "yacc_sql.y" +#line 704 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2448 "yacc_sql.cpp" +#line 2456 "yacc_sql.cpp" break; case 92: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 702 "yacc_sql.y" +#line 710 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2458,20 +2466,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2462 "yacc_sql.cpp" +#line 2470 "yacc_sql.cpp" break; case 93: /* explain_stmt: EXPLAIN command_wrapper */ -#line 715 "yacc_sql.y" +#line 723 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2471 "yacc_sql.cpp" +#line 2479 "yacc_sql.cpp" break; case 94: /* set_variable_stmt: SET ID EQ value */ -#line 723 "yacc_sql.y" +#line 731 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2479,11 +2487,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2483 "yacc_sql.cpp" +#line 2491 "yacc_sql.cpp" break; -#line 2487 "yacc_sql.cpp" +#line 2495 "yacc_sql.cpp" default: break; } @@ -2712,7 +2720,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 735 "yacc_sql.y" +#line 743 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index ed23d354..bdd36d03 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -359,7 +359,15 @@ attr_def: $$ = new AttrInfoSqlNode; $$->type = (AttrType)$2; $$->name = $1; - $$->length = 4; + if ($$->type == AttrType::INTS) { + $$->length = 4; + } else if ($$->type == AttrType::FLOATS) { + $$->length = 4; + } else if ($$->type == AttrType::DATES) { + $$->length = 10; + } else { + ASSERT(false, "$$->type is invalid."); + } $$->nullable = $3; // 处理NULL/NOT NULL标记 if ($$->nullable) { $$->length++; From 949843cabf59fcdcf35afb551e9d7bc3436b5371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 26 Sep 2024 08:59:24 +0000 Subject: [PATCH 024/308] =?UTF-8?q?=E5=88=9D=E6=AD=A5=E5=AE=9E=E7=8E=B0lik?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/value.cpp | 20 +- src/observer/common/value.h | 8 +- src/observer/sql/expr/expression.cpp | 9 +- src/observer/sql/parser/lex_sql.cpp | 446 +++++++++--------- src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/lex_sql.l | 2 + src/observer/sql/parser/parse_defs.h | 2 + src/observer/sql/parser/yacc_sql.cpp | 652 ++++++++++++++------------- src/observer/sql/parser/yacc_sql.hpp | 16 +- src/observer/sql/parser/yacc_sql.y | 4 + 10 files changed, 615 insertions(+), 546 deletions(-) diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 19f72975..5bc98b0f 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -12,6 +12,8 @@ See the Mulan PSL v2 for more details. */ // Created by WangYunlai on 2023/06/28. // +#include + #include "common/value.h" #include "common/lang/comparator.h" @@ -244,7 +246,23 @@ string Value::to_string() const return res; } -int Value::compare(const Value &other) const { return DataType::type_instance(this->attr_type_)->compare(*this, other); } +int Value::compare(const Value &other) const +{ + return DataType::type_instance(this->attr_type_)->compare(*this, other); +} + +bool Value::LIKE(const Value &other) const +{ + const std::string left_str = this->get_string(); + const std::string &right_str = other.get_string(); + + // 将 SQL 通配符转换为正则表达式 + std::string regex_str = std::regex_replace(right_str, std::regex("%"), ".*"); + regex_str = std::regex_replace(regex_str, std::regex("_"), "."); + + std::regex regex_pattern(regex_str); + return std::regex_match(left_str, regex_pattern); +} int Value::get_int() const { diff --git a/src/observer/common/value.h b/src/observer/common/value.h index bd22a359..bfc751b7 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -91,13 +91,17 @@ class Value final void set_data(const char *data, int length) { this->set_data(const_cast(data), length); } void set_value(const Value &value); void set_boolean(bool val); - void set_null(){} + void set_null() {} - bool is_null(){return false;} + // 判断类型 +public: + bool is_null() { return false; } + inline bool is_str() const{ return attr_type_ == AttrType::CHARS; } string to_string() const; int compare(const Value &other) const; + bool LIKE(const Value &other) const; const char *data() const; diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 56cc136b..0aa9ebd5 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -120,7 +120,14 @@ ComparisonExpr::~ComparisonExpr() {} RC ComparisonExpr::compare_value(const Value &left, const Value &right, bool &result) const { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; + + if (comp_ == LIKE_OP || comp_ == NOT_LIKE_OP) { + ASSERT(left.is_str() && right.is_str(), "LIKE ONLY SUPPORT STRING TYPE!"); + result = comp_ == LIKE_OP ? left.LIKE(right) : !left.LIKE(right); + return rc; + } + int cmp_result = left.compare(right); result = false; switch (comp_) { diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index ba5ab5fd..e71db6db 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -385,8 +385,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 62 -#define YY_END_OF_BUFFER 63 +#define YY_NUM_RULES 64 +#define YY_END_OF_BUFFER 65 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -394,28 +394,28 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[184] = +static const flex_int16_t yy_accept[190] = { 0, - 0, 0, 0, 0, 63, 61, 1, 2, 61, 61, - 61, 45, 46, 57, 55, 47, 56, 6, 58, 3, - 5, 52, 48, 54, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 62, 51, 0, 59, 0, 60, 3, 0, - 49, 50, 53, 44, 44, 44, 44, 41, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 15, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 4, 22, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - - 44, 44, 44, 44, 32, 44, 44, 44, 28, 44, - 44, 44, 44, 44, 44, 44, 44, 19, 33, 44, - 44, 37, 35, 44, 9, 11, 7, 44, 44, 44, - 20, 44, 8, 44, 44, 44, 24, 36, 44, 44, - 16, 44, 17, 44, 44, 44, 44, 29, 44, 44, - 44, 44, 34, 44, 40, 14, 44, 44, 44, 44, - 44, 12, 44, 44, 21, 30, 10, 26, 44, 43, - 38, 23, 44, 18, 44, 13, 27, 25, 39, 44, - 42, 31, 0 + 0, 0, 0, 0, 65, 63, 1, 2, 63, 63, + 63, 47, 48, 59, 57, 49, 58, 6, 60, 3, + 5, 54, 50, 56, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 64, 53, 0, 61, 0, 62, 3, + 0, 51, 52, 55, 46, 46, 46, 46, 41, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 15, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 4, 22, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + + 46, 46, 46, 46, 46, 46, 46, 32, 46, 46, + 45, 46, 46, 28, 46, 46, 46, 46, 46, 46, + 46, 46, 19, 33, 46, 46, 37, 35, 46, 9, + 11, 7, 46, 46, 46, 20, 46, 8, 46, 46, + 46, 24, 44, 36, 46, 46, 16, 46, 17, 46, + 46, 46, 46, 29, 46, 46, 46, 46, 34, 46, + 40, 14, 46, 46, 46, 46, 46, 12, 46, 46, + 21, 30, 10, 26, 46, 43, 38, 23, 46, 18, + 46, 13, 27, 25, 39, 46, 42, 31, 0 } ; static const YY_CHAR yy_ec[256] = @@ -461,120 +461,125 @@ static const YY_CHAR yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[189] = +static const flex_int16_t yy_base[195] = { 0, - 0, 0, 0, 0, 487, 488, 488, 488, 468, 480, - 478, 488, 488, 488, 488, 488, 468, 488, 488, 54, - 488, 52, 488, 464, 53, 57, 60, 59, 70, 91, - 61, 67, 75, 466, 87, 77, 98, 113, 109, 58, - 119, 111, 488, 488, 475, 488, 473, 488, 86, 463, - 488, 488, 488, 0, 462, 126, 121, 461, 115, 137, - 127, 143, 128, 139, 150, 157, 153, 160, 163, 168, - 173, 175, 186, 460, 180, 190, 199, 203, 193, 202, - 216, 201, 214, 459, 451, 225, 226, 228, 227, 230, - 237, 243, 251, 145, 231, 239, 256, 263, 264, 250, - - 253, 260, 271, 279, 268, 275, 286, 289, 449, 265, - 290, 292, 300, 301, 294, 305, 295, 448, 446, 315, - 309, 444, 442, 317, 441, 440, 438, 319, 320, 333, - 437, 327, 433, 329, 321, 344, 431, 430, 345, 346, - 428, 354, 425, 358, 350, 369, 371, 423, 361, 372, - 376, 374, 418, 389, 415, 382, 386, 390, 392, 393, - 399, 398, 394, 400, 368, 364, 357, 342, 406, 335, - 331, 179, 401, 171, 417, 162, 99, 83, 74, 414, - 73, 69, 488, 467, 469, 471, 76, 75 + 0, 0, 0, 0, 503, 504, 504, 504, 484, 496, + 494, 504, 504, 504, 504, 504, 484, 504, 504, 54, + 504, 52, 504, 480, 53, 57, 60, 59, 70, 91, + 61, 67, 75, 482, 106, 95, 83, 98, 122, 58, + 109, 113, 111, 504, 504, 491, 504, 489, 504, 86, + 479, 504, 504, 504, 0, 478, 128, 121, 477, 99, + 141, 127, 153, 126, 159, 157, 151, 161, 163, 166, + 174, 179, 192, 139, 182, 183, 476, 189, 196, 178, + 190, 213, 217, 225, 227, 201, 468, 467, 236, 239, + 230, 241, 240, 250, 244, 256, 248, 252, 260, 267, + + 261, 265, 262, 264, 271, 289, 285, 292, 288, 295, + 466, 290, 308, 465, 293, 310, 313, 300, 323, 312, + 314, 315, 464, 463, 324, 322, 462, 461, 325, 459, + 458, 456, 338, 330, 346, 454, 340, 453, 347, 349, + 357, 452, 449, 448, 363, 355, 446, 377, 442, 370, + 350, 372, 380, 441, 364, 385, 390, 391, 439, 384, + 435, 431, 400, 392, 411, 398, 408, 402, 417, 412, + 429, 425, 395, 366, 414, 332, 222, 221, 420, 191, + 436, 169, 165, 78, 77, 422, 74, 73, 504, 484, + 486, 488, 82, 75 + } ; -static const flex_int16_t yy_def[189] = +static const flex_int16_t yy_def[195] = { 0, - 183, 1, 184, 184, 183, 183, 183, 183, 183, 185, - 186, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 183, 183, 185, 183, 186, 183, 183, 183, - 183, 183, 183, 188, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 183, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 0, 183, 183, 183, 183, 183 + 189, 1, 190, 190, 189, 189, 189, 189, 189, 191, + 192, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 189, 189, 191, 189, 192, 189, 189, + 189, 189, 189, 189, 194, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 189, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 0, 189, + 189, 189, 189, 189 + } ; -static const flex_int16_t yy_nxt[555] = +static const flex_int16_t yy_nxt[571] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, - 35, 34, 34, 36, 34, 37, 38, 39, 40, 41, - 42, 34, 34, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 34, 34, 36, 34, 37, 38, - 39, 40, 41, 42, 34, 34, 50, 54, 49, 51, - 52, 54, 54, 54, 54, 54, 54, 55, 63, 59, - 57, 54, 64, 54, 54, 56, 60, 54, 54, 54, - 71, 54, 81, 61, 65, 62, 70, 54, 50, 58, - - 49, 54, 63, 59, 57, 54, 64, 72, 56, 74, - 60, 66, 54, 54, 71, 81, 61, 65, 62, 70, - 73, 67, 58, 54, 68, 54, 69, 54, 80, 54, - 72, 75, 74, 54, 66, 54, 76, 83, 82, 77, - 54, 54, 54, 73, 67, 87, 86, 68, 85, 69, - 78, 54, 80, 54, 75, 79, 88, 54, 89, 54, - 76, 83, 82, 77, 54, 91, 90, 54, 87, 92, - 86, 54, 85, 78, 54, 93, 54, 54, 79, 126, - 88, 89, 54, 94, 95, 54, 97, 54, 91, 54, - 90, 96, 92, 54, 54, 98, 99, 102, 93, 103, - - 54, 100, 126, 101, 54, 106, 94, 54, 95, 97, - 107, 104, 105, 54, 96, 54, 54, 54, 98, 99, - 108, 102, 113, 103, 100, 112, 101, 109, 54, 106, - 54, 115, 110, 107, 104, 105, 111, 116, 114, 54, - 54, 54, 54, 108, 54, 54, 113, 118, 112, 121, - 109, 54, 117, 54, 115, 110, 122, 54, 120, 111, - 123, 116, 114, 119, 54, 54, 124, 54, 127, 128, - 54, 118, 125, 121, 54, 129, 117, 54, 54, 54, - 122, 120, 54, 134, 123, 54, 119, 133, 132, 54, - 124, 127, 128, 54, 130, 131, 125, 138, 135, 129, - - 54, 137, 136, 54, 54, 141, 54, 134, 54, 54, - 133, 132, 140, 143, 54, 54, 139, 130, 131, 54, - 145, 138, 135, 54, 137, 142, 136, 148, 141, 54, - 144, 54, 146, 54, 54, 54, 140, 143, 152, 139, - 147, 54, 149, 54, 145, 54, 150, 54, 142, 54, - 148, 157, 154, 144, 151, 146, 54, 153, 54, 54, - 54, 155, 152, 147, 54, 159, 149, 160, 54, 150, - 156, 54, 54, 161, 157, 54, 154, 151, 54, 158, - 153, 162, 54, 54, 155, 54, 54, 163, 54, 159, - 54, 160, 164, 156, 165, 167, 54, 161, 166, 168, - - 54, 169, 158, 54, 54, 162, 54, 54, 54, 171, - 163, 173, 54, 54, 54, 54, 164, 177, 165, 167, - 54, 166, 180, 168, 175, 169, 170, 172, 54, 54, - 174, 54, 54, 171, 176, 173, 178, 54, 179, 54, - 181, 177, 54, 182, 54, 54, 180, 54, 175, 170, - 172, 54, 54, 174, 54, 54, 54, 176, 54, 178, - 54, 179, 54, 54, 181, 54, 182, 43, 43, 45, - 45, 47, 47, 84, 54, 54, 54, 84, 48, 46, - 54, 53, 49, 48, 46, 44, 183, 5, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183 + 35, 34, 36, 37, 34, 38, 39, 40, 41, 42, + 43, 34, 34, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 34, 36, 37, 34, 38, 39, + 40, 41, 42, 43, 34, 34, 51, 55, 50, 52, + 53, 55, 55, 55, 55, 55, 55, 83, 64, 60, + 58, 55, 65, 56, 55, 57, 61, 55, 55, 55, + 72, 55, 55, 62, 66, 63, 71, 55, 51, 59, + + 50, 83, 64, 60, 58, 55, 65, 73, 57, 55, + 61, 67, 55, 55, 72, 77, 62, 66, 63, 71, + 55, 68, 59, 55, 69, 55, 70, 55, 76, 90, + 73, 78, 85, 74, 67, 55, 55, 86, 77, 75, + 55, 55, 55, 84, 68, 79, 89, 69, 80, 70, + 88, 76, 90, 55, 78, 55, 85, 74, 92, 81, + 91, 86, 75, 94, 82, 55, 84, 55, 109, 79, + 89, 55, 80, 55, 88, 55, 93, 55, 98, 55, + 55, 92, 81, 55, 91, 99, 94, 82, 55, 95, + 97, 109, 55, 55, 100, 96, 55, 55, 101, 102, + + 93, 110, 98, 55, 55, 55, 55, 103, 99, 104, + 55, 115, 95, 97, 105, 55, 106, 100, 96, 112, + 111, 101, 102, 116, 121, 110, 113, 55, 107, 108, + 103, 55, 104, 114, 115, 55, 55, 118, 105, 55, + 106, 55, 112, 111, 55, 117, 116, 119, 121, 113, + 55, 107, 108, 55, 55, 55, 114, 120, 55, 126, + 123, 118, 55, 122, 55, 124, 55, 129, 117, 127, + 55, 119, 125, 128, 55, 55, 55, 130, 55, 55, + 120, 55, 131, 126, 123, 55, 134, 122, 124, 132, + 133, 129, 135, 127, 139, 125, 136, 128, 138, 55, + + 137, 130, 55, 55, 55, 131, 55, 55, 141, 55, + 134, 143, 132, 133, 55, 135, 140, 144, 139, 136, + 145, 138, 55, 137, 55, 142, 55, 55, 55, 55, + 150, 146, 141, 147, 149, 143, 55, 55, 55, 55, + 140, 144, 151, 145, 55, 148, 55, 154, 142, 153, + 152, 155, 55, 150, 55, 146, 147, 158, 149, 156, + 55, 55, 157, 55, 55, 160, 151, 159, 148, 55, + 154, 55, 153, 152, 161, 155, 166, 55, 55, 163, + 55, 158, 156, 165, 55, 157, 55, 169, 162, 160, + 159, 55, 164, 168, 55, 170, 167, 161, 55, 55, + + 166, 172, 163, 171, 55, 55, 55, 165, 173, 55, + 169, 162, 55, 174, 55, 164, 55, 168, 175, 170, + 167, 176, 55, 177, 172, 55, 55, 171, 55, 178, + 179, 55, 173, 181, 55, 180, 55, 174, 182, 55, + 183, 186, 175, 55, 176, 55, 185, 177, 184, 55, + 55, 188, 178, 55, 179, 55, 55, 181, 180, 187, + 55, 182, 55, 55, 183, 186, 55, 55, 55, 185, + 55, 184, 55, 55, 188, 55, 55, 55, 55, 55, + 55, 55, 87, 187, 44, 44, 46, 46, 48, 48, + 55, 55, 55, 87, 49, 47, 55, 54, 50, 49, + + 47, 45, 189, 5, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189 } ; -static const flex_int16_t yy_chk[555] = +static const flex_int16_t yy_chk[571] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -583,60 +588,61 @@ static const flex_int16_t yy_chk[555] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 40, 28, 27, 31, 188, 187, 28, 27, - 26, 32, 28, 182, 29, 25, 27, 181, 179, 33, - 32, 36, 40, 27, 28, 27, 31, 178, 49, 26, - - 49, 35, 28, 27, 26, 30, 28, 33, 25, 36, - 27, 29, 37, 177, 32, 40, 27, 28, 27, 31, - 35, 30, 26, 39, 30, 42, 30, 38, 39, 59, - 33, 37, 36, 41, 29, 57, 38, 42, 41, 38, - 56, 61, 63, 35, 30, 59, 57, 30, 56, 30, - 38, 60, 39, 64, 37, 38, 60, 62, 61, 94, - 38, 42, 41, 38, 65, 63, 62, 67, 59, 64, - 57, 66, 56, 38, 68, 64, 176, 69, 38, 94, - 60, 61, 70, 65, 66, 174, 67, 71, 63, 72, - 62, 66, 64, 172, 75, 68, 69, 72, 64, 72, - - 73, 70, 94, 71, 76, 73, 65, 79, 66, 67, - 75, 72, 72, 77, 66, 82, 80, 78, 68, 69, - 76, 72, 80, 72, 70, 79, 71, 76, 83, 73, - 81, 82, 77, 75, 72, 72, 78, 83, 81, 86, - 87, 89, 88, 76, 90, 95, 80, 87, 79, 90, - 76, 91, 86, 96, 82, 77, 91, 92, 89, 78, - 91, 83, 81, 88, 100, 93, 92, 101, 95, 96, - 97, 87, 93, 90, 102, 97, 86, 98, 99, 110, - 91, 89, 105, 102, 91, 103, 88, 101, 100, 106, - 92, 95, 96, 104, 98, 99, 93, 106, 103, 97, - - 107, 105, 104, 108, 111, 110, 112, 102, 115, 117, - 101, 100, 108, 112, 113, 114, 107, 98, 99, 116, - 114, 106, 103, 121, 105, 111, 104, 117, 110, 120, - 113, 124, 115, 128, 129, 135, 108, 112, 128, 107, - 116, 132, 120, 134, 114, 171, 121, 130, 111, 170, - 117, 135, 130, 113, 124, 115, 168, 129, 136, 139, - 140, 132, 128, 116, 145, 139, 120, 140, 142, 121, - 134, 167, 144, 142, 135, 149, 130, 124, 166, 136, - 129, 144, 165, 146, 132, 147, 150, 145, 152, 139, - 151, 140, 146, 134, 147, 150, 156, 142, 149, 151, - - 157, 152, 136, 154, 158, 144, 159, 160, 163, 157, - 145, 159, 162, 161, 164, 173, 146, 163, 147, 150, - 169, 149, 173, 151, 161, 152, 154, 158, 180, 155, - 160, 175, 153, 157, 162, 159, 164, 148, 169, 143, - 175, 163, 141, 180, 138, 137, 173, 133, 161, 154, - 158, 131, 127, 160, 126, 125, 123, 162, 122, 164, - 119, 169, 118, 109, 175, 85, 180, 184, 184, 185, - 185, 186, 186, 84, 74, 58, 55, 50, 47, 45, - 34, 24, 17, 11, 10, 9, 5, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183 + 22, 26, 40, 28, 27, 31, 194, 40, 28, 27, + 26, 32, 28, 193, 29, 25, 27, 188, 187, 33, + 32, 185, 184, 27, 28, 27, 31, 37, 50, 26, + + 50, 40, 28, 27, 26, 30, 28, 33, 25, 36, + 27, 29, 38, 60, 32, 37, 27, 28, 27, 31, + 35, 30, 26, 41, 30, 43, 30, 42, 36, 60, + 33, 38, 42, 35, 29, 58, 39, 43, 37, 35, + 64, 62, 57, 41, 30, 39, 58, 30, 39, 30, + 57, 36, 60, 74, 38, 61, 42, 35, 62, 39, + 61, 43, 35, 64, 39, 67, 41, 63, 74, 39, + 58, 66, 39, 65, 57, 68, 63, 69, 67, 183, + 70, 62, 39, 182, 61, 67, 64, 39, 71, 65, + 66, 74, 80, 72, 68, 65, 75, 76, 69, 70, + + 63, 75, 67, 78, 81, 180, 73, 71, 67, 72, + 79, 80, 65, 66, 73, 86, 73, 68, 65, 78, + 76, 69, 70, 81, 86, 75, 79, 82, 73, 73, + 71, 83, 72, 79, 80, 178, 177, 83, 73, 84, + 73, 85, 78, 76, 91, 82, 81, 84, 86, 79, + 89, 73, 73, 90, 93, 92, 79, 85, 95, 93, + 90, 83, 97, 89, 94, 91, 98, 95, 82, 94, + 96, 84, 92, 94, 99, 101, 103, 96, 104, 102, + 85, 100, 97, 93, 90, 105, 100, 89, 91, 98, + 99, 95, 101, 94, 105, 92, 102, 94, 104, 107, + + 103, 96, 109, 106, 112, 97, 108, 115, 107, 110, + 100, 109, 98, 99, 118, 101, 106, 110, 105, 102, + 112, 104, 113, 103, 116, 108, 120, 117, 121, 122, + 118, 113, 107, 115, 117, 109, 126, 119, 125, 129, + 106, 110, 119, 112, 134, 116, 176, 122, 108, 121, + 120, 125, 133, 118, 137, 113, 115, 133, 117, 126, + 135, 139, 129, 140, 151, 135, 119, 134, 116, 146, + 122, 141, 121, 120, 137, 125, 146, 145, 155, 140, + 174, 133, 126, 145, 150, 129, 152, 151, 139, 135, + 134, 148, 141, 150, 153, 152, 148, 137, 160, 156, + + 146, 155, 140, 153, 157, 158, 164, 145, 156, 173, + 151, 139, 166, 157, 163, 141, 168, 150, 158, 152, + 148, 160, 167, 163, 155, 165, 170, 153, 175, 164, + 165, 169, 156, 167, 179, 166, 186, 157, 168, 172, + 169, 179, 158, 171, 160, 162, 175, 163, 170, 161, + 181, 186, 164, 159, 165, 154, 149, 167, 166, 181, + 147, 168, 144, 143, 169, 179, 142, 138, 136, 175, + 132, 170, 131, 130, 186, 128, 127, 124, 123, 114, + 111, 88, 87, 181, 190, 190, 191, 191, 192, 192, + 77, 59, 56, 51, 48, 46, 34, 24, 17, 11, + + 10, 9, 5, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 189, 189, 189, 189 } ; /* The intent behind this definition is that it'll catch @@ -671,7 +677,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 675 "lex_sql.cpp" +#line 681 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -680,7 +686,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 684 "lex_sql.cpp" +#line 690 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -966,7 +972,7 @@ YY_DECL #line 75 "lex_sql.l" -#line 970 "lex_sql.cpp" +#line 976 "lex_sql.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -993,13 +999,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 184 ) + if ( yy_current_state >= 190 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 488 ); + while ( yy_base[yy_current_state] != 504 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1242,92 +1248,102 @@ RETURN_TOKEN(FORMAT); case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +RETURN_TOKEN(LIKE); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(LBRACE); +RETURN_TOKEN(NOT); YY_BREAK case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(RBRACE); +yylval->string=strdup(yytext); RETURN_TOKEN(ID); YY_BREAK case 47: YY_RULE_SETUP -#line 126 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 125 "lex_sql.l" +RETURN_TOKEN(LBRACE); YY_BREAK case 48: YY_RULE_SETUP -#line 127 "lex_sql.l" -RETURN_TOKEN(EQ); +#line 126 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 49: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(COMMA); YY_BREAK case 50: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(EQ); YY_BREAK case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LE); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(NE); YY_BREAK case 53: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(NE); YY_BREAK case 54: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(LT); YY_BREAK case 55: -#line 136 "lex_sql.l" +YY_RULE_SETUP +#line 134 "lex_sql.l" +RETURN_TOKEN(GE); + YY_BREAK case 56: -#line 137 "lex_sql.l" +YY_RULE_SETUP +#line 135 "lex_sql.l" +RETURN_TOKEN(GT); + YY_BREAK case 57: #line 138 "lex_sql.l" case 58: +#line 139 "lex_sql.l" +case 59: +#line 140 "lex_sql.l" +case 60: YY_RULE_SETUP -#line 138 "lex_sql.l" +#line 140 "lex_sql.l" { return yytext[0]; } YY_BREAK -case 59: -/* rule 59 can match eol */ +case 61: +/* rule 61 can match eol */ YY_RULE_SETUP -#line 139 "lex_sql.l" +#line 141 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 60: -/* rule 60 can match eol */ +case 62: +/* rule 62 can match eol */ YY_RULE_SETUP -#line 140 "lex_sql.l" +#line 142 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 61: +case 63: YY_RULE_SETUP -#line 142 "lex_sql.l" +#line 144 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK -case 62: +case 64: YY_RULE_SETUP -#line 143 "lex_sql.l" +#line 145 "lex_sql.l" ECHO; YY_BREAK -#line 1331 "lex_sql.cpp" +#line 1347 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1627,7 +1643,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 184 ) + if ( yy_current_state >= 190 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1656,11 +1672,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 184 ) + if ( yy_current_state >= 190 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 183); + yy_is_jam = (yy_current_state == 189); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2483,7 +2499,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 143 "lex_sql.l" +#line 145 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 8f6501ce..34bdfcd4 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -541,7 +541,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 143 "lex_sql.l" +#line 145 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index f1d82be0..011ffb3e 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -119,6 +119,8 @@ GROUP RETURN_TOKEN(GROUP); BY RETURN_TOKEN(BY); STORAGE RETURN_TOKEN(STORAGE); FORMAT RETURN_TOKEN(FORMAT); +LIKE RETURN_TOKEN(LIKE); +NOT RETURN_TOKEN(NOT); {ID} yylval->string=strdup(yytext); RETURN_TOKEN(ID); "(" RETURN_TOKEN(LBRACE); ")" RETURN_TOKEN(RBRACE); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 9593d57a..bebc7693 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -51,6 +51,8 @@ enum CompOp LESS_THAN, ///< "<" GREAT_EQUAL, ///< ">=" GREAT_THAN, ///< ">" + LIKE_OP, ///< "like" + NOT_LIKE_OP, ///< "not like" NO_OP }; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 3c8e4fbc..293471c5 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -200,57 +200,59 @@ enum yysymbol_kind_t YYSYMBOL_LE = 48, /* LE */ YYSYMBOL_GE = 49, /* GE */ YYSYMBOL_NE = 50, /* NE */ - YYSYMBOL_NUMBER = 51, /* NUMBER */ - YYSYMBOL_FLOAT = 52, /* FLOAT */ - YYSYMBOL_ID = 53, /* ID */ - YYSYMBOL_SSS = 54, /* SSS */ - YYSYMBOL_55_ = 55, /* '+' */ - YYSYMBOL_56_ = 56, /* '-' */ - YYSYMBOL_57_ = 57, /* '*' */ - YYSYMBOL_58_ = 58, /* '/' */ - YYSYMBOL_UMINUS = 59, /* UMINUS */ - YYSYMBOL_YYACCEPT = 60, /* $accept */ - YYSYMBOL_commands = 61, /* commands */ - YYSYMBOL_command_wrapper = 62, /* command_wrapper */ - YYSYMBOL_exit_stmt = 63, /* exit_stmt */ - YYSYMBOL_help_stmt = 64, /* help_stmt */ - YYSYMBOL_sync_stmt = 65, /* sync_stmt */ - YYSYMBOL_begin_stmt = 66, /* begin_stmt */ - YYSYMBOL_commit_stmt = 67, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 68, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 69, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 70, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 71, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 72, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 73, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 74, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 75, /* attr_def_list */ - YYSYMBOL_attr_def = 76, /* attr_def */ - YYSYMBOL_number = 77, /* number */ - YYSYMBOL_type = 78, /* type */ - YYSYMBOL_insert_stmt = 79, /* insert_stmt */ - YYSYMBOL_value_list = 80, /* value_list */ - YYSYMBOL_value = 81, /* value */ - YYSYMBOL_storage_format = 82, /* storage_format */ - YYSYMBOL_delete_stmt = 83, /* delete_stmt */ - YYSYMBOL_update_stmt = 84, /* update_stmt */ - YYSYMBOL_select_stmt = 85, /* select_stmt */ - YYSYMBOL_calc_stmt = 86, /* calc_stmt */ - YYSYMBOL_expression_list = 87, /* expression_list */ - YYSYMBOL_expression = 88, /* expression */ - YYSYMBOL_aggr_func_expr = 89, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 90, /* rel_attr */ - YYSYMBOL_relation = 91, /* relation */ - YYSYMBOL_rel_list = 92, /* rel_list */ - YYSYMBOL_where = 93, /* where */ - YYSYMBOL_condition_list = 94, /* condition_list */ - YYSYMBOL_condition = 95, /* condition */ - YYSYMBOL_comp_op = 96, /* comp_op */ - YYSYMBOL_group_by = 97, /* group_by */ - YYSYMBOL_load_data_stmt = 98, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 99, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 100, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 101 /* opt_semicolon */ + YYSYMBOL_LIKE = 51, /* LIKE */ + YYSYMBOL_NOT = 52, /* NOT */ + YYSYMBOL_NUMBER = 53, /* NUMBER */ + YYSYMBOL_FLOAT = 54, /* FLOAT */ + YYSYMBOL_ID = 55, /* ID */ + YYSYMBOL_SSS = 56, /* SSS */ + YYSYMBOL_57_ = 57, /* '+' */ + YYSYMBOL_58_ = 58, /* '-' */ + YYSYMBOL_59_ = 59, /* '*' */ + YYSYMBOL_60_ = 60, /* '/' */ + YYSYMBOL_UMINUS = 61, /* UMINUS */ + YYSYMBOL_YYACCEPT = 62, /* $accept */ + YYSYMBOL_commands = 63, /* commands */ + YYSYMBOL_command_wrapper = 64, /* command_wrapper */ + YYSYMBOL_exit_stmt = 65, /* exit_stmt */ + YYSYMBOL_help_stmt = 66, /* help_stmt */ + YYSYMBOL_sync_stmt = 67, /* sync_stmt */ + YYSYMBOL_begin_stmt = 68, /* begin_stmt */ + YYSYMBOL_commit_stmt = 69, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 70, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 71, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 72, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 73, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 74, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 75, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 76, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 77, /* attr_def_list */ + YYSYMBOL_attr_def = 78, /* attr_def */ + YYSYMBOL_number = 79, /* number */ + YYSYMBOL_type = 80, /* type */ + YYSYMBOL_insert_stmt = 81, /* insert_stmt */ + YYSYMBOL_value_list = 82, /* value_list */ + YYSYMBOL_value = 83, /* value */ + YYSYMBOL_storage_format = 84, /* storage_format */ + YYSYMBOL_delete_stmt = 85, /* delete_stmt */ + YYSYMBOL_update_stmt = 86, /* update_stmt */ + YYSYMBOL_select_stmt = 87, /* select_stmt */ + YYSYMBOL_calc_stmt = 88, /* calc_stmt */ + YYSYMBOL_expression_list = 89, /* expression_list */ + YYSYMBOL_expression = 90, /* expression */ + YYSYMBOL_aggr_func_expr = 91, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 92, /* rel_attr */ + YYSYMBOL_relation = 93, /* relation */ + YYSYMBOL_rel_list = 94, /* rel_list */ + YYSYMBOL_where = 95, /* where */ + YYSYMBOL_condition_list = 96, /* condition_list */ + YYSYMBOL_condition = 97, /* condition */ + YYSYMBOL_comp_op = 98, /* comp_op */ + YYSYMBOL_group_by = 99, /* group_by */ + YYSYMBOL_load_data_stmt = 100, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 101, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 102, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 103 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -581,19 +583,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 151 +#define YYLAST 154 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 60 +#define YYNTOKENS 62 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 42 /* YYNRULES -- Number of rules. */ -#define YYNRULES 95 +#define YYNRULES 97 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 172 +#define YYNSTATES 175 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 310 +#define YYMAXUTOK 312 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -611,7 +613,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 57, 55, 2, 56, 2, 58, 2, 2, + 2, 2, 59, 57, 2, 58, 2, 60, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -638,23 +640,23 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 59 + 55, 56, 61 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 190, 190, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 221, 227, 232, 238, 244, 250, 256, - 263, 269, 277, 291, 301, 325, 328, 341, 349, 359, - 362, 363, 364, 365, 368, 385, 388, 399, 403, 407, - 416, 419, 426, 438, 453, 478, 487, 492, 503, 506, - 509, 512, 515, 519, 522, 527, 533, 536, 542, 550, - 556, 561, 571, 576, 581, 595, 598, 604, 607, 612, - 619, 631, 643, 655, 670, 671, 672, 673, 674, 675, - 681, 686, 699, 707, 717, 718 + 0, 192, 192, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 223, 229, 234, 240, 246, 252, 258, + 265, 271, 279, 293, 303, 327, 330, 343, 351, 361, + 364, 365, 366, 367, 370, 387, 390, 401, 405, 409, + 418, 421, 428, 440, 455, 480, 489, 494, 505, 508, + 511, 514, 517, 521, 524, 529, 535, 538, 544, 552, + 558, 563, 573, 578, 583, 597, 600, 606, 609, 614, + 621, 633, 645, 657, 672, 673, 674, 675, 676, 677, + 678, 679, 685, 690, 703, 711, 721, 722 }; #endif @@ -676,18 +678,18 @@ static const char *const yytname[] = "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "STRING_T", "FLOAT_T", "DATE_T", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", - "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "NUMBER", - "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", - "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", - "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", - "show_tables_stmt", "desc_table_stmt", "create_index_stmt", - "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", - "number", "type", "insert_stmt", "value_list", "value", "storage_format", - "delete_stmt", "update_stmt", "select_stmt", "calc_stmt", - "expression_list", "expression", "aggr_func_expr", "rel_attr", - "relation", "rel_list", "where", "condition_list", "condition", - "comp_op", "group_by", "load_data_stmt", "explain_stmt", - "set_variable_stmt", "opt_semicolon", YY_NULLPTR + "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "NOT", + "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", + "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", + "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", + "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", + "create_index_stmt", "drop_index_stmt", "create_table_stmt", + "attr_def_list", "attr_def", "number", "type", "insert_stmt", + "value_list", "value", "storage_format", "delete_stmt", "update_stmt", + "select_stmt", "calc_stmt", "expression_list", "expression", + "aggr_func_expr", "rel_attr", "relation", "rel_list", "where", + "condition_list", "condition", "comp_op", "group_by", "load_data_stmt", + "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; static const char * @@ -711,24 +713,24 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 63, 20, 26, 10, 10, -38, 9, -102, 6, 5, - -10, -102, -102, -102, -102, -102, 18, 19, 63, 49, + 73, 20, 26, 10, 10, -37, 6, -102, 9, 11, + 7, -102, -102, -102, -102, -102, 16, 21, 73, 51, 69, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, 29, 31, 36, 37, 10, -102, -102, -15, -102, - 10, -102, -102, -102, 39, -102, -102, 57, -102, -102, - 45, 46, 64, 58, 65, -102, -102, -102, -102, 85, - 70, -102, 71, -3, -6, 54, -102, 10, 10, 10, - 10, 10, 59, 77, 76, 60, -19, 61, 67, 68, - 72, -102, -102, 94, -102, -102, -46, -46, -102, -102, - -102, 101, 76, 104, -31, -102, 79, -102, 95, -1, - 105, 109, -102, -102, 59, -102, -19, 98, -40, -40, - -102, 96, -19, 122, -102, -102, -102, -102, 112, 67, - 113, 81, -102, -102, 114, -102, -102, -102, -102, -102, - -102, -31, -31, -31, 76, 83, 86, 105, 97, 118, - -19, 119, -102, -102, -102, -102, -102, -102, -102, -102, - 121, -102, 99, -102, -102, 114, -102, -102, 100, -102, - 89, -102 + -102, 25, 27, 28, 37, 10, -102, -102, -15, -102, + 10, -102, -102, -102, 17, -102, -102, 47, -102, -102, + 39, 44, 63, 56, 64, -102, -102, -102, -102, 85, + 68, -102, 70, -3, -6, 52, -102, 10, 10, 10, + 10, 10, 54, 78, 79, 58, -21, 60, 62, 65, + 66, -102, -102, 98, -102, -102, -20, -20, -102, -102, + -102, 101, 79, 100, -33, -102, 80, -102, 91, -1, + 103, 111, -102, -102, 54, -102, -21, 102, -40, -40, + -102, 95, -21, 124, -102, -102, -102, -102, 115, 62, + 116, 82, -102, -102, 114, -102, -102, -102, -102, -102, + -102, -102, 87, -33, -33, -33, 79, 84, 88, 103, + 97, 122, -21, 123, -102, -102, -102, -102, -102, -102, + -102, -102, -102, 125, -102, 104, -102, -102, 114, -102, + -102, 99, -102, 92, -102 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -738,31 +740,31 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 94, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 96, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, 20, 0, 0, 0, 0, 0, 47, 48, 70, 49, 0, 66, 64, 55, 56, 67, 65, 0, 31, 30, - 0, 0, 0, 0, 0, 92, 1, 95, 2, 0, + 0, 0, 0, 0, 0, 94, 1, 97, 2, 0, 0, 29, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 62, 69, 0, 71, 57, 58, 59, 60, 61, - 72, 73, 75, 0, 77, 52, 0, 93, 0, 0, - 35, 0, 33, 68, 0, 90, 0, 70, 0, 0, + 72, 73, 75, 0, 77, 52, 0, 95, 0, 0, + 35, 0, 33, 68, 0, 92, 0, 70, 0, 0, 76, 78, 0, 0, 40, 41, 42, 43, 38, 0, 0, 0, 74, 54, 45, 84, 85, 86, 87, 88, - 89, 0, 0, 77, 75, 0, 0, 35, 50, 0, - 0, 0, 81, 83, 80, 82, 79, 53, 91, 39, - 0, 36, 0, 34, 32, 45, 44, 37, 0, 46, - 0, 51 + 89, 90, 0, 0, 0, 77, 75, 0, 0, 35, + 50, 0, 0, 0, 91, 81, 83, 80, 82, 79, + 53, 93, 39, 0, 36, 0, 34, 32, 45, 44, + 37, 0, 46, 0, 51 }; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = +static const yytype_int16 yypgoto[] = { - -102, -102, 126, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, 0, 17, -102, -102, -102, - -17, -85, -102, -102, -102, -102, -102, -4, 38, -102, - -101, -102, 35, -100, 7, -102, 32, -102, -102, -102, + -102, -102, 128, -102, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, 0, 22, -102, -102, -102, + -18, -85, -102, -102, -102, -102, -102, -4, 48, -102, + -101, -102, 38, -100, 8, -102, 35, -102, -102, -102, -102, -102 }; @@ -770,9 +772,9 @@ static const yytype_int8 yypgoto[] = static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 130, 110, 160, 128, 33, - 151, 52, 163, 34, 35, 36, 37, 53, 54, 55, - 56, 101, 102, 105, 120, 121, 141, 133, 38, 39, + 28, 29, 30, 31, 32, 130, 110, 163, 128, 33, + 153, 52, 166, 34, 35, 36, 37, 53, 54, 55, + 56, 101, 102, 105, 120, 121, 143, 133, 38, 39, 40, 68 }; @@ -782,41 +784,41 @@ static const yytype_uint8 yydefgoto[] = static const yytype_uint8 yytable[] = { 57, 107, 115, 119, 74, 135, 136, 137, 138, 139, - 140, 80, 81, 45, 92, 58, 75, 91, 59, 118, + 140, 141, 142, 45, 92, 59, 75, 91, 58, 118, 46, 47, 117, 49, 124, 125, 126, 127, 41, 45, - 42, 134, 46, 47, 43, 49, 44, 144, 60, 61, - 153, 155, 119, 62, 157, 46, 47, 48, 49, 66, - 50, 51, 78, 79, 80, 81, 152, 154, 118, 64, - 77, 46, 47, 48, 49, 165, 50, 51, 1, 2, - 93, 63, 67, 95, 3, 4, 5, 6, 7, 8, - 9, 10, 69, 73, 70, 11, 12, 13, 76, 71, - 72, 82, 14, 15, 78, 79, 80, 81, 83, 84, - 16, 85, 17, 86, 88, 18, 87, 94, 89, 90, - 103, 104, 100, 106, 113, 108, 96, 97, 98, 99, - 109, 111, 114, 116, 122, 112, 129, 123, 131, 75, - 145, 146, 143, 148, 149, 150, 158, 159, 164, 166, - 162, 167, 171, 168, 65, 170, 147, 161, 169, 132, - 156, 142 + 42, 134, 46, 47, 43, 49, 44, 146, 77, 80, + 81, 60, 156, 158, 119, 61, 160, 46, 47, 48, + 49, 66, 50, 51, 78, 79, 80, 81, 155, 157, + 118, 64, 62, 46, 47, 48, 49, 168, 50, 51, + 93, 63, 67, 95, 78, 79, 80, 81, 1, 2, + 69, 82, 70, 71, 3, 4, 5, 6, 7, 8, + 9, 10, 72, 73, 83, 11, 12, 13, 76, 84, + 85, 86, 14, 15, 88, 87, 89, 94, 90, 100, + 16, 103, 17, 106, 104, 18, 108, 109, 113, 116, + 111, 112, 114, 123, 129, 122, 96, 97, 98, 99, + 131, 145, 147, 75, 148, 152, 150, 151, 154, 161, + 165, 162, 167, 169, 173, 170, 65, 174, 171, 164, + 172, 149, 132, 159, 144 }; static const yytype_uint8 yycheck[] = { 4, 86, 102, 104, 19, 45, 46, 47, 48, 49, - 50, 57, 58, 19, 20, 53, 31, 20, 9, 104, - 51, 52, 53, 54, 25, 26, 27, 28, 8, 19, - 10, 116, 51, 52, 8, 54, 10, 122, 32, 34, - 141, 142, 143, 53, 144, 51, 52, 53, 54, 0, - 56, 57, 55, 56, 57, 58, 141, 142, 143, 40, - 21, 51, 52, 53, 54, 150, 56, 57, 5, 6, - 74, 53, 3, 77, 11, 12, 13, 14, 15, 16, - 17, 18, 53, 45, 53, 22, 23, 24, 50, 53, - 53, 34, 29, 30, 55, 56, 57, 58, 53, 53, - 37, 37, 39, 45, 19, 42, 41, 53, 38, 38, - 33, 35, 53, 53, 20, 54, 78, 79, 80, 81, - 53, 53, 21, 19, 45, 53, 21, 32, 19, 31, - 8, 19, 36, 20, 53, 21, 53, 51, 20, 20, - 43, 20, 53, 44, 18, 45, 129, 147, 165, 114, - 143, 119 + 50, 51, 52, 19, 20, 9, 31, 20, 55, 104, + 53, 54, 55, 56, 25, 26, 27, 28, 8, 19, + 10, 116, 53, 54, 8, 56, 10, 122, 21, 59, + 60, 32, 143, 144, 145, 34, 146, 53, 54, 55, + 56, 0, 58, 59, 57, 58, 59, 60, 143, 144, + 145, 40, 55, 53, 54, 55, 56, 152, 58, 59, + 74, 55, 3, 77, 57, 58, 59, 60, 5, 6, + 55, 34, 55, 55, 11, 12, 13, 14, 15, 16, + 17, 18, 55, 45, 55, 22, 23, 24, 50, 55, + 37, 45, 29, 30, 19, 41, 38, 55, 38, 55, + 37, 33, 39, 55, 35, 42, 56, 55, 20, 19, + 55, 55, 21, 32, 21, 45, 78, 79, 80, 81, + 19, 36, 8, 31, 19, 21, 20, 55, 51, 55, + 43, 53, 20, 20, 45, 20, 18, 55, 44, 149, + 168, 129, 114, 145, 119 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -824,38 +826,38 @@ static const yytype_uint8 yycheck[] = static const yytype_int8 yystos[] = { 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, - 18, 22, 23, 24, 29, 30, 37, 39, 42, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 79, 83, 84, 85, 86, 98, 99, - 100, 8, 10, 8, 10, 19, 51, 52, 53, 54, - 56, 57, 81, 87, 88, 89, 90, 87, 53, 9, - 32, 34, 53, 53, 40, 62, 0, 3, 101, 53, - 53, 53, 53, 88, 19, 31, 88, 21, 55, 56, - 57, 58, 34, 53, 53, 37, 45, 41, 19, 38, - 38, 20, 20, 87, 53, 87, 88, 88, 88, 88, - 53, 91, 92, 33, 35, 93, 53, 81, 54, 53, - 76, 53, 53, 20, 21, 93, 19, 53, 81, 90, - 94, 95, 45, 32, 25, 26, 27, 28, 78, 21, - 75, 19, 92, 97, 81, 45, 46, 47, 48, 49, - 50, 96, 96, 36, 81, 8, 19, 76, 20, 53, - 21, 80, 81, 90, 81, 90, 94, 93, 53, 51, - 77, 75, 43, 82, 20, 81, 20, 20, 44, 80, - 45, 53 + 18, 22, 23, 24, 29, 30, 37, 39, 42, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 81, 85, 86, 87, 88, 100, 101, + 102, 8, 10, 8, 10, 19, 53, 54, 55, 56, + 58, 59, 83, 89, 90, 91, 92, 89, 55, 9, + 32, 34, 55, 55, 40, 64, 0, 3, 103, 55, + 55, 55, 55, 90, 19, 31, 90, 21, 57, 58, + 59, 60, 34, 55, 55, 37, 45, 41, 19, 38, + 38, 20, 20, 89, 55, 89, 90, 90, 90, 90, + 55, 93, 94, 33, 35, 95, 55, 83, 56, 55, + 78, 55, 55, 20, 21, 95, 19, 55, 83, 92, + 96, 97, 45, 32, 25, 26, 27, 28, 80, 21, + 77, 19, 94, 99, 83, 45, 46, 47, 48, 49, + 50, 51, 52, 98, 98, 36, 83, 8, 19, 78, + 20, 55, 21, 82, 51, 83, 92, 83, 92, 96, + 95, 55, 53, 79, 77, 43, 84, 20, 83, 20, + 20, 44, 82, 45, 55 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 60, 61, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 75, 76, 76, 77, - 78, 78, 78, 78, 79, 80, 80, 81, 81, 81, - 82, 82, 83, 84, 85, 86, 87, 87, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 89, 89, - 90, 90, 91, 92, 92, 93, 93, 94, 94, 94, - 95, 95, 95, 95, 96, 96, 96, 96, 96, 96, - 97, 98, 99, 100, 101, 101 + 0, 62, 63, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 77, 78, 78, 79, + 80, 80, 80, 80, 81, 82, 82, 83, 83, 83, + 84, 84, 85, 86, 87, 88, 89, 89, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 91, 91, + 92, 92, 93, 94, 94, 95, 95, 96, 96, 96, + 97, 97, 97, 97, 98, 98, 98, 98, 98, 98, + 98, 98, 99, 100, 101, 102, 103, 103 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -870,7 +872,7 @@ static const yytype_int8 yyr2[] = 3, 3, 3, 2, 1, 1, 1, 1, 4, 3, 1, 3, 1, 1, 3, 0, 2, 0, 1, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, - 0, 7, 2, 4, 0, 1 + 1, 2, 0, 7, 2, 4, 0, 1 }; @@ -1732,93 +1734,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 191 "yacc_sql.y" +#line 193 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1741 "yacc_sql.cpp" +#line 1743 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 221 "yacc_sql.y" +#line 223 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1750 "yacc_sql.cpp" +#line 1752 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 227 "yacc_sql.y" +#line 229 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1758 "yacc_sql.cpp" +#line 1760 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 232 "yacc_sql.y" +#line 234 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1766 "yacc_sql.cpp" +#line 1768 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 238 "yacc_sql.y" +#line 240 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1774 "yacc_sql.cpp" +#line 1776 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 244 "yacc_sql.y" +#line 246 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1782 "yacc_sql.cpp" +#line 1784 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 250 "yacc_sql.y" +#line 252 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1790 "yacc_sql.cpp" +#line 1792 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 256 "yacc_sql.y" +#line 258 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1800 "yacc_sql.cpp" +#line 1802 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 263 "yacc_sql.y" +#line 265 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1808 "yacc_sql.cpp" +#line 1810 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 269 "yacc_sql.y" +#line 271 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1818 "yacc_sql.cpp" +#line 1820 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 278 "yacc_sql.y" +#line 280 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1829,11 +1831,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1833 "yacc_sql.cpp" +#line 1835 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 292 "yacc_sql.y" +#line 294 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1841,11 +1843,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1845 "yacc_sql.cpp" +#line 1847 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 302 "yacc_sql.y" +#line 304 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1866,19 +1868,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1870 "yacc_sql.cpp" +#line 1872 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 325 "yacc_sql.y" +#line 327 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1878 "yacc_sql.cpp" +#line 1880 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 329 "yacc_sql.y" +#line 331 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1888,11 +1890,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1892 "yacc_sql.cpp" +#line 1894 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE */ -#line 342 "yacc_sql.y" +#line 344 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-3].number); @@ -1900,11 +1902,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = (yyvsp[-1].number); free((yyvsp[-4].string)); } -#line 1904 "yacc_sql.cpp" +#line 1906 "yacc_sql.cpp" break; case 38: /* attr_def: ID type */ -#line 350 "yacc_sql.y" +#line 352 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[0].number); @@ -1912,41 +1914,41 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; free((yyvsp[-1].string)); } -#line 1916 "yacc_sql.cpp" +#line 1918 "yacc_sql.cpp" break; case 39: /* number: NUMBER */ -#line 359 "yacc_sql.y" +#line 361 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1922 "yacc_sql.cpp" +#line 1924 "yacc_sql.cpp" break; case 40: /* type: INT_T */ -#line 362 "yacc_sql.y" +#line 364 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1928 "yacc_sql.cpp" +#line 1930 "yacc_sql.cpp" break; case 41: /* type: STRING_T */ -#line 363 "yacc_sql.y" +#line 365 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1934 "yacc_sql.cpp" +#line 1936 "yacc_sql.cpp" break; case 42: /* type: FLOAT_T */ -#line 364 "yacc_sql.y" +#line 366 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1940 "yacc_sql.cpp" +#line 1942 "yacc_sql.cpp" break; case 43: /* type: DATE_T */ -#line 365 "yacc_sql.y" +#line 367 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1946 "yacc_sql.cpp" +#line 1948 "yacc_sql.cpp" break; case 44: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 369 "yacc_sql.y" +#line 371 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1959,19 +1961,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1963 "yacc_sql.cpp" +#line 1965 "yacc_sql.cpp" break; case 45: /* value_list: %empty */ -#line 385 "yacc_sql.y" +#line 387 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 1971 "yacc_sql.cpp" +#line 1973 "yacc_sql.cpp" break; case 46: /* value_list: COMMA value value_list */ -#line 388 "yacc_sql.y" +#line 390 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -1981,56 +1983,56 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1985 "yacc_sql.cpp" +#line 1987 "yacc_sql.cpp" break; case 47: /* value: NUMBER */ -#line 399 "yacc_sql.y" +#line 401 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 1994 "yacc_sql.cpp" +#line 1996 "yacc_sql.cpp" break; case 48: /* value: FLOAT */ -#line 403 "yacc_sql.y" +#line 405 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2003 "yacc_sql.cpp" +#line 2005 "yacc_sql.cpp" break; case 49: /* value: SSS */ -#line 407 "yacc_sql.y" +#line 409 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2014 "yacc_sql.cpp" +#line 2016 "yacc_sql.cpp" break; case 50: /* storage_format: %empty */ -#line 416 "yacc_sql.y" +#line 418 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2022 "yacc_sql.cpp" +#line 2024 "yacc_sql.cpp" break; case 51: /* storage_format: STORAGE FORMAT EQ ID */ -#line 420 "yacc_sql.y" +#line 422 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2030 "yacc_sql.cpp" +#line 2032 "yacc_sql.cpp" break; case 52: /* delete_stmt: DELETE FROM ID where */ -#line 427 "yacc_sql.y" +#line 429 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2040,11 +2042,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2044 "yacc_sql.cpp" +#line 2046 "yacc_sql.cpp" break; case 53: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 439 "yacc_sql.y" +#line 441 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2057,11 +2059,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2061 "yacc_sql.cpp" +#line 2063 "yacc_sql.cpp" break; case 54: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 454 "yacc_sql.y" +#line 456 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2084,30 +2086,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2088 "yacc_sql.cpp" +#line 2090 "yacc_sql.cpp" break; case 55: /* calc_stmt: CALC expression_list */ -#line 479 "yacc_sql.y" +#line 481 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2098 "yacc_sql.cpp" +#line 2100 "yacc_sql.cpp" break; case 56: /* expression_list: expression */ -#line 488 "yacc_sql.y" +#line 490 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2107 "yacc_sql.cpp" +#line 2109 "yacc_sql.cpp" break; case 57: /* expression_list: expression COMMA expression_list */ -#line 493 "yacc_sql.y" +#line 495 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2116,97 +2118,97 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2120 "yacc_sql.cpp" +#line 2122 "yacc_sql.cpp" break; case 58: /* expression: expression '+' expression */ -#line 503 "yacc_sql.y" +#line 505 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2128 "yacc_sql.cpp" +#line 2130 "yacc_sql.cpp" break; case 59: /* expression: expression '-' expression */ -#line 506 "yacc_sql.y" +#line 508 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2136 "yacc_sql.cpp" +#line 2138 "yacc_sql.cpp" break; case 60: /* expression: expression '*' expression */ -#line 509 "yacc_sql.y" +#line 511 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2144 "yacc_sql.cpp" +#line 2146 "yacc_sql.cpp" break; case 61: /* expression: expression '/' expression */ -#line 512 "yacc_sql.y" +#line 514 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2152 "yacc_sql.cpp" +#line 2154 "yacc_sql.cpp" break; case 62: /* expression: LBRACE expression RBRACE */ -#line 515 "yacc_sql.y" +#line 517 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2161 "yacc_sql.cpp" +#line 2163 "yacc_sql.cpp" break; case 63: /* expression: '-' expression */ -#line 519 "yacc_sql.y" +#line 521 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2169 "yacc_sql.cpp" +#line 2171 "yacc_sql.cpp" break; case 64: /* expression: value */ -#line 522 "yacc_sql.y" +#line 524 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2179 "yacc_sql.cpp" +#line 2181 "yacc_sql.cpp" break; case 65: /* expression: rel_attr */ -#line 527 "yacc_sql.y" +#line 529 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2190 "yacc_sql.cpp" +#line 2192 "yacc_sql.cpp" break; case 66: /* expression: '*' */ -#line 533 "yacc_sql.y" +#line 535 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2198 "yacc_sql.cpp" +#line 2200 "yacc_sql.cpp" break; case 67: /* expression: aggr_func_expr */ -#line 536 "yacc_sql.y" +#line 538 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2206 "yacc_sql.cpp" +#line 2208 "yacc_sql.cpp" break; case 68: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 543 "yacc_sql.y" +#line 545 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2214,29 +2216,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2218 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; case 69: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 551 "yacc_sql.y" +#line 553 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2226 "yacc_sql.cpp" +#line 2228 "yacc_sql.cpp" break; case 70: /* rel_attr: ID */ -#line 556 "yacc_sql.y" +#line 558 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2236 "yacc_sql.cpp" +#line 2238 "yacc_sql.cpp" break; case 71: /* rel_attr: ID DOT ID */ -#line 561 "yacc_sql.y" +#line 563 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2244,29 +2246,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2248 "yacc_sql.cpp" +#line 2250 "yacc_sql.cpp" break; case 72: /* relation: ID */ -#line 571 "yacc_sql.y" +#line 573 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2256 "yacc_sql.cpp" +#line 2258 "yacc_sql.cpp" break; case 73: /* rel_list: relation */ -#line 576 "yacc_sql.y" +#line 578 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2266 "yacc_sql.cpp" +#line 2268 "yacc_sql.cpp" break; case 74: /* rel_list: relation COMMA rel_list */ -#line 581 "yacc_sql.y" +#line 583 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2277,55 +2279,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2281 "yacc_sql.cpp" +#line 2283 "yacc_sql.cpp" break; case 75: /* where: %empty */ -#line 595 "yacc_sql.y" +#line 597 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2289 "yacc_sql.cpp" +#line 2291 "yacc_sql.cpp" break; case 76: /* where: WHERE condition_list */ -#line 598 "yacc_sql.y" +#line 600 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2297 "yacc_sql.cpp" +#line 2299 "yacc_sql.cpp" break; case 77: /* condition_list: %empty */ -#line 604 "yacc_sql.y" +#line 606 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2305 "yacc_sql.cpp" +#line 2307 "yacc_sql.cpp" break; case 78: /* condition_list: condition */ -#line 607 "yacc_sql.y" +#line 609 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2315 "yacc_sql.cpp" +#line 2317 "yacc_sql.cpp" break; case 79: /* condition_list: condition AND condition_list */ -#line 612 "yacc_sql.y" +#line 614 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2325 "yacc_sql.cpp" +#line 2327 "yacc_sql.cpp" break; case 80: /* condition: rel_attr comp_op value */ -#line 620 "yacc_sql.y" +#line 622 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2337,11 +2339,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2341 "yacc_sql.cpp" +#line 2343 "yacc_sql.cpp" break; case 81: /* condition: value comp_op value */ -#line 632 "yacc_sql.y" +#line 634 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2353,11 +2355,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2357 "yacc_sql.cpp" +#line 2359 "yacc_sql.cpp" break; case 82: /* condition: rel_attr comp_op rel_attr */ -#line 644 "yacc_sql.y" +#line 646 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2369,11 +2371,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2373 "yacc_sql.cpp" +#line 2375 "yacc_sql.cpp" break; case 83: /* condition: value comp_op rel_attr */ -#line 656 "yacc_sql.y" +#line 658 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2385,55 +2387,67 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2389 "yacc_sql.cpp" +#line 2391 "yacc_sql.cpp" break; case 84: /* comp_op: EQ */ -#line 670 "yacc_sql.y" +#line 672 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2395 "yacc_sql.cpp" +#line 2397 "yacc_sql.cpp" break; case 85: /* comp_op: LT */ -#line 671 "yacc_sql.y" +#line 673 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2401 "yacc_sql.cpp" +#line 2403 "yacc_sql.cpp" break; case 86: /* comp_op: GT */ -#line 672 "yacc_sql.y" +#line 674 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2407 "yacc_sql.cpp" +#line 2409 "yacc_sql.cpp" break; case 87: /* comp_op: LE */ -#line 673 "yacc_sql.y" +#line 675 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2413 "yacc_sql.cpp" +#line 2415 "yacc_sql.cpp" break; case 88: /* comp_op: GE */ -#line 674 "yacc_sql.y" +#line 676 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2419 "yacc_sql.cpp" +#line 2421 "yacc_sql.cpp" break; case 89: /* comp_op: NE */ -#line 675 "yacc_sql.y" +#line 677 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2425 "yacc_sql.cpp" +#line 2427 "yacc_sql.cpp" + break; + + case 90: /* comp_op: LIKE */ +#line 678 "yacc_sql.y" + { (yyval.comp) = LIKE_OP;} +#line 2433 "yacc_sql.cpp" break; - case 90: /* group_by: %empty */ -#line 681 "yacc_sql.y" + case 91: /* comp_op: NOT LIKE */ +#line 679 "yacc_sql.y" + {(yyval.comp) = NOT_LIKE_OP;} +#line 2439 "yacc_sql.cpp" + break; + + case 92: /* group_by: %empty */ +#line 685 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2433 "yacc_sql.cpp" +#line 2447 "yacc_sql.cpp" break; - case 91: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 687 "yacc_sql.y" + case 93: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 691 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2443,20 +2457,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2447 "yacc_sql.cpp" +#line 2461 "yacc_sql.cpp" break; - case 92: /* explain_stmt: EXPLAIN command_wrapper */ -#line 700 "yacc_sql.y" + case 94: /* explain_stmt: EXPLAIN command_wrapper */ +#line 704 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2456 "yacc_sql.cpp" +#line 2470 "yacc_sql.cpp" break; - case 93: /* set_variable_stmt: SET ID EQ value */ -#line 708 "yacc_sql.y" + case 95: /* set_variable_stmt: SET ID EQ value */ +#line 712 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2464,11 +2478,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2468 "yacc_sql.cpp" +#line 2482 "yacc_sql.cpp" break; -#line 2472 "yacc_sql.cpp" +#line 2486 "yacc_sql.cpp" default: break; } @@ -2697,7 +2711,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 720 "yacc_sql.y" +#line 724 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 53b61172..0d328b05 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -102,11 +102,13 @@ extern int yydebug; LE = 303, /* LE */ GE = 304, /* GE */ NE = 305, /* NE */ - NUMBER = 306, /* NUMBER */ - FLOAT = 307, /* FLOAT */ - ID = 308, /* ID */ - SSS = 309, /* SSS */ - UMINUS = 310 /* UMINUS */ + LIKE = 306, /* LIKE */ + NOT = 307, /* NOT */ + NUMBER = 308, /* NUMBER */ + FLOAT = 309, /* FLOAT */ + ID = 310, /* ID */ + SSS = 311, /* SSS */ + UMINUS = 312 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -115,7 +117,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 117 "yacc_sql.y" +#line 119 "yacc_sql.y" ParsedSqlNode * sql_node; ConditionSqlNode * condition; @@ -134,7 +136,7 @@ union YYSTYPE int number; float floats; -#line 138 "yacc_sql.hpp" +#line 140 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 9ac1148e..824e2890 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -112,6 +112,8 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, LE GE NE + LIKE + NOT /** union 中定义各种数据类型,真实生成的代码也是union类型,所以不能有非POD类型的数据 **/ %union { @@ -673,6 +675,8 @@ comp_op: | LE { $$ = LESS_EQUAL; } | GE { $$ = GREAT_EQUAL; } | NE { $$ = NOT_EQUAL; } + | LIKE { $$ = LIKE_OP;} + | NOT LIKE {$$ = NOT_LIKE_OP;} ; // your code here From 7b1e7352e42b90f69c9a4e7c8b78b6b196abc1ca Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 16:59:48 +0800 Subject: [PATCH 025/308] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=BA=20NOT=20NULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/yacc_sql.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index bdd36d03..5c0c1c38 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -387,7 +387,7 @@ nullable_constraint: } | /* empty */ { - $$ = true; // 默认情况为 NOT NULL + $$ = false; // 默认情况为 NOT NULL } ; From 918a2b8ab01d7d161af62ce9550cdb675bf8fc82 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 17:16:11 +0800 Subject: [PATCH 026/308] update yacc --- src/observer/sql/parser/yacc_sql.cpp | 2 +- src/observer/storage/field/field_meta.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 427fa832..7126a12d 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -1953,7 +1953,7 @@ YYLTYPE yylloc = yyloc_default; case 41: /* nullable_constraint: %empty */ #line 389 "yacc_sql.y" { - (yyval.nullable_info) = true; // 默认情况为 NOT NULL + (yyval.nullable_info) = false; // 默认情况为 NOT NULL } #line 1959 "yacc_sql.cpp" break; diff --git a/src/observer/storage/field/field_meta.cpp b/src/observer/storage/field/field_meta.cpp index 93375119..a17fc4cd 100644 --- a/src/observer/storage/field/field_meta.cpp +++ b/src/observer/storage/field/field_meta.cpp @@ -77,7 +77,7 @@ bool FieldMeta::nullable() const { return nullable_; } void FieldMeta::desc(std::ostream &os) const { os << "field name=" << name_ << ", type=" << attr_type_to_string(attr_type_) << ", len=" << attr_len_ - << ", visible=" << (visible_ ? "yes" : "no"); + << ", visible=" << (visible_ ? "yes" : "no") << ", nullable=" << (nullable_ ? "yes" : "no"); } void FieldMeta::to_json(Json::Value &json_value) const From 96b20524f4dfc79099186936626e36781d1a4c5b Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 17:35:36 +0800 Subject: [PATCH 027/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8DIS=20NULL=E6=A0=87?= =?UTF-8?q?=E8=AE=B0=E9=A1=BA=E5=BA=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/tuple.h | 4 +++- src/observer/storage/table/table.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index 1f0cae4a..3c02ddbd 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -198,7 +198,9 @@ class RowTuple : public Tuple const FieldMeta *field_meta = field_expr->field().meta(); cell.set_type(field_meta->type()); if (field_meta->nullable()) { - bool is_null = this->record_->data()[field_meta->offset() + field_meta->len() - 1] == 1; + auto null_flag = this->record_->data()[field_meta->offset() + field_meta->len() - 1]; + ASSERT(null_flag == 0 || null_flag == 1, "error null flag value"); + bool is_null = null_flag == 1; cell.set_data(this->record_->data() + field_meta->offset(), field_meta->len() - 1); cell.set_null(is_null); } else { diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 9af4bd94..8d053dad 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -308,12 +308,6 @@ RC Table::make_record(int value_num, const Value *values, Record &record) for (int i = 0; i < value_num && OB_SUCC(rc); i++) { const FieldMeta *field = table_meta_.field(i + normal_field_start_index); const Value &value = values[i]; - if (value.is_null()) { - if (!field->nullable()) { - return RC::NOT_NULLABLE_VALUE; - } - record_data[field->offset() + field->len() - 1] = 1; - } if (field->type() != value.attr_type()) { Value real_value; rc = Value::cast_to(value, field->type(), real_value); @@ -326,6 +320,12 @@ RC Table::make_record(int value_num, const Value *values, Record &record) } else { rc = set_value_to_record(record_data, value, field); } + + // 判断是否在 NOT NULL 字段设置 NULL 值 + if (value.is_null() && !field->nullable()) { + return RC::NOT_NULLABLE_VALUE; + } + record_data[field->offset() + field->len() - 1] = value.is_null(); } if (OB_FAIL(rc)) { LOG_WARN("failed to make record. table name:%s", table_meta_.name()); From 6227bf75b4c72232f0aaafecd3a867beca7533e7 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 17:43:52 +0800 Subject: [PATCH 028/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8DIS=20NULL=E6=A0=87?= =?UTF-8?q?=E8=AE=B0=E9=A1=BA=E5=BA=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/table/table.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 8d053dad..566e2757 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -322,10 +322,12 @@ RC Table::make_record(int value_num, const Value *values, Record &record) } // 判断是否在 NOT NULL 字段设置 NULL 值 - if (value.is_null() && !field->nullable()) { - return RC::NOT_NULLABLE_VALUE; + if (value.is_null()) { + if (!field->nullable()) { + return RC::NOT_NULLABLE_VALUE; + } + record_data[field->offset() + field->len() - 1] = 1; } - record_data[field->offset() + field->len() - 1] = value.is_null(); } if (OB_FAIL(rc)) { LOG_WARN("failed to make record. table name:%s", table_meta_.name()); From 7665e95534922a3b0551fe1382235b746b463570 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 18:09:39 +0800 Subject: [PATCH 029/308] =?UTF-8?q?=E5=AE=8C=E6=88=90IS=20NULL=E7=9A=84?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.cpp | 2 +- src/observer/common/type/attr_type.h | 14 +- src/observer/common/type/null_type.cpp | 8 +- src/observer/common/type/null_type.h | 2 +- src/observer/common/value.cpp | 2 +- .../sql/optimizer/logical_plan_generator.cpp | 1 + src/observer/sql/parser/lex_sql.cpp | 433 ++++++------ src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/lex_sql.l | 4 +- src/observer/sql/parser/parse_defs.h | 1 + src/observer/sql/parser/yacc_sql.cpp | 641 +++++++++--------- src/observer/sql/parser/yacc_sql.hpp | 15 +- src/observer/sql/parser/yacc_sql.y | 2 + 13 files changed, 573 insertions(+), 554 deletions(-) diff --git a/src/observer/common/type/attr_type.cpp b/src/observer/common/type/attr_type.cpp index 52398413..9870534a 100644 --- a/src/observer/common/type/attr_type.cpp +++ b/src/observer/common/type/attr_type.cpp @@ -12,7 +12,7 @@ See the Mulan PSL v2 for more details. */ #include "common/lang/string.h" #include "common/type/attr_type.h" -const char *ATTR_TYPE_NAME[] = {"undefined", "chars", "ints", "floats", "booleans", "dates"}; +const char *ATTR_TYPE_NAME[] = {"undefined", "chars", "ints", "floats", "booleans", "dates", "nulls"}; const char *attr_type_to_string(AttrType type) { diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index 79a52edf..85aff6da 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -17,13 +17,13 @@ See the Mulan PSL v2 for more details. */ enum class AttrType { UNDEFINED, - CHARS, ///< 字符串类型 - INTS, ///< 整数类型(4字节) - FLOATS, ///< 浮点数类型(4字节) - BOOLEANS, ///< boolean类型,当前不是由parser解析出来的,是程序内部使用的 - DATES, ///< 日期类型(4字节) - NO_TYPE_NULLS, ///< 空字段(1字节) - MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 + CHARS, ///< 字符串类型 + INTS, ///< 整数类型(4字节) + FLOATS, ///< 浮点数类型(4字节) + BOOLEANS, ///< boolean类型,当前不是由parser解析出来的,是程序内部使用的 + DATES, ///< 日期类型(4字节) + NULLS, ///< 空字段 + MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; const char *attr_type_to_string(AttrType type); diff --git a/src/observer/common/type/null_type.cpp b/src/observer/common/type/null_type.cpp index 745b4881..3e762974 100644 --- a/src/observer/common/type/null_type.cpp +++ b/src/observer/common/type/null_type.cpp @@ -16,9 +16,9 @@ See the Mulan PSL v2 for more details. */ int NullType::compare(const Value &left, const Value &right) const { - ASSERT(left.attr_type() == AttrType::NO_TYPE_NULLS, "left type is not a null"); - ASSERT(right.attr_type() == AttrType::NO_TYPE_NULLS, "right type is not a null"); - if (right.attr_type() == AttrType::NO_TYPE_NULLS) { + ASSERT(left.attr_type() == AttrType::NULLS, "left type is not a null"); + ASSERT(right.attr_type() == AttrType::NULLS, "right type is not a null"); + if (right.attr_type() == AttrType::NULLS) { return 0; } return INT32_MAX; @@ -32,7 +32,7 @@ RC NullType::to_string(const Value &val, string &result) const RC NullType::cast_to(const Value &val, AttrType type, Value &result) const { - ASSERT(val.attr_type() == AttrType::NO_TYPE_NULLS, "val type is not a null"); + ASSERT(val.attr_type() == AttrType::NULLS, "val type is not a null"); result.set_type(type); result.set_null(); return RC::SUCCESS; diff --git a/src/observer/common/type/null_type.h b/src/observer/common/type/null_type.h index 89cb837b..f2c7901c 100644 --- a/src/observer/common/type/null_type.h +++ b/src/observer/common/type/null_type.h @@ -15,7 +15,7 @@ See the Mulan PSL v2 for more details. */ class NullType : public DataType { public: - NullType() : DataType(AttrType::NO_TYPE_NULLS) {} + NullType() : DataType(AttrType::NULLS) {} ~NullType() override {} diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 4d470556..93ab0bd1 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -20,7 +20,7 @@ See the Mulan PSL v2 for more details. */ #include "common/lang/string.h" #include "common/log/log.h" -Value::Value(NullValue) : attr_type_(AttrType::NO_TYPE_NULLS) { +Value::Value(NullValue) : attr_type_(AttrType::NULLS) { set_null(); } diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index aed7b2e8..7d3f5341 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -173,6 +173,7 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptr(new FieldExpr(filter_obj_right.field)) : static_cast(new ValueExpr(filter_obj_right.value))); + // TODO: cast NULL with others. if (left->value_type() != right->value_type()) { auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index a79330f6..2cd856d4 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -386,8 +386,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 65 -#define YY_END_OF_BUFFER 66 +#define YY_NUM_RULES 66 +#define YY_END_OF_BUFFER 67 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -395,29 +395,29 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[194] = +static const flex_int16_t yy_accept[195] = { 0, - 0, 0, 0, 0, 66, 64, 1, 2, 64, 64, - 64, 48, 49, 60, 58, 50, 59, 6, 61, 3, - 5, 55, 51, 57, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 65, 54, 0, 62, 0, 63, 3, - 0, 52, 53, 56, 47, 47, 47, 47, 44, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 15, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 4, 22, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - - 47, 47, 47, 47, 47, 47, 47, 32, 47, 36, - 47, 47, 47, 28, 47, 47, 47, 47, 47, 47, - 47, 47, 19, 33, 47, 47, 40, 35, 47, 9, - 11, 7, 47, 47, 47, 20, 47, 8, 47, 47, - 47, 24, 39, 37, 47, 47, 16, 47, 17, 47, - 47, 47, 47, 29, 47, 47, 47, 47, 34, 47, - 43, 14, 47, 47, 47, 47, 47, 47, 12, 47, - 47, 21, 30, 10, 26, 47, 46, 41, 23, 47, - 47, 18, 47, 13, 27, 25, 42, 47, 47, 45, - 38, 31, 0 + 0, 0, 0, 0, 67, 65, 1, 2, 65, 65, + 65, 47, 48, 61, 59, 49, 60, 6, 62, 3, + 5, 54, 50, 56, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 66, 53, 0, 63, 0, 64, 3, + 0, 51, 52, 55, 58, 58, 58, 58, 44, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 57, 58, 58, 58, 15, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 4, 22, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + + 58, 58, 58, 58, 58, 58, 58, 58, 32, 58, + 36, 58, 58, 58, 28, 58, 58, 58, 58, 58, + 58, 58, 58, 19, 33, 58, 58, 40, 35, 58, + 9, 11, 7, 58, 58, 58, 20, 58, 8, 58, + 58, 58, 24, 39, 37, 58, 58, 16, 58, 17, + 58, 58, 58, 58, 29, 58, 58, 58, 58, 34, + 58, 43, 14, 58, 58, 58, 58, 58, 58, 12, + 58, 58, 21, 30, 10, 26, 58, 46, 41, 23, + 58, 58, 18, 58, 13, 27, 25, 42, 58, 58, + 45, 38, 31, 0 } ; @@ -464,59 +464,59 @@ static const YY_CHAR yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[199] = +static const flex_int16_t yy_base[200] = { 0, - 0, 0, 0, 0, 515, 516, 516, 516, 496, 508, - 506, 516, 516, 516, 516, 516, 496, 516, 516, 54, - 516, 52, 516, 492, 53, 57, 60, 59, 70, 91, - 61, 67, 75, 494, 87, 95, 83, 98, 113, 118, - 111, 121, 115, 516, 516, 503, 516, 501, 516, 86, - 484, 516, 516, 516, 0, 483, 144, 128, 481, 132, - 138, 145, 156, 134, 153, 155, 166, 158, 160, 168, - 172, 178, 205, 183, 161, 190, 480, 195, 202, 182, - 216, 208, 193, 222, 220, 231, 479, 478, 219, 238, - 221, 243, 247, 257, 244, 261, 255, 270, 263, 267, - - 271, 274, 273, 280, 285, 282, 299, 284, 281, 476, - 301, 305, 306, 475, 278, 307, 322, 309, 330, 310, - 312, 324, 473, 472, 336, 331, 470, 469, 337, 468, - 467, 466, 338, 341, 345, 463, 346, 460, 352, 347, - 355, 458, 457, 375, 362, 378, 453, 388, 447, 361, - 372, 381, 382, 445, 384, 396, 401, 398, 427, 397, - 371, 369, 403, 400, 419, 408, 416, 421, 406, 422, - 426, 358, 287, 246, 233, 424, 196, 173, 170, 438, - 433, 109, 441, 99, 78, 77, 74, 452, 444, 73, - 69, 63, 516, 500, 502, 504, 75, 71 + 0, 0, 0, 0, 518, 519, 519, 519, 499, 511, + 509, 519, 519, 519, 519, 519, 499, 519, 519, 54, + 519, 52, 519, 488, 53, 57, 60, 59, 70, 91, + 61, 67, 77, 489, 74, 87, 83, 98, 114, 127, + 119, 138, 109, 519, 519, 498, 519, 496, 519, 75, + 485, 519, 519, 519, 0, 484, 136, 141, 483, 115, + 146, 149, 148, 155, 158, 153, 170, 163, 164, 169, + 173, 161, 194, 482, 191, 186, 171, 480, 198, 206, + 193, 199, 224, 219, 223, 227, 221, 479, 477, 233, + 244, 236, 247, 248, 262, 250, 261, 238, 256, 260, + + 269, 272, 273, 282, 284, 285, 288, 300, 278, 303, + 475, 305, 307, 308, 472, 293, 310, 330, 316, 334, + 324, 315, 338, 471, 470, 340, 322, 465, 464, 326, + 462, 461, 460, 347, 328, 357, 449, 350, 437, 358, + 364, 360, 423, 409, 373, 369, 382, 390, 383, 367, + 387, 384, 391, 392, 366, 394, 405, 406, 397, 365, + 395, 343, 314, 419, 398, 416, 426, 427, 432, 411, + 436, 429, 296, 286, 263, 234, 435, 184, 179, 159, + 442, 447, 128, 457, 125, 113, 86, 84, 459, 448, + 78, 69, 63, 519, 507, 509, 511, 75, 71 } ; -static const flex_int16_t yy_def[199] = +static const flex_int16_t yy_def[200] = { 0, - 193, 1, 194, 194, 193, 193, 193, 193, 193, 195, - 196, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 193, 193, 195, 193, 196, 193, 193, - 193, 193, 193, 193, 198, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 193, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 0, 193, 193, 193, 193, 193 + 194, 1, 195, 195, 194, 194, 194, 194, 194, 196, + 197, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 194, 194, 196, 194, 197, 194, 194, + 194, 194, 194, 194, 199, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 194, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 0, 194, 194, 194, 194, 194 } ; -static const flex_int16_t yy_nxt[583] = +static const flex_int16_t yy_nxt[586] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -526,65 +526,65 @@ static const flex_int16_t yy_nxt[583] = 32, 33, 34, 35, 34, 36, 37, 34, 38, 39, 40, 41, 42, 43, 34, 34, 51, 55, 50, 52, 53, 55, 55, 55, 55, 55, 56, 55, 64, 60, - 58, 55, 65, 55, 55, 57, 61, 55, 55, 55, - 72, 55, 55, 62, 66, 63, 71, 55, 51, 59, - - 50, 55, 64, 60, 58, 55, 65, 73, 57, 55, - 61, 67, 55, 55, 72, 77, 62, 66, 63, 71, - 74, 68, 59, 55, 69, 55, 70, 55, 75, 55, - 73, 78, 55, 76, 67, 55, 79, 83, 77, 80, - 85, 86, 55, 74, 68, 84, 55, 69, 55, 70, - 81, 75, 55, 89, 78, 82, 76, 91, 55, 55, - 79, 83, 90, 80, 85, 86, 88, 55, 84, 55, - 55, 94, 55, 81, 55, 55, 92, 89, 82, 93, - 55, 91, 55, 95, 55, 90, 55, 55, 97, 96, - 88, 100, 55, 98, 94, 101, 55, 55, 110, 92, - - 99, 102, 109, 93, 55, 103, 95, 55, 104, 55, - 55, 97, 96, 118, 100, 115, 55, 98, 101, 55, - 111, 110, 55, 99, 102, 112, 109, 105, 103, 106, - 55, 104, 113, 55, 55, 55, 55, 118, 115, 114, - 117, 107, 108, 111, 119, 55, 122, 55, 112, 116, - 120, 105, 55, 106, 121, 113, 124, 55, 55, 123, - 55, 55, 114, 117, 107, 108, 126, 129, 119, 55, - 122, 55, 116, 120, 125, 55, 127, 55, 121, 124, - 128, 55, 130, 123, 55, 55, 134, 55, 55, 131, - 126, 129, 55, 133, 55, 55, 55, 125, 55, 55, - - 127, 55, 135, 143, 128, 136, 130, 132, 139, 140, - 134, 137, 131, 55, 138, 55, 133, 142, 147, 55, - 55, 55, 141, 55, 55, 135, 55, 143, 136, 146, - 132, 144, 139, 140, 137, 145, 55, 138, 55, 150, - 142, 147, 148, 149, 55, 55, 141, 153, 152, 151, - 55, 55, 55, 146, 144, 55, 154, 158, 145, 55, - 55, 55, 150, 155, 160, 148, 55, 149, 156, 55, - 153, 152, 55, 151, 157, 55, 55, 163, 159, 154, - 161, 158, 166, 55, 169, 55, 55, 155, 160, 55, - 164, 156, 55, 162, 165, 55, 55, 157, 55, 167, - - 163, 159, 55, 161, 171, 172, 166, 168, 169, 170, - 55, 55, 55, 164, 55, 55, 162, 55, 165, 174, - 55, 173, 55, 167, 175, 176, 178, 181, 171, 172, - 55, 168, 170, 55, 177, 55, 55, 179, 55, 180, - 55, 55, 184, 174, 173, 185, 183, 55, 175, 176, - 178, 181, 55, 182, 189, 55, 187, 177, 55, 55, - 179, 55, 186, 180, 190, 184, 55, 55, 188, 185, - 183, 55, 55, 192, 55, 191, 182, 55, 189, 187, - 55, 55, 55, 55, 55, 186, 55, 55, 190, 55, - 55, 188, 55, 87, 55, 55, 192, 55, 87, 191, - - 44, 44, 46, 46, 48, 48, 49, 47, 55, 54, - 50, 49, 47, 45, 193, 5, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193 + 58, 55, 65, 55, 55, 57, 61, 51, 55, 50, + 72, 55, 55, 62, 66, 63, 71, 55, 55, 59, + + 55, 55, 64, 60, 58, 55, 65, 75, 57, 73, + 61, 67, 55, 74, 72, 78, 62, 66, 63, 71, + 76, 68, 59, 55, 69, 77, 70, 55, 55, 55, + 75, 79, 73, 55, 67, 87, 74, 80, 78, 55, + 81, 55, 55, 76, 68, 91, 84, 69, 77, 70, + 55, 82, 55, 85, 79, 55, 83, 86, 89, 87, + 55, 80, 55, 55, 81, 92, 90, 55, 91, 55, + 84, 94, 55, 55, 82, 55, 85, 55, 55, 83, + 93, 86, 89, 55, 55, 55, 98, 55, 96, 92, + 90, 105, 95, 55, 97, 94, 101, 99, 55, 102, + + 55, 112, 103, 93, 100, 55, 104, 55, 55, 98, + 110, 96, 55, 55, 105, 95, 106, 97, 107, 101, + 55, 99, 102, 111, 112, 103, 116, 100, 113, 104, + 108, 109, 117, 55, 110, 55, 114, 55, 55, 119, + 106, 55, 107, 115, 122, 120, 111, 55, 55, 116, + 55, 113, 55, 108, 109, 117, 118, 121, 55, 114, + 123, 55, 55, 119, 55, 124, 115, 127, 122, 120, + 55, 125, 132, 130, 55, 55, 55, 55, 126, 118, + 121, 128, 131, 55, 123, 129, 55, 55, 135, 124, + 134, 127, 55, 133, 125, 132, 55, 130, 55, 55, + + 55, 126, 55, 136, 137, 128, 131, 55, 140, 129, + 55, 143, 135, 134, 55, 141, 133, 55, 139, 55, + 138, 55, 55, 142, 55, 144, 136, 137, 55, 55, + 55, 147, 140, 148, 143, 145, 55, 146, 55, 141, + 55, 139, 55, 138, 55, 149, 151, 142, 55, 144, + 154, 150, 55, 152, 55, 147, 148, 55, 145, 157, + 146, 55, 153, 158, 55, 160, 159, 156, 149, 151, + 155, 55, 55, 154, 55, 150, 161, 152, 55, 55, + 55, 55, 157, 55, 162, 153, 158, 55, 160, 167, + 159, 156, 166, 155, 164, 165, 55, 55, 55, 163, + + 161, 55, 169, 168, 55, 55, 55, 162, 55, 55, + 170, 55, 55, 167, 172, 173, 166, 164, 165, 55, + 55, 171, 163, 55, 177, 55, 169, 168, 175, 176, + 55, 174, 178, 55, 170, 180, 181, 55, 172, 173, + 55, 55, 179, 55, 171, 182, 55, 185, 177, 55, + 55, 55, 175, 176, 174, 178, 55, 184, 180, 186, + 181, 55, 55, 55, 183, 187, 179, 188, 190, 182, + 185, 55, 189, 55, 55, 55, 55, 193, 55, 55, + 191, 184, 192, 186, 55, 55, 55, 183, 187, 55, + 188, 55, 190, 88, 55, 189, 55, 55, 55, 88, + + 193, 49, 47, 55, 191, 54, 192, 44, 44, 46, + 46, 48, 48, 50, 49, 47, 45, 194, 5, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194 } ; -static const flex_int16_t yy_chk[583] = +static const flex_int16_t yy_chk[586] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -593,63 +593,63 @@ static const flex_int16_t yy_chk[583] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 198, 28, 27, 31, 197, 192, 28, 27, - 26, 32, 28, 191, 29, 25, 27, 190, 187, 33, - 32, 186, 185, 27, 28, 27, 31, 37, 50, 26, - - 50, 35, 28, 27, 26, 30, 28, 33, 25, 36, - 27, 29, 38, 184, 32, 37, 27, 28, 27, 31, - 35, 30, 26, 182, 30, 41, 30, 39, 36, 43, - 33, 38, 40, 36, 29, 42, 39, 40, 37, 39, - 42, 43, 58, 35, 30, 41, 60, 30, 64, 30, - 39, 36, 61, 58, 38, 39, 36, 61, 57, 62, - 39, 40, 60, 39, 42, 43, 57, 65, 41, 66, - 63, 64, 68, 39, 69, 75, 62, 58, 39, 63, - 67, 61, 70, 65, 179, 60, 71, 178, 66, 65, - 57, 68, 72, 67, 64, 69, 80, 74, 75, 62, - - 67, 70, 74, 63, 76, 71, 65, 83, 72, 78, - 177, 66, 65, 83, 68, 80, 79, 67, 69, 73, - 76, 75, 82, 67, 70, 78, 74, 73, 71, 73, - 81, 72, 79, 89, 85, 91, 84, 83, 80, 79, - 82, 73, 73, 76, 84, 86, 89, 175, 78, 81, - 85, 73, 90, 73, 86, 79, 91, 92, 95, 90, - 174, 93, 79, 82, 73, 73, 93, 95, 84, 97, - 89, 94, 81, 85, 92, 96, 94, 99, 86, 91, - 94, 100, 96, 90, 98, 101, 100, 103, 102, 97, - 93, 95, 115, 99, 104, 109, 106, 92, 108, 105, - - 94, 173, 101, 109, 94, 102, 96, 98, 105, 106, - 100, 103, 97, 107, 104, 111, 99, 108, 115, 112, - 113, 116, 107, 118, 120, 101, 121, 109, 102, 113, - 98, 111, 105, 106, 103, 112, 117, 104, 122, 118, - 108, 115, 116, 117, 119, 126, 107, 121, 120, 119, - 125, 129, 133, 113, 111, 134, 122, 133, 112, 135, - 137, 140, 118, 125, 135, 116, 139, 117, 126, 141, - 121, 120, 172, 119, 129, 150, 145, 140, 134, 122, - 137, 133, 145, 162, 150, 161, 151, 125, 135, 144, - 141, 126, 146, 139, 144, 152, 153, 129, 155, 146, - - 140, 134, 148, 137, 152, 153, 145, 148, 150, 151, - 156, 160, 158, 141, 164, 157, 139, 163, 144, 156, - 169, 155, 166, 146, 157, 158, 163, 166, 152, 153, - 167, 148, 151, 165, 160, 168, 170, 164, 176, 165, - 171, 159, 169, 156, 155, 170, 168, 181, 157, 158, - 163, 166, 180, 167, 181, 183, 176, 160, 189, 154, - 164, 149, 171, 165, 183, 169, 188, 147, 180, 170, - 168, 143, 142, 189, 138, 188, 167, 136, 181, 176, - 132, 131, 130, 128, 127, 171, 124, 123, 183, 114, - 110, 180, 88, 87, 77, 59, 189, 56, 51, 188, - - 194, 194, 195, 195, 196, 196, 48, 46, 34, 24, - 17, 11, 10, 9, 5, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193 + 22, 26, 199, 28, 27, 31, 198, 193, 28, 27, + 26, 32, 28, 192, 29, 25, 27, 50, 35, 50, + 32, 33, 191, 27, 28, 27, 31, 37, 188, 26, + + 187, 36, 28, 27, 26, 30, 28, 35, 25, 33, + 27, 29, 38, 33, 32, 37, 27, 28, 27, 31, + 36, 30, 26, 43, 30, 36, 30, 186, 39, 60, + 35, 38, 33, 41, 29, 43, 33, 39, 37, 185, + 39, 40, 183, 36, 30, 60, 40, 30, 36, 30, + 57, 39, 42, 41, 38, 58, 39, 42, 57, 43, + 61, 39, 63, 62, 39, 61, 58, 66, 60, 64, + 40, 63, 65, 180, 39, 72, 41, 68, 69, 39, + 62, 42, 57, 70, 67, 77, 66, 71, 65, 61, + 58, 72, 64, 179, 65, 63, 68, 67, 178, 69, + + 76, 77, 70, 62, 67, 75, 71, 81, 73, 66, + 75, 65, 79, 82, 72, 64, 73, 65, 73, 68, + 80, 67, 69, 76, 77, 70, 81, 67, 79, 71, + 73, 73, 82, 84, 75, 87, 80, 85, 83, 84, + 73, 86, 73, 80, 87, 85, 76, 90, 176, 81, + 92, 79, 98, 73, 73, 82, 83, 86, 91, 80, + 90, 93, 94, 84, 96, 91, 80, 94, 87, 85, + 99, 92, 98, 96, 100, 97, 95, 175, 93, 83, + 86, 95, 97, 101, 90, 95, 102, 103, 101, 91, + 100, 94, 109, 99, 92, 98, 104, 96, 105, 106, + + 174, 93, 107, 102, 103, 95, 97, 116, 106, 95, + 173, 109, 101, 100, 108, 107, 99, 110, 105, 112, + 104, 113, 114, 108, 117, 110, 102, 103, 163, 122, + 119, 114, 106, 116, 109, 112, 127, 113, 121, 107, + 130, 105, 135, 104, 118, 117, 119, 108, 120, 110, + 122, 118, 123, 120, 126, 114, 116, 162, 112, 127, + 113, 134, 121, 130, 138, 135, 134, 126, 117, 119, + 123, 136, 140, 122, 142, 118, 136, 120, 141, 160, + 155, 150, 127, 146, 138, 121, 130, 145, 135, 146, + 134, 126, 145, 123, 141, 142, 147, 149, 152, 140, + + 136, 151, 149, 147, 148, 153, 154, 138, 156, 161, + 151, 159, 165, 146, 153, 154, 145, 141, 142, 157, + 158, 152, 140, 144, 159, 170, 149, 147, 157, 158, + 166, 156, 161, 164, 151, 165, 166, 143, 153, 154, + 167, 168, 164, 172, 152, 167, 169, 170, 159, 177, + 171, 139, 157, 158, 156, 161, 181, 169, 165, 171, + 166, 182, 190, 137, 168, 172, 164, 177, 182, 167, + 170, 184, 181, 189, 133, 132, 131, 190, 129, 128, + 184, 169, 189, 171, 125, 124, 115, 168, 172, 111, + 177, 89, 182, 88, 78, 181, 74, 59, 56, 51, + + 190, 48, 46, 34, 184, 24, 189, 195, 195, 196, + 196, 197, 197, 17, 11, 10, 9, 5, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194 } ; /* The intent behind this definition is that it'll catch @@ -1006,13 +1006,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 194 ) + if ( yy_current_state >= 195 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 516 ); + while ( yy_base[yy_current_state] != 519 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1270,32 +1270,32 @@ RETURN_TOKEN(FORMAT); case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +RETURN_TOKEN(LBRACE); YY_BREAK case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(LBRACE); +RETURN_TOKEN(RBRACE); YY_BREAK case 49: YY_RULE_SETUP -#line 127 "lex_sql.l" -RETURN_TOKEN(RBRACE); +#line 128 "lex_sql.l" +RETURN_TOKEN(COMMA); YY_BREAK case 50: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(COMMA); +RETURN_TOKEN(EQ); YY_BREAK case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(EQ); +RETURN_TOKEN(LE); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(NE); YY_BREAK case 53: YY_RULE_SETUP @@ -1305,57 +1305,62 @@ RETURN_TOKEN(NE); case 54: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LT); YY_BREAK case 55: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(GE); YY_BREAK case 56: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(GT); YY_BREAK case 57: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(IS); YY_BREAK case 58: -#line 139 "lex_sql.l" +YY_RULE_SETUP +#line 138 "lex_sql.l" +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK case 59: -#line 140 "lex_sql.l" -case 60: #line 141 "lex_sql.l" +case 60: +#line 142 "lex_sql.l" case 61: -YY_RULE_SETUP -#line 141 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK +#line 143 "lex_sql.l" case 62: -/* rule 62 can match eol */ YY_RULE_SETUP -#line 142 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); +#line 143 "lex_sql.l" +{ return yytext[0]; } YY_BREAK case 63: /* rule 63 can match eol */ YY_RULE_SETUP -#line 143 "lex_sql.l" +#line 144 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 64: +/* rule 64 can match eol */ YY_RULE_SETUP #line 145 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 65: YY_RULE_SETUP -#line 146 "lex_sql.l" +#line 147 "lex_sql.l" +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 66: +YY_RULE_SETUP +#line 148 "lex_sql.l" ECHO; YY_BREAK -#line 1358 "lex_sql.cpp" +#line 1363 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1655,7 +1660,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 194 ) + if ( yy_current_state >= 195 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1684,11 +1689,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 194 ) + if ( yy_current_state >= 195 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 193); + yy_is_jam = (yy_current_state == 194); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2511,7 +2516,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 146 "lex_sql.l" +#line 148 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 948954a8..20c93eb6 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -542,7 +542,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 146 "lex_sql.l" +#line 148 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index b1995853..01b67f58 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -122,7 +122,6 @@ GROUP RETURN_TOKEN(GROUP); BY RETURN_TOKEN(BY); STORAGE RETURN_TOKEN(STORAGE); FORMAT RETURN_TOKEN(FORMAT); -{ID} yylval->string=strdup(yytext); RETURN_TOKEN(ID); "(" RETURN_TOKEN(LBRACE); ")" RETURN_TOKEN(RBRACE); @@ -134,6 +133,9 @@ FORMAT RETURN_TOKEN(FORMAT); "<" RETURN_TOKEN(LT); ">=" RETURN_TOKEN(GE); ">" RETURN_TOKEN(GT); +IS RETURN_TOKEN(IS); + +{ID} yylval->string=strdup(yytext); RETURN_TOKEN(ID); "+" | "-" | diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 8cf12579..57b5a7c3 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -51,6 +51,7 @@ enum CompOp LESS_THAN, ///< "<" GREAT_EQUAL, ///< ">=" GREAT_THAN, ///< ">" + OP_IS, ///< "IS" NO_OP }; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 7126a12d..1dfb2f20 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -203,57 +203,58 @@ enum yysymbol_kind_t YYSYMBOL_LE = 51, /* LE */ YYSYMBOL_GE = 52, /* GE */ YYSYMBOL_NE = 53, /* NE */ - YYSYMBOL_NUMBER = 54, /* NUMBER */ - YYSYMBOL_FLOAT = 55, /* FLOAT */ - YYSYMBOL_ID = 56, /* ID */ - YYSYMBOL_SSS = 57, /* SSS */ - YYSYMBOL_58_ = 58, /* '+' */ - YYSYMBOL_59_ = 59, /* '-' */ - YYSYMBOL_60_ = 60, /* '*' */ - YYSYMBOL_61_ = 61, /* '/' */ - YYSYMBOL_UMINUS = 62, /* UMINUS */ - YYSYMBOL_YYACCEPT = 63, /* $accept */ - YYSYMBOL_commands = 64, /* commands */ - YYSYMBOL_command_wrapper = 65, /* command_wrapper */ - YYSYMBOL_exit_stmt = 66, /* exit_stmt */ - YYSYMBOL_help_stmt = 67, /* help_stmt */ - YYSYMBOL_sync_stmt = 68, /* sync_stmt */ - YYSYMBOL_begin_stmt = 69, /* begin_stmt */ - YYSYMBOL_commit_stmt = 70, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 71, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 72, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 73, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 74, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 75, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 76, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 77, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 78, /* attr_def_list */ - YYSYMBOL_attr_def = 79, /* attr_def */ - YYSYMBOL_nullable_constraint = 80, /* nullable_constraint */ - YYSYMBOL_number = 81, /* number */ - YYSYMBOL_type = 82, /* type */ - YYSYMBOL_insert_stmt = 83, /* insert_stmt */ - YYSYMBOL_value_list = 84, /* value_list */ - YYSYMBOL_value = 85, /* value */ - YYSYMBOL_storage_format = 86, /* storage_format */ - YYSYMBOL_delete_stmt = 87, /* delete_stmt */ - YYSYMBOL_update_stmt = 88, /* update_stmt */ - YYSYMBOL_select_stmt = 89, /* select_stmt */ - YYSYMBOL_calc_stmt = 90, /* calc_stmt */ - YYSYMBOL_expression_list = 91, /* expression_list */ - YYSYMBOL_expression = 92, /* expression */ - YYSYMBOL_rel_attr = 93, /* rel_attr */ - YYSYMBOL_relation = 94, /* relation */ - YYSYMBOL_rel_list = 95, /* rel_list */ - YYSYMBOL_where = 96, /* where */ - YYSYMBOL_condition_list = 97, /* condition_list */ - YYSYMBOL_condition = 98, /* condition */ - YYSYMBOL_comp_op = 99, /* comp_op */ - YYSYMBOL_group_by = 100, /* group_by */ - YYSYMBOL_load_data_stmt = 101, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 102, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 103, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 104 /* opt_semicolon */ + YYSYMBOL_IS = 54, /* IS */ + YYSYMBOL_NUMBER = 55, /* NUMBER */ + YYSYMBOL_FLOAT = 56, /* FLOAT */ + YYSYMBOL_ID = 57, /* ID */ + YYSYMBOL_SSS = 58, /* SSS */ + YYSYMBOL_59_ = 59, /* '+' */ + YYSYMBOL_60_ = 60, /* '-' */ + YYSYMBOL_61_ = 61, /* '*' */ + YYSYMBOL_62_ = 62, /* '/' */ + YYSYMBOL_UMINUS = 63, /* UMINUS */ + YYSYMBOL_YYACCEPT = 64, /* $accept */ + YYSYMBOL_commands = 65, /* commands */ + YYSYMBOL_command_wrapper = 66, /* command_wrapper */ + YYSYMBOL_exit_stmt = 67, /* exit_stmt */ + YYSYMBOL_help_stmt = 68, /* help_stmt */ + YYSYMBOL_sync_stmt = 69, /* sync_stmt */ + YYSYMBOL_begin_stmt = 70, /* begin_stmt */ + YYSYMBOL_commit_stmt = 71, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 72, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 73, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 74, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 75, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 76, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 77, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 78, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 79, /* attr_def_list */ + YYSYMBOL_attr_def = 80, /* attr_def */ + YYSYMBOL_nullable_constraint = 81, /* nullable_constraint */ + YYSYMBOL_number = 82, /* number */ + YYSYMBOL_type = 83, /* type */ + YYSYMBOL_insert_stmt = 84, /* insert_stmt */ + YYSYMBOL_value_list = 85, /* value_list */ + YYSYMBOL_value = 86, /* value */ + YYSYMBOL_storage_format = 87, /* storage_format */ + YYSYMBOL_delete_stmt = 88, /* delete_stmt */ + YYSYMBOL_update_stmt = 89, /* update_stmt */ + YYSYMBOL_select_stmt = 90, /* select_stmt */ + YYSYMBOL_calc_stmt = 91, /* calc_stmt */ + YYSYMBOL_expression_list = 92, /* expression_list */ + YYSYMBOL_expression = 93, /* expression */ + YYSYMBOL_rel_attr = 94, /* rel_attr */ + YYSYMBOL_relation = 95, /* relation */ + YYSYMBOL_rel_list = 96, /* rel_list */ + YYSYMBOL_where = 97, /* where */ + YYSYMBOL_condition_list = 98, /* condition_list */ + YYSYMBOL_condition = 99, /* condition */ + YYSYMBOL_comp_op = 100, /* comp_op */ + YYSYMBOL_group_by = 101, /* group_by */ + YYSYMBOL_load_data_stmt = 102, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 103, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 104, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 105 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -584,19 +585,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 151 +#define YYLAST 150 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 63 +#define YYNTOKENS 64 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 42 /* YYNRULES -- Number of rules. */ -#define YYNRULES 96 +#define YYNRULES 97 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 172 +#define YYNSTATES 173 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 313 +#define YYMAXUTOK 314 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -614,7 +615,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 60, 58, 2, 59, 2, 61, 2, 2, + 2, 2, 61, 59, 2, 60, 2, 62, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -641,23 +642,23 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 62 + 55, 56, 57, 58, 63 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 194, 194, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 225, 231, 236, 242, 248, 254, 260, - 267, 273, 281, 295, 305, 329, 332, 345, 357, 380, - 384, 389, 395, 398, 399, 400, 401, 404, 421, 424, - 435, 439, 443, 449, 455, 458, 465, 477, 492, 517, - 526, 531, 542, 545, 548, 551, 554, 558, 561, 566, - 572, 579, 584, 594, 599, 604, 618, 621, 627, 630, - 635, 642, 654, 666, 678, 693, 694, 695, 696, 697, - 698, 704, 709, 722, 730, 740, 741 + 0, 195, 195, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 226, 232, 237, 243, 249, 255, 261, + 268, 274, 282, 296, 306, 330, 333, 346, 358, 381, + 385, 390, 396, 399, 400, 401, 402, 405, 422, 425, + 436, 440, 444, 450, 456, 459, 466, 478, 493, 518, + 527, 532, 543, 546, 549, 552, 555, 559, 562, 567, + 573, 580, 585, 595, 600, 605, 619, 622, 628, 631, + 636, 643, 655, 667, 679, 694, 695, 696, 697, 698, + 699, 700, 706, 711, 724, 732, 742, 743 }; #endif @@ -680,7 +681,7 @@ static const char *const yytname[] = "FLOAT_T", "DATE_T", "NOT", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", - "NE", "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", + "NE", "IS", "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", @@ -700,7 +701,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-92) +#define YYPACT_NINF (-85) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -714,24 +715,24 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 44, 16, 17, -17, -17, -53, -2, -92, -20, -1, - -21, -92, -92, -92, -92, -92, -5, 40, 44, 85, - 84, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, 35, 36, 38, 39, -17, -92, -92, -92, 56, - -92, -17, -92, -92, -92, 20, -92, 59, -92, -92, - 45, 46, 53, 51, 60, -92, -92, -92, -92, 86, - 62, -92, 65, -14, 52, -92, -17, -17, -17, -17, - -17, 54, 71, 73, 57, 43, 55, 63, 64, 66, - -92, -92, -92, 14, 14, -92, -92, -92, 88, 73, - 99, -25, -92, 75, -92, 89, -16, 100, 106, -92, - 54, -92, 43, -30, -30, -92, 87, 43, 119, -92, - -92, -92, -92, -15, 63, 108, 74, -92, -92, 110, - -92, -92, -92, -92, -92, -92, -25, -25, -25, 73, - 76, 79, 104, -92, -92, 100, 83, 115, 43, 116, - -92, -92, -92, -92, -92, -92, -92, -92, 117, -92, - -92, 91, -92, -92, 110, -92, 34, 92, -92, -92, - 90, -92 + 62, -5, -1, -17, -17, -53, 10, -85, -8, -7, + -36, -85, -85, -85, -85, -85, -26, -9, 62, 32, + 33, -85, -85, -85, -85, -85, -85, -85, -85, -85, + -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, + -85, -20, -15, 9, 12, -17, -85, -85, -85, 22, + -85, -17, -85, -85, -85, -10, -85, 44, -85, -85, + 13, 25, 60, 55, 57, -85, -85, -85, -85, 86, + 65, -85, 69, -14, 56, -85, -17, -17, -17, -17, + -17, 58, 76, 78, 61, 53, 59, 63, 64, 66, + -85, -85, -85, -47, -47, -85, -85, -85, 93, 78, + 100, 41, -85, 74, -85, 89, -2, 104, 107, -85, + 58, -85, 53, 39, 39, -85, 88, 53, 120, -85, + -85, -85, -85, -11, 63, 109, 73, -85, -85, 110, + -85, -85, -85, -85, -85, -85, -85, 41, 41, 41, + 78, 75, 79, 103, -85, -85, 104, 90, 115, 53, + 117, -85, -85, -85, -85, -85, -85, -85, -85, 118, + -85, -85, 92, -85, -85, 110, -85, -19, 94, -85, + -85, 83, -85 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -741,41 +742,41 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 95, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 96, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, 20, 0, 0, 0, 0, 0, 53, 50, 51, 71, 52, 0, 70, 68, 59, 60, 69, 0, 31, 30, - 0, 0, 0, 0, 0, 93, 1, 96, 2, 0, + 0, 0, 0, 0, 0, 94, 1, 97, 2, 0, 0, 29, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 66, 72, 61, 62, 63, 64, 65, 73, 74, 76, - 0, 78, 56, 0, 94, 0, 0, 35, 0, 33, - 0, 91, 0, 0, 0, 77, 79, 0, 0, 43, + 0, 78, 56, 0, 95, 0, 0, 35, 0, 33, + 0, 92, 0, 0, 0, 77, 79, 0, 0, 43, 44, 45, 46, 41, 0, 0, 0, 75, 58, 48, - 85, 86, 87, 88, 89, 90, 0, 0, 78, 76, - 0, 0, 0, 40, 38, 35, 54, 0, 0, 0, - 82, 84, 81, 83, 80, 57, 92, 42, 0, 39, - 36, 0, 34, 32, 48, 47, 41, 0, 49, 37, - 0, 55 + 85, 86, 87, 88, 89, 90, 91, 0, 0, 78, + 76, 0, 0, 0, 40, 38, 35, 54, 0, 0, + 0, 82, 84, 81, 83, 80, 57, 93, 42, 0, + 39, 36, 0, 34, 32, 48, 47, 41, 0, 49, + 37, 0, 55 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -92, -92, 121, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -3, 19, -22, -92, -92, - -92, -23, -84, -92, -92, -92, -92, -92, -4, 37, - -67, -92, 41, -91, 7, -92, 33, -92, -92, -92, - -92, -92 + -85, -85, 123, -85, -85, -85, -85, -85, -85, -85, + -85, -85, -85, -85, -85, -3, 20, -22, -85, -85, + -85, -18, -84, -85, -85, -85, -85, -85, -4, -16, + -79, -85, 36, -83, 11, -85, 34, -85, -85, -85, + -85, -85 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 125, 107, 144, 158, 123, - 33, 149, 53, 162, 34, 35, 36, 37, 54, 55, - 56, 98, 99, 102, 115, 116, 136, 128, 38, 39, + 28, 29, 30, 31, 32, 125, 107, 145, 159, 123, + 33, 150, 53, 163, 34, 35, 36, 37, 54, 55, + 56, 98, 99, 102, 115, 116, 137, 128, 38, 39, 40, 68 }; @@ -784,42 +785,42 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 57, 104, 45, 58, 141, 46, 90, 59, 111, 119, - 120, 121, 122, 46, 142, 60, 143, 113, 130, 131, - 132, 133, 134, 135, 41, 43, 42, 44, 129, 47, - 48, 49, 50, 139, 114, 62, 61, 47, 48, 49, - 50, 76, 51, 52, 77, 78, 79, 80, 155, 1, - 2, 63, 150, 152, 113, 3, 4, 5, 6, 7, - 8, 9, 10, 142, 164, 143, 11, 12, 13, 151, - 153, 114, 92, 46, 79, 80, 14, 15, 77, 78, - 79, 80, 73, 64, 16, 66, 17, 67, 75, 18, - 74, 69, 70, 84, 71, 72, 81, 47, 48, 85, - 50, 82, 83, 88, 86, 87, 89, 100, 91, 110, - 97, 101, 105, 103, 93, 94, 95, 96, 112, 106, - 108, 124, 109, 117, 118, 126, 138, 140, 146, 161, - 147, 148, 156, 157, 159, 163, 165, 166, 167, 65, - 170, 168, 160, 145, 169, 154, 171, 137, 0, 0, - 0, 127 + 57, 104, 45, 41, 58, 42, 90, 43, 142, 44, + 143, 76, 144, 46, 79, 80, 111, 113, 143, 59, + 144, 62, 114, 119, 120, 121, 122, 60, 129, 73, + 61, 63, 66, 140, 64, 75, 67, 69, 47, 48, + 49, 50, 70, 51, 52, 77, 78, 79, 80, 77, + 78, 79, 80, 151, 153, 113, 74, 156, 152, 154, + 114, 93, 94, 95, 96, 165, 71, 1, 2, 72, + 82, 46, 92, 3, 4, 5, 6, 7, 8, 9, + 10, 81, 83, 46, 11, 12, 13, 130, 131, 132, + 133, 134, 135, 136, 14, 15, 47, 48, 49, 50, + 84, 86, 16, 85, 17, 87, 88, 18, 47, 48, + 89, 50, 100, 91, 110, 97, 101, 105, 103, 112, + 106, 108, 117, 109, 118, 124, 126, 139, 141, 147, + 148, 149, 157, 160, 158, 164, 162, 166, 167, 168, + 172, 65, 171, 161, 146, 170, 127, 169, 138, 0, + 155 }; static const yytype_int16 yycheck[] = { - 4, 85, 19, 56, 19, 30, 20, 9, 99, 25, - 26, 27, 28, 30, 29, 35, 31, 101, 48, 49, - 50, 51, 52, 53, 8, 8, 10, 10, 112, 54, - 55, 56, 57, 117, 101, 56, 37, 54, 55, 56, - 57, 21, 59, 60, 58, 59, 60, 61, 139, 5, - 6, 56, 136, 137, 138, 11, 12, 13, 14, 15, - 16, 17, 18, 29, 148, 31, 22, 23, 24, 136, - 137, 138, 76, 30, 60, 61, 32, 33, 58, 59, - 60, 61, 45, 43, 40, 0, 42, 3, 51, 45, - 34, 56, 56, 40, 56, 56, 37, 54, 55, 48, - 57, 56, 56, 41, 44, 19, 41, 36, 56, 21, - 56, 38, 57, 56, 77, 78, 79, 80, 19, 56, - 56, 21, 56, 48, 35, 19, 39, 8, 20, 46, - 56, 21, 56, 54, 30, 20, 20, 20, 47, 18, - 48, 164, 145, 124, 166, 138, 56, 114, -1, -1, - -1, 110 + 4, 85, 19, 8, 57, 10, 20, 8, 19, 10, + 29, 21, 31, 30, 61, 62, 99, 101, 29, 9, + 31, 57, 101, 25, 26, 27, 28, 35, 112, 45, + 37, 57, 0, 117, 43, 51, 3, 57, 55, 56, + 57, 58, 57, 60, 61, 59, 60, 61, 62, 59, + 60, 61, 62, 137, 138, 139, 34, 140, 137, 138, + 139, 77, 78, 79, 80, 149, 57, 5, 6, 57, + 57, 30, 76, 11, 12, 13, 14, 15, 16, 17, + 18, 37, 57, 30, 22, 23, 24, 48, 49, 50, + 51, 52, 53, 54, 32, 33, 55, 56, 57, 58, + 40, 44, 40, 48, 42, 19, 41, 45, 55, 56, + 41, 58, 36, 57, 21, 57, 38, 58, 57, 19, + 57, 57, 48, 57, 35, 21, 19, 39, 8, 20, + 57, 21, 57, 30, 55, 20, 46, 20, 20, 47, + 57, 18, 48, 146, 124, 167, 110, 165, 114, -1, + 139 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -827,38 +828,38 @@ static const yytype_int16 yycheck[] = static const yytype_int8 yystos[] = { 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, - 18, 22, 23, 24, 32, 33, 40, 42, 45, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 83, 87, 88, 89, 90, 101, 102, - 103, 8, 10, 8, 10, 19, 30, 54, 55, 56, - 57, 59, 60, 85, 91, 92, 93, 91, 56, 9, - 35, 37, 56, 56, 43, 65, 0, 3, 104, 56, - 56, 56, 56, 92, 34, 92, 21, 58, 59, 60, - 61, 37, 56, 56, 40, 48, 44, 19, 41, 41, - 20, 56, 91, 92, 92, 92, 92, 56, 94, 95, - 36, 38, 96, 56, 85, 57, 56, 79, 56, 56, - 21, 96, 19, 85, 93, 97, 98, 48, 35, 25, - 26, 27, 28, 82, 21, 78, 19, 95, 100, 85, - 48, 49, 50, 51, 52, 53, 99, 99, 39, 85, - 8, 19, 29, 31, 80, 79, 20, 56, 21, 84, - 85, 93, 85, 93, 97, 96, 56, 54, 81, 30, - 78, 46, 86, 20, 85, 20, 20, 47, 84, 80, - 48, 56 + 18, 22, 23, 24, 32, 33, 40, 42, 45, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 84, 88, 89, 90, 91, 102, 103, + 104, 8, 10, 8, 10, 19, 30, 55, 56, 57, + 58, 60, 61, 86, 92, 93, 94, 92, 57, 9, + 35, 37, 57, 57, 43, 66, 0, 3, 105, 57, + 57, 57, 57, 93, 34, 93, 21, 59, 60, 61, + 62, 37, 57, 57, 40, 48, 44, 19, 41, 41, + 20, 57, 92, 93, 93, 93, 93, 57, 95, 96, + 36, 38, 97, 57, 86, 58, 57, 80, 57, 57, + 21, 97, 19, 86, 94, 98, 99, 48, 35, 25, + 26, 27, 28, 83, 21, 79, 19, 96, 101, 86, + 48, 49, 50, 51, 52, 53, 54, 100, 100, 39, + 86, 8, 19, 29, 31, 81, 80, 20, 57, 21, + 85, 86, 94, 86, 94, 98, 97, 57, 55, 82, + 30, 79, 46, 87, 20, 86, 20, 20, 47, 85, + 81, 48, 57 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 63, 64, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 78, 79, 79, 80, - 80, 80, 81, 82, 82, 82, 82, 83, 84, 84, - 85, 85, 85, 85, 86, 86, 87, 88, 89, 90, - 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 93, 93, 94, 95, 95, 96, 96, 97, 97, - 97, 98, 98, 98, 98, 99, 99, 99, 99, 99, - 99, 100, 101, 102, 103, 104, 104 + 0, 64, 65, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 79, 80, 80, 81, + 81, 81, 82, 83, 83, 83, 83, 84, 85, 85, + 86, 86, 86, 86, 87, 87, 88, 89, 90, 91, + 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 94, 94, 95, 96, 96, 97, 97, 98, 98, + 98, 99, 99, 99, 99, 100, 100, 100, 100, 100, + 100, 100, 101, 102, 103, 104, 105, 105 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -873,7 +874,7 @@ static const yytype_int8 yyr2[] = 1, 3, 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, 3, 1, 1, 3, 0, 2, 0, 1, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, - 1, 0, 7, 2, 4, 0, 1 + 1, 1, 0, 7, 2, 4, 0, 1 }; @@ -1735,93 +1736,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 195 "yacc_sql.y" +#line 196 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1744 "yacc_sql.cpp" +#line 1745 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 225 "yacc_sql.y" +#line 226 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1753 "yacc_sql.cpp" +#line 1754 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 231 "yacc_sql.y" +#line 232 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1761 "yacc_sql.cpp" +#line 1762 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 236 "yacc_sql.y" +#line 237 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1769 "yacc_sql.cpp" +#line 1770 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 242 "yacc_sql.y" +#line 243 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1777 "yacc_sql.cpp" +#line 1778 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 248 "yacc_sql.y" +#line 249 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1785 "yacc_sql.cpp" +#line 1786 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 254 "yacc_sql.y" +#line 255 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1793 "yacc_sql.cpp" +#line 1794 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 260 "yacc_sql.y" +#line 261 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1803 "yacc_sql.cpp" +#line 1804 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 267 "yacc_sql.y" +#line 268 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1811 "yacc_sql.cpp" +#line 1812 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 273 "yacc_sql.y" +#line 274 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1821 "yacc_sql.cpp" +#line 1822 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 282 "yacc_sql.y" +#line 283 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1832,11 +1833,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1836 "yacc_sql.cpp" +#line 1837 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 296 "yacc_sql.y" +#line 297 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1844,11 +1845,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1848 "yacc_sql.cpp" +#line 1849 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 306 "yacc_sql.y" +#line 307 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1869,19 +1870,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1873 "yacc_sql.cpp" +#line 1874 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 329 "yacc_sql.y" +#line 330 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1881 "yacc_sql.cpp" +#line 1882 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 333 "yacc_sql.y" +#line 334 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1891,11 +1892,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1895 "yacc_sql.cpp" +#line 1896 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 346 "yacc_sql.y" +#line 347 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -1907,11 +1908,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 1911 "yacc_sql.cpp" +#line 1912 "yacc_sql.cpp" break; case 38: /* attr_def: ID type nullable_constraint */ -#line 358 "yacc_sql.y" +#line 359 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -1931,65 +1932,65 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 1935 "yacc_sql.cpp" +#line 1936 "yacc_sql.cpp" break; case 39: /* nullable_constraint: NOT NULL_T */ -#line 381 "yacc_sql.y" +#line 382 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1943 "yacc_sql.cpp" +#line 1944 "yacc_sql.cpp" break; case 40: /* nullable_constraint: NULLABLE */ -#line 385 "yacc_sql.y" +#line 386 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1951 "yacc_sql.cpp" +#line 1952 "yacc_sql.cpp" break; case 41: /* nullable_constraint: %empty */ -#line 389 "yacc_sql.y" +#line 390 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 1959 "yacc_sql.cpp" +#line 1960 "yacc_sql.cpp" break; case 42: /* number: NUMBER */ -#line 395 "yacc_sql.y" +#line 396 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1965 "yacc_sql.cpp" +#line 1966 "yacc_sql.cpp" break; case 43: /* type: INT_T */ -#line 398 "yacc_sql.y" +#line 399 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1971 "yacc_sql.cpp" +#line 1972 "yacc_sql.cpp" break; case 44: /* type: STRING_T */ -#line 399 "yacc_sql.y" +#line 400 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1977 "yacc_sql.cpp" +#line 1978 "yacc_sql.cpp" break; case 45: /* type: FLOAT_T */ -#line 400 "yacc_sql.y" +#line 401 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1983 "yacc_sql.cpp" +#line 1984 "yacc_sql.cpp" break; case 46: /* type: DATE_T */ -#line 401 "yacc_sql.y" +#line 402 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1989 "yacc_sql.cpp" +#line 1990 "yacc_sql.cpp" break; case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 405 "yacc_sql.y" +#line 406 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -2002,19 +2003,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 2006 "yacc_sql.cpp" +#line 2007 "yacc_sql.cpp" break; case 48: /* value_list: %empty */ -#line 421 "yacc_sql.y" +#line 422 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 2014 "yacc_sql.cpp" +#line 2015 "yacc_sql.cpp" break; case 49: /* value_list: COMMA value value_list */ -#line 424 "yacc_sql.y" +#line 425 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -2024,64 +2025,64 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 2028 "yacc_sql.cpp" +#line 2029 "yacc_sql.cpp" break; case 50: /* value: NUMBER */ -#line 435 "yacc_sql.y" +#line 436 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2037 "yacc_sql.cpp" +#line 2038 "yacc_sql.cpp" break; case 51: /* value: FLOAT */ -#line 439 "yacc_sql.y" +#line 440 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2046 "yacc_sql.cpp" +#line 2047 "yacc_sql.cpp" break; case 52: /* value: SSS */ -#line 443 "yacc_sql.y" +#line 444 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2057 "yacc_sql.cpp" +#line 2058 "yacc_sql.cpp" break; case 53: /* value: NULL_T */ -#line 449 "yacc_sql.y" +#line 450 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2065 "yacc_sql.cpp" +#line 2066 "yacc_sql.cpp" break; case 54: /* storage_format: %empty */ -#line 455 "yacc_sql.y" +#line 456 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2073 "yacc_sql.cpp" +#line 2074 "yacc_sql.cpp" break; case 55: /* storage_format: STORAGE FORMAT EQ ID */ -#line 459 "yacc_sql.y" +#line 460 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2081 "yacc_sql.cpp" +#line 2082 "yacc_sql.cpp" break; case 56: /* delete_stmt: DELETE FROM ID where */ -#line 466 "yacc_sql.y" +#line 467 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2091,11 +2092,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2095 "yacc_sql.cpp" +#line 2096 "yacc_sql.cpp" break; case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 478 "yacc_sql.y" +#line 479 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2108,11 +2109,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2112 "yacc_sql.cpp" +#line 2113 "yacc_sql.cpp" break; case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 493 "yacc_sql.y" +#line 494 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2135,30 +2136,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2139 "yacc_sql.cpp" +#line 2140 "yacc_sql.cpp" break; case 59: /* calc_stmt: CALC expression_list */ -#line 518 "yacc_sql.y" +#line 519 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2149 "yacc_sql.cpp" +#line 2150 "yacc_sql.cpp" break; case 60: /* expression_list: expression */ -#line 527 "yacc_sql.y" +#line 528 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2158 "yacc_sql.cpp" +#line 2159 "yacc_sql.cpp" break; case 61: /* expression_list: expression COMMA expression_list */ -#line 532 "yacc_sql.y" +#line 533 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2167,99 +2168,99 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2171 "yacc_sql.cpp" +#line 2172 "yacc_sql.cpp" break; case 62: /* expression: expression '+' expression */ -#line 542 "yacc_sql.y" +#line 543 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2179 "yacc_sql.cpp" +#line 2180 "yacc_sql.cpp" break; case 63: /* expression: expression '-' expression */ -#line 545 "yacc_sql.y" +#line 546 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2187 "yacc_sql.cpp" +#line 2188 "yacc_sql.cpp" break; case 64: /* expression: expression '*' expression */ -#line 548 "yacc_sql.y" +#line 549 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2195 "yacc_sql.cpp" +#line 2196 "yacc_sql.cpp" break; case 65: /* expression: expression '/' expression */ -#line 551 "yacc_sql.y" +#line 552 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2203 "yacc_sql.cpp" +#line 2204 "yacc_sql.cpp" break; case 66: /* expression: LBRACE expression RBRACE */ -#line 554 "yacc_sql.y" +#line 555 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2212 "yacc_sql.cpp" +#line 2213 "yacc_sql.cpp" break; case 67: /* expression: '-' expression */ -#line 558 "yacc_sql.y" +#line 559 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2220 "yacc_sql.cpp" +#line 2221 "yacc_sql.cpp" break; case 68: /* expression: value */ -#line 561 "yacc_sql.y" +#line 562 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2230 "yacc_sql.cpp" +#line 2231 "yacc_sql.cpp" break; case 69: /* expression: rel_attr */ -#line 566 "yacc_sql.y" +#line 567 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2241 "yacc_sql.cpp" +#line 2242 "yacc_sql.cpp" break; case 70: /* expression: '*' */ -#line 572 "yacc_sql.y" +#line 573 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2249 "yacc_sql.cpp" +#line 2250 "yacc_sql.cpp" break; case 71: /* rel_attr: ID */ -#line 579 "yacc_sql.y" +#line 580 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2259 "yacc_sql.cpp" +#line 2260 "yacc_sql.cpp" break; case 72: /* rel_attr: ID DOT ID */ -#line 584 "yacc_sql.y" +#line 585 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2267,29 +2268,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2271 "yacc_sql.cpp" +#line 2272 "yacc_sql.cpp" break; case 73: /* relation: ID */ -#line 594 "yacc_sql.y" +#line 595 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2279 "yacc_sql.cpp" +#line 2280 "yacc_sql.cpp" break; case 74: /* rel_list: relation */ -#line 599 "yacc_sql.y" +#line 600 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2289 "yacc_sql.cpp" +#line 2290 "yacc_sql.cpp" break; case 75: /* rel_list: relation COMMA rel_list */ -#line 604 "yacc_sql.y" +#line 605 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2300,55 +2301,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2304 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; case 76: /* where: %empty */ -#line 618 "yacc_sql.y" +#line 619 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2312 "yacc_sql.cpp" +#line 2313 "yacc_sql.cpp" break; case 77: /* where: WHERE condition_list */ -#line 621 "yacc_sql.y" +#line 622 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2320 "yacc_sql.cpp" +#line 2321 "yacc_sql.cpp" break; case 78: /* condition_list: %empty */ -#line 627 "yacc_sql.y" +#line 628 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2328 "yacc_sql.cpp" +#line 2329 "yacc_sql.cpp" break; case 79: /* condition_list: condition */ -#line 630 "yacc_sql.y" +#line 631 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2338 "yacc_sql.cpp" +#line 2339 "yacc_sql.cpp" break; case 80: /* condition_list: condition AND condition_list */ -#line 635 "yacc_sql.y" +#line 636 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2348 "yacc_sql.cpp" +#line 2349 "yacc_sql.cpp" break; case 81: /* condition: rel_attr comp_op value */ -#line 643 "yacc_sql.y" +#line 644 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2360,11 +2361,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2364 "yacc_sql.cpp" +#line 2365 "yacc_sql.cpp" break; case 82: /* condition: value comp_op value */ -#line 655 "yacc_sql.y" +#line 656 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2376,11 +2377,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2380 "yacc_sql.cpp" +#line 2381 "yacc_sql.cpp" break; case 83: /* condition: rel_attr comp_op rel_attr */ -#line 667 "yacc_sql.y" +#line 668 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2392,11 +2393,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2396 "yacc_sql.cpp" +#line 2397 "yacc_sql.cpp" break; case 84: /* condition: value comp_op rel_attr */ -#line 679 "yacc_sql.y" +#line 680 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2408,55 +2409,61 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2412 "yacc_sql.cpp" +#line 2413 "yacc_sql.cpp" break; case 85: /* comp_op: EQ */ -#line 693 "yacc_sql.y" +#line 694 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2418 "yacc_sql.cpp" +#line 2419 "yacc_sql.cpp" break; case 86: /* comp_op: LT */ -#line 694 "yacc_sql.y" +#line 695 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2424 "yacc_sql.cpp" +#line 2425 "yacc_sql.cpp" break; case 87: /* comp_op: GT */ -#line 695 "yacc_sql.y" +#line 696 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2430 "yacc_sql.cpp" +#line 2431 "yacc_sql.cpp" break; case 88: /* comp_op: LE */ -#line 696 "yacc_sql.y" +#line 697 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2436 "yacc_sql.cpp" +#line 2437 "yacc_sql.cpp" break; case 89: /* comp_op: GE */ -#line 697 "yacc_sql.y" +#line 698 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2442 "yacc_sql.cpp" +#line 2443 "yacc_sql.cpp" break; case 90: /* comp_op: NE */ -#line 698 "yacc_sql.y" +#line 699 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2448 "yacc_sql.cpp" +#line 2449 "yacc_sql.cpp" + break; + + case 91: /* comp_op: IS */ +#line 700 "yacc_sql.y" + { (yyval.comp) = OP_IS; } +#line 2455 "yacc_sql.cpp" break; - case 91: /* group_by: %empty */ -#line 704 "yacc_sql.y" + case 92: /* group_by: %empty */ +#line 706 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2456 "yacc_sql.cpp" +#line 2463 "yacc_sql.cpp" break; - case 92: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 710 "yacc_sql.y" + case 93: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 712 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2466,20 +2473,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2470 "yacc_sql.cpp" +#line 2477 "yacc_sql.cpp" break; - case 93: /* explain_stmt: EXPLAIN command_wrapper */ -#line 723 "yacc_sql.y" + case 94: /* explain_stmt: EXPLAIN command_wrapper */ +#line 725 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2479 "yacc_sql.cpp" +#line 2486 "yacc_sql.cpp" break; - case 94: /* set_variable_stmt: SET ID EQ value */ -#line 731 "yacc_sql.y" + case 95: /* set_variable_stmt: SET ID EQ value */ +#line 733 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2487,11 +2494,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2491 "yacc_sql.cpp" +#line 2498 "yacc_sql.cpp" break; -#line 2495 "yacc_sql.cpp" +#line 2502 "yacc_sql.cpp" default: break; } @@ -2720,7 +2727,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 743 "yacc_sql.y" +#line 745 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 8f95538c..3fb80092 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -105,11 +105,12 @@ extern int yydebug; LE = 306, /* LE */ GE = 307, /* GE */ NE = 308, /* NE */ - NUMBER = 309, /* NUMBER */ - FLOAT = 310, /* FLOAT */ - ID = 311, /* ID */ - SSS = 312, /* SSS */ - UMINUS = 313 /* UMINUS */ + IS = 309, /* IS */ + NUMBER = 310, /* NUMBER */ + FLOAT = 311, /* FLOAT */ + ID = 312, /* ID */ + SSS = 313, /* SSS */ + UMINUS = 314 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -118,7 +119,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 120 "yacc_sql.y" +#line 121 "yacc_sql.y" ParsedSqlNode * sql_node; ConditionSqlNode * condition; @@ -138,7 +139,7 @@ union YYSTYPE float floats; bool nullable_info; -#line 142 "yacc_sql.hpp" +#line 143 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 5c0c1c38..1c557c59 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -115,6 +115,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, LE GE NE + IS /** union 中定义各种数据类型,真实生成的代码也是union类型,所以不能有非POD类型的数据 **/ %union { @@ -696,6 +697,7 @@ comp_op: | LE { $$ = LESS_EQUAL; } | GE { $$ = GREAT_EQUAL; } | NE { $$ = NOT_EQUAL; } + | IS { $$ = OP_IS; } ; // your code here From ee075e164e7f42d0632fd8f9e9ba083d2406a1d9 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 18:27:43 +0800 Subject: [PATCH 030/308] =?UTF-8?q?=E5=AE=8C=E6=88=90IS=20NULL=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 3 ++- src/observer/common/type/null_type.cpp | 3 +-- src/observer/sql/expr/expression.cpp | 16 ++++++++++++---- .../sql/optimizer/logical_plan_generator.cpp | 6 +++++- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index b8835945..fb4aba07 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -78,7 +78,8 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(LOG_ENTRY_INVALID) \ DEFINE_RC(UNSUPPORTED) \ DEFINE_RC(VALUE_TOO_LONG) \ - DEFINE_RC(NOT_NULLABLE_VALUE) + DEFINE_RC(NOT_NULLABLE_VALUE) \ + DEFINE_RC(NOT_NULL_AFTER_IS) enum class RC { diff --git a/src/observer/common/type/null_type.cpp b/src/observer/common/type/null_type.cpp index 3e762974..8987ff8e 100644 --- a/src/observer/common/type/null_type.cpp +++ b/src/observer/common/type/null_type.cpp @@ -17,11 +17,10 @@ See the Mulan PSL v2 for more details. */ int NullType::compare(const Value &left, const Value &right) const { ASSERT(left.attr_type() == AttrType::NULLS, "left type is not a null"); - ASSERT(right.attr_type() == AttrType::NULLS, "right type is not a null"); if (right.attr_type() == AttrType::NULLS) { return 0; } - return INT32_MAX; + return -1; } RC NullType::to_string(const Value &val, string &result) const diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 1c1aa48c..028d4d60 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -91,7 +91,7 @@ RC CastExpr::cast(const Value &value, Value &cast_value) const RC CastExpr::get_value(const Tuple &tuple, Value &result) const { Value value; - RC rc = child_->get_value(tuple, value); + RC rc = child_->get_value(tuple, value); if (rc != RC::SUCCESS) { return rc; } @@ -102,7 +102,7 @@ RC CastExpr::get_value(const Tuple &tuple, Value &result) const RC CastExpr::try_get_value(Value &result) const { Value value; - RC rc = child_->try_get_value(value); + RC rc = child_->try_get_value(value); if (rc != RC::SUCCESS) { return rc; } @@ -120,6 +120,14 @@ ComparisonExpr::~ComparisonExpr() {} RC ComparisonExpr::compare_value(const Value &left, const Value &right, bool &result) const { + if (comp_ == OP_IS) { + if (right.attr_type() != AttrType::NULLS) { + return RC::NOT_NULL_AFTER_IS; + } + result = left.is_null(); + return RC::SUCCESS; + } + RC rc = RC::SUCCESS; int cmp_result = left.compare(right); result = false; @@ -154,8 +162,8 @@ RC ComparisonExpr::compare_value(const Value &left, const Value &right, bool &re RC ComparisonExpr::try_get_value(Value &cell) const { if (left_->type() == ExprType::VALUE && right_->type() == ExprType::VALUE) { - ValueExpr * left_value_expr = static_cast(left_.get()); - ValueExpr * right_value_expr = static_cast(right_.get()); + ValueExpr *left_value_expr = static_cast(left_.get()); + ValueExpr *right_value_expr = static_cast(right_.get()); const Value &left_cell = left_value_expr->get_value(); const Value &right_cell = right_value_expr->get_value(); diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 7d3f5341..37a6eb31 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -174,7 +174,11 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptr(new ValueExpr(filter_obj_right.value))); // TODO: cast NULL with others. - if (left->value_type() != right->value_type()) { + if (filter_unit->comp() == CompOp::OP_IS) { + if (right->value_type() != AttrType::NULLS) { + return RC::NOT_NULL_AFTER_IS; + } + } else if (left->value_type() != right->value_type()) { auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { From e73ec10984861330702adf1f8fa29db64160d449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 26 Sep 2024 11:07:47 +0000 Subject: [PATCH 031/308] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=BA=86=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=90=8D=E7=9A=84alias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.h | 4 +- src/observer/sql/parser/expression_binder.cpp | 24 +- src/observer/sql/parser/lex_sql.cpp | 433 ++++----- src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/lex_sql.l | 1 + src/observer/sql/parser/yacc_sql.cpp | 869 +++++++++--------- src/observer/sql/parser/yacc_sql.hpp | 113 +-- src/observer/sql/parser/yacc_sql.y | 34 +- 8 files changed, 777 insertions(+), 703 deletions(-) diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 5c66a10f..936c1afd 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -16,6 +16,7 @@ See the Mulan PSL v2 for more details. */ #include #include +#include #include "common/value.h" #include "storage/field/field.h" @@ -109,7 +110,8 @@ class Expression * @brief 表达式的名字,比如是字段名称,或者用户在执行SQL语句时输入的内容 */ virtual const char *name() const { return name_.c_str(); } - virtual void set_name(std::string name) { name_ = name; } + virtual void set_name(std::string name) { name_ = std::move(name); } + virtual bool name_empty() { return name_.empty(); } /** * @brief 表达式在下层算子返回的 chunk 中的位置 diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 331f31b2..b0616025 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -443,16 +443,20 @@ RC ExpressionBinder::bind_aggregate_expression( auto aggregate_expr = make_unique(aggregate_type, std::move(child_expr)); // aggregate_expr->set_name(unbound_aggregate_expr->name()); // set name 阶段 - string name; - switch (aggregate_type) { - case AggregateExpr::Type::COUNT: name = "COUNT(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::SUM: name = "SUM(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::AVG: name = "AVG(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::MAX: name = "MAX(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::MIN: name = "MIN(" + std::string(aggregate_expr->child()->name()) + ")"; break; - default: name = "UNKNOWN_AGGREGATE"; break; - } - aggregate_expr->set_name(name); + if (unbound_aggregate_expr->name_empty()) { + string name; + switch (aggregate_type) { + case AggregateExpr::Type::COUNT: name = "COUNT(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::SUM: name = "SUM(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::AVG: name = "AVG(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::MAX: name = "MAX(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::MIN: name = "MIN(" + std::string(aggregate_expr->child()->name()) + ")"; break; + default: name = "UNKNOWN_AGGREGATE"; break; + } + aggregate_expr->set_name(name); + } else { + aggregate_expr->set_name(unbound_aggregate_expr->name()); + } rc = check_aggregate_expression(*aggregate_expr); if (OB_FAIL(rc)) { return rc; diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index e71db6db..7c5fcf3e 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -385,8 +385,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 64 -#define YY_END_OF_BUFFER 65 +#define YY_NUM_RULES 65 +#define YY_END_OF_BUFFER 66 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -394,28 +394,28 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[190] = +static const flex_int16_t yy_accept[191] = { 0, - 0, 0, 0, 0, 65, 63, 1, 2, 63, 63, - 63, 47, 48, 59, 57, 49, 58, 6, 60, 3, - 5, 54, 50, 56, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 64, 53, 0, 61, 0, 62, 3, - 0, 51, 52, 55, 46, 46, 46, 46, 41, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 15, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 4, 22, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - - 46, 46, 46, 46, 46, 46, 46, 32, 46, 46, - 45, 46, 46, 28, 46, 46, 46, 46, 46, 46, - 46, 46, 19, 33, 46, 46, 37, 35, 46, 9, - 11, 7, 46, 46, 46, 20, 46, 8, 46, 46, - 46, 24, 44, 36, 46, 46, 16, 46, 17, 46, - 46, 46, 46, 29, 46, 46, 46, 46, 34, 46, - 40, 14, 46, 46, 46, 46, 46, 12, 46, 46, - 21, 30, 10, 26, 46, 43, 38, 23, 46, 18, - 46, 13, 27, 25, 39, 46, 42, 31, 0 + 0, 0, 0, 0, 66, 64, 1, 2, 64, 64, + 64, 48, 49, 60, 58, 50, 59, 6, 61, 3, + 5, 55, 51, 57, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 65, 54, 0, 62, 0, 63, 3, + 0, 52, 53, 56, 47, 47, 47, 42, 47, 41, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 15, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 4, 22, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + + 47, 47, 47, 47, 47, 47, 47, 47, 32, 47, + 47, 46, 47, 47, 28, 47, 47, 47, 47, 47, + 47, 47, 47, 19, 33, 47, 47, 37, 35, 47, + 9, 11, 7, 47, 47, 47, 20, 47, 8, 47, + 47, 47, 24, 45, 36, 47, 47, 16, 47, 17, + 47, 47, 47, 47, 29, 47, 47, 47, 47, 34, + 47, 40, 14, 47, 47, 47, 47, 47, 12, 47, + 47, 21, 30, 10, 26, 47, 44, 38, 23, 47, + 18, 47, 13, 27, 25, 39, 47, 43, 31, 0 } ; static const YY_CHAR yy_ec[256] = @@ -461,59 +461,59 @@ static const YY_CHAR yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[195] = +static const flex_int16_t yy_base[196] = { 0, - 0, 0, 0, 0, 503, 504, 504, 504, 484, 496, - 494, 504, 504, 504, 504, 504, 484, 504, 504, 54, - 504, 52, 504, 480, 53, 57, 60, 59, 70, 91, - 61, 67, 75, 482, 106, 95, 83, 98, 122, 58, - 109, 113, 111, 504, 504, 491, 504, 489, 504, 86, - 479, 504, 504, 504, 0, 478, 128, 121, 477, 99, - 141, 127, 153, 126, 159, 157, 151, 161, 163, 166, - 174, 179, 192, 139, 182, 183, 476, 189, 196, 178, - 190, 213, 217, 225, 227, 201, 468, 467, 236, 239, - 230, 241, 240, 250, 244, 256, 248, 252, 260, 267, - - 261, 265, 262, 264, 271, 289, 285, 292, 288, 295, - 466, 290, 308, 465, 293, 310, 313, 300, 323, 312, - 314, 315, 464, 463, 324, 322, 462, 461, 325, 459, - 458, 456, 338, 330, 346, 454, 340, 453, 347, 349, - 357, 452, 449, 448, 363, 355, 446, 377, 442, 370, - 350, 372, 380, 441, 364, 385, 390, 391, 439, 384, - 435, 431, 400, 392, 411, 398, 408, 402, 417, 412, - 429, 425, 395, 366, 414, 332, 222, 221, 420, 191, - 436, 169, 165, 78, 77, 422, 74, 73, 504, 484, - 486, 488, 82, 75 + 0, 0, 0, 0, 506, 507, 507, 507, 487, 499, + 497, 507, 507, 507, 507, 507, 487, 507, 507, 54, + 507, 52, 507, 483, 53, 57, 60, 59, 70, 91, + 61, 67, 77, 485, 74, 106, 83, 109, 114, 117, + 119, 127, 131, 507, 507, 487, 507, 485, 507, 86, + 475, 507, 507, 507, 0, 474, 113, 471, 129, 470, + 99, 144, 136, 152, 134, 155, 159, 166, 163, 154, + 168, 169, 158, 196, 184, 202, 170, 465, 208, 213, + 172, 215, 217, 220, 232, 221, 239, 464, 463, 212, + 238, 223, 246, 251, 261, 262, 268, 233, 254, 265, + + 273, 274, 279, 282, 283, 284, 285, 288, 289, 292, + 305, 462, 307, 309, 461, 310, 311, 320, 324, 328, + 315, 335, 312, 459, 458, 334, 338, 457, 456, 341, + 452, 451, 449, 343, 344, 345, 438, 349, 436, 354, + 352, 365, 427, 425, 415, 370, 366, 395, 377, 383, + 380, 375, 385, 393, 360, 378, 396, 399, 403, 358, + 388, 316, 287, 410, 407, 412, 414, 420, 422, 433, + 423, 255, 243, 227, 195, 428, 192, 190, 189, 447, + 183, 439, 181, 141, 78, 73, 435, 69, 63, 507, + 493, 495, 497, 75, 71 } ; -static const flex_int16_t yy_def[195] = +static const flex_int16_t yy_def[196] = { 0, - 189, 1, 190, 190, 189, 189, 189, 189, 189, 191, - 192, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 189, 189, 191, 189, 192, 189, 189, - 189, 189, 189, 189, 194, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 189, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 0, 189, - 189, 189, 189, 189 + 190, 1, 191, 191, 190, 190, 190, 190, 190, 192, + 193, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 190, 190, 192, 190, 193, 190, 190, + 190, 190, 190, 190, 195, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 190, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 0, + 190, 190, 190, 190, 190 } ; -static const flex_int16_t yy_nxt[571] = +static const flex_int16_t yy_nxt[574] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -522,64 +522,65 @@ static const flex_int16_t yy_nxt[571] = 43, 34, 34, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 34, 36, 37, 34, 38, 39, 40, 41, 42, 43, 34, 34, 51, 55, 50, 52, - 53, 55, 55, 55, 55, 55, 55, 83, 64, 60, - 58, 55, 65, 56, 55, 57, 61, 55, 55, 55, - 72, 55, 55, 62, 66, 63, 71, 55, 51, 59, - - 50, 83, 64, 60, 58, 55, 65, 73, 57, 55, - 61, 67, 55, 55, 72, 77, 62, 66, 63, 71, - 55, 68, 59, 55, 69, 55, 70, 55, 76, 90, - 73, 78, 85, 74, 67, 55, 55, 86, 77, 75, - 55, 55, 55, 84, 68, 79, 89, 69, 80, 70, - 88, 76, 90, 55, 78, 55, 85, 74, 92, 81, - 91, 86, 75, 94, 82, 55, 84, 55, 109, 79, - 89, 55, 80, 55, 88, 55, 93, 55, 98, 55, - 55, 92, 81, 55, 91, 99, 94, 82, 55, 95, - 97, 109, 55, 55, 100, 96, 55, 55, 101, 102, - - 93, 110, 98, 55, 55, 55, 55, 103, 99, 104, - 55, 115, 95, 97, 105, 55, 106, 100, 96, 112, - 111, 101, 102, 116, 121, 110, 113, 55, 107, 108, - 103, 55, 104, 114, 115, 55, 55, 118, 105, 55, - 106, 55, 112, 111, 55, 117, 116, 119, 121, 113, - 55, 107, 108, 55, 55, 55, 114, 120, 55, 126, - 123, 118, 55, 122, 55, 124, 55, 129, 117, 127, - 55, 119, 125, 128, 55, 55, 55, 130, 55, 55, - 120, 55, 131, 126, 123, 55, 134, 122, 124, 132, - 133, 129, 135, 127, 139, 125, 136, 128, 138, 55, - - 137, 130, 55, 55, 55, 131, 55, 55, 141, 55, - 134, 143, 132, 133, 55, 135, 140, 144, 139, 136, - 145, 138, 55, 137, 55, 142, 55, 55, 55, 55, - 150, 146, 141, 147, 149, 143, 55, 55, 55, 55, - 140, 144, 151, 145, 55, 148, 55, 154, 142, 153, - 152, 155, 55, 150, 55, 146, 147, 158, 149, 156, - 55, 55, 157, 55, 55, 160, 151, 159, 148, 55, - 154, 55, 153, 152, 161, 155, 166, 55, 55, 163, - 55, 158, 156, 165, 55, 157, 55, 169, 162, 160, - 159, 55, 164, 168, 55, 170, 167, 161, 55, 55, - - 166, 172, 163, 171, 55, 55, 55, 165, 173, 55, - 169, 162, 55, 174, 55, 164, 55, 168, 175, 170, - 167, 176, 55, 177, 172, 55, 55, 171, 55, 178, - 179, 55, 173, 181, 55, 180, 55, 174, 182, 55, - 183, 186, 175, 55, 176, 55, 185, 177, 184, 55, - 55, 188, 178, 55, 179, 55, 55, 181, 180, 187, - 55, 182, 55, 55, 183, 186, 55, 55, 55, 185, - 55, 184, 55, 55, 188, 55, 55, 55, 55, 55, - 55, 55, 87, 187, 44, 44, 46, 46, 48, 48, - 55, 55, 55, 87, 49, 47, 55, 54, 50, 49, - - 47, 45, 189, 5, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189 + 53, 55, 55, 55, 55, 55, 56, 55, 65, 61, + 59, 55, 66, 55, 55, 57, 62, 55, 55, 58, + 73, 55, 55, 63, 67, 64, 72, 55, 51, 60, + + 50, 75, 65, 61, 59, 55, 66, 76, 57, 74, + 62, 68, 58, 55, 73, 78, 63, 67, 64, 72, + 55, 69, 60, 55, 70, 75, 71, 55, 55, 91, + 76, 55, 74, 55, 68, 89, 84, 80, 78, 77, + 81, 55, 79, 55, 69, 55, 86, 70, 55, 71, + 55, 82, 91, 85, 90, 55, 83, 87, 55, 89, + 84, 80, 77, 92, 81, 79, 55, 93, 55, 55, + 86, 95, 55, 55, 82, 94, 85, 55, 90, 83, + 55, 87, 55, 55, 55, 96, 55, 92, 105, 102, + 93, 97, 98, 99, 95, 55, 101, 55, 55, 94, + + 100, 103, 104, 55, 55, 116, 55, 112, 96, 55, + 55, 105, 102, 110, 97, 98, 55, 99, 106, 101, + 107, 111, 55, 100, 103, 104, 55, 55, 116, 55, + 112, 55, 108, 109, 55, 55, 110, 55, 113, 123, + 119, 55, 106, 114, 107, 111, 55, 55, 117, 118, + 115, 121, 55, 55, 120, 108, 109, 55, 125, 124, + 55, 113, 122, 123, 119, 55, 114, 132, 55, 55, + 127, 117, 118, 115, 121, 55, 55, 126, 120, 55, + 128, 125, 55, 124, 129, 130, 122, 55, 55, 131, + 132, 133, 135, 55, 127, 134, 55, 55, 55, 55, + + 126, 55, 55, 55, 128, 136, 55, 140, 129, 130, + 137, 142, 141, 131, 133, 144, 135, 139, 134, 55, + 138, 55, 143, 55, 55, 55, 55, 145, 136, 55, + 55, 140, 147, 137, 55, 142, 141, 146, 55, 144, + 139, 150, 55, 138, 155, 143, 149, 152, 55, 55, + 148, 145, 55, 153, 151, 55, 147, 55, 55, 55, + 146, 156, 159, 55, 161, 150, 55, 155, 55, 149, + 154, 152, 55, 148, 55, 157, 153, 151, 158, 55, + 55, 160, 164, 162, 55, 156, 159, 167, 161, 55, + 166, 55, 55, 154, 55, 163, 168, 55, 157, 55, + + 165, 158, 55, 169, 160, 164, 162, 55, 171, 55, + 55, 167, 170, 55, 166, 173, 172, 55, 163, 174, + 168, 55, 175, 165, 55, 177, 55, 169, 55, 55, + 176, 180, 171, 178, 55, 170, 55, 55, 173, 55, + 172, 55, 55, 174, 179, 182, 175, 55, 177, 55, + 55, 181, 55, 55, 176, 180, 184, 178, 183, 185, + 186, 55, 188, 55, 189, 55, 55, 179, 187, 182, + 55, 55, 55, 55, 181, 55, 55, 55, 88, 55, + 184, 183, 185, 186, 55, 55, 188, 189, 55, 88, + 49, 47, 187, 44, 44, 46, 46, 48, 48, 55, + + 54, 50, 49, 47, 45, 190, 5, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190 } ; -static const flex_int16_t yy_chk[571] = +static const flex_int16_t yy_chk[574] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -588,61 +589,62 @@ static const flex_int16_t yy_chk[571] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 40, 28, 27, 31, 194, 40, 28, 27, - 26, 32, 28, 193, 29, 25, 27, 188, 187, 33, - 32, 185, 184, 27, 28, 27, 31, 37, 50, 26, - - 50, 40, 28, 27, 26, 30, 28, 33, 25, 36, - 27, 29, 38, 60, 32, 37, 27, 28, 27, 31, - 35, 30, 26, 41, 30, 43, 30, 42, 36, 60, - 33, 38, 42, 35, 29, 58, 39, 43, 37, 35, - 64, 62, 57, 41, 30, 39, 58, 30, 39, 30, - 57, 36, 60, 74, 38, 61, 42, 35, 62, 39, - 61, 43, 35, 64, 39, 67, 41, 63, 74, 39, - 58, 66, 39, 65, 57, 68, 63, 69, 67, 183, - 70, 62, 39, 182, 61, 67, 64, 39, 71, 65, - 66, 74, 80, 72, 68, 65, 75, 76, 69, 70, - - 63, 75, 67, 78, 81, 180, 73, 71, 67, 72, - 79, 80, 65, 66, 73, 86, 73, 68, 65, 78, - 76, 69, 70, 81, 86, 75, 79, 82, 73, 73, - 71, 83, 72, 79, 80, 178, 177, 83, 73, 84, - 73, 85, 78, 76, 91, 82, 81, 84, 86, 79, - 89, 73, 73, 90, 93, 92, 79, 85, 95, 93, - 90, 83, 97, 89, 94, 91, 98, 95, 82, 94, - 96, 84, 92, 94, 99, 101, 103, 96, 104, 102, - 85, 100, 97, 93, 90, 105, 100, 89, 91, 98, - 99, 95, 101, 94, 105, 92, 102, 94, 104, 107, - - 103, 96, 109, 106, 112, 97, 108, 115, 107, 110, - 100, 109, 98, 99, 118, 101, 106, 110, 105, 102, - 112, 104, 113, 103, 116, 108, 120, 117, 121, 122, - 118, 113, 107, 115, 117, 109, 126, 119, 125, 129, - 106, 110, 119, 112, 134, 116, 176, 122, 108, 121, - 120, 125, 133, 118, 137, 113, 115, 133, 117, 126, - 135, 139, 129, 140, 151, 135, 119, 134, 116, 146, - 122, 141, 121, 120, 137, 125, 146, 145, 155, 140, - 174, 133, 126, 145, 150, 129, 152, 151, 139, 135, - 134, 148, 141, 150, 153, 152, 148, 137, 160, 156, - - 146, 155, 140, 153, 157, 158, 164, 145, 156, 173, - 151, 139, 166, 157, 163, 141, 168, 150, 158, 152, - 148, 160, 167, 163, 155, 165, 170, 153, 175, 164, - 165, 169, 156, 167, 179, 166, 186, 157, 168, 172, - 169, 179, 158, 171, 160, 162, 175, 163, 170, 161, - 181, 186, 164, 159, 165, 154, 149, 167, 166, 181, - 147, 168, 144, 143, 169, 179, 142, 138, 136, 175, - 132, 170, 131, 130, 186, 128, 127, 124, 123, 114, - 111, 88, 87, 181, 190, 190, 191, 191, 192, 192, - 77, 59, 56, 51, 48, 46, 34, 24, 17, 11, - - 10, 9, 5, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 189, 189, 189, 189, 189, 189, 189 + 22, 26, 195, 28, 27, 31, 194, 189, 28, 27, + 26, 32, 28, 188, 29, 25, 27, 186, 35, 25, + 32, 33, 185, 27, 28, 27, 31, 37, 50, 26, + + 50, 35, 28, 27, 26, 30, 28, 35, 25, 33, + 27, 29, 25, 61, 32, 37, 27, 28, 27, 31, + 36, 30, 26, 38, 30, 35, 30, 57, 39, 61, + 35, 40, 33, 41, 29, 57, 40, 39, 37, 36, + 39, 42, 38, 59, 30, 43, 42, 30, 65, 30, + 63, 39, 61, 41, 59, 184, 39, 43, 62, 57, + 40, 39, 36, 62, 39, 38, 64, 63, 70, 66, + 42, 65, 73, 67, 39, 64, 41, 69, 59, 39, + 68, 43, 71, 72, 77, 66, 81, 62, 73, 70, + 63, 66, 67, 68, 65, 183, 69, 181, 75, 64, + + 68, 71, 72, 179, 178, 81, 177, 77, 66, 175, + 74, 73, 70, 75, 66, 67, 76, 68, 74, 69, + 74, 76, 79, 68, 71, 72, 90, 80, 81, 82, + 77, 83, 74, 74, 84, 86, 75, 92, 79, 90, + 84, 174, 74, 80, 74, 76, 85, 98, 82, 83, + 80, 86, 91, 87, 85, 74, 74, 173, 92, 91, + 93, 79, 87, 90, 84, 94, 80, 98, 99, 172, + 94, 82, 83, 80, 86, 95, 96, 93, 85, 100, + 95, 92, 97, 91, 95, 96, 87, 101, 102, 97, + 98, 99, 101, 103, 94, 100, 104, 105, 106, 107, + + 93, 163, 108, 109, 95, 102, 110, 106, 95, 96, + 103, 108, 107, 97, 99, 110, 101, 105, 100, 111, + 104, 113, 109, 114, 116, 117, 123, 111, 102, 121, + 162, 106, 114, 103, 118, 108, 107, 113, 119, 110, + 105, 118, 120, 104, 123, 109, 117, 120, 126, 122, + 116, 111, 127, 121, 119, 130, 114, 134, 135, 136, + 113, 126, 134, 138, 136, 118, 141, 123, 140, 117, + 122, 120, 160, 116, 155, 127, 121, 119, 130, 142, + 147, 135, 141, 138, 146, 126, 134, 147, 136, 152, + 146, 149, 156, 122, 151, 140, 149, 150, 127, 153, + + 142, 130, 161, 151, 135, 141, 138, 154, 153, 148, + 157, 147, 152, 158, 146, 156, 154, 159, 140, 157, + 149, 165, 158, 142, 164, 161, 166, 151, 167, 145, + 159, 166, 153, 164, 168, 152, 169, 171, 156, 144, + 154, 143, 176, 157, 165, 168, 158, 170, 161, 187, + 139, 167, 137, 182, 159, 166, 170, 164, 169, 171, + 176, 180, 182, 133, 187, 132, 131, 165, 180, 168, + 129, 128, 125, 124, 167, 115, 112, 89, 88, 78, + 170, 169, 171, 176, 60, 58, 182, 187, 56, 51, + 48, 46, 180, 191, 191, 192, 192, 193, 193, 34, + + 24, 17, 11, 10, 9, 5, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190 } ; /* The intent behind this definition is that it'll catch @@ -677,7 +679,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 681 "lex_sql.cpp" +#line 683 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -686,7 +688,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 690 "lex_sql.cpp" +#line 692 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -972,7 +974,7 @@ YY_DECL #line 75 "lex_sql.l" -#line 976 "lex_sql.cpp" +#line 978 "lex_sql.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -999,13 +1001,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 190 ) + if ( yy_current_state >= 191 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 504 ); + while ( yy_base[yy_current_state] != 507 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1238,57 +1240,57 @@ RETURN_TOKEN(BY); case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(STORAGE); +RETURN_TOKEN(AS); YY_BREAK case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(FORMAT); +RETURN_TOKEN(STORAGE); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(LIKE); +RETURN_TOKEN(FORMAT); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(NOT); +RETURN_TOKEN(LIKE); YY_BREAK case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +RETURN_TOKEN(NOT); YY_BREAK case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(LBRACE); +yylval->string=strdup(yytext); RETURN_TOKEN(ID); YY_BREAK case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(RBRACE); +RETURN_TOKEN(LBRACE); YY_BREAK case 49: YY_RULE_SETUP -#line 128 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 127 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 50: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(EQ); +RETURN_TOKEN(COMMA); YY_BREAK case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(EQ); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LE); YY_BREAK case 53: YY_RULE_SETUP @@ -1298,34 +1300,33 @@ RETURN_TOKEN(NE); case 54: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(NE); YY_BREAK case 55: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(LT); YY_BREAK case 56: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(GE); YY_BREAK case 57: -#line 138 "lex_sql.l" +YY_RULE_SETUP +#line 136 "lex_sql.l" +RETURN_TOKEN(GT); + YY_BREAK case 58: #line 139 "lex_sql.l" case 59: #line 140 "lex_sql.l" case 60: -YY_RULE_SETUP -#line 140 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK +#line 141 "lex_sql.l" case 61: -/* rule 61 can match eol */ YY_RULE_SETUP #line 141 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); +{ return yytext[0]; } YY_BREAK case 62: /* rule 62 can match eol */ @@ -1334,16 +1335,22 @@ YY_RULE_SETUP yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 63: +/* rule 63 can match eol */ YY_RULE_SETUP -#line 144 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; +#line 143 "lex_sql.l" +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 64: YY_RULE_SETUP #line 145 "lex_sql.l" +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 65: +YY_RULE_SETUP +#line 146 "lex_sql.l" ECHO; YY_BREAK -#line 1347 "lex_sql.cpp" +#line 1354 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1643,7 +1650,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 190 ) + if ( yy_current_state >= 191 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1672,11 +1679,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 190 ) + if ( yy_current_state >= 191 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 189); + yy_is_jam = (yy_current_state == 190); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2499,7 +2506,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 145 "lex_sql.l" +#line 146 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 34bdfcd4..f3414117 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -541,7 +541,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 145 "lex_sql.l" +#line 146 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 011ffb3e..ed932c09 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -117,6 +117,7 @@ INFILE RETURN_TOKEN(INFILE); EXPLAIN RETURN_TOKEN(EXPLAIN); GROUP RETURN_TOKEN(GROUP); BY RETURN_TOKEN(BY); +AS RETURN_TOKEN(AS); STORAGE RETURN_TOKEN(STORAGE); FORMAT RETURN_TOKEN(FORMAT); LIKE RETURN_TOKEN(LIKE); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 293471c5..ffa9e79a 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -153,106 +153,108 @@ enum yysymbol_kind_t YYSYMBOL_YYerror = 1, /* error */ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_BY = 4, /* BY */ - YYSYMBOL_CREATE = 5, /* CREATE */ - YYSYMBOL_DROP = 6, /* DROP */ - YYSYMBOL_GROUP = 7, /* GROUP */ - YYSYMBOL_TABLE = 8, /* TABLE */ - YYSYMBOL_TABLES = 9, /* TABLES */ - YYSYMBOL_INDEX = 10, /* INDEX */ - YYSYMBOL_CALC = 11, /* CALC */ - YYSYMBOL_SELECT = 12, /* SELECT */ - YYSYMBOL_DESC = 13, /* DESC */ - YYSYMBOL_SHOW = 14, /* SHOW */ - YYSYMBOL_SYNC = 15, /* SYNC */ - YYSYMBOL_INSERT = 16, /* INSERT */ - YYSYMBOL_DELETE = 17, /* DELETE */ - YYSYMBOL_UPDATE = 18, /* UPDATE */ - YYSYMBOL_LBRACE = 19, /* LBRACE */ - YYSYMBOL_RBRACE = 20, /* RBRACE */ - YYSYMBOL_COMMA = 21, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 22, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 23, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 24, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 25, /* INT_T */ - YYSYMBOL_STRING_T = 26, /* STRING_T */ - YYSYMBOL_FLOAT_T = 27, /* FLOAT_T */ - YYSYMBOL_DATE_T = 28, /* DATE_T */ - YYSYMBOL_HELP = 29, /* HELP */ - YYSYMBOL_EXIT = 30, /* EXIT */ - YYSYMBOL_DOT = 31, /* DOT */ - YYSYMBOL_INTO = 32, /* INTO */ - YYSYMBOL_VALUES = 33, /* VALUES */ - YYSYMBOL_FROM = 34, /* FROM */ - YYSYMBOL_WHERE = 35, /* WHERE */ - YYSYMBOL_AND = 36, /* AND */ - YYSYMBOL_SET = 37, /* SET */ - YYSYMBOL_ON = 38, /* ON */ - YYSYMBOL_LOAD = 39, /* LOAD */ - YYSYMBOL_DATA = 40, /* DATA */ - YYSYMBOL_INFILE = 41, /* INFILE */ - YYSYMBOL_EXPLAIN = 42, /* EXPLAIN */ - YYSYMBOL_STORAGE = 43, /* STORAGE */ - YYSYMBOL_FORMAT = 44, /* FORMAT */ - YYSYMBOL_EQ = 45, /* EQ */ - YYSYMBOL_LT = 46, /* LT */ - YYSYMBOL_GT = 47, /* GT */ - YYSYMBOL_LE = 48, /* LE */ - YYSYMBOL_GE = 49, /* GE */ - YYSYMBOL_NE = 50, /* NE */ - YYSYMBOL_LIKE = 51, /* LIKE */ - YYSYMBOL_NOT = 52, /* NOT */ - YYSYMBOL_NUMBER = 53, /* NUMBER */ - YYSYMBOL_FLOAT = 54, /* FLOAT */ - YYSYMBOL_ID = 55, /* ID */ - YYSYMBOL_SSS = 56, /* SSS */ - YYSYMBOL_57_ = 57, /* '+' */ - YYSYMBOL_58_ = 58, /* '-' */ - YYSYMBOL_59_ = 59, /* '*' */ - YYSYMBOL_60_ = 60, /* '/' */ - YYSYMBOL_UMINUS = 61, /* UMINUS */ - YYSYMBOL_YYACCEPT = 62, /* $accept */ - YYSYMBOL_commands = 63, /* commands */ - YYSYMBOL_command_wrapper = 64, /* command_wrapper */ - YYSYMBOL_exit_stmt = 65, /* exit_stmt */ - YYSYMBOL_help_stmt = 66, /* help_stmt */ - YYSYMBOL_sync_stmt = 67, /* sync_stmt */ - YYSYMBOL_begin_stmt = 68, /* begin_stmt */ - YYSYMBOL_commit_stmt = 69, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 70, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 71, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 72, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 73, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 74, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 75, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 76, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 77, /* attr_def_list */ - YYSYMBOL_attr_def = 78, /* attr_def */ - YYSYMBOL_number = 79, /* number */ - YYSYMBOL_type = 80, /* type */ - YYSYMBOL_insert_stmt = 81, /* insert_stmt */ - YYSYMBOL_value_list = 82, /* value_list */ - YYSYMBOL_value = 83, /* value */ - YYSYMBOL_storage_format = 84, /* storage_format */ - YYSYMBOL_delete_stmt = 85, /* delete_stmt */ - YYSYMBOL_update_stmt = 86, /* update_stmt */ - YYSYMBOL_select_stmt = 87, /* select_stmt */ - YYSYMBOL_calc_stmt = 88, /* calc_stmt */ - YYSYMBOL_expression_list = 89, /* expression_list */ - YYSYMBOL_expression = 90, /* expression */ - YYSYMBOL_aggr_func_expr = 91, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 92, /* rel_attr */ - YYSYMBOL_relation = 93, /* relation */ - YYSYMBOL_rel_list = 94, /* rel_list */ - YYSYMBOL_where = 95, /* where */ - YYSYMBOL_condition_list = 96, /* condition_list */ - YYSYMBOL_condition = 97, /* condition */ - YYSYMBOL_comp_op = 98, /* comp_op */ - YYSYMBOL_group_by = 99, /* group_by */ - YYSYMBOL_load_data_stmt = 100, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 101, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 102, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 103 /* opt_semicolon */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_BY = 5, /* BY */ + YYSYMBOL_CREATE = 6, /* CREATE */ + YYSYMBOL_DROP = 7, /* DROP */ + YYSYMBOL_GROUP = 8, /* GROUP */ + YYSYMBOL_TABLE = 9, /* TABLE */ + YYSYMBOL_TABLES = 10, /* TABLES */ + YYSYMBOL_INDEX = 11, /* INDEX */ + YYSYMBOL_CALC = 12, /* CALC */ + YYSYMBOL_SELECT = 13, /* SELECT */ + YYSYMBOL_DESC = 14, /* DESC */ + YYSYMBOL_SHOW = 15, /* SHOW */ + YYSYMBOL_SYNC = 16, /* SYNC */ + YYSYMBOL_INSERT = 17, /* INSERT */ + YYSYMBOL_DELETE = 18, /* DELETE */ + YYSYMBOL_UPDATE = 19, /* UPDATE */ + YYSYMBOL_LBRACE = 20, /* LBRACE */ + YYSYMBOL_RBRACE = 21, /* RBRACE */ + YYSYMBOL_COMMA = 22, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 23, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 24, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 25, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 26, /* INT_T */ + YYSYMBOL_STRING_T = 27, /* STRING_T */ + YYSYMBOL_FLOAT_T = 28, /* FLOAT_T */ + YYSYMBOL_DATE_T = 29, /* DATE_T */ + YYSYMBOL_HELP = 30, /* HELP */ + YYSYMBOL_EXIT = 31, /* EXIT */ + YYSYMBOL_DOT = 32, /* DOT */ + YYSYMBOL_INTO = 33, /* INTO */ + YYSYMBOL_VALUES = 34, /* VALUES */ + YYSYMBOL_FROM = 35, /* FROM */ + YYSYMBOL_WHERE = 36, /* WHERE */ + YYSYMBOL_AND = 37, /* AND */ + YYSYMBOL_SET = 38, /* SET */ + YYSYMBOL_ON = 39, /* ON */ + YYSYMBOL_LOAD = 40, /* LOAD */ + YYSYMBOL_DATA = 41, /* DATA */ + YYSYMBOL_INFILE = 42, /* INFILE */ + YYSYMBOL_EXPLAIN = 43, /* EXPLAIN */ + YYSYMBOL_STORAGE = 44, /* STORAGE */ + YYSYMBOL_FORMAT = 45, /* FORMAT */ + YYSYMBOL_EQ = 46, /* EQ */ + YYSYMBOL_LT = 47, /* LT */ + YYSYMBOL_GT = 48, /* GT */ + YYSYMBOL_LE = 49, /* LE */ + YYSYMBOL_GE = 50, /* GE */ + YYSYMBOL_NE = 51, /* NE */ + YYSYMBOL_LIKE = 52, /* LIKE */ + YYSYMBOL_NOT = 53, /* NOT */ + YYSYMBOL_NUMBER = 54, /* NUMBER */ + YYSYMBOL_FLOAT = 55, /* FLOAT */ + YYSYMBOL_ID = 56, /* ID */ + YYSYMBOL_SSS = 57, /* SSS */ + YYSYMBOL_58_ = 58, /* '+' */ + YYSYMBOL_59_ = 59, /* '-' */ + YYSYMBOL_60_ = 60, /* '*' */ + YYSYMBOL_61_ = 61, /* '/' */ + YYSYMBOL_UMINUS = 62, /* UMINUS */ + YYSYMBOL_YYACCEPT = 63, /* $accept */ + YYSYMBOL_commands = 64, /* commands */ + YYSYMBOL_command_wrapper = 65, /* command_wrapper */ + YYSYMBOL_exit_stmt = 66, /* exit_stmt */ + YYSYMBOL_help_stmt = 67, /* help_stmt */ + YYSYMBOL_sync_stmt = 68, /* sync_stmt */ + YYSYMBOL_begin_stmt = 69, /* begin_stmt */ + YYSYMBOL_commit_stmt = 70, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 71, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 72, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 73, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 74, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 75, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 76, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 77, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 78, /* attr_def_list */ + YYSYMBOL_attr_def = 79, /* attr_def */ + YYSYMBOL_number = 80, /* number */ + YYSYMBOL_type = 81, /* type */ + YYSYMBOL_insert_stmt = 82, /* insert_stmt */ + YYSYMBOL_value_list = 83, /* value_list */ + YYSYMBOL_value = 84, /* value */ + YYSYMBOL_storage_format = 85, /* storage_format */ + YYSYMBOL_delete_stmt = 86, /* delete_stmt */ + YYSYMBOL_update_stmt = 87, /* update_stmt */ + YYSYMBOL_select_stmt = 88, /* select_stmt */ + YYSYMBOL_calc_stmt = 89, /* calc_stmt */ + YYSYMBOL_expression_list = 90, /* expression_list */ + YYSYMBOL_expression = 91, /* expression */ + YYSYMBOL_alias = 92, /* alias */ + YYSYMBOL_aggr_func_expr = 93, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 94, /* rel_attr */ + YYSYMBOL_relation = 95, /* relation */ + YYSYMBOL_rel_list = 96, /* rel_list */ + YYSYMBOL_where = 97, /* where */ + YYSYMBOL_condition_list = 98, /* condition_list */ + YYSYMBOL_condition = 99, /* condition */ + YYSYMBOL_comp_op = 100, /* comp_op */ + YYSYMBOL_group_by = 101, /* group_by */ + YYSYMBOL_load_data_stmt = 102, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 103, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 104, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 105 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -583,19 +585,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 154 +#define YYLAST 158 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 62 +#define YYNTOKENS 63 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 42 +#define YYNNTS 43 /* YYNRULES -- Number of rules. */ -#define YYNRULES 97 +#define YYNRULES 100 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 175 +#define YYNSTATES 179 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 312 +#define YYMAXUTOK 313 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -613,7 +615,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 59, 57, 2, 58, 2, 60, 2, 2, + 2, 2, 60, 58, 2, 59, 2, 61, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -640,23 +642,24 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 61 + 55, 56, 57, 62 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 192, 192, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 223, 229, 234, 240, 246, 252, 258, - 265, 271, 279, 293, 303, 327, 330, 343, 351, 361, - 364, 365, 366, 367, 370, 387, 390, 401, 405, 409, - 418, 421, 428, 440, 455, 480, 489, 494, 505, 508, - 511, 514, 517, 521, 524, 529, 535, 538, 544, 552, - 558, 563, 573, 578, 583, 597, 600, 606, 609, 614, - 621, 633, 645, 657, 672, 673, 674, 675, 676, 677, - 678, 679, 685, 690, 703, 711, 721, 722 + 0, 194, 194, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 225, 231, 236, 242, 248, 254, 260, + 267, 273, 281, 295, 305, 329, 332, 345, 353, 363, + 366, 367, 368, 369, 372, 389, 392, 403, 407, 411, + 420, 423, 430, 442, 457, 482, 491, 500, 515, 518, + 521, 524, 527, 531, 534, 539, 545, 548, 555, 558, + 561, 566, 574, 580, 585, 595, 600, 605, 619, 622, + 628, 631, 636, 643, 655, 667, 679, 694, 695, 696, + 697, 698, 699, 700, 701, 707, 712, 725, 733, 743, + 744 }; #endif @@ -672,12 +675,12 @@ static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "BY", - "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", "SELECT", - "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", - "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "STRING_T", - "FLOAT_T", "DATE_T", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", - "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "BY", "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", + "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", + "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", + "STRING_T", "FLOAT_T", "DATE_T", "HELP", "EXIT", "DOT", "INTO", "VALUES", + "FROM", "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "NOT", "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", @@ -686,7 +689,7 @@ static const char *const yytname[] = "create_index_stmt", "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", "number", "type", "insert_stmt", "value_list", "value", "storage_format", "delete_stmt", "update_stmt", - "select_stmt", "calc_stmt", "expression_list", "expression", + "select_stmt", "calc_stmt", "expression_list", "expression", "alias", "aggr_func_expr", "rel_attr", "relation", "rel_list", "where", "condition_list", "condition", "comp_op", "group_by", "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR @@ -699,7 +702,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-102) +#define YYPACT_NINF (-104) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -713,24 +716,24 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int8 yypact[] = { - 73, 20, 26, 10, 10, -37, 6, -102, 9, 11, - 7, -102, -102, -102, -102, -102, 16, 21, 73, 51, - 69, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, 25, 27, 28, 37, 10, -102, -102, -15, -102, - 10, -102, -102, -102, 17, -102, -102, 47, -102, -102, - 39, 44, 63, 56, 64, -102, -102, -102, -102, 85, - 68, -102, 70, -3, -6, 52, -102, 10, 10, 10, - 10, 10, 54, 78, 79, 58, -21, 60, 62, 65, - 66, -102, -102, 98, -102, -102, -20, -20, -102, -102, - -102, 101, 79, 100, -33, -102, 80, -102, 91, -1, - 103, 111, -102, -102, 54, -102, -21, 102, -40, -40, - -102, 95, -21, 124, -102, -102, -102, -102, 115, 62, - 116, 82, -102, -102, 114, -102, -102, -102, -102, -102, - -102, -102, 87, -33, -33, -33, 79, 84, 88, 103, - 97, 122, -21, 123, -102, -102, -102, -102, -102, -102, - -102, -102, -102, 125, -102, 104, -102, -102, 114, -102, - -102, 99, -102, 92, -102 + 87, 44, 54, 27, 27, -27, 20, -104, 2, 1, + 8, -104, -104, -104, -104, -104, 10, 26, 87, 68, + 72, -104, -104, -104, -104, -104, -104, -104, -104, -104, + -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, + -104, 22, 23, 24, 29, 27, -104, -104, -15, -104, + 27, -104, -104, -104, -2, -104, -104, 53, -104, -104, + 33, 34, 57, 45, 50, -104, -104, -104, -104, 76, + 58, -104, 69, -9, 17, 51, -104, 59, -104, 27, + 27, 27, 27, 91, 60, 75, 78, 63, -23, 64, + 66, 67, 70, -104, -104, 99, -104, -104, -42, -42, + -104, -104, 27, -104, 102, 78, 108, -47, -104, 83, + -104, 98, -13, 110, 113, -104, -104, -104, 60, -104, + -23, 103, -25, -25, -104, 97, -23, 127, -104, -104, + -104, -104, 117, 66, 118, 82, -104, -104, 119, -104, + -104, -104, -104, -104, -104, -104, 88, -47, -47, -47, + 78, 86, 89, 110, 100, 124, -23, 125, -104, -104, + -104, -104, -104, -104, -104, -104, -104, 126, -104, 104, + -104, -104, 119, -104, -104, 105, -104, 92, -104 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -740,42 +743,42 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 96, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 99, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 47, 48, 70, 49, - 0, 66, 64, 55, 56, 67, 65, 0, 31, 30, - 0, 0, 0, 0, 0, 94, 1, 97, 2, 0, - 0, 29, 0, 0, 0, 0, 63, 0, 0, 0, - 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, - 0, 62, 69, 0, 71, 57, 58, 59, 60, 61, - 72, 73, 75, 0, 77, 52, 0, 95, 0, 0, - 35, 0, 33, 68, 0, 92, 0, 70, 0, 0, - 76, 78, 0, 0, 40, 41, 42, 43, 38, 0, - 0, 0, 74, 54, 45, 84, 85, 86, 87, 88, - 89, 90, 0, 0, 0, 77, 75, 0, 0, 35, - 50, 0, 0, 0, 91, 81, 83, 80, 82, 79, - 53, 93, 39, 0, 36, 0, 34, 32, 45, 44, - 37, 0, 46, 0, 51 + 20, 0, 0, 0, 0, 0, 47, 48, 73, 49, + 0, 66, 64, 55, 68, 67, 65, 0, 31, 30, + 0, 0, 0, 0, 0, 97, 1, 100, 2, 0, + 0, 29, 0, 0, 0, 0, 63, 0, 69, 0, + 0, 0, 0, 56, 0, 0, 78, 0, 0, 0, + 0, 0, 0, 62, 72, 0, 74, 70, 58, 59, + 60, 61, 0, 75, 76, 78, 0, 80, 52, 0, + 98, 0, 0, 35, 0, 33, 71, 57, 0, 95, + 0, 73, 0, 0, 79, 81, 0, 0, 40, 41, + 42, 43, 38, 0, 0, 0, 77, 54, 45, 87, + 88, 89, 90, 91, 92, 93, 0, 0, 0, 80, + 78, 0, 0, 35, 50, 0, 0, 0, 94, 84, + 86, 83, 85, 82, 53, 96, 39, 0, 36, 0, + 34, 32, 45, 44, 37, 0, 46, 0, 51 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -102, -102, 128, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, 0, 22, -102, -102, -102, - -18, -85, -102, -102, -102, -102, -102, -4, 48, -102, - -101, -102, 38, -100, 8, -102, 35, -102, -102, -102, - -102, -102 + -104, -104, 132, -104, -104, -104, -104, -104, -104, -104, + -104, -104, -104, -104, -104, -1, 21, -104, -104, -104, + -19, -87, -104, -104, -104, -104, -104, -4, -39, -104, + -104, -103, -104, 37, -102, 7, -104, 35, -104, -104, + -104, -104, -104 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 130, 110, 163, 128, 33, - 153, 52, 166, 34, 35, 36, 37, 53, 54, 55, - 56, 101, 102, 105, 120, 121, 143, 133, 38, 39, - 40, 68 + 28, 29, 30, 31, 32, 134, 113, 167, 132, 33, + 157, 52, 170, 34, 35, 36, 37, 53, 54, 83, + 55, 56, 104, 105, 108, 124, 125, 147, 137, 38, + 39, 40, 68 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -783,81 +786,82 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 57, 107, 115, 119, 74, 135, 136, 137, 138, 139, - 140, 141, 142, 45, 92, 59, 75, 91, 58, 118, - 46, 47, 117, 49, 124, 125, 126, 127, 41, 45, - 42, 134, 46, 47, 43, 49, 44, 146, 77, 80, - 81, 60, 156, 158, 119, 61, 160, 46, 47, 48, - 49, 66, 50, 51, 78, 79, 80, 81, 155, 157, - 118, 64, 62, 46, 47, 48, 49, 168, 50, 51, - 93, 63, 67, 95, 78, 79, 80, 81, 1, 2, - 69, 82, 70, 71, 3, 4, 5, 6, 7, 8, - 9, 10, 72, 73, 83, 11, 12, 13, 76, 84, - 85, 86, 14, 15, 88, 87, 89, 94, 90, 100, - 16, 103, 17, 106, 104, 18, 108, 109, 113, 116, - 111, 112, 114, 123, 129, 122, 96, 97, 98, 99, - 131, 145, 147, 75, 148, 152, 150, 151, 154, 161, - 165, 162, 167, 169, 173, 170, 65, 174, 171, 164, - 172, 149, 132, 159, 144 + 57, 110, 77, 119, 123, 74, 73, 46, 47, 121, + 49, 76, 93, 128, 129, 130, 131, 75, 81, 82, + 122, 139, 140, 141, 142, 143, 144, 145, 146, 58, + 59, 46, 47, 138, 49, 60, 61, 45, 94, 150, + 98, 99, 100, 101, 160, 162, 123, 45, 164, 79, + 80, 81, 82, 41, 78, 42, 79, 80, 81, 82, + 159, 161, 122, 43, 62, 44, 63, 64, 66, 172, + 95, 46, 47, 48, 49, 67, 50, 51, 69, 70, + 71, 46, 47, 48, 49, 72, 50, 51, 84, 85, + 86, 88, 89, 1, 2, 87, 90, 91, 117, 3, + 4, 5, 6, 7, 8, 9, 10, 96, 92, 106, + 11, 12, 13, 102, 107, 97, 103, 14, 15, 109, + 116, 111, 112, 114, 118, 16, 115, 17, 120, 126, + 18, 127, 133, 135, 149, 75, 151, 152, 155, 154, + 158, 156, 165, 166, 169, 171, 173, 174, 178, 175, + 65, 177, 168, 176, 153, 136, 163, 0, 148 }; -static const yytype_uint8 yycheck[] = +static const yytype_int16 yycheck[] = { - 4, 86, 102, 104, 19, 45, 46, 47, 48, 49, - 50, 51, 52, 19, 20, 9, 31, 20, 55, 104, - 53, 54, 55, 56, 25, 26, 27, 28, 8, 19, - 10, 116, 53, 54, 8, 56, 10, 122, 21, 59, - 60, 32, 143, 144, 145, 34, 146, 53, 54, 55, - 56, 0, 58, 59, 57, 58, 59, 60, 143, 144, - 145, 40, 55, 53, 54, 55, 56, 152, 58, 59, - 74, 55, 3, 77, 57, 58, 59, 60, 5, 6, - 55, 34, 55, 55, 11, 12, 13, 14, 15, 16, - 17, 18, 55, 45, 55, 22, 23, 24, 50, 55, - 37, 45, 29, 30, 19, 41, 38, 55, 38, 55, - 37, 33, 39, 55, 35, 42, 56, 55, 20, 19, - 55, 55, 21, 32, 21, 45, 78, 79, 80, 81, - 19, 36, 8, 31, 19, 21, 20, 55, 51, 55, - 43, 53, 20, 20, 45, 20, 18, 55, 44, 149, - 168, 129, 114, 145, 119 + 4, 88, 4, 105, 107, 20, 45, 54, 55, 56, + 57, 50, 21, 26, 27, 28, 29, 32, 60, 61, + 107, 46, 47, 48, 49, 50, 51, 52, 53, 56, + 10, 54, 55, 120, 57, 33, 35, 20, 21, 126, + 79, 80, 81, 82, 147, 148, 149, 20, 150, 58, + 59, 60, 61, 9, 56, 11, 58, 59, 60, 61, + 147, 148, 149, 9, 56, 11, 56, 41, 0, 156, + 74, 54, 55, 56, 57, 3, 59, 60, 56, 56, + 56, 54, 55, 56, 57, 56, 59, 60, 35, 56, + 56, 46, 42, 6, 7, 38, 20, 39, 102, 12, + 13, 14, 15, 16, 17, 18, 19, 56, 39, 34, + 23, 24, 25, 22, 36, 56, 56, 30, 31, 56, + 21, 57, 56, 56, 22, 38, 56, 40, 20, 46, + 43, 33, 22, 20, 37, 32, 9, 20, 56, 21, + 52, 22, 56, 54, 44, 21, 21, 21, 56, 45, + 18, 46, 153, 172, 133, 118, 149, -1, 123 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_int8 yystos[] = { - 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, - 18, 22, 23, 24, 29, 30, 37, 39, 42, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 81, 85, 86, 87, 88, 100, 101, - 102, 8, 10, 8, 10, 19, 53, 54, 55, 56, - 58, 59, 83, 89, 90, 91, 92, 89, 55, 9, - 32, 34, 55, 55, 40, 64, 0, 3, 103, 55, - 55, 55, 55, 90, 19, 31, 90, 21, 57, 58, - 59, 60, 34, 55, 55, 37, 45, 41, 19, 38, - 38, 20, 20, 89, 55, 89, 90, 90, 90, 90, - 55, 93, 94, 33, 35, 95, 55, 83, 56, 55, - 78, 55, 55, 20, 21, 95, 19, 55, 83, 92, - 96, 97, 45, 32, 25, 26, 27, 28, 80, 21, - 77, 19, 94, 99, 83, 45, 46, 47, 48, 49, - 50, 51, 52, 98, 98, 36, 83, 8, 19, 78, - 20, 55, 21, 82, 51, 83, 92, 83, 92, 96, - 95, 55, 53, 79, 77, 43, 84, 20, 83, 20, - 20, 44, 82, 45, 55 + 0, 6, 7, 12, 13, 14, 15, 16, 17, 18, + 19, 23, 24, 25, 30, 31, 38, 40, 43, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 82, 86, 87, 88, 89, 102, 103, + 104, 9, 11, 9, 11, 20, 54, 55, 56, 57, + 59, 60, 84, 90, 91, 93, 94, 90, 56, 10, + 33, 35, 56, 56, 41, 65, 0, 3, 105, 56, + 56, 56, 56, 91, 20, 32, 91, 4, 56, 58, + 59, 60, 61, 92, 35, 56, 56, 38, 46, 42, + 20, 39, 39, 21, 21, 90, 56, 56, 91, 91, + 91, 91, 22, 56, 95, 96, 34, 36, 97, 56, + 84, 57, 56, 79, 56, 56, 21, 90, 22, 97, + 20, 56, 84, 94, 98, 99, 46, 33, 26, 27, + 28, 29, 81, 22, 78, 20, 96, 101, 84, 46, + 47, 48, 49, 50, 51, 52, 53, 100, 100, 37, + 84, 9, 20, 79, 21, 56, 22, 83, 52, 84, + 94, 84, 94, 98, 97, 56, 54, 80, 78, 44, + 85, 21, 84, 21, 21, 45, 83, 46, 56 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 62, 63, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 77, 78, 78, 79, - 80, 80, 80, 80, 81, 82, 82, 83, 83, 83, - 84, 84, 85, 86, 87, 88, 89, 89, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 91, 91, - 92, 92, 93, 94, 94, 95, 95, 96, 96, 96, - 97, 97, 97, 97, 98, 98, 98, 98, 98, 98, - 98, 98, 99, 100, 101, 102, 103, 103 + 0, 63, 64, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 78, 79, 79, 80, + 81, 81, 81, 81, 82, 83, 83, 84, 84, 84, + 85, 85, 86, 87, 88, 89, 90, 90, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 92, 92, + 92, 93, 93, 94, 94, 95, 96, 96, 97, 97, + 98, 98, 98, 99, 99, 99, 99, 100, 100, 100, + 100, 100, 100, 100, 100, 101, 102, 103, 104, 105, + 105 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -868,11 +872,12 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 8, 5, 8, 0, 3, 5, 2, 1, 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, - 0, 4, 4, 7, 6, 2, 1, 3, 3, 3, - 3, 3, 3, 2, 1, 1, 1, 1, 4, 3, - 1, 3, 1, 1, 3, 0, 2, 0, 1, 3, - 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 2, 0, 7, 2, 4, 0, 1 + 0, 4, 4, 7, 6, 2, 2, 4, 3, 3, + 3, 3, 3, 2, 1, 1, 1, 1, 0, 1, + 2, 4, 3, 1, 3, 1, 1, 3, 0, 2, + 0, 1, 3, 3, 3, 3, 3, 1, 1, 1, + 1, 1, 1, 1, 2, 0, 7, 2, 4, 0, + 1 }; @@ -1734,93 +1739,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 193 "yacc_sql.y" +#line 195 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1743 "yacc_sql.cpp" +#line 1748 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 223 "yacc_sql.y" +#line 225 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1752 "yacc_sql.cpp" +#line 1757 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 229 "yacc_sql.y" +#line 231 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1760 "yacc_sql.cpp" +#line 1765 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 234 "yacc_sql.y" +#line 236 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1768 "yacc_sql.cpp" +#line 1773 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 240 "yacc_sql.y" +#line 242 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1776 "yacc_sql.cpp" +#line 1781 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 246 "yacc_sql.y" +#line 248 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1784 "yacc_sql.cpp" +#line 1789 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 252 "yacc_sql.y" +#line 254 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1792 "yacc_sql.cpp" +#line 1797 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 258 "yacc_sql.y" +#line 260 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1802 "yacc_sql.cpp" +#line 1807 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 265 "yacc_sql.y" +#line 267 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1810 "yacc_sql.cpp" +#line 1815 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 271 "yacc_sql.y" +#line 273 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1820 "yacc_sql.cpp" +#line 1825 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 280 "yacc_sql.y" +#line 282 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1831,11 +1836,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1835 "yacc_sql.cpp" +#line 1840 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 294 "yacc_sql.y" +#line 296 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1843,11 +1848,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1847 "yacc_sql.cpp" +#line 1852 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 304 "yacc_sql.y" +#line 306 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1868,19 +1873,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1872 "yacc_sql.cpp" +#line 1877 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 327 "yacc_sql.y" +#line 329 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1880 "yacc_sql.cpp" +#line 1885 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 331 "yacc_sql.y" +#line 333 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1890,11 +1895,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1894 "yacc_sql.cpp" +#line 1899 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE */ -#line 344 "yacc_sql.y" +#line 346 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-3].number); @@ -1902,11 +1907,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = (yyvsp[-1].number); free((yyvsp[-4].string)); } -#line 1906 "yacc_sql.cpp" +#line 1911 "yacc_sql.cpp" break; case 38: /* attr_def: ID type */ -#line 352 "yacc_sql.y" +#line 354 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[0].number); @@ -1914,41 +1919,41 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; free((yyvsp[-1].string)); } -#line 1918 "yacc_sql.cpp" +#line 1923 "yacc_sql.cpp" break; case 39: /* number: NUMBER */ -#line 361 "yacc_sql.y" +#line 363 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1924 "yacc_sql.cpp" +#line 1929 "yacc_sql.cpp" break; case 40: /* type: INT_T */ -#line 364 "yacc_sql.y" +#line 366 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1930 "yacc_sql.cpp" +#line 1935 "yacc_sql.cpp" break; case 41: /* type: STRING_T */ -#line 365 "yacc_sql.y" +#line 367 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1936 "yacc_sql.cpp" +#line 1941 "yacc_sql.cpp" break; case 42: /* type: FLOAT_T */ -#line 366 "yacc_sql.y" +#line 368 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1942 "yacc_sql.cpp" +#line 1947 "yacc_sql.cpp" break; case 43: /* type: DATE_T */ -#line 367 "yacc_sql.y" +#line 369 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1948 "yacc_sql.cpp" +#line 1953 "yacc_sql.cpp" break; case 44: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 371 "yacc_sql.y" +#line 373 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1961,19 +1966,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1965 "yacc_sql.cpp" +#line 1970 "yacc_sql.cpp" break; case 45: /* value_list: %empty */ -#line 387 "yacc_sql.y" +#line 389 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 1973 "yacc_sql.cpp" +#line 1978 "yacc_sql.cpp" break; case 46: /* value_list: COMMA value value_list */ -#line 390 "yacc_sql.y" +#line 392 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -1983,56 +1988,56 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1987 "yacc_sql.cpp" +#line 1992 "yacc_sql.cpp" break; case 47: /* value: NUMBER */ -#line 401 "yacc_sql.y" +#line 403 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 1996 "yacc_sql.cpp" +#line 2001 "yacc_sql.cpp" break; case 48: /* value: FLOAT */ -#line 405 "yacc_sql.y" +#line 407 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2005 "yacc_sql.cpp" +#line 2010 "yacc_sql.cpp" break; case 49: /* value: SSS */ -#line 409 "yacc_sql.y" +#line 411 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2016 "yacc_sql.cpp" +#line 2021 "yacc_sql.cpp" break; case 50: /* storage_format: %empty */ -#line 418 "yacc_sql.y" +#line 420 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2024 "yacc_sql.cpp" +#line 2029 "yacc_sql.cpp" break; case 51: /* storage_format: STORAGE FORMAT EQ ID */ -#line 422 "yacc_sql.y" +#line 424 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2032 "yacc_sql.cpp" +#line 2037 "yacc_sql.cpp" break; case 52: /* delete_stmt: DELETE FROM ID where */ -#line 429 "yacc_sql.y" +#line 431 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2042,11 +2047,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2046 "yacc_sql.cpp" +#line 2051 "yacc_sql.cpp" break; case 53: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 441 "yacc_sql.y" +#line 443 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2059,11 +2064,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2063 "yacc_sql.cpp" +#line 2068 "yacc_sql.cpp" break; case 54: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 456 "yacc_sql.y" +#line 458 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2086,129 +2091,161 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2090 "yacc_sql.cpp" +#line 2095 "yacc_sql.cpp" break; case 55: /* calc_stmt: CALC expression_list */ -#line 481 "yacc_sql.y" +#line 483 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2100 "yacc_sql.cpp" +#line 2105 "yacc_sql.cpp" break; - case 56: /* expression_list: expression */ -#line 490 "yacc_sql.y" + case 56: /* expression_list: expression alias */ +#line 492 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; - (yyval.expression_list)->emplace_back((yyvsp[0].expression)); + if (nullptr != (yyvsp[0].string)) { + (yyvsp[-1].expression)->set_name((yyvsp[0].string)); + } + (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); + free((yyvsp[0].string)); } -#line 2109 "yacc_sql.cpp" +#line 2118 "yacc_sql.cpp" break; - case 57: /* expression_list: expression COMMA expression_list */ -#line 495 "yacc_sql.y" + case 57: /* expression_list: expression alias COMMA expression_list */ +#line 501 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); } else { (yyval.expression_list) = new std::vector>; } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); + if (nullptr != (yyvsp[-2].string)) { + (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); + } + (yyval.expression_list)->emplace_back((yyvsp[-3].expression)); + free((yyvsp[-2].string)); } -#line 2122 "yacc_sql.cpp" +#line 2135 "yacc_sql.cpp" break; case 58: /* expression: expression '+' expression */ -#line 505 "yacc_sql.y" +#line 515 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2130 "yacc_sql.cpp" +#line 2143 "yacc_sql.cpp" break; case 59: /* expression: expression '-' expression */ -#line 508 "yacc_sql.y" +#line 518 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2138 "yacc_sql.cpp" +#line 2151 "yacc_sql.cpp" break; case 60: /* expression: expression '*' expression */ -#line 511 "yacc_sql.y" +#line 521 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2146 "yacc_sql.cpp" +#line 2159 "yacc_sql.cpp" break; case 61: /* expression: expression '/' expression */ -#line 514 "yacc_sql.y" +#line 524 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2154 "yacc_sql.cpp" +#line 2167 "yacc_sql.cpp" break; case 62: /* expression: LBRACE expression RBRACE */ -#line 517 "yacc_sql.y" +#line 527 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2163 "yacc_sql.cpp" +#line 2176 "yacc_sql.cpp" break; case 63: /* expression: '-' expression */ -#line 521 "yacc_sql.y" +#line 531 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2171 "yacc_sql.cpp" +#line 2184 "yacc_sql.cpp" break; case 64: /* expression: value */ -#line 524 "yacc_sql.y" +#line 534 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2181 "yacc_sql.cpp" +#line 2194 "yacc_sql.cpp" break; case 65: /* expression: rel_attr */ -#line 529 "yacc_sql.y" +#line 539 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2192 "yacc_sql.cpp" +#line 2205 "yacc_sql.cpp" break; case 66: /* expression: '*' */ -#line 535 "yacc_sql.y" +#line 545 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2200 "yacc_sql.cpp" +#line 2213 "yacc_sql.cpp" break; case 67: /* expression: aggr_func_expr */ -#line 538 "yacc_sql.y" +#line 548 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2208 "yacc_sql.cpp" +#line 2221 "yacc_sql.cpp" break; - case 68: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 545 "yacc_sql.y" + case 68: /* alias: %empty */ +#line 555 "yacc_sql.y" + { + (yyval.string) = nullptr; + } +#line 2229 "yacc_sql.cpp" + break; + + case 69: /* alias: ID */ +#line 558 "yacc_sql.y" + { + (yyval.string) = (yyvsp[0].string); + } +#line 2237 "yacc_sql.cpp" + break; + + case 70: /* alias: AS ID */ +#line 561 "yacc_sql.y" + { + (yyval.string) = (yyvsp[0].string); + } +#line 2245 "yacc_sql.cpp" + break; + + case 71: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 567 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2216,29 +2253,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2220 "yacc_sql.cpp" +#line 2257 "yacc_sql.cpp" break; - case 69: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 553 "yacc_sql.y" + case 72: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 575 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2228 "yacc_sql.cpp" +#line 2265 "yacc_sql.cpp" break; - case 70: /* rel_attr: ID */ -#line 558 "yacc_sql.y" + case 73: /* rel_attr: ID */ +#line 580 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2238 "yacc_sql.cpp" +#line 2275 "yacc_sql.cpp" break; - case 71: /* rel_attr: ID DOT ID */ -#line 563 "yacc_sql.y" + case 74: /* rel_attr: ID DOT ID */ +#line 585 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2246,29 +2283,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2250 "yacc_sql.cpp" +#line 2287 "yacc_sql.cpp" break; - case 72: /* relation: ID */ -#line 573 "yacc_sql.y" + case 75: /* relation: ID */ +#line 595 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2258 "yacc_sql.cpp" +#line 2295 "yacc_sql.cpp" break; - case 73: /* rel_list: relation */ -#line 578 "yacc_sql.y" + case 76: /* rel_list: relation */ +#line 600 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2268 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; - case 74: /* rel_list: relation COMMA rel_list */ -#line 583 "yacc_sql.y" + case 77: /* rel_list: relation COMMA rel_list */ +#line 605 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2279,55 +2316,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2283 "yacc_sql.cpp" +#line 2320 "yacc_sql.cpp" break; - case 75: /* where: %empty */ -#line 597 "yacc_sql.y" + case 78: /* where: %empty */ +#line 619 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2291 "yacc_sql.cpp" +#line 2328 "yacc_sql.cpp" break; - case 76: /* where: WHERE condition_list */ -#line 600 "yacc_sql.y" + case 79: /* where: WHERE condition_list */ +#line 622 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2299 "yacc_sql.cpp" +#line 2336 "yacc_sql.cpp" break; - case 77: /* condition_list: %empty */ -#line 606 "yacc_sql.y" + case 80: /* condition_list: %empty */ +#line 628 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2307 "yacc_sql.cpp" +#line 2344 "yacc_sql.cpp" break; - case 78: /* condition_list: condition */ -#line 609 "yacc_sql.y" + case 81: /* condition_list: condition */ +#line 631 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2317 "yacc_sql.cpp" +#line 2354 "yacc_sql.cpp" break; - case 79: /* condition_list: condition AND condition_list */ -#line 614 "yacc_sql.y" + case 82: /* condition_list: condition AND condition_list */ +#line 636 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2327 "yacc_sql.cpp" +#line 2364 "yacc_sql.cpp" break; - case 80: /* condition: rel_attr comp_op value */ -#line 622 "yacc_sql.y" + case 83: /* condition: rel_attr comp_op value */ +#line 644 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2339,11 +2376,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2343 "yacc_sql.cpp" +#line 2380 "yacc_sql.cpp" break; - case 81: /* condition: value comp_op value */ -#line 634 "yacc_sql.y" + case 84: /* condition: value comp_op value */ +#line 656 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2355,11 +2392,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2359 "yacc_sql.cpp" +#line 2396 "yacc_sql.cpp" break; - case 82: /* condition: rel_attr comp_op rel_attr */ -#line 646 "yacc_sql.y" + case 85: /* condition: rel_attr comp_op rel_attr */ +#line 668 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2371,11 +2408,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2375 "yacc_sql.cpp" +#line 2412 "yacc_sql.cpp" break; - case 83: /* condition: value comp_op rel_attr */ -#line 658 "yacc_sql.y" + case 86: /* condition: value comp_op rel_attr */ +#line 680 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2387,67 +2424,67 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2391 "yacc_sql.cpp" +#line 2428 "yacc_sql.cpp" break; - case 84: /* comp_op: EQ */ -#line 672 "yacc_sql.y" + case 87: /* comp_op: EQ */ +#line 694 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2397 "yacc_sql.cpp" +#line 2434 "yacc_sql.cpp" break; - case 85: /* comp_op: LT */ -#line 673 "yacc_sql.y" + case 88: /* comp_op: LT */ +#line 695 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2403 "yacc_sql.cpp" +#line 2440 "yacc_sql.cpp" break; - case 86: /* comp_op: GT */ -#line 674 "yacc_sql.y" + case 89: /* comp_op: GT */ +#line 696 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2409 "yacc_sql.cpp" +#line 2446 "yacc_sql.cpp" break; - case 87: /* comp_op: LE */ -#line 675 "yacc_sql.y" + case 90: /* comp_op: LE */ +#line 697 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2415 "yacc_sql.cpp" +#line 2452 "yacc_sql.cpp" break; - case 88: /* comp_op: GE */ -#line 676 "yacc_sql.y" + case 91: /* comp_op: GE */ +#line 698 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2421 "yacc_sql.cpp" +#line 2458 "yacc_sql.cpp" break; - case 89: /* comp_op: NE */ -#line 677 "yacc_sql.y" + case 92: /* comp_op: NE */ +#line 699 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2427 "yacc_sql.cpp" +#line 2464 "yacc_sql.cpp" break; - case 90: /* comp_op: LIKE */ -#line 678 "yacc_sql.y" + case 93: /* comp_op: LIKE */ +#line 700 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2433 "yacc_sql.cpp" +#line 2470 "yacc_sql.cpp" break; - case 91: /* comp_op: NOT LIKE */ -#line 679 "yacc_sql.y" + case 94: /* comp_op: NOT LIKE */ +#line 701 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2439 "yacc_sql.cpp" +#line 2476 "yacc_sql.cpp" break; - case 92: /* group_by: %empty */ -#line 685 "yacc_sql.y" + case 95: /* group_by: %empty */ +#line 707 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2447 "yacc_sql.cpp" +#line 2484 "yacc_sql.cpp" break; - case 93: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 691 "yacc_sql.y" + case 96: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 713 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2457,20 +2494,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2461 "yacc_sql.cpp" +#line 2498 "yacc_sql.cpp" break; - case 94: /* explain_stmt: EXPLAIN command_wrapper */ -#line 704 "yacc_sql.y" + case 97: /* explain_stmt: EXPLAIN command_wrapper */ +#line 726 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2470 "yacc_sql.cpp" +#line 2507 "yacc_sql.cpp" break; - case 95: /* set_variable_stmt: SET ID EQ value */ -#line 712 "yacc_sql.y" + case 98: /* set_variable_stmt: SET ID EQ value */ +#line 734 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2478,11 +2515,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2482 "yacc_sql.cpp" +#line 2519 "yacc_sql.cpp" break; -#line 2486 "yacc_sql.cpp" +#line 2523 "yacc_sql.cpp" default: break; } @@ -2711,7 +2748,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 724 "yacc_sql.y" +#line 746 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 0d328b05..274ac47b 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -55,60 +55,61 @@ extern int yydebug; YYerror = 256, /* error */ YYUNDEF = 257, /* "invalid token" */ SEMICOLON = 258, /* SEMICOLON */ - BY = 259, /* BY */ - CREATE = 260, /* CREATE */ - DROP = 261, /* DROP */ - GROUP = 262, /* GROUP */ - TABLE = 263, /* TABLE */ - TABLES = 264, /* TABLES */ - INDEX = 265, /* INDEX */ - CALC = 266, /* CALC */ - SELECT = 267, /* SELECT */ - DESC = 268, /* DESC */ - SHOW = 269, /* SHOW */ - SYNC = 270, /* SYNC */ - INSERT = 271, /* INSERT */ - DELETE = 272, /* DELETE */ - UPDATE = 273, /* UPDATE */ - LBRACE = 274, /* LBRACE */ - RBRACE = 275, /* RBRACE */ - COMMA = 276, /* COMMA */ - TRX_BEGIN = 277, /* TRX_BEGIN */ - TRX_COMMIT = 278, /* TRX_COMMIT */ - TRX_ROLLBACK = 279, /* TRX_ROLLBACK */ - INT_T = 280, /* INT_T */ - STRING_T = 281, /* STRING_T */ - FLOAT_T = 282, /* FLOAT_T */ - DATE_T = 283, /* DATE_T */ - HELP = 284, /* HELP */ - EXIT = 285, /* EXIT */ - DOT = 286, /* DOT */ - INTO = 287, /* INTO */ - VALUES = 288, /* VALUES */ - FROM = 289, /* FROM */ - WHERE = 290, /* WHERE */ - AND = 291, /* AND */ - SET = 292, /* SET */ - ON = 293, /* ON */ - LOAD = 294, /* LOAD */ - DATA = 295, /* DATA */ - INFILE = 296, /* INFILE */ - EXPLAIN = 297, /* EXPLAIN */ - STORAGE = 298, /* STORAGE */ - FORMAT = 299, /* FORMAT */ - EQ = 300, /* EQ */ - LT = 301, /* LT */ - GT = 302, /* GT */ - LE = 303, /* LE */ - GE = 304, /* GE */ - NE = 305, /* NE */ - LIKE = 306, /* LIKE */ - NOT = 307, /* NOT */ - NUMBER = 308, /* NUMBER */ - FLOAT = 309, /* FLOAT */ - ID = 310, /* ID */ - SSS = 311, /* SSS */ - UMINUS = 312 /* UMINUS */ + AS = 259, /* AS */ + BY = 260, /* BY */ + CREATE = 261, /* CREATE */ + DROP = 262, /* DROP */ + GROUP = 263, /* GROUP */ + TABLE = 264, /* TABLE */ + TABLES = 265, /* TABLES */ + INDEX = 266, /* INDEX */ + CALC = 267, /* CALC */ + SELECT = 268, /* SELECT */ + DESC = 269, /* DESC */ + SHOW = 270, /* SHOW */ + SYNC = 271, /* SYNC */ + INSERT = 272, /* INSERT */ + DELETE = 273, /* DELETE */ + UPDATE = 274, /* UPDATE */ + LBRACE = 275, /* LBRACE */ + RBRACE = 276, /* RBRACE */ + COMMA = 277, /* COMMA */ + TRX_BEGIN = 278, /* TRX_BEGIN */ + TRX_COMMIT = 279, /* TRX_COMMIT */ + TRX_ROLLBACK = 280, /* TRX_ROLLBACK */ + INT_T = 281, /* INT_T */ + STRING_T = 282, /* STRING_T */ + FLOAT_T = 283, /* FLOAT_T */ + DATE_T = 284, /* DATE_T */ + HELP = 285, /* HELP */ + EXIT = 286, /* EXIT */ + DOT = 287, /* DOT */ + INTO = 288, /* INTO */ + VALUES = 289, /* VALUES */ + FROM = 290, /* FROM */ + WHERE = 291, /* WHERE */ + AND = 292, /* AND */ + SET = 293, /* SET */ + ON = 294, /* ON */ + LOAD = 295, /* LOAD */ + DATA = 296, /* DATA */ + INFILE = 297, /* INFILE */ + EXPLAIN = 298, /* EXPLAIN */ + STORAGE = 299, /* STORAGE */ + FORMAT = 300, /* FORMAT */ + EQ = 301, /* EQ */ + LT = 302, /* LT */ + GT = 303, /* GT */ + LE = 304, /* LE */ + GE = 305, /* GE */ + NE = 306, /* NE */ + LIKE = 307, /* LIKE */ + NOT = 308, /* NOT */ + NUMBER = 309, /* NUMBER */ + FLOAT = 310, /* FLOAT */ + ID = 311, /* ID */ + SSS = 312, /* SSS */ + UMINUS = 313 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -117,7 +118,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 119 "yacc_sql.y" +#line 120 "yacc_sql.y" ParsedSqlNode * sql_node; ConditionSqlNode * condition; @@ -136,7 +137,7 @@ union YYSTYPE int number; float floats; -#line 140 "yacc_sql.hpp" +#line 141 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 824e2890..660a398e 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -65,6 +65,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, //标识tokens %token SEMICOLON + AS BY CREATE DROP @@ -147,6 +148,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type value %type number %type relation +%type alias %type comp_op %type rel_attr %type attr_def_list @@ -486,19 +488,27 @@ calc_stmt: ; expression_list: - expression + expression alias { $$ = new std::vector>; + if (nullptr != $2) { + $1->set_name($2); + } $$->emplace_back($1); + free($2); } - | expression COMMA expression_list + | expression alias COMMA expression_list { - if ($3 != nullptr) { - $$ = $3; + if ($4 != nullptr) { + $$ = $4; } else { $$ = new std::vector>; } - $$->emplace($$->begin(), $1); + if (nullptr != $2) { + $1->set_name($2); + } + $$->emplace_back($1); + free($2); } ; expression: @@ -540,6 +550,18 @@ expression: } // your code here ; + +alias: + /* empty */ { + $$ = nullptr; + } + | ID { + $$ = $1; + } + | AS ID { + $$ = $2; + } + aggr_func_expr: ID LBRACE expression_list RBRACE { @@ -549,7 +571,7 @@ aggr_func_expr: $$ = new UnboundAggregateExpr($1, std::move((*$3)[0])); } } - |ID LBRACE RBRACE + | ID LBRACE RBRACE { $$ = new UnboundAggregateExpr("max",new StarExpr() ); } From 2240811c88f5b6c4c5dde1117997506697ed33b2 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 19:20:43 +0800 Subject: [PATCH 032/308] =?UTF-8?q?=E6=96=B0=E5=A2=9EOP=5FIS=5FNOT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 7 ++ .../sql/optimizer/logical_plan_generator.cpp | 7 +- src/observer/sql/parser/parse_defs.h | 3 +- src/observer/sql/parser/yacc_sql.cpp | 100 ++++++++++-------- src/observer/sql/parser/yacc_sql.y | 1 + 5 files changed, 65 insertions(+), 53 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 028d4d60..47268eb1 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -127,6 +127,13 @@ RC ComparisonExpr::compare_value(const Value &left, const Value &right, bool &re result = left.is_null(); return RC::SUCCESS; } + if (comp_ == OP_IS_NOT) { + if (right.attr_type() != AttrType::NULLS) { + return RC::NOT_NULL_AFTER_IS; + } + result = !left.is_null(); + return RC::SUCCESS; + } RC rc = RC::SUCCESS; int cmp_result = left.compare(right); diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 37a6eb31..d652506e 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -173,11 +173,8 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptr(new FieldExpr(filter_obj_right.field)) : static_cast(new ValueExpr(filter_obj_right.value))); - // TODO: cast NULL with others. - if (filter_unit->comp() == CompOp::OP_IS) { - if (right->value_type() != AttrType::NULLS) { - return RC::NOT_NULL_AFTER_IS; - } + if (filter_unit->comp() == CompOp::OP_IS || filter_unit->comp() == CompOp::OP_IS_NOT) { + } else if (left->value_type() != right->value_type()) { auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 57b5a7c3..be248732 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -51,7 +51,8 @@ enum CompOp LESS_THAN, ///< "<" GREAT_EQUAL, ///< ">=" GREAT_THAN, ///< ">" - OP_IS, ///< "IS" + OP_IS, ///< "IS" + OP_IS_NOT, ///< "IS NOT" NO_OP }; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 1dfb2f20..b3bbb8a6 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -592,9 +592,9 @@ union yyalloc /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 42 /* YYNRULES -- Number of rules. */ -#define YYNRULES 97 +#define YYNRULES 98 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 173 +#define YYNSTATES 174 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 314 @@ -658,7 +658,7 @@ static const yytype_int16 yyrline[] = 527, 532, 543, 546, 549, 552, 555, 559, 562, 567, 573, 580, 585, 595, 600, 605, 619, 622, 628, 631, 636, 643, 655, 667, 679, 694, 695, 696, 697, 698, - 699, 700, 706, 711, 724, 732, 742, 743 + 699, 700, 701, 707, 712, 725, 733, 743, 744 }; #endif @@ -728,11 +728,11 @@ static const yytype_int8 yypact[] = 100, 41, -85, 74, -85, 89, -2, 104, 107, -85, 58, -85, 53, 39, 39, -85, 88, 53, 120, -85, -85, -85, -85, -11, 63, 109, 73, -85, -85, 110, - -85, -85, -85, -85, -85, -85, -85, 41, 41, 41, - 78, 75, 79, 103, -85, -85, 104, 90, 115, 53, - 117, -85, -85, -85, -85, -85, -85, -85, -85, 118, - -85, -85, 92, -85, -85, 110, -85, -19, 94, -85, - -85, 83, -85 + -85, -85, -85, -85, -85, -85, 103, 41, 41, 41, + 78, 77, 80, 106, -85, -85, 104, 87, 117, 53, + 118, -85, -85, -85, -85, -85, -85, -85, -85, -85, + 119, -85, -85, 94, -85, -85, 110, -85, -19, 92, + -85, -85, 85, -85 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -742,31 +742,31 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 96, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 97, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, 20, 0, 0, 0, 0, 0, 53, 50, 51, 71, 52, 0, 70, 68, 59, 60, 69, 0, 31, 30, - 0, 0, 0, 0, 0, 94, 1, 97, 2, 0, + 0, 0, 0, 0, 0, 95, 1, 98, 2, 0, 0, 29, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 66, 72, 61, 62, 63, 64, 65, 73, 74, 76, - 0, 78, 56, 0, 95, 0, 0, 35, 0, 33, - 0, 92, 0, 0, 0, 77, 79, 0, 0, 43, + 0, 78, 56, 0, 96, 0, 0, 35, 0, 33, + 0, 93, 0, 0, 0, 77, 79, 0, 0, 43, 44, 45, 46, 41, 0, 0, 0, 75, 58, 48, 85, 86, 87, 88, 89, 90, 91, 0, 0, 78, 76, 0, 0, 0, 40, 38, 35, 54, 0, 0, - 0, 82, 84, 81, 83, 80, 57, 93, 42, 0, - 39, 36, 0, 34, 32, 48, 47, 41, 0, 49, - 37, 0, 55 + 0, 92, 82, 84, 81, 83, 80, 57, 94, 42, + 0, 39, 36, 0, 34, 32, 48, 47, 41, 0, + 49, 37, 0, 55 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -85, -85, 123, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -3, 20, -22, -85, -85, + -85, -85, 125, -85, -85, -85, -85, -85, -85, -85, + -85, -85, -85, -85, -85, 0, 20, -23, -85, -85, -85, -18, -84, -85, -85, -85, -85, -85, -4, -16, - -79, -85, 36, -83, 11, -85, 34, -85, -85, -85, + -79, -85, 37, -83, 11, -85, 35, -85, -85, -85, -85, -85 }; @@ -774,8 +774,8 @@ static const yytype_int8 yypgoto[] = static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 125, 107, 145, 159, 123, - 33, 150, 53, 163, 34, 35, 36, 37, 54, 55, + 28, 29, 30, 31, 32, 125, 107, 145, 160, 123, + 33, 150, 53, 164, 34, 35, 36, 37, 54, 55, 56, 98, 99, 102, 115, 116, 137, 128, 38, 39, 40, 68 }; @@ -790,20 +790,20 @@ static const yytype_uint8 yytable[] = 144, 62, 114, 119, 120, 121, 122, 60, 129, 73, 61, 63, 66, 140, 64, 75, 67, 69, 47, 48, 49, 50, 70, 51, 52, 77, 78, 79, 80, 77, - 78, 79, 80, 151, 153, 113, 74, 156, 152, 154, - 114, 93, 94, 95, 96, 165, 71, 1, 2, 72, + 78, 79, 80, 152, 154, 113, 74, 157, 153, 155, + 114, 93, 94, 95, 96, 166, 71, 1, 2, 72, 82, 46, 92, 3, 4, 5, 6, 7, 8, 9, 10, 81, 83, 46, 11, 12, 13, 130, 131, 132, 133, 134, 135, 136, 14, 15, 47, 48, 49, 50, 84, 86, 16, 85, 17, 87, 88, 18, 47, 48, 89, 50, 100, 91, 110, 97, 101, 105, 103, 112, 106, 108, 117, 109, 118, 124, 126, 139, 141, 147, - 148, 149, 157, 160, 158, 164, 162, 166, 167, 168, - 172, 65, 171, 161, 146, 170, 127, 169, 138, 0, - 155 + 148, 149, 151, 163, 158, 159, 161, 165, 167, 168, + 172, 169, 173, 65, 146, 171, 162, 127, 170, 138, + 156 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { 4, 85, 19, 8, 57, 10, 20, 8, 19, 10, 29, 21, 31, 30, 61, 62, 99, 101, 29, 9, @@ -818,8 +818,8 @@ static const yytype_int16 yycheck[] = 40, 44, 40, 48, 42, 19, 41, 45, 55, 56, 41, 58, 36, 57, 21, 57, 38, 58, 57, 19, 57, 57, 48, 57, 35, 21, 19, 39, 8, 20, - 57, 21, 57, 30, 55, 20, 46, 20, 20, 47, - 57, 18, 48, 146, 124, 167, 110, 165, 114, -1, + 57, 21, 29, 46, 57, 55, 30, 20, 20, 20, + 48, 47, 57, 18, 124, 168, 146, 110, 166, 114, 139 }; @@ -842,9 +842,9 @@ static const yytype_int8 yystos[] = 26, 27, 28, 83, 21, 79, 19, 96, 101, 86, 48, 49, 50, 51, 52, 53, 54, 100, 100, 39, 86, 8, 19, 29, 31, 81, 80, 20, 57, 21, - 85, 86, 94, 86, 94, 98, 97, 57, 55, 82, - 30, 79, 46, 87, 20, 86, 20, 20, 47, 85, - 81, 48, 57 + 85, 29, 86, 94, 86, 94, 98, 97, 57, 55, + 82, 30, 79, 46, 87, 20, 86, 20, 20, 47, + 85, 81, 48, 57 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -859,7 +859,7 @@ static const yytype_int8 yyr1[] = 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, 94, 95, 96, 96, 97, 97, 98, 98, 98, 99, 99, 99, 99, 100, 100, 100, 100, 100, - 100, 100, 101, 102, 103, 104, 105, 105 + 100, 100, 100, 101, 102, 103, 104, 105, 105 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -874,7 +874,7 @@ static const yytype_int8 yyr2[] = 1, 3, 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, 3, 1, 1, 3, 0, 2, 0, 1, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, - 1, 1, 0, 7, 2, 4, 0, 1 + 1, 1, 2, 0, 7, 2, 4, 0, 1 }; @@ -2454,16 +2454,22 @@ YYLTYPE yylloc = yyloc_default; #line 2455 "yacc_sql.cpp" break; - case 92: /* group_by: %empty */ -#line 706 "yacc_sql.y" + case 92: /* comp_op: IS NOT */ +#line 701 "yacc_sql.y" + { (yyval.comp) = OP_IS_NOT; } +#line 2461 "yacc_sql.cpp" + break; + + case 93: /* group_by: %empty */ +#line 707 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2463 "yacc_sql.cpp" +#line 2469 "yacc_sql.cpp" break; - case 93: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 712 "yacc_sql.y" + case 94: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 713 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2473,20 +2479,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2477 "yacc_sql.cpp" +#line 2483 "yacc_sql.cpp" break; - case 94: /* explain_stmt: EXPLAIN command_wrapper */ -#line 725 "yacc_sql.y" + case 95: /* explain_stmt: EXPLAIN command_wrapper */ +#line 726 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2486 "yacc_sql.cpp" +#line 2492 "yacc_sql.cpp" break; - case 95: /* set_variable_stmt: SET ID EQ value */ -#line 733 "yacc_sql.y" + case 96: /* set_variable_stmt: SET ID EQ value */ +#line 734 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2494,11 +2500,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2498 "yacc_sql.cpp" +#line 2504 "yacc_sql.cpp" break; -#line 2502 "yacc_sql.cpp" +#line 2508 "yacc_sql.cpp" default: break; } @@ -2727,7 +2733,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 745 "yacc_sql.y" +#line 746 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 1c557c59..6a8a3046 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -698,6 +698,7 @@ comp_op: | GE { $$ = GREAT_EQUAL; } | NE { $$ = NOT_EQUAL; } | IS { $$ = OP_IS; } + | IS NOT { $$ = OP_IS_NOT; } ; // your code here From 3a02fed6417c7d1eb7fddfae948b6f12e3a578a3 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 19:40:44 +0800 Subject: [PATCH 033/308] =?UTF-8?q?=E5=AE=8C=E6=88=90=20IS=20NOT=20NULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/tuple.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index 3c02ddbd..1f0cae4a 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -198,9 +198,7 @@ class RowTuple : public Tuple const FieldMeta *field_meta = field_expr->field().meta(); cell.set_type(field_meta->type()); if (field_meta->nullable()) { - auto null_flag = this->record_->data()[field_meta->offset() + field_meta->len() - 1]; - ASSERT(null_flag == 0 || null_flag == 1, "error null flag value"); - bool is_null = null_flag == 1; + bool is_null = this->record_->data()[field_meta->offset() + field_meta->len() - 1] == 1; cell.set_data(this->record_->data() + field_meta->offset(), field_meta->len() - 1); cell.set_null(is_null); } else { From b11e4a3c30cf067a91aa9db66cc1b2b604d95246 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 20:00:47 +0800 Subject: [PATCH 034/308] =?UTF-8?q?=E5=AE=8C=E6=88=90=20null=3D1;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/char_type.cpp | 3 +++ src/observer/common/type/date_type.cpp | 3 +++ src/observer/common/type/float_type.cpp | 3 +++ src/observer/common/type/integer_type.cpp | 5 ++++- src/observer/common/type/null_type.cpp | 3 --- src/observer/sql/optimizer/logical_plan_generator.cpp | 3 ++- src/observer/sql/parser/yacc_sql.y | 2 +- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index e4a5dd10..540c0cee 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -26,6 +26,9 @@ static bool check_date(int y, int m, int d) int CharType::compare(const Value &left, const Value &right) const { + if (right.attr_type() == AttrType::NULLS) { + return 1; + } ASSERT(left.attr_type() == AttrType::CHARS && right.attr_type() == AttrType::CHARS, "invalid type"); return common::compare_string( (void *)left.value_.pointer_value_, left.length_, (void *)right.value_.pointer_value_, right.length_); diff --git a/src/observer/common/type/date_type.cpp b/src/observer/common/type/date_type.cpp index bfd4f063..e5309b1d 100644 --- a/src/observer/common/type/date_type.cpp +++ b/src/observer/common/type/date_type.cpp @@ -19,6 +19,9 @@ int DateType::compare(const Value &left, const Value &right) const { + if (right.attr_type() == AttrType::NULLS) { + return 1; + } return common::compare_int((void *)&left.value_.int_value_, (void *)&right.value_.int_value_); } diff --git a/src/observer/common/type/float_type.cpp b/src/observer/common/type/float_type.cpp index fcf89a7c..e6553506 100644 --- a/src/observer/common/type/float_type.cpp +++ b/src/observer/common/type/float_type.cpp @@ -18,6 +18,9 @@ See the Mulan PSL v2 for more details. */ int FloatType::compare(const Value &left, const Value &right) const { + if (right.attr_type() == AttrType::NULLS) { + return 1; + } ASSERT(left.attr_type() == AttrType::FLOATS, "left type is not integer"); ASSERT(right.attr_type() == AttrType::INTS || right.attr_type() == AttrType::FLOATS, "right type is not numeric"); float left_val = left.get_float(); diff --git a/src/observer/common/type/integer_type.cpp b/src/observer/common/type/integer_type.cpp index 34931e0b..6716c64e 100644 --- a/src/observer/common/type/integer_type.cpp +++ b/src/observer/common/type/integer_type.cpp @@ -16,6 +16,9 @@ See the Mulan PSL v2 for more details. */ int IntegerType::compare(const Value &left, const Value &right) const { + if (right.attr_type() == AttrType::NULLS) { + return 1; + } ASSERT(left.attr_type() == AttrType::INTS, "left type is not integer"); ASSERT(right.attr_type() == AttrType::INTS || right.attr_type() == AttrType::FLOATS, "right type is not numeric"); if (right.attr_type() == AttrType::INTS) { @@ -52,7 +55,7 @@ RC IntegerType::negative(const Value &val, Value &result) const RC IntegerType::set_value_from_str(Value &val, const string &data) const { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; stringstream deserialize_stream; deserialize_stream.clear(); // 清理stream的状态,防止多次解析出现异常 deserialize_stream.str(data); diff --git a/src/observer/common/type/null_type.cpp b/src/observer/common/type/null_type.cpp index 8987ff8e..30a8ba20 100644 --- a/src/observer/common/type/null_type.cpp +++ b/src/observer/common/type/null_type.cpp @@ -17,9 +17,6 @@ See the Mulan PSL v2 for more details. */ int NullType::compare(const Value &left, const Value &right) const { ASSERT(left.attr_type() == AttrType::NULLS, "left type is not a null"); - if (right.attr_type() == AttrType::NULLS) { - return 0; - } return -1; } diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index d652506e..1aba8869 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -174,7 +174,8 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptr(new ValueExpr(filter_obj_right.value))); if (filter_unit->comp() == CompOp::OP_IS || filter_unit->comp() == CompOp::OP_IS_NOT) { - + } else if (left->value_type() == AttrType::NULLS) { + } else if (right->value_type() == AttrType::NULLS) { } else if (left->value_type() != right->value_type()) { auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 6a8a3046..0aabaf6e 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -365,7 +365,7 @@ attr_def: } else if ($$->type == AttrType::FLOATS) { $$->length = 4; } else if ($$->type == AttrType::DATES) { - $$->length = 10; + $$->length = 4; } else { ASSERT(false, "$$->type is invalid."); } From 0cd50adf0bcc9abc1e87c4dc26b217be7b44350e Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 26 Sep 2024 20:13:21 +0800 Subject: [PATCH 035/308] =?UTF-8?q?=E5=AE=8C=E6=88=90=20null<>1;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/char_type.cpp | 3 --- src/observer/common/type/date_type.cpp | 3 --- src/observer/common/type/float_type.cpp | 3 --- src/observer/common/type/integer_type.cpp | 3 --- src/observer/sql/expr/expression.cpp | 4 ++++ 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index 540c0cee..e4a5dd10 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -26,9 +26,6 @@ static bool check_date(int y, int m, int d) int CharType::compare(const Value &left, const Value &right) const { - if (right.attr_type() == AttrType::NULLS) { - return 1; - } ASSERT(left.attr_type() == AttrType::CHARS && right.attr_type() == AttrType::CHARS, "invalid type"); return common::compare_string( (void *)left.value_.pointer_value_, left.length_, (void *)right.value_.pointer_value_, right.length_); diff --git a/src/observer/common/type/date_type.cpp b/src/observer/common/type/date_type.cpp index e5309b1d..bfd4f063 100644 --- a/src/observer/common/type/date_type.cpp +++ b/src/observer/common/type/date_type.cpp @@ -19,9 +19,6 @@ int DateType::compare(const Value &left, const Value &right) const { - if (right.attr_type() == AttrType::NULLS) { - return 1; - } return common::compare_int((void *)&left.value_.int_value_, (void *)&right.value_.int_value_); } diff --git a/src/observer/common/type/float_type.cpp b/src/observer/common/type/float_type.cpp index e6553506..fcf89a7c 100644 --- a/src/observer/common/type/float_type.cpp +++ b/src/observer/common/type/float_type.cpp @@ -18,9 +18,6 @@ See the Mulan PSL v2 for more details. */ int FloatType::compare(const Value &left, const Value &right) const { - if (right.attr_type() == AttrType::NULLS) { - return 1; - } ASSERT(left.attr_type() == AttrType::FLOATS, "left type is not integer"); ASSERT(right.attr_type() == AttrType::INTS || right.attr_type() == AttrType::FLOATS, "right type is not numeric"); float left_val = left.get_float(); diff --git a/src/observer/common/type/integer_type.cpp b/src/observer/common/type/integer_type.cpp index 6716c64e..ac915c2b 100644 --- a/src/observer/common/type/integer_type.cpp +++ b/src/observer/common/type/integer_type.cpp @@ -16,9 +16,6 @@ See the Mulan PSL v2 for more details. */ int IntegerType::compare(const Value &left, const Value &right) const { - if (right.attr_type() == AttrType::NULLS) { - return 1; - } ASSERT(left.attr_type() == AttrType::INTS, "left type is not integer"); ASSERT(right.attr_type() == AttrType::INTS || right.attr_type() == AttrType::FLOATS, "right type is not numeric"); if (right.attr_type() == AttrType::INTS) { diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 47268eb1..93f52829 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -134,6 +134,10 @@ RC ComparisonExpr::compare_value(const Value &left, const Value &right, bool &re result = !left.is_null(); return RC::SUCCESS; } + if (left.is_null() || right.is_null()) { + result = false; + return RC::SUCCESS; + } RC rc = RC::SUCCESS; int cmp_result = left.compare(right); From 8903f0b2623450925f8d3d2c65eb751d53e38722 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 26 Sep 2024 22:28:05 +0800 Subject: [PATCH 036/308] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=E5=8C=85?= =?UTF-8?q?=E6=8B=AC=20update=20=E8=AF=AD=E5=8F=A5=E7=9A=84=E9=9A=90?= =?UTF-8?q?=E5=BC=8F=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/char_type.cpp | 92 +++++++++++++++++-- src/observer/common/type/char_type.h | 2 +- src/observer/common/type/date_type.cpp | 9 ++ src/observer/common/type/date_type.h | 13 +-- src/observer/common/type/float_type.cpp | 48 +++++++++- src/observer/common/type/float_type.h | 28 +----- src/observer/common/type/integer_type.cpp | 46 +++++++++- src/observer/common/type/integer_type.h | 28 +----- src/observer/common/value.cpp | 1 + .../sql/operator/update_logical_operator.cpp | 2 +- .../sql/operator/update_logical_operator.h | 16 ++-- .../sql/operator/update_physical_operator.h | 16 ++-- src/observer/sql/stmt/update_stmt.cpp | 35 ++++--- src/observer/sql/stmt/update_stmt.h | 19 ++-- src/observer/storage/record/record.h | 8 +- src/observer/storage/table/table.cpp | 2 +- 16 files changed, 243 insertions(+), 122 deletions(-) diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index e4a5dd10..cfbac697 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -13,6 +13,8 @@ See the Mulan PSL v2 for more details. */ #include "common/type/char_type.h" #include "common/value.h" +static int y, m, d; + static bool check_date(int y, int m, int d) { // 定义每个月的天数 @@ -21,7 +23,53 @@ static bool check_date(int y, int m, int d) bool leap = (y % 400 == 0) || (y % 100 != 0 && y % 4 == 0); // 检查年份、月份和日期的合法性 return (y > 0 && y <= 9999) && (m > 0 && m <= 12) && - (d > 0 && d <= (mon[m] + (m == 2 && leap ? 1 : 0))); // 2月如果是闰年则加1天 + (d > 0 && d <= (mon[m] + (m == 2 && leap ? 1 : 0))); // 2月如果是闰年则加1天 +} + +static RC parse_date(const char *str, int &result) +{ + if (sscanf(str, "%d-%d-%d", &y, &m, &d) != 3) { + return RC::INVALID_ARGUMENT; + } + if (!check_date(y, m, d)) { + return RC::INVALID_ARGUMENT; + } + result = y * 10000 + m * 100 + d; + return RC::SUCCESS; +} + +static RC parse_int_prefix(const char *str, int &result) +{ + char *end_ptr; + long int_val = std::strtol(str, &end_ptr, 10); + if (end_ptr == str) { + // 输入不是有效的整数格式,则转换为0 + int_val = 0; + } + // 注释以支持前缀解析 + // if (*end_ptr != '\0' && !isspace(*end_ptr)) { + // return RC::INVALID_ARGUMENT; // 浮点数后应为结尾或空白字符 + // } + // 默认认为 int_val 是否在 int 范围内 + result = static_cast(int_val); + return RC::SUCCESS; +} + +static RC parse_float_prefix(const char *str, float &result) +{ + char *end_ptr; + double float_val = std::strtod(str, &end_ptr); + if (end_ptr == str) { + // 输入不是有效的整数格式,则转换为0 + float_val = 0; + } + // 注释以支持前缀解析 + // if (*end_ptr != '\0' && !isspace(*end_ptr)) { + // return RC::INVALID_ARGUMENT; // 浮点数后应为结尾或空白字符 + // } + // 默认认为 float_val 是否在 float 范围内 + result = static_cast(float_val); + return RC::SUCCESS; } int CharType::compare(const Value &left, const Value &right) const @@ -41,17 +89,37 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result) const { switch (type) { case AttrType::DATES: { - static int y, m, d; - if (sscanf(val.value_.pointer_value_, "%d-%d-%d", &y, &m, &d) != 3) { - return RC::INVALID_ARGUMENT; + int date_val; + RC rc = parse_date(val.value_.pointer_value_, date_val); + if (rc != RC::SUCCESS) { + return rc; + } + result.set_date(date_val); + } break; + // 字符串转数字 + // 如果字符串刚好是一个数字,则转换为对应的数字(如'1'转换为1,'2.1'转换为2.1) + // 如果字符串的前缀是一个数字,则转换前缀数字部分为数字(如'1a1'转换为1,'2.1a'转换为2.1) + // 如果字符串前缀不是任何合法的数字,则转换为0(不需要考虑前导符号 '+' '-') + // 如果转换数字溢出怎么处理?(不考虑) + // 是否考虑十六进制/八进制?(不考虑) + case AttrType::INTS: { + int int_val; + RC rc = parse_int_prefix(val.value_.pointer_value_, int_val); + if (rc != RC::SUCCESS) { + return rc; } - if (!check_date(y, m, d)) { - return RC::INVALID_ARGUMENT; + result.set_int(int_val); + } break; + case AttrType::FLOATS: { + float float_val; + RC rc = parse_float_prefix(val.value_.pointer_value_, float_val); + if (rc != RC::SUCCESS) { + return rc; } - result.attr_type_ = AttrType::DATES; - result.set_date(y * 10000 + m * 100 + d); + result.set_float(float_val); } break; - default: return RC::UNIMPLEMENTED; + default: + return RC::UNIMPLEMENTED; } return RC::SUCCESS; } @@ -64,6 +132,12 @@ int CharType::cast_cost(AttrType type) if (type == AttrType::DATES) { return 1; } + if (type == AttrType::INTS) { + return 1; + } + if (type == AttrType::FLOATS) { + return 1; + } return INT32_MAX; } diff --git a/src/observer/common/type/char_type.h b/src/observer/common/type/char_type.h index a5610143..d4833922 100644 --- a/src/observer/common/type/char_type.h +++ b/src/observer/common/type/char_type.h @@ -33,4 +33,4 @@ class CharType : public DataType int cast_cost(AttrType type) override; RC to_string(const Value &val, string &result) const override; -}; \ No newline at end of file +}; diff --git a/src/observer/common/type/date_type.cpp b/src/observer/common/type/date_type.cpp index bfd4f063..3ff5f1e6 100644 --- a/src/observer/common/type/date_type.cpp +++ b/src/observer/common/type/date_type.cpp @@ -38,3 +38,12 @@ RC DateType::to_string(const Value &val, string &result) const result = oss.str(); return RC::SUCCESS; } + +int DateType::cast_cost(AttrType type) +{ + if (type == AttrType::DATES) + return 0; // DATE -> DATE + if (type == AttrType::INTS) + return 0; // DATE -> INT (需转换) + return INT32_MAX; // 不支持转换 +} diff --git a/src/observer/common/type/date_type.h b/src/observer/common/type/date_type.h index 687cc419..d4d9ed2a 100644 --- a/src/observer/common/type/date_type.h +++ b/src/observer/common/type/date_type.h @@ -24,14 +24,9 @@ class DateType : public DataType DateType() : DataType(AttrType::DATES) {} ~DateType() override = default; + // 是否需要考虑日期与其它类型的转换?(不需要) + // 不用实现 cast to,也不需要考虑其他类型转 date + int cast_cost(AttrType type) override; int compare(const Value &left, const Value &right) const override; - int cast_cost(AttrType type) override - { - if (type == AttrType::DATES) - return 0; // DATE -> DATE - if (type == AttrType::INTS) - return 0; // DATE -> INT (需转换) - return INT32_MAX; // 不支持转换 - } - RC to_string(const Value &val, string &result) const override; + RC to_string(const Value &val, string &result) const override; }; diff --git a/src/observer/common/type/float_type.cpp b/src/observer/common/type/float_type.cpp index fcf89a7c..3ff0892c 100644 --- a/src/observer/common/type/float_type.cpp +++ b/src/observer/common/type/float_type.cpp @@ -8,6 +8,8 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ +#include + #include "common/lang/comparator.h" #include "common/lang/sstream.h" #include "common/log/log.h" @@ -61,7 +63,7 @@ RC FloatType::negative(const Value &val, Value &result) const RC FloatType::set_value_from_str(Value &val, const string &data) const { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; stringstream deserialize_stream; deserialize_stream.clear(); deserialize_stream.str(data); @@ -83,3 +85,47 @@ RC FloatType::to_string(const Value &val, string &result) const result = ss.str(); return RC::SUCCESS; } + +int FloatType::cast_cost(AttrType type) +{ + if (type == AttrType::FLOATS) + return 0; // FLOAT -> FLOAT + if (type == AttrType::INTS) + return 1; // FLOAT -> INT (可能丢失精度) + if (type == AttrType::BOOLEANS) + return 1; // FLOAT -> BOOL (非严格转换) + return INT32_MAX; // 不支持转换 +} + +RC FloatType::cast_to(const Value &val, AttrType type, Value &result) const +{ + switch (type) { + case AttrType::FLOATS: { + result.set_float(val.get_float()); + } break; + case AttrType::INTS: { + // 浮点数转整数(四舍五入,如1.3转换为1,1.5转换为2) + // 涉及浮点数的比较,整数转换为浮点数,字符串转换为浮点数,再比较 + // 使用 std::round 进行四舍五入 + result.set_int(static_cast(std::round(val.get_float()))); + } break; + case AttrType::CHARS: { + // 数字转字符串,不带符号,不考虑溢出 + // 浮点数的表示方法是什么?(举例:1.5转换为'1.5') + float float_val = val.get_float(); + std::string str = float_val < 0 ? std::to_string(-float_val) : std::to_string(float_val); + // 去除尾随的0 和可能的 '.' + str.erase(str.find_last_not_of('0') + 1, std::string::npos); + if (str.back() == '.') { + str.pop_back(); + } + result.set_string(str.c_str()); // 设置字符串结果 + } break; + case AttrType::BOOLEANS: { + result.set_boolean(val.get_float() != 0.0f); // 非零为 true,零为 false + } break; + default: + return RC::UNSUPPORTED; // 不支持的转换 + } + return RC::SUCCESS; +} diff --git a/src/observer/common/type/float_type.h b/src/observer/common/type/float_type.h index e0b28b1b..dbffadb0 100644 --- a/src/observer/common/type/float_type.h +++ b/src/observer/common/type/float_type.h @@ -31,32 +31,10 @@ class FloatType : public DataType RC divide(const Value &left, const Value &right, Value &result) const override; RC negative(const Value &val, Value &result) const override; - int cast_cost(AttrType type) override - { - if (type == AttrType::FLOATS) - return 0; // FLOAT -> FLOAT - if (type == AttrType::INTS) - return 1; // FLOAT -> INT (可能丢失精度) - if (type == AttrType::BOOLEANS) - return 1; // FLOAT -> BOOL (非严格转换) - return INT32_MAX; // 不支持转换 - } - RC cast_to(const Value &val, AttrType type, Value &result) const override - { - if (type == AttrType::FLOATS) { - result.set_float(val.get_float()); - return RC::SUCCESS; - } else if (type == AttrType::INTS) { - result.set_int(static_cast(val.get_float())); // 转换为整数(可能丢失精度) - return RC::SUCCESS; - } else if (type == AttrType::BOOLEANS) { - result.set_boolean(val.get_float() != 0.0f); // 非零为 true,零为 false - return RC::SUCCESS; - } - return RC::UNSUPPORTED; // 不支持的转换 - } + int cast_cost(AttrType type) override; + RC cast_to(const Value &val, AttrType type, Value &result) const override; RC set_value_from_str(Value &val, const string &data) const override; RC to_string(const Value &val, string &result) const override; -}; \ No newline at end of file +}; diff --git a/src/observer/common/type/integer_type.cpp b/src/observer/common/type/integer_type.cpp index 34931e0b..8815aed8 100644 --- a/src/observer/common/type/integer_type.cpp +++ b/src/observer/common/type/integer_type.cpp @@ -52,7 +52,7 @@ RC IntegerType::negative(const Value &val, Value &result) const RC IntegerType::set_value_from_str(Value &val, const string &data) const { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; stringstream deserialize_stream; deserialize_stream.clear(); // 清理stream的状态,防止多次解析出现异常 deserialize_stream.str(data); @@ -68,8 +68,44 @@ RC IntegerType::set_value_from_str(Value &val, const string &data) const RC IntegerType::to_string(const Value &val, string &result) const { - stringstream ss; - ss << val.value_.int_value_; - result = ss.str(); + result = std::to_string(val.get_int()); return RC::SUCCESS; -} \ No newline at end of file +} + +int IntegerType::cast_cost(AttrType type) +{ + if (type == AttrType::INTS) + return 0; // INT -> INT + if (type == AttrType::FLOATS) + return 1; // INT -> FLOAT + if (type == AttrType::BOOLEANS) + return 1; // INT -> BOOL (非严格转换) + return INT32_MAX; // 不支持转换 +} + +RC IntegerType::cast_to(const Value &val, AttrType type, Value &result) const +{ + switch (type) { + case AttrType::INTS: { + result.set_int(val.get_int()); + } break; + case AttrType::FLOATS: { + // 整数转浮点数,直接转换为浮点数,不考虑溢出 + result.set_float(static_cast(val.get_int())); + } break; + case AttrType::BOOLEANS: { + // 0 为 false,其他为 true + result.set_boolean(val.get_int() != 0); + } break; + case AttrType::CHARS: { + // 数字转字符串,不带符号,不考虑长度溢出 + int int_val = val.get_int(); + std::string str = int_val < 0 ? std::to_string(-int_val) : std::to_string(int_val); + result.set_string(str.c_str()); // 设置字符串结果 + break; + } break; + default: + return RC::UNSUPPORTED; // 不支持的转换 + } + return RC::SUCCESS; +} diff --git a/src/observer/common/type/integer_type.h b/src/observer/common/type/integer_type.h index 1c82cd9a..b63606e5 100644 --- a/src/observer/common/type/integer_type.h +++ b/src/observer/common/type/integer_type.h @@ -35,28 +35,6 @@ class IntegerType : public DataType RC to_string(const Value &val, string &result) const override; - int cast_cost(AttrType type) override - { - if (type == AttrType::INTS) - return 0; // INT -> INT - if (type == AttrType::FLOATS) - return 1; // INT -> FLOAT - if (type == AttrType::BOOLEANS) - return 1; // INT -> BOOL (非严格转换) - return INT32_MAX; // 不支持转换 - } - RC cast_to(const Value &val, AttrType type, Value &result) const override - { - if (type == AttrType::INTS) { - result.set_int(val.get_int()); - return RC::SUCCESS; - } else if (type == AttrType::FLOATS) { - result.set_float(static_cast(val.get_int())); // 转换为浮点数 - return RC::SUCCESS; - } else if (type == AttrType::BOOLEANS) { - result.set_boolean(val.get_int() != 0); // 0 为 false,其他为 true - return RC::SUCCESS; - } - return RC::UNSUPPORTED; // 不支持的转换 - } -}; \ No newline at end of file + int cast_cost(AttrType type) override; + RC cast_to(const Value &val, AttrType type, Value &result) const override; +}; diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 19f72975..d735d44b 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -150,6 +150,7 @@ void Value::set_float(float val) value_.float_value_ = val; length_ = sizeof(val); } + void Value::set_boolean(bool val) { reset(); diff --git a/src/observer/sql/operator/update_logical_operator.cpp b/src/observer/sql/operator/update_logical_operator.cpp index c86b3d3a..63fb9ab2 100644 --- a/src/observer/sql/operator/update_logical_operator.cpp +++ b/src/observer/sql/operator/update_logical_operator.cpp @@ -13,6 +13,6 @@ #include "update_logical_operator.h" UpdateLogicalOperator::UpdateLogicalOperator( - Table *table, std::vector field_metas, std::vector values) + Table *table, std::vector field_metas, std::vector values) : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)) {} diff --git a/src/observer/sql/operator/update_logical_operator.h b/src/observer/sql/operator/update_logical_operator.h index 6d66291a..ab48f17f 100644 --- a/src/observer/sql/operator/update_logical_operator.h +++ b/src/observer/sql/operator/update_logical_operator.h @@ -21,16 +21,16 @@ class UpdateLogicalOperator : public LogicalOperator { public: - explicit UpdateLogicalOperator(Table *table, std::vector field_metas, std::vector values); + explicit UpdateLogicalOperator(Table *table, std::vector field_metas, std::vector values); ~ UpdateLogicalOperator() override = default; - LogicalOperatorType type() const override { return LogicalOperatorType::UPDATE; } - Table *table() const { return table_; } - const std::vector &field_metas() const { return field_metas_; } - const std::vector &values() const { return values_; } + LogicalOperatorType type() const override { return LogicalOperatorType::UPDATE; } + Table *table() const { return table_; } + const std::vector &field_metas() const { return field_metas_; } + const std::vector &values() const { return values_; } private: - Table *table_ = nullptr; - std::vector field_metas_; - std::vector values_; + Table *table_ = nullptr; + std::vector field_metas_; + std::vector values_; }; diff --git a/src/observer/sql/operator/update_physical_operator.h b/src/observer/sql/operator/update_physical_operator.h index c4ee340f..1dc41b53 100644 --- a/src/observer/sql/operator/update_physical_operator.h +++ b/src/observer/sql/operator/update_physical_operator.h @@ -24,15 +24,15 @@ class UpdateStmt; class UpdatePhysicalOperator : public PhysicalOperator { public: - UpdatePhysicalOperator(Table *table, std::vector field_metas, std::vector values) + UpdatePhysicalOperator(Table *table, std::vector field_metas, std::vector values) : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)) {} ~UpdatePhysicalOperator() override = default; - PhysicalOperatorType type() const override { return PhysicalOperatorType::UPDATE; } - const std::vector &field_metas() const { return field_metas_; } - const std::vector &values() const { return values_; } + PhysicalOperatorType type() const override { return PhysicalOperatorType::UPDATE; } + const std::vector &field_metas() const { return field_metas_; } + const std::vector &values() const { return values_; } RC open(Trx *trx) override; RC next() override; @@ -41,9 +41,9 @@ class UpdatePhysicalOperator : public PhysicalOperator Tuple *current_tuple() override { return nullptr; } private: - Trx *trx_ = nullptr; - Table *table_ = nullptr; - std::vector field_metas_; - std::vector values_; + Trx *trx_ = nullptr; + Table *table_ = nullptr; + std::vector field_metas_; + std::vector values_; std::vector records_; }; diff --git a/src/observer/sql/stmt/update_stmt.cpp b/src/observer/sql/stmt/update_stmt.cpp index a4b98355..59665be4 100644 --- a/src/observer/sql/stmt/update_stmt.cpp +++ b/src/observer/sql/stmt/update_stmt.cpp @@ -21,7 +21,7 @@ See the Mulan PSL v2 for more details. */ #include UpdateStmt::UpdateStmt( - Table *table, std::vector field_metas, std::vector values, FilterStmt *filter_stmt) + Table *table, std::vector field_metas, std::vector values, FilterStmt *filter_stmt) : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)), filter_stmt_(filter_stmt) {} @@ -48,9 +48,9 @@ RC UpdateStmt::create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt) return RC::SCHEMA_TABLE_NOT_EXIST; } - auto table_meta = table->table_meta(); - std::vector field_metas; - std::vector values; + auto table_meta = table->table_meta(); + std::vector field_metas; + std::vector values; for (auto &clause : update_sql.set_clauses) { // check whether the field exists @@ -61,21 +61,26 @@ RC UpdateStmt::create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt) } // check whether the value valid - auto value = &clause.value; - if (value->attr_type() == AttrType::INTS && field_meta->type() == AttrType::FLOATS) { - // do nothing,但是好像不用考虑类型转换 - } else if (value->attr_type() != field_meta->type()) { - LOG_ERROR("Schema field type mismatch. Field: %s, Expected Type: %s, Provided Type: %s", - field_meta->name(), - attr_type_to_string(field_meta->type()), - attr_type_to_string(value->attr_type())); - return RC::SCHEMA_FIELD_TYPE_MISMATCH; - } else if (value->length() > field_meta->len()) { + auto value = clause.value; + if (value.attr_type() != field_meta->type()) { + // 尝试转换,发生转换时不考虑数值溢出 + Value to_value; + RC rc = Value::cast_to(value, field_meta->type(), to_value); + if (rc != RC::SUCCESS) { + LOG_ERROR("Schema field type mismatch and cast to failed. Field: %s, Expected Type: %s, Provided Type: %s", + field_meta->name(), + attr_type_to_string(field_meta->type()), + attr_type_to_string(value.attr_type())); + return RC::SCHEMA_FIELD_TYPE_MISMATCH; + } + // 转换成功 + value = std::move(to_value); + } else if (value.length() > field_meta->len()) { LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", field_meta->name(), attr_type_to_string(field_meta->type()), field_meta->offset(), - value->length(), + value.length(), field_meta->len()); return RC::VALUE_TOO_LONG; } diff --git a/src/observer/sql/stmt/update_stmt.h b/src/observer/sql/stmt/update_stmt.h index 2f373774..f6767a02 100644 --- a/src/observer/sql/stmt/update_stmt.h +++ b/src/observer/sql/stmt/update_stmt.h @@ -29,21 +29,20 @@ class UpdateStmt : public Stmt { public: UpdateStmt() = default; - UpdateStmt( - Table *table, std::vector field_metas, std::vector values, FilterStmt *filter_stmt); + UpdateStmt(Table *table, std::vector field_metas, std::vector values, FilterStmt *filter_stmt); StmtType type() const override { return StmtType::UPDATE; } - Table *table() const { return table_; } - const std::vector &field_metas() const { return field_metas_; } - const std::vector &values() const { return values_; } - FilterStmt *filter_stmt() const { return filter_stmt_; } + Table *table() const { return table_; } + const std::vector &field_metas() const { return field_metas_; } + const std::vector &values() const { return values_; } + FilterStmt *filter_stmt() const { return filter_stmt_; } static RC create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt); private: - Table *table_ = nullptr; - std::vector field_metas_; - std::vector values_; - FilterStmt *filter_stmt_ = nullptr; + Table *table_ = nullptr; + std::vector field_metas_; + std::vector values_; + FilterStmt *filter_stmt_ = nullptr; }; diff --git a/src/observer/storage/record/record.h b/src/observer/storage/record/record.h index cba41d51..924ad3ae 100644 --- a/src/observer/storage/record/record.h +++ b/src/observer/storage/record/record.h @@ -102,7 +102,7 @@ struct RIDHash class Record { public: - Record() = default; + Record() = default; ~Record() { if (owner_ && data_ != nullptr) { @@ -214,7 +214,7 @@ class Record return RC::SUCCESS; } - RC set_field(int field_offset, int field_len, const Value *&value) + RC set_field(int field_offset, int field_len, const Value &value) { // 只警告不检查试试看 // if (!owner_) { @@ -226,9 +226,9 @@ class Record return RC::INVALID_ARGUMENT; } // 实际数据长度 - auto len = std::min(field_len, value->length()); + auto len = std::min(field_len, value.length()); // 如果是字符串类型,长度可变,要根据实际长度拷贝数据 - memcpy(data_ + field_offset, value->data(), len); + memcpy(data_ + field_offset, value.data(), len); // 因为列数据是连续的,如果中间某些列加了'\0',会导致后面列没数据 // 需要判断更新的字符串是否小于上限,只有小于才需要加'\0',而大于应该抛出异常 // 除了字符串类型其他都是定长的 diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index c05d281d..5fba9908 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -312,7 +312,7 @@ RC Table::make_record(int value_num, const Value *values, Record &record) Value real_value; rc = Value::cast_to(value, field->type(), real_value); if (OB_FAIL(rc)) { - LOG_WARN("failed to cast value. table name:%s,field name:%s,value:%s ", + LOG_WARN("failed to cast value. table name:%s, field name:%s, value:%s", table_meta_.name(), field->name(), value.to_string().c_str()); break; } From 0492ab76d51baab635e174e9d6ccc52580a9318d Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 26 Sep 2024 23:41:31 +0800 Subject: [PATCH 037/308] =?UTF-8?q?fix:=20=E6=8F=90=E9=AB=98=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E8=BD=AC=E6=95=B4=E5=9E=8B=E7=9A=84=E7=B2=BE?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/char_type.cpp | 34 ++++++++------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index cfbac697..ebb304a5 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -8,6 +8,8 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ +#include + #include "common/lang/comparator.h" #include "common/log/log.h" #include "common/type/char_type.h" @@ -38,31 +40,11 @@ static RC parse_date(const char *str, int &result) return RC::SUCCESS; } -static RC parse_int_prefix(const char *str, int &result) -{ - char *end_ptr; - long int_val = std::strtol(str, &end_ptr, 10); - if (end_ptr == str) { - // 输入不是有效的整数格式,则转换为0 - int_val = 0; - } - // 注释以支持前缀解析 - // if (*end_ptr != '\0' && !isspace(*end_ptr)) { - // return RC::INVALID_ARGUMENT; // 浮点数后应为结尾或空白字符 - // } - // 默认认为 int_val 是否在 int 范围内 - result = static_cast(int_val); - return RC::SUCCESS; -} - static RC parse_float_prefix(const char *str, float &result) { - char *end_ptr; + char *end_ptr; + // 输入不是有效的整数格式,会转换为 0.0 double float_val = std::strtod(str, &end_ptr); - if (end_ptr == str) { - // 输入不是有效的整数格式,则转换为0 - float_val = 0; - } // 注释以支持前缀解析 // if (*end_ptr != '\0' && !isspace(*end_ptr)) { // return RC::INVALID_ARGUMENT; // 浮点数后应为结尾或空白字符 @@ -103,11 +85,15 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result) const // 如果转换数字溢出怎么处理?(不考虑) // 是否考虑十六进制/八进制?(不考虑) case AttrType::INTS: { - int int_val; - RC rc = parse_int_prefix(val.value_.pointer_value_, int_val); + // WHERE id < '1.5a'; + // 先当浮点数解析,浮点数可以兼容整型,再四舍五入转 int + float float_val; + RC rc = parse_float_prefix(val.value_.pointer_value_, float_val); if (rc != RC::SUCCESS) { return rc; } + // 四舍五入 + int int_val = static_cast(std::round(float_val)); result.set_int(int_val); } break; case AttrType::FLOATS: { From c19ea6c63fd8e826219fdf8245bdb06eab28d497 Mon Sep 17 00:00:00 2001 From: Koschei Date: Fri, 27 Sep 2024 00:53:12 +0800 Subject: [PATCH 038/308] =?UTF-8?q?fix:=20=E6=94=AF=E6=8C=81=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E8=BD=AC=E6=95=B4=E5=9E=8B=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=8F=90=E5=8D=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/char_type.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index ebb304a5..277362cf 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -92,9 +92,14 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result) const if (rc != RC::SUCCESS) { return rc; } - // 四舍五入 - int int_val = static_cast(std::round(float_val)); - result.set_int(int_val); + int int_val = static_cast(float_val); + // 是整数 + if (int_val == float_val) { + result.set_int(int_val); + } else { + // 为浮点数,类型提升 + result.set_float(float_val); + } } break; case AttrType::FLOATS: { float float_val; From ebee45a3682ccf5347a9d25ebb5c45475825b2b5 Mon Sep 17 00:00:00 2001 From: Koschei Date: Fri, 27 Sep 2024 02:17:47 +0800 Subject: [PATCH 039/308] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E6=95=B4=E5=9E=8B=E4=B8=8E=E6=B5=AE=E7=82=B9=E6=95=B0?= =?UTF-8?q?=E6=AF=94=E8=BE=83=E7=9A=84=20bug=EF=BC=8C=E5=B9=B6=E4=BB=85?= =?UTF-8?q?=E5=9C=A8=E5=85=81=E8=AE=B8=E6=97=B6=E8=BF=9B=E8=A1=8C=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=8F=90=E5=8D=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/char_type.cpp | 4 ++-- src/observer/common/type/char_type.h | 2 +- src/observer/common/type/data_type.h | 2 +- src/observer/common/type/float_type.cpp | 2 +- src/observer/common/type/float_type.h | 2 +- src/observer/common/type/integer_type.cpp | 9 ++++++--- src/observer/common/type/integer_type.h | 2 +- src/observer/common/value.h | 8 ++++---- src/observer/sql/stmt/update_stmt.cpp | 3 ++- src/observer/storage/table/table.cpp | 3 ++- 10 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index 277362cf..a85f0c00 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -67,7 +67,7 @@ RC CharType::set_value_from_str(Value &val, const string &data) const return RC::SUCCESS; } -RC CharType::cast_to(const Value &val, AttrType type, Value &result) const +RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const { switch (type) { case AttrType::DATES: { @@ -94,7 +94,7 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result) const } int int_val = static_cast(float_val); // 是整数 - if (int_val == float_val) { + if (int_val == float_val || !allow_type_promotion) { result.set_int(int_val); } else { // 为浮点数,类型提升 diff --git a/src/observer/common/type/char_type.h b/src/observer/common/type/char_type.h index d4833922..be49239b 100644 --- a/src/observer/common/type/char_type.h +++ b/src/observer/common/type/char_type.h @@ -26,7 +26,7 @@ class CharType : public DataType int compare(const Value &left, const Value &right) const override; - RC cast_to(const Value &val, AttrType type, Value &result) const override; + RC cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion = true) const override; RC set_value_from_str(Value &val, const string &data) const override; diff --git a/src/observer/common/type/data_type.h b/src/observer/common/type/data_type.h index 3b8c9fde..39177e01 100644 --- a/src/observer/common/type/data_type.h +++ b/src/observer/common/type/data_type.h @@ -75,7 +75,7 @@ class DataType /** * @brief 将 val 转换为 type 类型,并将结果保存到 result 中 */ - virtual RC cast_to(const Value &val, AttrType type, Value &result) const { return RC::UNSUPPORTED; } + virtual RC cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion = true) const { return RC::UNSUPPORTED; } /** * @brief 将 val 转换为 string,并将结果保存到 result 中 diff --git a/src/observer/common/type/float_type.cpp b/src/observer/common/type/float_type.cpp index 3ff0892c..1990f4da 100644 --- a/src/observer/common/type/float_type.cpp +++ b/src/observer/common/type/float_type.cpp @@ -97,7 +97,7 @@ int FloatType::cast_cost(AttrType type) return INT32_MAX; // 不支持转换 } -RC FloatType::cast_to(const Value &val, AttrType type, Value &result) const +RC FloatType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const { switch (type) { case AttrType::FLOATS: { diff --git a/src/observer/common/type/float_type.h b/src/observer/common/type/float_type.h index dbffadb0..4ac92973 100644 --- a/src/observer/common/type/float_type.h +++ b/src/observer/common/type/float_type.h @@ -32,7 +32,7 @@ class FloatType : public DataType RC negative(const Value &val, Value &result) const override; int cast_cost(AttrType type) override; - RC cast_to(const Value &val, AttrType type, Value &result) const override; + RC cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion = true) const override; RC set_value_from_str(Value &val, const string &data) const override; diff --git a/src/observer/common/type/integer_type.cpp b/src/observer/common/type/integer_type.cpp index 8815aed8..26ce390a 100644 --- a/src/observer/common/type/integer_type.cpp +++ b/src/observer/common/type/integer_type.cpp @@ -20,8 +20,11 @@ int IntegerType::compare(const Value &left, const Value &right) const ASSERT(right.attr_type() == AttrType::INTS || right.attr_type() == AttrType::FLOATS, "right type is not numeric"); if (right.attr_type() == AttrType::INTS) { return common::compare_int((void *)&left.value_.int_value_, (void *)&right.value_.int_value_); - } else if (right.attr_type() == AttrType::FLOATS) { - return common::compare_float((void *)&left.value_.int_value_, (void *)&right.value_.int_value_); + } + if (right.attr_type() == AttrType::FLOATS) { + float left_val = left.get_float(); + float right_val = right.get_float(); + return common::compare_float((void *)&left_val, (void *)&right_val); } return INT32_MAX; } @@ -83,7 +86,7 @@ int IntegerType::cast_cost(AttrType type) return INT32_MAX; // 不支持转换 } -RC IntegerType::cast_to(const Value &val, AttrType type, Value &result) const +RC IntegerType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const { switch (type) { case AttrType::INTS: { diff --git a/src/observer/common/type/integer_type.h b/src/observer/common/type/integer_type.h index b63606e5..693691d8 100644 --- a/src/observer/common/type/integer_type.h +++ b/src/observer/common/type/integer_type.h @@ -36,5 +36,5 @@ class IntegerType : public DataType RC to_string(const Value &val, string &result) const override; int cast_cost(AttrType type) override; - RC cast_to(const Value &val, AttrType type, Value &result) const override; + RC cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion = true) const override; }; diff --git a/src/observer/common/value.h b/src/observer/common/value.h index bd22a359..12fe3001 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -81,9 +81,9 @@ class Value final return DataType::type_instance(result.attr_type())->negative(value, result); } - static RC cast_to(const Value &value, AttrType to_type, Value &result) + static RC cast_to(const Value &value, AttrType to_type, Value &result, bool allow_type_promotion = true) { - return DataType::type_instance(value.attr_type())->cast_to(value, to_type, result); + return DataType::type_instance(value.attr_type())->cast_to(value, to_type, result, allow_type_promotion); } void set_type(AttrType type) { this->attr_type_ = type; } @@ -91,9 +91,9 @@ class Value final void set_data(const char *data, int length) { this->set_data(const_cast(data), length); } void set_value(const Value &value); void set_boolean(bool val); - void set_null(){} + void set_null() {} - bool is_null(){return false;} + bool is_null() { return false; } string to_string() const; diff --git a/src/observer/sql/stmt/update_stmt.cpp b/src/observer/sql/stmt/update_stmt.cpp index 59665be4..ab15006a 100644 --- a/src/observer/sql/stmt/update_stmt.cpp +++ b/src/observer/sql/stmt/update_stmt.cpp @@ -65,7 +65,8 @@ RC UpdateStmt::create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt) if (value.attr_type() != field_meta->type()) { // 尝试转换,发生转换时不考虑数值溢出 Value to_value; - RC rc = Value::cast_to(value, field_meta->type(), to_value); + // 更新不允许非目标类型的类型提升 + RC rc = Value::cast_to(value, field_meta->type(), to_value, false); if (rc != RC::SUCCESS) { LOG_ERROR("Schema field type mismatch and cast to failed. Field: %s, Expected Type: %s, Provided Type: %s", field_meta->name(), diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 5fba9908..eeb91c79 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -310,7 +310,8 @@ RC Table::make_record(int value_num, const Value *values, Record &record) const Value &value = values[i]; if (field->type() != value.attr_type()) { Value real_value; - rc = Value::cast_to(value, field->type(), real_value); + // 插入不允许非目标类型的类型提升 + rc = Value::cast_to(value, field->type(), real_value, false); if (OB_FAIL(rc)) { LOG_WARN("failed to cast value. table name:%s, field name:%s, value:%s", table_meta_.name(), field->name(), value.to_string().c_str()); From 547e697f38ca93ff10f6e9cdce72ff246e008873 Mon Sep 17 00:00:00 2001 From: Koschei Date: Fri, 27 Sep 2024 15:24:25 +0800 Subject: [PATCH 040/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=B1=82=E5=AF=B9=20inner=20join=20on=20=E7=9A=84?= =?UTF-8?q?=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/lex_sql.cpp | 466 ++++++++------- src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/lex_sql.l | 2 + src/observer/sql/parser/parse_defs.h | 12 +- src/observer/sql/parser/yacc_sql.cpp | 864 +++++++++++++++------------ src/observer/sql/parser/yacc_sql.hpp | 30 +- src/observer/sql/parser/yacc_sql.y | 85 ++- 7 files changed, 815 insertions(+), 646 deletions(-) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index d75efe90..08dd5407 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -386,8 +386,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 62 -#define YY_END_OF_BUFFER 63 +#define YY_NUM_RULES 64 +#define YY_END_OF_BUFFER 65 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -395,28 +395,28 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[184] = +static const flex_int16_t yy_accept[191] = { 0, - 0, 0, 0, 0, 63, 61, 1, 2, 61, 61, - 61, 45, 46, 57, 55, 47, 56, 6, 58, 3, - 5, 52, 48, 54, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 62, 51, 0, 59, 0, 60, 3, 0, - 49, 50, 53, 44, 44, 44, 44, 41, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 15, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 4, 22, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - - 44, 44, 44, 44, 32, 44, 44, 44, 28, 44, - 44, 44, 44, 44, 44, 44, 44, 19, 33, 44, - 44, 37, 35, 44, 9, 11, 7, 44, 44, 44, - 20, 44, 8, 44, 44, 44, 24, 36, 44, 44, - 16, 44, 17, 44, 44, 44, 44, 29, 44, 44, - 44, 44, 34, 44, 40, 14, 44, 44, 44, 44, - 44, 12, 44, 44, 21, 30, 10, 26, 44, 43, - 38, 23, 44, 18, 44, 13, 27, 25, 39, 44, - 42, 31, 0 + 0, 0, 0, 0, 65, 63, 1, 2, 63, 63, + 63, 47, 48, 59, 57, 49, 58, 6, 60, 3, + 5, 54, 50, 56, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 64, 53, 0, 61, 0, 62, 3, + 0, 51, 52, 55, 46, 46, 46, 46, 41, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 15, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 4, 22, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + + 46, 46, 46, 46, 46, 46, 46, 32, 46, 46, + 46, 46, 28, 46, 46, 46, 46, 46, 46, 46, + 46, 19, 33, 46, 46, 37, 35, 46, 9, 11, + 7, 46, 46, 46, 20, 46, 8, 46, 46, 46, + 46, 24, 45, 36, 46, 46, 16, 46, 17, 46, + 46, 46, 46, 29, 46, 46, 46, 46, 34, 46, + 40, 14, 46, 44, 46, 46, 46, 46, 12, 46, + 46, 21, 30, 10, 26, 46, 43, 38, 23, 46, + 18, 46, 13, 27, 25, 39, 46, 42, 31, 0 } ; static const YY_CHAR yy_ec[256] = @@ -429,12 +429,12 @@ static const YY_CHAR yy_ec[256] = 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 29, 36, 37, 38, 39, 40, 41, 42, 43, 29, - 1, 1, 1, 1, 29, 1, 44, 45, 46, 47, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 36, + 1, 1, 1, 1, 36, 1, 45, 46, 47, 48, - 48, 49, 50, 51, 52, 29, 53, 54, 55, 56, - 57, 58, 29, 59, 60, 61, 62, 63, 64, 65, - 66, 29, 1, 1, 1, 1, 1, 1, 1, 1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 36, 61, 62, 63, 64, 65, 66, 67, + 68, 36, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -451,7 +451,7 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[67] = +static const YY_CHAR yy_meta[69] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, @@ -459,123 +459,129 @@ static const YY_CHAR yy_meta[67] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2 + 2, 2, 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[189] = +static const flex_int16_t yy_base[196] = { 0, - 0, 0, 0, 0, 487, 488, 488, 488, 468, 480, - 478, 488, 488, 488, 488, 488, 468, 488, 488, 54, - 488, 52, 488, 464, 53, 57, 60, 59, 70, 91, - 61, 67, 75, 466, 87, 77, 98, 113, 109, 58, - 119, 111, 488, 488, 475, 488, 473, 488, 86, 463, - 488, 488, 488, 0, 462, 126, 121, 461, 115, 137, - 127, 143, 128, 139, 150, 157, 153, 160, 163, 168, - 173, 175, 186, 460, 180, 190, 199, 203, 193, 202, - 216, 201, 214, 459, 451, 225, 226, 228, 227, 230, - 237, 243, 251, 145, 231, 239, 256, 263, 264, 250, - - 253, 260, 271, 279, 268, 275, 286, 289, 449, 265, - 290, 292, 300, 301, 294, 305, 295, 448, 446, 315, - 309, 444, 442, 317, 441, 440, 438, 319, 320, 333, - 437, 327, 433, 329, 321, 344, 431, 430, 345, 346, - 428, 354, 425, 358, 350, 369, 371, 423, 361, 372, - 376, 374, 418, 389, 415, 382, 386, 390, 392, 393, - 399, 398, 394, 400, 368, 364, 357, 342, 406, 335, - 331, 179, 401, 171, 417, 162, 99, 83, 74, 414, - 73, 69, 488, 467, 469, 471, 76, 75 + 0, 0, 0, 0, 508, 509, 509, 509, 489, 501, + 499, 509, 509, 509, 509, 509, 489, 509, 509, 56, + 509, 54, 509, 485, 55, 59, 60, 61, 64, 80, + 62, 67, 71, 75, 487, 81, 85, 86, 111, 113, + 109, 117, 115, 509, 509, 496, 509, 494, 509, 133, + 484, 509, 509, 509, 0, 483, 134, 138, 482, 137, + 136, 139, 146, 144, 160, 150, 157, 165, 151, 171, + 172, 163, 217, 162, 182, 474, 189, 198, 199, 210, + 185, 213, 188, 208, 211, 473, 472, 193, 226, 234, + 236, 232, 242, 248, 259, 255, 261, 263, 268, 269, + + 270, 267, 274, 281, 283, 284, 288, 289, 277, 299, + 301, 305, 471, 302, 303, 306, 310, 330, 323, 324, + 334, 469, 467, 327, 331, 466, 465, 337, 464, 462, + 460, 336, 343, 345, 459, 344, 457, 328, 347, 354, + 359, 456, 454, 453, 362, 371, 452, 369, 447, 373, + 384, 383, 386, 440, 387, 397, 404, 396, 429, 394, + 428, 402, 410, 390, 398, 421, 401, 412, 414, 424, + 416, 358, 357, 271, 238, 427, 223, 186, 161, 436, + 158, 441, 132, 110, 87, 78, 415, 77, 74, 509, + 490, 492, 494, 82, 76 + } ; -static const flex_int16_t yy_def[189] = +static const flex_int16_t yy_def[196] = { 0, - 183, 1, 184, 184, 183, 183, 183, 183, 183, 185, - 186, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 183, 183, 185, 183, 186, 183, 183, 183, - 183, 183, 183, 188, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 183, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 0, 183, 183, 183, 183, 183 + 190, 1, 191, 191, 190, 190, 190, 190, 190, 192, + 193, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 190, 190, 192, 190, 193, 190, 190, + 190, 190, 190, 190, 195, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 190, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 0, + 190, 190, 190, 190, 190 + } ; -static const flex_int16_t yy_nxt[555] = +static const flex_int16_t yy_nxt[578] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, - 35, 34, 34, 36, 34, 37, 38, 39, 40, 41, - 42, 34, 34, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 34, 34, 36, 34, 37, 38, - 39, 40, 41, 42, 34, 34, 50, 54, 49, 51, - 52, 54, 54, 54, 54, 54, 54, 55, 63, 59, - 57, 54, 64, 54, 54, 56, 60, 54, 54, 54, - 71, 54, 81, 61, 65, 62, 70, 54, 50, 58, - - 49, 54, 63, 59, 57, 54, 64, 72, 56, 74, - 60, 66, 54, 54, 71, 81, 61, 65, 62, 70, - 73, 67, 58, 54, 68, 54, 69, 54, 80, 54, - 72, 75, 74, 54, 66, 54, 76, 83, 82, 77, - 54, 54, 54, 73, 67, 87, 86, 68, 85, 69, - 78, 54, 80, 54, 75, 79, 88, 54, 89, 54, - 76, 83, 82, 77, 54, 91, 90, 54, 87, 92, - 86, 54, 85, 78, 54, 93, 54, 54, 79, 126, - 88, 89, 54, 94, 95, 54, 97, 54, 91, 54, - 90, 96, 92, 54, 54, 98, 99, 102, 93, 103, - - 54, 100, 126, 101, 54, 106, 94, 54, 95, 97, - 107, 104, 105, 54, 96, 54, 54, 54, 98, 99, - 108, 102, 113, 103, 100, 112, 101, 109, 54, 106, - 54, 115, 110, 107, 104, 105, 111, 116, 114, 54, - 54, 54, 54, 108, 54, 54, 113, 118, 112, 121, - 109, 54, 117, 54, 115, 110, 122, 54, 120, 111, - 123, 116, 114, 119, 54, 54, 124, 54, 127, 128, - 54, 118, 125, 121, 54, 129, 117, 54, 54, 54, - 122, 120, 54, 134, 123, 54, 119, 133, 132, 54, - 124, 127, 128, 54, 130, 131, 125, 138, 135, 129, - - 54, 137, 136, 54, 54, 141, 54, 134, 54, 54, - 133, 132, 140, 143, 54, 54, 139, 130, 131, 54, - 145, 138, 135, 54, 137, 142, 136, 148, 141, 54, - 144, 54, 146, 54, 54, 54, 140, 143, 152, 139, - 147, 54, 149, 54, 145, 54, 150, 54, 142, 54, - 148, 157, 154, 144, 151, 146, 54, 153, 54, 54, - 54, 155, 152, 147, 54, 159, 149, 160, 54, 150, - 156, 54, 54, 161, 157, 54, 154, 151, 54, 158, - 153, 162, 54, 54, 155, 54, 54, 163, 54, 159, - 54, 160, 164, 156, 165, 167, 54, 161, 166, 168, - - 54, 169, 158, 54, 54, 162, 54, 54, 54, 171, - 163, 173, 54, 54, 54, 54, 164, 177, 165, 167, - 54, 166, 180, 168, 175, 169, 170, 172, 54, 54, - 174, 54, 54, 171, 176, 173, 178, 54, 179, 54, - 181, 177, 54, 182, 54, 54, 180, 54, 175, 170, - 172, 54, 54, 174, 54, 54, 54, 176, 54, 178, - 54, 179, 54, 54, 181, 54, 182, 43, 43, 45, - 45, 47, 47, 84, 54, 54, 54, 84, 48, 46, - 54, 53, 49, 48, 46, 44, 183, 5, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183 + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 35, 37, 35, 35, 38, 39, 40, 41, + 42, 43, 35, 35, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 35, 35, 37, 35, + 38, 39, 40, 41, 42, 43, 35, 35, 51, 55, + 50, 52, 53, 55, 55, 55, 55, 55, 55, 60, + 64, 55, 58, 56, 65, 55, 61, 57, 55, 55, + 72, 55, 55, 62, 55, 55, 63, 66, 71, 55, + + 55, 55, 59, 73, 60, 64, 67, 58, 74, 65, + 68, 61, 57, 69, 75, 72, 70, 76, 62, 77, + 63, 66, 71, 55, 55, 55, 59, 55, 73, 55, + 67, 55, 82, 74, 78, 68, 84, 79, 69, 75, + 70, 85, 76, 83, 77, 51, 55, 50, 55, 80, + 55, 55, 55, 55, 81, 90, 87, 82, 55, 78, + 55, 84, 79, 88, 55, 55, 85, 89, 83, 92, + 91, 55, 55, 80, 55, 55, 55, 55, 81, 55, + 90, 87, 93, 96, 97, 55, 55, 100, 88, 109, + 94, 98, 89, 103, 92, 91, 55, 95, 99, 55, + + 55, 110, 55, 55, 101, 102, 93, 55, 96, 97, + 118, 100, 55, 55, 109, 94, 98, 116, 103, 111, + 121, 95, 55, 99, 55, 55, 110, 55, 112, 101, + 102, 55, 114, 117, 120, 118, 113, 55, 119, 104, + 55, 105, 116, 115, 111, 121, 55, 122, 55, 106, + 55, 125, 55, 112, 107, 108, 55, 114, 117, 120, + 113, 126, 55, 119, 104, 127, 105, 124, 115, 55, + 123, 128, 122, 55, 106, 55, 125, 55, 107, 108, + 129, 55, 55, 55, 55, 55, 126, 133, 55, 130, + 127, 55, 124, 132, 123, 55, 128, 55, 55, 131, + + 134, 135, 55, 55, 138, 129, 136, 140, 137, 143, + 139, 141, 133, 55, 130, 55, 55, 55, 132, 55, + 55, 144, 142, 131, 55, 134, 135, 149, 146, 138, + 136, 145, 140, 137, 143, 139, 141, 55, 55, 148, + 150, 55, 55, 147, 55, 55, 144, 142, 55, 151, + 55, 55, 149, 146, 155, 158, 145, 55, 55, 55, + 153, 55, 152, 148, 160, 150, 154, 147, 55, 156, + 162, 55, 55, 55, 151, 157, 55, 163, 161, 155, + 158, 159, 166, 55, 153, 55, 152, 55, 168, 160, + 164, 154, 167, 156, 162, 165, 169, 55, 55, 157, + + 55, 55, 163, 161, 55, 159, 171, 166, 55, 172, + 55, 55, 55, 168, 164, 55, 55, 167, 55, 165, + 174, 169, 170, 176, 55, 173, 55, 175, 55, 55, + 55, 171, 177, 178, 172, 55, 179, 182, 55, 181, + 180, 55, 55, 55, 189, 174, 170, 184, 176, 173, + 55, 183, 175, 185, 55, 55, 177, 187, 178, 186, + 179, 55, 182, 181, 188, 180, 55, 55, 55, 189, + 55, 55, 184, 55, 55, 183, 55, 185, 55, 55, + 55, 55, 187, 55, 186, 55, 55, 86, 55, 188, + 44, 44, 46, 46, 48, 48, 55, 55, 86, 49, + + 47, 55, 54, 50, 49, 47, 45, 190, 5, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190 } ; -static const flex_int16_t yy_chk[555] = +static const flex_int16_t yy_chk[578] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -583,61 +589,63 @@ static const flex_int16_t yy_chk[555] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 40, 28, 27, 31, 188, 187, 28, 27, - 26, 32, 28, 182, 29, 25, 27, 181, 179, 33, - 32, 36, 40, 27, 28, 27, 31, 178, 49, 26, - - 49, 35, 28, 27, 26, 30, 28, 33, 25, 36, - 27, 29, 37, 177, 32, 40, 27, 28, 27, 31, - 35, 30, 26, 39, 30, 42, 30, 38, 39, 59, - 33, 37, 36, 41, 29, 57, 38, 42, 41, 38, - 56, 61, 63, 35, 30, 59, 57, 30, 56, 30, - 38, 60, 39, 64, 37, 38, 60, 62, 61, 94, - 38, 42, 41, 38, 65, 63, 62, 67, 59, 64, - 57, 66, 56, 38, 68, 64, 176, 69, 38, 94, - 60, 61, 70, 65, 66, 174, 67, 71, 63, 72, - 62, 66, 64, 172, 75, 68, 69, 72, 64, 72, - - 73, 70, 94, 71, 76, 73, 65, 79, 66, 67, - 75, 72, 72, 77, 66, 82, 80, 78, 68, 69, - 76, 72, 80, 72, 70, 79, 71, 76, 83, 73, - 81, 82, 77, 75, 72, 72, 78, 83, 81, 86, - 87, 89, 88, 76, 90, 95, 80, 87, 79, 90, - 76, 91, 86, 96, 82, 77, 91, 92, 89, 78, - 91, 83, 81, 88, 100, 93, 92, 101, 95, 96, - 97, 87, 93, 90, 102, 97, 86, 98, 99, 110, - 91, 89, 105, 102, 91, 103, 88, 101, 100, 106, - 92, 95, 96, 104, 98, 99, 93, 106, 103, 97, - - 107, 105, 104, 108, 111, 110, 112, 102, 115, 117, - 101, 100, 108, 112, 113, 114, 107, 98, 99, 116, - 114, 106, 103, 121, 105, 111, 104, 117, 110, 120, - 113, 124, 115, 128, 129, 135, 108, 112, 128, 107, - 116, 132, 120, 134, 114, 171, 121, 130, 111, 170, - 117, 135, 130, 113, 124, 115, 168, 129, 136, 139, - 140, 132, 128, 116, 145, 139, 120, 140, 142, 121, - 134, 167, 144, 142, 135, 149, 130, 124, 166, 136, - 129, 144, 165, 146, 132, 147, 150, 145, 152, 139, - 151, 140, 146, 134, 147, 150, 156, 142, 149, 151, - - 157, 152, 136, 154, 158, 144, 159, 160, 163, 157, - 145, 159, 162, 161, 164, 173, 146, 163, 147, 150, - 169, 149, 173, 151, 161, 152, 154, 158, 180, 155, - 160, 175, 153, 157, 162, 159, 164, 148, 169, 143, - 175, 163, 141, 180, 138, 137, 173, 133, 161, 154, - 158, 131, 127, 160, 126, 125, 123, 162, 122, 164, - 119, 169, 118, 109, 175, 85, 180, 184, 184, 185, - 185, 186, 186, 84, 74, 58, 55, 50, 47, 45, - 34, 24, 17, 11, 10, 9, 5, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 183 + 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, + 20, 22, 22, 26, 27, 28, 31, 195, 29, 27, + 28, 32, 26, 194, 28, 33, 27, 25, 189, 34, + 32, 188, 186, 27, 30, 36, 27, 28, 31, 37, + + 38, 185, 26, 33, 27, 28, 29, 26, 34, 28, + 30, 27, 25, 30, 36, 32, 30, 37, 27, 38, + 27, 28, 31, 41, 184, 39, 26, 40, 33, 43, + 29, 42, 40, 34, 39, 30, 42, 39, 30, 36, + 30, 43, 37, 41, 38, 50, 183, 50, 57, 39, + 61, 60, 58, 62, 39, 61, 57, 40, 64, 39, + 63, 42, 39, 58, 66, 69, 43, 60, 41, 63, + 62, 67, 181, 39, 65, 179, 74, 72, 39, 68, + 61, 57, 64, 66, 67, 70, 71, 69, 58, 74, + 65, 67, 60, 72, 63, 62, 75, 65, 68, 81, + + 178, 75, 83, 77, 70, 71, 64, 88, 66, 67, + 83, 69, 78, 79, 74, 65, 67, 81, 72, 77, + 88, 65, 84, 68, 80, 85, 75, 82, 78, 70, + 71, 73, 79, 82, 85, 83, 78, 177, 84, 73, + 89, 73, 81, 80, 77, 88, 92, 89, 90, 73, + 91, 92, 175, 78, 73, 73, 93, 79, 82, 85, + 78, 93, 94, 84, 73, 93, 73, 91, 80, 96, + 90, 94, 89, 95, 73, 97, 92, 98, 73, 73, + 95, 102, 99, 100, 101, 174, 93, 99, 103, 96, + 93, 109, 91, 98, 90, 104, 94, 105, 106, 97, + + 100, 101, 107, 108, 104, 95, 102, 106, 103, 109, + 105, 107, 99, 110, 96, 111, 114, 115, 98, 112, + 116, 110, 108, 97, 117, 100, 101, 116, 112, 104, + 102, 111, 106, 103, 109, 105, 107, 119, 120, 115, + 117, 124, 138, 114, 118, 125, 110, 108, 121, 118, + 132, 128, 116, 112, 124, 132, 111, 133, 136, 134, + 120, 139, 119, 115, 134, 117, 121, 114, 140, 125, + 138, 173, 172, 141, 118, 128, 145, 139, 136, 124, + 132, 133, 145, 148, 120, 146, 119, 150, 148, 134, + 140, 121, 146, 125, 138, 141, 150, 152, 151, 128, + + 153, 155, 139, 136, 164, 133, 152, 145, 160, 153, + 158, 156, 165, 148, 140, 167, 162, 146, 157, 141, + 156, 150, 151, 158, 163, 155, 168, 157, 169, 187, + 171, 152, 160, 163, 153, 166, 165, 168, 170, 167, + 166, 176, 161, 159, 187, 156, 151, 170, 158, 155, + 180, 169, 157, 171, 154, 182, 160, 180, 163, 176, + 165, 149, 168, 167, 182, 166, 147, 144, 143, 187, + 142, 137, 170, 135, 131, 169, 130, 171, 129, 127, + 126, 123, 180, 122, 176, 113, 87, 86, 76, 182, + 191, 191, 192, 192, 193, 193, 59, 56, 51, 48, + + 46, 35, 24, 17, 11, 10, 9, 5, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190 } ; /* The intent behind this definition is that it'll catch @@ -672,7 +680,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 675 "lex_sql.cpp" +#line 683 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -681,7 +689,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 684 "lex_sql.cpp" +#line 692 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -967,7 +975,7 @@ YY_DECL #line 75 "lex_sql.l" -#line 970 "lex_sql.cpp" +#line 978 "lex_sql.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -994,13 +1002,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 184 ) + if ( yy_current_state >= 191 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 488 ); + while ( yy_base[yy_current_state] != 509 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1243,92 +1251,102 @@ RETURN_TOKEN(FORMAT); case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +RETURN_TOKEN(INNER); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(LBRACE); +RETURN_TOKEN(JOIN); YY_BREAK case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(RBRACE); +yylval->string=strdup(yytext); RETURN_TOKEN(ID); YY_BREAK case 47: YY_RULE_SETUP -#line 126 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 125 "lex_sql.l" +RETURN_TOKEN(LBRACE); YY_BREAK case 48: YY_RULE_SETUP -#line 127 "lex_sql.l" -RETURN_TOKEN(EQ); +#line 126 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 49: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(COMMA); YY_BREAK case 50: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(EQ); YY_BREAK case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LE); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(NE); YY_BREAK case 53: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(NE); YY_BREAK case 54: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(LT); YY_BREAK case 55: -#line 136 "lex_sql.l" +YY_RULE_SETUP +#line 134 "lex_sql.l" +RETURN_TOKEN(GE); + YY_BREAK case 56: -#line 137 "lex_sql.l" +YY_RULE_SETUP +#line 135 "lex_sql.l" +RETURN_TOKEN(GT); + YY_BREAK case 57: #line 138 "lex_sql.l" case 58: +#line 139 "lex_sql.l" +case 59: +#line 140 "lex_sql.l" +case 60: YY_RULE_SETUP -#line 138 "lex_sql.l" +#line 140 "lex_sql.l" { return yytext[0]; } YY_BREAK -case 59: -/* rule 59 can match eol */ +case 61: +/* rule 61 can match eol */ YY_RULE_SETUP -#line 139 "lex_sql.l" +#line 141 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 60: -/* rule 60 can match eol */ +case 62: +/* rule 62 can match eol */ YY_RULE_SETUP -#line 140 "lex_sql.l" +#line 142 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 61: +case 63: YY_RULE_SETUP -#line 142 "lex_sql.l" +#line 144 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK -case 62: +case 64: YY_RULE_SETUP -#line 143 "lex_sql.l" +#line 145 "lex_sql.l" ECHO; YY_BREAK -#line 1331 "lex_sql.cpp" +#line 1349 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1628,7 +1646,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 184 ) + if ( yy_current_state >= 191 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1657,11 +1675,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 184 ) + if ( yy_current_state >= 191 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 183); + yy_is_jam = (yy_current_state == 190); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2484,7 +2502,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 143 "lex_sql.l" +#line 145 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index ee2a5fc0..b4fd1232 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -542,7 +542,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 143 "lex_sql.l" +#line 145 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index f1d82be0..5aca2548 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -119,6 +119,8 @@ GROUP RETURN_TOKEN(GROUP); BY RETURN_TOKEN(BY); STORAGE RETURN_TOKEN(STORAGE); FORMAT RETURN_TOKEN(FORMAT); +INNER RETURN_TOKEN(INNER); +JOIN RETURN_TOKEN(JOIN); {ID} yylval->string=strdup(yytext); RETURN_TOKEN(ID); "(" RETURN_TOKEN(LBRACE); ")" RETURN_TOKEN(RBRACE); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 26eaacfc..1a2ec1d2 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -85,7 +85,6 @@ struct ConditionSqlNode * where 条件 conditions,这里表示使用AND串联起来多个条件。正常的SQL语句会有OR,NOT等, * 甚至可以包含复杂的表达式。 */ - struct SelectSqlNode { std::vector> expressions; ///< 查询的表达式 @@ -94,6 +93,17 @@ struct SelectSqlNode std::vector> group_by; ///< group by clause }; +/** + * @brief 描述一个join语句 + * @ingroup SQLParser + * @details 目前只支持 inner join,解析表和条件后直接放到 SelectSqlNode 里。 + */ +struct JoinSqlNode +{ + std::string relation; ///< 查询的表 + ConditionSqlNode condition; ///< 查询条件 +}; + /** * @brief 算术表达式计算的语法树 * @ingroup SQLParser diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 55db38ad..20b6a8dd 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -194,65 +194,69 @@ enum yysymbol_kind_t YYSYMBOL_EXPLAIN = 42, /* EXPLAIN */ YYSYMBOL_STORAGE = 43, /* STORAGE */ YYSYMBOL_FORMAT = 44, /* FORMAT */ - YYSYMBOL_EQ = 45, /* EQ */ - YYSYMBOL_LT = 46, /* LT */ - YYSYMBOL_GT = 47, /* GT */ - YYSYMBOL_LE = 48, /* LE */ - YYSYMBOL_GE = 49, /* GE */ - YYSYMBOL_NE = 50, /* NE */ - YYSYMBOL_NUMBER = 51, /* NUMBER */ - YYSYMBOL_FLOAT = 52, /* FLOAT */ - YYSYMBOL_ID = 53, /* ID */ - YYSYMBOL_SSS = 54, /* SSS */ - YYSYMBOL_55_ = 55, /* '+' */ - YYSYMBOL_56_ = 56, /* '-' */ - YYSYMBOL_57_ = 57, /* '*' */ - YYSYMBOL_58_ = 58, /* '/' */ - YYSYMBOL_UMINUS = 59, /* UMINUS */ - YYSYMBOL_YYACCEPT = 60, /* $accept */ - YYSYMBOL_commands = 61, /* commands */ - YYSYMBOL_command_wrapper = 62, /* command_wrapper */ - YYSYMBOL_exit_stmt = 63, /* exit_stmt */ - YYSYMBOL_help_stmt = 64, /* help_stmt */ - YYSYMBOL_sync_stmt = 65, /* sync_stmt */ - YYSYMBOL_begin_stmt = 66, /* begin_stmt */ - YYSYMBOL_commit_stmt = 67, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 68, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 69, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 70, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 71, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 72, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 73, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 74, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 75, /* attr_def_list */ - YYSYMBOL_attr_def = 76, /* attr_def */ - YYSYMBOL_number = 77, /* number */ - YYSYMBOL_type = 78, /* type */ - YYSYMBOL_insert_stmt = 79, /* insert_stmt */ - YYSYMBOL_value_list = 80, /* value_list */ - YYSYMBOL_value = 81, /* value */ - YYSYMBOL_storage_format = 82, /* storage_format */ - YYSYMBOL_delete_stmt = 83, /* delete_stmt */ - YYSYMBOL_update_stmt = 84, /* update_stmt */ - YYSYMBOL_setClauses = 85, /* setClauses */ - YYSYMBOL_setClause = 86, /* setClause */ - YYSYMBOL_select_stmt = 87, /* select_stmt */ - YYSYMBOL_calc_stmt = 88, /* calc_stmt */ - YYSYMBOL_expression_list = 89, /* expression_list */ - YYSYMBOL_expression = 90, /* expression */ - YYSYMBOL_aggr_func_expr = 91, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 92, /* rel_attr */ - YYSYMBOL_relation = 93, /* relation */ - YYSYMBOL_rel_list = 94, /* rel_list */ - YYSYMBOL_where = 95, /* where */ - YYSYMBOL_condition_list = 96, /* condition_list */ - YYSYMBOL_condition = 97, /* condition */ - YYSYMBOL_comp_op = 98, /* comp_op */ - YYSYMBOL_group_by = 99, /* group_by */ - YYSYMBOL_load_data_stmt = 100, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 101, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 102, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 103 /* opt_semicolon */ + YYSYMBOL_INNER = 45, /* INNER */ + YYSYMBOL_JOIN = 46, /* JOIN */ + YYSYMBOL_EQ = 47, /* EQ */ + YYSYMBOL_LT = 48, /* LT */ + YYSYMBOL_GT = 49, /* GT */ + YYSYMBOL_LE = 50, /* LE */ + YYSYMBOL_GE = 51, /* GE */ + YYSYMBOL_NE = 52, /* NE */ + YYSYMBOL_NUMBER = 53, /* NUMBER */ + YYSYMBOL_FLOAT = 54, /* FLOAT */ + YYSYMBOL_ID = 55, /* ID */ + YYSYMBOL_SSS = 56, /* SSS */ + YYSYMBOL_57_ = 57, /* '+' */ + YYSYMBOL_58_ = 58, /* '-' */ + YYSYMBOL_59_ = 59, /* '*' */ + YYSYMBOL_60_ = 60, /* '/' */ + YYSYMBOL_UMINUS = 61, /* UMINUS */ + YYSYMBOL_YYACCEPT = 62, /* $accept */ + YYSYMBOL_commands = 63, /* commands */ + YYSYMBOL_command_wrapper = 64, /* command_wrapper */ + YYSYMBOL_exit_stmt = 65, /* exit_stmt */ + YYSYMBOL_help_stmt = 66, /* help_stmt */ + YYSYMBOL_sync_stmt = 67, /* sync_stmt */ + YYSYMBOL_begin_stmt = 68, /* begin_stmt */ + YYSYMBOL_commit_stmt = 69, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 70, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 71, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 72, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 73, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 74, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 75, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 76, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 77, /* attr_def_list */ + YYSYMBOL_attr_def = 78, /* attr_def */ + YYSYMBOL_number = 79, /* number */ + YYSYMBOL_type = 80, /* type */ + YYSYMBOL_insert_stmt = 81, /* insert_stmt */ + YYSYMBOL_value_list = 82, /* value_list */ + YYSYMBOL_value = 83, /* value */ + YYSYMBOL_storage_format = 84, /* storage_format */ + YYSYMBOL_delete_stmt = 85, /* delete_stmt */ + YYSYMBOL_update_stmt = 86, /* update_stmt */ + YYSYMBOL_setClauses = 87, /* setClauses */ + YYSYMBOL_setClause = 88, /* setClause */ + YYSYMBOL_select_stmt = 89, /* select_stmt */ + YYSYMBOL_calc_stmt = 90, /* calc_stmt */ + YYSYMBOL_expression_list = 91, /* expression_list */ + YYSYMBOL_expression = 92, /* expression */ + YYSYMBOL_aggr_func_expr = 93, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 94, /* rel_attr */ + YYSYMBOL_relation = 95, /* relation */ + YYSYMBOL_rel_list = 96, /* rel_list */ + YYSYMBOL_joinClause = 97, /* joinClause */ + YYSYMBOL_joinClauses = 98, /* joinClauses */ + YYSYMBOL_where = 99, /* where */ + YYSYMBOL_condition_list = 100, /* condition_list */ + YYSYMBOL_condition = 101, /* condition */ + YYSYMBOL_comp_op = 102, /* comp_op */ + YYSYMBOL_group_by = 103, /* group_by */ + YYSYMBOL_load_data_stmt = 104, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 105, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 106, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 107 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -583,19 +587,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 154 +#define YYLAST 168 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 60 +#define YYNTOKENS 62 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 44 +#define YYNNTS 46 /* YYNRULES -- Number of rules. */ -#define YYNRULES 98 +#define YYNRULES 102 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 176 +#define YYNSTATES 188 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 310 +#define YYMAXUTOK 312 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -613,7 +617,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 57, 55, 2, 56, 2, 58, 2, 2, + 2, 2, 59, 57, 2, 58, 2, 60, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -640,23 +644,24 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 59 + 55, 56, 61 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 194, 194, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 225, 231, 236, 242, 248, 254, 260, - 267, 273, 281, 295, 305, 329, 332, 345, 353, 363, - 366, 367, 368, 369, 372, 389, 392, 403, 407, 411, - 420, 423, 430, 443, 458, 464, 472, 482, 507, 516, - 521, 532, 535, 538, 541, 544, 548, 551, 556, 562, - 565, 571, 579, 585, 590, 600, 605, 610, 624, 627, - 633, 636, 641, 648, 660, 672, 684, 699, 700, 701, - 702, 703, 704, 710, 715, 728, 736, 746, 747 + 0, 200, 200, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 231, 237, 242, 248, 254, 260, 266, + 273, 279, 287, 301, 311, 335, 338, 351, 359, 369, + 372, 373, 374, 375, 378, 395, 398, 409, 413, 417, + 426, 429, 436, 449, 464, 470, 478, 488, 511, 545, + 554, 559, 570, 573, 576, 579, 582, 586, 589, 594, + 600, 603, 609, 617, 623, 628, 638, 644, 650, 658, + 669, 675, 685, 688, 694, 697, 702, 709, 721, 733, + 745, 760, 761, 762, 763, 764, 765, 771, 776, 789, + 797, 807, 808 }; #endif @@ -678,17 +683,18 @@ static const char *const yytname[] = "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "STRING_T", "FLOAT_T", "DATE_T", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", - "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "NUMBER", - "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", - "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", - "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", - "show_tables_stmt", "desc_table_stmt", "create_index_stmt", - "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", - "number", "type", "insert_stmt", "value_list", "value", "storage_format", - "delete_stmt", "update_stmt", "setClauses", "setClause", "select_stmt", - "calc_stmt", "expression_list", "expression", "aggr_func_expr", - "rel_attr", "relation", "rel_list", "where", "condition_list", - "condition", "comp_op", "group_by", "load_data_stmt", "explain_stmt", + "STORAGE", "FORMAT", "INNER", "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", + "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", + "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", + "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", + "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", + "create_index_stmt", "drop_index_stmt", "create_table_stmt", + "attr_def_list", "attr_def", "number", "type", "insert_stmt", + "value_list", "value", "storage_format", "delete_stmt", "update_stmt", + "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", + "expression", "aggr_func_expr", "rel_attr", "relation", "rel_list", + "joinClause", "joinClauses", "where", "condition_list", "condition", + "comp_op", "group_by", "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; @@ -711,26 +717,27 @@ yysymbol_name (yysymbol_kind_t yysymbol) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int8 yypact[] = +static const yytype_int16 yypact[] = { - 63, -1, 74, 2, 2, -43, 3, -104, -16, -19, - -34, -104, -104, -104, -104, -104, -25, -5, 63, 49, - 38, -104, -104, -104, -104, -104, -104, -104, -104, -104, + 78, 2, 21, 11, 11, -48, 6, -104, -21, 4, + -27, -104, -104, -104, -104, -104, -23, 28, 78, 73, + 79, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, 4, 19, 30, 48, 2, -104, -104, -14, -104, - 2, -104, -104, -104, 39, -104, -104, 18, -104, -104, - 50, 51, 53, 65, 70, -104, -104, -104, -104, 93, - 75, -104, 76, 9, -6, 62, -104, 2, 2, 2, - 2, 2, 64, 83, 84, 67, 37, 68, 71, 72, - 73, -104, -104, 98, -104, -104, 41, 41, -104, -104, - -104, 100, 84, 104, -21, -104, 82, -17, -104, -104, - 96, 81, 108, 111, -104, -104, 64, -104, 37, 101, - -23, -23, -104, 95, 37, 67, -104, 125, -104, -104, - -104, -104, 115, 71, 116, 85, -104, -104, 114, -104, - -104, -104, -104, -104, -104, -21, -21, -21, -104, -104, - 86, 89, 108, 94, 121, 37, 122, -104, -104, -104, - -104, -104, -104, -104, 123, -104, 102, -104, -104, 114, - -104, -104, 99, -104, 92, -104 + -104, 30, 32, 42, 43, 11, -104, -104, -10, -104, + 11, -104, -104, -104, -17, -104, -104, 65, -104, -104, + 58, 59, 49, 69, 64, -104, -104, -104, -104, 99, + 81, -104, 83, -3, -6, 67, -104, 11, 11, 11, + 11, 11, 68, 91, 90, 71, 50, 72, 74, 75, + 76, -104, -104, 107, -104, -104, -1, -1, -104, -104, + -104, 87, -16, 114, -19, -104, 88, -15, -104, -104, + 102, 52, 115, 118, -104, -104, 92, 68, -104, 50, + 108, -25, -25, -104, 104, 50, 71, -104, 133, -104, + -104, -104, -104, 123, 74, 124, 93, 68, -104, -104, + 122, -104, -104, -104, -104, -104, -104, -19, -19, -19, + -104, -104, 94, 97, 115, 103, 125, 109, 106, 90, + 50, 132, -104, -104, -104, -104, -104, -104, -104, 134, + -104, 111, -104, -104, -19, 110, -104, 122, -104, -104, + 112, -104, 68, -104, -104, 98, -104, -104 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -740,42 +747,43 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 97, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 101, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 47, 48, 73, 49, - 0, 69, 67, 58, 59, 70, 68, 0, 31, 30, - 0, 0, 0, 0, 0, 95, 1, 98, 2, 0, - 0, 29, 0, 0, 0, 0, 66, 0, 0, 0, - 0, 0, 0, 0, 78, 0, 0, 0, 0, 0, - 0, 65, 72, 0, 74, 60, 61, 62, 63, 64, - 75, 76, 78, 0, 80, 52, 0, 78, 54, 96, - 0, 0, 35, 0, 33, 71, 0, 93, 0, 73, - 0, 0, 79, 81, 0, 0, 53, 0, 40, 41, - 42, 43, 38, 0, 0, 0, 77, 57, 45, 87, - 88, 89, 90, 91, 92, 0, 0, 80, 56, 55, - 0, 0, 35, 50, 0, 0, 0, 84, 86, 83, - 85, 82, 94, 39, 0, 36, 0, 34, 32, 45, - 44, 37, 0, 46, 0, 51 + 20, 0, 0, 0, 0, 0, 47, 48, 74, 49, + 0, 70, 68, 59, 60, 71, 69, 0, 31, 30, + 0, 0, 0, 0, 0, 99, 1, 102, 2, 0, + 0, 29, 0, 0, 0, 0, 67, 0, 0, 0, + 0, 0, 0, 0, 82, 0, 0, 0, 0, 0, + 0, 66, 73, 0, 75, 61, 62, 63, 64, 65, + 76, 77, 82, 0, 84, 52, 0, 82, 54, 100, + 0, 0, 35, 0, 33, 72, 0, 0, 97, 0, + 74, 0, 0, 83, 85, 0, 0, 53, 0, 40, + 41, 42, 43, 38, 0, 0, 0, 0, 78, 57, + 45, 91, 92, 93, 94, 95, 96, 0, 0, 84, + 56, 55, 0, 0, 35, 50, 0, 0, 80, 82, + 0, 0, 88, 90, 87, 89, 86, 98, 39, 0, + 36, 0, 34, 32, 0, 0, 97, 45, 44, 37, + 0, 79, 0, 58, 46, 0, 81, 51 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -104, -104, 129, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -3, 15, -104, -104, -104, - -18, -84, -104, -104, -104, -104, 25, -104, -104, -4, - -42, -104, -103, -104, 36, -96, 6, -104, 33, -104, - -104, -104, -104, -104 + -104, -104, 139, -104, -104, -104, -104, -104, -104, -104, + -104, -104, -104, -104, -104, 7, 24, -104, -104, -104, + -14, -86, -104, -104, -104, -104, 34, -104, -104, -2, + 31, -104, -103, -66, -104, -104, -20, -99, 15, -9, + 44, -8, -104, -104, -104, -104 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 134, 112, 164, 132, 33, - 156, 52, 167, 34, 35, 107, 108, 36, 37, 53, - 54, 55, 56, 101, 102, 105, 122, 123, 145, 137, - 38, 39, 40, 68 + 28, 29, 30, 31, 32, 135, 112, 169, 133, 33, + 161, 52, 172, 34, 35, 107, 108, 36, 37, 53, + 54, 55, 56, 157, 102, 158, 159, 105, 123, 124, + 147, 139, 38, 39, 40, 68 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -783,42 +791,44 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 57, 121, 109, 73, 125, 74, 117, 41, 76, 42, - 58, 126, 59, 45, 92, 61, 60, 75, 104, 62, - 120, 45, 139, 140, 141, 142, 143, 144, 63, 91, - 46, 47, 119, 49, 138, 64, 96, 97, 98, 99, - 148, 67, 158, 160, 121, 46, 47, 48, 49, 66, - 50, 51, 82, 46, 47, 48, 49, 69, 50, 51, - 77, 157, 159, 120, 78, 79, 80, 81, 1, 2, - 93, 169, 70, 95, 3, 4, 5, 6, 7, 8, - 9, 10, 43, 71, 44, 11, 12, 13, 46, 47, - 85, 49, 14, 15, 78, 79, 80, 81, 80, 81, - 16, 72, 17, 83, 84, 18, 128, 129, 130, 131, - 86, 87, 88, 89, 90, 94, 103, 100, 115, 104, - 106, 116, 110, 118, 111, 113, 114, 124, 127, 133, - 135, 147, 75, 150, 151, 155, 153, 166, 154, 162, - 163, 168, 170, 171, 174, 175, 172, 65, 152, 165, - 149, 173, 136, 161, 146 + 109, 122, 57, 118, 77, 117, 126, 58, 127, 74, + 41, 60, 42, 45, 92, 59, 101, 91, 121, 104, + 104, 75, 141, 142, 143, 144, 145, 146, 62, 43, + 45, 44, 63, 140, 46, 47, 120, 49, 61, 150, + 78, 79, 80, 81, 163, 165, 122, 46, 47, 48, + 49, 138, 50, 51, 78, 79, 80, 81, 80, 81, + 176, 162, 164, 121, 46, 47, 48, 49, 64, 50, + 51, 122, 93, 66, 177, 95, 73, 129, 130, 131, + 132, 76, 67, 1, 2, 69, 85, 70, 121, 3, + 4, 5, 6, 7, 8, 9, 10, 71, 72, 82, + 11, 12, 13, 46, 47, 87, 49, 14, 15, 96, + 97, 98, 99, 83, 84, 16, 86, 17, 88, 89, + 18, 90, 94, 100, 103, 104, 106, 115, 110, 111, + 113, 114, 116, 119, 128, 125, 134, 136, 137, 75, + 149, 152, 153, 160, 155, 173, 171, 174, 156, 167, + 168, 175, 178, 187, 179, 180, 182, 65, 154, 185, + 151, 170, 186, 184, 166, 181, 148, 0, 183 }; -static const yytype_uint8 yycheck[] = +static const yytype_int16 yycheck[] = { - 4, 104, 86, 45, 21, 19, 102, 8, 50, 10, - 53, 107, 9, 19, 20, 34, 32, 31, 35, 53, - 104, 19, 45, 46, 47, 48, 49, 50, 53, 20, - 51, 52, 53, 54, 118, 40, 78, 79, 80, 81, - 124, 3, 145, 146, 147, 51, 52, 53, 54, 0, - 56, 57, 34, 51, 52, 53, 54, 53, 56, 57, - 21, 145, 146, 147, 55, 56, 57, 58, 5, 6, - 74, 155, 53, 77, 11, 12, 13, 14, 15, 16, - 17, 18, 8, 53, 10, 22, 23, 24, 51, 52, - 37, 54, 29, 30, 55, 56, 57, 58, 57, 58, - 37, 53, 39, 53, 53, 42, 25, 26, 27, 28, - 45, 41, 19, 38, 38, 53, 33, 53, 20, 35, - 53, 21, 54, 19, 53, 53, 53, 45, 32, 21, - 19, 36, 31, 8, 19, 21, 20, 43, 53, 53, - 51, 20, 20, 20, 45, 53, 44, 18, 133, 152, - 125, 169, 116, 147, 121 + 86, 104, 4, 102, 21, 21, 21, 55, 107, 19, + 8, 32, 10, 19, 20, 9, 82, 20, 104, 35, + 35, 31, 47, 48, 49, 50, 51, 52, 55, 8, + 19, 10, 55, 119, 53, 54, 55, 56, 34, 125, + 57, 58, 59, 60, 147, 148, 149, 53, 54, 55, + 56, 117, 58, 59, 57, 58, 59, 60, 59, 60, + 159, 147, 148, 149, 53, 54, 55, 56, 40, 58, + 59, 174, 74, 0, 160, 77, 45, 25, 26, 27, + 28, 50, 3, 5, 6, 55, 37, 55, 174, 11, + 12, 13, 14, 15, 16, 17, 18, 55, 55, 34, + 22, 23, 24, 53, 54, 41, 56, 29, 30, 78, + 79, 80, 81, 55, 55, 37, 47, 39, 19, 38, + 42, 38, 55, 55, 33, 35, 55, 20, 56, 55, + 55, 55, 45, 19, 32, 47, 21, 19, 46, 31, + 36, 8, 19, 21, 20, 20, 43, 38, 55, 55, + 53, 45, 20, 55, 20, 44, 46, 18, 134, 47, + 126, 154, 182, 177, 149, 174, 122, -1, 176 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -826,38 +836,40 @@ static const yytype_uint8 yycheck[] = static const yytype_int8 yystos[] = { 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, - 18, 22, 23, 24, 29, 30, 37, 39, 42, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 79, 83, 84, 87, 88, 100, 101, - 102, 8, 10, 8, 10, 19, 51, 52, 53, 54, - 56, 57, 81, 89, 90, 91, 92, 89, 53, 9, - 32, 34, 53, 53, 40, 62, 0, 3, 103, 53, - 53, 53, 53, 90, 19, 31, 90, 21, 55, 56, - 57, 58, 34, 53, 53, 37, 45, 41, 19, 38, - 38, 20, 20, 89, 53, 89, 90, 90, 90, 90, - 53, 93, 94, 33, 35, 95, 53, 85, 86, 81, - 54, 53, 76, 53, 53, 20, 21, 95, 19, 53, - 81, 92, 96, 97, 45, 21, 95, 32, 25, 26, - 27, 28, 78, 21, 75, 19, 94, 99, 81, 45, - 46, 47, 48, 49, 50, 98, 98, 36, 81, 86, - 8, 19, 76, 20, 53, 21, 80, 81, 92, 81, - 92, 96, 53, 51, 77, 75, 43, 82, 20, 81, - 20, 20, 44, 80, 45, 53 + 18, 22, 23, 24, 29, 30, 37, 39, 42, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 81, 85, 86, 89, 90, 104, 105, + 106, 8, 10, 8, 10, 19, 53, 54, 55, 56, + 58, 59, 83, 91, 92, 93, 94, 91, 55, 9, + 32, 34, 55, 55, 40, 64, 0, 3, 107, 55, + 55, 55, 55, 92, 19, 31, 92, 21, 57, 58, + 59, 60, 34, 55, 55, 37, 47, 41, 19, 38, + 38, 20, 20, 91, 55, 91, 92, 92, 92, 92, + 55, 95, 96, 33, 35, 99, 55, 87, 88, 83, + 56, 55, 78, 55, 55, 20, 45, 21, 99, 19, + 55, 83, 94, 100, 101, 47, 21, 99, 32, 25, + 26, 27, 28, 80, 21, 77, 19, 46, 95, 103, + 83, 47, 48, 49, 50, 51, 52, 102, 102, 36, + 83, 88, 8, 19, 78, 20, 55, 95, 97, 98, + 21, 82, 83, 94, 83, 94, 100, 55, 53, 79, + 77, 43, 84, 20, 38, 45, 99, 83, 20, 20, + 44, 101, 46, 103, 82, 47, 98, 55 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 60, 61, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 75, 76, 76, 77, - 78, 78, 78, 78, 79, 80, 80, 81, 81, 81, - 82, 82, 83, 84, 85, 85, 86, 87, 88, 89, - 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, - 90, 91, 91, 92, 92, 93, 94, 94, 95, 95, - 96, 96, 96, 97, 97, 97, 97, 98, 98, 98, - 98, 98, 98, 99, 100, 101, 102, 103, 103 + 0, 62, 63, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 77, 78, 78, 79, + 80, 80, 80, 80, 81, 82, 82, 83, 83, 83, + 84, 84, 85, 86, 87, 87, 88, 89, 89, 90, + 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 93, 93, 94, 94, 95, 96, 96, 97, + 98, 98, 99, 99, 100, 100, 100, 101, 101, 101, + 101, 102, 102, 102, 102, 102, 102, 103, 104, 105, + 106, 107, 107 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -868,11 +880,12 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 8, 5, 8, 0, 3, 5, 2, 1, 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, - 0, 4, 4, 5, 1, 3, 3, 6, 2, 1, - 3, 3, 3, 3, 3, 3, 2, 1, 1, 1, - 1, 4, 3, 1, 3, 1, 1, 3, 0, 2, - 0, 1, 3, 3, 3, 3, 3, 1, 1, 1, - 1, 1, 1, 0, 7, 2, 4, 0, 1 + 0, 4, 4, 5, 1, 3, 3, 6, 9, 2, + 1, 3, 3, 3, 3, 3, 3, 2, 1, 1, + 1, 1, 4, 3, 1, 3, 1, 1, 3, 3, + 1, 4, 0, 2, 0, 1, 3, 3, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 0, 7, 2, + 4, 0, 1 }; @@ -1734,93 +1747,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 195 "yacc_sql.y" +#line 201 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1743 "yacc_sql.cpp" +#line 1756 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 225 "yacc_sql.y" +#line 231 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1752 "yacc_sql.cpp" +#line 1765 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 231 "yacc_sql.y" +#line 237 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1760 "yacc_sql.cpp" +#line 1773 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 236 "yacc_sql.y" +#line 242 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1768 "yacc_sql.cpp" +#line 1781 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 242 "yacc_sql.y" +#line 248 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1776 "yacc_sql.cpp" +#line 1789 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 248 "yacc_sql.y" +#line 254 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1784 "yacc_sql.cpp" +#line 1797 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 254 "yacc_sql.y" +#line 260 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1792 "yacc_sql.cpp" +#line 1805 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 260 "yacc_sql.y" +#line 266 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1802 "yacc_sql.cpp" +#line 1815 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 267 "yacc_sql.y" +#line 273 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1810 "yacc_sql.cpp" +#line 1823 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 273 "yacc_sql.y" +#line 279 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1820 "yacc_sql.cpp" +#line 1833 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 282 "yacc_sql.y" +#line 288 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1831,11 +1844,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1835 "yacc_sql.cpp" +#line 1848 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 296 "yacc_sql.y" +#line 302 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1843,11 +1856,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1847 "yacc_sql.cpp" +#line 1860 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 306 "yacc_sql.y" +#line 312 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1868,19 +1881,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1872 "yacc_sql.cpp" +#line 1885 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 329 "yacc_sql.y" +#line 335 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1880 "yacc_sql.cpp" +#line 1893 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 333 "yacc_sql.y" +#line 339 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1890,11 +1903,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1894 "yacc_sql.cpp" +#line 1907 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE */ -#line 346 "yacc_sql.y" +#line 352 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-3].number); @@ -1902,11 +1915,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = (yyvsp[-1].number); free((yyvsp[-4].string)); } -#line 1906 "yacc_sql.cpp" +#line 1919 "yacc_sql.cpp" break; case 38: /* attr_def: ID type */ -#line 354 "yacc_sql.y" +#line 360 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[0].number); @@ -1914,41 +1927,41 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; free((yyvsp[-1].string)); } -#line 1918 "yacc_sql.cpp" +#line 1931 "yacc_sql.cpp" break; case 39: /* number: NUMBER */ -#line 363 "yacc_sql.y" +#line 369 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1924 "yacc_sql.cpp" +#line 1937 "yacc_sql.cpp" break; case 40: /* type: INT_T */ -#line 366 "yacc_sql.y" +#line 372 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1930 "yacc_sql.cpp" +#line 1943 "yacc_sql.cpp" break; case 41: /* type: STRING_T */ -#line 367 "yacc_sql.y" +#line 373 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1936 "yacc_sql.cpp" +#line 1949 "yacc_sql.cpp" break; case 42: /* type: FLOAT_T */ -#line 368 "yacc_sql.y" +#line 374 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1942 "yacc_sql.cpp" +#line 1955 "yacc_sql.cpp" break; case 43: /* type: DATE_T */ -#line 369 "yacc_sql.y" +#line 375 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1948 "yacc_sql.cpp" +#line 1961 "yacc_sql.cpp" break; case 44: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 373 "yacc_sql.y" +#line 379 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1961,19 +1974,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1965 "yacc_sql.cpp" +#line 1978 "yacc_sql.cpp" break; case 45: /* value_list: %empty */ -#line 389 "yacc_sql.y" +#line 395 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 1973 "yacc_sql.cpp" +#line 1986 "yacc_sql.cpp" break; case 46: /* value_list: COMMA value value_list */ -#line 392 "yacc_sql.y" +#line 398 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -1983,56 +1996,56 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1987 "yacc_sql.cpp" +#line 2000 "yacc_sql.cpp" break; case 47: /* value: NUMBER */ -#line 403 "yacc_sql.y" +#line 409 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 1996 "yacc_sql.cpp" +#line 2009 "yacc_sql.cpp" break; case 48: /* value: FLOAT */ -#line 407 "yacc_sql.y" +#line 413 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2005 "yacc_sql.cpp" +#line 2018 "yacc_sql.cpp" break; case 49: /* value: SSS */ -#line 411 "yacc_sql.y" +#line 417 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2016 "yacc_sql.cpp" +#line 2029 "yacc_sql.cpp" break; case 50: /* storage_format: %empty */ -#line 420 "yacc_sql.y" +#line 426 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2024 "yacc_sql.cpp" +#line 2037 "yacc_sql.cpp" break; case 51: /* storage_format: STORAGE FORMAT EQ ID */ -#line 424 "yacc_sql.y" +#line 430 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2032 "yacc_sql.cpp" +#line 2045 "yacc_sql.cpp" break; case 52: /* delete_stmt: DELETE FROM ID where */ -#line 431 "yacc_sql.y" +#line 437 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2042,11 +2055,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2046 "yacc_sql.cpp" +#line 2059 "yacc_sql.cpp" break; case 53: /* update_stmt: UPDATE ID SET setClauses where */ -#line 444 "yacc_sql.y" +#line 450 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2058,41 +2071,41 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2062 "yacc_sql.cpp" +#line 2075 "yacc_sql.cpp" break; case 54: /* setClauses: setClause */ -#line 459 "yacc_sql.y" +#line 465 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2072 "yacc_sql.cpp" +#line 2085 "yacc_sql.cpp" break; case 55: /* setClauses: setClauses COMMA setClause */ -#line 465 "yacc_sql.y" +#line 471 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2081 "yacc_sql.cpp" +#line 2094 "yacc_sql.cpp" break; case 56: /* setClause: ID EQ value */ -#line 473 "yacc_sql.y" +#line 479 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } -#line 2092 "yacc_sql.cpp" +#line 2105 "yacc_sql.cpp" break; case 57: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 483 "yacc_sql.y" +#line 489 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2115,30 +2128,65 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2119 "yacc_sql.cpp" +#line 2132 "yacc_sql.cpp" break; - case 58: /* calc_stmt: CALC expression_list */ -#line 508 "yacc_sql.y" + case 58: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 512 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); + if ((yyvsp[-7].expression_list) != nullptr) { + (yyval.sql_node)->selection.expressions.swap(*(yyvsp[-7].expression_list)); + delete (yyvsp[-7].expression_list); + } + + if ((yyvsp[-5].string) != nullptr) { + (yyval.sql_node)->selection.relations.emplace_back((yyvsp[-5].string)); + delete (yyvsp[-5].string); + } + + if ((yyvsp[-1].condition_list) != nullptr) { + (yyval.sql_node)->selection.conditions.swap(*(yyvsp[-1].condition_list)); + delete (yyvsp[-1].condition_list); + } + + if ((yyvsp[-2].join_clauses) != nullptr) { + for (auto &join : *(yyvsp[-2].join_clauses)) { + (yyval.sql_node)->selection.relations.emplace_back(join.relation); + (yyval.sql_node)->selection.conditions.emplace_back(join.condition); + } + delete (yyvsp[-2].join_clauses); + } + + if ((yyvsp[0].expression_list) != nullptr) { + (yyval.sql_node)->selection.group_by.swap(*(yyvsp[0].expression_list)); + delete (yyvsp[0].expression_list); + } + } +#line 2167 "yacc_sql.cpp" + break; + + case 59: /* calc_stmt: CALC expression_list */ +#line 546 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2129 "yacc_sql.cpp" +#line 2177 "yacc_sql.cpp" break; - case 59: /* expression_list: expression */ -#line 517 "yacc_sql.y" + case 60: /* expression_list: expression */ +#line 555 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2138 "yacc_sql.cpp" +#line 2186 "yacc_sql.cpp" break; - case 60: /* expression_list: expression COMMA expression_list */ -#line 522 "yacc_sql.y" + case 61: /* expression_list: expression COMMA expression_list */ +#line 560 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2147,97 +2195,97 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2151 "yacc_sql.cpp" +#line 2199 "yacc_sql.cpp" break; - case 61: /* expression: expression '+' expression */ -#line 532 "yacc_sql.y" + case 62: /* expression: expression '+' expression */ +#line 570 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2159 "yacc_sql.cpp" +#line 2207 "yacc_sql.cpp" break; - case 62: /* expression: expression '-' expression */ -#line 535 "yacc_sql.y" + case 63: /* expression: expression '-' expression */ +#line 573 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2167 "yacc_sql.cpp" +#line 2215 "yacc_sql.cpp" break; - case 63: /* expression: expression '*' expression */ -#line 538 "yacc_sql.y" + case 64: /* expression: expression '*' expression */ +#line 576 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2175 "yacc_sql.cpp" +#line 2223 "yacc_sql.cpp" break; - case 64: /* expression: expression '/' expression */ -#line 541 "yacc_sql.y" + case 65: /* expression: expression '/' expression */ +#line 579 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2183 "yacc_sql.cpp" +#line 2231 "yacc_sql.cpp" break; - case 65: /* expression: LBRACE expression RBRACE */ -#line 544 "yacc_sql.y" + case 66: /* expression: LBRACE expression RBRACE */ +#line 582 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2192 "yacc_sql.cpp" +#line 2240 "yacc_sql.cpp" break; - case 66: /* expression: '-' expression */ -#line 548 "yacc_sql.y" + case 67: /* expression: '-' expression */ +#line 586 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2200 "yacc_sql.cpp" +#line 2248 "yacc_sql.cpp" break; - case 67: /* expression: value */ -#line 551 "yacc_sql.y" + case 68: /* expression: value */ +#line 589 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2210 "yacc_sql.cpp" +#line 2258 "yacc_sql.cpp" break; - case 68: /* expression: rel_attr */ -#line 556 "yacc_sql.y" + case 69: /* expression: rel_attr */ +#line 594 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2221 "yacc_sql.cpp" +#line 2269 "yacc_sql.cpp" break; - case 69: /* expression: '*' */ -#line 562 "yacc_sql.y" + case 70: /* expression: '*' */ +#line 600 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2229 "yacc_sql.cpp" +#line 2277 "yacc_sql.cpp" break; - case 70: /* expression: aggr_func_expr */ -#line 565 "yacc_sql.y" + case 71: /* expression: aggr_func_expr */ +#line 603 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2237 "yacc_sql.cpp" +#line 2285 "yacc_sql.cpp" break; - case 71: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 572 "yacc_sql.y" + case 72: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 610 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2245,29 +2293,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2249 "yacc_sql.cpp" +#line 2297 "yacc_sql.cpp" break; - case 72: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 580 "yacc_sql.y" + case 73: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 618 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2257 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; - case 73: /* rel_attr: ID */ -#line 585 "yacc_sql.y" + case 74: /* rel_attr: ID */ +#line 623 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2267 "yacc_sql.cpp" +#line 2315 "yacc_sql.cpp" break; - case 74: /* rel_attr: ID DOT ID */ -#line 590 "yacc_sql.y" + case 75: /* rel_attr: ID DOT ID */ +#line 628 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2275,88 +2323,114 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2279 "yacc_sql.cpp" +#line 2327 "yacc_sql.cpp" break; - case 75: /* relation: ID */ -#line 600 "yacc_sql.y" + case 76: /* relation: ID */ +#line 638 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2287 "yacc_sql.cpp" +#line 2335 "yacc_sql.cpp" break; - case 76: /* rel_list: relation */ -#line 605 "yacc_sql.y" - { + case 77: /* rel_list: relation */ +#line 645 "yacc_sql.y" + { (yyval.relation_list) = new std::vector(); - (yyval.relation_list)->push_back((yyvsp[0].string)); + (yyval.relation_list)->emplace_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2297 "yacc_sql.cpp" +#line 2345 "yacc_sql.cpp" break; - case 77: /* rel_list: relation COMMA rel_list */ -#line 610 "yacc_sql.y" - { - if ((yyvsp[0].relation_list) != nullptr) { - (yyval.relation_list) = (yyvsp[0].relation_list); - } else { - (yyval.relation_list) = new std::vector; - } + case 78: /* rel_list: rel_list COMMA relation */ +#line 651 "yacc_sql.y" + { + (yyval.relation_list)->emplace_back((yyvsp[0].string)); + delete (yyvsp[0].string); + } +#line 2354 "yacc_sql.cpp" + break; - (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); + case 79: /* joinClause: relation ON condition */ +#line 659 "yacc_sql.y" + { + (yyval.join_clause) = new JoinSqlNode; + (yyval.join_clause)->relation = (yyvsp[-2].string); + (yyval.join_clause)->condition = *(yyvsp[0].condition); free((yyvsp[-2].string)); + delete (yyvsp[0].condition); } -#line 2312 "yacc_sql.cpp" +#line 2366 "yacc_sql.cpp" break; - case 78: /* where: %empty */ -#line 624 "yacc_sql.y" + case 80: /* joinClauses: joinClause */ +#line 670 "yacc_sql.y" + { + (yyval.join_clauses) = new std::vector; + (yyval.join_clauses)->emplace_back(*(yyvsp[0].join_clause)); + delete (yyvsp[0].join_clause); + } +#line 2376 "yacc_sql.cpp" + break; + + case 81: /* joinClauses: joinClause INNER JOIN joinClauses */ +#line 676 "yacc_sql.y" + { + (yyval.join_clauses) = (yyvsp[0].join_clauses); + (yyval.join_clauses)->emplace_back(*(yyvsp[-3].join_clause)); + delete (yyvsp[-3].join_clause); + } +#line 2386 "yacc_sql.cpp" + break; + + case 82: /* where: %empty */ +#line 685 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2320 "yacc_sql.cpp" +#line 2394 "yacc_sql.cpp" break; - case 79: /* where: WHERE condition_list */ -#line 627 "yacc_sql.y" + case 83: /* where: WHERE condition_list */ +#line 688 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2328 "yacc_sql.cpp" +#line 2402 "yacc_sql.cpp" break; - case 80: /* condition_list: %empty */ -#line 633 "yacc_sql.y" + case 84: /* condition_list: %empty */ +#line 694 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2336 "yacc_sql.cpp" +#line 2410 "yacc_sql.cpp" break; - case 81: /* condition_list: condition */ -#line 636 "yacc_sql.y" + case 85: /* condition_list: condition */ +#line 697 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2346 "yacc_sql.cpp" +#line 2420 "yacc_sql.cpp" break; - case 82: /* condition_list: condition AND condition_list */ -#line 641 "yacc_sql.y" + case 86: /* condition_list: condition AND condition_list */ +#line 702 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2356 "yacc_sql.cpp" +#line 2430 "yacc_sql.cpp" break; - case 83: /* condition: rel_attr comp_op value */ -#line 649 "yacc_sql.y" + case 87: /* condition: rel_attr comp_op value */ +#line 710 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2368,11 +2442,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2372 "yacc_sql.cpp" +#line 2446 "yacc_sql.cpp" break; - case 84: /* condition: value comp_op value */ -#line 661 "yacc_sql.y" + case 88: /* condition: value comp_op value */ +#line 722 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2384,11 +2458,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2388 "yacc_sql.cpp" +#line 2462 "yacc_sql.cpp" break; - case 85: /* condition: rel_attr comp_op rel_attr */ -#line 673 "yacc_sql.y" + case 89: /* condition: rel_attr comp_op rel_attr */ +#line 734 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2400,11 +2474,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2404 "yacc_sql.cpp" +#line 2478 "yacc_sql.cpp" break; - case 86: /* condition: value comp_op rel_attr */ -#line 685 "yacc_sql.y" + case 90: /* condition: value comp_op rel_attr */ +#line 746 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2416,55 +2490,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2420 "yacc_sql.cpp" +#line 2494 "yacc_sql.cpp" break; - case 87: /* comp_op: EQ */ -#line 699 "yacc_sql.y" + case 91: /* comp_op: EQ */ +#line 760 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2426 "yacc_sql.cpp" +#line 2500 "yacc_sql.cpp" break; - case 88: /* comp_op: LT */ -#line 700 "yacc_sql.y" + case 92: /* comp_op: LT */ +#line 761 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2432 "yacc_sql.cpp" +#line 2506 "yacc_sql.cpp" break; - case 89: /* comp_op: GT */ -#line 701 "yacc_sql.y" + case 93: /* comp_op: GT */ +#line 762 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2438 "yacc_sql.cpp" +#line 2512 "yacc_sql.cpp" break; - case 90: /* comp_op: LE */ -#line 702 "yacc_sql.y" + case 94: /* comp_op: LE */ +#line 763 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2444 "yacc_sql.cpp" +#line 2518 "yacc_sql.cpp" break; - case 91: /* comp_op: GE */ -#line 703 "yacc_sql.y" + case 95: /* comp_op: GE */ +#line 764 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2450 "yacc_sql.cpp" +#line 2524 "yacc_sql.cpp" break; - case 92: /* comp_op: NE */ -#line 704 "yacc_sql.y" + case 96: /* comp_op: NE */ +#line 765 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2456 "yacc_sql.cpp" +#line 2530 "yacc_sql.cpp" break; - case 93: /* group_by: %empty */ -#line 710 "yacc_sql.y" + case 97: /* group_by: %empty */ +#line 771 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2464 "yacc_sql.cpp" +#line 2538 "yacc_sql.cpp" break; - case 94: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 716 "yacc_sql.y" + case 98: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 777 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2474,20 +2548,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2478 "yacc_sql.cpp" +#line 2552 "yacc_sql.cpp" break; - case 95: /* explain_stmt: EXPLAIN command_wrapper */ -#line 729 "yacc_sql.y" + case 99: /* explain_stmt: EXPLAIN command_wrapper */ +#line 790 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2487 "yacc_sql.cpp" +#line 2561 "yacc_sql.cpp" break; - case 96: /* set_variable_stmt: SET ID EQ value */ -#line 737 "yacc_sql.y" + case 100: /* set_variable_stmt: SET ID EQ value */ +#line 798 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2495,11 +2569,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2499 "yacc_sql.cpp" +#line 2573 "yacc_sql.cpp" break; -#line 2503 "yacc_sql.cpp" +#line 2577 "yacc_sql.cpp" default: break; } @@ -2728,7 +2802,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 749 "yacc_sql.y" +#line 810 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index c3b6e922..6d3a126e 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -96,17 +96,19 @@ extern int yydebug; EXPLAIN = 297, /* EXPLAIN */ STORAGE = 298, /* STORAGE */ FORMAT = 299, /* FORMAT */ - EQ = 300, /* EQ */ - LT = 301, /* LT */ - GT = 302, /* GT */ - LE = 303, /* LE */ - GE = 304, /* GE */ - NE = 305, /* NE */ - NUMBER = 306, /* NUMBER */ - FLOAT = 307, /* FLOAT */ - ID = 308, /* ID */ - SSS = 309, /* SSS */ - UMINUS = 310 /* UMINUS */ + INNER = 300, /* INNER */ + JOIN = 301, /* JOIN */ + EQ = 302, /* EQ */ + LT = 303, /* LT */ + GT = 304, /* GT */ + LE = 305, /* LE */ + GE = 306, /* GE */ + NE = 307, /* NE */ + NUMBER = 308, /* NUMBER */ + FLOAT = 309, /* FLOAT */ + ID = 310, /* ID */ + SSS = 311, /* SSS */ + UMINUS = 312 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -115,7 +117,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 117 "yacc_sql.y" +#line 119 "yacc_sql.y" ParsedSqlNode * sql_node; ConditionSqlNode * condition; @@ -132,11 +134,13 @@ union YYSTYPE std::vector * relation_list; SetClauseSqlNode * set_clause; std::vector * set_clauses; + JoinSqlNode * join_clause; + std::vector * join_clauses; char * string; int number; float floats; -#line 140 "yacc_sql.hpp" +#line 144 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index ea16ed2c..5c95a24c 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -106,6 +106,8 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, EXPLAIN STORAGE FORMAT + INNER + JOIN EQ LT GT @@ -130,6 +132,8 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, std::vector * relation_list; SetClauseSqlNode * set_clause; std::vector * set_clauses; + JoinSqlNode * join_clause; + std::vector * join_clauses; char * string; int number; float floats; @@ -160,8 +164,10 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type aggr_func_expr %type expression_list %type group_by -%type setClause; -%type setClauses; +%type setClause +%type setClauses +%type joinClause +%type joinClauses %type calc_stmt %type select_stmt %type insert_stmt @@ -479,7 +485,7 @@ setClause: ; select_stmt: /* select 语句的语法解析树*/ - SELECT expression_list FROM rel_list where group_by + SELECT expression_list FROM rel_list where group_by { $$ = new ParsedSqlNode(SCF_SELECT); if ($2 != nullptr) { @@ -502,7 +508,39 @@ select_stmt: /* select 语句的语法解析树*/ delete $6; } } + | SELECT expression_list FROM relation INNER JOIN joinClauses where group_by + { + $$ = new ParsedSqlNode(SCF_SELECT); + if ($2 != nullptr) { + $$->selection.expressions.swap(*$2); + delete $2; + } + + if ($4 != nullptr) { + $$->selection.relations.emplace_back($4); + delete $4; + } + + if ($8 != nullptr) { + $$->selection.conditions.swap(*$8); + delete $8; + } + + if ($7 != nullptr) { + for (auto &join : *$7) { + $$->selection.relations.emplace_back(join.relation); + $$->selection.conditions.emplace_back(join.condition); + } + delete $7; + } + + if ($9 != nullptr) { + $$->selection.group_by.swap(*$9); + delete $9; + } + } ; + calc_stmt: CALC expression_list { @@ -601,21 +639,44 @@ relation: $$ = $1; } ; + rel_list: - relation { + relation + { $$ = new std::vector(); - $$->push_back($1); + $$->emplace_back($1); free($1); } - | relation COMMA rel_list { - if ($3 != nullptr) { - $$ = $3; - } else { - $$ = new std::vector; - } + | rel_list COMMA relation + { + $$->emplace_back($3); + delete $3; + } + ; - $$->insert($$->begin(), $1); +joinClause: + relation ON condition + { + $$ = new JoinSqlNode; + $$->relation = $1; + $$->condition = *$3; free($1); + delete $3; + } + ; + +joinClauses: + joinClause + { + $$ = new std::vector; + $$->emplace_back(*$1); + delete $1; + } + | joinClause INNER JOIN joinClauses + { + $$ = $4; + $$->emplace_back(*$1); + delete $1; } ; From 8c97622c2b1cf5a437c512a9ce2c76c192b3e439 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 27 Sep 2024 16:24:53 +0800 Subject: [PATCH 041/308] =?UTF-8?q?=E5=90=88=E5=B9=B6agg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 19 + src/observer/sql/parser/lex_sql.cpp | 458 ++++++------- src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/yacc_sql.cpp | 951 +++++++++++++++------------ src/observer/sql/parser/yacc_sql.hpp | 118 ++-- 5 files changed, 836 insertions(+), 712 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 2b3b3e6c..1d0b7f73 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -541,6 +541,9 @@ RC ArithmeticExpr::try_get_value(Value &value) const UnboundAggregateExpr::UnboundAggregateExpr(const char *aggregate_name, Expression *child) : aggregate_name_(aggregate_name), child_(child) {} +UnboundAggregateExpr::UnboundAggregateExpr(const char *aggregate_name, std::unique_ptr child) + : aggregate_name_(aggregate_name), child_(std::move(child)) +{} //////////////////////////////////////////////////////////////////////////////// AggregateExpr::AggregateExpr(Type type, Expression *child) : aggregate_type_(type), child_(child) {} @@ -579,6 +582,22 @@ unique_ptr AggregateExpr::create_aggregator() const aggregator = make_unique(); break; } + case Type::COUNT: { + aggregator = make_unique(); + break; + } + case Type::AVG: { + aggregator = make_unique(); + break; + } + case Type::MAX: { + aggregator = make_unique(); + break; + } + case Type::MIN: { + aggregator = make_unique(); + break; + } default: { ASSERT(false, "unsupported aggregate type"); break; diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 2cd856d4..65050d7c 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -386,8 +386,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 66 -#define YY_END_OF_BUFFER 67 +#define YY_NUM_RULES 68 +#define YY_END_OF_BUFFER 69 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -395,29 +395,29 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[195] = +static const flex_int16_t yy_accept[199] = { 0, - 0, 0, 0, 0, 67, 65, 1, 2, 65, 65, - 65, 47, 48, 61, 59, 49, 60, 6, 62, 3, - 5, 54, 50, 56, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 66, 53, 0, 63, 0, 64, 3, - 0, 51, 52, 55, 58, 58, 58, 58, 44, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 57, 58, 58, 58, 15, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 4, 22, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - - 58, 58, 58, 58, 58, 58, 58, 58, 32, 58, - 36, 58, 58, 58, 28, 58, 58, 58, 58, 58, - 58, 58, 58, 19, 33, 58, 58, 40, 35, 58, - 9, 11, 7, 58, 58, 58, 20, 58, 8, 58, - 58, 58, 24, 39, 37, 58, 58, 16, 58, 17, - 58, 58, 58, 58, 29, 58, 58, 58, 58, 34, - 58, 43, 14, 58, 58, 58, 58, 58, 58, 12, - 58, 58, 21, 30, 10, 26, 58, 46, 41, 23, - 58, 58, 18, 58, 13, 27, 25, 42, 58, 58, - 45, 38, 31, 0 + 0, 0, 0, 0, 69, 67, 1, 2, 67, 67, + 67, 47, 48, 63, 61, 49, 62, 6, 64, 3, + 5, 54, 50, 56, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 68, 53, 0, 65, 0, 66, 3, + 0, 51, 52, 55, 60, 60, 60, 44, 60, 43, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 58, 60, 60, 60, 60, 15, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 4, + 22, 60, 60, 60, 60, 60, 60, 60, 60, 60, + + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 32, 60, 60, 57, 60, 60, 60, 28, 60, 60, + 60, 60, 60, 60, 60, 60, 19, 33, 60, 60, + 39, 35, 60, 9, 11, 7, 60, 60, 60, 20, + 60, 8, 60, 60, 60, 24, 59, 38, 36, 60, + 60, 16, 60, 17, 60, 60, 60, 60, 29, 60, + 60, 60, 60, 34, 60, 42, 14, 60, 60, 60, + 60, 60, 60, 12, 60, 60, 21, 30, 10, 26, + 60, 46, 40, 23, 60, 60, 18, 60, 13, 27, + 25, 41, 60, 60, 45, 37, 31, 0 } ; @@ -464,59 +464,61 @@ static const YY_CHAR yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[200] = +static const flex_int16_t yy_base[204] = { 0, - 0, 0, 0, 0, 518, 519, 519, 519, 499, 511, - 509, 519, 519, 519, 519, 519, 499, 519, 519, 54, - 519, 52, 519, 488, 53, 57, 60, 59, 70, 91, - 61, 67, 77, 489, 74, 87, 83, 98, 114, 127, - 119, 138, 109, 519, 519, 498, 519, 496, 519, 75, - 485, 519, 519, 519, 0, 484, 136, 141, 483, 115, - 146, 149, 148, 155, 158, 153, 170, 163, 164, 169, - 173, 161, 194, 482, 191, 186, 171, 480, 198, 206, - 193, 199, 224, 219, 223, 227, 221, 479, 477, 233, - 244, 236, 247, 248, 262, 250, 261, 238, 256, 260, - - 269, 272, 273, 282, 284, 285, 288, 300, 278, 303, - 475, 305, 307, 308, 472, 293, 310, 330, 316, 334, - 324, 315, 338, 471, 470, 340, 322, 465, 464, 326, - 462, 461, 460, 347, 328, 357, 449, 350, 437, 358, - 364, 360, 423, 409, 373, 369, 382, 390, 383, 367, - 387, 384, 391, 392, 366, 394, 405, 406, 397, 365, - 395, 343, 314, 419, 398, 416, 426, 427, 432, 411, - 436, 429, 296, 286, 263, 234, 435, 184, 179, 159, - 442, 447, 128, 457, 125, 113, 86, 84, 459, 448, - 78, 69, 63, 519, 507, 509, 511, 75, 71 - + 0, 0, 0, 0, 530, 531, 531, 531, 511, 523, + 521, 531, 531, 531, 531, 531, 511, 531, 531, 54, + 531, 52, 531, 507, 53, 57, 60, 59, 70, 91, + 61, 67, 77, 509, 74, 113, 83, 106, 117, 109, + 119, 123, 115, 531, 531, 518, 531, 516, 531, 86, + 506, 531, 531, 531, 0, 505, 134, 504, 136, 503, + 141, 144, 158, 156, 131, 169, 159, 170, 167, 143, + 174, 176, 172, 202, 495, 146, 192, 181, 199, 494, + 203, 206, 220, 230, 182, 226, 233, 228, 231, 493, + 491, 237, 246, 254, 243, 258, 261, 259, 269, 235, + + 257, 273, 279, 271, 282, 281, 286, 293, 296, 301, + 285, 307, 313, 490, 314, 315, 323, 489, 317, 297, + 337, 319, 320, 324, 336, 342, 488, 487, 338, 339, + 486, 485, 346, 484, 483, 482, 347, 350, 359, 477, + 361, 475, 355, 363, 365, 474, 473, 470, 372, 378, + 367, 469, 389, 467, 390, 370, 391, 397, 466, 387, + 403, 411, 413, 462, 414, 455, 449, 419, 415, 421, + 417, 425, 429, 431, 432, 434, 445, 443, 435, 407, + 439, 395, 295, 291, 442, 447, 251, 459, 205, 196, + 121, 78, 463, 179, 73, 69, 63, 531, 511, 513, + + 515, 75, 71 } ; -static const flex_int16_t yy_def[200] = +static const flex_int16_t yy_def[204] = { 0, - 194, 1, 195, 195, 194, 194, 194, 194, 194, 196, - 197, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 194, 194, 196, 194, 197, 194, 194, - 194, 194, 194, 194, 199, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 194, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 0, 194, 194, 194, 194, 194 - + 198, 1, 199, 199, 198, 198, 198, 198, 198, 200, + 201, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 198, 198, 200, 198, 201, 198, 198, + 198, 198, 198, 198, 203, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 198, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 0, 198, 198, + + 198, 198, 198 } ; -static const flex_int16_t yy_nxt[586] = +static const flex_int16_t yy_nxt[598] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -525,66 +527,68 @@ static const flex_int16_t yy_nxt[586] = 43, 34, 34, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 34, 36, 37, 34, 38, 39, 40, 41, 42, 43, 34, 34, 51, 55, 50, 52, - 53, 55, 55, 55, 55, 55, 56, 55, 64, 60, - 58, 55, 65, 55, 55, 57, 61, 51, 55, 50, - 72, 55, 55, 62, 66, 63, 71, 55, 55, 59, - - 55, 55, 64, 60, 58, 55, 65, 75, 57, 73, - 61, 67, 55, 74, 72, 78, 62, 66, 63, 71, - 76, 68, 59, 55, 69, 77, 70, 55, 55, 55, - 75, 79, 73, 55, 67, 87, 74, 80, 78, 55, - 81, 55, 55, 76, 68, 91, 84, 69, 77, 70, - 55, 82, 55, 85, 79, 55, 83, 86, 89, 87, - 55, 80, 55, 55, 81, 92, 90, 55, 91, 55, - 84, 94, 55, 55, 82, 55, 85, 55, 55, 83, - 93, 86, 89, 55, 55, 55, 98, 55, 96, 92, - 90, 105, 95, 55, 97, 94, 101, 99, 55, 102, - - 55, 112, 103, 93, 100, 55, 104, 55, 55, 98, - 110, 96, 55, 55, 105, 95, 106, 97, 107, 101, - 55, 99, 102, 111, 112, 103, 116, 100, 113, 104, - 108, 109, 117, 55, 110, 55, 114, 55, 55, 119, - 106, 55, 107, 115, 122, 120, 111, 55, 55, 116, - 55, 113, 55, 108, 109, 117, 118, 121, 55, 114, - 123, 55, 55, 119, 55, 124, 115, 127, 122, 120, - 55, 125, 132, 130, 55, 55, 55, 55, 126, 118, - 121, 128, 131, 55, 123, 129, 55, 55, 135, 124, - 134, 127, 55, 133, 125, 132, 55, 130, 55, 55, - - 55, 126, 55, 136, 137, 128, 131, 55, 140, 129, - 55, 143, 135, 134, 55, 141, 133, 55, 139, 55, - 138, 55, 55, 142, 55, 144, 136, 137, 55, 55, - 55, 147, 140, 148, 143, 145, 55, 146, 55, 141, - 55, 139, 55, 138, 55, 149, 151, 142, 55, 144, - 154, 150, 55, 152, 55, 147, 148, 55, 145, 157, - 146, 55, 153, 158, 55, 160, 159, 156, 149, 151, - 155, 55, 55, 154, 55, 150, 161, 152, 55, 55, - 55, 55, 157, 55, 162, 153, 158, 55, 160, 167, - 159, 156, 166, 155, 164, 165, 55, 55, 55, 163, - - 161, 55, 169, 168, 55, 55, 55, 162, 55, 55, - 170, 55, 55, 167, 172, 173, 166, 164, 165, 55, - 55, 171, 163, 55, 177, 55, 169, 168, 175, 176, - 55, 174, 178, 55, 170, 180, 181, 55, 172, 173, - 55, 55, 179, 55, 171, 182, 55, 185, 177, 55, - 55, 55, 175, 176, 174, 178, 55, 184, 180, 186, - 181, 55, 55, 55, 183, 187, 179, 188, 190, 182, - 185, 55, 189, 55, 55, 55, 55, 193, 55, 55, - 191, 184, 192, 186, 55, 55, 55, 183, 187, 55, - 188, 55, 190, 88, 55, 189, 55, 55, 55, 88, - - 193, 49, 47, 55, 191, 54, 192, 44, 44, 46, - 46, 48, 48, 50, 49, 47, 45, 194, 5, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194 + 53, 55, 55, 55, 55, 55, 56, 55, 65, 61, + 59, 55, 66, 55, 55, 57, 62, 55, 55, 58, + 73, 55, 55, 63, 67, 64, 72, 55, 51, 60, + + 50, 76, 65, 61, 59, 55, 66, 77, 57, 74, + 62, 68, 58, 75, 73, 80, 63, 67, 64, 72, + 55, 69, 60, 55, 70, 76, 71, 55, 86, 55, + 77, 55, 74, 55, 68, 55, 75, 55, 80, 81, + 82, 89, 88, 83, 69, 55, 78, 70, 55, 71, + 55, 79, 86, 87, 84, 55, 91, 55, 55, 85, + 55, 92, 81, 94, 82, 89, 88, 83, 97, 78, + 55, 93, 55, 55, 79, 112, 87, 84, 104, 96, + 91, 55, 85, 55, 55, 92, 55, 94, 55, 95, + 55, 97, 100, 55, 93, 55, 55, 101, 112, 98, + + 103, 104, 107, 96, 102, 99, 55, 105, 197, 106, + 55, 113, 95, 55, 121, 100, 55, 55, 114, 55, + 55, 101, 98, 103, 108, 107, 109, 102, 99, 115, + 105, 197, 106, 116, 55, 113, 117, 121, 110, 111, + 55, 114, 55, 118, 55, 55, 122, 55, 108, 55, + 109, 55, 115, 119, 125, 123, 116, 55, 124, 117, + 55, 110, 111, 120, 126, 55, 118, 127, 55, 135, + 122, 55, 55, 55, 129, 55, 119, 130, 125, 123, + 131, 124, 133, 55, 132, 55, 120, 55, 126, 128, + 134, 127, 135, 55, 136, 55, 55, 129, 138, 55, + + 55, 130, 139, 137, 131, 55, 133, 55, 132, 55, + 55, 55, 128, 140, 134, 55, 143, 136, 146, 141, + 142, 55, 138, 144, 145, 139, 137, 55, 55, 55, + 147, 55, 153, 55, 55, 148, 140, 55, 55, 156, + 143, 146, 141, 142, 149, 150, 151, 144, 145, 155, + 55, 55, 55, 55, 147, 153, 55, 152, 154, 148, + 55, 55, 157, 156, 55, 160, 163, 149, 150, 55, + 151, 158, 155, 55, 159, 55, 161, 55, 165, 55, + 152, 55, 154, 162, 55, 157, 55, 164, 172, 160, + 163, 170, 55, 168, 158, 166, 167, 159, 171, 161, + + 169, 55, 165, 55, 55, 55, 162, 175, 173, 55, + 164, 55, 172, 174, 176, 170, 168, 55, 166, 167, + 177, 55, 171, 169, 178, 55, 179, 55, 55, 55, + 175, 55, 173, 55, 180, 55, 186, 174, 176, 55, + 181, 185, 183, 55, 177, 55, 55, 178, 55, 55, + 179, 182, 184, 55, 188, 190, 55, 55, 180, 55, + 186, 55, 187, 55, 181, 185, 183, 189, 194, 55, + 191, 192, 193, 55, 182, 184, 55, 55, 188, 190, + 55, 55, 195, 55, 55, 187, 196, 55, 55, 55, + 189, 55, 194, 191, 192, 193, 55, 55, 55, 55, + + 55, 55, 55, 55, 55, 55, 195, 90, 55, 55, + 196, 44, 44, 46, 46, 48, 48, 55, 55, 55, + 90, 49, 47, 55, 54, 50, 49, 47, 45, 198, + 5, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198 + } ; -static const flex_int16_t yy_chk[586] = +static const flex_int16_t yy_chk[598] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -593,63 +597,65 @@ static const flex_int16_t yy_chk[586] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 199, 28, 27, 31, 198, 193, 28, 27, - 26, 32, 28, 192, 29, 25, 27, 50, 35, 50, - 32, 33, 191, 27, 28, 27, 31, 37, 188, 26, - - 187, 36, 28, 27, 26, 30, 28, 35, 25, 33, - 27, 29, 38, 33, 32, 37, 27, 28, 27, 31, - 36, 30, 26, 43, 30, 36, 30, 186, 39, 60, - 35, 38, 33, 41, 29, 43, 33, 39, 37, 185, - 39, 40, 183, 36, 30, 60, 40, 30, 36, 30, - 57, 39, 42, 41, 38, 58, 39, 42, 57, 43, - 61, 39, 63, 62, 39, 61, 58, 66, 60, 64, - 40, 63, 65, 180, 39, 72, 41, 68, 69, 39, - 62, 42, 57, 70, 67, 77, 66, 71, 65, 61, - 58, 72, 64, 179, 65, 63, 68, 67, 178, 69, - - 76, 77, 70, 62, 67, 75, 71, 81, 73, 66, - 75, 65, 79, 82, 72, 64, 73, 65, 73, 68, - 80, 67, 69, 76, 77, 70, 81, 67, 79, 71, - 73, 73, 82, 84, 75, 87, 80, 85, 83, 84, - 73, 86, 73, 80, 87, 85, 76, 90, 176, 81, - 92, 79, 98, 73, 73, 82, 83, 86, 91, 80, - 90, 93, 94, 84, 96, 91, 80, 94, 87, 85, - 99, 92, 98, 96, 100, 97, 95, 175, 93, 83, - 86, 95, 97, 101, 90, 95, 102, 103, 101, 91, - 100, 94, 109, 99, 92, 98, 104, 96, 105, 106, - - 174, 93, 107, 102, 103, 95, 97, 116, 106, 95, - 173, 109, 101, 100, 108, 107, 99, 110, 105, 112, - 104, 113, 114, 108, 117, 110, 102, 103, 163, 122, - 119, 114, 106, 116, 109, 112, 127, 113, 121, 107, - 130, 105, 135, 104, 118, 117, 119, 108, 120, 110, - 122, 118, 123, 120, 126, 114, 116, 162, 112, 127, - 113, 134, 121, 130, 138, 135, 134, 126, 117, 119, - 123, 136, 140, 122, 142, 118, 136, 120, 141, 160, - 155, 150, 127, 146, 138, 121, 130, 145, 135, 146, - 134, 126, 145, 123, 141, 142, 147, 149, 152, 140, - - 136, 151, 149, 147, 148, 153, 154, 138, 156, 161, - 151, 159, 165, 146, 153, 154, 145, 141, 142, 157, - 158, 152, 140, 144, 159, 170, 149, 147, 157, 158, - 166, 156, 161, 164, 151, 165, 166, 143, 153, 154, - 167, 168, 164, 172, 152, 167, 169, 170, 159, 177, - 171, 139, 157, 158, 156, 161, 181, 169, 165, 171, - 166, 182, 190, 137, 168, 172, 164, 177, 182, 167, - 170, 184, 181, 189, 133, 132, 131, 190, 129, 128, - 184, 169, 189, 171, 125, 124, 115, 168, 172, 111, - 177, 89, 182, 88, 78, 181, 74, 59, 56, 51, - - 190, 48, 46, 34, 184, 24, 189, 195, 195, 196, - 196, 197, 197, 17, 11, 10, 9, 5, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194 + 22, 26, 203, 28, 27, 31, 202, 197, 28, 27, + 26, 32, 28, 196, 29, 25, 27, 195, 35, 25, + 32, 33, 192, 27, 28, 27, 31, 37, 50, 26, + + 50, 35, 28, 27, 26, 30, 28, 35, 25, 33, + 27, 29, 25, 33, 32, 37, 27, 28, 27, 31, + 38, 30, 26, 40, 30, 35, 30, 36, 40, 43, + 35, 39, 33, 41, 29, 191, 33, 42, 37, 38, + 39, 43, 42, 39, 30, 65, 36, 30, 57, 30, + 59, 36, 40, 41, 39, 61, 57, 70, 62, 39, + 76, 59, 38, 62, 39, 43, 42, 39, 65, 36, + 64, 61, 63, 67, 36, 76, 41, 39, 70, 64, + 57, 69, 39, 66, 68, 59, 73, 62, 71, 63, + 72, 65, 67, 194, 61, 78, 85, 68, 76, 66, + + 69, 70, 73, 64, 68, 66, 77, 71, 194, 72, + 190, 77, 63, 79, 85, 67, 74, 81, 78, 189, + 82, 68, 66, 69, 74, 73, 74, 68, 66, 79, + 71, 194, 72, 81, 83, 77, 82, 85, 74, 74, + 86, 78, 88, 82, 84, 89, 86, 87, 74, 100, + 74, 92, 79, 83, 89, 87, 81, 95, 88, 82, + 93, 74, 74, 84, 92, 187, 82, 93, 94, 100, + 86, 101, 96, 98, 95, 97, 83, 96, 89, 87, + 97, 88, 98, 99, 97, 104, 84, 102, 92, 94, + 99, 93, 100, 103, 101, 106, 105, 95, 103, 111, + + 107, 96, 104, 102, 97, 184, 98, 108, 97, 183, + 109, 120, 94, 105, 99, 110, 108, 101, 111, 106, + 107, 112, 103, 109, 110, 104, 102, 113, 115, 116, + 112, 119, 120, 122, 123, 113, 105, 117, 124, 123, + 108, 111, 106, 107, 115, 116, 117, 109, 110, 122, + 125, 121, 129, 130, 112, 120, 126, 119, 121, 113, + 133, 137, 124, 123, 138, 129, 137, 115, 116, 143, + 117, 125, 122, 139, 126, 141, 130, 144, 139, 145, + 119, 151, 121, 133, 156, 124, 149, 138, 151, 129, + 137, 149, 150, 144, 125, 141, 143, 126, 150, 130, + + 145, 160, 139, 153, 155, 157, 133, 156, 153, 182, + 138, 158, 151, 155, 157, 149, 144, 161, 141, 143, + 158, 180, 150, 145, 160, 162, 161, 163, 165, 169, + 156, 171, 153, 168, 162, 170, 171, 155, 157, 172, + 163, 170, 168, 173, 158, 174, 175, 160, 176, 179, + 161, 165, 169, 181, 173, 175, 185, 178, 162, 177, + 171, 186, 172, 167, 163, 170, 168, 174, 186, 166, + 176, 181, 185, 188, 165, 169, 164, 193, 173, 175, + 159, 154, 188, 152, 148, 172, 193, 147, 146, 142, + 174, 140, 186, 176, 181, 185, 136, 135, 134, 132, + + 131, 128, 127, 118, 114, 91, 188, 90, 80, 75, + 193, 199, 199, 200, 200, 201, 201, 60, 58, 56, + 51, 48, 46, 34, 24, 17, 11, 10, 9, 5, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198 + } ; /* The intent behind this definition is that it'll catch @@ -684,7 +690,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 687 "lex_sql.cpp" +#line 693 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -693,7 +699,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 696 "lex_sql.cpp" +#line 702 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -979,7 +985,7 @@ YY_DECL #line 75 "lex_sql.l" -#line 982 "lex_sql.cpp" +#line 988 "lex_sql.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1006,13 +1012,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 195 ) + if ( yy_current_state >= 199 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 519 ); + while ( yy_base[yy_current_state] != 531 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1215,47 +1221,47 @@ RETURN_TOKEN(DATE_T); // 增加 DATE 的 token case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(NOT); +RETURN_TOKEN(NULL_T); YY_BREAK case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(NULL_T); +RETURN_TOKEN(NULLABLE); YY_BREAK case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(NULLABLE); +RETURN_TOKEN(LOAD); YY_BREAK case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(LOAD); +RETURN_TOKEN(DATA); YY_BREAK case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(DATA); +RETURN_TOKEN(INFILE); YY_BREAK case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(INFILE); +RETURN_TOKEN(EXPLAIN); YY_BREAK case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); +RETURN_TOKEN(GROUP); YY_BREAK case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(GROUP); +RETURN_TOKEN(BY); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(BY); +RETURN_TOKEN(AS); YY_BREAK case 45: YY_RULE_SETUP @@ -1320,47 +1326,57 @@ RETURN_TOKEN(GT); case 57: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(IS); +RETURN_TOKEN(NOT); YY_BREAK case 58: YY_RULE_SETUP -#line 138 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +#line 137 "lex_sql.l" +RETURN_TOKEN(IS); YY_BREAK case 59: -#line 141 "lex_sql.l" +YY_RULE_SETUP +#line 138 "lex_sql.l" +RETURN_TOKEN(LIKE); + YY_BREAK case 60: -#line 142 "lex_sql.l" +YY_RULE_SETUP +#line 140 "lex_sql.l" +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK case 61: #line 143 "lex_sql.l" case 62: +#line 144 "lex_sql.l" +case 63: +#line 145 "lex_sql.l" +case 64: YY_RULE_SETUP -#line 143 "lex_sql.l" +#line 145 "lex_sql.l" { return yytext[0]; } YY_BREAK -case 63: -/* rule 63 can match eol */ +case 65: +/* rule 65 can match eol */ YY_RULE_SETUP -#line 144 "lex_sql.l" +#line 146 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 64: -/* rule 64 can match eol */ +case 66: +/* rule 66 can match eol */ YY_RULE_SETUP -#line 145 "lex_sql.l" +#line 147 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 65: +case 67: YY_RULE_SETUP -#line 147 "lex_sql.l" +#line 149 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK -case 66: +case 68: YY_RULE_SETUP -#line 148 "lex_sql.l" +#line 150 "lex_sql.l" ECHO; YY_BREAK -#line 1363 "lex_sql.cpp" +#line 1379 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1660,7 +1676,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 195 ) + if ( yy_current_state >= 199 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1689,11 +1705,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 195 ) + if ( yy_current_state >= 199 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 194); + yy_is_jam = (yy_current_state == 198); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2516,7 +2532,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 148 "lex_sql.l" +#line 150 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 20c93eb6..4cedec12 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -542,7 +542,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 148 "lex_sql.l" +#line 150 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index b3bbb8a6..68086bd9 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -153,108 +153,112 @@ enum yysymbol_kind_t YYSYMBOL_YYerror = 1, /* error */ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_BY = 4, /* BY */ - YYSYMBOL_CREATE = 5, /* CREATE */ - YYSYMBOL_DROP = 6, /* DROP */ - YYSYMBOL_GROUP = 7, /* GROUP */ - YYSYMBOL_TABLE = 8, /* TABLE */ - YYSYMBOL_TABLES = 9, /* TABLES */ - YYSYMBOL_INDEX = 10, /* INDEX */ - YYSYMBOL_CALC = 11, /* CALC */ - YYSYMBOL_SELECT = 12, /* SELECT */ - YYSYMBOL_DESC = 13, /* DESC */ - YYSYMBOL_SHOW = 14, /* SHOW */ - YYSYMBOL_SYNC = 15, /* SYNC */ - YYSYMBOL_INSERT = 16, /* INSERT */ - YYSYMBOL_DELETE = 17, /* DELETE */ - YYSYMBOL_UPDATE = 18, /* UPDATE */ - YYSYMBOL_LBRACE = 19, /* LBRACE */ - YYSYMBOL_RBRACE = 20, /* RBRACE */ - YYSYMBOL_COMMA = 21, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 22, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 23, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 24, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 25, /* INT_T */ - YYSYMBOL_STRING_T = 26, /* STRING_T */ - YYSYMBOL_FLOAT_T = 27, /* FLOAT_T */ - YYSYMBOL_DATE_T = 28, /* DATE_T */ - YYSYMBOL_NOT = 29, /* NOT */ - YYSYMBOL_NULL_T = 30, /* NULL_T */ - YYSYMBOL_NULLABLE = 31, /* NULLABLE */ - YYSYMBOL_HELP = 32, /* HELP */ - YYSYMBOL_EXIT = 33, /* EXIT */ - YYSYMBOL_DOT = 34, /* DOT */ - YYSYMBOL_INTO = 35, /* INTO */ - YYSYMBOL_VALUES = 36, /* VALUES */ - YYSYMBOL_FROM = 37, /* FROM */ - YYSYMBOL_WHERE = 38, /* WHERE */ - YYSYMBOL_AND = 39, /* AND */ - YYSYMBOL_SET = 40, /* SET */ - YYSYMBOL_ON = 41, /* ON */ - YYSYMBOL_LOAD = 42, /* LOAD */ - YYSYMBOL_DATA = 43, /* DATA */ - YYSYMBOL_INFILE = 44, /* INFILE */ - YYSYMBOL_EXPLAIN = 45, /* EXPLAIN */ - YYSYMBOL_STORAGE = 46, /* STORAGE */ - YYSYMBOL_FORMAT = 47, /* FORMAT */ - YYSYMBOL_EQ = 48, /* EQ */ - YYSYMBOL_LT = 49, /* LT */ - YYSYMBOL_GT = 50, /* GT */ - YYSYMBOL_LE = 51, /* LE */ - YYSYMBOL_GE = 52, /* GE */ - YYSYMBOL_NE = 53, /* NE */ - YYSYMBOL_IS = 54, /* IS */ - YYSYMBOL_NUMBER = 55, /* NUMBER */ - YYSYMBOL_FLOAT = 56, /* FLOAT */ - YYSYMBOL_ID = 57, /* ID */ - YYSYMBOL_SSS = 58, /* SSS */ - YYSYMBOL_59_ = 59, /* '+' */ - YYSYMBOL_60_ = 60, /* '-' */ - YYSYMBOL_61_ = 61, /* '*' */ - YYSYMBOL_62_ = 62, /* '/' */ - YYSYMBOL_UMINUS = 63, /* UMINUS */ - YYSYMBOL_YYACCEPT = 64, /* $accept */ - YYSYMBOL_commands = 65, /* commands */ - YYSYMBOL_command_wrapper = 66, /* command_wrapper */ - YYSYMBOL_exit_stmt = 67, /* exit_stmt */ - YYSYMBOL_help_stmt = 68, /* help_stmt */ - YYSYMBOL_sync_stmt = 69, /* sync_stmt */ - YYSYMBOL_begin_stmt = 70, /* begin_stmt */ - YYSYMBOL_commit_stmt = 71, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 72, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 73, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 74, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 75, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 76, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 77, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 78, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 79, /* attr_def_list */ - YYSYMBOL_attr_def = 80, /* attr_def */ - YYSYMBOL_nullable_constraint = 81, /* nullable_constraint */ - YYSYMBOL_number = 82, /* number */ - YYSYMBOL_type = 83, /* type */ - YYSYMBOL_insert_stmt = 84, /* insert_stmt */ - YYSYMBOL_value_list = 85, /* value_list */ - YYSYMBOL_value = 86, /* value */ - YYSYMBOL_storage_format = 87, /* storage_format */ - YYSYMBOL_delete_stmt = 88, /* delete_stmt */ - YYSYMBOL_update_stmt = 89, /* update_stmt */ - YYSYMBOL_select_stmt = 90, /* select_stmt */ - YYSYMBOL_calc_stmt = 91, /* calc_stmt */ - YYSYMBOL_expression_list = 92, /* expression_list */ - YYSYMBOL_expression = 93, /* expression */ - YYSYMBOL_rel_attr = 94, /* rel_attr */ - YYSYMBOL_relation = 95, /* relation */ - YYSYMBOL_rel_list = 96, /* rel_list */ - YYSYMBOL_where = 97, /* where */ - YYSYMBOL_condition_list = 98, /* condition_list */ - YYSYMBOL_condition = 99, /* condition */ - YYSYMBOL_comp_op = 100, /* comp_op */ - YYSYMBOL_group_by = 101, /* group_by */ - YYSYMBOL_load_data_stmt = 102, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 103, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 104, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 105 /* opt_semicolon */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_BY = 5, /* BY */ + YYSYMBOL_CREATE = 6, /* CREATE */ + YYSYMBOL_DROP = 7, /* DROP */ + YYSYMBOL_GROUP = 8, /* GROUP */ + YYSYMBOL_TABLE = 9, /* TABLE */ + YYSYMBOL_TABLES = 10, /* TABLES */ + YYSYMBOL_INDEX = 11, /* INDEX */ + YYSYMBOL_CALC = 12, /* CALC */ + YYSYMBOL_SELECT = 13, /* SELECT */ + YYSYMBOL_DESC = 14, /* DESC */ + YYSYMBOL_SHOW = 15, /* SHOW */ + YYSYMBOL_SYNC = 16, /* SYNC */ + YYSYMBOL_INSERT = 17, /* INSERT */ + YYSYMBOL_DELETE = 18, /* DELETE */ + YYSYMBOL_UPDATE = 19, /* UPDATE */ + YYSYMBOL_LBRACE = 20, /* LBRACE */ + YYSYMBOL_RBRACE = 21, /* RBRACE */ + YYSYMBOL_COMMA = 22, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 23, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 24, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 25, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 26, /* INT_T */ + YYSYMBOL_STRING_T = 27, /* STRING_T */ + YYSYMBOL_FLOAT_T = 28, /* FLOAT_T */ + YYSYMBOL_DATE_T = 29, /* DATE_T */ + YYSYMBOL_NOT = 30, /* NOT */ + YYSYMBOL_NULL_T = 31, /* NULL_T */ + YYSYMBOL_NULLABLE = 32, /* NULLABLE */ + YYSYMBOL_HELP = 33, /* HELP */ + YYSYMBOL_EXIT = 34, /* EXIT */ + YYSYMBOL_DOT = 35, /* DOT */ + YYSYMBOL_INTO = 36, /* INTO */ + YYSYMBOL_VALUES = 37, /* VALUES */ + YYSYMBOL_FROM = 38, /* FROM */ + YYSYMBOL_WHERE = 39, /* WHERE */ + YYSYMBOL_AND = 40, /* AND */ + YYSYMBOL_SET = 41, /* SET */ + YYSYMBOL_ON = 42, /* ON */ + YYSYMBOL_LOAD = 43, /* LOAD */ + YYSYMBOL_DATA = 44, /* DATA */ + YYSYMBOL_INFILE = 45, /* INFILE */ + YYSYMBOL_EXPLAIN = 46, /* EXPLAIN */ + YYSYMBOL_STORAGE = 47, /* STORAGE */ + YYSYMBOL_FORMAT = 48, /* FORMAT */ + YYSYMBOL_EQ = 49, /* EQ */ + YYSYMBOL_LT = 50, /* LT */ + YYSYMBOL_GT = 51, /* GT */ + YYSYMBOL_LE = 52, /* LE */ + YYSYMBOL_GE = 53, /* GE */ + YYSYMBOL_NE = 54, /* NE */ + YYSYMBOL_LIKE = 55, /* LIKE */ + YYSYMBOL_IS = 56, /* IS */ + YYSYMBOL_NUMBER = 57, /* NUMBER */ + YYSYMBOL_FLOAT = 58, /* FLOAT */ + YYSYMBOL_ID = 59, /* ID */ + YYSYMBOL_SSS = 60, /* SSS */ + YYSYMBOL_61_ = 61, /* '+' */ + YYSYMBOL_62_ = 62, /* '-' */ + YYSYMBOL_63_ = 63, /* '*' */ + YYSYMBOL_64_ = 64, /* '/' */ + YYSYMBOL_UMINUS = 65, /* UMINUS */ + YYSYMBOL_YYACCEPT = 66, /* $accept */ + YYSYMBOL_commands = 67, /* commands */ + YYSYMBOL_command_wrapper = 68, /* command_wrapper */ + YYSYMBOL_exit_stmt = 69, /* exit_stmt */ + YYSYMBOL_help_stmt = 70, /* help_stmt */ + YYSYMBOL_sync_stmt = 71, /* sync_stmt */ + YYSYMBOL_begin_stmt = 72, /* begin_stmt */ + YYSYMBOL_commit_stmt = 73, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 74, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 75, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 76, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 77, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 78, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 79, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 80, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 81, /* attr_def_list */ + YYSYMBOL_attr_def = 82, /* attr_def */ + YYSYMBOL_nullable_constraint = 83, /* nullable_constraint */ + YYSYMBOL_number = 84, /* number */ + YYSYMBOL_type = 85, /* type */ + YYSYMBOL_insert_stmt = 86, /* insert_stmt */ + YYSYMBOL_value_list = 87, /* value_list */ + YYSYMBOL_value = 88, /* value */ + YYSYMBOL_storage_format = 89, /* storage_format */ + YYSYMBOL_delete_stmt = 90, /* delete_stmt */ + YYSYMBOL_update_stmt = 91, /* update_stmt */ + YYSYMBOL_select_stmt = 92, /* select_stmt */ + YYSYMBOL_calc_stmt = 93, /* calc_stmt */ + YYSYMBOL_expression_list = 94, /* expression_list */ + YYSYMBOL_expression = 95, /* expression */ + YYSYMBOL_alias = 96, /* alias */ + YYSYMBOL_aggr_func_expr = 97, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 98, /* rel_attr */ + YYSYMBOL_relation = 99, /* relation */ + YYSYMBOL_rel_list = 100, /* rel_list */ + YYSYMBOL_where = 101, /* where */ + YYSYMBOL_condition_list = 102, /* condition_list */ + YYSYMBOL_condition = 103, /* condition */ + YYSYMBOL_comp_op = 104, /* comp_op */ + YYSYMBOL_group_by = 105, /* group_by */ + YYSYMBOL_load_data_stmt = 106, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 107, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 108, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 109 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -583,21 +587,21 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 66 +#define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 150 +#define YYLAST 171 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 64 +#define YYNTOKENS 66 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 42 +#define YYNNTS 44 /* YYNRULES -- Number of rules. */ -#define YYNRULES 98 +#define YYNRULES 106 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 174 +#define YYNSTATES 187 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 314 +#define YYMAXUTOK 316 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -615,7 +619,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 61, 59, 2, 60, 2, 62, 2, 2, + 2, 2, 63, 61, 2, 62, 2, 64, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -642,23 +646,24 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 63 + 55, 56, 57, 58, 59, 60, 65 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 195, 195, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 226, 232, 237, 243, 249, 255, 261, - 268, 274, 282, 296, 306, 330, 333, 346, 358, 381, - 385, 390, 396, 399, 400, 401, 402, 405, 422, 425, - 436, 440, 444, 450, 456, 459, 466, 478, 493, 518, - 527, 532, 543, 546, 549, 552, 555, 559, 562, 567, - 573, 580, 585, 595, 600, 605, 619, 622, 628, 631, - 636, 643, 655, 667, 679, 694, 695, 696, 697, 698, - 699, 700, 701, 707, 712, 725, 733, 743, 744 + 0, 199, 199, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 230, 236, 241, 247, 253, 259, 265, + 272, 278, 286, 300, 310, 334, 337, 350, 362, 385, + 389, 394, 400, 403, 404, 405, 406, 409, 426, 429, + 440, 444, 448, 454, 460, 463, 470, 482, 497, 522, + 531, 540, 555, 558, 561, 564, 567, 571, 574, 579, + 585, 588, 595, 598, 601, 606, 614, 620, 625, 635, + 640, 645, 659, 662, 668, 671, 676, 683, 695, 707, + 719, 734, 735, 736, 737, 738, 739, 740, 741, 742, + 743, 749, 754, 767, 775, 785, 786 }; #endif @@ -674,24 +679,25 @@ static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "BY", - "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", "SELECT", - "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", - "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "STRING_T", - "FLOAT_T", "DATE_T", "NOT", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", - "INTO", "VALUES", "FROM", "WHERE", "AND", "SET", "ON", "LOAD", "DATA", - "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", - "NE", "IS", "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", - "UMINUS", "$accept", "commands", "command_wrapper", "exit_stmt", - "help_stmt", "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", - "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", - "create_index_stmt", "drop_index_stmt", "create_table_stmt", - "attr_def_list", "attr_def", "nullable_constraint", "number", "type", - "insert_stmt", "value_list", "value", "storage_format", "delete_stmt", - "update_stmt", "select_stmt", "calc_stmt", "expression_list", - "expression", "rel_attr", "relation", "rel_list", "where", - "condition_list", "condition", "comp_op", "group_by", "load_data_stmt", - "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "BY", "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", + "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", + "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", + "STRING_T", "FLOAT_T", "DATE_T", "NOT", "NULL_T", "NULLABLE", "HELP", + "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "SET", "ON", + "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "EQ", "LT", + "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", "SSS", + "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", + "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", + "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", + "desc_table_stmt", "create_index_stmt", "drop_index_stmt", + "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", + "number", "type", "insert_stmt", "value_list", "value", "storage_format", + "delete_stmt", "update_stmt", "select_stmt", "calc_stmt", + "expression_list", "expression", "alias", "aggr_func_expr", "rel_attr", + "relation", "rel_list", "where", "condition_list", "condition", + "comp_op", "group_by", "load_data_stmt", "explain_stmt", + "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; static const char * @@ -701,7 +707,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-85) +#define YYPACT_NINF (-105) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -713,26 +719,27 @@ yysymbol_name (yysymbol_kind_t yysymbol) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int8 yypact[] = +static const yytype_int16 yypact[] = { - 62, -5, -1, -17, -17, -53, 10, -85, -8, -7, - -36, -85, -85, -85, -85, -85, -26, -9, 62, 32, - 33, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -20, -15, 9, 12, -17, -85, -85, -85, 22, - -85, -17, -85, -85, -85, -10, -85, 44, -85, -85, - 13, 25, 60, 55, 57, -85, -85, -85, -85, 86, - 65, -85, 69, -14, 56, -85, -17, -17, -17, -17, - -17, 58, 76, 78, 61, 53, 59, 63, 64, 66, - -85, -85, -85, -47, -47, -85, -85, -85, 93, 78, - 100, 41, -85, 74, -85, 89, -2, 104, 107, -85, - 58, -85, 53, 39, 39, -85, 88, 53, 120, -85, - -85, -85, -85, -11, 63, 109, 73, -85, -85, 110, - -85, -85, -85, -85, -85, -85, 103, 41, 41, 41, - 78, 77, 80, 106, -85, -85, 104, 87, 117, 53, - 118, -85, -85, -85, -85, -85, -85, -85, -85, -85, - 119, -85, -85, 94, -85, -85, 110, -85, -19, 92, - -85, -85, 85, -85 + 72, -1, 2, -8, -8, -44, 8, -105, 11, -16, + -27, -105, -105, -105, -105, -105, -15, 16, 72, 53, + 80, -105, -105, -105, -105, -105, -105, -105, -105, -105, + -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, + -105, 6, 33, 35, 41, -8, -105, -105, -105, -14, + -105, -8, -105, -105, -105, 5, -105, -105, 63, -105, + -105, 43, 44, 66, 55, 69, -105, -105, -105, -105, + 88, 74, -105, 75, -5, -17, 64, -105, 70, -105, + -8, -8, -8, -8, 104, 71, 91, 92, 73, 67, + 76, 78, 79, 81, -105, -105, 112, -105, -105, 18, + 18, -105, -105, -8, -105, 113, 92, 114, 62, -105, + 90, -105, 105, 9, 120, 123, -105, -105, -105, 71, + -105, 67, 109, -25, -25, -105, 106, 67, 136, -105, + -105, -105, -105, -13, 78, 126, 89, -105, -105, 127, + 95, -105, -105, -105, -105, -105, -105, -105, 121, 62, + 62, 62, 92, 93, 96, 124, -105, -105, 120, 107, + 135, 67, 137, -105, -105, -105, -105, -105, -105, -105, + -105, -105, -105, 138, -105, -105, 115, -105, -105, 127, + -105, 40, 108, -105, -105, 101, -105 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -742,42 +749,43 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 97, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 105, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 53, 50, 51, 71, - 52, 0, 70, 68, 59, 60, 69, 0, 31, 30, - 0, 0, 0, 0, 0, 95, 1, 98, 2, 0, - 0, 29, 0, 0, 0, 67, 0, 0, 0, 0, - 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, - 66, 72, 61, 62, 63, 64, 65, 73, 74, 76, - 0, 78, 56, 0, 96, 0, 0, 35, 0, 33, - 0, 93, 0, 0, 0, 77, 79, 0, 0, 43, - 44, 45, 46, 41, 0, 0, 0, 75, 58, 48, - 85, 86, 87, 88, 89, 90, 91, 0, 0, 78, - 76, 0, 0, 0, 40, 38, 35, 54, 0, 0, - 0, 92, 82, 84, 81, 83, 80, 57, 94, 42, - 0, 39, 36, 0, 34, 32, 48, 47, 41, 0, - 49, 37, 0, 55 + 20, 0, 0, 0, 0, 0, 53, 50, 51, 77, + 52, 0, 70, 68, 59, 72, 71, 69, 0, 31, + 30, 0, 0, 0, 0, 0, 103, 1, 106, 2, + 0, 0, 29, 0, 0, 0, 0, 67, 0, 73, + 0, 0, 0, 0, 60, 0, 0, 82, 0, 0, + 0, 0, 0, 0, 66, 76, 0, 78, 74, 62, + 63, 64, 65, 0, 79, 80, 82, 0, 84, 56, + 0, 104, 0, 0, 35, 0, 33, 75, 61, 0, + 101, 0, 77, 0, 0, 83, 85, 0, 0, 43, + 44, 45, 46, 41, 0, 0, 0, 81, 58, 48, + 0, 91, 92, 93, 94, 95, 96, 99, 97, 0, + 0, 84, 82, 0, 0, 0, 40, 38, 35, 54, + 0, 0, 0, 100, 98, 88, 90, 87, 89, 86, + 57, 102, 42, 0, 39, 36, 0, 34, 32, 48, + 47, 41, 0, 49, 37, 0, 55 }; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = +static const yytype_int16 yypgoto[] = { - -85, -85, 125, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, 0, 20, -23, -85, -85, - -85, -18, -84, -85, -85, -85, -85, -85, -4, -16, - -79, -85, 37, -83, 11, -85, 35, -85, -85, -85, - -85, -85 + -105, -105, 143, -105, -105, -105, -105, -105, -105, -105, + -105, -105, -105, -105, -105, 4, 30, -12, -105, -105, + -105, -11, -88, -105, -105, -105, -105, -105, -4, 29, + -105, -105, -74, -105, 46, -104, 15, -105, 47, -105, + -105, -105, -105, -105 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 125, 107, 145, 160, 123, - 33, 150, 53, 164, 34, 35, 36, 37, 54, 55, - 56, 98, 99, 102, 115, 116, 137, 128, 38, 39, - 40, 68 + 28, 29, 30, 31, 32, 135, 114, 157, 173, 133, + 33, 162, 53, 177, 34, 35, 36, 37, 54, 55, + 84, 56, 57, 105, 106, 109, 125, 126, 149, 138, + 38, 39, 40, 69 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -785,81 +793,87 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 57, 104, 45, 41, 58, 42, 90, 43, 142, 44, - 143, 76, 144, 46, 79, 80, 111, 113, 143, 59, - 144, 62, 114, 119, 120, 121, 122, 60, 129, 73, - 61, 63, 66, 140, 64, 75, 67, 69, 47, 48, - 49, 50, 70, 51, 52, 77, 78, 79, 80, 77, - 78, 79, 80, 152, 154, 113, 74, 157, 153, 155, - 114, 93, 94, 95, 96, 166, 71, 1, 2, 72, - 82, 46, 92, 3, 4, 5, 6, 7, 8, 9, - 10, 81, 83, 46, 11, 12, 13, 130, 131, 132, - 133, 134, 135, 136, 14, 15, 47, 48, 49, 50, - 84, 86, 16, 85, 17, 87, 88, 18, 47, 48, - 89, 50, 100, 91, 110, 97, 101, 105, 103, 112, - 106, 108, 117, 109, 118, 124, 126, 139, 141, 147, - 148, 149, 151, 163, 158, 159, 161, 165, 167, 168, - 172, 169, 173, 65, 146, 171, 162, 127, 170, 138, - 156 + 58, 111, 120, 45, 95, 140, 75, 154, 41, 78, + 42, 43, 45, 44, 46, 59, 94, 155, 60, 156, + 123, 76, 62, 46, 141, 142, 143, 144, 145, 146, + 147, 148, 63, 139, 124, 129, 130, 131, 132, 152, + 47, 48, 49, 50, 64, 51, 52, 61, 170, 47, + 48, 49, 50, 67, 51, 52, 80, 81, 82, 83, + 65, 165, 167, 123, 79, 70, 80, 81, 82, 83, + 155, 96, 156, 179, 74, 166, 168, 124, 1, 2, + 77, 82, 83, 68, 3, 4, 5, 6, 7, 8, + 9, 10, 71, 46, 72, 11, 12, 13, 46, 118, + 73, 85, 86, 87, 89, 14, 15, 88, 91, 99, + 100, 101, 102, 16, 90, 17, 92, 93, 18, 47, + 48, 122, 50, 97, 47, 48, 103, 50, 107, 98, + 104, 108, 110, 117, 121, 119, 112, 113, 115, 127, + 116, 128, 134, 136, 76, 153, 151, 159, 160, 161, + 163, 164, 171, 172, 176, 174, 178, 185, 180, 181, + 186, 66, 175, 182, 158, 137, 169, 0, 183, 184, + 0, 150 }; -static const yytype_uint8 yycheck[] = +static const yytype_int16 yycheck[] = { - 4, 85, 19, 8, 57, 10, 20, 8, 19, 10, - 29, 21, 31, 30, 61, 62, 99, 101, 29, 9, - 31, 57, 101, 25, 26, 27, 28, 35, 112, 45, - 37, 57, 0, 117, 43, 51, 3, 57, 55, 56, - 57, 58, 57, 60, 61, 59, 60, 61, 62, 59, - 60, 61, 62, 137, 138, 139, 34, 140, 137, 138, - 139, 77, 78, 79, 80, 149, 57, 5, 6, 57, - 57, 30, 76, 11, 12, 13, 14, 15, 16, 17, - 18, 37, 57, 30, 22, 23, 24, 48, 49, 50, - 51, 52, 53, 54, 32, 33, 55, 56, 57, 58, - 40, 44, 40, 48, 42, 19, 41, 45, 55, 56, - 41, 58, 36, 57, 21, 57, 38, 58, 57, 19, - 57, 57, 48, 57, 35, 21, 19, 39, 8, 20, - 57, 21, 29, 46, 57, 55, 30, 20, 20, 20, - 48, 47, 57, 18, 124, 168, 146, 110, 166, 114, - 139 + 4, 89, 106, 20, 21, 30, 20, 20, 9, 4, + 11, 9, 20, 11, 31, 59, 21, 30, 10, 32, + 108, 35, 38, 31, 49, 50, 51, 52, 53, 54, + 55, 56, 59, 121, 108, 26, 27, 28, 29, 127, + 57, 58, 59, 60, 59, 62, 63, 36, 152, 57, + 58, 59, 60, 0, 62, 63, 61, 62, 63, 64, + 44, 149, 150, 151, 59, 59, 61, 62, 63, 64, + 30, 75, 32, 161, 45, 149, 150, 151, 6, 7, + 51, 63, 64, 3, 12, 13, 14, 15, 16, 17, + 18, 19, 59, 31, 59, 23, 24, 25, 31, 103, + 59, 38, 59, 59, 49, 33, 34, 41, 20, 80, + 81, 82, 83, 41, 45, 43, 42, 42, 46, 57, + 58, 59, 60, 59, 57, 58, 22, 60, 37, 59, + 59, 39, 59, 21, 20, 22, 60, 59, 59, 49, + 59, 36, 22, 20, 35, 9, 40, 21, 59, 22, + 55, 30, 59, 57, 47, 31, 21, 49, 21, 21, + 59, 18, 158, 48, 134, 119, 151, -1, 179, 181, + -1, 124 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_int8 yystos[] = { - 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, - 18, 22, 23, 24, 32, 33, 40, 42, 45, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 84, 88, 89, 90, 91, 102, 103, - 104, 8, 10, 8, 10, 19, 30, 55, 56, 57, - 58, 60, 61, 86, 92, 93, 94, 92, 57, 9, - 35, 37, 57, 57, 43, 66, 0, 3, 105, 57, - 57, 57, 57, 93, 34, 93, 21, 59, 60, 61, - 62, 37, 57, 57, 40, 48, 44, 19, 41, 41, - 20, 57, 92, 93, 93, 93, 93, 57, 95, 96, - 36, 38, 97, 57, 86, 58, 57, 80, 57, 57, - 21, 97, 19, 86, 94, 98, 99, 48, 35, 25, - 26, 27, 28, 83, 21, 79, 19, 96, 101, 86, - 48, 49, 50, 51, 52, 53, 54, 100, 100, 39, - 86, 8, 19, 29, 31, 81, 80, 20, 57, 21, - 85, 29, 86, 94, 86, 94, 98, 97, 57, 55, - 82, 30, 79, 46, 87, 20, 86, 20, 20, 47, - 85, 81, 48, 57 + 0, 6, 7, 12, 13, 14, 15, 16, 17, 18, + 19, 23, 24, 25, 33, 34, 41, 43, 46, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 86, 90, 91, 92, 93, 106, 107, + 108, 9, 11, 9, 11, 20, 31, 57, 58, 59, + 60, 62, 63, 88, 94, 95, 97, 98, 94, 59, + 10, 36, 38, 59, 59, 44, 68, 0, 3, 109, + 59, 59, 59, 59, 95, 20, 35, 95, 4, 59, + 61, 62, 63, 64, 96, 38, 59, 59, 41, 49, + 45, 20, 42, 42, 21, 21, 94, 59, 59, 95, + 95, 95, 95, 22, 59, 99, 100, 37, 39, 101, + 59, 88, 60, 59, 82, 59, 59, 21, 94, 22, + 101, 20, 59, 88, 98, 102, 103, 49, 36, 26, + 27, 28, 29, 85, 22, 81, 20, 100, 105, 88, + 30, 49, 50, 51, 52, 53, 54, 55, 56, 104, + 104, 40, 88, 9, 20, 30, 32, 83, 82, 21, + 59, 22, 87, 55, 30, 88, 98, 88, 98, 102, + 101, 59, 57, 84, 31, 81, 47, 89, 21, 88, + 21, 21, 48, 87, 83, 49, 59 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 64, 65, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 79, 80, 80, 81, - 81, 81, 82, 83, 83, 83, 83, 84, 85, 85, - 86, 86, 86, 86, 87, 87, 88, 89, 90, 91, - 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 94, 94, 95, 96, 96, 97, 97, 98, 98, - 98, 99, 99, 99, 99, 100, 100, 100, 100, 100, - 100, 100, 100, 101, 102, 103, 104, 105, 105 + 0, 66, 67, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 81, 82, 82, 83, + 83, 83, 84, 85, 85, 85, 85, 86, 87, 87, + 88, 88, 88, 88, 89, 89, 90, 91, 92, 93, + 94, 94, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 96, 96, 96, 97, 97, 98, 98, 99, + 100, 100, 101, 101, 102, 102, 102, 103, 103, 103, + 103, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 104, 105, 106, 107, 108, 109, 109 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -871,10 +885,11 @@ static const yytype_int8 yyr2[] = 2, 2, 8, 5, 8, 0, 3, 6, 3, 2, 1, 0, 1, 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, 1, 0, 4, 4, 7, 6, 2, - 1, 3, 3, 3, 3, 3, 3, 2, 1, 1, - 1, 1, 3, 1, 1, 3, 0, 2, 0, 1, - 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, - 1, 1, 2, 0, 7, 2, 4, 0, 1 + 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, + 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, + 1, 3, 0, 2, 0, 1, 3, 3, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 2, 0, 7, 2, 4, 0, 1 }; @@ -1736,93 +1751,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 196 "yacc_sql.y" +#line 200 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1745 "yacc_sql.cpp" +#line 1760 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 226 "yacc_sql.y" +#line 230 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1754 "yacc_sql.cpp" +#line 1769 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 232 "yacc_sql.y" +#line 236 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1762 "yacc_sql.cpp" +#line 1777 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 237 "yacc_sql.y" +#line 241 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1770 "yacc_sql.cpp" +#line 1785 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 243 "yacc_sql.y" +#line 247 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1778 "yacc_sql.cpp" +#line 1793 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 249 "yacc_sql.y" +#line 253 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1786 "yacc_sql.cpp" +#line 1801 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 255 "yacc_sql.y" +#line 259 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1794 "yacc_sql.cpp" +#line 1809 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 261 "yacc_sql.y" +#line 265 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1804 "yacc_sql.cpp" +#line 1819 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 268 "yacc_sql.y" +#line 272 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1812 "yacc_sql.cpp" +#line 1827 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 274 "yacc_sql.y" +#line 278 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1822 "yacc_sql.cpp" +#line 1837 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 283 "yacc_sql.y" +#line 287 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1833,11 +1848,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1837 "yacc_sql.cpp" +#line 1852 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 297 "yacc_sql.y" +#line 301 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1845,11 +1860,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1849 "yacc_sql.cpp" +#line 1864 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 307 "yacc_sql.y" +#line 311 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1870,19 +1885,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1874 "yacc_sql.cpp" +#line 1889 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 330 "yacc_sql.y" +#line 334 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1882 "yacc_sql.cpp" +#line 1897 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 334 "yacc_sql.y" +#line 338 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1892,11 +1907,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1896 "yacc_sql.cpp" +#line 1911 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 347 "yacc_sql.y" +#line 351 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -1908,11 +1923,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 1912 "yacc_sql.cpp" +#line 1927 "yacc_sql.cpp" break; case 38: /* attr_def: ID type nullable_constraint */ -#line 359 "yacc_sql.y" +#line 363 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -1922,7 +1937,7 @@ YYLTYPE yylloc = yyloc_default; } else if ((yyval.attr_info)->type == AttrType::FLOATS) { (yyval.attr_info)->length = 4; } else if ((yyval.attr_info)->type == AttrType::DATES) { - (yyval.attr_info)->length = 10; + (yyval.attr_info)->length = 4; } else { ASSERT(false, "$$->type is invalid."); } @@ -1932,65 +1947,65 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 1936 "yacc_sql.cpp" +#line 1951 "yacc_sql.cpp" break; case 39: /* nullable_constraint: NOT NULL_T */ -#line 382 "yacc_sql.y" +#line 386 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1944 "yacc_sql.cpp" +#line 1959 "yacc_sql.cpp" break; case 40: /* nullable_constraint: NULLABLE */ -#line 386 "yacc_sql.y" +#line 390 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1952 "yacc_sql.cpp" +#line 1967 "yacc_sql.cpp" break; case 41: /* nullable_constraint: %empty */ -#line 390 "yacc_sql.y" +#line 394 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 1960 "yacc_sql.cpp" +#line 1975 "yacc_sql.cpp" break; case 42: /* number: NUMBER */ -#line 396 "yacc_sql.y" +#line 400 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1966 "yacc_sql.cpp" +#line 1981 "yacc_sql.cpp" break; case 43: /* type: INT_T */ -#line 399 "yacc_sql.y" +#line 403 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1972 "yacc_sql.cpp" +#line 1987 "yacc_sql.cpp" break; case 44: /* type: STRING_T */ -#line 400 "yacc_sql.y" +#line 404 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1978 "yacc_sql.cpp" +#line 1993 "yacc_sql.cpp" break; case 45: /* type: FLOAT_T */ -#line 401 "yacc_sql.y" +#line 405 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1984 "yacc_sql.cpp" +#line 1999 "yacc_sql.cpp" break; case 46: /* type: DATE_T */ -#line 402 "yacc_sql.y" +#line 406 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1990 "yacc_sql.cpp" +#line 2005 "yacc_sql.cpp" break; case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 406 "yacc_sql.y" +#line 410 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -2003,19 +2018,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 2007 "yacc_sql.cpp" +#line 2022 "yacc_sql.cpp" break; case 48: /* value_list: %empty */ -#line 422 "yacc_sql.y" +#line 426 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 2015 "yacc_sql.cpp" +#line 2030 "yacc_sql.cpp" break; case 49: /* value_list: COMMA value value_list */ -#line 425 "yacc_sql.y" +#line 429 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -2025,64 +2040,64 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 2029 "yacc_sql.cpp" +#line 2044 "yacc_sql.cpp" break; case 50: /* value: NUMBER */ -#line 436 "yacc_sql.y" +#line 440 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2038 "yacc_sql.cpp" +#line 2053 "yacc_sql.cpp" break; case 51: /* value: FLOAT */ -#line 440 "yacc_sql.y" +#line 444 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2047 "yacc_sql.cpp" +#line 2062 "yacc_sql.cpp" break; case 52: /* value: SSS */ -#line 444 "yacc_sql.y" +#line 448 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2058 "yacc_sql.cpp" +#line 2073 "yacc_sql.cpp" break; case 53: /* value: NULL_T */ -#line 450 "yacc_sql.y" +#line 454 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2066 "yacc_sql.cpp" +#line 2081 "yacc_sql.cpp" break; case 54: /* storage_format: %empty */ -#line 456 "yacc_sql.y" +#line 460 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2074 "yacc_sql.cpp" +#line 2089 "yacc_sql.cpp" break; case 55: /* storage_format: STORAGE FORMAT EQ ID */ -#line 460 "yacc_sql.y" +#line 464 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2082 "yacc_sql.cpp" +#line 2097 "yacc_sql.cpp" break; case 56: /* delete_stmt: DELETE FROM ID where */ -#line 467 "yacc_sql.y" +#line 471 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2092,11 +2107,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2096 "yacc_sql.cpp" +#line 2111 "yacc_sql.cpp" break; case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 479 "yacc_sql.y" +#line 483 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2109,11 +2124,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2113 "yacc_sql.cpp" +#line 2128 "yacc_sql.cpp" break; case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 494 "yacc_sql.y" +#line 498 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2136,131 +2151,191 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2140 "yacc_sql.cpp" +#line 2155 "yacc_sql.cpp" break; case 59: /* calc_stmt: CALC expression_list */ -#line 519 "yacc_sql.y" +#line 523 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2150 "yacc_sql.cpp" +#line 2165 "yacc_sql.cpp" break; - case 60: /* expression_list: expression */ -#line 528 "yacc_sql.y" + case 60: /* expression_list: expression alias */ +#line 532 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; - (yyval.expression_list)->emplace_back((yyvsp[0].expression)); + if (nullptr != (yyvsp[0].string)) { + (yyvsp[-1].expression)->set_name((yyvsp[0].string)); + } + (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); + free((yyvsp[0].string)); } -#line 2159 "yacc_sql.cpp" +#line 2178 "yacc_sql.cpp" break; - case 61: /* expression_list: expression COMMA expression_list */ -#line 533 "yacc_sql.y" + case 61: /* expression_list: expression alias COMMA expression_list */ +#line 541 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); } else { (yyval.expression_list) = new std::vector>; } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); + if (nullptr != (yyvsp[-2].string)) { + (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); + } + (yyval.expression_list)->emplace_back((yyvsp[-3].expression)); + free((yyvsp[-2].string)); } -#line 2172 "yacc_sql.cpp" +#line 2195 "yacc_sql.cpp" break; case 62: /* expression: expression '+' expression */ -#line 543 "yacc_sql.y" +#line 555 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2180 "yacc_sql.cpp" +#line 2203 "yacc_sql.cpp" break; case 63: /* expression: expression '-' expression */ -#line 546 "yacc_sql.y" +#line 558 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2188 "yacc_sql.cpp" +#line 2211 "yacc_sql.cpp" break; case 64: /* expression: expression '*' expression */ -#line 549 "yacc_sql.y" +#line 561 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2196 "yacc_sql.cpp" +#line 2219 "yacc_sql.cpp" break; case 65: /* expression: expression '/' expression */ -#line 552 "yacc_sql.y" +#line 564 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2204 "yacc_sql.cpp" +#line 2227 "yacc_sql.cpp" break; case 66: /* expression: LBRACE expression RBRACE */ -#line 555 "yacc_sql.y" +#line 567 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2213 "yacc_sql.cpp" +#line 2236 "yacc_sql.cpp" break; case 67: /* expression: '-' expression */ -#line 559 "yacc_sql.y" +#line 571 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2221 "yacc_sql.cpp" +#line 2244 "yacc_sql.cpp" break; case 68: /* expression: value */ -#line 562 "yacc_sql.y" +#line 574 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2231 "yacc_sql.cpp" +#line 2254 "yacc_sql.cpp" break; case 69: /* expression: rel_attr */ -#line 567 "yacc_sql.y" +#line 579 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2242 "yacc_sql.cpp" +#line 2265 "yacc_sql.cpp" break; case 70: /* expression: '*' */ -#line 573 "yacc_sql.y" +#line 585 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2250 "yacc_sql.cpp" +#line 2273 "yacc_sql.cpp" + break; + + case 71: /* expression: aggr_func_expr */ +#line 588 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + } +#line 2281 "yacc_sql.cpp" + break; + + case 72: /* alias: %empty */ +#line 595 "yacc_sql.y" + { + (yyval.string) = nullptr; + } +#line 2289 "yacc_sql.cpp" + break; + + case 73: /* alias: ID */ +#line 598 "yacc_sql.y" + { + (yyval.string) = (yyvsp[0].string); + } +#line 2297 "yacc_sql.cpp" + break; + + case 74: /* alias: AS ID */ +#line 601 "yacc_sql.y" + { + (yyval.string) = (yyvsp[0].string); + } +#line 2305 "yacc_sql.cpp" + break; + + case 75: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 607 "yacc_sql.y" + { + if((*(yyvsp[-1].expression_list)).size() != 1) { + (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); + } else { + (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); + } + } +#line 2317 "yacc_sql.cpp" break; - case 71: /* rel_attr: ID */ -#line 580 "yacc_sql.y" + case 76: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 615 "yacc_sql.y" + { + (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); + } +#line 2325 "yacc_sql.cpp" + break; + + case 77: /* rel_attr: ID */ +#line 620 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2260 "yacc_sql.cpp" +#line 2335 "yacc_sql.cpp" break; - case 72: /* rel_attr: ID DOT ID */ -#line 585 "yacc_sql.y" + case 78: /* rel_attr: ID DOT ID */ +#line 625 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2268,29 +2343,29 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2272 "yacc_sql.cpp" +#line 2347 "yacc_sql.cpp" break; - case 73: /* relation: ID */ -#line 595 "yacc_sql.y" + case 79: /* relation: ID */ +#line 635 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2280 "yacc_sql.cpp" +#line 2355 "yacc_sql.cpp" break; - case 74: /* rel_list: relation */ -#line 600 "yacc_sql.y" + case 80: /* rel_list: relation */ +#line 640 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->push_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2290 "yacc_sql.cpp" +#line 2365 "yacc_sql.cpp" break; - case 75: /* rel_list: relation COMMA rel_list */ -#line 605 "yacc_sql.y" + case 81: /* rel_list: relation COMMA rel_list */ +#line 645 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2301,55 +2376,55 @@ YYLTYPE yylloc = yyloc_default; (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 2305 "yacc_sql.cpp" +#line 2380 "yacc_sql.cpp" break; - case 76: /* where: %empty */ -#line 619 "yacc_sql.y" + case 82: /* where: %empty */ +#line 659 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2313 "yacc_sql.cpp" +#line 2388 "yacc_sql.cpp" break; - case 77: /* where: WHERE condition_list */ -#line 622 "yacc_sql.y" + case 83: /* where: WHERE condition_list */ +#line 662 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2321 "yacc_sql.cpp" +#line 2396 "yacc_sql.cpp" break; - case 78: /* condition_list: %empty */ -#line 628 "yacc_sql.y" + case 84: /* condition_list: %empty */ +#line 668 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2329 "yacc_sql.cpp" +#line 2404 "yacc_sql.cpp" break; - case 79: /* condition_list: condition */ -#line 631 "yacc_sql.y" + case 85: /* condition_list: condition */ +#line 671 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2339 "yacc_sql.cpp" +#line 2414 "yacc_sql.cpp" break; - case 80: /* condition_list: condition AND condition_list */ -#line 636 "yacc_sql.y" + case 86: /* condition_list: condition AND condition_list */ +#line 676 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2349 "yacc_sql.cpp" +#line 2424 "yacc_sql.cpp" break; - case 81: /* condition: rel_attr comp_op value */ -#line 644 "yacc_sql.y" + case 87: /* condition: rel_attr comp_op value */ +#line 684 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2361,11 +2436,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2365 "yacc_sql.cpp" +#line 2440 "yacc_sql.cpp" break; - case 82: /* condition: value comp_op value */ -#line 656 "yacc_sql.y" + case 88: /* condition: value comp_op value */ +#line 696 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2377,11 +2452,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2381 "yacc_sql.cpp" +#line 2456 "yacc_sql.cpp" break; - case 83: /* condition: rel_attr comp_op rel_attr */ -#line 668 "yacc_sql.y" + case 89: /* condition: rel_attr comp_op rel_attr */ +#line 708 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2393,11 +2468,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2397 "yacc_sql.cpp" +#line 2472 "yacc_sql.cpp" break; - case 84: /* condition: value comp_op rel_attr */ -#line 680 "yacc_sql.y" + case 90: /* condition: value comp_op rel_attr */ +#line 720 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2409,67 +2484,79 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2413 "yacc_sql.cpp" +#line 2488 "yacc_sql.cpp" break; - case 85: /* comp_op: EQ */ -#line 694 "yacc_sql.y" + case 91: /* comp_op: EQ */ +#line 734 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2419 "yacc_sql.cpp" +#line 2494 "yacc_sql.cpp" break; - case 86: /* comp_op: LT */ -#line 695 "yacc_sql.y" + case 92: /* comp_op: LT */ +#line 735 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2425 "yacc_sql.cpp" +#line 2500 "yacc_sql.cpp" break; - case 87: /* comp_op: GT */ -#line 696 "yacc_sql.y" + case 93: /* comp_op: GT */ +#line 736 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2431 "yacc_sql.cpp" +#line 2506 "yacc_sql.cpp" break; - case 88: /* comp_op: LE */ -#line 697 "yacc_sql.y" + case 94: /* comp_op: LE */ +#line 737 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2437 "yacc_sql.cpp" +#line 2512 "yacc_sql.cpp" break; - case 89: /* comp_op: GE */ -#line 698 "yacc_sql.y" + case 95: /* comp_op: GE */ +#line 738 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2443 "yacc_sql.cpp" +#line 2518 "yacc_sql.cpp" break; - case 90: /* comp_op: NE */ -#line 699 "yacc_sql.y" + case 96: /* comp_op: NE */ +#line 739 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2449 "yacc_sql.cpp" +#line 2524 "yacc_sql.cpp" break; - case 91: /* comp_op: IS */ -#line 700 "yacc_sql.y" + case 97: /* comp_op: IS */ +#line 740 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2455 "yacc_sql.cpp" +#line 2530 "yacc_sql.cpp" break; - case 92: /* comp_op: IS NOT */ -#line 701 "yacc_sql.y" + case 98: /* comp_op: IS NOT */ +#line 741 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2461 "yacc_sql.cpp" +#line 2536 "yacc_sql.cpp" + break; + + case 99: /* comp_op: LIKE */ +#line 742 "yacc_sql.y" + { (yyval.comp) = LIKE_OP;} +#line 2542 "yacc_sql.cpp" + break; + + case 100: /* comp_op: NOT LIKE */ +#line 743 "yacc_sql.y" + {(yyval.comp) = NOT_LIKE_OP;} +#line 2548 "yacc_sql.cpp" break; - case 93: /* group_by: %empty */ -#line 707 "yacc_sql.y" + case 101: /* group_by: %empty */ +#line 749 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2469 "yacc_sql.cpp" +#line 2556 "yacc_sql.cpp" break; - case 94: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 713 "yacc_sql.y" + case 102: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 755 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2479,20 +2566,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2483 "yacc_sql.cpp" +#line 2570 "yacc_sql.cpp" break; - case 95: /* explain_stmt: EXPLAIN command_wrapper */ -#line 726 "yacc_sql.y" + case 103: /* explain_stmt: EXPLAIN command_wrapper */ +#line 768 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2492 "yacc_sql.cpp" +#line 2579 "yacc_sql.cpp" break; - case 96: /* set_variable_stmt: SET ID EQ value */ -#line 734 "yacc_sql.y" + case 104: /* set_variable_stmt: SET ID EQ value */ +#line 776 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2500,11 +2587,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2504 "yacc_sql.cpp" +#line 2591 "yacc_sql.cpp" break; -#line 2508 "yacc_sql.cpp" +#line 2595 "yacc_sql.cpp" default: break; } @@ -2733,7 +2820,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 746 "yacc_sql.y" +#line 788 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 3fb80092..aa0dbdc6 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -55,62 +55,64 @@ extern int yydebug; YYerror = 256, /* error */ YYUNDEF = 257, /* "invalid token" */ SEMICOLON = 258, /* SEMICOLON */ - BY = 259, /* BY */ - CREATE = 260, /* CREATE */ - DROP = 261, /* DROP */ - GROUP = 262, /* GROUP */ - TABLE = 263, /* TABLE */ - TABLES = 264, /* TABLES */ - INDEX = 265, /* INDEX */ - CALC = 266, /* CALC */ - SELECT = 267, /* SELECT */ - DESC = 268, /* DESC */ - SHOW = 269, /* SHOW */ - SYNC = 270, /* SYNC */ - INSERT = 271, /* INSERT */ - DELETE = 272, /* DELETE */ - UPDATE = 273, /* UPDATE */ - LBRACE = 274, /* LBRACE */ - RBRACE = 275, /* RBRACE */ - COMMA = 276, /* COMMA */ - TRX_BEGIN = 277, /* TRX_BEGIN */ - TRX_COMMIT = 278, /* TRX_COMMIT */ - TRX_ROLLBACK = 279, /* TRX_ROLLBACK */ - INT_T = 280, /* INT_T */ - STRING_T = 281, /* STRING_T */ - FLOAT_T = 282, /* FLOAT_T */ - DATE_T = 283, /* DATE_T */ - NOT = 284, /* NOT */ - NULL_T = 285, /* NULL_T */ - NULLABLE = 286, /* NULLABLE */ - HELP = 287, /* HELP */ - EXIT = 288, /* EXIT */ - DOT = 289, /* DOT */ - INTO = 290, /* INTO */ - VALUES = 291, /* VALUES */ - FROM = 292, /* FROM */ - WHERE = 293, /* WHERE */ - AND = 294, /* AND */ - SET = 295, /* SET */ - ON = 296, /* ON */ - LOAD = 297, /* LOAD */ - DATA = 298, /* DATA */ - INFILE = 299, /* INFILE */ - EXPLAIN = 300, /* EXPLAIN */ - STORAGE = 301, /* STORAGE */ - FORMAT = 302, /* FORMAT */ - EQ = 303, /* EQ */ - LT = 304, /* LT */ - GT = 305, /* GT */ - LE = 306, /* LE */ - GE = 307, /* GE */ - NE = 308, /* NE */ - IS = 309, /* IS */ - NUMBER = 310, /* NUMBER */ - FLOAT = 311, /* FLOAT */ - ID = 312, /* ID */ - SSS = 313, /* SSS */ - UMINUS = 314 /* UMINUS */ + AS = 259, /* AS */ + BY = 260, /* BY */ + CREATE = 261, /* CREATE */ + DROP = 262, /* DROP */ + GROUP = 263, /* GROUP */ + TABLE = 264, /* TABLE */ + TABLES = 265, /* TABLES */ + INDEX = 266, /* INDEX */ + CALC = 267, /* CALC */ + SELECT = 268, /* SELECT */ + DESC = 269, /* DESC */ + SHOW = 270, /* SHOW */ + SYNC = 271, /* SYNC */ + INSERT = 272, /* INSERT */ + DELETE = 273, /* DELETE */ + UPDATE = 274, /* UPDATE */ + LBRACE = 275, /* LBRACE */ + RBRACE = 276, /* RBRACE */ + COMMA = 277, /* COMMA */ + TRX_BEGIN = 278, /* TRX_BEGIN */ + TRX_COMMIT = 279, /* TRX_COMMIT */ + TRX_ROLLBACK = 280, /* TRX_ROLLBACK */ + INT_T = 281, /* INT_T */ + STRING_T = 282, /* STRING_T */ + FLOAT_T = 283, /* FLOAT_T */ + DATE_T = 284, /* DATE_T */ + NOT = 285, /* NOT */ + NULL_T = 286, /* NULL_T */ + NULLABLE = 287, /* NULLABLE */ + HELP = 288, /* HELP */ + EXIT = 289, /* EXIT */ + DOT = 290, /* DOT */ + INTO = 291, /* INTO */ + VALUES = 292, /* VALUES */ + FROM = 293, /* FROM */ + WHERE = 294, /* WHERE */ + AND = 295, /* AND */ + SET = 296, /* SET */ + ON = 297, /* ON */ + LOAD = 298, /* LOAD */ + DATA = 299, /* DATA */ + INFILE = 300, /* INFILE */ + EXPLAIN = 301, /* EXPLAIN */ + STORAGE = 302, /* STORAGE */ + FORMAT = 303, /* FORMAT */ + EQ = 304, /* EQ */ + LT = 305, /* LT */ + GT = 306, /* GT */ + LE = 307, /* LE */ + GE = 308, /* GE */ + NE = 309, /* NE */ + LIKE = 310, /* LIKE */ + IS = 311, /* IS */ + NUMBER = 312, /* NUMBER */ + FLOAT = 313, /* FLOAT */ + ID = 314, /* ID */ + SSS = 315, /* SSS */ + UMINUS = 316 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -119,7 +121,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 121 "yacc_sql.y" +#line 123 "yacc_sql.y" ParsedSqlNode * sql_node; ConditionSqlNode * condition; @@ -139,7 +141,7 @@ union YYSTYPE float floats; bool nullable_info; -#line 143 "yacc_sql.hpp" +#line 145 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; From 414b5b89861ab537d0db6c6f36dbf27a2096b789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Fri, 27 Sep 2024 09:15:21 +0000 Subject: [PATCH 042/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=88=97?= =?UTF-8?q?=E6=98=8E=E6=8E=92=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/expression_binder.h | 12 +- src/observer/sql/parser/parse_defs.h | 14 +- src/observer/sql/parser/yacc_sql.cpp | 384 ++++++++++---------- src/observer/sql/parser/yacc_sql.hpp | 2 +- src/observer/sql/parser/yacc_sql.y | 30 +- src/observer/sql/stmt/select_stmt.cpp | 15 +- 6 files changed, 252 insertions(+), 205 deletions(-) diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index d52f049c..9b80ecda 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -21,17 +21,23 @@ See the Mulan PSL v2 for more details. */ class BinderContext { public: - BinderContext() = default; + BinderContext() = default; virtual ~BinderContext() = default; void add_table(Table *table) { query_tables_.push_back(table); } + void add_table_alias_map(const std::unordered_map &table_alias_map) + { + table_alias_map_ = table_alias_map; + } + Table *find_table(const char *table_name) const; const std::vector &query_tables() const { return query_tables_; } private: - std::vector
query_tables_; + std::vector
query_tables_; + std::unordered_map table_alias_map_; // 修改为普通成员变量 }; /** @@ -41,7 +47,7 @@ class BinderContext class ExpressionBinder { public: - ExpressionBinder(BinderContext &context) : context_(context) {} + ExpressionBinder(BinderContext &context) : context_(context) {} virtual ~ExpressionBinder() = default; RC bind_expression(std::unique_ptr &expr, std::vector> &bound_expressions); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index bebc7693..e8f64ec2 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -15,6 +15,7 @@ See the Mulan PSL v2 for more details. */ #pragma once #include +// #include #include #include @@ -77,6 +78,17 @@ struct ConditionSqlNode Value right_value; ///< right-hand side value if right_is_attr = FALSE }; +/** + * @brief 描述一个relation的节点 + */ +struct RelationNode +{ + RelationNode(std::string relation_, std::string alias_) : relation(std::move(relation_)), alias(std::move(alias_)) {} + explicit RelationNode(std::string relation_) : relation(std::move(relation_)) {} + std::string relation; ///< 查询的表 + std::string alias; ///< 该表的别名 (may be NULL) +}; + /** * @brief 描述一个select语句 * @ingroup SQLParser @@ -91,7 +103,7 @@ struct ConditionSqlNode struct SelectSqlNode { std::vector> expressions; ///< 查询的表达式 - std::vector relations; ///< 查询的表 + std::vector relations; ///< 查询的表 std::vector conditions; ///< 查询条件,使用AND串联起来多个条件 std::vector> group_by; ///< group by clause }; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index ffa9e79a..5f623674 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -585,7 +585,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 158 +#define YYLAST 163 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 63 @@ -594,7 +594,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 100 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 179 +#define YYNSTATES 180 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 313 @@ -656,10 +656,10 @@ static const yytype_int16 yyrline[] = 366, 367, 368, 369, 372, 389, 392, 403, 407, 411, 420, 423, 430, 442, 457, 482, 491, 500, 515, 518, 521, 524, 527, 531, 534, 539, 545, 548, 555, 558, - 561, 566, 574, 580, 585, 595, 600, 605, 619, 622, - 628, 631, 636, 643, 655, 667, 679, 694, 695, 696, - 697, 698, 699, 700, 701, 707, 712, 725, 733, 743, - 744 + 561, 566, 574, 580, 585, 595, 600, 610, 629, 632, + 638, 641, 646, 653, 665, 677, 689, 704, 705, 706, + 707, 708, 709, 710, 711, 717, 722, 735, 743, 753, + 754 }; #endif @@ -714,26 +714,26 @@ yysymbol_name (yysymbol_kind_t yysymbol) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int8 yypact[] = +static const yytype_int16 yypact[] = { - 87, 44, 54, 27, 27, -27, 20, -104, 2, 1, - 8, -104, -104, -104, -104, -104, 10, 26, 87, 68, - 72, -104, -104, -104, -104, -104, -104, -104, -104, -104, + 87, 8, 22, 27, 27, -51, 10, -104, -1, 1, + -2, -104, -104, -104, -104, -104, 4, 2, 87, 37, + 65, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, 22, 23, 24, 29, 27, -104, -104, -15, -104, - 27, -104, -104, -104, -2, -104, -104, 53, -104, -104, - 33, 34, 57, 45, 50, -104, -104, -104, -104, 76, - 58, -104, 69, -9, 17, 51, -104, 59, -104, 27, - 27, 27, 27, 91, 60, 75, 78, 63, -23, 64, - 66, 67, 70, -104, -104, 99, -104, -104, -42, -42, - -104, -104, 27, -104, 102, 78, 108, -47, -104, 83, - -104, 98, -13, 110, 113, -104, -104, -104, 60, -104, - -23, 103, -25, -25, -104, 97, -23, 127, -104, -104, - -104, -104, 117, 66, 118, 82, -104, -104, 119, -104, - -104, -104, -104, -104, -104, -104, 88, -47, -47, -47, - 78, 86, 89, 110, 100, 124, -23, 125, -104, -104, - -104, -104, -104, -104, -104, -104, -104, 126, -104, 104, - -104, -104, 119, -104, -104, 105, -104, 92, -104 + -104, 13, 20, 23, 24, 27, -104, -104, -14, -104, + 27, -104, -104, -104, -3, -104, -104, 50, -104, -104, + 36, 39, 52, 51, 54, -104, -104, -104, -104, 88, + 68, -104, 70, -9, 18, 57, -104, 58, -104, 27, + 27, 27, 27, 93, 60, 85, 84, 66, 34, 64, + 67, 72, 73, -104, -104, 103, -104, -104, -19, -19, + -104, -104, 27, -104, 3, 84, 106, -46, -104, 86, + -104, 98, -13, 111, 114, -104, -104, -104, 113, -104, + 34, 104, -24, -24, -104, 100, 34, 129, -104, -104, + -104, -104, 119, 67, 120, 89, 60, -104, 118, -104, + -104, -104, -104, -104, -104, -104, 90, -46, -46, -46, + 84, 91, 92, 111, 99, 123, -104, 34, 127, -104, + -104, -104, -104, -104, -104, -104, -104, -104, 128, -104, + 105, -104, -104, 118, -104, -104, 107, -104, 95, -104 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -751,23 +751,23 @@ static const yytype_int8 yydefact[] = 0, 29, 0, 0, 0, 0, 63, 0, 69, 0, 0, 0, 0, 56, 0, 0, 78, 0, 0, 0, 0, 0, 0, 62, 72, 0, 74, 70, 58, 59, - 60, 61, 0, 75, 76, 78, 0, 80, 52, 0, - 98, 0, 0, 35, 0, 33, 71, 57, 0, 95, + 60, 61, 0, 75, 68, 78, 0, 80, 52, 0, + 98, 0, 0, 35, 0, 33, 71, 57, 76, 95, 0, 73, 0, 0, 79, 81, 0, 0, 40, 41, - 42, 43, 38, 0, 0, 0, 77, 54, 45, 87, + 42, 43, 38, 0, 0, 0, 0, 54, 45, 87, 88, 89, 90, 91, 92, 93, 0, 0, 0, 80, - 78, 0, 0, 35, 50, 0, 0, 0, 94, 84, - 86, 83, 85, 82, 53, 96, 39, 0, 36, 0, - 34, 32, 45, 44, 37, 0, 46, 0, 51 + 78, 0, 0, 35, 50, 0, 77, 0, 0, 94, + 84, 86, 83, 85, 82, 53, 96, 39, 0, 36, + 0, 34, 32, 45, 44, 37, 0, 46, 0, 51 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -104, -104, 132, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -1, 21, -104, -104, -104, - -19, -87, -104, -104, -104, -104, -104, -4, -39, -104, - -104, -103, -104, 37, -102, 7, -104, 35, -104, -104, + -104, -104, 134, -104, -104, -104, -104, -104, -104, -104, + -104, -104, -104, -104, -104, 5, 21, -104, -104, -104, + -18, -86, -104, -104, -104, -104, -104, -4, -15, 53, + -104, -103, -104, 25, -102, 7, -104, 40, -104, -104, -104, -104, -104 }; @@ -775,8 +775,8 @@ static const yytype_int16 yypgoto[] = static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 134, 113, 167, 132, 33, - 157, 52, 170, 34, 35, 36, 37, 53, 54, 83, + 28, 29, 30, 31, 32, 134, 113, 168, 132, 33, + 158, 52, 171, 34, 35, 36, 37, 53, 54, 83, 55, 56, 104, 105, 108, 124, 125, 147, 137, 38, 39, 40, 68 }; @@ -786,42 +786,44 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 57, 110, 77, 119, 123, 74, 73, 46, 47, 121, - 49, 76, 93, 128, 129, 130, 131, 75, 81, 82, - 122, 139, 140, 141, 142, 143, 144, 145, 146, 58, - 59, 46, 47, 138, 49, 60, 61, 45, 94, 150, - 98, 99, 100, 101, 160, 162, 123, 45, 164, 79, - 80, 81, 82, 41, 78, 42, 79, 80, 81, 82, - 159, 161, 122, 43, 62, 44, 63, 64, 66, 172, - 95, 46, 47, 48, 49, 67, 50, 51, 69, 70, - 71, 46, 47, 48, 49, 72, 50, 51, 84, 85, - 86, 88, 89, 1, 2, 87, 90, 91, 117, 3, - 4, 5, 6, 7, 8, 9, 10, 96, 92, 106, - 11, 12, 13, 102, 107, 97, 103, 14, 15, 109, - 116, 111, 112, 114, 118, 16, 115, 17, 120, 126, - 18, 127, 133, 135, 149, 75, 151, 152, 155, 154, - 158, 156, 165, 166, 169, 171, 173, 174, 178, 175, - 65, 177, 168, 176, 153, 136, 163, 0, 148 + 57, 77, 110, 119, 123, 58, 74, 77, 46, 47, + 121, 49, 93, 128, 129, 130, 131, 41, 75, 42, + 59, 122, 139, 140, 141, 142, 143, 144, 145, 146, + 73, 43, 60, 44, 138, 76, 61, 66, 45, 94, + 150, 81, 82, 64, 161, 163, 123, 45, 165, 79, + 80, 81, 82, 78, 62, 79, 80, 81, 82, 78, + 63, 160, 162, 122, 98, 99, 100, 101, 67, 69, + 95, 173, 46, 47, 48, 49, 70, 50, 51, 71, + 72, 46, 47, 48, 49, 84, 50, 51, 46, 47, + 87, 49, 85, 1, 2, 86, 89, 88, 117, 3, + 4, 5, 6, 7, 8, 9, 10, 91, 90, 92, + 11, 12, 13, 96, 97, 102, 103, 14, 15, 106, + 107, 111, 109, 112, 116, 16, 120, 17, 114, 115, + 18, 127, 126, 133, 135, 136, 75, 149, 151, 152, + 157, 154, 159, 170, 172, 155, 167, 166, 174, 175, + 176, 179, 65, 178, 153, 177, 164, 118, 169, 0, + 0, 156, 0, 148 }; static const yytype_int16 yycheck[] = { - 4, 88, 4, 105, 107, 20, 45, 54, 55, 56, - 57, 50, 21, 26, 27, 28, 29, 32, 60, 61, - 107, 46, 47, 48, 49, 50, 51, 52, 53, 56, - 10, 54, 55, 120, 57, 33, 35, 20, 21, 126, - 79, 80, 81, 82, 147, 148, 149, 20, 150, 58, - 59, 60, 61, 9, 56, 11, 58, 59, 60, 61, - 147, 148, 149, 9, 56, 11, 56, 41, 0, 156, - 74, 54, 55, 56, 57, 3, 59, 60, 56, 56, - 56, 54, 55, 56, 57, 56, 59, 60, 35, 56, - 56, 46, 42, 6, 7, 38, 20, 39, 102, 12, - 13, 14, 15, 16, 17, 18, 19, 56, 39, 34, - 23, 24, 25, 22, 36, 56, 56, 30, 31, 56, - 21, 57, 56, 56, 22, 38, 56, 40, 20, 46, - 43, 33, 22, 20, 37, 32, 9, 20, 56, 21, - 52, 22, 56, 54, 44, 21, 21, 21, 56, 45, - 18, 46, 153, 172, 133, 118, 149, -1, 123 + 4, 4, 88, 105, 107, 56, 20, 4, 54, 55, + 56, 57, 21, 26, 27, 28, 29, 9, 32, 11, + 10, 107, 46, 47, 48, 49, 50, 51, 52, 53, + 45, 9, 33, 11, 120, 50, 35, 0, 20, 21, + 126, 60, 61, 41, 147, 148, 149, 20, 150, 58, + 59, 60, 61, 56, 56, 58, 59, 60, 61, 56, + 56, 147, 148, 149, 79, 80, 81, 82, 3, 56, + 74, 157, 54, 55, 56, 57, 56, 59, 60, 56, + 56, 54, 55, 56, 57, 35, 59, 60, 54, 55, + 38, 57, 56, 6, 7, 56, 42, 46, 102, 12, + 13, 14, 15, 16, 17, 18, 19, 39, 20, 39, + 23, 24, 25, 56, 56, 22, 56, 30, 31, 34, + 36, 57, 56, 56, 21, 38, 20, 40, 56, 56, + 43, 33, 46, 22, 20, 22, 32, 37, 9, 20, + 22, 21, 52, 44, 21, 56, 54, 56, 21, 21, + 45, 56, 18, 46, 133, 173, 149, 104, 153, -1, + -1, 136, -1, 123 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -839,13 +841,13 @@ static const yytype_int8 yystos[] = 59, 60, 61, 92, 35, 56, 56, 38, 46, 42, 20, 39, 39, 21, 21, 90, 56, 56, 91, 91, 91, 91, 22, 56, 95, 96, 34, 36, 97, 56, - 84, 57, 56, 79, 56, 56, 21, 90, 22, 97, + 84, 57, 56, 79, 56, 56, 21, 90, 92, 97, 20, 56, 84, 94, 98, 99, 46, 33, 26, 27, - 28, 29, 81, 22, 78, 20, 96, 101, 84, 46, + 28, 29, 81, 22, 78, 20, 22, 101, 84, 46, 47, 48, 49, 50, 51, 52, 53, 100, 100, 37, - 84, 9, 20, 79, 21, 56, 22, 83, 52, 84, - 94, 84, 94, 98, 97, 56, 54, 80, 78, 44, - 85, 21, 84, 21, 21, 45, 83, 46, 56 + 84, 9, 20, 79, 21, 56, 96, 22, 83, 52, + 84, 94, 84, 94, 98, 97, 56, 54, 80, 78, + 44, 85, 21, 84, 21, 21, 45, 83, 46, 56 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -874,7 +876,7 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, 0, 4, 4, 7, 6, 2, 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, 0, 1, - 2, 4, 3, 1, 3, 1, 1, 3, 0, 2, + 2, 4, 3, 1, 3, 1, 2, 4, 0, 2, 0, 1, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, 0, 7, 2, 4, 0, 1 @@ -1744,7 +1746,7 @@ YYLTYPE yylloc = yyloc_default; std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1748 "yacc_sql.cpp" +#line 1750 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ @@ -1753,7 +1755,7 @@ YYLTYPE yylloc = yyloc_default; (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1757 "yacc_sql.cpp" +#line 1759 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ @@ -1761,7 +1763,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1765 "yacc_sql.cpp" +#line 1767 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ @@ -1769,7 +1771,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1773 "yacc_sql.cpp" +#line 1775 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ @@ -1777,7 +1779,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1781 "yacc_sql.cpp" +#line 1783 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ @@ -1785,7 +1787,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1789 "yacc_sql.cpp" +#line 1791 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ @@ -1793,7 +1795,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1797 "yacc_sql.cpp" +#line 1799 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ @@ -1803,7 +1805,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1807 "yacc_sql.cpp" +#line 1809 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ @@ -1811,7 +1813,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1815 "yacc_sql.cpp" +#line 1817 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ @@ -1821,7 +1823,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1825 "yacc_sql.cpp" +#line 1827 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ @@ -1836,7 +1838,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1840 "yacc_sql.cpp" +#line 1842 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ @@ -1848,7 +1850,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1852 "yacc_sql.cpp" +#line 1854 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ @@ -1873,7 +1875,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1877 "yacc_sql.cpp" +#line 1879 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ @@ -1881,7 +1883,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.attr_infos) = nullptr; } -#line 1885 "yacc_sql.cpp" +#line 1887 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ @@ -1895,7 +1897,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1899 "yacc_sql.cpp" +#line 1901 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE */ @@ -1907,7 +1909,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = (yyvsp[-1].number); free((yyvsp[-4].string)); } -#line 1911 "yacc_sql.cpp" +#line 1913 "yacc_sql.cpp" break; case 38: /* attr_def: ID type */ @@ -1919,37 +1921,37 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; free((yyvsp[-1].string)); } -#line 1923 "yacc_sql.cpp" +#line 1925 "yacc_sql.cpp" break; case 39: /* number: NUMBER */ #line 363 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1929 "yacc_sql.cpp" +#line 1931 "yacc_sql.cpp" break; case 40: /* type: INT_T */ #line 366 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1935 "yacc_sql.cpp" +#line 1937 "yacc_sql.cpp" break; case 41: /* type: STRING_T */ #line 367 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1941 "yacc_sql.cpp" +#line 1943 "yacc_sql.cpp" break; case 42: /* type: FLOAT_T */ #line 368 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1947 "yacc_sql.cpp" +#line 1949 "yacc_sql.cpp" break; case 43: /* type: DATE_T */ #line 369 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1953 "yacc_sql.cpp" +#line 1955 "yacc_sql.cpp" break; case 44: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ @@ -1966,7 +1968,7 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1970 "yacc_sql.cpp" +#line 1972 "yacc_sql.cpp" break; case 45: /* value_list: %empty */ @@ -1974,7 +1976,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.value_list) = nullptr; } -#line 1978 "yacc_sql.cpp" +#line 1980 "yacc_sql.cpp" break; case 46: /* value_list: COMMA value value_list */ @@ -1988,7 +1990,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1992 "yacc_sql.cpp" +#line 1994 "yacc_sql.cpp" break; case 47: /* value: NUMBER */ @@ -1997,7 +1999,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2001 "yacc_sql.cpp" +#line 2003 "yacc_sql.cpp" break; case 48: /* value: FLOAT */ @@ -2006,7 +2008,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2010 "yacc_sql.cpp" +#line 2012 "yacc_sql.cpp" break; case 49: /* value: SSS */ @@ -2017,7 +2019,7 @@ YYLTYPE yylloc = yyloc_default; free(tmp); free((yyvsp[0].string)); } -#line 2021 "yacc_sql.cpp" +#line 2023 "yacc_sql.cpp" break; case 50: /* storage_format: %empty */ @@ -2025,7 +2027,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = nullptr; } -#line 2029 "yacc_sql.cpp" +#line 2031 "yacc_sql.cpp" break; case 51: /* storage_format: STORAGE FORMAT EQ ID */ @@ -2033,7 +2035,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = (yyvsp[0].string); } -#line 2037 "yacc_sql.cpp" +#line 2039 "yacc_sql.cpp" break; case 52: /* delete_stmt: DELETE FROM ID where */ @@ -2047,7 +2049,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2051 "yacc_sql.cpp" +#line 2053 "yacc_sql.cpp" break; case 53: /* update_stmt: UPDATE ID SET ID EQ value where */ @@ -2064,7 +2066,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2068 "yacc_sql.cpp" +#line 2070 "yacc_sql.cpp" break; case 54: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ @@ -2091,7 +2093,7 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2095 "yacc_sql.cpp" +#line 2097 "yacc_sql.cpp" break; case 55: /* calc_stmt: CALC expression_list */ @@ -2101,7 +2103,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2105 "yacc_sql.cpp" +#line 2107 "yacc_sql.cpp" break; case 56: /* expression_list: expression alias */ @@ -2114,7 +2116,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2118 "yacc_sql.cpp" +#line 2120 "yacc_sql.cpp" break; case 57: /* expression_list: expression alias COMMA expression_list */ @@ -2128,10 +2130,10 @@ YYLTYPE yylloc = yyloc_default; if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace_back((yyvsp[-3].expression)); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2135 "yacc_sql.cpp" +#line 2137 "yacc_sql.cpp" break; case 58: /* expression: expression '+' expression */ @@ -2139,7 +2141,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2143 "yacc_sql.cpp" +#line 2145 "yacc_sql.cpp" break; case 59: /* expression: expression '-' expression */ @@ -2147,7 +2149,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2151 "yacc_sql.cpp" +#line 2153 "yacc_sql.cpp" break; case 60: /* expression: expression '*' expression */ @@ -2155,7 +2157,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2159 "yacc_sql.cpp" +#line 2161 "yacc_sql.cpp" break; case 61: /* expression: expression '/' expression */ @@ -2163,7 +2165,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2167 "yacc_sql.cpp" +#line 2169 "yacc_sql.cpp" break; case 62: /* expression: LBRACE expression RBRACE */ @@ -2172,7 +2174,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2176 "yacc_sql.cpp" +#line 2178 "yacc_sql.cpp" break; case 63: /* expression: '-' expression */ @@ -2180,7 +2182,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2184 "yacc_sql.cpp" +#line 2186 "yacc_sql.cpp" break; case 64: /* expression: value */ @@ -2190,7 +2192,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2194 "yacc_sql.cpp" +#line 2196 "yacc_sql.cpp" break; case 65: /* expression: rel_attr */ @@ -2201,7 +2203,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2205 "yacc_sql.cpp" +#line 2207 "yacc_sql.cpp" break; case 66: /* expression: '*' */ @@ -2209,7 +2211,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = new StarExpr(); } -#line 2213 "yacc_sql.cpp" +#line 2215 "yacc_sql.cpp" break; case 67: /* expression: aggr_func_expr */ @@ -2217,7 +2219,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2221 "yacc_sql.cpp" +#line 2223 "yacc_sql.cpp" break; case 68: /* alias: %empty */ @@ -2225,7 +2227,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = nullptr; } -#line 2229 "yacc_sql.cpp" +#line 2231 "yacc_sql.cpp" break; case 69: /* alias: ID */ @@ -2233,7 +2235,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = (yyvsp[0].string); } -#line 2237 "yacc_sql.cpp" +#line 2239 "yacc_sql.cpp" break; case 70: /* alias: AS ID */ @@ -2241,7 +2243,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = (yyvsp[0].string); } -#line 2245 "yacc_sql.cpp" +#line 2247 "yacc_sql.cpp" break; case 71: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ @@ -2253,7 +2255,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2257 "yacc_sql.cpp" +#line 2259 "yacc_sql.cpp" break; case 72: /* aggr_func_expr: ID LBRACE RBRACE */ @@ -2261,7 +2263,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2265 "yacc_sql.cpp" +#line 2267 "yacc_sql.cpp" break; case 73: /* rel_attr: ID */ @@ -2271,7 +2273,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2275 "yacc_sql.cpp" +#line 2277 "yacc_sql.cpp" break; case 74: /* rel_attr: ID DOT ID */ @@ -2283,7 +2285,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2287 "yacc_sql.cpp" +#line 2289 "yacc_sql.cpp" break; case 75: /* relation: ID */ @@ -2291,80 +2293,90 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = (yyvsp[0].string); } -#line 2295 "yacc_sql.cpp" +#line 2297 "yacc_sql.cpp" break; - case 76: /* rel_list: relation */ + case 76: /* rel_list: relation alias */ #line 600 "yacc_sql.y" - { - (yyval.relation_list) = new std::vector(); - (yyval.relation_list)->push_back((yyvsp[0].string)); - free((yyvsp[0].string)); + { + (yyval.relation_list) = new std::vector(); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); + free((yyvsp[0].string)); + }else{ + (yyval.relation_list)->emplace_back((yyvsp[-1].string)); + } + free((yyvsp[-1].string)); } -#line 2305 "yacc_sql.cpp" +#line 2312 "yacc_sql.cpp" break; - case 77: /* rel_list: relation COMMA rel_list */ -#line 605 "yacc_sql.y" - { + case 77: /* rel_list: relation alias COMMA rel_list */ +#line 610 "yacc_sql.y" + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { - (yyval.relation_list) = new std::vector; + (yyval.relation_list) = new std::vector; + } + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); + free((yyvsp[-2].string)); + }else{ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } - (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); - free((yyvsp[-2].string)); + free((yyvsp[-3].string)); } -#line 2320 "yacc_sql.cpp" +#line 2332 "yacc_sql.cpp" break; case 78: /* where: %empty */ -#line 619 "yacc_sql.y" +#line 629 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2328 "yacc_sql.cpp" +#line 2340 "yacc_sql.cpp" break; case 79: /* where: WHERE condition_list */ -#line 622 "yacc_sql.y" +#line 632 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2336 "yacc_sql.cpp" +#line 2348 "yacc_sql.cpp" break; case 80: /* condition_list: %empty */ -#line 628 "yacc_sql.y" +#line 638 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2344 "yacc_sql.cpp" +#line 2356 "yacc_sql.cpp" break; case 81: /* condition_list: condition */ -#line 631 "yacc_sql.y" +#line 641 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2354 "yacc_sql.cpp" +#line 2366 "yacc_sql.cpp" break; case 82: /* condition_list: condition AND condition_list */ -#line 636 "yacc_sql.y" +#line 646 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2364 "yacc_sql.cpp" +#line 2376 "yacc_sql.cpp" break; case 83: /* condition: rel_attr comp_op value */ -#line 644 "yacc_sql.y" +#line 654 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2376,11 +2388,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2380 "yacc_sql.cpp" +#line 2392 "yacc_sql.cpp" break; case 84: /* condition: value comp_op value */ -#line 656 "yacc_sql.y" +#line 666 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2392,11 +2404,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2396 "yacc_sql.cpp" +#line 2408 "yacc_sql.cpp" break; case 85: /* condition: rel_attr comp_op rel_attr */ -#line 668 "yacc_sql.y" +#line 678 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2408,11 +2420,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2412 "yacc_sql.cpp" +#line 2424 "yacc_sql.cpp" break; case 86: /* condition: value comp_op rel_attr */ -#line 680 "yacc_sql.y" +#line 690 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2424,67 +2436,67 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2428 "yacc_sql.cpp" +#line 2440 "yacc_sql.cpp" break; case 87: /* comp_op: EQ */ -#line 694 "yacc_sql.y" +#line 704 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2434 "yacc_sql.cpp" +#line 2446 "yacc_sql.cpp" break; case 88: /* comp_op: LT */ -#line 695 "yacc_sql.y" +#line 705 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2440 "yacc_sql.cpp" +#line 2452 "yacc_sql.cpp" break; case 89: /* comp_op: GT */ -#line 696 "yacc_sql.y" +#line 706 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2446 "yacc_sql.cpp" +#line 2458 "yacc_sql.cpp" break; case 90: /* comp_op: LE */ -#line 697 "yacc_sql.y" +#line 707 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2452 "yacc_sql.cpp" +#line 2464 "yacc_sql.cpp" break; case 91: /* comp_op: GE */ -#line 698 "yacc_sql.y" +#line 708 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2458 "yacc_sql.cpp" +#line 2470 "yacc_sql.cpp" break; case 92: /* comp_op: NE */ -#line 699 "yacc_sql.y" +#line 709 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2464 "yacc_sql.cpp" +#line 2476 "yacc_sql.cpp" break; case 93: /* comp_op: LIKE */ -#line 700 "yacc_sql.y" +#line 710 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2470 "yacc_sql.cpp" +#line 2482 "yacc_sql.cpp" break; case 94: /* comp_op: NOT LIKE */ -#line 701 "yacc_sql.y" +#line 711 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2476 "yacc_sql.cpp" +#line 2488 "yacc_sql.cpp" break; case 95: /* group_by: %empty */ -#line 707 "yacc_sql.y" +#line 717 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2484 "yacc_sql.cpp" +#line 2496 "yacc_sql.cpp" break; case 96: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 713 "yacc_sql.y" +#line 723 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2494,20 +2506,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2498 "yacc_sql.cpp" +#line 2510 "yacc_sql.cpp" break; case 97: /* explain_stmt: EXPLAIN command_wrapper */ -#line 726 "yacc_sql.y" +#line 736 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2507 "yacc_sql.cpp" +#line 2519 "yacc_sql.cpp" break; case 98: /* set_variable_stmt: SET ID EQ value */ -#line 734 "yacc_sql.y" +#line 744 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2515,11 +2527,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2519 "yacc_sql.cpp" +#line 2531 "yacc_sql.cpp" break; -#line 2523 "yacc_sql.cpp" +#line 2535 "yacc_sql.cpp" default: break; } @@ -2748,7 +2760,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 746 "yacc_sql.y" +#line 756 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 274ac47b..3d26fdf3 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -132,7 +132,7 @@ union YYSTYPE std::vector * value_list; std::vector * condition_list; std::vector * rel_attr_list; - std::vector * relation_list; + std::vector * relation_list; char * string; int number; float floats; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 660a398e..de005834 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -130,7 +130,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, std::vector * value_list; std::vector * condition_list; std::vector * rel_attr_list; - std::vector * relation_list; + std::vector * relation_list; char * string; int number; float floats; @@ -507,7 +507,7 @@ expression_list: if (nullptr != $2) { $1->set_name($2); } - $$->emplace_back($1); + $$->emplace($$->begin(),std::move($1)); free($2); } ; @@ -597,19 +597,29 @@ relation: } ; rel_list: - relation { - $$ = new std::vector(); - $$->push_back($1); + relation alias{ + $$ = new std::vector(); + if(nullptr!=$2){ + $$->emplace_back($1,$2); + free($2); + }else{ + $$->emplace_back($1); + } free($1); } - | relation COMMA rel_list { - if ($3 != nullptr) { - $$ = $3; + | relation alias COMMA rel_list { + if ($4 != nullptr) { + $$ = $4; } else { - $$ = new std::vector; + $$ = new std::vector; + } + if(nullptr!=$2){ + $$->insert($$->begin(), RelationNode($1,$2)); + free($2); + }else{ + $$->insert($$->begin(), RelationNode($1)); } - $$->insert($$->begin(), $1); free($1); } ; diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index a51d9e79..7de017ce 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -43,8 +43,9 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt) // collect tables in `from` statement vector
tables; unordered_map table_map; + unordered_map table_alias_map; for (size_t i = 0; i < select_sql.relations.size(); i++) { - const char *table_name = select_sql.relations[i].c_str(); + const char *table_name = select_sql.relations[i].relation.c_str(); if (nullptr == table_name) { LOG_WARN("invalid argument. relation name is null. index=%d", i); return RC::INVALID_ARGUMENT; @@ -55,16 +56,22 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt) LOG_WARN("no such table. db=%s, table_name=%s", db->name(), table_name); return RC::SCHEMA_TABLE_NOT_EXIST; } + // 建立别名 + const string &table_alias = select_sql.relations[i].alias; + if (!table_alias.empty()) { + table_alias_map[table_alias] = table_name; + } binder_context.add_table(table); tables.push_back(table); table_map.insert({table_name, table}); } + binder_context.add_table_alias_map(table_alias_map); // collect query fields in `select` statement vector> bound_expressions; - ExpressionBinder expression_binder(binder_context); - + ExpressionBinder expression_binder(binder_context); + for (unique_ptr &expression : select_sql.expressions) { RC rc = expression_binder.bind_expression(expression, bound_expressions); if (OB_FAIL(rc)) { @@ -107,6 +114,6 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt) select_stmt->query_expressions_.swap(bound_expressions); select_stmt->filter_stmt_ = filter_stmt; select_stmt->group_by_.swap(group_by_expressions); - stmt = select_stmt; + stmt = select_stmt; return RC::SUCCESS; } From 9306a149ca2efcfe7ed8a60e57041cacb5b47d4e Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 27 Sep 2024 17:27:33 +0800 Subject: [PATCH 043/308] =?UTF-8?q?=E4=B8=8A=E4=BC=A0yacc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/yacc_sql.cpp | 296 ++++++++++++++------------- 1 file changed, 153 insertions(+), 143 deletions(-) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 68086bd9..e815fee5 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -589,7 +589,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 171 +#define YYLAST 172 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 66 @@ -598,7 +598,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 106 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 187 +#define YYNSTATES 188 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 316 @@ -661,9 +661,9 @@ static const yytype_int16 yyrline[] = 440, 444, 448, 454, 460, 463, 470, 482, 497, 522, 531, 540, 555, 558, 561, 564, 567, 571, 574, 579, 585, 588, 595, 598, 601, 606, 614, 620, 625, 635, - 640, 645, 659, 662, 668, 671, 676, 683, 695, 707, - 719, 734, 735, 736, 737, 738, 739, 740, 741, 742, - 743, 749, 754, 767, 775, 785, 786 + 640, 650, 669, 672, 678, 681, 686, 693, 705, 717, + 729, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 759, 764, 777, 785, 795, 796 }; #endif @@ -707,7 +707,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-105) +#define YYPACT_NINF (-104) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -721,25 +721,25 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 72, -1, 2, -8, -8, -44, 8, -105, 11, -16, - -27, -105, -105, -105, -105, -105, -15, 16, 72, 53, - 80, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, 6, 33, 35, 41, -8, -105, -105, -105, -14, - -105, -8, -105, -105, -105, 5, -105, -105, 63, -105, - -105, 43, 44, 66, 55, 69, -105, -105, -105, -105, - 88, 74, -105, 75, -5, -17, 64, -105, 70, -105, - -8, -8, -8, -8, 104, 71, 91, 92, 73, 67, - 76, 78, 79, 81, -105, -105, 112, -105, -105, 18, - 18, -105, -105, -8, -105, 113, 92, 114, 62, -105, - 90, -105, 105, 9, 120, 123, -105, -105, -105, 71, - -105, 67, 109, -25, -25, -105, 106, 67, 136, -105, - -105, -105, -105, -13, 78, 126, 89, -105, -105, 127, - 95, -105, -105, -105, -105, -105, -105, -105, 121, 62, - 62, 62, 92, 93, 96, 124, -105, -105, 120, 107, - 135, 67, 137, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, 138, -105, -105, 115, -105, -105, 127, - -105, 40, 108, -105, -105, 101, -105 + 73, -1, 3, -7, -7, -40, 11, -104, 0, -15, + -25, -104, -104, -104, -104, -104, -11, 1, 73, 54, + 62, -104, -104, -104, -104, -104, -104, -104, -104, -104, + -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, + -104, 22, 25, 46, 53, -7, -104, -104, -104, -13, + -104, -7, -104, -104, -104, 5, -104, -104, 32, -104, + -104, 56, 58, 72, 69, 76, -104, -104, -104, -104, + 100, 80, -104, 81, 14, -16, 65, -104, 66, -104, + -7, -7, -7, -7, 104, 68, 91, 94, 77, -20, + 74, 78, 79, 82, -104, -104, 114, -104, -104, 9, + 9, -104, -104, -7, -104, -2, 94, 119, 51, -104, + 93, -104, 107, 75, 118, 124, -104, -104, -104, 123, + -104, -20, 111, -24, -24, -104, 108, -20, 138, -104, + -104, -104, -104, 63, 78, 128, 92, 68, -104, 130, + 95, -104, -104, -104, -104, -104, -104, -104, 125, 51, + 51, 51, 94, 97, 96, 126, -104, -104, 118, 112, + 133, -104, -20, 137, -104, -104, -104, -104, -104, -104, + -104, -104, -104, -104, 139, -104, -104, 113, -104, -104, + 130, -104, -14, 115, -104, -104, 103, -104 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -757,33 +757,33 @@ static const yytype_int8 yydefact[] = 0, 0, 29, 0, 0, 0, 0, 67, 0, 73, 0, 0, 0, 0, 60, 0, 0, 82, 0, 0, 0, 0, 0, 0, 66, 76, 0, 78, 74, 62, - 63, 64, 65, 0, 79, 80, 82, 0, 84, 56, - 0, 104, 0, 0, 35, 0, 33, 75, 61, 0, + 63, 64, 65, 0, 79, 72, 82, 0, 84, 56, + 0, 104, 0, 0, 35, 0, 33, 75, 61, 80, 101, 0, 77, 0, 0, 83, 85, 0, 0, 43, - 44, 45, 46, 41, 0, 0, 0, 81, 58, 48, + 44, 45, 46, 41, 0, 0, 0, 0, 58, 48, 0, 91, 92, 93, 94, 95, 96, 99, 97, 0, 0, 84, 82, 0, 0, 0, 40, 38, 35, 54, - 0, 0, 0, 100, 98, 88, 90, 87, 89, 86, - 57, 102, 42, 0, 39, 36, 0, 34, 32, 48, - 47, 41, 0, 49, 37, 0, 55 + 0, 81, 0, 0, 100, 98, 88, 90, 87, 89, + 86, 57, 102, 42, 0, 39, 36, 0, 34, 32, + 48, 47, 41, 0, 49, 37, 0, 55 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -105, -105, 143, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, 4, 30, -12, -105, -105, - -105, -11, -88, -105, -105, -105, -105, -105, -4, 29, - -105, -105, -74, -105, 46, -104, 15, -105, 47, -105, - -105, -105, -105, -105 + -104, -104, 145, -104, -104, -104, -104, -104, -104, -104, + -104, -104, -104, -104, -104, 7, 33, -12, -104, -104, + -104, -9, -88, -104, -104, -104, -104, -104, -4, 49, + 61, -104, -91, -104, 31, -103, 18, -104, 48, -104, + -104, -104, -104, -104 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 135, 114, 157, 173, 133, - 33, 162, 53, 177, 34, 35, 36, 37, 54, 55, + 28, 29, 30, 31, 32, 135, 114, 157, 174, 133, + 33, 163, 53, 178, 34, 35, 36, 37, 54, 55, 84, 56, 57, 105, 106, 109, 125, 126, 149, 138, 38, 39, 40, 69 }; @@ -793,46 +793,46 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 58, 111, 120, 45, 95, 140, 75, 154, 41, 78, - 42, 43, 45, 44, 46, 59, 94, 155, 60, 156, - 123, 76, 62, 46, 141, 142, 143, 144, 145, 146, - 147, 148, 63, 139, 124, 129, 130, 131, 132, 152, - 47, 48, 49, 50, 64, 51, 52, 61, 170, 47, - 48, 49, 50, 67, 51, 52, 80, 81, 82, 83, - 65, 165, 167, 123, 79, 70, 80, 81, 82, 83, - 155, 96, 156, 179, 74, 166, 168, 124, 1, 2, - 77, 82, 83, 68, 3, 4, 5, 6, 7, 8, - 9, 10, 71, 46, 72, 11, 12, 13, 46, 118, - 73, 85, 86, 87, 89, 14, 15, 88, 91, 99, - 100, 101, 102, 16, 90, 17, 92, 93, 18, 47, - 48, 122, 50, 97, 47, 48, 103, 50, 107, 98, - 104, 108, 110, 117, 121, 119, 112, 113, 115, 127, - 116, 128, 134, 136, 76, 153, 151, 159, 160, 161, - 163, 164, 171, 172, 176, 174, 178, 185, 180, 181, - 186, 66, 175, 182, 158, 137, 169, 0, 183, 184, - 0, 150 + 58, 111, 78, 120, 45, 95, 140, 75, 41, 78, + 42, 46, 43, 45, 44, 46, 155, 124, 156, 59, + 123, 60, 76, 62, 46, 141, 142, 143, 144, 145, + 146, 147, 148, 139, 63, 94, 61, 47, 48, 152, + 50, 47, 48, 49, 50, 65, 51, 52, 64, 171, + 47, 48, 49, 50, 67, 51, 52, 79, 167, 169, + 124, 166, 168, 123, 79, 68, 80, 81, 82, 83, + 85, 96, 82, 83, 180, 80, 81, 82, 83, 1, + 2, 70, 46, 154, 71, 3, 4, 5, 6, 7, + 8, 9, 10, 155, 74, 156, 11, 12, 13, 118, + 77, 129, 130, 131, 132, 72, 14, 15, 47, 48, + 122, 50, 73, 88, 16, 86, 17, 87, 89, 18, + 91, 90, 92, 93, 97, 98, 103, 104, 107, 99, + 100, 101, 102, 108, 112, 117, 110, 113, 115, 121, + 134, 116, 127, 128, 136, 137, 76, 153, 151, 159, + 164, 160, 162, 173, 179, 165, 172, 175, 181, 177, + 182, 183, 187, 66, 186, 176, 119, 158, 161, 170, + 185, 184, 150 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { - 4, 89, 106, 20, 21, 30, 20, 20, 9, 4, - 11, 9, 20, 11, 31, 59, 21, 30, 10, 32, - 108, 35, 38, 31, 49, 50, 51, 52, 53, 54, - 55, 56, 59, 121, 108, 26, 27, 28, 29, 127, - 57, 58, 59, 60, 59, 62, 63, 36, 152, 57, - 58, 59, 60, 0, 62, 63, 61, 62, 63, 64, - 44, 149, 150, 151, 59, 59, 61, 62, 63, 64, - 30, 75, 32, 161, 45, 149, 150, 151, 6, 7, - 51, 63, 64, 3, 12, 13, 14, 15, 16, 17, - 18, 19, 59, 31, 59, 23, 24, 25, 31, 103, - 59, 38, 59, 59, 49, 33, 34, 41, 20, 80, - 81, 82, 83, 41, 45, 43, 42, 42, 46, 57, - 58, 59, 60, 59, 57, 58, 22, 60, 37, 59, - 59, 39, 59, 21, 20, 22, 60, 59, 59, 49, - 59, 36, 22, 20, 35, 9, 40, 21, 59, 22, - 55, 30, 59, 57, 47, 31, 21, 49, 21, 21, - 59, 18, 158, 48, 134, 119, 151, -1, 179, 181, - -1, 124 + 4, 89, 4, 106, 20, 21, 30, 20, 9, 4, + 11, 31, 9, 20, 11, 31, 30, 108, 32, 59, + 108, 10, 35, 38, 31, 49, 50, 51, 52, 53, + 54, 55, 56, 121, 59, 21, 36, 57, 58, 127, + 60, 57, 58, 59, 60, 44, 62, 63, 59, 152, + 57, 58, 59, 60, 0, 62, 63, 59, 149, 150, + 151, 149, 150, 151, 59, 3, 61, 62, 63, 64, + 38, 75, 63, 64, 162, 61, 62, 63, 64, 6, + 7, 59, 31, 20, 59, 12, 13, 14, 15, 16, + 17, 18, 19, 30, 45, 32, 23, 24, 25, 103, + 51, 26, 27, 28, 29, 59, 33, 34, 57, 58, + 59, 60, 59, 41, 41, 59, 43, 59, 49, 46, + 20, 45, 42, 42, 59, 59, 22, 59, 37, 80, + 81, 82, 83, 39, 60, 21, 59, 59, 59, 20, + 22, 59, 49, 36, 20, 22, 35, 9, 40, 21, + 55, 59, 22, 57, 21, 30, 59, 31, 21, 47, + 21, 48, 59, 18, 49, 158, 105, 134, 137, 151, + 182, 180, 124 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -850,14 +850,14 @@ static const yytype_int8 yystos[] = 61, 62, 63, 64, 96, 38, 59, 59, 41, 49, 45, 20, 42, 42, 21, 21, 94, 59, 59, 95, 95, 95, 95, 22, 59, 99, 100, 37, 39, 101, - 59, 88, 60, 59, 82, 59, 59, 21, 94, 22, + 59, 88, 60, 59, 82, 59, 59, 21, 94, 96, 101, 20, 59, 88, 98, 102, 103, 49, 36, 26, - 27, 28, 29, 85, 22, 81, 20, 100, 105, 88, + 27, 28, 29, 85, 22, 81, 20, 22, 105, 88, 30, 49, 50, 51, 52, 53, 54, 55, 56, 104, 104, 40, 88, 9, 20, 30, 32, 83, 82, 21, - 59, 22, 87, 55, 30, 88, 98, 88, 98, 102, - 101, 59, 57, 84, 31, 81, 47, 89, 21, 88, - 21, 21, 48, 87, 83, 49, 59 + 59, 100, 22, 87, 55, 30, 88, 98, 88, 98, + 102, 101, 59, 57, 84, 31, 81, 47, 89, 21, + 88, 21, 21, 48, 87, 83, 49, 59 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -887,7 +887,7 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 0, 4, 4, 7, 6, 2, 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, - 1, 3, 0, 2, 0, 1, 3, 3, 3, 3, + 2, 4, 0, 2, 0, 1, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 0, 7, 2, 4, 0, 1 }; @@ -2188,7 +2188,7 @@ YYLTYPE yylloc = yyloc_default; if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace_back((yyvsp[-3].expression)); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } #line 2195 "yacc_sql.cpp" @@ -2354,77 +2354,87 @@ YYLTYPE yylloc = yyloc_default; #line 2355 "yacc_sql.cpp" break; - case 80: /* rel_list: relation */ + case 80: /* rel_list: relation alias */ #line 640 "yacc_sql.y" - { - (yyval.relation_list) = new std::vector(); - (yyval.relation_list)->push_back((yyvsp[0].string)); - free((yyvsp[0].string)); + { + (yyval.relation_list) = new std::vector(); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); + free((yyvsp[0].string)); + }else{ + (yyval.relation_list)->emplace_back((yyvsp[-1].string)); + } + free((yyvsp[-1].string)); } -#line 2365 "yacc_sql.cpp" +#line 2370 "yacc_sql.cpp" break; - case 81: /* rel_list: relation COMMA rel_list */ -#line 645 "yacc_sql.y" - { + case 81: /* rel_list: relation alias COMMA rel_list */ +#line 650 "yacc_sql.y" + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { - (yyval.relation_list) = new std::vector; + (yyval.relation_list) = new std::vector; + } + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); + free((yyvsp[-2].string)); + }else{ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } - (yyval.relation_list)->insert((yyval.relation_list)->begin(), (yyvsp[-2].string)); - free((yyvsp[-2].string)); + free((yyvsp[-3].string)); } -#line 2380 "yacc_sql.cpp" +#line 2390 "yacc_sql.cpp" break; case 82: /* where: %empty */ -#line 659 "yacc_sql.y" +#line 669 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2388 "yacc_sql.cpp" +#line 2398 "yacc_sql.cpp" break; case 83: /* where: WHERE condition_list */ -#line 662 "yacc_sql.y" +#line 672 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2396 "yacc_sql.cpp" +#line 2406 "yacc_sql.cpp" break; case 84: /* condition_list: %empty */ -#line 668 "yacc_sql.y" +#line 678 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2404 "yacc_sql.cpp" +#line 2414 "yacc_sql.cpp" break; case 85: /* condition_list: condition */ -#line 671 "yacc_sql.y" +#line 681 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2414 "yacc_sql.cpp" +#line 2424 "yacc_sql.cpp" break; case 86: /* condition_list: condition AND condition_list */ -#line 676 "yacc_sql.y" +#line 686 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2424 "yacc_sql.cpp" +#line 2434 "yacc_sql.cpp" break; case 87: /* condition: rel_attr comp_op value */ -#line 684 "yacc_sql.y" +#line 694 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2436,11 +2446,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2440 "yacc_sql.cpp" +#line 2450 "yacc_sql.cpp" break; case 88: /* condition: value comp_op value */ -#line 696 "yacc_sql.y" +#line 706 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2452,11 +2462,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2456 "yacc_sql.cpp" +#line 2466 "yacc_sql.cpp" break; case 89: /* condition: rel_attr comp_op rel_attr */ -#line 708 "yacc_sql.y" +#line 718 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2468,11 +2478,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2472 "yacc_sql.cpp" +#line 2482 "yacc_sql.cpp" break; case 90: /* condition: value comp_op rel_attr */ -#line 720 "yacc_sql.y" +#line 730 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2484,79 +2494,79 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2488 "yacc_sql.cpp" +#line 2498 "yacc_sql.cpp" break; case 91: /* comp_op: EQ */ -#line 734 "yacc_sql.y" +#line 744 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2494 "yacc_sql.cpp" +#line 2504 "yacc_sql.cpp" break; case 92: /* comp_op: LT */ -#line 735 "yacc_sql.y" +#line 745 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2500 "yacc_sql.cpp" +#line 2510 "yacc_sql.cpp" break; case 93: /* comp_op: GT */ -#line 736 "yacc_sql.y" +#line 746 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2506 "yacc_sql.cpp" +#line 2516 "yacc_sql.cpp" break; case 94: /* comp_op: LE */ -#line 737 "yacc_sql.y" +#line 747 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2512 "yacc_sql.cpp" +#line 2522 "yacc_sql.cpp" break; case 95: /* comp_op: GE */ -#line 738 "yacc_sql.y" +#line 748 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2518 "yacc_sql.cpp" +#line 2528 "yacc_sql.cpp" break; case 96: /* comp_op: NE */ -#line 739 "yacc_sql.y" +#line 749 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2524 "yacc_sql.cpp" +#line 2534 "yacc_sql.cpp" break; case 97: /* comp_op: IS */ -#line 740 "yacc_sql.y" +#line 750 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2530 "yacc_sql.cpp" +#line 2540 "yacc_sql.cpp" break; case 98: /* comp_op: IS NOT */ -#line 741 "yacc_sql.y" +#line 751 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2536 "yacc_sql.cpp" +#line 2546 "yacc_sql.cpp" break; case 99: /* comp_op: LIKE */ -#line 742 "yacc_sql.y" +#line 752 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2542 "yacc_sql.cpp" +#line 2552 "yacc_sql.cpp" break; case 100: /* comp_op: NOT LIKE */ -#line 743 "yacc_sql.y" +#line 753 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2548 "yacc_sql.cpp" +#line 2558 "yacc_sql.cpp" break; case 101: /* group_by: %empty */ -#line 749 "yacc_sql.y" +#line 759 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2556 "yacc_sql.cpp" +#line 2566 "yacc_sql.cpp" break; case 102: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 755 "yacc_sql.y" +#line 765 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2566,20 +2576,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2570 "yacc_sql.cpp" +#line 2580 "yacc_sql.cpp" break; case 103: /* explain_stmt: EXPLAIN command_wrapper */ -#line 768 "yacc_sql.y" +#line 778 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2579 "yacc_sql.cpp" +#line 2589 "yacc_sql.cpp" break; case 104: /* set_variable_stmt: SET ID EQ value */ -#line 776 "yacc_sql.y" +#line 786 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2587,11 +2597,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2591 "yacc_sql.cpp" +#line 2601 "yacc_sql.cpp" break; -#line 2595 "yacc_sql.cpp" +#line 2605 "yacc_sql.cpp" default: break; } @@ -2820,7 +2830,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 788 "yacc_sql.y" +#line 798 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); From d39e335d39dd42e5b946559251974bd6d6e8d0f3 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 27 Sep 2024 17:56:58 +0800 Subject: [PATCH 044/308] #SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0ee6546..f562437f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,6 @@ project(minidb) MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) -SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) - SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) #SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) From 917e40d8ab417237131594cd9627f0bce9f4ba13 Mon Sep 17 00:00:00 2001 From: Koschei Date: Fri, 27 Sep 2024 22:31:12 +0800 Subject: [PATCH 045/308] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=97=B6=E5=A4=9A=E8=A1=A8=E8=BE=93=E5=87=BA=E8=A1=A8?= =?UTF-8?q?=E5=90=8D=EF=BC=8C=E6=94=AF=E6=8C=81=20join=20on=20=E7=9A=84?= =?UTF-8?q?=E5=A4=9A=E8=B0=93=E8=AF=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/net/sql_task_handler.cpp | 2 +- src/observer/sql/executor/sql_result.cpp | 1 + src/observer/sql/expr/expression.h | 3 +- .../operator/project_physical_operator.cpp | 8 +- src/observer/sql/parser/expression_binder.cpp | 45 ++- src/observer/sql/parser/expression_binder.h | 8 +- src/observer/sql/parser/parse_defs.h | 4 +- src/observer/sql/parser/yacc_sql.cpp | 318 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 12 +- src/observer/sql/stmt/select_stmt.cpp | 2 +- 10 files changed, 223 insertions(+), 180 deletions(-) diff --git a/src/observer/net/sql_task_handler.cpp b/src/observer/net/sql_task_handler.cpp index 90f0609b..52ee938a 100644 --- a/src/observer/net/sql_task_handler.cpp +++ b/src/observer/net/sql_task_handler.cpp @@ -88,4 +88,4 @@ RC SqlTaskHandler::handle_sql(SQLStageEvent *sql_event) } return rc; -} \ No newline at end of file +} diff --git a/src/observer/sql/executor/sql_result.cpp b/src/observer/sql/executor/sql_result.cpp index a8b1b855..11ca7eb6 100644 --- a/src/observer/sql/executor/sql_result.cpp +++ b/src/observer/sql/executor/sql_result.cpp @@ -79,5 +79,6 @@ void SqlResult::set_operator(std::unique_ptr oper) { ASSERT(operator_ == nullptr, "current operator is not null. Result is not closed?"); operator_ = std::move(oper); + // 这里调用了投影算子的方法,补充表头 operator_->tuple_schema(tuple_schema_); } diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 5c66a10f..a6fb2d4f 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -16,6 +16,7 @@ See the Mulan PSL v2 for more details. */ #include #include +#include #include "common/value.h" #include "storage/field/field.h" @@ -109,7 +110,7 @@ class Expression * @brief 表达式的名字,比如是字段名称,或者用户在执行SQL语句时输入的内容 */ virtual const char *name() const { return name_.c_str(); } - virtual void set_name(std::string name) { name_ = name; } + virtual void set_name(std::string name) { name_ = std::move(name); } /** * @brief 表达式在下层算子返回的 chunk 中的位置 diff --git a/src/observer/sql/operator/project_physical_operator.cpp b/src/observer/sql/operator/project_physical_operator.cpp index 9c06125b..b3242de5 100644 --- a/src/observer/sql/operator/project_physical_operator.cpp +++ b/src/observer/sql/operator/project_physical_operator.cpp @@ -20,9 +20,8 @@ See the Mulan PSL v2 for more details. */ using namespace std; ProjectPhysicalOperator::ProjectPhysicalOperator(vector> &&expressions) - : expressions_(std::move(expressions)), tuple_(expressions_) -{ -} + : expressions_(std::move(expressions)), tuple_(expressions_) +{} RC ProjectPhysicalOperator::open(Trx *trx) { @@ -55,6 +54,7 @@ RC ProjectPhysicalOperator::close() } return RC::SUCCESS; } + Tuple *ProjectPhysicalOperator::current_tuple() { tuple_.set_tuple(children_[0]->current_tuple()); @@ -67,4 +67,4 @@ RC ProjectPhysicalOperator::tuple_schema(TupleSchema &schema) const schema.append_cell(expression->name()); } return RC::SUCCESS; -} \ No newline at end of file +} diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 331f31b2..3b126821 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -33,14 +33,27 @@ Table *BinderContext::find_table(const char *table_name) const } //////////////////////////////////////////////////////////////////////////////// -static void wildcard_fields(Table *table, vector> &expressions) +static void wildcard_fields(Table *table, vector> &expressions, bool multi_tables = false) { const TableMeta &table_meta = table->table_meta(); const int field_num = table_meta.field_num(); for (int i = table_meta.sys_field_num(); i < field_num; i++) { Field field(table, table_meta.field(i)); FieldExpr *field_expr = new FieldExpr(field); - field_expr->set_name(field.field_name()); + // 这里设置了基类的 name 属性 + if (multi_tables) { + // 多表查询带表名 + auto table_name = field_expr->table_name(); + auto field_name = field_expr->field_name(); + // 创建一个字符数组来存储合并后的字符串 + char result[256]; + // 使用 snprintf 合并字符串 + snprintf(result, sizeof(result), "%s.%s", table_name, field_name); + field_expr->set_name(result); + } else { + // 单表查询不带表名 + field_expr->set_name(field.field_name()); + } expressions.emplace_back(field_expr); } } @@ -126,7 +139,7 @@ RC ExpressionBinder::bind_star_expression( } for (Table *table : tables_to_wildcard) { - wildcard_fields(table, bound_expressions); + wildcard_fields(table, bound_expressions, multi_tables_); } return RC::SUCCESS; @@ -161,7 +174,7 @@ RC ExpressionBinder::bind_unbound_field_expression( } if (0 == strcmp(field_name, "*")) { - wildcard_fields(table, bound_expressions); + wildcard_fields(table, bound_expressions, multi_tables_); } else { const FieldMeta *field_meta = table->table_meta().field(field_name); if (nullptr == field_meta) { @@ -171,7 +184,17 @@ RC ExpressionBinder::bind_unbound_field_expression( Field field(table, field_meta); FieldExpr *field_expr = new FieldExpr(field); - field_expr->set_name(field_name); + // 这里设置了基类的 name 属性 + if (multi_tables_) { + // 创建一个字符数组来存储合并后的字符串 + char result[256]; + // 使用 snprintf 合并字符串 + snprintf(result, sizeof(result), "%s.%s", table_name, field_name); + field_expr->set_name(result); + } else { + // 单表查询不带表名 + field_expr->set_name(field_name); + } bound_expressions.emplace_back(field_expr); } @@ -181,6 +204,18 @@ RC ExpressionBinder::bind_unbound_field_expression( RC ExpressionBinder::bind_field_expression( unique_ptr &field_expr, vector> &bound_expressions) { + auto field = static_cast(field_expr.get()); + // 这里设置了基类的 name 属性 + if (multi_tables_) { + // 多表查询带表名 + auto table_name = field->table_name(); + auto field_name = field->field_name(); + // 创建一个字符数组来存储合并后的字符串 + char result[256]; + // 使用 snprintf 合并字符串 + snprintf(result, sizeof(result), "%s.%s", table_name, field_name); + field_expr->set_name(result); + } bound_expressions.emplace_back(std::move(field_expr)); return RC::SUCCESS; } diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index d52f049c..8d662028 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -21,7 +21,7 @@ See the Mulan PSL v2 for more details. */ class BinderContext { public: - BinderContext() = default; + BinderContext() = default; virtual ~BinderContext() = default; void add_table(Table *table) { query_tables_.push_back(table); } @@ -41,7 +41,8 @@ class BinderContext class ExpressionBinder { public: - ExpressionBinder(BinderContext &context) : context_(context) {} + ExpressionBinder(BinderContext &context) : context_(context) { multi_tables_ = context_.query_tables().size() > 1; } + virtual ~ExpressionBinder() = default; RC bind_expression(std::unique_ptr &expr, std::vector> &bound_expressions); @@ -67,5 +68,6 @@ class ExpressionBinder std::unique_ptr &aggregate_expr, std::vector> &bound_expressions); private: + bool multi_tables_; BinderContext &context_; -}; \ No newline at end of file +}; diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 1a2ec1d2..297a67c6 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -100,8 +100,8 @@ struct SelectSqlNode */ struct JoinSqlNode { - std::string relation; ///< 查询的表 - ConditionSqlNode condition; ///< 查询条件 + std::string relation; ///< 查询的表 + std::vector conditions; ///< 查询条件,可能有多个 }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 20b6a8dd..2ed8cbc3 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -587,7 +587,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 168 +#define YYLAST 167 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 62 @@ -656,12 +656,12 @@ static const yytype_int16 yyrline[] = 225, 226, 227, 231, 237, 242, 248, 254, 260, 266, 273, 279, 287, 301, 311, 335, 338, 351, 359, 369, 372, 373, 374, 375, 378, 395, 398, 409, 413, 417, - 426, 429, 436, 449, 464, 470, 478, 488, 511, 545, - 554, 559, 570, 573, 576, 579, 582, 586, 589, 594, - 600, 603, 609, 617, 623, 628, 638, 644, 650, 658, - 669, 675, 685, 688, 694, 697, 702, 709, 721, 733, - 745, 760, 761, 762, 763, 764, 765, 771, 776, 789, - 797, 807, 808 + 426, 429, 436, 449, 464, 470, 478, 488, 511, 547, + 556, 561, 572, 575, 578, 581, 584, 588, 591, 596, + 602, 605, 611, 619, 625, 630, 640, 646, 652, 660, + 671, 677, 687, 690, 696, 699, 704, 711, 723, 735, + 747, 762, 763, 764, 765, 766, 767, 773, 778, 791, + 799, 809, 810 }; #endif @@ -705,7 +705,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-104) +#define YYPACT_NINF (-144) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -719,25 +719,25 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 78, 2, 21, 11, 11, -48, 6, -104, -21, 4, - -27, -104, -104, -104, -104, -104, -23, 28, 78, 73, - 79, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, 30, 32, 42, 43, 11, -104, -104, -10, -104, - 11, -104, -104, -104, -17, -104, -104, 65, -104, -104, - 58, 59, 49, 69, 64, -104, -104, -104, -104, 99, - 81, -104, 83, -3, -6, 67, -104, 11, 11, 11, - 11, 11, 68, 91, 90, 71, 50, 72, 74, 75, - 76, -104, -104, 107, -104, -104, -1, -1, -104, -104, - -104, 87, -16, 114, -19, -104, 88, -15, -104, -104, - 102, 52, 115, 118, -104, -104, 92, 68, -104, 50, - 108, -25, -25, -104, 104, 50, 71, -104, 133, -104, - -104, -104, -104, 123, 74, 124, 93, 68, -104, -104, - 122, -104, -104, -104, -104, -104, -104, -19, -19, -19, - -104, -104, 94, 97, 115, 103, 125, 109, 106, 90, - 50, 132, -104, -104, -104, -104, -104, -104, -104, 134, - -104, 111, -104, -104, -19, 110, -104, 122, -104, -104, - 112, -104, 68, -104, -104, 98, -104, -104 + 78, 1, 77, 11, 11, -43, 6, -144, -12, -5, + -23, -144, -144, -144, -144, -144, 13, 33, 78, 38, + 79, -144, -144, -144, -144, -144, -144, -144, -144, -144, + -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, + -144, 42, 43, 44, 58, 11, -144, -144, -9, -144, + 11, -144, -144, -144, -17, -144, -144, 71, -144, -144, + 59, 61, 49, 72, 80, -144, -144, -144, -144, 99, + 84, -144, 85, -3, -6, 69, -144, 11, 11, 11, + 11, 11, 70, 93, 92, 73, 50, 74, 76, 81, + 82, -144, -144, 109, -144, -144, -1, -1, -144, -144, + -144, 87, -16, 114, -19, -144, 88, -14, -144, -144, + 102, 52, 117, 120, -144, -144, 94, 70, -144, 50, + 110, -24, -24, -144, 106, 50, 73, -144, 135, -144, + -144, -144, -144, 125, 76, 126, 90, 70, -144, -144, + 127, -144, -144, -144, -144, -144, -144, -19, -19, -19, + -144, -144, 95, 96, 117, 104, 131, 115, 107, 92, + 50, 134, -144, -144, -144, -144, -144, -144, -144, 136, + -144, 111, -144, -144, -19, 112, -144, 127, -144, -144, + 113, -144, 70, -144, -144, 108, -144, -144 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -762,18 +762,18 @@ static const yytype_int8 yydefact[] = 45, 91, 92, 93, 94, 95, 96, 0, 0, 84, 56, 55, 0, 0, 35, 50, 0, 0, 80, 82, 0, 0, 88, 90, 87, 89, 86, 98, 39, 0, - 36, 0, 34, 32, 0, 0, 97, 45, 44, 37, + 36, 0, 34, 32, 84, 0, 97, 45, 44, 37, 0, 79, 0, 58, 46, 0, 81, 51 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -104, -104, 139, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, 7, 24, -104, -104, -104, - -14, -86, -104, -104, -104, -104, 34, -104, -104, -2, - 31, -104, -103, -66, -104, -104, -20, -99, 15, -9, - 44, -8, -104, -104, -104, -104 + -144, -144, 139, -144, -144, -144, -144, -144, -144, -144, + -144, -144, -144, -144, -144, 5, 27, -144, -144, -144, + -15, -86, -144, -144, -144, -144, 39, -144, -144, -2, + 31, -144, -103, -66, -144, -144, -18, -99, -143, -144, + 45, -10, -144, -144, -144, -144 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -791,44 +791,44 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 109, 122, 57, 118, 77, 117, 126, 58, 127, 74, - 41, 60, 42, 45, 92, 59, 101, 91, 121, 104, - 104, 75, 141, 142, 143, 144, 145, 146, 62, 43, - 45, 44, 63, 140, 46, 47, 120, 49, 61, 150, + 109, 122, 57, 118, 77, 117, 166, 126, 127, 41, + 74, 42, 58, 45, 92, 59, 101, 91, 121, 104, + 60, 104, 75, 141, 142, 143, 144, 145, 146, 61, + 45, 181, 62, 140, 46, 47, 120, 49, 66, 150, 78, 79, 80, 81, 163, 165, 122, 46, 47, 48, 49, 138, 50, 51, 78, 79, 80, 81, 80, 81, - 176, 162, 164, 121, 46, 47, 48, 49, 64, 50, - 51, 122, 93, 66, 177, 95, 73, 129, 130, 131, - 132, 76, 67, 1, 2, 69, 85, 70, 121, 3, - 4, 5, 6, 7, 8, 9, 10, 71, 72, 82, - 11, 12, 13, 46, 47, 87, 49, 14, 15, 96, - 97, 98, 99, 83, 84, 16, 86, 17, 88, 89, - 18, 90, 94, 100, 103, 104, 106, 115, 110, 111, - 113, 114, 116, 119, 128, 125, 134, 136, 137, 75, - 149, 152, 153, 160, 155, 173, 171, 174, 156, 167, - 168, 175, 178, 187, 179, 180, 182, 65, 154, 185, - 151, 170, 186, 184, 166, 181, 148, 0, 183 + 176, 162, 164, 121, 46, 47, 48, 49, 63, 50, + 51, 122, 93, 64, 177, 95, 73, 129, 130, 131, + 132, 76, 67, 1, 2, 43, 85, 44, 121, 3, + 4, 5, 6, 7, 8, 9, 10, 69, 70, 71, + 11, 12, 13, 46, 47, 82, 49, 14, 15, 96, + 97, 98, 99, 72, 83, 16, 84, 17, 88, 86, + 18, 87, 89, 90, 94, 100, 103, 104, 106, 115, + 110, 111, 116, 119, 128, 125, 113, 114, 134, 136, + 137, 75, 149, 152, 153, 156, 155, 171, 160, 168, + 167, 173, 175, 174, 178, 180, 179, 65, 182, 170, + 185, 154, 184, 187, 186, 151, 183, 148 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { - 86, 104, 4, 102, 21, 21, 21, 55, 107, 19, - 8, 32, 10, 19, 20, 9, 82, 20, 104, 35, - 35, 31, 47, 48, 49, 50, 51, 52, 55, 8, - 19, 10, 55, 119, 53, 54, 55, 56, 34, 125, + 86, 104, 4, 102, 21, 21, 149, 21, 107, 8, + 19, 10, 55, 19, 20, 9, 82, 20, 104, 35, + 32, 35, 31, 47, 48, 49, 50, 51, 52, 34, + 19, 174, 55, 119, 53, 54, 55, 56, 0, 125, 57, 58, 59, 60, 147, 148, 149, 53, 54, 55, 56, 117, 58, 59, 57, 58, 59, 60, 59, 60, - 159, 147, 148, 149, 53, 54, 55, 56, 40, 58, - 59, 174, 74, 0, 160, 77, 45, 25, 26, 27, - 28, 50, 3, 5, 6, 55, 37, 55, 174, 11, - 12, 13, 14, 15, 16, 17, 18, 55, 55, 34, - 22, 23, 24, 53, 54, 41, 56, 29, 30, 78, - 79, 80, 81, 55, 55, 37, 47, 39, 19, 38, - 42, 38, 55, 55, 33, 35, 55, 20, 56, 55, - 55, 55, 45, 19, 32, 47, 21, 19, 46, 31, - 36, 8, 19, 21, 20, 20, 43, 38, 55, 55, - 53, 45, 20, 55, 20, 44, 46, 18, 134, 47, - 126, 154, 182, 177, 149, 174, 122, -1, 176 + 159, 147, 148, 149, 53, 54, 55, 56, 55, 58, + 59, 174, 74, 40, 160, 77, 45, 25, 26, 27, + 28, 50, 3, 5, 6, 8, 37, 10, 174, 11, + 12, 13, 14, 15, 16, 17, 18, 55, 55, 55, + 22, 23, 24, 53, 54, 34, 56, 29, 30, 78, + 79, 80, 81, 55, 55, 37, 55, 39, 19, 47, + 42, 41, 38, 38, 55, 55, 33, 35, 55, 20, + 56, 55, 45, 19, 32, 47, 55, 55, 21, 19, + 46, 31, 36, 8, 19, 55, 20, 43, 21, 53, + 55, 20, 45, 38, 20, 44, 20, 18, 46, 154, + 47, 134, 177, 55, 182, 126, 176, 122 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -853,7 +853,7 @@ static const yytype_int8 yystos[] = 83, 88, 8, 19, 78, 20, 55, 95, 97, 98, 21, 82, 83, 94, 83, 94, 100, 55, 53, 79, 77, 43, 84, 20, 38, 45, 99, 83, 20, 20, - 44, 101, 46, 103, 82, 47, 98, 55 + 44, 100, 46, 103, 82, 47, 98, 55 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -2151,9 +2151,11 @@ YYLTYPE yylloc = yyloc_default; } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto &join : *(yyvsp[-2].join_clauses)) { - (yyval.sql_node)->selection.relations.emplace_back(join.relation); - (yyval.sql_node)->selection.conditions.emplace_back(join.condition); + for (auto it = (yyvsp[-2].join_clauses)->rbegin(); it != (yyvsp[-2].join_clauses)->rend(); ++it) { + (yyval.sql_node)->selection.relations.emplace_back(it->relation); + for (auto &condition : it->conditions) { + (yyval.sql_node)->selection.conditions.emplace_back(condition); + } } delete (yyvsp[-2].join_clauses); } @@ -2163,30 +2165,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2167 "yacc_sql.cpp" +#line 2169 "yacc_sql.cpp" break; case 59: /* calc_stmt: CALC expression_list */ -#line 546 "yacc_sql.y" +#line 548 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2177 "yacc_sql.cpp" +#line 2179 "yacc_sql.cpp" break; case 60: /* expression_list: expression */ -#line 555 "yacc_sql.y" +#line 557 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2186 "yacc_sql.cpp" +#line 2188 "yacc_sql.cpp" break; case 61: /* expression_list: expression COMMA expression_list */ -#line 560 "yacc_sql.y" +#line 562 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2195,97 +2197,97 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2199 "yacc_sql.cpp" +#line 2201 "yacc_sql.cpp" break; case 62: /* expression: expression '+' expression */ -#line 570 "yacc_sql.y" +#line 572 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2207 "yacc_sql.cpp" +#line 2209 "yacc_sql.cpp" break; case 63: /* expression: expression '-' expression */ -#line 573 "yacc_sql.y" +#line 575 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2215 "yacc_sql.cpp" +#line 2217 "yacc_sql.cpp" break; case 64: /* expression: expression '*' expression */ -#line 576 "yacc_sql.y" +#line 578 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2223 "yacc_sql.cpp" +#line 2225 "yacc_sql.cpp" break; case 65: /* expression: expression '/' expression */ -#line 579 "yacc_sql.y" +#line 581 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2231 "yacc_sql.cpp" +#line 2233 "yacc_sql.cpp" break; case 66: /* expression: LBRACE expression RBRACE */ -#line 582 "yacc_sql.y" +#line 584 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2240 "yacc_sql.cpp" +#line 2242 "yacc_sql.cpp" break; case 67: /* expression: '-' expression */ -#line 586 "yacc_sql.y" +#line 588 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2248 "yacc_sql.cpp" +#line 2250 "yacc_sql.cpp" break; case 68: /* expression: value */ -#line 589 "yacc_sql.y" +#line 591 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2258 "yacc_sql.cpp" +#line 2260 "yacc_sql.cpp" break; case 69: /* expression: rel_attr */ -#line 594 "yacc_sql.y" +#line 596 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2269 "yacc_sql.cpp" +#line 2271 "yacc_sql.cpp" break; case 70: /* expression: '*' */ -#line 600 "yacc_sql.y" +#line 602 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2277 "yacc_sql.cpp" +#line 2279 "yacc_sql.cpp" break; case 71: /* expression: aggr_func_expr */ -#line 603 "yacc_sql.y" +#line 605 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2285 "yacc_sql.cpp" +#line 2287 "yacc_sql.cpp" break; case 72: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 610 "yacc_sql.y" +#line 612 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2293,29 +2295,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2297 "yacc_sql.cpp" +#line 2299 "yacc_sql.cpp" break; case 73: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 618 "yacc_sql.y" +#line 620 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2305 "yacc_sql.cpp" +#line 2307 "yacc_sql.cpp" break; case 74: /* rel_attr: ID */ -#line 623 "yacc_sql.y" +#line 625 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2315 "yacc_sql.cpp" +#line 2317 "yacc_sql.cpp" break; case 75: /* rel_attr: ID DOT ID */ -#line 628 "yacc_sql.y" +#line 630 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2323,114 +2325,114 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2327 "yacc_sql.cpp" +#line 2329 "yacc_sql.cpp" break; case 76: /* relation: ID */ -#line 638 "yacc_sql.y" +#line 640 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2335 "yacc_sql.cpp" +#line 2337 "yacc_sql.cpp" break; case 77: /* rel_list: relation */ -#line 645 "yacc_sql.y" +#line 647 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->emplace_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2345 "yacc_sql.cpp" +#line 2347 "yacc_sql.cpp" break; case 78: /* rel_list: rel_list COMMA relation */ -#line 651 "yacc_sql.y" +#line 653 "yacc_sql.y" { (yyval.relation_list)->emplace_back((yyvsp[0].string)); delete (yyvsp[0].string); } -#line 2354 "yacc_sql.cpp" +#line 2356 "yacc_sql.cpp" break; - case 79: /* joinClause: relation ON condition */ -#line 659 "yacc_sql.y" + case 79: /* joinClause: relation ON condition_list */ +#line 661 "yacc_sql.y" { (yyval.join_clause) = new JoinSqlNode; (yyval.join_clause)->relation = (yyvsp[-2].string); - (yyval.join_clause)->condition = *(yyvsp[0].condition); + (yyval.join_clause)->conditions.swap(*(yyvsp[0].condition_list)); free((yyvsp[-2].string)); - delete (yyvsp[0].condition); + delete (yyvsp[0].condition_list); } -#line 2366 "yacc_sql.cpp" +#line 2368 "yacc_sql.cpp" break; case 80: /* joinClauses: joinClause */ -#line 670 "yacc_sql.y" +#line 672 "yacc_sql.y" { (yyval.join_clauses) = new std::vector; (yyval.join_clauses)->emplace_back(*(yyvsp[0].join_clause)); delete (yyvsp[0].join_clause); } -#line 2376 "yacc_sql.cpp" +#line 2378 "yacc_sql.cpp" break; case 81: /* joinClauses: joinClause INNER JOIN joinClauses */ -#line 676 "yacc_sql.y" +#line 678 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->emplace_back(*(yyvsp[-3].join_clause)); delete (yyvsp[-3].join_clause); } -#line 2386 "yacc_sql.cpp" +#line 2388 "yacc_sql.cpp" break; case 82: /* where: %empty */ -#line 685 "yacc_sql.y" +#line 687 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2394 "yacc_sql.cpp" +#line 2396 "yacc_sql.cpp" break; case 83: /* where: WHERE condition_list */ -#line 688 "yacc_sql.y" +#line 690 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2402 "yacc_sql.cpp" +#line 2404 "yacc_sql.cpp" break; case 84: /* condition_list: %empty */ -#line 694 "yacc_sql.y" +#line 696 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2410 "yacc_sql.cpp" +#line 2412 "yacc_sql.cpp" break; case 85: /* condition_list: condition */ -#line 697 "yacc_sql.y" +#line 699 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2420 "yacc_sql.cpp" +#line 2422 "yacc_sql.cpp" break; case 86: /* condition_list: condition AND condition_list */ -#line 702 "yacc_sql.y" +#line 704 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2430 "yacc_sql.cpp" +#line 2432 "yacc_sql.cpp" break; case 87: /* condition: rel_attr comp_op value */ -#line 710 "yacc_sql.y" +#line 712 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2442,11 +2444,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2446 "yacc_sql.cpp" +#line 2448 "yacc_sql.cpp" break; case 88: /* condition: value comp_op value */ -#line 722 "yacc_sql.y" +#line 724 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2458,11 +2460,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2462 "yacc_sql.cpp" +#line 2464 "yacc_sql.cpp" break; case 89: /* condition: rel_attr comp_op rel_attr */ -#line 734 "yacc_sql.y" +#line 736 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2474,11 +2476,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2478 "yacc_sql.cpp" +#line 2480 "yacc_sql.cpp" break; case 90: /* condition: value comp_op rel_attr */ -#line 746 "yacc_sql.y" +#line 748 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2490,55 +2492,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2494 "yacc_sql.cpp" +#line 2496 "yacc_sql.cpp" break; case 91: /* comp_op: EQ */ -#line 760 "yacc_sql.y" +#line 762 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2500 "yacc_sql.cpp" +#line 2502 "yacc_sql.cpp" break; case 92: /* comp_op: LT */ -#line 761 "yacc_sql.y" +#line 763 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2506 "yacc_sql.cpp" +#line 2508 "yacc_sql.cpp" break; case 93: /* comp_op: GT */ -#line 762 "yacc_sql.y" +#line 764 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2512 "yacc_sql.cpp" +#line 2514 "yacc_sql.cpp" break; case 94: /* comp_op: LE */ -#line 763 "yacc_sql.y" +#line 765 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2518 "yacc_sql.cpp" +#line 2520 "yacc_sql.cpp" break; case 95: /* comp_op: GE */ -#line 764 "yacc_sql.y" +#line 766 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2524 "yacc_sql.cpp" +#line 2526 "yacc_sql.cpp" break; case 96: /* comp_op: NE */ -#line 765 "yacc_sql.y" +#line 767 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2530 "yacc_sql.cpp" +#line 2532 "yacc_sql.cpp" break; case 97: /* group_by: %empty */ -#line 771 "yacc_sql.y" +#line 773 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2538 "yacc_sql.cpp" +#line 2540 "yacc_sql.cpp" break; case 98: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 777 "yacc_sql.y" +#line 779 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2548,20 +2550,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2552 "yacc_sql.cpp" +#line 2554 "yacc_sql.cpp" break; case 99: /* explain_stmt: EXPLAIN command_wrapper */ -#line 790 "yacc_sql.y" +#line 792 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2561 "yacc_sql.cpp" +#line 2563 "yacc_sql.cpp" break; case 100: /* set_variable_stmt: SET ID EQ value */ -#line 798 "yacc_sql.y" +#line 800 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2569,11 +2571,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2573 "yacc_sql.cpp" +#line 2575 "yacc_sql.cpp" break; -#line 2577 "yacc_sql.cpp" +#line 2579 "yacc_sql.cpp" default: break; } @@ -2802,7 +2804,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 810 "yacc_sql.y" +#line 812 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 5c95a24c..564200b6 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -527,9 +527,11 @@ select_stmt: /* select 语句的语法解析树*/ } if ($7 != nullptr) { - for (auto &join : *$7) { - $$->selection.relations.emplace_back(join.relation); - $$->selection.conditions.emplace_back(join.condition); + for (auto it = $7->rbegin(); it != $7->rend(); ++it) { + $$->selection.relations.emplace_back(it->relation); + for (auto &condition : it->conditions) { + $$->selection.conditions.emplace_back(condition); + } } delete $7; } @@ -655,11 +657,11 @@ rel_list: ; joinClause: - relation ON condition + relation ON condition_list { $$ = new JoinSqlNode; $$->relation = $1; - $$->condition = *$3; + $$->conditions.swap(*$3); free($1); delete $3; } diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index a51d9e79..965ac613 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -107,6 +107,6 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt) select_stmt->query_expressions_.swap(bound_expressions); select_stmt->filter_stmt_ = filter_stmt; select_stmt->group_by_.swap(group_by_expressions); - stmt = select_stmt; + stmt = select_stmt; return RC::SUCCESS; } From a5480d0c2af0c6c1369904f122aab0d483017afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Sat, 28 Sep 2024 10:13:20 +0000 Subject: [PATCH 046/308] =?UTF-8?q?=E5=A4=A7=E4=BD=93=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E5=88=AB=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/expression_binder.cpp | 27 +- src/observer/sql/parser/expression_binder.h | 2 + src/observer/sql/parser/lex_sql.cpp | 514 ++++---- src/observer/sql/parser/lex_sql.h | 13 +- src/observer/sql/parser/lex_sql.l | 2 + src/observer/sql/parser/parse_defs.h | 12 +- src/observer/sql/parser/yacc_sql.cpp | 1124 ++++++++++------- src/observer/sql/parser/yacc_sql.hpp | 122 +- src/observer/sql/parser/yacc_sql.y | 61 +- 9 files changed, 1071 insertions(+), 806 deletions(-) diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index b0616025..2be7582c 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -32,6 +32,26 @@ Table *BinderContext::find_table(const char *table_name) const return *iter; } +Table *BinderContext::from_alias_find_table(const char *alias_name) const +{ + // 1、空字段肯定做不到 + if (is_blank(alias_name)) { + return nullptr; + } + + // 2、通过别名查找表名 + auto alias_table = table_alias_map_.find(alias_name); // 查找别名 + + // 3、如果没有找到对应的别名,则返回 nullptr + if (alias_table == table_alias_map_.end()) { + return nullptr; + } + + // 4、通过别名找到的表名,调用 find_table() 查找实际的 Table 对象 + const std::string &table_name = alias_table->second; // 获取别名对应的表名 + return find_table(table_name.c_str()); +} + //////////////////////////////////////////////////////////////////////////////// static void wildcard_fields(Table *table, vector> &expressions) { @@ -155,8 +175,11 @@ RC ExpressionBinder::bind_unbound_field_expression( } else { table = context_.find_table(table_name); if (nullptr == table) { - LOG_INFO("no such table in from list: %s", table_name); - return RC::SCHEMA_TABLE_NOT_EXIST; + table = context_.from_alias_find_table(table_name); + if (nullptr == table) { + LOG_INFO("no such table in from list: %s", table_name); + return RC::SCHEMA_TABLE_NOT_EXIST; + } } } diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index 9b80ecda..0fabb2bd 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -33,6 +33,8 @@ class BinderContext Table *find_table(const char *table_name) const; + Table *from_alias_find_table(const char *alias_name) const; + const std::vector
&query_tables() const { return query_tables_; } private: diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 65050d7c..6a0270c1 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,4 +1,4 @@ -#line 1 "lex_sql.cpp" +#line 2 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -22,7 +22,7 @@ do { \ } \ while (0); -#line 25 "lex_sql.cpp" +#line 26 "lex_sql.cpp" #define YY_INT_ALIGNED short int @@ -93,7 +93,6 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -258,7 +257,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -335,7 +334,7 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -382,12 +381,12 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyleng = (int) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 68 -#define YY_END_OF_BUFFER 69 +#define YY_NUM_RULES 70 +#define YY_END_OF_BUFFER 71 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -395,30 +394,31 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[199] = +static const flex_int16_t yy_accept[204] = { 0, - 0, 0, 0, 0, 69, 67, 1, 2, 67, 67, - 67, 47, 48, 63, 61, 49, 62, 6, 64, 3, - 5, 54, 50, 56, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 68, 53, 0, 65, 0, 66, 3, - 0, 51, 52, 55, 60, 60, 60, 44, 60, 43, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 58, 60, 60, 60, 60, 15, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 4, - 22, 60, 60, 60, 60, 60, 60, 60, 60, 60, - - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 32, 60, 60, 57, 60, 60, 60, 28, 60, 60, - 60, 60, 60, 60, 60, 60, 19, 33, 60, 60, - 39, 35, 60, 9, 11, 7, 60, 60, 60, 20, - 60, 8, 60, 60, 60, 24, 59, 38, 36, 60, - 60, 16, 60, 17, 60, 60, 60, 60, 29, 60, - 60, 60, 60, 34, 60, 42, 14, 60, 60, 60, - 60, 60, 60, 12, 60, 60, 21, 30, 10, 26, - 60, 46, 40, 23, 60, 60, 18, 60, 13, 27, - 25, 41, 60, 60, 45, 37, 31, 0 - + 0, 0, 0, 0, 71, 69, 1, 2, 69, 69, + 69, 49, 50, 65, 63, 51, 64, 6, 66, 3, + 5, 56, 52, 58, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 70, 55, 0, 67, 0, 68, 3, + 0, 53, 54, 57, 62, 62, 62, 45, 62, 44, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 60, 62, 62, 62, 62, 15, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 4, 22, 46, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 32, 62, 62, 59, 62, 62, 62, 62, + 28, 62, 62, 62, 62, 62, 62, 62, 62, 19, + 33, 62, 62, 39, 35, 62, 9, 11, 7, 62, + 62, 62, 20, 62, 8, 62, 62, 62, 24, 61, + 38, 36, 62, 62, 62, 16, 62, 17, 62, 62, + 62, 62, 29, 62, 62, 62, 62, 34, 62, 42, + 14, 62, 62, 62, 43, 62, 62, 62, 12, 62, + 62, 21, 30, 10, 26, 62, 48, 40, 23, 62, + 62, 18, 62, 13, 27, 25, 41, 62, 62, 47, + + 37, 31, 0 } ; static const YY_CHAR yy_ec[256] = @@ -464,61 +464,61 @@ static const YY_CHAR yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[204] = +static const flex_int16_t yy_base[209] = { 0, - 0, 0, 0, 0, 530, 531, 531, 531, 511, 523, - 521, 531, 531, 531, 531, 531, 511, 531, 531, 54, - 531, 52, 531, 507, 53, 57, 60, 59, 70, 91, - 61, 67, 77, 509, 74, 113, 83, 106, 117, 109, - 119, 123, 115, 531, 531, 518, 531, 516, 531, 86, - 506, 531, 531, 531, 0, 505, 134, 504, 136, 503, - 141, 144, 158, 156, 131, 169, 159, 170, 167, 143, - 174, 176, 172, 202, 495, 146, 192, 181, 199, 494, - 203, 206, 220, 230, 182, 226, 233, 228, 231, 493, - 491, 237, 246, 254, 243, 258, 261, 259, 269, 235, - - 257, 273, 279, 271, 282, 281, 286, 293, 296, 301, - 285, 307, 313, 490, 314, 315, 323, 489, 317, 297, - 337, 319, 320, 324, 336, 342, 488, 487, 338, 339, - 486, 485, 346, 484, 483, 482, 347, 350, 359, 477, - 361, 475, 355, 363, 365, 474, 473, 470, 372, 378, - 367, 469, 389, 467, 390, 370, 391, 397, 466, 387, - 403, 411, 413, 462, 414, 455, 449, 419, 415, 421, - 417, 425, 429, 431, 432, 434, 445, 443, 435, 407, - 439, 395, 295, 291, 442, 447, 251, 459, 205, 196, - 121, 78, 463, 179, 73, 69, 63, 531, 511, 513, - - 515, 75, 71 + 0, 0, 0, 0, 545, 546, 546, 546, 526, 538, + 536, 546, 546, 546, 546, 546, 526, 546, 546, 54, + 546, 52, 546, 522, 53, 57, 60, 59, 70, 91, + 61, 67, 77, 524, 74, 113, 106, 109, 129, 114, + 58, 134, 136, 546, 546, 533, 546, 531, 546, 86, + 521, 546, 546, 546, 0, 520, 117, 146, 131, 512, + 140, 154, 144, 158, 164, 170, 126, 169, 171, 173, + 174, 176, 181, 211, 511, 185, 196, 203, 188, 510, + 199, 198, 224, 222, 229, 228, 202, 230, 235, 244, + 509, 508, 507, 239, 254, 258, 242, 255, 278, 266, + + 265, 273, 267, 281, 286, 288, 289, 280, 292, 300, + 295, 301, 298, 314, 318, 506, 303, 321, 322, 336, + 505, 325, 331, 337, 339, 341, 324, 343, 349, 503, + 502, 359, 353, 501, 499, 356, 497, 495, 494, 357, + 358, 360, 492, 363, 489, 366, 382, 373, 488, 487, + 486, 380, 384, 395, 400, 484, 403, 482, 410, 388, + 413, 414, 481, 392, 418, 420, 424, 478, 412, 468, + 464, 430, 426, 436, 454, 440, 433, 441, 448, 450, + 455, 397, 391, 377, 294, 444, 268, 250, 236, 457, + 460, 205, 465, 178, 123, 121, 115, 471, 475, 83, + + 73, 69, 546, 528, 530, 532, 76, 75 } ; -static const flex_int16_t yy_def[204] = +static const flex_int16_t yy_def[209] = { 0, - 198, 1, 199, 199, 198, 198, 198, 198, 198, 200, - 201, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 198, 198, 200, 198, 201, 198, 198, - 198, 198, 198, 198, 203, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 198, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 0, 198, 198, - - 198, 198, 198 + 203, 1, 204, 204, 203, 203, 203, 203, 203, 205, + 206, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 203, 203, 205, 203, 206, 203, 203, + 203, 203, 203, 203, 208, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 203, 207, 207, 207, 207, 207, 207, 207, 207, 207, + + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + + 207, 207, 0, 203, 203, 203, 203, 203 } ; -static const flex_int16_t yy_nxt[598] = +static const flex_int16_t yy_nxt[613] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -527,68 +527,70 @@ static const flex_int16_t yy_nxt[598] = 43, 34, 34, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 34, 36, 37, 34, 38, 39, 40, 41, 42, 43, 34, 34, 51, 55, 50, 52, - 53, 55, 55, 55, 55, 55, 56, 55, 65, 61, + 53, 55, 55, 55, 55, 55, 55, 56, 65, 61, 59, 55, 66, 55, 55, 57, 62, 55, 55, 58, - 73, 55, 55, 63, 67, 64, 72, 55, 51, 60, + 73, 55, 88, 63, 67, 64, 72, 55, 51, 60, 50, 76, 65, 61, 59, 55, 66, 77, 57, 74, - 62, 68, 58, 75, 73, 80, 63, 67, 64, 72, - 55, 69, 60, 55, 70, 76, 71, 55, 86, 55, - 77, 55, 74, 55, 68, 55, 75, 55, 80, 81, - 82, 89, 88, 83, 69, 55, 78, 70, 55, 71, - 55, 79, 86, 87, 84, 55, 91, 55, 55, 85, - 55, 92, 81, 94, 82, 89, 88, 83, 97, 78, - 55, 93, 55, 55, 79, 112, 87, 84, 104, 96, - 91, 55, 85, 55, 55, 92, 55, 94, 55, 95, - 55, 97, 100, 55, 93, 55, 55, 101, 112, 98, - - 103, 104, 107, 96, 102, 99, 55, 105, 197, 106, - 55, 113, 95, 55, 121, 100, 55, 55, 114, 55, - 55, 101, 98, 103, 108, 107, 109, 102, 99, 115, - 105, 197, 106, 116, 55, 113, 117, 121, 110, 111, - 55, 114, 55, 118, 55, 55, 122, 55, 108, 55, - 109, 55, 115, 119, 125, 123, 116, 55, 124, 117, - 55, 110, 111, 120, 126, 55, 118, 127, 55, 135, - 122, 55, 55, 55, 129, 55, 119, 130, 125, 123, - 131, 124, 133, 55, 132, 55, 120, 55, 126, 128, - 134, 127, 135, 55, 136, 55, 55, 129, 138, 55, - - 55, 130, 139, 137, 131, 55, 133, 55, 132, 55, - 55, 55, 128, 140, 134, 55, 143, 136, 146, 141, - 142, 55, 138, 144, 145, 139, 137, 55, 55, 55, - 147, 55, 153, 55, 55, 148, 140, 55, 55, 156, - 143, 146, 141, 142, 149, 150, 151, 144, 145, 155, - 55, 55, 55, 55, 147, 153, 55, 152, 154, 148, - 55, 55, 157, 156, 55, 160, 163, 149, 150, 55, - 151, 158, 155, 55, 159, 55, 161, 55, 165, 55, - 152, 55, 154, 162, 55, 157, 55, 164, 172, 160, - 163, 170, 55, 168, 158, 166, 167, 159, 171, 161, - - 169, 55, 165, 55, 55, 55, 162, 175, 173, 55, - 164, 55, 172, 174, 176, 170, 168, 55, 166, 167, - 177, 55, 171, 169, 178, 55, 179, 55, 55, 55, - 175, 55, 173, 55, 180, 55, 186, 174, 176, 55, - 181, 185, 183, 55, 177, 55, 55, 178, 55, 55, - 179, 182, 184, 55, 188, 190, 55, 55, 180, 55, - 186, 55, 187, 55, 181, 185, 183, 189, 194, 55, - 191, 192, 193, 55, 182, 184, 55, 55, 188, 190, - 55, 55, 195, 55, 55, 187, 196, 55, 55, 55, - 189, 55, 194, 191, 192, 193, 55, 55, 55, 55, - - 55, 55, 55, 55, 55, 55, 195, 90, 55, 55, - 196, 44, 44, 46, 46, 48, 48, 55, 55, 55, - 90, 49, 47, 55, 54, 50, 49, 47, 45, 198, - 5, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198 - + 62, 68, 58, 75, 73, 88, 63, 67, 64, 72, + 55, 69, 60, 55, 70, 76, 71, 55, 55, 55, + 77, 55, 74, 87, 68, 55, 75, 55, 80, 92, + 55, 81, 82, 55, 69, 55, 78, 70, 55, 71, + 55, 79, 83, 89, 55, 84, 94, 87, 55, 102, + 55, 80, 90, 92, 81, 82, 85, 93, 55, 78, + 95, 86, 55, 96, 79, 97, 83, 89, 55, 84, + 94, 98, 102, 55, 55, 55, 90, 55, 55, 85, + 55, 93, 55, 95, 86, 55, 103, 96, 97, 55, + + 100, 99, 55, 104, 105, 98, 101, 107, 106, 108, + 55, 109, 55, 55, 114, 115, 55, 55, 117, 55, + 103, 118, 125, 100, 99, 55, 104, 105, 119, 101, + 107, 106, 108, 110, 109, 111, 55, 114, 55, 115, + 116, 117, 55, 55, 55, 118, 125, 112, 113, 55, + 55, 119, 126, 55, 120, 122, 55, 110, 55, 111, + 124, 121, 123, 116, 55, 127, 129, 128, 55, 55, + 112, 113, 55, 132, 133, 130, 126, 120, 122, 55, + 55, 55, 55, 124, 121, 123, 137, 55, 127, 136, + 129, 128, 55, 131, 55, 55, 132, 134, 133, 130, + + 55, 135, 55, 55, 139, 141, 55, 138, 55, 55, + 137, 140, 55, 136, 55, 55, 131, 55, 144, 142, + 143, 134, 147, 146, 148, 135, 145, 139, 55, 141, + 138, 149, 55, 152, 140, 55, 55, 150, 55, 55, + 151, 144, 142, 143, 153, 55, 147, 146, 148, 145, + 55, 55, 154, 55, 149, 55, 152, 55, 158, 155, + 160, 150, 161, 55, 151, 156, 157, 55, 153, 159, + 55, 55, 55, 55, 55, 154, 167, 55, 162, 169, + 55, 163, 158, 155, 160, 161, 164, 55, 156, 157, + 165, 55, 159, 166, 55, 168, 55, 170, 55, 174, + + 167, 162, 55, 169, 163, 55, 55, 171, 173, 55, + 164, 55, 172, 165, 55, 176, 166, 55, 168, 175, + 170, 177, 178, 174, 55, 180, 55, 55, 55, 183, + 171, 173, 55, 179, 55, 172, 181, 182, 55, 176, + 55, 184, 175, 185, 55, 177, 178, 55, 180, 187, + 55, 186, 183, 188, 55, 55, 190, 179, 55, 191, + 181, 182, 55, 189, 55, 184, 193, 185, 55, 55, + 192, 55, 187, 195, 55, 186, 197, 188, 55, 55, + 190, 199, 55, 191, 194, 55, 189, 198, 200, 55, + 193, 196, 55, 192, 201, 55, 55, 195, 55, 197, + + 55, 55, 55, 55, 202, 199, 55, 194, 55, 55, + 198, 55, 200, 55, 196, 55, 55, 55, 201, 55, + 55, 55, 55, 91, 55, 55, 55, 202, 44, 44, + 46, 46, 48, 48, 55, 91, 49, 47, 55, 54, + 50, 49, 47, 45, 203, 5, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203 } ; -static const flex_int16_t yy_chk[598] = +static const flex_int16_t yy_chk[613] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -597,65 +599,67 @@ static const flex_int16_t yy_chk[598] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 203, 28, 27, 31, 202, 197, 28, 27, - 26, 32, 28, 196, 29, 25, 27, 195, 35, 25, - 32, 33, 192, 27, 28, 27, 31, 37, 50, 26, + 22, 26, 41, 28, 27, 31, 208, 207, 28, 27, + 26, 32, 28, 202, 29, 25, 27, 201, 35, 25, + 32, 33, 41, 27, 28, 27, 31, 200, 50, 26, 50, 35, 28, 27, 26, 30, 28, 35, 25, 33, - 27, 29, 25, 33, 32, 37, 27, 28, 27, 31, - 38, 30, 26, 40, 30, 35, 30, 36, 40, 43, - 35, 39, 33, 41, 29, 191, 33, 42, 37, 38, - 39, 43, 42, 39, 30, 65, 36, 30, 57, 30, - 59, 36, 40, 41, 39, 61, 57, 70, 62, 39, - 76, 59, 38, 62, 39, 43, 42, 39, 65, 36, - 64, 61, 63, 67, 36, 76, 41, 39, 70, 64, - 57, 69, 39, 66, 68, 59, 73, 62, 71, 63, - 72, 65, 67, 194, 61, 78, 85, 68, 76, 66, - - 69, 70, 73, 64, 68, 66, 77, 71, 194, 72, - 190, 77, 63, 79, 85, 67, 74, 81, 78, 189, - 82, 68, 66, 69, 74, 73, 74, 68, 66, 79, - 71, 194, 72, 81, 83, 77, 82, 85, 74, 74, - 86, 78, 88, 82, 84, 89, 86, 87, 74, 100, - 74, 92, 79, 83, 89, 87, 81, 95, 88, 82, - 93, 74, 74, 84, 92, 187, 82, 93, 94, 100, - 86, 101, 96, 98, 95, 97, 83, 96, 89, 87, - 97, 88, 98, 99, 97, 104, 84, 102, 92, 94, - 99, 93, 100, 103, 101, 106, 105, 95, 103, 111, - - 107, 96, 104, 102, 97, 184, 98, 108, 97, 183, - 109, 120, 94, 105, 99, 110, 108, 101, 111, 106, - 107, 112, 103, 109, 110, 104, 102, 113, 115, 116, - 112, 119, 120, 122, 123, 113, 105, 117, 124, 123, - 108, 111, 106, 107, 115, 116, 117, 109, 110, 122, - 125, 121, 129, 130, 112, 120, 126, 119, 121, 113, - 133, 137, 124, 123, 138, 129, 137, 115, 116, 143, - 117, 125, 122, 139, 126, 141, 130, 144, 139, 145, - 119, 151, 121, 133, 156, 124, 149, 138, 151, 129, - 137, 149, 150, 144, 125, 141, 143, 126, 150, 130, - - 145, 160, 139, 153, 155, 157, 133, 156, 153, 182, - 138, 158, 151, 155, 157, 149, 144, 161, 141, 143, - 158, 180, 150, 145, 160, 162, 161, 163, 165, 169, - 156, 171, 153, 168, 162, 170, 171, 155, 157, 172, - 163, 170, 168, 173, 158, 174, 175, 160, 176, 179, - 161, 165, 169, 181, 173, 175, 185, 178, 162, 177, - 171, 186, 172, 167, 163, 170, 168, 174, 186, 166, - 176, 181, 185, 188, 165, 169, 164, 193, 173, 175, - 159, 154, 188, 152, 148, 172, 193, 147, 146, 142, - 174, 140, 186, 176, 181, 185, 136, 135, 134, 132, - - 131, 128, 127, 118, 114, 91, 188, 90, 80, 75, - 193, 199, 199, 200, 200, 201, 201, 60, 58, 56, - 51, 48, 46, 34, 24, 17, 11, 10, 9, 5, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198 - + 27, 29, 25, 33, 32, 41, 27, 28, 27, 31, + 37, 30, 26, 38, 30, 35, 30, 36, 40, 197, + 35, 57, 33, 40, 29, 196, 33, 195, 37, 57, + 67, 37, 38, 39, 30, 59, 36, 30, 42, 30, + 43, 36, 39, 42, 61, 39, 59, 40, 63, 67, + 58, 37, 43, 57, 37, 38, 39, 58, 62, 36, + 61, 39, 64, 62, 36, 63, 39, 42, 65, 39, + 59, 64, 67, 68, 66, 69, 43, 70, 71, 39, + 72, 58, 194, 61, 39, 73, 68, 62, 63, 76, + + 66, 65, 79, 68, 69, 64, 66, 71, 70, 72, + 77, 73, 82, 81, 76, 77, 87, 78, 79, 192, + 68, 81, 87, 66, 65, 74, 68, 69, 82, 66, + 71, 70, 72, 74, 73, 74, 84, 76, 83, 77, + 78, 79, 86, 85, 88, 81, 87, 74, 74, 89, + 189, 82, 88, 94, 83, 84, 97, 74, 90, 74, + 86, 83, 85, 78, 188, 89, 94, 90, 95, 98, + 74, 74, 96, 97, 98, 95, 88, 83, 84, 101, + 100, 103, 187, 86, 83, 85, 101, 102, 89, 100, + 94, 90, 99, 96, 108, 104, 97, 99, 98, 95, + + 105, 99, 106, 107, 103, 105, 109, 102, 185, 111, + 101, 104, 113, 100, 110, 112, 96, 117, 108, 106, + 107, 99, 111, 110, 112, 99, 109, 103, 114, 105, + 102, 113, 115, 117, 104, 118, 119, 114, 127, 122, + 115, 108, 106, 107, 118, 123, 111, 110, 112, 109, + 120, 124, 119, 125, 113, 126, 117, 128, 124, 120, + 126, 114, 127, 129, 115, 122, 123, 133, 118, 125, + 136, 140, 141, 132, 142, 119, 140, 144, 128, 142, + 146, 129, 124, 120, 126, 127, 132, 148, 122, 123, + 133, 184, 125, 136, 152, 141, 147, 144, 153, 152, + + 140, 128, 160, 142, 129, 183, 164, 146, 148, 154, + 132, 182, 147, 133, 155, 154, 136, 157, 141, 153, + 144, 155, 157, 152, 159, 160, 169, 161, 162, 164, + 146, 148, 165, 159, 166, 147, 161, 162, 167, 154, + 173, 165, 153, 166, 172, 155, 157, 177, 160, 169, + 174, 167, 164, 172, 176, 178, 174, 159, 186, 176, + 161, 162, 179, 173, 180, 165, 178, 166, 175, 181, + 177, 190, 169, 180, 191, 167, 186, 172, 171, 193, + 174, 191, 170, 176, 179, 198, 173, 190, 193, 199, + 178, 181, 168, 177, 198, 163, 158, 180, 156, 186, + + 151, 150, 149, 145, 199, 191, 143, 179, 139, 138, + 190, 137, 193, 135, 181, 134, 131, 130, 198, 121, + 116, 93, 92, 91, 80, 75, 60, 199, 204, 204, + 205, 205, 206, 206, 56, 51, 48, 46, 34, 24, + 17, 11, 10, 9, 5, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + + 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, + 203, 203 } ; /* The intent behind this definition is that it'll catch @@ -690,7 +694,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 693 "lex_sql.cpp" +#line 698 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -699,7 +703,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 702 "lex_sql.cpp" +#line 707 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -729,8 +733,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; + int yy_n_chars; + int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -787,7 +791,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - yy_size_t yyget_leng ( yyscan_t yyscanner ); + int yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); @@ -866,7 +870,7 @@ static int input ( yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - yy_size_t n; \ + int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -985,7 +989,7 @@ YY_DECL #line 75 "lex_sql.l" -#line 988 "lex_sql.cpp" +#line 993 "lex_sql.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1012,13 +1016,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 199 ) + if ( yy_current_state >= 204 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 531 ); + while ( yy_base[yy_current_state] != 546 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1256,127 +1260,137 @@ RETURN_TOKEN(GROUP); case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(BY); +RETURN_TOKEN(ORDER); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(AS); +RETURN_TOKEN(BY); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(STORAGE); +RETURN_TOKEN(AS); YY_BREAK case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(FORMAT); +RETURN_TOKEN(ASC); YY_BREAK case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(LBRACE); +RETURN_TOKEN(STORAGE); YY_BREAK case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(RBRACE); +RETURN_TOKEN(FORMAT); YY_BREAK case 49: YY_RULE_SETUP -#line 128 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 127 "lex_sql.l" +RETURN_TOKEN(LBRACE); YY_BREAK case 50: YY_RULE_SETUP -#line 129 "lex_sql.l" -RETURN_TOKEN(EQ); +#line 128 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(COMMA); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(EQ); YY_BREAK case 53: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LE); YY_BREAK case 54: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(NE); YY_BREAK case 55: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(NE); YY_BREAK case 56: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(LT); YY_BREAK case 57: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(NOT); +RETURN_TOKEN(GE); YY_BREAK case 58: YY_RULE_SETUP #line 137 "lex_sql.l" -RETURN_TOKEN(IS); +RETURN_TOKEN(GT); YY_BREAK case 59: YY_RULE_SETUP #line 138 "lex_sql.l" -RETURN_TOKEN(LIKE); +RETURN_TOKEN(NOT); YY_BREAK case 60: YY_RULE_SETUP -#line 140 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +#line 139 "lex_sql.l" +RETURN_TOKEN(IS); YY_BREAK case 61: -#line 143 "lex_sql.l" +YY_RULE_SETUP +#line 140 "lex_sql.l" +RETURN_TOKEN(LIKE); + YY_BREAK case 62: -#line 144 "lex_sql.l" +YY_RULE_SETUP +#line 142 "lex_sql.l" +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK case 63: #line 145 "lex_sql.l" case 64: +#line 146 "lex_sql.l" +case 65: +#line 147 "lex_sql.l" +case 66: YY_RULE_SETUP -#line 145 "lex_sql.l" +#line 147 "lex_sql.l" { return yytext[0]; } YY_BREAK -case 65: -/* rule 65 can match eol */ +case 67: +/* rule 67 can match eol */ YY_RULE_SETUP -#line 146 "lex_sql.l" +#line 148 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 66: -/* rule 66 can match eol */ +case 68: +/* rule 68 can match eol */ YY_RULE_SETUP -#line 147 "lex_sql.l" +#line 149 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 67: +case 69: YY_RULE_SETUP -#line 149 "lex_sql.l" +#line 151 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK -case 68: +case 70: YY_RULE_SETUP -#line 150 "lex_sql.l" +#line 152 "lex_sql.l" ECHO; YY_BREAK -#line 1379 "lex_sql.cpp" +#line 1394 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1565,7 +1579,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1579,7 +1593,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1637,7 +1651,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1676,7 +1690,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 199 ) + if ( yy_current_state >= 204 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1705,11 +1719,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 199 ) + if ( yy_current_state >= 204 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 198); + yy_is_jam = (yy_current_state == 203); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -1744,7 +1758,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -2122,12 +2136,12 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - yy_size_t i; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); @@ -2171,7 +2185,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) do \ { \ /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ + int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ @@ -2239,7 +2253,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng (yyscan_t yyscanner) +int yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; @@ -2532,7 +2546,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 150 "lex_sql.l" +#line 152 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 4cedec12..9d2bda18 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,7 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 5 "lex_sql.h" +#line 6 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -26,7 +26,7 @@ do { \ } \ while (0); -#line 29 "lex_sql.h" +#line 30 "lex_sql.h" #define YY_INT_ALIGNED short int @@ -97,7 +97,6 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -211,7 +210,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -255,7 +254,7 @@ void yypop_buffer_state ( yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -311,7 +310,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - yy_size_t yyget_leng ( yyscan_t yyscanner ); + int yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); @@ -542,7 +541,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 150 "lex_sql.l" +#line 152 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index a229ce0f..1a2d64ba 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -118,8 +118,10 @@ DATA RETURN_TOKEN(DATA); INFILE RETURN_TOKEN(INFILE); EXPLAIN RETURN_TOKEN(EXPLAIN); GROUP RETURN_TOKEN(GROUP); +ORDER RETURN_TOKEN(ORDER); BY RETURN_TOKEN(BY); AS RETURN_TOKEN(AS); +ASC RETURN_TOKEN(ASC); STORAGE RETURN_TOKEN(STORAGE); FORMAT RETURN_TOKEN(FORMAT); "(" RETURN_TOKEN(LBRACE); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 0fe791a8..8042fadb 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -86,11 +86,20 @@ struct ConditionSqlNode struct RelationNode { RelationNode(std::string relation_, std::string alias_) : relation(std::move(relation_)), alias(std::move(alias_)) {} - explicit RelationNode(std::string relation_) : relation(std::move(relation_)) {} + explicit RelationNode(std::string relation_) : relation(std::move(relation_)) {} std::string relation; ///< 查询的表 std::string alias; ///< 该表的别名 (may be NULL) }; +/** + * @brief 描述一个orderby的节点 + */ +struct OrderBySqlNode +{ + std::unique_ptr expr ; + bool is_asc ; ///< 默认true 为升序 +}; + /** * @brief 描述一个select语句 * @ingroup SQLParser @@ -108,6 +117,7 @@ struct SelectSqlNode std::vector relations; ///< 查询的表 std::vector conditions; ///< 查询条件,使用AND串联起来多个条件 std::vector> group_by; ///< group by clause + std::vector order_by; ///< attributes in order clause }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 5f623674..33907f0e 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -154,107 +154,116 @@ enum yysymbol_kind_t YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_BY = 5, /* BY */ - YYSYMBOL_CREATE = 6, /* CREATE */ - YYSYMBOL_DROP = 7, /* DROP */ - YYSYMBOL_GROUP = 8, /* GROUP */ - YYSYMBOL_TABLE = 9, /* TABLE */ - YYSYMBOL_TABLES = 10, /* TABLES */ - YYSYMBOL_INDEX = 11, /* INDEX */ - YYSYMBOL_CALC = 12, /* CALC */ - YYSYMBOL_SELECT = 13, /* SELECT */ - YYSYMBOL_DESC = 14, /* DESC */ - YYSYMBOL_SHOW = 15, /* SHOW */ - YYSYMBOL_SYNC = 16, /* SYNC */ - YYSYMBOL_INSERT = 17, /* INSERT */ - YYSYMBOL_DELETE = 18, /* DELETE */ - YYSYMBOL_UPDATE = 19, /* UPDATE */ - YYSYMBOL_LBRACE = 20, /* LBRACE */ - YYSYMBOL_RBRACE = 21, /* RBRACE */ - YYSYMBOL_COMMA = 22, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 23, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 24, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 25, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 26, /* INT_T */ - YYSYMBOL_STRING_T = 27, /* STRING_T */ - YYSYMBOL_FLOAT_T = 28, /* FLOAT_T */ - YYSYMBOL_DATE_T = 29, /* DATE_T */ - YYSYMBOL_HELP = 30, /* HELP */ - YYSYMBOL_EXIT = 31, /* EXIT */ - YYSYMBOL_DOT = 32, /* DOT */ - YYSYMBOL_INTO = 33, /* INTO */ - YYSYMBOL_VALUES = 34, /* VALUES */ - YYSYMBOL_FROM = 35, /* FROM */ - YYSYMBOL_WHERE = 36, /* WHERE */ - YYSYMBOL_AND = 37, /* AND */ - YYSYMBOL_SET = 38, /* SET */ - YYSYMBOL_ON = 39, /* ON */ - YYSYMBOL_LOAD = 40, /* LOAD */ - YYSYMBOL_DATA = 41, /* DATA */ - YYSYMBOL_INFILE = 42, /* INFILE */ - YYSYMBOL_EXPLAIN = 43, /* EXPLAIN */ - YYSYMBOL_STORAGE = 44, /* STORAGE */ - YYSYMBOL_FORMAT = 45, /* FORMAT */ - YYSYMBOL_EQ = 46, /* EQ */ - YYSYMBOL_LT = 47, /* LT */ - YYSYMBOL_GT = 48, /* GT */ - YYSYMBOL_LE = 49, /* LE */ - YYSYMBOL_GE = 50, /* GE */ - YYSYMBOL_NE = 51, /* NE */ - YYSYMBOL_LIKE = 52, /* LIKE */ - YYSYMBOL_NOT = 53, /* NOT */ - YYSYMBOL_NUMBER = 54, /* NUMBER */ - YYSYMBOL_FLOAT = 55, /* FLOAT */ - YYSYMBOL_ID = 56, /* ID */ - YYSYMBOL_SSS = 57, /* SSS */ - YYSYMBOL_58_ = 58, /* '+' */ - YYSYMBOL_59_ = 59, /* '-' */ - YYSYMBOL_60_ = 60, /* '*' */ - YYSYMBOL_61_ = 61, /* '/' */ - YYSYMBOL_UMINUS = 62, /* UMINUS */ - YYSYMBOL_YYACCEPT = 63, /* $accept */ - YYSYMBOL_commands = 64, /* commands */ - YYSYMBOL_command_wrapper = 65, /* command_wrapper */ - YYSYMBOL_exit_stmt = 66, /* exit_stmt */ - YYSYMBOL_help_stmt = 67, /* help_stmt */ - YYSYMBOL_sync_stmt = 68, /* sync_stmt */ - YYSYMBOL_begin_stmt = 69, /* begin_stmt */ - YYSYMBOL_commit_stmt = 70, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 71, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 72, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 73, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 74, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 75, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 76, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 77, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 78, /* attr_def_list */ - YYSYMBOL_attr_def = 79, /* attr_def */ - YYSYMBOL_number = 80, /* number */ - YYSYMBOL_type = 81, /* type */ - YYSYMBOL_insert_stmt = 82, /* insert_stmt */ - YYSYMBOL_value_list = 83, /* value_list */ - YYSYMBOL_value = 84, /* value */ - YYSYMBOL_storage_format = 85, /* storage_format */ - YYSYMBOL_delete_stmt = 86, /* delete_stmt */ - YYSYMBOL_update_stmt = 87, /* update_stmt */ - YYSYMBOL_select_stmt = 88, /* select_stmt */ - YYSYMBOL_calc_stmt = 89, /* calc_stmt */ - YYSYMBOL_expression_list = 90, /* expression_list */ - YYSYMBOL_expression = 91, /* expression */ - YYSYMBOL_alias = 92, /* alias */ - YYSYMBOL_aggr_func_expr = 93, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 94, /* rel_attr */ - YYSYMBOL_relation = 95, /* relation */ - YYSYMBOL_rel_list = 96, /* rel_list */ - YYSYMBOL_where = 97, /* where */ - YYSYMBOL_condition_list = 98, /* condition_list */ - YYSYMBOL_condition = 99, /* condition */ - YYSYMBOL_comp_op = 100, /* comp_op */ - YYSYMBOL_group_by = 101, /* group_by */ - YYSYMBOL_load_data_stmt = 102, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 103, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 104, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 105 /* opt_semicolon */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_GROUP = 9, /* GROUP */ + YYSYMBOL_ORDER = 10, /* ORDER */ + YYSYMBOL_TABLE = 11, /* TABLE */ + YYSYMBOL_TABLES = 12, /* TABLES */ + YYSYMBOL_INDEX = 13, /* INDEX */ + YYSYMBOL_CALC = 14, /* CALC */ + YYSYMBOL_SELECT = 15, /* SELECT */ + YYSYMBOL_DESC = 16, /* DESC */ + YYSYMBOL_SHOW = 17, /* SHOW */ + YYSYMBOL_SYNC = 18, /* SYNC */ + YYSYMBOL_INSERT = 19, /* INSERT */ + YYSYMBOL_DELETE = 20, /* DELETE */ + YYSYMBOL_UPDATE = 21, /* UPDATE */ + YYSYMBOL_LBRACE = 22, /* LBRACE */ + YYSYMBOL_RBRACE = 23, /* RBRACE */ + YYSYMBOL_COMMA = 24, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 25, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 26, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 27, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 28, /* INT_T */ + YYSYMBOL_STRING_T = 29, /* STRING_T */ + YYSYMBOL_FLOAT_T = 30, /* FLOAT_T */ + YYSYMBOL_DATE_T = 31, /* DATE_T */ + YYSYMBOL_NOT = 32, /* NOT */ + YYSYMBOL_NULL_T = 33, /* NULL_T */ + YYSYMBOL_NULLABLE = 34, /* NULLABLE */ + YYSYMBOL_HELP = 35, /* HELP */ + YYSYMBOL_EXIT = 36, /* EXIT */ + YYSYMBOL_DOT = 37, /* DOT */ + YYSYMBOL_INTO = 38, /* INTO */ + YYSYMBOL_VALUES = 39, /* VALUES */ + YYSYMBOL_FROM = 40, /* FROM */ + YYSYMBOL_WHERE = 41, /* WHERE */ + YYSYMBOL_AND = 42, /* AND */ + YYSYMBOL_SET = 43, /* SET */ + YYSYMBOL_ON = 44, /* ON */ + YYSYMBOL_LOAD = 45, /* LOAD */ + YYSYMBOL_DATA = 46, /* DATA */ + YYSYMBOL_INFILE = 47, /* INFILE */ + YYSYMBOL_EXPLAIN = 48, /* EXPLAIN */ + YYSYMBOL_STORAGE = 49, /* STORAGE */ + YYSYMBOL_FORMAT = 50, /* FORMAT */ + YYSYMBOL_EQ = 51, /* EQ */ + YYSYMBOL_LT = 52, /* LT */ + YYSYMBOL_GT = 53, /* GT */ + YYSYMBOL_LE = 54, /* LE */ + YYSYMBOL_GE = 55, /* GE */ + YYSYMBOL_NE = 56, /* NE */ + YYSYMBOL_LIKE = 57, /* LIKE */ + YYSYMBOL_IS = 58, /* IS */ + YYSYMBOL_NUMBER = 59, /* NUMBER */ + YYSYMBOL_FLOAT = 60, /* FLOAT */ + YYSYMBOL_ID = 61, /* ID */ + YYSYMBOL_SSS = 62, /* SSS */ + YYSYMBOL_63_ = 63, /* '+' */ + YYSYMBOL_64_ = 64, /* '-' */ + YYSYMBOL_65_ = 65, /* '*' */ + YYSYMBOL_66_ = 66, /* '/' */ + YYSYMBOL_UMINUS = 67, /* UMINUS */ + YYSYMBOL_YYACCEPT = 68, /* $accept */ + YYSYMBOL_commands = 69, /* commands */ + YYSYMBOL_command_wrapper = 70, /* command_wrapper */ + YYSYMBOL_exit_stmt = 71, /* exit_stmt */ + YYSYMBOL_help_stmt = 72, /* help_stmt */ + YYSYMBOL_sync_stmt = 73, /* sync_stmt */ + YYSYMBOL_begin_stmt = 74, /* begin_stmt */ + YYSYMBOL_commit_stmt = 75, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 76, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 77, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 78, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 79, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 80, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 81, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 82, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 83, /* attr_def_list */ + YYSYMBOL_attr_def = 84, /* attr_def */ + YYSYMBOL_nullable_constraint = 85, /* nullable_constraint */ + YYSYMBOL_number = 86, /* number */ + YYSYMBOL_type = 87, /* type */ + YYSYMBOL_insert_stmt = 88, /* insert_stmt */ + YYSYMBOL_value_list = 89, /* value_list */ + YYSYMBOL_value = 90, /* value */ + YYSYMBOL_storage_format = 91, /* storage_format */ + YYSYMBOL_delete_stmt = 92, /* delete_stmt */ + YYSYMBOL_update_stmt = 93, /* update_stmt */ + YYSYMBOL_select_stmt = 94, /* select_stmt */ + YYSYMBOL_calc_stmt = 95, /* calc_stmt */ + YYSYMBOL_expression_list = 96, /* expression_list */ + YYSYMBOL_expression = 97, /* expression */ + YYSYMBOL_alias = 98, /* alias */ + YYSYMBOL_aggr_func_expr = 99, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 100, /* rel_attr */ + YYSYMBOL_relation = 101, /* relation */ + YYSYMBOL_rel_list = 102, /* rel_list */ + YYSYMBOL_where = 103, /* where */ + YYSYMBOL_condition_list = 104, /* condition_list */ + YYSYMBOL_condition = 105, /* condition */ + YYSYMBOL_comp_op = 106, /* comp_op */ + YYSYMBOL_opt_order_by = 107, /* opt_order_by */ + YYSYMBOL_sort_list = 108, /* sort_list */ + YYSYMBOL_sort_unit = 109, /* sort_unit */ + YYSYMBOL_group_by = 110, /* group_by */ + YYSYMBOL_load_data_stmt = 111, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 112, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 113, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 114 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -583,21 +592,21 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 66 +#define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 163 +#define YYLAST 184 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 63 +#define YYNTOKENS 68 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 43 +#define YYNNTS 47 /* YYNRULES -- Number of rules. */ -#define YYNRULES 100 +#define YYNRULES 113 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 180 +#define YYNSTATES 198 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 313 +#define YYMAXUTOK 318 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -615,7 +624,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 60, 58, 2, 59, 2, 61, 2, 2, + 2, 2, 65, 63, 2, 64, 2, 66, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -642,24 +651,25 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 62 + 55, 56, 57, 58, 59, 60, 61, 62, 67 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 194, 194, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 225, 231, 236, 242, 248, 254, 260, - 267, 273, 281, 295, 305, 329, 332, 345, 353, 363, - 366, 367, 368, 369, 372, 389, 392, 403, 407, 411, - 420, 423, 430, 442, 457, 482, 491, 500, 515, 518, - 521, 524, 527, 531, 534, 539, 545, 548, 555, 558, - 561, 566, 574, 580, 585, 595, 600, 610, 629, 632, - 638, 641, 646, 653, 665, 677, 689, 704, 705, 706, - 707, 708, 709, 710, 711, 717, 722, 735, 743, 753, - 754 + 0, 206, 206, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 237, 243, 248, 254, 260, 266, 272, + 279, 285, 293, 307, 317, 341, 344, 357, 369, 392, + 396, 401, 407, 410, 411, 412, 413, 416, 433, 436, + 447, 451, 455, 461, 467, 470, 477, 489, 504, 534, + 543, 552, 567, 570, 573, 576, 579, 583, 586, 591, + 597, 600, 607, 610, 613, 618, 626, 632, 637, 647, + 652, 662, 681, 684, 690, 693, 698, 705, 717, 729, + 741, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 770, 773, 780, 786, 793, 800, 807, 816, 821, + 834, 842, 852, 853 }; #endif @@ -676,22 +686,24 @@ static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; static const char *const yytname[] = { "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", - "BY", "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", - "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", - "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", - "STRING_T", "FLOAT_T", "DATE_T", "HELP", "EXIT", "DOT", "INTO", "VALUES", - "FROM", "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", - "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "NOT", + "ASC", "BY", "CREATE", "DROP", "GROUP", "ORDER", "TABLE", "TABLES", + "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", + "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", + "TRX_ROLLBACK", "INT_T", "STRING_T", "FLOAT_T", "DATE_T", "NOT", + "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", + "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", + "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", "create_index_stmt", "drop_index_stmt", "create_table_stmt", - "attr_def_list", "attr_def", "number", "type", "insert_stmt", - "value_list", "value", "storage_format", "delete_stmt", "update_stmt", - "select_stmt", "calc_stmt", "expression_list", "expression", "alias", - "aggr_func_expr", "rel_attr", "relation", "rel_list", "where", - "condition_list", "condition", "comp_op", "group_by", "load_data_stmt", + "attr_def_list", "attr_def", "nullable_constraint", "number", "type", + "insert_stmt", "value_list", "value", "storage_format", "delete_stmt", + "update_stmt", "select_stmt", "calc_stmt", "expression_list", + "expression", "alias", "aggr_func_expr", "rel_attr", "relation", + "rel_list", "where", "condition_list", "condition", "comp_op", + "opt_order_by", "sort_list", "sort_unit", "group_by", "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; @@ -702,7 +714,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-104) +#define YYPACT_NINF (-103) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -716,24 +728,26 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 87, 8, 22, 27, 27, -51, 10, -104, -1, 1, - -2, -104, -104, -104, -104, -104, 4, 2, 87, 37, - 65, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, 13, 20, 23, 24, 27, -104, -104, -14, -104, - 27, -104, -104, -104, -3, -104, -104, 50, -104, -104, - 36, 39, 52, 51, 54, -104, -104, -104, -104, 88, - 68, -104, 70, -9, 18, 57, -104, 58, -104, 27, - 27, 27, 27, 93, 60, 85, 84, 66, 34, 64, - 67, 72, 73, -104, -104, 103, -104, -104, -19, -19, - -104, -104, 27, -104, 3, 84, 106, -46, -104, 86, - -104, 98, -13, 111, 114, -104, -104, -104, 113, -104, - 34, 104, -24, -24, -104, 100, 34, 129, -104, -104, - -104, -104, 119, 67, 120, 89, 60, -104, 118, -104, - -104, -104, -104, -104, -104, -104, 90, -46, -46, -46, - 84, 91, 92, 111, 99, 123, -104, 34, 127, -104, - -104, -104, -104, -104, -104, -104, -104, -104, 128, -104, - 105, -104, -104, 118, -104, -104, 107, -104, 95, -104 + 87, 1, 6, -6, -6, -56, 12, -103, -27, -22, + -17, -103, -103, -103, -103, -103, -16, 11, 87, 66, + 68, -103, -103, -103, -103, -103, -103, -103, -103, -103, + -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, + -103, 17, 25, 31, 32, -6, -103, -103, -103, -15, + -103, -6, -103, -103, -103, 4, -103, -103, 56, -103, + -103, 36, 37, 67, 48, 62, -103, -103, -103, -103, + 93, 72, -103, 75, 16, -13, 50, -103, 63, -103, + -6, -6, -6, -6, 101, 65, 88, 90, 73, 58, + 71, 77, 78, 91, -103, -103, 105, -103, -103, -33, + -33, -103, -103, -6, -103, -1, 90, 107, 28, -103, + 85, -103, 110, 0, 125, 129, -103, -103, -103, 130, + -103, 58, 116, 89, 89, -103, 113, 58, 145, -103, + -103, -103, -103, -9, 77, 134, 97, 65, 149, 136, + 104, -103, -103, -103, -103, -103, -103, -103, 131, 28, + 28, 28, 90, 103, 106, 133, -103, -103, 125, 118, + 139, -103, 162, -103, 58, 146, -103, -103, -103, -103, + -103, -103, -103, -103, -103, -103, 147, -103, -103, 121, + -103, -103, -6, 136, -103, 9, 122, 10, -103, 148, + -103, -103, 114, -103, -103, -6, -103, -103 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -743,42 +757,44 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 99, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 112, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 47, 48, 73, 49, - 0, 66, 64, 55, 68, 67, 65, 0, 31, 30, - 0, 0, 0, 0, 0, 97, 1, 100, 2, 0, - 0, 29, 0, 0, 0, 0, 63, 0, 69, 0, - 0, 0, 0, 56, 0, 0, 78, 0, 0, 0, - 0, 0, 0, 62, 72, 0, 74, 70, 58, 59, - 60, 61, 0, 75, 68, 78, 0, 80, 52, 0, - 98, 0, 0, 35, 0, 33, 71, 57, 76, 95, - 0, 73, 0, 0, 79, 81, 0, 0, 40, 41, - 42, 43, 38, 0, 0, 0, 0, 54, 45, 87, - 88, 89, 90, 91, 92, 93, 0, 0, 0, 80, - 78, 0, 0, 35, 50, 0, 77, 0, 0, 94, - 84, 86, 83, 85, 82, 53, 96, 39, 0, 36, - 0, 34, 32, 45, 44, 37, 0, 46, 0, 51 + 20, 0, 0, 0, 0, 0, 53, 50, 51, 77, + 52, 0, 70, 68, 59, 72, 71, 69, 0, 31, + 30, 0, 0, 0, 0, 0, 110, 1, 113, 2, + 0, 0, 29, 0, 0, 0, 0, 67, 0, 73, + 0, 0, 0, 0, 60, 0, 0, 82, 0, 0, + 0, 0, 0, 0, 66, 76, 0, 78, 74, 62, + 63, 64, 65, 0, 79, 72, 82, 0, 84, 56, + 0, 111, 0, 0, 35, 0, 33, 75, 61, 80, + 108, 0, 77, 0, 0, 83, 85, 0, 0, 43, + 44, 45, 46, 41, 0, 0, 0, 0, 101, 48, + 0, 91, 92, 93, 94, 95, 96, 99, 97, 0, + 0, 84, 82, 0, 0, 0, 40, 38, 35, 54, + 0, 81, 0, 58, 0, 0, 100, 98, 88, 90, + 87, 89, 86, 57, 109, 42, 0, 39, 36, 0, + 34, 32, 0, 48, 47, 41, 0, 105, 102, 103, + 49, 37, 0, 107, 106, 0, 55, 104 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -104, -104, 134, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, 5, 21, -104, -104, -104, - -18, -86, -104, -104, -104, -104, -104, -4, -15, 53, - -104, -103, -104, 25, -102, 7, -104, 40, -104, -104, - -104, -104, -104 + -103, -103, 156, -103, -103, -103, -103, -103, -103, -103, + -103, -103, -103, -103, -103, 18, 43, -7, -103, -103, + -103, -4, -87, -103, -103, -103, -103, -103, -3, -45, + 76, -103, -66, -103, 45, -102, 29, -103, 59, -103, + -11, -103, -103, -103, -103, -103, -103 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 134, 113, 168, 132, 33, - 158, 52, 171, 34, 35, 36, 37, 53, 54, 83, - 55, 56, 104, 105, 108, 124, 125, 147, 137, 38, - 39, 40, 68 + 28, 29, 30, 31, 32, 135, 114, 157, 176, 133, + 33, 165, 53, 180, 34, 35, 36, 37, 54, 55, + 84, 56, 57, 105, 106, 109, 125, 126, 149, 163, + 188, 189, 138, 38, 39, 40, 69 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -786,84 +802,91 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 57, 77, 110, 119, 123, 58, 74, 77, 46, 47, - 121, 49, 93, 128, 129, 130, 131, 41, 75, 42, - 59, 122, 139, 140, 141, 142, 143, 144, 145, 146, - 73, 43, 60, 44, 138, 76, 61, 66, 45, 94, - 150, 81, 82, 64, 161, 163, 123, 45, 165, 79, - 80, 81, 82, 78, 62, 79, 80, 81, 82, 78, - 63, 160, 162, 122, 98, 99, 100, 101, 67, 69, - 95, 173, 46, 47, 48, 49, 70, 50, 51, 71, - 72, 46, 47, 48, 49, 84, 50, 51, 46, 47, - 87, 49, 85, 1, 2, 86, 89, 88, 117, 3, - 4, 5, 6, 7, 8, 9, 10, 91, 90, 92, - 11, 12, 13, 96, 97, 102, 103, 14, 15, 106, - 107, 111, 109, 112, 116, 16, 120, 17, 114, 115, - 18, 127, 126, 133, 135, 136, 75, 149, 151, 152, - 157, 154, 159, 170, 172, 155, 167, 166, 174, 175, - 176, 179, 65, 178, 153, 177, 164, 118, 169, 0, - 0, 156, 0, 148 + 74, 58, 111, 78, 120, 59, 77, 75, 78, 45, + 95, 61, 41, 154, 42, 193, 45, 43, 62, 44, + 46, 123, 76, 155, 60, 156, 194, 46, 129, 130, + 131, 132, 82, 83, 139, 99, 100, 101, 102, 94, + 152, 155, 124, 156, 63, 64, 47, 48, 49, 50, + 173, 51, 52, 47, 48, 49, 50, 65, 51, 52, + 79, 46, 168, 170, 123, 79, 67, 80, 81, 82, + 83, 68, 96, 80, 81, 82, 83, 183, 70, 80, + 81, 82, 83, 169, 171, 124, 71, 47, 48, 122, + 50, 46, 72, 73, 1, 2, 85, 86, 87, 89, + 118, 3, 4, 5, 6, 7, 8, 9, 10, 90, + 88, 97, 11, 12, 13, 91, 92, 47, 48, 93, + 50, 140, 14, 15, 98, 103, 104, 107, 117, 121, + 16, 108, 17, 112, 110, 18, 127, 187, 113, 115, + 141, 142, 143, 144, 145, 146, 147, 148, 128, 134, + 187, 136, 116, 76, 137, 151, 153, 159, 160, 162, + 164, 166, 181, 167, 174, 175, 177, 179, 182, 184, + 185, 186, 195, 192, 66, 196, 178, 158, 191, 190, + 172, 119, 161, 150, 197 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { - 4, 4, 88, 105, 107, 56, 20, 4, 54, 55, - 56, 57, 21, 26, 27, 28, 29, 9, 32, 11, - 10, 107, 46, 47, 48, 49, 50, 51, 52, 53, - 45, 9, 33, 11, 120, 50, 35, 0, 20, 21, - 126, 60, 61, 41, 147, 148, 149, 20, 150, 58, - 59, 60, 61, 56, 56, 58, 59, 60, 61, 56, - 56, 147, 148, 149, 79, 80, 81, 82, 3, 56, - 74, 157, 54, 55, 56, 57, 56, 59, 60, 56, - 56, 54, 55, 56, 57, 35, 59, 60, 54, 55, - 38, 57, 56, 6, 7, 56, 42, 46, 102, 12, - 13, 14, 15, 16, 17, 18, 19, 39, 20, 39, - 23, 24, 25, 56, 56, 22, 56, 30, 31, 34, - 36, 57, 56, 56, 21, 38, 20, 40, 56, 56, - 43, 33, 46, 22, 20, 22, 32, 37, 9, 20, - 22, 21, 52, 44, 21, 56, 54, 56, 21, 21, - 45, 56, 18, 46, 133, 173, 149, 104, 153, -1, - -1, 136, -1, 123 + 45, 4, 89, 4, 106, 61, 51, 22, 4, 22, + 23, 38, 11, 22, 13, 5, 22, 11, 40, 13, + 33, 108, 37, 32, 12, 34, 16, 33, 28, 29, + 30, 31, 65, 66, 121, 80, 81, 82, 83, 23, + 127, 32, 108, 34, 61, 61, 59, 60, 61, 62, + 152, 64, 65, 59, 60, 61, 62, 46, 64, 65, + 61, 33, 149, 150, 151, 61, 0, 63, 64, 65, + 66, 3, 75, 63, 64, 65, 66, 164, 61, 63, + 64, 65, 66, 149, 150, 151, 61, 59, 60, 61, + 62, 33, 61, 61, 7, 8, 40, 61, 61, 51, + 103, 14, 15, 16, 17, 18, 19, 20, 21, 47, + 43, 61, 25, 26, 27, 22, 44, 59, 60, 44, + 62, 32, 35, 36, 61, 24, 61, 39, 23, 22, + 43, 41, 45, 62, 61, 48, 51, 182, 61, 61, + 51, 52, 53, 54, 55, 56, 57, 58, 38, 24, + 195, 22, 61, 37, 24, 42, 11, 23, 61, 10, + 24, 57, 23, 32, 61, 59, 33, 49, 6, 23, + 23, 50, 24, 51, 18, 61, 158, 134, 185, 183, + 151, 105, 137, 124, 195 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_int8 yystos[] = { - 0, 6, 7, 12, 13, 14, 15, 16, 17, 18, - 19, 23, 24, 25, 30, 31, 38, 40, 43, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 82, 86, 87, 88, 89, 102, 103, - 104, 9, 11, 9, 11, 20, 54, 55, 56, 57, - 59, 60, 84, 90, 91, 93, 94, 90, 56, 10, - 33, 35, 56, 56, 41, 65, 0, 3, 105, 56, - 56, 56, 56, 91, 20, 32, 91, 4, 56, 58, - 59, 60, 61, 92, 35, 56, 56, 38, 46, 42, - 20, 39, 39, 21, 21, 90, 56, 56, 91, 91, - 91, 91, 22, 56, 95, 96, 34, 36, 97, 56, - 84, 57, 56, 79, 56, 56, 21, 90, 92, 97, - 20, 56, 84, 94, 98, 99, 46, 33, 26, 27, - 28, 29, 81, 22, 78, 20, 22, 101, 84, 46, - 47, 48, 49, 50, 51, 52, 53, 100, 100, 37, - 84, 9, 20, 79, 21, 56, 96, 22, 83, 52, - 84, 94, 84, 94, 98, 97, 56, 54, 80, 78, - 44, 85, 21, 84, 21, 21, 45, 83, 46, 56 + 0, 7, 8, 14, 15, 16, 17, 18, 19, 20, + 21, 25, 26, 27, 35, 36, 43, 45, 48, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 88, 92, 93, 94, 95, 111, 112, + 113, 11, 13, 11, 13, 22, 33, 59, 60, 61, + 62, 64, 65, 90, 96, 97, 99, 100, 96, 61, + 12, 38, 40, 61, 61, 46, 70, 0, 3, 114, + 61, 61, 61, 61, 97, 22, 37, 97, 4, 61, + 63, 64, 65, 66, 98, 40, 61, 61, 43, 51, + 47, 22, 44, 44, 23, 23, 96, 61, 61, 97, + 97, 97, 97, 24, 61, 101, 102, 39, 41, 103, + 61, 90, 62, 61, 84, 61, 61, 23, 96, 98, + 103, 22, 61, 90, 100, 104, 105, 51, 38, 28, + 29, 30, 31, 87, 24, 83, 22, 24, 110, 90, + 32, 51, 52, 53, 54, 55, 56, 57, 58, 106, + 106, 42, 90, 11, 22, 32, 34, 85, 84, 23, + 61, 102, 10, 107, 24, 89, 57, 32, 90, 100, + 90, 100, 104, 103, 61, 59, 86, 33, 83, 49, + 91, 23, 6, 90, 23, 23, 50, 97, 108, 109, + 89, 85, 51, 5, 16, 24, 61, 108 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 63, 64, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 78, 79, 79, 80, - 81, 81, 81, 81, 82, 83, 83, 84, 84, 84, - 85, 85, 86, 87, 88, 89, 90, 90, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 91, 92, 92, - 92, 93, 93, 94, 94, 95, 96, 96, 97, 97, - 98, 98, 98, 99, 99, 99, 99, 100, 100, 100, - 100, 100, 100, 100, 100, 101, 102, 103, 104, 105, - 105 + 0, 68, 69, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 83, 84, 84, 85, + 85, 85, 86, 87, 87, 87, 87, 88, 89, 89, + 90, 90, 90, 90, 91, 91, 92, 93, 94, 95, + 96, 96, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 98, 98, 98, 99, 99, 100, 100, 101, + 102, 102, 103, 103, 104, 104, 104, 105, 105, 105, + 105, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 107, 107, 108, 108, 109, 109, 109, 110, 111, + 112, 113, 114, 114 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -872,14 +895,15 @@ static const yytype_int8 yyr2[] = 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 2, 2, 8, 5, 8, 0, 3, 5, 2, 1, - 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, - 0, 4, 4, 7, 6, 2, 2, 4, 3, 3, - 3, 3, 3, 2, 1, 1, 1, 1, 0, 1, - 2, 4, 3, 1, 3, 1, 2, 4, 0, 2, - 0, 1, 3, 3, 3, 3, 3, 1, 1, 1, - 1, 1, 1, 1, 2, 0, 7, 2, 4, 0, - 1 + 2, 2, 8, 5, 8, 0, 3, 6, 3, 2, + 1, 0, 1, 1, 1, 1, 1, 8, 0, 3, + 1, 1, 1, 1, 0, 4, 4, 7, 7, 2, + 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, + 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, + 2, 4, 0, 2, 0, 1, 3, 3, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 2, 0, 3, 1, 3, 1, 2, 2, 0, 7, + 2, 4, 0, 1 }; @@ -1741,93 +1765,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 195 "yacc_sql.y" +#line 207 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1750 "yacc_sql.cpp" +#line 1774 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 225 "yacc_sql.y" +#line 237 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1759 "yacc_sql.cpp" +#line 1783 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 231 "yacc_sql.y" +#line 243 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1767 "yacc_sql.cpp" +#line 1791 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 236 "yacc_sql.y" +#line 248 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1775 "yacc_sql.cpp" +#line 1799 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 242 "yacc_sql.y" +#line 254 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1783 "yacc_sql.cpp" +#line 1807 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 248 "yacc_sql.y" +#line 260 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1791 "yacc_sql.cpp" +#line 1815 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 254 "yacc_sql.y" +#line 266 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1799 "yacc_sql.cpp" +#line 1823 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 260 "yacc_sql.y" +#line 272 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1809 "yacc_sql.cpp" +#line 1833 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 267 "yacc_sql.y" +#line 279 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1817 "yacc_sql.cpp" +#line 1841 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 273 "yacc_sql.y" +#line 285 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1827 "yacc_sql.cpp" +#line 1851 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 282 "yacc_sql.y" +#line 294 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1838,11 +1862,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1842 "yacc_sql.cpp" +#line 1866 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 296 "yacc_sql.y" +#line 308 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1850,11 +1874,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1854 "yacc_sql.cpp" +#line 1878 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 306 "yacc_sql.y" +#line 318 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1875,19 +1899,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1879 "yacc_sql.cpp" +#line 1903 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 329 "yacc_sql.y" +#line 341 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1887 "yacc_sql.cpp" +#line 1911 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 333 "yacc_sql.y" +#line 345 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1897,65 +1921,105 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1901 "yacc_sql.cpp" +#line 1925 "yacc_sql.cpp" break; - case 37: /* attr_def: ID type LBRACE number RBRACE */ -#line 346 "yacc_sql.y" + case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ +#line 358 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-3].number); - (yyval.attr_info)->name = (yyvsp[-4].string); - (yyval.attr_info)->length = (yyvsp[-1].number); - free((yyvsp[-4].string)); + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); + if ((yyval.attr_info)->nullable) { + (yyval.attr_info)->length++; + } + free((yyvsp[-5].string)); } -#line 1913 "yacc_sql.cpp" +#line 1941 "yacc_sql.cpp" break; - case 38: /* attr_def: ID type */ -#line 354 "yacc_sql.y" + case 38: /* attr_def: ID type nullable_constraint */ +#line 370 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[0].number); - (yyval.attr_info)->name = (yyvsp[-1].string); - (yyval.attr_info)->length = 4; - free((yyvsp[-1].string)); + (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); + (yyval.attr_info)->name = (yyvsp[-2].string); + if ((yyval.attr_info)->type == AttrType::INTS) { + (yyval.attr_info)->length = 4; + } else if ((yyval.attr_info)->type == AttrType::FLOATS) { + (yyval.attr_info)->length = 4; + } else if ((yyval.attr_info)->type == AttrType::DATES) { + (yyval.attr_info)->length = 4; + } else { + ASSERT(false, "$$->type is invalid."); + } + (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); // 处理NULL/NOT NULL标记 + if ((yyval.attr_info)->nullable) { + (yyval.attr_info)->length++; + } + free((yyvsp[-2].string)); } -#line 1925 "yacc_sql.cpp" +#line 1965 "yacc_sql.cpp" break; - case 39: /* number: NUMBER */ -#line 363 "yacc_sql.y" + case 39: /* nullable_constraint: NOT NULL_T */ +#line 393 "yacc_sql.y" + { + (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false + } +#line 1973 "yacc_sql.cpp" + break; + + case 40: /* nullable_constraint: NULLABLE */ +#line 397 "yacc_sql.y" + { + (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true + } +#line 1981 "yacc_sql.cpp" + break; + + case 41: /* nullable_constraint: %empty */ +#line 401 "yacc_sql.y" + { + (yyval.nullable_info) = false; // 默认情况为 NOT NULL + } +#line 1989 "yacc_sql.cpp" + break; + + case 42: /* number: NUMBER */ +#line 407 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1931 "yacc_sql.cpp" +#line 1995 "yacc_sql.cpp" break; - case 40: /* type: INT_T */ -#line 366 "yacc_sql.y" + case 43: /* type: INT_T */ +#line 410 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1937 "yacc_sql.cpp" +#line 2001 "yacc_sql.cpp" break; - case 41: /* type: STRING_T */ -#line 367 "yacc_sql.y" + case 44: /* type: STRING_T */ +#line 411 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1943 "yacc_sql.cpp" +#line 2007 "yacc_sql.cpp" break; - case 42: /* type: FLOAT_T */ -#line 368 "yacc_sql.y" + case 45: /* type: FLOAT_T */ +#line 412 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1949 "yacc_sql.cpp" +#line 2013 "yacc_sql.cpp" break; - case 43: /* type: DATE_T */ -#line 369 "yacc_sql.y" + case 46: /* type: DATE_T */ +#line 413 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1955 "yacc_sql.cpp" +#line 2019 "yacc_sql.cpp" break; - case 44: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 373 "yacc_sql.y" + case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ +#line 417 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -1968,19 +2032,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 1972 "yacc_sql.cpp" +#line 2036 "yacc_sql.cpp" break; - case 45: /* value_list: %empty */ -#line 389 "yacc_sql.y" + case 48: /* value_list: %empty */ +#line 433 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 1980 "yacc_sql.cpp" +#line 2044 "yacc_sql.cpp" break; - case 46: /* value_list: COMMA value value_list */ -#line 392 "yacc_sql.y" + case 49: /* value_list: COMMA value value_list */ +#line 436 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -1990,56 +2054,64 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 1994 "yacc_sql.cpp" +#line 2058 "yacc_sql.cpp" break; - case 47: /* value: NUMBER */ -#line 403 "yacc_sql.y" + case 50: /* value: NUMBER */ +#line 447 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2003 "yacc_sql.cpp" +#line 2067 "yacc_sql.cpp" break; - case 48: /* value: FLOAT */ -#line 407 "yacc_sql.y" + case 51: /* value: FLOAT */ +#line 451 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2012 "yacc_sql.cpp" +#line 2076 "yacc_sql.cpp" break; - case 49: /* value: SSS */ -#line 411 "yacc_sql.y" + case 52: /* value: SSS */ +#line 455 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2023 "yacc_sql.cpp" +#line 2087 "yacc_sql.cpp" break; - case 50: /* storage_format: %empty */ -#line 420 "yacc_sql.y" + case 53: /* value: NULL_T */ +#line 461 "yacc_sql.y" + { + (yyval.value) = new Value(NullValue()); + } +#line 2095 "yacc_sql.cpp" + break; + + case 54: /* storage_format: %empty */ +#line 467 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2031 "yacc_sql.cpp" +#line 2103 "yacc_sql.cpp" break; - case 51: /* storage_format: STORAGE FORMAT EQ ID */ -#line 424 "yacc_sql.y" + case 55: /* storage_format: STORAGE FORMAT EQ ID */ +#line 471 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2039 "yacc_sql.cpp" +#line 2111 "yacc_sql.cpp" break; - case 52: /* delete_stmt: DELETE FROM ID where */ -#line 431 "yacc_sql.y" + case 56: /* delete_stmt: DELETE FROM ID where */ +#line 478 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2049,11 +2121,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2053 "yacc_sql.cpp" +#line 2125 "yacc_sql.cpp" break; - case 53: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 443 "yacc_sql.y" + case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ +#line 490 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2066,48 +2138,53 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2070 "yacc_sql.cpp" +#line 2142 "yacc_sql.cpp" break; - case 54: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 458 "yacc_sql.y" + case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ +#line 505 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); - if ((yyvsp[-4].expression_list) != nullptr) { - (yyval.sql_node)->selection.expressions.swap(*(yyvsp[-4].expression_list)); - delete (yyvsp[-4].expression_list); + if ((yyvsp[-5].expression_list) != nullptr) { + (yyval.sql_node)->selection.expressions.swap(*(yyvsp[-5].expression_list)); + delete (yyvsp[-5].expression_list); } - if ((yyvsp[-2].relation_list) != nullptr) { - (yyval.sql_node)->selection.relations.swap(*(yyvsp[-2].relation_list)); - delete (yyvsp[-2].relation_list); + if ((yyvsp[-3].relation_list) != nullptr) { + (yyval.sql_node)->selection.relations.swap(*(yyvsp[-3].relation_list)); + delete (yyvsp[-3].relation_list); } - if ((yyvsp[-1].condition_list) != nullptr) { - (yyval.sql_node)->selection.conditions.swap(*(yyvsp[-1].condition_list)); - delete (yyvsp[-1].condition_list); + if ((yyvsp[-2].condition_list) != nullptr) { + (yyval.sql_node)->selection.conditions.swap(*(yyvsp[-2].condition_list)); + delete (yyvsp[-2].condition_list); } - if ((yyvsp[0].expression_list) != nullptr) { - (yyval.sql_node)->selection.group_by.swap(*(yyvsp[0].expression_list)); - delete (yyvsp[0].expression_list); + if ((yyvsp[-1].expression_list) != nullptr) { + (yyval.sql_node)->selection.group_by.swap(*(yyvsp[-1].expression_list)); + delete (yyvsp[-1].expression_list); + } + + if ((yyvsp[0].orderby_list) != nullptr) { + (yyval.sql_node)->selection.order_by.swap(*(yyvsp[0].orderby_list)); + delete (yyvsp[0].orderby_list); } } -#line 2097 "yacc_sql.cpp" +#line 2174 "yacc_sql.cpp" break; - case 55: /* calc_stmt: CALC expression_list */ -#line 483 "yacc_sql.y" + case 59: /* calc_stmt: CALC expression_list */ +#line 535 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2107 "yacc_sql.cpp" +#line 2184 "yacc_sql.cpp" break; - case 56: /* expression_list: expression alias */ -#line 492 "yacc_sql.y" + case 60: /* expression_list: expression alias */ +#line 544 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2116,11 +2193,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2120 "yacc_sql.cpp" +#line 2197 "yacc_sql.cpp" break; - case 57: /* expression_list: expression alias COMMA expression_list */ -#line 501 "yacc_sql.y" + case 61: /* expression_list: expression alias COMMA expression_list */ +#line 553 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2133,121 +2210,121 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2137 "yacc_sql.cpp" +#line 2214 "yacc_sql.cpp" break; - case 58: /* expression: expression '+' expression */ -#line 515 "yacc_sql.y" + case 62: /* expression: expression '+' expression */ +#line 567 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2145 "yacc_sql.cpp" +#line 2222 "yacc_sql.cpp" break; - case 59: /* expression: expression '-' expression */ -#line 518 "yacc_sql.y" + case 63: /* expression: expression '-' expression */ +#line 570 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2153 "yacc_sql.cpp" +#line 2230 "yacc_sql.cpp" break; - case 60: /* expression: expression '*' expression */ -#line 521 "yacc_sql.y" + case 64: /* expression: expression '*' expression */ +#line 573 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2161 "yacc_sql.cpp" +#line 2238 "yacc_sql.cpp" break; - case 61: /* expression: expression '/' expression */ -#line 524 "yacc_sql.y" + case 65: /* expression: expression '/' expression */ +#line 576 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2169 "yacc_sql.cpp" +#line 2246 "yacc_sql.cpp" break; - case 62: /* expression: LBRACE expression RBRACE */ -#line 527 "yacc_sql.y" + case 66: /* expression: LBRACE expression RBRACE */ +#line 579 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2178 "yacc_sql.cpp" +#line 2255 "yacc_sql.cpp" break; - case 63: /* expression: '-' expression */ -#line 531 "yacc_sql.y" + case 67: /* expression: '-' expression */ +#line 583 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2186 "yacc_sql.cpp" +#line 2263 "yacc_sql.cpp" break; - case 64: /* expression: value */ -#line 534 "yacc_sql.y" + case 68: /* expression: value */ +#line 586 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2196 "yacc_sql.cpp" +#line 2273 "yacc_sql.cpp" break; - case 65: /* expression: rel_attr */ -#line 539 "yacc_sql.y" + case 69: /* expression: rel_attr */ +#line 591 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2207 "yacc_sql.cpp" +#line 2284 "yacc_sql.cpp" break; - case 66: /* expression: '*' */ -#line 545 "yacc_sql.y" + case 70: /* expression: '*' */ +#line 597 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2215 "yacc_sql.cpp" +#line 2292 "yacc_sql.cpp" break; - case 67: /* expression: aggr_func_expr */ -#line 548 "yacc_sql.y" + case 71: /* expression: aggr_func_expr */ +#line 600 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2223 "yacc_sql.cpp" +#line 2300 "yacc_sql.cpp" break; - case 68: /* alias: %empty */ -#line 555 "yacc_sql.y" + case 72: /* alias: %empty */ +#line 607 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2231 "yacc_sql.cpp" +#line 2308 "yacc_sql.cpp" break; - case 69: /* alias: ID */ -#line 558 "yacc_sql.y" + case 73: /* alias: ID */ +#line 610 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2239 "yacc_sql.cpp" +#line 2316 "yacc_sql.cpp" break; - case 70: /* alias: AS ID */ -#line 561 "yacc_sql.y" + case 74: /* alias: AS ID */ +#line 613 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2247 "yacc_sql.cpp" +#line 2324 "yacc_sql.cpp" break; - case 71: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 567 "yacc_sql.y" + case 75: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 619 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2255,29 +2332,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2259 "yacc_sql.cpp" +#line 2336 "yacc_sql.cpp" break; - case 72: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 575 "yacc_sql.y" + case 76: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 627 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2267 "yacc_sql.cpp" +#line 2344 "yacc_sql.cpp" break; - case 73: /* rel_attr: ID */ -#line 580 "yacc_sql.y" + case 77: /* rel_attr: ID */ +#line 632 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2277 "yacc_sql.cpp" +#line 2354 "yacc_sql.cpp" break; - case 74: /* rel_attr: ID DOT ID */ -#line 585 "yacc_sql.y" + case 78: /* rel_attr: ID DOT ID */ +#line 637 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2285,19 +2362,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2289 "yacc_sql.cpp" +#line 2366 "yacc_sql.cpp" break; - case 75: /* relation: ID */ -#line 595 "yacc_sql.y" + case 79: /* relation: ID */ +#line 647 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2297 "yacc_sql.cpp" +#line 2374 "yacc_sql.cpp" break; - case 76: /* rel_list: relation alias */ -#line 600 "yacc_sql.y" + case 80: /* rel_list: relation alias */ +#line 652 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2308,11 +2385,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2312 "yacc_sql.cpp" +#line 2389 "yacc_sql.cpp" break; - case 77: /* rel_list: relation alias COMMA rel_list */ -#line 610 "yacc_sql.y" + case 81: /* rel_list: relation alias COMMA rel_list */ +#line 662 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2328,55 +2405,55 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); } -#line 2332 "yacc_sql.cpp" +#line 2409 "yacc_sql.cpp" break; - case 78: /* where: %empty */ -#line 629 "yacc_sql.y" + case 82: /* where: %empty */ +#line 681 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2340 "yacc_sql.cpp" +#line 2417 "yacc_sql.cpp" break; - case 79: /* where: WHERE condition_list */ -#line 632 "yacc_sql.y" + case 83: /* where: WHERE condition_list */ +#line 684 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2348 "yacc_sql.cpp" +#line 2425 "yacc_sql.cpp" break; - case 80: /* condition_list: %empty */ -#line 638 "yacc_sql.y" + case 84: /* condition_list: %empty */ +#line 690 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2356 "yacc_sql.cpp" +#line 2433 "yacc_sql.cpp" break; - case 81: /* condition_list: condition */ -#line 641 "yacc_sql.y" + case 85: /* condition_list: condition */ +#line 693 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2366 "yacc_sql.cpp" +#line 2443 "yacc_sql.cpp" break; - case 82: /* condition_list: condition AND condition_list */ -#line 646 "yacc_sql.y" + case 86: /* condition_list: condition AND condition_list */ +#line 698 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2376 "yacc_sql.cpp" +#line 2453 "yacc_sql.cpp" break; - case 83: /* condition: rel_attr comp_op value */ -#line 654 "yacc_sql.y" + case 87: /* condition: rel_attr comp_op value */ +#line 706 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2388,11 +2465,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2392 "yacc_sql.cpp" +#line 2469 "yacc_sql.cpp" break; - case 84: /* condition: value comp_op value */ -#line 666 "yacc_sql.y" + case 88: /* condition: value comp_op value */ +#line 718 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2404,11 +2481,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2408 "yacc_sql.cpp" +#line 2485 "yacc_sql.cpp" break; - case 85: /* condition: rel_attr comp_op rel_attr */ -#line 678 "yacc_sql.y" + case 89: /* condition: rel_attr comp_op rel_attr */ +#line 730 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2420,11 +2497,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2424 "yacc_sql.cpp" +#line 2501 "yacc_sql.cpp" break; - case 86: /* condition: value comp_op rel_attr */ -#line 690 "yacc_sql.y" + case 90: /* condition: value comp_op rel_attr */ +#line 742 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2436,67 +2513,144 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2440 "yacc_sql.cpp" +#line 2517 "yacc_sql.cpp" break; - case 87: /* comp_op: EQ */ -#line 704 "yacc_sql.y" + case 91: /* comp_op: EQ */ +#line 756 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2446 "yacc_sql.cpp" +#line 2523 "yacc_sql.cpp" break; - case 88: /* comp_op: LT */ -#line 705 "yacc_sql.y" + case 92: /* comp_op: LT */ +#line 757 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2452 "yacc_sql.cpp" +#line 2529 "yacc_sql.cpp" break; - case 89: /* comp_op: GT */ -#line 706 "yacc_sql.y" + case 93: /* comp_op: GT */ +#line 758 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2458 "yacc_sql.cpp" +#line 2535 "yacc_sql.cpp" break; - case 90: /* comp_op: LE */ -#line 707 "yacc_sql.y" + case 94: /* comp_op: LE */ +#line 759 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2464 "yacc_sql.cpp" +#line 2541 "yacc_sql.cpp" break; - case 91: /* comp_op: GE */ -#line 708 "yacc_sql.y" + case 95: /* comp_op: GE */ +#line 760 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2470 "yacc_sql.cpp" +#line 2547 "yacc_sql.cpp" break; - case 92: /* comp_op: NE */ -#line 709 "yacc_sql.y" + case 96: /* comp_op: NE */ +#line 761 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2476 "yacc_sql.cpp" +#line 2553 "yacc_sql.cpp" + break; + + case 97: /* comp_op: IS */ +#line 762 "yacc_sql.y" + { (yyval.comp) = OP_IS; } +#line 2559 "yacc_sql.cpp" break; - case 93: /* comp_op: LIKE */ -#line 710 "yacc_sql.y" + case 98: /* comp_op: IS NOT */ +#line 763 "yacc_sql.y" + { (yyval.comp) = OP_IS_NOT; } +#line 2565 "yacc_sql.cpp" + break; + + case 99: /* comp_op: LIKE */ +#line 764 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2482 "yacc_sql.cpp" +#line 2571 "yacc_sql.cpp" break; - case 94: /* comp_op: NOT LIKE */ -#line 711 "yacc_sql.y" + case 100: /* comp_op: NOT LIKE */ +#line 765 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2488 "yacc_sql.cpp" +#line 2577 "yacc_sql.cpp" + break; + + case 101: /* opt_order_by: %empty */ +#line 770 "yacc_sql.y" + { + (yyval.orderby_list) = nullptr; + } +#line 2585 "yacc_sql.cpp" + break; + + case 102: /* opt_order_by: ORDER BY sort_list */ +#line 774 "yacc_sql.y" + { + (yyval.orderby_list) = (yyvsp[0].orderby_list); + std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); + } +#line 2594 "yacc_sql.cpp" + break; + + case 103: /* sort_list: sort_unit */ +#line 781 "yacc_sql.y" + { + (yyval.orderby_list) = new std::vector; + (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); + } +#line 2603 "yacc_sql.cpp" + break; + + case 104: /* sort_list: sort_unit COMMA sort_list */ +#line 787 "yacc_sql.y" + { + (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); + (yyval.orderby_list) = (yyvsp[0].orderby_list); + } +#line 2612 "yacc_sql.cpp" break; - case 95: /* group_by: %empty */ -#line 717 "yacc_sql.y" + case 105: /* sort_unit: expression */ +#line 794 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + (yyval.orderby_unit)->is_asc = true; + } +#line 2622 "yacc_sql.cpp" + break; + + case 106: /* sort_unit: expression DESC */ +#line 801 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + (yyval.orderby_unit)->is_asc = false; + } +#line 2632 "yacc_sql.cpp" + break; + + case 107: /* sort_unit: expression ASC */ +#line 808 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode();//默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + (yyval.orderby_unit)->is_asc = true; + } +#line 2642 "yacc_sql.cpp" + break; + + case 108: /* group_by: %empty */ +#line 816 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2496 "yacc_sql.cpp" +#line 2650 "yacc_sql.cpp" break; - case 96: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 723 "yacc_sql.y" + case 109: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 822 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2506,20 +2660,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2510 "yacc_sql.cpp" +#line 2664 "yacc_sql.cpp" break; - case 97: /* explain_stmt: EXPLAIN command_wrapper */ -#line 736 "yacc_sql.y" + case 110: /* explain_stmt: EXPLAIN command_wrapper */ +#line 835 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2519 "yacc_sql.cpp" +#line 2673 "yacc_sql.cpp" break; - case 98: /* set_variable_stmt: SET ID EQ value */ -#line 744 "yacc_sql.y" + case 111: /* set_variable_stmt: SET ID EQ value */ +#line 843 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2527,11 +2681,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2531 "yacc_sql.cpp" +#line 2685 "yacc_sql.cpp" break; -#line 2535 "yacc_sql.cpp" +#line 2689 "yacc_sql.cpp" default: break; } @@ -2760,7 +2914,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 756 "yacc_sql.y" +#line 855 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 7e9aad01..dd834b63 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -56,63 +56,65 @@ extern int yydebug; YYUNDEF = 257, /* "invalid token" */ SEMICOLON = 258, /* SEMICOLON */ AS = 259, /* AS */ - BY = 260, /* BY */ - CREATE = 261, /* CREATE */ - DROP = 262, /* DROP */ - GROUP = 263, /* GROUP */ - TABLE = 264, /* TABLE */ - TABLES = 265, /* TABLES */ - INDEX = 266, /* INDEX */ - CALC = 267, /* CALC */ - SELECT = 268, /* SELECT */ - DESC = 269, /* DESC */ - SHOW = 270, /* SHOW */ - SYNC = 271, /* SYNC */ - INSERT = 272, /* INSERT */ - DELETE = 273, /* DELETE */ - UPDATE = 274, /* UPDATE */ - LBRACE = 275, /* LBRACE */ - RBRACE = 276, /* RBRACE */ - COMMA = 277, /* COMMA */ - TRX_BEGIN = 278, /* TRX_BEGIN */ - TRX_COMMIT = 279, /* TRX_COMMIT */ - TRX_ROLLBACK = 280, /* TRX_ROLLBACK */ - INT_T = 281, /* INT_T */ - STRING_T = 282, /* STRING_T */ - FLOAT_T = 283, /* FLOAT_T */ - DATE_T = 284, /* DATE_T */ - NOT = 285, /* NOT */ - NULL_T = 286, /* NULL_T */ - NULLABLE = 287, /* NULLABLE */ - HELP = 288, /* HELP */ - EXIT = 289, /* EXIT */ - DOT = 290, /* DOT */ - INTO = 291, /* INTO */ - VALUES = 292, /* VALUES */ - FROM = 293, /* FROM */ - WHERE = 294, /* WHERE */ - AND = 295, /* AND */ - SET = 296, /* SET */ - ON = 297, /* ON */ - LOAD = 298, /* LOAD */ - DATA = 299, /* DATA */ - INFILE = 300, /* INFILE */ - EXPLAIN = 301, /* EXPLAIN */ - STORAGE = 302, /* STORAGE */ - FORMAT = 303, /* FORMAT */ - EQ = 304, /* EQ */ - LT = 305, /* LT */ - GT = 306, /* GT */ - LE = 307, /* LE */ - GE = 308, /* GE */ - NE = 309, /* NE */ - LIKE = 310, /* LIKE */ - IS = 311, /* IS */ - NUMBER = 312, /* NUMBER */ - FLOAT = 313, /* FLOAT */ - ID = 314, /* ID */ - SSS = 315, /* SSS */ - UMINUS = 316 /* UMINUS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + GROUP = 264, /* GROUP */ + ORDER = 265, /* ORDER */ + TABLE = 266, /* TABLE */ + TABLES = 267, /* TABLES */ + INDEX = 268, /* INDEX */ + CALC = 269, /* CALC */ + SELECT = 270, /* SELECT */ + DESC = 271, /* DESC */ + SHOW = 272, /* SHOW */ + SYNC = 273, /* SYNC */ + INSERT = 274, /* INSERT */ + DELETE = 275, /* DELETE */ + UPDATE = 276, /* UPDATE */ + LBRACE = 277, /* LBRACE */ + RBRACE = 278, /* RBRACE */ + COMMA = 279, /* COMMA */ + TRX_BEGIN = 280, /* TRX_BEGIN */ + TRX_COMMIT = 281, /* TRX_COMMIT */ + TRX_ROLLBACK = 282, /* TRX_ROLLBACK */ + INT_T = 283, /* INT_T */ + STRING_T = 284, /* STRING_T */ + FLOAT_T = 285, /* FLOAT_T */ + DATE_T = 286, /* DATE_T */ + NOT = 287, /* NOT */ + NULL_T = 288, /* NULL_T */ + NULLABLE = 289, /* NULLABLE */ + HELP = 290, /* HELP */ + EXIT = 291, /* EXIT */ + DOT = 292, /* DOT */ + INTO = 293, /* INTO */ + VALUES = 294, /* VALUES */ + FROM = 295, /* FROM */ + WHERE = 296, /* WHERE */ + AND = 297, /* AND */ + SET = 298, /* SET */ + ON = 299, /* ON */ + LOAD = 300, /* LOAD */ + DATA = 301, /* DATA */ + INFILE = 302, /* INFILE */ + EXPLAIN = 303, /* EXPLAIN */ + STORAGE = 304, /* STORAGE */ + FORMAT = 305, /* FORMAT */ + EQ = 306, /* EQ */ + LT = 307, /* LT */ + GT = 308, /* GT */ + LE = 309, /* LE */ + GE = 310, /* GE */ + NE = 311, /* NE */ + LIKE = 312, /* LIKE */ + IS = 313, /* IS */ + NUMBER = 314, /* NUMBER */ + FLOAT = 315, /* FLOAT */ + ID = 316, /* ID */ + SSS = 317, /* SSS */ + UMINUS = 318 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -121,7 +123,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 123 "yacc_sql.y" +#line 125 "yacc_sql.y" ParsedSqlNode * sql_node; ConditionSqlNode * condition; @@ -136,12 +138,14 @@ union YYSTYPE std::vector * condition_list; std::vector * rel_attr_list; std::vector * relation_list; + OrderBySqlNode* orderby_unit; + std::vector * orderby_list; char * string; int number; float floats; bool nullable_info; -#line 145 "yacc_sql.hpp" +#line 149 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 17f871db..d4e85e5b 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -66,10 +66,12 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, //标识tokens %token SEMICOLON AS + ASC BY CREATE DROP GROUP + ORDER TABLE TABLES INDEX @@ -134,6 +136,8 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, std::vector * condition_list; std::vector * rel_attr_list; std::vector * relation_list; + OrderBySqlNode* orderby_unit; + std::vector * orderby_list; char * string; int number; float floats; @@ -167,6 +171,9 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type aggr_func_expr %type expression_list %type group_by +%type sort_unit +%type sort_list +%type opt_order_by %type calc_stmt %type select_stmt %type insert_stmt @@ -494,7 +501,7 @@ update_stmt: /* update 语句的语法解析树*/ } ; select_stmt: /* select 语句的语法解析树*/ - SELECT expression_list FROM rel_list where group_by + SELECT expression_list FROM rel_list where group_by opt_order_by { $$ = new ParsedSqlNode(SCF_SELECT); if ($2 != nullptr) { @@ -516,6 +523,11 @@ select_stmt: /* select 语句的语法解析树*/ $$->selection.group_by.swap(*$6); delete $6; } + + if ($7 != nullptr) { + $$->selection.order_by.swap(*$7); + delete $7; + } } ; calc_stmt: @@ -753,7 +765,52 @@ comp_op: | NOT LIKE {$$ = NOT_LIKE_OP;} ; -// your code here +opt_order_by: + /* empty */ + { + $$ = nullptr; + } + | ORDER BY sort_list + { + $$ = $3; + std::reverse($$->begin(),$$->end()); + } +; +sort_list: + sort_unit + { + $$ = new std::vector; + $$->emplace_back(std::move(*$1)); + } + | + sort_unit COMMA sort_list + { + $3->emplace_back(std::move(*$1)); + $$ = $3; + } + ; +sort_unit: + expression + { + $$ = new OrderBySqlNode(); + $$->expr = std::unique_ptr($1); + $$->is_asc = true; + } + | + expression DESC + { + $$ = new OrderBySqlNode(); + $$->expr = std::unique_ptr($1); + $$->is_asc = false; + } + | + expression ASC + { + $$ = new OrderBySqlNode();//默认是升序 + $$->expr = std::unique_ptr($1); + $$->is_asc = true; + } + ; group_by: /* empty */ { From 3cfa825e481eaf258b21b83d1f5ff9bf3b6dad51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Sat, 28 Sep 2024 11:45:48 +0000 Subject: [PATCH 047/308] =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.h | 1 + src/observer/sql/parser/lex_sql.l | 2 ++ src/observer/sql/parser/parse_defs.h | 28 ++++++++++++++++------------ src/observer/sql/parser/yacc_sql.y | 2 ++ 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 936c1afd..bc403db0 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -48,6 +48,7 @@ enum class ExprType CONJUNCTION, ///< 多个表达式使用同一种关系(AND或OR)来联结 ARITHMETIC, ///< 算术运算 AGGREGATION, ///< 聚合运算 + SUBQUERY, ///< 子查询 }; /** diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 1a2d64ba..fd06b5a8 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -122,6 +122,8 @@ ORDER RETURN_TOKEN(ORDER); BY RETURN_TOKEN(BY); AS RETURN_TOKEN(AS); ASC RETURN_TOKEN(ASC); +IN RETURN_TOKEN(IN); +EXISTS RETURN_TOKEN(EXISTS); STORAGE RETURN_TOKEN(STORAGE); FORMAT RETURN_TOKEN(FORMAT); "(" RETURN_TOKEN(LBRACE); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 8042fadb..bedbe6f5 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -46,16 +46,20 @@ struct RelAttrSqlNode */ enum CompOp { - EQUAL_TO, ///< "=" - LESS_EQUAL, ///< "<=" - NOT_EQUAL, ///< "<>" - LESS_THAN, ///< "<" - GREAT_EQUAL, ///< ">=" - GREAT_THAN, ///< ">" - OP_IS, ///< "IS" - OP_IS_NOT, ///< "IS NOT" - LIKE_OP, ///< "like" - NOT_LIKE_OP, ///< "not like" + EQUAL_TO, ///< "=" + LESS_EQUAL, ///< "<=" + NOT_EQUAL, ///< "<>" + LESS_THAN, ///< "<" + GREAT_EQUAL, ///< ">=" + GREAT_THAN, ///< ">" + OP_IS, ///< "IS" + OP_IS_NOT, ///< "IS NOT" + LIKE_OP, ///< "like" + NOT_LIKE_OP, ///< "not like" + IN_OP, ///< "in (sub query)" + NOT_IN_OP, ///< "not in (sub query)" + EXISTS_OP, ///< "exists (sub query)" + NOT_EXISTS_OP, ///< "not exists (sub query)" NO_OP }; @@ -96,8 +100,8 @@ struct RelationNode */ struct OrderBySqlNode { - std::unique_ptr expr ; - bool is_asc ; ///< 默认true 为升序 + std::unique_ptr expr; + bool is_asc; ///< 默认true 为升序 }; /** diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index d4e85e5b..f91c0bc5 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -70,6 +70,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, BY CREATE DROP + EXISTS GROUP ORDER TABLE @@ -90,6 +91,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, TRX_COMMIT TRX_ROLLBACK INT_T + IN STRING_T FLOAT_T DATE_T From 68f4c9eaeb7ac7df421f9ea41176775ff2941234 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 28 Sep 2024 23:25:33 +0800 Subject: [PATCH 048/308] =?UTF-8?q?fix:=20yacc=5Fsql.y=20=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/yacc_sql.cpp | 4 ++-- src/observer/sql/parser/yacc_sql.y | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 2ed8cbc3..a3b1c206 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -2142,7 +2142,7 @@ YYLTYPE yylloc = yyloc_default; if ((yyvsp[-5].string) != nullptr) { (yyval.sql_node)->selection.relations.emplace_back((yyvsp[-5].string)); - delete (yyvsp[-5].string); + free((yyvsp[-5].string)); } if ((yyvsp[-1].condition_list) != nullptr) { @@ -2350,7 +2350,7 @@ YYLTYPE yylloc = yyloc_default; #line 653 "yacc_sql.y" { (yyval.relation_list)->emplace_back((yyvsp[0].string)); - delete (yyvsp[0].string); + free((yyvsp[0].string)); } #line 2356 "yacc_sql.cpp" break; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 564200b6..5799d6e1 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -518,7 +518,7 @@ select_stmt: /* select 语句的语法解析树*/ if ($4 != nullptr) { $$->selection.relations.emplace_back($4); - delete $4; + free($4); } if ($8 != nullptr) { @@ -652,7 +652,7 @@ rel_list: | rel_list COMMA relation { $$->emplace_back($3); - delete $3; + free($3); } ; From 7a859cb7f8d0e08d752a9bbba6b8a7d7e161bb8b Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 29 Sep 2024 02:03:30 +0800 Subject: [PATCH 049/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/operator/insert_logical_operator.cpp | 3 +- .../sql/operator/insert_logical_operator.h | 15 +- .../sql/operator/insert_physical_operator.cpp | 40 +- .../sql/operator/insert_physical_operator.h | 8 +- .../sql/optimizer/logical_plan_generator.cpp | 5 +- .../sql/optimizer/physical_plan_generator.cpp | 4 +- src/observer/sql/parser/parse_defs.h | 4 +- src/observer/sql/parser/yacc_sql.cpp | 795 +++++++++--------- src/observer/sql/parser/yacc_sql.hpp | 3 +- src/observer/sql/parser/yacc_sql.y | 47 +- src/observer/sql/stmt/insert_stmt.cpp | 22 +- src/observer/sql/stmt/insert_stmt.h | 16 +- 12 files changed, 502 insertions(+), 460 deletions(-) diff --git a/src/observer/sql/operator/insert_logical_operator.cpp b/src/observer/sql/operator/insert_logical_operator.cpp index 09f30e44..15d3f509 100644 --- a/src/observer/sql/operator/insert_logical_operator.cpp +++ b/src/observer/sql/operator/insert_logical_operator.cpp @@ -14,5 +14,6 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/insert_logical_operator.h" -InsertLogicalOperator::InsertLogicalOperator(Table *table, std::vector values) : table_(table), values_(values) +InsertLogicalOperator::InsertLogicalOperator(Table *table, const std::vector> &values_list) + : table_(table), values_list_(values_list) {} diff --git a/src/observer/sql/operator/insert_logical_operator.h b/src/observer/sql/operator/insert_logical_operator.h index 18d9178a..c8a5db13 100644 --- a/src/observer/sql/operator/insert_logical_operator.h +++ b/src/observer/sql/operator/insert_logical_operator.h @@ -26,16 +26,15 @@ See the Mulan PSL v2 for more details. */ class InsertLogicalOperator : public LogicalOperator { public: - InsertLogicalOperator(Table *table, std::vector values); - virtual ~InsertLogicalOperator() = default; + InsertLogicalOperator(Table *table, const std::vector> &); + ~InsertLogicalOperator() override = default; LogicalOperatorType type() const override { return LogicalOperatorType::INSERT; } - Table *table() const { return table_; } - const std::vector &values() const { return values_; } - std::vector &values() { return values_; } + Table *table() const { return table_; } + const std::vector> &values_list() const { return values_list_; }; private: - Table *table_ = nullptr; - std::vector values_; -}; \ No newline at end of file + Table *table_ = nullptr; + const std::vector> &values_list_; +}; diff --git a/src/observer/sql/operator/insert_physical_operator.cpp b/src/observer/sql/operator/insert_physical_operator.cpp index fd1bc908..d8f6130a 100644 --- a/src/observer/sql/operator/insert_physical_operator.cpp +++ b/src/observer/sql/operator/insert_physical_operator.cpp @@ -17,25 +17,41 @@ See the Mulan PSL v2 for more details. */ #include "storage/table/table.h" #include "storage/trx/trx.h" -using namespace std; - -InsertPhysicalOperator::InsertPhysicalOperator(Table *table, vector &&values) - : table_(table), values_(std::move(values)) +InsertPhysicalOperator::InsertPhysicalOperator(Table *table, const std::vector> &values_list) + : table_(table), values_list_(values_list) {} RC InsertPhysicalOperator::open(Trx *trx) { - Record record; - RC rc = table_->make_record(static_cast(values_.size()), values_.data(), record); - if (rc != RC::SUCCESS) { - LOG_WARN("failed to make record. rc=%s", strrc(rc)); - return rc; + RC rc; + std::vector records(values_list_.size()); + for (int i = 0; i < values_list_.size(); ++i) { + rc = table_->make_record(static_cast(values_list_[i].size()), values_list_[i].data(), records[i]); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to make record. rc=%s", strrc(rc)); + return rc; + } } - rc = trx->insert_record(table_, record); - if (rc != RC::SUCCESS) { - LOG_WARN("failed to insert record by transaction. rc=%s", strrc(rc)); + for (int i = 0; i < records.size(); ++i) { + rc = trx->insert_record(table_, records[i]); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to insert record by transaction. rc=%s", strrc(rc)); + // 要么都插入成功,要么都不插入 + LOG_INFO("Rolling back previously inserted records up to index %d", i - 1); + while (--i >= 0) { + // 删除之前插入成功的 + RC rc2 = trx->delete_record(table_, records[i]); + if (rc2 != RC::SUCCESS) { + LOG_WARN("failed to delete record by transaction. rc=%s", strrc(rc2)); + } else { + LOG_INFO("Successfully deleted record at index %d", i); + } + } + return rc; + } } + return rc; } diff --git a/src/observer/sql/operator/insert_physical_operator.h b/src/observer/sql/operator/insert_physical_operator.h index ac47a538..32750c03 100644 --- a/src/observer/sql/operator/insert_physical_operator.h +++ b/src/observer/sql/operator/insert_physical_operator.h @@ -27,9 +27,9 @@ class InsertStmt; class InsertPhysicalOperator : public PhysicalOperator { public: - InsertPhysicalOperator(Table *table, std::vector &&values); + InsertPhysicalOperator(Table *table, const std::vector> &values_list); - virtual ~InsertPhysicalOperator() = default; + ~InsertPhysicalOperator() override = default; PhysicalOperatorType type() const override { return PhysicalOperatorType::INSERT; } @@ -40,6 +40,6 @@ class InsertPhysicalOperator : public PhysicalOperator Tuple *current_tuple() override { return nullptr; } private: - Table *table_ = nullptr; - std::vector values_; + Table *table_ = nullptr; + const std::vector> &values_list_; }; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 06dd61e1..892283f2 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -234,10 +234,7 @@ int LogicalPlanGenerator::implicit_cast_cost(AttrType from, AttrType to) RC LogicalPlanGenerator::create_plan(InsertStmt *insert_stmt, unique_ptr &logical_operator) { - Table *table = insert_stmt->table(); - vector values(insert_stmt->values(), insert_stmt->values() + insert_stmt->value_amount()); - - InsertLogicalOperator *insert_operator = new InsertLogicalOperator(table, values); + auto insert_operator = new InsertLogicalOperator(insert_stmt->table(), insert_stmt->values_list()); logical_operator.reset(insert_operator); return RC::SUCCESS; } diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index 4b32bbc0..946bc66f 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -249,9 +249,7 @@ RC PhysicalPlanGenerator::create_plan(ProjectLogicalOperator &project_oper, uniq RC PhysicalPlanGenerator::create_plan(InsertLogicalOperator &insert_oper, unique_ptr &oper) { - Table *table = insert_oper.table(); - vector &values = insert_oper.values(); - InsertPhysicalOperator *insert_phy_oper = new InsertPhysicalOperator(table, std::move(values)); + auto insert_phy_oper = new InsertPhysicalOperator(insert_oper.table(), insert_oper.values_list()); oper.reset(insert_phy_oper); return RC::SUCCESS; } diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 297a67c6..e4f2216a 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -120,8 +120,8 @@ struct CalcSqlNode */ struct InsertSqlNode { - std::string relation_name; ///< Relation to insert into - std::vector values; ///< 要插入的值 + std::string relation_name; ///< Relation to insert into + std::vector> values_list; ///< 要插入的值列表 }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index a3b1c206..3675ccee 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -231,32 +231,33 @@ enum yysymbol_kind_t YYSYMBOL_number = 79, /* number */ YYSYMBOL_type = 80, /* type */ YYSYMBOL_insert_stmt = 81, /* insert_stmt */ - YYSYMBOL_value_list = 82, /* value_list */ - YYSYMBOL_value = 83, /* value */ - YYSYMBOL_storage_format = 84, /* storage_format */ - YYSYMBOL_delete_stmt = 85, /* delete_stmt */ - YYSYMBOL_update_stmt = 86, /* update_stmt */ - YYSYMBOL_setClauses = 87, /* setClauses */ - YYSYMBOL_setClause = 88, /* setClause */ - YYSYMBOL_select_stmt = 89, /* select_stmt */ - YYSYMBOL_calc_stmt = 90, /* calc_stmt */ - YYSYMBOL_expression_list = 91, /* expression_list */ - YYSYMBOL_expression = 92, /* expression */ - YYSYMBOL_aggr_func_expr = 93, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 94, /* rel_attr */ - YYSYMBOL_relation = 95, /* relation */ - YYSYMBOL_rel_list = 96, /* rel_list */ - YYSYMBOL_joinClause = 97, /* joinClause */ - YYSYMBOL_joinClauses = 98, /* joinClauses */ - YYSYMBOL_where = 99, /* where */ - YYSYMBOL_condition_list = 100, /* condition_list */ - YYSYMBOL_condition = 101, /* condition */ - YYSYMBOL_comp_op = 102, /* comp_op */ - YYSYMBOL_group_by = 103, /* group_by */ - YYSYMBOL_load_data_stmt = 104, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 105, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 106, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 107 /* opt_semicolon */ + YYSYMBOL_values_list = 82, /* values_list */ + YYSYMBOL_value_list = 83, /* value_list */ + YYSYMBOL_value = 84, /* value */ + YYSYMBOL_storage_format = 85, /* storage_format */ + YYSYMBOL_delete_stmt = 86, /* delete_stmt */ + YYSYMBOL_update_stmt = 87, /* update_stmt */ + YYSYMBOL_setClauses = 88, /* setClauses */ + YYSYMBOL_setClause = 89, /* setClause */ + YYSYMBOL_select_stmt = 90, /* select_stmt */ + YYSYMBOL_calc_stmt = 91, /* calc_stmt */ + YYSYMBOL_expression_list = 92, /* expression_list */ + YYSYMBOL_expression = 93, /* expression */ + YYSYMBOL_aggr_func_expr = 94, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 95, /* rel_attr */ + YYSYMBOL_relation = 96, /* relation */ + YYSYMBOL_rel_list = 97, /* rel_list */ + YYSYMBOL_joinClause = 98, /* joinClause */ + YYSYMBOL_joinClauses = 99, /* joinClauses */ + YYSYMBOL_where = 100, /* where */ + YYSYMBOL_condition_list = 101, /* condition_list */ + YYSYMBOL_condition = 102, /* condition */ + YYSYMBOL_comp_op = 103, /* comp_op */ + YYSYMBOL_group_by = 104, /* group_by */ + YYSYMBOL_load_data_stmt = 105, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 106, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 107, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 108 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -587,16 +588,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 66 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 167 +#define YYLAST 173 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 62 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 46 +#define YYNNTS 47 /* YYNRULES -- Number of rules. */ -#define YYNRULES 102 +#define YYNRULES 104 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 188 +#define YYNSTATES 192 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 312 @@ -651,17 +652,17 @@ static const yytype_int8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 200, 200, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 231, 237, 242, 248, 254, 260, 266, - 273, 279, 287, 301, 311, 335, 338, 351, 359, 369, - 372, 373, 374, 375, 378, 395, 398, 409, 413, 417, - 426, 429, 436, 449, 464, 470, 478, 488, 511, 547, - 556, 561, 572, 575, 578, 581, 584, 588, 591, 596, - 602, 605, 611, 619, 625, 630, 640, 646, 652, 660, - 671, 677, 687, 690, 696, 699, 704, 711, 723, 735, - 747, 762, 763, 764, 765, 766, 767, 773, 778, 791, - 799, 809, 810 + 0, 202, 202, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 233, 239, 244, 250, 256, 262, 268, + 275, 281, 289, 303, 313, 337, 340, 353, 361, 371, + 374, 375, 376, 377, 381, 394, 400, 407, 413, 421, + 425, 429, 439, 442, 449, 462, 477, 483, 491, 501, + 524, 560, 569, 574, 585, 588, 591, 594, 597, 601, + 604, 609, 615, 618, 624, 632, 638, 643, 653, 659, + 665, 673, 684, 690, 700, 703, 709, 712, 717, 724, + 736, 748, 760, 775, 776, 777, 778, 779, 780, 786, + 791, 804, 812, 822, 823 }; #endif @@ -690,12 +691,12 @@ static const char *const yytname[] = "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", "create_index_stmt", "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", "number", "type", "insert_stmt", - "value_list", "value", "storage_format", "delete_stmt", "update_stmt", - "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", - "expression", "aggr_func_expr", "rel_attr", "relation", "rel_list", - "joinClause", "joinClauses", "where", "condition_list", "condition", - "comp_op", "group_by", "load_data_stmt", "explain_stmt", - "set_variable_stmt", "opt_semicolon", YY_NULLPTR + "values_list", "value_list", "value", "storage_format", "delete_stmt", + "update_stmt", "setClauses", "setClause", "select_stmt", "calc_stmt", + "expression_list", "expression", "aggr_func_expr", "rel_attr", + "relation", "rel_list", "joinClause", "joinClauses", "where", + "condition_list", "condition", "comp_op", "group_by", "load_data_stmt", + "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; static const char * @@ -705,7 +706,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-144) +#define YYPACT_NINF (-148) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -719,25 +720,26 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 78, 1, 77, 11, 11, -43, 6, -144, -12, -5, - -23, -144, -144, -144, -144, -144, 13, 33, 78, 38, - 79, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, 42, 43, 44, 58, 11, -144, -144, -9, -144, - 11, -144, -144, -144, -17, -144, -144, 71, -144, -144, - 59, 61, 49, 72, 80, -144, -144, -144, -144, 99, - 84, -144, 85, -3, -6, 69, -144, 11, 11, 11, - 11, 11, 70, 93, 92, 73, 50, 74, 76, 81, - 82, -144, -144, 109, -144, -144, -1, -1, -144, -144, - -144, 87, -16, 114, -19, -144, 88, -14, -144, -144, - 102, 52, 117, 120, -144, -144, 94, 70, -144, 50, - 110, -24, -24, -144, 106, 50, 73, -144, 135, -144, - -144, -144, -144, 125, 76, 126, 90, 70, -144, -144, - 127, -144, -144, -144, -144, -144, -144, -19, -19, -19, - -144, -144, 95, 96, 117, 104, 131, 115, 107, 92, - 50, 134, -144, -144, -144, -144, -144, -144, -144, 136, - -144, 111, -144, -144, -19, 112, -144, 127, -144, -144, - 113, -144, 70, -144, -144, 108, -144, -144 + 82, 22, 53, 27, 27, -46, 45, -148, 52, 43, + -36, -148, -148, -148, -148, -148, 36, 63, 82, 109, + 107, -148, -148, -148, -148, -148, -148, -148, -148, -148, + -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, + -148, 58, 59, 60, 61, 27, -148, -148, -8, -148, + 27, -148, -148, -148, 0, -148, -148, 83, -148, -148, + 65, 67, 86, 71, 84, -148, -148, -148, -148, 108, + 88, -148, 90, -16, -3, 74, -148, 27, 27, 27, + 27, 27, 75, 98, 97, 78, 18, 79, 85, 89, + 91, -148, -148, 114, -148, -148, 30, 30, -148, -148, + -148, 92, -15, 117, -41, -148, 94, -13, -148, -148, + 106, 10, 118, 123, -148, -148, 99, 75, -148, 18, + 122, 116, -23, -23, -148, 112, 18, 78, -148, 141, + -148, -148, -148, -148, 131, 85, 132, 96, 75, -148, + -148, 81, -148, 134, -148, -148, -148, -148, -148, -148, + -41, -41, -41, -148, -148, 100, 101, 118, 113, 137, + 120, 115, 97, -148, 18, 18, -148, -148, -148, -148, + -148, -148, -148, 139, -148, 119, -148, -148, -41, 121, + -148, -148, 87, -148, 124, -148, 75, -148, -148, 110, + -148, -148 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -747,43 +749,44 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 101, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 103, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 47, 48, 74, 49, - 0, 70, 68, 59, 60, 71, 69, 0, 31, 30, - 0, 0, 0, 0, 0, 99, 1, 102, 2, 0, - 0, 29, 0, 0, 0, 0, 67, 0, 0, 0, - 0, 0, 0, 0, 82, 0, 0, 0, 0, 0, - 0, 66, 73, 0, 75, 61, 62, 63, 64, 65, - 76, 77, 82, 0, 84, 52, 0, 82, 54, 100, - 0, 0, 35, 0, 33, 72, 0, 0, 97, 0, - 74, 0, 0, 83, 85, 0, 0, 53, 0, 40, - 41, 42, 43, 38, 0, 0, 0, 0, 78, 57, - 45, 91, 92, 93, 94, 95, 96, 0, 0, 84, - 56, 55, 0, 0, 35, 50, 0, 0, 80, 82, - 0, 0, 88, 90, 87, 89, 86, 98, 39, 0, - 36, 0, 34, 32, 84, 0, 97, 45, 44, 37, - 0, 79, 0, 58, 46, 0, 81, 51 + 20, 0, 0, 0, 0, 0, 49, 50, 76, 51, + 0, 72, 70, 61, 62, 73, 71, 0, 31, 30, + 0, 0, 0, 0, 0, 101, 1, 104, 2, 0, + 0, 29, 0, 0, 0, 0, 69, 0, 0, 0, + 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, + 0, 68, 75, 0, 77, 63, 64, 65, 66, 67, + 78, 79, 84, 0, 86, 54, 0, 84, 56, 102, + 0, 0, 35, 0, 33, 74, 0, 0, 99, 0, + 44, 76, 0, 0, 85, 87, 0, 0, 55, 0, + 40, 41, 42, 43, 38, 0, 0, 0, 0, 80, + 59, 0, 47, 0, 93, 94, 95, 96, 97, 98, + 0, 0, 86, 58, 57, 0, 0, 35, 52, 0, + 0, 82, 84, 45, 0, 0, 90, 92, 89, 91, + 88, 100, 39, 0, 36, 0, 34, 32, 86, 0, + 99, 48, 0, 37, 0, 81, 0, 60, 46, 0, + 83, 53 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -144, -144, 139, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, 5, 27, -144, -144, -144, - -15, -86, -144, -144, -144, -144, 39, -144, -144, -2, - 31, -144, -103, -66, -144, -144, -18, -99, -143, -144, - 45, -10, -144, -144, -144, -144 + -148, -148, 143, -148, -148, -148, -148, -148, -148, -148, + -148, -148, -148, -148, -148, 5, 29, -148, -148, -148, + -148, 1, -86, -148, -148, -148, -148, 41, -148, -148, + -1, -11, -148, -103, -72, -148, -148, -17, -100, -147, + -148, 47, -7, -148, -148, -148, -148 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 135, 112, 169, 133, 33, - 161, 52, 172, 34, 35, 107, 108, 36, 37, 53, - 54, 55, 56, 157, 102, 158, 159, 105, 123, 124, - 147, 139, 38, 39, 40, 68 + 28, 29, 30, 31, 32, 136, 112, 173, 134, 33, + 120, 141, 52, 176, 34, 35, 107, 108, 36, 37, + 53, 54, 55, 56, 160, 102, 161, 162, 105, 124, + 125, 150, 140, 38, 39, 40, 68 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -791,44 +794,46 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 109, 122, 57, 118, 77, 117, 166, 126, 127, 41, - 74, 42, 58, 45, 92, 59, 101, 91, 121, 104, - 60, 104, 75, 141, 142, 143, 144, 145, 146, 61, - 45, 181, 62, 140, 46, 47, 120, 49, 66, 150, - 78, 79, 80, 81, 163, 165, 122, 46, 47, 48, - 49, 138, 50, 51, 78, 79, 80, 81, 80, 81, - 176, 162, 164, 121, 46, 47, 48, 49, 63, 50, - 51, 122, 93, 64, 177, 95, 73, 129, 130, 131, - 132, 76, 67, 1, 2, 43, 85, 44, 121, 3, - 4, 5, 6, 7, 8, 9, 10, 69, 70, 71, - 11, 12, 13, 46, 47, 82, 49, 14, 15, 96, - 97, 98, 99, 72, 83, 16, 84, 17, 88, 86, - 18, 87, 89, 90, 94, 100, 103, 104, 106, 115, - 110, 111, 116, 119, 128, 125, 113, 114, 134, 136, - 137, 75, 149, 152, 153, 156, 155, 171, 160, 168, - 167, 173, 175, 174, 178, 180, 179, 65, 182, 170, - 185, 154, 184, 187, 186, 151, 183, 148 + 109, 123, 118, 57, 91, 170, 117, 128, 127, 58, + 101, 74, 46, 47, 121, 49, 45, 92, 122, 62, + 104, 77, 104, 75, 144, 145, 146, 147, 148, 149, + 41, 185, 42, 142, 73, 130, 131, 132, 133, 76, + 153, 78, 79, 80, 81, 139, 45, 167, 169, 123, + 46, 47, 48, 49, 59, 50, 51, 78, 79, 80, + 81, 43, 180, 44, 166, 168, 122, 96, 97, 98, + 99, 46, 47, 93, 49, 123, 95, 61, 181, 142, + 46, 47, 48, 49, 60, 50, 51, 1, 2, 80, + 81, 63, 122, 3, 4, 5, 6, 7, 8, 9, + 10, 163, 164, 64, 11, 12, 13, 188, 164, 66, + 67, 14, 15, 69, 70, 71, 72, 82, 86, 16, + 83, 17, 84, 85, 18, 87, 89, 88, 90, 94, + 100, 103, 104, 106, 115, 110, 119, 116, 129, 135, + 111, 126, 137, 143, 113, 138, 114, 75, 152, 155, + 156, 159, 158, 165, 172, 171, 175, 177, 178, 183, + 179, 65, 174, 184, 157, 191, 182, 186, 154, 190, + 151, 189, 0, 187 }; -static const yytype_uint8 yycheck[] = +static const yytype_int16 yycheck[] = { - 86, 104, 4, 102, 21, 21, 149, 21, 107, 8, - 19, 10, 55, 19, 20, 9, 82, 20, 104, 35, - 32, 35, 31, 47, 48, 49, 50, 51, 52, 34, - 19, 174, 55, 119, 53, 54, 55, 56, 0, 125, - 57, 58, 59, 60, 147, 148, 149, 53, 54, 55, - 56, 117, 58, 59, 57, 58, 59, 60, 59, 60, - 159, 147, 148, 149, 53, 54, 55, 56, 55, 58, - 59, 174, 74, 40, 160, 77, 45, 25, 26, 27, - 28, 50, 3, 5, 6, 8, 37, 10, 174, 11, - 12, 13, 14, 15, 16, 17, 18, 55, 55, 55, - 22, 23, 24, 53, 54, 34, 56, 29, 30, 78, - 79, 80, 81, 55, 55, 37, 55, 39, 19, 47, - 42, 41, 38, 38, 55, 55, 33, 35, 55, 20, - 56, 55, 45, 19, 32, 47, 55, 55, 21, 19, - 46, 31, 36, 8, 19, 55, 20, 43, 21, 53, - 55, 20, 45, 38, 20, 44, 20, 18, 46, 154, - 47, 134, 177, 55, 182, 126, 176, 122 + 86, 104, 102, 4, 20, 152, 21, 107, 21, 55, + 82, 19, 53, 54, 55, 56, 19, 20, 104, 55, + 35, 21, 35, 31, 47, 48, 49, 50, 51, 52, + 8, 178, 10, 119, 45, 25, 26, 27, 28, 50, + 126, 57, 58, 59, 60, 117, 19, 150, 151, 152, + 53, 54, 55, 56, 9, 58, 59, 57, 58, 59, + 60, 8, 162, 10, 150, 151, 152, 78, 79, 80, + 81, 53, 54, 74, 56, 178, 77, 34, 164, 165, + 53, 54, 55, 56, 32, 58, 59, 5, 6, 59, + 60, 55, 178, 11, 12, 13, 14, 15, 16, 17, + 18, 20, 21, 40, 22, 23, 24, 20, 21, 0, + 3, 29, 30, 55, 55, 55, 55, 34, 47, 37, + 55, 39, 55, 37, 42, 41, 38, 19, 38, 55, + 55, 33, 35, 55, 20, 56, 19, 45, 32, 21, + 55, 47, 19, 21, 55, 46, 55, 31, 36, 8, + 19, 55, 20, 19, 53, 55, 43, 20, 38, 20, + 45, 18, 157, 44, 135, 55, 165, 46, 127, 186, + 123, 47, -1, 180 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -838,22 +843,23 @@ static const yytype_int8 yystos[] = 0, 5, 6, 11, 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 29, 30, 37, 39, 42, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 81, 85, 86, 89, 90, 104, 105, - 106, 8, 10, 8, 10, 19, 53, 54, 55, 56, - 58, 59, 83, 91, 92, 93, 94, 91, 55, 9, - 32, 34, 55, 55, 40, 64, 0, 3, 107, 55, - 55, 55, 55, 92, 19, 31, 92, 21, 57, 58, + 74, 75, 76, 81, 86, 87, 90, 91, 105, 106, + 107, 8, 10, 8, 10, 19, 53, 54, 55, 56, + 58, 59, 84, 92, 93, 94, 95, 92, 55, 9, + 32, 34, 55, 55, 40, 64, 0, 3, 108, 55, + 55, 55, 55, 93, 19, 31, 93, 21, 57, 58, 59, 60, 34, 55, 55, 37, 47, 41, 19, 38, - 38, 20, 20, 91, 55, 91, 92, 92, 92, 92, - 55, 95, 96, 33, 35, 99, 55, 87, 88, 83, - 56, 55, 78, 55, 55, 20, 45, 21, 99, 19, - 55, 83, 94, 100, 101, 47, 21, 99, 32, 25, - 26, 27, 28, 80, 21, 77, 19, 46, 95, 103, - 83, 47, 48, 49, 50, 51, 52, 102, 102, 36, - 83, 88, 8, 19, 78, 20, 55, 95, 97, 98, - 21, 82, 83, 94, 83, 94, 100, 55, 53, 79, - 77, 43, 84, 20, 38, 45, 99, 83, 20, 20, - 44, 100, 46, 103, 82, 47, 98, 55 + 38, 20, 20, 92, 55, 92, 93, 93, 93, 93, + 55, 96, 97, 33, 35, 100, 55, 88, 89, 84, + 56, 55, 78, 55, 55, 20, 45, 21, 100, 19, + 82, 55, 84, 95, 101, 102, 47, 21, 100, 32, + 25, 26, 27, 28, 80, 21, 77, 19, 46, 96, + 104, 83, 84, 21, 47, 48, 49, 50, 51, 52, + 103, 103, 36, 84, 89, 8, 19, 78, 20, 55, + 96, 98, 99, 20, 21, 19, 84, 95, 84, 95, + 101, 55, 53, 79, 77, 43, 85, 20, 38, 45, + 100, 84, 83, 20, 44, 101, 46, 104, 20, 47, + 99, 55 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -863,13 +869,13 @@ static const yytype_int8 yyr1[] = 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 77, 78, 78, 79, - 80, 80, 80, 80, 81, 82, 82, 83, 83, 83, - 84, 84, 85, 86, 87, 87, 88, 89, 89, 90, - 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 93, 93, 94, 94, 95, 96, 96, 97, - 98, 98, 99, 99, 100, 100, 100, 101, 101, 101, - 101, 102, 102, 102, 102, 102, 102, 103, 104, 105, - 106, 107, 107 + 80, 80, 80, 80, 81, 82, 82, 83, 83, 84, + 84, 84, 85, 85, 86, 87, 88, 88, 89, 90, + 90, 91, 92, 92, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 94, 94, 95, 95, 96, 97, + 97, 98, 99, 99, 100, 100, 101, 101, 101, 102, + 102, 102, 102, 103, 103, 103, 103, 103, 103, 104, + 105, 106, 107, 108, 108 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -879,13 +885,13 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 8, 5, 8, 0, 3, 5, 2, 1, - 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, - 0, 4, 4, 5, 1, 3, 3, 6, 9, 2, - 1, 3, 3, 3, 3, 3, 3, 2, 1, 1, - 1, 1, 4, 3, 1, 3, 1, 1, 3, 3, - 1, 4, 0, 2, 0, 1, 3, 3, 3, 3, - 3, 1, 1, 1, 1, 1, 1, 0, 7, 2, - 4, 0, 1 + 1, 1, 1, 1, 5, 3, 5, 1, 3, 1, + 1, 1, 0, 4, 4, 5, 1, 3, 3, 6, + 9, 2, 1, 3, 3, 3, 3, 3, 3, 2, + 1, 1, 1, 1, 4, 3, 1, 3, 1, 1, + 3, 3, 1, 4, 0, 2, 0, 1, 3, 3, + 3, 3, 3, 1, 1, 1, 1, 1, 1, 0, + 7, 2, 4, 0, 1 }; @@ -1747,93 +1753,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 201 "yacc_sql.y" +#line 203 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1756 "yacc_sql.cpp" +#line 1762 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 231 "yacc_sql.y" +#line 233 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1765 "yacc_sql.cpp" +#line 1771 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 237 "yacc_sql.y" +#line 239 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1773 "yacc_sql.cpp" +#line 1779 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 242 "yacc_sql.y" +#line 244 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1781 "yacc_sql.cpp" +#line 1787 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 248 "yacc_sql.y" +#line 250 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1789 "yacc_sql.cpp" +#line 1795 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 254 "yacc_sql.y" +#line 256 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1797 "yacc_sql.cpp" +#line 1803 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 260 "yacc_sql.y" +#line 262 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1805 "yacc_sql.cpp" +#line 1811 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 266 "yacc_sql.y" +#line 268 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1815 "yacc_sql.cpp" +#line 1821 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 273 "yacc_sql.y" +#line 275 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1823 "yacc_sql.cpp" +#line 1829 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 279 "yacc_sql.y" +#line 281 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1833 "yacc_sql.cpp" +#line 1839 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 288 "yacc_sql.y" +#line 290 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1844,11 +1850,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1848 "yacc_sql.cpp" +#line 1854 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 302 "yacc_sql.y" +#line 304 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1856,11 +1862,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1860 "yacc_sql.cpp" +#line 1866 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 312 "yacc_sql.y" +#line 314 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1881,19 +1887,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1885 "yacc_sql.cpp" +#line 1891 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 335 "yacc_sql.y" +#line 337 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1893 "yacc_sql.cpp" +#line 1899 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 339 "yacc_sql.y" +#line 341 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1903,11 +1909,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1907 "yacc_sql.cpp" +#line 1913 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE */ -#line 352 "yacc_sql.y" +#line 354 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-3].number); @@ -1915,11 +1921,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = (yyvsp[-1].number); free((yyvsp[-4].string)); } -#line 1919 "yacc_sql.cpp" +#line 1925 "yacc_sql.cpp" break; case 38: /* attr_def: ID type */ -#line 360 "yacc_sql.y" +#line 362 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[0].number); @@ -1927,125 +1933,138 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; free((yyvsp[-1].string)); } -#line 1931 "yacc_sql.cpp" +#line 1937 "yacc_sql.cpp" break; case 39: /* number: NUMBER */ -#line 369 "yacc_sql.y" +#line 371 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1937 "yacc_sql.cpp" +#line 1943 "yacc_sql.cpp" break; case 40: /* type: INT_T */ -#line 372 "yacc_sql.y" +#line 374 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1943 "yacc_sql.cpp" +#line 1949 "yacc_sql.cpp" break; case 41: /* type: STRING_T */ -#line 373 "yacc_sql.y" +#line 375 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1949 "yacc_sql.cpp" +#line 1955 "yacc_sql.cpp" break; case 42: /* type: FLOAT_T */ -#line 374 "yacc_sql.y" +#line 376 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1955 "yacc_sql.cpp" +#line 1961 "yacc_sql.cpp" break; case 43: /* type: DATE_T */ -#line 375 "yacc_sql.y" +#line 377 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 1961 "yacc_sql.cpp" +#line 1967 "yacc_sql.cpp" break; - case 44: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 379 "yacc_sql.y" + case 44: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 382 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); - (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); - if ((yyvsp[-1].value_list) != nullptr) { - (yyval.sql_node)->insertion.values.swap(*(yyvsp[-1].value_list)); - delete (yyvsp[-1].value_list); + (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); + if ((yyvsp[0].values_list) != nullptr) { + (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); + delete (yyvsp[0].values_list); } - (yyval.sql_node)->insertion.values.emplace_back(*(yyvsp[-2].value)); - std::reverse((yyval.sql_node)->insertion.values.begin(), (yyval.sql_node)->insertion.values.end()); - delete (yyvsp[-2].value); - free((yyvsp[-5].string)); + free((yyvsp[-2].string)); } -#line 1978 "yacc_sql.cpp" +#line 1981 "yacc_sql.cpp" break; - case 45: /* value_list: %empty */ + case 45: /* values_list: LBRACE value_list RBRACE */ #line 395 "yacc_sql.y" { - (yyval.value_list) = nullptr; + (yyval.values_list) = new std::vector>; + (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); + delete (yyvsp[-1].value_list); } -#line 1986 "yacc_sql.cpp" +#line 1991 "yacc_sql.cpp" break; - case 46: /* value_list: COMMA value value_list */ -#line 398 "yacc_sql.y" - { - if ((yyvsp[0].value_list) != nullptr) { - (yyval.value_list) = (yyvsp[0].value_list); - } else { - (yyval.value_list) = new std::vector; - } - (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); - delete (yyvsp[-1].value); + case 46: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 401 "yacc_sql.y" + { + (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); + delete (yyvsp[-1].value_list); } #line 2000 "yacc_sql.cpp" break; - case 47: /* value: NUMBER */ -#line 409 "yacc_sql.y" + case 47: /* value_list: value */ +#line 408 "yacc_sql.y" + { + (yyval.value_list) = new std::vector; + (yyval.value_list)->emplace_back(*(yyvsp[0].value)); + delete (yyvsp[0].value); + } +#line 2010 "yacc_sql.cpp" + break; + + case 48: /* value_list: value_list COMMA value */ +#line 414 "yacc_sql.y" + { + (yyval.value_list)->emplace_back(*(yyvsp[0].value)); + delete (yyvsp[0].value); + } +#line 2019 "yacc_sql.cpp" + break; + + case 49: /* value: NUMBER */ +#line 421 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2009 "yacc_sql.cpp" +#line 2028 "yacc_sql.cpp" break; - case 48: /* value: FLOAT */ -#line 413 "yacc_sql.y" + case 50: /* value: FLOAT */ +#line 425 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2018 "yacc_sql.cpp" +#line 2037 "yacc_sql.cpp" break; - case 49: /* value: SSS */ -#line 417 "yacc_sql.y" + case 51: /* value: SSS */ +#line 429 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2029 "yacc_sql.cpp" +#line 2048 "yacc_sql.cpp" break; - case 50: /* storage_format: %empty */ -#line 426 "yacc_sql.y" + case 52: /* storage_format: %empty */ +#line 439 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2037 "yacc_sql.cpp" +#line 2056 "yacc_sql.cpp" break; - case 51: /* storage_format: STORAGE FORMAT EQ ID */ -#line 430 "yacc_sql.y" + case 53: /* storage_format: STORAGE FORMAT EQ ID */ +#line 443 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2045 "yacc_sql.cpp" +#line 2064 "yacc_sql.cpp" break; - case 52: /* delete_stmt: DELETE FROM ID where */ -#line 437 "yacc_sql.y" + case 54: /* delete_stmt: DELETE FROM ID where */ +#line 450 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2055,11 +2074,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2059 "yacc_sql.cpp" +#line 2078 "yacc_sql.cpp" break; - case 53: /* update_stmt: UPDATE ID SET setClauses where */ -#line 450 "yacc_sql.y" + case 55: /* update_stmt: UPDATE ID SET setClauses where */ +#line 463 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2071,41 +2090,41 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2075 "yacc_sql.cpp" +#line 2094 "yacc_sql.cpp" break; - case 54: /* setClauses: setClause */ -#line 465 "yacc_sql.y" + case 56: /* setClauses: setClause */ +#line 478 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2085 "yacc_sql.cpp" +#line 2104 "yacc_sql.cpp" break; - case 55: /* setClauses: setClauses COMMA setClause */ -#line 471 "yacc_sql.y" + case 57: /* setClauses: setClauses COMMA setClause */ +#line 484 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2094 "yacc_sql.cpp" +#line 2113 "yacc_sql.cpp" break; - case 56: /* setClause: ID EQ value */ -#line 479 "yacc_sql.y" + case 58: /* setClause: ID EQ value */ +#line 492 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } -#line 2105 "yacc_sql.cpp" +#line 2124 "yacc_sql.cpp" break; - case 57: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 489 "yacc_sql.y" + case 59: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 502 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2128,11 +2147,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2132 "yacc_sql.cpp" +#line 2151 "yacc_sql.cpp" break; - case 58: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 512 "yacc_sql.y" + case 60: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 525 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2165,30 +2184,30 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2169 "yacc_sql.cpp" +#line 2188 "yacc_sql.cpp" break; - case 59: /* calc_stmt: CALC expression_list */ -#line 548 "yacc_sql.y" + case 61: /* calc_stmt: CALC expression_list */ +#line 561 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2179 "yacc_sql.cpp" +#line 2198 "yacc_sql.cpp" break; - case 60: /* expression_list: expression */ -#line 557 "yacc_sql.y" + case 62: /* expression_list: expression */ +#line 570 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; (yyval.expression_list)->emplace_back((yyvsp[0].expression)); } -#line 2188 "yacc_sql.cpp" +#line 2207 "yacc_sql.cpp" break; - case 61: /* expression_list: expression COMMA expression_list */ -#line 562 "yacc_sql.y" + case 63: /* expression_list: expression COMMA expression_list */ +#line 575 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2197,97 +2216,97 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression_list)->emplace((yyval.expression_list)->begin(), (yyvsp[-2].expression)); } -#line 2201 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; - case 62: /* expression: expression '+' expression */ -#line 572 "yacc_sql.y" + case 64: /* expression: expression '+' expression */ +#line 585 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2209 "yacc_sql.cpp" +#line 2228 "yacc_sql.cpp" break; - case 63: /* expression: expression '-' expression */ -#line 575 "yacc_sql.y" + case 65: /* expression: expression '-' expression */ +#line 588 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2217 "yacc_sql.cpp" +#line 2236 "yacc_sql.cpp" break; - case 64: /* expression: expression '*' expression */ -#line 578 "yacc_sql.y" + case 66: /* expression: expression '*' expression */ +#line 591 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2225 "yacc_sql.cpp" +#line 2244 "yacc_sql.cpp" break; - case 65: /* expression: expression '/' expression */ -#line 581 "yacc_sql.y" + case 67: /* expression: expression '/' expression */ +#line 594 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2233 "yacc_sql.cpp" +#line 2252 "yacc_sql.cpp" break; - case 66: /* expression: LBRACE expression RBRACE */ -#line 584 "yacc_sql.y" + case 68: /* expression: LBRACE expression RBRACE */ +#line 597 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2242 "yacc_sql.cpp" +#line 2261 "yacc_sql.cpp" break; - case 67: /* expression: '-' expression */ -#line 588 "yacc_sql.y" + case 69: /* expression: '-' expression */ +#line 601 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2250 "yacc_sql.cpp" +#line 2269 "yacc_sql.cpp" break; - case 68: /* expression: value */ -#line 591 "yacc_sql.y" + case 70: /* expression: value */ +#line 604 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2260 "yacc_sql.cpp" +#line 2279 "yacc_sql.cpp" break; - case 69: /* expression: rel_attr */ -#line 596 "yacc_sql.y" + case 71: /* expression: rel_attr */ +#line 609 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2271 "yacc_sql.cpp" +#line 2290 "yacc_sql.cpp" break; - case 70: /* expression: '*' */ -#line 602 "yacc_sql.y" + case 72: /* expression: '*' */ +#line 615 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2279 "yacc_sql.cpp" +#line 2298 "yacc_sql.cpp" break; - case 71: /* expression: aggr_func_expr */ -#line 605 "yacc_sql.y" + case 73: /* expression: aggr_func_expr */ +#line 618 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2287 "yacc_sql.cpp" +#line 2306 "yacc_sql.cpp" break; - case 72: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 612 "yacc_sql.y" + case 74: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 625 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2295,29 +2314,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2299 "yacc_sql.cpp" +#line 2318 "yacc_sql.cpp" break; - case 73: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 620 "yacc_sql.y" + case 75: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 633 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2307 "yacc_sql.cpp" +#line 2326 "yacc_sql.cpp" break; - case 74: /* rel_attr: ID */ -#line 625 "yacc_sql.y" + case 76: /* rel_attr: ID */ +#line 638 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2317 "yacc_sql.cpp" +#line 2336 "yacc_sql.cpp" break; - case 75: /* rel_attr: ID DOT ID */ -#line 630 "yacc_sql.y" + case 77: /* rel_attr: ID DOT ID */ +#line 643 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2325,38 +2344,38 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2329 "yacc_sql.cpp" +#line 2348 "yacc_sql.cpp" break; - case 76: /* relation: ID */ -#line 640 "yacc_sql.y" + case 78: /* relation: ID */ +#line 653 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2337 "yacc_sql.cpp" +#line 2356 "yacc_sql.cpp" break; - case 77: /* rel_list: relation */ -#line 647 "yacc_sql.y" + case 79: /* rel_list: relation */ +#line 660 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); (yyval.relation_list)->emplace_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2347 "yacc_sql.cpp" +#line 2366 "yacc_sql.cpp" break; - case 78: /* rel_list: rel_list COMMA relation */ -#line 653 "yacc_sql.y" + case 80: /* rel_list: rel_list COMMA relation */ +#line 666 "yacc_sql.y" { (yyval.relation_list)->emplace_back((yyvsp[0].string)); free((yyvsp[0].string)); } -#line 2356 "yacc_sql.cpp" +#line 2375 "yacc_sql.cpp" break; - case 79: /* joinClause: relation ON condition_list */ -#line 661 "yacc_sql.y" + case 81: /* joinClause: relation ON condition_list */ +#line 674 "yacc_sql.y" { (yyval.join_clause) = new JoinSqlNode; (yyval.join_clause)->relation = (yyvsp[-2].string); @@ -2364,75 +2383,75 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].condition_list); } -#line 2368 "yacc_sql.cpp" +#line 2387 "yacc_sql.cpp" break; - case 80: /* joinClauses: joinClause */ -#line 672 "yacc_sql.y" + case 82: /* joinClauses: joinClause */ +#line 685 "yacc_sql.y" { (yyval.join_clauses) = new std::vector; (yyval.join_clauses)->emplace_back(*(yyvsp[0].join_clause)); delete (yyvsp[0].join_clause); } -#line 2378 "yacc_sql.cpp" +#line 2397 "yacc_sql.cpp" break; - case 81: /* joinClauses: joinClause INNER JOIN joinClauses */ -#line 678 "yacc_sql.y" + case 83: /* joinClauses: joinClause INNER JOIN joinClauses */ +#line 691 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->emplace_back(*(yyvsp[-3].join_clause)); delete (yyvsp[-3].join_clause); } -#line 2388 "yacc_sql.cpp" +#line 2407 "yacc_sql.cpp" break; - case 82: /* where: %empty */ -#line 687 "yacc_sql.y" + case 84: /* where: %empty */ +#line 700 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2396 "yacc_sql.cpp" +#line 2415 "yacc_sql.cpp" break; - case 83: /* where: WHERE condition_list */ -#line 690 "yacc_sql.y" + case 85: /* where: WHERE condition_list */ +#line 703 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2404 "yacc_sql.cpp" +#line 2423 "yacc_sql.cpp" break; - case 84: /* condition_list: %empty */ -#line 696 "yacc_sql.y" + case 86: /* condition_list: %empty */ +#line 709 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2412 "yacc_sql.cpp" +#line 2431 "yacc_sql.cpp" break; - case 85: /* condition_list: condition */ -#line 699 "yacc_sql.y" + case 87: /* condition_list: condition */ +#line 712 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2422 "yacc_sql.cpp" +#line 2441 "yacc_sql.cpp" break; - case 86: /* condition_list: condition AND condition_list */ -#line 704 "yacc_sql.y" + case 88: /* condition_list: condition AND condition_list */ +#line 717 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2432 "yacc_sql.cpp" +#line 2451 "yacc_sql.cpp" break; - case 87: /* condition: rel_attr comp_op value */ -#line 712 "yacc_sql.y" + case 89: /* condition: rel_attr comp_op value */ +#line 725 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2444,11 +2463,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2448 "yacc_sql.cpp" +#line 2467 "yacc_sql.cpp" break; - case 88: /* condition: value comp_op value */ -#line 724 "yacc_sql.y" + case 90: /* condition: value comp_op value */ +#line 737 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2460,11 +2479,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2464 "yacc_sql.cpp" +#line 2483 "yacc_sql.cpp" break; - case 89: /* condition: rel_attr comp_op rel_attr */ -#line 736 "yacc_sql.y" + case 91: /* condition: rel_attr comp_op rel_attr */ +#line 749 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2476,11 +2495,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2480 "yacc_sql.cpp" +#line 2499 "yacc_sql.cpp" break; - case 90: /* condition: value comp_op rel_attr */ -#line 748 "yacc_sql.y" + case 92: /* condition: value comp_op rel_attr */ +#line 761 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2492,55 +2511,55 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2496 "yacc_sql.cpp" +#line 2515 "yacc_sql.cpp" break; - case 91: /* comp_op: EQ */ -#line 762 "yacc_sql.y" + case 93: /* comp_op: EQ */ +#line 775 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2502 "yacc_sql.cpp" +#line 2521 "yacc_sql.cpp" break; - case 92: /* comp_op: LT */ -#line 763 "yacc_sql.y" + case 94: /* comp_op: LT */ +#line 776 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2508 "yacc_sql.cpp" +#line 2527 "yacc_sql.cpp" break; - case 93: /* comp_op: GT */ -#line 764 "yacc_sql.y" + case 95: /* comp_op: GT */ +#line 777 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2514 "yacc_sql.cpp" +#line 2533 "yacc_sql.cpp" break; - case 94: /* comp_op: LE */ -#line 765 "yacc_sql.y" + case 96: /* comp_op: LE */ +#line 778 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2520 "yacc_sql.cpp" +#line 2539 "yacc_sql.cpp" break; - case 95: /* comp_op: GE */ -#line 766 "yacc_sql.y" + case 97: /* comp_op: GE */ +#line 779 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2526 "yacc_sql.cpp" +#line 2545 "yacc_sql.cpp" break; - case 96: /* comp_op: NE */ -#line 767 "yacc_sql.y" + case 98: /* comp_op: NE */ +#line 780 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2532 "yacc_sql.cpp" +#line 2551 "yacc_sql.cpp" break; - case 97: /* group_by: %empty */ -#line 773 "yacc_sql.y" + case 99: /* group_by: %empty */ +#line 786 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2540 "yacc_sql.cpp" +#line 2559 "yacc_sql.cpp" break; - case 98: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 779 "yacc_sql.y" + case 100: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 792 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2550,20 +2569,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2554 "yacc_sql.cpp" +#line 2573 "yacc_sql.cpp" break; - case 99: /* explain_stmt: EXPLAIN command_wrapper */ -#line 792 "yacc_sql.y" + case 101: /* explain_stmt: EXPLAIN command_wrapper */ +#line 805 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2563 "yacc_sql.cpp" +#line 2582 "yacc_sql.cpp" break; - case 100: /* set_variable_stmt: SET ID EQ value */ -#line 800 "yacc_sql.y" + case 102: /* set_variable_stmt: SET ID EQ value */ +#line 813 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2571,11 +2590,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2575 "yacc_sql.cpp" +#line 2594 "yacc_sql.cpp" break; -#line 2579 "yacc_sql.cpp" +#line 2598 "yacc_sql.cpp" default: break; } @@ -2804,7 +2823,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 812 "yacc_sql.y" +#line 825 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 6d3a126e..d8ef2eae 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -129,6 +129,7 @@ union YYSTYPE Expression * expression; std::vector> * expression_list; std::vector * value_list; + std::vector> * values_list; std::vector * condition_list; std::vector * rel_attr_list; std::vector * relation_list; @@ -140,7 +141,7 @@ union YYSTYPE int number; float floats; -#line 144 "yacc_sql.hpp" +#line 145 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 5799d6e1..eb615b9c 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -127,6 +127,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, Expression * expression; std::vector> * expression_list; std::vector * value_list; + std::vector> * values_list; std::vector * condition_list; std::vector * rel_attr_list; std::vector * relation_list; @@ -156,6 +157,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type attr_def_list %type attr_def %type value_list +%type values_list %type where %type condition_list %type storage_format @@ -374,37 +376,47 @@ type: | FLOAT_T { $$ = static_cast(AttrType::FLOATS); } | DATE_T { $$ = static_cast(AttrType::DATES); } ; + insert_stmt: /*insert 语句的语法解析树*/ - INSERT INTO ID VALUES LBRACE value value_list RBRACE + INSERT INTO ID VALUES values_list { $$ = new ParsedSqlNode(SCF_INSERT); $$->insertion.relation_name = $3; - if ($7 != nullptr) { - $$->insertion.values.swap(*$7); - delete $7; + if ($5 != nullptr) { + $$->insertion.values_list.swap(*$5); + delete $5; } - $$->insertion.values.emplace_back(*$6); - std::reverse($$->insertion.values.begin(), $$->insertion.values.end()); - delete $6; free($3); } ; -value_list: - /* empty */ +values_list: + LBRACE value_list RBRACE { - $$ = nullptr; - } - | COMMA value value_list { - if ($3 != nullptr) { - $$ = $3; - } else { - $$ = new std::vector; - } + $$ = new std::vector>; $$->emplace_back(*$2); delete $2; } + | values_list COMMA LBRACE value_list RBRACE + { + $$->emplace_back(*$4); + delete $4; + } + +value_list: + value + { + $$ = new std::vector; + $$->emplace_back(*$1); + delete $1; + } + | value_list COMMA value + { + $$->emplace_back(*$3); + delete $3; + } ; + value: NUMBER { $$ = new Value((int)$1); @@ -421,6 +433,7 @@ value: free($1); } ; + storage_format: /* empty */ { diff --git a/src/observer/sql/stmt/insert_stmt.cpp b/src/observer/sql/stmt/insert_stmt.cpp index 96ced424..9deee685 100644 --- a/src/observer/sql/stmt/insert_stmt.cpp +++ b/src/observer/sql/stmt/insert_stmt.cpp @@ -17,16 +17,16 @@ See the Mulan PSL v2 for more details. */ #include "storage/db/db.h" #include "storage/table/table.h" -InsertStmt::InsertStmt(Table *table, const Value *values, int value_amount) - : table_(table), values_(values), value_amount_(value_amount) +InsertStmt::InsertStmt(Table *table, const std::vector> &values_list) + : table_(table), values_list_(values_list) {} RC InsertStmt::create(Db *db, const InsertSqlNode &inserts, Stmt *&stmt) { const char *table_name = inserts.relation_name.c_str(); - if (nullptr == db || nullptr == table_name || inserts.values.empty()) { + if (nullptr == db || nullptr == table_name || inserts.values_list.empty()) { LOG_WARN("invalid argument. db=%p, table_name=%p, value_num=%d", - db, table_name, static_cast(inserts.values.size())); + db, table_name, static_cast(inserts.values_list.size())); return RC::INVALID_ARGUMENT; } @@ -38,16 +38,18 @@ RC InsertStmt::create(Db *db, const InsertSqlNode &inserts, Stmt *&stmt) } // check the fields number - const Value *values = inserts.values.data(); - const int value_num = static_cast(inserts.values.size()); const TableMeta &table_meta = table->table_meta(); const int field_num = table_meta.field_num() - table_meta.sys_field_num(); - if (field_num != value_num) { - LOG_WARN("schema mismatch. value num=%d, field num in schema=%d", value_num, field_num); - return RC::SCHEMA_FIELD_MISSING; + for (auto &value_list : inserts.values_list) { + const int value_num = static_cast(value_list.size()); + if (field_num != value_num) { + LOG_WARN("schema mismatch. value num=%d, field num in schema=%d", value_num, field_num); + return RC::SCHEMA_FIELD_MISSING; + } } // everything alright - stmt = new InsertStmt(table, values, value_num); + // values_list 存在 event,可以直接引用过来 + stmt = new InsertStmt(table, inserts.values_list); return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/insert_stmt.h b/src/observer/sql/stmt/insert_stmt.h index 759745cb..ee55140f 100644 --- a/src/observer/sql/stmt/insert_stmt.h +++ b/src/observer/sql/stmt/insert_stmt.h @@ -27,21 +27,17 @@ class Db; class InsertStmt : public Stmt { public: - InsertStmt() = default; - InsertStmt(Table *table, const Value *values, int value_amount); + InsertStmt() = delete; + InsertStmt(Table *table, const std::vector>&); StmtType type() const override { return StmtType::INSERT; } -public: static RC create(Db *db, const InsertSqlNode &insert_sql, Stmt *&stmt); -public: - Table *table() const { return table_; } - const Value *values() const { return values_; } - int value_amount() const { return value_amount_; } + Table *table() const { return table_; } + const std::vector> &values_list() const { return values_list_; }; private: - Table *table_ = nullptr; - const Value *values_ = nullptr; - int value_amount_ = 0; + Table *table_ = nullptr; + const std::vector> &values_list_; }; From 3333b4bd714647238e9444a4a58ec2f599013365 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 29 Sep 2024 02:27:49 +0800 Subject: [PATCH 050/308] =?UTF-8?q?test:=20=E5=A2=9E=E5=8A=A0=20update?= =?UTF-8?q?=E3=80=81typecast=20=E7=9A=84=E6=B5=8B=E8=AF=95=E5=B9=B6?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20insert=20=E6=B5=8B=E8=AF=95=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-insert.result | 2 +- test/case/result/primary-typecast.result | 151 ++++++++++++++++++++ test/case/result/primary-update-plus.result | 71 +++++++++ test/case/test/primary-insert.test | 4 +- test/case/test/primary-typecast.test | 44 ++++++ test/case/test/primary-update-plus.test | 32 +++++ 6 files changed, 301 insertions(+), 3 deletions(-) create mode 100644 test/case/result/primary-typecast.result create mode 100644 test/case/result/primary-update-plus.result create mode 100644 test/case/test/primary-typecast.test create mode 100644 test/case/test/primary-update-plus.test diff --git a/test/case/result/primary-insert.result b/test/case/result/primary-insert.result index cb054382..d2f7e3ed 100644 --- a/test/case/result/primary-insert.result +++ b/test/case/result/primary-insert.result @@ -11,7 +11,7 @@ SUCCESS 2. ERROR INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1); FAILURE -INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1,1); +INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1,1,1); FAILURE 3. SELECT diff --git a/test/case/result/primary-typecast.result b/test/case/result/primary-typecast.result new file mode 100644 index 00000000..7f12df7f --- /dev/null +++ b/test/case/result/primary-typecast.result @@ -0,0 +1,151 @@ +INITIALIZATION +CREATE TABLE TYPECAST_TABLE_1(ID INT, NAME CHAR(20), AGE FLOAT); +SUCCESS + +1. INSERT ROWS +INSERT INTO TYPECAST_TABLE_1 VALUES(666, 666, 666); +SUCCESS +INSERT INTO TYPECAST_TABLE_1 VALUES('1', '1', '1'); +SUCCESS +INSERT INTO TYPECAST_TABLE_1 VALUES('ABC', 'ABC', 'ABC'); +SUCCESS +INSERT INTO TYPECAST_TABLE_1 VALUES('0.5', '0.5', '0.5'); +SUCCESS +INSERT INTO TYPECAST_TABLE_1 VALUES('3ABC', 'ABCD', '3.14ADC'); +SUCCESS +INSERT INTO TYPECAST_TABLE_1 VALUES('4ABC', 'DCBA', 'G3.14ADC'); +SUCCESS +INSERT INTO TYPECAST_TABLE_1 VALUES(1.5, 1.5, 1.5); +SUCCESS +INSERT INTO TYPECAST_TABLE_1 VALUES(-1.5, -1.5, -1.5); +SUCCESS +SELECT * FROM TYPECAST_TABLE_1; +-2 | 1.5 | -1.5 +0 | 0.5 | 0.5 +0 | ABC | 0 +1 | 1 | 1 +2 | 1.5 | 1.5 +3 | ABCD | 3.14 +4 | DCBA | 0 +666 | 666 | 666 +ID | NAME | AGE + +2. QUERY ROWS +SELECT * FROM TYPECAST_TABLE_1 WHERE ID > 0.5; +1 | 1 | 1 +2 | 1.5 | 1.5 +3 | ABCD | 3.14 +4 | DCBA | 0 +666 | 666 | 666 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE ID > '0.1'; +1 | 1 | 1 +2 | 1.5 | 1.5 +3 | ABCD | 3.14 +4 | DCBA | 0 +666 | 666 | 666 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE ID > '1ADC'; +2 | 1.5 | 1.5 +3 | ABCD | 3.14 +4 | DCBA | 0 +666 | 666 | 666 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE ID < '1.5ADC'; +-2 | 1.5 | -1.5 +0 | 0.5 | 0.5 +0 | ABC | 0 +1 | 1 | 1 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE NAME >= 1; +-2 | 1.5 | -1.5 +1 | 1 | 1 +2 | 1.5 | 1.5 +666 | 666 | 666 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE NAME > 1.3; +-2 | 1.5 | -1.5 +2 | 1.5 | 1.5 +666 | 666 | 666 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE NAME > '1ADC'; +0 | ABC | 0 +3 | ABCD | 3.14 +4 | DCBA | 0 +666 | 666 | 666 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE AGE > 1; +2 | 1.5 | 1.5 +3 | ABCD | 3.14 +666 | 666 | 666 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE AGE > 1.2; +2 | 1.5 | 1.5 +3 | ABCD | 3.14 +666 | 666 | 666 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE AGE > 2.5; +3 | ABCD | 3.14 +666 | 666 | 666 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE AGE > '1ADC'; +2 | 1.5 | 1.5 +3 | ABCD | 3.14 +666 | 666 | 666 +ID | NAME | AGE + +3. UPDATE ROWS +UPDATE TYPECAST_TABLE_1 SET ID = 6, NAME = 6, AGE = 6 WHERE ID = 1; +SUCCESS +UPDATE TYPECAST_TABLE_1 SET ID = '66', NAME = '66', AGE = '66' WHERE ID = 2; +SUCCESS +UPDATE TYPECAST_TABLE_1 SET ID = 'JF', NAME = 'JF', AGE = 'JF' WHERE ID = -2; +SUCCESS +UPDATE TYPECAST_TABLE_1 SET ID = '0.5', NAME = '0.5', AGE = '0.5' WHERE ID = 0; +SUCCESS +UPDATE TYPECAST_TABLE_1 SET ID = '3ABC', NAME = 'ABCD', AGE = '3.14ADC' WHERE ID = 4; +SUCCESS +UPDATE TYPECAST_TABLE_1 SET ID = '4ABC', NAME = 'DCBA', AGE = 'G3.14ADC' WHERE ID = 4; +SUCCESS +UPDATE TYPECAST_TABLE_1 SET ID = 6.6, NAME = 6.6, AGE = '6.6' WHERE ID = 3; +SUCCESS +UPDATE TYPECAST_TABLE_1 SET ID = -8.8, NAME = -8.8, AGE = '-8.8' WHERE ID = 666; +SUCCESS +SELECT * FROM TYPECAST_TABLE_1; +-9 | 8.8 | -8.8 +0 | 0.5 | 0.5 +0 | 0.5 | 0.5 +0 | 0.5 | 0.5 +6 | 6 | 6 +66 | 66 | 66 +7 | 6.6 | 6.6 +7 | 6.6 | 6.6 +ID | NAME | AGE + +4. QUERY ROWS AGAIN +SELECT * FROM TYPECAST_TABLE_1 WHERE '1A' = 2; +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE '1.5A' = 2; +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE '1.5A' = 2.0; +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE '2A' = 2.0; +-9 | 8.8 | -8.8 +0 | 0.5 | 0.5 +0 | 0.5 | 0.5 +0 | 0.5 | 0.5 +6 | 6 | 6 +66 | 66 | 66 +7 | 6.6 | 6.6 +7 | 6.6 | 6.6 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE '2.0-A' = 2.0; +-9 | 8.8 | -8.8 +0 | 0.5 | 0.5 +0 | 0.5 | 0.5 +0 | 0.5 | 0.5 +6 | 6 | 6 +66 | 66 | 66 +7 | 6.6 | 6.6 +7 | 6.6 | 6.6 +ID | NAME | AGE diff --git a/test/case/result/primary-update-plus.result b/test/case/result/primary-update-plus.result new file mode 100644 index 00000000..9c38bf76 --- /dev/null +++ b/test/case/result/primary-update-plus.result @@ -0,0 +1,71 @@ +INITIALIZATION +CREATE TABLE STUDENT (ID INT, NAME CHAR(9), MAJOR CHAR(32)); +SUCCESS +INSERT INTO STUDENT VALUES (0, 'KANGKANGA', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); +SUCCESS +INSERT INTO STUDENT VALUES (1, 'TOMTOMTOM', 'COMPUTER SCIENCECOMPUTER SCIENCE'); +SUCCESS +INSERT INTO STUDENT VALUES (2, 'JERRYJERR', 'COMPUTER SCIENCECOMPUTER SCIENCE'); +SUCCESS +INSERT INTO STUDENT VALUES (3, 'JACKJACKJ', 'ELECTRICAL ENGINEERINGER SCIENCE'); +SUCCESS +INSERT INTO STUDENT VALUES (3, 'JERRYJERR', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); +SUCCESS + +1. UPDATE A ROW +UPDATE STUDENT SET MAJOR = 'ELECTRICAL ENGINEERING' WHERE ID = 2; +SUCCESS +SELECT * FROM STUDENT WHERE ID >= 1; +1 | TOMTOMTOM | COMPUTER SCIENCECOMPUTER SCIENCE +2 | JERRYJERR | ELECTRICAL ENGINEERING +3 | JACKJACKJ | ELECTRICAL ENGINEERINGER SCIENCE +3 | JERRYJERR | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +ID | NAME | MAJOR +SELECT * FROM STUDENT WHERE ID = 0; +0 | KANGKANGA | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +ID | NAME | MAJOR + +2. UPDATE NON-EXISTENT ROW +UPDATE STUDENT SET ID = 100 WHERE NAME = 'JERRYJERRY'; +SUCCESS +SELECT * FROM STUDENT WHERE ID > 2; +3 | JACKJACKJ | ELECTRICAL ENGINEERINGER SCIENCE +3 | JERRYJERR | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +ID | NAME | MAJOR +SELECT * FROM STUDENT WHERE ID < 101; +0 | KANGKANGA | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +1 | TOMTOMTOM | COMPUTER SCIENCECOMPUTER SCIENCE +2 | JERRYJERR | ELECTRICAL ENGINEERING +3 | JACKJACKJ | ELECTRICAL ENGINEERINGER SCIENCE +3 | JERRYJERR | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +ID | NAME | MAJOR + +3. UPDATE ROWS +UPDATE STUDENT SET NAME = '12345678' WHERE ID < 3; +SUCCESS +SELECT * FROM STUDENT WHERE ID = 2; +2 | 12345678 | ELECTRICAL ENGINEERING +ID | NAME | MAJOR +SELECT * FROM STUDENT WHERE NAME = '12345678'; +0 | 12345678 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +1 | 12345678 | COMPUTER SCIENCECOMPUTER SCIENCE +2 | 12345678 | ELECTRICAL ENGINEERING +ID | NAME | MAJOR + +4. UPDATE ROWS AGAIN +UPDATE STUDENT SET NAME = '9876543210' WHERE ID < 3; +FAILURE +SELECT * FROM STUDENT WHERE ID = 2; +2 | 12345678 | ELECTRICAL ENGINEERING +ID | NAME | MAJOR +SELECT * FROM STUDENT WHERE NAME = '9876543210'; +ID | NAME | MAJOR + +5. UPDATE MULTIPLE COLUMNS +UPDATE STUDENT SET NAME = 'MULNAME', ID = 666, MAJOR = 'MULMAJOR' WHERE ID = 1; +SUCCESS +SELECT * FROM STUDENT WHERE ID = 1; +ID | NAME | MAJOR +SELECT * FROM STUDENT WHERE NAME = 'MULNAME' AND MAJOR = 'MULMAJOR'; +666 | MULNAME | MULMAJOR +ID | NAME | MAJOR diff --git a/test/case/test/primary-insert.test b/test/case/test/primary-insert.test index 429afc87..19c214d8 100644 --- a/test/case/test/primary-insert.test +++ b/test/case/test/primary-insert.test @@ -7,7 +7,7 @@ INSERT INTO insert_table VALUES (2,'N2',1,1),(3,'N3',2,1); -- echo 2. error INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1); -INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1,1); +INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1,1,1); -- echo 3. select --- sort SELECT * FROM insert_table; \ No newline at end of file +-- sort SELECT * FROM insert_table; diff --git a/test/case/test/primary-typecast.test b/test/case/test/primary-typecast.test new file mode 100644 index 00000000..f87e8be7 --- /dev/null +++ b/test/case/test/primary-typecast.test @@ -0,0 +1,44 @@ +-- echo initialization +CREATE TABLE Typecast_table_1(id int, name char(20), age float); + +-- echo 1. insert rows +INSERT INTO Typecast_table_1 VALUES(666, 666, 666); +INSERT INTO Typecast_table_1 VALUES('1', '1', '1'); +INSERT INTO Typecast_table_1 VALUES('abc', 'abc', 'abc'); +INSERT INTO Typecast_table_1 VALUES('0.5', '0.5', '0.5'); +INSERT INTO Typecast_table_1 VALUES('3abc', 'abcd', '3.14adc'); +INSERT INTO Typecast_table_1 VALUES('4abc', 'dcba', 'g3.14adc'); +INSERT INTO Typecast_table_1 VALUES(1.5, 1.5, 1.5); +INSERT INTO Typecast_table_1 VALUES(-1.5, -1.5, -1.5); +-- sort select * from Typecast_table_1; + +-- echo 2. query rows +-- sort SELECT * from Typecast_table_1 WHERE id > 0.5; +-- sort SELECT * from Typecast_table_1 WHERE id > '0.1'; +-- sort SELECT * from Typecast_table_1 WHERE id > '1adc'; +-- sort SELECT * from Typecast_table_1 WHERE id < '1.5adc'; +-- sort SELECT * from Typecast_table_1 WHERE name >= 1; +-- sort SELECT * from Typecast_table_1 WHERE name > 1.3; +-- sort SELECT * from Typecast_table_1 WHERE name > '1adc'; +-- sort SELECT * from Typecast_table_1 WHERE age > 1; +-- sort SELECT * from Typecast_table_1 WHERE age > 1.2; +-- sort SELECT * from Typecast_table_1 WHERE age > 2.5; +-- sort SELECT * from Typecast_table_1 WHERE age > '1adc'; + +-- echo 3. update rows +UPDATE Typecast_table_1 SET id = 6, name = 6, age = 6 where id = 1; +UPDATE Typecast_table_1 SET id = '66', name = '66', age = '66' where id = 2; +UPDATE Typecast_table_1 SET id = 'jf', name = 'jf', age = 'jf' where id = -2; +UPDATE Typecast_table_1 SET id = '0.5', name = '0.5', age = '0.5' where id = 0; +UPDATE Typecast_table_1 SET id = '3abc', name = 'abcd', age = '3.14adc' where id = 4; +UPDATE Typecast_table_1 SET id = '4abc', name = 'dcba', age = 'g3.14adc' where id = 4; +UPDATE Typecast_table_1 SET id = 6.6, name = 6.6, age = '6.6' where id = 3; +UPDATE Typecast_table_1 SET id = -8.8, name = -8.8, age = '-8.8' where id = 666; +-- sort select * from Typecast_table_1; + +-- echo 4. query rows again +-- sort SELECT * FROM Typecast_table_1 WHERE '1a' = 2; +-- sort SELECT * FROM Typecast_table_1 WHERE '1.5a' = 2; +-- sort SELECT * FROM Typecast_table_1 WHERE '1.5a' = 2.0; +-- sort SELECT * FROM Typecast_table_1 WHERE '2a' = 2.0; +-- sort SELECT * FROM Typecast_table_1 WHERE '2.0-a' = 2.0; diff --git a/test/case/test/primary-update-plus.test b/test/case/test/primary-update-plus.test new file mode 100644 index 00000000..bc4e49a1 --- /dev/null +++ b/test/case/test/primary-update-plus.test @@ -0,0 +1,32 @@ +-- echo initialization +create table student (id int, name char(9), major char(32)); +insert into student values (0, 'KangKanga', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +insert into student values (1, 'TomTomTom', 'Computer ScienceComputer Science'); +insert into student values (2, 'JerryJerr', 'Computer ScienceComputer Science'); +insert into student values (3, 'JackJackJ', 'Electrical Engineeringer Science'); +insert into student values (3, 'JerryJerr', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); + +-- echo 1. update a row +update student set major = 'Electrical Engineering' where id = 2; +-- sort select * from student where id >= 1; +-- sort select * from student where id = 0; + +-- echo 2. update non-existent row +update student set id = 100 where name = 'JerryJerry'; +-- sort select * from student where id > 2; +-- sort select * from student where id < 101; + +-- echo 3. update rows +update student set name = '12345678' where id < 3; +-- sort select * from student where id = 2; +-- sort select * from student where name = '12345678'; + +-- echo 4. update rows again +update student set name = '9876543210' where id < 3; +-- sort select * from student where id = 2; +-- sort select * from student where name = '9876543210'; + +-- echo 5. update multiple columns +update student set name = 'MulName', id = 666, major = 'MulMajor' where id = 1; +-- sort select * from student where id = 1; +-- sort select * from student where name = 'MulName' and major = 'MulMajor'; From be2a66dfe026495346d9b2476f2c10a267a42c16 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 29 Sep 2024 02:30:38 +0800 Subject: [PATCH 051/308] chore: update .gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index af3871a9..a51811dc 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,8 @@ docs/book ./test.sql ./CMakeLists.txt #*# + +# commitizen +node_modules +package.json +package-lock.json From 95e97191470d8ec382640e3f85f97bb551ca7734 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sun, 29 Sep 2024 11:35:02 +0800 Subject: [PATCH 052/308] else if ($$->type == AttrType::CHARS) --- src/observer/sql/parser/yacc_sql.cpp | 288 ++++++++++++++------------- src/observer/sql/parser/yacc_sql.y | 2 + 2 files changed, 147 insertions(+), 143 deletions(-) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index e815fee5..5d682e7f 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -656,14 +656,14 @@ static const yytype_int16 yyrline[] = 0, 199, 199, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 230, 236, 241, 247, 253, 259, 265, - 272, 278, 286, 300, 310, 334, 337, 350, 362, 385, - 389, 394, 400, 403, 404, 405, 406, 409, 426, 429, - 440, 444, 448, 454, 460, 463, 470, 482, 497, 522, - 531, 540, 555, 558, 561, 564, 567, 571, 574, 579, - 585, 588, 595, 598, 601, 606, 614, 620, 625, 635, - 640, 650, 669, 672, 678, 681, 686, 693, 705, 717, - 729, 744, 745, 746, 747, 748, 749, 750, 751, 752, - 753, 759, 764, 777, 785, 795, 796 + 272, 278, 286, 300, 310, 334, 337, 350, 362, 387, + 391, 396, 402, 405, 406, 407, 408, 411, 428, 431, + 442, 446, 450, 456, 462, 465, 472, 484, 499, 524, + 533, 542, 557, 560, 563, 566, 569, 573, 576, 581, + 587, 590, 597, 600, 603, 608, 616, 622, 627, 637, + 642, 652, 671, 674, 680, 683, 688, 695, 707, 719, + 731, 746, 747, 748, 749, 750, 751, 752, 753, 754, + 755, 761, 766, 779, 787, 797, 798 }; #endif @@ -1938,6 +1938,8 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_info)->length = 4; } else if ((yyval.attr_info)->type == AttrType::DATES) { (yyval.attr_info)->length = 4; + } else if ((yyval.attr_info)->type == AttrType::CHARS) { + (yyval.attr_info)->length = 4; } else { ASSERT(false, "$$->type is invalid."); } @@ -1947,65 +1949,65 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 1951 "yacc_sql.cpp" +#line 1953 "yacc_sql.cpp" break; case 39: /* nullable_constraint: NOT NULL_T */ -#line 386 "yacc_sql.y" +#line 388 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1959 "yacc_sql.cpp" +#line 1961 "yacc_sql.cpp" break; case 40: /* nullable_constraint: NULLABLE */ -#line 390 "yacc_sql.y" +#line 392 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1967 "yacc_sql.cpp" +#line 1969 "yacc_sql.cpp" break; case 41: /* nullable_constraint: %empty */ -#line 394 "yacc_sql.y" +#line 396 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 1975 "yacc_sql.cpp" +#line 1977 "yacc_sql.cpp" break; case 42: /* number: NUMBER */ -#line 400 "yacc_sql.y" +#line 402 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1981 "yacc_sql.cpp" +#line 1983 "yacc_sql.cpp" break; case 43: /* type: INT_T */ -#line 403 "yacc_sql.y" +#line 405 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1987 "yacc_sql.cpp" +#line 1989 "yacc_sql.cpp" break; case 44: /* type: STRING_T */ -#line 404 "yacc_sql.y" +#line 406 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1993 "yacc_sql.cpp" +#line 1995 "yacc_sql.cpp" break; case 45: /* type: FLOAT_T */ -#line 405 "yacc_sql.y" +#line 407 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 1999 "yacc_sql.cpp" +#line 2001 "yacc_sql.cpp" break; case 46: /* type: DATE_T */ -#line 406 "yacc_sql.y" +#line 408 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2005 "yacc_sql.cpp" +#line 2007 "yacc_sql.cpp" break; case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 410 "yacc_sql.y" +#line 412 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -2018,19 +2020,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 2022 "yacc_sql.cpp" +#line 2024 "yacc_sql.cpp" break; case 48: /* value_list: %empty */ -#line 426 "yacc_sql.y" +#line 428 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 2030 "yacc_sql.cpp" +#line 2032 "yacc_sql.cpp" break; case 49: /* value_list: COMMA value value_list */ -#line 429 "yacc_sql.y" +#line 431 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -2040,64 +2042,64 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 2044 "yacc_sql.cpp" +#line 2046 "yacc_sql.cpp" break; case 50: /* value: NUMBER */ -#line 440 "yacc_sql.y" +#line 442 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2053 "yacc_sql.cpp" +#line 2055 "yacc_sql.cpp" break; case 51: /* value: FLOAT */ -#line 444 "yacc_sql.y" +#line 446 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2062 "yacc_sql.cpp" +#line 2064 "yacc_sql.cpp" break; case 52: /* value: SSS */ -#line 448 "yacc_sql.y" +#line 450 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2073 "yacc_sql.cpp" +#line 2075 "yacc_sql.cpp" break; case 53: /* value: NULL_T */ -#line 454 "yacc_sql.y" +#line 456 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2081 "yacc_sql.cpp" +#line 2083 "yacc_sql.cpp" break; case 54: /* storage_format: %empty */ -#line 460 "yacc_sql.y" +#line 462 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2089 "yacc_sql.cpp" +#line 2091 "yacc_sql.cpp" break; case 55: /* storage_format: STORAGE FORMAT EQ ID */ -#line 464 "yacc_sql.y" +#line 466 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2097 "yacc_sql.cpp" +#line 2099 "yacc_sql.cpp" break; case 56: /* delete_stmt: DELETE FROM ID where */ -#line 471 "yacc_sql.y" +#line 473 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2107,11 +2109,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2111 "yacc_sql.cpp" +#line 2113 "yacc_sql.cpp" break; case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 483 "yacc_sql.y" +#line 485 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2124,11 +2126,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2128 "yacc_sql.cpp" +#line 2130 "yacc_sql.cpp" break; case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 498 "yacc_sql.y" +#line 500 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2151,21 +2153,21 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2155 "yacc_sql.cpp" +#line 2157 "yacc_sql.cpp" break; case 59: /* calc_stmt: CALC expression_list */ -#line 523 "yacc_sql.y" +#line 525 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2165 "yacc_sql.cpp" +#line 2167 "yacc_sql.cpp" break; case 60: /* expression_list: expression alias */ -#line 532 "yacc_sql.y" +#line 534 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2174,11 +2176,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2178 "yacc_sql.cpp" +#line 2180 "yacc_sql.cpp" break; case 61: /* expression_list: expression alias COMMA expression_list */ -#line 541 "yacc_sql.y" +#line 543 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2191,121 +2193,121 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2195 "yacc_sql.cpp" +#line 2197 "yacc_sql.cpp" break; case 62: /* expression: expression '+' expression */ -#line 555 "yacc_sql.y" +#line 557 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2203 "yacc_sql.cpp" +#line 2205 "yacc_sql.cpp" break; case 63: /* expression: expression '-' expression */ -#line 558 "yacc_sql.y" +#line 560 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2211 "yacc_sql.cpp" +#line 2213 "yacc_sql.cpp" break; case 64: /* expression: expression '*' expression */ -#line 561 "yacc_sql.y" +#line 563 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2219 "yacc_sql.cpp" +#line 2221 "yacc_sql.cpp" break; case 65: /* expression: expression '/' expression */ -#line 564 "yacc_sql.y" +#line 566 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2227 "yacc_sql.cpp" +#line 2229 "yacc_sql.cpp" break; case 66: /* expression: LBRACE expression RBRACE */ -#line 567 "yacc_sql.y" +#line 569 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2236 "yacc_sql.cpp" +#line 2238 "yacc_sql.cpp" break; case 67: /* expression: '-' expression */ -#line 571 "yacc_sql.y" +#line 573 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2244 "yacc_sql.cpp" +#line 2246 "yacc_sql.cpp" break; case 68: /* expression: value */ -#line 574 "yacc_sql.y" +#line 576 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2254 "yacc_sql.cpp" +#line 2256 "yacc_sql.cpp" break; case 69: /* expression: rel_attr */ -#line 579 "yacc_sql.y" +#line 581 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2265 "yacc_sql.cpp" +#line 2267 "yacc_sql.cpp" break; case 70: /* expression: '*' */ -#line 585 "yacc_sql.y" +#line 587 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2273 "yacc_sql.cpp" +#line 2275 "yacc_sql.cpp" break; case 71: /* expression: aggr_func_expr */ -#line 588 "yacc_sql.y" +#line 590 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2281 "yacc_sql.cpp" +#line 2283 "yacc_sql.cpp" break; case 72: /* alias: %empty */ -#line 595 "yacc_sql.y" +#line 597 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2289 "yacc_sql.cpp" +#line 2291 "yacc_sql.cpp" break; case 73: /* alias: ID */ -#line 598 "yacc_sql.y" +#line 600 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2297 "yacc_sql.cpp" +#line 2299 "yacc_sql.cpp" break; case 74: /* alias: AS ID */ -#line 601 "yacc_sql.y" +#line 603 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2305 "yacc_sql.cpp" +#line 2307 "yacc_sql.cpp" break; case 75: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 607 "yacc_sql.y" +#line 609 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2313,29 +2315,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2317 "yacc_sql.cpp" +#line 2319 "yacc_sql.cpp" break; case 76: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 615 "yacc_sql.y" +#line 617 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2325 "yacc_sql.cpp" +#line 2327 "yacc_sql.cpp" break; case 77: /* rel_attr: ID */ -#line 620 "yacc_sql.y" +#line 622 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2335 "yacc_sql.cpp" +#line 2337 "yacc_sql.cpp" break; case 78: /* rel_attr: ID DOT ID */ -#line 625 "yacc_sql.y" +#line 627 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2343,19 +2345,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2347 "yacc_sql.cpp" +#line 2349 "yacc_sql.cpp" break; case 79: /* relation: ID */ -#line 635 "yacc_sql.y" +#line 637 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2355 "yacc_sql.cpp" +#line 2357 "yacc_sql.cpp" break; case 80: /* rel_list: relation alias */ -#line 640 "yacc_sql.y" +#line 642 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2366,11 +2368,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2370 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; case 81: /* rel_list: relation alias COMMA rel_list */ -#line 650 "yacc_sql.y" +#line 652 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2386,55 +2388,55 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); } -#line 2390 "yacc_sql.cpp" +#line 2392 "yacc_sql.cpp" break; case 82: /* where: %empty */ -#line 669 "yacc_sql.y" +#line 671 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2398 "yacc_sql.cpp" +#line 2400 "yacc_sql.cpp" break; case 83: /* where: WHERE condition_list */ -#line 672 "yacc_sql.y" +#line 674 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2406 "yacc_sql.cpp" +#line 2408 "yacc_sql.cpp" break; case 84: /* condition_list: %empty */ -#line 678 "yacc_sql.y" +#line 680 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2414 "yacc_sql.cpp" +#line 2416 "yacc_sql.cpp" break; case 85: /* condition_list: condition */ -#line 681 "yacc_sql.y" +#line 683 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2424 "yacc_sql.cpp" +#line 2426 "yacc_sql.cpp" break; case 86: /* condition_list: condition AND condition_list */ -#line 686 "yacc_sql.y" +#line 688 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2434 "yacc_sql.cpp" +#line 2436 "yacc_sql.cpp" break; case 87: /* condition: rel_attr comp_op value */ -#line 694 "yacc_sql.y" +#line 696 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2446,11 +2448,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2450 "yacc_sql.cpp" +#line 2452 "yacc_sql.cpp" break; case 88: /* condition: value comp_op value */ -#line 706 "yacc_sql.y" +#line 708 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2462,11 +2464,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2466 "yacc_sql.cpp" +#line 2468 "yacc_sql.cpp" break; case 89: /* condition: rel_attr comp_op rel_attr */ -#line 718 "yacc_sql.y" +#line 720 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2478,11 +2480,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2482 "yacc_sql.cpp" +#line 2484 "yacc_sql.cpp" break; case 90: /* condition: value comp_op rel_attr */ -#line 730 "yacc_sql.y" +#line 732 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2494,79 +2496,79 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2498 "yacc_sql.cpp" +#line 2500 "yacc_sql.cpp" break; case 91: /* comp_op: EQ */ -#line 744 "yacc_sql.y" +#line 746 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2504 "yacc_sql.cpp" +#line 2506 "yacc_sql.cpp" break; case 92: /* comp_op: LT */ -#line 745 "yacc_sql.y" +#line 747 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2510 "yacc_sql.cpp" +#line 2512 "yacc_sql.cpp" break; case 93: /* comp_op: GT */ -#line 746 "yacc_sql.y" +#line 748 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2516 "yacc_sql.cpp" +#line 2518 "yacc_sql.cpp" break; case 94: /* comp_op: LE */ -#line 747 "yacc_sql.y" +#line 749 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2522 "yacc_sql.cpp" +#line 2524 "yacc_sql.cpp" break; case 95: /* comp_op: GE */ -#line 748 "yacc_sql.y" +#line 750 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2528 "yacc_sql.cpp" +#line 2530 "yacc_sql.cpp" break; case 96: /* comp_op: NE */ -#line 749 "yacc_sql.y" +#line 751 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2534 "yacc_sql.cpp" +#line 2536 "yacc_sql.cpp" break; case 97: /* comp_op: IS */ -#line 750 "yacc_sql.y" +#line 752 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2540 "yacc_sql.cpp" +#line 2542 "yacc_sql.cpp" break; case 98: /* comp_op: IS NOT */ -#line 751 "yacc_sql.y" +#line 753 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2546 "yacc_sql.cpp" +#line 2548 "yacc_sql.cpp" break; case 99: /* comp_op: LIKE */ -#line 752 "yacc_sql.y" +#line 754 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2552 "yacc_sql.cpp" +#line 2554 "yacc_sql.cpp" break; case 100: /* comp_op: NOT LIKE */ -#line 753 "yacc_sql.y" +#line 755 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2558 "yacc_sql.cpp" +#line 2560 "yacc_sql.cpp" break; case 101: /* group_by: %empty */ -#line 759 "yacc_sql.y" +#line 761 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2566 "yacc_sql.cpp" +#line 2568 "yacc_sql.cpp" break; case 102: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 765 "yacc_sql.y" +#line 767 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2576,20 +2578,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2580 "yacc_sql.cpp" +#line 2582 "yacc_sql.cpp" break; case 103: /* explain_stmt: EXPLAIN command_wrapper */ -#line 778 "yacc_sql.y" +#line 780 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2589 "yacc_sql.cpp" +#line 2591 "yacc_sql.cpp" break; case 104: /* set_variable_stmt: SET ID EQ value */ -#line 786 "yacc_sql.y" +#line 788 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2597,11 +2599,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2601 "yacc_sql.cpp" +#line 2603 "yacc_sql.cpp" break; -#line 2605 "yacc_sql.cpp" +#line 2607 "yacc_sql.cpp" default: break; } @@ -2830,7 +2832,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 798 "yacc_sql.y" +#line 800 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 17f871db..004965a1 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -370,6 +370,8 @@ attr_def: $$->length = 4; } else if ($$->type == AttrType::DATES) { $$->length = 4; + } else if ($$->type == AttrType::CHARS) { + $$->length = 4; } else { ASSERT(false, "$$->type is invalid."); } From 7753a872497088024b170c9034c1c74e266c0299 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sun, 29 Sep 2024 11:54:43 +0800 Subject: [PATCH 053/308] merge remote/main --- deps/3rd/benchmark | 2 +- src/observer/common/type/null_type.cpp | 2 +- src/observer/common/type/null_type.h | 3 +- src/observer/sql/parser/lex_sql.cpp | 507 ++++++------ src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/yacc_sql.cpp | 1048 +++++++++++++----------- src/observer/sql/parser/yacc_sql.hpp | 37 +- src/observer/sql/parser/yacc_sql.y | 17 +- 8 files changed, 882 insertions(+), 736 deletions(-) diff --git a/deps/3rd/benchmark b/deps/3rd/benchmark index 3fd1e6a7..23d8c1e5 160000 --- a/deps/3rd/benchmark +++ b/deps/3rd/benchmark @@ -1 +1 @@ -Subproject commit 3fd1e6a7aee12e6878d7e039f947ea81140b4f5a +Subproject commit 23d8c1e58941ca48b4ef67595addaf78412109ef diff --git a/src/observer/common/type/null_type.cpp b/src/observer/common/type/null_type.cpp index 30a8ba20..981fdb17 100644 --- a/src/observer/common/type/null_type.cpp +++ b/src/observer/common/type/null_type.cpp @@ -26,7 +26,7 @@ RC NullType::to_string(const Value &val, string &result) const return RC::SUCCESS; } -RC NullType::cast_to(const Value &val, AttrType type, Value &result) const +RC NullType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const { ASSERT(val.attr_type() == AttrType::NULLS, "val type is not a null"); result.set_type(type); diff --git a/src/observer/common/type/null_type.h b/src/observer/common/type/null_type.h index f2c7901c..c90bc02e 100644 --- a/src/observer/common/type/null_type.h +++ b/src/observer/common/type/null_type.h @@ -23,6 +23,5 @@ class NullType : public DataType RC to_string(const Value &val, string &result) const override; - RC cast_to(const Value &val, AttrType type, Value &result) const override; + RC cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion = true) const override; }; - diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 65050d7c..edbf1b14 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -386,8 +386,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 68 -#define YY_END_OF_BUFFER 69 +#define YY_NUM_RULES 70 +#define YY_END_OF_BUFFER 71 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -395,30 +395,31 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[199] = +static const flex_int16_t yy_accept[206] = { 0, - 0, 0, 0, 0, 69, 67, 1, 2, 67, 67, - 67, 47, 48, 63, 61, 49, 62, 6, 64, 3, - 5, 54, 50, 56, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 68, 53, 0, 65, 0, 66, 3, - 0, 51, 52, 55, 60, 60, 60, 44, 60, 43, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 58, 60, 60, 60, 60, 15, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 4, - 22, 60, 60, 60, 60, 60, 60, 60, 60, 60, - - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 32, 60, 60, 57, 60, 60, 60, 28, 60, 60, - 60, 60, 60, 60, 60, 60, 19, 33, 60, 60, - 39, 35, 60, 9, 11, 7, 60, 60, 60, 20, - 60, 8, 60, 60, 60, 24, 59, 38, 36, 60, - 60, 16, 60, 17, 60, 60, 60, 60, 29, 60, - 60, 60, 60, 34, 60, 42, 14, 60, 60, 60, - 60, 60, 60, 12, 60, 60, 21, 30, 10, 26, - 60, 46, 40, 23, 60, 60, 18, 60, 13, 27, - 25, 41, 60, 60, 45, 37, 31, 0 - + 0, 0, 0, 0, 71, 69, 1, 2, 69, 69, + 69, 49, 50, 65, 63, 51, 64, 6, 66, 3, + 5, 56, 52, 58, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 70, 55, 0, 67, 0, 68, + 3, 0, 53, 54, 57, 62, 62, 62, 44, 62, + 43, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 60, 62, 62, 62, 62, + 62, 15, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 4, 22, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 32, 62, 62, 62, 59, 62, 62, + 62, 28, 62, 62, 62, 62, 62, 62, 62, 62, + 19, 33, 62, 62, 39, 35, 62, 9, 11, 7, + 62, 62, 62, 20, 62, 8, 62, 62, 62, 62, + 24, 48, 61, 38, 36, 62, 62, 16, 62, 17, + 62, 62, 62, 62, 29, 62, 62, 62, 62, 34, + 62, 42, 14, 62, 47, 62, 62, 62, 62, 62, + 12, 62, 62, 21, 30, 10, 26, 62, 46, 40, + 23, 62, 62, 18, 62, 13, 27, 25, 41, 62, + + 62, 45, 37, 31, 0 } ; static const YY_CHAR yy_ec[256] = @@ -431,12 +432,12 @@ static const YY_CHAR yy_ec[256] = 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 29, 36, 37, 38, 39, 40, 41, 42, 43, 29, - 1, 1, 1, 1, 29, 1, 44, 45, 46, 47, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 36, + 1, 1, 1, 1, 36, 1, 45, 46, 47, 48, - 48, 49, 50, 51, 52, 29, 53, 54, 55, 56, - 57, 58, 29, 59, 60, 61, 62, 63, 64, 65, - 66, 29, 1, 1, 1, 1, 1, 1, 1, 1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 36, 61, 62, 63, 64, 65, 66, 67, + 68, 36, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -453,7 +454,7 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[67] = +static const YY_CHAR yy_meta[69] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, @@ -461,134 +462,136 @@ static const YY_CHAR yy_meta[67] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2 + 2, 2, 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[204] = +static const flex_int16_t yy_base[211] = { 0, - 0, 0, 0, 0, 530, 531, 531, 531, 511, 523, - 521, 531, 531, 531, 531, 531, 511, 531, 531, 54, - 531, 52, 531, 507, 53, 57, 60, 59, 70, 91, - 61, 67, 77, 509, 74, 113, 83, 106, 117, 109, - 119, 123, 115, 531, 531, 518, 531, 516, 531, 86, - 506, 531, 531, 531, 0, 505, 134, 504, 136, 503, - 141, 144, 158, 156, 131, 169, 159, 170, 167, 143, - 174, 176, 172, 202, 495, 146, 192, 181, 199, 494, - 203, 206, 220, 230, 182, 226, 233, 228, 231, 493, - 491, 237, 246, 254, 243, 258, 261, 259, 269, 235, - - 257, 273, 279, 271, 282, 281, 286, 293, 296, 301, - 285, 307, 313, 490, 314, 315, 323, 489, 317, 297, - 337, 319, 320, 324, 336, 342, 488, 487, 338, 339, - 486, 485, 346, 484, 483, 482, 347, 350, 359, 477, - 361, 475, 355, 363, 365, 474, 473, 470, 372, 378, - 367, 469, 389, 467, 390, 370, 391, 397, 466, 387, - 403, 411, 413, 462, 414, 455, 449, 419, 415, 421, - 417, 425, 429, 431, 432, 434, 445, 443, 435, 407, - 439, 395, 295, 291, 442, 447, 251, 459, 205, 196, - 121, 78, 463, 179, 73, 69, 63, 531, 511, 513, - - 515, 75, 71 + 0, 0, 0, 0, 551, 552, 552, 552, 532, 537, + 535, 552, 552, 552, 552, 552, 525, 552, 552, 56, + 552, 54, 552, 521, 55, 59, 60, 61, 64, 89, + 63, 62, 76, 81, 523, 101, 103, 113, 110, 134, + 121, 117, 127, 124, 552, 552, 532, 552, 530, 552, + 69, 519, 552, 552, 552, 0, 518, 140, 515, 138, + 514, 144, 150, 142, 166, 141, 167, 153, 178, 169, + 164, 176, 177, 193, 235, 513, 179, 204, 194, 181, + 206, 510, 211, 215, 207, 218, 212, 236, 232, 225, + 260, 509, 508, 233, 254, 228, 264, 272, 275, 276, + + 288, 273, 279, 291, 287, 296, 297, 298, 299, 312, + 311, 316, 322, 289, 330, 326, 328, 507, 329, 337, + 334, 506, 315, 340, 351, 341, 354, 352, 363, 369, + 505, 504, 367, 355, 502, 499, 365, 496, 491, 488, + 376, 371, 388, 484, 372, 483, 374, 375, 398, 399, + 481, 462, 414, 411, 410, 394, 390, 404, 423, 396, + 424, 407, 427, 429, 364, 408, 430, 434, 435, 304, + 441, 301, 300, 437, 290, 442, 451, 447, 450, 449, + 469, 467, 470, 257, 249, 248, 238, 454, 203, 202, + 201, 459, 479, 170, 478, 118, 115, 87, 86, 494, + + 480, 84, 80, 77, 552, 543, 545, 547, 88, 87 } ; -static const flex_int16_t yy_def[204] = +static const flex_int16_t yy_def[211] = { 0, - 198, 1, 199, 199, 198, 198, 198, 198, 198, 200, - 201, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 198, 198, 200, 198, 201, 198, 198, - 198, 198, 198, 198, 203, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 198, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 0, 198, 198, - - 198, 198, 198 + 205, 1, 206, 206, 205, 205, 205, 205, 205, 207, + 208, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 205, 205, 207, 205, 208, 205, + 205, 205, 205, 205, 205, 210, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 205, 209, 209, 209, 209, 209, 209, 209, 209, + + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + + 209, 209, 209, 209, 0, 205, 205, 205, 205, 205 } ; -static const flex_int16_t yy_nxt[598] = +static const flex_int16_t yy_nxt[621] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, - 35, 34, 36, 37, 34, 38, 39, 40, 41, 42, - 43, 34, 34, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 34, 36, 37, 34, 38, 39, - 40, 41, 42, 43, 34, 34, 51, 55, 50, 52, - 53, 55, 55, 55, 55, 55, 56, 55, 65, 61, - 59, 55, 66, 55, 55, 57, 62, 55, 55, 58, - 73, 55, 55, 63, 67, 64, 72, 55, 51, 60, - - 50, 76, 65, 61, 59, 55, 66, 77, 57, 74, - 62, 68, 58, 75, 73, 80, 63, 67, 64, 72, - 55, 69, 60, 55, 70, 76, 71, 55, 86, 55, - 77, 55, 74, 55, 68, 55, 75, 55, 80, 81, - 82, 89, 88, 83, 69, 55, 78, 70, 55, 71, - 55, 79, 86, 87, 84, 55, 91, 55, 55, 85, - 55, 92, 81, 94, 82, 89, 88, 83, 97, 78, - 55, 93, 55, 55, 79, 112, 87, 84, 104, 96, - 91, 55, 85, 55, 55, 92, 55, 94, 55, 95, - 55, 97, 100, 55, 93, 55, 55, 101, 112, 98, - - 103, 104, 107, 96, 102, 99, 55, 105, 197, 106, - 55, 113, 95, 55, 121, 100, 55, 55, 114, 55, - 55, 101, 98, 103, 108, 107, 109, 102, 99, 115, - 105, 197, 106, 116, 55, 113, 117, 121, 110, 111, - 55, 114, 55, 118, 55, 55, 122, 55, 108, 55, - 109, 55, 115, 119, 125, 123, 116, 55, 124, 117, - 55, 110, 111, 120, 126, 55, 118, 127, 55, 135, - 122, 55, 55, 55, 129, 55, 119, 130, 125, 123, - 131, 124, 133, 55, 132, 55, 120, 55, 126, 128, - 134, 127, 135, 55, 136, 55, 55, 129, 138, 55, - - 55, 130, 139, 137, 131, 55, 133, 55, 132, 55, - 55, 55, 128, 140, 134, 55, 143, 136, 146, 141, - 142, 55, 138, 144, 145, 139, 137, 55, 55, 55, - 147, 55, 153, 55, 55, 148, 140, 55, 55, 156, - 143, 146, 141, 142, 149, 150, 151, 144, 145, 155, - 55, 55, 55, 55, 147, 153, 55, 152, 154, 148, - 55, 55, 157, 156, 55, 160, 163, 149, 150, 55, - 151, 158, 155, 55, 159, 55, 161, 55, 165, 55, - 152, 55, 154, 162, 55, 157, 55, 164, 172, 160, - 163, 170, 55, 168, 158, 166, 167, 159, 171, 161, - - 169, 55, 165, 55, 55, 55, 162, 175, 173, 55, - 164, 55, 172, 174, 176, 170, 168, 55, 166, 167, - 177, 55, 171, 169, 178, 55, 179, 55, 55, 55, - 175, 55, 173, 55, 180, 55, 186, 174, 176, 55, - 181, 185, 183, 55, 177, 55, 55, 178, 55, 55, - 179, 182, 184, 55, 188, 190, 55, 55, 180, 55, - 186, 55, 187, 55, 181, 185, 183, 189, 194, 55, - 191, 192, 193, 55, 182, 184, 55, 55, 188, 190, - 55, 55, 195, 55, 55, 187, 196, 55, 55, 55, - 189, 55, 194, 191, 192, 193, 55, 55, 55, 55, - - 55, 55, 55, 55, 55, 55, 195, 90, 55, 55, - 196, 44, 44, 46, 46, 48, 48, 55, 55, 55, - 90, 49, 47, 55, 54, 50, 49, 47, 45, 198, - 5, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198 - + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, + 43, 44, 35, 35, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 35, 37, 38, 35, + 39, 40, 41, 42, 43, 44, 35, 35, 52, 56, + 51, 53, 54, 56, 56, 56, 56, 56, 56, 62, + 66, 52, 60, 51, 67, 74, 63, 58, 56, 57, + 56, 56, 59, 64, 56, 56, 65, 68, 56, 73, + + 56, 56, 61, 56, 62, 66, 69, 60, 75, 67, + 74, 63, 58, 76, 77, 56, 59, 56, 64, 70, + 65, 68, 71, 73, 56, 72, 61, 56, 78, 56, + 69, 56, 56, 75, 79, 56, 80, 76, 56, 77, + 88, 56, 81, 83, 70, 82, 90, 71, 56, 72, + 91, 89, 56, 78, 56, 56, 56, 84, 56, 79, + 85, 80, 93, 94, 56, 88, 81, 56, 83, 96, + 82, 90, 86, 97, 95, 91, 89, 87, 56, 99, + 56, 56, 84, 56, 56, 85, 102, 93, 94, 98, + 56, 56, 56, 56, 96, 56, 86, 100, 97, 95, + + 106, 87, 105, 99, 101, 103, 115, 56, 56, 107, + 108, 102, 104, 117, 98, 56, 56, 56, 56, 118, + 56, 56, 100, 109, 106, 56, 56, 105, 101, 56, + 103, 115, 56, 116, 107, 108, 119, 104, 117, 56, + 123, 120, 56, 118, 125, 121, 56, 56, 109, 56, + 56, 124, 56, 122, 127, 128, 126, 110, 116, 111, + 130, 119, 56, 56, 132, 123, 120, 112, 56, 125, + 121, 56, 113, 114, 56, 131, 124, 122, 56, 127, + 128, 126, 110, 129, 111, 130, 56, 56, 132, 56, + 56, 134, 112, 56, 135, 133, 113, 114, 136, 137, + + 131, 56, 56, 56, 56, 56, 142, 139, 129, 138, + 56, 56, 56, 56, 56, 56, 134, 140, 56, 135, + 133, 141, 151, 136, 137, 56, 56, 143, 144, 56, + 56, 142, 139, 146, 138, 147, 56, 145, 148, 149, + 56, 140, 56, 56, 56, 150, 141, 151, 56, 153, + 154, 56, 143, 144, 56, 56, 158, 157, 146, 155, + 147, 145, 152, 148, 149, 56, 56, 156, 56, 56, + 150, 161, 160, 162, 153, 154, 159, 56, 56, 56, + 158, 56, 157, 56, 155, 56, 56, 152, 56, 56, + 56, 163, 156, 167, 166, 169, 161, 160, 162, 164, + + 159, 165, 56, 168, 56, 174, 172, 171, 56, 170, + 56, 179, 56, 56, 178, 163, 173, 167, 56, 166, + 169, 56, 56, 164, 56, 56, 165, 168, 56, 177, + 174, 172, 171, 170, 175, 176, 179, 56, 56, 178, + 173, 56, 180, 56, 56, 182, 185, 181, 56, 56, + 183, 56, 184, 186, 177, 56, 56, 187, 175, 176, + 190, 56, 188, 56, 56, 56, 193, 180, 56, 182, + 185, 192, 181, 56, 195, 183, 56, 184, 186, 189, + 191, 56, 187, 56, 56, 190, 199, 188, 194, 200, + 197, 193, 56, 56, 56, 56, 192, 56, 56, 195, + + 201, 202, 56, 189, 191, 56, 196, 198, 56, 204, + 56, 199, 194, 56, 200, 197, 56, 203, 56, 56, + 56, 56, 56, 92, 56, 201, 202, 56, 56, 56, + 196, 198, 56, 92, 204, 50, 48, 56, 55, 51, + 50, 48, 203, 45, 45, 47, 47, 49, 49, 46, + 205, 5, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205 } ; -static const flex_int16_t yy_chk[598] = +static const flex_int16_t yy_chk[621] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -596,66 +599,68 @@ static const flex_int16_t yy_chk[598] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 203, 28, 27, 31, 202, 197, 28, 27, - 26, 32, 28, 196, 29, 25, 27, 195, 35, 25, - 32, 33, 192, 27, 28, 27, 31, 37, 50, 26, - - 50, 35, 28, 27, 26, 30, 28, 35, 25, 33, - 27, 29, 25, 33, 32, 37, 27, 28, 27, 31, - 38, 30, 26, 40, 30, 35, 30, 36, 40, 43, - 35, 39, 33, 41, 29, 191, 33, 42, 37, 38, - 39, 43, 42, 39, 30, 65, 36, 30, 57, 30, - 59, 36, 40, 41, 39, 61, 57, 70, 62, 39, - 76, 59, 38, 62, 39, 43, 42, 39, 65, 36, - 64, 61, 63, 67, 36, 76, 41, 39, 70, 64, - 57, 69, 39, 66, 68, 59, 73, 62, 71, 63, - 72, 65, 67, 194, 61, 78, 85, 68, 76, 66, - - 69, 70, 73, 64, 68, 66, 77, 71, 194, 72, - 190, 77, 63, 79, 85, 67, 74, 81, 78, 189, - 82, 68, 66, 69, 74, 73, 74, 68, 66, 79, - 71, 194, 72, 81, 83, 77, 82, 85, 74, 74, - 86, 78, 88, 82, 84, 89, 86, 87, 74, 100, - 74, 92, 79, 83, 89, 87, 81, 95, 88, 82, - 93, 74, 74, 84, 92, 187, 82, 93, 94, 100, - 86, 101, 96, 98, 95, 97, 83, 96, 89, 87, - 97, 88, 98, 99, 97, 104, 84, 102, 92, 94, - 99, 93, 100, 103, 101, 106, 105, 95, 103, 111, - - 107, 96, 104, 102, 97, 184, 98, 108, 97, 183, - 109, 120, 94, 105, 99, 110, 108, 101, 111, 106, - 107, 112, 103, 109, 110, 104, 102, 113, 115, 116, - 112, 119, 120, 122, 123, 113, 105, 117, 124, 123, - 108, 111, 106, 107, 115, 116, 117, 109, 110, 122, - 125, 121, 129, 130, 112, 120, 126, 119, 121, 113, - 133, 137, 124, 123, 138, 129, 137, 115, 116, 143, - 117, 125, 122, 139, 126, 141, 130, 144, 139, 145, - 119, 151, 121, 133, 156, 124, 149, 138, 151, 129, - 137, 149, 150, 144, 125, 141, 143, 126, 150, 130, - - 145, 160, 139, 153, 155, 157, 133, 156, 153, 182, - 138, 158, 151, 155, 157, 149, 144, 161, 141, 143, - 158, 180, 150, 145, 160, 162, 161, 163, 165, 169, - 156, 171, 153, 168, 162, 170, 171, 155, 157, 172, - 163, 170, 168, 173, 158, 174, 175, 160, 176, 179, - 161, 165, 169, 181, 173, 175, 185, 178, 162, 177, - 171, 186, 172, 167, 163, 170, 168, 174, 186, 166, - 176, 181, 185, 188, 165, 169, 164, 193, 173, 175, - 159, 154, 188, 152, 148, 172, 193, 147, 146, 142, - 174, 140, 186, 176, 181, 185, 136, 135, 134, 132, - - 131, 128, 127, 118, 114, 91, 188, 90, 80, 75, - 193, 199, 199, 200, 200, 201, 201, 60, 58, 56, - 51, 48, 46, 34, 24, 17, 11, 10, 9, 5, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198 - + 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, + 20, 22, 22, 26, 27, 28, 32, 31, 29, 27, + 28, 51, 26, 51, 28, 32, 27, 25, 210, 209, + 33, 204, 25, 27, 203, 34, 27, 28, 202, 31, + + 199, 198, 26, 30, 27, 28, 29, 26, 33, 28, + 32, 27, 25, 33, 34, 36, 25, 37, 27, 30, + 27, 28, 30, 31, 39, 30, 26, 38, 36, 197, + 29, 42, 196, 33, 36, 41, 37, 33, 44, 34, + 41, 43, 37, 39, 30, 38, 43, 30, 40, 30, + 44, 42, 60, 36, 58, 66, 64, 40, 62, 36, + 40, 37, 58, 60, 63, 41, 37, 68, 39, 63, + 38, 43, 40, 64, 62, 44, 42, 40, 71, 66, + 65, 67, 40, 70, 194, 40, 68, 58, 60, 65, + 72, 73, 69, 77, 63, 80, 40, 67, 64, 62, + + 71, 40, 70, 66, 67, 69, 77, 74, 79, 72, + 73, 68, 69, 79, 65, 191, 190, 189, 78, 80, + 81, 85, 67, 74, 71, 83, 87, 70, 67, 84, + 69, 77, 86, 78, 72, 73, 81, 69, 79, 90, + 85, 83, 96, 80, 87, 84, 89, 94, 74, 75, + 88, 86, 187, 84, 89, 90, 88, 75, 78, 75, + 94, 81, 186, 185, 96, 85, 83, 75, 95, 87, + 84, 184, 75, 75, 91, 95, 86, 84, 97, 89, + 90, 88, 75, 91, 75, 94, 98, 102, 96, 99, + 100, 98, 75, 103, 99, 97, 75, 75, 99, 100, + + 95, 105, 101, 114, 175, 104, 105, 102, 91, 101, + 106, 107, 108, 109, 173, 172, 98, 103, 170, 99, + 97, 104, 114, 99, 100, 111, 110, 106, 107, 123, + 112, 105, 102, 109, 101, 110, 113, 108, 111, 112, + 116, 103, 117, 119, 115, 113, 104, 114, 121, 116, + 117, 120, 106, 107, 124, 126, 123, 121, 109, 119, + 110, 108, 115, 111, 112, 125, 128, 120, 127, 134, + 113, 126, 125, 127, 116, 117, 124, 129, 165, 137, + 123, 133, 121, 130, 119, 142, 145, 115, 147, 148, + 141, 128, 120, 134, 133, 141, 126, 125, 127, 129, + + 124, 130, 143, 137, 157, 148, 145, 143, 156, 142, + 160, 157, 149, 150, 156, 128, 147, 134, 158, 133, + 141, 162, 166, 129, 155, 154, 130, 137, 153, 155, + 148, 145, 143, 142, 149, 150, 157, 159, 161, 156, + 147, 163, 159, 164, 167, 162, 166, 161, 168, 169, + 163, 174, 164, 167, 155, 171, 176, 168, 149, 150, + 174, 178, 169, 180, 179, 177, 178, 159, 188, 162, + 166, 177, 161, 192, 180, 163, 152, 164, 167, 171, + 176, 182, 168, 181, 183, 174, 188, 169, 179, 192, + 182, 178, 195, 193, 201, 151, 177, 146, 144, 180, + + 193, 195, 140, 171, 176, 139, 181, 183, 200, 201, + 138, 188, 179, 136, 192, 182, 135, 200, 132, 131, + 122, 118, 93, 92, 82, 193, 195, 76, 61, 59, + 181, 183, 57, 52, 201, 49, 47, 35, 24, 17, + 11, 10, 200, 206, 206, 207, 207, 208, 208, 9, + 5, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205 } ; /* The intent behind this definition is that it'll catch @@ -690,7 +695,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 693 "lex_sql.cpp" +#line 698 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -699,7 +704,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 702 "lex_sql.cpp" +#line 707 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -985,7 +990,7 @@ YY_DECL #line 75 "lex_sql.l" -#line 988 "lex_sql.cpp" +#line 993 "lex_sql.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1012,13 +1017,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 199 ) + if ( yy_current_state >= 206 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 531 ); + while ( yy_base[yy_current_state] != 552 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1276,107 +1281,117 @@ RETURN_TOKEN(FORMAT); case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(LBRACE); +RETURN_TOKEN(INNER); YY_BREAK case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(RBRACE); +RETURN_TOKEN(JOIN); YY_BREAK case 49: YY_RULE_SETUP -#line 128 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 127 "lex_sql.l" +RETURN_TOKEN(LBRACE); YY_BREAK case 50: YY_RULE_SETUP -#line 129 "lex_sql.l" -RETURN_TOKEN(EQ); +#line 128 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(COMMA); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(EQ); YY_BREAK case 53: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LE); YY_BREAK case 54: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(NE); YY_BREAK case 55: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(NE); YY_BREAK case 56: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(LT); YY_BREAK case 57: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(NOT); +RETURN_TOKEN(GE); YY_BREAK case 58: YY_RULE_SETUP #line 137 "lex_sql.l" -RETURN_TOKEN(IS); +RETURN_TOKEN(GT); YY_BREAK case 59: YY_RULE_SETUP #line 138 "lex_sql.l" -RETURN_TOKEN(LIKE); +RETURN_TOKEN(NOT); YY_BREAK case 60: YY_RULE_SETUP -#line 140 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +#line 139 "lex_sql.l" +RETURN_TOKEN(IS); YY_BREAK case 61: -#line 143 "lex_sql.l" +YY_RULE_SETUP +#line 140 "lex_sql.l" +RETURN_TOKEN(LIKE); + YY_BREAK case 62: -#line 144 "lex_sql.l" +YY_RULE_SETUP +#line 142 "lex_sql.l" +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK case 63: #line 145 "lex_sql.l" case 64: +#line 146 "lex_sql.l" +case 65: +#line 147 "lex_sql.l" +case 66: YY_RULE_SETUP -#line 145 "lex_sql.l" +#line 147 "lex_sql.l" { return yytext[0]; } YY_BREAK -case 65: -/* rule 65 can match eol */ +case 67: +/* rule 67 can match eol */ YY_RULE_SETUP -#line 146 "lex_sql.l" +#line 148 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 66: -/* rule 66 can match eol */ +case 68: +/* rule 68 can match eol */ YY_RULE_SETUP -#line 147 "lex_sql.l" +#line 149 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 67: +case 69: YY_RULE_SETUP -#line 149 "lex_sql.l" +#line 151 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK -case 68: +case 70: YY_RULE_SETUP -#line 150 "lex_sql.l" +#line 152 "lex_sql.l" ECHO; YY_BREAK -#line 1379 "lex_sql.cpp" +#line 1394 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1676,7 +1691,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 199 ) + if ( yy_current_state >= 206 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1705,11 +1720,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 199 ) + if ( yy_current_state >= 206 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 198); + yy_is_jam = (yy_current_state == 205); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2532,7 +2547,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 150 "lex_sql.l" +#line 152 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 4cedec12..e8700426 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -542,7 +542,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 150 "lex_sql.l" +#line 152 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 5d682e7f..5b24d3bc 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -198,67 +198,74 @@ enum yysymbol_kind_t YYSYMBOL_EXPLAIN = 46, /* EXPLAIN */ YYSYMBOL_STORAGE = 47, /* STORAGE */ YYSYMBOL_FORMAT = 48, /* FORMAT */ - YYSYMBOL_EQ = 49, /* EQ */ - YYSYMBOL_LT = 50, /* LT */ - YYSYMBOL_GT = 51, /* GT */ - YYSYMBOL_LE = 52, /* LE */ - YYSYMBOL_GE = 53, /* GE */ - YYSYMBOL_NE = 54, /* NE */ - YYSYMBOL_LIKE = 55, /* LIKE */ - YYSYMBOL_IS = 56, /* IS */ - YYSYMBOL_NUMBER = 57, /* NUMBER */ - YYSYMBOL_FLOAT = 58, /* FLOAT */ - YYSYMBOL_ID = 59, /* ID */ - YYSYMBOL_SSS = 60, /* SSS */ - YYSYMBOL_61_ = 61, /* '+' */ - YYSYMBOL_62_ = 62, /* '-' */ - YYSYMBOL_63_ = 63, /* '*' */ - YYSYMBOL_64_ = 64, /* '/' */ - YYSYMBOL_UMINUS = 65, /* UMINUS */ - YYSYMBOL_YYACCEPT = 66, /* $accept */ - YYSYMBOL_commands = 67, /* commands */ - YYSYMBOL_command_wrapper = 68, /* command_wrapper */ - YYSYMBOL_exit_stmt = 69, /* exit_stmt */ - YYSYMBOL_help_stmt = 70, /* help_stmt */ - YYSYMBOL_sync_stmt = 71, /* sync_stmt */ - YYSYMBOL_begin_stmt = 72, /* begin_stmt */ - YYSYMBOL_commit_stmt = 73, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 74, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 75, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 76, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 77, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 78, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 79, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 80, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 81, /* attr_def_list */ - YYSYMBOL_attr_def = 82, /* attr_def */ - YYSYMBOL_nullable_constraint = 83, /* nullable_constraint */ - YYSYMBOL_number = 84, /* number */ - YYSYMBOL_type = 85, /* type */ - YYSYMBOL_insert_stmt = 86, /* insert_stmt */ - YYSYMBOL_value_list = 87, /* value_list */ - YYSYMBOL_value = 88, /* value */ - YYSYMBOL_storage_format = 89, /* storage_format */ - YYSYMBOL_delete_stmt = 90, /* delete_stmt */ - YYSYMBOL_update_stmt = 91, /* update_stmt */ - YYSYMBOL_select_stmt = 92, /* select_stmt */ - YYSYMBOL_calc_stmt = 93, /* calc_stmt */ - YYSYMBOL_expression_list = 94, /* expression_list */ - YYSYMBOL_expression = 95, /* expression */ - YYSYMBOL_alias = 96, /* alias */ - YYSYMBOL_aggr_func_expr = 97, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 98, /* rel_attr */ - YYSYMBOL_relation = 99, /* relation */ - YYSYMBOL_rel_list = 100, /* rel_list */ - YYSYMBOL_where = 101, /* where */ - YYSYMBOL_condition_list = 102, /* condition_list */ - YYSYMBOL_condition = 103, /* condition */ - YYSYMBOL_comp_op = 104, /* comp_op */ - YYSYMBOL_group_by = 105, /* group_by */ - YYSYMBOL_load_data_stmt = 106, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 107, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 108, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 109 /* opt_semicolon */ + YYSYMBOL_INNER = 49, /* INNER */ + YYSYMBOL_JOIN = 50, /* JOIN */ + YYSYMBOL_EQ = 51, /* EQ */ + YYSYMBOL_LT = 52, /* LT */ + YYSYMBOL_GT = 53, /* GT */ + YYSYMBOL_LE = 54, /* LE */ + YYSYMBOL_GE = 55, /* GE */ + YYSYMBOL_NE = 56, /* NE */ + YYSYMBOL_LIKE = 57, /* LIKE */ + YYSYMBOL_IS = 58, /* IS */ + YYSYMBOL_NUMBER = 59, /* NUMBER */ + YYSYMBOL_FLOAT = 60, /* FLOAT */ + YYSYMBOL_ID = 61, /* ID */ + YYSYMBOL_SSS = 62, /* SSS */ + YYSYMBOL_63_ = 63, /* '+' */ + YYSYMBOL_64_ = 64, /* '-' */ + YYSYMBOL_65_ = 65, /* '*' */ + YYSYMBOL_66_ = 66, /* '/' */ + YYSYMBOL_UMINUS = 67, /* UMINUS */ + YYSYMBOL_YYACCEPT = 68, /* $accept */ + YYSYMBOL_commands = 69, /* commands */ + YYSYMBOL_command_wrapper = 70, /* command_wrapper */ + YYSYMBOL_exit_stmt = 71, /* exit_stmt */ + YYSYMBOL_help_stmt = 72, /* help_stmt */ + YYSYMBOL_sync_stmt = 73, /* sync_stmt */ + YYSYMBOL_begin_stmt = 74, /* begin_stmt */ + YYSYMBOL_commit_stmt = 75, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 76, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 77, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 78, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 79, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 80, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 81, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 82, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 83, /* attr_def_list */ + YYSYMBOL_attr_def = 84, /* attr_def */ + YYSYMBOL_nullable_constraint = 85, /* nullable_constraint */ + YYSYMBOL_number = 86, /* number */ + YYSYMBOL_type = 87, /* type */ + YYSYMBOL_insert_stmt = 88, /* insert_stmt */ + YYSYMBOL_values_list = 89, /* values_list */ + YYSYMBOL_value_list = 90, /* value_list */ + YYSYMBOL_value = 91, /* value */ + YYSYMBOL_storage_format = 92, /* storage_format */ + YYSYMBOL_delete_stmt = 93, /* delete_stmt */ + YYSYMBOL_update_stmt = 94, /* update_stmt */ + YYSYMBOL_setClauses = 95, /* setClauses */ + YYSYMBOL_setClause = 96, /* setClause */ + YYSYMBOL_select_stmt = 97, /* select_stmt */ + YYSYMBOL_calc_stmt = 98, /* calc_stmt */ + YYSYMBOL_expression_list = 99, /* expression_list */ + YYSYMBOL_expression = 100, /* expression */ + YYSYMBOL_alias = 101, /* alias */ + YYSYMBOL_aggr_func_expr = 102, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 103, /* rel_attr */ + YYSYMBOL_relation = 104, /* relation */ + YYSYMBOL_rel_list = 105, /* rel_list */ + YYSYMBOL_joinClause = 106, /* joinClause */ + YYSYMBOL_joinClauses = 107, /* joinClauses */ + YYSYMBOL_where = 108, /* where */ + YYSYMBOL_condition_list = 109, /* condition_list */ + YYSYMBOL_condition = 110, /* condition */ + YYSYMBOL_comp_op = 111, /* comp_op */ + YYSYMBOL_group_by = 112, /* group_by */ + YYSYMBOL_load_data_stmt = 113, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 114, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 115, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 116 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -589,19 +596,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 172 +#define YYLAST 196 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 66 +#define YYNTOKENS 68 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 44 +#define YYNNTS 49 /* YYNRULES -- Number of rules. */ -#define YYNRULES 106 +#define YYNRULES 115 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 188 +#define YYNSTATES 209 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 316 +#define YYMAXUTOK 318 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -619,7 +626,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 63, 61, 2, 62, 2, 64, 2, 2, + 2, 2, 65, 63, 2, 64, 2, 66, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -646,24 +653,25 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 65 + 55, 56, 57, 58, 59, 60, 61, 62, 67 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 199, 199, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 230, 236, 241, 247, 253, 259, 265, - 272, 278, 286, 300, 310, 334, 337, 350, 362, 387, - 391, 396, 402, 405, 406, 407, 408, 411, 428, 431, - 442, 446, 450, 456, 462, 465, 472, 484, 499, 524, - 533, 542, 557, 560, 563, 566, 569, 573, 576, 581, - 587, 590, 597, 600, 603, 608, 616, 622, 627, 637, - 642, 652, 671, 674, 680, 683, 688, 695, 707, 719, - 731, 746, 747, 748, 749, 750, 751, 752, 753, 754, - 755, 761, 766, 779, 787, 797, 798 + 0, 211, 211, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 242, 248, 253, 259, 265, 271, 277, + 284, 290, 298, 312, 322, 346, 349, 362, 374, 399, + 403, 408, 414, 417, 418, 419, 420, 424, 437, 443, + 450, 456, 464, 468, 472, 478, 485, 488, 495, 508, + 523, 529, 537, 547, 570, 606, 615, 624, 639, 642, + 645, 648, 651, 655, 658, 663, 669, 672, 679, 682, + 685, 690, 698, 704, 709, 719, 725, 735, 753, 764, + 770, 780, 783, 789, 792, 797, 804, 816, 828, 840, + 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, + 870, 875, 888, 896, 906, 907 }; #endif @@ -685,18 +693,19 @@ static const char *const yytname[] = "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "STRING_T", "FLOAT_T", "DATE_T", "NOT", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "SET", "ON", - "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "EQ", "LT", - "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", "SSS", - "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", - "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", - "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", - "desc_table_stmt", "create_index_stmt", "drop_index_stmt", - "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", - "number", "type", "insert_stmt", "value_list", "value", "storage_format", - "delete_stmt", "update_stmt", "select_stmt", "calc_stmt", - "expression_list", "expression", "alias", "aggr_func_expr", "rel_attr", - "relation", "rel_list", "where", "condition_list", "condition", - "comp_op", "group_by", "load_data_stmt", "explain_stmt", + "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", + "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", + "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", + "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", + "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", + "show_tables_stmt", "desc_table_stmt", "create_index_stmt", + "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", + "nullable_constraint", "number", "type", "insert_stmt", "values_list", + "value_list", "value", "storage_format", "delete_stmt", "update_stmt", + "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", + "expression", "alias", "aggr_func_expr", "rel_attr", "relation", + "rel_list", "joinClause", "joinClauses", "where", "condition_list", + "condition", "comp_op", "group_by", "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; @@ -707,7 +716,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-104) +#define YYPACT_NINF (-156) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -721,25 +730,27 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 73, -1, 3, -7, -7, -40, 11, -104, 0, -15, - -25, -104, -104, -104, -104, -104, -11, 1, 73, 54, - 62, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, 22, 25, 46, 53, -7, -104, -104, -104, -13, - -104, -7, -104, -104, -104, 5, -104, -104, 32, -104, - -104, 56, 58, 72, 69, 76, -104, -104, -104, -104, - 100, 80, -104, 81, 14, -16, 65, -104, 66, -104, - -7, -7, -7, -7, 104, 68, 91, 94, 77, -20, - 74, 78, 79, 82, -104, -104, 114, -104, -104, 9, - 9, -104, -104, -7, -104, -2, 94, 119, 51, -104, - 93, -104, 107, 75, 118, 124, -104, -104, -104, 123, - -104, -20, 111, -24, -24, -104, 108, -20, 138, -104, - -104, -104, -104, 63, 78, 128, 92, 68, -104, 130, - 95, -104, -104, -104, -104, -104, -104, -104, 125, 51, - 51, 51, 94, 97, 96, 126, -104, -104, 118, 112, - 133, -104, -20, 137, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, 139, -104, -104, 113, -104, -104, - 130, -104, -14, 115, -104, -104, 103, -104 + 97, 7, 12, 37, 37, -48, 23, -156, -19, -7, + -23, -156, -156, -156, -156, -156, -20, 9, 97, 58, + 71, -156, -156, -156, -156, -156, -156, -156, -156, -156, + -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, + -156, 6, 18, 45, 46, 37, -156, -156, -156, -10, + -156, 37, -156, -156, -156, -2, -156, -156, 79, -156, + -156, 47, 57, 78, 76, 83, -156, -156, -156, -156, + 109, 90, -156, 91, 19, 16, 73, -156, 74, -156, + 37, 37, 37, 37, 114, 80, 100, 103, 84, 64, + 77, 93, 94, 96, -156, -156, 123, -156, -156, 21, + 21, -156, -156, 37, -156, -1, 103, 136, -16, -156, + 107, -13, -156, -156, 124, 1, 137, 141, -156, -156, + -156, 112, 142, -156, 64, 143, 128, 95, 95, -156, + 126, 64, 84, -156, 158, -156, -156, -156, -156, -8, + 93, 147, 108, 80, 80, -156, 70, -156, 150, 115, + -156, -156, -156, -156, -156, -156, -156, 144, -16, -16, + -16, -156, -156, 110, 116, 145, -156, -156, 137, 130, + 152, 138, 129, 103, 4, -156, -156, 64, 64, -156, + -156, -156, -156, -156, -156, -156, -156, -156, 160, -156, + -156, 131, -156, -156, -16, 132, -156, -156, 72, 2, + 133, -156, 80, -156, -156, -156, 122, -156, -156 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -749,43 +760,45 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 105, 22, 21, 14, 15, 16, 17, 9, 10, 11, + 114, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 53, 50, 51, 77, - 52, 0, 70, 68, 59, 72, 71, 69, 0, 31, - 30, 0, 0, 0, 0, 0, 103, 1, 106, 2, - 0, 0, 29, 0, 0, 0, 0, 67, 0, 73, - 0, 0, 0, 0, 60, 0, 0, 82, 0, 0, - 0, 0, 0, 0, 66, 76, 0, 78, 74, 62, - 63, 64, 65, 0, 79, 72, 82, 0, 84, 56, - 0, 104, 0, 0, 35, 0, 33, 75, 61, 80, - 101, 0, 77, 0, 0, 83, 85, 0, 0, 43, - 44, 45, 46, 41, 0, 0, 0, 0, 58, 48, - 0, 91, 92, 93, 94, 95, 96, 99, 97, 0, - 0, 84, 82, 0, 0, 0, 40, 38, 35, 54, - 0, 81, 0, 0, 100, 98, 88, 90, 87, 89, - 86, 57, 102, 42, 0, 39, 36, 0, 34, 32, - 48, 47, 41, 0, 49, 37, 0, 55 + 20, 0, 0, 0, 0, 0, 55, 52, 53, 83, + 54, 0, 76, 74, 65, 78, 77, 75, 0, 31, + 30, 0, 0, 0, 0, 0, 112, 1, 115, 2, + 0, 0, 29, 0, 0, 0, 0, 73, 0, 79, + 0, 0, 0, 0, 66, 0, 0, 91, 0, 0, + 0, 0, 0, 0, 72, 82, 0, 84, 80, 68, + 69, 70, 71, 0, 85, 78, 91, 0, 93, 58, + 0, 91, 60, 113, 0, 0, 35, 0, 33, 81, + 67, 0, 86, 110, 0, 47, 83, 0, 0, 92, + 94, 0, 0, 59, 0, 43, 44, 45, 46, 41, + 0, 0, 0, 0, 0, 63, 0, 50, 0, 0, + 100, 101, 102, 103, 104, 105, 108, 106, 0, 0, + 93, 62, 61, 0, 0, 0, 40, 38, 35, 56, + 0, 0, 89, 91, 78, 87, 48, 0, 0, 109, + 107, 97, 99, 96, 98, 95, 111, 42, 0, 39, + 36, 0, 34, 32, 93, 0, 110, 51, 0, 41, + 0, 88, 0, 64, 49, 37, 0, 90, 57 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -104, -104, 145, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, 7, 33, -12, -104, -104, - -104, -9, -88, -104, -104, -104, -104, -104, -4, 49, - 61, -104, -91, -104, 31, -103, 18, -104, 48, -104, - -104, -104, -104, -104 + -156, -156, 167, -156, -156, -156, -156, -156, -156, -156, + -156, -156, -156, -156, -156, 20, 49, -12, -156, -156, + -156, -156, 8, -89, -156, -156, -156, -156, 59, -156, + -156, -3, -31, 135, -156, -104, -78, 48, -156, -9, + -100, -155, -156, 66, 0, -156, -156, -156, -156 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 135, 114, 157, 174, 133, - 33, 163, 53, 178, 34, 35, 36, 37, 54, 55, - 84, 56, 57, 105, 106, 109, 125, 126, 149, 138, - 38, 39, 40, 69 + 28, 29, 30, 31, 32, 141, 116, 167, 188, 139, + 33, 125, 146, 53, 192, 34, 35, 111, 112, 36, + 37, 54, 55, 122, 56, 57, 171, 106, 172, 173, + 109, 129, 130, 158, 145, 38, 39, 40, 69 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -793,46 +806,50 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 58, 111, 78, 120, 45, 95, 140, 75, 41, 78, - 42, 46, 43, 45, 44, 46, 155, 124, 156, 59, - 123, 60, 76, 62, 46, 141, 142, 143, 144, 145, - 146, 147, 148, 139, 63, 94, 61, 47, 48, 152, - 50, 47, 48, 49, 50, 65, 51, 52, 64, 171, - 47, 48, 49, 50, 67, 51, 52, 79, 167, 169, - 124, 166, 168, 123, 79, 68, 80, 81, 82, 83, - 85, 96, 82, 83, 180, 80, 81, 82, 83, 1, - 2, 70, 46, 154, 71, 3, 4, 5, 6, 7, - 8, 9, 10, 155, 74, 156, 11, 12, 13, 118, - 77, 129, 130, 131, 132, 72, 14, 15, 47, 48, - 122, 50, 73, 88, 16, 86, 17, 87, 89, 18, - 91, 90, 92, 93, 97, 98, 103, 104, 107, 99, - 100, 101, 102, 108, 112, 117, 110, 113, 115, 121, - 134, 116, 127, 128, 136, 137, 76, 153, 151, 159, - 164, 160, 162, 173, 179, 165, 172, 175, 181, 177, - 182, 183, 187, 66, 186, 176, 119, 158, 161, 170, - 185, 184, 150 + 113, 58, 78, 78, 128, 185, 123, 105, 78, 132, + 75, 133, 164, 59, 74, 46, 41, 61, 42, 127, + 77, 43, 165, 44, 166, 76, 108, 135, 136, 137, + 138, 62, 165, 60, 166, 147, 45, 95, 63, 201, + 94, 64, 161, 47, 48, 126, 50, 46, 121, 99, + 100, 101, 102, 65, 182, 184, 128, 45, 67, 79, + 79, 80, 81, 82, 83, 79, 174, 70, 46, 181, + 183, 127, 96, 196, 68, 47, 48, 49, 50, 71, + 51, 52, 80, 81, 82, 83, 82, 83, 197, 147, + 128, 176, 177, 204, 177, 46, 47, 48, 49, 50, + 120, 51, 52, 1, 2, 127, 72, 73, 86, 3, + 4, 5, 6, 7, 8, 9, 10, 85, 87, 88, + 11, 12, 13, 47, 48, 149, 50, 89, 90, 91, + 14, 15, 92, 93, 97, 98, 103, 107, 16, 114, + 17, 104, 108, 18, 119, 110, 150, 151, 152, 153, + 154, 155, 156, 157, 115, 117, 124, 118, 131, 140, + 134, 142, 143, 76, 144, 148, 160, 163, 169, 170, + 178, 186, 179, 193, 180, 187, 189, 191, 195, 200, + 194, 199, 202, 208, 206, 66, 198, 205, 190, 168, + 84, 162, 175, 207, 159, 0, 203 }; -static const yytype_uint8 yycheck[] = +static const yytype_int16 yycheck[] = { - 4, 89, 4, 106, 20, 21, 30, 20, 9, 4, - 11, 31, 9, 20, 11, 31, 30, 108, 32, 59, - 108, 10, 35, 38, 31, 49, 50, 51, 52, 53, - 54, 55, 56, 121, 59, 21, 36, 57, 58, 127, - 60, 57, 58, 59, 60, 44, 62, 63, 59, 152, - 57, 58, 59, 60, 0, 62, 63, 59, 149, 150, - 151, 149, 150, 151, 59, 3, 61, 62, 63, 64, - 38, 75, 63, 64, 162, 61, 62, 63, 64, 6, - 7, 59, 31, 20, 59, 12, 13, 14, 15, 16, - 17, 18, 19, 30, 45, 32, 23, 24, 25, 103, - 51, 26, 27, 28, 29, 59, 33, 34, 57, 58, - 59, 60, 59, 41, 41, 59, 43, 59, 49, 46, - 20, 45, 42, 42, 59, 59, 22, 59, 37, 80, - 81, 82, 83, 39, 60, 21, 59, 59, 59, 20, - 22, 59, 49, 36, 20, 22, 35, 9, 40, 21, - 55, 59, 22, 57, 21, 30, 59, 31, 21, 47, - 21, 48, 59, 18, 49, 158, 105, 134, 137, 151, - 182, 180, 124 + 89, 4, 4, 4, 108, 160, 106, 85, 4, 22, + 20, 111, 20, 61, 45, 31, 9, 36, 11, 108, + 51, 9, 30, 11, 32, 35, 39, 26, 27, 28, + 29, 38, 30, 10, 32, 124, 20, 21, 61, 194, + 21, 61, 131, 59, 60, 61, 62, 31, 49, 80, + 81, 82, 83, 44, 158, 159, 160, 20, 0, 61, + 61, 63, 64, 65, 66, 61, 144, 61, 31, 158, + 159, 160, 75, 173, 3, 59, 60, 61, 62, 61, + 64, 65, 63, 64, 65, 66, 65, 66, 177, 178, + 194, 21, 22, 21, 22, 31, 59, 60, 61, 62, + 103, 64, 65, 6, 7, 194, 61, 61, 61, 12, + 13, 14, 15, 16, 17, 18, 19, 38, 61, 41, + 23, 24, 25, 59, 60, 30, 62, 51, 45, 20, + 33, 34, 42, 42, 61, 61, 22, 37, 41, 62, + 43, 61, 39, 46, 21, 61, 51, 52, 53, 54, + 55, 56, 57, 58, 61, 61, 20, 61, 51, 22, + 36, 20, 50, 35, 22, 22, 40, 9, 21, 61, + 20, 61, 57, 21, 30, 59, 31, 47, 49, 48, + 42, 21, 50, 61, 51, 18, 178, 199, 168, 140, + 55, 132, 144, 202, 128, -1, 196 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -840,40 +857,43 @@ static const yytype_uint8 yycheck[] = static const yytype_int8 yystos[] = { 0, 6, 7, 12, 13, 14, 15, 16, 17, 18, - 19, 23, 24, 25, 33, 34, 41, 43, 46, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 86, 90, 91, 92, 93, 106, 107, - 108, 9, 11, 9, 11, 20, 31, 57, 58, 59, - 60, 62, 63, 88, 94, 95, 97, 98, 94, 59, - 10, 36, 38, 59, 59, 44, 68, 0, 3, 109, - 59, 59, 59, 59, 95, 20, 35, 95, 4, 59, - 61, 62, 63, 64, 96, 38, 59, 59, 41, 49, - 45, 20, 42, 42, 21, 21, 94, 59, 59, 95, - 95, 95, 95, 22, 59, 99, 100, 37, 39, 101, - 59, 88, 60, 59, 82, 59, 59, 21, 94, 96, - 101, 20, 59, 88, 98, 102, 103, 49, 36, 26, - 27, 28, 29, 85, 22, 81, 20, 22, 105, 88, - 30, 49, 50, 51, 52, 53, 54, 55, 56, 104, - 104, 40, 88, 9, 20, 30, 32, 83, 82, 21, - 59, 100, 22, 87, 55, 30, 88, 98, 88, 98, - 102, 101, 59, 57, 84, 31, 81, 47, 89, 21, - 88, 21, 21, 48, 87, 83, 49, 59 + 19, 23, 24, 25, 33, 34, 41, 43, 46, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 88, 93, 94, 97, 98, 113, 114, + 115, 9, 11, 9, 11, 20, 31, 59, 60, 61, + 62, 64, 65, 91, 99, 100, 102, 103, 99, 61, + 10, 36, 38, 61, 61, 44, 70, 0, 3, 116, + 61, 61, 61, 61, 100, 20, 35, 100, 4, 61, + 63, 64, 65, 66, 101, 38, 61, 61, 41, 51, + 45, 20, 42, 42, 21, 21, 99, 61, 61, 100, + 100, 100, 100, 22, 61, 104, 105, 37, 39, 108, + 61, 95, 96, 91, 62, 61, 84, 61, 61, 21, + 99, 49, 101, 108, 20, 89, 61, 91, 103, 109, + 110, 51, 22, 108, 36, 26, 27, 28, 29, 87, + 22, 83, 20, 50, 22, 112, 90, 91, 22, 30, + 51, 52, 53, 54, 55, 56, 57, 58, 111, 111, + 40, 91, 96, 9, 20, 30, 32, 85, 84, 21, + 61, 104, 106, 107, 104, 105, 21, 22, 20, 57, + 30, 91, 103, 91, 103, 109, 61, 59, 86, 31, + 83, 47, 92, 21, 42, 49, 108, 91, 90, 21, + 48, 109, 50, 112, 21, 85, 51, 107, 61 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 66, 67, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 81, 82, 82, 83, - 83, 83, 84, 85, 85, 85, 85, 86, 87, 87, - 88, 88, 88, 88, 89, 89, 90, 91, 92, 93, - 94, 94, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 96, 96, 96, 97, 97, 98, 98, 99, - 100, 100, 101, 101, 102, 102, 102, 103, 103, 103, - 103, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 105, 106, 107, 108, 109, 109 + 0, 68, 69, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 83, 84, 84, 85, + 85, 85, 86, 87, 87, 87, 87, 88, 89, 89, + 90, 90, 91, 91, 91, 91, 92, 92, 93, 94, + 95, 95, 96, 97, 97, 98, 99, 99, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 101, 101, + 101, 102, 102, 103, 103, 104, 105, 105, 106, 107, + 107, 108, 108, 109, 109, 109, 110, 110, 110, 110, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, + 112, 113, 114, 115, 116, 116 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -883,13 +903,14 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 8, 5, 8, 0, 3, 6, 3, 2, - 1, 0, 1, 1, 1, 1, 1, 8, 0, 3, - 1, 1, 1, 1, 0, 4, 4, 7, 6, 2, - 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, - 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, - 2, 4, 0, 2, 0, 1, 3, 3, 3, 3, - 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 2, 0, 7, 2, 4, 0, 1 + 1, 0, 1, 1, 1, 1, 1, 5, 3, 5, + 1, 3, 1, 1, 1, 1, 0, 4, 4, 5, + 1, 3, 3, 6, 9, 2, 2, 4, 3, 3, + 3, 3, 3, 2, 1, 1, 1, 1, 0, 1, + 2, 4, 3, 1, 3, 1, 2, 4, 3, 1, + 4, 0, 2, 0, 1, 3, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, + 0, 7, 2, 4, 0, 1 }; @@ -1751,93 +1772,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 200 "yacc_sql.y" +#line 212 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1760 "yacc_sql.cpp" +#line 1781 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 230 "yacc_sql.y" +#line 242 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1769 "yacc_sql.cpp" +#line 1790 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 236 "yacc_sql.y" +#line 248 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1777 "yacc_sql.cpp" +#line 1798 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 241 "yacc_sql.y" +#line 253 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1785 "yacc_sql.cpp" +#line 1806 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 247 "yacc_sql.y" +#line 259 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1793 "yacc_sql.cpp" +#line 1814 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 253 "yacc_sql.y" +#line 265 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1801 "yacc_sql.cpp" +#line 1822 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 259 "yacc_sql.y" +#line 271 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1809 "yacc_sql.cpp" +#line 1830 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 265 "yacc_sql.y" +#line 277 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1819 "yacc_sql.cpp" +#line 1840 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 272 "yacc_sql.y" +#line 284 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1827 "yacc_sql.cpp" +#line 1848 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 278 "yacc_sql.y" +#line 290 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1837 "yacc_sql.cpp" +#line 1858 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 287 "yacc_sql.y" +#line 299 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1848,11 +1869,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1852 "yacc_sql.cpp" +#line 1873 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 301 "yacc_sql.y" +#line 313 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1860,11 +1881,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1864 "yacc_sql.cpp" +#line 1885 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 311 "yacc_sql.y" +#line 323 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1885,19 +1906,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1889 "yacc_sql.cpp" +#line 1910 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 334 "yacc_sql.y" +#line 346 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1897 "yacc_sql.cpp" +#line 1918 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 338 "yacc_sql.y" +#line 350 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1907,11 +1928,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1911 "yacc_sql.cpp" +#line 1932 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 351 "yacc_sql.y" +#line 363 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -1923,11 +1944,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 1927 "yacc_sql.cpp" +#line 1948 "yacc_sql.cpp" break; case 38: /* attr_def: ID type nullable_constraint */ -#line 363 "yacc_sql.y" +#line 375 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -1949,157 +1970,170 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 1953 "yacc_sql.cpp" +#line 1974 "yacc_sql.cpp" break; case 39: /* nullable_constraint: NOT NULL_T */ -#line 388 "yacc_sql.y" +#line 400 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1961 "yacc_sql.cpp" +#line 1982 "yacc_sql.cpp" break; case 40: /* nullable_constraint: NULLABLE */ -#line 392 "yacc_sql.y" +#line 404 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1969 "yacc_sql.cpp" +#line 1990 "yacc_sql.cpp" break; case 41: /* nullable_constraint: %empty */ -#line 396 "yacc_sql.y" +#line 408 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 1977 "yacc_sql.cpp" +#line 1998 "yacc_sql.cpp" break; case 42: /* number: NUMBER */ -#line 402 "yacc_sql.y" +#line 414 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1983 "yacc_sql.cpp" +#line 2004 "yacc_sql.cpp" break; case 43: /* type: INT_T */ -#line 405 "yacc_sql.y" +#line 417 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 1989 "yacc_sql.cpp" +#line 2010 "yacc_sql.cpp" break; case 44: /* type: STRING_T */ -#line 406 "yacc_sql.y" +#line 418 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 1995 "yacc_sql.cpp" +#line 2016 "yacc_sql.cpp" break; case 45: /* type: FLOAT_T */ -#line 407 "yacc_sql.y" +#line 419 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2001 "yacc_sql.cpp" +#line 2022 "yacc_sql.cpp" break; case 46: /* type: DATE_T */ -#line 408 "yacc_sql.y" +#line 420 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2007 "yacc_sql.cpp" +#line 2028 "yacc_sql.cpp" break; - case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 412 "yacc_sql.y" + case 47: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 425 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); - (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); - if ((yyvsp[-1].value_list) != nullptr) { - (yyval.sql_node)->insertion.values.swap(*(yyvsp[-1].value_list)); - delete (yyvsp[-1].value_list); + (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); + if ((yyvsp[0].values_list) != nullptr) { + (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); + delete (yyvsp[0].values_list); } - (yyval.sql_node)->insertion.values.emplace_back(*(yyvsp[-2].value)); - std::reverse((yyval.sql_node)->insertion.values.begin(), (yyval.sql_node)->insertion.values.end()); - delete (yyvsp[-2].value); - free((yyvsp[-5].string)); + free((yyvsp[-2].string)); } -#line 2024 "yacc_sql.cpp" +#line 2042 "yacc_sql.cpp" break; - case 48: /* value_list: %empty */ -#line 428 "yacc_sql.y" + case 48: /* values_list: LBRACE value_list RBRACE */ +#line 438 "yacc_sql.y" { - (yyval.value_list) = nullptr; + (yyval.values_list) = new std::vector>; + (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); + delete (yyvsp[-1].value_list); } -#line 2032 "yacc_sql.cpp" +#line 2052 "yacc_sql.cpp" break; - case 49: /* value_list: COMMA value value_list */ -#line 431 "yacc_sql.y" - { - if ((yyvsp[0].value_list) != nullptr) { - (yyval.value_list) = (yyvsp[0].value_list); - } else { - (yyval.value_list) = new std::vector; - } - (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); - delete (yyvsp[-1].value); + case 49: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 444 "yacc_sql.y" + { + (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); + delete (yyvsp[-1].value_list); + } +#line 2061 "yacc_sql.cpp" + break; + + case 50: /* value_list: value */ +#line 451 "yacc_sql.y" + { + (yyval.value_list) = new std::vector; + (yyval.value_list)->emplace_back(*(yyvsp[0].value)); + delete (yyvsp[0].value); + } +#line 2071 "yacc_sql.cpp" + break; + + case 51: /* value_list: value_list COMMA value */ +#line 457 "yacc_sql.y" + { + (yyval.value_list)->emplace_back(*(yyvsp[0].value)); + delete (yyvsp[0].value); } -#line 2046 "yacc_sql.cpp" +#line 2080 "yacc_sql.cpp" break; - case 50: /* value: NUMBER */ -#line 442 "yacc_sql.y" + case 52: /* value: NUMBER */ +#line 464 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2055 "yacc_sql.cpp" +#line 2089 "yacc_sql.cpp" break; - case 51: /* value: FLOAT */ -#line 446 "yacc_sql.y" + case 53: /* value: FLOAT */ +#line 468 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2064 "yacc_sql.cpp" +#line 2098 "yacc_sql.cpp" break; - case 52: /* value: SSS */ -#line 450 "yacc_sql.y" + case 54: /* value: SSS */ +#line 472 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2075 "yacc_sql.cpp" +#line 2109 "yacc_sql.cpp" break; - case 53: /* value: NULL_T */ -#line 456 "yacc_sql.y" + case 55: /* value: NULL_T */ +#line 478 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2083 "yacc_sql.cpp" +#line 2117 "yacc_sql.cpp" break; - case 54: /* storage_format: %empty */ -#line 462 "yacc_sql.y" + case 56: /* storage_format: %empty */ +#line 485 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2091 "yacc_sql.cpp" +#line 2125 "yacc_sql.cpp" break; - case 55: /* storage_format: STORAGE FORMAT EQ ID */ -#line 466 "yacc_sql.y" + case 57: /* storage_format: STORAGE FORMAT EQ ID */ +#line 489 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2099 "yacc_sql.cpp" +#line 2133 "yacc_sql.cpp" break; - case 56: /* delete_stmt: DELETE FROM ID where */ -#line 473 "yacc_sql.y" + case 58: /* delete_stmt: DELETE FROM ID where */ +#line 496 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2109,28 +2143,57 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2113 "yacc_sql.cpp" +#line 2147 "yacc_sql.cpp" break; - case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 485 "yacc_sql.y" + case 59: /* update_stmt: UPDATE ID SET setClauses where */ +#line 509 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); - (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); - (yyval.sql_node)->update.attribute_name = (yyvsp[-3].string); - (yyval.sql_node)->update.value = *(yyvsp[-1].value); + (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); + (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].condition_list) != nullptr) { (yyval.sql_node)->update.conditions.swap(*(yyvsp[0].condition_list)); delete (yyvsp[0].condition_list); } - free((yyvsp[-5].string)); free((yyvsp[-3].string)); + delete (yyvsp[-1].set_clauses); } -#line 2130 "yacc_sql.cpp" +#line 2163 "yacc_sql.cpp" break; - case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 500 "yacc_sql.y" + case 60: /* setClauses: setClause */ +#line 524 "yacc_sql.y" + { + (yyval.set_clauses) = new std::vector; + (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); + delete (yyvsp[0].set_clause); + } +#line 2173 "yacc_sql.cpp" + break; + + case 61: /* setClauses: setClauses COMMA setClause */ +#line 530 "yacc_sql.y" + { + (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); + delete (yyvsp[0].set_clause); + } +#line 2182 "yacc_sql.cpp" + break; + + case 62: /* setClause: ID EQ value */ +#line 538 "yacc_sql.y" + { + (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause)->field_name = (yyvsp[-2].string); + (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); + free((yyvsp[-2].string)); + } +#line 2193 "yacc_sql.cpp" + break; + + case 63: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 548 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2153,21 +2216,58 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2157 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" + break; + + case 64: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 571 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); + if ((yyvsp[-7].expression_list) != nullptr) { + (yyval.sql_node)->selection.expressions.swap(*(yyvsp[-7].expression_list)); + delete (yyvsp[-7].expression_list); + } + + if ((yyvsp[-5].string) != nullptr) { + (yyval.sql_node)->selection.relations.emplace_back((yyvsp[-5].string)); + free((yyvsp[-5].string)); + } + + if ((yyvsp[-1].condition_list) != nullptr) { + (yyval.sql_node)->selection.conditions.swap(*(yyvsp[-1].condition_list)); + delete (yyvsp[-1].condition_list); + } + + if ((yyvsp[-2].join_clauses) != nullptr) { + for (auto it = (yyvsp[-2].join_clauses)->rbegin(); it != (yyvsp[-2].join_clauses)->rend(); ++it) { + (yyval.sql_node)->selection.relations.emplace_back(it->relation); + for (auto &condition : it->conditions) { + (yyval.sql_node)->selection.conditions.emplace_back(condition); + } + } + delete (yyvsp[-2].join_clauses); + } + + if ((yyvsp[0].expression_list) != nullptr) { + (yyval.sql_node)->selection.group_by.swap(*(yyvsp[0].expression_list)); + delete (yyvsp[0].expression_list); + } + } +#line 2257 "yacc_sql.cpp" break; - case 59: /* calc_stmt: CALC expression_list */ -#line 525 "yacc_sql.y" + case 65: /* calc_stmt: CALC expression_list */ +#line 607 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2167 "yacc_sql.cpp" +#line 2267 "yacc_sql.cpp" break; - case 60: /* expression_list: expression alias */ -#line 534 "yacc_sql.y" + case 66: /* expression_list: expression alias */ +#line 616 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2176,11 +2276,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2180 "yacc_sql.cpp" +#line 2280 "yacc_sql.cpp" break; - case 61: /* expression_list: expression alias COMMA expression_list */ -#line 543 "yacc_sql.y" + case 67: /* expression_list: expression alias COMMA expression_list */ +#line 625 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2193,121 +2293,121 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2197 "yacc_sql.cpp" +#line 2297 "yacc_sql.cpp" break; - case 62: /* expression: expression '+' expression */ -#line 557 "yacc_sql.y" + case 68: /* expression: expression '+' expression */ +#line 639 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2205 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; - case 63: /* expression: expression '-' expression */ -#line 560 "yacc_sql.y" + case 69: /* expression: expression '-' expression */ +#line 642 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2213 "yacc_sql.cpp" +#line 2313 "yacc_sql.cpp" break; - case 64: /* expression: expression '*' expression */ -#line 563 "yacc_sql.y" + case 70: /* expression: expression '*' expression */ +#line 645 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2221 "yacc_sql.cpp" +#line 2321 "yacc_sql.cpp" break; - case 65: /* expression: expression '/' expression */ -#line 566 "yacc_sql.y" + case 71: /* expression: expression '/' expression */ +#line 648 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2229 "yacc_sql.cpp" +#line 2329 "yacc_sql.cpp" break; - case 66: /* expression: LBRACE expression RBRACE */ -#line 569 "yacc_sql.y" + case 72: /* expression: LBRACE expression RBRACE */ +#line 651 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2238 "yacc_sql.cpp" +#line 2338 "yacc_sql.cpp" break; - case 67: /* expression: '-' expression */ -#line 573 "yacc_sql.y" + case 73: /* expression: '-' expression */ +#line 655 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2246 "yacc_sql.cpp" +#line 2346 "yacc_sql.cpp" break; - case 68: /* expression: value */ -#line 576 "yacc_sql.y" + case 74: /* expression: value */ +#line 658 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2256 "yacc_sql.cpp" +#line 2356 "yacc_sql.cpp" break; - case 69: /* expression: rel_attr */ -#line 581 "yacc_sql.y" + case 75: /* expression: rel_attr */ +#line 663 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2267 "yacc_sql.cpp" +#line 2367 "yacc_sql.cpp" break; - case 70: /* expression: '*' */ -#line 587 "yacc_sql.y" + case 76: /* expression: '*' */ +#line 669 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2275 "yacc_sql.cpp" +#line 2375 "yacc_sql.cpp" break; - case 71: /* expression: aggr_func_expr */ -#line 590 "yacc_sql.y" + case 77: /* expression: aggr_func_expr */ +#line 672 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2283 "yacc_sql.cpp" +#line 2383 "yacc_sql.cpp" break; - case 72: /* alias: %empty */ -#line 597 "yacc_sql.y" + case 78: /* alias: %empty */ +#line 679 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2291 "yacc_sql.cpp" +#line 2391 "yacc_sql.cpp" break; - case 73: /* alias: ID */ -#line 600 "yacc_sql.y" + case 79: /* alias: ID */ +#line 682 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2299 "yacc_sql.cpp" +#line 2399 "yacc_sql.cpp" break; - case 74: /* alias: AS ID */ -#line 603 "yacc_sql.y" + case 80: /* alias: AS ID */ +#line 685 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2307 "yacc_sql.cpp" +#line 2407 "yacc_sql.cpp" break; - case 75: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 609 "yacc_sql.y" + case 81: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 691 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2315,29 +2415,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2319 "yacc_sql.cpp" +#line 2419 "yacc_sql.cpp" break; - case 76: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 617 "yacc_sql.y" + case 82: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 699 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2327 "yacc_sql.cpp" +#line 2427 "yacc_sql.cpp" break; - case 77: /* rel_attr: ID */ -#line 622 "yacc_sql.y" + case 83: /* rel_attr: ID */ +#line 704 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2337 "yacc_sql.cpp" +#line 2437 "yacc_sql.cpp" break; - case 78: /* rel_attr: ID DOT ID */ -#line 627 "yacc_sql.y" + case 84: /* rel_attr: ID DOT ID */ +#line 709 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2345,20 +2445,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2349 "yacc_sql.cpp" +#line 2449 "yacc_sql.cpp" break; - case 79: /* relation: ID */ -#line 637 "yacc_sql.y" + case 85: /* relation: ID */ +#line 719 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2357 "yacc_sql.cpp" +#line 2457 "yacc_sql.cpp" break; - case 80: /* rel_list: relation alias */ -#line 642 "yacc_sql.y" - { + case 86: /* rel_list: relation alias */ +#line 725 "yacc_sql.y" + { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); @@ -2368,11 +2468,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2372 "yacc_sql.cpp" +#line 2472 "yacc_sql.cpp" break; - case 81: /* rel_list: relation alias COMMA rel_list */ -#line 652 "yacc_sql.y" + case 87: /* rel_list: relation alias COMMA rel_list */ +#line 735 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2388,55 +2488,87 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); } -#line 2392 "yacc_sql.cpp" +#line 2492 "yacc_sql.cpp" break; - case 82: /* where: %empty */ -#line 671 "yacc_sql.y" + case 88: /* joinClause: relation ON condition_list */ +#line 754 "yacc_sql.y" + { + (yyval.join_clause) = new JoinSqlNode; + (yyval.join_clause)->relation = (yyvsp[-2].string); + (yyval.join_clause)->conditions.swap(*(yyvsp[0].condition_list)); + free((yyvsp[-2].string)); + delete (yyvsp[0].condition_list); + } +#line 2504 "yacc_sql.cpp" + break; + + case 89: /* joinClauses: joinClause */ +#line 765 "yacc_sql.y" + { + (yyval.join_clauses) = new std::vector; + (yyval.join_clauses)->emplace_back(*(yyvsp[0].join_clause)); + delete (yyvsp[0].join_clause); + } +#line 2514 "yacc_sql.cpp" + break; + + case 90: /* joinClauses: joinClause INNER JOIN joinClauses */ +#line 771 "yacc_sql.y" + { + (yyval.join_clauses) = (yyvsp[0].join_clauses); + (yyval.join_clauses)->emplace_back(*(yyvsp[-3].join_clause)); + delete (yyvsp[-3].join_clause); + } +#line 2524 "yacc_sql.cpp" + break; + + case 91: /* where: %empty */ +#line 780 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2400 "yacc_sql.cpp" +#line 2532 "yacc_sql.cpp" break; - case 83: /* where: WHERE condition_list */ -#line 674 "yacc_sql.y" + case 92: /* where: WHERE condition_list */ +#line 783 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2408 "yacc_sql.cpp" +#line 2540 "yacc_sql.cpp" break; - case 84: /* condition_list: %empty */ -#line 680 "yacc_sql.y" + case 93: /* condition_list: %empty */ +#line 789 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2416 "yacc_sql.cpp" +#line 2548 "yacc_sql.cpp" break; - case 85: /* condition_list: condition */ -#line 683 "yacc_sql.y" + case 94: /* condition_list: condition */ +#line 792 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2426 "yacc_sql.cpp" +#line 2558 "yacc_sql.cpp" break; - case 86: /* condition_list: condition AND condition_list */ -#line 688 "yacc_sql.y" + case 95: /* condition_list: condition AND condition_list */ +#line 797 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2436 "yacc_sql.cpp" +#line 2568 "yacc_sql.cpp" break; - case 87: /* condition: rel_attr comp_op value */ -#line 696 "yacc_sql.y" + case 96: /* condition: rel_attr comp_op value */ +#line 805 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2448,11 +2580,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2452 "yacc_sql.cpp" +#line 2584 "yacc_sql.cpp" break; - case 88: /* condition: value comp_op value */ -#line 708 "yacc_sql.y" + case 97: /* condition: value comp_op value */ +#line 817 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2464,11 +2596,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2468 "yacc_sql.cpp" +#line 2600 "yacc_sql.cpp" break; - case 89: /* condition: rel_attr comp_op rel_attr */ -#line 720 "yacc_sql.y" + case 98: /* condition: rel_attr comp_op rel_attr */ +#line 829 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2480,11 +2612,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2484 "yacc_sql.cpp" +#line 2616 "yacc_sql.cpp" break; - case 90: /* condition: value comp_op rel_attr */ -#line 732 "yacc_sql.y" + case 99: /* condition: value comp_op rel_attr */ +#line 841 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2496,79 +2628,79 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2500 "yacc_sql.cpp" +#line 2632 "yacc_sql.cpp" break; - case 91: /* comp_op: EQ */ -#line 746 "yacc_sql.y" + case 100: /* comp_op: EQ */ +#line 855 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2506 "yacc_sql.cpp" +#line 2638 "yacc_sql.cpp" break; - case 92: /* comp_op: LT */ -#line 747 "yacc_sql.y" + case 101: /* comp_op: LT */ +#line 856 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2512 "yacc_sql.cpp" +#line 2644 "yacc_sql.cpp" break; - case 93: /* comp_op: GT */ -#line 748 "yacc_sql.y" + case 102: /* comp_op: GT */ +#line 857 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2518 "yacc_sql.cpp" +#line 2650 "yacc_sql.cpp" break; - case 94: /* comp_op: LE */ -#line 749 "yacc_sql.y" + case 103: /* comp_op: LE */ +#line 858 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2524 "yacc_sql.cpp" +#line 2656 "yacc_sql.cpp" break; - case 95: /* comp_op: GE */ -#line 750 "yacc_sql.y" + case 104: /* comp_op: GE */ +#line 859 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2530 "yacc_sql.cpp" +#line 2662 "yacc_sql.cpp" break; - case 96: /* comp_op: NE */ -#line 751 "yacc_sql.y" + case 105: /* comp_op: NE */ +#line 860 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2536 "yacc_sql.cpp" +#line 2668 "yacc_sql.cpp" break; - case 97: /* comp_op: IS */ -#line 752 "yacc_sql.y" + case 106: /* comp_op: IS */ +#line 861 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2542 "yacc_sql.cpp" +#line 2674 "yacc_sql.cpp" break; - case 98: /* comp_op: IS NOT */ -#line 753 "yacc_sql.y" + case 107: /* comp_op: IS NOT */ +#line 862 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2548 "yacc_sql.cpp" +#line 2680 "yacc_sql.cpp" break; - case 99: /* comp_op: LIKE */ -#line 754 "yacc_sql.y" + case 108: /* comp_op: LIKE */ +#line 863 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2554 "yacc_sql.cpp" +#line 2686 "yacc_sql.cpp" break; - case 100: /* comp_op: NOT LIKE */ -#line 755 "yacc_sql.y" + case 109: /* comp_op: NOT LIKE */ +#line 864 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2560 "yacc_sql.cpp" +#line 2692 "yacc_sql.cpp" break; - case 101: /* group_by: %empty */ -#line 761 "yacc_sql.y" + case 110: /* group_by: %empty */ +#line 870 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2568 "yacc_sql.cpp" +#line 2700 "yacc_sql.cpp" break; - case 102: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 767 "yacc_sql.y" + case 111: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 876 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2578,20 +2710,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2582 "yacc_sql.cpp" +#line 2714 "yacc_sql.cpp" break; - case 103: /* explain_stmt: EXPLAIN command_wrapper */ -#line 780 "yacc_sql.y" + case 112: /* explain_stmt: EXPLAIN command_wrapper */ +#line 889 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2591 "yacc_sql.cpp" +#line 2723 "yacc_sql.cpp" break; - case 104: /* set_variable_stmt: SET ID EQ value */ -#line 788 "yacc_sql.y" + case 113: /* set_variable_stmt: SET ID EQ value */ +#line 897 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2599,11 +2731,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2603 "yacc_sql.cpp" +#line 2735 "yacc_sql.cpp" break; -#line 2607 "yacc_sql.cpp" +#line 2739 "yacc_sql.cpp" default: break; } @@ -2832,7 +2964,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 800 "yacc_sql.y" +#line 909 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 7e9aad01..9e1a1ee7 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -100,19 +100,21 @@ extern int yydebug; EXPLAIN = 301, /* EXPLAIN */ STORAGE = 302, /* STORAGE */ FORMAT = 303, /* FORMAT */ - EQ = 304, /* EQ */ - LT = 305, /* LT */ - GT = 306, /* GT */ - LE = 307, /* LE */ - GE = 308, /* GE */ - NE = 309, /* NE */ - LIKE = 310, /* LIKE */ - IS = 311, /* IS */ - NUMBER = 312, /* NUMBER */ - FLOAT = 313, /* FLOAT */ - ID = 314, /* ID */ - SSS = 315, /* SSS */ - UMINUS = 316 /* UMINUS */ + INNER = 304, /* INNER */ + JOIN = 305, /* JOIN */ + EQ = 306, /* EQ */ + LT = 307, /* LT */ + GT = 308, /* GT */ + LE = 309, /* LE */ + GE = 310, /* GE */ + NE = 311, /* NE */ + LIKE = 312, /* LIKE */ + IS = 313, /* IS */ + NUMBER = 314, /* NUMBER */ + FLOAT = 315, /* FLOAT */ + ID = 316, /* ID */ + SSS = 317, /* SSS */ + UMINUS = 318 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -121,7 +123,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 123 "yacc_sql.y" +#line 125 "yacc_sql.y" ParsedSqlNode * sql_node; ConditionSqlNode * condition; @@ -133,15 +135,20 @@ union YYSTYPE Expression * expression; std::vector> * expression_list; std::vector * value_list; + std::vector> * values_list; std::vector * condition_list; std::vector * rel_attr_list; std::vector * relation_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; + JoinSqlNode * join_clause; + std::vector * join_clauses; char * string; int number; float floats; bool nullable_info; -#line 145 "yacc_sql.hpp" +#line 152 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index e7179b6e..29639803 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -137,7 +137,6 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, std::vector * condition_list; std::vector * rel_attr_list; std::vector * relation_list; - std::vector * relation_list; SetClauseSqlNode * set_clause; std::vector * set_clauses; JoinSqlNode * join_clause; @@ -723,7 +722,7 @@ relation: ; rel_list: - relation alias{ + relation alias { $$ = new std::vector(); if(nullptr!=$2){ $$->emplace_back($1,$2); @@ -731,18 +730,8 @@ rel_list: }else{ $$->emplace_back($1); } - relation - { - $$ = new std::vector(); - $$->emplace_back($1); free($1); } - | rel_list COMMA relation - { - $$->emplace_back($3); - free($3); - } - ; | relation alias COMMA rel_list { if ($4 != nullptr) { $$ = $4; @@ -756,6 +745,10 @@ rel_list: $$->insert($$->begin(), RelationNode($1)); } + free($1); + } + ; + joinClause: relation ON condition_list { From 8ae4d2966ba53c7813cfb0c34f3f58dcf7c7d152 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 29 Sep 2024 14:31:03 +0800 Subject: [PATCH 054/308] =?UTF-8?q?fix:=20count(*)=20=E5=9C=A8=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E8=BE=93=E5=87=BA=E5=B8=A6=E6=98=9F=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/expression_binder.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 185006f0..be8337ab 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -459,6 +459,8 @@ RC ExpressionBinder::bind_aggregate_expression( if (child_expr->type() == ExprType::STAR && aggregate_type == AggregateExpr::Type::COUNT) { ValueExpr *value_expr = new ValueExpr(Value(1)); child_expr.reset(value_expr); + // count(*) 输出星号 + child_expr->set_name("*"); } else { rc = bind_expression(child_expr, child_bound_expressions); if (OB_FAIL(rc)) { From 874ca760fc7d34af36e404b2150f975a1ce26866 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 29 Sep 2024 14:38:54 +0800 Subject: [PATCH 055/308] =?UTF-8?q?fix:=20=E4=B8=BA=20nullable=20=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=BB=98=E8=AE=A4=E5=8F=82=E6=95=B0=20false?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/field/field_meta.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/observer/storage/field/field_meta.h b/src/observer/storage/field/field_meta.h index 3c78d03d..1a5c5749 100644 --- a/src/observer/storage/field/field_meta.h +++ b/src/observer/storage/field/field_meta.h @@ -32,12 +32,12 @@ class FieldMeta FieldMeta(); FieldMeta( - const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable); + const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable = false); ~FieldMeta() = default; RC init( - const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable); + const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable = false); public: const char *name() const; From 37fed72a9e2c3e38d081ad6c28ae06d6eac817cb Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 29 Sep 2024 15:01:48 +0800 Subject: [PATCH 056/308] =?UTF-8?q?build:=20=E5=A2=9E=E5=8A=A0=E8=AF=86?= =?UTF-8?q?=E5=88=AB=20CMAKE=5FBUILD=5FTYPE=20=E9=80=89=E9=A1=B9=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=20DEBUG=3DON=20Cmake=20=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 86 +++++++++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 36 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de1314f2..89b4291c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,6 @@ MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -# SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) @@ -26,22 +25,22 @@ OPTION(USE_SIMD "Use SIMD" OFF) MESSAGE(STATUS "HOME dir: $ENV{HOME}") #SET(ENV{变量名} 值) -IF(WIN32) +IF (WIN32) MESSAGE(STATUS "This is windows.") ADD_DEFINITIONS(-DWIN32) -ELSEIF(WIN64) +ELSEIF (WIN64) MESSAGE(STATUS "This is windows.") ADD_DEFINITIONS(-DWIN64) -ELSEIF(APPLE) +ELSEIF (APPLE) MESSAGE(STATUS "This is apple") # normally __MACH__ has already been defined - ADD_DEFINITIONS(-D__MACH__ ) -ELSEIF(UNIX) + ADD_DEFINITIONS(-D__MACH__) +ELSEIF (UNIX) MESSAGE(STATUS "This is UNIX") ADD_DEFINITIONS(-DUNIX -DLINUX) -ELSE() +ELSE () MESSAGE(STATUS "This is UNKNOW OS") -ENDIF(WIN32) +ENDIF (WIN32) # This is for clangd plugin for vscode # mute sign-compare error in lex/yacc @@ -52,23 +51,39 @@ IF (ENABLE_NOPIE) ENDIF (ENABLE_NOPIE) # Requires support for avx2 -IF(USE_SIMD) +IF (USE_SIMD) SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -mavx2") ADD_DEFINITIONS(-DUSE_SIMD) -ENDIF(USE_SIMD) +ENDIF (USE_SIMD) -IF(DEBUG) - MESSAGE(STATUS "DEBUG has been set as TRUE ${DEBUG}") - SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -O0 -g -DDEBUG ") +# Set the default build type to Release +IF (NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "BUILD TYPE" FORCE) +ENDIF () + +# Convert CMAKE_BUILD_TYPE to lowercase for case-insensitive comparison +STRING(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE) + +# Configure compilation options based on the build type +IF (CMAKE_BUILD_TYPE STREQUAL "debug") + MESSAGE(STATUS "Building in Debug mode") + SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -O0 -g -DDEBUG") ADD_DEFINITIONS(-DENABLE_DEBUG) -ELSEIF(NOT DEFINED ENV{DEBUG}) - MESSAGE(STATUS "Disable debug") - SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -O2 -g ") -ELSE() - MESSAGE(STATUS "Enable debug") - SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -O0 -g -DDEBUG") +ELSEIF (CMAKE_BUILD_TYPE STREQUAL "release") + MESSAGE(STATUS "Building in Release mode") + SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -O2") +ELSEIF (CMAKE_BUILD_TYPE STREQUAL "relwithdebinfo") + MESSAGE(STATUS "Building in RelWithDebInfo mode") + SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -O2 -g -DDEBUG") ADD_DEFINITIONS(-DENABLE_DEBUG) -ENDIF(DEBUG) +ELSEIF (CMAKE_BUILD_TYPE STREQUAL "minsizerel") + MESSAGE(STATUS "Building in MinSizeRel mode") + SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -Os") + ADD_DEFINITIONS(-DENABLE_MIN_SIZE) +ELSE () + MESSAGE(WARNING "Unknown build type: ${CMAKE_BUILD_TYPE}. Defaulting to Release.") + SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -O2") +ENDIF () IF (CONCURRENCY) MESSAGE(STATUS "CONCURRENCY is ON") @@ -79,15 +94,15 @@ ENDIF (CONCURRENCY) MESSAGE(STATUS "CMAKE_CXX_COMPILER_ID is " ${CMAKE_CXX_COMPILER_ID}) IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND ${STATIC_STDLIB}) ADD_LINK_OPTIONS(-static-libgcc -static-libstdc++) -ENDIF() +ENDIF () IF (ENABLE_ASAN) MESSAGE(STATUS "Instrumenting with Address Sanitizer") SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -fno-omit-frame-pointer -fsanitize=address -fsanitize-address-use-after-scope") IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND ${STATIC_STDLIB}) ADD_LINK_OPTIONS(-static-libasan) - ENDIF() -ENDIF() + ENDIF () +ENDIF () IF (ENABLE_TSAN) # supported flags @@ -101,7 +116,7 @@ IF (ENABLE_TSAN) # -Qunused-arguments 有些编译器不支持,所以先删掉 IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND ${STATIC_STDLIB}) ADD_LINK_OPTIONS(-static-libtsan) - ENDIF() + ENDIF () SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TSAN_FLAGS}") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TSAN_FLAGS}") ENDIF (ENABLE_TSAN) @@ -122,12 +137,12 @@ IF (ENABLE_UBSAN) ENDIF (ENABLE_UBSAN) IF (CMAKE_INSTALL_PREFIX) - MESSAGE(STATUS "CMAKE_INSTALL_PREFIX has been set as " ${CMAKE_INSTALL_PREFIX} ) -ELSEIF(DEFINED ENV{CMAKE_INSTALL_PREFIX}) + MESSAGE(STATUS "CMAKE_INSTALL_PREFIX has been set as " ${CMAKE_INSTALL_PREFIX}) +ELSEIF (DEFINED ENV{CMAKE_INSTALL_PREFIX}) SET(CMAKE_INSTALL_PREFIX $ENV{CMAKE_INSTALL_PREFIX}) -ELSE() +ELSE () SET(CMAKE_INSTALL_PREFIX /tmp/${PROJECT_NAME}) -ENDIF() +ENDIF () MESSAGE(STATUS "Install target dir is " ${CMAKE_INSTALL_PREFIX}) IF (DEFINED ENV{LD_LIBRARY_PATH}) @@ -138,20 +153,20 @@ IF (DEFINED ENV{LD_LIBRARY_PATH}) ENDIF () IF (EXISTS /usr/local/lib) - LINK_DIRECTORIES (/usr/local/lib) + LINK_DIRECTORIES(/usr/local/lib) ENDIF () IF (EXISTS /usr/local/lib64) - LINK_DIRECTORIES (/usr/local/lib64) + LINK_DIRECTORIES(/usr/local/lib64) ENDIF () INCLUDE_DIRECTORIES(. ${PROJECT_SOURCE_DIR}/deps /usr/local/include) -IF(WITH_UNIT_TESTS) +IF (WITH_UNIT_TESTS) IF (ENABLE_COVERAGE) SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -fprofile-arcs -ftest-coverage") ENDIF (ENABLE_COVERAGE) enable_testing() -ENDIF(WITH_UNIT_TESTS) +ENDIF (WITH_UNIT_TESTS) SET(CMAKE_CXX_FLAGS ${CMAKE_COMMON_FLAGS}) SET(CMAKE_C_FLAGS ${CMAKE_COMMON_FLAGS}) @@ -166,9 +181,8 @@ ADD_SUBDIRECTORY(tools) IF (WITH_BENCHMARK) ADD_SUBDIRECTORY(benchmark) -ENDIF(WITH_BENCHMARK) +ENDIF (WITH_BENCHMARK) -IF(WITH_UNIT_TESTS) +IF (WITH_UNIT_TESTS) ADD_SUBDIRECTORY(unittest) -ENDIF(WITH_UNIT_TESTS) - +ENDIF (WITH_UNIT_TESTS) From f4bd97b075dd5c915b0a44739dcb33d98b03f20d Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 29 Sep 2024 15:55:16 +0800 Subject: [PATCH 057/308] =?UTF-8?q?build:=20build.sh=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=B0=83=E7=94=A8=20miniob=5Ftest.py=20=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E7=AD=89=E6=9B=B4=E5=A4=9A=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 100 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index b85901df..ce3cad13 100755 --- a/build.sh +++ b/build.sh @@ -18,21 +18,51 @@ function usage { echo "Usage:" echo "./build.sh -h" - echo "./build.sh init # install dependence" - echo "./build.sh clean" + echo "./build.sh init # Initialize and install dependencies" + echo "./build.sh clean # Clean up build directories" + echo "./build.sh gen_parser # Generate parser files" + echo "./build.sh style # Apply coding style to source files" + echo "./build.sh test [test_case] # Run tests, optionally specify a test case" echo "./build.sh [BuildType] [--make [MakeOptions]]" echo "" echo "OPTIONS:" - echo "BuildType => debug(default), release" - echo "MakeOptions => Options to make command, default: -j N" + echo " -h Show this help message" + echo " init Initialize and install dependencies" + echo " clean Clean up all build directories" + echo " gen_parser Generate parser files in src/observer/sql/parser" + echo " style Apply coding style to source files in ./src" + echo " test [test_case] Run tests, optionally specify a test case to run" + echo " [BuildType] Specify build type: debug (default), release, relwithdebinfo, minsizerel" + echo " --make [MakeOptions] Options to pass to the make command, default: -jN" echo "" echo "Examples:" - echo "# Init." + echo "# Show help." + echo "./build.sh -h" + echo "" + echo "# Initialize the project and install dependencies." echo "./build.sh init" echo "" - echo "# Build by debug mode and make with -j24." + echo "# Clean up all build directories." + echo "./build.sh clean" + echo "" + echo "# Generate parser files." + echo "./build.sh gen_parser" + echo "" + echo "# Apply coding style to source files." + echo "./build.sh style" + echo "" + echo "# Run all tests." + echo "./build.sh test" + echo "" + echo "# Run a specific test case." + echo "./build.sh test my_test_case" + echo "" + echo "# Build in debug mode (default) and make with -j24." echo "./build.sh debug --make -j24" + echo "" + echo "# Build in release mode." + echo "./build.sh release" } function parse_args @@ -138,12 +168,21 @@ function do_clean function build { set -- "${BUILD_ARGS[@]}" - case "x$1" in + # 将传递的所有参数转换为小写 + BUILD_TYPE=$(echo "$1" | tr '[:upper:]' '[:lower:]') + + case "x$BUILD_TYPE" in xrelease) - do_build "$@" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEBUG=OFF + do_build "$@" -DCMAKE_BUILD_TYPE=Release + ;; + xrelwithdebinfo) + do_build "$@" -DCMAKE_BUILD_TYPE=RelWithDebInfo ;; xdebug) - do_build "$@" -DCMAKE_BUILD_TYPE=Debug -DDEBUG=ON + do_build "$@" -DCMAKE_BUILD_TYPE=Debug + ;; + xminsizerel) + do_build "$@" -DCMAKE_BUILD_TYPE=MinSizeRel ;; *) BUILD_ARGS=(debug "${BUILD_ARGS[@]}") @@ -152,6 +191,49 @@ function build esac } +function gen_parser +{ + echo "generate parser..." + cd ${TOPDIR}/src/observer/sql/parser + ./gen_parser.sh + echo "generate parser done" + cd ${TOPDIR} +} + +function style +{ + # Check if .clang-format file exists + if [ ! -f .clang-format ]; then + echo "Error: .clang-format file not found in the current directory." + exit 1 + fi + + # 设置要格式化的文件扩展名 + EXTENSIONS=("c" "h" "cpp" "hpp") + + # 查找并格式化文件 + for ext in "${EXTENSIONS[@]}"; do + find ./src -type f -name "*.$ext" -exec clang-format -i {} + + done + + echo "Formatting complete!" +} + +function run_tests { + echo "Running test(s)..." + cd ${TOPDIR}/test/case || exit + + if [[ -z "$1" ]]; then + # 如果没有提供测试用例名,直接执行 + python3 miniob_test.py + else + # 如果提供了测试用例名,执行带参数的命令 + TEST_CASE="$1" + echo "Running test case: $TEST_CASE" + python3 miniob_test.py --test-cases="$TEST_CASE" + fi +} + function main { case "$1" in @@ -164,6 +246,15 @@ function main clean) do_clean ;; + gen_parser) + gen_parser + ;; + style) + style + ;; + test) + run_tests "$2" + ;; *) parse_args build From 843414df7c95b38efaf14544c279f0114388bd58 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 29 Sep 2024 17:13:42 +0800 Subject: [PATCH 058/308] =?UTF-8?q?fix:=20is=5Fnull=20=E5=9C=A8=20clang=20?= =?UTF-8?q?18=20=E4=B8=8A=E6=AF=94=E8=BE=83=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/tuple.h | 12 ++++++------ src/observer/storage/table/table.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index 1f0cae4a..d67ebe43 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -69,7 +69,7 @@ class TupleSchema class Tuple { public: - Tuple() = default; + Tuple() = default; virtual ~Tuple() = default; /** @@ -162,7 +162,7 @@ class Tuple class RowTuple : public Tuple { public: - RowTuple() = default; + RowTuple() = default; virtual ~RowTuple() { for (FieldExpr *spec : speces_) { @@ -198,7 +198,7 @@ class RowTuple : public Tuple const FieldMeta *field_meta = field_expr->field().meta(); cell.set_type(field_meta->type()); if (field_meta->nullable()) { - bool is_null = this->record_->data()[field_meta->offset() + field_meta->len() - 1] == 1; + bool is_null = this->record_->data()[field_meta->offset() + field_meta->len() - 1] == '1'; cell.set_data(this->record_->data() + field_meta->offset(), field_meta->len() - 1); cell.set_null(is_null); } else { @@ -264,7 +264,7 @@ class RowTuple : public Tuple class ProjectTuple : public Tuple { public: - ProjectTuple() = default; + ProjectTuple() = default; virtual ~ProjectTuple() = default; void set_expressions(std::vector> &&expressions) @@ -322,7 +322,7 @@ class ProjectTuple : public Tuple class ValueListTuple : public Tuple { public: - ValueListTuple() = default; + ValueListTuple() = default; virtual ~ValueListTuple() = default; void set_names(const std::vector &specs) { specs_ = specs; } @@ -400,7 +400,7 @@ class ValueListTuple : public Tuple class JoinedTuple : public Tuple { public: - JoinedTuple() = default; + JoinedTuple() = default; virtual ~JoinedTuple() = default; void set_left(Tuple *left) { left_ = left; } diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index ba40bee1..76a634fa 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -327,7 +327,7 @@ RC Table::make_record(int value_num, const Value *values, Record &record) if (!field->nullable()) { return RC::NOT_NULLABLE_VALUE; } - record_data[field->offset() + field->len() - 1] = 1; + record_data[field->offset() + field->len() - 1] = '1'; } } if (OB_FAIL(rc)) { From 79f049ec9b8dd6243ab91dc813a56db87baede0f Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 29 Sep 2024 17:18:14 +0800 Subject: [PATCH 059/308] style: clang format codes --- src/observer/common/init.cpp | 10 +- src/observer/common/type/attr_type.cpp | 1 - src/observer/common/type/char_type.cpp | 3 +- src/observer/common/type/data_type.h | 5 +- src/observer/common/type/date_type.h | 2 +- src/observer/common/type/float_type.cpp | 5 +- src/observer/common/type/float_type.h | 2 +- src/observer/common/type/integer_type.cpp | 5 +- src/observer/common/type/integer_type.h | 2 +- src/observer/common/value.cpp | 12 +- src/observer/common/value.h | 14 +- src/observer/event/sql_debug.cpp | 1 - src/observer/net/cli_communicator.cpp | 12 +- .../net/java_thread_pool_thread_handler.cpp | 36 +- src/observer/net/mysql_communicator.cpp | 52 +- ...e_thread_per_connection_thread_handler.cpp | 20 +- src/observer/net/plain_communicator.cpp | 7 +- src/observer/net/ring_buffer.cpp | 4 +- src/observer/net/sql_task_handler.cpp | 2 +- src/observer/net/thread_handler.cpp | 2 +- .../sql/executor/create_table_executor.cpp | 3 +- .../sql/executor/set_variable_executor.cpp | 116 +- .../sql/expr/aggregate_hash_table.cpp | 20 +- src/observer/sql/expr/aggregate_hash_table.h | 2 +- src/observer/sql/expr/aggregate_state.cpp | 2 +- src/observer/sql/expr/aggregator.cpp | 6 +- src/observer/sql/expr/aggregator.h | 11 +- src/observer/sql/expr/arithmetic_operator.hpp | 2 +- src/observer/sql/expr/composite_tuple.cpp | 6 +- src/observer/sql/expr/expression.cpp | 8 +- src/observer/sql/expr/expression.h | 22 +- src/observer/sql/expr/expression_iterator.cpp | 8 +- src/observer/sql/expr/tuple.h | 10 +- src/observer/sql/expr/tuple_cell.cpp | 3 +- .../aggregate_vec_physical_operator.cpp | 4 +- .../sql/operator/delete_physical_operator.cpp | 10 +- .../operator/explain_physical_operator.cpp | 4 +- .../operator/group_by_logical_operator.cpp | 6 +- .../operator/group_by_vec_physical_operator.h | 2 +- .../hash_group_by_physical_operator.cpp | 11 +- .../operator/index_scan_physical_operator.cpp | 10 +- .../sql/operator/insert_logical_operator.h | 2 +- .../sql/operator/insert_physical_operator.h | 2 +- .../sql/operator/logical_operator.cpp | 20 +- .../operator/predicate_physical_operator.cpp | 5 +- .../scalar_group_by_physical_operator.cpp | 2 +- .../operator/table_get_logical_operator.cpp | 4 +- .../operator/table_scan_physical_operator.cpp | 2 +- .../sql/operator/update_logical_operator.h | 2 +- .../sql/operator/update_physical_operator.h | 2 +- .../conjunction_simplification_rule.cpp | 8 +- .../sql/optimizer/expression_rewriter.cpp | 20 +- .../optimizer/predicate_pushdown_rewriter.cpp | 2 +- src/observer/sql/parser/expression_binder.h | 4 +- src/observer/sql/parser/lex_sql.cpp | 5232 +++++++++++------ src/observer/sql/parser/lex_sql.h | 244 +- src/observer/sql/parser/yacc_sql.cpp | 4382 +++++++++----- src/observer/sql/parser/yacc_sql.hpp | 207 +- .../sql/query_cache/query_cache_stage.cpp | 5 +- src/observer/sql/stmt/create_table_stmt.cpp | 3 +- src/observer/sql/stmt/insert_stmt.h | 4 +- .../storage/buffer/buffer_pool_log.cpp | 33 +- .../storage/buffer/disk_buffer_pool.cpp | 42 +- .../storage/buffer/disk_buffer_pool.h | 2 +- .../storage/buffer/double_write_buffer.cpp | 41 +- src/observer/storage/buffer/frame.cpp | 55 +- .../storage/clog/disk_log_handler.cpp | 10 +- src/observer/storage/clog/log_buffer.cpp | 16 +- src/observer/storage/clog/log_buffer.h | 2 +- src/observer/storage/clog/log_entry.cpp | 25 +- src/observer/storage/clog/log_file.cpp | 40 +- src/observer/storage/common/column.cpp | 12 +- src/observer/storage/field/field_meta.cpp | 9 +- src/observer/storage/field/field_meta.h | 8 +- src/observer/storage/index/bplus_tree.cpp | 139 +- .../storage/index/bplus_tree_index.cpp | 2 +- src/observer/storage/index/bplus_tree_log.cpp | 11 +- .../storage/index/bplus_tree_log_entry.cpp | 4 +- src/observer/storage/record/record.h | 2 +- src/observer/storage/table/table_meta.cpp | 37 +- src/observer/storage/trx/mvcc_trx.cpp | 5 +- src/observer/storage/trx/mvcc_trx.h | 2 +- src/observer/storage/trx/mvcc_trx_log.cpp | 12 +- 83 files changed, 7220 insertions(+), 3904 deletions(-) diff --git a/src/observer/common/init.cpp b/src/observer/common/init.cpp index 94d0df96..cbea3120 100644 --- a/src/observer/common/init.cpp +++ b/src/observer/common/init.cpp @@ -129,10 +129,7 @@ void cleanup_log() } } -int prepare_init_seda() -{ - return 0; -} +int prepare_init_seda() { return 0; } int init_global_objects(ProcessParam *process_param, Ini &properties) { @@ -140,9 +137,8 @@ int init_global_objects(ProcessParam *process_param, Ini &properties) int ret = 0; - RC rc = GCTX.handler_->init("miniob", - process_param->trx_kit_name().c_str(), - process_param->durability_mode().c_str()); + RC rc = + GCTX.handler_->init("miniob", process_param->trx_kit_name().c_str(), process_param->durability_mode().c_str()); if (OB_FAIL(rc)) { LOG_ERROR("failed to init handler. rc=%s", strrc(rc)); return -1; diff --git a/src/observer/common/type/attr_type.cpp b/src/observer/common/type/attr_type.cpp index 9870534a..7c12f3c1 100644 --- a/src/observer/common/type/attr_type.cpp +++ b/src/observer/common/type/attr_type.cpp @@ -8,7 +8,6 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ - #include "common/lang/string.h" #include "common/type/attr_type.h" diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index a85f0c00..9340e112 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -109,8 +109,7 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ } result.set_float(float_val); } break; - default: - return RC::UNIMPLEMENTED; + default: return RC::UNIMPLEMENTED; } return RC::SUCCESS; } diff --git a/src/observer/common/type/data_type.h b/src/observer/common/type/data_type.h index 39177e01..33e88b4d 100644 --- a/src/observer/common/type/data_type.h +++ b/src/observer/common/type/data_type.h @@ -75,7 +75,10 @@ class DataType /** * @brief 将 val 转换为 type 类型,并将结果保存到 result 中 */ - virtual RC cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion = true) const { return RC::UNSUPPORTED; } + virtual RC cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion = true) const + { + return RC::UNSUPPORTED; + } /** * @brief 将 val 转换为 string,并将结果保存到 result 中 diff --git a/src/observer/common/type/date_type.h b/src/observer/common/type/date_type.h index d4d9ed2a..841179c0 100644 --- a/src/observer/common/type/date_type.h +++ b/src/observer/common/type/date_type.h @@ -21,7 +21,7 @@ class DateType : public DataType { public: - DateType() : DataType(AttrType::DATES) {} + DateType() : DataType(AttrType::DATES) {} ~DateType() override = default; // 是否需要考虑日期与其它类型的转换?(不需要) diff --git a/src/observer/common/type/float_type.cpp b/src/observer/common/type/float_type.cpp index 1990f4da..2c475a00 100644 --- a/src/observer/common/type/float_type.cpp +++ b/src/observer/common/type/float_type.cpp @@ -119,13 +119,12 @@ RC FloatType::cast_to(const Value &val, AttrType type, Value &result, bool allow if (str.back() == '.') { str.pop_back(); } - result.set_string(str.c_str()); // 设置字符串结果 + result.set_string(str.c_str()); // 设置字符串结果 } break; case AttrType::BOOLEANS: { result.set_boolean(val.get_float() != 0.0f); // 非零为 true,零为 false } break; - default: - return RC::UNSUPPORTED; // 不支持的转换 + default: return RC::UNSUPPORTED; // 不支持的转换 } return RC::SUCCESS; } diff --git a/src/observer/common/type/float_type.h b/src/observer/common/type/float_type.h index 4ac92973..0064e5c0 100644 --- a/src/observer/common/type/float_type.h +++ b/src/observer/common/type/float_type.h @@ -20,7 +20,7 @@ See the Mulan PSL v2 for more details. */ class FloatType : public DataType { public: - FloatType() : DataType(AttrType::FLOATS) {} + FloatType() : DataType(AttrType::FLOATS) {} virtual ~FloatType() = default; int compare(const Value &left, const Value &right) const override; diff --git a/src/observer/common/type/integer_type.cpp b/src/observer/common/type/integer_type.cpp index 26ce390a..65fd6306 100644 --- a/src/observer/common/type/integer_type.cpp +++ b/src/observer/common/type/integer_type.cpp @@ -104,11 +104,10 @@ RC IntegerType::cast_to(const Value &val, AttrType type, Value &result, bool all // 数字转字符串,不带符号,不考虑长度溢出 int int_val = val.get_int(); std::string str = int_val < 0 ? std::to_string(-int_val) : std::to_string(int_val); - result.set_string(str.c_str()); // 设置字符串结果 + result.set_string(str.c_str()); // 设置字符串结果 break; } break; - default: - return RC::UNSUPPORTED; // 不支持的转换 + default: return RC::UNSUPPORTED; // 不支持的转换 } return RC::SUCCESS; } diff --git a/src/observer/common/type/integer_type.h b/src/observer/common/type/integer_type.h index 693691d8..75dcd6de 100644 --- a/src/observer/common/type/integer_type.h +++ b/src/observer/common/type/integer_type.h @@ -21,7 +21,7 @@ See the Mulan PSL v2 for more details. */ class IntegerType : public DataType { public: - IntegerType() : DataType(AttrType::INTS) {} + IntegerType() : DataType(AttrType::INTS) {} virtual ~IntegerType() {} int compare(const Value &left, const Value &right) const override; diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index d8144349..7bef1344 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -22,9 +22,7 @@ See the Mulan PSL v2 for more details. */ #include "common/lang/string.h" #include "common/log/log.h" -Value::Value(NullValue) : attr_type_(AttrType::NULLS) { - set_null(); -} +Value::Value(NullValue) : attr_type_(AttrType::NULLS) { set_null(); } Value::Value(int val) { set_int(val); } @@ -146,9 +144,7 @@ void Value::set_data(char *data, int length) } } -void Value::set_null() { - is_null_ = true; -} +void Value::set_null() { is_null_ = true; } void Value::set_int(int val) { @@ -270,12 +266,12 @@ int Value::compare(const Value &other) const bool Value::LIKE(const Value &other) const { - const std::string left_str = this->get_string(); + const std::string left_str = this->get_string(); const std::string &right_str = other.get_string(); // 将 SQL 通配符转换为正则表达式 std::string regex_str = std::regex_replace(right_str, std::regex("%"), ".*"); - regex_str = std::regex_replace(regex_str, std::regex("_"), "."); + regex_str = std::regex_replace(regex_str, std::regex("_"), "."); std::regex regex_pattern(regex_str); return std::regex_match(left_str, regex_pattern); diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 66a3efba..5822ee60 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -100,7 +100,7 @@ class Value final string to_string() const; - int compare(const Value &other) const; + int compare(const Value &other) const; bool LIKE(const Value &other) const; const char *data() const; @@ -113,12 +113,12 @@ class Value final * 获取对应的值 * 如果当前的类型与期望获取的类型不符,就会执行转换操作 */ - int get_int() const; - float get_float() const; - string get_string() const; - bool get_boolean() const; - bool is_null() const { return is_null_; } - inline bool is_str() const{ return attr_type_ == AttrType::CHARS; } + int get_int() const; + float get_float() const; + string get_string() const; + bool get_boolean() const; + bool is_null() const { return is_null_; } + inline bool is_str() const { return attr_type_ == AttrType::CHARS; } private: void set_null(); diff --git a/src/observer/event/sql_debug.cpp b/src/observer/event/sql_debug.cpp index ab68dc17..185d4768 100644 --- a/src/observer/event/sql_debug.cpp +++ b/src/observer/event/sql_debug.cpp @@ -18,7 +18,6 @@ See the Mulan PSL v2 for more details. */ #include "event/sql_debug.h" #include "session/session.h" - void SqlDebug::add_debug_info(const string &debug_info) { debug_infos_.push_back(debug_info); } void SqlDebug::clear_debug_info() { debug_infos_.clear(); } diff --git a/src/observer/net/cli_communicator.cpp b/src/observer/net/cli_communicator.cpp index 396dc280..f429f391 100644 --- a/src/observer/net/cli_communicator.cpp +++ b/src/observer/net/cli_communicator.cpp @@ -39,7 +39,8 @@ time_t last_history_write_time = 0; sigjmp_buf ctrlc_buf; bool ctrlc_flag = false; -void handle_signals(int signo) { +void handle_signals(int signo) +{ if (signo == SIGINT) { ctrlc_flag = true; siglongjmp(ctrlc_buf, 1); @@ -61,7 +62,8 @@ char *my_readline(const char *prompt) } } - while ( sigsetjmp( ctrlc_buf, 1 ) != 0 ); + while (sigsetjmp(ctrlc_buf, 1) != 0) + ; if (ctrlc_flag) { char *line = (char *)malloc(strlen("exit") + 1); @@ -114,10 +116,8 @@ char *my_readline(const char *prompt) */ bool is_exit_command(const char *cmd) { - return 0 == strncasecmp("exit", cmd, 4) - || 0 == strncasecmp("bye", cmd, 3) - || 0 == strncasecmp("\\q", cmd, 2) - || 0 == strncasecmp("interrupted", cmd, 11); + return 0 == strncasecmp("exit", cmd, 4) || 0 == strncasecmp("bye", cmd, 3) || 0 == strncasecmp("\\q", cmd, 2) || + 0 == strncasecmp("interrupted", cmd, 11); } char *read_command() diff --git a/src/observer/net/java_thread_pool_thread_handler.cpp b/src/observer/net/java_thread_pool_thread_handler.cpp index 476fa916..f58a929a 100644 --- a/src/observer/net/java_thread_pool_thread_handler.cpp +++ b/src/observer/net/java_thread_pool_thread_handler.cpp @@ -25,13 +25,13 @@ using namespace common; /** * @brief libevent 消息回调函数的参数 - * + * */ struct EventCallbackAg { - JavaThreadPoolThreadHandler *host = nullptr; - Communicator *communicator = nullptr; - struct event *ev = nullptr; + JavaThreadPoolThreadHandler *host = nullptr; + Communicator *communicator = nullptr; + struct event *ev = nullptr; }; JavaThreadPoolThreadHandler::~JavaThreadPoolThreadHandler() @@ -59,10 +59,10 @@ RC JavaThreadPoolThreadHandler::start() // 创建线程池 // 这里写死了线程池的大小,实际上可以从配置文件中读取 int ret = executor_.init("SQL", // name - 2, // core size - 8, // max size - 60*1000 // keep alive time - ); + 2, // core size + 8, // max size + 60 * 1000 // keep alive time + ); if (0 != ret) { LOG_ERROR("failed to init thread pool executor"); return RC::INTERNAL; @@ -71,7 +71,7 @@ RC JavaThreadPoolThreadHandler::start() // libevent 的监测消息循环主体,要放在一个线程中执行 // event_loop_thread 是运行libevent 消息监测循环的函数,会长期运行,并且会放到线程池中占据一个线程 auto event_worker = std::bind(&JavaThreadPoolThreadHandler::event_loop_thread, this); - ret = executor_.execute(event_worker); + ret = executor_.execute(event_worker); if (0 != ret) { LOG_ERROR("failed to execute event worker"); return RC::INTERNAL; @@ -94,7 +94,7 @@ static void event_callback(evutil_socket_t fd, short event, void *arg) { if (event & (EV_READ | EV_CLOSED)) { LOG_TRACE("got event. fd=%d, event=%d", fd, event); - EventCallbackAg *ag = (EventCallbackAg *)arg; + EventCallbackAg *ag = (EventCallbackAg *)arg; JavaThreadPoolThreadHandler *handler = ag->host; handler->handle_event(ag); } else { @@ -113,7 +113,7 @@ void JavaThreadPoolThreadHandler::handle_event(EventCallbackAg *ag) // sql_handler 是一个回调函数 auto sql_handler = [this, ag]() { - RC rc = sql_task_handler_.handle_event(ag->communicator); // 这里会有接收消息、处理请求然后返回结果一条龙服务 + RC rc = sql_task_handler_.handle_event(ag->communicator); // 这里会有接收消息、处理请求然后返回结果一条龙服务 if (RC::SUCCESS != rc) { LOG_WARN("failed to handle sql task. rc=%s", strrc(rc)); this->close_connection(ag->communicator); @@ -128,7 +128,7 @@ void JavaThreadPoolThreadHandler::handle_event(EventCallbackAg *ag) // LOG_TRACE("add event. fd=%d, communicator=%p", event_get_fd(ag->ev), this); } }; - + executor_.execute(sql_handler); } @@ -148,9 +148,9 @@ RC JavaThreadPoolThreadHandler::new_connection(Communicator *communicator) int fd = communicator->fd(); LOG_INFO("new connection. fd=%d", fd); EventCallbackAg *ag = new EventCallbackAg; - ag->host = this; - ag->communicator = communicator; - ag->ev = nullptr; + ag->host = this; + ag->communicator = communicator; + ag->ev = nullptr; /// 创建一个libevent事件对象。其中EV_READ表示可读事件,就是客户端发消息时会触发事件。 /// EV_ET 表示边缘触发,有消息时只会触发一次,不会重复触发。这个标识在Linux平台上是支持的,但是有些平台不支持。 /// 使用EV_ET边缘触发时需要注意一个问题,就是每次一定要把客户端发来的消息都读取完,直到read返回EAGAIN为止。 @@ -185,7 +185,7 @@ RC JavaThreadPoolThreadHandler::close_connection(Communicator *communicator) { lock_guard guard(lock_); - auto iter = event_map_.find(communicator); + auto iter = event_map_.find(communicator); if (iter == event_map_.end()) { LOG_ERROR("cannot find event for communicator %p", communicator); return RC::INTERNAL; @@ -196,8 +196,8 @@ RC JavaThreadPoolThreadHandler::close_connection(Communicator *communicator) } if (ag->ev) { - event_del(ag->ev); // 把当前事件从event_base中删除 - event_free(ag->ev); // 释放event对象 + event_del(ag->ev); // 把当前事件从event_base中删除 + event_free(ag->ev); // 释放event对象 ag->ev = nullptr; } delete ag; diff --git a/src/observer/net/mysql_communicator.cpp b/src/observer/net/mysql_communicator.cpp index 95dd1521..b4be7ee0 100644 --- a/src/observer/net/mysql_communicator.cpp +++ b/src/observer/net/mysql_communicator.cpp @@ -349,7 +349,7 @@ struct HandshakeV10 : public BasePacket char *buf = net_packet.data(); int pos = 0; - pos += 3; // skip packet length + pos += 3; // skip packet length pos += store_int1(buf + pos, packet_header.sequence_id); pos += store_int1(buf + pos, protocol); @@ -380,12 +380,12 @@ struct HandshakeV10 : public BasePacket */ struct OkPacket : public BasePacket { - int8_t header = 0; // 0x00 for ok and 0xFE for EOF - int32_t affected_rows = 0; - int32_t last_insert_id = 0; - int16_t status_flags = 0x22; - int16_t warnings = 0; - string info; // human readable status information + int8_t header = 0; // 0x00 for ok and 0xFE for EOF + int32_t affected_rows = 0; + int32_t last_insert_id = 0; + int16_t status_flags = 0x22; + int16_t warnings = 0; + string info; // human readable status information OkPacket(int8_t sequence = 0) : BasePacket(sequence) {} virtual ~OkPacket() = default; @@ -399,7 +399,7 @@ struct OkPacket : public BasePacket char *buf = net_packet.data(); int pos = 0; - pos += 3; // skip packet length + pos += 3; // skip packet length pos += store_int1(buf + pos, packet_header.sequence_id); pos += store_int1(buf + pos, header); pos += store_lenenc_int(buf + pos, affected_rows); @@ -472,11 +472,11 @@ struct EofPacket : public BasePacket */ struct ErrPacket : public BasePacket { - int8_t header = 0xFF; - int16_t error_code = 0; - char sql_state_marker[1] = {'#'}; - string sql_state{"HY000"}; - string error_message; + int8_t header = 0xFF; + int16_t error_code = 0; + char sql_state_marker[1] = {'#'}; + string sql_state{"HY000"}; + string error_message; ErrPacket(int8_t sequence = 0) : BasePacket(sequence) {} virtual ~ErrPacket() = default; @@ -520,7 +520,7 @@ struct QueryPacket { PacketHeader packet_header; int8_t command; // 0x03: COM_QUERY - string query; // the text of the SQL query to execute + string query; // the text of the SQL query to execute }; /** @@ -696,8 +696,8 @@ RC MysqlCommunicator::write_state(SessionEvent *event, bool &need_disconnect) { SqlResult *sql_result = event->sql_result(); - const int buf_size = 2048; - char *buf = new char[buf_size]; + const int buf_size = 2048; + char *buf = new char[buf_size]; const string &state_string = sql_result->state_string(); if (state_string.empty()) { const char *result = strrc(sql_result->return_code()); @@ -938,16 +938,16 @@ RC MysqlCommunicator::send_column_definition(SqlResult *sql_result, bool &need_d * @param no_column_def 为了特殊处理没有返回值的语句,比如insert/delete,需要做特殊处理。 * 这种语句只需要返回一个ok packet即可 */ -RC MysqlCommunicator::send_result_rows(SessionEvent *event, SqlResult *sql_result, bool no_column_def, bool &need_disconnect) +RC MysqlCommunicator::send_result_rows( + SessionEvent *event, SqlResult *sql_result, bool no_column_def, bool &need_disconnect) { RC rc = RC::SUCCESS; vector packet; packet.resize(4 * 1024 * 1024); // TODO warning: length cannot be fix - int affected_rows = 0; - if (event->session()->get_execution_mode() == ExecutionMode::CHUNK_ITERATOR - && event->session()->used_chunk_mode()) { + int affected_rows = 0; + if (event->session()->get_execution_mode() == ExecutionMode::CHUNK_ITERATOR && event->session()->used_chunk_mode()) { rc = write_chunk_result(sql_result, packet, affected_rows, need_disconnect); } else { rc = write_tuple_result(sql_result, packet, affected_rows, need_disconnect); @@ -972,10 +972,11 @@ RC MysqlCommunicator::send_result_rows(SessionEvent *event, SqlResult *sql_resul return rc; } -RC MysqlCommunicator::write_tuple_result(SqlResult *sql_result, vector &packet, int &affected_rows, bool &need_disconnect) +RC MysqlCommunicator::write_tuple_result( + SqlResult *sql_result, vector &packet, int &affected_rows, bool &need_disconnect) { - Tuple *tuple = nullptr; - RC rc = RC::SUCCESS; + Tuple *tuple = nullptr; + RC rc = RC::SUCCESS; while (RC::SUCCESS == (rc = sql_result->next_tuple(tuple))) { assert(tuple != nullptr); @@ -1017,10 +1018,11 @@ RC MysqlCommunicator::write_tuple_result(SqlResult *sql_result, vector &pa } return rc; } -RC MysqlCommunicator::write_chunk_result(SqlResult *sql_result, vector &packet, int &affected_rows, bool &need_disconnect) +RC MysqlCommunicator::write_chunk_result( + SqlResult *sql_result, vector &packet, int &affected_rows, bool &need_disconnect) { Chunk chunk; - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; while (RC::SUCCESS == (rc = sql_result->next_chunk(chunk))) { int column_num = chunk.column_num(); if (column_num == 0) { diff --git a/src/observer/net/one_thread_per_connection_thread_handler.cpp b/src/observer/net/one_thread_per_connection_thread_handler.cpp index 91ff6904..b02c26d3 100644 --- a/src/observer/net/one_thread_per_connection_thread_handler.cpp +++ b/src/observer/net/one_thread_per_connection_thread_handler.cpp @@ -28,9 +28,7 @@ using namespace common; class Worker { public: - Worker(ThreadHandler &host, Communicator *communicator) - : host_(host), communicator_(communicator) - {} + Worker(ThreadHandler &host, Communicator *communicator) : host_(host), communicator_(communicator) {} ~Worker() { if (thread_ != nullptr) { @@ -55,7 +53,7 @@ class Worker { if (thread_) { if (thread_->get_id() == this_thread::get_id()) { - thread_->detach(); // 如果当前线程join当前线程,就会卡死 + thread_->detach(); // 如果当前线程join当前线程,就会卡死 } else { thread_->join(); } @@ -74,8 +72,8 @@ class Worker } struct pollfd poll_fd; - poll_fd.fd = communicator_->fd(); - poll_fd.events = POLLIN; + poll_fd.fd = communicator_->fd(); + poll_fd.events = POLLIN; poll_fd.revents = 0; while (running_) { @@ -101,15 +99,15 @@ class Worker } LOG_INFO("worker thread stop. communicator = %p", communicator_); - host_.close_connection(communicator_); /// 连接关闭后,当前对象会被删除 + host_.close_connection(communicator_); /// 连接关闭后,当前对象会被删除 } private: ThreadHandler &host_; SqlTaskHandler task_handler_; - Communicator *communicator_ = nullptr; - thread *thread_ = nullptr; - volatile bool running_ = true; + Communicator *communicator_ = nullptr; + thread *thread_ = nullptr; + volatile bool running_ = true; }; OneThreadPerConnectionThreadHandler::~OneThreadPerConnectionThreadHandler() @@ -128,7 +126,7 @@ RC OneThreadPerConnectionThreadHandler::new_connection(Communicator *communicato return RC::FILE_EXIST; } - Worker *worker = new Worker(*this, communicator); + Worker *worker = new Worker(*this, communicator); thread_map_[communicator] = worker; return worker->start(); } diff --git a/src/observer/net/plain_communicator.cpp b/src/observer/net/plain_communicator.cpp index e1674671..66514503 100644 --- a/src/observer/net/plain_communicator.cpp +++ b/src/observer/net/plain_communicator.cpp @@ -237,8 +237,7 @@ RC PlainCommunicator::write_result_internal(SessionEvent *event, bool &need_disc } rc = RC::SUCCESS; - if (event->session()->get_execution_mode() == ExecutionMode::CHUNK_ITERATOR - && event->session()->used_chunk_mode()) { + if (event->session()->get_execution_mode() == ExecutionMode::CHUNK_ITERATOR && event->session()->used_chunk_mode()) { rc = write_chunk_result(sql_result); } else { rc = write_tuple_result(sql_result); @@ -272,7 +271,7 @@ RC PlainCommunicator::write_result_internal(SessionEvent *event, bool &need_disc RC PlainCommunicator::write_tuple_result(SqlResult *sql_result) { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; Tuple *tuple = nullptr; while (RC::SUCCESS == (rc = sql_result->next_tuple(tuple))) { assert(tuple != nullptr); @@ -326,7 +325,7 @@ RC PlainCommunicator::write_tuple_result(SqlResult *sql_result) RC PlainCommunicator::write_chunk_result(SqlResult *sql_result) { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; Chunk chunk; while (RC::SUCCESS == (rc = sql_result->next_chunk(chunk))) { int col_num = chunk.column_num(); diff --git a/src/observer/net/ring_buffer.cpp b/src/observer/net/ring_buffer.cpp index c3b5f74e..dfd28182 100644 --- a/src/observer/net/ring_buffer.cpp +++ b/src/observer/net/ring_buffer.cpp @@ -32,7 +32,7 @@ RC RingBuffer::read(char *buf, int32_t size, int32_t &read_size) RC rc = RC::SUCCESS; read_size = 0; - while (OB_SUCC(rc) && read_sizesize()> 0) { + while (OB_SUCC(rc) && read_size < size && this->size() > 0) { const char *tmp_buf = nullptr; int32_t tmp_size = 0; rc = buffer(tmp_buf, tmp_size); @@ -90,7 +90,7 @@ RC RingBuffer::write(const char *data, int32_t size, int32_t &write_size) RC rc = RC::SUCCESS; write_size = 0; - while (OB_SUCC(rc) && write_sizeremain()> 0) { + while (OB_SUCC(rc) && write_size < size && this->remain() > 0) { const int32_t read_pos = this->read_pos(); const int32_t tmp_buf_size = (read_pos <= write_pos_) ? (capacity() - write_pos_) : (read_pos - write_pos_); diff --git a/src/observer/net/sql_task_handler.cpp b/src/observer/net/sql_task_handler.cpp index 52ee938a..18b07415 100644 --- a/src/observer/net/sql_task_handler.cpp +++ b/src/observer/net/sql_task_handler.cpp @@ -21,7 +21,7 @@ See the Mulan PSL v2 for more details. */ RC SqlTaskHandler::handle_event(Communicator *communicator) { SessionEvent *event = nullptr; - RC rc = communicator->read_event(event); + RC rc = communicator->read_event(event); if (OB_FAIL(rc)) { return rc; } diff --git a/src/observer/net/thread_handler.cpp b/src/observer/net/thread_handler.cpp index 941fcdfd..b9ae5155 100644 --- a/src/observer/net/thread_handler.cpp +++ b/src/observer/net/thread_handler.cpp @@ -20,7 +20,7 @@ See the Mulan PSL v2 for more details. */ #include "common/log/log.h" #include "common/lang/string.h" -ThreadHandler * ThreadHandler::create(const char *name) +ThreadHandler *ThreadHandler::create(const char *name) { const char *default_name = "one-thread-per-connection"; if (nullptr == name || common::is_blank(name)) { diff --git a/src/observer/sql/executor/create_table_executor.cpp b/src/observer/sql/executor/create_table_executor.cpp index 3ef9cac9..3a0ab6e7 100644 --- a/src/observer/sql/executor/create_table_executor.cpp +++ b/src/observer/sql/executor/create_table_executor.cpp @@ -32,7 +32,8 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) CreateTableStmt *create_table_stmt = static_cast(stmt); const char *table_name = create_table_stmt->table_name().c_str(); - RC rc = session->get_current_db()->create_table(table_name, create_table_stmt->attr_infos(), create_table_stmt->storage_format()); + RC rc = session->get_current_db()->create_table( + table_name, create_table_stmt->attr_infos(), create_table_stmt->storage_format()); return rc; } \ No newline at end of file diff --git a/src/observer/sql/executor/set_variable_executor.cpp b/src/observer/sql/executor/set_variable_executor.cpp index b5518a18..2279f12b 100644 --- a/src/observer/sql/executor/set_variable_executor.cpp +++ b/src/observer/sql/executor/set_variable_executor.cpp @@ -12,87 +12,87 @@ See the Mulan PSL v2 for more details. */ RC SetVariableExecutor::execute(SQLStageEvent *sql_event) { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; - Session *session = sql_event->session_event()->session(); - SetVariableStmt *stmt = (SetVariableStmt *)sql_event->stmt(); + Session *session = sql_event->session_event()->session(); + SetVariableStmt *stmt = (SetVariableStmt *)sql_event->stmt(); - const char *var_name = stmt->var_name(); - const Value &var_value = stmt->var_value(); - if (strcasecmp(var_name, "sql_debug") == 0) { - bool bool_value = false; - rc = var_value_to_boolean(var_value, bool_value); - if (rc == RC::SUCCESS) { - session->set_sql_debug(bool_value); - LOG_TRACE("set sql_debug to %d", bool_value); - } - } else if (strcasecmp(var_name, "execution_mode") == 0) { - ExecutionMode execution_mode = ExecutionMode::UNKNOWN_MODE; - rc = get_execution_mode(var_value, execution_mode); - if (rc == RC::SUCCESS && execution_mode != ExecutionMode::UNKNOWN_MODE) { - session->set_execution_mode(execution_mode); - } else { - rc = RC::INVALID_ARGUMENT; - } + const char *var_name = stmt->var_name(); + const Value &var_value = stmt->var_value(); + if (strcasecmp(var_name, "sql_debug") == 0) { + bool bool_value = false; + rc = var_value_to_boolean(var_value, bool_value); + if (rc == RC::SUCCESS) { + session->set_sql_debug(bool_value); + LOG_TRACE("set sql_debug to %d", bool_value); + } + } else if (strcasecmp(var_name, "execution_mode") == 0) { + ExecutionMode execution_mode = ExecutionMode::UNKNOWN_MODE; + rc = get_execution_mode(var_value, execution_mode); + if (rc == RC::SUCCESS && execution_mode != ExecutionMode::UNKNOWN_MODE) { + session->set_execution_mode(execution_mode); } else { - rc = RC::VARIABLE_NOT_EXISTS; + rc = RC::INVALID_ARGUMENT; } + } else { + rc = RC::VARIABLE_NOT_EXISTS; + } - return rc; + return rc; } RC SetVariableExecutor::var_value_to_boolean(const Value &var_value, bool &bool_value) const { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; - if (var_value.attr_type() == AttrType::BOOLEANS) { - bool_value = var_value.get_boolean(); - } else if (var_value.attr_type() == AttrType::INTS) { - bool_value = var_value.get_int() != 0; - } else if (var_value.attr_type() == AttrType::FLOATS) { - bool_value = var_value.get_float() != 0.0; - } else if (var_value.attr_type() == AttrType::CHARS) { + if (var_value.attr_type() == AttrType::BOOLEANS) { + bool_value = var_value.get_boolean(); + } else if (var_value.attr_type() == AttrType::INTS) { + bool_value = var_value.get_int() != 0; + } else if (var_value.attr_type() == AttrType::FLOATS) { + bool_value = var_value.get_float() != 0.0; + } else if (var_value.attr_type() == AttrType::CHARS) { - std::string true_strings[] = {"true", "on", "yes", "t", "1"}; + std::string true_strings[] = {"true", "on", "yes", "t", "1"}; - std::string false_strings[] = {"false", "off", "no", "f", "0"}; + std::string false_strings[] = {"false", "off", "no", "f", "0"}; - for (size_t i = 0; i < sizeof(true_strings) / sizeof(true_strings[0]); i++) { - if (strcasecmp(var_value.get_string().c_str(), true_strings[i].c_str()) == 0) { - bool_value = true; - return rc; - } + for (size_t i = 0; i < sizeof(true_strings) / sizeof(true_strings[0]); i++) { + if (strcasecmp(var_value.get_string().c_str(), true_strings[i].c_str()) == 0) { + bool_value = true; + return rc; } + } - for (size_t i = 0; i < sizeof(false_strings) / sizeof(false_strings[0]); i++) { - if (strcasecmp(var_value.get_string().c_str(), false_strings[i].c_str()) == 0) { - bool_value = false; - return rc; - } + for (size_t i = 0; i < sizeof(false_strings) / sizeof(false_strings[0]); i++) { + if (strcasecmp(var_value.get_string().c_str(), false_strings[i].c_str()) == 0) { + bool_value = false; + return rc; } - rc = RC::VARIABLE_NOT_VALID; } + rc = RC::VARIABLE_NOT_VALID; + } - return rc; + return rc; } RC SetVariableExecutor::get_execution_mode(const Value &var_value, ExecutionMode &execution_mode) const { - RC rc = RC::SUCCESS; - - if (var_value.attr_type() == AttrType::CHARS) { - if (strcasecmp(var_value.get_string().c_str(), "TUPLE_ITERATOR") == 0) { - execution_mode = ExecutionMode::TUPLE_ITERATOR; - } else if (strcasecmp(var_value.get_string().c_str(), "CHUNK_ITERATOR") == 0) { - execution_mode = ExecutionMode::CHUNK_ITERATOR; - } else { - execution_mode = ExecutionMode::UNKNOWN_MODE; - rc = RC::VARIABLE_NOT_VALID; - } - } else { + RC rc = RC::SUCCESS; + + if (var_value.attr_type() == AttrType::CHARS) { + if (strcasecmp(var_value.get_string().c_str(), "TUPLE_ITERATOR") == 0) { + execution_mode = ExecutionMode::TUPLE_ITERATOR; + } else if (strcasecmp(var_value.get_string().c_str(), "CHUNK_ITERATOR") == 0) { + execution_mode = ExecutionMode::CHUNK_ITERATOR; + } else { execution_mode = ExecutionMode::UNKNOWN_MODE; - rc = RC::VARIABLE_NOT_VALID; + rc = RC::VARIABLE_NOT_VALID; } + } else { + execution_mode = ExecutionMode::UNKNOWN_MODE; + rc = RC::VARIABLE_NOT_VALID; + } - return rc; + return rc; } \ No newline at end of file diff --git a/src/observer/sql/expr/aggregate_hash_table.cpp b/src/observer/sql/expr/aggregate_hash_table.cpp index cde07fd4..fe16ebdb 100644 --- a/src/observer/sql/expr/aggregate_hash_table.cpp +++ b/src/observer/sql/expr/aggregate_hash_table.cpp @@ -222,16 +222,18 @@ void LinearProbingAggregateHashTable::add_batch(int *input_keys, V *input_val // off 全部初始化为 0 // for (; i + SIMD_WIDTH <= len;) { - // 1: 根据 `inv` 变量的值,从 `input_keys` 中 `selective load` `SIMD_WIDTH` 个不同的输入键值对。 - // 2. 计算 i += |inv|, `|inv|` 表示 `inv` 中有效的个数 - // 3. 计算 hash 值, - // 4. 根据聚合类型(目前只支持 sum),在哈希表中更新聚合结果。如果本次循环,没有找到key[i] 在哈希表中的位置,则不更新聚合结果。 - // 5. gather 操作,根据 hash 值将 keys_ 的 gather 结果写入 table_key 中。 - // 6. 更新 inv 和 off。如果本次循环key[i] 聚合完成,则inv[i]=-1,表示该位置在下次循环中读取新的键值对。 - // 如果本次循环 key[i] 未在哈希表中聚合完成(table_key[i] != key[i]),则inv[i] = 0,表示该位置在下次循环中不需要读取新的键值对。 - // 如果本次循环中,key[i]聚合完成,则off[i] 更新为 0,表示线性探测偏移量为 0,key[i] 未完成聚合,则off[i]++,表示线性探测偏移量加 1。 + // 1: 根据 `inv` 变量的值,从 `input_keys` 中 `selective load` `SIMD_WIDTH` 个不同的输入键值对。 + // 2. 计算 i += |inv|, `|inv|` 表示 `inv` 中有效的个数 + // 3. 计算 hash 值, + // 4. 根据聚合类型(目前只支持 sum),在哈希表中更新聚合结果。如果本次循环,没有找到key[i] + // 在哈希表中的位置,则不更新聚合结果。 + // 5. gather 操作,根据 hash 值将 keys_ 的 gather 结果写入 table_key 中。 + // 6. 更新 inv 和 off。如果本次循环key[i] 聚合完成,则inv[i]=-1,表示该位置在下次循环中读取新的键值对。 + // 如果本次循环 key[i] 未在哈希表中聚合完成(table_key[i] != key[i]),则inv[i] = + // 0,表示该位置在下次循环中不需要读取新的键值对。 如果本次循环中,key[i]聚合完成,则off[i] 更新为 + // 0,表示线性探测偏移量为 0,key[i] 未完成聚合,则off[i]++,表示线性探测偏移量加 1。 // } - //7. 通过标量线性探测,处理剩余键值对 + // 7. 通过标量线性探测,处理剩余键值对 // resize_if_need(); } diff --git a/src/observer/sql/expr/aggregate_hash_table.h b/src/observer/sql/expr/aggregate_hash_table.h index 89719c9b..969cf7e1 100644 --- a/src/observer/sql/expr/aggregate_hash_table.h +++ b/src/observer/sql/expr/aggregate_hash_table.h @@ -35,7 +35,7 @@ class AggregateHashTable */ virtual RC next(Chunk &chunk) = 0; - virtual void close_scan(){}; + virtual void close_scan() {}; protected: AggregateHashTable *hash_table_; diff --git a/src/observer/sql/expr/aggregate_state.cpp b/src/observer/sql/expr/aggregate_state.cpp index 124cb277..0e394ce8 100644 --- a/src/observer/sql/expr/aggregate_state.cpp +++ b/src/observer/sql/expr/aggregate_state.cpp @@ -26,7 +26,7 @@ void SumState::update(const T *values, int size) } #else for (int i = 0; i < size; ++i) { - value += values[i]; + value += values[i]; } #endif } diff --git a/src/observer/sql/expr/aggregator.cpp b/src/observer/sql/expr/aggregator.cpp index 29ba468a..b07a77ff 100644 --- a/src/observer/sql/expr/aggregator.cpp +++ b/src/observer/sql/expr/aggregator.cpp @@ -21,15 +21,15 @@ RC SumAggregator::accumulate(const Value &value) value_ = value; return RC::SUCCESS; } - + ASSERT(value.attr_type() == value_.attr_type(), "type mismatch. value type: %s, value_.type: %s", attr_type_to_string(value.attr_type()), attr_type_to_string(value_.attr_type())); - + Value::add(value, value_, value_); return RC::SUCCESS; } -RC SumAggregator::evaluate(Value& result) +RC SumAggregator::evaluate(Value &result) { result = value_; return RC::SUCCESS; diff --git a/src/observer/sql/expr/aggregator.h b/src/observer/sql/expr/aggregator.h index 42e6c474..2f800696 100644 --- a/src/observer/sql/expr/aggregator.h +++ b/src/observer/sql/expr/aggregator.h @@ -104,8 +104,8 @@ class MaxAggregator : public Aggregator value_ = value; return RC::SUCCESS; } - // 更新最大值 - if (value.compare(value_)>0) { + // 更新最大值 + if (value.compare(value_) > 0) { value_ = value; } return RC::SUCCESS; @@ -133,7 +133,7 @@ class MinAggregator : public Aggregator } // 更新最小值 - if (value.compare(value_)<0) { + if (value.compare(value_) < 0) { value_ = value; } return RC::SUCCESS; @@ -141,11 +141,10 @@ class MinAggregator : public Aggregator RC evaluate(Value &result) override { - result = value_; // 返回最小值 + result = value_; // 返回最小值 return RC::SUCCESS; } private: - Value value_; // 最小值 + Value value_; // 最小值 }; - diff --git a/src/observer/sql/expr/arithmetic_operator.hpp b/src/observer/sql/expr/arithmetic_operator.hpp index 2b15e2ef..fa625f76 100644 --- a/src/observer/sql/expr/arithmetic_operator.hpp +++ b/src/observer/sql/expr/arithmetic_operator.hpp @@ -208,7 +208,7 @@ template void compare_operation(T *left, T *right, int n, std::vector &result) { #if defined(USE_SIMD) - int i = 0; + int i = 0; if constexpr (std::is_same::value) { for (; i <= n - SIMD_WIDTH; i += SIMD_WIDTH) { __m256 left_value, right_value; diff --git a/src/observer/sql/expr/composite_tuple.cpp b/src/observer/sql/expr/composite_tuple.cpp index 40ff8128..81095f53 100644 --- a/src/observer/sql/expr/composite_tuple.cpp +++ b/src/observer/sql/expr/composite_tuple.cpp @@ -64,8 +64,8 @@ RC CompositeTuple::find_cell(const TupleCellSpec &spec, Value &cell) const void CompositeTuple::add_tuple(unique_ptr tuple) { tuples_.push_back(std::move(tuple)); } -Tuple &CompositeTuple::tuple_at(size_t index) -{ +Tuple &CompositeTuple::tuple_at(size_t index) +{ ASSERT(index < tuples_.size(), "index=%d, tuples_size=%d", index, tuples_.size()); - return *tuples_[index]; + return *tuples_[index]; } \ No newline at end of file diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 1d0b7f73..73a570fa 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -91,7 +91,7 @@ RC CastExpr::cast(const Value &value, Value &cast_value) const RC CastExpr::get_value(const Tuple &tuple, Value &result) const { Value value; - RC rc = child_->get_value(tuple, value); + RC rc = child_->get_value(tuple, value); if (rc != RC::SUCCESS) { return rc; } @@ -102,7 +102,7 @@ RC CastExpr::get_value(const Tuple &tuple, Value &result) const RC CastExpr::try_get_value(Value &result) const { Value value; - RC rc = child_->try_get_value(value); + RC rc = child_->try_get_value(value); if (rc != RC::SUCCESS) { return rc; } @@ -180,8 +180,8 @@ RC ComparisonExpr::compare_value(const Value &left, const Value &right, bool &re RC ComparisonExpr::try_get_value(Value &cell) const { if (left_->type() == ExprType::VALUE && right_->type() == ExprType::VALUE) { - ValueExpr * left_value_expr = static_cast(left_.get()); - ValueExpr * right_value_expr = static_cast(right_.get()); + ValueExpr *left_value_expr = static_cast(left_.get()); + ValueExpr *right_value_expr = static_cast(right_.get()); const Value &left_cell = left_value_expr->get_value(); const Value &right_cell = right_value_expr->get_value(); diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 936c1afd..65f31259 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -66,7 +66,7 @@ enum class ExprType class Expression { public: - Expression() = default; + Expression() = default; virtual ~Expression() = default; /** @@ -140,8 +140,8 @@ class Expression class StarExpr : public Expression { public: - StarExpr() : table_name_() {} - StarExpr(const char *table_name) : table_name_(table_name) {} + StarExpr() : table_name_() {} + StarExpr(const char *table_name) : table_name_(table_name) {} virtual ~StarExpr() = default; ExprType type() const override { return ExprType::STAR; } @@ -218,7 +218,7 @@ class FieldExpr : public Expression class ValueExpr : public Expression { public: - ValueExpr() = default; + ValueExpr() = default; explicit ValueExpr(const Value &value) : value_(value) {} virtual ~ValueExpr() = default; @@ -251,7 +251,7 @@ class ValueExpr : public Expression class CastExpr : public Expression { public: - CastExpr(std::unique_ptr child, AttrType cast_type); + CastExpr(std::unique_ptr child, AttrType cast_type); virtual ~CastExpr(); ExprType type() const override { return ExprType::CAST; } @@ -279,7 +279,7 @@ class CastExpr : public Expression class ComparisonExpr : public Expression { public: - ComparisonExpr(CompOp comp, std::unique_ptr left, std::unique_ptr right); + ComparisonExpr(CompOp comp, std::unique_ptr left, std::unique_ptr right); virtual ~ComparisonExpr(); ExprType type() const override { return ExprType::COMPARISON; } @@ -333,7 +333,7 @@ class ConjunctionExpr : public Expression }; public: - ConjunctionExpr(Type type, std::vector> &children); + ConjunctionExpr(Type type, std::vector> &children); virtual ~ConjunctionExpr() = default; ExprType type() const override { return ExprType::CONJUNCTION; } @@ -366,8 +366,8 @@ class ArithmeticExpr : public Expression }; public: - ArithmeticExpr(Type type, Expression *left, Expression *right); - ArithmeticExpr(Type type, std::unique_ptr left, std::unique_ptr right); + ArithmeticExpr(Type type, Expression *left, Expression *right); + ArithmeticExpr(Type type, std::unique_ptr left, std::unique_ptr right); virtual ~ArithmeticExpr() = default; bool equal(const Expression &other) const override; @@ -410,8 +410,8 @@ class ArithmeticExpr : public Expression class UnboundAggregateExpr : public Expression { public: - UnboundAggregateExpr(const char *aggregate_name, Expression *child); - UnboundAggregateExpr(const char *aggregate_name, std::unique_ptr child); + UnboundAggregateExpr(const char *aggregate_name, Expression *child); + UnboundAggregateExpr(const char *aggregate_name, std::unique_ptr child); virtual ~UnboundAggregateExpr() = default; ExprType type() const override { return ExprType::UNBOUND_AGGREGATION; } diff --git a/src/observer/sql/expr/expression_iterator.cpp b/src/observer/sql/expr/expression_iterator.cpp index ca8cd6d5..64fb0d73 100644 --- a/src/observer/sql/expr/expression_iterator.cpp +++ b/src/observer/sql/expr/expression_iterator.cpp @@ -25,13 +25,13 @@ RC ExpressionIterator::iterate_child_expr(Expression &expr, function(expr); - rc = callback(cast_expr.child()); + rc = callback(cast_expr.child()); } break; case ExprType::COMPARISON: { auto &comparison_expr = static_cast(expr); - rc = callback(comparison_expr.left()); + rc = callback(comparison_expr.left()); if (OB_SUCC(rc)) { rc = callback(comparison_expr.right()); @@ -52,7 +52,7 @@ RC ExpressionIterator::iterate_child_expr(Expression &expr, function(expr); - rc = callback(arithmetic_expr.left()); + rc = callback(arithmetic_expr.left()); if (OB_SUCC(rc)) { rc = callback(arithmetic_expr.right()); } @@ -60,7 +60,7 @@ RC ExpressionIterator::iterate_child_expr(Expression &expr, function(expr); - rc = callback(aggregate_expr.child()); + rc = callback(aggregate_expr.child()); } break; case ExprType::NONE: diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index d67ebe43..6d63d36e 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -69,7 +69,7 @@ class TupleSchema class Tuple { public: - Tuple() = default; + Tuple() = default; virtual ~Tuple() = default; /** @@ -162,7 +162,7 @@ class Tuple class RowTuple : public Tuple { public: - RowTuple() = default; + RowTuple() = default; virtual ~RowTuple() { for (FieldExpr *spec : speces_) { @@ -264,7 +264,7 @@ class RowTuple : public Tuple class ProjectTuple : public Tuple { public: - ProjectTuple() = default; + ProjectTuple() = default; virtual ~ProjectTuple() = default; void set_expressions(std::vector> &&expressions) @@ -322,7 +322,7 @@ class ProjectTuple : public Tuple class ValueListTuple : public Tuple { public: - ValueListTuple() = default; + ValueListTuple() = default; virtual ~ValueListTuple() = default; void set_names(const std::vector &specs) { specs_ = specs; } @@ -400,7 +400,7 @@ class ValueListTuple : public Tuple class JoinedTuple : public Tuple { public: - JoinedTuple() = default; + JoinedTuple() = default; virtual ~JoinedTuple() = default; void set_left(Tuple *left) { left_ = left; } diff --git a/src/observer/sql/expr/tuple_cell.cpp b/src/observer/sql/expr/tuple_cell.cpp index 4646643d..c0f111d5 100644 --- a/src/observer/sql/expr/tuple_cell.cpp +++ b/src/observer/sql/expr/tuple_cell.cpp @@ -43,5 +43,4 @@ TupleCellSpec::TupleCellSpec(const char *alias) } } -TupleCellSpec::TupleCellSpec(const string &alias) : alias_(alias) -{} +TupleCellSpec::TupleCellSpec(const string &alias) : alias_(alias) {} diff --git a/src/observer/sql/operator/aggregate_vec_physical_operator.cpp b/src/observer/sql/operator/aggregate_vec_physical_operator.cpp index 710c6472..8652f5b7 100644 --- a/src/observer/sql/operator/aggregate_vec_physical_operator.cpp +++ b/src/observer/sql/operator/aggregate_vec_physical_operator.cpp @@ -24,7 +24,7 @@ AggregateVecPhysicalOperator::AggregateVecPhysicalOperator(vector value_expressions_.reserve(aggregate_expressions_.size()); ranges::for_each(aggregate_expressions_, [this](Expression *expr) { - auto * aggregate_expr = static_cast(expr); + auto *aggregate_expr = static_cast(expr); Expression *child_expr = aggregate_expr->child().get(); ASSERT(child_expr != nullptr, "aggregation expression must have a child expression"); value_expressions_.emplace_back(child_expr); @@ -94,7 +94,7 @@ template void AggregateVecPhysicalOperator::update_aggregate_state(void *state, const Column &column) { STATE *state_ptr = reinterpret_cast(state); - T * data = (T *)column.data(); + T *data = (T *)column.data(); state_ptr->update(data, column.count()); } diff --git a/src/observer/sql/operator/delete_physical_operator.cpp b/src/observer/sql/operator/delete_physical_operator.cpp index aaf34dfe..944586da 100644 --- a/src/observer/sql/operator/delete_physical_operator.cpp +++ b/src/observer/sql/operator/delete_physical_operator.cpp @@ -60,12 +60,6 @@ RC DeletePhysicalOperator::open(Trx *trx) return RC::SUCCESS; } -RC DeletePhysicalOperator::next() -{ - return RC::RECORD_EOF; -} +RC DeletePhysicalOperator::next() { return RC::RECORD_EOF; } -RC DeletePhysicalOperator::close() -{ - return RC::SUCCESS; -} +RC DeletePhysicalOperator::close() { return RC::SUCCESS; } diff --git a/src/observer/sql/operator/explain_physical_operator.cpp b/src/observer/sql/operator/explain_physical_operator.cpp index da557370..0508e271 100644 --- a/src/observer/sql/operator/explain_physical_operator.cpp +++ b/src/observer/sql/operator/explain_physical_operator.cpp @@ -66,8 +66,8 @@ RC ExplainPhysicalOperator::next(Chunk &chunk) } generate_physical_plan(); - Value cell(physical_plan_.c_str()); - auto column = make_unique(); + Value cell(physical_plan_.c_str()); + auto column = make_unique(); column->init(cell); chunk.add_column(std::move(column), 0); return RC::SUCCESS; diff --git a/src/observer/sql/operator/group_by_logical_operator.cpp b/src/observer/sql/operator/group_by_logical_operator.cpp index c35bbf91..29e88fc7 100644 --- a/src/observer/sql/operator/group_by_logical_operator.cpp +++ b/src/observer/sql/operator/group_by_logical_operator.cpp @@ -20,9 +20,9 @@ See the Mulan PSL v2 for more details. */ using namespace std; -GroupByLogicalOperator::GroupByLogicalOperator(vector> &&group_by_exprs, - vector &&expressions) +GroupByLogicalOperator::GroupByLogicalOperator( + vector> &&group_by_exprs, vector &&expressions) { - group_by_expressions_ = std::move(group_by_exprs); + group_by_expressions_ = std::move(group_by_exprs); aggregate_expressions_ = std::move(expressions); } \ No newline at end of file diff --git a/src/observer/sql/operator/group_by_vec_physical_operator.h b/src/observer/sql/operator/group_by_vec_physical_operator.h index e78469b4..3b2ee206 100644 --- a/src/observer/sql/operator/group_by_vec_physical_operator.h +++ b/src/observer/sql/operator/group_by_vec_physical_operator.h @@ -21,7 +21,7 @@ class GroupByVecPhysicalOperator : public PhysicalOperator { public: GroupByVecPhysicalOperator( - std::vector> &&group_by_exprs, std::vector &&expressions){}; + std::vector> &&group_by_exprs, std::vector &&expressions) {}; virtual ~GroupByVecPhysicalOperator() = default; diff --git a/src/observer/sql/operator/hash_group_by_physical_operator.cpp b/src/observer/sql/operator/hash_group_by_physical_operator.cpp index f408c0ec..dbda6008 100644 --- a/src/observer/sql/operator/hash_group_by_physical_operator.cpp +++ b/src/observer/sql/operator/hash_group_by_physical_operator.cpp @@ -23,8 +23,7 @@ using namespace common; HashGroupByPhysicalOperator::HashGroupByPhysicalOperator( vector> &&group_by_exprs, vector &&expressions) : GroupByPhysicalOperator(std::move(expressions)), group_by_exprs_(std::move(group_by_exprs)) -{ -} +{} RC HashGroupByPhysicalOperator::open(Trx *trx) { @@ -61,7 +60,7 @@ RC HashGroupByPhysicalOperator::open(Trx *trx) // 计算聚合值 GroupValueType &group_value = get<1>(*found_group); - rc = aggregate(get<0>(group_value), group_value_expression_tuple); + rc = aggregate(get<0>(group_value), group_value_expression_tuple); if (OB_FAIL(rc)) { LOG_WARN("failed to aggregate values. rc=%s", strrc(rc)); return rc; @@ -80,7 +79,7 @@ RC HashGroupByPhysicalOperator::open(Trx *trx) // 得到最终聚合后的值 for (GroupType &group : groups_) { GroupValueType &group_value = get<1>(group); - rc = evaluate(group_value); + rc = evaluate(group_value); if (OB_FAIL(rc)) { LOG_WARN("failed to evaluate group value. rc=%s", strrc(rc)); return rc; @@ -170,8 +169,8 @@ RC HashGroupByPhysicalOperator::find_group(const Tuple &child_tuple, GroupType * CompositeTuple composite_tuple; composite_tuple.add_tuple(make_unique(std::move(child_tuple_to_value))); - groups_.emplace_back(std::move(group_by_evaluated_tuple), - GroupValueType(std::move(aggregator_list), std::move(composite_tuple))); + groups_.emplace_back( + std::move(group_by_evaluated_tuple), GroupValueType(std::move(aggregator_list), std::move(composite_tuple))); found_group = &groups_.back(); } diff --git a/src/observer/sql/operator/index_scan_physical_operator.cpp b/src/observer/sql/operator/index_scan_physical_operator.cpp index 51bed88f..38483095 100644 --- a/src/observer/sql/operator/index_scan_physical_operator.cpp +++ b/src/observer/sql/operator/index_scan_physical_operator.cpp @@ -16,13 +16,9 @@ See the Mulan PSL v2 for more details. */ #include "storage/index/index.h" #include "storage/trx/trx.h" -IndexScanPhysicalOperator::IndexScanPhysicalOperator(Table *table, Index *index, ReadWriteMode mode, const Value *left_value, - bool left_inclusive, const Value *right_value, bool right_inclusive) - : table_(table), - index_(index), - mode_(mode), - left_inclusive_(left_inclusive), - right_inclusive_(right_inclusive) +IndexScanPhysicalOperator::IndexScanPhysicalOperator(Table *table, Index *index, ReadWriteMode mode, + const Value *left_value, bool left_inclusive, const Value *right_value, bool right_inclusive) + : table_(table), index_(index), mode_(mode), left_inclusive_(left_inclusive), right_inclusive_(right_inclusive) { if (left_value) { left_value_ = *left_value; diff --git a/src/observer/sql/operator/insert_logical_operator.h b/src/observer/sql/operator/insert_logical_operator.h index c8a5db13..60231f52 100644 --- a/src/observer/sql/operator/insert_logical_operator.h +++ b/src/observer/sql/operator/insert_logical_operator.h @@ -26,7 +26,7 @@ See the Mulan PSL v2 for more details. */ class InsertLogicalOperator : public LogicalOperator { public: - InsertLogicalOperator(Table *table, const std::vector> &); + InsertLogicalOperator(Table *table, const std::vector> &); ~InsertLogicalOperator() override = default; LogicalOperatorType type() const override { return LogicalOperatorType::INSERT; } diff --git a/src/observer/sql/operator/insert_physical_operator.h b/src/observer/sql/operator/insert_physical_operator.h index 32750c03..c5332104 100644 --- a/src/observer/sql/operator/insert_physical_operator.h +++ b/src/observer/sql/operator/insert_physical_operator.h @@ -40,6 +40,6 @@ class InsertPhysicalOperator : public PhysicalOperator Tuple *current_tuple() override { return nullptr; } private: - Table *table_ = nullptr; + Table *table_ = nullptr; const std::vector> &values_list_; }; diff --git a/src/observer/sql/operator/logical_operator.cpp b/src/observer/sql/operator/logical_operator.cpp index d11d6fd1..502872bd 100644 --- a/src/observer/sql/operator/logical_operator.cpp +++ b/src/observer/sql/operator/logical_operator.cpp @@ -19,19 +19,13 @@ LogicalOperator::~LogicalOperator() {} void LogicalOperator::add_child(std::unique_ptr oper) { children_.emplace_back(std::move(oper)); } bool LogicalOperator::can_generate_vectorized_operator(const LogicalOperatorType &type) { - bool bool_ret = false; - switch (type) - { + bool bool_ret = false; + switch (type) { case LogicalOperatorType::CALC: case LogicalOperatorType::DELETE: - case LogicalOperatorType::INSERT: - bool_ret = false; - break; - - default: - bool_ret = true; - break; - } - return bool_ret; -} + case LogicalOperatorType::INSERT: bool_ret = false; break; + default: bool_ret = true; break; + } + return bool_ret; +} diff --git a/src/observer/sql/operator/predicate_physical_operator.cpp b/src/observer/sql/operator/predicate_physical_operator.cpp index 61b56445..fd410a28 100644 --- a/src/observer/sql/operator/predicate_physical_operator.cpp +++ b/src/observer/sql/operator/predicate_physical_operator.cpp @@ -67,7 +67,4 @@ RC PredicatePhysicalOperator::close() Tuple *PredicatePhysicalOperator::current_tuple() { return children_[0]->current_tuple(); } -RC PredicatePhysicalOperator::tuple_schema(TupleSchema &schema) const -{ - return children_[0]->tuple_schema(schema); -} +RC PredicatePhysicalOperator::tuple_schema(TupleSchema &schema) const { return children_[0]->tuple_schema(schema); } diff --git a/src/observer/sql/operator/scalar_group_by_physical_operator.cpp b/src/observer/sql/operator/scalar_group_by_physical_operator.cpp index b67e9f16..5f3c6fbb 100644 --- a/src/observer/sql/operator/scalar_group_by_physical_operator.cpp +++ b/src/observer/sql/operator/scalar_group_by_physical_operator.cpp @@ -65,7 +65,7 @@ RC ScalarGroupByPhysicalOperator::open(Trx *trx) composite_tuple.add_tuple(make_unique(std::move(child_tuple_to_value))); group_value_ = make_unique(std::move(aggregator_list), std::move(composite_tuple)); } - + rc = aggregate(get<0>(*group_value_), group_value_expression_tuple); if (OB_FAIL(rc)) { LOG_WARN("failed to aggregate values. rc=%s", strrc(rc)); diff --git a/src/observer/sql/operator/table_get_logical_operator.cpp b/src/observer/sql/operator/table_get_logical_operator.cpp index 6933c0cd..c4f331be 100644 --- a/src/observer/sql/operator/table_get_logical_operator.cpp +++ b/src/observer/sql/operator/table_get_logical_operator.cpp @@ -14,9 +14,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/table_get_logical_operator.h" -TableGetLogicalOperator::TableGetLogicalOperator(Table *table, ReadWriteMode mode) - : table_(table), mode_(mode) -{} +TableGetLogicalOperator::TableGetLogicalOperator(Table *table, ReadWriteMode mode) : table_(table), mode_(mode) {} void TableGetLogicalOperator::set_predicates(std::vector> &&exprs) { diff --git a/src/observer/sql/operator/table_scan_physical_operator.cpp b/src/observer/sql/operator/table_scan_physical_operator.cpp index c7eabaaa..210e46ae 100644 --- a/src/observer/sql/operator/table_scan_physical_operator.cpp +++ b/src/observer/sql/operator/table_scan_physical_operator.cpp @@ -35,7 +35,7 @@ RC TableScanPhysicalOperator::next() bool filter_result = false; while (OB_SUCC(rc = record_scanner_.next(current_record_))) { LOG_TRACE("got a record. rid=%s", current_record_.rid().to_string().c_str()); - + tuple_.set_record(¤t_record_); rc = filter(tuple_, filter_result); if (rc != RC::SUCCESS) { diff --git a/src/observer/sql/operator/update_logical_operator.h b/src/observer/sql/operator/update_logical_operator.h index ab48f17f..c354d89a 100644 --- a/src/observer/sql/operator/update_logical_operator.h +++ b/src/observer/sql/operator/update_logical_operator.h @@ -22,7 +22,7 @@ class UpdateLogicalOperator : public LogicalOperator { public: explicit UpdateLogicalOperator(Table *table, std::vector field_metas, std::vector values); - ~ UpdateLogicalOperator() override = default; + ~UpdateLogicalOperator() override = default; LogicalOperatorType type() const override { return LogicalOperatorType::UPDATE; } Table *table() const { return table_; } diff --git a/src/observer/sql/operator/update_physical_operator.h b/src/observer/sql/operator/update_physical_operator.h index 1dc41b53..1ee5787e 100644 --- a/src/observer/sql/operator/update_physical_operator.h +++ b/src/observer/sql/operator/update_physical_operator.h @@ -45,5 +45,5 @@ class UpdatePhysicalOperator : public PhysicalOperator Table *table_ = nullptr; std::vector field_metas_; std::vector values_; - std::vector records_; + std::vector records_; }; diff --git a/src/observer/sql/optimizer/conjunction_simplification_rule.cpp b/src/observer/sql/optimizer/conjunction_simplification_rule.cpp index d60a1b55..f410d5e7 100644 --- a/src/observer/sql/optimizer/conjunction_simplification_rule.cpp +++ b/src/observer/sql/optimizer/conjunction_simplification_rule.cpp @@ -32,17 +32,17 @@ RC ConjunctionSimplificationRule::rewrite(std::unique_ptr &expr, boo return rc; } - change_made = false; - auto conjunction_expr = static_cast(expr.get()); + change_made = false; + auto conjunction_expr = static_cast(expr.get()); - std::vector> &child_exprs = conjunction_expr->children(); + std::vector> &child_exprs = conjunction_expr->children(); // 先看看有没有能够直接去掉的表达式。比如AND时恒为true的表达式可以删除 // 或者是否可以直接计算出当前表达式的值。比如AND时,如果有一个表达式为false,那么整个表达式就是false for (auto iter = child_exprs.begin(); iter != child_exprs.end();) { bool constant_value = false; - rc = try_to_get_bool_constant(*iter, constant_value); + rc = try_to_get_bool_constant(*iter, constant_value); if (rc != RC::SUCCESS) { rc = RC::SUCCESS; ++iter; diff --git a/src/observer/sql/optimizer/expression_rewriter.cpp b/src/observer/sql/optimizer/expression_rewriter.cpp index b0c6d245..7b9a0da0 100644 --- a/src/observer/sql/optimizer/expression_rewriter.cpp +++ b/src/observer/sql/optimizer/expression_rewriter.cpp @@ -69,7 +69,7 @@ RC ExpressionRewriter::rewrite_expression(unique_ptr &expr, bool &ch for (unique_ptr &rule : expr_rewrite_rules_) { bool sub_change_made = false; - rc = rule->rewrite(expr, sub_change_made); + rc = rule->rewrite(expr, sub_change_made); if (sub_change_made && !change_made) { change_made = true; } @@ -91,25 +91,25 @@ RC ExpressionRewriter::rewrite_expression(unique_ptr &expr, bool &ch case ExprType::CAST: { unique_ptr &child_expr = (static_cast(expr.get()))->child(); - rc = rewrite_expression(child_expr, change_made); + rc = rewrite_expression(child_expr, change_made); } break; case ExprType::COMPARISON: { - auto comparison_expr = static_cast(expr.get()); + auto comparison_expr = static_cast(expr.get()); - unique_ptr &left_expr = comparison_expr->left(); - unique_ptr &right_expr = comparison_expr->right(); + unique_ptr &left_expr = comparison_expr->left(); + unique_ptr &right_expr = comparison_expr->right(); bool left_change_made = false; - rc = rewrite_expression(left_expr, left_change_made); + rc = rewrite_expression(left_expr, left_change_made); if (rc != RC::SUCCESS) { return rc; } bool right_change_made = false; - rc = rewrite_expression(right_expr, right_change_made); + rc = rewrite_expression(right_expr, right_change_made); if (rc != RC::SUCCESS) { return rc; } @@ -120,13 +120,13 @@ RC ExpressionRewriter::rewrite_expression(unique_ptr &expr, bool &ch } break; case ExprType::CONJUNCTION: { - auto conjunction_expr = static_cast(expr.get()); + auto conjunction_expr = static_cast(expr.get()); - vector> &children = conjunction_expr->children(); + vector> &children = conjunction_expr->children(); for (unique_ptr &child_expr : children) { bool sub_change_made = false; - rc = rewrite_expression(child_expr, sub_change_made); + rc = rewrite_expression(child_expr, sub_change_made); if (rc != RC::SUCCESS) { LOG_WARN("failed to rewriter conjunction sub expression. rc=%s", strrc(rc)); diff --git a/src/observer/sql/optimizer/predicate_pushdown_rewriter.cpp b/src/observer/sql/optimizer/predicate_pushdown_rewriter.cpp index 342218f7..1725e6e1 100644 --- a/src/observer/sql/optimizer/predicate_pushdown_rewriter.cpp +++ b/src/observer/sql/optimizer/predicate_pushdown_rewriter.cpp @@ -119,7 +119,7 @@ RC PredicatePushdownRewriter::get_exprs_can_pushdown( } } else if (expr->type() == ExprType::COMPARISON) { // 如果是比较操作,并且比较的左边或右边是表某个列值,那么就下推下去 - auto comparison_expr = static_cast(expr.get()); + auto comparison_expr = static_cast(expr.get()); std::unique_ptr &left_expr = comparison_expr->left(); std::unique_ptr &right_expr = comparison_expr->right(); diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index b3ce4fb3..73f77421 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -21,7 +21,7 @@ See the Mulan PSL v2 for more details. */ class BinderContext { public: - BinderContext() = default; + BinderContext() = default; virtual ~BinderContext() = default; void add_table(Table *table) { query_tables_.push_back(table); } @@ -74,6 +74,6 @@ class ExpressionBinder std::unique_ptr &aggregate_expr, std::vector> &bound_expressions); private: - bool multi_tables_; + bool multi_tables_; BinderContext &context_; }; diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index edbf1b14..fdb66b11 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,23 +8,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -77,62 +75,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -156,12 +154,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -189,7 +187,7 @@ typedef void* yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_NEW_FILE yyrestart(yyin, yyscanner) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -207,7 +205,7 @@ typedef void* yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -222,88 +220,85 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - + +#define YY_LESS_LINENO(n) +#define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } while (0) +#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - - }; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -312,59 +307,55 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) +#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner); +static void yy_load_buffer_state(yyscan_t yyscanner); +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -372,296 +363,2250 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state(yyscan_t yyscanner); +static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); +static int yy_get_next_buffer(yyscan_t yyscanner); +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t)(yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 70 #define YY_END_OF_BUFFER 71 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[206] = - { 0, - 0, 0, 0, 0, 71, 69, 1, 2, 69, 69, - 69, 49, 50, 65, 63, 51, 64, 6, 66, 3, - 5, 56, 52, 58, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 70, 55, 0, 67, 0, 68, - 3, 0, 53, 54, 57, 62, 62, 62, 44, 62, - 43, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 60, 62, 62, 62, 62, - 62, 15, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 4, 22, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 32, 62, 62, 62, 59, 62, 62, - 62, 28, 62, 62, 62, 62, 62, 62, 62, 62, - 19, 33, 62, 62, 39, 35, 62, 9, 11, 7, - 62, 62, 62, 20, 62, 8, 62, 62, 62, 62, - 24, 48, 61, 38, 36, 62, 62, 16, 62, 17, - 62, 62, 62, 62, 29, 62, 62, 62, 62, 34, - 62, 42, 14, 62, 47, 62, 62, 62, 62, 62, - 12, 62, 62, 21, 30, 10, 26, 62, 46, 40, - 23, 62, 62, 18, 62, 13, 27, 25, 41, 62, - - 62, 45, 37, 31, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, - 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 36, - 1, 1, 1, 1, 36, 1, 45, 46, 47, 48, - - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 36, 61, 62, 63, 64, 65, 66, 67, - 68, 36, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[69] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2 - } ; - -static const flex_int16_t yy_base[211] = - { 0, - 0, 0, 0, 0, 551, 552, 552, 552, 532, 537, - 535, 552, 552, 552, 552, 552, 525, 552, 552, 56, - 552, 54, 552, 521, 55, 59, 60, 61, 64, 89, - 63, 62, 76, 81, 523, 101, 103, 113, 110, 134, - 121, 117, 127, 124, 552, 552, 532, 552, 530, 552, - 69, 519, 552, 552, 552, 0, 518, 140, 515, 138, - 514, 144, 150, 142, 166, 141, 167, 153, 178, 169, - 164, 176, 177, 193, 235, 513, 179, 204, 194, 181, - 206, 510, 211, 215, 207, 218, 212, 236, 232, 225, - 260, 509, 508, 233, 254, 228, 264, 272, 275, 276, - - 288, 273, 279, 291, 287, 296, 297, 298, 299, 312, - 311, 316, 322, 289, 330, 326, 328, 507, 329, 337, - 334, 506, 315, 340, 351, 341, 354, 352, 363, 369, - 505, 504, 367, 355, 502, 499, 365, 496, 491, 488, - 376, 371, 388, 484, 372, 483, 374, 375, 398, 399, - 481, 462, 414, 411, 410, 394, 390, 404, 423, 396, - 424, 407, 427, 429, 364, 408, 430, 434, 435, 304, - 441, 301, 300, 437, 290, 442, 451, 447, 450, 449, - 469, 467, 470, 257, 249, 248, 238, 454, 203, 202, - 201, 459, 479, 170, 478, 118, 115, 87, 86, 494, - - 480, 84, 80, 77, 552, 543, 545, 547, 88, 87 - } ; - -static const flex_int16_t yy_def[211] = - { 0, - 205, 1, 206, 206, 205, 205, 205, 205, 205, 207, - 208, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 205, 205, 207, 205, 208, 205, - 205, 205, 205, 205, 205, 210, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 205, 209, 209, 209, 209, 209, 209, 209, 209, - - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - - 209, 209, 209, 209, 0, 205, 205, 205, 205, 205 - } ; - -static const flex_int16_t yy_nxt[621] = - { 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, - 43, 44, 35, 35, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 35, 37, 38, 35, - 39, 40, 41, 42, 43, 44, 35, 35, 52, 56, - 51, 53, 54, 56, 56, 56, 56, 56, 56, 62, - 66, 52, 60, 51, 67, 74, 63, 58, 56, 57, - 56, 56, 59, 64, 56, 56, 65, 68, 56, 73, - - 56, 56, 61, 56, 62, 66, 69, 60, 75, 67, - 74, 63, 58, 76, 77, 56, 59, 56, 64, 70, - 65, 68, 71, 73, 56, 72, 61, 56, 78, 56, - 69, 56, 56, 75, 79, 56, 80, 76, 56, 77, - 88, 56, 81, 83, 70, 82, 90, 71, 56, 72, - 91, 89, 56, 78, 56, 56, 56, 84, 56, 79, - 85, 80, 93, 94, 56, 88, 81, 56, 83, 96, - 82, 90, 86, 97, 95, 91, 89, 87, 56, 99, - 56, 56, 84, 56, 56, 85, 102, 93, 94, 98, - 56, 56, 56, 56, 96, 56, 86, 100, 97, 95, - - 106, 87, 105, 99, 101, 103, 115, 56, 56, 107, - 108, 102, 104, 117, 98, 56, 56, 56, 56, 118, - 56, 56, 100, 109, 106, 56, 56, 105, 101, 56, - 103, 115, 56, 116, 107, 108, 119, 104, 117, 56, - 123, 120, 56, 118, 125, 121, 56, 56, 109, 56, - 56, 124, 56, 122, 127, 128, 126, 110, 116, 111, - 130, 119, 56, 56, 132, 123, 120, 112, 56, 125, - 121, 56, 113, 114, 56, 131, 124, 122, 56, 127, - 128, 126, 110, 129, 111, 130, 56, 56, 132, 56, - 56, 134, 112, 56, 135, 133, 113, 114, 136, 137, - - 131, 56, 56, 56, 56, 56, 142, 139, 129, 138, - 56, 56, 56, 56, 56, 56, 134, 140, 56, 135, - 133, 141, 151, 136, 137, 56, 56, 143, 144, 56, - 56, 142, 139, 146, 138, 147, 56, 145, 148, 149, - 56, 140, 56, 56, 56, 150, 141, 151, 56, 153, - 154, 56, 143, 144, 56, 56, 158, 157, 146, 155, - 147, 145, 152, 148, 149, 56, 56, 156, 56, 56, - 150, 161, 160, 162, 153, 154, 159, 56, 56, 56, - 158, 56, 157, 56, 155, 56, 56, 152, 56, 56, - 56, 163, 156, 167, 166, 169, 161, 160, 162, 164, - - 159, 165, 56, 168, 56, 174, 172, 171, 56, 170, - 56, 179, 56, 56, 178, 163, 173, 167, 56, 166, - 169, 56, 56, 164, 56, 56, 165, 168, 56, 177, - 174, 172, 171, 170, 175, 176, 179, 56, 56, 178, - 173, 56, 180, 56, 56, 182, 185, 181, 56, 56, - 183, 56, 184, 186, 177, 56, 56, 187, 175, 176, - 190, 56, 188, 56, 56, 56, 193, 180, 56, 182, - 185, 192, 181, 56, 195, 183, 56, 184, 186, 189, - 191, 56, 187, 56, 56, 190, 199, 188, 194, 200, - 197, 193, 56, 56, 56, 56, 192, 56, 56, 195, - - 201, 202, 56, 189, 191, 56, 196, 198, 56, 204, - 56, 199, 194, 56, 200, 197, 56, 203, 56, 56, - 56, 56, 56, 92, 56, 201, 202, 56, 56, 56, - 196, 198, 56, 92, 204, 50, 48, 56, 55, 51, - 50, 48, 203, 45, 45, 47, 47, 49, 49, 46, - 205, 5, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205 - } ; - -static const flex_int16_t yy_chk[621] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, - 20, 22, 22, 26, 27, 28, 32, 31, 29, 27, - 28, 51, 26, 51, 28, 32, 27, 25, 210, 209, - 33, 204, 25, 27, 203, 34, 27, 28, 202, 31, - - 199, 198, 26, 30, 27, 28, 29, 26, 33, 28, - 32, 27, 25, 33, 34, 36, 25, 37, 27, 30, - 27, 28, 30, 31, 39, 30, 26, 38, 36, 197, - 29, 42, 196, 33, 36, 41, 37, 33, 44, 34, - 41, 43, 37, 39, 30, 38, 43, 30, 40, 30, - 44, 42, 60, 36, 58, 66, 64, 40, 62, 36, - 40, 37, 58, 60, 63, 41, 37, 68, 39, 63, - 38, 43, 40, 64, 62, 44, 42, 40, 71, 66, - 65, 67, 40, 70, 194, 40, 68, 58, 60, 65, - 72, 73, 69, 77, 63, 80, 40, 67, 64, 62, - - 71, 40, 70, 66, 67, 69, 77, 74, 79, 72, - 73, 68, 69, 79, 65, 191, 190, 189, 78, 80, - 81, 85, 67, 74, 71, 83, 87, 70, 67, 84, - 69, 77, 86, 78, 72, 73, 81, 69, 79, 90, - 85, 83, 96, 80, 87, 84, 89, 94, 74, 75, - 88, 86, 187, 84, 89, 90, 88, 75, 78, 75, - 94, 81, 186, 185, 96, 85, 83, 75, 95, 87, - 84, 184, 75, 75, 91, 95, 86, 84, 97, 89, - 90, 88, 75, 91, 75, 94, 98, 102, 96, 99, - 100, 98, 75, 103, 99, 97, 75, 75, 99, 100, - - 95, 105, 101, 114, 175, 104, 105, 102, 91, 101, - 106, 107, 108, 109, 173, 172, 98, 103, 170, 99, - 97, 104, 114, 99, 100, 111, 110, 106, 107, 123, - 112, 105, 102, 109, 101, 110, 113, 108, 111, 112, - 116, 103, 117, 119, 115, 113, 104, 114, 121, 116, - 117, 120, 106, 107, 124, 126, 123, 121, 109, 119, - 110, 108, 115, 111, 112, 125, 128, 120, 127, 134, - 113, 126, 125, 127, 116, 117, 124, 129, 165, 137, - 123, 133, 121, 130, 119, 142, 145, 115, 147, 148, - 141, 128, 120, 134, 133, 141, 126, 125, 127, 129, - - 124, 130, 143, 137, 157, 148, 145, 143, 156, 142, - 160, 157, 149, 150, 156, 128, 147, 134, 158, 133, - 141, 162, 166, 129, 155, 154, 130, 137, 153, 155, - 148, 145, 143, 142, 149, 150, 157, 159, 161, 156, - 147, 163, 159, 164, 167, 162, 166, 161, 168, 169, - 163, 174, 164, 167, 155, 171, 176, 168, 149, 150, - 174, 178, 169, 180, 179, 177, 178, 159, 188, 162, - 166, 177, 161, 192, 180, 163, 152, 164, 167, 171, - 176, 182, 168, 181, 183, 174, 188, 169, 179, 192, - 182, 178, 195, 193, 201, 151, 177, 146, 144, 180, - - 193, 195, 140, 171, 176, 139, 181, 183, 200, 201, - 138, 188, 179, 136, 192, 182, 135, 200, 132, 131, - 122, 118, 93, 92, 82, 193, 195, 76, 61, 59, - 181, 183, 57, 52, 201, 49, 47, 35, 24, 17, - 11, 10, 200, 206, 206, 207, 207, 208, 208, 9, - 5, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205 - } ; +{ + flex_int32_t yy_verify; + flex_int32_t yy_nxt; +}; +static const flex_int16_t yy_accept[206] = {0, + 0, + 0, + 0, + 0, + 71, + 69, + 1, + 2, + 69, + 69, + 69, + 49, + 50, + 65, + 63, + 51, + 64, + 6, + 66, + 3, + 5, + 56, + 52, + 58, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 70, + 55, + 0, + 67, + 0, + 68, + 3, + 0, + 53, + 54, + 57, + 62, + 62, + 62, + 44, + 62, + 43, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 60, + 62, + 62, + 62, + 62, + 62, + 15, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 4, + 22, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 32, + 62, + 62, + 62, + 59, + 62, + 62, + 62, + 28, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 62, + 19, + 33, + 62, + 62, + 39, + 35, + 62, + 9, + 11, + 7, + 62, + 62, + 62, + 20, + 62, + 8, + 62, + 62, + 62, + 62, + 24, + 48, + 61, + 38, + 36, + 62, + 62, + 16, + 62, + 17, + 62, + 62, + 62, + 62, + 29, + 62, + 62, + 62, + 62, + 34, + 62, + 42, + 14, + 62, + 47, + 62, + 62, + 62, + 62, + 62, + 12, + 62, + 62, + 21, + 30, + 10, + 26, + 62, + 46, + 40, + 23, + 62, + 62, + 18, + 62, + 13, + 27, + 25, + 41, + 62, + + 62, + 45, + 37, + 31, + 0}; + +static const YY_CHAR yy_ec[256] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 3, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 4, + 5, + 1, + 1, + 1, + 1, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 1, + 16, + 17, + 18, + 19, + 1, + 1, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 36, + 1, + 1, + 1, + 1, + 36, + 1, + 45, + 46, + 47, + 48, + + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 36, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 36, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1}; + +static const YY_CHAR yy_meta[69] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2}; + +static const flex_int16_t yy_base[211] = {0, + 0, + 0, + 0, + 0, + 551, + 552, + 552, + 552, + 532, + 537, + 535, + 552, + 552, + 552, + 552, + 552, + 525, + 552, + 552, + 56, + 552, + 54, + 552, + 521, + 55, + 59, + 60, + 61, + 64, + 89, + 63, + 62, + 76, + 81, + 523, + 101, + 103, + 113, + 110, + 134, + 121, + 117, + 127, + 124, + 552, + 552, + 532, + 552, + 530, + 552, + 69, + 519, + 552, + 552, + 552, + 0, + 518, + 140, + 515, + 138, + 514, + 144, + 150, + 142, + 166, + 141, + 167, + 153, + 178, + 169, + 164, + 176, + 177, + 193, + 235, + 513, + 179, + 204, + 194, + 181, + 206, + 510, + 211, + 215, + 207, + 218, + 212, + 236, + 232, + 225, + 260, + 509, + 508, + 233, + 254, + 228, + 264, + 272, + 275, + 276, + + 288, + 273, + 279, + 291, + 287, + 296, + 297, + 298, + 299, + 312, + 311, + 316, + 322, + 289, + 330, + 326, + 328, + 507, + 329, + 337, + 334, + 506, + 315, + 340, + 351, + 341, + 354, + 352, + 363, + 369, + 505, + 504, + 367, + 355, + 502, + 499, + 365, + 496, + 491, + 488, + 376, + 371, + 388, + 484, + 372, + 483, + 374, + 375, + 398, + 399, + 481, + 462, + 414, + 411, + 410, + 394, + 390, + 404, + 423, + 396, + 424, + 407, + 427, + 429, + 364, + 408, + 430, + 434, + 435, + 304, + 441, + 301, + 300, + 437, + 290, + 442, + 451, + 447, + 450, + 449, + 469, + 467, + 470, + 257, + 249, + 248, + 238, + 454, + 203, + 202, + 201, + 459, + 479, + 170, + 478, + 118, + 115, + 87, + 86, + 494, + + 480, + 84, + 80, + 77, + 552, + 543, + 545, + 547, + 88, + 87}; + +static const flex_int16_t yy_def[211] = {0, + 205, + 1, + 206, + 206, + 205, + 205, + 205, + 205, + 205, + 207, + 208, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 205, + 205, + 207, + 205, + 208, + 205, + 205, + 205, + 205, + 205, + 205, + 210, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 205, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + 209, + + 209, + 209, + 209, + 209, + 0, + 205, + 205, + 205, + 205, + 205}; + +static const flex_int16_t yy_nxt[621] = {0, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 52, + 56, + 51, + 53, + 54, + 56, + 56, + 56, + 56, + 56, + 56, + 62, + 66, + 52, + 60, + 51, + 67, + 74, + 63, + 58, + 56, + 57, + 56, + 56, + 59, + 64, + 56, + 56, + 65, + 68, + 56, + 73, + + 56, + 56, + 61, + 56, + 62, + 66, + 69, + 60, + 75, + 67, + 74, + 63, + 58, + 76, + 77, + 56, + 59, + 56, + 64, + 70, + 65, + 68, + 71, + 73, + 56, + 72, + 61, + 56, + 78, + 56, + 69, + 56, + 56, + 75, + 79, + 56, + 80, + 76, + 56, + 77, + 88, + 56, + 81, + 83, + 70, + 82, + 90, + 71, + 56, + 72, + 91, + 89, + 56, + 78, + 56, + 56, + 56, + 84, + 56, + 79, + 85, + 80, + 93, + 94, + 56, + 88, + 81, + 56, + 83, + 96, + 82, + 90, + 86, + 97, + 95, + 91, + 89, + 87, + 56, + 99, + 56, + 56, + 84, + 56, + 56, + 85, + 102, + 93, + 94, + 98, + 56, + 56, + 56, + 56, + 96, + 56, + 86, + 100, + 97, + 95, + + 106, + 87, + 105, + 99, + 101, + 103, + 115, + 56, + 56, + 107, + 108, + 102, + 104, + 117, + 98, + 56, + 56, + 56, + 56, + 118, + 56, + 56, + 100, + 109, + 106, + 56, + 56, + 105, + 101, + 56, + 103, + 115, + 56, + 116, + 107, + 108, + 119, + 104, + 117, + 56, + 123, + 120, + 56, + 118, + 125, + 121, + 56, + 56, + 109, + 56, + 56, + 124, + 56, + 122, + 127, + 128, + 126, + 110, + 116, + 111, + 130, + 119, + 56, + 56, + 132, + 123, + 120, + 112, + 56, + 125, + 121, + 56, + 113, + 114, + 56, + 131, + 124, + 122, + 56, + 127, + 128, + 126, + 110, + 129, + 111, + 130, + 56, + 56, + 132, + 56, + 56, + 134, + 112, + 56, + 135, + 133, + 113, + 114, + 136, + 137, + + 131, + 56, + 56, + 56, + 56, + 56, + 142, + 139, + 129, + 138, + 56, + 56, + 56, + 56, + 56, + 56, + 134, + 140, + 56, + 135, + 133, + 141, + 151, + 136, + 137, + 56, + 56, + 143, + 144, + 56, + 56, + 142, + 139, + 146, + 138, + 147, + 56, + 145, + 148, + 149, + 56, + 140, + 56, + 56, + 56, + 150, + 141, + 151, + 56, + 153, + 154, + 56, + 143, + 144, + 56, + 56, + 158, + 157, + 146, + 155, + 147, + 145, + 152, + 148, + 149, + 56, + 56, + 156, + 56, + 56, + 150, + 161, + 160, + 162, + 153, + 154, + 159, + 56, + 56, + 56, + 158, + 56, + 157, + 56, + 155, + 56, + 56, + 152, + 56, + 56, + 56, + 163, + 156, + 167, + 166, + 169, + 161, + 160, + 162, + 164, + + 159, + 165, + 56, + 168, + 56, + 174, + 172, + 171, + 56, + 170, + 56, + 179, + 56, + 56, + 178, + 163, + 173, + 167, + 56, + 166, + 169, + 56, + 56, + 164, + 56, + 56, + 165, + 168, + 56, + 177, + 174, + 172, + 171, + 170, + 175, + 176, + 179, + 56, + 56, + 178, + 173, + 56, + 180, + 56, + 56, + 182, + 185, + 181, + 56, + 56, + 183, + 56, + 184, + 186, + 177, + 56, + 56, + 187, + 175, + 176, + 190, + 56, + 188, + 56, + 56, + 56, + 193, + 180, + 56, + 182, + 185, + 192, + 181, + 56, + 195, + 183, + 56, + 184, + 186, + 189, + 191, + 56, + 187, + 56, + 56, + 190, + 199, + 188, + 194, + 200, + 197, + 193, + 56, + 56, + 56, + 56, + 192, + 56, + 56, + 195, + + 201, + 202, + 56, + 189, + 191, + 56, + 196, + 198, + 56, + 204, + 56, + 199, + 194, + 56, + 200, + 197, + 56, + 203, + 56, + 56, + 56, + 56, + 56, + 92, + 56, + 201, + 202, + 56, + 56, + 56, + 196, + 198, + 56, + 92, + 204, + 50, + 48, + 56, + 55, + 51, + 50, + 48, + 203, + 45, + 45, + 47, + 47, + 49, + 49, + 46, + 205, + 5, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205}; + +static const flex_int16_t yy_chk[621] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 20, + 25, + 20, + 22, + 22, + 26, + 27, + 28, + 32, + 31, + 29, + 27, + 28, + 51, + 26, + 51, + 28, + 32, + 27, + 25, + 210, + 209, + 33, + 204, + 25, + 27, + 203, + 34, + 27, + 28, + 202, + 31, + + 199, + 198, + 26, + 30, + 27, + 28, + 29, + 26, + 33, + 28, + 32, + 27, + 25, + 33, + 34, + 36, + 25, + 37, + 27, + 30, + 27, + 28, + 30, + 31, + 39, + 30, + 26, + 38, + 36, + 197, + 29, + 42, + 196, + 33, + 36, + 41, + 37, + 33, + 44, + 34, + 41, + 43, + 37, + 39, + 30, + 38, + 43, + 30, + 40, + 30, + 44, + 42, + 60, + 36, + 58, + 66, + 64, + 40, + 62, + 36, + 40, + 37, + 58, + 60, + 63, + 41, + 37, + 68, + 39, + 63, + 38, + 43, + 40, + 64, + 62, + 44, + 42, + 40, + 71, + 66, + 65, + 67, + 40, + 70, + 194, + 40, + 68, + 58, + 60, + 65, + 72, + 73, + 69, + 77, + 63, + 80, + 40, + 67, + 64, + 62, + + 71, + 40, + 70, + 66, + 67, + 69, + 77, + 74, + 79, + 72, + 73, + 68, + 69, + 79, + 65, + 191, + 190, + 189, + 78, + 80, + 81, + 85, + 67, + 74, + 71, + 83, + 87, + 70, + 67, + 84, + 69, + 77, + 86, + 78, + 72, + 73, + 81, + 69, + 79, + 90, + 85, + 83, + 96, + 80, + 87, + 84, + 89, + 94, + 74, + 75, + 88, + 86, + 187, + 84, + 89, + 90, + 88, + 75, + 78, + 75, + 94, + 81, + 186, + 185, + 96, + 85, + 83, + 75, + 95, + 87, + 84, + 184, + 75, + 75, + 91, + 95, + 86, + 84, + 97, + 89, + 90, + 88, + 75, + 91, + 75, + 94, + 98, + 102, + 96, + 99, + 100, + 98, + 75, + 103, + 99, + 97, + 75, + 75, + 99, + 100, + + 95, + 105, + 101, + 114, + 175, + 104, + 105, + 102, + 91, + 101, + 106, + 107, + 108, + 109, + 173, + 172, + 98, + 103, + 170, + 99, + 97, + 104, + 114, + 99, + 100, + 111, + 110, + 106, + 107, + 123, + 112, + 105, + 102, + 109, + 101, + 110, + 113, + 108, + 111, + 112, + 116, + 103, + 117, + 119, + 115, + 113, + 104, + 114, + 121, + 116, + 117, + 120, + 106, + 107, + 124, + 126, + 123, + 121, + 109, + 119, + 110, + 108, + 115, + 111, + 112, + 125, + 128, + 120, + 127, + 134, + 113, + 126, + 125, + 127, + 116, + 117, + 124, + 129, + 165, + 137, + 123, + 133, + 121, + 130, + 119, + 142, + 145, + 115, + 147, + 148, + 141, + 128, + 120, + 134, + 133, + 141, + 126, + 125, + 127, + 129, + + 124, + 130, + 143, + 137, + 157, + 148, + 145, + 143, + 156, + 142, + 160, + 157, + 149, + 150, + 156, + 128, + 147, + 134, + 158, + 133, + 141, + 162, + 166, + 129, + 155, + 154, + 130, + 137, + 153, + 155, + 148, + 145, + 143, + 142, + 149, + 150, + 157, + 159, + 161, + 156, + 147, + 163, + 159, + 164, + 167, + 162, + 166, + 161, + 168, + 169, + 163, + 174, + 164, + 167, + 155, + 171, + 176, + 168, + 149, + 150, + 174, + 178, + 169, + 180, + 179, + 177, + 178, + 159, + 188, + 162, + 166, + 177, + 161, + 192, + 180, + 163, + 152, + 164, + 167, + 171, + 176, + 182, + 168, + 181, + 183, + 174, + 188, + 169, + 179, + 192, + 182, + 178, + 195, + 193, + 201, + 151, + 177, + 146, + 144, + 180, + + 193, + 195, + 140, + 171, + 176, + 139, + 181, + 183, + 200, + 201, + 138, + 188, + 179, + 136, + 192, + 182, + 135, + 200, + 132, + 131, + 122, + 118, + 93, + 92, + 82, + 193, + 195, + 76, + 61, + 59, + 181, + 183, + 57, + 52, + 201, + 49, + 47, + 35, + 24, + 17, + 11, + 10, + 200, + 206, + 206, + 207, + 207, + 208, + 208, + 9, + 5, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205, + 205}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -673,8 +2618,8 @@ static const flex_int16_t yy_chk[621] = #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -688,13 +2633,15 @@ static const flex_int16_t yy_chk[621] = #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#define RETURN_TOKEN(token) \ + LOG_DEBUG("%s", #token); \ + return token #line 698 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -723,124 +2670,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t - { +{ + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char *yy_last_accepting_cpos; - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; + int yylineno_r; + int yy_flex_debug_r; - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; + char *yytext_r; + int yy_more_flag; + int yy_more_len; - int yylineno_r; - int yy_flex_debug_r; + YYSTYPE *yylval_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + YYLTYPE *yylloc_r; - YYSTYPE * yylval_r; +}; /* end struct yyguts_t */ - YYLTYPE * yylloc_r; +static int yy_init_globals(yyscan_t yyscanner); - }; /* end struct yyguts_t */ +/* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ +#define yylval yyg->yylval_r -static int yy_init_globals ( yyscan_t yyscanner ); +#define yylloc yyg->yylloc_r - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); +static int yyinput(yyscan_t yyscanner); #else -static int input ( yyscan_t yyscanner ); +static int input(yyscan_t yyscanner); #endif #endif @@ -860,42 +2807,38 @@ static int input ( yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO \ + do { \ + if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ + } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ +#define YY_INPUT(buf, result, max_size) \ + if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ + int c = '*'; \ + yy_size_t n; \ + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ + buf[n] = (char)c; \ + if (c == '\n') \ + buf[n++] = (char)c; \ + if (c == EOF && ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + result = n; \ + } else { \ + errno = 0; \ + while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ + if (errno != EINTR) { \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + break; \ + } \ + errno = 0; \ + clearerr(yyin); \ + } \ + } #endif @@ -914,7 +2857,7 @@ static int input ( yyscan_t yyscanner ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -925,11 +2868,9 @@ static int input ( yyscan_t yyscanner ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -941,589 +2882,510 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK /*LINTED*/ break; #endif -#define YY_RULE_SETUP \ - YY_USER_ACTION +#define YY_RULE_SETUP YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; + if (!yyg->yy_init) { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ + if (!yyg->yy_start) + yyg->yy_start = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if (!yyin) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if (!yyout) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_load_buffer_state( yyscanner ); - } + yy_load_buffer_state(yyscanner); + } - { + { #line 75 "lex_sql.l" - #line 993 "lex_sql.cpp" - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 206 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 552 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP + while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_match: + do { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 206) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } while (yy_base[yy_current_state] != 552); + + yy_find_action: + yy_act = yy_accept[yy_current_state]; + if (yy_act == 0) { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + do_action: /* This label is used only to access EOF actions. */ + + switch (yy_act) { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + + case 1: YY_RULE_SETUP #line 77 "lex_sql.l" -// ignore whitespace - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP + // ignore whitespace + YY_BREAK + case 2: + /* rule 2 can match eol */ + YY_RULE_SETUP #line 78 "lex_sql.l" -; - YY_BREAK -case 3: -YY_RULE_SETUP + ; + YY_BREAK + case 3: YY_RULE_SETUP #line 80 "lex_sql.l" -yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); - YY_BREAK -case 4: -YY_RULE_SETUP + yylval->number = atoi(yytext); + RETURN_TOKEN(NUMBER); + YY_BREAK + case 4: YY_RULE_SETUP #line 81 "lex_sql.l" -yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); - YY_BREAK -case 5: -YY_RULE_SETUP + yylval->floats = (float)(atof(yytext)); + RETURN_TOKEN(FLOAT); + YY_BREAK + case 5: YY_RULE_SETUP #line 83 "lex_sql.l" -RETURN_TOKEN(SEMICOLON); - YY_BREAK -case 6: -YY_RULE_SETUP + RETURN_TOKEN(SEMICOLON); + YY_BREAK + case 6: YY_RULE_SETUP #line 84 "lex_sql.l" -RETURN_TOKEN(DOT); - YY_BREAK -case 7: -YY_RULE_SETUP + RETURN_TOKEN(DOT); + YY_BREAK + case 7: YY_RULE_SETUP #line 85 "lex_sql.l" -RETURN_TOKEN(EXIT); - YY_BREAK -case 8: -YY_RULE_SETUP + RETURN_TOKEN(EXIT); + YY_BREAK + case 8: YY_RULE_SETUP #line 86 "lex_sql.l" -RETURN_TOKEN(HELP); - YY_BREAK -case 9: -YY_RULE_SETUP + RETURN_TOKEN(HELP); + YY_BREAK + case 9: YY_RULE_SETUP #line 87 "lex_sql.l" -RETURN_TOKEN(DESC); - YY_BREAK -case 10: -YY_RULE_SETUP + RETURN_TOKEN(DESC); + YY_BREAK + case 10: YY_RULE_SETUP #line 88 "lex_sql.l" -RETURN_TOKEN(CREATE); - YY_BREAK -case 11: -YY_RULE_SETUP + RETURN_TOKEN(CREATE); + YY_BREAK + case 11: YY_RULE_SETUP #line 89 "lex_sql.l" -RETURN_TOKEN(DROP); - YY_BREAK -case 12: -YY_RULE_SETUP + RETURN_TOKEN(DROP); + YY_BREAK + case 12: YY_RULE_SETUP #line 90 "lex_sql.l" -RETURN_TOKEN(TABLE); - YY_BREAK -case 13: -YY_RULE_SETUP + RETURN_TOKEN(TABLE); + YY_BREAK + case 13: YY_RULE_SETUP #line 91 "lex_sql.l" -RETURN_TOKEN(TABLES); - YY_BREAK -case 14: -YY_RULE_SETUP + RETURN_TOKEN(TABLES); + YY_BREAK + case 14: YY_RULE_SETUP #line 92 "lex_sql.l" -RETURN_TOKEN(INDEX); - YY_BREAK -case 15: -YY_RULE_SETUP + RETURN_TOKEN(INDEX); + YY_BREAK + case 15: YY_RULE_SETUP #line 93 "lex_sql.l" -RETURN_TOKEN(ON); - YY_BREAK -case 16: -YY_RULE_SETUP + RETURN_TOKEN(ON); + YY_BREAK + case 16: YY_RULE_SETUP #line 94 "lex_sql.l" -RETURN_TOKEN(SHOW); - YY_BREAK -case 17: -YY_RULE_SETUP + RETURN_TOKEN(SHOW); + YY_BREAK + case 17: YY_RULE_SETUP #line 95 "lex_sql.l" -RETURN_TOKEN(SYNC); - YY_BREAK -case 18: -YY_RULE_SETUP + RETURN_TOKEN(SYNC); + YY_BREAK + case 18: YY_RULE_SETUP #line 96 "lex_sql.l" -RETURN_TOKEN(SELECT); - YY_BREAK -case 19: -YY_RULE_SETUP + RETURN_TOKEN(SELECT); + YY_BREAK + case 19: YY_RULE_SETUP #line 97 "lex_sql.l" -RETURN_TOKEN(CALC); - YY_BREAK -case 20: -YY_RULE_SETUP + RETURN_TOKEN(CALC); + YY_BREAK + case 20: YY_RULE_SETUP #line 98 "lex_sql.l" -RETURN_TOKEN(FROM); - YY_BREAK -case 21: -YY_RULE_SETUP + RETURN_TOKEN(FROM); + YY_BREAK + case 21: YY_RULE_SETUP #line 99 "lex_sql.l" -RETURN_TOKEN(WHERE); - YY_BREAK -case 22: -YY_RULE_SETUP + RETURN_TOKEN(WHERE); + YY_BREAK + case 22: YY_RULE_SETUP #line 100 "lex_sql.l" -RETURN_TOKEN(AND); - YY_BREAK -case 23: -YY_RULE_SETUP + RETURN_TOKEN(AND); + YY_BREAK + case 23: YY_RULE_SETUP #line 101 "lex_sql.l" -RETURN_TOKEN(INSERT); - YY_BREAK -case 24: -YY_RULE_SETUP + RETURN_TOKEN(INSERT); + YY_BREAK + case 24: YY_RULE_SETUP #line 102 "lex_sql.l" -RETURN_TOKEN(INTO); - YY_BREAK -case 25: -YY_RULE_SETUP + RETURN_TOKEN(INTO); + YY_BREAK + case 25: YY_RULE_SETUP #line 103 "lex_sql.l" -RETURN_TOKEN(VALUES); - YY_BREAK -case 26: -YY_RULE_SETUP + RETURN_TOKEN(VALUES); + YY_BREAK + case 26: YY_RULE_SETUP #line 104 "lex_sql.l" -RETURN_TOKEN(DELETE); - YY_BREAK -case 27: -YY_RULE_SETUP + RETURN_TOKEN(DELETE); + YY_BREAK + case 27: YY_RULE_SETUP #line 105 "lex_sql.l" -RETURN_TOKEN(UPDATE); - YY_BREAK -case 28: -YY_RULE_SETUP + RETURN_TOKEN(UPDATE); + YY_BREAK + case 28: YY_RULE_SETUP #line 106 "lex_sql.l" -RETURN_TOKEN(SET); - YY_BREAK -case 29: -YY_RULE_SETUP + RETURN_TOKEN(SET); + YY_BREAK + case 29: YY_RULE_SETUP #line 107 "lex_sql.l" -RETURN_TOKEN(TRX_BEGIN); - YY_BREAK -case 30: -YY_RULE_SETUP + RETURN_TOKEN(TRX_BEGIN); + YY_BREAK + case 30: YY_RULE_SETUP #line 108 "lex_sql.l" -RETURN_TOKEN(TRX_COMMIT); - YY_BREAK -case 31: -YY_RULE_SETUP + RETURN_TOKEN(TRX_COMMIT); + YY_BREAK + case 31: YY_RULE_SETUP #line 109 "lex_sql.l" -RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK -case 32: -YY_RULE_SETUP + RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK + case 32: YY_RULE_SETUP #line 110 "lex_sql.l" -RETURN_TOKEN(INT_T); - YY_BREAK -case 33: -YY_RULE_SETUP + RETURN_TOKEN(INT_T); + YY_BREAK + case 33: YY_RULE_SETUP #line 111 "lex_sql.l" -RETURN_TOKEN(STRING_T); - YY_BREAK -case 34: -YY_RULE_SETUP + RETURN_TOKEN(STRING_T); + YY_BREAK + case 34: YY_RULE_SETUP #line 112 "lex_sql.l" -RETURN_TOKEN(FLOAT_T); - YY_BREAK -case 35: -YY_RULE_SETUP + RETURN_TOKEN(FLOAT_T); + YY_BREAK + case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK -case 36: -YY_RULE_SETUP + RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK + case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(NULL_T); - YY_BREAK -case 37: -YY_RULE_SETUP + RETURN_TOKEN(NULL_T); + YY_BREAK + case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(NULLABLE); - YY_BREAK -case 38: -YY_RULE_SETUP + RETURN_TOKEN(NULLABLE); + YY_BREAK + case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(LOAD); - YY_BREAK -case 39: -YY_RULE_SETUP + RETURN_TOKEN(LOAD); + YY_BREAK + case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(DATA); - YY_BREAK -case 40: -YY_RULE_SETUP + RETURN_TOKEN(DATA); + YY_BREAK + case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(INFILE); - YY_BREAK -case 41: -YY_RULE_SETUP + RETURN_TOKEN(INFILE); + YY_BREAK + case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); - YY_BREAK -case 42: -YY_RULE_SETUP + RETURN_TOKEN(EXPLAIN); + YY_BREAK + case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(GROUP); - YY_BREAK -case 43: -YY_RULE_SETUP + RETURN_TOKEN(GROUP); + YY_BREAK + case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(BY); - YY_BREAK -case 44: -YY_RULE_SETUP + RETURN_TOKEN(BY); + YY_BREAK + case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(AS); - YY_BREAK -case 45: -YY_RULE_SETUP + RETURN_TOKEN(AS); + YY_BREAK + case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(STORAGE); - YY_BREAK -case 46: -YY_RULE_SETUP + RETURN_TOKEN(STORAGE); + YY_BREAK + case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(FORMAT); - YY_BREAK -case 47: -YY_RULE_SETUP + RETURN_TOKEN(FORMAT); + YY_BREAK + case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(INNER); - YY_BREAK -case 48: -YY_RULE_SETUP + RETURN_TOKEN(INNER); + YY_BREAK + case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(JOIN); - YY_BREAK -case 49: -YY_RULE_SETUP + RETURN_TOKEN(JOIN); + YY_BREAK + case 49: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(LBRACE); - YY_BREAK -case 50: -YY_RULE_SETUP + RETURN_TOKEN(LBRACE); + YY_BREAK + case 50: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(RBRACE); - YY_BREAK -case 51: -YY_RULE_SETUP + RETURN_TOKEN(RBRACE); + YY_BREAK + case 51: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(COMMA); - YY_BREAK -case 52: -YY_RULE_SETUP + RETURN_TOKEN(COMMA); + YY_BREAK + case 52: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(EQ); - YY_BREAK -case 53: -YY_RULE_SETUP + RETURN_TOKEN(EQ); + YY_BREAK + case 53: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(LE); - YY_BREAK -case 54: -YY_RULE_SETUP + RETURN_TOKEN(LE); + YY_BREAK + case 54: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 55: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 55: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 56: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 56: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(LT); - YY_BREAK -case 57: -YY_RULE_SETUP + RETURN_TOKEN(LT); + YY_BREAK + case 57: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(GE); - YY_BREAK -case 58: -YY_RULE_SETUP + RETURN_TOKEN(GE); + YY_BREAK + case 58: YY_RULE_SETUP #line 137 "lex_sql.l" -RETURN_TOKEN(GT); - YY_BREAK -case 59: -YY_RULE_SETUP + RETURN_TOKEN(GT); + YY_BREAK + case 59: YY_RULE_SETUP #line 138 "lex_sql.l" -RETURN_TOKEN(NOT); - YY_BREAK -case 60: -YY_RULE_SETUP + RETURN_TOKEN(NOT); + YY_BREAK + case 60: YY_RULE_SETUP #line 139 "lex_sql.l" -RETURN_TOKEN(IS); - YY_BREAK -case 61: -YY_RULE_SETUP + RETURN_TOKEN(IS); + YY_BREAK + case 61: YY_RULE_SETUP #line 140 "lex_sql.l" -RETURN_TOKEN(LIKE); - YY_BREAK -case 62: -YY_RULE_SETUP + RETURN_TOKEN(LIKE); + YY_BREAK + case 62: YY_RULE_SETUP #line 142 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); - YY_BREAK -case 63: + yylval->string = strdup(yytext); + RETURN_TOKEN(ID); + YY_BREAK + case 63: #line 145 "lex_sql.l" -case 64: + case 64: #line 146 "lex_sql.l" -case 65: + case 65: #line 147 "lex_sql.l" -case 66: -YY_RULE_SETUP + case 66: YY_RULE_SETUP #line 147 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK -case 67: -/* rule 67 can match eol */ -YY_RULE_SETUP + { + return yytext[0]; + } + YY_BREAK + case 67: + /* rule 67 can match eol */ + YY_RULE_SETUP #line 148 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 68: -/* rule 68 can match eol */ -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 68: + /* rule 68 can match eol */ + YY_RULE_SETUP #line 149 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 69: -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 69: YY_RULE_SETUP #line 151 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; - YY_BREAK -case 70: -YY_RULE_SETUP + LOG_DEBUG("Unknown character [%c]",yytext[0]); + return yytext[0]; + YY_BREAK + case 70: YY_RULE_SETUP #line 152 "lex_sql.l" -ECHO; - YY_BREAK + ECHO; + YY_BREAK #line 1394 "lex_sql.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STR): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap( yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(STR): yyterminate(); + + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if (yy_next_state) { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_END_OF_FILE: { + yyg->yy_did_buffer_switch_on_eof = 0; + + if (yywrap(yyscanner)) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else { + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1533,171 +3395,149 @@ case YY_STATE_EOF(STR): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (yyscan_t yyscanner) +static int yy_get_next_buffer(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) + YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); + + if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ + if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for (i = 0; i < number_to_move; ++i) + *(dest++) = *(source++); + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else { + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); + + if (b->yy_is_our_buffer) { + yy_size_t new_size = b->yy_buf_size * 2; + + if (new_size <= 0) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); + } else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if (!b->yy_ch_buf) + YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + } + + if (num_to_read > YY_READ_BUF_SIZE) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if (yyg->yy_n_chars == 0) { + if (number_to_move == YY_MORE_ADJ) { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin, yyscanner); + } + + else { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = + (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); + if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +static yy_state_type yy_get_previous_state(yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 206 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + yy_current_state = yyg->yy_start; + + for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 206) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -1705,29 +3545,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 206 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 205); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 206) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 205); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -1736,141 +3574,133 @@ static int yy_get_next_buffer (yyscan_t yyscanner) #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) +static int yyinput(yyscan_t yyscanner) #else - static int input (yyscan_t yyscanner) +static int input(yyscan_t yyscanner) #endif { - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin , yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + int c; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin, yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: { + if (yywrap(yyscanner)) + return 0; + + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; + } + } + } - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) +void yyrestart(FILE *input_file, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); + yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); + yy_load_buffer_state(yyscanner); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack(yyscanner); + if (YY_CURRENT_BUFFER == new_buffer) + return; + + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state(yyscanner); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state (yyscan_t yyscanner) +static void yy_load_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -1879,105 +3709,105 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); + if (!b->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer( b, file , yyscanner); + yy_init_buffer(b, file, yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! b ) - return; + if (!b) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); + if (b->yy_is_our_buffer) + yyfree((void *)b->yy_ch_buf, yyscanner); - yyfree( (void *) b , yyscanner ); + yyfree((void *)b, yyscanner); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + int oerrno = errno; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flush_buffer( b , yyscanner); + yy_flush_buffer(b, yyscanner); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!b) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); + if (b == YY_CURRENT_BUFFER) + yy_load_buffer_state(yyscanner); } /** Pushes the new state onto the stack. The new state becomes @@ -1986,99 +3816,95 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state (yyscan_t yyscanner) +void yypop_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (yyscan_t yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = + (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( + yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -2087,33 +3913,31 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b , yyscanner ); - - return b; + YY_BUFFER_STATE b; + + if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + + b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b, yyscanner); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -2124,10 +3948,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) { - - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + + return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2137,177 +3961,175 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n , yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t)(_yybytes_len + 2); + buf = (char *)yyalloc(n, yyscanner); + if (!buf) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + + for (i = 0; i < _yybytes_len; ++i) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf, n, yyscanner); + if (!b) + YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + fprintf(stderr, "%s\n", msg); + exit(YY_EXIT_FAILURE); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } while (0) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno (yyscan_t yyscanner) +int yyget_lineno(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (!YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column (yyscan_t yyscanner) +int yyget_column(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; + if (!YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in (yyscan_t yyscanner) +FILE *yyget_in(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out (yyscan_t yyscanner) +FILE *yyget_out(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text (yyscan_t yyscanner) +char *yyget_text(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyextra = user_defined; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) +void yyset_lineno(int _line_number, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_lineno called with no buffer"); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int _column_no , yyscan_t yyscanner) +void yyset_column(int _column_no, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_column called with no buffer"); - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); - - yycolumn = _column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -2316,80 +4138,80 @@ void yyset_column (int _column_no , yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) +void yyset_in(FILE *_in_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyin = _in_str; } -void yyset_out (FILE * _out_str , yyscan_t yyscanner) +void yyset_out(FILE *_out_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyout = _out_str; } -int yyget_debug (yyscan_t yyscanner) +int yyget_debug(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yy_flex_debug; } -void yyset_debug (int _bdebug , yyscan_t yyscanner) +void yyset_debug(int _bdebug, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_flex_debug = _bdebug; } /* Accessor methods for yylval and yylloc */ -YYSTYPE * yyget_lval (yyscan_t yyscanner) +YYSTYPE *yyget_lval(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylval; } -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc (yyscan_t yyscanner) +YYLTYPE *yyget_lloc(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylloc; } - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t* ptr_yy_globals) +int yylex_init(yyscan_t *ptr_yy_globals) { - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -2399,94 +4221,94 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra (yy_user_defined, &dummy_yyguts); + yyset_extra(yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - yyset_extra (yy_user_defined, *ptr_yy_globals); + yyset_extra(yy_user_defined, *ptr_yy_globals); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } -static int yy_init_globals (yyscan_t yyscanner) +static int yy_init_globals(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) +int yylex_destroy(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while (YY_CURRENT_BUFFER) { + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack, yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree(yyg->yy_start_stack, yyscanner); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals(yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree(yyscanner, yyscanner); + yyscanner = NULL; + return 0; } /* @@ -2494,63 +4316,59 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + int i; + for (i = 0; i < n; ++i) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +static int yy_flex_strlen(const char *s, yyscan_t yyscanner) { - int n; - for ( n = 0; s[n]; ++n ) - ; + int n; + for (n = 0; s[n]; ++n) + ; - return n; + return n; } #endif -void *yyalloc (yy_size_t size , yyscan_t yyscanner) +void *yyalloc(yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree (void * ptr , yyscan_t yyscanner) +void yyfree(void *ptr, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + free((char *)ptr); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 152 "lex_sql.l" - -void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); -} - +void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index e8700426..7e27df55 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,23 +12,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -81,62 +79,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -157,7 +155,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -197,73 +195,72 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -286,69 +283,69 @@ void yyfree ( void * , yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -376,11 +373,9 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -544,7 +539,6 @@ extern int yylex \ #line 152 "lex_sql.l" - #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 5b24d3bc..2b39616f 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,13 +63,9 @@ /* Pull parsers. */ #define YYPULL 1 - - - /* First part of user prologue. */ #line 2 "yacc_sql.y" - #include #include #include @@ -92,188 +88,179 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, - Expression *left, - Expression *right, - const char *sql_string, - YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression( + ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, - Expression *child, - const char *sql_string, - YYLTYPE *llocp) +UnboundAggregateExpr *create_aggregate_expression( + const char *aggregate_name, Expression *child, const char *sql_string, YYLTYPE *llocp) { UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, child); expr->set_name(token_name(sql_string, llocp)); return expr; } - #line 125 "yacc_sql.cpp" -# ifndef YY_CAST -# ifdef __cplusplus -# define YY_CAST(Type, Val) static_cast (Val) -# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -# else -# define YY_CAST(Type, Val) ((Type) (Val)) -# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -# endif -# endif -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif +#ifndef YY_CAST +#ifdef __cplusplus +#define YY_CAST(Type, Val) static_cast(Val) +#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) +#else +#define YY_CAST(Type, Val) ((Type)(Val)) +#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) +#endif +#endif +#ifndef YY_NULLPTR +#if defined __cplusplus +#if 201103L <= __cplusplus +#define YY_NULLPTR nullptr +#else +#define YY_NULLPTR 0 +#endif +#else +#define YY_NULLPTR ((void *)0) +#endif +#endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_BY = 5, /* BY */ - YYSYMBOL_CREATE = 6, /* CREATE */ - YYSYMBOL_DROP = 7, /* DROP */ - YYSYMBOL_GROUP = 8, /* GROUP */ - YYSYMBOL_TABLE = 9, /* TABLE */ - YYSYMBOL_TABLES = 10, /* TABLES */ - YYSYMBOL_INDEX = 11, /* INDEX */ - YYSYMBOL_CALC = 12, /* CALC */ - YYSYMBOL_SELECT = 13, /* SELECT */ - YYSYMBOL_DESC = 14, /* DESC */ - YYSYMBOL_SHOW = 15, /* SHOW */ - YYSYMBOL_SYNC = 16, /* SYNC */ - YYSYMBOL_INSERT = 17, /* INSERT */ - YYSYMBOL_DELETE = 18, /* DELETE */ - YYSYMBOL_UPDATE = 19, /* UPDATE */ - YYSYMBOL_LBRACE = 20, /* LBRACE */ - YYSYMBOL_RBRACE = 21, /* RBRACE */ - YYSYMBOL_COMMA = 22, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 23, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 24, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 25, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 26, /* INT_T */ - YYSYMBOL_STRING_T = 27, /* STRING_T */ - YYSYMBOL_FLOAT_T = 28, /* FLOAT_T */ - YYSYMBOL_DATE_T = 29, /* DATE_T */ - YYSYMBOL_NOT = 30, /* NOT */ - YYSYMBOL_NULL_T = 31, /* NULL_T */ - YYSYMBOL_NULLABLE = 32, /* NULLABLE */ - YYSYMBOL_HELP = 33, /* HELP */ - YYSYMBOL_EXIT = 34, /* EXIT */ - YYSYMBOL_DOT = 35, /* DOT */ - YYSYMBOL_INTO = 36, /* INTO */ - YYSYMBOL_VALUES = 37, /* VALUES */ - YYSYMBOL_FROM = 38, /* FROM */ - YYSYMBOL_WHERE = 39, /* WHERE */ - YYSYMBOL_AND = 40, /* AND */ - YYSYMBOL_SET = 41, /* SET */ - YYSYMBOL_ON = 42, /* ON */ - YYSYMBOL_LOAD = 43, /* LOAD */ - YYSYMBOL_DATA = 44, /* DATA */ - YYSYMBOL_INFILE = 45, /* INFILE */ - YYSYMBOL_EXPLAIN = 46, /* EXPLAIN */ - YYSYMBOL_STORAGE = 47, /* STORAGE */ - YYSYMBOL_FORMAT = 48, /* FORMAT */ - YYSYMBOL_INNER = 49, /* INNER */ - YYSYMBOL_JOIN = 50, /* JOIN */ - YYSYMBOL_EQ = 51, /* EQ */ - YYSYMBOL_LT = 52, /* LT */ - YYSYMBOL_GT = 53, /* GT */ - YYSYMBOL_LE = 54, /* LE */ - YYSYMBOL_GE = 55, /* GE */ - YYSYMBOL_NE = 56, /* NE */ - YYSYMBOL_LIKE = 57, /* LIKE */ - YYSYMBOL_IS = 58, /* IS */ - YYSYMBOL_NUMBER = 59, /* NUMBER */ - YYSYMBOL_FLOAT = 60, /* FLOAT */ - YYSYMBOL_ID = 61, /* ID */ - YYSYMBOL_SSS = 62, /* SSS */ - YYSYMBOL_63_ = 63, /* '+' */ - YYSYMBOL_64_ = 64, /* '-' */ - YYSYMBOL_65_ = 65, /* '*' */ - YYSYMBOL_66_ = 66, /* '/' */ - YYSYMBOL_UMINUS = 67, /* UMINUS */ - YYSYMBOL_YYACCEPT = 68, /* $accept */ - YYSYMBOL_commands = 69, /* commands */ - YYSYMBOL_command_wrapper = 70, /* command_wrapper */ - YYSYMBOL_exit_stmt = 71, /* exit_stmt */ - YYSYMBOL_help_stmt = 72, /* help_stmt */ - YYSYMBOL_sync_stmt = 73, /* sync_stmt */ - YYSYMBOL_begin_stmt = 74, /* begin_stmt */ - YYSYMBOL_commit_stmt = 75, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 76, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 77, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 78, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 79, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 80, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 81, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 82, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 83, /* attr_def_list */ - YYSYMBOL_attr_def = 84, /* attr_def */ - YYSYMBOL_nullable_constraint = 85, /* nullable_constraint */ - YYSYMBOL_number = 86, /* number */ - YYSYMBOL_type = 87, /* type */ - YYSYMBOL_insert_stmt = 88, /* insert_stmt */ - YYSYMBOL_values_list = 89, /* values_list */ - YYSYMBOL_value_list = 90, /* value_list */ - YYSYMBOL_value = 91, /* value */ - YYSYMBOL_storage_format = 92, /* storage_format */ - YYSYMBOL_delete_stmt = 93, /* delete_stmt */ - YYSYMBOL_update_stmt = 94, /* update_stmt */ - YYSYMBOL_setClauses = 95, /* setClauses */ - YYSYMBOL_setClause = 96, /* setClause */ - YYSYMBOL_select_stmt = 97, /* select_stmt */ - YYSYMBOL_calc_stmt = 98, /* calc_stmt */ - YYSYMBOL_expression_list = 99, /* expression_list */ - YYSYMBOL_expression = 100, /* expression */ - YYSYMBOL_alias = 101, /* alias */ - YYSYMBOL_aggr_func_expr = 102, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 103, /* rel_attr */ - YYSYMBOL_relation = 104, /* relation */ - YYSYMBOL_rel_list = 105, /* rel_list */ - YYSYMBOL_joinClause = 106, /* joinClause */ - YYSYMBOL_joinClauses = 107, /* joinClauses */ - YYSYMBOL_where = 108, /* where */ - YYSYMBOL_condition_list = 109, /* condition_list */ - YYSYMBOL_condition = 110, /* condition */ - YYSYMBOL_comp_op = 111, /* comp_op */ - YYSYMBOL_group_by = 112, /* group_by */ - YYSYMBOL_load_data_stmt = 113, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 114, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 115, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 116 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_BY = 5, /* BY */ + YYSYMBOL_CREATE = 6, /* CREATE */ + YYSYMBOL_DROP = 7, /* DROP */ + YYSYMBOL_GROUP = 8, /* GROUP */ + YYSYMBOL_TABLE = 9, /* TABLE */ + YYSYMBOL_TABLES = 10, /* TABLES */ + YYSYMBOL_INDEX = 11, /* INDEX */ + YYSYMBOL_CALC = 12, /* CALC */ + YYSYMBOL_SELECT = 13, /* SELECT */ + YYSYMBOL_DESC = 14, /* DESC */ + YYSYMBOL_SHOW = 15, /* SHOW */ + YYSYMBOL_SYNC = 16, /* SYNC */ + YYSYMBOL_INSERT = 17, /* INSERT */ + YYSYMBOL_DELETE = 18, /* DELETE */ + YYSYMBOL_UPDATE = 19, /* UPDATE */ + YYSYMBOL_LBRACE = 20, /* LBRACE */ + YYSYMBOL_RBRACE = 21, /* RBRACE */ + YYSYMBOL_COMMA = 22, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 23, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 24, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 25, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 26, /* INT_T */ + YYSYMBOL_STRING_T = 27, /* STRING_T */ + YYSYMBOL_FLOAT_T = 28, /* FLOAT_T */ + YYSYMBOL_DATE_T = 29, /* DATE_T */ + YYSYMBOL_NOT = 30, /* NOT */ + YYSYMBOL_NULL_T = 31, /* NULL_T */ + YYSYMBOL_NULLABLE = 32, /* NULLABLE */ + YYSYMBOL_HELP = 33, /* HELP */ + YYSYMBOL_EXIT = 34, /* EXIT */ + YYSYMBOL_DOT = 35, /* DOT */ + YYSYMBOL_INTO = 36, /* INTO */ + YYSYMBOL_VALUES = 37, /* VALUES */ + YYSYMBOL_FROM = 38, /* FROM */ + YYSYMBOL_WHERE = 39, /* WHERE */ + YYSYMBOL_AND = 40, /* AND */ + YYSYMBOL_SET = 41, /* SET */ + YYSYMBOL_ON = 42, /* ON */ + YYSYMBOL_LOAD = 43, /* LOAD */ + YYSYMBOL_DATA = 44, /* DATA */ + YYSYMBOL_INFILE = 45, /* INFILE */ + YYSYMBOL_EXPLAIN = 46, /* EXPLAIN */ + YYSYMBOL_STORAGE = 47, /* STORAGE */ + YYSYMBOL_FORMAT = 48, /* FORMAT */ + YYSYMBOL_INNER = 49, /* INNER */ + YYSYMBOL_JOIN = 50, /* JOIN */ + YYSYMBOL_EQ = 51, /* EQ */ + YYSYMBOL_LT = 52, /* LT */ + YYSYMBOL_GT = 53, /* GT */ + YYSYMBOL_LE = 54, /* LE */ + YYSYMBOL_GE = 55, /* GE */ + YYSYMBOL_NE = 56, /* NE */ + YYSYMBOL_LIKE = 57, /* LIKE */ + YYSYMBOL_IS = 58, /* IS */ + YYSYMBOL_NUMBER = 59, /* NUMBER */ + YYSYMBOL_FLOAT = 60, /* FLOAT */ + YYSYMBOL_ID = 61, /* ID */ + YYSYMBOL_SSS = 62, /* SSS */ + YYSYMBOL_63_ = 63, /* '+' */ + YYSYMBOL_64_ = 64, /* '-' */ + YYSYMBOL_65_ = 65, /* '*' */ + YYSYMBOL_66_ = 66, /* '/' */ + YYSYMBOL_UMINUS = 67, /* UMINUS */ + YYSYMBOL_YYACCEPT = 68, /* $accept */ + YYSYMBOL_commands = 69, /* commands */ + YYSYMBOL_command_wrapper = 70, /* command_wrapper */ + YYSYMBOL_exit_stmt = 71, /* exit_stmt */ + YYSYMBOL_help_stmt = 72, /* help_stmt */ + YYSYMBOL_sync_stmt = 73, /* sync_stmt */ + YYSYMBOL_begin_stmt = 74, /* begin_stmt */ + YYSYMBOL_commit_stmt = 75, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 76, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 77, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 78, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 79, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 80, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 81, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 82, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 83, /* attr_def_list */ + YYSYMBOL_attr_def = 84, /* attr_def */ + YYSYMBOL_nullable_constraint = 85, /* nullable_constraint */ + YYSYMBOL_number = 86, /* number */ + YYSYMBOL_type = 87, /* type */ + YYSYMBOL_insert_stmt = 88, /* insert_stmt */ + YYSYMBOL_values_list = 89, /* values_list */ + YYSYMBOL_value_list = 90, /* value_list */ + YYSYMBOL_value = 91, /* value */ + YYSYMBOL_storage_format = 92, /* storage_format */ + YYSYMBOL_delete_stmt = 93, /* delete_stmt */ + YYSYMBOL_update_stmt = 94, /* update_stmt */ + YYSYMBOL_setClauses = 95, /* setClauses */ + YYSYMBOL_setClause = 96, /* setClause */ + YYSYMBOL_select_stmt = 97, /* select_stmt */ + YYSYMBOL_calc_stmt = 98, /* calc_stmt */ + YYSYMBOL_expression_list = 99, /* expression_list */ + YYSYMBOL_expression = 100, /* expression */ + YYSYMBOL_alias = 101, /* alias */ + YYSYMBOL_aggr_func_expr = 102, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 103, /* rel_attr */ + YYSYMBOL_relation = 104, /* relation */ + YYSYMBOL_rel_list = 105, /* rel_list */ + YYSYMBOL_joinClause = 106, /* joinClause */ + YYSYMBOL_joinClauses = 107, /* joinClauses */ + YYSYMBOL_where = 108, /* where */ + YYSYMBOL_condition_list = 109, /* condition_list */ + YYSYMBOL_condition = 110, /* condition */ + YYSYMBOL_comp_op = 111, /* comp_op */ + YYSYMBOL_group_by = 112, /* group_by */ + YYSYMBOL_load_data_stmt = 113, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 114, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 115, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 116 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; - - - #ifdef short -# undef short +#undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -281,11 +268,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -# include /* INFRINGES ON USER NAME SPACE */ -# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_STDINT_H -# endif +#include /* INFRINGES ON USER NAME SPACE */ +#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_STDINT_H +#endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -315,16 +302,15 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 +#undef UINT_LEAST8_MAX +#undef UINT_LEAST16_MAX +#define UINT_LEAST8_MAX 255 +#define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -334,8 +320,7 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -344,42 +329,38 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -# define YYPTRDIFF_T __PTRDIFF_TYPE__ -# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -# elif defined PTRDIFF_MAX -# ifndef ptrdiff_t -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYPTRDIFF_T ptrdiff_t -# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -# else -# define YYPTRDIFF_T long -# define YYPTRDIFF_MAXIMUM LONG_MAX -# endif +#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +#define YYPTRDIFF_T __PTRDIFF_TYPE__ +#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +#elif defined PTRDIFF_MAX +#ifndef ptrdiff_t +#include /* INFRINGES ON USER NAME SPACE */ +#endif +#define YYPTRDIFF_T ptrdiff_t +#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +#else +#define YYPTRDIFF_T long +#define YYPTRDIFF_MAXIMUM LONG_MAX +#endif #endif #ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned -# endif +#ifdef __SIZE_TYPE__ +#define YYSIZE_T __SIZE_TYPE__ +#elif defined size_t +#define YYSIZE_T size_t +#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YYSIZE_T size_t +#else +#define YYSIZE_T unsigned +#endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST (YYPTRDIFF_T, \ - (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ - ? YYPTRDIFF_MAXIMUM \ - : YY_CAST (YYSIZE_T, -1))) - -#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) +#define YYSIZE_MAXIMUM \ + YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -388,560 +369,2201 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif +#if defined YYENABLE_NLS && YYENABLE_NLS +#if ENABLE_NLS +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_(Msgid) dgettext("bison-runtime", Msgid) +#endif +#endif +#ifndef YY_ +#define YY_(Msgid) Msgid +#endif #endif - #ifndef YY_ATTRIBUTE_PURE -# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define YY_ATTRIBUTE_PURE -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) +#else +#define YY_ATTRIBUTE_PURE +#endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -# else -# define YY_ATTRIBUTE_UNUSED -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#else +#define YY_ATTRIBUTE_UNUSED +#endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +#if !defined lint || defined __GNUC__ +#define YY_USE(E) ((void)(E)) #else -# define YY_USE(E) /* empty */ +#define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") +#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") #else -# define YY_INITIAL_VALUE(Value) Value +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +#endif +#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") +#else +#define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +#define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -# define YY_IGNORE_USELESS_CAST_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -# define YY_IGNORE_USELESS_CAST_END \ - _Pragma ("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ +#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") +#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_END +#define YY_IGNORE_USELESS_CAST_BEGIN +#define YY_IGNORE_USELESS_CAST_END #endif - -#define YY_ASSERT(E) ((void) (0 && (E))) +#define YY_ASSERT(E) ((void)(0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif +#ifdef YYSTACK_USE_ALLOCA +#if YYSTACK_USE_ALLOCA +#ifdef __GNUC__ +#define YYSTACK_ALLOC __builtin_alloca +#elif defined __BUILTIN_VA_ARG_INCR +#include /* INFRINGES ON USER NAME SPACE */ +#elif defined _AIX +#define YYSTACK_ALLOC __alloca +#elif defined _MSC_VER +#include /* INFRINGES ON USER NAME SPACE */ +#define alloca _alloca +#else +#define YYSTACK_ALLOC alloca +#if !defined _ALLOCA_H && !defined EXIT_SUCCESS +#include /* INFRINGES ON USER NAME SPACE */ +/* Use EXIT_SUCCESS as a witness for stdlib.h. */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#endif +#endif +#endif + +#ifdef YYSTACK_ALLOC +/* Pacify GCC's 'empty if-body' warning. */ +#define YYSTACK_FREE(Ptr) \ + do { /* empty */ \ + ; \ + } while (0) +#ifndef YYSTACK_ALLOC_MAXIMUM +/* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +#endif +#else +#define YYSTACK_ALLOC YYMALLOC +#define YYSTACK_FREE YYFREE +#ifndef YYSTACK_ALLOC_MAXIMUM +#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +#endif +#if (defined __cplusplus && !defined EXIT_SUCCESS && \ + !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) +#include /* INFRINGES ON USER NAME SPACE */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef YYMALLOC +#define YYMALLOC malloc +#if !defined malloc && !defined EXIT_SUCCESS +void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#ifndef YYFREE +#define YYFREE free +#if !defined free && !defined EXIT_SUCCESS +void free(void *); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#endif #endif /* 1 */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ + defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) +#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ - + YYSIZEOF (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) +#define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +#define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF (*yyptr); \ - } \ - while (0) +#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF(*yyptr); \ + } while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif +#ifndef YYCOPY +#if defined __GNUC__ && 1 < __GNUC__ +#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) +#else +#define YYCOPY(Dst, Src, Count) \ + do { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } while (0) +#endif +#endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 67 +#define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 196 +#define YYLAST 196 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 68 +#define YYNTOKENS 68 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 49 +#define YYNNTS 49 /* YYNRULES -- Number of rules. */ -#define YYNRULES 115 +#define YYNRULES 115 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 209 +#define YYNSTATES 209 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 318 - +#define YYMAXUTOK 318 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 65, 63, 2, 64, 2, 66, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 67 -}; +static const yytype_int8 yytranslate[] = {0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 65, + 63, + 2, + 64, + 2, + 66, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 67}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = -{ - 0, 211, 211, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, - 236, 237, 238, 242, 248, 253, 259, 265, 271, 277, - 284, 290, 298, 312, 322, 346, 349, 362, 374, 399, - 403, 408, 414, 417, 418, 419, 420, 424, 437, 443, - 450, 456, 464, 468, 472, 478, 485, 488, 495, 508, - 523, 529, 537, 547, 570, 606, 615, 624, 639, 642, - 645, 648, 651, 655, 658, 663, 669, 672, 679, 682, - 685, 690, 698, 704, 709, 719, 725, 735, 753, 764, - 770, 780, 783, 789, 792, 797, 804, 816, 828, 840, - 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, - 870, 875, 888, 896, 906, 907 -}; +static const yytype_int16 yyrline[] = {0, + 211, + 211, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 242, + 248, + 253, + 259, + 265, + 271, + 277, + 284, + 290, + 298, + 312, + 322, + 346, + 349, + 362, + 374, + 399, + 403, + 408, + 414, + 417, + 418, + 419, + 420, + 424, + 437, + 443, + 450, + 456, + 464, + 468, + 472, + 478, + 485, + 488, + 495, + 508, + 523, + 529, + 537, + 547, + 570, + 606, + 615, + 624, + 639, + 642, + 645, + 648, + 651, + 655, + 658, + 663, + 669, + 672, + 679, + 682, + 685, + 690, + 698, + 704, + 709, + 719, + 725, + 735, + 753, + 764, + 770, + 780, + 783, + 789, + 792, + 797, + 804, + 816, + 828, + 840, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 870, + 875, + 888, + 896, + 906, + 907}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", - "BY", "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", - "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", - "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", - "STRING_T", "FLOAT_T", "DATE_T", "NOT", "NULL_T", "NULLABLE", "HELP", - "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "SET", "ON", - "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", - "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", - "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", - "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", - "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", - "show_tables_stmt", "desc_table_stmt", "create_index_stmt", - "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", - "nullable_constraint", "number", "type", "insert_stmt", "values_list", - "value_list", "value", "storage_format", "delete_stmt", "update_stmt", - "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", - "expression", "alias", "aggr_func_expr", "rel_attr", "relation", - "rel_list", "joinClause", "joinClauses", "where", "condition_list", - "condition", "comp_op", "group_by", "load_data_stmt", "explain_stmt", - "set_variable_stmt", "opt_semicolon", YY_NULLPTR -}; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} +static const char *const yytname[] = {"\"end of file\"", + "error", + "\"invalid token\"", + "SEMICOLON", + "AS", + "BY", + "CREATE", + "DROP", + "GROUP", + "TABLE", + "TABLES", + "INDEX", + "CALC", + "SELECT", + "DESC", + "SHOW", + "SYNC", + "INSERT", + "DELETE", + "UPDATE", + "LBRACE", + "RBRACE", + "COMMA", + "TRX_BEGIN", + "TRX_COMMIT", + "TRX_ROLLBACK", + "INT_T", + "STRING_T", + "FLOAT_T", + "DATE_T", + "NOT", + "NULL_T", + "NULLABLE", + "HELP", + "EXIT", + "DOT", + "INTO", + "VALUES", + "FROM", + "WHERE", + "AND", + "SET", + "ON", + "LOAD", + "DATA", + "INFILE", + "EXPLAIN", + "STORAGE", + "FORMAT", + "INNER", + "JOIN", + "EQ", + "LT", + "GT", + "LE", + "GE", + "NE", + "LIKE", + "IS", + "NUMBER", + "FLOAT", + "ID", + "SSS", + "'+'", + "'-'", + "'*'", + "'/'", + "UMINUS", + "$accept", + "commands", + "command_wrapper", + "exit_stmt", + "help_stmt", + "sync_stmt", + "begin_stmt", + "commit_stmt", + "rollback_stmt", + "drop_table_stmt", + "show_tables_stmt", + "desc_table_stmt", + "create_index_stmt", + "drop_index_stmt", + "create_table_stmt", + "attr_def_list", + "attr_def", + "nullable_constraint", + "number", + "type", + "insert_stmt", + "values_list", + "value_list", + "value", + "storage_format", + "delete_stmt", + "update_stmt", + "setClauses", + "setClause", + "select_stmt", + "calc_stmt", + "expression_list", + "expression", + "alias", + "aggr_func_expr", + "rel_attr", + "relation", + "rel_list", + "joinClause", + "joinClauses", + "where", + "condition_list", + "condition", + "comp_op", + "group_by", + "load_data_stmt", + "explain_stmt", + "set_variable_stmt", + "opt_semicolon", + YY_NULLPTR}; + +static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif #define YYPACT_NINF (-156) -#define yypact_value_is_default(Yyn) \ - ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) \ - 0 +#define yytable_value_is_error(Yyn) 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 97, 7, 12, 37, 37, -48, 23, -156, -19, -7, - -23, -156, -156, -156, -156, -156, -20, 9, 97, 58, - 71, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, 6, 18, 45, 46, 37, -156, -156, -156, -10, - -156, 37, -156, -156, -156, -2, -156, -156, 79, -156, - -156, 47, 57, 78, 76, 83, -156, -156, -156, -156, - 109, 90, -156, 91, 19, 16, 73, -156, 74, -156, - 37, 37, 37, 37, 114, 80, 100, 103, 84, 64, - 77, 93, 94, 96, -156, -156, 123, -156, -156, 21, - 21, -156, -156, 37, -156, -1, 103, 136, -16, -156, - 107, -13, -156, -156, 124, 1, 137, 141, -156, -156, - -156, 112, 142, -156, 64, 143, 128, 95, 95, -156, - 126, 64, 84, -156, 158, -156, -156, -156, -156, -8, - 93, 147, 108, 80, 80, -156, 70, -156, 150, 115, - -156, -156, -156, -156, -156, -156, -156, 144, -16, -16, - -16, -156, -156, 110, 116, 145, -156, -156, 137, 130, - 152, 138, 129, 103, 4, -156, -156, 64, 64, -156, - -156, -156, -156, -156, -156, -156, -156, -156, 160, -156, - -156, 131, -156, -156, -16, 132, -156, -156, 72, 2, - 133, -156, 80, -156, -156, -156, 122, -156, -156 -}; +static const yytype_int16 yypact[] = {97, + 7, + 12, + 37, + 37, + -48, + 23, + -156, + -19, + -7, + -23, + -156, + -156, + -156, + -156, + -156, + -20, + 9, + 97, + 58, + 71, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + 6, + 18, + 45, + 46, + 37, + -156, + -156, + -156, + -10, + -156, + 37, + -156, + -156, + -156, + -2, + -156, + -156, + 79, + -156, + -156, + 47, + 57, + 78, + 76, + 83, + -156, + -156, + -156, + -156, + 109, + 90, + -156, + 91, + 19, + 16, + 73, + -156, + 74, + -156, + 37, + 37, + 37, + 37, + 114, + 80, + 100, + 103, + 84, + 64, + 77, + 93, + 94, + 96, + -156, + -156, + 123, + -156, + -156, + 21, + 21, + -156, + -156, + 37, + -156, + -1, + 103, + 136, + -16, + -156, + 107, + -13, + -156, + -156, + 124, + 1, + 137, + 141, + -156, + -156, + -156, + 112, + 142, + -156, + 64, + 143, + 128, + 95, + 95, + -156, + 126, + 64, + 84, + -156, + 158, + -156, + -156, + -156, + -156, + -8, + 93, + 147, + 108, + 80, + 80, + -156, + 70, + -156, + 150, + 115, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + 144, + -16, + -16, + -16, + -156, + -156, + 110, + 116, + 145, + -156, + -156, + 137, + 130, + 152, + 138, + 129, + 103, + 4, + -156, + -156, + 64, + 64, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + 160, + -156, + -156, + 131, + -156, + -156, + -16, + 132, + -156, + -156, + 72, + 2, + 133, + -156, + 80, + -156, + -156, + -156, + 122, + -156, + -156}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_int8 yydefact[] = -{ - 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, - 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, - 114, 22, 21, 14, 15, 16, 17, 9, 10, 11, - 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 55, 52, 53, 83, - 54, 0, 76, 74, 65, 78, 77, 75, 0, 31, - 30, 0, 0, 0, 0, 0, 112, 1, 115, 2, - 0, 0, 29, 0, 0, 0, 0, 73, 0, 79, - 0, 0, 0, 0, 66, 0, 0, 91, 0, 0, - 0, 0, 0, 0, 72, 82, 0, 84, 80, 68, - 69, 70, 71, 0, 85, 78, 91, 0, 93, 58, - 0, 91, 60, 113, 0, 0, 35, 0, 33, 81, - 67, 0, 86, 110, 0, 47, 83, 0, 0, 92, - 94, 0, 0, 59, 0, 43, 44, 45, 46, 41, - 0, 0, 0, 0, 0, 63, 0, 50, 0, 0, - 100, 101, 102, 103, 104, 105, 108, 106, 0, 0, - 93, 62, 61, 0, 0, 0, 40, 38, 35, 56, - 0, 0, 89, 91, 78, 87, 48, 0, 0, 109, - 107, 97, 99, 96, 98, 95, 111, 42, 0, 39, - 36, 0, 34, 32, 93, 0, 110, 51, 0, 41, - 0, 88, 0, 64, 49, 37, 0, 90, 57 -}; +static const yytype_int8 yydefact[] = {0, + 0, + 0, + 0, + 0, + 0, + 0, + 25, + 0, + 0, + 0, + 26, + 27, + 28, + 24, + 23, + 0, + 0, + 0, + 0, + 114, + 22, + 21, + 14, + 15, + 16, + 17, + 9, + 10, + 11, + 12, + 13, + 8, + 5, + 7, + 6, + 4, + 3, + 18, + 19, + 20, + 0, + 0, + 0, + 0, + 0, + 55, + 52, + 53, + 83, + 54, + 0, + 76, + 74, + 65, + 78, + 77, + 75, + 0, + 31, + 30, + 0, + 0, + 0, + 0, + 0, + 112, + 1, + 115, + 2, + 0, + 0, + 29, + 0, + 0, + 0, + 0, + 73, + 0, + 79, + 0, + 0, + 0, + 0, + 66, + 0, + 0, + 91, + 0, + 0, + 0, + 0, + 0, + 0, + 72, + 82, + 0, + 84, + 80, + 68, + 69, + 70, + 71, + 0, + 85, + 78, + 91, + 0, + 93, + 58, + 0, + 91, + 60, + 113, + 0, + 0, + 35, + 0, + 33, + 81, + 67, + 0, + 86, + 110, + 0, + 47, + 83, + 0, + 0, + 92, + 94, + 0, + 0, + 59, + 0, + 43, + 44, + 45, + 46, + 41, + 0, + 0, + 0, + 0, + 0, + 63, + 0, + 50, + 0, + 0, + 100, + 101, + 102, + 103, + 104, + 105, + 108, + 106, + 0, + 0, + 93, + 62, + 61, + 0, + 0, + 0, + 40, + 38, + 35, + 56, + 0, + 0, + 89, + 91, + 78, + 87, + 48, + 0, + 0, + 109, + 107, + 97, + 99, + 96, + 98, + 95, + 111, + 42, + 0, + 39, + 36, + 0, + 34, + 32, + 93, + 0, + 110, + 51, + 0, + 41, + 0, + 88, + 0, + 64, + 49, + 37, + 0, + 90, + 57}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -156, -156, 167, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, -156, -156, 20, 49, -12, -156, -156, - -156, -156, 8, -89, -156, -156, -156, -156, 59, -156, - -156, -3, -31, 135, -156, -104, -78, 48, -156, -9, - -100, -155, -156, 66, 0, -156, -156, -156, -156 -}; +static const yytype_int16 yypgoto[] = {-156, + -156, + 167, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + -156, + 20, + 49, + -12, + -156, + -156, + -156, + -156, + 8, + -89, + -156, + -156, + -156, + -156, + 59, + -156, + -156, + -3, + -31, + 135, + -156, + -104, + -78, + 48, + -156, + -9, + -100, + -155, + -156, + 66, + 0, + -156, + -156, + -156, + -156}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = -{ - 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 141, 116, 167, 188, 139, - 33, 125, 146, 53, 192, 34, 35, 111, 112, 36, - 37, 54, 55, 122, 56, 57, 171, 106, 172, 173, - 109, 129, 130, 158, 145, 38, 39, 40, 69 -}; +static const yytype_uint8 yydefgoto[] = {0, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 141, + 116, + 167, + 188, + 139, + 33, + 125, + 146, + 53, + 192, + 34, + 35, + 111, + 112, + 36, + 37, + 54, + 55, + 122, + 56, + 57, + 171, + 106, + 172, + 173, + 109, + 129, + 130, + 158, + 145, + 38, + 39, + 40, + 69}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = -{ - 113, 58, 78, 78, 128, 185, 123, 105, 78, 132, - 75, 133, 164, 59, 74, 46, 41, 61, 42, 127, - 77, 43, 165, 44, 166, 76, 108, 135, 136, 137, - 138, 62, 165, 60, 166, 147, 45, 95, 63, 201, - 94, 64, 161, 47, 48, 126, 50, 46, 121, 99, - 100, 101, 102, 65, 182, 184, 128, 45, 67, 79, - 79, 80, 81, 82, 83, 79, 174, 70, 46, 181, - 183, 127, 96, 196, 68, 47, 48, 49, 50, 71, - 51, 52, 80, 81, 82, 83, 82, 83, 197, 147, - 128, 176, 177, 204, 177, 46, 47, 48, 49, 50, - 120, 51, 52, 1, 2, 127, 72, 73, 86, 3, - 4, 5, 6, 7, 8, 9, 10, 85, 87, 88, - 11, 12, 13, 47, 48, 149, 50, 89, 90, 91, - 14, 15, 92, 93, 97, 98, 103, 107, 16, 114, - 17, 104, 108, 18, 119, 110, 150, 151, 152, 153, - 154, 155, 156, 157, 115, 117, 124, 118, 131, 140, - 134, 142, 143, 76, 144, 148, 160, 163, 169, 170, - 178, 186, 179, 193, 180, 187, 189, 191, 195, 200, - 194, 199, 202, 208, 206, 66, 198, 205, 190, 168, - 84, 162, 175, 207, 159, 0, 203 -}; - -static const yytype_int16 yycheck[] = -{ - 89, 4, 4, 4, 108, 160, 106, 85, 4, 22, - 20, 111, 20, 61, 45, 31, 9, 36, 11, 108, - 51, 9, 30, 11, 32, 35, 39, 26, 27, 28, - 29, 38, 30, 10, 32, 124, 20, 21, 61, 194, - 21, 61, 131, 59, 60, 61, 62, 31, 49, 80, - 81, 82, 83, 44, 158, 159, 160, 20, 0, 61, - 61, 63, 64, 65, 66, 61, 144, 61, 31, 158, - 159, 160, 75, 173, 3, 59, 60, 61, 62, 61, - 64, 65, 63, 64, 65, 66, 65, 66, 177, 178, - 194, 21, 22, 21, 22, 31, 59, 60, 61, 62, - 103, 64, 65, 6, 7, 194, 61, 61, 61, 12, - 13, 14, 15, 16, 17, 18, 19, 38, 61, 41, - 23, 24, 25, 59, 60, 30, 62, 51, 45, 20, - 33, 34, 42, 42, 61, 61, 22, 37, 41, 62, - 43, 61, 39, 46, 21, 61, 51, 52, 53, 54, - 55, 56, 57, 58, 61, 61, 20, 61, 51, 22, - 36, 20, 50, 35, 22, 22, 40, 9, 21, 61, - 20, 61, 57, 21, 30, 59, 31, 47, 49, 48, - 42, 21, 50, 61, 51, 18, 178, 199, 168, 140, - 55, 132, 144, 202, 128, -1, 196 -}; +static const yytype_uint8 yytable[] = {113, + 58, + 78, + 78, + 128, + 185, + 123, + 105, + 78, + 132, + 75, + 133, + 164, + 59, + 74, + 46, + 41, + 61, + 42, + 127, + 77, + 43, + 165, + 44, + 166, + 76, + 108, + 135, + 136, + 137, + 138, + 62, + 165, + 60, + 166, + 147, + 45, + 95, + 63, + 201, + 94, + 64, + 161, + 47, + 48, + 126, + 50, + 46, + 121, + 99, + 100, + 101, + 102, + 65, + 182, + 184, + 128, + 45, + 67, + 79, + 79, + 80, + 81, + 82, + 83, + 79, + 174, + 70, + 46, + 181, + 183, + 127, + 96, + 196, + 68, + 47, + 48, + 49, + 50, + 71, + 51, + 52, + 80, + 81, + 82, + 83, + 82, + 83, + 197, + 147, + 128, + 176, + 177, + 204, + 177, + 46, + 47, + 48, + 49, + 50, + 120, + 51, + 52, + 1, + 2, + 127, + 72, + 73, + 86, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 85, + 87, + 88, + 11, + 12, + 13, + 47, + 48, + 149, + 50, + 89, + 90, + 91, + 14, + 15, + 92, + 93, + 97, + 98, + 103, + 107, + 16, + 114, + 17, + 104, + 108, + 18, + 119, + 110, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 115, + 117, + 124, + 118, + 131, + 140, + 134, + 142, + 143, + 76, + 144, + 148, + 160, + 163, + 169, + 170, + 178, + 186, + 179, + 193, + 180, + 187, + 189, + 191, + 195, + 200, + 194, + 199, + 202, + 208, + 206, + 66, + 198, + 205, + 190, + 168, + 84, + 162, + 175, + 207, + 159, + 0, + 203}; + +static const yytype_int16 yycheck[] = {89, + 4, + 4, + 4, + 108, + 160, + 106, + 85, + 4, + 22, + 20, + 111, + 20, + 61, + 45, + 31, + 9, + 36, + 11, + 108, + 51, + 9, + 30, + 11, + 32, + 35, + 39, + 26, + 27, + 28, + 29, + 38, + 30, + 10, + 32, + 124, + 20, + 21, + 61, + 194, + 21, + 61, + 131, + 59, + 60, + 61, + 62, + 31, + 49, + 80, + 81, + 82, + 83, + 44, + 158, + 159, + 160, + 20, + 0, + 61, + 61, + 63, + 64, + 65, + 66, + 61, + 144, + 61, + 31, + 158, + 159, + 160, + 75, + 173, + 3, + 59, + 60, + 61, + 62, + 61, + 64, + 65, + 63, + 64, + 65, + 66, + 65, + 66, + 177, + 178, + 194, + 21, + 22, + 21, + 22, + 31, + 59, + 60, + 61, + 62, + 103, + 64, + 65, + 6, + 7, + 194, + 61, + 61, + 61, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 38, + 61, + 41, + 23, + 24, + 25, + 59, + 60, + 30, + 62, + 51, + 45, + 20, + 33, + 34, + 42, + 42, + 61, + 61, + 22, + 37, + 41, + 62, + 43, + 61, + 39, + 46, + 21, + 61, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 61, + 61, + 20, + 61, + 51, + 22, + 36, + 20, + 50, + 35, + 22, + 22, + 40, + 9, + 21, + 61, + 20, + 61, + 57, + 21, + 30, + 59, + 31, + 47, + 49, + 48, + 42, + 21, + 50, + 61, + 51, + 18, + 178, + 199, + 168, + 140, + 55, + 132, + 144, + 202, + 128, + -1, + 196}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_int8 yystos[] = -{ - 0, 6, 7, 12, 13, 14, 15, 16, 17, 18, - 19, 23, 24, 25, 33, 34, 41, 43, 46, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 88, 93, 94, 97, 98, 113, 114, - 115, 9, 11, 9, 11, 20, 31, 59, 60, 61, - 62, 64, 65, 91, 99, 100, 102, 103, 99, 61, - 10, 36, 38, 61, 61, 44, 70, 0, 3, 116, - 61, 61, 61, 61, 100, 20, 35, 100, 4, 61, - 63, 64, 65, 66, 101, 38, 61, 61, 41, 51, - 45, 20, 42, 42, 21, 21, 99, 61, 61, 100, - 100, 100, 100, 22, 61, 104, 105, 37, 39, 108, - 61, 95, 96, 91, 62, 61, 84, 61, 61, 21, - 99, 49, 101, 108, 20, 89, 61, 91, 103, 109, - 110, 51, 22, 108, 36, 26, 27, 28, 29, 87, - 22, 83, 20, 50, 22, 112, 90, 91, 22, 30, - 51, 52, 53, 54, 55, 56, 57, 58, 111, 111, - 40, 91, 96, 9, 20, 30, 32, 85, 84, 21, - 61, 104, 106, 107, 104, 105, 21, 22, 20, 57, - 30, 91, 103, 91, 103, 109, 61, 59, 86, 31, - 83, 47, 92, 21, 42, 49, 108, 91, 90, 21, - 48, 109, 50, 112, 21, 85, 51, 107, 61 -}; +static const yytype_int8 yystos[] = {0, + 6, + 7, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 23, + 24, + 25, + 33, + 34, + 41, + 43, + 46, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 88, + 93, + 94, + 97, + 98, + 113, + 114, + 115, + 9, + 11, + 9, + 11, + 20, + 31, + 59, + 60, + 61, + 62, + 64, + 65, + 91, + 99, + 100, + 102, + 103, + 99, + 61, + 10, + 36, + 38, + 61, + 61, + 44, + 70, + 0, + 3, + 116, + 61, + 61, + 61, + 61, + 100, + 20, + 35, + 100, + 4, + 61, + 63, + 64, + 65, + 66, + 101, + 38, + 61, + 61, + 41, + 51, + 45, + 20, + 42, + 42, + 21, + 21, + 99, + 61, + 61, + 100, + 100, + 100, + 100, + 22, + 61, + 104, + 105, + 37, + 39, + 108, + 61, + 95, + 96, + 91, + 62, + 61, + 84, + 61, + 61, + 21, + 99, + 49, + 101, + 108, + 20, + 89, + 61, + 91, + 103, + 109, + 110, + 51, + 22, + 108, + 36, + 26, + 27, + 28, + 29, + 87, + 22, + 83, + 20, + 50, + 22, + 112, + 90, + 91, + 22, + 30, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 111, + 111, + 40, + 91, + 96, + 9, + 20, + 30, + 32, + 85, + 84, + 21, + 61, + 104, + 106, + 107, + 104, + 105, + 21, + 22, + 20, + 57, + 30, + 91, + 103, + 91, + 103, + 109, + 61, + 59, + 86, + 31, + 83, + 47, + 92, + 21, + 42, + 49, + 108, + 91, + 90, + 21, + 48, + 109, + 50, + 112, + 21, + 85, + 51, + 107, + 61}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr1[] = -{ - 0, 68, 69, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 83, 84, 84, 85, - 85, 85, 86, 87, 87, 87, 87, 88, 89, 89, - 90, 90, 91, 91, 91, 91, 92, 92, 93, 94, - 95, 95, 96, 97, 97, 98, 99, 99, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, 101, 101, - 101, 102, 102, 103, 103, 104, 105, 105, 106, 107, - 107, 108, 108, 109, 109, 109, 110, 110, 110, 110, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 112, 113, 114, 115, 116, 116 -}; +static const yytype_int8 yyr1[] = {0, + 68, + 69, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 83, + 84, + 84, + 85, + 85, + 85, + 86, + 87, + 87, + 87, + 87, + 88, + 89, + 89, + 90, + 90, + 91, + 91, + 91, + 91, + 92, + 92, + 93, + 94, + 95, + 95, + 96, + 97, + 97, + 98, + 99, + 99, + 100, + 100, + 100, + 100, + 100, + 100, + 100, + 100, + 100, + 100, + 101, + 101, + 101, + 102, + 102, + 103, + 103, + 104, + 105, + 105, + 106, + 107, + 107, + 108, + 108, + 109, + 109, + 109, + 110, + 110, + 110, + 110, + 111, + 111, + 111, + 111, + 111, + 111, + 111, + 111, + 111, + 111, + 112, + 113, + 114, + 115, + 116, + 116}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = +static const yytype_int8 yyr2[] = {0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 2, + 2, + 8, + 5, + 8, + 0, + 3, + 6, + 3, + 2, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 5, + 3, + 5, + 1, + 3, + 1, + 1, + 1, + 1, + 0, + 4, + 4, + 5, + 1, + 3, + 3, + 6, + 9, + 2, + 2, + 4, + 3, + 3, + 3, + 3, + 3, + 2, + 1, + 1, + 1, + 1, + 0, + 1, + 2, + 4, + 3, + 1, + 3, + 1, + 2, + 4, + 3, + 1, + 4, + 0, + 2, + 0, + 1, + 3, + 3, + 3, + 3, + 3, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 2, + 0, + 7, + 2, + 4, + 0, + 1}; + +enum { - 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 2, 2, 8, 5, 8, 0, 3, 6, 3, 2, - 1, 0, 1, 1, 1, 1, 1, 5, 3, 5, - 1, 3, 1, 1, 1, 1, 0, 4, 4, 5, - 1, 3, 3, 6, 9, 2, 2, 4, 3, 3, - 3, 3, 3, 2, 1, 1, 1, 1, 0, 1, - 2, 4, 3, 1, 3, 1, 2, 4, 3, 1, - 4, 0, 2, 0, 1, 3, 3, 3, 3, 3, - 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, - 0, 7, 2, 4, 0, 1 + YYENOMEM = -2 }; - -enum { YYENOMEM = -2 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK(yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } else { \ + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -953,151 +2575,131 @@ enum { YYENOMEM = -2 }; the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) +#define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) { \ + (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ + } else { \ + (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) - /* Enable debugging if requested. */ #if YYDEBUG -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +#ifndef YYFPRINTF +#include /* INFRINGES ON USER NAME SPACE */ +#define YYFPRINTF fprintf +#endif +#define YYDPRINTF(Args) \ + do { \ + if (yydebug) \ + YYFPRINTF Args; \ + } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YYLOCATION_PRINT +#ifndef YYLOCATION_PRINT -# if defined YY_LOCATION_PRINT +#if defined YY_LOCATION_PRINT - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) { + res += YYFPRINTF(yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF(yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) { + if (yylocp->first_line < yylocp->last_line) { + res += YYFPRINTF(yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF(yyo, ".%d", end_col); + } else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF(yyo, "-%d", end_col); + } return res; } -# define YYLOCATION_PRINT yy_location_print_ - - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) - -# else +#define YYLOCATION_PRINT yy_location_print_ -# define YYLOCATION_PRINT(File, Loc) ((void) 0) - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT YYLOCATION_PRINT +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -# endif -# endif /* !defined YYLOCATION_PRINT */ +#else +#define YYLOCATION_PRINT(File, Loc) ((void)0) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT YYLOCATION_PRINT -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +#endif +#endif /* !defined YYLOCATION_PRINT */ +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ + do { \ + if (yydebug) { \ + YYFPRINTF(stderr, "%s ", Title); \ + yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF(stderr, "\n"); \ + } \ + } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyoutput); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); - YYLOCATION_PRINT (yyo, yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF (yyo, ")"); + YYLOCATION_PRINT(yyo, yylocationp); + YYFPRINTF(yyo, ": "); + yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF(yyo, ")"); } /*------------------------------------------------------------------. @@ -1105,70 +2707,66 @@ yy_symbol_print (FILE *yyo, | TOP (included). | `------------------------------------------------------------------*/ -static void -yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); + YYFPRINTF(stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) { + int yybot = *yybottom; + YYFPRINTF(stderr, " %d", yybot); + } + YYFPRINTF(stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - +#define YY_STACK_PRINT(Bottom, Top) \ + do { \ + if (yydebug) \ + yy_stack_print((Bottom), (Top)); \ + } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, + ParsedSqlResult *sql_result, void *scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", - yyrule - 1, yylno); + YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); - YYFPRINTF (stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) { + YYFPRINTF(stderr, " $%d = ", yyi + 1); + yy_symbol_print(stderr, + YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), + sql_string, + sql_result, + scanner); + YYFPRINTF(stderr, "\n"); + } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ -} while (0) +#define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug) \ + yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ + } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) +#define YYDPRINTF(Args) ((void)0) +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +#define YY_STACK_PRINT(Bottom, Top) +#define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -1179,16 +2777,15 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 +#define YYMAXDEPTH 10000 #endif - /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -1197,69 +2794,59 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default(yyn)) { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } - - - #ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else +#if defined __GLIBC__ && defined _STRING_H +#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) +#else /* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) +static YYPTRDIFF_T yystrlen(const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -# endif +#endif #endif #ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +#define yystpcpy stpcpy +#else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) +static char *yystpcpy(char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -1267,7 +2854,7 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } -# endif +#endif #endif #ifndef yytnamerr @@ -1278,52 +2865,45 @@ yystpcpy (char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) +static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) { - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': + if (*yystr == '"') { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) { + case '\'': + case ',': goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes:; + } if (yyres) - return yystpcpy (yyres, yystr) - yyres; + return yystpcpy(yyres, yystr) - yyres; else - return yystrlen (yystr); + return yystrlen(yystr); } #endif - -static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -1350,19 +2930,17 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) - { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -1374,11 +2952,12 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) +static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) { - enum { YYARGS_MAX = 5 }; + enum + { + YYARGS_MAX = 5 + }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -1388,16 +2967,13 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) - { -#define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break + switch (yycount) { +#define YYCASE_(N, S) \ + case N: yyformat = S; break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1406,134 +2982,118 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; + yysize = yystrlen(yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) { + YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) { + *yymsg_alloc = 2 * yysize; + if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { + yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } else { + ++yyp; + ++yyformat; + } } return 0; } - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, + const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyvaluep); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - - - - /*----------. | yyparse. | `----------*/ -int -yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { -/* Lookahead token kind. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; + /* Lookahead token kind. */ + int yychar; + + /* The semantic value of the lookahead symbol. */ + /* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ + YY_INITIAL_VALUE(static YYSTYPE yyval_default;) + YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); + + /* Location data for the lookahead symbol. */ + static YYLTYPE yyloc_default +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = {1, 1, 1, 1} +#endif + ; + YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -1549,24 +3109,23 @@ YYLTYPE yylloc = yyloc_default; YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF ((stderr, "Starting parse\n")); + YYDPRINTF((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; - /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -1575,93 +3134,90 @@ YYLTYPE yylloc = yyloc_default; have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YYDPRINTF((stderr, "Entering state %d\n", yystate)); + YY_ASSERT(0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST (yy_state_t, yystate); + *yyssp = YY_CAST(yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else + { + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +#if defined yyoverflow { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -# if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * YYSIZEOF (*yyssp), - &yyvs1, yysize * YYSIZEOF (*yyvsp), - &yyls1, yysize * YYSIZEOF (*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow(YY_("memory exhausted"), + &yyss1, + yysize * YYSIZEOF(*yyssp), + &yyvs1, + yysize * YYSIZEOF(*yyvsp), + &yyls1, + yysize * YYSIZEOF(*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +#else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + YYNOMEM; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); + if (!yyptr) YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = - YY_CAST (union yyalloc *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); - if (! yyptr) - YYNOMEM; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif + YYSTACK_RELOCATE(yyss_alloc, yyss); + YYSTACK_RELOCATE(yyvs_alloc, yyvs); + YYSTACK_RELOCATE(yyls_alloc, yyls); +#undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE(yyss1); + } +#endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF ((stderr, "Stack size increased to %ld\n", - YY_CAST (long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; goto yybackup; - /*-----------. | yybackup. | `-----------*/ @@ -1671,40 +3227,34 @@ YYLTYPE yylloc = yyloc_default; /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yypact_value_is_default(yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token\n")); - yychar = yylex (&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) { + YYDPRINTF((stderr, "Reading a token\n")); + yychar = yylex(&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) - { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else if (yychar == YYerror) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF((stderr, "Now at end of input.\n")); + } else if (yychar == YYerror) { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } else { + yytoken = YYTRANSLATE(yychar); + YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -1712,13 +3262,12 @@ YYLTYPE yylloc = yyloc_default; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) { + if (yytable_value_is_error(yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -1726,7 +3275,7 @@ YYLTYPE yylloc = yyloc_default; yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -1737,7 +3286,6 @@ YYLTYPE yylloc = yyloc_default; yychar = YYEMPTY; goto yynewstate; - /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -1747,7 +3295,6 @@ YYLTYPE yylloc = yyloc_default; goto yyerrlab; goto yyreduce; - /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -1763,108 +3310,107 @@ YYLTYPE yylloc = yyloc_default; users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + yyval = yyvsp[1 - yylen]; /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: /* commands: command_wrapper opt_semicolon */ + YY_REDUCE_PRINT(yyn); + switch (yyn) { + case 2: /* commands: command_wrapper opt_semicolon */ #line 212 "yacc_sql.y" - { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } #line 1781 "yacc_sql.cpp" break; - case 23: /* exit_stmt: EXIT */ + case 23: /* exit_stmt: EXIT */ #line 242 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } #line 1790 "yacc_sql.cpp" break; - case 24: /* help_stmt: HELP */ + case 24: /* help_stmt: HELP */ #line 248 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } #line 1798 "yacc_sql.cpp" break; - case 25: /* sync_stmt: SYNC */ + case 25: /* sync_stmt: SYNC */ #line 253 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } #line 1806 "yacc_sql.cpp" break; - case 26: /* begin_stmt: TRX_BEGIN */ + case 26: /* begin_stmt: TRX_BEGIN */ #line 259 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } #line 1814 "yacc_sql.cpp" break; - case 27: /* commit_stmt: TRX_COMMIT */ + case 27: /* commit_stmt: TRX_COMMIT */ #line 265 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } #line 1822 "yacc_sql.cpp" break; - case 28: /* rollback_stmt: TRX_ROLLBACK */ + case 28: /* rollback_stmt: TRX_ROLLBACK */ #line 271 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } #line 1830 "yacc_sql.cpp" break; - case 29: /* drop_table_stmt: DROP TABLE ID */ + case 29: /* drop_table_stmt: DROP TABLE ID */ #line 277 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1840 "yacc_sql.cpp" break; - case 30: /* show_tables_stmt: SHOW TABLES */ + case 30: /* show_tables_stmt: SHOW TABLES */ #line 284 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } #line 1848 "yacc_sql.cpp" break; - case 31: /* desc_table_stmt: DESC ID */ + case 31: /* desc_table_stmt: DESC ID */ #line 290 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1858 "yacc_sql.cpp" break; - case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ + case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ #line 299 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name = (yyvsp[-1].string); + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name = (yyvsp[-1].string); free((yyvsp[-5].string)); free((yyvsp[-3].string)); free((yyvsp[-1].string)); @@ -1872,11 +3418,11 @@ YYLTYPE yylloc = yyloc_default; #line 1873 "yacc_sql.cpp" break; - case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 313 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); @@ -1884,12 +3430,12 @@ YYLTYPE yylloc = yyloc_default; #line 1885 "yacc_sql.cpp" break; - case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 323 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-5].string); + create_table.relation_name = (yyvsp[-5].string); free((yyvsp[-5].string)); std::vector *src_attrs = (yyvsp[-2].attr_infos); @@ -1909,7 +3455,7 @@ YYLTYPE yylloc = yyloc_default; #line 1910 "yacc_sql.cpp" break; - case 35: /* attr_def_list: %empty */ + case 35: /* attr_def_list: %empty */ #line 346 "yacc_sql.y" { (yyval.attr_infos) = nullptr; @@ -1917,7 +3463,7 @@ YYLTYPE yylloc = yyloc_default; #line 1918 "yacc_sql.cpp" break; - case 36: /* attr_def_list: COMMA attr_def attr_def_list */ + case 36: /* attr_def_list: COMMA attr_def attr_def_list */ #line 350 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -1931,13 +3477,13 @@ YYLTYPE yylloc = yyloc_default; #line 1932 "yacc_sql.cpp" break; - case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ + case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ #line 363 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; @@ -1947,10 +3493,10 @@ YYLTYPE yylloc = yyloc_default; #line 1948 "yacc_sql.cpp" break; - case 38: /* attr_def: ID type nullable_constraint */ + case 38: /* attr_def: ID type nullable_constraint */ #line 375 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -1973,7 +3519,7 @@ YYLTYPE yylloc = yyloc_default; #line 1974 "yacc_sql.cpp" break; - case 39: /* nullable_constraint: NOT NULL_T */ + case 39: /* nullable_constraint: NOT NULL_T */ #line 400 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false @@ -1981,7 +3527,7 @@ YYLTYPE yylloc = yyloc_default; #line 1982 "yacc_sql.cpp" break; - case 40: /* nullable_constraint: NULLABLE */ + case 40: /* nullable_constraint: NULLABLE */ #line 404 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true @@ -1989,7 +3535,7 @@ YYLTYPE yylloc = yyloc_default; #line 1990 "yacc_sql.cpp" break; - case 41: /* nullable_constraint: %empty */ + case 41: /* nullable_constraint: %empty */ #line 408 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL @@ -1997,40 +3543,50 @@ YYLTYPE yylloc = yyloc_default; #line 1998 "yacc_sql.cpp" break; - case 42: /* number: NUMBER */ + case 42: /* number: NUMBER */ #line 414 "yacc_sql.y" - {(yyval.number) = (yyvsp[0].number);} + { + (yyval.number) = (yyvsp[0].number); + } #line 2004 "yacc_sql.cpp" break; - case 43: /* type: INT_T */ + case 43: /* type: INT_T */ #line 417 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::INTS); } + { + (yyval.number) = static_cast(AttrType::INTS); + } #line 2010 "yacc_sql.cpp" break; - case 44: /* type: STRING_T */ + case 44: /* type: STRING_T */ #line 418 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::CHARS); } + { + (yyval.number) = static_cast(AttrType::CHARS); + } #line 2016 "yacc_sql.cpp" break; - case 45: /* type: FLOAT_T */ + case 45: /* type: FLOAT_T */ #line 419 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::FLOATS); } + { + (yyval.number) = static_cast(AttrType::FLOATS); + } #line 2022 "yacc_sql.cpp" break; - case 46: /* type: DATE_T */ + case 46: /* type: DATE_T */ #line 420 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::DATES); } + { + (yyval.number) = static_cast(AttrType::DATES); + } #line 2028 "yacc_sql.cpp" break; - case 47: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 47: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 425 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -2041,7 +3597,7 @@ YYLTYPE yylloc = yyloc_default; #line 2042 "yacc_sql.cpp" break; - case 48: /* values_list: LBRACE value_list RBRACE */ + case 48: /* values_list: LBRACE value_list RBRACE */ #line 438 "yacc_sql.y" { (yyval.values_list) = new std::vector>; @@ -2051,7 +3607,7 @@ YYLTYPE yylloc = yyloc_default; #line 2052 "yacc_sql.cpp" break; - case 49: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 49: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 444 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); @@ -2060,7 +3616,7 @@ YYLTYPE yylloc = yyloc_default; #line 2061 "yacc_sql.cpp" break; - case 50: /* value_list: value */ + case 50: /* value_list: value */ #line 451 "yacc_sql.y" { (yyval.value_list) = new std::vector; @@ -2070,7 +3626,7 @@ YYLTYPE yylloc = yyloc_default; #line 2071 "yacc_sql.cpp" break; - case 51: /* value_list: value_list COMMA value */ + case 51: /* value_list: value_list COMMA value */ #line 457 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); @@ -2079,28 +3635,28 @@ YYLTYPE yylloc = yyloc_default; #line 2080 "yacc_sql.cpp" break; - case 52: /* value: NUMBER */ + case 52: /* value: NUMBER */ #line 464 "yacc_sql.y" - { + { (yyval.value) = new Value((int)(yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2089 "yacc_sql.cpp" break; - case 53: /* value: FLOAT */ + case 53: /* value: FLOAT */ #line 468 "yacc_sql.y" - { + { (yyval.value) = new Value((float)(yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2098 "yacc_sql.cpp" break; - case 54: /* value: SSS */ + case 54: /* value: SSS */ #line 472 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); + { + char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); @@ -2108,15 +3664,15 @@ YYLTYPE yylloc = yyloc_default; #line 2109 "yacc_sql.cpp" break; - case 55: /* value: NULL_T */ + case 55: /* value: NULL_T */ #line 478 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } #line 2117 "yacc_sql.cpp" break; - case 56: /* storage_format: %empty */ + case 56: /* storage_format: %empty */ #line 485 "yacc_sql.y" { (yyval.string) = nullptr; @@ -2124,7 +3680,7 @@ YYLTYPE yylloc = yyloc_default; #line 2125 "yacc_sql.cpp" break; - case 57: /* storage_format: STORAGE FORMAT EQ ID */ + case 57: /* storage_format: STORAGE FORMAT EQ ID */ #line 489 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); @@ -2132,10 +3688,10 @@ YYLTYPE yylloc = yyloc_default; #line 2133 "yacc_sql.cpp" break; - case 58: /* delete_stmt: DELETE FROM ID where */ + case 58: /* delete_stmt: DELETE FROM ID where */ #line 496 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].condition_list) != nullptr) { (yyval.sql_node)->deletion.conditions.swap(*(yyvsp[0].condition_list)); @@ -2146,10 +3702,10 @@ YYLTYPE yylloc = yyloc_default; #line 2147 "yacc_sql.cpp" break; - case 59: /* update_stmt: UPDATE ID SET setClauses where */ + case 59: /* update_stmt: UPDATE ID SET setClauses where */ #line 509 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].condition_list) != nullptr) { @@ -2162,7 +3718,7 @@ YYLTYPE yylloc = yyloc_default; #line 2163 "yacc_sql.cpp" break; - case 60: /* setClauses: setClause */ + case 60: /* setClauses: setClause */ #line 524 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; @@ -2172,7 +3728,7 @@ YYLTYPE yylloc = yyloc_default; #line 2173 "yacc_sql.cpp" break; - case 61: /* setClauses: setClauses COMMA setClause */ + case 61: /* setClauses: setClauses COMMA setClause */ #line 530 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); @@ -2181,18 +3737,18 @@ YYLTYPE yylloc = yyloc_default; #line 2182 "yacc_sql.cpp" break; - case 62: /* setClause: ID EQ value */ + case 62: /* setClause: ID EQ value */ #line 538 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); + (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } #line 2193 "yacc_sql.cpp" break; - case 63: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ + case 63: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ #line 548 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2219,7 +3775,7 @@ YYLTYPE yylloc = yyloc_default; #line 2220 "yacc_sql.cpp" break; - case 64: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ + case 64: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ #line 571 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2256,7 +3812,7 @@ YYLTYPE yylloc = yyloc_default; #line 2257 "yacc_sql.cpp" break; - case 65: /* calc_stmt: CALC expression_list */ + case 65: /* calc_stmt: CALC expression_list */ #line 607 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -2266,7 +3822,7 @@ YYLTYPE yylloc = yyloc_default; #line 2267 "yacc_sql.cpp" break; - case 66: /* expression_list: expression alias */ + case 66: /* expression_list: expression alias */ #line 616 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; @@ -2279,7 +3835,7 @@ YYLTYPE yylloc = yyloc_default; #line 2280 "yacc_sql.cpp" break; - case 67: /* expression_list: expression alias COMMA expression_list */ + case 67: /* expression_list: expression alias COMMA expression_list */ #line 625 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -2290,64 +3846,69 @@ YYLTYPE yylloc = yyloc_default; if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } #line 2297 "yacc_sql.cpp" break; - case 68: /* expression: expression '+' expression */ + case 68: /* expression: expression '+' expression */ #line 639 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2305 "yacc_sql.cpp" break; - case 69: /* expression: expression '-' expression */ + case 69: /* expression: expression '-' expression */ #line 642 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2313 "yacc_sql.cpp" break; - case 70: /* expression: expression '*' expression */ + case 70: /* expression: expression '*' expression */ #line 645 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2321 "yacc_sql.cpp" break; - case 71: /* expression: expression '/' expression */ + case 71: /* expression: expression '/' expression */ #line 648 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2329 "yacc_sql.cpp" break; - case 72: /* expression: LBRACE expression RBRACE */ + case 72: /* expression: LBRACE expression RBRACE */ #line 651 "yacc_sql.y" - { + { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } #line 2338 "yacc_sql.cpp" break; - case 73: /* expression: '-' expression */ + case 73: /* expression: '-' expression */ #line 655 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } #line 2346 "yacc_sql.cpp" break; - case 74: /* expression: value */ + case 74: /* expression: value */ #line 658 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); @@ -2355,91 +3916,91 @@ YYLTYPE yylloc = yyloc_default; #line 2356 "yacc_sql.cpp" break; - case 75: /* expression: rel_attr */ + case 75: /* expression: rel_attr */ #line 663 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } #line 2367 "yacc_sql.cpp" break; - case 76: /* expression: '*' */ + case 76: /* expression: '*' */ #line 669 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } #line 2375 "yacc_sql.cpp" break; - case 77: /* expression: aggr_func_expr */ + case 77: /* expression: aggr_func_expr */ #line 672 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } #line 2383 "yacc_sql.cpp" break; - case 78: /* alias: %empty */ + case 78: /* alias: %empty */ #line 679 "yacc_sql.y" - { + { (yyval.string) = nullptr; } #line 2391 "yacc_sql.cpp" break; - case 79: /* alias: ID */ + case 79: /* alias: ID */ #line 682 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2399 "yacc_sql.cpp" break; - case 80: /* alias: AS ID */ + case 80: /* alias: AS ID */ #line 685 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2407 "yacc_sql.cpp" break; - case 81: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 81: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 691 "yacc_sql.y" { - if((*(yyvsp[-1].expression_list)).size() != 1) { - (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); - } else { - (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); - } + if ((*(yyvsp[-1].expression_list)).size() != 1) { + (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); + } else { + (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); + } } #line 2419 "yacc_sql.cpp" break; - case 82: /* aggr_func_expr: ID LBRACE RBRACE */ + case 82: /* aggr_func_expr: ID LBRACE RBRACE */ #line 699 "yacc_sql.y" - { - (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); - } + { + (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); + } #line 2427 "yacc_sql.cpp" break; - case 83: /* rel_attr: ID */ + case 83: /* rel_attr: ID */ #line 704 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 2437 "yacc_sql.cpp" break; - case 84: /* rel_attr: ID DOT ID */ + case 84: /* rel_attr: ID DOT ID */ #line 709 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); @@ -2448,22 +4009,22 @@ YYLTYPE yylloc = yyloc_default; #line 2449 "yacc_sql.cpp" break; - case 85: /* relation: ID */ + case 85: /* relation: ID */ #line 719 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2457 "yacc_sql.cpp" break; - case 86: /* rel_list: relation alias */ + case 86: /* rel_list: relation alias */ #line 725 "yacc_sql.y" - { + { (yyval.relation_list) = new std::vector(); - if(nullptr!=(yyvsp[0].string)){ - (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); + if (nullptr != (yyvsp[0].string)) { + (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); free((yyvsp[0].string)); - }else{ + } else { (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); @@ -2471,18 +4032,19 @@ YYLTYPE yylloc = yyloc_default; #line 2472 "yacc_sql.cpp" break; - case 87: /* rel_list: relation alias COMMA rel_list */ + case 87: /* rel_list: relation alias COMMA rel_list */ #line 735 "yacc_sql.y" - { + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if(nullptr!=(yyvsp[-2].string)){ - (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); + if (nullptr != (yyvsp[-2].string)) { + (yyval.relation_list) + ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); free((yyvsp[-2].string)); - }else{ + } else { (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } @@ -2491,10 +4053,10 @@ YYLTYPE yylloc = yyloc_default; #line 2492 "yacc_sql.cpp" break; - case 88: /* joinClause: relation ON condition_list */ + case 88: /* joinClause: relation ON condition_list */ #line 754 "yacc_sql.y" { - (yyval.join_clause) = new JoinSqlNode; + (yyval.join_clause) = new JoinSqlNode; (yyval.join_clause)->relation = (yyvsp[-2].string); (yyval.join_clause)->conditions.swap(*(yyvsp[0].condition_list)); free((yyvsp[-2].string)); @@ -2503,7 +4065,7 @@ YYLTYPE yylloc = yyloc_default; #line 2504 "yacc_sql.cpp" break; - case 89: /* joinClauses: joinClause */ + case 89: /* joinClauses: joinClause */ #line 765 "yacc_sql.y" { (yyval.join_clauses) = new std::vector; @@ -2513,7 +4075,7 @@ YYLTYPE yylloc = yyloc_default; #line 2514 "yacc_sql.cpp" break; - case 90: /* joinClauses: joinClause INNER JOIN joinClauses */ + case 90: /* joinClauses: joinClause INNER JOIN joinClauses */ #line 771 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); @@ -2523,7 +4085,7 @@ YYLTYPE yylloc = yyloc_default; #line 2524 "yacc_sql.cpp" break; - case 91: /* where: %empty */ + case 91: /* where: %empty */ #line 780 "yacc_sql.y" { (yyval.condition_list) = nullptr; @@ -2531,15 +4093,15 @@ YYLTYPE yylloc = yyloc_default; #line 2532 "yacc_sql.cpp" break; - case 92: /* where: WHERE condition_list */ + case 92: /* where: WHERE condition_list */ #line 783 "yacc_sql.y" - { - (yyval.condition_list) = (yyvsp[0].condition_list); + { + (yyval.condition_list) = (yyvsp[0].condition_list); } #line 2540 "yacc_sql.cpp" break; - case 93: /* condition_list: %empty */ + case 93: /* condition_list: %empty */ #line 789 "yacc_sql.y" { (yyval.condition_list) = nullptr; @@ -2547,9 +4109,9 @@ YYLTYPE yylloc = yyloc_default; #line 2548 "yacc_sql.cpp" break; - case 94: /* condition_list: condition */ + case 94: /* condition_list: condition */ #line 792 "yacc_sql.y" - { + { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); @@ -2557,9 +4119,9 @@ YYLTYPE yylloc = yyloc_default; #line 2558 "yacc_sql.cpp" break; - case 95: /* condition_list: condition AND condition_list */ + case 95: /* condition_list: condition AND condition_list */ #line 797 "yacc_sql.y" - { + { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); @@ -2567,15 +4129,15 @@ YYLTYPE yylloc = yyloc_default; #line 2568 "yacc_sql.cpp" break; - case 96: /* condition: rel_attr comp_op value */ + case 96: /* condition: rel_attr comp_op value */ #line 805 "yacc_sql.y" { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 1; - (yyval.condition)->left_attr = *(yyvsp[-2].rel_attr); + (yyval.condition) = new ConditionSqlNode; + (yyval.condition)->left_is_attr = 1; + (yyval.condition)->left_attr = *(yyvsp[-2].rel_attr); (yyval.condition)->right_is_attr = 0; - (yyval.condition)->right_value = *(yyvsp[0].value); - (yyval.condition)->comp = (yyvsp[-1].comp); + (yyval.condition)->right_value = *(yyvsp[0].value); + (yyval.condition)->comp = (yyvsp[-1].comp); delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); @@ -2583,15 +4145,15 @@ YYLTYPE yylloc = yyloc_default; #line 2584 "yacc_sql.cpp" break; - case 97: /* condition: value comp_op value */ + case 97: /* condition: value comp_op value */ #line 817 "yacc_sql.y" { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 0; - (yyval.condition)->left_value = *(yyvsp[-2].value); + (yyval.condition) = new ConditionSqlNode; + (yyval.condition)->left_is_attr = 0; + (yyval.condition)->left_value = *(yyvsp[-2].value); (yyval.condition)->right_is_attr = 0; - (yyval.condition)->right_value = *(yyvsp[0].value); - (yyval.condition)->comp = (yyvsp[-1].comp); + (yyval.condition)->right_value = *(yyvsp[0].value); + (yyval.condition)->comp = (yyvsp[-1].comp); delete (yyvsp[-2].value); delete (yyvsp[0].value); @@ -2599,15 +4161,15 @@ YYLTYPE yylloc = yyloc_default; #line 2600 "yacc_sql.cpp" break; - case 98: /* condition: rel_attr comp_op rel_attr */ + case 98: /* condition: rel_attr comp_op rel_attr */ #line 829 "yacc_sql.y" { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 1; - (yyval.condition)->left_attr = *(yyvsp[-2].rel_attr); + (yyval.condition) = new ConditionSqlNode; + (yyval.condition)->left_is_attr = 1; + (yyval.condition)->left_attr = *(yyvsp[-2].rel_attr); (yyval.condition)->right_is_attr = 1; - (yyval.condition)->right_attr = *(yyvsp[0].rel_attr); - (yyval.condition)->comp = (yyvsp[-1].comp); + (yyval.condition)->right_attr = *(yyvsp[0].rel_attr); + (yyval.condition)->comp = (yyvsp[-1].comp); delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); @@ -2615,15 +4177,15 @@ YYLTYPE yylloc = yyloc_default; #line 2616 "yacc_sql.cpp" break; - case 99: /* condition: value comp_op rel_attr */ + case 99: /* condition: value comp_op rel_attr */ #line 841 "yacc_sql.y" { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 0; - (yyval.condition)->left_value = *(yyvsp[-2].value); + (yyval.condition) = new ConditionSqlNode; + (yyval.condition)->left_is_attr = 0; + (yyval.condition)->left_value = *(yyvsp[-2].value); (yyval.condition)->right_is_attr = 1; - (yyval.condition)->right_attr = *(yyvsp[0].rel_attr); - (yyval.condition)->comp = (yyvsp[-1].comp); + (yyval.condition)->right_attr = *(yyvsp[0].rel_attr); + (yyval.condition)->comp = (yyvsp[-1].comp); delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); @@ -2631,67 +4193,87 @@ YYLTYPE yylloc = yyloc_default; #line 2632 "yacc_sql.cpp" break; - case 100: /* comp_op: EQ */ + case 100: /* comp_op: EQ */ #line 855 "yacc_sql.y" - { (yyval.comp) = EQUAL_TO; } + { + (yyval.comp) = EQUAL_TO; + } #line 2638 "yacc_sql.cpp" break; - case 101: /* comp_op: LT */ + case 101: /* comp_op: LT */ #line 856 "yacc_sql.y" - { (yyval.comp) = LESS_THAN; } + { + (yyval.comp) = LESS_THAN; + } #line 2644 "yacc_sql.cpp" break; - case 102: /* comp_op: GT */ + case 102: /* comp_op: GT */ #line 857 "yacc_sql.y" - { (yyval.comp) = GREAT_THAN; } + { + (yyval.comp) = GREAT_THAN; + } #line 2650 "yacc_sql.cpp" break; - case 103: /* comp_op: LE */ + case 103: /* comp_op: LE */ #line 858 "yacc_sql.y" - { (yyval.comp) = LESS_EQUAL; } + { + (yyval.comp) = LESS_EQUAL; + } #line 2656 "yacc_sql.cpp" break; - case 104: /* comp_op: GE */ + case 104: /* comp_op: GE */ #line 859 "yacc_sql.y" - { (yyval.comp) = GREAT_EQUAL; } + { + (yyval.comp) = GREAT_EQUAL; + } #line 2662 "yacc_sql.cpp" break; - case 105: /* comp_op: NE */ + case 105: /* comp_op: NE */ #line 860 "yacc_sql.y" - { (yyval.comp) = NOT_EQUAL; } + { + (yyval.comp) = NOT_EQUAL; + } #line 2668 "yacc_sql.cpp" break; - case 106: /* comp_op: IS */ + case 106: /* comp_op: IS */ #line 861 "yacc_sql.y" - { (yyval.comp) = OP_IS; } + { + (yyval.comp) = OP_IS; + } #line 2674 "yacc_sql.cpp" break; - case 107: /* comp_op: IS NOT */ + case 107: /* comp_op: IS NOT */ #line 862 "yacc_sql.y" - { (yyval.comp) = OP_IS_NOT; } + { + (yyval.comp) = OP_IS_NOT; + } #line 2680 "yacc_sql.cpp" break; - case 108: /* comp_op: LIKE */ + case 108: /* comp_op: LIKE */ #line 863 "yacc_sql.y" - { (yyval.comp) = LIKE_OP;} + { + (yyval.comp) = LIKE_OP; + } #line 2686 "yacc_sql.cpp" break; - case 109: /* comp_op: NOT LIKE */ + case 109: /* comp_op: NOT LIKE */ #line 864 "yacc_sql.y" - {(yyval.comp) = NOT_LIKE_OP;} + { + (yyval.comp) = NOT_LIKE_OP; + } #line 2692 "yacc_sql.cpp" break; - case 110: /* group_by: %empty */ + case 110: /* group_by: %empty */ #line 870 "yacc_sql.y" { (yyval.expression_list) = nullptr; @@ -2699,33 +4281,33 @@ YYLTYPE yylloc = yyloc_default; #line 2700 "yacc_sql.cpp" break; - case 111: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ + case 111: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ #line 876 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } #line 2714 "yacc_sql.cpp" break; - case 112: /* explain_stmt: EXPLAIN command_wrapper */ + case 112: /* explain_stmt: EXPLAIN command_wrapper */ #line 889 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } #line 2723 "yacc_sql.cpp" break; - case 113: /* set_variable_stmt: SET ID EQ value */ + case 113: /* set_variable_stmt: SET ID EQ value */ #line 897 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); @@ -2734,11 +4316,10 @@ YYLTYPE yylloc = yyloc_default; #line 2735 "yacc_sql.cpp" break; - #line 2739 "yacc_sql.cpp" - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -2750,9 +4331,9 @@ YYLTYPE yylloc = yyloc_default; case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; *++yyvsp = yyval; @@ -2763,84 +4344,67 @@ YYLTYPE yylloc = yyloc_default; number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp - ? yytable[yyi] - : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; - /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) - { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } - } - yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; + if (!yyerrstatus) { + ++yynerrs; + { + yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) { + if (yymsg != yymsgbuf) + YYSTACK_FREE(yymsg); + yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); + if (yymsg) { + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } else { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } } + yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } + } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; - } + if (yychar <= YYEOF) { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else { + yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; } + } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; - /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -2853,45 +4417,40 @@ YYLTYPE yylloc = yyloc_default; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); yystate = *yyssp; goto yyerrlab1; - /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) { + yyn = yypact[yystate]; + if (!yypact_value_is_default(yyn)) { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + yystate = *yyssp; + YY_STACK_PRINT(yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -2899,15 +4458,14 @@ YYLTYPE yylloc = yyloc_default; yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; - /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -2915,7 +4473,6 @@ YYLTYPE yylloc = yyloc_default; yyresult = 0; goto yyreturnlab; - /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -2923,44 +4480,38 @@ YYLTYPE yylloc = yyloc_default; yyresult = 1; goto yyreturnlab; - /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; - /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE(yychar); + yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - } + YYPOPSTACK(yylen); + YY_STACK_PRINT(yyss, yyssp); + while (yyssp != yyss) { + yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE (yyss); + YYSTACK_FREE(yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); + YYSTACK_FREE(yymsg); return yyresult; } @@ -2969,7 +4520,8 @@ YYLTYPE yylloc = yyloc_default; //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) { +int sql_parse(const char *s, ParsedSqlResult *sql_result) +{ yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 9e1a1ee7..90ee2baf 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -# define YY_YY_YACC_SQL_HPP_INCLUDED +#define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -# define YYDEBUG 0 +#define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,117 +47,116 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - BY = 260, /* BY */ - CREATE = 261, /* CREATE */ - DROP = 262, /* DROP */ - GROUP = 263, /* GROUP */ - TABLE = 264, /* TABLE */ - TABLES = 265, /* TABLES */ - INDEX = 266, /* INDEX */ - CALC = 267, /* CALC */ - SELECT = 268, /* SELECT */ - DESC = 269, /* DESC */ - SHOW = 270, /* SHOW */ - SYNC = 271, /* SYNC */ - INSERT = 272, /* INSERT */ - DELETE = 273, /* DELETE */ - UPDATE = 274, /* UPDATE */ - LBRACE = 275, /* LBRACE */ - RBRACE = 276, /* RBRACE */ - COMMA = 277, /* COMMA */ - TRX_BEGIN = 278, /* TRX_BEGIN */ - TRX_COMMIT = 279, /* TRX_COMMIT */ - TRX_ROLLBACK = 280, /* TRX_ROLLBACK */ - INT_T = 281, /* INT_T */ - STRING_T = 282, /* STRING_T */ - FLOAT_T = 283, /* FLOAT_T */ - DATE_T = 284, /* DATE_T */ - NOT = 285, /* NOT */ - NULL_T = 286, /* NULL_T */ - NULLABLE = 287, /* NULLABLE */ - HELP = 288, /* HELP */ - EXIT = 289, /* EXIT */ - DOT = 290, /* DOT */ - INTO = 291, /* INTO */ - VALUES = 292, /* VALUES */ - FROM = 293, /* FROM */ - WHERE = 294, /* WHERE */ - AND = 295, /* AND */ - SET = 296, /* SET */ - ON = 297, /* ON */ - LOAD = 298, /* LOAD */ - DATA = 299, /* DATA */ - INFILE = 300, /* INFILE */ - EXPLAIN = 301, /* EXPLAIN */ - STORAGE = 302, /* STORAGE */ - FORMAT = 303, /* FORMAT */ - INNER = 304, /* INNER */ - JOIN = 305, /* JOIN */ - EQ = 306, /* EQ */ - LT = 307, /* LT */ - GT = 308, /* GT */ - LE = 309, /* LE */ - GE = 310, /* GE */ - NE = 311, /* NE */ - LIKE = 312, /* LIKE */ - IS = 313, /* IS */ - NUMBER = 314, /* NUMBER */ - FLOAT = 315, /* FLOAT */ - ID = 316, /* ID */ - SSS = 317, /* SSS */ - UMINUS = 318 /* UMINUS */ - }; - typedef enum yytokentype yytoken_kind_t; +#define YYTOKENTYPE +enum yytokentype +{ + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + BY = 260, /* BY */ + CREATE = 261, /* CREATE */ + DROP = 262, /* DROP */ + GROUP = 263, /* GROUP */ + TABLE = 264, /* TABLE */ + TABLES = 265, /* TABLES */ + INDEX = 266, /* INDEX */ + CALC = 267, /* CALC */ + SELECT = 268, /* SELECT */ + DESC = 269, /* DESC */ + SHOW = 270, /* SHOW */ + SYNC = 271, /* SYNC */ + INSERT = 272, /* INSERT */ + DELETE = 273, /* DELETE */ + UPDATE = 274, /* UPDATE */ + LBRACE = 275, /* LBRACE */ + RBRACE = 276, /* RBRACE */ + COMMA = 277, /* COMMA */ + TRX_BEGIN = 278, /* TRX_BEGIN */ + TRX_COMMIT = 279, /* TRX_COMMIT */ + TRX_ROLLBACK = 280, /* TRX_ROLLBACK */ + INT_T = 281, /* INT_T */ + STRING_T = 282, /* STRING_T */ + FLOAT_T = 283, /* FLOAT_T */ + DATE_T = 284, /* DATE_T */ + NOT = 285, /* NOT */ + NULL_T = 286, /* NULL_T */ + NULLABLE = 287, /* NULLABLE */ + HELP = 288, /* HELP */ + EXIT = 289, /* EXIT */ + DOT = 290, /* DOT */ + INTO = 291, /* INTO */ + VALUES = 292, /* VALUES */ + FROM = 293, /* FROM */ + WHERE = 294, /* WHERE */ + AND = 295, /* AND */ + SET = 296, /* SET */ + ON = 297, /* ON */ + LOAD = 298, /* LOAD */ + DATA = 299, /* DATA */ + INFILE = 300, /* INFILE */ + EXPLAIN = 301, /* EXPLAIN */ + STORAGE = 302, /* STORAGE */ + FORMAT = 303, /* FORMAT */ + INNER = 304, /* INNER */ + JOIN = 305, /* JOIN */ + EQ = 306, /* EQ */ + LT = 307, /* LT */ + GT = 308, /* GT */ + LE = 309, /* LE */ + GE = 310, /* GE */ + NE = 311, /* NE */ + LIKE = 312, /* LIKE */ + IS = 313, /* IS */ + NUMBER = 314, /* NUMBER */ + FLOAT = 315, /* FLOAT */ + ID = 316, /* ID */ + SSS = 317, /* SSS */ + UMINUS = 318 /* UMINUS */ +}; +typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 125 "yacc_sql.y" - ParsedSqlNode * sql_node; - ConditionSqlNode * condition; - Value * value; - enum CompOp comp; - RelAttrSqlNode * rel_attr; - std::vector * attr_infos; - AttrInfoSqlNode * attr_info; - Expression * expression; - std::vector> * expression_list; - std::vector * value_list; - std::vector> * values_list; - std::vector * condition_list; - std::vector * rel_attr_list; - std::vector * relation_list; - SetClauseSqlNode * set_clause; - std::vector * set_clauses; - JoinSqlNode * join_clause; - std::vector * join_clauses; - char * string; - int number; - float floats; - bool nullable_info; + ParsedSqlNode *sql_node; + ConditionSqlNode *condition; + Value *value; + enum CompOp comp; + RelAttrSqlNode *rel_attr; + std::vector *attr_infos; + AttrInfoSqlNode *attr_info; + Expression *expression; + std::vector> *expression_list; + std::vector *value_list; + std::vector> *values_list; + std::vector *condition_list; + std::vector *rel_attr_list; + std::vector *relation_list; + SetClauseSqlNode *set_clause; + std::vector *set_clauses; + JoinSqlNode *join_clause; + std::vector *join_clauses; + char *string; + int number; + float floats; + bool nullable_info; #line 152 "yacc_sql.hpp" - }; typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 +#define YYSTYPE_IS_TRIVIAL 1 +#define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -166,14 +165,10 @@ struct YYLTYPE int last_line; int last_column; }; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 +#define YYLTYPE_IS_DECLARED 1 +#define YYLTYPE_IS_TRIVIAL 1 #endif - - - -int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); - +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/query_cache/query_cache_stage.cpp b/src/observer/sql/query_cache/query_cache_stage.cpp index eeb53b6b..a8a5f9cc 100644 --- a/src/observer/sql/query_cache/query_cache_stage.cpp +++ b/src/observer/sql/query_cache/query_cache_stage.cpp @@ -24,7 +24,4 @@ See the Mulan PSL v2 for more details. */ using namespace common; -RC QueryCacheStage::handle_request(SQLStageEvent *sql_event) -{ - return RC::SUCCESS; -} +RC QueryCacheStage::handle_request(SQLStageEvent *sql_event) { return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/create_table_stmt.cpp b/src/observer/sql/stmt/create_table_stmt.cpp index 30603af6..722fb2ef 100644 --- a/src/observer/sql/stmt/create_table_stmt.cpp +++ b/src/observer/sql/stmt/create_table_stmt.cpp @@ -33,7 +33,8 @@ RC CreateTableStmt::create(Db *db, const CreateTableSqlNode &create_table, Stmt return RC::SUCCESS; } -StorageFormat CreateTableStmt::get_storage_format(const char *format_str) { +StorageFormat CreateTableStmt::get_storage_format(const char *format_str) +{ StorageFormat format = StorageFormat::UNKNOWN_FORMAT; if (0 == strcasecmp(format_str, "ROW")) { format = StorageFormat::ROW_FORMAT; diff --git a/src/observer/sql/stmt/insert_stmt.h b/src/observer/sql/stmt/insert_stmt.h index ee55140f..c02a9f47 100644 --- a/src/observer/sql/stmt/insert_stmt.h +++ b/src/observer/sql/stmt/insert_stmt.h @@ -28,13 +28,13 @@ class InsertStmt : public Stmt { public: InsertStmt() = delete; - InsertStmt(Table *table, const std::vector>&); + InsertStmt(Table *table, const std::vector> &); StmtType type() const override { return StmtType::INSERT; } static RC create(Db *db, const InsertSqlNode &insert_sql, Stmt *&stmt); - Table *table() const { return table_; } + Table *table() const { return table_; } const std::vector> &values_list() const { return values_list_; }; private: diff --git a/src/observer/storage/buffer/buffer_pool_log.cpp b/src/observer/storage/buffer/buffer_pool_log.cpp index 63b334b8..c8744382 100644 --- a/src/observer/storage/buffer/buffer_pool_log.cpp +++ b/src/observer/storage/buffer/buffer_pool_log.cpp @@ -19,8 +19,7 @@ See the Mulan PSL v2 for more details. */ string BufferPoolLogEntry::to_string() const { - return string("buffer_pool_id=") + std::to_string(buffer_pool_id) + - ", page_num=" + std::to_string(page_num) + + return string("buffer_pool_id=") + std::to_string(buffer_pool_id) + ", page_num=" + std::to_string(page_num) + ", operation_type=" + BufferPoolOperation(operation_type).to_string(); } @@ -40,25 +39,22 @@ RC BufferPoolLogHandler::deallocate_page(PageNum page_num, LSN &lsn) return append_log(BufferPoolOperation::Type::DEALLOCATE, page_num, lsn); } -RC BufferPoolLogHandler::flush_page(Page &page) -{ - return log_handler_.wait_lsn(page.lsn); -} +RC BufferPoolLogHandler::flush_page(Page &page) { return log_handler_.wait_lsn(page.lsn); } RC BufferPoolLogHandler::append_log(BufferPoolOperation::Type type, PageNum page_num, LSN &lsn) { BufferPoolLogEntry log; log.buffer_pool_id = buffer_pool_.id(); - log.page_num = page_num; + log.page_num = page_num; log.operation_type = BufferPoolOperation(type).type_id(); - return log_handler_.append(lsn, LogModule::Id::BUFFER_POOL, span(reinterpret_cast(&log), sizeof(log))); + return log_handler_.append( + lsn, LogModule::Id::BUFFER_POOL, span(reinterpret_cast(&log), sizeof(log))); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // BufferPoolLogReplayer -BufferPoolLogReplayer::BufferPoolLogReplayer(BufferPoolManager &bp_manager) : bp_manager_(bp_manager) -{} +BufferPoolLogReplayer::BufferPoolLogReplayer(BufferPoolManager &bp_manager) : bp_manager_(bp_manager) {} RC BufferPoolLogReplayer::replay(const LogEntry &entry) { @@ -71,10 +67,10 @@ RC BufferPoolLogReplayer::replay(const LogEntry &entry) auto log = reinterpret_cast(entry.data()); LOG_TRACE("replay buffer pool log. entry=%s, log=%s", entry.to_string().c_str(), log->to_string().c_str()); - - int32_t buffer_pool_id = log->buffer_pool_id; - DiskBufferPool *buffer_pool = nullptr; - RC rc = bp_manager_.get_buffer_pool(buffer_pool_id, buffer_pool); + + int32_t buffer_pool_id = log->buffer_pool_id; + DiskBufferPool *buffer_pool = nullptr; + RC rc = bp_manager_.get_buffer_pool(buffer_pool_id, buffer_pool); if (OB_FAIL(rc) || buffer_pool == nullptr) { LOG_ERROR("failed to get buffer pool. rc=%s, buffer pool=%p, log=%s, %s", strrc(rc), buffer_pool, entry.to_string().c_str(), log->to_string().c_str()); @@ -82,12 +78,9 @@ RC BufferPoolLogReplayer::replay(const LogEntry &entry) } BufferPoolOperation operation(log->operation_type); - switch (operation.type()) - { - case BufferPoolOperation::Type::ALLOCATE: - return buffer_pool->redo_allocate_page(entry.lsn(), log->page_num); - case BufferPoolOperation::Type::DEALLOCATE: - return buffer_pool->redo_deallocate_page(entry.lsn(), log->page_num); + switch (operation.type()) { + case BufferPoolOperation::Type::ALLOCATE: return buffer_pool->redo_allocate_page(entry.lsn(), log->page_num); + case BufferPoolOperation::Type::DEALLOCATE: return buffer_pool->redo_deallocate_page(entry.lsn(), log->page_num); default: LOG_ERROR("unknown buffer pool operation. operation=%s", operation.to_string().c_str()); return RC::INTERNAL; diff --git a/src/observer/storage/buffer/disk_buffer_pool.cpp b/src/observer/storage/buffer/disk_buffer_pool.cpp index 92215cc7..2354ba9d 100644 --- a/src/observer/storage/buffer/disk_buffer_pool.cpp +++ b/src/observer/storage/buffer/disk_buffer_pool.cpp @@ -103,7 +103,7 @@ int BPFrameManager::purge_frames(int count, function purger) Frame *BPFrameManager::get(int buffer_pool_id, PageNum page_num) { - FrameId frame_id(buffer_pool_id, page_num); + FrameId frame_id(buffer_pool_id, page_num); lock_guard lock_guard(lock_); return get_internal(frame_id); @@ -125,7 +125,7 @@ Frame *BPFrameManager::alloc(int buffer_pool_id, PageNum page_num) lock_guard lock_guard(lock_); - Frame *frame = get_internal(frame_id); + Frame *frame = get_internal(frame_id); if (frame != nullptr) { return frame; } @@ -170,7 +170,7 @@ list BPFrameManager::find_list(int buffer_pool_id) lock_guard lock_guard(lock_); list frames; - auto fetcher = [&frames, buffer_pool_id](const FrameId &frame_id, Frame *const frame) -> bool { + auto fetcher = [&frames, buffer_pool_id](const FrameId &frame_id, Frame *const frame) -> bool { if (buffer_pool_id == frame_id.buffer_pool_id()) { frame->pin(); frames.push_back(frame); @@ -213,9 +213,12 @@ RC BufferPoolIterator::reset() } //////////////////////////////////////////////////////////////////////////////// -DiskBufferPool::DiskBufferPool( - BufferPoolManager &bp_manager, BPFrameManager &frame_manager, DoubleWriteBuffer &dblwr_manager, LogHandler &log_handler) - : bp_manager_(bp_manager), frame_manager_(frame_manager), dblwr_manager_(dblwr_manager), log_handler_(*this, log_handler) +DiskBufferPool::DiskBufferPool(BufferPoolManager &bp_manager, BPFrameManager &frame_manager, + DoubleWriteBuffer &dblwr_manager, LogHandler &log_handler) + : bp_manager_(bp_manager), + frame_manager_(frame_manager), + dblwr_manager_(dblwr_manager), + log_handler_(*this, log_handler) {} DiskBufferPool::~DiskBufferPool() @@ -237,7 +240,7 @@ RC DiskBufferPool::open_file(const char *file_name) file_desc_ = fd; Page header_page; - int ret = readn(file_desc_, &header_page, sizeof(header_page)); + int ret = readn(file_desc_, &header_page, sizeof(header_page)); if (ret != 0) { LOG_ERROR("Failed to read first page of %s, due to %s.", file_name, strerror(errno)); close(fd); @@ -246,7 +249,7 @@ RC DiskBufferPool::open_file(const char *file_name) } BPFileHeader *tmp_file_header = reinterpret_cast(header_page.data); - buffer_pool_id_ = tmp_file_header->buffer_pool_id; + buffer_pool_id_ = tmp_file_header->buffer_pool_id; RC rc = allocate_frame(BP_HEADER_PAGE, &hdr_frame_); if (rc != RC::SUCCESS) { @@ -364,7 +367,7 @@ RC DiskBufferPool::allocate_page(Frame **frame) // TODO, do we need clean the loaded page's data? hdr_frame_->mark_dirty(); LSN lsn = 0; - rc = log_handler_.allocate_page(i, lsn); + rc = log_handler_.allocate_page(i, lsn); if (OB_FAIL(rc)) { LOG_ERROR("Failed to log allocate page %d, rc=%s", i, strrc(rc)); // 忽略了错误 @@ -386,7 +389,7 @@ RC DiskBufferPool::allocate_page(Frame **frame) } LSN lsn = 0; - rc = log_handler_.allocate_page(file_header_->page_count, lsn); + rc = log_handler_.allocate_page(file_header_->page_count, lsn); if (OB_FAIL(rc)) { LOG_ERROR("Failed to log allocate page %d, rc=%s", file_header_->page_count, strrc(rc)); // 忽略了错误 @@ -436,9 +439,9 @@ RC DiskBufferPool::dispose_page(PageNum page_num) LOG_ERROR("Failed to dispose page %d, because it is the first page. filename=%s", page_num, file_name_.c_str()); return RC::INTERNAL; } - + scoped_lock lock_guard(lock_); - Frame *used_frame = frame_manager_.get(id(), page_num); + Frame *used_frame = frame_manager_.get(id(), page_num); if (used_frame != nullptr) { ASSERT("the page try to dispose is in use. frame:%s", used_frame->to_string().c_str()); frame_manager_.free(id(), page_num, used_frame); @@ -447,7 +450,7 @@ RC DiskBufferPool::dispose_page(PageNum page_num) } LSN lsn = 0; - RC rc = log_handler_.deallocate_page(page_num, lsn); + RC rc = log_handler_.deallocate_page(page_num, lsn); if (OB_FAIL(rc)) { LOG_ERROR("Failed to log deallocate page %d, rc=%s", page_num, strrc(rc)); // ignore error handle @@ -492,7 +495,7 @@ RC DiskBufferPool::purge_page(PageNum page_num) { scoped_lock lock_guard(lock_); - Frame *used_frame = frame_manager_.get(id(), page_num); + Frame *used_frame = frame_manager_.get(id(), page_num); if (used_frame != nullptr) { return purge_frame(page_num, used_frame); } @@ -647,7 +650,7 @@ RC DiskBufferPool::redo_allocate_page(LSN lsn, PageNum page_num) file_header_->page_count++; hdr_frame_->set_lsn(lsn); hdr_frame_->mark_dirty(); - + // TODO 应该检查文件是否足够大,包含了当前新分配的页面 Bitmap bitmap(file_header_->bitmap, file_header_->page_count); @@ -731,13 +734,13 @@ RC DiskBufferPool::check_page_num(PageNum page_num) RC DiskBufferPool::load_page(PageNum page_num, Frame *frame) { Page &page = frame->page(); - RC rc = dblwr_manager_.read_page(this, page_num, page); + RC rc = dblwr_manager_.read_page(this, page_num, page); if (OB_SUCC(rc)) { return rc; } scoped_lock lock_guard(wr_lock_); - int64_t offset = ((int64_t)page_num) * BP_PAGE_SIZE; + int64_t offset = ((int64_t)page_num) * BP_PAGE_SIZE; if (lseek(file_desc_, offset, SEEK_SET) == -1) { LOG_ERROR("Failed to load page %s:%d, due to failed to lseek:%s.", file_name_.c_str(), page_num, strerror(errno)); @@ -891,7 +894,7 @@ RC BufferPoolManager::flush_page(Frame &frame) int buffer_pool_id = frame.buffer_pool_id(); scoped_lock lock_guard(lock_); - auto iter = id_to_buffer_pools_.find(buffer_pool_id); + auto iter = id_to_buffer_pools_.find(buffer_pool_id); if (iter == id_to_buffer_pools_.end()) { LOG_WARN("unknown buffer pool of id %d", buffer_pool_id); return RC::INTERNAL; @@ -912,8 +915,7 @@ RC BufferPoolManager::get_buffer_pool(int32_t id, DiskBufferPool *&bp) LOG_WARN("unknown buffer pool of id %d", id); return RC::INTERNAL; } - + bp = iter->second; return RC::SUCCESS; } - diff --git a/src/observer/storage/buffer/disk_buffer_pool.h b/src/observer/storage/buffer/disk_buffer_pool.h index 9ff02922..5f930e2e 100644 --- a/src/observer/storage/buffer/disk_buffer_pool.h +++ b/src/observer/storage/buffer/disk_buffer_pool.h @@ -351,5 +351,5 @@ class BufferPoolManager final common::Mutex lock_; unordered_map buffer_pools_; unordered_map id_to_buffer_pools_; - atomic next_buffer_pool_id_{1}; // 系统启动时,会打开所有的表,这样就可以知道当前系统最大的ID是多少了 + atomic next_buffer_pool_id_{1}; // 系统启动时,会打开所有的表,这样就可以知道当前系统最大的ID是多少了 }; diff --git a/src/observer/storage/buffer/double_write_buffer.cpp b/src/observer/storage/buffer/double_write_buffer.cpp index 679c4389..f1120455 100644 --- a/src/observer/storage/buffer/double_write_buffer.cpp +++ b/src/observer/storage/buffer/double_write_buffer.cpp @@ -32,25 +32,24 @@ struct DoubleWritePage public: DoubleWritePageKey key; - int32_t page_index = -1; /// 页面在double write buffer文件中的页索引 - bool valid = true; /// 表示页面是否有效,在页面被删除时,需要同时标记磁盘上的值。 - Page page; + int32_t page_index = -1; /// 页面在double write buffer文件中的页索引 + bool valid = true; /// 表示页面是否有效,在页面被删除时,需要同时标记磁盘上的值。 + Page page; static const int32_t SIZE; }; DoubleWritePage::DoubleWritePage(int32_t buffer_pool_id, PageNum page_num, int32_t page_index, Page &_page) - : key{buffer_pool_id, page_num}, page_index(page_index), page(_page) + : key{buffer_pool_id, page_num}, page_index(page_index), page(_page) {} const int32_t DoubleWritePage::SIZE = sizeof(DoubleWritePage); const int32_t DoubleWriteBufferHeader::SIZE = sizeof(DoubleWriteBufferHeader); -DiskDoubleWriteBuffer::DiskDoubleWriteBuffer(BufferPoolManager &bp_manager, int max_pages /*=16*/) - : max_pages_(max_pages), bp_manager_(bp_manager) -{ -} +DiskDoubleWriteBuffer::DiskDoubleWriteBuffer(BufferPoolManager &bp_manager, int max_pages /*=16*/) + : max_pages_(max_pages), bp_manager_(bp_manager) +{} DiskDoubleWriteBuffer::~DiskDoubleWriteBuffer() { @@ -64,7 +63,7 @@ RC DiskDoubleWriteBuffer::open_file(const char *filename) LOG_ERROR("Double write buffer has already opened. file desc=%d", file_desc_); return RC::BUFFERPOOL_OPEN; } - + int fd = open(filename, O_CREAT | O_RDWR, 0644); if (fd < 0) { LOG_ERROR("Failed to open or creat %s, due to %s.", filename, strerror(errno)); @@ -97,9 +96,9 @@ RC DiskDoubleWriteBuffer::flush_page() RC DiskDoubleWriteBuffer::add_page(DiskBufferPool *bp, PageNum page_num, Page &page) { - scoped_lock lock_guard(lock_); + scoped_lock lock_guard(lock_); DoubleWritePageKey key{bp->id(), page_num}; - auto iter = dblwr_pages_.find(key); + auto iter = dblwr_pages_.find(key); if (iter != dblwr_pages_.end()) { iter->second->page = page; LOG_TRACE("[cache hit]add page into double write buffer. buffer_pool_id:%d,page_num:%d,lsn=%d, dwb size=%d", @@ -147,7 +146,7 @@ RC DiskDoubleWriteBuffer::add_page(DiskBufferPool *bp, PageNum page_num, Page &p RC DiskDoubleWriteBuffer::write_page_internal(DoubleWritePage *page) { int32_t page_index = page->page_index; - int64_t offset = page_index * DoubleWritePage::SIZE + DoubleWriteBufferHeader::SIZE; + int64_t offset = page_index * DoubleWritePage::SIZE + DoubleWriteBufferHeader::SIZE; if (lseek(file_desc_, offset, SEEK_SET) == -1) { LOG_ERROR("Failed to add page %lld of %d due to failed to seek %s.", offset, file_desc_, strerror(errno)); return RC::IOERR_SEEK; @@ -181,9 +180,9 @@ RC DiskDoubleWriteBuffer::write_page(DoubleWritePage *dblwr_page) RC DiskDoubleWriteBuffer::read_page(DiskBufferPool *bp, PageNum page_num, Page &page) { - scoped_lock lock_guard(lock_); + scoped_lock lock_guard(lock_); DoubleWritePageKey key{bp->id(), page_num}; - auto iter = dblwr_pages_.find(key); + auto iter = dblwr_pages_.find(key); if (iter != dblwr_pages_.end()) { page = iter->second->page; LOG_TRACE("double write buffer read page success. bp id=%d, page_num:%d, lsn:%d", bp->id(), page_num, page.lsn); @@ -196,7 +195,7 @@ RC DiskDoubleWriteBuffer::read_page(DiskBufferPool *bp, PageNum page_num, Page & RC DiskDoubleWriteBuffer::clear_pages(DiskBufferPool *buffer_pool) { vector spec_pages; - + auto remove_pred = [&spec_pages, buffer_pool](const pair &pair) { DoubleWritePage *dbl_page = pair.second; if (buffer_pool->id() == dbl_page->key.buffer_pool_id) { @@ -267,9 +266,9 @@ RC DiskDoubleWriteBuffer::load_pages() return RC::IOERR_SEEK; } - auto dblwr_page = make_unique(); - Page &page = dblwr_page->page; - page.check_sum = (CheckSum)-1; + auto dblwr_page = make_unique(); + Page &page = dblwr_page->page; + page.check_sum = (CheckSum)-1; ret = readn(file_desc_, dblwr_page.get(), DoubleWritePage::SIZE); if (ret != 0) { @@ -291,14 +290,10 @@ RC DiskDoubleWriteBuffer::load_pages() return RC::SUCCESS; } -RC DiskDoubleWriteBuffer::recover() -{ - return flush_page(); -} +RC DiskDoubleWriteBuffer::recover() { return flush_page(); } //////////////////////////////////////////////////////////////// RC VacuousDoubleWriteBuffer::add_page(DiskBufferPool *bp, PageNum page_num, Page &page) { return bp->write_page(page_num, page); } - diff --git a/src/observer/storage/buffer/frame.cpp b/src/observer/storage/buffer/frame.cpp index d1152abc..4304e738 100644 --- a/src/observer/storage/buffer/frame.cpp +++ b/src/observer/storage/buffer/frame.cpp @@ -81,7 +81,13 @@ void Frame::write_latch(intptr_t xid) ++write_recursive_count_; TRACE("frame write lock success." "this=%p, pin=%d, frameId=%s, write locker=%lx(recursive=%d), xid=%lx, lbt=%s", - this, pin_count_.load(), frame_id_.to_string().c_str(), write_locker_, write_recursive_count_, xid, lbt()); + this, + pin_count_.load(), + frame_id_.to_string().c_str(), + write_locker_, + write_recursive_count_, + xid, + lbt()); #endif } @@ -103,7 +109,11 @@ void Frame::write_unlatch(intptr_t xid) write_locker_, this, pin_count_.load(), frame_id_.to_string().c_str(), xid, lbt()); TRACE("frame write unlock success. this=%p, pin=%d, frameId=%s, xid=%lx, lbt=%s", - this, pin_count_.load(), frame_id_.to_string().c_str(), xid, lbt()); + this, + pin_count_.load(), + frame_id_.to_string().c_str(), + xid, + lbt()); if (--write_recursive_count_ == 0) { write_locker_ = 0; @@ -138,7 +148,12 @@ void Frame::read_latch(intptr_t xid) ++read_lockers_[xid]; TRACE("frame read lock success." "this=%p, pin=%d, frameId=%s, xid=%lx, recursive=%d, lbt=%s", - this, pin_count_.load(), frame_id_.to_string().c_str(), xid, read_lockers_[xid], lbt()); + this, + pin_count_.load(), + frame_id_.to_string().c_str(), + xid, + read_lockers_[xid], + lbt()); #endif } } @@ -166,7 +181,12 @@ bool Frame::try_read_latch() ++read_lockers_[xid]; TRACE("frame read lock success." "this=%p, pin=%d, frameId=%s, xid=%lx, recursive=%d, lbt=%s", - this, pin_count_.load(), frame_id_.to_string().c_str(), xid, read_lockers_[xid], lbt()); + this, + pin_count_.load(), + frame_id_.to_string().c_str(), + xid, + read_lockers_[xid], + lbt()); debug_lock_.unlock(); #endif } @@ -201,7 +221,11 @@ void Frame::read_unlatch(intptr_t xid) TRACE("frame read unlock success." "this=%p, pin=%d, frameId=%s, xid=%lx, lbt=%s", - this, pin_count_.load(), frame_id_.to_string().c_str(), xid, lbt()); + this, + pin_count_.load(), + frame_id_.to_string().c_str(), + xid, + lbt()); lock_.unlock_shared(); } @@ -215,8 +239,13 @@ void Frame::pin() TRACE("after frame pin. " "this=%p, write locker=%lx, read locker has xid %d? pin=%d, frameId=%s, xid=%lx, lbt=%s", - this, write_locker_, read_lockers_.find(xid) != read_lockers_.end(), - pin_count, frame_id_.to_string().c_str(), xid, lbt()); + this, + write_locker_, + read_lockers_.find(xid) != read_lockers_.end(), + pin_count, + frame_id_.to_string().c_str(), + xid, + lbt()); } int Frame::unpin() @@ -233,8 +262,13 @@ int Frame::unpin() int pin_count = --pin_count_; TRACE("after frame unpin. " "this=%p, write locker=%lx, read locker has xid? %d, pin=%d, frameId=%s, xid=%lx, lbt=%s", - this, write_locker_, read_lockers_.find(xid) != read_lockers_.end(), - pin_count, frame_id_.to_string().c_str(), xid, lbt()); + this, + write_locker_, + read_lockers_.find(xid) != read_lockers_.end(), + pin_count, + frame_id_.to_string().c_str(), + xid, + lbt()); if (0 == pin_count) { ASSERT(write_locker_ == 0, @@ -259,7 +293,6 @@ void Frame::access() { acc_time_ = current_time(); } string Frame::to_string() const { stringstream ss; - ss << "frame id:" << frame_id().to_string() << ", dirty=" << dirty() << ", pin=" << pin_count() - << ", lsn=" << lsn(); + ss << "frame id:" << frame_id().to_string() << ", dirty=" << dirty() << ", pin=" << pin_count() << ", lsn=" << lsn(); return ss.str(); } diff --git a/src/observer/storage/clog/disk_log_handler.cpp b/src/observer/storage/clog/disk_log_handler.cpp index fdce4672..fcaebe10 100644 --- a/src/observer/storage/clog/disk_log_handler.cpp +++ b/src/observer/storage/clog/disk_log_handler.cpp @@ -75,7 +75,7 @@ RC DiskLogHandler::await_termination() RC DiskLogHandler::replay(LogReplayer &replayer, LSN start_lsn) { - LSN max_lsn = 0; + LSN max_lsn = 0; auto replay_callback = [&replayer, &max_lsn](LogEntry &entry) -> RC { if (entry.lsn() > max_lsn) { max_lsn = entry.lsn(); @@ -99,10 +99,10 @@ RC DiskLogHandler::replay(LogReplayer &replayer, LSN start_lsn) return rc; } -RC DiskLogHandler::iterate(function consumer, LSN start_lsn) +RC DiskLogHandler::iterate(function consumer, LSN start_lsn) { vector log_files; - RC rc = file_manager_.list_files(log_files, start_lsn); + RC rc = file_manager_.list_files(log_files, start_lsn); if (OB_FAIL(rc)) { LOG_WARN("failed to list clog files. rc=%s", strrc(rc)); return rc; @@ -172,7 +172,7 @@ void DiskLogHandler::thread_func() LOG_INFO("log handler thread started"); LogFileWriter file_writer; - + RC rc = RC::SUCCESS; while (running_.load() || entry_buffer_.entry_number() > 0) { if (!file_writer.valid() || rc == RC::LOG_FILE_FULL) { @@ -193,7 +193,7 @@ void DiskLogHandler::thread_func() } int flush_count = 0; - rc = entry_buffer_.flush(file_writer, flush_count); + rc = entry_buffer_.flush(file_writer, flush_count); if (OB_FAIL(rc) && RC::LOG_FILE_FULL != rc) { LOG_WARN("failed to flush log entry buffer. rc=%s", strrc(rc)); } diff --git a/src/observer/storage/clog/log_buffer.cpp b/src/observer/storage/clog/log_buffer.cpp index 4cbb1060..11fce081 100644 --- a/src/observer/storage/clog/log_buffer.cpp +++ b/src/observer/storage/clog/log_buffer.cpp @@ -44,7 +44,7 @@ RC LogEntryBuffer::append(LSN &lsn, LogModule module, vector &&data) } LogEntry entry; - RC rc = entry.init(lsn, module, std::move(data)); + RC rc = entry.init(lsn, module, std::move(data)); if (OB_FAIL(rc)) { LOG_WARN("failed to init log entry. rc=%s", strrc(rc)); return rc; @@ -78,7 +78,7 @@ RC LogEntryBuffer::flush(LogFileWriter &writer, int &count) entries_.pop_front(); bytes_ -= entry.total_size(); } - + RC rc = writer.write(entry); if (OB_FAIL(rc)) { lock_guard guard(mutex_); @@ -91,16 +91,10 @@ RC LogEntryBuffer::flush(LogFileWriter &writer, int &count) flushed_lsn_ = entry.lsn(); } } - + return RC::SUCCESS; } -int64_t LogEntryBuffer::bytes() const -{ - return bytes_.load(); -} +int64_t LogEntryBuffer::bytes() const { return bytes_.load(); } -int32_t LogEntryBuffer::entry_number() const -{ - return entries_.size(); -} +int32_t LogEntryBuffer::entry_number() const { return entries_.size(); } diff --git a/src/observer/storage/clog/log_buffer.h b/src/observer/storage/clog/log_buffer.h index 68046f72..77cfe575 100644 --- a/src/observer/storage/clog/log_buffer.h +++ b/src/observer/storage/clog/log_buffer.h @@ -68,7 +68,7 @@ class LogEntryBuffer LSN flushed_lsn() const { return flushed_lsn_.load(); } private: - mutex mutex_; /// 当前数据结构一定会在多线程中访问,所以强制使用有效的锁,而不是有条件生效的common::Mutex + mutex mutex_; /// 当前数据结构一定会在多线程中访问,所以强制使用有效的锁,而不是有条件生效的common::Mutex deque entries_; /// 日志缓冲区 atomic bytes_; /// 当前缓冲区中的日志数据大小 diff --git a/src/observer/storage/clog/log_entry.cpp b/src/observer/storage/clog/log_entry.cpp index 3d34dad1..35672a43 100644 --- a/src/observer/storage/clog/log_entry.cpp +++ b/src/observer/storage/clog/log_entry.cpp @@ -24,9 +24,7 @@ const int32_t LogHeader::SIZE = sizeof(LogHeader); string LogHeader::to_string() const { stringstream ss; - ss << "lsn=" << lsn - << ", size=" << size - << ", module_id=" << module_id << ":" << LogModule(module_id).name(); + ss << "lsn=" << lsn << ", size=" << size << ", module_id=" << module_id << ":" << LogModule(module_id).name(); return ss.str(); } @@ -35,16 +33,16 @@ string LogHeader::to_string() const // class LogEntry LogEntry::LogEntry() { - header_.lsn = 0; + header_.lsn = 0; header_.size = 0; } LogEntry::LogEntry(LogEntry &&other) { header_ = other.header_; - data_ = std::move(other.data_); + data_ = std::move(other.data_); - other.header_.lsn = 0; + other.header_.lsn = 0; other.header_.size = 0; } @@ -55,9 +53,9 @@ LogEntry &LogEntry::operator=(LogEntry &&other) } header_ = other.header_; - data_ = std::move(other.data_); + data_ = std::move(other.data_); - other.header_.lsn = 0; + other.header_.lsn = 0; other.header_.size = 0; return *this; @@ -75,14 +73,11 @@ RC LogEntry::init(LSN lsn, LogModule module, vector &&data) return RC::INVALID_ARGUMENT; } - header_.lsn = lsn; + header_.lsn = lsn; header_.module_id = module.index(); - header_.size = static_cast(data.size()); - data_ = std::move(data); + header_.size = static_cast(data.size()); + data_ = std::move(data); return RC::SUCCESS; } -string LogEntry::to_string() const -{ - return header_.to_string(); -} +string LogEntry::to_string() const { return header_.to_string(); } diff --git a/src/observer/storage/clog/log_file.cpp b/src/observer/storage/clog/log_file.cpp index c3265345..45986652 100644 --- a/src/observer/storage/clog/log_file.cpp +++ b/src/observer/storage/clog/log_file.cpp @@ -141,10 +141,7 @@ RC LogFileReader::skip_to(LSN start_lsn) } //////////////////////////////////////////////////////////////////////////////// // LogFileWriter -LogFileWriter::~LogFileWriter() -{ - (void)this->close(); -} +LogFileWriter::~LogFileWriter() { (void)this->close(); } RC LogFileWriter::open(const char *filename, int end_lsn) { @@ -153,7 +150,7 @@ RC LogFileWriter::open(const char *filename, int end_lsn) } filename_ = filename; - end_lsn_ = end_lsn; + end_lsn_ = end_lsn; fd_ = ::open(filename, O_WRONLY | O_APPEND | O_CREAT | O_SYNC, 0644); if (fd_ < 0) { @@ -214,37 +211,28 @@ RC LogFileWriter::write(LogEntry &entry) return RC::SUCCESS; } -bool LogFileWriter::valid() const -{ - return fd_ >= 0; -} +bool LogFileWriter::valid() const { return fd_ >= 0; } -bool LogFileWriter::full() const -{ - return last_lsn_ >= end_lsn_; -} +bool LogFileWriter::full() const { return last_lsn_ >= end_lsn_; } -string LogFileWriter::to_string() const -{ - return filename_; -} +string LogFileWriter::to_string() const { return filename_; } //////////////////////////////////////////////////////////////////////////////// // LogFileManager RC LogFileManager::init(const char *directory, int max_entry_number_per_file) { - directory_ = filesystem::absolute(filesystem::path(directory)); + directory_ = filesystem::absolute(filesystem::path(directory)); max_entry_number_per_file_ = max_entry_number_per_file; - filesystem::file_status directory_status = filesystem::status(directory_); + filesystem::file_status directory_status = filesystem::status(directory_); // 检查目录是否存在,不存在就创建出来 if (!filesystem::is_directory(directory_)) { LOG_INFO("directory is not exist. directory=%s", directory_.c_str()); error_code ec; - bool ret = filesystem::create_directories(directory_, ec); + bool ret = filesystem::create_directories(directory_, ec); if (!ret) { LOG_WARN("create directory failed. directory=%s, error=%s", directory_.c_str(), ec.message().c_str()); return RC::FILE_CREATE; @@ -258,8 +246,8 @@ RC LogFileManager::init(const char *directory, int max_entry_number_per_file) } string filename = dir_entry.path().filename().string(); - LSN lsn = 0; - RC rc = get_lsn_from_filename(filename, lsn); + LSN lsn = 0; + RC rc = get_lsn_from_filename(filename, lsn); if (OB_FAIL(rc)) { LOG_TRACE("invalid log file name. filename=%s", filename.c_str()); continue; @@ -285,7 +273,8 @@ RC LogFileManager::get_lsn_from_filename(const string &filename, LSN &lsn) return RC::INVALID_ARGUMENT; } - string_view lsn_str(filename.data() + strlen(file_prefix_), filename.length() - strlen(file_suffix_) - strlen(file_prefix_)); + string_view lsn_str( + filename.data() + strlen(file_prefix_), filename.length() - strlen(file_suffix_) - strlen(file_prefix_)); from_chars_result result = from_chars(lsn_str.data(), lsn_str.data() + lsn_str.size(), lsn); if (result.ec != errc()) { LOG_TRACE("invalid log file name: cannot calc lsn. filename=%s, error=%s", @@ -320,8 +309,7 @@ RC LogFileManager::last_file(LogFileWriter &file_writer) file_writer.close(); auto last_file_item = log_files_.rbegin(); - return file_writer.open(last_file_item->second.c_str(), - last_file_item->first + max_entry_number_per_file_ - 1); + return file_writer.open(last_file_item->second.c_str(), last_file_item->first + max_entry_number_per_file_ - 1); } RC LogFileManager::next_file(LogFileWriter &file_writer) @@ -333,7 +321,7 @@ RC LogFileManager::next_file(LogFileWriter &file_writer) lsn = log_files_.rbegin()->first + max_entry_number_per_file_; } - string filename = file_prefix_ + std::to_string(lsn) + file_suffix_; + string filename = file_prefix_ + std::to_string(lsn) + file_suffix_; filesystem::path file_path = directory_ / filename; log_files_.emplace(lsn, file_path); diff --git a/src/observer/storage/common/column.cpp b/src/observer/storage/common/column.cpp index 2d4f61dd..6ea43384 100644 --- a/src/observer/storage/common/column.cpp +++ b/src/observer/storage/common/column.cpp @@ -78,12 +78,12 @@ void Column::reset() if (data_ != nullptr && own_) { delete[] data_; } - data_ = nullptr; - count_ = 0; - capacity_ = 0; - own_ = false; - attr_type_ = AttrType::UNDEFINED; - attr_len_ = -1; + data_ = nullptr; + count_ = 0; + capacity_ = 0; + own_ = false; + attr_type_ = AttrType::UNDEFINED; + attr_len_ = -1; } RC Column::append_one(char *data) { return append(data, 1); } diff --git a/src/observer/storage/field/field_meta.cpp b/src/observer/storage/field/field_meta.cpp index a17fc4cd..59a52a5d 100644 --- a/src/observer/storage/field/field_meta.cpp +++ b/src/observer/storage/field/field_meta.cpp @@ -27,15 +27,18 @@ const static Json::StaticString FIELD_VISIBLE("visible"); const static Json::StaticString FIELD_FIELD_ID("FIELD_id"); const static Json::StaticString FIELD_NULLABLE("nullable"); -FieldMeta::FieldMeta() : attr_type_(AttrType::UNDEFINED), attr_offset_(-1), attr_len_(0), visible_(false), field_id_(0) {} +FieldMeta::FieldMeta() : attr_type_(AttrType::UNDEFINED), attr_offset_(-1), attr_len_(0), visible_(false), field_id_(0) +{} -FieldMeta::FieldMeta(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable) +FieldMeta::FieldMeta( + const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable) { [[maybe_unused]] RC rc = this->init(name, attr_type, attr_offset, attr_len, visible, field_id, nullable); ASSERT(rc == RC::SUCCESS, "failed to init field meta. rc=%s", strrc(rc)); } -RC FieldMeta::init(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable) +RC FieldMeta::init( + const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable) { if (common::is_blank(name)) { LOG_WARN("Name cannot be empty"); diff --git a/src/observer/storage/field/field_meta.h b/src/observer/storage/field/field_meta.h index 1a5c5749..007a8069 100644 --- a/src/observer/storage/field/field_meta.h +++ b/src/observer/storage/field/field_meta.h @@ -31,13 +31,13 @@ class FieldMeta public: FieldMeta(); - FieldMeta( - const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable = false); + FieldMeta(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, + bool nullable = false); ~FieldMeta() = default; - RC init( - const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable = false); + RC init(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, + bool nullable = false); public: const char *name() const; diff --git a/src/observer/storage/index/bplus_tree.cpp b/src/observer/storage/index/bplus_tree.cpp index 7c7a1103..80bbcbb8 100644 --- a/src/observer/storage/index/bplus_tree.cpp +++ b/src/observer/storage/index/bplus_tree.cpp @@ -79,15 +79,12 @@ int IndexNodeHandler::min_size() const return max - max / 2; } -void IndexNodeHandler::increase_size(int n) -{ - node_->key_num += n; -} +void IndexNodeHandler::increase_size(int n) { node_->key_num += n; } PageNum IndexNodeHandler::parent_page_num() const { return node_->parent; } -RC IndexNodeHandler::set_parent_page_num(PageNum page_num) -{ +RC IndexNodeHandler::set_parent_page_num(PageNum page_num) +{ RC rc = mtr_.logger().set_parent_page(*this, page_num, this->node_->parent); if (OB_FAIL(rc)) { LOG_WARN("failed to log set parent page. rc=%s", strrc(rc)); @@ -194,20 +191,20 @@ RC LeafIndexNodeHandler::init_empty() LOG_WARN("failed to log init empty leaf node. rc=%s", strrc(rc)); return rc; } - IndexNodeHandler::init_empty(true/*leaf*/); + IndexNodeHandler::init_empty(true /*leaf*/); leaf_node_->next_brother = BP_INVALID_PAGE_NUM; return RC::SUCCESS; } -RC LeafIndexNodeHandler::set_next_page(PageNum page_num) -{ +RC LeafIndexNodeHandler::set_next_page(PageNum page_num) +{ RC rc = mtr_.logger().leaf_set_next_page(*this, page_num, leaf_node_->next_brother); if (OB_FAIL(rc)) { LOG_WARN("failed to log set next page. rc=%s", strrc(rc)); return rc; } - leaf_node_->next_brother = page_num; + leaf_node_->next_brother = page_num; return RC::SUCCESS; } @@ -277,13 +274,14 @@ int LeafIndexNodeHandler::remove(const char *key, const KeyComparator &comparato RC LeafIndexNodeHandler::move_half_to(LeafIndexNodeHandler &other) { - const int size = this->size(); - const int move_index = size / 2; + const int size = this->size(); + const int move_index = size / 2; const int move_item_num = size - move_index; other.append(__item_at(move_index), move_item_num); - RC rc = mtr_.logger().node_remove_items(*this, move_index, span(__item_at(move_index), move_item_num * item_size()), move_item_num); + RC rc = mtr_.logger().node_remove_items( + *this, move_index, span(__item_at(move_index), move_item_num * item_size()), move_item_num); if (OB_FAIL(rc)) { LOG_WARN("failed to log shrink leaf node. rc=%s", strrc(rc)); return rc; @@ -314,7 +312,8 @@ RC LeafIndexNodeHandler::move_to(LeafIndexNodeHandler &other) other.append(__item_at(0), this->size()); other.set_next_page(this->next_page()); - RC rc = mtr_.logger().node_remove_items(*this, 0, span(__item_at(0), this->size() * item_size()), this->size()); + RC rc = mtr_.logger().node_remove_items( + *this, 0, span(__item_at(0), this->size() * item_size()), this->size()); if (OB_FAIL(rc)) { LOG_WARN("failed to log shrink leaf node. rc=%s", strrc(rc)); } @@ -335,15 +334,9 @@ RC LeafIndexNodeHandler::append(const char *items, int num) return recover_insert_items(size(), items, num); } -RC LeafIndexNodeHandler::append(const char *item) -{ - return append(item, 1); -} +RC LeafIndexNodeHandler::append(const char *item) { return append(item, 1); } -RC LeafIndexNodeHandler::preappend(const char *item) -{ - return insert(0, item, item + key_size()); -} +RC LeafIndexNodeHandler::preappend(const char *item) { return insert(0, item, item + key_size()); } char *LeafIndexNodeHandler::__item_at(int index) const { return leaf_node_->array + (index * item_size()); } @@ -381,7 +374,7 @@ bool LeafIndexNodeHandler::validate(const KeyComparator &comparator, DiskBufferP } Frame *parent_frame = nullptr; - RC rc = bp->get_this_page(parent_page_num, &parent_frame); + RC rc = bp->get_this_page(parent_page_num, &parent_frame); if (OB_FAIL(rc)) { LOG_WARN("failed to fetch parent page. page num=%d, rc=%d:%s", parent_page_num, rc, strrc(rc)); return false; @@ -422,7 +415,8 @@ bool LeafIndexNodeHandler::validate(const KeyComparator &comparator, DiskBufferP } ///////////////////////////////////////////////////////////////////////////////// -InternalIndexNodeHandler::InternalIndexNodeHandler(BplusTreeMiniTransaction &mtr, const IndexFileHeader &header, Frame *frame) +InternalIndexNodeHandler::InternalIndexNodeHandler( + BplusTreeMiniTransaction &mtr, const IndexFileHeader &header, Frame *frame) : IndexNodeHandler(mtr, header, frame), internal_node_((InternalIndexNode *)frame->data()) {} @@ -441,13 +435,13 @@ string to_string(const InternalIndexNodeHandler &node, const KeyPrinter &printer return ss.str(); } -RC InternalIndexNodeHandler::init_empty() +RC InternalIndexNodeHandler::init_empty() { RC rc = mtr_.logger().internal_init_empty(*this); if (OB_FAIL(rc)) { LOG_WARN("failed to log init empty internal node. rc=%s", strrc(rc)); } - IndexNodeHandler::init_empty(false/*leaf*/); + IndexNodeHandler::init_empty(false /*leaf*/); return RC::SUCCESS; } RC InternalIndexNodeHandler::create_new_root(PageNum first_page_num, const char *key, PageNum page_num) @@ -502,7 +496,8 @@ RC InternalIndexNodeHandler::move_half_to(InternalIndexNodeHandler &other) return rc; } - mtr_.logger().node_remove_items(*this, move_index, span(__item_at(move_index), move_num * item_size()), move_num); + mtr_.logger().node_remove_items( + *this, move_index, span(__item_at(move_index), move_num * item_size()), move_num); increase_size(-(size - move_index)); return rc; } @@ -550,7 +545,8 @@ void InternalIndexNodeHandler::set_key_at(int index, const char *key) { assert(index >= 0 && index < size()); - mtr_.logger().internal_update_key(*this, index, span(key, key_size()), span(__key_at(index), key_size())); + mtr_.logger().internal_update_key( + *this, index, span(key, key_size()), span(__key_at(index), key_size())); memcpy(__key_at(index), key, key_size()); } @@ -575,7 +571,7 @@ void InternalIndexNodeHandler::remove(int index) assert(index >= 0 && index < size()); BplusTreeLogger &logger = mtr_.logger(); - RC rc = logger.node_remove_items(*this, index, span(__item_at(index), item_size()), 1); + RC rc = logger.node_remove_items(*this, index, span(__item_at(index), item_size()), 1); if (OB_FAIL(rc)) { LOG_WARN("failed to log remove item. rc=%s. node=%s", strrc(rc), to_string(*this).c_str()); } @@ -639,22 +635,22 @@ RC InternalIndexNodeHandler::insert_items(int index, const char *items, int num) recover_insert_items(index, items, num); - LatchMemo &latch_memo = mtr_.latch_memo(); - PageNum this_page_num = this->page_num(); - Frame *frame = nullptr; + LatchMemo &latch_memo = mtr_.latch_memo(); + PageNum this_page_num = this->page_num(); + Frame *frame = nullptr; // 设置所有页面的父页面为当前页面 // 这里会访问大量的页面,可能会将他们从磁盘加载到内存中而占用大量的buffer pool页面 for (int i = 0; i < num; i++) { const PageNum page_num = *(const PageNum *)((items + i * item_size()) + key_size()); - rc = latch_memo.get_page(page_num, frame); + rc = latch_memo.get_page(page_num, frame); if (OB_FAIL(rc)) { LOG_WARN("failed to set child's page num. child page num:%d, this page num=%d, rc=%d:%s", page_num, this_page_num, rc, strrc(rc)); return rc; } IndexNodeHandler child_node(mtr_, header_, frame); - child_node.set_parent_page_num(this_page_num); // 这里虽然对页面做了修改,但是并没有加写锁,因为父页面加了锁 + child_node.set_parent_page_num(this_page_num); // 这里虽然对页面做了修改,但是并没有加写锁,因为父页面加了锁 frame->mark_dirty(); } @@ -664,17 +660,11 @@ RC InternalIndexNodeHandler::insert_items(int index, const char *items, int num) /** * copy items from other node to self's right */ -RC InternalIndexNodeHandler::append(const char *items, int num) -{ - return insert_items(size(), items, num); -} +RC InternalIndexNodeHandler::append(const char *items, int num) { return insert_items(size(), items, num); } RC InternalIndexNodeHandler::append(const char *item) { return this->append(item, 1); } -RC InternalIndexNodeHandler::preappend(const char *item) -{ - return this->insert_items(0, item, 1); -} +RC InternalIndexNodeHandler::preappend(const char *item) { return this->insert_items(0, item, 1); } char *InternalIndexNodeHandler::__item_at(int index) const { return internal_node_->array + (index * item_size()); } @@ -704,7 +694,7 @@ bool InternalIndexNodeHandler::validate(const KeyComparator &comparator, DiskBuf LOG_WARN("this page num=%d, got invalid child page. page num=%d", this->page_num(), page_num); } else { Frame *child_frame = nullptr; - RC rc = bp->get_this_page(page_num, &child_frame); + RC rc = bp->get_this_page(page_num, &child_frame); if (OB_FAIL(rc)) { LOG_WARN("failed to fetch child page while validate internal page. page num=%d, rc=%d:%s", page_num, rc, strrc(rc)); @@ -730,7 +720,7 @@ bool InternalIndexNodeHandler::validate(const KeyComparator &comparator, DiskBuf } Frame *parent_frame = nullptr; - RC rc = bp->get_this_page(parent_page_num, &parent_frame); + RC rc = bp->get_this_page(parent_page_num, &parent_frame); if (OB_FAIL(rc)) { LOG_WARN("failed to fetch parent page. page num=%d, rc=%d:%s", parent_page_num, rc, strrc(rc)); return false; @@ -794,13 +784,8 @@ RC BplusTreeHandler::sync() return disk_buffer_pool_->flush_all_pages(); } -RC BplusTreeHandler::create(LogHandler &log_handler, - BufferPoolManager &bpm, - const char *file_name, - AttrType attr_type, - int attr_length, - int internal_max_size /* = -1*/, - int leaf_max_size /* = -1 */) +RC BplusTreeHandler::create(LogHandler &log_handler, BufferPoolManager &bpm, const char *file_name, AttrType attr_type, + int attr_length, int internal_max_size /* = -1*/, int leaf_max_size /* = -1 */) { RC rc = bpm.create_file(file_name); if (OB_FAIL(rc)) { @@ -828,12 +813,8 @@ RC BplusTreeHandler::create(LogHandler &log_handler, return rc; } -RC BplusTreeHandler::create(LogHandler &log_handler, - DiskBufferPool &buffer_pool, - AttrType attr_type, - int attr_length, - int internal_max_size /* = -1 */, - int leaf_max_size /* = -1 */) +RC BplusTreeHandler::create(LogHandler &log_handler, DiskBufferPool &buffer_pool, AttrType attr_type, int attr_length, + int internal_max_size /* = -1 */, int leaf_max_size /* = -1 */) { if (internal_max_size < 0) { internal_max_size = calc_internal_page_capacity(attr_length); @@ -912,7 +893,7 @@ RC BplusTreeHandler::open(LogHandler &log_handler, BufferPoolManager &bpm, const return RC::RECORD_OPENNED; } - DiskBufferPool *disk_buffer_pool = nullptr; + DiskBufferPool *disk_buffer_pool = nullptr; RC rc = bpm.open_file(log_handler, file_name, disk_buffer_pool); if (OB_FAIL(rc)) { @@ -978,7 +959,7 @@ RC BplusTreeHandler::close() RC BplusTreeHandler::print_leaf(Frame *frame) { BplusTreeMiniTransaction mtr(*this); - LeafIndexNodeHandler leaf_node(mtr, file_header_, frame); + LeafIndexNodeHandler leaf_node(mtr, file_header_, frame); LOG_INFO("leaf node: %s", to_string(leaf_node, key_printer_).c_str()); disk_buffer_pool_->unpin_page(frame); return RC::SUCCESS; @@ -986,7 +967,7 @@ RC BplusTreeHandler::print_leaf(Frame *frame) RC BplusTreeHandler::print_internal_node_recursive(Frame *frame) { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; BplusTreeMiniTransaction mtr(*this); LOG_INFO("bplus tree. file header: %s", file_header_.to_string().c_str()); @@ -1060,8 +1041,8 @@ RC BplusTreeHandler::print_leafs() } BplusTreeMiniTransaction mtr(*this); - LatchMemo latch_memo = mtr.latch_memo(); - Frame *frame = nullptr; + LatchMemo latch_memo = mtr.latch_memo(); + Frame *frame = nullptr; RC rc = left_most_page(mtr, frame); if (OB_FAIL(rc)) { @@ -1100,9 +1081,9 @@ bool BplusTreeHandler::validate_node_recursive(BplusTreeMiniTransaction &mtr, Fr InternalIndexNodeHandler internal_node(mtr, file_header_, frame); result = internal_node.validate(key_comparator_, disk_buffer_pool_); for (int i = 0; result && i < internal_node.size(); i++) { - PageNum page_num = internal_node.value_at(i); + PageNum page_num = internal_node.value_at(i); Frame *child_frame = nullptr; - RC rc = mtr.latch_memo().get_page(page_num, child_frame); + RC rc = mtr.latch_memo().get_page(page_num, child_frame); if (OB_FAIL(rc)) { LOG_WARN("failed to fetch child page.page id=%d, rc=%d:%s", page_num, rc, strrc(rc)); result = false; @@ -1165,8 +1146,8 @@ bool BplusTreeHandler::validate_tree() } BplusTreeMiniTransaction mtr(*this); - LatchMemo &latch_memo = mtr.latch_memo(); - Frame *frame = nullptr; + LatchMemo &latch_memo = mtr.latch_memo(); + Frame *frame = nullptr; RC rc = latch_memo.get_page(file_header_.root_page, frame); // 这里仅仅调试使用,不加root锁 if (OB_FAIL(rc)) { @@ -1242,8 +1223,8 @@ RC BplusTreeHandler::crabing_protocal_fetch_page( BplusTreeMiniTransaction &mtr, BplusTreeOperationType op, PageNum page_num, bool is_root_node, Frame *&frame) { LatchMemo &latch_memo = mtr.latch_memo(); - bool readonly = (op == BplusTreeOperationType::READ); - const int memo_point = latch_memo.memo_point(); + bool readonly = (op == BplusTreeOperationType::READ); + const int memo_point = latch_memo.memo_point(); RC rc = latch_memo.get_page(page_num, frame); if (OB_FAIL(rc)) { @@ -1260,7 +1241,8 @@ RC BplusTreeHandler::crabing_protocal_fetch_page( return rc; } -RC BplusTreeHandler::insert_entry_into_leaf_node(BplusTreeMiniTransaction &mtr, Frame *frame, const char *key, const RID *rid) +RC BplusTreeHandler::insert_entry_into_leaf_node( + BplusTreeMiniTransaction &mtr, Frame *frame, const char *key, const RID *rid) { LeafIndexNodeHandler leaf_node(mtr, file_header_, frame); bool exists = false; // 该数据是否已经存在指定的叶子节点中了 @@ -1298,7 +1280,8 @@ RC BplusTreeHandler::insert_entry_into_leaf_node(BplusTreeMiniTransaction &mtr, return insert_entry_into_parent(mtr, frame, new_frame, new_index_node.key_at(0)); } -RC BplusTreeHandler::insert_entry_into_parent(BplusTreeMiniTransaction &mtr, Frame *frame, Frame *new_frame, const char *key) +RC BplusTreeHandler::insert_entry_into_parent( + BplusTreeMiniTransaction &mtr, Frame *frame, Frame *new_frame, const char *key) { RC rc = RC::SUCCESS; @@ -1310,7 +1293,7 @@ RC BplusTreeHandler::insert_entry_into_parent(BplusTreeMiniTransaction &mtr, Fra // create new root page Frame *root_frame = nullptr; - rc = disk_buffer_pool_->allocate_page(&root_frame); + rc = disk_buffer_pool_->allocate_page(&root_frame); if (OB_FAIL(rc)) { LOG_WARN("failed to allocate new root page. rc=%d:%s", rc, strrc(rc)); return rc; @@ -1430,11 +1413,12 @@ RC BplusTreeHandler::recover_update_root_page(BplusTreeMiniTransaction &mtr, Pag return RC::SUCCESS; } -RC BplusTreeHandler::recover_init_header_page(BplusTreeMiniTransaction &mtr, Frame *frame, const IndexFileHeader &header) +RC BplusTreeHandler::recover_init_header_page( + BplusTreeMiniTransaction &mtr, Frame *frame, const IndexFileHeader &header) { IndexFileHeader *file_header = reinterpret_cast(frame->data()); memcpy(file_header, &header, sizeof(IndexFileHeader)); - file_header_ = header; + file_header_ = header; header_dirty_ = false; frame->mark_dirty(); @@ -1732,7 +1716,8 @@ RC BplusTreeHandler::coalesce( } template -RC BplusTreeHandler::redistribute(BplusTreeMiniTransaction &mtr, Frame *neighbor_frame, Frame *frame, Frame *parent_frame, int index) +RC BplusTreeHandler::redistribute( + BplusTreeMiniTransaction &mtr, Frame *neighbor_frame, Frame *frame, Frame *parent_frame, int index) { InternalIndexNodeHandler parent_node(mtr, file_header_, parent_frame); IndexNodeHandlerType neighbor_node(mtr, file_header_, neighbor_frame); @@ -1821,9 +1806,7 @@ RC BplusTreeHandler::delete_entry(const char *user_key, const RID *rid) //////////////////////////////////////////////////////////////////////////////// -BplusTreeScanner::BplusTreeScanner(BplusTreeHandler &tree_handler) - : tree_handler_(tree_handler), mtr_(tree_handler) -{} +BplusTreeScanner::BplusTreeScanner(BplusTreeHandler &tree_handler) : tree_handler_(tree_handler), mtr_(tree_handler) {} BplusTreeScanner::~BplusTreeScanner() { close(); } @@ -1859,7 +1842,7 @@ RC BplusTreeScanner::open(const char *left_user_key, int left_len, bool left_inc current_frame_ = nullptr; return RC::SUCCESS; } - + LOG_WARN("failed to find left most page. rc=%s", strrc(rc)); return rc; } diff --git a/src/observer/storage/index/bplus_tree_index.cpp b/src/observer/storage/index/bplus_tree_index.cpp index 8794cfbc..c132d112 100644 --- a/src/observer/storage/index/bplus_tree_index.cpp +++ b/src/observer/storage/index/bplus_tree_index.cpp @@ -55,7 +55,7 @@ RC BplusTreeIndex::open(Table *table, const char *file_name, const IndexMeta &in Index::init(index_meta, field_meta); BufferPoolManager &bpm = table->db()->buffer_pool_manager(); - RC rc = index_handler_.open(table->db()->log_handler(), bpm, file_name); + RC rc = index_handler_.open(table->db()->log_handler(), bpm, file_name); if (RC::SUCCESS != rc) { LOG_WARN("Failed to open index_handler, file_name:%s, index:%s, field:%s, rc:%s", file_name, index_meta.name(), index_meta.field(), strrc(rc)); diff --git a/src/observer/storage/index/bplus_tree_log.cpp b/src/observer/storage/index/bplus_tree_log.cpp index e2ee32ff..573d7b9b 100644 --- a/src/observer/storage/index/bplus_tree_log.cpp +++ b/src/observer/storage/index/bplus_tree_log.cpp @@ -182,13 +182,14 @@ RC BplusTreeLogger::redo(BufferPoolManager &bpm, const LogEntry &entry) return rc; } -RC BplusTreeLogger::__redo(LSN lsn, BplusTreeMiniTransaction &mtr, BplusTreeHandler &tree_handler, Deserializer &redo_buffer) +RC BplusTreeLogger::__redo( + LSN lsn, BplusTreeMiniTransaction &mtr, BplusTreeHandler &tree_handler, Deserializer &redo_buffer) { need_log_ = false; DEFER(need_log_ = true); - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; vector frames; while (redo_buffer.remain() > 0) { unique_ptr entry; @@ -202,8 +203,8 @@ RC BplusTreeLogger::__redo(LSN lsn, BplusTreeMiniTransaction &mtr, BplusTreeHand if (frame != nullptr) { if (frame->lsn() >= lsn) { LOG_TRACE("no need to redo. frame=%p:%s, redo lsn=%ld", frame, frame->to_string().c_str(), lsn); - frame->unpin(); - continue; + frame->unpin(); + continue; } else { frames.push_back(frame); } @@ -273,7 +274,7 @@ BplusTreeMiniTransaction::~BplusTreeMiniTransaction() if (nullptr == operation_result_) { return; } - + if (OB_SUCC(*operation_result_)) { commit(); } else { diff --git a/src/observer/storage/index/bplus_tree_log_entry.cpp b/src/observer/storage/index/bplus_tree_log_entry.cpp index 615bb52b..1f41c8e0 100644 --- a/src/observer/storage/index/bplus_tree_log_entry.cpp +++ b/src/observer/storage/index/bplus_tree_log_entry.cpp @@ -363,7 +363,7 @@ LeafInitEmptyLogEntryHandler::LeafInitEmptyLogEntryHandler(Frame *frame) RC LeafInitEmptyLogEntryHandler::redo(BplusTreeMiniTransaction &mtr, BplusTreeHandler &tree_handler) { LeafIndexNodeHandler leaf_handler(mtr, tree_handler.file_header(), frame()); - RC rc = leaf_handler.init_empty(); + RC rc = leaf_handler.init_empty(); return rc; } @@ -494,7 +494,7 @@ RC InternalCreateNewRootLogEntryHandler::deserialize( RC InternalCreateNewRootLogEntryHandler::redo(BplusTreeMiniTransaction &mtr, BplusTreeHandler &tree_handler) { InternalIndexNodeHandler internal_handler(mtr, tree_handler.file_header(), frame()); - RC rc = internal_handler.create_new_root(first_page_num_, key_.data(), page_num_); + RC rc = internal_handler.create_new_root(first_page_num_, key_.data(), page_num_); return rc; } diff --git a/src/observer/storage/record/record.h b/src/observer/storage/record/record.h index 924ad3ae..27364106 100644 --- a/src/observer/storage/record/record.h +++ b/src/observer/storage/record/record.h @@ -102,7 +102,7 @@ struct RIDHash class Record { public: - Record() = default; + Record() = default; ~Record() { if (owner_ && data_ != nullptr) { diff --git a/src/observer/storage/table/table_meta.cpp b/src/observer/storage/table/table_meta.cpp index 29a750fe..5241f598 100644 --- a/src/observer/storage/table/table_meta.cpp +++ b/src/observer/storage/table/table_meta.cpp @@ -44,7 +44,7 @@ void TableMeta::swap(TableMeta &other) noexcept } RC TableMeta::init(int32_t table_id, const char *name, const std::vector *trx_fields, - span attributes, StorageFormat storage_format) + span attributes, StorageFormat storage_format) { if (common::is_blank(name)) { LOG_ERROR("Name cannot be empty"); @@ -67,8 +67,13 @@ RC TableMeta::init(int32_t table_id, const char *name, const std::vectorsize()); for (size_t i = 0; i < trx_fields->size(); i++) { const FieldMeta &field_meta = (*trx_fields)[i]; - fields_[i] = FieldMeta(field_meta.name(), field_meta.type(), field_offset, - field_meta.len(), false /*visible*/, field_meta.field_id(), field_meta.nullable()); + fields_[i] = FieldMeta(field_meta.name(), + field_meta.type(), + field_offset, + field_meta.len(), + false /*visible*/, + field_meta.field_id(), + field_meta.nullable()); field_offset += field_meta.len(); } @@ -80,8 +85,13 @@ RC TableMeta::init(int32_t table_id, const char *name, const std::vector TableMeta::trx_fields() const -{ - return span(fields_.data(), sys_field_num()); -} +span TableMeta::trx_fields() const { return span(fields_.data(), sys_field_num()); } const FieldMeta *TableMeta::field(int index) const { return &fields_[index]; } const FieldMeta *TableMeta::field(const char *name) const @@ -170,8 +177,8 @@ int TableMeta::record_size() const { return record_size_; } int TableMeta::serialize(std::ostream &ss) const { Json::Value table_value; - table_value[FIELD_TABLE_ID] = table_id_; - table_value[FIELD_TABLE_NAME] = name_; + table_value[FIELD_TABLE_ID] = table_id_; + table_value[FIELD_TABLE_NAME] = name_; table_value[FIELD_STORAGE_FORMAT] = static_cast(storage_format_); Json::Value fields_value; @@ -262,7 +269,7 @@ int TableMeta::deserialize(std::istream &is) auto comparator = [](const FieldMeta &f1, const FieldMeta &f2) { return f1.offset() < f2.offset(); }; std::sort(fields.begin(), fields.end(), comparator); - table_id_ = table_id; + table_id_ = table_id; storage_format_ = static_cast(storage_format); name_.swap(table_name); fields_.swap(fields); @@ -270,7 +277,7 @@ int TableMeta::deserialize(std::istream &is) for (const FieldMeta &field_meta : fields_) { if (!field_meta.visible()) { - trx_fields_.push_back(field_meta); // 字段加上trx标识更好 + trx_fields_.push_back(field_meta); // 字段加上trx标识更好 } } diff --git a/src/observer/storage/trx/mvcc_trx.cpp b/src/observer/storage/trx/mvcc_trx.cpp index 38d4faf4..7db72847 100644 --- a/src/observer/storage/trx/mvcc_trx.cpp +++ b/src/observer/storage/trx/mvcc_trx.cpp @@ -196,10 +196,7 @@ RC MvccTrx::delete_record(Table *table, Record &record) return RC::SUCCESS; } -RC MvccTrx::update_record(Table *table, Record &old_record, Record &new_record) -{ - return RC::SUCCESS; -} +RC MvccTrx::update_record(Table *table, Record &old_record, Record &new_record) { return RC::SUCCESS; } RC MvccTrx::visit_record(Table *table, Record &record, ReadWriteMode mode) { diff --git a/src/observer/storage/trx/mvcc_trx.h b/src/observer/storage/trx/mvcc_trx.h index 2d9ac190..77482fac 100644 --- a/src/observer/storage/trx/mvcc_trx.h +++ b/src/observer/storage/trx/mvcc_trx.h @@ -78,7 +78,7 @@ class MvccTrx : public Trx RC insert_record(Table *table, Record &record) override; RC delete_record(Table *table, Record &record) override; - RC update_record(Table *table, Record &old_record, Record& new_record) override; + RC update_record(Table *table, Record &old_record, Record &new_record) override; /** * @brief 当访问到某条数据时,使用此函数来判断是否可见,或者是否有访问冲突 diff --git a/src/observer/storage/trx/mvcc_trx_log.cpp b/src/observer/storage/trx/mvcc_trx_log.cpp index abb4e7ba..a071177d 100644 --- a/src/observer/storage/trx/mvcc_trx_log.cpp +++ b/src/observer/storage/trx/mvcc_trx_log.cpp @@ -108,7 +108,7 @@ RC MvccTrxLogHandler::commit(int32_t trx_id, int32_t commit_trx_id) log_entry.commit_trx_id = commit_trx_id; LSN lsn = 0; - RC rc = log_handler_.append( + RC rc = log_handler_.append( lsn, LogModule::Id::TRANSACTION, span(reinterpret_cast(&log_entry), sizeof(log_entry))); if (OB_FAIL(rc)) { return rc; @@ -134,7 +134,7 @@ RC MvccTrxLogHandler::rollback(int32_t trx_id) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// MvccTrxLogReplayer::MvccTrxLogReplayer(Db &db, MvccTrxKit &trx_kit, LogHandler &log_handler) - : db_(db), trx_kit_(trx_kit), log_handler_(log_handler) + : db_(db), trx_kit_(trx_kit), log_handler_(log_handler) {} RC MvccTrxLogReplayer::replay(const LogEntry &entry) @@ -150,9 +150,9 @@ RC MvccTrxLogReplayer::replay(const LogEntry &entry) return RC::LOG_ENTRY_INVALID; } - auto *header = reinterpret_cast(entry.data()); - MvccTrx *trx = nullptr; - auto trx_iter = trx_map_.find(header->trx_id); + auto *header = reinterpret_cast(entry.data()); + MvccTrx *trx = nullptr; + auto trx_iter = trx_map_.find(header->trx_id); if (trx_iter == trx_map_.end()) { trx = static_cast(trx_kit_.create_trx(log_handler_, header->trx_id)); // trx = new MvccTrx(trx_kit_, log_handler_, header->trx_id); @@ -179,7 +179,7 @@ RC MvccTrxLogReplayer::on_done() /// 日志回放已经完成,需要把没有提交的事务,回滚掉 for (auto &pair : trx_map_) { MvccTrx *trx = pair.second; - trx->rollback(); // 恢复时的rollback,可能遇到之前已经回滚一半的事务又再次调用回滚的情况 + trx->rollback(); // 恢复时的rollback,可能遇到之前已经回滚一半的事务又再次调用回滚的情况 delete pair.second; } trx_map_.clear(); From 7b6f37c5ec65551ec88ec6930e45d4b9ed693a22 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sun, 29 Sep 2024 17:43:26 +0800 Subject: [PATCH 060/308] =?UTF-8?q?null=20=E4=B8=8D=E8=AE=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/3rd/benchmark | 2 +- src/observer/sql/expr/aggregator.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deps/3rd/benchmark b/deps/3rd/benchmark index 23d8c1e5..3fd1e6a7 160000 --- a/deps/3rd/benchmark +++ b/deps/3rd/benchmark @@ -1 +1 @@ -Subproject commit 23d8c1e58941ca48b4ef67595addaf78412109ef +Subproject commit 3fd1e6a7aee12e6878d7e039f947ea81140b4f5a diff --git a/src/observer/sql/expr/aggregator.h b/src/observer/sql/expr/aggregator.h index 2f800696..f370af71 100644 --- a/src/observer/sql/expr/aggregator.h +++ b/src/observer/sql/expr/aggregator.h @@ -42,7 +42,7 @@ class CountAggregator : public Aggregator RC accumulate(const Value &value) override { // 只要传入的值类型不为未定义,就增加计数 - if (value.attr_type() != AttrType::UNDEFINED) { + if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { count_++; } return RC::SUCCESS; @@ -64,7 +64,7 @@ class AvgAggregator : public Aggregator RC accumulate(const Value &value) override { // 类型匹配检查 - if (value_.attr_type() == AttrType::UNDEFINED) { + if (value_.attr_type() == AttrType::UNDEFINED && !value.is_null()) { value_ = value; // 首次赋值 count_ = 1; return RC::SUCCESS; @@ -100,7 +100,7 @@ class MaxAggregator : public Aggregator RC accumulate(const Value &value) override { // 首次赋值 - if (value_.attr_type() == AttrType::UNDEFINED) { + if (value_.attr_type() == AttrType::UNDEFINED && !value.is_null()) { value_ = value; return RC::SUCCESS; } @@ -127,7 +127,7 @@ class MinAggregator : public Aggregator RC accumulate(const Value &value) override { // 首次赋值 - if (value_.attr_type() == AttrType::UNDEFINED) { + if (value_.attr_type() == AttrType::UNDEFINED && !value.is_null()) { value_ = value; return RC::SUCCESS; } From 9969f305f3e1edcb76510ecce50c9e9a49029c2f Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 30 Sep 2024 00:30:17 +0800 Subject: [PATCH 061/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dagg=E7=9A=84?= =?UTF-8?q?=F0=9F=92=A9BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/aggregator.cpp | 36 ------------ src/observer/sql/expr/aggregator.h | 88 +++++++++++++++++++--------- 2 files changed, 59 insertions(+), 65 deletions(-) delete mode 100644 src/observer/sql/expr/aggregator.cpp diff --git a/src/observer/sql/expr/aggregator.cpp b/src/observer/sql/expr/aggregator.cpp deleted file mode 100644 index b07a77ff..00000000 --- a/src/observer/sql/expr/aggregator.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. -miniob is licensed under Mulan PSL v2. -You can use this software according to the terms and conditions of the Mulan PSL v2. -You may obtain a copy of Mulan PSL v2 at: - http://license.coscl.org.cn/MulanPSL2 -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -See the Mulan PSL v2 for more details. */ - -// -// Created by Wangyunlai on 2024/05/29. -// - -#include "sql/expr/aggregator.h" -#include "common/log/log.h" - -RC SumAggregator::accumulate(const Value &value) -{ - if (value_.attr_type() == AttrType::UNDEFINED) { - value_ = value; - return RC::SUCCESS; - } - - ASSERT(value.attr_type() == value_.attr_type(), "type mismatch. value type: %s, value_.type: %s", - attr_type_to_string(value.attr_type()), attr_type_to_string(value_.attr_type())); - - Value::add(value, value_, value_); - return RC::SUCCESS; -} - -RC SumAggregator::evaluate(Value &result) -{ - result = value_; - return RC::SUCCESS; -} diff --git a/src/observer/sql/expr/aggregator.h b/src/observer/sql/expr/aggregator.h index f370af71..c89421f3 100644 --- a/src/observer/sql/expr/aggregator.h +++ b/src/observer/sql/expr/aggregator.h @@ -24,16 +24,34 @@ class Aggregator virtual RC accumulate(const Value &value) = 0; virtual RC evaluate(Value &result) = 0; - -protected: - Value value_; }; class SumAggregator : public Aggregator { public: - RC accumulate(const Value &value) override; - RC evaluate(Value &result) override; + RC accumulate(const Value &value) override + { + if (value_.attr_type() == AttrType::UNDEFINED) { + if (!inited_) { + inited_ = true; + value_ = value; + } else { + Value::add(value, value_, value_); + } + } + + return RC::SUCCESS; + } + + RC evaluate(Value &result) override + { + result = value_; + return RC::SUCCESS; + } + +private: + Value value_; // 累加的和 + bool inited_ = false; }; class CountAggregator : public Aggregator @@ -64,15 +82,17 @@ class AvgAggregator : public Aggregator RC accumulate(const Value &value) override { // 类型匹配检查 - if (value_.attr_type() == AttrType::UNDEFINED && !value.is_null()) { - value_ = value; // 首次赋值 - count_ = 1; - return RC::SUCCESS; + if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { + if (!inited_) { + inited_ = true; + value_ = value; // 首次赋值 + } else { + // 累加和计数 + Value::add(value_, value, value_); + } + count_++; } - // 累加和计数 - Value::add(value_, value, value_); - count_++; return RC::SUCCESS; } @@ -83,15 +103,16 @@ class AvgAggregator : public Aggregator } else { // 计算平均值 Value avg = value_; - avg = Value(avg.get_float() / count_); // 这里假设 value_ 是 float 类型 + avg = Value(avg.get_float() / static_cast(count_)); // 这里假设 value_ 是 float 类型 result = avg; } return RC::SUCCESS; } private: - Value value_; // 累加的和 - int count_ = 0; // 计数器 + Value value_; // 累加的和 + int count_ = 0; // 计数器 + bool inited_ = false; }; class MaxAggregator : public Aggregator @@ -100,14 +121,18 @@ class MaxAggregator : public Aggregator RC accumulate(const Value &value) override { // 首次赋值 - if (value_.attr_type() == AttrType::UNDEFINED && !value.is_null()) { - value_ = value; - return RC::SUCCESS; - } - // 更新最大值 - if (value.compare(value_) > 0) { - value_ = value; + if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { + if (!inited_) { + inited_ = true; + value_ = value; + } else { + // 更新最大值 + if (value.compare(value_) > 0) { + value_ = value; + } + } } + return RC::SUCCESS; } @@ -119,6 +144,7 @@ class MaxAggregator : public Aggregator private: Value value_; // 最大值 + bool inited_ = false; }; class MinAggregator : public Aggregator @@ -127,15 +153,18 @@ class MinAggregator : public Aggregator RC accumulate(const Value &value) override { // 首次赋值 - if (value_.attr_type() == AttrType::UNDEFINED && !value.is_null()) { - value_ = value; - return RC::SUCCESS; + if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { + if (!inited_) { + inited_ = true; + value_ = value; + } else { + // 更新最大值 + if (value.compare(value_) < 0) { + value_ = value; + } + } } - // 更新最小值 - if (value.compare(value_) < 0) { - value_ = value; - } return RC::SUCCESS; } @@ -147,4 +176,5 @@ class MinAggregator : public Aggregator private: Value value_; // 最小值 + bool inited_ = false; }; From fb4be24895a4ecb1a5ad53fee8c97a93d1a49576 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 30 Sep 2024 00:40:33 +0800 Subject: [PATCH 062/308] =?UTF-8?q?fix=20sum=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/aggregator.h | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/observer/sql/expr/aggregator.h b/src/observer/sql/expr/aggregator.h index c89421f3..a70dab6a 100644 --- a/src/observer/sql/expr/aggregator.h +++ b/src/observer/sql/expr/aggregator.h @@ -26,54 +26,54 @@ class Aggregator virtual RC evaluate(Value &result) = 0; }; -class SumAggregator : public Aggregator +class CountAggregator : public Aggregator { public: RC accumulate(const Value &value) override { - if (value_.attr_type() == AttrType::UNDEFINED) { - if (!inited_) { - inited_ = true; - value_ = value; - } else { - Value::add(value, value_, value_); - } + // 只要传入的值类型不为未定义,就增加计数 + if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { + count_++; } - return RC::SUCCESS; } RC evaluate(Value &result) override { - result = value_; + result = Value(count_); // 返回计数结果 return RC::SUCCESS; } private: - Value value_; // 累加的和 - bool inited_ = false; + int count_ = 0; // 计数器 }; -class CountAggregator : public Aggregator +class SumAggregator : public Aggregator { public: RC accumulate(const Value &value) override { - // 只要传入的值类型不为未定义,就增加计数 if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { - count_++; + if (!inited_) { + inited_ = true; + value_ = value; + } else { + Value::add(value, value_, value_); + } } + return RC::SUCCESS; } RC evaluate(Value &result) override { - result = Value(count_); // 返回计数结果 + result = value_; return RC::SUCCESS; } private: - int count_ = 0; // 计数器 + Value value_; // 累加的和 + bool inited_ = false; }; class AvgAggregator : public Aggregator From cb8b05d7197619f65d3f5f4166bebd82097cbee0 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 30 Sep 2024 00:50:37 +0800 Subject: [PATCH 063/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=8D=95?= =?UTF-8?q?=E7=B4=A2=E5=BC=95=E7=9A=84=20show=20index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/executor/command_executor.cpp | 6 + .../sql/executor/show_index_executor.cpp | 64 + .../sql/executor/show_index_executor.h | 30 + src/observer/sql/parser/parse_defs.h | 11 + src/observer/sql/parser/yacc_sql.cpp | 2141 +++++++++-------- src/observer/sql/parser/yacc_sql.y | 12 + src/observer/sql/stmt/show_index_stmt.cpp | 25 + src/observer/sql/stmt/show_index_stmt.h | 36 + src/observer/sql/stmt/stmt.cpp | 5 + src/observer/sql/stmt/stmt.h | 4 +- 10 files changed, 1280 insertions(+), 1054 deletions(-) create mode 100644 src/observer/sql/executor/show_index_executor.cpp create mode 100644 src/observer/sql/executor/show_index_executor.h create mode 100644 src/observer/sql/stmt/show_index_stmt.cpp create mode 100644 src/observer/sql/stmt/show_index_stmt.h diff --git a/src/observer/sql/executor/command_executor.cpp b/src/observer/sql/executor/command_executor.cpp index 949f9cf3..196468aa 100644 --- a/src/observer/sql/executor/command_executor.cpp +++ b/src/observer/sql/executor/command_executor.cpp @@ -13,6 +13,7 @@ See the Mulan PSL v2 for more details. */ // #include "sql/executor/command_executor.h" +#include "sql/executor/show_index_executor.h" #include "common/log/log.h" #include "event/sql_event.h" #include "sql/executor/create_index_executor.h" @@ -63,6 +64,11 @@ RC CommandExecutor::execute(SQLStageEvent *sql_event) rc = executor.execute(sql_event); } break; + case StmtType::SHOW_INDEX: { + ShowIndexExecutor executor; + rc = executor.execute(sql_event); + } break; + case StmtType::BEGIN: { TrxBeginExecutor executor; rc = executor.execute(sql_event); diff --git a/src/observer/sql/executor/show_index_executor.cpp b/src/observer/sql/executor/show_index_executor.cpp new file mode 100644 index 00000000..0ac3fb54 --- /dev/null +++ b/src/observer/sql/executor/show_index_executor.cpp @@ -0,0 +1,64 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/29 * + * @Description : ShowIndexExecutor source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "sql/executor/show_index_executor.h" +#include "sql/stmt/stmt.h" +#include "event/session_event.h" +#include "common/log/log.h" +#include "event/sql_event.h" +#include "session/session.h" +#include "sql/operator/string_list_physical_operator.h" +#include "sql/stmt/desc_table_stmt.h" +#include "storage/db/db.h" +#include "storage/table/table.h" +#include "sql/stmt/show_index_stmt.h" + +RC ShowIndexExecutor::execute(SQLStageEvent *sql_event) +{ + RC rc = RC::SUCCESS; + Stmt *stmt = sql_event->stmt(); + SessionEvent *session_event = sql_event->session_event(); + Session *session = session_event->session(); + ASSERT(stmt->type() == StmtType::SHOW_INDEX, + "show index executor can not run this command: %d", + static_cast(stmt->type())); + + ShowIndexStmt *show_index_stmt = static_cast(stmt); + SqlResult *sql_result = session_event->sql_result(); + const char *table_name = show_index_stmt->table_name().c_str(); + + Db *db = session->get_current_db(); + Table *table = db->find_table(table_name); + if (table != nullptr) { + TupleSchema tuple_schema; + tuple_schema.append_cell(TupleCellSpec("", "Table", "Table")); + tuple_schema.append_cell(TupleCellSpec("", "Non_unique", "Non_unique")); + tuple_schema.append_cell(TupleCellSpec("", "Key_name", "Key_name")); + tuple_schema.append_cell(TupleCellSpec("", "Seq_in_index", "Seq_in_index")); + tuple_schema.append_cell(TupleCellSpec("", "Column_name", "Column_name")); + sql_result->set_tuple_schema(tuple_schema); + + auto oper = new StringListPhysicalOperator; + const TableMeta &table_meta = table->table_meta(); + for (int i = 0; i < table_meta.index_num(); i++) { + auto index = table_meta.index(i); + // TODO 目前尚未支持唯一索引 + oper->append({table_name, "1", index->name(), "1", index->field()}); + } + + sql_result->set_operator(unique_ptr(oper)); + } else { + sql_result->set_return_code(RC::SCHEMA_TABLE_NOT_EXIST); + sql_result->set_state_string("Table not exists"); + } + return rc; +} diff --git a/src/observer/sql/executor/show_index_executor.h b/src/observer/sql/executor/show_index_executor.h new file mode 100644 index 00000000..75331b8c --- /dev/null +++ b/src/observer/sql/executor/show_index_executor.h @@ -0,0 +1,30 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/29 * + * @Description : ShowIndexExecutor header file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "common/rc.h" + +class SQLStageEvent; + +/** + * @brief 描述表的执行器 + * @ingroup Executor + */ +class ShowIndexExecutor +{ +public: + ShowIndexExecutor() = default; + virtual ~ShowIndexExecutor() = default; + + RC execute(SQLStageEvent *sql_event); +}; diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 16b9c395..0a6bd1bb 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -228,6 +228,15 @@ struct DropIndexSqlNode std::string relation_name; ///< Relation name }; +/** + * @brief 描述一个show index语句 + * @ingroup SQLParser + */ +struct ShowIndexSqlNode +{ + std::string relation_name; ///< Relation name +}; + /** * @brief 描述一个desc table语句 * @ingroup SQLParser @@ -302,6 +311,7 @@ enum SqlCommandFlag SCF_DROP_TABLE, SCF_CREATE_INDEX, SCF_DROP_INDEX, + SCF_SHOW_INDEX, SCF_SYNC, SCF_SHOW_TABLES, SCF_DESC_TABLE, @@ -333,6 +343,7 @@ class ParsedSqlNode DropTableSqlNode drop_table; CreateIndexSqlNode create_index; DropIndexSqlNode drop_index; + ShowIndexSqlNode show_index; DescTableSqlNode desc_table; LoadDataSqlNode load_data; ExplainSqlNode explain; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 2b39616f..fad42e1e 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -219,43 +219,44 @@ enum yysymbol_kind_t YYSYMBOL_drop_table_stmt = 77, /* drop_table_stmt */ YYSYMBOL_show_tables_stmt = 78, /* show_tables_stmt */ YYSYMBOL_desc_table_stmt = 79, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 80, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 81, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 82, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 83, /* attr_def_list */ - YYSYMBOL_attr_def = 84, /* attr_def */ - YYSYMBOL_nullable_constraint = 85, /* nullable_constraint */ - YYSYMBOL_number = 86, /* number */ - YYSYMBOL_type = 87, /* type */ - YYSYMBOL_insert_stmt = 88, /* insert_stmt */ - YYSYMBOL_values_list = 89, /* values_list */ - YYSYMBOL_value_list = 90, /* value_list */ - YYSYMBOL_value = 91, /* value */ - YYSYMBOL_storage_format = 92, /* storage_format */ - YYSYMBOL_delete_stmt = 93, /* delete_stmt */ - YYSYMBOL_update_stmt = 94, /* update_stmt */ - YYSYMBOL_setClauses = 95, /* setClauses */ - YYSYMBOL_setClause = 96, /* setClause */ - YYSYMBOL_select_stmt = 97, /* select_stmt */ - YYSYMBOL_calc_stmt = 98, /* calc_stmt */ - YYSYMBOL_expression_list = 99, /* expression_list */ - YYSYMBOL_expression = 100, /* expression */ - YYSYMBOL_alias = 101, /* alias */ - YYSYMBOL_aggr_func_expr = 102, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 103, /* rel_attr */ - YYSYMBOL_relation = 104, /* relation */ - YYSYMBOL_rel_list = 105, /* rel_list */ - YYSYMBOL_joinClause = 106, /* joinClause */ - YYSYMBOL_joinClauses = 107, /* joinClauses */ - YYSYMBOL_where = 108, /* where */ - YYSYMBOL_condition_list = 109, /* condition_list */ - YYSYMBOL_condition = 110, /* condition */ - YYSYMBOL_comp_op = 111, /* comp_op */ - YYSYMBOL_group_by = 112, /* group_by */ - YYSYMBOL_load_data_stmt = 113, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 114, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 115, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 116 /* opt_semicolon */ + YYSYMBOL_show_index_stmt = 80, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 81, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 82, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 83, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 84, /* attr_def_list */ + YYSYMBOL_attr_def = 85, /* attr_def */ + YYSYMBOL_nullable_constraint = 86, /* nullable_constraint */ + YYSYMBOL_number = 87, /* number */ + YYSYMBOL_type = 88, /* type */ + YYSYMBOL_insert_stmt = 89, /* insert_stmt */ + YYSYMBOL_values_list = 90, /* values_list */ + YYSYMBOL_value_list = 91, /* value_list */ + YYSYMBOL_value = 92, /* value */ + YYSYMBOL_storage_format = 93, /* storage_format */ + YYSYMBOL_delete_stmt = 94, /* delete_stmt */ + YYSYMBOL_update_stmt = 95, /* update_stmt */ + YYSYMBOL_setClauses = 96, /* setClauses */ + YYSYMBOL_setClause = 97, /* setClause */ + YYSYMBOL_select_stmt = 98, /* select_stmt */ + YYSYMBOL_calc_stmt = 99, /* calc_stmt */ + YYSYMBOL_expression_list = 100, /* expression_list */ + YYSYMBOL_expression = 101, /* expression */ + YYSYMBOL_alias = 102, /* alias */ + YYSYMBOL_aggr_func_expr = 103, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 104, /* rel_attr */ + YYSYMBOL_relation = 105, /* relation */ + YYSYMBOL_rel_list = 106, /* rel_list */ + YYSYMBOL_joinClause = 107, /* joinClause */ + YYSYMBOL_joinClauses = 108, /* joinClauses */ + YYSYMBOL_where = 109, /* where */ + YYSYMBOL_condition_list = 110, /* condition_list */ + YYSYMBOL_condition = 111, /* condition */ + YYSYMBOL_comp_op = 112, /* comp_op */ + YYSYMBOL_group_by = 113, /* group_by */ + YYSYMBOL_load_data_stmt = 114, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 115, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 116, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 117 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -560,18 +561,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 67 +#define YYFINAL 69 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 196 +#define YYLAST 199 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 68 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 49 +#define YYNNTS 50 /* YYNRULES -- Number of rules. */ -#define YYNRULES 115 +#define YYNRULES 117 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 209 +#define YYNSTATES 213 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 318 @@ -906,9 +907,8 @@ static const yytype_int8 yytranslate[] = {0, #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = {0, - 211, - 211, - 219, + 212, + 212, 220, 221, 222, @@ -928,99 +928,102 @@ static const yytype_int16 yyrline[] = {0, 236, 237, 238, - 242, - 248, - 253, - 259, - 265, - 271, - 277, - 284, - 290, - 298, - 312, - 322, - 346, - 349, - 362, + 239, + 240, + 244, + 250, + 255, + 261, + 267, + 273, + 279, + 286, + 292, + 300, + 310, + 324, + 334, + 358, + 361, 374, - 399, - 403, - 408, - 414, - 417, - 418, - 419, + 386, + 411, + 415, 420, - 424, - 437, - 443, - 450, - 456, - 464, + 426, + 429, + 430, + 431, + 432, + 436, + 449, + 455, + 462, 468, - 472, - 478, - 485, - 488, - 495, - 508, - 523, - 529, - 537, - 547, - 570, - 606, - 615, - 624, - 639, - 642, - 645, - 648, + 476, + 480, + 484, + 490, + 497, + 500, + 507, + 520, + 535, + 541, + 549, + 559, + 582, + 618, + 627, + 636, 651, - 655, - 658, + 654, + 657, + 660, 663, - 669, - 672, - 679, - 682, - 685, - 690, - 698, - 704, - 709, - 719, - 725, - 735, - 753, - 764, - 770, - 780, - 783, - 789, + 667, + 670, + 675, + 681, + 684, + 691, + 694, + 697, + 702, + 710, + 716, + 721, + 731, + 737, + 747, + 765, + 776, + 782, 792, - 797, + 795, + 801, 804, + 809, 816, 828, 840, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, + 852, + 867, + 868, + 869, 870, + 871, + 872, + 873, + 874, 875, - 888, - 896, - 906, - 907}; + 876, + 882, + 887, + 900, + 908, + 918, + 919}; #endif /** Accessing symbol of state STATE. */ @@ -1113,6 +1116,7 @@ static const char *const yytname[] = {"\"end of file\"", "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", + "show_index_stmt", "create_index_stmt", "drop_index_stmt", "create_table_stmt", @@ -1155,7 +1159,7 @@ static const char *const yytname[] = {"\"end of file\"", static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif -#define YYPACT_NINF (-156) +#define YYPACT_NINF (-149) #define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) @@ -1165,215 +1169,219 @@ static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysy /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {97, - 7, - 12, +static const yytype_int16 yypact[] = {98, + 6, + 13, 37, 37, - -48, - 23, - -156, + -51, + 8, + -149, + -13, + -8, + -26, + -149, + -149, + -149, + -149, + -149, -19, - -7, - -23, - -156, - -156, - -156, - -156, - -156, - -20, - 9, - 97, - 58, - 71, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - 6, - 18, - 45, - 46, + 7, + 98, + 59, + 66, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + 14, + 19, + 26, + 34, 37, - -156, - -156, - -156, - -10, - -156, + -149, + -149, + -149, + -7, + -149, 37, - -156, - -156, - -156, - -2, - -156, - -156, + -149, + -149, + -149, + -1, + -149, + -149, + 62, + -149, + -149, + 80, + 58, + 64, 79, - -156, - -156, - 47, - 57, - 78, - 76, - 83, - -156, - -156, - -156, - -156, - 109, - 90, - -156, + 75, + 82, + -149, + -149, + -149, + -149, + 108, + 88, + -149, 91, - 19, - 16, + 20, + 17, + 68, + -149, 73, - -156, - 74, - -156, + -149, 37, 37, 37, 37, + 118, + 81, + 81, + 106, 114, - 80, - 100, - 103, - 84, - 64, - 77, 93, - 94, - 96, - -156, - -156, - 123, - -156, - -156, - 21, - 21, - -156, - -156, + -4, + 95, + 97, + 99, + 100, + -149, + -149, + 134, + -149, + -149, + -40, + -40, + -149, + -149, 37, - -156, - -1, - 103, + -149, + 0, + 114, + -149, 136, - -16, - -156, - 107, - -13, - -156, - -156, - 124, - 1, - 137, + 76, + -149, + 111, + -10, + -149, + -149, + 123, + 65, 141, - -156, - -156, - -156, - 112, - 142, - -156, - 64, - 143, - 128, - 95, - 95, - -156, - 126, - 64, - 84, - -156, - 158, - -156, - -156, - -156, - -156, - -8, + 144, + -149, + -149, + -149, + 115, + 145, + -149, + -4, + 146, + 131, + 94, + 94, + -149, + 129, + -4, 93, - 147, - 108, - 80, - 80, - -156, - 70, - -156, + -149, + 161, + -149, + -149, + -149, + -149, + 1, + 97, 150, - 115, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - 144, - -16, - -16, - -16, - -156, - -156, - 110, + 112, + 81, + 81, + -149, + 18, + -149, + 152, + 117, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + 147, + 76, + 76, + 76, + -149, + -149, + 119, 116, - 145, - -156, - -156, + 148, + -149, + -149, + 141, + 135, + 155, + 139, 137, - 130, - 152, - 138, - 129, - 103, - 4, - -156, - -156, - 64, - 64, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - 160, - -156, - -156, - 131, - -156, - -156, - -16, - 132, - -156, - -156, - 72, - 2, + 114, + 5, + -149, + -149, + -4, + -4, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + 157, + -149, + -149, + 140, + -149, + -149, + 76, 133, - -156, - 80, - -156, - -156, - -156, - 122, - -156, - -156}; + -149, + -149, + 87, + 2, + 138, + -149, + 81, + -149, + -149, + -149, + 124, + -149, + -149}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero @@ -1385,29 +1393,30 @@ static const yytype_int8 yydefact[] = {0, 0, 0, 0, - 25, + 26, 0, 0, 0, - 26, 27, 28, + 29, + 25, 24, - 23, 0, 0, 0, 0, - 114, + 116, + 23, 22, - 21, - 14, 15, 16, 17, + 18, 9, 10, 11, + 14, 12, 13, 8, @@ -1416,228 +1425,232 @@ static const yytype_int8 yydefact[] = {0, 6, 4, 3, - 18, 19, 20, + 21, 0, 0, 0, 0, 0, - 55, - 52, - 53, - 83, + 57, 54, + 55, + 85, + 56, 0, - 76, - 74, - 65, 78, + 76, + 67, + 80, + 79, 77, - 75, 0, + 32, 31, - 30, 0, 0, 0, 0, 0, - 112, + 0, + 114, 1, - 115, + 117, 2, 0, 0, - 29, + 30, 0, 0, 0, 0, - 73, + 75, 0, - 79, + 81, 0, 0, 0, 0, - 66, + 68, 0, 0, - 91, 0, + 93, 0, 0, 0, 0, 0, - 72, - 82, 0, + 74, 84, - 80, - 68, - 69, + 0, + 86, + 82, 70, 71, + 72, + 73, 0, - 85, - 78, - 91, - 0, + 87, + 80, 93, - 58, + 33, 0, - 91, + 95, 60, - 113, 0, + 93, + 62, + 115, 0, - 35, - 0, - 33, - 81, - 67, 0, - 86, - 110, + 37, 0, - 47, + 35, 83, + 69, + 0, + 88, + 112, + 0, + 49, + 85, 0, 0, - 92, 94, + 96, 0, 0, - 59, + 61, 0, - 43, - 44, 45, 46, - 41, - 0, + 47, + 48, + 43, 0, 0, 0, 0, - 63, 0, - 50, + 65, + 0, + 52, 0, 0, - 100, - 101, 102, 103, 104, 105, - 108, 106, + 107, + 110, + 108, 0, 0, - 93, - 62, - 61, + 95, + 64, + 63, 0, 0, 0, + 42, 40, - 38, - 35, - 56, + 37, + 58, 0, 0, - 89, 91, - 78, - 87, - 48, + 93, + 80, + 89, + 50, 0, 0, + 111, 109, - 107, - 97, 99, - 96, + 101, 98, - 95, - 111, - 42, + 100, + 97, + 113, + 44, 0, - 39, - 36, + 41, + 38, 0, + 36, 34, - 32, - 93, + 95, 0, - 110, - 51, + 112, + 53, 0, - 41, + 43, 0, - 88, + 90, 0, - 64, - 49, - 37, + 66, + 51, + 39, 0, - 90, - 57}; + 92, + 59}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-156, - -156, - 167, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - -156, - 20, - 49, +static const yytype_int16 yypgoto[] = {-149, + -149, + 166, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + -149, + 15, + 46, -12, - -156, - -156, - -156, - -156, - 8, - -89, - -156, - -156, - -156, - -156, - 59, - -156, - -156, + -149, + -149, + -149, + -149, + 10, + -92, + -149, + -149, + -149, + -149, + 57, + -149, + -149, -3, - -31, - 135, - -156, - -104, - -78, - 48, - -156, + -38, + 142, + -149, + -110, + -81, + 47, + -149, -9, - -100, - -155, - -156, - 66, - 0, - -156, - -156, - -156, - -156}; + -104, + -148, + -149, + 67, + -6, + -149, + -149, + -149, + -149}; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = {0, @@ -1655,153 +1668,155 @@ static const yytype_uint8 yydefgoto[] = {0, 30, 31, 32, - 141, - 116, - 167, - 188, - 139, 33, - 125, - 146, - 53, + 145, + 120, + 171, 192, + 143, 34, + 129, + 150, + 54, + 196, 35, - 111, - 112, 36, + 115, + 116, 37, - 54, + 38, 55, - 122, 56, + 126, 57, - 171, - 106, - 172, - 173, + 58, + 175, 109, - 129, - 130, - 158, - 145, - 38, + 176, + 177, + 113, + 133, + 134, + 162, + 149, 39, 40, - 69}; + 41, + 71}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = {113, - 58, - 78, - 78, - 128, - 185, - 123, - 105, - 78, - 132, - 75, - 133, - 164, +static const yytype_uint8 yytable[] = {117, 59, - 74, - 46, - 41, - 61, - 42, + 132, + 80, + 80, 127, - 77, - 43, - 165, - 44, - 166, - 76, 108, - 135, - 136, + 110, + 76, + 80, + 60, 137, - 138, + 136, + 77, + 79, + 42, + 189, + 43, + 61, 62, - 165, - 60, - 166, - 147, - 45, - 95, + 131, + 168, + 44, 63, - 201, - 94, - 64, - 161, + 45, + 84, + 85, 47, - 48, - 126, - 50, + 78, + 112, + 64, + 169, + 169, + 170, + 170, + 65, + 151, 46, - 121, - 99, - 100, - 101, + 98, + 180, + 181, + 97, + 66, + 165, 102, - 65, - 182, - 184, - 128, - 45, + 103, + 104, + 105, + 47, + 125, + 205, 67, - 79, - 79, - 80, + 186, + 188, + 132, + 48, + 49, + 46, + 51, + 69, + 81, 81, 82, 83, - 79, - 174, - 70, - 46, - 181, - 183, - 127, - 96, - 196, - 68, + 84, + 85, + 81, + 178, 47, + 70, + 185, + 187, + 131, + 200, + 99, + 72, 48, 49, 50, - 71, 51, + 73, 52, - 80, - 81, - 82, - 83, + 53, 82, 83, - 197, - 147, - 128, - 176, - 177, - 204, - 177, - 46, - 47, + 84, + 85, + 74, + 132, + 201, + 151, + 139, + 140, + 141, + 142, + 75, 48, 49, 50, - 120, 51, + 87, 52, + 53, + 124, 1, 2, - 127, - 72, - 73, - 86, + 131, + 47, + 208, + 181, 3, 4, 5, @@ -1810,145 +1825,148 @@ static const yytype_uint8 yytable[] = {113, 8, 9, 10, - 85, - 87, 88, + 89, + 91, 11, 12, 13, - 47, - 48, - 149, - 50, - 89, + 153, 90, - 91, - 14, - 15, 92, 93, - 97, - 98, - 103, - 107, + 94, + 100, + 95, + 14, + 15, + 96, + 101, + 48, + 49, + 130, + 51, 16, - 114, + 106, 17, - 104, - 108, + 107, + 111, 18, - 119, - 110, - 150, - 151, - 152, - 153, 154, 155, 156, 157, - 115, - 117, - 124, + 158, + 159, + 160, + 161, + 112, + 114, + 123, + 128, 118, - 131, - 140, - 134, - 142, - 143, - 76, + 119, + 138, + 121, + 122, + 135, 144, + 146, + 147, + 78, 148, - 160, - 163, - 169, - 170, - 178, - 186, - 179, - 193, - 180, - 187, - 189, + 152, + 164, + 167, + 173, + 182, + 174, + 183, 191, + 197, + 184, + 203, + 193, + 190, + 198, 195, - 200, - 194, + 206, + 68, + 212, 199, + 194, + 204, + 210, + 172, + 209, 202, - 208, - 206, - 66, - 198, - 205, - 190, - 168, - 84, - 162, - 175, + 166, 207, - 159, + 179, 0, - 203}; + 211, + 86, + 163}; -static const yytype_int16 yycheck[] = {89, +static const yytype_int16 yycheck[] = {92, 4, + 112, 4, 4, - 108, - 160, - 106, - 85, + 109, + 87, + 88, + 46, 4, + 61, + 115, 22, 20, - 111, - 20, - 61, - 45, - 31, + 52, 9, - 36, + 164, 11, - 108, - 51, + 10, + 11, + 112, + 20, 9, - 30, + 36, 11, - 32, + 65, + 66, + 31, 35, 39, - 26, - 27, - 28, - 29, 38, 30, - 10, + 30, 32, - 124, + 32, + 61, + 128, 20, 21, - 61, - 194, + 21, + 22, 21, 61, - 131, - 59, - 60, - 61, - 62, - 31, - 49, - 80, - 81, + 135, 82, 83, + 84, + 85, + 31, + 49, + 198, 44, - 158, - 159, - 160, + 162, + 163, + 164, + 59, + 60, 20, + 62, 0, 61, 61, @@ -1957,15 +1975,15 @@ static const yytype_int16 yycheck[] = {89, 65, 66, 61, - 144, - 61, + 148, 31, - 158, - 159, - 160, - 75, - 173, 3, + 162, + 163, + 164, + 177, + 77, + 61, 59, 60, 61, @@ -1977,29 +1995,29 @@ static const yytype_int16 yycheck[] = {89, 64, 65, 66, - 65, - 66, - 177, - 178, - 194, - 21, - 22, - 21, - 22, - 31, + 61, + 198, + 181, + 182, + 26, + 27, + 28, + 29, + 61, 59, 60, 61, 62, - 103, + 38, 64, 65, + 106, 6, 7, - 194, - 61, - 61, - 61, + 198, + 31, + 21, + 22, 12, 13, 14, @@ -2014,29 +2032,27 @@ static const yytype_int16 yycheck[] = {89, 23, 24, 25, - 59, - 60, 30, - 62, + 61, 51, 45, 20, + 61, + 42, 33, 34, 42, - 42, 61, + 59, + 60, 61, - 22, - 37, - 41, 62, + 41, + 22, 43, 61, - 39, + 37, 46, - 21, - 61, 51, 52, 53, @@ -2045,13 +2061,17 @@ static const yytype_int16 yycheck[] = {89, 56, 57, 58, + 39, 61, - 61, + 21, 20, + 62, + 61, + 36, + 61, 61, 51, 22, - 36, 20, 50, 35, @@ -2060,34 +2080,34 @@ static const yytype_int16 yycheck[] = {89, 40, 9, 21, - 61, 20, 61, 57, + 59, 21, 30, - 59, + 21, 31, - 47, - 49, - 48, + 61, 42, - 21, + 47, 50, + 18, 61, + 49, + 172, + 48, 51, - 18, - 178, - 199, - 168, - 140, - 55, - 132, 144, - 202, - 128, + 203, + 182, + 136, + 200, + 148, -1, - 196}; + 206, + 56, + 132}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ @@ -2124,14 +2144,15 @@ static const yytype_int8 yystos[] = {0, 80, 81, 82, - 88, - 93, + 83, + 89, 94, - 97, + 95, 98, - 113, + 99, 114, 115, + 116, 9, 11, 9, @@ -2144,14 +2165,15 @@ static const yytype_int8 yystos[] = {0, 62, 64, 65, - 91, - 99, + 92, 100, - 102, + 101, 103, - 99, + 104, + 100, 61, 10, + 11, 36, 38, 61, @@ -2160,22 +2182,23 @@ static const yytype_int8 yystos[] = {0, 70, 0, 3, - 116, + 117, 61, 61, 61, 61, - 100, + 101, 20, 35, - 100, + 101, 4, 61, 63, 64, 65, 66, - 101, + 102, + 38, 38, 61, 61, @@ -2187,58 +2210,59 @@ static const yytype_int8 yystos[] = {0, 42, 21, 21, - 99, + 100, 61, 61, - 100, - 100, - 100, - 100, + 101, + 101, + 101, + 101, 22, 61, - 104, + 105, + 106, 105, 37, 39, - 108, + 109, 61, - 95, 96, - 91, + 97, + 92, 62, 61, - 84, + 85, 61, 61, 21, - 99, + 100, 49, - 101, - 108, + 102, + 109, 20, - 89, + 90, 61, - 91, - 103, - 109, + 92, + 104, 110, + 111, 51, 22, - 108, + 109, 36, 26, 27, 28, 29, - 87, + 88, 22, - 83, + 84, 20, 50, 22, - 112, - 90, + 113, 91, + 92, 22, 30, 51, @@ -2249,56 +2273,56 @@ static const yytype_int8 yystos[] = {0, 56, 57, 58, - 111, - 111, + 112, + 112, 40, - 91, - 96, + 92, + 97, 9, 20, 30, 32, + 86, 85, - 84, 21, 61, - 104, - 106, + 105, 107, - 104, + 108, 105, + 106, 21, 22, 20, 57, 30, - 91, - 103, - 91, - 103, - 109, + 92, + 104, + 92, + 104, + 110, 61, 59, - 86, + 87, 31, - 83, + 84, 47, - 92, + 93, 21, 42, 49, - 108, + 109, + 92, 91, - 90, 21, 48, - 109, + 110, 50, - 112, + 113, 21, - 85, + 86, 51, - 107, + 108, 61}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -2325,6 +2349,7 @@ static const yytype_int8 yyr1[] = {0, 70, 70, 70, + 70, 71, 72, 73, @@ -2338,86 +2363,87 @@ static const yytype_int8 yyr1[] = {0, 81, 82, 83, - 83, 84, 84, 85, 85, - 85, 86, - 87, - 87, - 87, + 86, + 86, 87, 88, - 89, + 88, + 88, + 88, 89, 90, 90, 91, 91, - 91, - 91, 92, 92, + 92, + 92, + 93, 93, 94, 95, - 95, 96, - 97, + 96, 97, 98, + 98, 99, - 99, - 100, - 100, - 100, - 100, - 100, - 100, - 100, - 100, 100, 100, 101, 101, 101, + 101, + 101, + 101, + 101, + 101, + 101, + 101, + 102, 102, 102, 103, 103, 104, - 105, + 104, 105, 106, - 107, + 106, 107, 108, 108, 109, 109, - 109, 110, 110, 110, - 110, - 111, - 111, - 111, - 111, - 111, - 111, 111, 111, 111, 111, 112, + 112, + 112, + 112, + 112, + 112, + 112, + 112, + 112, + 112, 113, 114, 115, 116, - 116}; + 117, + 117}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = {0, @@ -2449,9 +2475,11 @@ static const yytype_int8 yyr2[] = {0, 1, 1, 1, + 1, 3, 2, 2, + 4, 8, 5, 8, @@ -3318,93 +3346,104 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YY_REDUCE_PRINT(yyn); switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 212 "yacc_sql.y" +#line 213 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1781 "yacc_sql.cpp" +#line 1785 "yacc_sql.cpp" break; - case 23: /* exit_stmt: EXIT */ -#line 242 "yacc_sql.y" + case 24: /* exit_stmt: EXIT */ +#line 244 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1790 "yacc_sql.cpp" +#line 1794 "yacc_sql.cpp" break; - case 24: /* help_stmt: HELP */ -#line 248 "yacc_sql.y" + case 25: /* help_stmt: HELP */ +#line 250 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1798 "yacc_sql.cpp" +#line 1802 "yacc_sql.cpp" break; - case 25: /* sync_stmt: SYNC */ -#line 253 "yacc_sql.y" + case 26: /* sync_stmt: SYNC */ +#line 255 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1806 "yacc_sql.cpp" +#line 1810 "yacc_sql.cpp" break; - case 26: /* begin_stmt: TRX_BEGIN */ -#line 259 "yacc_sql.y" + case 27: /* begin_stmt: TRX_BEGIN */ +#line 261 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1814 "yacc_sql.cpp" +#line 1818 "yacc_sql.cpp" break; - case 27: /* commit_stmt: TRX_COMMIT */ -#line 265 "yacc_sql.y" + case 28: /* commit_stmt: TRX_COMMIT */ +#line 267 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1822 "yacc_sql.cpp" +#line 1826 "yacc_sql.cpp" break; - case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 271 "yacc_sql.y" + case 29: /* rollback_stmt: TRX_ROLLBACK */ +#line 273 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1830 "yacc_sql.cpp" +#line 1834 "yacc_sql.cpp" break; - case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 277 "yacc_sql.y" + case 30: /* drop_table_stmt: DROP TABLE ID */ +#line 279 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1840 "yacc_sql.cpp" +#line 1844 "yacc_sql.cpp" break; - case 30: /* show_tables_stmt: SHOW TABLES */ -#line 284 "yacc_sql.y" + case 31: /* show_tables_stmt: SHOW TABLES */ +#line 286 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1848 "yacc_sql.cpp" +#line 1852 "yacc_sql.cpp" break; - case 31: /* desc_table_stmt: DESC ID */ -#line 290 "yacc_sql.y" + case 32: /* desc_table_stmt: DESC ID */ +#line 292 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1858 "yacc_sql.cpp" +#line 1862 "yacc_sql.cpp" + break; + + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ +#line 301 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; + show_index.relation_name = (yyvsp[0].string); + free((yyvsp[0].string)); + } +#line 1873 "yacc_sql.cpp" break; - case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 299 "yacc_sql.y" + case 34: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ +#line 311 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -3415,11 +3454,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1873 "yacc_sql.cpp" +#line 1888 "yacc_sql.cpp" break; - case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 313 "yacc_sql.y" + case 35: /* drop_index_stmt: DROP INDEX ID ON ID */ +#line 325 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -3427,11 +3466,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1885 "yacc_sql.cpp" +#line 1900 "yacc_sql.cpp" break; - case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 323 "yacc_sql.y" + case 36: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ +#line 335 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -3452,19 +3491,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); } } -#line 1910 "yacc_sql.cpp" +#line 1925 "yacc_sql.cpp" break; - case 35: /* attr_def_list: %empty */ -#line 346 "yacc_sql.y" + case 37: /* attr_def_list: %empty */ +#line 358 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1918 "yacc_sql.cpp" +#line 1933 "yacc_sql.cpp" break; - case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 350 "yacc_sql.y" + case 38: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 362 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -3474,11 +3513,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1932 "yacc_sql.cpp" +#line 1947 "yacc_sql.cpp" break; - case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 363 "yacc_sql.y" + case 39: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ +#line 375 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -3490,11 +3529,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 1948 "yacc_sql.cpp" +#line 1963 "yacc_sql.cpp" break; - case 38: /* attr_def: ID type nullable_constraint */ -#line 375 "yacc_sql.y" + case 40: /* attr_def: ID type nullable_constraint */ +#line 387 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -3516,75 +3555,75 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 1974 "yacc_sql.cpp" +#line 1989 "yacc_sql.cpp" break; - case 39: /* nullable_constraint: NOT NULL_T */ -#line 400 "yacc_sql.y" + case 41: /* nullable_constraint: NOT NULL_T */ +#line 412 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1982 "yacc_sql.cpp" +#line 1997 "yacc_sql.cpp" break; - case 40: /* nullable_constraint: NULLABLE */ -#line 404 "yacc_sql.y" + case 42: /* nullable_constraint: NULLABLE */ +#line 416 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1990 "yacc_sql.cpp" +#line 2005 "yacc_sql.cpp" break; - case 41: /* nullable_constraint: %empty */ -#line 408 "yacc_sql.y" + case 43: /* nullable_constraint: %empty */ +#line 420 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 1998 "yacc_sql.cpp" +#line 2013 "yacc_sql.cpp" break; - case 42: /* number: NUMBER */ -#line 414 "yacc_sql.y" + case 44: /* number: NUMBER */ +#line 426 "yacc_sql.y" { (yyval.number) = (yyvsp[0].number); } -#line 2004 "yacc_sql.cpp" +#line 2019 "yacc_sql.cpp" break; - case 43: /* type: INT_T */ -#line 417 "yacc_sql.y" + case 45: /* type: INT_T */ +#line 429 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2010 "yacc_sql.cpp" +#line 2025 "yacc_sql.cpp" break; - case 44: /* type: STRING_T */ -#line 418 "yacc_sql.y" + case 46: /* type: STRING_T */ +#line 430 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2016 "yacc_sql.cpp" +#line 2031 "yacc_sql.cpp" break; - case 45: /* type: FLOAT_T */ -#line 419 "yacc_sql.y" + case 47: /* type: FLOAT_T */ +#line 431 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2022 "yacc_sql.cpp" +#line 2037 "yacc_sql.cpp" break; - case 46: /* type: DATE_T */ -#line 420 "yacc_sql.y" + case 48: /* type: DATE_T */ +#line 432 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2028 "yacc_sql.cpp" +#line 2043 "yacc_sql.cpp" break; - case 47: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 425 "yacc_sql.y" + case 49: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 437 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -3594,102 +3633,102 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2042 "yacc_sql.cpp" +#line 2057 "yacc_sql.cpp" break; - case 48: /* values_list: LBRACE value_list RBRACE */ -#line 438 "yacc_sql.y" + case 50: /* values_list: LBRACE value_list RBRACE */ +#line 450 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2052 "yacc_sql.cpp" +#line 2067 "yacc_sql.cpp" break; - case 49: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 444 "yacc_sql.y" + case 51: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 456 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2061 "yacc_sql.cpp" +#line 2076 "yacc_sql.cpp" break; - case 50: /* value_list: value */ -#line 451 "yacc_sql.y" + case 52: /* value_list: value */ +#line 463 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2071 "yacc_sql.cpp" +#line 2086 "yacc_sql.cpp" break; - case 51: /* value_list: value_list COMMA value */ -#line 457 "yacc_sql.y" + case 53: /* value_list: value_list COMMA value */ +#line 469 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2080 "yacc_sql.cpp" +#line 2095 "yacc_sql.cpp" break; - case 52: /* value: NUMBER */ -#line 464 "yacc_sql.y" + case 54: /* value: NUMBER */ +#line 476 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2089 "yacc_sql.cpp" +#line 2104 "yacc_sql.cpp" break; - case 53: /* value: FLOAT */ -#line 468 "yacc_sql.y" + case 55: /* value: FLOAT */ +#line 480 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2098 "yacc_sql.cpp" +#line 2113 "yacc_sql.cpp" break; - case 54: /* value: SSS */ -#line 472 "yacc_sql.y" + case 56: /* value: SSS */ +#line 484 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2109 "yacc_sql.cpp" +#line 2124 "yacc_sql.cpp" break; - case 55: /* value: NULL_T */ -#line 478 "yacc_sql.y" + case 57: /* value: NULL_T */ +#line 490 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2117 "yacc_sql.cpp" +#line 2132 "yacc_sql.cpp" break; - case 56: /* storage_format: %empty */ -#line 485 "yacc_sql.y" + case 58: /* storage_format: %empty */ +#line 497 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2125 "yacc_sql.cpp" +#line 2140 "yacc_sql.cpp" break; - case 57: /* storage_format: STORAGE FORMAT EQ ID */ -#line 489 "yacc_sql.y" + case 59: /* storage_format: STORAGE FORMAT EQ ID */ +#line 501 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2133 "yacc_sql.cpp" +#line 2148 "yacc_sql.cpp" break; - case 58: /* delete_stmt: DELETE FROM ID where */ -#line 496 "yacc_sql.y" + case 60: /* delete_stmt: DELETE FROM ID where */ +#line 508 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -3699,11 +3738,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2147 "yacc_sql.cpp" +#line 2162 "yacc_sql.cpp" break; - case 59: /* update_stmt: UPDATE ID SET setClauses where */ -#line 509 "yacc_sql.y" + case 61: /* update_stmt: UPDATE ID SET setClauses where */ +#line 521 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -3715,41 +3754,41 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2163 "yacc_sql.cpp" +#line 2178 "yacc_sql.cpp" break; - case 60: /* setClauses: setClause */ -#line 524 "yacc_sql.y" + case 62: /* setClauses: setClause */ +#line 536 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2173 "yacc_sql.cpp" +#line 2188 "yacc_sql.cpp" break; - case 61: /* setClauses: setClauses COMMA setClause */ -#line 530 "yacc_sql.y" + case 63: /* setClauses: setClauses COMMA setClause */ +#line 542 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2182 "yacc_sql.cpp" +#line 2197 "yacc_sql.cpp" break; - case 62: /* setClause: ID EQ value */ -#line 538 "yacc_sql.y" + case 64: /* setClause: ID EQ value */ +#line 550 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } -#line 2193 "yacc_sql.cpp" +#line 2208 "yacc_sql.cpp" break; - case 63: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 548 "yacc_sql.y" + case 65: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 560 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -3772,11 +3811,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2220 "yacc_sql.cpp" +#line 2235 "yacc_sql.cpp" break; - case 64: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 571 "yacc_sql.y" + case 66: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 583 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -3809,21 +3848,21 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2257 "yacc_sql.cpp" +#line 2272 "yacc_sql.cpp" break; - case 65: /* calc_stmt: CALC expression_list */ -#line 607 "yacc_sql.y" + case 67: /* calc_stmt: CALC expression_list */ +#line 619 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2267 "yacc_sql.cpp" +#line 2282 "yacc_sql.cpp" break; - case 66: /* expression_list: expression alias */ -#line 616 "yacc_sql.y" + case 68: /* expression_list: expression alias */ +#line 628 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -3832,11 +3871,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2280 "yacc_sql.cpp" +#line 2295 "yacc_sql.cpp" break; - case 67: /* expression_list: expression alias COMMA expression_list */ -#line 625 "yacc_sql.y" + case 69: /* expression_list: expression alias COMMA expression_list */ +#line 637 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -3849,126 +3888,126 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2297 "yacc_sql.cpp" +#line 2312 "yacc_sql.cpp" break; - case 68: /* expression: expression '+' expression */ -#line 639 "yacc_sql.y" + case 70: /* expression: expression '+' expression */ +#line 651 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2305 "yacc_sql.cpp" +#line 2320 "yacc_sql.cpp" break; - case 69: /* expression: expression '-' expression */ -#line 642 "yacc_sql.y" + case 71: /* expression: expression '-' expression */ +#line 654 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2313 "yacc_sql.cpp" +#line 2328 "yacc_sql.cpp" break; - case 70: /* expression: expression '*' expression */ -#line 645 "yacc_sql.y" + case 72: /* expression: expression '*' expression */ +#line 657 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2321 "yacc_sql.cpp" +#line 2336 "yacc_sql.cpp" break; - case 71: /* expression: expression '/' expression */ -#line 648 "yacc_sql.y" + case 73: /* expression: expression '/' expression */ +#line 660 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2329 "yacc_sql.cpp" +#line 2344 "yacc_sql.cpp" break; - case 72: /* expression: LBRACE expression RBRACE */ -#line 651 "yacc_sql.y" + case 74: /* expression: LBRACE expression RBRACE */ +#line 663 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2338 "yacc_sql.cpp" +#line 2353 "yacc_sql.cpp" break; - case 73: /* expression: '-' expression */ -#line 655 "yacc_sql.y" + case 75: /* expression: '-' expression */ +#line 667 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2346 "yacc_sql.cpp" +#line 2361 "yacc_sql.cpp" break; - case 74: /* expression: value */ -#line 658 "yacc_sql.y" + case 76: /* expression: value */ +#line 670 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2356 "yacc_sql.cpp" +#line 2371 "yacc_sql.cpp" break; - case 75: /* expression: rel_attr */ -#line 663 "yacc_sql.y" + case 77: /* expression: rel_attr */ +#line 675 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2367 "yacc_sql.cpp" +#line 2382 "yacc_sql.cpp" break; - case 76: /* expression: '*' */ -#line 669 "yacc_sql.y" + case 78: /* expression: '*' */ +#line 681 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2375 "yacc_sql.cpp" +#line 2390 "yacc_sql.cpp" break; - case 77: /* expression: aggr_func_expr */ -#line 672 "yacc_sql.y" + case 79: /* expression: aggr_func_expr */ +#line 684 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2383 "yacc_sql.cpp" +#line 2398 "yacc_sql.cpp" break; - case 78: /* alias: %empty */ -#line 679 "yacc_sql.y" + case 80: /* alias: %empty */ +#line 691 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2391 "yacc_sql.cpp" +#line 2406 "yacc_sql.cpp" break; - case 79: /* alias: ID */ -#line 682 "yacc_sql.y" + case 81: /* alias: ID */ +#line 694 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2399 "yacc_sql.cpp" +#line 2414 "yacc_sql.cpp" break; - case 80: /* alias: AS ID */ -#line 685 "yacc_sql.y" + case 82: /* alias: AS ID */ +#line 697 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2407 "yacc_sql.cpp" +#line 2422 "yacc_sql.cpp" break; - case 81: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 691 "yacc_sql.y" + case 83: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 703 "yacc_sql.y" { if ((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); @@ -3976,29 +4015,29 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2419 "yacc_sql.cpp" +#line 2434 "yacc_sql.cpp" break; - case 82: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 699 "yacc_sql.y" + case 84: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 711 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); } -#line 2427 "yacc_sql.cpp" +#line 2442 "yacc_sql.cpp" break; - case 83: /* rel_attr: ID */ -#line 704 "yacc_sql.y" + case 85: /* rel_attr: ID */ +#line 716 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2437 "yacc_sql.cpp" +#line 2452 "yacc_sql.cpp" break; - case 84: /* rel_attr: ID DOT ID */ -#line 709 "yacc_sql.y" + case 86: /* rel_attr: ID DOT ID */ +#line 721 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -4006,19 +4045,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2449 "yacc_sql.cpp" +#line 2464 "yacc_sql.cpp" break; - case 85: /* relation: ID */ -#line 719 "yacc_sql.y" + case 87: /* relation: ID */ +#line 731 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2457 "yacc_sql.cpp" +#line 2472 "yacc_sql.cpp" break; - case 86: /* rel_list: relation alias */ -#line 725 "yacc_sql.y" + case 88: /* rel_list: relation alias */ +#line 737 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if (nullptr != (yyvsp[0].string)) { @@ -4029,11 +4068,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2472 "yacc_sql.cpp" +#line 2487 "yacc_sql.cpp" break; - case 87: /* rel_list: relation alias COMMA rel_list */ -#line 735 "yacc_sql.y" + case 89: /* rel_list: relation alias COMMA rel_list */ +#line 747 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -4050,11 +4089,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); } -#line 2492 "yacc_sql.cpp" +#line 2507 "yacc_sql.cpp" break; - case 88: /* joinClause: relation ON condition_list */ -#line 754 "yacc_sql.y" + case 90: /* joinClause: relation ON condition_list */ +#line 766 "yacc_sql.y" { (yyval.join_clause) = new JoinSqlNode; (yyval.join_clause)->relation = (yyvsp[-2].string); @@ -4062,75 +4101,75 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].condition_list); } -#line 2504 "yacc_sql.cpp" +#line 2519 "yacc_sql.cpp" break; - case 89: /* joinClauses: joinClause */ -#line 765 "yacc_sql.y" + case 91: /* joinClauses: joinClause */ +#line 777 "yacc_sql.y" { (yyval.join_clauses) = new std::vector; (yyval.join_clauses)->emplace_back(*(yyvsp[0].join_clause)); delete (yyvsp[0].join_clause); } -#line 2514 "yacc_sql.cpp" +#line 2529 "yacc_sql.cpp" break; - case 90: /* joinClauses: joinClause INNER JOIN joinClauses */ -#line 771 "yacc_sql.y" + case 92: /* joinClauses: joinClause INNER JOIN joinClauses */ +#line 783 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->emplace_back(*(yyvsp[-3].join_clause)); delete (yyvsp[-3].join_clause); } -#line 2524 "yacc_sql.cpp" +#line 2539 "yacc_sql.cpp" break; - case 91: /* where: %empty */ -#line 780 "yacc_sql.y" + case 93: /* where: %empty */ +#line 792 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2532 "yacc_sql.cpp" +#line 2547 "yacc_sql.cpp" break; - case 92: /* where: WHERE condition_list */ -#line 783 "yacc_sql.y" + case 94: /* where: WHERE condition_list */ +#line 795 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2540 "yacc_sql.cpp" +#line 2555 "yacc_sql.cpp" break; - case 93: /* condition_list: %empty */ -#line 789 "yacc_sql.y" + case 95: /* condition_list: %empty */ +#line 801 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2548 "yacc_sql.cpp" +#line 2563 "yacc_sql.cpp" break; - case 94: /* condition_list: condition */ -#line 792 "yacc_sql.y" + case 96: /* condition_list: condition */ +#line 804 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2558 "yacc_sql.cpp" +#line 2573 "yacc_sql.cpp" break; - case 95: /* condition_list: condition AND condition_list */ -#line 797 "yacc_sql.y" + case 97: /* condition_list: condition AND condition_list */ +#line 809 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2568 "yacc_sql.cpp" +#line 2583 "yacc_sql.cpp" break; - case 96: /* condition: rel_attr comp_op value */ -#line 805 "yacc_sql.y" + case 98: /* condition: rel_attr comp_op value */ +#line 817 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -4142,11 +4181,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2584 "yacc_sql.cpp" +#line 2599 "yacc_sql.cpp" break; - case 97: /* condition: value comp_op value */ -#line 817 "yacc_sql.y" + case 99: /* condition: value comp_op value */ +#line 829 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -4158,11 +4197,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2600 "yacc_sql.cpp" +#line 2615 "yacc_sql.cpp" break; - case 98: /* condition: rel_attr comp_op rel_attr */ -#line 829 "yacc_sql.y" + case 100: /* condition: rel_attr comp_op rel_attr */ +#line 841 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -4174,11 +4213,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2616 "yacc_sql.cpp" +#line 2631 "yacc_sql.cpp" break; - case 99: /* condition: value comp_op rel_attr */ -#line 841 "yacc_sql.y" + case 101: /* condition: value comp_op rel_attr */ +#line 853 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -4190,99 +4229,99 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2632 "yacc_sql.cpp" +#line 2647 "yacc_sql.cpp" break; - case 100: /* comp_op: EQ */ -#line 855 "yacc_sql.y" + case 102: /* comp_op: EQ */ +#line 867 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2638 "yacc_sql.cpp" +#line 2653 "yacc_sql.cpp" break; - case 101: /* comp_op: LT */ -#line 856 "yacc_sql.y" + case 103: /* comp_op: LT */ +#line 868 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2644 "yacc_sql.cpp" +#line 2659 "yacc_sql.cpp" break; - case 102: /* comp_op: GT */ -#line 857 "yacc_sql.y" + case 104: /* comp_op: GT */ +#line 869 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2650 "yacc_sql.cpp" +#line 2665 "yacc_sql.cpp" break; - case 103: /* comp_op: LE */ -#line 858 "yacc_sql.y" + case 105: /* comp_op: LE */ +#line 870 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2656 "yacc_sql.cpp" +#line 2671 "yacc_sql.cpp" break; - case 104: /* comp_op: GE */ -#line 859 "yacc_sql.y" + case 106: /* comp_op: GE */ +#line 871 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2662 "yacc_sql.cpp" +#line 2677 "yacc_sql.cpp" break; - case 105: /* comp_op: NE */ -#line 860 "yacc_sql.y" + case 107: /* comp_op: NE */ +#line 872 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2668 "yacc_sql.cpp" +#line 2683 "yacc_sql.cpp" break; - case 106: /* comp_op: IS */ -#line 861 "yacc_sql.y" + case 108: /* comp_op: IS */ +#line 873 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2674 "yacc_sql.cpp" +#line 2689 "yacc_sql.cpp" break; - case 107: /* comp_op: IS NOT */ -#line 862 "yacc_sql.y" + case 109: /* comp_op: IS NOT */ +#line 874 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2680 "yacc_sql.cpp" +#line 2695 "yacc_sql.cpp" break; - case 108: /* comp_op: LIKE */ -#line 863 "yacc_sql.y" + case 110: /* comp_op: LIKE */ +#line 875 "yacc_sql.y" { (yyval.comp) = LIKE_OP; } -#line 2686 "yacc_sql.cpp" +#line 2701 "yacc_sql.cpp" break; - case 109: /* comp_op: NOT LIKE */ -#line 864 "yacc_sql.y" + case 111: /* comp_op: NOT LIKE */ +#line 876 "yacc_sql.y" { (yyval.comp) = NOT_LIKE_OP; } -#line 2692 "yacc_sql.cpp" +#line 2707 "yacc_sql.cpp" break; - case 110: /* group_by: %empty */ -#line 870 "yacc_sql.y" + case 112: /* group_by: %empty */ +#line 882 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2700 "yacc_sql.cpp" +#line 2715 "yacc_sql.cpp" break; - case 111: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 876 "yacc_sql.y" + case 113: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 888 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -4292,20 +4331,20 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); free(tmp_file_name); } -#line 2714 "yacc_sql.cpp" +#line 2729 "yacc_sql.cpp" break; - case 112: /* explain_stmt: EXPLAIN command_wrapper */ -#line 889 "yacc_sql.y" + case 114: /* explain_stmt: EXPLAIN command_wrapper */ +#line 901 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2723 "yacc_sql.cpp" +#line 2738 "yacc_sql.cpp" break; - case 113: /* set_variable_stmt: SET ID EQ value */ -#line 897 "yacc_sql.y" + case 115: /* set_variable_stmt: SET ID EQ value */ +#line 909 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -4313,10 +4352,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2735 "yacc_sql.cpp" +#line 2750 "yacc_sql.cpp" break; -#line 2739 "yacc_sql.cpp" +#line 2754 "yacc_sql.cpp" default: break; } @@ -4515,7 +4554,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) return yyresult; } -#line 909 "yacc_sql.y" +#line 921 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 29639803..7b025a20 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -190,6 +190,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type desc_table_stmt %type create_index_stmt %type drop_index_stmt +%type show_index_stmt %type sync_stmt %type begin_stmt %type commit_stmt @@ -227,6 +228,7 @@ command_wrapper: | desc_table_stmt | create_index_stmt | drop_index_stmt + | show_index_stmt | sync_stmt | begin_stmt | commit_stmt @@ -294,6 +296,16 @@ desc_table_stmt: } ; +show_index_stmt: + SHOW INDEX FROM relation + { + $$ = new ParsedSqlNode(SCF_SHOW_INDEX); + ShowIndexSqlNode &show_index = $$->show_index; + show_index.relation_name = $4; + free($4); + } + ; + create_index_stmt: /*create index 语句的语法解析树*/ CREATE INDEX ID ON ID LBRACE ID RBRACE { diff --git a/src/observer/sql/stmt/show_index_stmt.cpp b/src/observer/sql/stmt/show_index_stmt.cpp new file mode 100644 index 00000000..37ce60a4 --- /dev/null +++ b/src/observer/sql/stmt/show_index_stmt.cpp @@ -0,0 +1,25 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/29 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "storage/db/db.h" +#include "sql/stmt/show_index_stmt.h" + +ShowIndexStmt::ShowIndexStmt(const std::string &table_name) : table_name_(table_name) {} + +RC ShowIndexStmt::create(Db *db, const ShowIndexSqlNode &show_index, Stmt *&stmt) +{ + if (db->find_table(show_index.relation_name.c_str()) == nullptr) { + return RC::SCHEMA_TABLE_NOT_EXIST; + } + stmt = new ShowIndexStmt(show_index.relation_name); + return RC::SUCCESS; +} diff --git a/src/observer/sql/stmt/show_index_stmt.h b/src/observer/sql/stmt/show_index_stmt.h new file mode 100644 index 00000000..c5db80d6 --- /dev/null +++ b/src/observer/sql/stmt/show_index_stmt.h @@ -0,0 +1,36 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/29 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "sql/stmt/stmt.h" + +/** + * @brief 描述表的语句 + * @ingroup Statement + * @details 虽然解析成了stmt,但是与原始的SQL解析后的数据也差不多 + */ +class ShowIndexStmt : public Stmt +{ +public: + ShowIndexStmt(const std::string &table_name); + ~ShowIndexStmt() override = default; + + StmtType type() const override { return StmtType::SHOW_INDEX; } + + const std::string &table_name() const { return table_name_; } + + static RC create(Db *db, const ShowIndexSqlNode &show_index, Stmt *&stmt); + +private: + const std::string &table_name_; +}; diff --git a/src/observer/sql/stmt/stmt.cpp b/src/observer/sql/stmt/stmt.cpp index 5bd8711a..4a4df463 100644 --- a/src/observer/sql/stmt/stmt.cpp +++ b/src/observer/sql/stmt/stmt.cpp @@ -29,6 +29,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/stmt/select_stmt.h" #include "sql/stmt/set_variable_stmt.h" #include "sql/stmt/show_tables_stmt.h" +#include "sql/stmt/show_index_stmt.h" #include "sql/stmt/trx_begin_stmt.h" #include "sql/stmt/trx_end_stmt.h" @@ -93,6 +94,10 @@ RC Stmt::create_stmt(Db *db, ParsedSqlNode &sql_node, Stmt *&stmt) return ShowTablesStmt::create(db, stmt); } + case SCF_SHOW_INDEX: { + return ShowIndexStmt::create(db, sql_node.show_index, stmt); + } + case SCF_BEGIN: { return TrxBeginStmt::create(stmt); } diff --git a/src/observer/sql/stmt/stmt.h b/src/observer/sql/stmt/stmt.h index 2d10ff4c..3ee7bca1 100644 --- a/src/observer/sql/stmt/stmt.h +++ b/src/observer/sql/stmt/stmt.h @@ -39,6 +39,7 @@ class Db; DEFINE_ENUM_ITEM(DROP_TABLE) \ DEFINE_ENUM_ITEM(CREATE_INDEX) \ DEFINE_ENUM_ITEM(DROP_INDEX) \ + DEFINE_ENUM_ITEM(SHOW_INDEX) \ DEFINE_ENUM_ITEM(SYNC) \ DEFINE_ENUM_ITEM(SHOW_TABLES) \ DEFINE_ENUM_ITEM(DESC_TABLE) \ @@ -86,8 +87,5 @@ class Stmt virtual StmtType type() const = 0; -public: static RC create_stmt(Db *db, ParsedSqlNode &sql_node, Stmt *&stmt); - -private: }; From 5e3889b2a0eb7b38dc73c5ad06227ed7801d5391 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 30 Sep 2024 00:52:05 +0800 Subject: [PATCH 064/308] =?UTF-8?q?test:=20=E5=8D=95=E7=B4=A2=E5=BC=95=20s?= =?UTF-8?q?how=20index=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-show-index.result | 35 ++++++++++++++++++++++ test/case/test/primary-show-index.test | 19 ++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 test/case/result/primary-show-index.result create mode 100644 test/case/test/primary-show-index.test diff --git a/test/case/result/primary-show-index.result b/test/case/result/primary-show-index.result new file mode 100644 index 00000000..7c46933c --- /dev/null +++ b/test/case/result/primary-show-index.result @@ -0,0 +1,35 @@ +INITIALIZATION +CREATE TABLE INDEX_TABLE_1(ID INT, AGE INT) +SUCCESS +INSERT INTO INDEX_TABLE_1 VALUES (1,1); +SUCCESS +INSERT INTO INDEX_TABLE_1 VALUES (2,2); +SUCCESS +INSERT INTO INDEX_TABLE_1 VALUES (3,3); +SUCCESS +INSERT INTO INDEX_TABLE_1 VALUES (1,2); +SUCCESS +INSERT INTO INDEX_TABLE_1 VALUES (1,3); +SUCCESS + +1. SHOW EMPTY INDEX +SHOW INDEX FROM INDEX_TABLE_1; +TABLE | NON_UNIQUE | KEY_NAME | SEQ_IN_INDEX | COLUMN_NAME + +2. SHOW AN INDEX +CREATE INDEX INDEX_ID_1 ON INDEX_TABLE_1(ID); +SUCCESS +SHOW INDEX FROM INDEX_TABLE_1; +TABLE | NON_UNIQUE | KEY_NAME | SEQ_IN_INDEX | COLUMN_NAME +INDEX_TABLE_1 | 1 | INDEX_ID_1 | 1 | ID + +3. SHOW INDEXES +CREATE INDEX INDEX_ID_2 ON INDEX_TABLE_1(ID); +SUCCESS +CREATE INDEX INDEX_ID_3 ON INDEX_TABLE_1(AGE); +SUCCESS +SHOW INDEX FROM INDEX_TABLE_1; +TABLE | NON_UNIQUE | KEY_NAME | SEQ_IN_INDEX | COLUMN_NAME +INDEX_TABLE_1 | 1 | INDEX_ID_1 | 1 | ID +INDEX_TABLE_1 | 1 | INDEX_ID_2 | 1 | ID +INDEX_TABLE_1 | 1 | INDEX_ID_3 | 1 | AGE diff --git a/test/case/test/primary-show-index.test b/test/case/test/primary-show-index.test new file mode 100644 index 00000000..f5b3311b --- /dev/null +++ b/test/case/test/primary-show-index.test @@ -0,0 +1,19 @@ +-- echo INITIALIZATION +CREATE TABLE Index_table_1(id int, age int) +insert into Index_table_1 values (1,1); +insert into Index_table_1 values (2,2); +insert into Index_table_1 values (3,3); +insert into Index_table_1 values (1,2); +insert into Index_table_1 values (1,3); + +-- echo 1. show empty index +SHOW INDEX FROM Index_table_1; + +-- echo 2. show an index +CREATE INDEX index_id_1 on Index_table_1(id); +SHOW INDEX FROM Index_table_1; + +-- echo 3. show indexes +CREATE INDEX index_id_2 on Index_table_1(id); +CREATE INDEX index_id_3 on Index_table_1(age); +SHOW INDEX FROM Index_table_1; From 0927672bef21038cf665bb2e91e28f91d60793a5 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 30 Sep 2024 01:17:05 +0800 Subject: [PATCH 065/308] =?UTF-8?q?=E6=90=9E=E5=AE=9A=E8=81=9A=E5=90=88?= =?UTF-8?q?=E7=9A=84null=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/aggregator.h | 72 ++++++++++++++++-------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/src/observer/sql/expr/aggregator.h b/src/observer/sql/expr/aggregator.h index a70dab6a..feac3d34 100644 --- a/src/observer/sql/expr/aggregator.h +++ b/src/observer/sql/expr/aggregator.h @@ -53,15 +53,17 @@ class SumAggregator : public Aggregator public: RC accumulate(const Value &value) override { - if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { - if (!inited_) { - inited_ = true; - value_ = value; + if (value.is_null()) { + if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { + value_ = Value(NullValue()); + } + } else { + if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { + value_ = value; } else { Value::add(value, value_, value_); } } - return RC::SUCCESS; } @@ -73,7 +75,6 @@ class SumAggregator : public Aggregator private: Value value_; // 累加的和 - bool inited_ = false; }; class AvgAggregator : public Aggregator @@ -81,23 +82,29 @@ class AvgAggregator : public Aggregator public: RC accumulate(const Value &value) override { - // 类型匹配检查 - if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { - if (!inited_) { - inited_ = true; - value_ = value; // 首次赋值 + if (value.is_null()) { + if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { + value_ = Value(NullValue()); + } + } else { + if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { + value_ = value; + count_ = 1; } else { - // 累加和计数 - Value::add(value_, value, value_); + Value::add(value, value_, value_); + count_++; } - count_++; } - return RC::SUCCESS; } RC evaluate(Value &result) override { + if (value_.is_null()) { + result = Value(NullValue()); + return RC::SUCCESS; + } + if (count_ == 0) { result = Value(0); // 避免除以零 } else { @@ -110,9 +117,8 @@ class AvgAggregator : public Aggregator } private: - Value value_; // 累加的和 - int count_ = 0; // 计数器 - bool inited_ = false; + Value value_; // 累加的和 + int count_ = 0; // 计数器 }; class MaxAggregator : public Aggregator @@ -120,11 +126,13 @@ class MaxAggregator : public Aggregator public: RC accumulate(const Value &value) override { - // 首次赋值 - if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { - if (!inited_) { - inited_ = true; - value_ = value; + if (value.is_null()) { + if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { + value_ = Value(NullValue()); + } + } else { + if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { + value_ = value; } else { // 更新最大值 if (value.compare(value_) > 0) { @@ -132,7 +140,6 @@ class MaxAggregator : public Aggregator } } } - return RC::SUCCESS; } @@ -144,7 +151,6 @@ class MaxAggregator : public Aggregator private: Value value_; // 最大值 - bool inited_ = false; }; class MinAggregator : public Aggregator @@ -152,19 +158,20 @@ class MinAggregator : public Aggregator public: RC accumulate(const Value &value) override { - // 首次赋值 - if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { - if (!inited_) { - inited_ = true; - value_ = value; + if (value.is_null()) { + if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { + value_ = Value(NullValue()); + } + } else { + if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { + value_ = value; } else { - // 更新最大值 + // 更新最小值 if (value.compare(value_) < 0) { value_ = value; } } } - return RC::SUCCESS; } @@ -176,5 +183,4 @@ class MinAggregator : public Aggregator private: Value value_; // 最小值 - bool inited_ = false; }; From 77ae2f08a93ef6517106ed3bec4aefe143521bcd Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 30 Sep 2024 01:27:37 +0800 Subject: [PATCH 066/308] =?UTF-8?q?=E6=90=9E=E5=AE=9Aupdate=20set=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/operator/update_physical_operator.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 0ac3a0fc..07e1b49a 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -53,6 +53,14 @@ RC UpdatePhysicalOperator::open(Trx *trx) new_record.copy_data(old_record.data(), old_record.len()); for (int i = 0; i < field_metas_.size(); ++i) { new_record.set_field(field_metas_[i].offset(), field_metas_[i].len(), values_[i]); + if (field_metas_[i].nullable()) { + auto null_offset = field_metas_[i].offset() + field_metas_[i].len() - 1; + if (values_[i].is_null()) { + new_record.data()[null_offset] = '1'; + } else { + new_record.data()[null_offset] = '0'; + } + } } rc = trx_->update_record(table_, old_record, new_record); if (rc != RC::SUCCESS) { From 44eb3069a0e6babeaed84e78ca5120d2a60155f8 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 30 Sep 2024 01:35:32 +0800 Subject: [PATCH 067/308] =?UTF-8?q?=E8=A7=A3=E5=86=B3update=E7=9A=84null?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/operator/update_physical_operator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 07e1b49a..39080363 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -60,6 +60,10 @@ RC UpdatePhysicalOperator::open(Trx *trx) } else { new_record.data()[null_offset] = '0'; } + } else { + if (values_[i].is_null()) { + return RC::NOT_NULLABLE_VALUE; + } } } rc = trx_->update_record(table_, old_record, new_record); From 3d30194713365e2ea5692066c2ad0c668ace02a5 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 30 Sep 2024 02:04:30 +0800 Subject: [PATCH 068/308] =?UTF-8?q?test:=20miniob=20test=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=9C=A8=E7=BB=93=E6=9E=9C=E4=B8=8D=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E6=97=B6=E8=BE=93=E5=87=BA=E8=A1=8C=E5=8F=B7=E5=8F=8A=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/miniob_test.py | 1893 +++++++++++++++++++------------------- 1 file changed, 964 insertions(+), 929 deletions(-) diff --git a/test/case/miniob_test.py b/test/case/miniob_test.py index 752aed06..47f22dc6 100755 --- a/test/case/miniob_test.py +++ b/test/case/miniob_test.py @@ -1,22 +1,23 @@ # -*- coding: UTF-8 -*- -import os import json -import sys import logging -import subprocess -import socket +import os import select -import time import shutil +import socket +import subprocess +import sys import tempfile -from typing import List, Tuple +import time from enum import Enum +from typing import List, Tuple + try: - from argparse import ArgumentParser + from argparse import ArgumentParser except: - print("cannot load argparse module") - exit(1) + print("cannot load argparse module") + exit(1) _logger = logging.getLogger('MiniOBTest') @@ -50,1035 +51,1069 @@ 如果要运行多个测试用例,则在 --test-cases 参数中使用 ',' 分隔写多个即可 """ + class TimeoutException(BaseException): - def __init__(self, value="Timed Out"): - self.value = value + def __init__(self, value="Timed Out"): + self.value = value + + def __str__(self): + return repr(self.value) - def __str__(self): - return repr(self.value) class Result(Enum): - true = True - false = False - timeout = 0 + true = True + false = False + timeout = 0 + class GlobalConfig: - default_encoding = "UTF-8" - debug = False - source_code_build_path_name = "build" + default_encoding = "UTF-8" + debug = False + source_code_build_path_name = "build" + def __get_build_path(work_dir: str): - return work_dir + '/' + GlobalConfig.source_code_build_path_name + return work_dir + '/' + GlobalConfig.source_code_build_path_name + class ResultWriter: - ''' - 写数据到指定文件,当前用于输出测试结果 - ''' + ''' + 写数据到指定文件,当前用于输出测试结果 + ''' - def __init__(self, file): - self.__file = file + def __init__(self, file): + self.__file = file - def __exit__(self, exc_type, exc_value, exc_tb): - self.close() - - def close(self): - if self.__file is not None: - self.__file.close() - self.__file = None + def __exit__(self, exc_type, exc_value, exc_tb): + self.close() - def write(self, arg: str): - self.__file.write(bytes(arg.upper(), GlobalConfig.default_encoding)) + def close(self): + if self.__file is not None: + self.__file.close() + self.__file = None - def write_line(self, arg: str): - self.write(str(arg).upper()) - self.write('\n') + def write(self, arg: str): + self.__file.write(bytes(arg.upper(), GlobalConfig.default_encoding)) -class MiniObServer: - ''' - 用来控制miniob的服务器程序。负责程序的启停和环境的初始化和清理工作 - ''' + def write_line(self, arg: str): + self.write(str(arg).upper()) + self.write('\n') - def __init__(self, base_dir: str, data_dir: str, config_file: str, server_port: int, server_socket: str, clean_data_dir: bool): - self.__check_base_dir(base_dir) - self.__check_data_dir(data_dir, clean_data_dir) - self.__base_dir = base_dir - self.__data_dir = data_dir +class MiniObServer: + ''' + 用来控制miniob的服务器程序。负责程序的启停和环境的初始化和清理工作 + ''' + + def __init__(self, base_dir: str, data_dir: str, config_file: str, server_port: int, server_socket: str, + clean_data_dir: bool): + self.__check_base_dir(base_dir) + self.__check_data_dir(data_dir, clean_data_dir) + + self.__base_dir = base_dir + self.__data_dir = data_dir + + if config_file == None: + config_file = self.__default_config(base_dir) + self.__check_config(config_file) + self.__config = config_file + self.__server_port = server_port + self.__server_socket = server_socket.strip() + + self.__process = None + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, exc_tb): + if self.__process is not None: + self.stop_server() + self.clean() + self.__process = None + + def __observer_path(self, base_dir: str): + ''' + observer程序所在路径 + ''' + return base_dir + "/bin/observer" + + def __default_config(self, base_dir: str): + return base_dir + "/etc/observer.ini" + + def __check_base_dir(self, base_dir: str): + if not (os.path.isdir(base_dir)): + raise (Exception("failed to check base directory. " + base_dir + " is not a directory")) + + observer_path = self.__observer_path(base_dir) + if not (os.path.isfile(observer_path)): + raise (Exception("observer not exists: " + observer_path)) + + def __check_data_dir(self, data_dir: str, clean_data_dir: bool): + if os.path.exists(data_dir) and clean_data_dir: + shutil.rmtree(data_dir) + + os.makedirs(data_dir, exist_ok=True) + if not (os.path.isdir(data_dir)): + raise (Exception(data_dir + " is not a directory or failed to create")) + + # results = os.listdir(data_dir) + # if len(results) != 0: + # raise(Exception(data_dir + " is not empty")) + + def __check_config(self, config_file: str): + if not (os.path.isfile(config_file)): + raise (Exception("config file does not exists: " + config_file)) + + def init_server(self): + _logger.info("miniob-server inited") + # do nothing now + + def start_server(self) -> bool: + ''' + 启动服务端程序,并使用探测端口的方式检测程序是否正常启动 + 调试模式如果可以使用调试器启动程序就好了 + ''' + + if self.__process != None: + _logger.warn("Server has already been started") + return False + + time_begin = time.time() + _logger.debug("use '%s' as observer work path", os.getcwd()) + observer_command = [self.__observer_path(self.__base_dir), '-f', self.__config] + if len(self.__server_socket) > 0: + observer_command.append('-s') + observer_command.append(self.__server_socket) + else: + observer_command.append('-p') + observer_command.append(str(self.__server_port)) + + process = subprocess.Popen(observer_command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, + cwd=self.__data_dir) + return_code = process.poll() + if return_code != None: + _logger.error("Failed to start observer, exit with code %d", return_code) + return False + + _logger.info('start subprocess with pid=%d', process.pid) + # os.setpgid(process.pid, GlobalConfig.group_id) + + self.__process = process + time.sleep(0.2) + if not self.__wait_server_started(10): + time_span = time.time() - time_begin + _logger.error("Failed to start server in %f seconds", time_span) + return False + + time_span = time.time() - time_begin + _logger.info("miniob-server started in %f seconds", time_span) + return True - if config_file == None: - config_file = self.__default_config(base_dir) - self.__check_config(config_file) - self.__config = config_file - self.__server_port = server_port - self.__server_socket = server_socket.strip() + def stop_server(self): + if self.__process == None: + _logger.warning("Server has not been started") + return True + + self.__process.terminate() + return_code = -1 + try: + return_code = self.__process.wait(10) + if return_code is None: + self.__process.kill() + _logger.warning("Failed to stop server: %s", self.__base_dir) + return False + except Exception as ex: + self.__process.kill() + _logger.warning("wait server exit timedout: %s", self.__base_dir) + return False + + _logger.info("miniob-server exit with code %d. pid=%s", return_code, str(self.__process.pid)) + return True - self.__process = None + def clean(self): + ''' + 清理数据目录(如果没有配置调试模式) + 调试模式可能需要查看服务器程序运行的日志 + ''' + + if GlobalConfig.debug is False: + shutil.rmtree(self.__data_dir) + _logger.info("miniob-server cleaned") + + def __check_unix_socket_server(self): + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s: + errno = s.connect_ex(self.__server_socket) + if errno == 0: + return True + else: + _logger.debug("Failed to connect to server. err=%d:%s", errno, os.strerror(errno)) + return False + + def __check_tcp_socket_server(self): + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + errno = s.connect_ex(('127.0.0.1', self.__server_port)) + if errno == 0: + return True + else: + _logger.debug("Failed to connect to server. err=%d:%s", errno, os.strerror(errno)) + return False + + def __wait_server_started(self, timeout_seconds: int): + deadline = time.time() + timeout_seconds + + while time.time() <= deadline: + result = False + if len(self.__server_socket) > 0: + result = self.__check_unix_socket_server() + else: + result = self.__check_tcp_socket_server() + if result: + return result + time.sleep(0.5) - def __enter__(self): - return self + return False - def __exit__(self, exc_type, exc_value, exc_tb): - if self.__process is not None: - self.stop_server() - self.clean() - self.__process = None - def __observer_path(self, base_dir: str): - ''' - observer程序所在路径 - ''' - return base_dir + "/bin/observer" - - def __default_config(self, base_dir: str): - return base_dir + "/etc/observer.ini" - - def __check_base_dir(self, base_dir: str): - if not(os.path.isdir(base_dir)): - raise(Exception("failed to check base directory. " + base_dir + " is not a directory")) - - observer_path = self.__observer_path(base_dir) - if not(os.path.isfile(observer_path)): - raise(Exception("observer not exists: " + observer_path)) - - def __check_data_dir(self, data_dir: str, clean_data_dir: bool): - if os.path.exists(data_dir) and clean_data_dir: - shutil.rmtree(data_dir) - - os.makedirs(data_dir, exist_ok=True) - if not(os.path.isdir(data_dir)): - raise(Exception(data_dir + " is not a directory or failed to create")) - - # results = os.listdir(data_dir) - # if len(results) != 0: - # raise(Exception(data_dir + " is not empty")) - - def __check_config(self, config_file: str): - if not(os.path.isfile(config_file)): - raise(Exception("config file does not exists: " + config_file)) - - def init_server(self): - _logger.info("miniob-server inited") - # do nothing now - - def start_server(self) -> bool: +class MiniObClient: ''' - 启动服务端程序,并使用探测端口的方式检测程序是否正常启动 - 调试模式如果可以使用调试器启动程序就好了 + 测试客户端。使用TCP连接,向服务器发送命令并反馈结果 ''' - if self.__process != None: - _logger.warn("Server has already been started") - return False + def __init__(self, server_port: int, server_socket: str, time_limit: int = 10): + if (server_port < 0 or server_port > 65535) and server_socket is None: + raise (Exception("Invalid server port: " + str(server_port))) - time_begin = time.time() - _logger.debug("use '%s' as observer work path", os.getcwd()) - observer_command = [self.__observer_path(self.__base_dir), '-f', self.__config] - if len(self.__server_socket) > 0: - observer_command.append('-s') - observer_command.append(self.__server_socket) - else: - observer_command.append('-p') - observer_command.append(str(self.__server_port)) - - process = subprocess.Popen(observer_command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, cwd=self.__data_dir) - return_code = process.poll() - if return_code != None: - _logger.error("Failed to start observer, exit with code %d", return_code) - return False - - _logger.info('start subprocess with pid=%d', process.pid) - #os.setpgid(process.pid, GlobalConfig.group_id) - - self.__process = process - time.sleep(0.2) - if not self.__wait_server_started(10): - time_span = time.time() - time_begin - _logger.error("Failed to start server in %f seconds", time_span) - return False - - time_span = time.time() - time_begin - _logger.info("miniob-server started in %f seconds", time_span) - return True + self.__server_port = server_port + self.__server_socket = server_socket.strip() + self.__socket = None + self.__buffer_size = 8192 - def stop_server(self): - if self.__process == None: - _logger.warning("Server has not been started") - return True + sock = None + if len(self.__server_socket) > 0: + sock = self.__init_unix_socket(self.__server_socket) + else: + sock = self.__init_tcp_socket(self.__server_port) + + self.__socket = sock + if sock != None: + self.__socket.setblocking(False) + # self.__socket.settimeout(time_limit) # do not work + + self.__time_limit = time_limit + self.__poller = select.poll() + self.__poller.register(self.__socket, select.POLLIN | select.POLLPRI | select.POLLHUP | select.POLLERR) + + def __init_tcp_socket(self, server_port: int): + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + errno = s.connect_ex(('127.0.0.1', server_port)) + if errno != 0: + _logger.error("Failed to connect to server with port %d. errno=%d:%s", + server_port, errno, os.strerror(errno)) + s = None + return s + + def __init_unix_socket(self, server_socket: str): + sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + errno = sock.connect_ex(server_socket) + if errno != 0: + _logger.error("Failed to connect to server with address '%s'. errno=%d:%s", + server_socket, errno, os.strerror(errno)) + sock = None + return sock + + def is_valid(self): + return self.__socket is not None + + def __recv_response(self): + result = '' + + while True: + events = self.__poller.poll(self.__time_limit * 1000) + if len(events) == 0: + raise Exception('Poll timeout after %d second(s)' % self.__time_limit) + + (_, event) = events[0] + if event & (select.POLLHUP | select.POLLERR): + msg = "Failed to receive from server. poll return POLLHUP(%s) or POLLERR(%s)" % ( + str(event & select.POLLHUP), str(event & select.POLLERR)) + _logger.info(msg) + raise Exception(msg) + + data = self.__socket.recv(self.__buffer_size) + if len(data) > 0: + result_tmp = data.decode(encoding=GlobalConfig.default_encoding) + _logger.debug("receive from server[size=%d]: '%s'", len(data), result_tmp) + if data[len(data) - 1] == 0: + result += result_tmp[0:-2] + return result.strip() + '\n' + else: + result += result_tmp # TODO 返回数据量比较大的时候,python可能会hang住 + # 可以考虑返回列表 + else: + _logger.info("receive from server error. result len=%d", len(data)) + raise Exception("receive return error. the connection may be closed") + + def run_sql(self, sql: str) -> Tuple[bool, str]: + try: + data = str.encode(sql, GlobalConfig.default_encoding) + self.__socket.sendall(data) + self.__socket.sendall(b'\0') + _logger.debug("send command to server(size=%d) '%s'", len(data) + 1, sql) + result = self.__recv_response() + _logger.debug("receive result from server '%s'", result) + return True, result + except Exception as ex: + _logger.error("Failed to send message to server: '%s'", str(ex)) + return False, None + + def close(self): + if self.__socket is not None: + self.__socket.close() + self.__socket = None - self.__process.terminate() - return_code = -1 - try: - return_code = self.__process.wait(10) - if return_code is None: - self.__process.kill() - _logger.warning("Failed to stop server: %s", self.__base_dir) - return False - except Exception as ex: - self.__process.kill() - _logger.warning("wait server exit timedout: %s", self.__base_dir) - return False - _logger.info("miniob-server exit with code %d. pid=%s", return_code, str(self.__process.pid)) - return True +class CommandRunner: + __default_client_name = "default" + __command_prefix = "--" + __comment_prefix = "#" + + def __init__(self, result_writer: ResultWriter, server_port: int, unix_socket: str): + self.__result_writer = result_writer + self.__clients = {} + + # create default client + default_client = MiniObClient(server_port, unix_socket) + if not (default_client.is_valid()): + self.__is_valid = False + else: + self.__is_valid = True + self.__clients[self.__default_client_name] = default_client - def clean(self): - ''' - 清理数据目录(如果没有配置调试模式) - 调试模式可能需要查看服务器程序运行的日志 - ''' + self.__current_client = default_client + self.__server_port = server_port + self.__unix_socket = unix_socket + + def is_valid(self): + return self.__is_valid + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, exc_tb): + self.close() - if GlobalConfig.debug is False: - shutil.rmtree(self.__data_dir) - _logger.info("miniob-server cleaned") + def close(self): + for client in self.__clients.values(): + client.close() + self.__clients.clear() + self.__current_client = None - def __check_unix_socket_server(self): - with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s: - errno = s.connect_ex(self.__server_socket) - if errno == 0: + def run_connection(self, name: str): + ''' + 切换当前连接 + ''' + + client = self.__clients[name] + if client == None: + _logger.error("No such client named %s", name) + return False + + self.__current_client = client return True - else: - _logger.debug("Failed to connect to server. err=%d:%s", errno, os.strerror(errno)) - return False - def __check_tcp_socket_server(self): - with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: - errno = s.connect_ex(('127.0.0.1', self.__server_port)) - if errno == 0: + def run_connect(self, name: str): + ''' + 创建一个连接。每个连接有一个名字,可以使用使用connection name来切换当前的连接 + ''' + name = name.strip() + if len(name) == 0: + _logger.error("Found empty client name") + return False + + client = self.__clients[name] + if client != None: + _logger.error("Client with name %s already exists", name) + return False + + client = MiniObClient(self.__server_port, self.__unix_socket) + if not (client.is_valid()): + _logger.error("Failed to create client with name: %s", name) + return False + + self.__clients[name] = client return True - else: - _logger.debug("Failed to connect to server. err=%d:%s", errno, os.strerror(errno)) - return False - def __wait_server_started(self, timeout_seconds: int): - deadline = time.time() + timeout_seconds + def run_echo(self, arg: str): + ''' + echo 命令。参数可以是#开头的注释,这里不关心 + ''' - while time.time() <= deadline: - result = False - if len(self.__server_socket) > 0: - result = self.__check_unix_socket_server() - else: - result = self.__check_tcp_socket_server() - if result: - return result - time.sleep(0.5) + self.__result_writer.write_line(arg) + return True - return False + def run_sql(self, sql): + self.__result_writer.write_line(sql) + result, data = self.__current_client.run_sql(sql) + if result is False: + return False + self.__result_writer.write(data) + return True -class MiniObClient: - ''' - 测试客户端。使用TCP连接,向服务器发送命令并反馈结果 - ''' - - def __init__(self, server_port: int, server_socket: str, time_limit:int = 10): - if (server_port < 0 or server_port > 65535) and server_socket is None: - raise(Exception("Invalid server port: " + str(server_port))) - - self.__server_port = server_port - self.__server_socket = server_socket.strip() - self.__socket = None - self.__buffer_size = 8192 - - sock = None - if len(self.__server_socket) > 0: - sock = self.__init_unix_socket(self.__server_socket) - else: - sock = self.__init_tcp_socket(self.__server_port) - - self.__socket = sock - if sock != None: - self.__socket.setblocking(False) - #self.__socket.settimeout(time_limit) # do not work - - self.__time_limit = time_limit - self.__poller = select.poll() - self.__poller.register(self.__socket, select.POLLIN | select.POLLPRI | select.POLLHUP | select.POLLERR) - - def __init_tcp_socket(self, server_port:int): - s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - errno = s.connect_ex(('127.0.0.1', server_port)) - if errno != 0: - _logger.error("Failed to connect to server with port %d. errno=%d:%s", - server_port, errno, os.strerror(errno)) - s = None - return s - - def __init_unix_socket(self, server_socket: str): - sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) - errno = sock.connect_ex(server_socket) - if errno != 0: - _logger.error("Failed to connect to server with address '%s'. errno=%d:%s", - server_socket, errno, os.strerror(errno)) - sock = None - return sock - - def is_valid(self): - return self.__socket is not None - - def __recv_response(self): - result = '' - - while True: - events = self.__poller.poll(self.__time_limit * 1000) - if len(events) == 0: - raise Exception('Poll timeout after %d second(s)' % self.__time_limit) - - (_, event) = events[0] - if event & (select.POLLHUP | select.POLLERR): - msg = "Failed to receive from server. poll return POLLHUP(%s) or POLLERR(%s)" % ( str(event & select.POLLHUP), str(event & select.POLLERR)) - _logger.info(msg) - raise Exception(msg) - - data = self.__socket.recv(self.__buffer_size) - if len(data) > 0: - result_tmp = data.decode(encoding= GlobalConfig.default_encoding) - _logger.debug("receive from server[size=%d]: '%s'", len(data), result_tmp) - if data[len(data) - 1] == 0: - result += result_tmp[0:-2] - return result.strip() + '\n' + def run_sort(self, sql): + self.__result_writer.write_line(sql) + result, data = self.__current_client.run_sql(sql) + if result is False: + return False + data_l = data.strip().split('\n') + data_l.sort() + data = '\n'.join(data_l) + '\n' + self.__result_writer.write(data) + return result + + def run_command(self, command_line: str): + ''' + 执行一条命令。命令的参数使用空格分开, 第一个字符串是命令类型 + ''' + command_line = command_line[len(self.__command_prefix):] + command_line = command_line.lstrip() + args = command_line.split(' ', 1) + command = args[0] + + command_arg = '' + if len(args) > 1: + command_arg = args[1] + + result = True + if 'echo' == command: + result = self.run_echo(command_arg) + elif 'connect' == command: + result = self.run_connect(command_arg) + elif 'connection' == command: + result = self.run_connection(command_arg) + elif 'sort' == command: + result = self.run_sort(command_arg) else: - result += result_tmp # TODO 返回数据量比较大的时候,python可能会hang住 - # 可以考虑返回列表 - else: - _logger.info("receive from server error. result len=%d", len(data)) - raise Exception("receive return error. the connection may be closed") - - - def run_sql(self, sql: str) -> Tuple[bool, str]: - try: - data = str.encode(sql, GlobalConfig.default_encoding) - self.__socket.sendall(data) - self.__socket.sendall(b'\0') - _logger.debug("send command to server(size=%d) '%s'", len(data) + 1, sql) - result = self.__recv_response() - _logger.debug("receive result from server '%s'", result) - return True, result - except Exception as ex: - _logger.error("Failed to send message to server: '%s'", str(ex)) - return False, None + _logger.error("No such command %s", command) + result = False - def close(self): - if self.__socket is not None: - self.__socket.close() - self.__socket = None + return result -class CommandRunner: - __default_client_name = "default" - __command_prefix = "--" - __comment_prefix = "#" - - def __init__(self, result_writer: ResultWriter, server_port: int, unix_socket: str): - self.__result_writer = result_writer - self.__clients = {} - - # create default client - default_client = MiniObClient(server_port, unix_socket) - if not( default_client.is_valid()): - self.__is_valid = False - else: - self.__is_valid = True - self.__clients[self.__default_client_name] = default_client + def run_anything(self, argline: str): + argline = argline.strip() + if len(argline) == 0: + self.__result_writer.write_line('') # 读取到一个空行,也写入一个空行 + return True - self.__current_client = default_client - self.__server_port = server_port - self.__unix_socket = unix_socket + if argline.startswith(self.__comment_prefix): + return True - def is_valid(self): - return self.__is_valid + if argline.startswith(self.__command_prefix): + return self.run_command(argline) - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, exc_tb): - self.close() + return self.run_sql(argline) - def close(self): - for client in self.__clients.values(): - client.close() - self.__clients.clear() - self.__current_client = None - def run_connection(self, name: str): +class TestCase: ''' - 切换当前连接 + 表示一个测试用例 + 测试用例有一个名字和内容 ''' - client = self.__clients[name] - if client == None: - _logger.error("No such client named %s", name) - return False + def __init__(self): + self.__name = '' + self.__lines = [] - self.__current_client = client - return True + def init_with_file(self, name, filename): + self.__name = name + with open(filename, mode='r') as f: + self.__lines = f.readlines() + return True - def run_connect(self, name: str): - ''' - 创建一个连接。每个连接有一个名字,可以使用使用connection name来切换当前的连接 - ''' - name = name.strip() - if len(name) == 0: - _logger.error("Found empty client name") - return False - - client = self.__clients[name] - if client != None: - _logger.error("Client with name %s already exists", name) - return False - - client = MiniObClient(self.__server_port, self.__unix_socket) - if not(client.is_valid()): - _logger.error("Failed to create client with name: %s", name) - return False - - self.__clients[name] = client - return True + def init_with_content(self, name, lines): + self.__name = name + self.__lines = lines + return True - def run_echo(self, arg: str): - ''' - echo 命令。参数可以是#开头的注释,这里不关心 - ''' + def command_lines(self): + return self.__lines - self.__result_writer.write_line(arg) - return True + def get_name(self): + return self.__name - def run_sql(self, sql): - self.__result_writer.write_line(sql) - result, data = self.__current_client.run_sql(sql) - if result is False: - return False - self.__result_writer.write(data) - return True + def result_file(self, base_dir): + subdir = '' + return base_dir + "/" + subdir + "/" + self.__name + ".result" - def run_sort(self, sql): - self.__result_writer.write_line(sql) - result, data = self.__current_client.run_sql(sql) - if result is False: - return False - data_l = data.strip().split('\n') - data_l.sort() - data = '\n'.join(data_l) + '\n' - self.__result_writer.write(data) - return result - - def run_command(self, command_line: str): + def tmp_result_file(self, base_dir): + result_file = self.result_file(base_dir) + return result_file + '.tmp' + + +class TestCaseLister: ''' - 执行一条命令。命令的参数使用空格分开, 第一个字符串是命令类型 + 列出指定目录或者指定名称的测试用例 ''' - command_line = command_line[len(self.__command_prefix) : ] - command_line = command_line.lstrip() - args = command_line.split(' ', 1) - command = args[0] - - command_arg = '' - if len(args) > 1: - command_arg = args[1] - result = True - if 'echo' == command: - result = self.run_echo(command_arg) - elif 'connect' == command: - result = self.run_connect(command_arg) - elif 'connection' == command: - result = self.run_connection(command_arg) - elif 'sort' == command: - result = self.run_sort(command_arg) - else: - _logger.error("No such command %s", command) - result = False - - return result - - def run_anything(self, argline: str): - argline = argline.strip() - if len(argline) == 0: - self.__result_writer.write_line('') # 读取到一个空行,也写入一个空行 - return True - - if argline.startswith(self.__comment_prefix): - return True - - if argline.startswith(self.__command_prefix): - return self.run_command(argline) - - return self.run_sql(argline) + def __init__(self, suffix=None): + if suffix != None: + self.__suffix = suffix + else: + self.__suffix = ".test" + + def list_directory(self, base_dir: str) -> List[TestCase]: + test_case_files = [] + + is_dir = os.path.isdir(base_dir) + if False == is_dir: + raise (Exception("Failed to list directory while getting test cases. " + base_dir + " is not a directory")) + + files = os.listdir(base_dir) + for filename in files: + _logger.debug("find file %s", filename) + if filename.startswith('.'): + continue + + full_path = base_dir + "/" + filename + is_file = os.path.isfile(full_path) + if False == is_file: + continue + if filename.endswith(self.__suffix): + test_case_files.append(filename) + + test_cases = [] + for test_case_file in test_case_files: + full_path = base_dir + "/" + test_case_file + test_case_name = test_case_file[0: -len(self.__suffix)] + test_case = TestCase() + test_case.init_with_file(test_case_name, full_path) + test_cases.append(test_case) + _logger.debug("got a test case file %s", str(test_case_file)) + + return test_cases + + def list_all(self, base_dir, test_names) -> List[TestCase]: + is_dir = os.path.isdir(base_dir) + if False == is_dir: + raise ("Failed to list all test cases. " + base_dir + " is not a directory") + + test_cases = [] + for test_name in test_names: + full_path = base_dir + "/" + test_name + self.__suffix + if not (os.path.isfile(full_path)): + raise (Exception(full_path + " is not a file")) + + test_case = TestCase() + test_case.init_with_file(test_name, full_path) + test_cases.append(test_case) + _logger.debug("got a test case %s", test_case) + + return test_cases -class TestCase: - ''' - 表示一个测试用例 - 测试用例有一个名字和内容 - ''' - - def __init__(self): - self.__name = '' - self.__lines = [] - - def init_with_file(self, name, filename): - self.__name = name - with open(filename, mode='r') as f: - self.__lines = f.readlines() - return True - def init_with_content(self, name, lines): - self.__name = name - self.__lines = lines - return True +class EvalResult: + def __init__(self): + self.__message = [] - def command_lines(self): - return self.__lines + def clear_message(self): + self.__message = [] - def get_name(self): - return self.__name + def append_message(self, message): + self.__message.append(message) - def result_file(self, base_dir): - subdir = '' - return base_dir + "/" + subdir + "/" + self.__name + ".result" + def get_message(self): + return "\n".join(self.__message) - def tmp_result_file(self, base_dir): - result_file = self.result_file(base_dir) - return result_file + '.tmp' + def to_json_string(self): + json_dict = {} + json_dict['message'] = self.get_message() -class TestCaseLister: - ''' - 列出指定目录或者指定名称的测试用例 - ''' + json_encoder = json.encoder.JSONEncoder() + json_encoder.item_separator = ',' + json_encoder.key_separator = ':' + return json_encoder.encode(json_dict) - def __init__(self, suffix = None): - if suffix != None: - self.__suffix = suffix - else: - self.__suffix = ".test" - - def list_directory(self, base_dir : str) -> List[TestCase]: - test_case_files = [] - - is_dir = os.path.isdir(base_dir) - if False == is_dir: - raise(Exception("Failed to list directory while getting test cases. " + base_dir + " is not a directory")) - - files = os.listdir(base_dir) - for filename in files: - _logger.debug("find file %s", filename) - if filename.startswith('.'): - continue - - full_path = base_dir + "/" + filename - is_file = os.path.isfile(full_path) - if False == is_file: - continue - if filename.endswith(self.__suffix): - test_case_files.append(filename) - - test_cases = [] - for test_case_file in test_case_files: - full_path = base_dir + "/" + test_case_file - test_case_name = test_case_file[0 : -len(self.__suffix)] - test_case = TestCase() - test_case.init_with_file(test_case_name, full_path) - test_cases.append(test_case) - _logger.debug("got a test case file %s", str(test_case_file)) - - return test_cases - - def list_all(self, base_dir, test_names) -> List[TestCase]: - is_dir = os.path.isdir(base_dir) - if False == is_dir: - raise("Failed to list all test cases. " + base_dir + " is not a directory") - - test_cases = [] - for test_name in test_names: - full_path = base_dir + "/" + test_name + self.__suffix - if not(os.path.isfile(full_path)): - raise(Exception(full_path + " is not a file")) - - test_case = TestCase() - test_case.init_with_file(test_name, full_path) - test_cases.append(test_case) - _logger.debug("got a test case %s", test_case) - - return test_cases -class EvalResult: - def __init__(self): - self.__message = [] - - def clear_message(self): - self.__message = [] - - def append_message(self, message): - self.__message.append(message) - - def get_message(self): - return "\n".join(self.__message) - - def to_json_string(self): - json_dict = {} - json_dict['message'] = self.get_message() - - json_encoder = json.encoder.JSONEncoder() - json_encoder.item_separator = ',' - json_encoder.key_separator = ':' - return json_encoder.encode(json_dict) - class TestSuite: - def __init__(self): - self.__report_only = False # 本次测试为了获取测试结果,不是为了校验结果 - self.__test_case_base_dir = "./test" - self.__test_result_base_dir = "./result" - self.__test_result_tmp_dir = "./result/tmp" # 生成的结果存放的临时目录 - self.__db_server_base_dir = None - self.__db_data_dir = None - self.__db_config = None - self.__server_port = 0 - self.__use_unix_socket = False # 如果指定unix socket,那么就不再使用TCP连接 - self.__need_start_server = True - self.__test_names = None # 如果指定测试哪些Case,就不再遍历所有的cases - self.__miniob_server = None - - def set_test_names(self, tests): - self.__test_names = tests - - def set_test_case_base_dir(self, test_case_base_dir): - self.__test_case_base_dir = test_case_base_dir - - def set_test_result_base_dir(self, test_result_base_dir): - self.__test_result_base_dir = test_result_base_dir - - def set_test_result_tmp_dir(self, test_result_tmp_dir: str): - self.__test_result_tmp_dir = test_result_tmp_dir - os.makedirs(test_result_tmp_dir, exist_ok=True) - if not(os.path.isdir(test_result_tmp_dir)): - raise(Exception("Failed to set test result temp directory. " + test_result_tmp_dir + " is not a directory or failed to create")) - - def set_db_server_base_dir(self, db_server_base_dir): - self.__db_server_base_dir = db_server_base_dir - - def set_db_data_dir(self, db_data_dir): - self.__db_data_dir = db_data_dir - - def set_db_config(self, db_config): - self.__db_config = db_config - - def set_server_port(self, server_port): - self.__server_port = server_port - - def set_use_unix_socket(self, use_unix_socket: bool): - self.__use_unix_socket = use_unix_socket - - def donot_need_start_server(self): - self.__need_start_server = False - - def set_report_only(self, report_only): - self.__report_only = report_only - - def __compare_files(self, file1, file2): - with open(file1, 'r') as f1, open(file2, 'r') as f2: - lines1 = f1.readlines() - lines2 = f2.readlines() - if len(lines1) != len(lines2): - return False - - line_num = len(lines1) - for i in range(line_num): - if lines1[i].upper() != lines2[i].upper(): - _logger.info('file1=%s, file2=%s, line1=%s, line2=%s', file1, file2, lines1[i], lines2[i]) - return False - return True - - def run_case(self, test_case, timeout=20) -> Result: - # eventlet.monkey_patch() - #@timeout_decorator.timeout(timeout) - #def decorator(): - try: - #with eventlet.Timeout(timeout): - ret = self.__run_case(test_case) - if ret: - return Result.true - else: - return Result.false - except TimeoutException as ex: - return Result.timeout - - def __run_case(self, test_case: TestCase) -> int: - result_tmp_file_name = test_case.tmp_result_file(self.__test_result_tmp_dir) - - unix_socket = '' - if self.__use_unix_socket: - unix_socket = self.__get_unix_socket_address() - - with open(result_tmp_file_name, mode='wb') as result_file: - result_writer = ResultWriter(result_file) - - with CommandRunner(result_writer, self.__server_port, unix_socket) as command_runner: - if command_runner.is_valid() == False: - return False - - for command_line in test_case.command_lines(): - result = command_runner.run_anything(command_line) - if result is False: - _logger.error("Failed to run command %s in case %s", command_line, test_case.get_name()) + def __init__(self): + self.__report_only = False # 本次测试为了获取测试结果,不是为了校验结果 + self.__test_case_base_dir = "./test" + self.__test_result_base_dir = "./result" + self.__test_result_tmp_dir = "./result/tmp" # 生成的结果存放的临时目录 + self.__db_server_base_dir = None + self.__db_data_dir = None + self.__db_config = None + self.__server_port = 0 + self.__use_unix_socket = False # 如果指定unix socket,那么就不再使用TCP连接 + self.__need_start_server = True + self.__test_names = None # 如果指定测试哪些Case,就不再遍历所有的cases + self.__miniob_server = None + + def set_test_names(self, tests): + self.__test_names = tests + + def set_test_case_base_dir(self, test_case_base_dir): + self.__test_case_base_dir = test_case_base_dir + + def set_test_result_base_dir(self, test_result_base_dir): + self.__test_result_base_dir = test_result_base_dir + + def set_test_result_tmp_dir(self, test_result_tmp_dir: str): + self.__test_result_tmp_dir = test_result_tmp_dir + os.makedirs(test_result_tmp_dir, exist_ok=True) + if not (os.path.isdir(test_result_tmp_dir)): + raise (Exception( + "Failed to set test result temp directory. " + test_result_tmp_dir + " is not a directory or failed to create")) + + def set_db_server_base_dir(self, db_server_base_dir): + self.__db_server_base_dir = db_server_base_dir + + def set_db_data_dir(self, db_data_dir): + self.__db_data_dir = db_data_dir + + def set_db_config(self, db_config): + self.__db_config = db_config + + def set_server_port(self, server_port): + self.__server_port = server_port + + def set_use_unix_socket(self, use_unix_socket: bool): + self.__use_unix_socket = use_unix_socket + + def donot_need_start_server(self): + self.__need_start_server = False + + def set_report_only(self, report_only): + self.__report_only = report_only + + def __compare_files(self, file1, file2): + with open(file1, 'r') as f1, open(file2, 'r') as f2: + lines1 = f1.readlines() + lines2 = f2.readlines() + + max_lines = max(len(lines1), len(lines2)) + match = True + + for i in range(max_lines): + line1 = lines1[i].strip() if i < len(lines1) else '' + line2 = lines2[i].strip() if i < len(lines2) else '' + + if line1.upper() != line2.upper(): # 使用 strip 去除行首尾空白 + _logger.info('Files are different at line %d:\n file1: %s\n file2: %s', i + 1, line1, line2) + match = False + break + + if match: + _logger.info('Files are identical: file1=%s, file2=%s', file1, file2) + else: + _logger.info('Files are different: file1=%s, file2=%s', file1, file2) + + return match + + def run_case(self, test_case, timeout=20) -> Result: + # eventlet.monkey_patch() + # @timeout_decorator.timeout(timeout) + # def decorator(): + try: + # with eventlet.Timeout(timeout): + ret = self.__run_case(test_case) + if ret: + return Result.true + else: + return Result.false + except TimeoutException as ex: + return Result.timeout + + def __run_case(self, test_case: TestCase) -> int: + result_tmp_file_name = test_case.tmp_result_file(self.__test_result_tmp_dir) + + unix_socket = '' + if self.__use_unix_socket: + unix_socket = self.__get_unix_socket_address() + + with open(result_tmp_file_name, mode='wb') as result_file: + result_writer = ResultWriter(result_file) + + with CommandRunner(result_writer, self.__server_port, unix_socket) as command_runner: + if command_runner.is_valid() == False: + return False + + for command_line in test_case.command_lines(): + result = command_runner.run_anything(command_line) + if result is False: + _logger.error("Failed to run command %s in case %s", command_line, test_case.get_name()) + return result + + result_file_name = test_case.result_file(self.__test_result_base_dir) + if self.__report_only: + os.rename(result_tmp_file_name, result_file_name) + return True + else: + result = self.__compare_files(result_tmp_file_name, result_file_name) + if not GlobalConfig.debug: + # os.remove(result_tmp_file_name) + pass return result - result_file_name = test_case.result_file(self.__test_result_base_dir) - if self.__report_only: - os.rename(result_tmp_file_name, result_file_name) - return True - else: - result = self.__compare_files(result_tmp_file_name, result_file_name) - if not GlobalConfig.debug: - #os.remove(result_tmp_file_name) - pass - return result - - def __get_unix_socket_address(self): - return self.__db_data_dir + '/miniob.sock' - - def __get_all_test_cases(self) -> List[TestCase]: - test_case_lister = TestCaseLister() - test_cases = test_case_lister.list_directory(self.__test_case_base_dir) - - if not self.__test_names: # 没有指定测试哪个case - return test_cases - - # 指定了测试case,就从中捞出来 - # 找出指定了要测试某个case,但是没有发现 - test_case_result = [] - for case_name in self.__test_names: - found = False - for test_case in test_cases: - if test_case.get_name() == case_name: - test_case_result.append(test_case) - _logger.debug("got case: " + case_name) - found = True - if found == False: - _logger.error("No such test case with name '%s'" % case_name) - return [] - - return test_case_result - - def run(self, eval_result: EvalResult): - - # 找出所有需要测试Case - test_cases = self.__get_all_test_cases() - - if not test_cases: - _logger.info("Cannot find any test cases") - return True - - _logger.info("Starting observer server") - - # 测试每个Case - success_count = 0 - failure_count = 0 - timeout_count = 0 - for test_case in test_cases: - try: - # 每个case都清理并重启一下服务端,这样可以方式某个case core之后,还能测试其它case - self.__clean_server_if_need() - - result = self.__start_server_if_need(True) - if result is False: - eval_result.append_message('Failed to start server.') - return False - - _logger.info(test_case.get_name() + " starting ...") - result = self.run_case(test_case) - - if result is Result.true: - _logger.info("Case passed: %s", test_case.get_name()) - success_count += 1 - eval_result.append_message("%s is success" % test_case.get_name()) - else: - - if result is Result.false: - _logger.info("Case failed: %s", test_case.get_name()) - failure_count += 1 - eval_result.append_message("%s is error" % test_case.get_name()) - else: - _logger.info("Case timeout: %s", test_case.get_name()) - timeout_count += 1 - eval_result.append_message("%s is timeout" % test_case.get_name()) - except Exception as ex: - _logger.error("Failed to run case %s", test_case.get_name()) + def __get_unix_socket_address(self): + return self.__db_data_dir + '/miniob.sock' + + def __get_all_test_cases(self) -> List[TestCase]: + test_case_lister = TestCaseLister() + test_cases = test_case_lister.list_directory(self.__test_case_base_dir) + + if not self.__test_names: # 没有指定测试哪个case + return test_cases + + # 指定了测试case,就从中捞出来 + # 找出指定了要测试某个case,但是没有发现 + test_case_result = [] + for case_name in self.__test_names: + found = False + for test_case in test_cases: + if test_case.get_name() == case_name: + test_case_result.append(test_case) + _logger.debug("got case: " + case_name) + found = True + if found == False: + _logger.error("No such test case with name '%s'" % case_name) + return [] + + return test_case_result + + def run(self, eval_result: EvalResult): + + # 找出所有需要测试Case + test_cases = self.__get_all_test_cases() + + if not test_cases: + _logger.info("Cannot find any test cases") + return True + + _logger.info("Starting observer server") + + # 测试每个Case + success_count = 0 + failure_count = 0 + timeout_count = 0 + for test_case in test_cases: + try: + # 每个case都清理并重启一下服务端,这样可以方式某个case core之后,还能测试其它case + self.__clean_server_if_need() + + result = self.__start_server_if_need(True) + if result is False: + eval_result.append_message('Failed to start server.') + return False + + _logger.info(test_case.get_name() + " starting ...") + result = self.run_case(test_case) + + if result is Result.true: + _logger.info("Case passed: %s", test_case.get_name()) + success_count += 1 + eval_result.append_message("%s is success" % test_case.get_name()) + else: + + if result is Result.false: + _logger.info("Case failed: %s", test_case.get_name()) + failure_count += 1 + eval_result.append_message("%s is error" % test_case.get_name()) + else: + _logger.info("Case timeout: %s", test_case.get_name()) + timeout_count += 1 + eval_result.append_message("%s is timeout" % test_case.get_name()) + except Exception as ex: + _logger.error("Failed to run case %s", test_case.get_name()) + self.__clean_server_if_need() + raise ex + + _logger.info("All done. %d passed, %d failed, %d timeout", success_count, failure_count, timeout_count) + _logger.debug(eval_result.get_message()) self.__clean_server_if_need() - raise ex + return True - _logger.info("All done. %d passed, %d failed, %d timeout", success_count, failure_count, timeout_count) - _logger.debug(eval_result.get_message()) - self.__clean_server_if_need() - return True + def __start_server_if_need(self, clean_data_dir: bool): + if self.__miniob_server is not None: + return True + + if self.__need_start_server: + unix_socket = '' + if self.__use_unix_socket: + unix_socket = self.__get_unix_socket_address() + + miniob_server = MiniObServer(self.__db_server_base_dir, self.__db_data_dir, + self.__db_config, self.__server_port, unix_socket, clean_data_dir) + miniob_server.init_server() + result = miniob_server.start_server() + if result is False: + _logger.error("Failed to start db server") + miniob_server.stop_server() + miniob_server.clean() + return False + self.__miniob_server = miniob_server - def __start_server_if_need(self, clean_data_dir: bool): - if self.__miniob_server is not None: - return True - - if self.__need_start_server: - unix_socket = '' - if self.__use_unix_socket: - unix_socket = self.__get_unix_socket_address() - - miniob_server = MiniObServer(self.__db_server_base_dir, self.__db_data_dir, - self.__db_config, self.__server_port, unix_socket, clean_data_dir) - miniob_server.init_server() - result = miniob_server.start_server() - if result is False: - _logger.error("Failed to start db server") - miniob_server.stop_server() - miniob_server.clean() - return False - self.__miniob_server = miniob_server + return True - return True + def __clean_server_if_need(self): + if self.__miniob_server is not None: + self.__miniob_server.stop_server() + # 不再清理掉中间结果。如果从解压代码开始,那么执行的中间结果不需要再清理,所有的数据都在临时目录 + # self.__miniob_server.clean() + self.__miniob_server = None - def __clean_server_if_need(self): - if self.__miniob_server is not None: - self.__miniob_server.stop_server() - # 不再清理掉中间结果。如果从解压代码开始,那么执行的中间结果不需要再清理,所有的数据都在临时目录 - # self.__miniob_server.clean() - self.__miniob_server = None def __init_options(): - options_parser = ArgumentParser() - # 是否仅仅生成结果,而不对结果做校验。一般在新生成一个case时使用 - options_parser.add_argument('--report-only', action='store_true', dest='report_only', default=False, - help='just report the result') - - # 当前miniob的代码目录 - options_parser.add_argument('--project-dir', action='store', dest='project_dir', default='') - - # 测试哪些用例。不指定就会扫描test-case-dir目录下面的所有测试用例。指定的话,就从test-case-dir目录下面按照名字找 - options_parser.add_argument('--test-cases', action='store', dest='test_cases', - help='test cases. If none, we will iterate the test case directory. Split with \',\' if more than one') - - # 测试时服务器程序的数据文件存放目录 - options_parser.add_argument('--work-dir', action='store', dest='work_dir', default='', - help='the directory of miniob database\'s data for test') - - # 服务程序端口号,客户端也使用这个端口连接服务器。目前还不具备通过配置文件解析端口配置的能力 - options_parser.add_argument('--server-port', action='store', type=int, dest='server_port', default=6789, - help='the server port. should be the same with the value in the config') - options_parser.add_argument('--not-use-unix-socket', action='store_true', dest='not_use_unix_socket', default=False, - help='If false, server-port will be ignored and will use a random address socket.') - - # 测试过程中生成的日志存放的文件。使用stdout/stderr输出到控制台 - options_parser.add_argument('--log', action='store', dest='log_file', default='stdout', - help='log file. stdout=standard output and stderr=standard error') - # 是否启动调试模式。调试模式不会清理服务器的数据目录 - options_parser.add_argument('-d', '--debug', action='store_true', dest='debug', default=False, - help='enable debug mode') - - options_parser.add_argument('--compile-make-args', action='store', dest='compile_make_args', default='', - help='compile args used by make') - options_parser.add_argument('--compile-cmake-args', action='store', dest='compile_cmake_args', default='', - help='compile args used by cmake') - # 之前已经编译过,是否需要重新编译,还是直接执行make就可以了 - options_parser.add_argument('--compile-rebuild', action='store_true', default=False, dest='compile_rebuild', - help='whether rebuild if build path exists') - - options = options_parser.parse_args(sys.argv[1:]) - - realpath = os.path.realpath(__file__) - current_path = os.path.dirname(realpath) - if not options.work_dir: - options.work_dir = tempfile.gettempdir() + '/miniob' - _logger.info('use %s as work directory', options.work_dir) - if not options.project_dir: - options.project_dir = os.path.realpath(current_path + '/../..') - _logger.info('Auto detect project dir: %s', options.project_dir) - return options + options_parser = ArgumentParser() + # 是否仅仅生成结果,而不对结果做校验。一般在新生成一个case时使用 + options_parser.add_argument('--report-only', action='store_true', dest='report_only', default=False, + help='just report the result') + + # 当前miniob的代码目录 + options_parser.add_argument('--project-dir', action='store', dest='project_dir', default='') + + # 测试哪些用例。不指定就会扫描test-case-dir目录下面的所有测试用例。指定的话,就从test-case-dir目录下面按照名字找 + options_parser.add_argument('--test-cases', action='store', dest='test_cases', + help='test cases. If none, we will iterate the test case directory. Split with \',\' if more than one') + + # 测试时服务器程序的数据文件存放目录 + options_parser.add_argument('--work-dir', action='store', dest='work_dir', default='', + help='the directory of miniob database\'s data for test') + + # 服务程序端口号,客户端也使用这个端口连接服务器。目前还不具备通过配置文件解析端口配置的能力 + options_parser.add_argument('--server-port', action='store', type=int, dest='server_port', default=6789, + help='the server port. should be the same with the value in the config') + options_parser.add_argument('--not-use-unix-socket', action='store_true', dest='not_use_unix_socket', default=False, + help='If false, server-port will be ignored and will use a random address socket.') + + # 测试过程中生成的日志存放的文件。使用stdout/stderr输出到控制台 + options_parser.add_argument('--log', action='store', dest='log_file', default='stdout', + help='log file. stdout=standard output and stderr=standard error') + # 是否启动调试模式。调试模式不会清理服务器的数据目录 + options_parser.add_argument('-d', '--debug', action='store_true', dest='debug', default=False, + help='enable debug mode') + + options_parser.add_argument('--compile-make-args', action='store', dest='compile_make_args', default='', + help='compile args used by make') + options_parser.add_argument('--compile-cmake-args', action='store', dest='compile_cmake_args', default='', + help='compile args used by cmake') + # 之前已经编译过,是否需要重新编译,还是直接执行make就可以了 + options_parser.add_argument('--compile-rebuild', action='store_true', default=False, dest='compile_rebuild', + help='whether rebuild if build path exists') + + options = options_parser.parse_args(sys.argv[1:]) + + realpath = os.path.realpath(__file__) + current_path = os.path.dirname(realpath) + if not options.work_dir: + options.work_dir = tempfile.gettempdir() + '/miniob' + _logger.info('use %s as work directory', options.work_dir) + if not options.project_dir: + options.project_dir = os.path.realpath(current_path + '/../..') + _logger.info('Auto detect project dir: %s', options.project_dir) + return options + def __init_log(options): - log_level = logging.INFO - if options.debug: - log_level = logging.DEBUG + log_level = logging.INFO + if options.debug: + log_level = logging.DEBUG + GlobalConfig.debug = True + GlobalConfig.debug = True + log_stream = None + if 'stdout' == options.log_file: + log_stream = sys.stdout + elif 'stderr' == options.log_file: + log_stream = sys.stderr + else: + log_file_dir = os.path.dirname(options.log_file) + os.makedirs(log_file_dir, exist_ok=True) - GlobalConfig.debug = True - log_stream = None - if 'stdout' == options.log_file: - log_stream = sys.stdout - elif 'stderr' == options.log_file: - log_stream = sys.stderr - else: - log_file_dir = os.path.dirname(options.log_file) - os.makedirs(log_file_dir, exist_ok=True) + log_format = "%(asctime)s - %(levelname)-5s %(name)s %(lineno)s - %(message)s" + log_date_format = "%Y-%m-%d %H:%M:%S" - log_format = "%(asctime)s - %(levelname)-5s %(name)s %(lineno)s - %(message)s" - log_date_format = "%Y-%m-%d %H:%M:%S" + if log_stream is None: + logging.basicConfig(level=log_level, filename=options.log_file, format=log_format, datefmt=log_date_format) + else: + logging.basicConfig(level=log_level, stream=log_stream, format=log_format, datefmt=log_date_format) - if log_stream is None: - logging.basicConfig(level=log_level, filename=options.log_file, format=log_format, datefmt=log_date_format) - else: - logging.basicConfig(level=log_level, stream=log_stream, format=log_format, datefmt=log_date_format) + _logger.debug('init log done') - _logger.debug('init log done') def __init_test_suite(options) -> TestSuite: - test_suite = TestSuite() - test_suite.set_test_case_base_dir(os.path.abspath(options.project_dir + '/test/case/test')) - test_suite.set_test_result_base_dir(os.path.abspath(options.project_dir + '/test/case/result')) - test_suite.set_test_result_tmp_dir(os.path.abspath(options.work_dir + '/result_output')) + test_suite = TestSuite() + test_suite.set_test_case_base_dir(os.path.abspath(options.project_dir + '/test/case/test')) + test_suite.set_test_result_base_dir(os.path.abspath(options.project_dir + '/test/case/result')) + test_suite.set_test_result_tmp_dir(os.path.abspath(options.work_dir + '/result_output')) - test_suite.set_server_port(options.server_port) - test_suite.set_use_unix_socket(not options.not_use_unix_socket) - test_suite.set_db_server_base_dir(__get_build_path(options.work_dir)) - test_suite.set_db_data_dir(options.work_dir + '/data') - test_suite.set_db_config(os.path.abspath(options.project_dir + '/etc/observer.ini')) + test_suite.set_server_port(options.server_port) + test_suite.set_use_unix_socket(not options.not_use_unix_socket) + test_suite.set_db_server_base_dir(__get_build_path(options.work_dir)) + test_suite.set_db_data_dir(options.work_dir + '/data') + test_suite.set_db_config(os.path.abspath(options.project_dir + '/etc/observer.ini')) - if options.test_cases is not None: - test_suite.set_test_names(options.test_cases.split(',')) + if options.test_cases is not None: + test_suite.set_test_names(options.test_cases.split(',')) - if options.report_only: - test_suite.set_report_only(True) + if options.report_only: + test_suite.set_report_only(True) + + return test_suite - return test_suite def __init_test_suite_with_source_code(options, eval_result): - proj_path = os.path.abspath(options.project_dir) - build_path = __get_build_path(options.work_dir) + proj_path = os.path.abspath(options.project_dir) + build_path = __get_build_path(options.work_dir) + + if not compile(proj_path, build_path, + options.compile_cmake_args, + options.compile_make_args, + options.compile_rebuild, + eval_result): + message = "Failed to compile source code" + _logger.error(message) + return None - if not compile(proj_path, build_path, - options.compile_cmake_args, - options.compile_make_args, - options.compile_rebuild, - eval_result): - message = "Failed to compile source code" - _logger.error(message) - return None + _logger.info("compile source code done") - _logger.info("compile source code done") + # 覆盖一些测试的路径 + _logger.info("some config will be override if exists") + test_suite = __init_test_suite(options) + return test_suite - # 覆盖一些测试的路径 - _logger.info("some config will be override if exists") - test_suite = __init_test_suite(options) - return test_suite def __run_shell_command(command_args): - ''' - 运行shell命令,返回命令的执行结果码和输出到控制台的信息 - 返回的控制台信息是每行一个字符串的字符串列表 - ''' - - _logger.info("running command: '%s'", ' '.join(command_args)) - - outputs = [] - command_process = subprocess.Popen(command_args, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE) - while True: - line = command_process.stderr.readline() - line_str = line.decode(GlobalConfig.default_encoding) - if isinstance(line_str, str): - outputs.append(line_str.strip()) - - return_code = command_process.poll() - if return_code is not None: - return return_code, outputs + ''' + 运行shell命令,返回命令的执行结果码和输出到控制台的信息 + 返回的控制台信息是每行一个字符串的字符串列表 + ''' + + _logger.info("running command: '%s'", ' '.join(command_args)) + + outputs = [] + command_process = subprocess.Popen(command_args, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE) + while True: + line = command_process.stderr.readline() + line_str = line.decode(GlobalConfig.default_encoding) + if isinstance(line_str, str): + outputs.append(line_str.strip()) + + return_code = command_process.poll() + if return_code is not None: + return return_code, outputs + def run_cmake(work_dir: str, build_path: str, cmake_args: str): - cmake_command = ["cmake", "-B", build_path, "--log-level=WARNING"] - if isinstance(cmake_args, str): - args = cmake_args.split(';') - for arg in args: - arg = arg.strip() - if len(arg) > 0: - cmake_command.append(arg) - cmake_command.append(work_dir) - - ret, outputs = __run_shell_command(cmake_command) - if ret != 0: - _logger.error("Failed to run cmake command") - for output in outputs: - _logger.error(output) - return False, outputs - return True, [] + cmake_command = ["cmake", "-B", build_path, "--log-level=WARNING"] + if isinstance(cmake_args, str): + args = cmake_args.split(';') + for arg in args: + arg = arg.strip() + if len(arg) > 0: + cmake_command.append(arg) + cmake_command.append(work_dir) + + ret, outputs = __run_shell_command(cmake_command) + if ret != 0: + _logger.error("Failed to run cmake command") + for output in outputs: + _logger.error(output) + return False, outputs + return True, [] + def compile(work_dir: str, build_dir: str, cmake_args: str, make_args: str, rebuild_all: bool, eval_result: EvalResult): - ''' - workd_dir是源代码所在目录(miniob目录) - build_dir 是编译结果的目录 - ''' - if not os.path.exists(work_dir): - _logger.error('The work_dir %s doesn\'t exist, please provide a vaild work path.', work_dir) - return False - - #now_path = os.getcwd() - build_path = build_dir - if os.path.exists(build_path) and rebuild_all: - _logger.info('build directory is not empty but will be cleaned before compile: %s', build_path) - shutil.rmtree(build_path) - - os.makedirs(build_path, exist_ok=True) - - _logger.info("start compiling ... build path=%s", build_path) - ret, outputs = run_cmake(work_dir, build_path, cmake_args) - if ret == False: - # cmake 执行失败时,清空整个Build目录,再重新执行一次cmake命令 - shutil.rmtree(build_path) + ''' + workd_dir是源代码所在目录(miniob目录) + build_dir 是编译结果的目录 + ''' + if not os.path.exists(work_dir): + _logger.error('The work_dir %s doesn\'t exist, please provide a vaild work path.', work_dir) + return False + + # now_path = os.getcwd() + build_path = build_dir + if os.path.exists(build_path) and rebuild_all: + _logger.info('build directory is not empty but will be cleaned before compile: %s', build_path) + shutil.rmtree(build_path) + os.makedirs(build_path, exist_ok=True) + + _logger.info("start compiling ... build path=%s", build_path) ret, outputs = run_cmake(work_dir, build_path, cmake_args) if ret == False: - for output in outputs: - _logger.error(output) - eval_result.append_message(output) - return False - - make_command = ["make", "--silent", "-C", build_path] - if isinstance(make_args, str): - if not make_args: - make_command.append('-j4') - else: - args = make_args.split(';') - for arg in args: - arg = arg.strip() - if len(arg) > 0: - make_command.append(arg) - - ret, outputs = __run_shell_command(make_command) - if ret != 0: - _logger.error("Compile failed") - for output in outputs: - _logger.error(output.strip()) - eval_result.append_message(output.strip()) - return False - - return True + # cmake 执行失败时,清空整个Build目录,再重新执行一次cmake命令 + shutil.rmtree(build_path) + os.makedirs(build_path, exist_ok=True) + ret, outputs = run_cmake(work_dir, build_path, cmake_args) + if ret == False: + for output in outputs: + _logger.error(output) + eval_result.append_message(output) + return False + + make_command = ["make", "--silent", "-C", build_path] + if isinstance(make_args, str): + if not make_args: + make_command.append('-j4') + else: + args = make_args.split(';') + for arg in args: + arg = arg.strip() + if len(arg) > 0: + make_command.append(arg) + + ret, outputs = __run_shell_command(make_command) + if ret != 0: + _logger.error("Compile failed") + for output in outputs: + _logger.error(output.strip()) + eval_result.append_message(output.strip()) + return False + + return True + def run(options) -> Tuple[bool, str]: - ''' - return result, reason - result: True or False - - ''' - __init_log(options) - - _logger.info("miniob test starting ...") - - # 由于miniob-test测试程序导致的失败,才认为是失败 - # 比如目录没有权限等,对miniob-test来说是成功的 - result = True - eval_result = EvalResult() - - try: - test_suite:TestSuite = __init_test_suite_with_source_code(options, eval_result) - - if test_suite != None: - result = test_suite.run(eval_result) - # result = True - except Exception as ex: - _logger.exception(ex) - result = False - #eval_result.clear_message() - eval_result.append_message(str(ex.args)) - - return result, eval_result.to_json_string() + ''' + return result, reason + result: True or False + + ''' + __init_log(options) + + _logger.info("miniob test starting ...") + + # 由于miniob-test测试程序导致的失败,才认为是失败 + # 比如目录没有权限等,对miniob-test来说是成功的 + result = True + eval_result = EvalResult() + + try: + test_suite: TestSuite = __init_test_suite_with_source_code(options, eval_result) + + if test_suite != None: + result = test_suite.run(eval_result) + # result = True + except Exception as ex: + _logger.exception(ex) + result = False + # eval_result.clear_message() + eval_result.append_message(str(ex.args)) + + return result, eval_result.to_json_string() + if __name__ == '__main__': - os.setpgrp() - options = __init_options() + os.setpgrp() + options = __init_options() - result, evaluation = run(options) + result, evaluation = run(options) - exit_code = 0 - if result is False: - exit_code = 1 - else: - _logger.info(evaluation) - exit(exit_code) + exit_code = 0 + if result is False: + exit_code = 1 + else: + _logger.info(evaluation) + exit(exit_code) From cddc5260d77515a96ad830a77de554a7c39b4247 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 30 Sep 2024 19:04:38 +0800 Subject: [PATCH 069/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=20text=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.cpp | 2 +- src/observer/common/type/attr_type.h | 1 + src/observer/common/type/char_type.cpp | 46 +- src/observer/common/type/data_type.cpp | 1 + src/observer/common/type/text_type.cpp | 106 ++ src/observer/common/type/text_type.h | 38 + src/observer/common/utils.cpp | 54 + src/observer/common/utils.h | 21 + src/observer/common/value.cpp | 52 +- src/observer/common/value.h | 3 + src/observer/sql/parser/lex_sql.cpp | 2425 ++++++++++++------------ src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/lex_sql.l | 1 + src/observer/sql/parser/yacc_sql.cpp | 2301 +++++++++++----------- src/observer/sql/parser/yacc_sql.hpp | 73 +- src/observer/sql/parser/yacc_sql.y | 9 +- src/observer/storage/table/table.cpp | 3 +- 17 files changed, 2713 insertions(+), 2425 deletions(-) create mode 100644 src/observer/common/type/text_type.cpp create mode 100644 src/observer/common/type/text_type.h create mode 100644 src/observer/common/utils.cpp create mode 100644 src/observer/common/utils.h diff --git a/src/observer/common/type/attr_type.cpp b/src/observer/common/type/attr_type.cpp index 7c12f3c1..2dd8c94d 100644 --- a/src/observer/common/type/attr_type.cpp +++ b/src/observer/common/type/attr_type.cpp @@ -11,7 +11,7 @@ See the Mulan PSL v2 for more details. */ #include "common/lang/string.h" #include "common/type/attr_type.h" -const char *ATTR_TYPE_NAME[] = {"undefined", "chars", "ints", "floats", "booleans", "dates", "nulls"}; +const char *ATTR_TYPE_NAME[] = {"undefined", "chars", "ints", "floats", "booleans", "dates", "nulls", "texts"}; const char *attr_type_to_string(AttrType type) { diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index 85aff6da..d055f453 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -23,6 +23,7 @@ enum class AttrType BOOLEANS, ///< boolean类型,当前不是由parser解析出来的,是程序内部使用的 DATES, ///< 日期类型(4字节) NULLS, ///< 空字段 + TEXTS, ///< text 超长字段(4096字节) MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index 9340e112..783664aa 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -10,49 +10,12 @@ See the Mulan PSL v2 for more details. */ #include +#include "common/utils.h" #include "common/lang/comparator.h" #include "common/log/log.h" #include "common/type/char_type.h" #include "common/value.h" - -static int y, m, d; - -static bool check_date(int y, int m, int d) -{ - // 定义每个月的天数 - static int mon[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; - // 判断是否为闰年 - bool leap = (y % 400 == 0) || (y % 100 != 0 && y % 4 == 0); - // 检查年份、月份和日期的合法性 - return (y > 0 && y <= 9999) && (m > 0 && m <= 12) && - (d > 0 && d <= (mon[m] + (m == 2 && leap ? 1 : 0))); // 2月如果是闰年则加1天 -} - -static RC parse_date(const char *str, int &result) -{ - if (sscanf(str, "%d-%d-%d", &y, &m, &d) != 3) { - return RC::INVALID_ARGUMENT; - } - if (!check_date(y, m, d)) { - return RC::INVALID_ARGUMENT; - } - result = y * 10000 + m * 100 + d; - return RC::SUCCESS; -} - -static RC parse_float_prefix(const char *str, float &result) -{ - char *end_ptr; - // 输入不是有效的整数格式,会转换为 0.0 - double float_val = std::strtod(str, &end_ptr); - // 注释以支持前缀解析 - // if (*end_ptr != '\0' && !isspace(*end_ptr)) { - // return RC::INVALID_ARGUMENT; // 浮点数后应为结尾或空白字符 - // } - // 默认认为 float_val 是否在 float 范围内 - result = static_cast(float_val); - return RC::SUCCESS; -} +#include "common/type/attr_type.h" int CharType::compare(const Value &left, const Value &right) const { @@ -70,6 +33,9 @@ RC CharType::set_value_from_str(Value &val, const string &data) const RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const { switch (type) { + case AttrType::TEXTS: { + result.set_text(val.value_.pointer_value_, val.length_); + } break; case AttrType::DATES: { int date_val; RC rc = parse_date(val.value_.pointer_value_, date_val); @@ -116,7 +82,7 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ int CharType::cast_cost(AttrType type) { - if (type == AttrType::CHARS) { + if (type == AttrType::CHARS || type == AttrType::TEXTS) { return 0; } if (type == AttrType::DATES) { diff --git a/src/observer/common/type/data_type.cpp b/src/observer/common/type/data_type.cpp index 3955a77c..17fe527d 100644 --- a/src/observer/common/type/data_type.cpp +++ b/src/observer/common/type/data_type.cpp @@ -23,4 +23,5 @@ array, static_cast(AttrType::MAXTYPE)> DataType::type_ make_unique(AttrType::BOOLEANS), make_unique(), make_unique(), + make_unique(), }; diff --git a/src/observer/common/type/text_type.cpp b/src/observer/common/type/text_type.cpp new file mode 100644 index 00000000..d78eaacd --- /dev/null +++ b/src/observer/common/type/text_type.cpp @@ -0,0 +1,106 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/30 * + * @Description : TextType source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "common/utils.h" +#include "common/type/text_type.h" +#include "common/value.h" +#include "common/log/log.h" +#include "common/lang/comparator.h" + +int TextType::compare(const Value &left, const Value &right) const +{ + ASSERT(left.attr_type() == AttrType::TEXTS && right.attr_type() == AttrType::TEXTS, "invalid type"); + return common::compare_string( + (void *)left.value_.pointer_value_, left.length_, (void *)right.value_.pointer_value_, right.length_); +} + +int TextType::cast_cost(AttrType type) +{ + if (type == AttrType::CHARS || type == AttrType::TEXTS) { + return 0; + } + if (type == AttrType::DATES) { + return 1; + } + if (type == AttrType::INTS) { + return 1; + } + if (type == AttrType::FLOATS) { + return 1; + } + return INT32_MAX; +} + +RC TextType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const +{ + switch (type) { + case AttrType::TEXTS: { + result.set_text(val.value_.pointer_value_, val.length_); + } break; + case AttrType::DATES: { + int date_val; + RC rc = parse_date(val.value_.pointer_value_, date_val); + if (rc != RC::SUCCESS) { + return rc; + } + result.set_date(date_val); + } break; + // 字符串转数字 + // 如果字符串刚好是一个数字,则转换为对应的数字(如'1'转换为1,'2.1'转换为2.1) + // 如果字符串的前缀是一个数字,则转换前缀数字部分为数字(如'1a1'转换为1,'2.1a'转换为2.1) + // 如果字符串前缀不是任何合法的数字,则转换为0(不需要考虑前导符号 '+' '-') + // 如果转换数字溢出怎么处理?(不考虑) + // 是否考虑十六进制/八进制?(不考虑) + case AttrType::INTS: { + // WHERE id < '1.5a'; + // 先当浮点数解析,浮点数可以兼容整型,再四舍五入转 int + float float_val; + RC rc = parse_float_prefix(val.value_.pointer_value_, float_val); + if (rc != RC::SUCCESS) { + return rc; + } + int int_val = static_cast(float_val); + // 是整数 + if (int_val == float_val || !allow_type_promotion) { + result.set_int(int_val); + } else { + // 为浮点数,类型提升 + result.set_float(float_val); + } + } break; + case AttrType::FLOATS: { + float float_val; + RC rc = parse_float_prefix(val.value_.pointer_value_, float_val); + if (rc != RC::SUCCESS) { + return rc; + } + result.set_float(float_val); + } break; + default: return RC::UNIMPLEMENTED; + } + return RC::SUCCESS; +} + +RC TextType::to_string(const Value &val, string &result) const +{ + stringstream ss; + ss << val.value_.pointer_value_; + result = ss.str(); + return RC::SUCCESS; +} + +// 该函数会被 load 使用 +RC TextType::set_value_from_str(Value &val, const string &data) const +{ + val.set_string(data.c_str()); + return RC::SUCCESS; +} diff --git a/src/observer/common/type/text_type.h b/src/observer/common/type/text_type.h new file mode 100644 index 00000000..69ed7715 --- /dev/null +++ b/src/observer/common/type/text_type.h @@ -0,0 +1,38 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/30 * + * @Description : TextType header file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "common/rc.h" +#include "common/type/data_type.h" + +/** + * @brief 固定长度的字符串类型 + * @ingroup DataType + */ +class TextType : public DataType +{ +public: + TextType() : DataType(AttrType::TEXTS) {} + + ~TextType() override = default; + + int compare(const Value &left, const Value &right) const override; + + RC cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion = true) const override; + + RC set_value_from_str(Value &val, const string &data) const override; + + int cast_cost(AttrType type) override; + + RC to_string(const Value &val, string &result) const override; +}; diff --git a/src/observer/common/utils.cpp b/src/observer/common/utils.cpp new file mode 100644 index 00000000..85b81ea0 --- /dev/null +++ b/src/observer/common/utils.cpp @@ -0,0 +1,54 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/30 * + * @Description : utils source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "utils.h" + +#include +#include + +bool check_date(int y, int m, int d) +{ + // 定义每个月的天数 + static int mon[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + // 判断是否为闰年 + bool leap = (y % 400 == 0) || (y % 100 != 0 && y % 4 == 0); + // 检查年份、月份和日期的合法性 + return (y > 0 && y <= 9999) && (m > 0 && m <= 12) && + (d > 0 && d <= (mon[m] + (m == 2 && leap ? 1 : 0))); // 2月如果是闰年则加1天 +} + +RC parse_date(const char *str, int &result) +{ + int y, m, d; + if (sscanf(str, "%d-%d-%d", &y, &m, &d) != 3) { + return RC::INVALID_ARGUMENT; + } + if (!check_date(y, m, d)) { + return RC::INVALID_ARGUMENT; + } + result = y * 10000 + m * 100 + d; + return RC::SUCCESS; +} + +RC parse_float_prefix(const char *str, float &result) +{ + char *end_ptr; + // 输入不是有效的整数格式,会转换为 0.0 + double float_val = std::strtod(str, &end_ptr); + // 注释以支持前缀解析 + // if (*end_ptr != '\0' && !isspace(*end_ptr)) { + // return RC::INVALID_ARGUMENT; // 浮点数后应为结尾或空白字符 + // } + // 默认认为 float_val 是否在 float 范围内 + result = static_cast(float_val); + return RC::SUCCESS; +} diff --git a/src/observer/common/utils.h b/src/observer/common/utils.h new file mode 100644 index 00000000..9578ef17 --- /dev/null +++ b/src/observer/common/utils.h @@ -0,0 +1,21 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/9/30 * + * @Description : utils header file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "rc.h" + +bool check_date(int y, int m, int d); + +RC parse_date(const char *str, int &result); + +RC parse_float_prefix(const char *str, float &result); diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 7bef1344..83ba6f11 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -39,10 +39,10 @@ Value::Value(const Value &other) this->own_data_ = other.own_data_; this->is_null_ = other.is_null_; switch (this->attr_type_) { - case AttrType::CHARS: { + case AttrType::CHARS: + case AttrType::TEXTS: { set_string_from_other(other); } break; - default: { this->value_ = other.value_; } break; @@ -71,10 +71,10 @@ Value &Value::operator=(const Value &other) this->own_data_ = other.own_data_; this->is_null_ = other.is_null_; switch (this->attr_type_) { - case AttrType::CHARS: { + case AttrType::CHARS: + case AttrType::TEXTS: { set_string_from_other(other); } break; - default: { this->value_ = other.value_; } break; @@ -102,11 +102,12 @@ void Value::reset() { switch (attr_type_) { case AttrType::CHARS: + case AttrType::TEXTS: { if (own_data_ && value_.pointer_value_ != nullptr) { delete[] value_.pointer_value_; value_.pointer_value_ = nullptr; } - break; + } break; default: break; } @@ -122,6 +123,9 @@ void Value::set_data(char *data, int length) case AttrType::CHARS: { set_string(data, length); } break; + case AttrType::TEXTS: { + set_text(data, length); + } break; case AttrType::INTS: { value_.int_value_ = *(int *)data; length_ = length; @@ -199,6 +203,27 @@ void Value::set_string(const char *s, int len /*= 0*/) } } +void Value::set_text(const char *s, int len /*= 0*/) +{ + reset(); + attr_type_ = AttrType::TEXTS; + if (s == nullptr) { + value_.pointer_value_ = nullptr; + length_ = 0; + } else { + own_data_ = true; + if (len > 0) { + len = strnlen(s, len); + } else { + len = strlen(s); + } + value_.pointer_value_ = new char[len + 1]; + length_ = len; + memcpy(value_.pointer_value_, s, len); + value_.pointer_value_[len] = '\0'; + } +} + void Value::set_value(const Value &value) { switch (value.attr_type_) { @@ -217,6 +242,9 @@ void Value::set_value(const Value &value) case AttrType::DATES: { set_date(value.get_int()); } break; + case AttrType::TEXTS: { + set_text(value.get_string().c_str()); + } break; default: { ASSERT(false, "got an invalid value type"); } break; @@ -225,7 +253,7 @@ void Value::set_value(const Value &value) void Value::set_string_from_other(const Value &other) { - ASSERT(attr_type_ == AttrType::CHARS, "attr type is not CHARS"); + ASSERT(attr_type_ == AttrType::CHARS || attr_type() == AttrType::TEXTS, "attr type is not CHARS or TEXTS"); if (own_data_ && other.value_.pointer_value_ != nullptr && length_ != 0) { this->value_.pointer_value_ = new char[this->length_ + 1]; memcpy(this->value_.pointer_value_, other.value_.pointer_value_, this->length_); @@ -236,7 +264,8 @@ void Value::set_string_from_other(const Value &other) const char *Value::data() const { switch (attr_type_) { - case AttrType::CHARS: { + case AttrType::CHARS: + case AttrType::TEXTS: { return value_.pointer_value_; } break; default: { @@ -280,7 +309,8 @@ bool Value::LIKE(const Value &other) const int Value::get_int() const { switch (attr_type_) { - case AttrType::CHARS: { + case AttrType::CHARS: + case AttrType::TEXTS: { try { return (int)(std::stol(value_.pointer_value_)); } catch (exception const &ex) { @@ -313,7 +343,8 @@ int Value::get_int() const float Value::get_float() const { switch (attr_type_) { - case AttrType::CHARS: { + case AttrType::CHARS: + case AttrType::TEXTS: { try { return std::stof(value_.pointer_value_); } catch (exception const &ex) { @@ -347,7 +378,8 @@ string Value::get_string() const { return this->to_string(); } bool Value::get_boolean() const { switch (attr_type_) { - case AttrType::CHARS: { + case AttrType::CHARS: + case AttrType::TEXTS: { try { float val = std::stof(value_.pointer_value_); if (val >= EPSILON || val <= -EPSILON) { diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 5822ee60..fea43f47 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -19,6 +19,7 @@ See the Mulan PSL v2 for more details. */ #include "common/type/attr_type.h" #include "common/type/data_type.h" #include "common/type/date_type.h" +#include "common/type/text_type.h" class NullValue {}; @@ -40,6 +41,7 @@ class Value final friend class CharType; friend class DateType; friend class NullType; + friend class TextType; Value() = default; @@ -126,6 +128,7 @@ class Value final void set_float(float val); void set_date(int val); void set_string(const char *s, int len = 0); + void set_text(const char *s, int len = 0); void set_string_from_other(const Value &other); private: diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index fdb66b11..41caecce 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -377,8 +377,8 @@ static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 70 -#define YY_END_OF_BUFFER 71 +#define YY_NUM_RULES 71 +#define YY_END_OF_BUFFER 72 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -386,212 +386,215 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[206] = {0, +static const flex_int16_t yy_accept[209] = {0, 0, 0, 0, 0, - 71, - 69, + 72, + 70, 1, 2, - 69, - 69, - 69, - 49, + 70, + 70, + 70, 50, - 65, - 63, 51, + 66, 64, + 52, + 65, 6, - 66, + 67, 3, 5, + 57, + 53, + 59, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 71, 56, - 52, - 58, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 70, - 55, - 0, - 67, 0, 68, + 0, + 69, 3, 0, - 53, 54, - 57, - 62, - 62, - 62, + 55, + 58, + 63, + 63, + 63, + 45, + 63, 44, - 62, - 43, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 60, - 62, - 62, - 62, - 62, - 62, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 61, + 63, + 63, + 63, + 63, + 63, 15, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, 4, 22, - 62, - 62, - 62, - 62, - 62, - 62, - 62, + 63, + 63, + 63, + 63, + 63, + 63, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, 32, - 62, - 62, - 62, - 59, - 62, - 62, - 62, + 63, + 63, + 63, + 60, + 63, + 63, + 63, 28, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, + 63, 19, 33, - 62, - 62, - 39, + 63, + 63, + 40, 35, - 62, + 63, 9, 11, 7, - 62, - 62, - 62, + 63, + 63, + 63, 20, - 62, + 63, 8, - 62, - 62, - 62, - 62, + 63, + 63, + 63, + 63, 24, - 48, - 61, - 38, - 36, - 62, + 49, 62, + 39, + 37, + 63, + 63, 16, - 62, + 63, 17, - 62, - 62, - 62, - 62, - 29, - 62, - 62, - 62, - 62, + 63, + 36, + 63, + 63, + 63, + 29, + 63, + 63, + 63, + 63, 34, - 62, - 42, + 63, + 43, 14, - 62, - 47, - 62, - 62, - 62, - 62, - 62, + 63, + 48, + 63, + 63, + 63, + 63, + 63, 12, - 62, - 62, + 63, + 63, 21, 30, 10, 26, - 62, - 46, - 40, + 63, + 47, + 41, 23, - 62, - 62, + 63, + 63, 18, - 62, + 63, 13, 27, - 25, - 41, - 62, - 62, - 45, - 37, + 25, + 42, + 63, + 63, + 46, + 38, 31, 0}; @@ -924,31 +927,31 @@ static const YY_CHAR yy_meta[69] = {0, 2, 2}; -static const flex_int16_t yy_base[211] = {0, +static const flex_int16_t yy_base[214] = {0, 0, 0, 0, 0, + 560, + 561, + 561, + 561, + 541, + 553, 551, - 552, - 552, - 552, - 532, - 537, - 535, - 552, - 552, - 552, - 552, - 552, - 525, - 552, - 552, - 56, - 552, + 561, + 561, + 561, + 561, + 561, + 541, + 561, + 561, + 56, + 561, 54, - 552, - 521, + 561, + 537, 55, 59, 60, @@ -959,400 +962,406 @@ static const flex_int16_t yy_base[211] = {0, 62, 76, 81, - 523, + 539, 101, 103, 113, 110, 134, - 121, - 117, 127, - 124, - 552, - 552, - 532, - 552, - 530, - 552, + 117, + 121, + 138, + 561, + 561, + 548, + 561, + 539, + 561, 69, - 519, - 552, - 552, - 552, + 529, + 561, + 561, + 561, 0, - 518, + 528, 140, - 515, - 138, - 514, - 144, - 150, + 526, 142, - 166, - 141, + 525, + 144, + 159, + 124, + 165, + 155, 167, - 153, - 178, 169, - 164, + 180, + 172, 176, 177, - 193, - 235, - 513, - 179, - 204, + 186, 194, - 181, - 206, - 510, - 211, - 215, - 207, - 218, - 212, 236, - 232, - 225, - 260, - 509, - 508, - 233, - 254, - 228, - 264, - 272, - 275, - 276, + 524, + 202, + 192, + 201, + 195, + 204, + 522, + 211, + 217, + 209, + 223, + 229, + 249, + 234, + 248, + 250, + 261, + 520, + 519, + 226, + 268, + 251, + 257, + 277, + 285, + 278, + 289, 288, - 273, - 279, - 291, - 287, - 296, - 297, + 292, + 293, 298, - 299, - 312, + 301, + 305, + 302, + 304, 311, - 316, - 322, - 289, - 330, + 310, 326, - 328, - 507, 329, + 306, + 313, + 330, + 336, + 518, 337, - 334, - 506, - 315, - 340, - 351, 341, - 354, + 346, + 517, + 332, 352, - 363, - 369, - 505, - 504, - 367, - 355, - 502, - 499, + 354, 365, - 496, - 491, - 488, - 376, - 371, - 388, - 484, + 342, + 362, + 368, 372, - 483, - 374, + 358, + 516, + 515, + 371, + 373, + 514, + 513, 375, - 398, - 399, - 481, - 462, - 414, - 411, - 410, - 394, - 390, - 404, - 423, - 396, - 424, - 407, - 427, - 429, - 364, - 408, - 430, - 434, - 435, - 304, - 441, - 301, - 300, - 437, - 290, - 442, - 451, - 447, - 450, - 449, - 469, - 467, - 470, - 257, - 249, - 248, - 238, - 454, - 203, - 202, - 201, - 459, - 479, - 170, - 478, - 118, - 115, - 87, - 86, - 494, - - 480, - 84, - 80, - 77, - 552, - 543, - 545, - 547, - 88, - 87}; - -static const flex_int16_t yy_def[211] = {0, - 205, - 1, - 206, - 206, - 205, - 205, - 205, - 205, - 205, - 207, - 208, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 205, - 205, - 207, - 205, - 208, - 205, - 205, - 205, - 205, - 205, - 205, - 210, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 205, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, + 511, + 509, + 504, + 395, + 379, + 402, + 502, + 385, + 500, + 387, + 388, + 389, + 391, + 497, + 495, + 493, + 471, + 414, + 410, + 424, + 426, + 428, + 420, + 434, + 408, + 412, + 438, + 440, + 396, + 422, + 442, + 445, + 448, + 377, + 453, + 370, + 317, + 450, + 314, + 457, + 463, + 462, + 464, + 455, + 452, + 473, + 480, + 276, + 263, + 238, + 224, + 465, + 184, + 181, + 170, + 490, + 478, + 149, + 487, + 118, + 115, + 87, + 86, + 489, + 197, + 84, + 80, + 77, + 561, + 546, + 548, + 550, + 88, + 87}; + +static const flex_int16_t yy_def[214] = {0, + 208, + 1, 209, 209, - 209, - 209, + 208, + 208, + 208, + 208, + 208, + 210, + 211, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 208, + 208, + 210, + 208, + 211, + 208, + 208, + 208, + 208, + 208, + 208, + 213, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 208, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + 212, + + 212, + 212, + 212, + 212, + 212, + 212, + 212, 0, - 205, - 205, - 205, - 205, - 205}; + 208, + 208, + 208, + 208, + 208}; -static const flex_int16_t yy_nxt[621] = {0, +static const flex_int16_t yy_nxt[630] = {0, 6, 7, 8, @@ -1494,412 +1503,415 @@ static const flex_int16_t yy_nxt[621] = {0, 76, 56, 77, - 88, + 91, 56, 81, 83, 70, 82, - 90, + 88, 71, 56, 72, - 91, 89, + 90, 56, 78, 56, - 56, + 98, 56, 84, 56, 79, 85, 80, - 93, 94, 56, - 88, + 92, + 91, 81, - 56, + 95, 83, - 96, + 56, 82, - 90, + 88, 86, - 97, - 95, - 91, + 56, + 96, 89, + 90, 87, + 97, 56, - 99, - 56, + 98, 56, 84, 56, 56, 85, - 102, - 93, - 94, - 98, 56, + 94, + 99, + 92, 56, 56, + 95, + 100, 56, - 96, 56, 86, - 100, - 97, - 95, - - 106, - 87, - 105, - 99, 101, - 103, - 115, 56, + 96, + 56, - 107, - 108, + 87, + 103, + 97, 102, - 104, - 117, - 98, + 106, 56, + 104, 56, 56, + 108, 56, - 118, + 107, + 99, + 105, 56, 56, 100, - 109, - 106, 56, - 56, - 105, + 109, + 118, + 117, 101, 56, - 103, - 115, + 110, 56, + 207, + 103, + 102, 116, - 107, - 108, - 119, - 104, - 117, + 106, 56, - 123, + 104, + 119, 120, + 108, + 107, 56, - 118, - 125, - 121, - 56, - 56, - 109, 56, + 105, 56, + 121, 124, 56, + 109, + 118, + 117, 122, - 127, - 128, - 126, + 56, 110, - 116, - 111, - 130, - 119, 56, + 207, 56, 132, + 116, 123, + 125, + 119, + 111, 120, 112, + 126, 56, - 125, - 121, 56, - 113, - 114, 56, - 131, - 124, - 122, 56, + 121, + 124, + 113, 127, - 128, - 126, - 110, 129, - 111, - 130, 56, + 122, + 114, + 115, + 56, + 128, 56, 132, + 123, + 130, + 125, 56, - 56, - 134, + 111, + 131, 112, - 56, + 126, + 134, 135, 133, + 56, + 56, + 56, 113, - 114, + 127, + 129, 136, - 137, - - 131, + 114, + 115, 56, + + 128, + 139, 56, 56, + 137, + 130, 56, 56, - 142, - 139, - 129, 138, + 131, + 140, + 134, 56, + 135, + 133, 56, 56, + 144, 56, 56, 56, - 134, - 140, - 56, - 135, - 133, - 141, - 151, 136, - 137, + 141, + 143, 56, 56, - 143, - 144, + 139, 56, 56, + 137, 142, - 139, - 146, - 138, - 147, 56, 145, - 148, + 138, 149, - 56, 140, + 146, + 150, + 148, + 153, 56, + 147, + 144, 56, 56, - 150, - 141, - 151, - 56, - 153, 154, 56, + 141, 143, - 144, + 151, 56, 56, - 158, - 157, - 146, - 155, - 147, - 145, 152, - 148, - 149, + 155, + 142, 56, 56, + 145, 156, + 149, 56, - 56, + 146, 150, - 161, - 160, - 162, + 148, 153, - 154, - 159, - 56, + 147, 56, + 157, 56, + 159, + 154, 158, 56, - 157, + 160, + 151, + 162, 56, + 152, 155, 56, + 164, + 165, + 56, + 156, 56, - 152, 56, 56, 56, - 163, - 156, - 167, - 166, - 169, 161, - 160, - 162, - 164, - - 159, - 165, 56, 168, 56, - 174, - 172, - 171, - 56, - 170, - 56, - 179, - 56, + 157, 56, - 178, + 159, 163, - 173, - 167, - 56, - 166, + 158, + 160, 169, 56, + + 162, + 56, 56, - 164, 56, + 164, 56, 165, + 166, + 167, + 56, + 56, + 170, + 161, + 171, + 172, 168, 56, + 173, 177, - 174, - 172, - 171, - 170, 175, - 176, - 179, + 163, + 174, 56, + 169, 56, 178, - 173, 56, + 179, + 56, + 176, + 181, + 166, + 167, 180, 56, + 170, 56, - 182, - 185, - 181, + 171, 56, + 172, 56, - 183, + 173, 56, - 184, - 186, 177, + 175, + 182, + 174, + 183, 56, + 178, + 185, + 179, 56, - 187, - 175, 176, - 190, + 56, + 181, + 56, + 184, + 180, 56, 188, + 186, 56, + 187, 56, + 189, 56, - 193, - 180, + 56, + 190, 56, 182, - 185, - 192, - 181, 56, - 195, 183, + 193, + 185, + 191, + 56, + 56, + 56, 56, + 198, + 196, 184, + 195, + 188, + 56, 186, - 189, - 191, 56, 187, - 56, + 199, + 189, + 192, 56, 190, - 199, - 188, + 56, 194, 200, - 197, + 202, 193, + 204, + + 191, 56, + 197, 56, 56, - 56, - 192, - 56, + 198, + 196, 56, 195, - - 201, - 202, 56, - 189, - 191, + 205, 56, - 196, - 198, + 206, + 199, 56, - 204, + 192, 56, - 199, - 194, + 201, 56, + 194, + 203, 200, + 202, + 56, + 204, + 56, 197, 56, - 203, 56, 56, 56, 56, 56, - 92, 56, - 201, - 202, + 93, + 205, 56, + 206, 56, 56, - 196, - 198, 56, - 92, - 204, - 50, - 48, + 201, 56, - 55, - 51, + 93, 50, - 48, 203, 45, 45, @@ -1907,80 +1919,86 @@ static const flex_int16_t yy_nxt[621] = {0, 47, 49, 49, + 48, + 56, + 55, + 51, + 50, + 48, 46, - 205, + 208, 5, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205}; + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208}; -static const flex_int16_t yy_chk[621] = {0, +static const flex_int16_t yy_chk[630] = {0, 1, 1, 1, @@ -2069,21 +2087,21 @@ static const flex_int16_t yy_chk[621] = {0, 32, 27, 25, - 210, - 209, + 213, + 212, 33, - 204, + 207, 25, 27, - 203, + 206, 34, 27, 28, - 202, + 205, 31, - 199, - 198, + 202, + 201, 26, 30, 27, @@ -2111,502 +2129,511 @@ static const flex_int16_t yy_chk[621] = {0, 26, 38, 36, - 197, + 200, 29, 42, - 196, + 199, 33, 36, - 41, + 43, 37, 33, - 44, + 64, 34, - 41, 43, + 41, 37, 39, 30, 38, - 43, + 41, 30, 40, 30, - 44, + 41, 42, - 60, + 44, 36, 58, - 66, 64, + 60, 40, 62, 36, 40, 37, 58, - 60, - 63, - 41, + 197, + 44, + 43, 37, - 68, + 60, 39, - 63, + 66, 38, - 43, + 41, 40, - 64, + 63, 62, - 44, + 41, 42, 40, - 71, - 66, + 63, 65, + 64, 67, 40, - 70, + 68, 194, 40, - 68, + 70, 58, - 60, 65, + 44, + 71, 72, - 73, + 60, + 66, 69, - 77, - 63, - 80, + 193, 40, 67, - 64, + 192, 62, - 71, + 73, 40, - 70, - 66, + 68, + 63, 67, + 70, + 78, 69, - 77, 74, - 79, + 80, 72, - 73, - 68, + 204, + 71, + 65, 69, 79, - 65, - 191, - 190, - 189, - 78, - 80, + 77, + 66, 81, - 85, + 73, + 79, + 78, 67, + 85, 74, - 71, 83, - 87, - 70, + 204, + 68, 67, + 77, + 70, 84, 69, - 77, - 86, - 78, - 72, - 73, + 80, 81, + 72, + 71, + 86, + 190, 69, - 79, - 90, - 85, + 95, 83, - 96, - 80, + 85, 87, + 73, + 79, + 78, 84, 89, - 94, 74, 75, - 88, - 86, - 187, + 204, + 189, + 95, + 77, 84, - 89, - 90, - 88, - 75, - 78, + 86, + 80, 75, - 94, 81, - 186, - 185, - 96, - 85, - 83, 75, - 95, 87, + 90, + 88, + 91, + 97, + 83, + 85, + 75, + 88, + 90, + 98, 84, - 184, 75, 75, - 91, + 92, + 89, + 188, 95, - 86, 84, - 97, - 89, - 90, - 88, - 75, 91, + 86, + 96, 75, - 94, + 92, + 75, + 87, + 97, 98, - 102, 96, + 187, 99, - 100, - 98, + 101, 75, - 103, + 88, + 90, 99, - 97, 75, 75, - 99, 100, - 95, - 105, + 89, 101, - 114, - 175, - 104, - 105, + 103, 102, + 100, 91, - 101, - 106, - 107, - 108, - 109, - 173, - 172, - 98, - 103, - 170, - 99, - 97, 104, - 114, - 99, + 105, 100, - 111, - 110, + 92, + 102, + 97, 106, + 98, + 96, 107, - 123, - 112, - 105, - 102, 109, - 101, + 106, 110, - 113, 108, + 115, + 99, + 103, + 105, + 112, + 111, + 101, + 116, + 178, + 100, + 104, + 176, + 107, + 100, 111, + 102, + 108, 112, - 116, - 103, - 117, - 119, + 110, 115, 113, - 104, + 109, + 106, 114, - 121, - 116, 117, - 120, - 106, - 107, + 116, 124, - 126, - 123, + 103, + 105, + 113, + 118, + 120, + 114, + 117, + 104, 121, - 109, - 119, - 110, - 108, - 115, + 128, + 107, + 118, 111, + 122, + 108, 112, + 110, + 115, + 109, 125, - 128, 120, - 127, - 134, - 113, 126, - 125, - 127, + 122, 116, - 117, + 121, + 132, 124, + 113, + 126, 129, - 165, - 137, - 123, - 133, - 121, - 130, - 119, - 142, - 145, - 115, - 147, - 148, - 141, + 114, + 117, + 127, 128, - 120, - 134, - 133, - 141, - 126, + 129, + 130, + 118, + 175, + 135, + 131, + 136, 125, + 139, + 132, + 173, + 120, + 144, + 122, 127, - 129, - + 121, 124, - 130, - 143, - 137, - 157, - 148, - 145, - 143, - 156, - 142, - 160, - 157, + 135, + 147, + + 126, 149, 150, - 156, + 151, 128, - 147, - 134, - 158, - 133, - 141, - 162, - 166, + 152, 129, - 155, - 154, 130, - 137, - 153, - 155, - 148, - 145, + 131, 143, - 142, - 149, + 168, + 136, + 125, + 139, + 143, + 132, + 145, + 144, 150, + 147, + 127, + 145, + 164, + 135, + 158, + 151, + 165, + 152, + 157, + 149, + 158, + 130, + 131, 157, + 162, + 136, + 169, + 139, 159, + 143, + 160, + 144, 161, - 156, + 150, 147, - 163, 159, - 164, - 167, - 162, - 166, + 145, 161, - 168, - 169, 163, - 174, - 164, + 151, + 165, + 152, + 166, + 149, 167, - 155, + 158, + 170, + 163, + 157, 171, - 176, - 168, - 149, - 150, - 174, - 178, 169, - 180, - 179, - 177, - 178, - 159, - 188, - 162, 166, + 172, + 167, 177, + 170, + 184, + 174, + 171, + 183, + 159, + 179, 161, - 192, + 177, + 165, + 172, + 181, 180, - 163, - 152, - 164, - 167, - 171, - 176, 182, - 168, - 181, + 191, 183, - 174, - 188, + 181, + 163, + 180, 169, + 156, + 166, + 185, + 167, + 184, + 170, + 174, + 196, + 171, + 186, 179, - 192, + 185, + 191, + 177, + 196, + + 172, + 198, 182, - 178, + 203, 195, - 193, - 201, - 151, - 177, - 146, - 144, + 183, + 181, + 155, 180, - - 193, + 154, + 198, + 153, + 203, + 184, + 148, + 174, + 146, + 186, + 142, + 179, 195, + 185, + 191, + 141, + 196, 140, - 171, - 176, - 139, - 181, - 183, - 200, - 201, - 138, - 188, - 179, - 136, - 192, 182, - 135, - 200, - 132, - 131, - 122, - 118, + 138, + 137, + 134, + 133, + 123, + 119, + 94, 93, - 92, + 198, 82, - 193, - 195, + 203, 76, 61, 59, - 181, - 183, + 186, 57, 52, - 201, 49, + 195, + 209, + 209, + 210, + 210, + 211, + 211, 47, 35, 24, 17, 11, 10, - 200, - 206, - 206, - 207, - 207, - 208, - 208, 9, 5, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205}; + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208, + 208}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2642,7 +2669,7 @@ extern double atof(); #define RETURN_TOKEN(token) \ LOG_DEBUG("%s", #token); \ return token -#line 698 "lex_sql.cpp" +#line 702 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -2651,7 +2678,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 707 "lex_sql.cpp" +#line 711 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -2927,7 +2954,7 @@ YY_DECL { #line 75 "lex_sql.l" -#line 993 "lex_sql.cpp" +#line 997 "lex_sql.cpp" while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ { @@ -2951,12 +2978,12 @@ YY_DECL } while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 206) + if (yy_current_state >= 209) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; - } while (yy_base[yy_current_state] != 552); + } while (yy_base[yy_current_state] != 561); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -3124,79 +3151,79 @@ YY_DECL YY_BREAK case 36: YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(NULL_T); + RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token YY_BREAK case 37: YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(NULLABLE); + RETURN_TOKEN(NULL_T); YY_BREAK case 38: YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(LOAD); + RETURN_TOKEN(NULLABLE); YY_BREAK case 39: YY_RULE_SETUP #line 117 "lex_sql.l" - RETURN_TOKEN(DATA); + RETURN_TOKEN(LOAD); YY_BREAK case 40: YY_RULE_SETUP #line 118 "lex_sql.l" - RETURN_TOKEN(INFILE); + RETURN_TOKEN(DATA); YY_BREAK case 41: YY_RULE_SETUP #line 119 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); + RETURN_TOKEN(INFILE); YY_BREAK case 42: YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(GROUP); + RETURN_TOKEN(EXPLAIN); YY_BREAK case 43: YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(BY); + RETURN_TOKEN(GROUP); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(AS); + RETURN_TOKEN(BY); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(STORAGE); + RETURN_TOKEN(AS); YY_BREAK case 46: YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(FORMAT); + RETURN_TOKEN(STORAGE); YY_BREAK case 47: YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(INNER); + RETURN_TOKEN(FORMAT); YY_BREAK case 48: YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(JOIN); + RETURN_TOKEN(INNER); YY_BREAK case 49: YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(LBRACE); + RETURN_TOKEN(JOIN); YY_BREAK case 50: YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(RBRACE); + RETURN_TOKEN(LBRACE); YY_BREAK case 51: YY_RULE_SETUP -#line 130 "lex_sql.l" - RETURN_TOKEN(COMMA); +#line 129 "lex_sql.l" + RETURN_TOKEN(RBRACE); YY_BREAK case 52: YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(EQ); + RETURN_TOKEN(COMMA); YY_BREAK case 53: YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(LE); + RETURN_TOKEN(EQ); YY_BREAK case 54: YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(NE); + RETURN_TOKEN(LE); YY_BREAK case 55: YY_RULE_SETUP #line 134 "lex_sql.l" @@ -3204,69 +3231,73 @@ YY_DECL YY_BREAK case 56: YY_RULE_SETUP #line 135 "lex_sql.l" - RETURN_TOKEN(LT); + RETURN_TOKEN(NE); YY_BREAK case 57: YY_RULE_SETUP #line 136 "lex_sql.l" - RETURN_TOKEN(GE); + RETURN_TOKEN(LT); YY_BREAK case 58: YY_RULE_SETUP #line 137 "lex_sql.l" - RETURN_TOKEN(GT); + RETURN_TOKEN(GE); YY_BREAK case 59: YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(NOT); + RETURN_TOKEN(GT); YY_BREAK case 60: YY_RULE_SETUP #line 139 "lex_sql.l" - RETURN_TOKEN(IS); + RETURN_TOKEN(NOT); YY_BREAK case 61: YY_RULE_SETUP #line 140 "lex_sql.l" - RETURN_TOKEN(LIKE); + RETURN_TOKEN(IS); YY_BREAK case 62: YY_RULE_SETUP -#line 142 "lex_sql.l" +#line 141 "lex_sql.l" + RETURN_TOKEN(LIKE); + YY_BREAK + case 63: YY_RULE_SETUP +#line 143 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(ID); YY_BREAK - case 63: -#line 145 "lex_sql.l" case 64: #line 146 "lex_sql.l" case 65: #line 147 "lex_sql.l" - case 66: YY_RULE_SETUP -#line 147 "lex_sql.l" + case 66: +#line 148 "lex_sql.l" + case 67: YY_RULE_SETUP +#line 148 "lex_sql.l" { return yytext[0]; } YY_BREAK - case 67: - /* rule 67 can match eol */ + case 68: + /* rule 68 can match eol */ YY_RULE_SETUP -#line 148 "lex_sql.l" +#line 149 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK - case 68: - /* rule 68 can match eol */ + case 69: + /* rule 69 can match eol */ YY_RULE_SETUP -#line 149 "lex_sql.l" +#line 150 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK - case 69: YY_RULE_SETUP -#line 151 "lex_sql.l" + case 70: YY_RULE_SETUP +#line 152 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK - case 70: YY_RULE_SETUP -#line 152 "lex_sql.l" + case 71: YY_RULE_SETUP +#line 153 "lex_sql.l" ECHO; YY_BREAK -#line 1394 "lex_sql.cpp" +#line 1403 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -3531,7 +3562,7 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) } while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 206) + if (yy_current_state >= 209) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -3558,11 +3589,11 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y } while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 206) + if (yy_current_state >= 209) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 205); + yy_is_jam = (yy_current_state == 208); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -4369,6 +4400,6 @@ void yyfree(void *ptr, yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 152 "lex_sql.l" +#line 153 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 7e27df55..9dc94dc7 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -537,7 +537,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #undef yyTABLES_NAME #endif -#line 152 "lex_sql.l" +#line 153 "lex_sql.l" #line 548 "lex_sql.h" #undef yyIN_HEADER diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index b4cd2f9f..904667b9 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -111,6 +111,7 @@ INT RETURN_TOKEN(INT_T); CHAR RETURN_TOKEN(STRING_T); FLOAT RETURN_TOKEN(FLOAT_T); DATE RETURN_TOKEN(DATE_T); // 增加 DATE 的 token +TEXT RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token NULL RETURN_TOKEN(NULL_T); NULLABLE RETURN_TOKEN(NULLABLE); LOAD RETURN_TOKEN(LOAD); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index fad42e1e..a457edd9 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -169,94 +169,95 @@ enum yysymbol_kind_t YYSYMBOL_STRING_T = 27, /* STRING_T */ YYSYMBOL_FLOAT_T = 28, /* FLOAT_T */ YYSYMBOL_DATE_T = 29, /* DATE_T */ - YYSYMBOL_NOT = 30, /* NOT */ - YYSYMBOL_NULL_T = 31, /* NULL_T */ - YYSYMBOL_NULLABLE = 32, /* NULLABLE */ - YYSYMBOL_HELP = 33, /* HELP */ - YYSYMBOL_EXIT = 34, /* EXIT */ - YYSYMBOL_DOT = 35, /* DOT */ - YYSYMBOL_INTO = 36, /* INTO */ - YYSYMBOL_VALUES = 37, /* VALUES */ - YYSYMBOL_FROM = 38, /* FROM */ - YYSYMBOL_WHERE = 39, /* WHERE */ - YYSYMBOL_AND = 40, /* AND */ - YYSYMBOL_SET = 41, /* SET */ - YYSYMBOL_ON = 42, /* ON */ - YYSYMBOL_LOAD = 43, /* LOAD */ - YYSYMBOL_DATA = 44, /* DATA */ - YYSYMBOL_INFILE = 45, /* INFILE */ - YYSYMBOL_EXPLAIN = 46, /* EXPLAIN */ - YYSYMBOL_STORAGE = 47, /* STORAGE */ - YYSYMBOL_FORMAT = 48, /* FORMAT */ - YYSYMBOL_INNER = 49, /* INNER */ - YYSYMBOL_JOIN = 50, /* JOIN */ - YYSYMBOL_EQ = 51, /* EQ */ - YYSYMBOL_LT = 52, /* LT */ - YYSYMBOL_GT = 53, /* GT */ - YYSYMBOL_LE = 54, /* LE */ - YYSYMBOL_GE = 55, /* GE */ - YYSYMBOL_NE = 56, /* NE */ - YYSYMBOL_LIKE = 57, /* LIKE */ - YYSYMBOL_IS = 58, /* IS */ - YYSYMBOL_NUMBER = 59, /* NUMBER */ - YYSYMBOL_FLOAT = 60, /* FLOAT */ - YYSYMBOL_ID = 61, /* ID */ - YYSYMBOL_SSS = 62, /* SSS */ - YYSYMBOL_63_ = 63, /* '+' */ - YYSYMBOL_64_ = 64, /* '-' */ - YYSYMBOL_65_ = 65, /* '*' */ - YYSYMBOL_66_ = 66, /* '/' */ - YYSYMBOL_UMINUS = 67, /* UMINUS */ - YYSYMBOL_YYACCEPT = 68, /* $accept */ - YYSYMBOL_commands = 69, /* commands */ - YYSYMBOL_command_wrapper = 70, /* command_wrapper */ - YYSYMBOL_exit_stmt = 71, /* exit_stmt */ - YYSYMBOL_help_stmt = 72, /* help_stmt */ - YYSYMBOL_sync_stmt = 73, /* sync_stmt */ - YYSYMBOL_begin_stmt = 74, /* begin_stmt */ - YYSYMBOL_commit_stmt = 75, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 76, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 77, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 78, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 79, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 80, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 81, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 82, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 83, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 84, /* attr_def_list */ - YYSYMBOL_attr_def = 85, /* attr_def */ - YYSYMBOL_nullable_constraint = 86, /* nullable_constraint */ - YYSYMBOL_number = 87, /* number */ - YYSYMBOL_type = 88, /* type */ - YYSYMBOL_insert_stmt = 89, /* insert_stmt */ - YYSYMBOL_values_list = 90, /* values_list */ - YYSYMBOL_value_list = 91, /* value_list */ - YYSYMBOL_value = 92, /* value */ - YYSYMBOL_storage_format = 93, /* storage_format */ - YYSYMBOL_delete_stmt = 94, /* delete_stmt */ - YYSYMBOL_update_stmt = 95, /* update_stmt */ - YYSYMBOL_setClauses = 96, /* setClauses */ - YYSYMBOL_setClause = 97, /* setClause */ - YYSYMBOL_select_stmt = 98, /* select_stmt */ - YYSYMBOL_calc_stmt = 99, /* calc_stmt */ - YYSYMBOL_expression_list = 100, /* expression_list */ - YYSYMBOL_expression = 101, /* expression */ - YYSYMBOL_alias = 102, /* alias */ - YYSYMBOL_aggr_func_expr = 103, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 104, /* rel_attr */ - YYSYMBOL_relation = 105, /* relation */ - YYSYMBOL_rel_list = 106, /* rel_list */ - YYSYMBOL_joinClause = 107, /* joinClause */ - YYSYMBOL_joinClauses = 108, /* joinClauses */ - YYSYMBOL_where = 109, /* where */ - YYSYMBOL_condition_list = 110, /* condition_list */ - YYSYMBOL_condition = 111, /* condition */ - YYSYMBOL_comp_op = 112, /* comp_op */ - YYSYMBOL_group_by = 113, /* group_by */ - YYSYMBOL_load_data_stmt = 114, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 115, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 116, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 117 /* opt_semicolon */ + YYSYMBOL_TEXT_T = 30, /* TEXT_T */ + YYSYMBOL_NOT = 31, /* NOT */ + YYSYMBOL_NULL_T = 32, /* NULL_T */ + YYSYMBOL_NULLABLE = 33, /* NULLABLE */ + YYSYMBOL_HELP = 34, /* HELP */ + YYSYMBOL_EXIT = 35, /* EXIT */ + YYSYMBOL_DOT = 36, /* DOT */ + YYSYMBOL_INTO = 37, /* INTO */ + YYSYMBOL_VALUES = 38, /* VALUES */ + YYSYMBOL_FROM = 39, /* FROM */ + YYSYMBOL_WHERE = 40, /* WHERE */ + YYSYMBOL_AND = 41, /* AND */ + YYSYMBOL_SET = 42, /* SET */ + YYSYMBOL_ON = 43, /* ON */ + YYSYMBOL_LOAD = 44, /* LOAD */ + YYSYMBOL_DATA = 45, /* DATA */ + YYSYMBOL_INFILE = 46, /* INFILE */ + YYSYMBOL_EXPLAIN = 47, /* EXPLAIN */ + YYSYMBOL_STORAGE = 48, /* STORAGE */ + YYSYMBOL_FORMAT = 49, /* FORMAT */ + YYSYMBOL_INNER = 50, /* INNER */ + YYSYMBOL_JOIN = 51, /* JOIN */ + YYSYMBOL_EQ = 52, /* EQ */ + YYSYMBOL_LT = 53, /* LT */ + YYSYMBOL_GT = 54, /* GT */ + YYSYMBOL_LE = 55, /* LE */ + YYSYMBOL_GE = 56, /* GE */ + YYSYMBOL_NE = 57, /* NE */ + YYSYMBOL_LIKE = 58, /* LIKE */ + YYSYMBOL_IS = 59, /* IS */ + YYSYMBOL_NUMBER = 60, /* NUMBER */ + YYSYMBOL_FLOAT = 61, /* FLOAT */ + YYSYMBOL_ID = 62, /* ID */ + YYSYMBOL_SSS = 63, /* SSS */ + YYSYMBOL_64_ = 64, /* '+' */ + YYSYMBOL_65_ = 65, /* '-' */ + YYSYMBOL_66_ = 66, /* '*' */ + YYSYMBOL_67_ = 67, /* '/' */ + YYSYMBOL_UMINUS = 68, /* UMINUS */ + YYSYMBOL_YYACCEPT = 69, /* $accept */ + YYSYMBOL_commands = 70, /* commands */ + YYSYMBOL_command_wrapper = 71, /* command_wrapper */ + YYSYMBOL_exit_stmt = 72, /* exit_stmt */ + YYSYMBOL_help_stmt = 73, /* help_stmt */ + YYSYMBOL_sync_stmt = 74, /* sync_stmt */ + YYSYMBOL_begin_stmt = 75, /* begin_stmt */ + YYSYMBOL_commit_stmt = 76, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 77, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 78, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 79, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 80, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 81, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 82, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 83, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 84, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 85, /* attr_def_list */ + YYSYMBOL_attr_def = 86, /* attr_def */ + YYSYMBOL_nullable_constraint = 87, /* nullable_constraint */ + YYSYMBOL_number = 88, /* number */ + YYSYMBOL_type = 89, /* type */ + YYSYMBOL_insert_stmt = 90, /* insert_stmt */ + YYSYMBOL_values_list = 91, /* values_list */ + YYSYMBOL_value_list = 92, /* value_list */ + YYSYMBOL_value = 93, /* value */ + YYSYMBOL_storage_format = 94, /* storage_format */ + YYSYMBOL_delete_stmt = 95, /* delete_stmt */ + YYSYMBOL_update_stmt = 96, /* update_stmt */ + YYSYMBOL_setClauses = 97, /* setClauses */ + YYSYMBOL_setClause = 98, /* setClause */ + YYSYMBOL_select_stmt = 99, /* select_stmt */ + YYSYMBOL_calc_stmt = 100, /* calc_stmt */ + YYSYMBOL_expression_list = 101, /* expression_list */ + YYSYMBOL_expression = 102, /* expression */ + YYSYMBOL_alias = 103, /* alias */ + YYSYMBOL_aggr_func_expr = 104, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 105, /* rel_attr */ + YYSYMBOL_relation = 106, /* relation */ + YYSYMBOL_rel_list = 107, /* rel_list */ + YYSYMBOL_joinClause = 108, /* joinClause */ + YYSYMBOL_joinClauses = 109, /* joinClauses */ + YYSYMBOL_where = 110, /* where */ + YYSYMBOL_condition_list = 111, /* condition_list */ + YYSYMBOL_condition = 112, /* condition */ + YYSYMBOL_comp_op = 113, /* comp_op */ + YYSYMBOL_group_by = 114, /* group_by */ + YYSYMBOL_load_data_stmt = 115, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 116, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 117, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 118 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -563,19 +564,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 69 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 199 +#define YYLAST 203 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 68 +#define YYNTOKENS 69 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 50 /* YYNRULES -- Number of rules. */ -#define YYNRULES 117 +#define YYNRULES 118 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 213 +#define YYNSTATES 214 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 318 +#define YYMAXUTOK 319 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ @@ -626,12 +627,12 @@ static const yytype_int8 yytranslate[] = {0, 2, 2, 2, - 65, - 63, - 2, + 66, 64, 2, - 66, + 65, + 2, + 67, 2, 2, 2, @@ -902,14 +903,14 @@ static const yytype_int8 yytranslate[] = {0, 60, 61, 62, - 67}; + 63, + 68}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = {0, - 212, - 212, - 220, + 213, + 213, 221, 222, 223, @@ -930,100 +931,102 @@ static const yytype_int16 yyrline[] = {0, 238, 239, 240, - 244, - 250, - 255, - 261, - 267, - 273, - 279, - 286, - 292, - 300, - 310, - 324, - 334, - 358, - 361, - 374, - 386, - 411, - 415, - 420, - 426, + 241, + 245, + 251, + 256, + 262, + 268, + 274, + 280, + 287, + 293, + 301, + 311, + 325, + 335, + 359, + 362, + 375, + 387, + 414, + 418, + 423, 429, - 430, - 431, - 432, + 433, + 434, + 435, 436, - 449, - 455, - 462, - 468, - 476, - 480, - 484, - 490, - 497, - 500, - 507, - 520, - 535, - 541, - 549, - 559, - 582, - 618, - 627, - 636, - 651, - 654, - 657, - 660, - 663, - 667, - 670, + 437, + 441, + 454, + 460, + 467, + 473, + 481, + 485, + 489, + 495, + 502, + 505, + 512, + 525, + 540, + 546, + 554, + 564, + 587, + 623, + 632, + 641, + 656, + 659, + 662, + 665, + 668, + 672, 675, - 681, - 684, - 691, - 694, - 697, + 680, + 686, + 689, + 696, + 699, 702, - 710, - 716, + 707, + 715, 721, - 731, - 737, - 747, - 765, - 776, - 782, - 792, - 795, - 801, - 804, + 726, + 736, + 742, + 752, + 770, + 781, + 787, + 797, + 800, + 806, 809, - 816, - 828, - 840, - 852, - 867, - 868, - 869, - 870, - 871, + 814, + 821, + 833, + 845, + 857, 872, 873, 874, 875, 876, - 882, + 877, + 878, + 879, + 880, + 881, 887, - 900, - 908, - 918, - 919}; + 892, + 905, + 913, + 923, + 924}; #endif /** Accessing symbol of state STATE. */ @@ -1066,6 +1069,7 @@ static const char *const yytname[] = {"\"end of file\"", "STRING_T", "FLOAT_T", "DATE_T", + "TEXT_T", "NOT", "NULL_T", "NULLABLE", @@ -1159,7 +1163,7 @@ static const char *const yytname[] = {"\"end of file\"", static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif -#define YYPACT_NINF (-149) +#define YYPACT_NINF (-161) #define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) @@ -1170,218 +1174,219 @@ static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysy /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = {98, - 6, - 13, - 37, - 37, - -51, + 4, 8, - -149, - -13, - -8, - -26, - -149, - -149, - -149, - -149, - -149, - -19, - 7, + 36, + 36, + -36, + 30, + -161, + -4, + 3, + -32, + -161, + -161, + -161, + -161, + -161, + -27, + 25, 98, - 59, - 66, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - 14, + 48, + 73, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, 19, - 26, - 34, - 37, - -149, - -149, - -149, - -7, - -149, - 37, - -149, - -149, - -149, + 31, + 33, + 44, + 36, + -161, + -161, + -161, + -9, + -161, + 36, + -161, + -161, + -161, -1, - -149, - -149, - 62, - -149, - -149, - 80, - 58, - 64, - 79, - 75, + -161, + -161, + 53, + -161, + -161, + 69, + 47, + 56, + 77, 82, - -149, - -149, - -149, - -149, - 108, - 88, - -149, - 91, - 20, + 74, + -161, + -161, + -161, + -161, + 115, + 93, + -161, + 94, + -7, 17, - 68, - -149, - 73, - -149, - 37, - 37, - 37, - 37, - 118, + 76, + -161, + 79, + -161, + 36, + 36, + 36, + 36, + 117, 81, 81, 106, - 114, - 93, - -4, - 95, + 107, + 84, + 68, + 85, + 87, + 88, 97, - 99, - 100, - -149, - -149, - 134, - -149, - -149, - -40, - -40, - -149, - -149, - 37, - -149, + -161, + -161, + 139, + -161, + -161, + -15, + -15, + -161, + -161, + 36, + -161, 0, - 114, - -149, - 136, - 76, - -149, - 111, - -10, - -149, - -149, - 123, - 65, + 107, + -161, 141, - 144, - -149, - -149, - -149, - 115, + -16, + -161, + 110, + -12, + -161, + -161, + 126, + -5, + 142, 145, - -149, - -4, + -161, + -161, + -161, + 116, + 144, + -161, + 68, 146, - 131, - 94, - 94, - -149, + 133, + 99, + 99, + -161, 129, - -4, - 93, - -149, - 161, - -149, - -149, - -149, - -149, - 1, - 97, - 150, - 112, + 68, + 84, + -161, + 162, + -161, + -161, + -161, + -161, + -161, + -2, + 87, + 151, + 111, 81, 81, - -149, - 18, - -149, - 152, - 117, - -149, - -149, - -149, - -149, - -149, - -149, - -149, + -161, + 63, + -161, + 154, + 118, + -161, + -161, + -161, + -161, + -161, + -161, + -161, 147, - 76, - 76, - 76, - -149, - -149, + -16, + -16, + -16, + -161, + -161, + 113, 119, - 116, 148, - -149, - -149, - 141, + -161, + -161, + 142, + 134, + 156, + 138, 135, - 155, - 139, - 137, - 114, + 107, 5, - -149, - -149, - -4, - -4, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - 157, - -149, - -149, - 140, - -149, - -149, - 76, - 133, - -149, - -149, - 87, - 2, - 138, - -149, + -161, + -161, + 68, + 68, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + 163, + -161, + -161, + 137, + -161, + -161, + -16, + 132, + -161, + -161, + 65, + 1, + 136, + -161, 81, - -149, - -149, - -149, - 124, - -149, - -149}; + -161, + -161, + -161, + 125, + -161, + -161}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero @@ -1406,7 +1411,7 @@ static const yytype_int8 yydefact[] = {0, 0, 0, 0, - 116, + 117, 23, 22, 15, @@ -1433,18 +1438,18 @@ static const yytype_int8 yydefact[] = {0, 0, 0, 0, - 57, - 54, + 58, 55, - 85, 56, + 86, + 57, 0, - 78, - 76, - 67, - 80, 79, 77, + 68, + 81, + 80, + 78, 0, 32, 31, @@ -1454,9 +1459,9 @@ static const yytype_int8 yydefact[] = {0, 0, 0, 0, - 114, + 115, 1, - 117, + 118, 2, 0, 0, @@ -1465,118 +1470,119 @@ static const yytype_int8 yydefact[] = {0, 0, 0, 0, - 75, + 76, 0, - 81, + 82, 0, 0, 0, 0, - 68, + 69, 0, 0, 0, - 93, + 94, 0, 0, 0, 0, 0, 0, - 74, - 84, + 75, + 85, 0, - 86, - 82, - 70, + 87, + 83, 71, 72, 73, + 74, 0, - 87, - 80, - 93, + 88, + 81, + 94, 33, 0, - 95, - 60, + 96, + 61, 0, - 93, - 62, - 115, + 94, + 63, + 116, 0, 0, 37, 0, 35, - 83, - 69, + 84, + 70, 0, - 88, - 112, + 89, + 113, 0, - 49, - 85, + 50, + 86, 0, 0, - 94, - 96, + 95, + 97, 0, 0, - 61, + 62, 0, 45, 46, 47, 48, + 49, 43, 0, 0, 0, 0, 0, - 65, + 66, 0, - 52, + 53, 0, 0, - 102, 103, 104, 105, 106, 107, - 110, 108, + 111, + 109, 0, 0, - 95, + 96, + 65, 64, - 63, 0, 0, 0, 42, 40, 37, - 58, + 59, 0, 0, - 91, - 93, - 80, - 89, - 50, + 92, + 94, + 81, + 90, + 51, 0, 0, - 111, - 109, + 112, + 110, + 100, + 102, 99, 101, 98, - 100, - 97, - 113, + 114, 44, 0, 41, @@ -1584,73 +1590,73 @@ static const yytype_int8 yydefact[] = {0, 0, 36, 34, - 95, + 96, 0, - 112, - 53, + 113, + 54, 0, 43, 0, - 90, + 91, 0, - 66, - 51, + 67, + 52, 39, 0, - 92, - 59}; + 93, + 60}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-149, - -149, - 166, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - 15, - 46, - -12, - -149, - -149, - -149, - -149, - 10, +static const yytype_int16 yypgoto[] = {-161, + -161, + 171, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + -161, + 18, + 45, + -11, + -161, + -161, + -161, + -161, + 9, -92, - -149, - -149, - -149, - -149, - 57, - -149, - -149, + -161, + -161, + -161, + -161, + 58, + -161, + -161, -3, - -38, - 142, - -149, + 42, + 140, + -161, -110, - -81, - 47, - -149, - -9, - -104, - -148, - -149, - 67, - -6, - -149, - -149, - -149, - -149}; + -80, + 46, + -161, + -10, + -103, + -160, + -161, + 66, + 2, + -161, + -161, + -161, + -161}; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = {0, @@ -1669,16 +1675,16 @@ static const yytype_uint8 yydefgoto[] = {0, 31, 32, 33, - 145, + 146, 120, - 171, - 192, - 143, + 172, + 193, + 144, 34, 129, - 150, + 151, 54, - 196, + 197, 35, 36, 115, @@ -1690,15 +1696,15 @@ static const yytype_uint8 yydefgoto[] = {0, 126, 57, 58, - 175, - 109, 176, + 109, 177, + 178, 113, 133, 134, - 162, - 149, + 163, + 150, 39, 40, 41, @@ -1712,61 +1718,62 @@ static const yytype_uint8 yytable[] = {117, 132, 80, 80, + 190, 127, 108, 110, - 76, 80, - 60, - 137, 136, 77, - 79, + 137, 42, - 189, + 97, 43, - 61, - 62, - 131, - 168, + 47, 44, - 63, + 169, 45, - 84, - 85, - 47, + 131, + 139, + 140, + 141, + 142, + 143, + 60, 78, 112, - 64, - 169, - 169, - 170, 170, 65, - 151, + 171, + 170, + 63, + 171, + 66, + 152, 46, 98, - 180, - 181, - 97, - 66, - 165, - 102, - 103, - 104, - 105, - 47, - 125, - 205, - 67, - 186, - 188, - 132, + 206, + 61, + 62, + 64, + 166, 48, 49, - 46, + 130, 51, 69, + 47, + 125, + 84, + 85, + 187, + 189, + 132, + 46, + 82, + 83, + 84, + 85, 81, 81, 82, @@ -1774,49 +1781,48 @@ static const yytype_uint8 yytable[] = {117, 84, 85, 81, - 178, 47, - 70, - 185, - 187, + 179, + 67, + 186, + 188, 131, - 200, 99, - 72, + 201, + 70, 48, 49, 50, 51, - 73, + 72, 52, 53, - 82, - 83, - 84, - 85, - 74, + 181, + 182, + 209, + 182, + 76, 132, - 201, - 151, - 139, - 140, - 141, - 142, - 75, + 202, + 152, + 87, + 73, + 79, + 74, 48, 49, 50, 51, - 87, + 47, 52, 53, 124, 1, 2, + 75, 131, - 47, - 208, - 181, + 88, + 89, 3, 4, 5, @@ -1825,34 +1831,39 @@ static const yytype_uint8 yytable[] = {117, 8, 9, 10, - 88, - 89, + 90, 91, + 93, 11, 12, 13, - 153, - 90, + 102, + 103, + 104, + 105, + 48, + 49, + 154, + 51, + 14, + 15, 92, - 93, 94, - 100, 95, - 14, - 15, 96, - 101, - 48, - 49, - 130, - 51, - 16, + 100, 106, + 16, + 101, 17, 107, 111, 18, - 154, + 114, + 112, + 118, + 119, + 121, 155, 156, 157, @@ -1860,164 +1871,163 @@ static const yytype_uint8 yytable[] = {117, 159, 160, 161, - 112, - 114, + 162, + 122, 123, 128, - 118, - 119, - 138, - 121, - 122, 135, - 144, - 146, + 138, + 145, 147, - 78, + 149, 148, - 152, - 164, - 167, - 173, - 182, + 153, + 78, + 165, + 168, 174, + 175, 183, 191, - 197, 184, - 203, - 193, - 190, 198, - 195, - 206, - 68, - 212, - 199, + 185, + 192, 194, - 204, - 210, - 172, - 209, - 202, - 166, + 199, + 196, 207, - 179, - 0, + 204, + 200, + 205, + 213, 211, + 68, + 173, + 195, + 203, + 210, + 167, + 180, 86, - 163}; + 212, + 164, + 0, + 0, + 0, + 0, + 208}; static const yytype_int16 yycheck[] = {92, 4, 112, 4, 4, + 165, 109, 87, 88, - 46, 4, - 61, - 115, 22, 20, - 52, + 115, 9, - 164, + 21, 11, - 10, + 32, + 9, + 20, 11, 112, - 20, - 9, + 26, + 27, + 28, + 29, + 30, + 62, 36, - 11, - 65, - 66, + 40, 31, - 35, - 39, - 38, - 30, - 30, - 32, - 32, - 61, + 62, + 33, + 31, + 37, + 33, + 62, 128, 20, 21, - 21, - 22, - 21, - 61, + 199, + 10, + 11, + 39, 135, - 82, - 83, - 84, - 85, - 31, - 49, - 198, - 44, - 162, + 60, + 61, + 62, + 63, + 0, + 32, + 50, + 66, + 67, 163, 164, - 59, - 60, + 165, 20, + 64, + 65, + 66, + 67, + 62, 62, - 0, - 61, - 61, - 63, 64, 65, 66, - 61, - 148, - 31, - 3, - 162, + 67, + 62, + 32, + 149, + 45, 163, 164, - 177, + 165, 77, - 61, - 59, + 178, + 3, 60, 61, 62, - 61, - 64, - 65, 63, - 64, + 62, 65, 66, - 61, - 198, - 181, + 21, + 22, + 21, + 22, + 46, + 199, 182, - 26, - 27, - 28, - 29, - 61, - 59, + 183, + 39, + 62, + 52, + 62, 60, 61, 62, - 38, - 64, + 63, + 32, 65, + 66, 106, 6, 7, - 198, - 31, - 21, - 22, + 62, + 199, + 39, + 62, 12, 13, 14, @@ -2026,34 +2036,39 @@ static const yytype_int16 yycheck[] = {92, 17, 18, 19, - 38, - 61, - 41, + 62, + 42, + 46, 23, 24, 25, - 30, - 61, - 51, - 45, - 20, - 61, - 42, - 33, - 34, - 42, - 61, - 59, + 82, + 83, + 84, + 85, 60, 61, + 31, + 63, + 34, + 35, + 52, + 20, + 43, + 43, 62, - 41, 22, - 43, - 61, - 37, - 46, - 51, + 42, + 62, + 44, + 62, + 38, + 47, + 62, + 40, + 63, + 62, + 62, 52, 53, 54, @@ -2061,53 +2076,52 @@ static const yytype_int16 yycheck[] = {92, 56, 57, 58, - 39, - 61, + 59, + 62, 21, 20, - 62, - 61, - 36, - 61, - 61, - 51, + 52, + 37, 22, 20, - 50, - 35, 22, + 51, 22, - 40, + 36, + 41, 9, 21, + 62, 20, - 61, - 57, - 59, - 21, - 30, + 62, + 58, 21, 31, - 61, - 42, - 47, - 50, - 18, - 61, - 49, - 172, + 60, + 32, + 43, 48, 51, - 144, - 203, - 182, + 21, + 50, + 49, + 62, + 52, + 18, + 145, + 173, + 183, + 204, 136, - 200, - 148, - -1, - 206, + 149, 56, - 132}; + 207, + 132, + -1, + -1, + -1, + -1, + 201}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ @@ -2125,12 +2139,11 @@ static const yytype_int8 yystos[] = {0, 23, 24, 25, - 33, 34, - 41, - 43, - 46, - 69, + 35, + 42, + 44, + 47, 70, 71, 72, @@ -2145,127 +2158,128 @@ static const yytype_int8 yystos[] = {0, 81, 82, 83, - 89, - 94, + 84, + 90, 95, - 98, + 96, 99, - 114, + 100, 115, 116, + 117, 9, 11, 9, 11, 20, - 31, - 59, + 32, 60, 61, 62, - 64, + 63, 65, - 92, - 100, + 66, + 93, 101, - 103, + 102, 104, - 100, - 61, + 105, + 101, + 62, 10, 11, - 36, - 38, - 61, - 61, - 44, - 70, + 37, + 39, + 62, + 62, + 45, + 71, 0, 3, - 117, - 61, - 61, - 61, - 61, - 101, + 118, + 62, + 62, + 62, + 62, + 102, 20, - 35, - 101, + 36, + 102, 4, - 61, - 63, + 62, 64, 65, 66, - 102, - 38, - 38, - 61, - 61, - 41, - 51, - 45, - 20, - 42, + 67, + 103, + 39, + 39, + 62, + 62, 42, + 52, + 46, + 20, + 43, + 43, 21, 21, - 100, - 61, - 61, - 101, - 101, - 101, 101, + 62, + 62, + 102, + 102, + 102, + 102, 22, - 61, - 105, + 62, 106, - 105, - 37, - 39, - 109, - 61, - 96, + 107, + 106, + 38, + 40, + 110, + 62, 97, - 92, + 98, + 93, + 63, + 62, + 86, + 62, 62, - 61, - 85, - 61, - 61, 21, - 100, - 49, - 102, - 109, - 20, - 90, - 61, - 92, - 104, + 101, + 50, + 103, 110, + 20, + 91, + 62, + 93, + 105, 111, - 51, + 112, + 52, 22, - 109, - 36, + 110, + 37, 26, 27, 28, 29, - 88, + 30, + 89, 22, - 84, + 85, 20, - 50, + 51, 22, - 113, - 91, + 114, 92, + 93, 22, - 30, - 51, + 31, 52, 53, 54, @@ -2273,83 +2287,83 @@ static const yytype_int8 yystos[] = {0, 56, 57, 58, - 112, - 112, - 40, - 92, - 97, + 59, + 113, + 113, + 41, + 93, + 98, 9, 20, - 30, - 32, + 31, + 33, + 87, 86, - 85, 21, - 61, - 105, - 107, + 62, + 106, 108, - 105, + 109, 106, + 107, 21, 22, 20, - 57, - 30, - 92, - 104, - 92, - 104, - 110, - 61, - 59, - 87, + 58, 31, - 84, - 47, 93, - 21, - 42, - 49, - 109, - 92, - 91, - 21, + 105, + 93, + 105, + 111, + 62, + 60, + 88, + 32, + 85, 48, - 110, + 94, + 21, + 43, 50, - 113, + 110, + 93, + 92, 21, - 86, + 49, + 111, 51, - 108, - 61}; + 114, + 21, + 87, + 52, + 109, + 62}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = {0, - 68, 69, 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, 71, 72, 73, @@ -2364,86 +2378,88 @@ static const yytype_int8 yyr1[] = {0, 82, 83, 84, - 84, 85, 85, 86, 86, - 86, 87, - 88, - 88, - 88, + 87, + 87, 88, 89, - 90, + 89, + 89, + 89, + 89, 90, 91, 91, 92, 92, - 92, - 92, 93, 93, + 93, + 93, + 94, 94, 95, 96, - 96, 97, - 98, + 97, 98, 99, + 99, 100, - 100, - 101, - 101, - 101, - 101, - 101, - 101, - 101, - 101, 101, 101, 102, 102, 102, + 102, + 102, + 102, + 102, + 102, + 102, + 102, + 103, 103, 103, 104, 104, 105, - 106, + 105, 106, 107, - 108, + 107, 108, 109, 109, 110, 110, - 110, 111, 111, 111, - 111, - 112, - 112, - 112, - 112, - 112, - 112, 112, 112, 112, 112, 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, 114, 115, 116, 117, - 117}; + 118, + 118}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = {0, @@ -2495,6 +2511,7 @@ static const yytype_int8 yyr2[] = {0, 1, 1, 1, + 1, 5, 3, 5, @@ -3346,104 +3363,104 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YY_REDUCE_PRINT(yyn); switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 213 "yacc_sql.y" +#line 214 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1785 "yacc_sql.cpp" +#line 1788 "yacc_sql.cpp" break; case 24: /* exit_stmt: EXIT */ -#line 244 "yacc_sql.y" +#line 245 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1794 "yacc_sql.cpp" +#line 1797 "yacc_sql.cpp" break; case 25: /* help_stmt: HELP */ -#line 250 "yacc_sql.y" +#line 251 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1802 "yacc_sql.cpp" +#line 1805 "yacc_sql.cpp" break; case 26: /* sync_stmt: SYNC */ -#line 255 "yacc_sql.y" +#line 256 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1810 "yacc_sql.cpp" +#line 1813 "yacc_sql.cpp" break; case 27: /* begin_stmt: TRX_BEGIN */ -#line 261 "yacc_sql.y" +#line 262 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1818 "yacc_sql.cpp" +#line 1821 "yacc_sql.cpp" break; case 28: /* commit_stmt: TRX_COMMIT */ -#line 267 "yacc_sql.y" +#line 268 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1826 "yacc_sql.cpp" +#line 1829 "yacc_sql.cpp" break; case 29: /* rollback_stmt: TRX_ROLLBACK */ -#line 273 "yacc_sql.y" +#line 274 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1834 "yacc_sql.cpp" +#line 1837 "yacc_sql.cpp" break; case 30: /* drop_table_stmt: DROP TABLE ID */ -#line 279 "yacc_sql.y" +#line 280 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1844 "yacc_sql.cpp" +#line 1847 "yacc_sql.cpp" break; case 31: /* show_tables_stmt: SHOW TABLES */ -#line 286 "yacc_sql.y" +#line 287 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1852 "yacc_sql.cpp" +#line 1855 "yacc_sql.cpp" break; case 32: /* desc_table_stmt: DESC ID */ -#line 292 "yacc_sql.y" +#line 293 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1862 "yacc_sql.cpp" +#line 1865 "yacc_sql.cpp" break; case 33: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 301 "yacc_sql.y" +#line 302 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1873 "yacc_sql.cpp" +#line 1876 "yacc_sql.cpp" break; case 34: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 311 "yacc_sql.y" +#line 312 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -3454,11 +3471,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1888 "yacc_sql.cpp" +#line 1891 "yacc_sql.cpp" break; case 35: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 325 "yacc_sql.y" +#line 326 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -3466,11 +3483,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1900 "yacc_sql.cpp" +#line 1903 "yacc_sql.cpp" break; case 36: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 335 "yacc_sql.y" +#line 336 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -3491,19 +3508,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); } } -#line 1925 "yacc_sql.cpp" +#line 1928 "yacc_sql.cpp" break; case 37: /* attr_def_list: %empty */ -#line 358 "yacc_sql.y" +#line 359 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1933 "yacc_sql.cpp" +#line 1936 "yacc_sql.cpp" break; case 38: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 362 "yacc_sql.y" +#line 363 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -3513,11 +3530,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1947 "yacc_sql.cpp" +#line 1950 "yacc_sql.cpp" break; case 39: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 375 "yacc_sql.y" +#line 376 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -3529,11 +3546,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 1963 "yacc_sql.cpp" +#line 1966 "yacc_sql.cpp" break; case 40: /* attr_def: ID type nullable_constraint */ -#line 387 "yacc_sql.y" +#line 388 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -3546,6 +3563,8 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_info)->length = 4; } else if ((yyval.attr_info)->type == AttrType::CHARS) { (yyval.attr_info)->length = 4; + } else if ((yyval.attr_info)->type == AttrType::TEXTS) { + (yyval.attr_info)->length = 4096; } else { ASSERT(false, "$$->type is invalid."); } @@ -3555,75 +3574,83 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 1989 "yacc_sql.cpp" +#line 1994 "yacc_sql.cpp" break; case 41: /* nullable_constraint: NOT NULL_T */ -#line 412 "yacc_sql.y" +#line 415 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1997 "yacc_sql.cpp" +#line 2002 "yacc_sql.cpp" break; case 42: /* nullable_constraint: NULLABLE */ -#line 416 "yacc_sql.y" +#line 419 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 2005 "yacc_sql.cpp" +#line 2010 "yacc_sql.cpp" break; case 43: /* nullable_constraint: %empty */ -#line 420 "yacc_sql.y" +#line 423 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 2013 "yacc_sql.cpp" +#line 2018 "yacc_sql.cpp" break; case 44: /* number: NUMBER */ -#line 426 "yacc_sql.y" +#line 429 "yacc_sql.y" { (yyval.number) = (yyvsp[0].number); } -#line 2019 "yacc_sql.cpp" +#line 2024 "yacc_sql.cpp" break; case 45: /* type: INT_T */ -#line 429 "yacc_sql.y" +#line 433 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2025 "yacc_sql.cpp" +#line 2030 "yacc_sql.cpp" break; case 46: /* type: STRING_T */ -#line 430 "yacc_sql.y" +#line 434 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2031 "yacc_sql.cpp" +#line 2036 "yacc_sql.cpp" break; case 47: /* type: FLOAT_T */ -#line 431 "yacc_sql.y" +#line 435 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2037 "yacc_sql.cpp" +#line 2042 "yacc_sql.cpp" break; case 48: /* type: DATE_T */ -#line 432 "yacc_sql.y" +#line 436 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2043 "yacc_sql.cpp" +#line 2048 "yacc_sql.cpp" break; - case 49: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 49: /* type: TEXT_T */ #line 437 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::TEXTS); + } +#line 2054 "yacc_sql.cpp" + break; + + case 50: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 442 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -3633,102 +3660,102 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2057 "yacc_sql.cpp" +#line 2068 "yacc_sql.cpp" break; - case 50: /* values_list: LBRACE value_list RBRACE */ -#line 450 "yacc_sql.y" + case 51: /* values_list: LBRACE value_list RBRACE */ +#line 455 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2067 "yacc_sql.cpp" +#line 2078 "yacc_sql.cpp" break; - case 51: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 456 "yacc_sql.y" + case 52: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 461 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2076 "yacc_sql.cpp" +#line 2087 "yacc_sql.cpp" break; - case 52: /* value_list: value */ -#line 463 "yacc_sql.y" + case 53: /* value_list: value */ +#line 468 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2086 "yacc_sql.cpp" +#line 2097 "yacc_sql.cpp" break; - case 53: /* value_list: value_list COMMA value */ -#line 469 "yacc_sql.y" + case 54: /* value_list: value_list COMMA value */ +#line 474 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2095 "yacc_sql.cpp" +#line 2106 "yacc_sql.cpp" break; - case 54: /* value: NUMBER */ -#line 476 "yacc_sql.y" + case 55: /* value: NUMBER */ +#line 481 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2104 "yacc_sql.cpp" +#line 2115 "yacc_sql.cpp" break; - case 55: /* value: FLOAT */ -#line 480 "yacc_sql.y" + case 56: /* value: FLOAT */ +#line 485 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2113 "yacc_sql.cpp" +#line 2124 "yacc_sql.cpp" break; - case 56: /* value: SSS */ -#line 484 "yacc_sql.y" + case 57: /* value: SSS */ +#line 489 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2124 "yacc_sql.cpp" +#line 2135 "yacc_sql.cpp" break; - case 57: /* value: NULL_T */ -#line 490 "yacc_sql.y" + case 58: /* value: NULL_T */ +#line 495 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2132 "yacc_sql.cpp" +#line 2143 "yacc_sql.cpp" break; - case 58: /* storage_format: %empty */ -#line 497 "yacc_sql.y" + case 59: /* storage_format: %empty */ +#line 502 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2140 "yacc_sql.cpp" +#line 2151 "yacc_sql.cpp" break; - case 59: /* storage_format: STORAGE FORMAT EQ ID */ -#line 501 "yacc_sql.y" + case 60: /* storage_format: STORAGE FORMAT EQ ID */ +#line 506 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2148 "yacc_sql.cpp" +#line 2159 "yacc_sql.cpp" break; - case 60: /* delete_stmt: DELETE FROM ID where */ -#line 508 "yacc_sql.y" + case 61: /* delete_stmt: DELETE FROM ID where */ +#line 513 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -3738,11 +3765,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2162 "yacc_sql.cpp" +#line 2173 "yacc_sql.cpp" break; - case 61: /* update_stmt: UPDATE ID SET setClauses where */ -#line 521 "yacc_sql.y" + case 62: /* update_stmt: UPDATE ID SET setClauses where */ +#line 526 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -3754,41 +3781,41 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2178 "yacc_sql.cpp" +#line 2189 "yacc_sql.cpp" break; - case 62: /* setClauses: setClause */ -#line 536 "yacc_sql.y" + case 63: /* setClauses: setClause */ +#line 541 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2188 "yacc_sql.cpp" +#line 2199 "yacc_sql.cpp" break; - case 63: /* setClauses: setClauses COMMA setClause */ -#line 542 "yacc_sql.y" + case 64: /* setClauses: setClauses COMMA setClause */ +#line 547 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2197 "yacc_sql.cpp" +#line 2208 "yacc_sql.cpp" break; - case 64: /* setClause: ID EQ value */ -#line 550 "yacc_sql.y" + case 65: /* setClause: ID EQ value */ +#line 555 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } -#line 2208 "yacc_sql.cpp" +#line 2219 "yacc_sql.cpp" break; - case 65: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 560 "yacc_sql.y" + case 66: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 565 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -3811,11 +3838,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2235 "yacc_sql.cpp" +#line 2246 "yacc_sql.cpp" break; - case 66: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 583 "yacc_sql.y" + case 67: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 588 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -3848,21 +3875,21 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2272 "yacc_sql.cpp" +#line 2283 "yacc_sql.cpp" break; - case 67: /* calc_stmt: CALC expression_list */ -#line 619 "yacc_sql.y" + case 68: /* calc_stmt: CALC expression_list */ +#line 624 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2282 "yacc_sql.cpp" +#line 2293 "yacc_sql.cpp" break; - case 68: /* expression_list: expression alias */ -#line 628 "yacc_sql.y" + case 69: /* expression_list: expression alias */ +#line 633 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -3871,11 +3898,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2295 "yacc_sql.cpp" +#line 2306 "yacc_sql.cpp" break; - case 69: /* expression_list: expression alias COMMA expression_list */ -#line 637 "yacc_sql.y" + case 70: /* expression_list: expression alias COMMA expression_list */ +#line 642 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -3888,126 +3915,126 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2312 "yacc_sql.cpp" +#line 2323 "yacc_sql.cpp" break; - case 70: /* expression: expression '+' expression */ -#line 651 "yacc_sql.y" + case 71: /* expression: expression '+' expression */ +#line 656 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2320 "yacc_sql.cpp" +#line 2331 "yacc_sql.cpp" break; - case 71: /* expression: expression '-' expression */ -#line 654 "yacc_sql.y" + case 72: /* expression: expression '-' expression */ +#line 659 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2328 "yacc_sql.cpp" +#line 2339 "yacc_sql.cpp" break; - case 72: /* expression: expression '*' expression */ -#line 657 "yacc_sql.y" + case 73: /* expression: expression '*' expression */ +#line 662 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2336 "yacc_sql.cpp" +#line 2347 "yacc_sql.cpp" break; - case 73: /* expression: expression '/' expression */ -#line 660 "yacc_sql.y" + case 74: /* expression: expression '/' expression */ +#line 665 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2344 "yacc_sql.cpp" +#line 2355 "yacc_sql.cpp" break; - case 74: /* expression: LBRACE expression RBRACE */ -#line 663 "yacc_sql.y" + case 75: /* expression: LBRACE expression RBRACE */ +#line 668 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2353 "yacc_sql.cpp" +#line 2364 "yacc_sql.cpp" break; - case 75: /* expression: '-' expression */ -#line 667 "yacc_sql.y" + case 76: /* expression: '-' expression */ +#line 672 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2361 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; - case 76: /* expression: value */ -#line 670 "yacc_sql.y" + case 77: /* expression: value */ +#line 675 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2371 "yacc_sql.cpp" +#line 2382 "yacc_sql.cpp" break; - case 77: /* expression: rel_attr */ -#line 675 "yacc_sql.y" + case 78: /* expression: rel_attr */ +#line 680 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2382 "yacc_sql.cpp" +#line 2393 "yacc_sql.cpp" break; - case 78: /* expression: '*' */ -#line 681 "yacc_sql.y" + case 79: /* expression: '*' */ +#line 686 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2390 "yacc_sql.cpp" +#line 2401 "yacc_sql.cpp" break; - case 79: /* expression: aggr_func_expr */ -#line 684 "yacc_sql.y" + case 80: /* expression: aggr_func_expr */ +#line 689 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2398 "yacc_sql.cpp" +#line 2409 "yacc_sql.cpp" break; - case 80: /* alias: %empty */ -#line 691 "yacc_sql.y" + case 81: /* alias: %empty */ +#line 696 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2406 "yacc_sql.cpp" +#line 2417 "yacc_sql.cpp" break; - case 81: /* alias: ID */ -#line 694 "yacc_sql.y" + case 82: /* alias: ID */ +#line 699 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2414 "yacc_sql.cpp" +#line 2425 "yacc_sql.cpp" break; - case 82: /* alias: AS ID */ -#line 697 "yacc_sql.y" + case 83: /* alias: AS ID */ +#line 702 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2422 "yacc_sql.cpp" +#line 2433 "yacc_sql.cpp" break; - case 83: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 703 "yacc_sql.y" + case 84: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 708 "yacc_sql.y" { if ((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); @@ -4015,29 +4042,29 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2434 "yacc_sql.cpp" +#line 2445 "yacc_sql.cpp" break; - case 84: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 711 "yacc_sql.y" + case 85: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 716 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); } -#line 2442 "yacc_sql.cpp" +#line 2453 "yacc_sql.cpp" break; - case 85: /* rel_attr: ID */ -#line 716 "yacc_sql.y" + case 86: /* rel_attr: ID */ +#line 721 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2452 "yacc_sql.cpp" +#line 2463 "yacc_sql.cpp" break; - case 86: /* rel_attr: ID DOT ID */ -#line 721 "yacc_sql.y" + case 87: /* rel_attr: ID DOT ID */ +#line 726 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -4045,19 +4072,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2464 "yacc_sql.cpp" +#line 2475 "yacc_sql.cpp" break; - case 87: /* relation: ID */ -#line 731 "yacc_sql.y" + case 88: /* relation: ID */ +#line 736 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2472 "yacc_sql.cpp" +#line 2483 "yacc_sql.cpp" break; - case 88: /* rel_list: relation alias */ -#line 737 "yacc_sql.y" + case 89: /* rel_list: relation alias */ +#line 742 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if (nullptr != (yyvsp[0].string)) { @@ -4068,11 +4095,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2487 "yacc_sql.cpp" +#line 2498 "yacc_sql.cpp" break; - case 89: /* rel_list: relation alias COMMA rel_list */ -#line 747 "yacc_sql.y" + case 90: /* rel_list: relation alias COMMA rel_list */ +#line 752 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -4089,11 +4116,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); } -#line 2507 "yacc_sql.cpp" +#line 2518 "yacc_sql.cpp" break; - case 90: /* joinClause: relation ON condition_list */ -#line 766 "yacc_sql.y" + case 91: /* joinClause: relation ON condition_list */ +#line 771 "yacc_sql.y" { (yyval.join_clause) = new JoinSqlNode; (yyval.join_clause)->relation = (yyvsp[-2].string); @@ -4101,75 +4128,75 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].condition_list); } -#line 2519 "yacc_sql.cpp" +#line 2530 "yacc_sql.cpp" break; - case 91: /* joinClauses: joinClause */ -#line 777 "yacc_sql.y" + case 92: /* joinClauses: joinClause */ +#line 782 "yacc_sql.y" { (yyval.join_clauses) = new std::vector; (yyval.join_clauses)->emplace_back(*(yyvsp[0].join_clause)); delete (yyvsp[0].join_clause); } -#line 2529 "yacc_sql.cpp" +#line 2540 "yacc_sql.cpp" break; - case 92: /* joinClauses: joinClause INNER JOIN joinClauses */ -#line 783 "yacc_sql.y" + case 93: /* joinClauses: joinClause INNER JOIN joinClauses */ +#line 788 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->emplace_back(*(yyvsp[-3].join_clause)); delete (yyvsp[-3].join_clause); } -#line 2539 "yacc_sql.cpp" +#line 2550 "yacc_sql.cpp" break; - case 93: /* where: %empty */ -#line 792 "yacc_sql.y" + case 94: /* where: %empty */ +#line 797 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2547 "yacc_sql.cpp" +#line 2558 "yacc_sql.cpp" break; - case 94: /* where: WHERE condition_list */ -#line 795 "yacc_sql.y" + case 95: /* where: WHERE condition_list */ +#line 800 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2555 "yacc_sql.cpp" +#line 2566 "yacc_sql.cpp" break; - case 95: /* condition_list: %empty */ -#line 801 "yacc_sql.y" + case 96: /* condition_list: %empty */ +#line 806 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2563 "yacc_sql.cpp" +#line 2574 "yacc_sql.cpp" break; - case 96: /* condition_list: condition */ -#line 804 "yacc_sql.y" + case 97: /* condition_list: condition */ +#line 809 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2573 "yacc_sql.cpp" +#line 2584 "yacc_sql.cpp" break; - case 97: /* condition_list: condition AND condition_list */ -#line 809 "yacc_sql.y" + case 98: /* condition_list: condition AND condition_list */ +#line 814 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2583 "yacc_sql.cpp" +#line 2594 "yacc_sql.cpp" break; - case 98: /* condition: rel_attr comp_op value */ -#line 817 "yacc_sql.y" + case 99: /* condition: rel_attr comp_op value */ +#line 822 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -4181,11 +4208,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2599 "yacc_sql.cpp" +#line 2610 "yacc_sql.cpp" break; - case 99: /* condition: value comp_op value */ -#line 829 "yacc_sql.y" + case 100: /* condition: value comp_op value */ +#line 834 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -4197,11 +4224,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2615 "yacc_sql.cpp" +#line 2626 "yacc_sql.cpp" break; - case 100: /* condition: rel_attr comp_op rel_attr */ -#line 841 "yacc_sql.y" + case 101: /* condition: rel_attr comp_op rel_attr */ +#line 846 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -4213,11 +4240,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2631 "yacc_sql.cpp" +#line 2642 "yacc_sql.cpp" break; - case 101: /* condition: value comp_op rel_attr */ -#line 853 "yacc_sql.y" + case 102: /* condition: value comp_op rel_attr */ +#line 858 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -4229,99 +4256,99 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2647 "yacc_sql.cpp" +#line 2658 "yacc_sql.cpp" break; - case 102: /* comp_op: EQ */ -#line 867 "yacc_sql.y" + case 103: /* comp_op: EQ */ +#line 872 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2653 "yacc_sql.cpp" +#line 2664 "yacc_sql.cpp" break; - case 103: /* comp_op: LT */ -#line 868 "yacc_sql.y" + case 104: /* comp_op: LT */ +#line 873 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2659 "yacc_sql.cpp" +#line 2670 "yacc_sql.cpp" break; - case 104: /* comp_op: GT */ -#line 869 "yacc_sql.y" + case 105: /* comp_op: GT */ +#line 874 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2665 "yacc_sql.cpp" +#line 2676 "yacc_sql.cpp" break; - case 105: /* comp_op: LE */ -#line 870 "yacc_sql.y" + case 106: /* comp_op: LE */ +#line 875 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2671 "yacc_sql.cpp" +#line 2682 "yacc_sql.cpp" break; - case 106: /* comp_op: GE */ -#line 871 "yacc_sql.y" + case 107: /* comp_op: GE */ +#line 876 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2677 "yacc_sql.cpp" +#line 2688 "yacc_sql.cpp" break; - case 107: /* comp_op: NE */ -#line 872 "yacc_sql.y" + case 108: /* comp_op: NE */ +#line 877 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2683 "yacc_sql.cpp" +#line 2694 "yacc_sql.cpp" break; - case 108: /* comp_op: IS */ -#line 873 "yacc_sql.y" + case 109: /* comp_op: IS */ +#line 878 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2689 "yacc_sql.cpp" +#line 2700 "yacc_sql.cpp" break; - case 109: /* comp_op: IS NOT */ -#line 874 "yacc_sql.y" + case 110: /* comp_op: IS NOT */ +#line 879 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2695 "yacc_sql.cpp" +#line 2706 "yacc_sql.cpp" break; - case 110: /* comp_op: LIKE */ -#line 875 "yacc_sql.y" + case 111: /* comp_op: LIKE */ +#line 880 "yacc_sql.y" { (yyval.comp) = LIKE_OP; } -#line 2701 "yacc_sql.cpp" +#line 2712 "yacc_sql.cpp" break; - case 111: /* comp_op: NOT LIKE */ -#line 876 "yacc_sql.y" + case 112: /* comp_op: NOT LIKE */ +#line 881 "yacc_sql.y" { (yyval.comp) = NOT_LIKE_OP; } -#line 2707 "yacc_sql.cpp" +#line 2718 "yacc_sql.cpp" break; - case 112: /* group_by: %empty */ -#line 882 "yacc_sql.y" + case 113: /* group_by: %empty */ +#line 887 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2715 "yacc_sql.cpp" +#line 2726 "yacc_sql.cpp" break; - case 113: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 888 "yacc_sql.y" + case 114: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 893 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -4331,20 +4358,20 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); free(tmp_file_name); } -#line 2729 "yacc_sql.cpp" +#line 2740 "yacc_sql.cpp" break; - case 114: /* explain_stmt: EXPLAIN command_wrapper */ -#line 901 "yacc_sql.y" + case 115: /* explain_stmt: EXPLAIN command_wrapper */ +#line 906 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2738 "yacc_sql.cpp" +#line 2749 "yacc_sql.cpp" break; - case 115: /* set_variable_stmt: SET ID EQ value */ -#line 909 "yacc_sql.y" + case 116: /* set_variable_stmt: SET ID EQ value */ +#line 914 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -4352,10 +4379,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2750 "yacc_sql.cpp" +#line 2761 "yacc_sql.cpp" break; -#line 2754 "yacc_sql.cpp" +#line 2765 "yacc_sql.cpp" default: break; } @@ -4554,7 +4581,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) return yyresult; } -#line 921 "yacc_sql.y" +#line 926 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 90ee2baf..b541dbc1 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -81,40 +81,41 @@ enum yytokentype STRING_T = 282, /* STRING_T */ FLOAT_T = 283, /* FLOAT_T */ DATE_T = 284, /* DATE_T */ - NOT = 285, /* NOT */ - NULL_T = 286, /* NULL_T */ - NULLABLE = 287, /* NULLABLE */ - HELP = 288, /* HELP */ - EXIT = 289, /* EXIT */ - DOT = 290, /* DOT */ - INTO = 291, /* INTO */ - VALUES = 292, /* VALUES */ - FROM = 293, /* FROM */ - WHERE = 294, /* WHERE */ - AND = 295, /* AND */ - SET = 296, /* SET */ - ON = 297, /* ON */ - LOAD = 298, /* LOAD */ - DATA = 299, /* DATA */ - INFILE = 300, /* INFILE */ - EXPLAIN = 301, /* EXPLAIN */ - STORAGE = 302, /* STORAGE */ - FORMAT = 303, /* FORMAT */ - INNER = 304, /* INNER */ - JOIN = 305, /* JOIN */ - EQ = 306, /* EQ */ - LT = 307, /* LT */ - GT = 308, /* GT */ - LE = 309, /* LE */ - GE = 310, /* GE */ - NE = 311, /* NE */ - LIKE = 312, /* LIKE */ - IS = 313, /* IS */ - NUMBER = 314, /* NUMBER */ - FLOAT = 315, /* FLOAT */ - ID = 316, /* ID */ - SSS = 317, /* SSS */ - UMINUS = 318 /* UMINUS */ + TEXT_T = 285, /* TEXT_T */ + NOT = 286, /* NOT */ + NULL_T = 287, /* NULL_T */ + NULLABLE = 288, /* NULLABLE */ + HELP = 289, /* HELP */ + EXIT = 290, /* EXIT */ + DOT = 291, /* DOT */ + INTO = 292, /* INTO */ + VALUES = 293, /* VALUES */ + FROM = 294, /* FROM */ + WHERE = 295, /* WHERE */ + AND = 296, /* AND */ + SET = 297, /* SET */ + ON = 298, /* ON */ + LOAD = 299, /* LOAD */ + DATA = 300, /* DATA */ + INFILE = 301, /* INFILE */ + EXPLAIN = 302, /* EXPLAIN */ + STORAGE = 303, /* STORAGE */ + FORMAT = 304, /* FORMAT */ + INNER = 305, /* INNER */ + JOIN = 306, /* JOIN */ + EQ = 307, /* EQ */ + LT = 308, /* LT */ + GT = 309, /* GT */ + LE = 310, /* LE */ + GE = 311, /* GE */ + NE = 312, /* NE */ + LIKE = 313, /* LIKE */ + IS = 314, /* IS */ + NUMBER = 315, /* NUMBER */ + FLOAT = 316, /* FLOAT */ + ID = 317, /* ID */ + SSS = 318, /* SSS */ + UMINUS = 319 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -123,7 +124,7 @@ typedef enum yytokentype yytoken_kind_t; #if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 125 "yacc_sql.y" +#line 126 "yacc_sql.y" ParsedSqlNode *sql_node; ConditionSqlNode *condition; @@ -148,7 +149,7 @@ union YYSTYPE float floats; bool nullable_info; -#line 152 "yacc_sql.hpp" +#line 153 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; #define YYSTYPE_IS_TRIVIAL 1 diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 7b025a20..6e638ee9 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -91,6 +91,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, STRING_T FLOAT_T DATE_T + TEXT_T NOT NULL_T NULLABLE @@ -396,6 +397,8 @@ attr_def: $$->length = 4; } else if ($$->type == AttrType::CHARS) { $$->length = 4; + } else if ($$->type == AttrType::TEXTS) { + $$->length = 4096; } else { ASSERT(false, "$$->type is invalid."); } @@ -425,11 +428,13 @@ nullable_constraint: number: NUMBER {$$ = $1;} ; + type: - INT_T { $$ = static_cast(AttrType::INTS); } - | STRING_T { $$ = static_cast(AttrType::CHARS); } + INT_T { $$ = static_cast(AttrType::INTS); } + | STRING_T { $$ = static_cast(AttrType::CHARS); } | FLOAT_T { $$ = static_cast(AttrType::FLOATS); } | DATE_T { $$ = static_cast(AttrType::DATES); } + | TEXT_T { $$ = static_cast(AttrType::TEXTS); } ; insert_stmt: /*insert 语句的语法解析树*/ diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 76a634fa..3f859ced 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -344,11 +344,12 @@ RC Table::set_value_to_record(char *record_data, const Value &value, const Field { size_t copy_len = field->len(); const size_t data_len = value.length(); - if (field->type() == AttrType::CHARS) { + if (field->type() == AttrType::CHARS || field->type() == AttrType::TEXTS) { if (copy_len > data_len) { copy_len = data_len + 1; } } + // text 类型的话最多存 4096 字节,剩下截断了 memcpy(record_data + field->offset(), value.data(), copy_len); return RC::SUCCESS; } From 823a91f7cc5454ee58279f2ddee9eda49da80fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Mon, 30 Sep 2024 16:38:00 +0000 Subject: [PATCH 070/308] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E8=B7=91?= =?UTF-8?q?=E9=80=9Asubquery?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 3 +- deps/common/log/log.h | 27 +- src/observer/common/rc.h | 1 + src/observer/sql/expr/expression.cpp | 228 +++- src/observer/sql/expr/expression.h | 228 +++- .../sql/optimizer/logical_plan_generator.cpp | 79 +- .../sql/optimizer/logical_plan_generator.h | 20 +- .../sql/optimizer/physical_plan_generator.cpp | 13 + .../sql/optimizer/physical_plan_generator.h | 34 +- src/observer/sql/parser/expression_binder.cpp | 60 +- src/observer/sql/parser/expression_binder.h | 21 +- src/observer/sql/parser/lex_sql.cpp | 463 ++++---- src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/lex_sql.l | 1 + src/observer/sql/parser/parse_defs.h | 14 +- src/observer/sql/parser/yacc_sql.cpp | 1050 ++++++++--------- src/observer/sql/parser/yacc_sql.hpp | 119 +- src/observer/sql/parser/yacc_sql.y | 113 +- src/observer/sql/stmt/delete_stmt.cpp | 5 +- src/observer/sql/stmt/delete_stmt.h | 2 +- src/observer/sql/stmt/filter_stmt.cpp | 117 +- src/observer/sql/stmt/filter_stmt.h | 59 +- src/observer/sql/stmt/select_stmt.cpp | 13 +- src/observer/sql/stmt/select_stmt.h | 3 +- src/observer/sql/stmt/update_stmt.cpp | 5 +- src/observer/sql/stmt/update_stmt.h | 2 +- 26 files changed, 1432 insertions(+), 1250 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0ee6546..eefb19a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,10 +6,9 @@ project(minidb) MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR}) -SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) +#SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -#SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) diff --git a/deps/common/log/log.h b/deps/common/log/log.h index f51b798c..7f1cd868 100644 --- a/deps/common/log/log.h +++ b/deps/common/log/log.h @@ -58,8 +58,8 @@ typedef enum class Log { public: - Log(const string &log_name, const LOG_LEVEL log_level = LOG_LEVEL_INFO, - const LOG_LEVEL console_level = LOG_LEVEL_WARN); + Log(const string &log_name, const LOG_LEVEL log_level = LOG_LEVEL_INFO, + const LOG_LEVEL console_level = LOG_LEVEL_WARN); ~Log(void); static int init(const string &log_file); @@ -162,7 +162,7 @@ class Log class LoggerFactory { public: - LoggerFactory(); + LoggerFactory(); virtual ~LoggerFactory(); static int init(const string &log_file, Log **logger, LOG_LEVEL log_level = LOG_LEVEL_INFO, @@ -228,7 +228,12 @@ extern Log *g_log; #define LOG_DEFAULT(fmt, ...) LOG_OUTPUT(common::g_log->get_log_level(), fmt, ##__VA_ARGS__) #define LOG_PANIC(fmt, ...) LOG_OUTPUT(common::LOG_LEVEL_PANIC, fmt, ##__VA_ARGS__) #define LOG_ERROR(fmt, ...) LOG_OUTPUT(common::LOG_LEVEL_ERR, fmt, ##__VA_ARGS__) -#define LOG_WARN(fmt, ...) LOG_OUTPUT(common::LOG_LEVEL_WARN, fmt, ##__VA_ARGS__) +#define LOG_WARN(fmt, ...) \ + do { \ + assert((fmt != nullptr) && "LOG_WARN: format string must not be null"); \ + LOG_OUTPUT(common::LOG_LEVEL_WARN, fmt, ##__VA_ARGS__); \ + } while (0) + #define LOG_INFO(fmt, ...) LOG_OUTPUT(common::LOG_LEVEL_INFO, fmt, ##__VA_ARGS__) #define LOG_DEBUG(fmt, ...) LOG_OUTPUT(common::LOG_LEVEL_DEBUG, fmt, ##__VA_ARGS__) #define LOG_TRACE(fmt, ...) LOG_OUTPUT(common::LOG_LEVEL_TRACE, fmt, ##__VA_ARGS__) @@ -315,12 +320,12 @@ int Log::out(const LOG_LEVEL console_level, const LOG_LEVEL log_level, T &msg) #ifndef ASSERT #ifdef DEBUG -#define ASSERT(expression, description, ...) \ - do { \ - if (!(expression)) { \ - LOG_PANIC(description, ##__VA_ARGS__); \ - assert(expression); \ - } \ +#define ASSERT(expression, description, ...) \ + do { \ + if (!(expression)) { \ + LOG_PANIC(description, ## __VA_ARGS__); \ + assert(expression); \ + } \ } while (0) #else // DEBUG @@ -334,7 +339,7 @@ int Log::out(const LOG_LEVEL console_level, const LOG_LEVEL log_level, T &msg) #ifndef TRACE #ifdef DEBUG -#define TRACE(format, ...) LOG_TRACE(format, ##__VA_ARGS__) +#define TRACE(format, ...) LOG_TRACE(format, ## __VA_ARGS__) #else // DEBUG #define TRACE(...) #endif // DEBUG diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index fb4aba07..31c5a20e 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -78,6 +78,7 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(LOG_ENTRY_INVALID) \ DEFINE_RC(UNSUPPORTED) \ DEFINE_RC(VALUE_TOO_LONG) \ + DEFINE_RC(TO_LONG_SUBQUERY_EXPR) \ DEFINE_RC(NOT_NULLABLE_VALUE) \ DEFINE_RC(NOT_NULL_AFTER_IS) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 1d0b7f73..fa4f44fb 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -16,9 +16,16 @@ See the Mulan PSL v2 for more details. */ #include "sql/expr/tuple.h" #include "sql/expr/arithmetic_operator.hpp" +#include "sql/stmt/select_stmt.h" +#include "sql/operator/logical_operator.h" +#include "sql/operator/physical_operator.h" +#include "sql/optimizer/logical_plan_generator.h" +#include "sql/optimizer/physical_plan_generator.h" +#include "common/lang/defer.h" + using namespace std; -RC FieldExpr::get_value(const Tuple &tuple, Value &value) const +RC FieldExpr::get_value(const Tuple &tuple, Value &value) { return tuple.find_cell(TupleCellSpec(table_name(), field_name()), value); } @@ -59,7 +66,7 @@ bool ValueExpr::equal(const Expression &other) const return value_.compare(other_value_expr.get_value()) == 0; } -RC ValueExpr::get_value(const Tuple &tuple, Value &value) const +RC ValueExpr::get_value(const Tuple &tuple, Value &value) { value = value_; return RC::SUCCESS; @@ -88,10 +95,10 @@ RC CastExpr::cast(const Value &value, Value &cast_value) const return rc; } -RC CastExpr::get_value(const Tuple &tuple, Value &result) const +RC CastExpr::get_value(const Tuple &tuple, Value &result) { Value value; - RC rc = child_->get_value(tuple, value); + RC rc = child_->get_value(tuple, value); if (rc != RC::SUCCESS) { return rc; } @@ -102,7 +109,7 @@ RC CastExpr::get_value(const Tuple &tuple, Value &result) const RC CastExpr::try_get_value(Value &result) const { Value value; - RC rc = child_->try_get_value(value); + RC rc = child_->try_get_value(value); if (rc != RC::SUCCESS) { return rc; } @@ -112,11 +119,11 @@ RC CastExpr::try_get_value(Value &result) const //////////////////////////////////////////////////////////////////////////////// -ComparisonExpr::ComparisonExpr(CompOp comp, unique_ptr left, unique_ptr right) - : comp_(comp), left_(std::move(left)), right_(std::move(right)) +ComparisonExpr::ComparisonExpr(CompOp comp, Expression *left, Expression *right) + : comp_(comp), left_(std::unique_ptr(left)), right_(std::unique_ptr(right)) {} -ComparisonExpr::~ComparisonExpr() {} +ComparisonExpr::~ComparisonExpr() = default; RC ComparisonExpr::compare_value(const Value &left, const Value &right, bool &result) const { @@ -180,8 +187,8 @@ RC ComparisonExpr::compare_value(const Value &left, const Value &right, bool &re RC ComparisonExpr::try_get_value(Value &cell) const { if (left_->type() == ExprType::VALUE && right_->type() == ExprType::VALUE) { - ValueExpr * left_value_expr = static_cast(left_.get()); - ValueExpr * right_value_expr = static_cast(right_.get()); + ValueExpr *left_value_expr = static_cast(left_.get()); + ValueExpr *right_value_expr = static_cast(right_.get()); const Value &left_cell = left_value_expr->get_value(); const Value &right_cell = right_value_expr->get_value(); @@ -198,25 +205,86 @@ RC ComparisonExpr::try_get_value(Value &cell) const return RC::INVALID_ARGUMENT; } -RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) const +RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { Value left_value; Value right_value; - RC rc = left_->get_value(tuple, left_value); + SubQueryExpr *left_subquery_expr = nullptr; + if (left_->type() == ExprType::SUBQUERY) { + left_subquery_expr = dynamic_cast(left_.get()); + } + SubQueryExpr *right_subquery_expr = nullptr; + if (right_->type() == ExprType::SUBQUERY) { + right_subquery_expr = dynamic_cast(right_.get()); + } + + // 特殊处理 EXISTS 和 NOT EXISTS 操作 + if (comp_ == EXISTS_OP || comp_ == NOT_EXISTS_OP) { + RC rc = right_->get_value(tuple, right_value); + bool exists = (rc == RC::SUCCESS); + value.set_boolean(comp_ == EXISTS_OP ? exists : !exists); + return exists ? RC::SUCCESS : RC::RECORD_EOF; + } + + // 获取表达式的值,如果是子查询且没有结果,返回 NULL + auto get_expr_value = [&tuple](const std::unique_ptr &expr, Value &value) -> RC { + RC rc = expr->get_value(tuple, value); + if (expr->type() == ExprType::SUBQUERY && rc == RC::RECORD_EOF) { + value.set_null(true); + return RC::SUCCESS; + } + return rc; + }; + + // 获取左值 + RC rc = get_expr_value(left_, left_value); if (rc != RC::SUCCESS) { LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); return rc; } - rc = right_->get_value(tuple, right_value); + + if (left_subquery_expr && left_subquery_expr->has_more_row(tuple)) { + return RC::INVALID_ARGUMENT; + } + + // IN 和 NOT IN 操作 + if (comp_ == IN_OP || comp_ == NOT_IN_OP) { + if (left_value.is_null()) { + value.set_boolean(false); + return RC::SUCCESS; + } + + bool has_match = false; + bool has_null = false; + + while (RC::SUCCESS == (rc = right_->get_value(tuple, right_value))) { + if (right_value.is_null()) { + has_null = true; + } else if (left_value.compare(right_value) == 0) { + has_match = true; + } + } + + bool result = (comp_ == IN_OP) ? has_match : (!has_null && !has_match); + value.set_boolean(result); + return (rc == RC::RECORD_EOF) ? RC::SUCCESS : rc; + } + + // 获取右值 + rc = get_expr_value(right_, right_value); if (rc != RC::SUCCESS) { LOG_WARN("failed to get value of right expression. rc=%s", strrc(rc)); return rc; } - bool bool_value = false; + if (right_subquery_expr && right_subquery_expr->has_more_row(tuple)) { + return RC::INVALID_ARGUMENT; + } - rc = compare_value(left_value, right_value, bool_value); + // 比较左值和右值 + bool bool_value = false; + rc = compare_value(left_value, right_value, bool_value); if (rc == RC::SUCCESS) { value.set_boolean(bool_value); } @@ -278,8 +346,17 @@ RC ComparisonExpr::compare_column(const Column &left, const Column &right, std:: ConjunctionExpr::ConjunctionExpr(Type type, vector> &children) : conjunction_type_(type), children_(std::move(children)) {} +ConjunctionExpr::ConjunctionExpr(Type type, Expression *left, Expression *right) : conjunction_type_(type) +{ + children_.emplace_back(left); + children_.emplace_back(right); +} +ConjunctionExpr::ConjunctionExpr(Type type, std::unique_ptr children) : conjunction_type_(type) +{ + children_.push_back(std::move(children)); +} -RC ConjunctionExpr::get_value(const Tuple &tuple, Value &value) const +RC ConjunctionExpr::get_value(const Tuple &tuple, Value &value) { RC rc = RC::SUCCESS; if (children_.empty()) { @@ -445,7 +522,7 @@ RC ArithmeticExpr::execute_calc( return rc; } -RC ArithmeticExpr::get_value(const Tuple &tuple, Value &value) const +RC ArithmeticExpr::get_value(const Tuple &tuple, Value &value) { RC rc = RC::SUCCESS; @@ -606,10 +683,7 @@ unique_ptr AggregateExpr::create_aggregator() const return aggregator; } -RC AggregateExpr::get_value(const Tuple &tuple, Value &value) const -{ - return tuple.find_cell(TupleCellSpec(name()), value); -} +RC AggregateExpr::get_value(const Tuple &tuple, Value &value) { return tuple.find_cell(TupleCellSpec(name()), value); } RC AggregateExpr::type_from_string(const char *type_str, AggregateExpr::Type &type) { @@ -628,4 +702,116 @@ RC AggregateExpr::type_from_string(const char *type_str, AggregateExpr::Type &ty rc = RC::INVALID_ARGUMENT; } return rc; +} + +SubQueryExpr::SubQueryExpr(SelectSqlNode &select_node) : sql_node_(select_node) {} + +SubQueryExpr::~SubQueryExpr() = default; + +RC SubQueryExpr::generate_select_stmt(Db *db, const std::unordered_map &tables) +{ + // 仿照普通 select 的执行流程,tables 用来传递别名 + Stmt *stmt = nullptr; + RC rc = SelectStmt::create(db, sql_node_, stmt); + if (OB_FAIL(rc)) { + LOG_WARN("failed to create subquery select statement. return %s", strrc(rc)); + return rc; + } + + // 确保生成的 stmt 类型为 SELECT 类型 + if (stmt->type() != StmtType::SELECT) { + LOG_WARN("subquery stmt type is not SELECT."); + return RC::INVALID_ARGUMENT; + } + + // 动态转换为 SelectStmt 类型,并进行子查询列数校验 + auto *select_stmt = dynamic_cast(stmt); + if (select_stmt == nullptr) { + LOG_WARN("failed to cast subquery stmt to SelectStmt. "); + return RC::INVALID_ARGUMENT; + } + + // 子查询不能有超过一个列 + if (select_stmt->query_expressions_size() > 1) { + LOG_WARN("too many columns in subquery expression."); + return RC::TO_LONG_SUBQUERY_EXPR; + } + + // 将 select_stmt_ 指针设置为 select_stmt,使用 std::unique_ptr 来管理 + select_stmt_ = std::unique_ptr(select_stmt); + return RC::SUCCESS; +} + +RC SubQueryExpr::generate_logical_oper() +{ + RC rc = LogicalPlanGenerator::create(select_stmt_.get(), logical_oper_); + if (OB_FAIL(rc)) { + LOG_WARN("failed to generate logical operator for subquery. return %s", strrc(rc)); + return rc; + } + return RC::SUCCESS; +} + +RC SubQueryExpr::generate_physical_oper() +{ + RC rc = PhysicalPlanGenerator::create(*logical_oper_, physical_oper_); + if (OB_FAIL(rc)) { + LOG_WARN("failed to generate physical operator for subquery. return %s", strrc(rc)); + return rc; + } + return open(nullptr); +} + +// 子算子树的 open 和 close 逻辑由外部控制 +RC SubQueryExpr::open(Trx *trx) +{ + RC rc = RC::SUCCESS; + rc = physical_oper_->open(trx); + if (OB_FAIL(rc)) { + return rc; + } + + Value sub_query_value; + res_query.clear(); + while (RC::SUCCESS == physical_oper_->next()) { + physical_oper_->current_tuple()->cell_at(0, sub_query_value); + res_query.push_back(sub_query_value); + } + + res_query_avaliable = true; + visited_index = 0; + rc = physical_oper_->close(); + return rc; +} + +RC SubQueryExpr::close() +{ + visited_index = 0; + return RC::SUCCESS; +} + +bool SubQueryExpr::has_more_row(const Tuple &tuple) const { return visited_index + 1 < res_query.size(); } + +RC SubQueryExpr::get_value(const Tuple &tuple, Value &value) +{ + if (visited_index == res_query.size()) { + return RC::RECORD_EOF; + } + value=res_query[visited_index++]; + return RC::SUCCESS; +} + +RC SubQueryExpr::try_get_value(Value &value) const { return RC::UNIMPLEMENTED; } + +ExprType SubQueryExpr::type() const { return ExprType::SUBQUERY; +} + +AttrType SubQueryExpr::value_type() const +{ + return AttrType::UNDEFINED; +} + +std::unique_ptr SubQueryExpr::deep_copy() const +{ + return {}; } \ No newline at end of file diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index bc403db0..053e3fdc 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -77,7 +77,7 @@ class Expression /** * @brief 根据具体的tuple,来计算当前表达式的值。tuple有可能是一个具体某个表的行数据 */ - virtual RC get_value(const Tuple &tuple, Value &value) const = 0; + virtual RC get_value(const Tuple &tuple, Value &value) = 0; /** * @brief 在没有实际运行的情况下,也就是无法获取tuple的情况下,尝试获取表达式的值 @@ -125,6 +125,23 @@ class Expression */ virtual RC eval(Chunk &chunk, std::vector &select) { return RC::UNIMPLEMENTED; } + virtual void traverse(const std::function &func) + { + constexpr auto always_true = [](const Expression *) { return true; }; + this->traverse(func, always_true); + } + + // 带条件的 后序遍历 dfs + virtual void traverse(const std::function &func, const std::function &filter) + { + if (filter(this)) { + func(this); + } + } + + // 后序遍历 检查 + virtual RC traverse_check(const std::function &check_func) { return check_func(this); } + protected: /** * @brief 表达式在下层算子返回的 chunk 中的位置 @@ -142,13 +159,13 @@ class StarExpr : public Expression { public: StarExpr() : table_name_() {} - StarExpr(const char *table_name) : table_name_(table_name) {} - virtual ~StarExpr() = default; + explicit StarExpr(const char *table_name) : table_name_(table_name) {} + ~ StarExpr() override = default; ExprType type() const override { return ExprType::STAR; } AttrType value_type() const override { return AttrType::UNDEFINED; } - RC get_value(const Tuple &tuple, Value &value) const override { return RC::UNIMPLEMENTED; } // 不需要实现 + RC get_value(const Tuple &tuple, Value &value) override { return RC::UNIMPLEMENTED; } // 不需要实现 const char *table_name() const { return table_name_.c_str(); } @@ -163,12 +180,12 @@ class UnboundFieldExpr : public Expression : table_name_(table_name), field_name_(field_name) {} - virtual ~UnboundFieldExpr() = default; + ~UnboundFieldExpr() override = default; ExprType type() const override { return ExprType::UNBOUND_FIELD; } AttrType value_type() const override { return AttrType::UNDEFINED; } - RC get_value(const Tuple &tuple, Value &value) const override { return RC::INTERNAL; } + RC get_value(const Tuple &tuple, Value &value) override { return RC::INTERNAL; } const char *table_name() const { return table_name_.c_str(); } const char *field_name() const { return field_name_.c_str(); } @@ -185,9 +202,9 @@ class UnboundFieldExpr : public Expression class FieldExpr : public Expression { public: - FieldExpr() = default; - FieldExpr(const Table *table, const FieldMeta *field) : field_(table, field) {} - FieldExpr(const Field &field) : field_(field) {} + FieldExpr() = default; + FieldExpr(const Table *table, const FieldMeta *field) : field_(table, field) {} + explicit FieldExpr(const Field &field) : field_(field) {} virtual ~FieldExpr() = default; @@ -206,7 +223,7 @@ class FieldExpr : public Expression RC get_column(Chunk &chunk, Column &column) override; - RC get_value(const Tuple &tuple, Value &value) const override; + RC get_value(const Tuple &tuple, Value &value) override; private: Field field_; @@ -222,11 +239,11 @@ class ValueExpr : public Expression ValueExpr() = default; explicit ValueExpr(const Value &value) : value_(value) {} - virtual ~ValueExpr() = default; + ~ValueExpr() override = default; bool equal(const Expression &other) const override; - RC get_value(const Tuple &tuple, Value &value) const override; + RC get_value(const Tuple &tuple, Value &value) override; RC get_column(Chunk &chunk, Column &column) override; RC try_get_value(Value &value) const override { @@ -257,7 +274,7 @@ class CastExpr : public Expression ExprType type() const override { return ExprType::CAST; } - RC get_value(const Tuple &tuple, Value &value) const override; + RC get_value(const Tuple &tuple, Value &value) override; RC try_get_value(Value &value) const override; @@ -265,6 +282,24 @@ class CastExpr : public Expression std::unique_ptr &child() { return child_; } + void traverse(const std::function &func, const std::function &filter) override + { + if (filter(this)) { + child_->traverse(func, filter); + func(this); + } + } + + RC traverse_check(const std::function &check_func) override + { + if (RC rc = child_->traverse_check(check_func); RC::SUCCESS != rc) { + return rc; + } else if (rc = check_func(this); RC::SUCCESS != rc) { + return rc; + } + return RC::SUCCESS; + } + private: RC cast(const Value &value, Value &cast_value) const; @@ -280,11 +315,11 @@ class CastExpr : public Expression class ComparisonExpr : public Expression { public: - ComparisonExpr(CompOp comp, std::unique_ptr left, std::unique_ptr right); + ComparisonExpr(CompOp comp, Expression *left, Expression *right); virtual ~ComparisonExpr(); ExprType type() const override { return ExprType::COMPARISON; } - RC get_value(const Tuple &tuple, Value &value) const override; + RC get_value(const Tuple &tuple, Value &value) override; AttrType value_type() const override { return AttrType::BOOLEANS; } CompOp comp() const { return comp_; } @@ -312,6 +347,37 @@ class ComparisonExpr : public Expression template RC compare_column(const Column &left, const Column &right, std::vector &result) const; + bool has_rhs() const + { + // return right_; + // 虽然 IS_[NOT]_NULL 的情况下 rhs 是 null ValueExpr 但仍然提供这个接口 + return comp_ != OP_IS && comp_ != OP_IS_NOT; + } + + void traverse(const std::function &func, const std::function &filter) override + { + if (filter(this)) { + left_->traverse(func, filter); + if (has_rhs()) { + right_->traverse(func, filter); + } + func(this); + } + } + + RC traverse_check(const std::function &check_func) override + { + RC rc = RC::SUCCESS; + if (RC::SUCCESS != (rc = left_->traverse_check(check_func))) { + return rc; + } else if (has_rhs() && RC::SUCCESS != (rc = right_->traverse_check(check_func))) { + return rc; + } else if (RC::SUCCESS != (rc = check_func(this))) { + return rc; + } + return RC::SUCCESS; + } + private: CompOp comp_; std::unique_ptr left_; @@ -334,17 +400,43 @@ class ConjunctionExpr : public Expression }; public: - ConjunctionExpr(Type type, std::vector> &children); - virtual ~ConjunctionExpr() = default; + ConjunctionExpr(Type type, std::vector> &children); + ConjunctionExpr(Type type, std::unique_ptr children); + ConjunctionExpr(Type type, Expression *left, Expression *right); + ~ConjunctionExpr() override = default; ExprType type() const override { return ExprType::CONJUNCTION; } AttrType value_type() const override { return AttrType::BOOLEANS; } - RC get_value(const Tuple &tuple, Value &value) const override; + RC get_value(const Tuple &tuple, Value &value) override; Type conjunction_type() const { return conjunction_type_; } std::vector> &children() { return children_; } + void traverse(const std::function &func, const std::function &filter) override + { + if (filter(this)) { + for (auto &child : children_) { + child->traverse(func, filter); + } + func(this); + } + } + + RC traverse_check(const std::function &check_func) override + { + RC rc = RC::SUCCESS; + for (auto &child : children_) { + if (RC::SUCCESS != (rc = child->traverse_check(check_func))) { + return rc; + } + } + if (RC::SUCCESS != (rc = check_func(this))) { + return rc; + } + return RC::SUCCESS; + } + private: Type conjunction_type_; std::vector> children_; @@ -383,7 +475,7 @@ class ArithmeticExpr : public Expression return 4; // sizeof(float) or sizeof(int) }; - RC get_value(const Tuple &tuple, Value &value) const override; + RC get_value(const Tuple &tuple, Value &value) override; RC get_column(Chunk &chunk, Column &column) override; @@ -394,6 +486,36 @@ class ArithmeticExpr : public Expression std::unique_ptr &left() { return left_; } std::unique_ptr &right() { return right_; } + bool has_rhs() const + { + // return arithmetic_type_ != Type::NEGATIVE; // logical + return right_ != nullptr; // physical + } + + void traverse(const std::function &func, const std::function &filter) override + { + if (filter(this)) { + left_->traverse(func, filter); + if (has_rhs()) { + right_->traverse(func, filter); + } + func(this); + } + } + + RC traverse_check(const std::function &check_func) override + { + RC rc = RC::SUCCESS; + if (RC::SUCCESS != (rc = left_->traverse_check(check_func))) { + return rc; + } else if (has_rhs() && RC::SUCCESS != (rc = right_->traverse_check(check_func))) { + return rc; + } else if (RC::SUCCESS != (rc = check_func(this))) { + return rc; + } + return RC::SUCCESS; + } + private: RC calc_value(const Value &left_value, const Value &right_value, Value &value) const; @@ -421,7 +543,7 @@ class UnboundAggregateExpr : public Expression std::unique_ptr &child() { return child_; } - RC get_value(const Tuple &tuple, Value &value) const override { return RC::INTERNAL; } + RC get_value(const Tuple &tuple, Value &value) override { return RC::INTERNAL; } AttrType value_type() const override { return child_->value_type(); } private: @@ -442,8 +564,8 @@ class AggregateExpr : public Expression }; public: - AggregateExpr(Type type, Expression *child); - AggregateExpr(Type type, std::unique_ptr child); + AggregateExpr(Type type, Expression *child); + AggregateExpr(Type type, std::unique_ptr child); virtual ~AggregateExpr() = default; bool equal(const Expression &other) const override; @@ -453,7 +575,7 @@ class AggregateExpr : public Expression AttrType value_type() const override { return child_->value_type(); } int value_length() const override { return child_->value_length(); } - RC get_value(const Tuple &tuple, Value &value) const override; + RC get_value(const Tuple &tuple, Value &value) override; RC get_column(Chunk &chunk, Column &column) override; @@ -465,10 +587,70 @@ class AggregateExpr : public Expression std::unique_ptr create_aggregator() const; + // 聚集函数表达式的 traverse[_check] 需要特殊对待 param 可能是个 * + void traverse(const std::function &func, const std::function& filter) override + { + if (filter(this)) { + child_->traverse(func, filter); + func(this); + } + } + + RC traverse_check(const std::function& check_func) override + { + RC rc = RC::SUCCESS; + if (RC::SUCCESS != (rc = child_->traverse_check(check_func))) { + return rc; + } if (RC::SUCCESS != (rc = check_func(this))) { + return rc; + } + return rc; + } + public: static RC type_from_string(const char *type_str, Type &type); private: Type aggregate_type_; std::unique_ptr child_; +}; + +class SelectStmt; +class LogicalOperator; +class PhysicalOperator; +class SubQueryExpr : public Expression +{ +public: + explicit SubQueryExpr( SelectSqlNode &select_node); + virtual ~SubQueryExpr(); + + RC open(Trx* trx); + RC close(); + bool has_more_row(const Tuple &tuple) const; + + RC get_value(const Tuple &tuple, Value &value) override; + + RC try_get_value(Value &value) const override; + + ExprType type() const override; + + AttrType value_type() const override; + + std::unique_ptr deep_copy() const; + + RC generate_select_stmt(Db* db, const std::unordered_map &tables); + RC generate_logical_oper(); + RC generate_physical_oper(); + +private: + SelectSqlNode& sql_node_; + std::unique_ptr select_stmt_; + std::unique_ptr logical_oper_; + std::unique_ptr physical_oper_; + +private: + std::vector res_query; + bool res_query_avaliable=false; + size_t visited_index=0; + }; \ No newline at end of file diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 1aba8869..4803673c 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -158,72 +158,27 @@ RC LogicalPlanGenerator::create_plan(SelectStmt *select_stmt, unique_ptr &logical_operator) { - RC rc = RC::SUCCESS; - std::vector> cmp_exprs; - const std::vector &filter_units = filter_stmt->filter_units(); - for (const FilterUnit *filter_unit : filter_units) { - const FilterObj &filter_obj_left = filter_unit->left(); - const FilterObj &filter_obj_right = filter_unit->right(); - - unique_ptr left(filter_obj_left.is_attr - ? static_cast(new FieldExpr(filter_obj_left.field)) - : static_cast(new ValueExpr(filter_obj_left.value))); - - unique_ptr right(filter_obj_right.is_attr - ? static_cast(new FieldExpr(filter_obj_right.field)) - : static_cast(new ValueExpr(filter_obj_right.value))); - - if (filter_unit->comp() == CompOp::OP_IS || filter_unit->comp() == CompOp::OP_IS_NOT) { - } else if (left->value_type() == AttrType::NULLS) { - } else if (right->value_type() == AttrType::NULLS) { - } else if (left->value_type() != right->value_type()) { - auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); - auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); - if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { - ExprType left_type = left->type(); - auto cast_expr = make_unique(std::move(left), right->value_type()); - if (left_type == ExprType::VALUE) { - Value left_val; - if (OB_FAIL(rc = cast_expr->try_get_value(left_val))) { - LOG_WARN("failed to get value from left child", strrc(rc)); - return rc; - } - left = make_unique(left_val); - } else { - left = std::move(cast_expr); - } - } else if (right_to_left_cost < left_to_right_cost && right_to_left_cost != INT32_MAX) { - ExprType right_type = right->type(); - auto cast_expr = make_unique(std::move(right), left->value_type()); - if (right_type == ExprType::VALUE) { - Value right_val; - if (OB_FAIL(rc = cast_expr->try_get_value(right_val))) { - LOG_WARN("failed to get value from right child", strrc(rc)); - return rc; - } - right = make_unique(right_val); - } else { - right = std::move(cast_expr); - } - - } else { - rc = RC::UNSUPPORTED; - LOG_WARN("unsupported cast from %s to %s", attr_type_to_string(left->value_type()), attr_type_to_string(right->value_type())); - return rc; - } - } + RC rc = RC::SUCCESS; - ComparisonExpr *cmp_expr = new ComparisonExpr(filter_unit->comp(), std::move(left), std::move(right)); - cmp_exprs.emplace_back(cmp_expr); + if (filter_stmt == nullptr || filter_stmt->condition_empty()) { + return {}; } + std::unique_ptr &condition = filter_stmt->condition(); - unique_ptr predicate_oper; - if (!cmp_exprs.empty()) { - unique_ptr conjunction_expr(new ConjunctionExpr(ConjunctionExpr::Type::AND, cmp_exprs)); - predicate_oper = unique_ptr(new PredicateLogicalOperator(std::move(conjunction_expr))); + // 已经全部在yacc阶段就改成expr了,现在主要是处理子查询 + auto generate_subquery_logical_oper = [](Expression *expr) { + if (expr->type() == ExprType::SUBQUERY) { + SubQueryExpr *sub_query_expr = static_cast(expr); + return sub_query_expr->generate_logical_oper(); + } + return RC::SUCCESS; + }; + rc = filter_stmt->condition()->traverse_check(generate_subquery_logical_oper); + if (OB_FAIL(rc)) { + return rc; } - - logical_operator = std::move(predicate_oper); + unique_ptr conjunction_expr(new ConjunctionExpr(ConjunctionExpr::Type::AND, std::move(condition))); + logical_operator = std::make_unique(std::move(conjunction_expr)); return rc; } diff --git a/src/observer/sql/optimizer/logical_plan_generator.h b/src/observer/sql/optimizer/logical_plan_generator.h index 46e951ff..8a47bb2b 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.h +++ b/src/observer/sql/optimizer/logical_plan_generator.h @@ -35,18 +35,18 @@ class LogicalPlanGenerator LogicalPlanGenerator() = default; virtual ~LogicalPlanGenerator() = default; - RC create(Stmt *stmt, std::unique_ptr &logical_operator); + static RC create(Stmt *stmt, std::unique_ptr &logical_operator); private: - RC create_plan(CalcStmt *calc_stmt, std::unique_ptr &logical_operator); - RC create_plan(SelectStmt *select_stmt, std::unique_ptr &logical_operator); - RC create_plan(FilterStmt *filter_stmt, std::unique_ptr &logical_operator); - RC create_plan(InsertStmt *insert_stmt, std::unique_ptr &logical_operator); - RC create_plan(DeleteStmt *delete_stmt, std::unique_ptr &logical_operator); - RC create_plan(UpdateStmt *update_stmt, std::unique_ptr &logical_operator); - RC create_plan(ExplainStmt *explain_stmt, std::unique_ptr &logical_operator); + static RC create_plan(CalcStmt *calc_stmt, std::unique_ptr &logical_operator); + static RC create_plan(SelectStmt *select_stmt, std::unique_ptr &logical_operator); + static RC create_plan(FilterStmt *filter_stmt, std::unique_ptr &logical_operator); + static RC create_plan(InsertStmt *insert_stmt, std::unique_ptr &logical_operator); + static RC create_plan(DeleteStmt *delete_stmt, std::unique_ptr &logical_operator); + static RC create_plan(UpdateStmt *update_stmt, std::unique_ptr &logical_operator); + static RC create_plan(ExplainStmt *explain_stmt, std::unique_ptr &logical_operator); - RC create_group_by_plan(SelectStmt *select_stmt, std::unique_ptr &logical_operator); + static RC create_group_by_plan(SelectStmt *select_stmt, std::unique_ptr &logical_operator); - int implicit_cast_cost(AttrType from, AttrType to); + static int implicit_cast_cost(AttrType from, AttrType to); }; diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index cb1ddfdc..aee3cf4d 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -131,9 +131,22 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u // 看看是否有可以用于索引查找的表达式 Table *table = table_get_oper.table(); + auto process_subquery = [](Expression* expr) { + if (expr->type() == ExprType::SUBQUERY) { + SubQueryExpr* sub_query_expr = static_cast(expr); + sub_query_expr->generate_physical_oper(); + } + return RC::SUCCESS; + }; + Index *index = nullptr; ValueExpr *value_expr = nullptr; for (auto &expr : predicates) { + //先执行子查询 + if (RC rc = expr->traverse_check(process_subquery); RC::SUCCESS != rc) { + return rc; + } + if (expr->type() == ExprType::COMPARISON) { auto comparison_expr = static_cast(expr.get()); // 简单处理,就找等值查询 diff --git a/src/observer/sql/optimizer/physical_plan_generator.h b/src/observer/sql/optimizer/physical_plan_generator.h index e6cf6202..59c039e2 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.h +++ b/src/observer/sql/optimizer/physical_plan_generator.h @@ -38,25 +38,25 @@ class GroupByLogicalOperator; class PhysicalPlanGenerator { public: - PhysicalPlanGenerator() = default; + PhysicalPlanGenerator() = default; virtual ~PhysicalPlanGenerator() = default; - RC create(LogicalOperator &logical_operator, std::unique_ptr &oper); - RC create_vec(LogicalOperator &logical_operator, std::unique_ptr &oper); + static RC create(LogicalOperator &logical_operator, std::unique_ptr &oper); + static RC create_vec(LogicalOperator &logical_operator, std::unique_ptr &oper); private: - RC create_plan(TableGetLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_plan(PredicateLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_plan(ProjectLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_plan(InsertLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_plan(DeleteLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_plan(UpdateLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_plan(ExplainLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_plan(JoinLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_plan(CalcLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_plan(GroupByLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_vec_plan(ProjectLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_vec_plan(TableGetLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_vec_plan(GroupByLogicalOperator &logical_oper, std::unique_ptr &oper); - RC create_vec_plan(ExplainLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(TableGetLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(PredicateLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(ProjectLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(InsertLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(DeleteLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(UpdateLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(ExplainLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(JoinLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(CalcLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(GroupByLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_vec_plan(ProjectLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_vec_plan(TableGetLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_vec_plan(GroupByLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_vec_plan(ExplainLogicalOperator &logical_oper, std::unique_ptr &oper); }; diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 2be7582c..bd17677c 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -24,32 +24,33 @@ using namespace common; Table *BinderContext::find_table(const char *table_name) const { - auto pred = [table_name](Table *table) { return 0 == strcasecmp(table_name, table->name()); }; - auto iter = ranges::find_if(query_tables_, pred); - if (iter == query_tables_.end()) { + auto iter = this->tables_->find(table_name); + if (iter == tables_->end()) { return nullptr; } - return *iter; + return iter->second; } - -Table *BinderContext::from_alias_find_table(const char *alias_name) const +bool BinderContext::only_one_table() { - // 1、空字段肯定做不到 - if (is_blank(alias_name)) { - return nullptr; - } + { + if (query_tables_.empty()) { + return false; // 如果列表为空,返回false + } else if (query_tables_.size() == 1) { + return true; + } - // 2、通过别名查找表名 - auto alias_table = table_alias_map_.find(alias_name); // 查找别名 + // 获取第一个表指针作为基准 + Table *first_table = query_tables_[0]; - // 3、如果没有找到对应的别名,则返回 nullptr - if (alias_table == table_alias_map_.end()) { - return nullptr; - } + // 遍历整个向量,检查所有的表是否与第一个表相同 + for (size_t i = 1; i < query_tables_.size(); ++i) { + if (query_tables_[i] != first_table) { + return false; // 如果有不同的表,返回false + } + } - // 4、通过别名找到的表名,调用 find_table() 查找实际的 Table 对象 - const std::string &table_name = alias_table->second; // 获取别名对应的表名 - return find_table(table_name.c_str()); + return true; // 如果所有的表都是一样的,返回true + } } //////////////////////////////////////////////////////////////////////////////// @@ -112,6 +113,9 @@ RC ExpressionBinder::bind_expression(unique_ptr &expr, vector(expr->type())); return RC::INTERNAL; @@ -166,7 +170,7 @@ RC ExpressionBinder::bind_unbound_field_expression( Table *table = nullptr; if (is_blank(table_name)) { - if (context_.query_tables().size() != 1) { + if (!context_.only_one_table()) { LOG_INFO("cannot determine table for field: %s", field_name); return RC::SCHEMA_TABLE_NOT_EXIST; } @@ -175,11 +179,8 @@ RC ExpressionBinder::bind_unbound_field_expression( } else { table = context_.find_table(table_name); if (nullptr == table) { - table = context_.from_alias_find_table(table_name); - if (nullptr == table) { - LOG_INFO("no such table in from list: %s", table_name); - return RC::SCHEMA_TABLE_NOT_EXIST; - } + LOG_INFO("no such table in from list: %s", table_name); + return RC::SCHEMA_TABLE_NOT_EXIST; } } @@ -488,3 +489,12 @@ RC ExpressionBinder::bind_aggregate_expression( bound_expressions.emplace_back(std::move(aggregate_expr)); return RC::SUCCESS; } +RC ExpressionBinder::bind_subquery_expression( + std::unique_ptr &expr, std::vector> &bound_expressions) +{ + auto subquery_expr = dynamic_cast(expr.get()); + + subquery_expr->generate_select_stmt(context_.get_db(),context_.table_map()); + bound_expressions.emplace_back(std::move(expr)); + return RC::SUCCESS; +} diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index 0fabb2bd..e90d3a32 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -25,21 +25,23 @@ class BinderContext virtual ~BinderContext() = default; void add_table(Table *table) { query_tables_.push_back(table); } + void add_db(Db *db) { db_ = db; } - void add_table_alias_map(const std::unordered_map &table_alias_map) - { - table_alias_map_ = table_alias_map; - } + void set_tables(std::unordered_map *tables) { tables_ = tables; } + + Db *get_db() const { return db_; } Table *find_table(const char *table_name) const; - Table *from_alias_find_table(const char *alias_name) const; + const std::vector
&query_tables() const { return query_tables_; } + std::unordered_map &table_map() { return *tables_; } - const std::vector
&query_tables() const { return query_tables_; } + bool only_one_table (); private: - std::vector
query_tables_; - std::unordered_map table_alias_map_; // 修改为普通成员变量 + Db *db_; + std::vector
query_tables_; + std::unordered_map *tables_; }; /** @@ -73,7 +75,8 @@ class ExpressionBinder std::unique_ptr &arithmetic_expr, std::vector> &bound_expressions); RC bind_aggregate_expression( std::unique_ptr &aggregate_expr, std::vector> &bound_expressions); - + RC bind_subquery_expression( + std::unique_ptr &expr, std::vector> &bound_expressions); private: BinderContext &context_; }; \ No newline at end of file diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 6a0270c1..389f20bc 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -385,8 +385,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 70 -#define YY_END_OF_BUFFER 71 +#define YY_NUM_RULES 73 +#define YY_END_OF_BUFFER 74 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -394,31 +394,31 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[204] = +static const flex_int16_t yy_accept[207] = { 0, - 0, 0, 0, 0, 71, 69, 1, 2, 69, 69, - 69, 49, 50, 65, 63, 51, 64, 6, 66, 3, - 5, 56, 52, 58, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 70, 55, 0, 67, 0, 68, 3, - 0, 53, 54, 57, 62, 62, 62, 45, 62, 44, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 60, 62, 62, 62, 62, 15, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 4, 22, 46, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 32, 62, 62, 59, 62, 62, 62, 62, - 28, 62, 62, 62, 62, 62, 62, 62, 62, 19, - 33, 62, 62, 39, 35, 62, 9, 11, 7, 62, - 62, 62, 20, 62, 8, 62, 62, 62, 24, 61, - 38, 36, 62, 62, 62, 16, 62, 17, 62, 62, - 62, 62, 29, 62, 62, 62, 62, 34, 62, 42, - 14, 62, 62, 62, 43, 62, 62, 62, 12, 62, - 62, 21, 30, 10, 26, 62, 48, 40, 23, 62, - 62, 18, 62, 13, 27, 25, 41, 62, 62, 47, - - 37, 31, 0 + 0, 0, 0, 0, 74, 72, 1, 2, 72, 72, + 72, 52, 53, 68, 66, 54, 67, 6, 69, 3, + 5, 59, 55, 61, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 73, 58, 0, 70, 0, 71, 3, + 0, 56, 57, 60, 65, 65, 65, 46, 65, 45, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 48, 63, 65, 65, 65, 65, 15, + 23, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 4, 22, 47, 65, 65, 65, 65, 65, 65, 65, + + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 33, 65, 65, 62, 65, 65, 65, 65, + 29, 65, 65, 65, 65, 65, 65, 65, 65, 19, + 34, 65, 65, 40, 36, 65, 9, 11, 65, 7, + 65, 65, 65, 20, 65, 8, 65, 65, 65, 25, + 64, 39, 37, 65, 65, 65, 16, 65, 17, 65, + 65, 65, 65, 30, 65, 65, 65, 65, 65, 35, + 65, 43, 14, 65, 65, 65, 44, 65, 65, 65, + 12, 65, 65, 21, 31, 10, 27, 49, 65, 51, + 41, 24, 65, 65, 18, 65, 13, 28, 26, 42, + + 65, 65, 50, 38, 32, 0 } ; static const YY_CHAR yy_ec[256] = @@ -464,61 +464,63 @@ static const YY_CHAR yy_meta[67] = 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[209] = +static const flex_int16_t yy_base[212] = { 0, - 0, 0, 0, 0, 545, 546, 546, 546, 526, 538, - 536, 546, 546, 546, 546, 546, 526, 546, 546, 54, - 546, 52, 546, 522, 53, 57, 60, 59, 70, 91, - 61, 67, 77, 524, 74, 113, 106, 109, 129, 114, - 58, 134, 136, 546, 546, 533, 546, 531, 546, 86, - 521, 546, 546, 546, 0, 520, 117, 146, 131, 512, + 0, 0, 0, 0, 554, 555, 555, 555, 535, 547, + 545, 555, 555, 555, 555, 555, 535, 555, 555, 54, + 555, 52, 555, 531, 53, 57, 60, 59, 70, 91, + 61, 67, 77, 533, 74, 113, 106, 109, 129, 114, + 58, 134, 136, 555, 555, 535, 555, 533, 555, 86, + 523, 555, 555, 555, 0, 522, 117, 146, 131, 521, 140, 154, 144, 158, 164, 170, 126, 169, 171, 173, - 174, 176, 181, 211, 511, 185, 196, 203, 188, 510, + 174, 176, 181, 211, 520, 185, 196, 203, 188, 519, 199, 198, 224, 222, 229, 228, 202, 230, 235, 244, - 509, 508, 507, 239, 254, 258, 242, 255, 278, 266, - - 265, 273, 267, 281, 286, 288, 289, 280, 292, 300, - 295, 301, 298, 314, 318, 506, 303, 321, 322, 336, - 505, 325, 331, 337, 339, 341, 324, 343, 349, 503, - 502, 359, 353, 501, 499, 356, 497, 495, 494, 357, - 358, 360, 492, 363, 489, 366, 382, 373, 488, 487, - 486, 380, 384, 395, 400, 484, 403, 482, 410, 388, - 413, 414, 481, 392, 418, 420, 424, 478, 412, 468, - 464, 430, 426, 436, 454, 440, 433, 441, 448, 450, - 455, 397, 391, 377, 294, 444, 268, 250, 236, 457, - 460, 205, 465, 178, 123, 121, 115, 471, 475, 83, - - 73, 69, 546, 528, 530, 532, 76, 75 + 518, 516, 515, 239, 254, 258, 242, 255, 278, 266, + + 265, 273, 267, 281, 286, 288, 292, 280, 294, 301, + 306, 308, 303, 321, 318, 514, 323, 324, 331, 335, + 512, 325, 338, 329, 340, 348, 342, 346, 355, 510, + 509, 358, 352, 507, 506, 361, 505, 501, 363, 500, + 364, 365, 376, 499, 372, 497, 383, 378, 380, 496, + 495, 494, 397, 385, 408, 412, 492, 399, 476, 413, + 416, 418, 421, 472, 425, 423, 431, 420, 436, 470, + 434, 403, 400, 435, 437, 447, 391, 445, 452, 455, + 441, 458, 459, 387, 349, 300, 298, 295, 461, 268, + 250, 236, 469, 482, 205, 478, 178, 123, 121, 115, + + 484, 488, 83, 73, 69, 555, 541, 543, 545, 76, + 75 } ; -static const flex_int16_t yy_def[209] = +static const flex_int16_t yy_def[212] = { 0, - 203, 1, 204, 204, 203, 203, 203, 203, 203, 205, - 206, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 203, 203, 205, 203, 206, 203, 203, - 203, 203, 203, 203, 208, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 203, 207, 207, 207, 207, 207, 207, 207, 207, 207, - - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - - 207, 207, 0, 203, 203, 203, 203, 203 + 206, 1, 207, 207, 206, 206, 206, 206, 206, 208, + 209, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 206, 206, 208, 206, 209, 206, 206, + 206, 206, 206, 206, 211, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 206, 210, 210, 210, 210, 210, 210, 210, 210, 210, + + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + + 210, 210, 210, 210, 210, 0, 206, 206, 206, 206, + 206 } ; -static const flex_int16_t yy_nxt[613] = +static const flex_int16_t yy_nxt[622] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -553,44 +555,45 @@ static const flex_int16_t yy_nxt[613] = 55, 55, 55, 124, 121, 123, 137, 55, 127, 136, 129, 128, 55, 131, 55, 55, 132, 134, 133, 130, - 55, 135, 55, 55, 139, 141, 55, 138, 55, 55, - 137, 140, 55, 136, 55, 55, 131, 55, 144, 142, - 143, 134, 147, 146, 148, 135, 145, 139, 55, 141, - 138, 149, 55, 152, 140, 55, 55, 150, 55, 55, - 151, 144, 142, 143, 153, 55, 147, 146, 148, 145, - 55, 55, 154, 55, 149, 55, 152, 55, 158, 155, - 160, 150, 161, 55, 151, 156, 157, 55, 153, 159, - 55, 55, 55, 55, 55, 154, 167, 55, 162, 169, - 55, 163, 158, 155, 160, 161, 164, 55, 156, 157, - 165, 55, 159, 166, 55, 168, 55, 170, 55, 174, - - 167, 162, 55, 169, 163, 55, 55, 171, 173, 55, - 164, 55, 172, 165, 55, 176, 166, 55, 168, 175, - 170, 177, 178, 174, 55, 180, 55, 55, 55, 183, - 171, 173, 55, 179, 55, 172, 181, 182, 55, 176, - 55, 184, 175, 185, 55, 177, 178, 55, 180, 187, - 55, 186, 183, 188, 55, 55, 190, 179, 55, 191, - 181, 182, 55, 189, 55, 184, 193, 185, 55, 55, - 192, 55, 187, 195, 55, 186, 197, 188, 55, 55, - 190, 199, 55, 191, 194, 55, 189, 198, 200, 55, - 193, 196, 55, 192, 201, 55, 55, 195, 55, 197, - - 55, 55, 55, 55, 202, 199, 55, 194, 55, 55, - 198, 55, 200, 55, 196, 55, 55, 55, 201, 55, - 55, 55, 55, 91, 55, 55, 55, 202, 44, 44, - 46, 46, 48, 48, 55, 91, 49, 47, 55, 54, - 50, 49, 47, 45, 203, 5, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203 + 55, 135, 55, 139, 140, 142, 55, 138, 55, 55, + 137, 141, 55, 136, 55, 55, 131, 55, 145, 143, + 55, 134, 55, 144, 147, 135, 139, 140, 146, 142, + 138, 149, 55, 148, 141, 55, 150, 55, 55, 55, + 152, 145, 143, 55, 151, 55, 144, 154, 147, 55, + 159, 146, 55, 153, 55, 149, 55, 148, 156, 150, + 55, 155, 55, 55, 152, 157, 55, 161, 151, 55, + 160, 154, 55, 158, 159, 55, 153, 55, 55, 55, + 162, 163, 156, 169, 155, 165, 55, 164, 157, 166, + 55, 161, 55, 160, 55, 171, 158, 55, 167, 55, + + 168, 55, 170, 162, 163, 55, 172, 169, 174, 165, + 164, 55, 166, 55, 55, 175, 176, 55, 180, 171, + 177, 167, 55, 168, 173, 170, 55, 55, 178, 172, + 55, 174, 55, 179, 55, 55, 181, 55, 175, 55, + 176, 183, 180, 177, 184, 55, 186, 173, 55, 55, + 55, 55, 178, 182, 187, 55, 188, 179, 191, 55, + 181, 55, 185, 189, 194, 183, 55, 193, 184, 55, + 186, 190, 55, 55, 192, 55, 182, 197, 187, 188, + 196, 198, 191, 55, 55, 185, 55, 189, 194, 195, + 55, 193, 55, 200, 190, 199, 55, 192, 55, 201, + + 197, 203, 55, 202, 196, 198, 55, 204, 55, 55, + 55, 55, 195, 55, 55, 55, 200, 205, 199, 55, + 55, 55, 201, 55, 55, 203, 55, 202, 55, 55, + 55, 204, 91, 55, 55, 55, 55, 91, 49, 47, + 205, 44, 44, 46, 46, 48, 48, 55, 54, 50, + 49, 47, 45, 206, 5, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206 } ; -static const flex_int16_t yy_chk[613] = +static const flex_int16_t yy_chk[622] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -599,67 +602,68 @@ static const flex_int16_t yy_chk[613] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, - 22, 26, 41, 28, 27, 31, 208, 207, 28, 27, - 26, 32, 28, 202, 29, 25, 27, 201, 35, 25, - 32, 33, 41, 27, 28, 27, 31, 200, 50, 26, + 22, 26, 41, 28, 27, 31, 211, 210, 28, 27, + 26, 32, 28, 205, 29, 25, 27, 204, 35, 25, + 32, 33, 41, 27, 28, 27, 31, 203, 50, 26, 50, 35, 28, 27, 26, 30, 28, 35, 25, 33, 27, 29, 25, 33, 32, 41, 27, 28, 27, 31, - 37, 30, 26, 38, 30, 35, 30, 36, 40, 197, - 35, 57, 33, 40, 29, 196, 33, 195, 37, 57, + 37, 30, 26, 38, 30, 35, 30, 36, 40, 200, + 35, 57, 33, 40, 29, 199, 33, 198, 37, 57, 67, 37, 38, 39, 30, 59, 36, 30, 42, 30, 43, 36, 39, 42, 61, 39, 59, 40, 63, 67, 58, 37, 43, 57, 37, 38, 39, 58, 62, 36, 61, 39, 64, 62, 36, 63, 39, 42, 65, 39, 59, 64, 67, 68, 66, 69, 43, 70, 71, 39, - 72, 58, 194, 61, 39, 73, 68, 62, 63, 76, + 72, 58, 197, 61, 39, 73, 68, 62, 63, 76, 66, 65, 79, 68, 69, 64, 66, 71, 70, 72, - 77, 73, 82, 81, 76, 77, 87, 78, 79, 192, + 77, 73, 82, 81, 76, 77, 87, 78, 79, 195, 68, 81, 87, 66, 65, 74, 68, 69, 82, 66, 71, 70, 72, 74, 73, 74, 84, 76, 83, 77, 78, 79, 86, 85, 88, 81, 87, 74, 74, 89, - 189, 82, 88, 94, 83, 84, 97, 74, 90, 74, - 86, 83, 85, 78, 188, 89, 94, 90, 95, 98, + 192, 82, 88, 94, 83, 84, 97, 74, 90, 74, + 86, 83, 85, 78, 191, 89, 94, 90, 95, 98, 74, 74, 96, 97, 98, 95, 88, 83, 84, 101, - 100, 103, 187, 86, 83, 85, 101, 102, 89, 100, + 100, 103, 190, 86, 83, 85, 101, 102, 89, 100, 94, 90, 99, 96, 108, 104, 97, 99, 98, 95, - 105, 99, 106, 107, 103, 105, 109, 102, 185, 111, - 101, 104, 113, 100, 110, 112, 96, 117, 108, 106, - 107, 99, 111, 110, 112, 99, 109, 103, 114, 105, - 102, 113, 115, 117, 104, 118, 119, 114, 127, 122, - 115, 108, 106, 107, 118, 123, 111, 110, 112, 109, - 120, 124, 119, 125, 113, 126, 117, 128, 124, 120, - 126, 114, 127, 129, 115, 122, 123, 133, 118, 125, - 136, 140, 141, 132, 142, 119, 140, 144, 128, 142, - 146, 129, 124, 120, 126, 127, 132, 148, 122, 123, - 133, 184, 125, 136, 152, 141, 147, 144, 153, 152, - - 140, 128, 160, 142, 129, 183, 164, 146, 148, 154, - 132, 182, 147, 133, 155, 154, 136, 157, 141, 153, - 144, 155, 157, 152, 159, 160, 169, 161, 162, 164, - 146, 148, 165, 159, 166, 147, 161, 162, 167, 154, - 173, 165, 153, 166, 172, 155, 157, 177, 160, 169, - 174, 167, 164, 172, 176, 178, 174, 159, 186, 176, - 161, 162, 179, 173, 180, 165, 178, 166, 175, 181, - 177, 190, 169, 180, 191, 167, 186, 172, 171, 193, - 174, 191, 170, 176, 179, 198, 173, 190, 193, 199, - 178, 181, 168, 177, 198, 163, 158, 180, 156, 186, - - 151, 150, 149, 145, 199, 191, 143, 179, 139, 138, - 190, 137, 193, 135, 181, 134, 131, 130, 198, 121, - 116, 93, 92, 91, 80, 75, 60, 199, 204, 204, - 205, 205, 206, 206, 56, 51, 48, 46, 34, 24, - 17, 11, 10, 9, 5, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203 + 105, 99, 106, 103, 103, 105, 107, 102, 109, 188, + 101, 104, 187, 100, 186, 110, 96, 113, 108, 106, + 111, 99, 112, 107, 110, 99, 103, 103, 109, 105, + 102, 112, 115, 111, 104, 114, 113, 117, 118, 122, + 115, 108, 106, 124, 114, 119, 107, 118, 110, 120, + 124, 109, 123, 117, 125, 112, 127, 111, 120, 113, + 128, 119, 126, 185, 115, 122, 133, 126, 114, 129, + 125, 118, 132, 123, 124, 136, 117, 139, 141, 142, + 127, 128, 120, 141, 119, 132, 145, 129, 122, 133, + 143, 126, 148, 125, 149, 143, 123, 147, 136, 154, + + 139, 184, 142, 127, 128, 177, 145, 141, 148, 132, + 129, 153, 133, 158, 173, 149, 153, 172, 158, 143, + 154, 136, 155, 139, 147, 142, 156, 160, 155, 145, + 161, 148, 162, 156, 168, 163, 160, 166, 149, 165, + 153, 162, 158, 154, 163, 167, 166, 147, 171, 174, + 169, 175, 155, 161, 167, 181, 168, 156, 174, 178, + 160, 176, 165, 169, 178, 162, 179, 176, 163, 180, + 166, 171, 182, 183, 175, 189, 161, 181, 167, 168, + 180, 182, 174, 193, 170, 165, 164, 169, 178, 179, + 159, 176, 196, 189, 171, 183, 194, 175, 201, 193, + + 181, 196, 202, 194, 180, 182, 157, 201, 152, 151, + 150, 146, 179, 144, 140, 138, 189, 202, 183, 137, + 135, 134, 193, 131, 130, 196, 121, 194, 116, 93, + 92, 201, 91, 80, 75, 60, 56, 51, 48, 46, + 202, 207, 207, 208, 208, 209, 209, 34, 24, 17, + 11, 10, 9, 5, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206 } ; /* The intent behind this definition is that it'll catch @@ -694,7 +698,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 698 "lex_sql.cpp" +#line 702 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -703,7 +707,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 707 "lex_sql.cpp" +#line 711 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -989,7 +993,7 @@ YY_DECL #line 75 "lex_sql.l" -#line 993 "lex_sql.cpp" +#line 997 "lex_sql.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1016,13 +1020,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 204 ) + if ( yy_current_state >= 207 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 546 ); + while ( yy_base[yy_current_state] != 555 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1160,237 +1164,252 @@ RETURN_TOKEN(AND); case 23: YY_RULE_SETUP #line 101 "lex_sql.l" -RETURN_TOKEN(INSERT); +RETURN_TOKEN(OR); YY_BREAK case 24: YY_RULE_SETUP #line 102 "lex_sql.l" -RETURN_TOKEN(INTO); +RETURN_TOKEN(INSERT); YY_BREAK case 25: YY_RULE_SETUP #line 103 "lex_sql.l" -RETURN_TOKEN(VALUES); +RETURN_TOKEN(INTO); YY_BREAK case 26: YY_RULE_SETUP #line 104 "lex_sql.l" -RETURN_TOKEN(DELETE); +RETURN_TOKEN(VALUES); YY_BREAK case 27: YY_RULE_SETUP #line 105 "lex_sql.l" -RETURN_TOKEN(UPDATE); +RETURN_TOKEN(DELETE); YY_BREAK case 28: YY_RULE_SETUP #line 106 "lex_sql.l" -RETURN_TOKEN(SET); +RETURN_TOKEN(UPDATE); YY_BREAK case 29: YY_RULE_SETUP #line 107 "lex_sql.l" -RETURN_TOKEN(TRX_BEGIN); +RETURN_TOKEN(SET); YY_BREAK case 30: YY_RULE_SETUP #line 108 "lex_sql.l" -RETURN_TOKEN(TRX_COMMIT); +RETURN_TOKEN(TRX_BEGIN); YY_BREAK case 31: YY_RULE_SETUP #line 109 "lex_sql.l" -RETURN_TOKEN(TRX_ROLLBACK); +RETURN_TOKEN(TRX_COMMIT); YY_BREAK case 32: YY_RULE_SETUP #line 110 "lex_sql.l" -RETURN_TOKEN(INT_T); +RETURN_TOKEN(TRX_ROLLBACK); YY_BREAK case 33: YY_RULE_SETUP #line 111 "lex_sql.l" -RETURN_TOKEN(STRING_T); +RETURN_TOKEN(INT_T); YY_BREAK case 34: YY_RULE_SETUP #line 112 "lex_sql.l" -RETURN_TOKEN(FLOAT_T); +RETURN_TOKEN(STRING_T); YY_BREAK case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(DATE_T); // 增加 DATE 的 token +RETURN_TOKEN(FLOAT_T); YY_BREAK case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(NULL_T); +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token YY_BREAK case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(NULLABLE); +RETURN_TOKEN(NULL_T); YY_BREAK case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(LOAD); +RETURN_TOKEN(NULLABLE); YY_BREAK case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(DATA); +RETURN_TOKEN(LOAD); YY_BREAK case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(INFILE); +RETURN_TOKEN(DATA); YY_BREAK case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); +RETURN_TOKEN(INFILE); YY_BREAK case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(GROUP); +RETURN_TOKEN(EXPLAIN); YY_BREAK case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(ORDER); +RETURN_TOKEN(GROUP); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(BY); +RETURN_TOKEN(ORDER); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(AS); +RETURN_TOKEN(BY); YY_BREAK case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(ASC); +RETURN_TOKEN(AS); YY_BREAK case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(STORAGE); +RETURN_TOKEN(ASC); YY_BREAK case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(FORMAT); +RETURN_TOKEN(IN); YY_BREAK case 49: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(LBRACE); +RETURN_TOKEN(EXISTS); YY_BREAK case 50: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(RBRACE); +RETURN_TOKEN(STORAGE); YY_BREAK case 51: YY_RULE_SETUP -#line 130 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 129 "lex_sql.l" +RETURN_TOKEN(FORMAT); YY_BREAK case 52: YY_RULE_SETUP -#line 131 "lex_sql.l" -RETURN_TOKEN(EQ); +#line 130 "lex_sql.l" +RETURN_TOKEN(LBRACE); YY_BREAK case 53: YY_RULE_SETUP -#line 132 "lex_sql.l" -RETURN_TOKEN(LE); +#line 131 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 54: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(COMMA); YY_BREAK case 55: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(EQ); YY_BREAK case 56: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(LE); YY_BREAK case 57: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(NE); YY_BREAK case 58: YY_RULE_SETUP #line 137 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(NE); YY_BREAK case 59: YY_RULE_SETUP #line 138 "lex_sql.l" -RETURN_TOKEN(NOT); +RETURN_TOKEN(LT); YY_BREAK case 60: YY_RULE_SETUP #line 139 "lex_sql.l" -RETURN_TOKEN(IS); +RETURN_TOKEN(GE); YY_BREAK case 61: YY_RULE_SETUP #line 140 "lex_sql.l" -RETURN_TOKEN(LIKE); +RETURN_TOKEN(GT); YY_BREAK case 62: YY_RULE_SETUP -#line 142 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +#line 141 "lex_sql.l" +RETURN_TOKEN(NOT); YY_BREAK case 63: -#line 145 "lex_sql.l" +YY_RULE_SETUP +#line 142 "lex_sql.l" +RETURN_TOKEN(IS); + YY_BREAK case 64: -#line 146 "lex_sql.l" +YY_RULE_SETUP +#line 143 "lex_sql.l" +RETURN_TOKEN(LIKE); + YY_BREAK case 65: -#line 147 "lex_sql.l" +YY_RULE_SETUP +#line 145 "lex_sql.l" +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK case 66: +#line 148 "lex_sql.l" +case 67: +#line 149 "lex_sql.l" +case 68: +#line 150 "lex_sql.l" +case 69: YY_RULE_SETUP -#line 147 "lex_sql.l" +#line 150 "lex_sql.l" { return yytext[0]; } YY_BREAK -case 67: -/* rule 67 can match eol */ +case 70: +/* rule 70 can match eol */ YY_RULE_SETUP -#line 148 "lex_sql.l" +#line 151 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 68: -/* rule 68 can match eol */ +case 71: +/* rule 71 can match eol */ YY_RULE_SETUP -#line 149 "lex_sql.l" +#line 152 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 69: +case 72: YY_RULE_SETUP -#line 151 "lex_sql.l" +#line 154 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK -case 70: +case 73: YY_RULE_SETUP -#line 152 "lex_sql.l" +#line 155 "lex_sql.l" ECHO; YY_BREAK -#line 1394 "lex_sql.cpp" +#line 1413 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1690,7 +1709,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 204 ) + if ( yy_current_state >= 207 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1719,11 +1738,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 204 ) + if ( yy_current_state >= 207 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 203); + yy_is_jam = (yy_current_state == 206); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2546,7 +2565,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 152 "lex_sql.l" +#line 155 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 9d2bda18..ecd2de83 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -541,7 +541,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 152 "lex_sql.l" +#line 155 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index fd06b5a8..d95c4f02 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -98,6 +98,7 @@ CALC RETURN_TOKEN(CALC); FROM RETURN_TOKEN(FROM); WHERE RETURN_TOKEN(WHERE); AND RETURN_TOKEN(AND); +OR RETURN_TOKEN(OR); INSERT RETURN_TOKEN(INSERT); INTO RETURN_TOKEN(INTO); VALUES RETURN_TOKEN(VALUES); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index bedbe6f5..3cb846e1 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -119,7 +119,7 @@ struct SelectSqlNode { std::vector> expressions; ///< 查询的表达式 std::vector relations; ///< 查询的表 - std::vector conditions; ///< 查询条件,使用AND串联起来多个条件 + std::unique_ptr condition; ///< 查询条件,使用AND串联起来多个条件 std::vector> group_by; ///< group by clause std::vector order_by; ///< attributes in order clause }; @@ -150,8 +150,8 @@ struct InsertSqlNode */ struct DeleteSqlNode { - std::string relation_name; ///< Relation to delete from - std::vector conditions; + std::string relation_name; ///< Relation to delete from + std::unique_ptr condition; }; /** @@ -160,10 +160,10 @@ struct DeleteSqlNode */ struct UpdateSqlNode { - std::string relation_name; ///< Relation to update - std::string attribute_name; ///< 更新的字段,仅支持一个字段 - Value value; ///< 更新的值,仅支持一个字段 - std::vector conditions; + std::string relation_name; ///< Relation to update + std::string attribute_name; ///< 更新的字段,仅支持一个字段 + Value value; ///< 更新的值,仅支持一个字段 + std::unique_ptr condition; }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 33907f0e..e131b55b 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -158,112 +158,115 @@ enum yysymbol_kind_t YYSYMBOL_BY = 6, /* BY */ YYSYMBOL_CREATE = 7, /* CREATE */ YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_GROUP = 9, /* GROUP */ - YYSYMBOL_ORDER = 10, /* ORDER */ - YYSYMBOL_TABLE = 11, /* TABLE */ - YYSYMBOL_TABLES = 12, /* TABLES */ - YYSYMBOL_INDEX = 13, /* INDEX */ - YYSYMBOL_CALC = 14, /* CALC */ - YYSYMBOL_SELECT = 15, /* SELECT */ - YYSYMBOL_DESC = 16, /* DESC */ - YYSYMBOL_SHOW = 17, /* SHOW */ - YYSYMBOL_SYNC = 18, /* SYNC */ - YYSYMBOL_INSERT = 19, /* INSERT */ - YYSYMBOL_DELETE = 20, /* DELETE */ - YYSYMBOL_UPDATE = 21, /* UPDATE */ - YYSYMBOL_LBRACE = 22, /* LBRACE */ - YYSYMBOL_RBRACE = 23, /* RBRACE */ - YYSYMBOL_COMMA = 24, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 25, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 26, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 27, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 28, /* INT_T */ - YYSYMBOL_STRING_T = 29, /* STRING_T */ - YYSYMBOL_FLOAT_T = 30, /* FLOAT_T */ - YYSYMBOL_DATE_T = 31, /* DATE_T */ - YYSYMBOL_NOT = 32, /* NOT */ - YYSYMBOL_NULL_T = 33, /* NULL_T */ - YYSYMBOL_NULLABLE = 34, /* NULLABLE */ - YYSYMBOL_HELP = 35, /* HELP */ - YYSYMBOL_EXIT = 36, /* EXIT */ - YYSYMBOL_DOT = 37, /* DOT */ - YYSYMBOL_INTO = 38, /* INTO */ - YYSYMBOL_VALUES = 39, /* VALUES */ - YYSYMBOL_FROM = 40, /* FROM */ - YYSYMBOL_WHERE = 41, /* WHERE */ - YYSYMBOL_AND = 42, /* AND */ - YYSYMBOL_SET = 43, /* SET */ - YYSYMBOL_ON = 44, /* ON */ - YYSYMBOL_LOAD = 45, /* LOAD */ - YYSYMBOL_DATA = 46, /* DATA */ - YYSYMBOL_INFILE = 47, /* INFILE */ - YYSYMBOL_EXPLAIN = 48, /* EXPLAIN */ - YYSYMBOL_STORAGE = 49, /* STORAGE */ - YYSYMBOL_FORMAT = 50, /* FORMAT */ - YYSYMBOL_EQ = 51, /* EQ */ - YYSYMBOL_LT = 52, /* LT */ - YYSYMBOL_GT = 53, /* GT */ - YYSYMBOL_LE = 54, /* LE */ - YYSYMBOL_GE = 55, /* GE */ - YYSYMBOL_NE = 56, /* NE */ - YYSYMBOL_LIKE = 57, /* LIKE */ - YYSYMBOL_IS = 58, /* IS */ - YYSYMBOL_NUMBER = 59, /* NUMBER */ - YYSYMBOL_FLOAT = 60, /* FLOAT */ - YYSYMBOL_ID = 61, /* ID */ - YYSYMBOL_SSS = 62, /* SSS */ - YYSYMBOL_63_ = 63, /* '+' */ - YYSYMBOL_64_ = 64, /* '-' */ - YYSYMBOL_65_ = 65, /* '*' */ - YYSYMBOL_66_ = 66, /* '/' */ - YYSYMBOL_UMINUS = 67, /* UMINUS */ - YYSYMBOL_YYACCEPT = 68, /* $accept */ - YYSYMBOL_commands = 69, /* commands */ - YYSYMBOL_command_wrapper = 70, /* command_wrapper */ - YYSYMBOL_exit_stmt = 71, /* exit_stmt */ - YYSYMBOL_help_stmt = 72, /* help_stmt */ - YYSYMBOL_sync_stmt = 73, /* sync_stmt */ - YYSYMBOL_begin_stmt = 74, /* begin_stmt */ - YYSYMBOL_commit_stmt = 75, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 76, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 77, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 78, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 79, /* desc_table_stmt */ - YYSYMBOL_create_index_stmt = 80, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 81, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 82, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 83, /* attr_def_list */ - YYSYMBOL_attr_def = 84, /* attr_def */ - YYSYMBOL_nullable_constraint = 85, /* nullable_constraint */ - YYSYMBOL_number = 86, /* number */ - YYSYMBOL_type = 87, /* type */ - YYSYMBOL_insert_stmt = 88, /* insert_stmt */ - YYSYMBOL_value_list = 89, /* value_list */ - YYSYMBOL_value = 90, /* value */ - YYSYMBOL_storage_format = 91, /* storage_format */ - YYSYMBOL_delete_stmt = 92, /* delete_stmt */ - YYSYMBOL_update_stmt = 93, /* update_stmt */ - YYSYMBOL_select_stmt = 94, /* select_stmt */ - YYSYMBOL_calc_stmt = 95, /* calc_stmt */ - YYSYMBOL_expression_list = 96, /* expression_list */ - YYSYMBOL_expression = 97, /* expression */ - YYSYMBOL_alias = 98, /* alias */ - YYSYMBOL_aggr_func_expr = 99, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 100, /* rel_attr */ - YYSYMBOL_relation = 101, /* relation */ - YYSYMBOL_rel_list = 102, /* rel_list */ - YYSYMBOL_where = 103, /* where */ - YYSYMBOL_condition_list = 104, /* condition_list */ - YYSYMBOL_condition = 105, /* condition */ - YYSYMBOL_comp_op = 106, /* comp_op */ - YYSYMBOL_opt_order_by = 107, /* opt_order_by */ - YYSYMBOL_sort_list = 108, /* sort_list */ - YYSYMBOL_sort_unit = 109, /* sort_unit */ - YYSYMBOL_group_by = 110, /* group_by */ - YYSYMBOL_load_data_stmt = 111, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 112, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 113, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 114 /* opt_semicolon */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_ORDER = 11, /* ORDER */ + YYSYMBOL_TABLE = 12, /* TABLE */ + YYSYMBOL_TABLES = 13, /* TABLES */ + YYSYMBOL_INDEX = 14, /* INDEX */ + YYSYMBOL_CALC = 15, /* CALC */ + YYSYMBOL_SELECT = 16, /* SELECT */ + YYSYMBOL_DESC = 17, /* DESC */ + YYSYMBOL_SHOW = 18, /* SHOW */ + YYSYMBOL_SYNC = 19, /* SYNC */ + YYSYMBOL_INSERT = 20, /* INSERT */ + YYSYMBOL_DELETE = 21, /* DELETE */ + YYSYMBOL_UPDATE = 22, /* UPDATE */ + YYSYMBOL_LBRACE = 23, /* LBRACE */ + YYSYMBOL_RBRACE = 24, /* RBRACE */ + YYSYMBOL_COMMA = 25, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 29, /* INT_T */ + YYSYMBOL_IN = 30, /* IN */ + YYSYMBOL_STRING_T = 31, /* STRING_T */ + YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ + YYSYMBOL_DATE_T = 33, /* DATE_T */ + YYSYMBOL_NOT = 34, /* NOT */ + YYSYMBOL_NULL_T = 35, /* NULL_T */ + YYSYMBOL_NULLABLE = 36, /* NULLABLE */ + YYSYMBOL_HELP = 37, /* HELP */ + YYSYMBOL_EXIT = 38, /* EXIT */ + YYSYMBOL_DOT = 39, /* DOT */ + YYSYMBOL_INTO = 40, /* INTO */ + YYSYMBOL_VALUES = 41, /* VALUES */ + YYSYMBOL_FROM = 42, /* FROM */ + YYSYMBOL_WHERE = 43, /* WHERE */ + YYSYMBOL_AND = 44, /* AND */ + YYSYMBOL_OR = 45, /* OR */ + YYSYMBOL_SET = 46, /* SET */ + YYSYMBOL_ON = 47, /* ON */ + YYSYMBOL_LOAD = 48, /* LOAD */ + YYSYMBOL_DATA = 49, /* DATA */ + YYSYMBOL_INFILE = 50, /* INFILE */ + YYSYMBOL_EXPLAIN = 51, /* EXPLAIN */ + YYSYMBOL_STORAGE = 52, /* STORAGE */ + YYSYMBOL_FORMAT = 53, /* FORMAT */ + YYSYMBOL_EQ = 54, /* EQ */ + YYSYMBOL_LT = 55, /* LT */ + YYSYMBOL_GT = 56, /* GT */ + YYSYMBOL_LE = 57, /* LE */ + YYSYMBOL_GE = 58, /* GE */ + YYSYMBOL_NE = 59, /* NE */ + YYSYMBOL_LIKE = 60, /* LIKE */ + YYSYMBOL_IS = 61, /* IS */ + YYSYMBOL_NUMBER = 62, /* NUMBER */ + YYSYMBOL_FLOAT = 63, /* FLOAT */ + YYSYMBOL_ID = 64, /* ID */ + YYSYMBOL_SSS = 65, /* SSS */ + YYSYMBOL_66_ = 66, /* '+' */ + YYSYMBOL_67_ = 67, /* '-' */ + YYSYMBOL_68_ = 68, /* '*' */ + YYSYMBOL_69_ = 69, /* '/' */ + YYSYMBOL_UMINUS = 70, /* UMINUS */ + YYSYMBOL_YYACCEPT = 71, /* $accept */ + YYSYMBOL_commands = 72, /* commands */ + YYSYMBOL_command_wrapper = 73, /* command_wrapper */ + YYSYMBOL_exit_stmt = 74, /* exit_stmt */ + YYSYMBOL_help_stmt = 75, /* help_stmt */ + YYSYMBOL_sync_stmt = 76, /* sync_stmt */ + YYSYMBOL_begin_stmt = 77, /* begin_stmt */ + YYSYMBOL_commit_stmt = 78, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 79, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 80, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 81, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 82, /* desc_table_stmt */ + YYSYMBOL_create_index_stmt = 83, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 84, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 85, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 86, /* attr_def_list */ + YYSYMBOL_attr_def = 87, /* attr_def */ + YYSYMBOL_nullable_constraint = 88, /* nullable_constraint */ + YYSYMBOL_number = 89, /* number */ + YYSYMBOL_type = 90, /* type */ + YYSYMBOL_insert_stmt = 91, /* insert_stmt */ + YYSYMBOL_value_list = 92, /* value_list */ + YYSYMBOL_value = 93, /* value */ + YYSYMBOL_storage_format = 94, /* storage_format */ + YYSYMBOL_delete_stmt = 95, /* delete_stmt */ + YYSYMBOL_update_stmt = 96, /* update_stmt */ + YYSYMBOL_select_stmt = 97, /* select_stmt */ + YYSYMBOL_calc_stmt = 98, /* calc_stmt */ + YYSYMBOL_expression_list = 99, /* expression_list */ + YYSYMBOL_expression = 100, /* expression */ + YYSYMBOL_alias = 101, /* alias */ + YYSYMBOL_aggr_func_expr = 102, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 103, /* sub_query_expr */ + YYSYMBOL_rel_attr = 104, /* rel_attr */ + YYSYMBOL_relation = 105, /* relation */ + YYSYMBOL_rel_list = 106, /* rel_list */ + YYSYMBOL_where = 107, /* where */ + YYSYMBOL_condition = 108, /* condition */ + YYSYMBOL_comp_op = 109, /* comp_op */ + YYSYMBOL_opt_order_by = 110, /* opt_order_by */ + YYSYMBOL_sort_list = 111, /* sort_list */ + YYSYMBOL_sort_unit = 112, /* sort_unit */ + YYSYMBOL_group_by = 113, /* group_by */ + YYSYMBOL_load_data_stmt = 114, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 115, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 116, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 117 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -592,12 +595,12 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 67 +#define YYFINAL 68 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 184 +#define YYLAST 199 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 68 +#define YYNTOKENS 71 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 47 /* YYNRULES -- Number of rules. */ @@ -606,7 +609,7 @@ union yyalloc #define YYNSTATES 198 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 318 +#define YYMAXUTOK 321 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -624,7 +627,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 65, 63, 2, 64, 2, 66, 2, 2, + 2, 2, 68, 66, 2, 67, 2, 69, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -651,25 +654,26 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 67 + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 70 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 206, 206, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 237, 243, 248, 254, 260, 266, 272, - 279, 285, 293, 307, 317, 341, 344, 357, 369, 392, - 396, 401, 407, 410, 411, 412, 413, 416, 433, 436, - 447, 451, 455, 461, 467, 470, 477, 489, 504, 534, - 543, 552, 567, 570, 573, 576, 579, 583, 586, 591, - 597, 600, 607, 610, 613, 618, 626, 632, 637, 647, - 652, 662, 681, 684, 690, 693, 698, 705, 717, 729, - 741, 756, 757, 758, 759, 760, 761, 762, 763, 764, - 765, 770, 773, 780, 786, 793, 800, 807, 816, 821, - 834, 842, 852, 853 + 0, 209, 209, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 240, 246, 251, 257, 263, 269, 275, + 282, 288, 296, 310, 320, 344, 347, 360, 372, 395, + 399, 404, 410, 413, 414, 415, 416, 419, 436, 439, + 450, 454, 458, 464, 470, 473, 480, 492, 506, 535, + 544, 553, 568, 571, 574, 577, 580, 584, 587, 592, + 598, 601, 604, 611, 614, 617, 622, 630, 637, 644, + 649, 659, 664, 674, 693, 696, 702, 706, 710, 717, + 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, + 728, 733, 736, 743, 749, 756, 763, 770, 779, 784, + 797, 805, 815, 816 }; #endif @@ -686,25 +690,25 @@ static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; static const char *const yytname[] = { "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", - "ASC", "BY", "CREATE", "DROP", "GROUP", "ORDER", "TABLE", "TABLES", - "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", - "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", - "TRX_ROLLBACK", "INT_T", "STRING_T", "FLOAT_T", "DATE_T", "NOT", - "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", - "WHERE", "AND", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", - "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", - "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", - "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", - "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", + "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "ORDER", "TABLE", + "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", + "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", + "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", + "DATE_T", "NOT", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", "INTO", + "VALUES", "FROM", "WHERE", "AND", "OR", "SET", "ON", "LOAD", "DATA", + "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "EQ", "LT", "GT", "LE", "GE", + "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", + "'/'", "UMINUS", "$accept", "commands", "command_wrapper", "exit_stmt", + "help_stmt", "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", "create_index_stmt", "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", "number", "type", "insert_stmt", "value_list", "value", "storage_format", "delete_stmt", "update_stmt", "select_stmt", "calc_stmt", "expression_list", - "expression", "alias", "aggr_func_expr", "rel_attr", "relation", - "rel_list", "where", "condition_list", "condition", "comp_op", - "opt_order_by", "sort_list", "sort_unit", "group_by", "load_data_stmt", - "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR + "expression", "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", + "relation", "rel_list", "where", "condition", "comp_op", "opt_order_by", + "sort_list", "sort_unit", "group_by", "load_data_stmt", "explain_stmt", + "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; static const char * @@ -714,7 +718,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-103) +#define YYPACT_NINF (-106) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -728,26 +732,26 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 87, 1, 6, -6, -6, -56, 12, -103, -27, -22, - -17, -103, -103, -103, -103, -103, -16, 11, 87, 66, - 68, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, 17, 25, 31, 32, -6, -103, -103, -103, -15, - -103, -6, -103, -103, -103, 4, -103, -103, 56, -103, - -103, 36, 37, 67, 48, 62, -103, -103, -103, -103, - 93, 72, -103, 75, 16, -13, 50, -103, 63, -103, - -6, -6, -6, -6, 101, 65, 88, 90, 73, 58, - 71, 77, 78, 91, -103, -103, 105, -103, -103, -33, - -33, -103, -103, -6, -103, -1, 90, 107, 28, -103, - 85, -103, 110, 0, 125, 129, -103, -103, -103, 130, - -103, 58, 116, 89, 89, -103, 113, 58, 145, -103, - -103, -103, -103, -9, 77, 134, 97, 65, 149, 136, - 104, -103, -103, -103, -103, -103, -103, -103, 131, 28, - 28, 28, 90, 103, 106, 133, -103, -103, 125, 118, - 139, -103, 162, -103, 58, 146, -103, -103, -103, -103, - -103, -103, -103, -103, -103, -103, 147, -103, -103, 121, - -103, -103, -6, 136, -103, 9, 122, 10, -103, 148, - -103, -103, 114, -103, -103, -6, -103, -103 + 93, -1, 16, 22, 22, -55, 5, -106, 33, -21, + -31, -106, -106, -106, -106, -106, -8, -6, 93, 79, + 77, -106, -106, -106, -106, -106, -106, -106, -106, -106, + -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, + -106, 17, 19, 24, 38, -13, -106, -106, -106, -16, + -106, 22, -106, -106, -106, 1, -106, -106, -106, 62, + -106, -106, 52, 53, 72, 68, 73, -106, -106, -106, + -106, 101, 78, -106, 86, 110, 29, -4, 71, -106, + 74, -106, 22, 22, 22, 22, 111, 76, 102, 99, + 81, 64, 82, 84, 85, 87, -106, -106, -106, 122, + -106, -106, -44, -44, -106, -106, 22, -106, -2, 99, + 137, 22, -106, 107, -106, 123, 3, 143, 139, -106, + -106, -106, 144, -106, 64, 98, 2, 64, 158, -106, + -106, -106, -106, -7, 84, 147, 108, 76, 162, 149, + -106, -18, -106, -106, -106, -106, -106, -106, -106, 141, + 22, 22, 22, 99, 112, 115, 145, -106, -106, 143, + 126, 155, -106, 175, -106, 64, 159, -106, -106, -106, + 25, -106, 138, -106, -106, -106, 160, -106, -106, 132, + -106, -106, 22, 149, -106, -19, 133, 9, -106, 161, + -106, -106, 124, -106, -106, 22, -106, -106 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -759,20 +763,20 @@ static const yytype_int8 yydefact[] = 0, 26, 27, 28, 24, 23, 0, 0, 0, 0, 112, 22, 21, 14, 15, 16, 17, 9, 10, 11, 12, 13, 8, 5, 7, 6, 4, 3, 18, 19, - 20, 0, 0, 0, 0, 0, 53, 50, 51, 77, - 52, 0, 70, 68, 59, 72, 71, 69, 0, 31, - 30, 0, 0, 0, 0, 0, 110, 1, 113, 2, - 0, 0, 29, 0, 0, 0, 0, 67, 0, 73, - 0, 0, 0, 0, 60, 0, 0, 82, 0, 0, - 0, 0, 0, 0, 66, 76, 0, 78, 74, 62, - 63, 64, 65, 0, 79, 72, 82, 0, 84, 56, - 0, 111, 0, 0, 35, 0, 33, 75, 61, 80, - 108, 0, 77, 0, 0, 83, 85, 0, 0, 43, + 20, 0, 0, 0, 0, 0, 53, 50, 51, 79, + 52, 0, 70, 68, 59, 73, 71, 72, 69, 0, + 31, 30, 0, 0, 0, 0, 0, 110, 1, 113, + 2, 0, 0, 29, 0, 0, 0, 0, 0, 67, + 0, 74, 0, 0, 0, 0, 60, 0, 0, 84, + 0, 0, 0, 0, 0, 0, 78, 66, 77, 0, + 80, 75, 62, 63, 64, 65, 0, 81, 73, 84, + 0, 0, 56, 0, 111, 0, 0, 35, 0, 33, + 76, 61, 82, 108, 0, 0, 85, 0, 0, 43, 44, 45, 46, 41, 0, 0, 0, 0, 101, 48, - 0, 91, 92, 93, 94, 95, 96, 99, 97, 0, - 0, 84, 82, 0, 0, 0, 40, 38, 35, 54, - 0, 81, 0, 58, 0, 0, 100, 98, 88, 90, - 87, 89, 86, 57, 109, 42, 0, 39, 36, 0, + 99, 0, 89, 90, 91, 92, 93, 94, 97, 95, + 0, 0, 0, 84, 0, 0, 0, 40, 38, 35, + 54, 0, 83, 0, 58, 0, 0, 100, 98, 96, + 86, 87, 88, 57, 109, 42, 0, 39, 36, 0, 34, 32, 0, 48, 47, 41, 0, 105, 102, 103, 49, 37, 0, 107, 106, 0, 55, 104 }; @@ -780,21 +784,21 @@ static const yytype_int8 yydefact[] = /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -103, -103, 156, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, -103, -103, 18, 43, -7, -103, -103, - -103, -4, -87, -103, -103, -103, -103, -103, -3, -45, - 76, -103, -66, -103, 45, -102, 29, -103, 59, -103, - -11, -103, -103, -103, -103, -103, -103 + -106, -106, 171, -106, -106, -106, -106, -106, -106, -106, + -106, -106, -106, -106, -106, 31, 57, 7, -106, -106, + -106, 10, -83, -106, -106, -106, 150, -106, -3, -45, + 88, -106, -106, -106, -106, 60, -105, -80, -106, -106, + 4, -106, -106, -106, -106, -106, -106 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 135, 114, 157, 176, 133, - 33, 165, 53, 180, 34, 35, 36, 37, 54, 55, - 84, 56, 57, 105, 106, 109, 125, 126, 149, 163, - 188, 189, 138, 38, 39, 40, 69 + 28, 29, 30, 31, 32, 135, 117, 158, 176, 133, + 33, 166, 53, 180, 34, 35, 36, 37, 54, 55, + 86, 56, 57, 58, 108, 109, 112, 126, 150, 164, + 188, 189, 138, 38, 39, 40, 70 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -802,91 +806,93 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 74, 58, 111, 78, 120, 59, 77, 75, 78, 45, - 95, 61, 41, 154, 42, 193, 45, 43, 62, 44, - 46, 123, 76, 155, 60, 156, 194, 46, 129, 130, - 131, 132, 82, 83, 139, 99, 100, 101, 102, 94, - 152, 155, 124, 156, 63, 64, 47, 48, 49, 50, - 173, 51, 52, 47, 48, 49, 50, 65, 51, 52, - 79, 46, 168, 170, 123, 79, 67, 80, 81, 82, - 83, 68, 96, 80, 81, 82, 83, 183, 70, 80, - 81, 82, 83, 169, 171, 124, 71, 47, 48, 122, - 50, 46, 72, 73, 1, 2, 85, 86, 87, 89, - 118, 3, 4, 5, 6, 7, 8, 9, 10, 90, - 88, 97, 11, 12, 13, 91, 92, 47, 48, 93, - 50, 140, 14, 15, 98, 103, 104, 107, 117, 121, - 16, 108, 17, 112, 110, 18, 127, 187, 113, 115, - 141, 142, 143, 144, 145, 146, 147, 148, 128, 134, - 187, 136, 116, 76, 137, 151, 153, 159, 160, 162, - 164, 166, 181, 167, 174, 175, 177, 179, 182, 184, - 185, 186, 195, 192, 66, 196, 178, 158, 191, 190, - 172, 119, 161, 150, 197 + 76, 59, 80, 4, 123, 80, 79, 77, 114, 60, + 45, 41, 167, 42, 193, 156, 155, 157, 61, 45, + 98, 63, 46, 78, 84, 85, 194, 156, 43, 157, + 44, 46, 129, 64, 130, 131, 132, 102, 103, 104, + 105, 139, 168, 66, 153, 45, 151, 152, 173, 47, + 48, 49, 50, 97, 51, 52, 65, 46, 47, 48, + 49, 50, 81, 51, 52, 81, 125, 82, 83, 84, + 85, 171, 172, 62, 99, 82, 83, 84, 85, 68, + 69, 71, 183, 72, 47, 48, 49, 50, 73, 51, + 52, 82, 83, 84, 85, 82, 83, 84, 85, 46, + 1, 2, 74, 121, 87, 170, 125, 125, 3, 4, + 5, 6, 7, 8, 9, 10, 88, 89, 90, 11, + 12, 13, 91, 92, 93, 94, 47, 48, 140, 50, + 14, 15, 141, 95, 96, 100, 106, 187, 101, 16, + 107, 17, 111, 110, 18, 113, 120, 115, 116, 118, + 187, 119, 142, 143, 144, 145, 146, 147, 148, 149, + 124, 127, 136, 128, 82, 83, 84, 85, 134, 137, + 154, 160, 161, 163, 165, 169, 174, 175, 179, 181, + 177, 182, 151, 184, 185, 186, 195, 192, 196, 67, + 178, 159, 191, 190, 0, 75, 122, 162, 0, 197 }; -static const yytype_uint8 yycheck[] = +static const yytype_int16 yycheck[] = { - 45, 4, 89, 4, 106, 61, 51, 22, 4, 22, - 23, 38, 11, 22, 13, 5, 22, 11, 40, 13, - 33, 108, 37, 32, 12, 34, 16, 33, 28, 29, - 30, 31, 65, 66, 121, 80, 81, 82, 83, 23, - 127, 32, 108, 34, 61, 61, 59, 60, 61, 62, - 152, 64, 65, 59, 60, 61, 62, 46, 64, 65, - 61, 33, 149, 150, 151, 61, 0, 63, 64, 65, - 66, 3, 75, 63, 64, 65, 66, 164, 61, 63, - 64, 65, 66, 149, 150, 151, 61, 59, 60, 61, - 62, 33, 61, 61, 7, 8, 40, 61, 61, 51, - 103, 14, 15, 16, 17, 18, 19, 20, 21, 47, - 43, 61, 25, 26, 27, 22, 44, 59, 60, 44, - 62, 32, 35, 36, 61, 24, 61, 39, 23, 22, - 43, 41, 45, 62, 61, 48, 51, 182, 61, 61, - 51, 52, 53, 54, 55, 56, 57, 58, 38, 24, - 195, 22, 61, 37, 24, 42, 11, 23, 61, 10, - 24, 57, 23, 32, 61, 59, 33, 49, 6, 23, - 23, 50, 24, 51, 18, 61, 158, 134, 185, 183, - 151, 105, 137, 124, 195 + 45, 4, 4, 16, 109, 4, 51, 23, 91, 64, + 23, 12, 30, 14, 5, 34, 23, 36, 13, 23, + 24, 42, 35, 39, 68, 69, 17, 34, 12, 36, + 14, 35, 29, 64, 31, 32, 33, 82, 83, 84, + 85, 124, 60, 49, 127, 23, 44, 45, 153, 62, + 63, 64, 65, 24, 67, 68, 64, 35, 62, 63, + 64, 65, 64, 67, 68, 64, 111, 66, 67, 68, + 69, 151, 152, 40, 77, 66, 67, 68, 69, 0, + 3, 64, 165, 64, 62, 63, 64, 65, 64, 67, + 68, 66, 67, 68, 69, 66, 67, 68, 69, 35, + 7, 8, 64, 106, 42, 150, 151, 152, 15, 16, + 17, 18, 19, 20, 21, 22, 64, 64, 46, 26, + 27, 28, 54, 50, 23, 47, 62, 63, 30, 65, + 37, 38, 34, 47, 24, 64, 25, 182, 64, 46, + 64, 48, 43, 41, 51, 64, 24, 65, 64, 64, + 195, 64, 54, 55, 56, 57, 58, 59, 60, 61, + 23, 54, 23, 40, 66, 67, 68, 69, 25, 25, + 12, 24, 64, 11, 25, 34, 64, 62, 52, 24, + 35, 6, 44, 24, 24, 53, 25, 54, 64, 18, + 159, 134, 185, 183, -1, 45, 108, 137, -1, 195 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_int8 yystos[] = { - 0, 7, 8, 14, 15, 16, 17, 18, 19, 20, - 21, 25, 26, 27, 35, 36, 43, 45, 48, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 88, 92, 93, 94, 95, 111, 112, - 113, 11, 13, 11, 13, 22, 33, 59, 60, 61, - 62, 64, 65, 90, 96, 97, 99, 100, 96, 61, - 12, 38, 40, 61, 61, 46, 70, 0, 3, 114, - 61, 61, 61, 61, 97, 22, 37, 97, 4, 61, - 63, 64, 65, 66, 98, 40, 61, 61, 43, 51, - 47, 22, 44, 44, 23, 23, 96, 61, 61, 97, - 97, 97, 97, 24, 61, 101, 102, 39, 41, 103, - 61, 90, 62, 61, 84, 61, 61, 23, 96, 98, - 103, 22, 61, 90, 100, 104, 105, 51, 38, 28, - 29, 30, 31, 87, 24, 83, 22, 24, 110, 90, - 32, 51, 52, 53, 54, 55, 56, 57, 58, 106, - 106, 42, 90, 11, 22, 32, 34, 85, 84, 23, - 61, 102, 10, 107, 24, 89, 57, 32, 90, 100, - 90, 100, 104, 103, 61, 59, 86, 33, 83, 49, - 91, 23, 6, 90, 23, 23, 50, 97, 108, 109, - 89, 85, 51, 5, 16, 24, 61, 108 + 0, 7, 8, 15, 16, 17, 18, 19, 20, 21, + 22, 26, 27, 28, 37, 38, 46, 48, 51, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 91, 95, 96, 97, 98, 114, 115, + 116, 12, 14, 12, 14, 23, 35, 62, 63, 64, + 65, 67, 68, 93, 99, 100, 102, 103, 104, 99, + 64, 13, 40, 42, 64, 64, 49, 73, 0, 3, + 117, 64, 64, 64, 64, 97, 100, 23, 39, 100, + 4, 64, 66, 67, 68, 69, 101, 42, 64, 64, + 46, 54, 50, 23, 47, 47, 24, 24, 24, 99, + 64, 64, 100, 100, 100, 100, 25, 64, 105, 106, + 41, 43, 107, 64, 93, 65, 64, 87, 64, 64, + 24, 99, 101, 107, 23, 100, 108, 54, 40, 29, + 31, 32, 33, 90, 25, 86, 23, 25, 113, 93, + 30, 34, 54, 55, 56, 57, 58, 59, 60, 61, + 109, 44, 45, 93, 12, 23, 34, 36, 88, 87, + 24, 64, 106, 11, 110, 25, 92, 30, 60, 34, + 100, 108, 108, 107, 64, 62, 89, 35, 86, 52, + 94, 24, 6, 93, 24, 24, 53, 100, 111, 112, + 92, 88, 54, 5, 17, 25, 64, 111 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { - 0, 68, 69, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 83, 84, 84, 85, - 85, 85, 86, 87, 87, 87, 87, 88, 89, 89, - 90, 90, 90, 90, 91, 91, 92, 93, 94, 95, - 96, 96, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 98, 98, 98, 99, 99, 100, 100, 101, - 102, 102, 103, 103, 104, 104, 104, 105, 105, 105, - 105, 106, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 107, 107, 108, 108, 109, 109, 109, 110, 111, - 112, 113, 114, 114 + 0, 71, 72, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 86, 87, 87, 88, + 88, 88, 89, 90, 90, 90, 90, 91, 92, 92, + 93, 93, 93, 93, 94, 94, 95, 96, 97, 98, + 99, 99, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 101, 101, 101, 102, 102, 103, 104, + 104, 105, 106, 106, 107, 107, 108, 108, 108, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 110, 110, 111, 111, 112, 112, 112, 113, 114, + 115, 116, 117, 117 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -899,9 +905,9 @@ static const yytype_int8 yyr2[] = 1, 0, 1, 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, 1, 0, 4, 4, 7, 7, 2, 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, - 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, - 2, 4, 0, 2, 0, 1, 3, 3, 3, 3, - 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 1, 1, 0, 1, 2, 4, 3, 3, 1, + 3, 1, 2, 4, 0, 2, 3, 3, 3, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 0, 3, 1, 3, 1, 2, 2, 0, 7, 2, 4, 0, 1 }; @@ -1765,93 +1771,93 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 207 "yacc_sql.y" +#line 210 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1774 "yacc_sql.cpp" +#line 1780 "yacc_sql.cpp" break; case 23: /* exit_stmt: EXIT */ -#line 237 "yacc_sql.y" +#line 240 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1783 "yacc_sql.cpp" +#line 1789 "yacc_sql.cpp" break; case 24: /* help_stmt: HELP */ -#line 243 "yacc_sql.y" +#line 246 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1791 "yacc_sql.cpp" +#line 1797 "yacc_sql.cpp" break; case 25: /* sync_stmt: SYNC */ -#line 248 "yacc_sql.y" +#line 251 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1799 "yacc_sql.cpp" +#line 1805 "yacc_sql.cpp" break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 254 "yacc_sql.y" +#line 257 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1807 "yacc_sql.cpp" +#line 1813 "yacc_sql.cpp" break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 260 "yacc_sql.y" +#line 263 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1815 "yacc_sql.cpp" +#line 1821 "yacc_sql.cpp" break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 266 "yacc_sql.y" +#line 269 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1823 "yacc_sql.cpp" +#line 1829 "yacc_sql.cpp" break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 272 "yacc_sql.y" +#line 275 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1833 "yacc_sql.cpp" +#line 1839 "yacc_sql.cpp" break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 279 "yacc_sql.y" +#line 282 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1841 "yacc_sql.cpp" +#line 1847 "yacc_sql.cpp" break; case 31: /* desc_table_stmt: DESC ID */ -#line 285 "yacc_sql.y" +#line 288 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1851 "yacc_sql.cpp" +#line 1857 "yacc_sql.cpp" break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 294 "yacc_sql.y" +#line 297 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1862,11 +1868,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -#line 1866 "yacc_sql.cpp" +#line 1872 "yacc_sql.cpp" break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 308 "yacc_sql.y" +#line 311 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1874,11 +1880,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1878 "yacc_sql.cpp" +#line 1884 "yacc_sql.cpp" break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 318 "yacc_sql.y" +#line 321 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1899,19 +1905,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1903 "yacc_sql.cpp" +#line 1909 "yacc_sql.cpp" break; case 35: /* attr_def_list: %empty */ -#line 341 "yacc_sql.y" +#line 344 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1911 "yacc_sql.cpp" +#line 1917 "yacc_sql.cpp" break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 345 "yacc_sql.y" +#line 348 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1921,11 +1927,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1925 "yacc_sql.cpp" +#line 1931 "yacc_sql.cpp" break; case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 358 "yacc_sql.y" +#line 361 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -1937,11 +1943,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 1941 "yacc_sql.cpp" +#line 1947 "yacc_sql.cpp" break; case 38: /* attr_def: ID type nullable_constraint */ -#line 370 "yacc_sql.y" +#line 373 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -1961,65 +1967,65 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 1965 "yacc_sql.cpp" +#line 1971 "yacc_sql.cpp" break; case 39: /* nullable_constraint: NOT NULL_T */ -#line 393 "yacc_sql.y" +#line 396 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1973 "yacc_sql.cpp" +#line 1979 "yacc_sql.cpp" break; case 40: /* nullable_constraint: NULLABLE */ -#line 397 "yacc_sql.y" +#line 400 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 1981 "yacc_sql.cpp" +#line 1987 "yacc_sql.cpp" break; case 41: /* nullable_constraint: %empty */ -#line 401 "yacc_sql.y" +#line 404 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 1989 "yacc_sql.cpp" +#line 1995 "yacc_sql.cpp" break; case 42: /* number: NUMBER */ -#line 407 "yacc_sql.y" +#line 410 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 1995 "yacc_sql.cpp" +#line 2001 "yacc_sql.cpp" break; case 43: /* type: INT_T */ -#line 410 "yacc_sql.y" +#line 413 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2001 "yacc_sql.cpp" +#line 2007 "yacc_sql.cpp" break; case 44: /* type: STRING_T */ -#line 411 "yacc_sql.y" +#line 414 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2007 "yacc_sql.cpp" +#line 2013 "yacc_sql.cpp" break; case 45: /* type: FLOAT_T */ -#line 412 "yacc_sql.y" +#line 415 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2013 "yacc_sql.cpp" +#line 2019 "yacc_sql.cpp" break; case 46: /* type: DATE_T */ -#line 413 "yacc_sql.y" +#line 416 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2019 "yacc_sql.cpp" +#line 2025 "yacc_sql.cpp" break; case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 417 "yacc_sql.y" +#line 420 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -2032,19 +2038,19 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); free((yyvsp[-5].string)); } -#line 2036 "yacc_sql.cpp" +#line 2042 "yacc_sql.cpp" break; case 48: /* value_list: %empty */ -#line 433 "yacc_sql.y" +#line 436 "yacc_sql.y" { (yyval.value_list) = nullptr; } -#line 2044 "yacc_sql.cpp" +#line 2050 "yacc_sql.cpp" break; case 49: /* value_list: COMMA value value_list */ -#line 436 "yacc_sql.y" +#line 439 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -2054,95 +2060,94 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[-1].value)); delete (yyvsp[-1].value); } -#line 2058 "yacc_sql.cpp" +#line 2064 "yacc_sql.cpp" break; case 50: /* value: NUMBER */ -#line 447 "yacc_sql.y" +#line 450 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2067 "yacc_sql.cpp" +#line 2073 "yacc_sql.cpp" break; case 51: /* value: FLOAT */ -#line 451 "yacc_sql.y" +#line 454 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2076 "yacc_sql.cpp" +#line 2082 "yacc_sql.cpp" break; case 52: /* value: SSS */ -#line 455 "yacc_sql.y" +#line 458 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2087 "yacc_sql.cpp" +#line 2093 "yacc_sql.cpp" break; case 53: /* value: NULL_T */ -#line 461 "yacc_sql.y" +#line 464 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2095 "yacc_sql.cpp" +#line 2101 "yacc_sql.cpp" break; case 54: /* storage_format: %empty */ -#line 467 "yacc_sql.y" +#line 470 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2103 "yacc_sql.cpp" +#line 2109 "yacc_sql.cpp" break; case 55: /* storage_format: STORAGE FORMAT EQ ID */ -#line 471 "yacc_sql.y" +#line 474 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2111 "yacc_sql.cpp" +#line 2117 "yacc_sql.cpp" break; case 56: /* delete_stmt: DELETE FROM ID where */ -#line 478 "yacc_sql.y" +#line 481 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); - if ((yyvsp[0].condition_list) != nullptr) { - (yyval.sql_node)->deletion.conditions.swap(*(yyvsp[0].condition_list)); - delete (yyvsp[0].condition_list); + if ((yyvsp[0].expression) != nullptr) { + (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); + delete (yyvsp[0].expression); } free((yyvsp[-1].string)); } -#line 2125 "yacc_sql.cpp" +#line 2131 "yacc_sql.cpp" break; case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 490 "yacc_sql.y" +#line 493 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); (yyval.sql_node)->update.attribute_name = (yyvsp[-3].string); (yyval.sql_node)->update.value = *(yyvsp[-1].value); - if ((yyvsp[0].condition_list) != nullptr) { - (yyval.sql_node)->update.conditions.swap(*(yyvsp[0].condition_list)); - delete (yyvsp[0].condition_list); + if ((yyvsp[0].expression) != nullptr) { + (yyval.sql_node)->update.condition=std::unique_ptr((yyvsp[0].expression)); } free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2142 "yacc_sql.cpp" +#line 2147 "yacc_sql.cpp" break; case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 505 "yacc_sql.y" +#line 507 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-5].expression_list) != nullptr) { @@ -2154,10 +2159,9 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->selection.relations.swap(*(yyvsp[-3].relation_list)); delete (yyvsp[-3].relation_list); } - - if ((yyvsp[-2].condition_list) != nullptr) { - (yyval.sql_node)->selection.conditions.swap(*(yyvsp[-2].condition_list)); - delete (yyvsp[-2].condition_list); + (yyval.sql_node)->selection.condition = nullptr; + if ((yyvsp[-2].expression) != nullptr) { + (yyval.sql_node)->selection.condition = std::unique_ptr((yyvsp[-2].expression)); } if ((yyvsp[-1].expression_list) != nullptr) { @@ -2170,21 +2174,21 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2174 "yacc_sql.cpp" +#line 2178 "yacc_sql.cpp" break; case 59: /* calc_stmt: CALC expression_list */ -#line 535 "yacc_sql.y" +#line 536 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2184 "yacc_sql.cpp" +#line 2188 "yacc_sql.cpp" break; case 60: /* expression_list: expression alias */ -#line 544 "yacc_sql.y" +#line 545 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2193,11 +2197,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2197 "yacc_sql.cpp" +#line 2201 "yacc_sql.cpp" break; case 61: /* expression_list: expression alias COMMA expression_list */ -#line 553 "yacc_sql.y" +#line 554 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2210,121 +2214,129 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2214 "yacc_sql.cpp" +#line 2218 "yacc_sql.cpp" break; case 62: /* expression: expression '+' expression */ -#line 567 "yacc_sql.y" +#line 568 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2222 "yacc_sql.cpp" +#line 2226 "yacc_sql.cpp" break; case 63: /* expression: expression '-' expression */ -#line 570 "yacc_sql.y" +#line 571 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2230 "yacc_sql.cpp" +#line 2234 "yacc_sql.cpp" break; case 64: /* expression: expression '*' expression */ -#line 573 "yacc_sql.y" +#line 574 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2238 "yacc_sql.cpp" +#line 2242 "yacc_sql.cpp" break; case 65: /* expression: expression '/' expression */ -#line 576 "yacc_sql.y" +#line 577 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2246 "yacc_sql.cpp" +#line 2250 "yacc_sql.cpp" break; case 66: /* expression: LBRACE expression RBRACE */ -#line 579 "yacc_sql.y" +#line 580 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2255 "yacc_sql.cpp" +#line 2259 "yacc_sql.cpp" break; case 67: /* expression: '-' expression */ -#line 583 "yacc_sql.y" +#line 584 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2263 "yacc_sql.cpp" +#line 2267 "yacc_sql.cpp" break; case 68: /* expression: value */ -#line 586 "yacc_sql.y" +#line 587 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2273 "yacc_sql.cpp" +#line 2277 "yacc_sql.cpp" break; case 69: /* expression: rel_attr */ -#line 591 "yacc_sql.y" +#line 592 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2284 "yacc_sql.cpp" +#line 2288 "yacc_sql.cpp" break; case 70: /* expression: '*' */ -#line 597 "yacc_sql.y" +#line 598 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2292 "yacc_sql.cpp" +#line 2296 "yacc_sql.cpp" break; case 71: /* expression: aggr_func_expr */ -#line 600 "yacc_sql.y" +#line 601 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2300 "yacc_sql.cpp" +#line 2304 "yacc_sql.cpp" break; - case 72: /* alias: %empty */ -#line 607 "yacc_sql.y" + case 72: /* expression: sub_query_expr */ +#line 604 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + } +#line 2312 "yacc_sql.cpp" + break; + + case 73: /* alias: %empty */ +#line 611 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2308 "yacc_sql.cpp" +#line 2320 "yacc_sql.cpp" break; - case 73: /* alias: ID */ -#line 610 "yacc_sql.y" + case 74: /* alias: ID */ +#line 614 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2316 "yacc_sql.cpp" +#line 2328 "yacc_sql.cpp" break; - case 74: /* alias: AS ID */ -#line 613 "yacc_sql.y" + case 75: /* alias: AS ID */ +#line 617 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2324 "yacc_sql.cpp" +#line 2336 "yacc_sql.cpp" break; - case 75: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 619 "yacc_sql.y" + case 76: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 623 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2332,29 +2344,37 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2336 "yacc_sql.cpp" +#line 2348 "yacc_sql.cpp" break; - case 76: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 627 "yacc_sql.y" + case 77: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 631 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2344 "yacc_sql.cpp" +#line 2356 "yacc_sql.cpp" break; - case 77: /* rel_attr: ID */ -#line 632 "yacc_sql.y" + case 78: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 638 "yacc_sql.y" + { + (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); + } +#line 2364 "yacc_sql.cpp" + break; + + case 79: /* rel_attr: ID */ +#line 644 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2354 "yacc_sql.cpp" +#line 2374 "yacc_sql.cpp" break; - case 78: /* rel_attr: ID DOT ID */ -#line 637 "yacc_sql.y" + case 80: /* rel_attr: ID DOT ID */ +#line 649 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2362,19 +2382,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2366 "yacc_sql.cpp" +#line 2386 "yacc_sql.cpp" break; - case 79: /* relation: ID */ -#line 647 "yacc_sql.y" + case 81: /* relation: ID */ +#line 659 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2374 "yacc_sql.cpp" +#line 2394 "yacc_sql.cpp" break; - case 80: /* rel_list: relation alias */ -#line 652 "yacc_sql.y" + case 82: /* rel_list: relation alias */ +#line 664 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2385,11 +2405,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2389 "yacc_sql.cpp" +#line 2409 "yacc_sql.cpp" break; - case 81: /* rel_list: relation alias COMMA rel_list */ -#line 662 "yacc_sql.y" + case 83: /* rel_list: relation alias COMMA rel_list */ +#line 674 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2405,252 +2425,196 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); } -#line 2409 "yacc_sql.cpp" - break; - - case 82: /* where: %empty */ -#line 681 "yacc_sql.y" - { - (yyval.condition_list) = nullptr; - } -#line 2417 "yacc_sql.cpp" - break; - - case 83: /* where: WHERE condition_list */ -#line 684 "yacc_sql.y" - { - (yyval.condition_list) = (yyvsp[0].condition_list); - } -#line 2425 "yacc_sql.cpp" +#line 2429 "yacc_sql.cpp" break; - case 84: /* condition_list: %empty */ -#line 690 "yacc_sql.y" + case 84: /* where: %empty */ +#line 693 "yacc_sql.y" { - (yyval.condition_list) = nullptr; + (yyval.expression) = nullptr; } -#line 2433 "yacc_sql.cpp" +#line 2437 "yacc_sql.cpp" break; - case 85: /* condition_list: condition */ -#line 693 "yacc_sql.y" - { - (yyval.condition_list) = new std::vector; - (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); - delete (yyvsp[0].condition); + case 85: /* where: WHERE condition */ +#line 696 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); } -#line 2443 "yacc_sql.cpp" +#line 2445 "yacc_sql.cpp" break; - case 86: /* condition_list: condition AND condition_list */ -#line 698 "yacc_sql.y" - { - (yyval.condition_list) = (yyvsp[0].condition_list); - (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); - delete (yyvsp[-2].condition); - } + case 86: /* condition: expression comp_op expression */ +#line 703 "yacc_sql.y" + { + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); + } #line 2453 "yacc_sql.cpp" break; - case 87: /* condition: rel_attr comp_op value */ -#line 706 "yacc_sql.y" - { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 1; - (yyval.condition)->left_attr = *(yyvsp[-2].rel_attr); - (yyval.condition)->right_is_attr = 0; - (yyval.condition)->right_value = *(yyvsp[0].value); - (yyval.condition)->comp = (yyvsp[-1].comp); - - delete (yyvsp[-2].rel_attr); - delete (yyvsp[0].value); - } -#line 2469 "yacc_sql.cpp" - break; - - case 88: /* condition: value comp_op value */ -#line 718 "yacc_sql.y" - { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 0; - (yyval.condition)->left_value = *(yyvsp[-2].value); - (yyval.condition)->right_is_attr = 0; - (yyval.condition)->right_value = *(yyvsp[0].value); - (yyval.condition)->comp = (yyvsp[-1].comp); - - delete (yyvsp[-2].value); - delete (yyvsp[0].value); - } -#line 2485 "yacc_sql.cpp" - break; - - case 89: /* condition: rel_attr comp_op rel_attr */ -#line 730 "yacc_sql.y" - { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 1; - (yyval.condition)->left_attr = *(yyvsp[-2].rel_attr); - (yyval.condition)->right_is_attr = 1; - (yyval.condition)->right_attr = *(yyvsp[0].rel_attr); - (yyval.condition)->comp = (yyvsp[-1].comp); - - delete (yyvsp[-2].rel_attr); - delete (yyvsp[0].rel_attr); - } -#line 2501 "yacc_sql.cpp" + case 87: /* condition: condition AND condition */ +#line 707 "yacc_sql.y" + { + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + } +#line 2461 "yacc_sql.cpp" break; - case 90: /* condition: value comp_op rel_attr */ -#line 742 "yacc_sql.y" - { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 0; - (yyval.condition)->left_value = *(yyvsp[-2].value); - (yyval.condition)->right_is_attr = 1; - (yyval.condition)->right_attr = *(yyvsp[0].rel_attr); - (yyval.condition)->comp = (yyvsp[-1].comp); - - delete (yyvsp[-2].value); - delete (yyvsp[0].rel_attr); - } -#line 2517 "yacc_sql.cpp" + case 88: /* condition: condition OR condition */ +#line 711 "yacc_sql.y" + { + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + } +#line 2469 "yacc_sql.cpp" break; - case 91: /* comp_op: EQ */ -#line 756 "yacc_sql.y" + case 89: /* comp_op: EQ */ +#line 717 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2523 "yacc_sql.cpp" +#line 2475 "yacc_sql.cpp" break; - case 92: /* comp_op: LT */ -#line 757 "yacc_sql.y" + case 90: /* comp_op: LT */ +#line 718 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2529 "yacc_sql.cpp" +#line 2481 "yacc_sql.cpp" break; - case 93: /* comp_op: GT */ -#line 758 "yacc_sql.y" + case 91: /* comp_op: GT */ +#line 719 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2535 "yacc_sql.cpp" +#line 2487 "yacc_sql.cpp" break; - case 94: /* comp_op: LE */ -#line 759 "yacc_sql.y" + case 92: /* comp_op: LE */ +#line 720 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2541 "yacc_sql.cpp" +#line 2493 "yacc_sql.cpp" break; - case 95: /* comp_op: GE */ -#line 760 "yacc_sql.y" + case 93: /* comp_op: GE */ +#line 721 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2547 "yacc_sql.cpp" +#line 2499 "yacc_sql.cpp" break; - case 96: /* comp_op: NE */ -#line 761 "yacc_sql.y" + case 94: /* comp_op: NE */ +#line 722 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2553 "yacc_sql.cpp" +#line 2505 "yacc_sql.cpp" break; - case 97: /* comp_op: IS */ -#line 762 "yacc_sql.y" + case 95: /* comp_op: IS */ +#line 723 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2559 "yacc_sql.cpp" +#line 2511 "yacc_sql.cpp" break; - case 98: /* comp_op: IS NOT */ -#line 763 "yacc_sql.y" + case 96: /* comp_op: IS NOT */ +#line 724 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2565 "yacc_sql.cpp" +#line 2517 "yacc_sql.cpp" break; - case 99: /* comp_op: LIKE */ -#line 764 "yacc_sql.y" + case 97: /* comp_op: LIKE */ +#line 725 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2571 "yacc_sql.cpp" +#line 2523 "yacc_sql.cpp" break; - case 100: /* comp_op: NOT LIKE */ -#line 765 "yacc_sql.y" + case 98: /* comp_op: NOT LIKE */ +#line 726 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2577 "yacc_sql.cpp" +#line 2529 "yacc_sql.cpp" + break; + + case 99: /* comp_op: IN */ +#line 727 "yacc_sql.y" + { (yyval.comp) = IN_OP; } +#line 2535 "yacc_sql.cpp" + break; + + case 100: /* comp_op: NOT IN */ +#line 728 "yacc_sql.y" + { (yyval.comp) = NOT_IN_OP; } +#line 2541 "yacc_sql.cpp" break; case 101: /* opt_order_by: %empty */ -#line 770 "yacc_sql.y" +#line 733 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2585 "yacc_sql.cpp" +#line 2549 "yacc_sql.cpp" break; case 102: /* opt_order_by: ORDER BY sort_list */ -#line 774 "yacc_sql.y" +#line 737 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2594 "yacc_sql.cpp" +#line 2558 "yacc_sql.cpp" break; case 103: /* sort_list: sort_unit */ -#line 781 "yacc_sql.y" +#line 744 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2603 "yacc_sql.cpp" +#line 2567 "yacc_sql.cpp" break; case 104: /* sort_list: sort_unit COMMA sort_list */ -#line 787 "yacc_sql.y" +#line 750 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2612 "yacc_sql.cpp" +#line 2576 "yacc_sql.cpp" break; case 105: /* sort_unit: expression */ -#line 794 "yacc_sql.y" +#line 757 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2622 "yacc_sql.cpp" +#line 2586 "yacc_sql.cpp" break; case 106: /* sort_unit: expression DESC */ -#line 801 "yacc_sql.y" +#line 764 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2632 "yacc_sql.cpp" +#line 2596 "yacc_sql.cpp" break; case 107: /* sort_unit: expression ASC */ -#line 808 "yacc_sql.y" +#line 771 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode();//默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2642 "yacc_sql.cpp" +#line 2606 "yacc_sql.cpp" break; case 108: /* group_by: %empty */ -#line 816 "yacc_sql.y" +#line 779 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2650 "yacc_sql.cpp" +#line 2614 "yacc_sql.cpp" break; case 109: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 822 "yacc_sql.y" +#line 785 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2660,20 +2624,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2664 "yacc_sql.cpp" +#line 2628 "yacc_sql.cpp" break; case 110: /* explain_stmt: EXPLAIN command_wrapper */ -#line 835 "yacc_sql.y" +#line 798 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2673 "yacc_sql.cpp" +#line 2637 "yacc_sql.cpp" break; case 111: /* set_variable_stmt: SET ID EQ value */ -#line 843 "yacc_sql.y" +#line 806 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2681,11 +2645,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2685 "yacc_sql.cpp" +#line 2649 "yacc_sql.cpp" break; -#line 2689 "yacc_sql.cpp" +#line 2653 "yacc_sql.cpp" default: break; } @@ -2914,7 +2878,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 855 "yacc_sql.y" +#line 818 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index dd834b63..1d77174f 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -60,61 +60,64 @@ extern int yydebug; BY = 261, /* BY */ CREATE = 262, /* CREATE */ DROP = 263, /* DROP */ - GROUP = 264, /* GROUP */ - ORDER = 265, /* ORDER */ - TABLE = 266, /* TABLE */ - TABLES = 267, /* TABLES */ - INDEX = 268, /* INDEX */ - CALC = 269, /* CALC */ - SELECT = 270, /* SELECT */ - DESC = 271, /* DESC */ - SHOW = 272, /* SHOW */ - SYNC = 273, /* SYNC */ - INSERT = 274, /* INSERT */ - DELETE = 275, /* DELETE */ - UPDATE = 276, /* UPDATE */ - LBRACE = 277, /* LBRACE */ - RBRACE = 278, /* RBRACE */ - COMMA = 279, /* COMMA */ - TRX_BEGIN = 280, /* TRX_BEGIN */ - TRX_COMMIT = 281, /* TRX_COMMIT */ - TRX_ROLLBACK = 282, /* TRX_ROLLBACK */ - INT_T = 283, /* INT_T */ - STRING_T = 284, /* STRING_T */ - FLOAT_T = 285, /* FLOAT_T */ - DATE_T = 286, /* DATE_T */ - NOT = 287, /* NOT */ - NULL_T = 288, /* NULL_T */ - NULLABLE = 289, /* NULLABLE */ - HELP = 290, /* HELP */ - EXIT = 291, /* EXIT */ - DOT = 292, /* DOT */ - INTO = 293, /* INTO */ - VALUES = 294, /* VALUES */ - FROM = 295, /* FROM */ - WHERE = 296, /* WHERE */ - AND = 297, /* AND */ - SET = 298, /* SET */ - ON = 299, /* ON */ - LOAD = 300, /* LOAD */ - DATA = 301, /* DATA */ - INFILE = 302, /* INFILE */ - EXPLAIN = 303, /* EXPLAIN */ - STORAGE = 304, /* STORAGE */ - FORMAT = 305, /* FORMAT */ - EQ = 306, /* EQ */ - LT = 307, /* LT */ - GT = 308, /* GT */ - LE = 309, /* LE */ - GE = 310, /* GE */ - NE = 311, /* NE */ - LIKE = 312, /* LIKE */ - IS = 313, /* IS */ - NUMBER = 314, /* NUMBER */ - FLOAT = 315, /* FLOAT */ - ID = 316, /* ID */ - SSS = 317, /* SSS */ - UMINUS = 318 /* UMINUS */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + ORDER = 266, /* ORDER */ + TABLE = 267, /* TABLE */ + TABLES = 268, /* TABLES */ + INDEX = 269, /* INDEX */ + CALC = 270, /* CALC */ + SELECT = 271, /* SELECT */ + DESC = 272, /* DESC */ + SHOW = 273, /* SHOW */ + SYNC = 274, /* SYNC */ + INSERT = 275, /* INSERT */ + DELETE = 276, /* DELETE */ + UPDATE = 277, /* UPDATE */ + LBRACE = 278, /* LBRACE */ + RBRACE = 279, /* RBRACE */ + COMMA = 280, /* COMMA */ + TRX_BEGIN = 281, /* TRX_BEGIN */ + TRX_COMMIT = 282, /* TRX_COMMIT */ + TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ + INT_T = 284, /* INT_T */ + IN = 285, /* IN */ + STRING_T = 286, /* STRING_T */ + FLOAT_T = 287, /* FLOAT_T */ + DATE_T = 288, /* DATE_T */ + NOT = 289, /* NOT */ + NULL_T = 290, /* NULL_T */ + NULLABLE = 291, /* NULLABLE */ + HELP = 292, /* HELP */ + EXIT = 293, /* EXIT */ + DOT = 294, /* DOT */ + INTO = 295, /* INTO */ + VALUES = 296, /* VALUES */ + FROM = 297, /* FROM */ + WHERE = 298, /* WHERE */ + AND = 299, /* AND */ + OR = 300, /* OR */ + SET = 301, /* SET */ + ON = 302, /* ON */ + LOAD = 303, /* LOAD */ + DATA = 304, /* DATA */ + INFILE = 305, /* INFILE */ + EXPLAIN = 306, /* EXPLAIN */ + STORAGE = 307, /* STORAGE */ + FORMAT = 308, /* FORMAT */ + EQ = 309, /* EQ */ + LT = 310, /* LT */ + GT = 311, /* GT */ + LE = 312, /* LE */ + GE = 313, /* GE */ + NE = 314, /* NE */ + LIKE = 315, /* LIKE */ + IS = 316, /* IS */ + NUMBER = 317, /* NUMBER */ + FLOAT = 318, /* FLOAT */ + ID = 319, /* ID */ + SSS = 320, /* SSS */ + UMINUS = 321 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -123,10 +126,9 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 125 "yacc_sql.y" +#line 128 "yacc_sql.y" ParsedSqlNode * sql_node; - ConditionSqlNode * condition; Value * value; enum CompOp comp; RelAttrSqlNode * rel_attr; @@ -135,7 +137,6 @@ union YYSTYPE Expression * expression; std::vector> * expression_list; std::vector * value_list; - std::vector * condition_list; std::vector * rel_attr_list; std::vector * relation_list; OrderBySqlNode* orderby_unit; @@ -145,7 +146,7 @@ union YYSTYPE float floats; bool nullable_info; -#line 149 "yacc_sql.hpp" +#line 150 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index f91c0bc5..77941a3d 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -106,6 +106,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, FROM WHERE AND + OR SET ON LOAD @@ -126,7 +127,6 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, /** union 中定义各种数据类型,真实生成的代码也是union类型,所以不能有非POD类型的数据 **/ %union { ParsedSqlNode * sql_node; - ConditionSqlNode * condition; Value * value; enum CompOp comp; RelAttrSqlNode * rel_attr; @@ -135,7 +135,6 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, Expression * expression; std::vector> * expression_list; std::vector * value_list; - std::vector * condition_list; std::vector * rel_attr_list; std::vector * relation_list; OrderBySqlNode* orderby_unit; @@ -154,7 +153,6 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, /** type 定义了各种解析后的结果输出的是什么类型。类型对应了 union 中的定义的成员变量名称 **/ %type type -%type condition %type value %type number %type relation @@ -165,12 +163,13 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type attr_def_list %type attr_def %type value_list -%type where -%type condition_list +%type condition %type storage_format %type rel_list %type expression +%type where %type aggr_func_expr +%type sub_query_expr %type expression_list %type group_by %type sort_unit @@ -200,6 +199,8 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, // commands should be a list but I use a single command instead %type commands +%left OR +%left AND %left '+' '-' %left '*' '/' %nonassoc UMINUS @@ -481,7 +482,7 @@ delete_stmt: /* delete 语句的语法解析树*/ $$ = new ParsedSqlNode(SCF_DELETE); $$->deletion.relation_name = $3; if ($4 != nullptr) { - $$->deletion.conditions.swap(*$4); + $$->deletion.condition = std::unique_ptr($4); delete $4; } free($3); @@ -495,8 +496,7 @@ update_stmt: /* update 语句的语法解析树*/ $$->update.attribute_name = $4; $$->update.value = *$6; if ($7 != nullptr) { - $$->update.conditions.swap(*$7); - delete $7; + $$->update.condition=std::unique_ptr($7); } free($2); free($4); @@ -515,10 +515,9 @@ select_stmt: /* select 语句的语法解析树*/ $$->selection.relations.swap(*$4); delete $4; } - + $$->selection.condition = nullptr; if ($5 != nullptr) { - $$->selection.conditions.swap(*$5); - delete $5; + $$->selection.condition = std::unique_ptr($5); } if ($6 != nullptr) { @@ -602,6 +601,9 @@ expression: | aggr_func_expr { $$ = $1; // AggrFuncExpr } + | sub_query_expr { + $$ = $1; // SubQueryExpr + } // your code here ; @@ -630,6 +632,14 @@ aggr_func_expr: $$ = new UnboundAggregateExpr("max",new StarExpr() ); } ; + +sub_query_expr: + LBRACE select_stmt RBRACE + { + $$ = new SubQueryExpr($2->selection); + } + ; + rel_attr: ID { $$ = new RelAttrSqlNode; @@ -683,75 +693,24 @@ where: { $$ = nullptr; } - | WHERE condition_list { + | WHERE condition { $$ = $2; } ; -condition_list: - /* empty */ - { - $$ = nullptr; - } - | condition { - $$ = new std::vector; - $$->emplace_back(*$1); - delete $1; - } - | condition AND condition_list { - $$ = $3; - $$->emplace_back(*$1); - delete $1; - } - ; -condition: - rel_attr comp_op value - { - $$ = new ConditionSqlNode; - $$->left_is_attr = 1; - $$->left_attr = *$1; - $$->right_is_attr = 0; - $$->right_value = *$3; - $$->comp = $2; - - delete $1; - delete $3; - } - | value comp_op value - { - $$ = new ConditionSqlNode; - $$->left_is_attr = 0; - $$->left_value = *$1; - $$->right_is_attr = 0; - $$->right_value = *$3; - $$->comp = $2; - - delete $1; - delete $3; - } - | rel_attr comp_op rel_attr - { - $$ = new ConditionSqlNode; - $$->left_is_attr = 1; - $$->left_attr = *$1; - $$->right_is_attr = 1; - $$->right_attr = *$3; - $$->comp = $2; - - delete $1; - delete $3; - } - | value comp_op rel_attr - { - $$ = new ConditionSqlNode; - $$->left_is_attr = 0; - $$->left_value = *$1; - $$->right_is_attr = 1; - $$->right_attr = *$3; - $$->comp = $2; - delete $1; - delete $3; - } +condition: + expression comp_op expression + { + $$ = new ComparisonExpr($2, $1, $3); + } + | condition AND condition + { + $$ = new ConjunctionExpr(ConjunctionExpr::Type::AND, $1, $3); + } + | condition OR condition + { + $$ = new ConjunctionExpr(ConjunctionExpr::Type::OR, $1, $3); + } ; comp_op: @@ -765,6 +724,8 @@ comp_op: | IS NOT { $$ = OP_IS_NOT; } | LIKE { $$ = LIKE_OP;} | NOT LIKE {$$ = NOT_LIKE_OP;} + | IN { $$ = IN_OP; } + | NOT IN { $$ = NOT_IN_OP; } ; opt_order_by: diff --git a/src/observer/sql/stmt/delete_stmt.cpp b/src/observer/sql/stmt/delete_stmt.cpp index 36f8c1f8..0daa7135 100644 --- a/src/observer/sql/stmt/delete_stmt.cpp +++ b/src/observer/sql/stmt/delete_stmt.cpp @@ -28,7 +28,7 @@ DeleteStmt::~DeleteStmt() } } -RC DeleteStmt::create(Db *db, const DeleteSqlNode &delete_sql, Stmt *&stmt) +RC DeleteStmt::create(Db *db, DeleteSqlNode &delete_sql, Stmt *&stmt) { const char *table_name = delete_sql.relation_name.c_str(); if (nullptr == db || nullptr == table_name) { @@ -47,8 +47,7 @@ RC DeleteStmt::create(Db *db, const DeleteSqlNode &delete_sql, Stmt *&stmt) table_map.insert(std::pair(std::string(table_name), table)); FilterStmt *filter_stmt = nullptr; - RC rc = FilterStmt::create( - db, table, &table_map, delete_sql.conditions.data(), static_cast(delete_sql.conditions.size()), filter_stmt); + RC rc = FilterStmt::create(db, table, &table_map, delete_sql.condition, filter_stmt); if (rc != RC::SUCCESS) { LOG_WARN("failed to create filter statement. rc=%d:%s", rc, strrc(rc)); return rc; diff --git a/src/observer/sql/stmt/delete_stmt.h b/src/observer/sql/stmt/delete_stmt.h index 33cda12a..b9f39ceb 100644 --- a/src/observer/sql/stmt/delete_stmt.h +++ b/src/observer/sql/stmt/delete_stmt.h @@ -36,7 +36,7 @@ class DeleteStmt : public Stmt StmtType type() const override { return StmtType::DELETE; } public: - static RC create(Db *db, const DeleteSqlNode &delete_sql, Stmt *&stmt); + static RC create(Db *db, DeleteSqlNode &delete_sql, Stmt *&stmt); private: Table *table_ = nullptr; diff --git a/src/observer/sql/stmt/filter_stmt.cpp b/src/observer/sql/stmt/filter_stmt.cpp index 44b1d1a1..9d17bbcd 100644 --- a/src/observer/sql/stmt/filter_stmt.cpp +++ b/src/observer/sql/stmt/filter_stmt.cpp @@ -19,114 +19,41 @@ See the Mulan PSL v2 for more details. */ #include "storage/db/db.h" #include "storage/table/table.h" -FilterStmt::~FilterStmt() -{ - for (FilterUnit *unit : filter_units_) { - delete unit; - } - filter_units_.clear(); -} +FilterStmt::~FilterStmt() = default; RC FilterStmt::create(Db *db, Table *default_table, std::unordered_map *tables, - const ConditionSqlNode *conditions, int condition_num, FilterStmt *&stmt) + std::unique_ptr &condition, FilterStmt *&stmt) { RC rc = RC::SUCCESS; stmt = nullptr; - - FilterStmt *tmp_stmt = new FilterStmt(); - for (int i = 0; i < condition_num; i++) { - FilterUnit *filter_unit = nullptr; - - rc = create_filter_unit(db, default_table, tables, conditions[i], filter_unit); - if (rc != RC::SUCCESS) { - delete tmp_stmt; - LOG_WARN("failed to create filter unit. condition index=%d", i); - return rc; - } - tmp_stmt->filter_units_.push_back(filter_unit); + // 1、 没有条件直接返回 + if (nullptr == condition) { + return rc; } - stmt = tmp_stmt; - return rc; -} + // 2、 检查条件的合法性 + vector> cond_expressions; + BinderContext binder_context; -RC get_table_and_field(Db *db, Table *default_table, std::unordered_map *tables, - const RelAttrSqlNode &attr, Table *&table, const FieldMeta *&field) -{ - if (common::is_blank(attr.relation_name.c_str())) { - table = default_table; - } else if (nullptr != tables) { - auto iter = tables->find(attr.relation_name); - if (iter != tables->end()) { - table = iter->second; + if (tables != nullptr) { + for (const auto &i : *tables) { + binder_context.add_table(i.second); } - } else { - table = db->find_table(attr.relation_name.c_str()); - } - if (nullptr == table) { - LOG_WARN("No such table: attr.relation_name: %s", attr.relation_name.c_str()); - return RC::SCHEMA_TABLE_NOT_EXIST; } + binder_context.add_db(db); + binder_context.set_tables(tables); + ExpressionBinder expression_binder(binder_context); - field = table->table_meta().field(attr.attribute_name.c_str()); - if (nullptr == field) { - LOG_WARN("no such field in table: table %s, field %s", table->name(), attr.attribute_name.c_str()); - table = nullptr; - return RC::SCHEMA_FIELD_NOT_EXIST; - } - - return RC::SUCCESS; -} + rc = expression_binder.bind_expression(condition, cond_expressions); -RC FilterStmt::create_filter_unit(Db *db, Table *default_table, std::unordered_map *tables, - const ConditionSqlNode &condition, FilterUnit *&filter_unit) -{ - RC rc = RC::SUCCESS; - - CompOp comp = condition.comp; - if (comp < EQUAL_TO || comp >= NO_OP) { - LOG_WARN("invalid compare operator : %d", comp); - return RC::INVALID_ARGUMENT; - } - - filter_unit = new FilterUnit; - - if (condition.left_is_attr) { - Table *table = nullptr; - const FieldMeta *field = nullptr; - rc = get_table_and_field(db, default_table, tables, condition.left_attr, table, field); - if (rc != RC::SUCCESS) { - LOG_WARN("cannot find attr"); - return rc; - } - FilterObj filter_obj; - filter_obj.init_attr(Field(table, field)); - filter_unit->set_left(filter_obj); - } else { - FilterObj filter_obj; - filter_obj.init_value(condition.left_value); - filter_unit->set_left(filter_obj); + if (OB_FAIL(rc)) { + LOG_WARN("CAN NOT PASS CONDITION CHECK!"); + return rc; } + FilterStmt *tmp_stmt = new FilterStmt(); + tmp_stmt->condition_ = std::move(cond_expressions[0]); - if (condition.right_is_attr) { - Table *table = nullptr; - const FieldMeta *field = nullptr; - rc = get_table_and_field(db, default_table, tables, condition.right_attr, table, field); - if (rc != RC::SUCCESS) { - LOG_WARN("cannot find attr"); - return rc; - } - FilterObj filter_obj; - filter_obj.init_attr(Field(table, field)); - filter_unit->set_right(filter_obj); - } else { - FilterObj filter_obj; - filter_obj.init_value(condition.right_value); - filter_unit->set_right(filter_obj); - } - - filter_unit->set_comp(comp); - - // 检查两个类型是否能够比较 + stmt = tmp_stmt; return rc; } + diff --git a/src/observer/sql/stmt/filter_stmt.h b/src/observer/sql/stmt/filter_stmt.h index 27017782..6be324a1 100644 --- a/src/observer/sql/stmt/filter_stmt.h +++ b/src/observer/sql/stmt/filter_stmt.h @@ -17,6 +17,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/expr/expression.h" #include "sql/parser/parse_defs.h" #include "sql/stmt/stmt.h" +#include "sql/parser/expression_binder.h" #include #include @@ -24,47 +25,6 @@ class Db; class Table; class FieldMeta; -struct FilterObj -{ - bool is_attr; - Field field; - Value value; - - void init_attr(const Field &field) - { - is_attr = true; - this->field = field; - } - - void init_value(const Value &value) - { - is_attr = false; - this->value = value; - } -}; - -class FilterUnit -{ -public: - FilterUnit() = default; - ~FilterUnit() {} - - void set_comp(CompOp comp) { comp_ = comp; } - - CompOp comp() const { return comp_; } - - void set_left(const FilterObj &obj) { left_ = obj; } - void set_right(const FilterObj &obj) { right_ = obj; } - - const FilterObj &left() const { return left_; } - const FilterObj &right() const { return right_; } - -private: - CompOp comp_ = NO_OP; - FilterObj left_; - FilterObj right_; -}; - /** * @brief Filter/谓词/过滤语句 * @ingroup Statement @@ -72,19 +32,20 @@ class FilterUnit class FilterStmt { public: - FilterStmt() = default; + FilterStmt() = default; virtual ~FilterStmt(); -public: - const std::vector &filter_units() const { return filter_units_; } - public: static RC create(Db *db, Table *default_table, std::unordered_map *tables, - const ConditionSqlNode *conditions, int condition_num, FilterStmt *&stmt); + std::unique_ptr &condition, FilterStmt *&stmt); - static RC create_filter_unit(Db *db, Table *default_table, std::unordered_map *tables, - const ConditionSqlNode &condition, FilterUnit *&filter_unit); + bool condition_empty() const { return nullptr == condition_; } + std::unique_ptr &condition() { return condition_; } + +private: + RC bind_expressions_recursively(ExpressionBinder &expression_binder, unique_ptr &condition, + vector> &cond_expressions); private: - std::vector filter_units_; // 默认当前都是AND关系 + std::unique_ptr condition_; }; diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 7de017ce..20531f76 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -43,7 +43,7 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt) // collect tables in `from` statement vector
tables; unordered_map table_map; - unordered_map table_alias_map; + // unordered_map table_alias_map; for (size_t i = 0; i < select_sql.relations.size(); i++) { const char *table_name = select_sql.relations[i].relation.c_str(); if (nullptr == table_name) { @@ -59,14 +59,14 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt) // 建立别名 const string &table_alias = select_sql.relations[i].alias; if (!table_alias.empty()) { - table_alias_map[table_alias] = table_name; + table_map.insert({table_alias, table}); } binder_context.add_table(table); tables.push_back(table); table_map.insert({table_name, table}); } - binder_context.add_table_alias_map(table_alias_map); + binder_context.set_tables(&table_map); // collect query fields in `select` statement vector> bound_expressions; @@ -96,12 +96,7 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt) // create filter statement in `where` statement FilterStmt *filter_stmt = nullptr; - RC rc = FilterStmt::create(db, - default_table, - &table_map, - select_sql.conditions.data(), - static_cast(select_sql.conditions.size()), - filter_stmt); + RC rc = FilterStmt::create(db, default_table, &table_map, select_sql.condition, filter_stmt); if (rc != RC::SUCCESS) { LOG_WARN("cannot construct filter stmt"); return rc; diff --git a/src/observer/sql/stmt/select_stmt.h b/src/observer/sql/stmt/select_stmt.h index cfb04880..3faf245d 100644 --- a/src/observer/sql/stmt/select_stmt.h +++ b/src/observer/sql/stmt/select_stmt.h @@ -33,10 +33,11 @@ class Table; class SelectStmt : public Stmt { public: - SelectStmt() = default; + SelectStmt() = default; ~SelectStmt() override; StmtType type() const override { return StmtType::SELECT; } + size_t query_expressions_size() const { return query_expressions_.size(); } public: static RC create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt); diff --git a/src/observer/sql/stmt/update_stmt.cpp b/src/observer/sql/stmt/update_stmt.cpp index 946f3dad..dde6a160 100644 --- a/src/observer/sql/stmt/update_stmt.cpp +++ b/src/observer/sql/stmt/update_stmt.cpp @@ -22,7 +22,7 @@ UpdateStmt::UpdateStmt(Table *table, const char *attribute_name, const Value *va : table_(table), attribute_name_(attribute_name), values_(values), filter_stmt_(filter_stmt) {} -RC UpdateStmt::create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt) +RC UpdateStmt::create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt) { // TODO const char *table_name = update_sql.relation_name.c_str(); @@ -69,8 +69,7 @@ RC UpdateStmt::create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt) table_map.insert(std::pair(std::string(table_name), table)); FilterStmt *filter_stmt = nullptr; - RC rc = FilterStmt::create( - db, table, &table_map, update_sql.conditions.data(), static_cast(update_sql.conditions.size()), filter_stmt); + RC rc = FilterStmt::create(db, table, &table_map, update_sql.condition, filter_stmt); if (rc != RC::SUCCESS) { LOG_WARN("failed to create filter statement. rc=%d:%s", rc, strrc(rc)); return rc; diff --git a/src/observer/sql/stmt/update_stmt.h b/src/observer/sql/stmt/update_stmt.h index cb451f98..2949ddd9 100644 --- a/src/observer/sql/stmt/update_stmt.h +++ b/src/observer/sql/stmt/update_stmt.h @@ -39,7 +39,7 @@ class UpdateStmt : public Stmt int value_amount() const { return value_amount_; } public: - static RC create(Db *db, const UpdateSqlNode &update_sql, Stmt *&stmt); + static RC create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt); private: Table *table_ = nullptr; From 6810983ec6423de297e3d9adc69a0578cfcb7faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Mon, 30 Sep 2024 16:54:09 +0000 Subject: [PATCH 071/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86delete?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 77 ++++++--- src/observer/sql/expr/expression.h | 26 +-- src/observer/sql/parser/yacc_sql.cpp | 241 +++++++++++++-------------- src/observer/sql/parser/yacc_sql.y | 1 - 4 files changed, 188 insertions(+), 157 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index fa4f44fb..422ab976 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -205,29 +205,11 @@ RC ComparisonExpr::try_get_value(Value &cell) const return RC::INVALID_ARGUMENT; } -RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) -{ +RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { Value left_value; Value right_value; - SubQueryExpr *left_subquery_expr = nullptr; - if (left_->type() == ExprType::SUBQUERY) { - left_subquery_expr = dynamic_cast(left_.get()); - } - SubQueryExpr *right_subquery_expr = nullptr; - if (right_->type() == ExprType::SUBQUERY) { - right_subquery_expr = dynamic_cast(right_.get()); - } - - // 特殊处理 EXISTS 和 NOT EXISTS 操作 - if (comp_ == EXISTS_OP || comp_ == NOT_EXISTS_OP) { - RC rc = right_->get_value(tuple, right_value); - bool exists = (rc == RC::SUCCESS); - value.set_boolean(comp_ == EXISTS_OP ? exists : !exists); - return exists ? RC::SUCCESS : RC::RECORD_EOF; - } - - // 获取表达式的值,如果是子查询且没有结果,返回 NULL + // 辅助函数:获取表达式值,处理子查询返回值 auto get_expr_value = [&tuple](const std::unique_ptr &expr, Value &value) -> RC { RC rc = expr->get_value(tuple, value); if (expr->type() == ExprType::SUBQUERY && rc == RC::RECORD_EOF) { @@ -237,26 +219,56 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) return rc; }; + // 辅助函数:检查表达式是否为子查询并返回类型转换后的指针 + auto get_subquery_expr = [](const std::unique_ptr &expr) -> SubQueryExpr* { + return expr->type() == ExprType::SUBQUERY ? dynamic_cast(expr.get()) : nullptr; + }; + + // 检查左侧和右侧是否为子查询表达式 + SubQueryExpr *left_subquery_expr = get_subquery_expr(left_); + SubQueryExpr *right_subquery_expr = get_subquery_expr(right_); + + // 处理 EXISTS 和 NOT EXISTS 操作 + if (comp_ == EXISTS_OP || comp_ == NOT_EXISTS_OP) { + RC rc = right_->get_value(tuple, right_value); + bool exists = (rc == RC::SUCCESS); + value.set_boolean(comp_ == EXISTS_OP ? exists : !exists); + // 调用 right_subquery_expr->close() 确保资源释放 + if (right_subquery_expr) { + right_subquery_expr->close(); + } + return exists ? RC::SUCCESS : RC::RECORD_EOF; + } + // 获取左值 RC rc = get_expr_value(left_, left_value); if (rc != RC::SUCCESS) { LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); + // 调用 left_subquery_expr->close() 确保资源释放 + if (left_subquery_expr) { + left_subquery_expr->close(); + } return rc; } + // 检查子查询是否有多行结果 if (left_subquery_expr && left_subquery_expr->has_more_row(tuple)) { + left_subquery_expr->close(); // 关闭子查询 return RC::INVALID_ARGUMENT; } - // IN 和 NOT IN 操作 + // 处理 IN 和 NOT IN 操作 if (comp_ == IN_OP || comp_ == NOT_IN_OP) { if (left_value.is_null()) { value.set_boolean(false); + if (right_subquery_expr) { + right_subquery_expr->close(); // 关闭子查询 + } return RC::SUCCESS; } bool has_match = false; - bool has_null = false; + bool has_null = false; while (RC::SUCCESS == (rc = right_->get_value(tuple, right_value))) { if (right_value.is_null()) { @@ -268,6 +280,10 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) bool result = (comp_ == IN_OP) ? has_match : (!has_null && !has_match); value.set_boolean(result); + // 调用 right_subquery_expr->close() 确保资源释放 + if (right_subquery_expr) { + right_subquery_expr->close(); + } return (rc == RC::RECORD_EOF) ? RC::SUCCESS : rc; } @@ -275,22 +291,37 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) rc = get_expr_value(right_, right_value); if (rc != RC::SUCCESS) { LOG_WARN("failed to get value of right expression. rc=%s", strrc(rc)); + if (right_subquery_expr) { + right_subquery_expr->close(); + } return rc; } + // 检查右侧子查询是否有多行结果 if (right_subquery_expr && right_subquery_expr->has_more_row(tuple)) { + right_subquery_expr->close(); return RC::INVALID_ARGUMENT; } // 比较左值和右值 bool bool_value = false; - rc = compare_value(left_value, right_value, bool_value); + rc = compare_value(left_value, right_value, bool_value); if (rc == RC::SUCCESS) { value.set_boolean(bool_value); } + + // 调用 left_subquery_expr 和 right_subquery_expr 的 close 确保资源释放 + if (left_subquery_expr) { + left_subquery_expr->close(); + } + if (right_subquery_expr) { + right_subquery_expr->close(); + } + return rc; } + RC ComparisonExpr::eval(Chunk &chunk, std::vector &select) { RC rc = RC::SUCCESS; diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 053e3fdc..b7156792 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -77,7 +77,7 @@ class Expression /** * @brief 根据具体的tuple,来计算当前表达式的值。tuple有可能是一个具体某个表的行数据 */ - virtual RC get_value(const Tuple &tuple, Value &value) = 0; + virtual RC get_value(const Tuple &tuple, Value &value) = 0; /** * @brief 在没有实际运行的情况下,也就是无法获取tuple的情况下,尝试获取表达式的值 @@ -165,7 +165,7 @@ class StarExpr : public Expression ExprType type() const override { return ExprType::STAR; } AttrType value_type() const override { return AttrType::UNDEFINED; } - RC get_value(const Tuple &tuple, Value &value) override { return RC::UNIMPLEMENTED; } // 不需要实现 + RC get_value(const Tuple &tuple, Value &value) override { return RC::UNIMPLEMENTED; } // 不需要实现 const char *table_name() const { return table_name_.c_str(); } @@ -185,7 +185,7 @@ class UnboundFieldExpr : public Expression ExprType type() const override { return ExprType::UNBOUND_FIELD; } AttrType value_type() const override { return AttrType::UNDEFINED; } - RC get_value(const Tuple &tuple, Value &value) override { return RC::INTERNAL; } + RC get_value(const Tuple &tuple, Value &value) override { return RC::INTERNAL; } const char *table_name() const { return table_name_.c_str(); } const char *field_name() const { return field_name_.c_str(); } @@ -223,7 +223,7 @@ class FieldExpr : public Expression RC get_column(Chunk &chunk, Column &column) override; - RC get_value(const Tuple &tuple, Value &value) override; + RC get_value(const Tuple &tuple, Value &value) override; private: Field field_; @@ -243,7 +243,7 @@ class ValueExpr : public Expression bool equal(const Expression &other) const override; - RC get_value(const Tuple &tuple, Value &value) override; + RC get_value(const Tuple &tuple, Value &value) override; RC get_column(Chunk &chunk, Column &column) override; RC try_get_value(Value &value) const override { @@ -274,7 +274,7 @@ class CastExpr : public Expression ExprType type() const override { return ExprType::CAST; } - RC get_value(const Tuple &tuple, Value &value) override; + RC get_value(const Tuple &tuple, Value &value) override; RC try_get_value(Value &value) const override; @@ -319,7 +319,7 @@ class ComparisonExpr : public Expression virtual ~ComparisonExpr(); ExprType type() const override { return ExprType::COMPARISON; } - RC get_value(const Tuple &tuple, Value &value) override; + RC get_value(const Tuple &tuple, Value &value) override; AttrType value_type() const override { return AttrType::BOOLEANS; } CompOp comp() const { return comp_; } @@ -407,7 +407,7 @@ class ConjunctionExpr : public Expression ExprType type() const override { return ExprType::CONJUNCTION; } AttrType value_type() const override { return AttrType::BOOLEANS; } - RC get_value(const Tuple &tuple, Value &value) override; + RC get_value(const Tuple &tuple, Value &value) override; Type conjunction_type() const { return conjunction_type_; } @@ -475,7 +475,7 @@ class ArithmeticExpr : public Expression return 4; // sizeof(float) or sizeof(int) }; - RC get_value(const Tuple &tuple, Value &value) override; + RC get_value(const Tuple &tuple, Value &value) override; RC get_column(Chunk &chunk, Column &column) override; @@ -543,7 +543,7 @@ class UnboundAggregateExpr : public Expression std::unique_ptr &child() { return child_; } - RC get_value(const Tuple &tuple, Value &value) override { return RC::INTERNAL; } + RC get_value(const Tuple &tuple, Value &value) override { return RC::INTERNAL; } AttrType value_type() const override { return child_->value_type(); } private: @@ -575,7 +575,7 @@ class AggregateExpr : public Expression AttrType value_type() const override { return child_->value_type(); } int value_length() const override { return child_->value_length(); } - RC get_value(const Tuple &tuple, Value &value) override; + RC get_value(const Tuple &tuple, Value &value) override; RC get_column(Chunk &chunk, Column &column) override; @@ -588,7 +588,7 @@ class AggregateExpr : public Expression std::unique_ptr create_aggregator() const; // 聚集函数表达式的 traverse[_check] 需要特殊对待 param 可能是个 * - void traverse(const std::function &func, const std::function& filter) override + void traverse(const std::function &func, const std::function &filter) override { if (filter(this)) { child_->traverse(func, filter); @@ -642,6 +642,8 @@ class SubQueryExpr : public Expression RC generate_logical_oper(); RC generate_physical_oper(); + size_t res_nums() const{return res_query.size();} + private: SelectSqlNode& sql_node_; std::unique_ptr select_stmt_; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index e131b55b..a6913fdd 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -667,13 +667,13 @@ static const yytype_int16 yyrline[] = 234, 235, 236, 240, 246, 251, 257, 263, 269, 275, 282, 288, 296, 310, 320, 344, 347, 360, 372, 395, 399, 404, 410, 413, 414, 415, 416, 419, 436, 439, - 450, 454, 458, 464, 470, 473, 480, 492, 506, 535, - 544, 553, 568, 571, 574, 577, 580, 584, 587, 592, - 598, 601, 604, 611, 614, 617, 622, 630, 637, 644, - 649, 659, 664, 674, 693, 696, 702, 706, 710, 717, - 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, - 728, 733, 736, 743, 749, 756, 763, 770, 779, 784, - 797, 805, 815, 816 + 450, 454, 458, 464, 470, 473, 480, 491, 505, 534, + 543, 552, 567, 570, 573, 576, 579, 583, 586, 591, + 597, 600, 603, 610, 613, 616, 621, 629, 636, 643, + 648, 658, 663, 673, 692, 695, 701, 705, 709, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, + 727, 732, 735, 742, 748, 755, 762, 769, 778, 783, + 796, 804, 814, 815 }; #endif @@ -2123,15 +2123,14 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); - delete (yyvsp[0].expression); } free((yyvsp[-1].string)); } -#line 2131 "yacc_sql.cpp" +#line 2130 "yacc_sql.cpp" break; case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 493 "yacc_sql.y" +#line 492 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2143,11 +2142,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2147 "yacc_sql.cpp" +#line 2146 "yacc_sql.cpp" break; case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 507 "yacc_sql.y" +#line 506 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-5].expression_list) != nullptr) { @@ -2174,21 +2173,21 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2178 "yacc_sql.cpp" +#line 2177 "yacc_sql.cpp" break; case 59: /* calc_stmt: CALC expression_list */ -#line 536 "yacc_sql.y" +#line 535 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2188 "yacc_sql.cpp" +#line 2187 "yacc_sql.cpp" break; case 60: /* expression_list: expression alias */ -#line 545 "yacc_sql.y" +#line 544 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2197,11 +2196,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2201 "yacc_sql.cpp" +#line 2200 "yacc_sql.cpp" break; case 61: /* expression_list: expression alias COMMA expression_list */ -#line 554 "yacc_sql.y" +#line 553 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2214,129 +2213,129 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2218 "yacc_sql.cpp" +#line 2217 "yacc_sql.cpp" break; case 62: /* expression: expression '+' expression */ -#line 568 "yacc_sql.y" +#line 567 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2226 "yacc_sql.cpp" +#line 2225 "yacc_sql.cpp" break; case 63: /* expression: expression '-' expression */ -#line 571 "yacc_sql.y" +#line 570 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2234 "yacc_sql.cpp" +#line 2233 "yacc_sql.cpp" break; case 64: /* expression: expression '*' expression */ -#line 574 "yacc_sql.y" +#line 573 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2242 "yacc_sql.cpp" +#line 2241 "yacc_sql.cpp" break; case 65: /* expression: expression '/' expression */ -#line 577 "yacc_sql.y" +#line 576 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2250 "yacc_sql.cpp" +#line 2249 "yacc_sql.cpp" break; case 66: /* expression: LBRACE expression RBRACE */ -#line 580 "yacc_sql.y" +#line 579 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2259 "yacc_sql.cpp" +#line 2258 "yacc_sql.cpp" break; case 67: /* expression: '-' expression */ -#line 584 "yacc_sql.y" +#line 583 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2267 "yacc_sql.cpp" +#line 2266 "yacc_sql.cpp" break; case 68: /* expression: value */ -#line 587 "yacc_sql.y" +#line 586 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2277 "yacc_sql.cpp" +#line 2276 "yacc_sql.cpp" break; case 69: /* expression: rel_attr */ -#line 592 "yacc_sql.y" +#line 591 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2288 "yacc_sql.cpp" +#line 2287 "yacc_sql.cpp" break; case 70: /* expression: '*' */ -#line 598 "yacc_sql.y" +#line 597 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2296 "yacc_sql.cpp" +#line 2295 "yacc_sql.cpp" break; case 71: /* expression: aggr_func_expr */ -#line 601 "yacc_sql.y" +#line 600 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2304 "yacc_sql.cpp" +#line 2303 "yacc_sql.cpp" break; case 72: /* expression: sub_query_expr */ -#line 604 "yacc_sql.y" +#line 603 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2312 "yacc_sql.cpp" +#line 2311 "yacc_sql.cpp" break; case 73: /* alias: %empty */ -#line 611 "yacc_sql.y" +#line 610 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2320 "yacc_sql.cpp" +#line 2319 "yacc_sql.cpp" break; case 74: /* alias: ID */ -#line 614 "yacc_sql.y" +#line 613 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2328 "yacc_sql.cpp" +#line 2327 "yacc_sql.cpp" break; case 75: /* alias: AS ID */ -#line 617 "yacc_sql.y" +#line 616 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2336 "yacc_sql.cpp" +#line 2335 "yacc_sql.cpp" break; case 76: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 623 "yacc_sql.y" +#line 622 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2344,37 +2343,37 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2348 "yacc_sql.cpp" +#line 2347 "yacc_sql.cpp" break; case 77: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 631 "yacc_sql.y" +#line 630 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2356 "yacc_sql.cpp" +#line 2355 "yacc_sql.cpp" break; case 78: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 638 "yacc_sql.y" +#line 637 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2364 "yacc_sql.cpp" +#line 2363 "yacc_sql.cpp" break; case 79: /* rel_attr: ID */ -#line 644 "yacc_sql.y" +#line 643 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2374 "yacc_sql.cpp" +#line 2373 "yacc_sql.cpp" break; case 80: /* rel_attr: ID DOT ID */ -#line 649 "yacc_sql.y" +#line 648 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2382,19 +2381,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2386 "yacc_sql.cpp" +#line 2385 "yacc_sql.cpp" break; case 81: /* relation: ID */ -#line 659 "yacc_sql.y" +#line 658 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2394 "yacc_sql.cpp" +#line 2393 "yacc_sql.cpp" break; case 82: /* rel_list: relation alias */ -#line 664 "yacc_sql.y" +#line 663 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2405,11 +2404,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2409 "yacc_sql.cpp" +#line 2408 "yacc_sql.cpp" break; case 83: /* rel_list: relation alias COMMA rel_list */ -#line 674 "yacc_sql.y" +#line 673 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2425,196 +2424,196 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); } -#line 2429 "yacc_sql.cpp" +#line 2428 "yacc_sql.cpp" break; case 84: /* where: %empty */ -#line 693 "yacc_sql.y" +#line 692 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2437 "yacc_sql.cpp" +#line 2436 "yacc_sql.cpp" break; case 85: /* where: WHERE condition */ -#line 696 "yacc_sql.y" +#line 695 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2445 "yacc_sql.cpp" +#line 2444 "yacc_sql.cpp" break; case 86: /* condition: expression comp_op expression */ -#line 703 "yacc_sql.y" +#line 702 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2453 "yacc_sql.cpp" +#line 2452 "yacc_sql.cpp" break; case 87: /* condition: condition AND condition */ -#line 707 "yacc_sql.y" +#line 706 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2461 "yacc_sql.cpp" +#line 2460 "yacc_sql.cpp" break; case 88: /* condition: condition OR condition */ -#line 711 "yacc_sql.y" +#line 710 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2469 "yacc_sql.cpp" +#line 2468 "yacc_sql.cpp" break; case 89: /* comp_op: EQ */ -#line 717 "yacc_sql.y" +#line 716 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2475 "yacc_sql.cpp" +#line 2474 "yacc_sql.cpp" break; case 90: /* comp_op: LT */ -#line 718 "yacc_sql.y" +#line 717 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2481 "yacc_sql.cpp" +#line 2480 "yacc_sql.cpp" break; case 91: /* comp_op: GT */ -#line 719 "yacc_sql.y" +#line 718 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2487 "yacc_sql.cpp" +#line 2486 "yacc_sql.cpp" break; case 92: /* comp_op: LE */ -#line 720 "yacc_sql.y" +#line 719 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2493 "yacc_sql.cpp" +#line 2492 "yacc_sql.cpp" break; case 93: /* comp_op: GE */ -#line 721 "yacc_sql.y" +#line 720 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2499 "yacc_sql.cpp" +#line 2498 "yacc_sql.cpp" break; case 94: /* comp_op: NE */ -#line 722 "yacc_sql.y" +#line 721 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2505 "yacc_sql.cpp" +#line 2504 "yacc_sql.cpp" break; case 95: /* comp_op: IS */ -#line 723 "yacc_sql.y" +#line 722 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2511 "yacc_sql.cpp" +#line 2510 "yacc_sql.cpp" break; case 96: /* comp_op: IS NOT */ -#line 724 "yacc_sql.y" +#line 723 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2517 "yacc_sql.cpp" +#line 2516 "yacc_sql.cpp" break; case 97: /* comp_op: LIKE */ -#line 725 "yacc_sql.y" +#line 724 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2523 "yacc_sql.cpp" +#line 2522 "yacc_sql.cpp" break; case 98: /* comp_op: NOT LIKE */ -#line 726 "yacc_sql.y" +#line 725 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2529 "yacc_sql.cpp" +#line 2528 "yacc_sql.cpp" break; case 99: /* comp_op: IN */ -#line 727 "yacc_sql.y" +#line 726 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2535 "yacc_sql.cpp" +#line 2534 "yacc_sql.cpp" break; case 100: /* comp_op: NOT IN */ -#line 728 "yacc_sql.y" +#line 727 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2541 "yacc_sql.cpp" +#line 2540 "yacc_sql.cpp" break; case 101: /* opt_order_by: %empty */ -#line 733 "yacc_sql.y" +#line 732 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2549 "yacc_sql.cpp" +#line 2548 "yacc_sql.cpp" break; case 102: /* opt_order_by: ORDER BY sort_list */ -#line 737 "yacc_sql.y" +#line 736 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2558 "yacc_sql.cpp" +#line 2557 "yacc_sql.cpp" break; case 103: /* sort_list: sort_unit */ -#line 744 "yacc_sql.y" +#line 743 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2567 "yacc_sql.cpp" +#line 2566 "yacc_sql.cpp" break; case 104: /* sort_list: sort_unit COMMA sort_list */ -#line 750 "yacc_sql.y" +#line 749 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2576 "yacc_sql.cpp" +#line 2575 "yacc_sql.cpp" break; case 105: /* sort_unit: expression */ -#line 757 "yacc_sql.y" +#line 756 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2586 "yacc_sql.cpp" +#line 2585 "yacc_sql.cpp" break; case 106: /* sort_unit: expression DESC */ -#line 764 "yacc_sql.y" +#line 763 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2596 "yacc_sql.cpp" +#line 2595 "yacc_sql.cpp" break; case 107: /* sort_unit: expression ASC */ -#line 771 "yacc_sql.y" +#line 770 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode();//默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2606 "yacc_sql.cpp" +#line 2605 "yacc_sql.cpp" break; case 108: /* group_by: %empty */ -#line 779 "yacc_sql.y" +#line 778 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2614 "yacc_sql.cpp" +#line 2613 "yacc_sql.cpp" break; case 109: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 785 "yacc_sql.y" +#line 784 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2624,20 +2623,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2628 "yacc_sql.cpp" +#line 2627 "yacc_sql.cpp" break; case 110: /* explain_stmt: EXPLAIN command_wrapper */ -#line 798 "yacc_sql.y" +#line 797 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2637 "yacc_sql.cpp" +#line 2636 "yacc_sql.cpp" break; case 111: /* set_variable_stmt: SET ID EQ value */ -#line 806 "yacc_sql.y" +#line 805 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2645,11 +2644,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2649 "yacc_sql.cpp" +#line 2648 "yacc_sql.cpp" break; -#line 2653 "yacc_sql.cpp" +#line 2652 "yacc_sql.cpp" default: break; } @@ -2878,7 +2877,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 818 "yacc_sql.y" +#line 817 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 77941a3d..8d48b7da 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -483,7 +483,6 @@ delete_stmt: /* delete 语句的语法解析树*/ $$->deletion.relation_name = $3; if ($4 != nullptr) { $$->deletion.condition = std::unique_ptr($4); - delete $4; } free($3); } From cbede22001b9bc20f8e8bcb1228121aa022c5155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Mon, 30 Sep 2024 17:30:05 +0000 Subject: [PATCH 072/308] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=86=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E8=BD=AC=E5=8C=96=E5=92=8C=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/optimizer/logical_plan_generator.cpp | 65 +++++++++++++++++-- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 4803673c..6980e10a 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -161,24 +161,81 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrcondition_empty()) { - return {}; + return RC::INVALID_ARGUMENT; } std::unique_ptr &condition = filter_stmt->condition(); - // 已经全部在yacc阶段就改成expr了,现在主要是处理子查询 - auto generate_subquery_logical_oper = [](Expression *expr) { + + std::function generate_subquery_logical_oper = [&](Expression *expr) -> RC { + if (expr == nullptr) { + return RC::INVALID_ARGUMENT; + } + // 已经全部在yacc阶段就改成expr了,现在主要是处理子查询 if (expr->type() == ExprType::SUBQUERY) { - SubQueryExpr *sub_query_expr = static_cast(expr); + auto *sub_query_expr = dynamic_cast(expr); return sub_query_expr->generate_logical_oper(); } + + if (expr->type() == ExprType::COMPARISON) { + auto *comp_expr = dynamic_cast(expr); + auto &left = comp_expr->left(); + auto &right = comp_expr->right(); + + if (left->value_type() != right->value_type()) { + auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); + auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); + + if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { + ExprType left_type = left->type(); + auto cast_expr = make_unique(std::move(left), right->value_type()); + + if (left_type == ExprType::VALUE) { + Value left_val; + if (OB_FAIL(cast_expr->try_get_value(left_val))) { + LOG_WARN("failed to get value from left child", strrc(rc)); + return rc; + } + left = make_unique(left_val); + } else { + left = std::move(cast_expr); + } + } else if (right_to_left_cost < left_to_right_cost && right_to_left_cost != INT32_MAX) { + ExprType right_type = right->type(); + auto cast_expr = make_unique(std::move(right), left->value_type()); + + if (right_type == ExprType::VALUE) { + Value right_val; + if (OB_FAIL(cast_expr->try_get_value(right_val))) { + LOG_WARN("failed to get value from right child", strrc(rc)); + return rc; + } + right = make_unique(right_val); + } else { + right = std::move(cast_expr); + } + } else { + rc = RC::UNSUPPORTED; + LOG_WARN("unsupported cast from %s to %s", + attr_type_to_string(left->value_type()), + attr_type_to_string(right->value_type())); + return rc; + } + } + } + return RC::SUCCESS; }; + + // 递归遍历 condition 检查所有子查询 rc = filter_stmt->condition()->traverse_check(generate_subquery_logical_oper); if (OB_FAIL(rc)) { return rc; } + + // 构建 ConjunctionExpr 并将其传递给 logical_operator unique_ptr conjunction_expr(new ConjunctionExpr(ConjunctionExpr::Type::AND, std::move(condition))); logical_operator = std::make_unique(std::move(conjunction_expr)); + return rc; } From 29d74faf3298a3ed2061983168b754443ca4e2ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Mon, 30 Sep 2024 17:40:12 +0000 Subject: [PATCH 073/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B2=A1=E6=9C=89fil?= =?UTF-8?q?ter=E8=BF=94=E5=9B=9E=E5=BC=82=E5=B8=B8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/optimizer/logical_plan_generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 6980e10a..e63fc702 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -161,7 +161,7 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrcondition_empty()) { - return RC::INVALID_ARGUMENT; + return {}; } std::unique_ptr &condition = filter_stmt->condition(); From 02e72979664947bb35694abc207ea9e462f55c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Mon, 30 Sep 2024 18:03:28 +0000 Subject: [PATCH 074/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 1 + src/observer/common/type/char_type.cpp | 2 +- src/observer/sql/optimizer/logical_plan_generator.cpp | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 31c5a20e..0335954b 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -28,6 +28,7 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(NOMEM) \ DEFINE_RC(NOTFOUND) \ DEFINE_RC(EMPTY) \ + DEFINE_RC(ERROR_DATE) \ DEFINE_RC(FULL) \ DEFINE_RC(EXIST) \ DEFINE_RC(NOT_EXIST) \ diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index e4a5dd10..6a4230d6 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -46,7 +46,7 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result) const return RC::INVALID_ARGUMENT; } if (!check_date(y, m, d)) { - return RC::INVALID_ARGUMENT; + return RC::ERROR_DATE; } result.attr_type_ = AttrType::DATES; result.set_date(y * 10000 + m * 100 + d); diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index e63fc702..56de451c 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -165,7 +165,6 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptr &condition = filter_stmt->condition(); - std::function generate_subquery_logical_oper = [&](Expression *expr) -> RC { if (expr == nullptr) { return RC::INVALID_ARGUMENT; @@ -191,7 +190,8 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrtry_get_value(left_val))) { + rc=cast_expr->try_get_value(left_val); + if (OB_FAIL(rc)) { LOG_WARN("failed to get value from left child", strrc(rc)); return rc; } @@ -205,7 +205,8 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrtry_get_value(right_val))) { + rc = cast_expr->try_get_value(right_val); + if (OB_FAIL(rc)) { LOG_WARN("failed to get value from right child", strrc(rc)); return rc; } From b28548b0a4c497be14f72c1e755e5b0901b6f109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Tue, 1 Oct 2024 03:27:20 +0000 Subject: [PATCH 075/308] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=86=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.h | 1 + src/observer/common/type/data_type.cpp | 1 + src/observer/sql/expr/expression.cpp | 26 +- src/observer/sql/expr/expression.h | 76 +++- .../sql/optimizer/logical_plan_generator.cpp | 7 +- src/observer/sql/parser/expression_binder.cpp | 29 +- src/observer/sql/parser/expression_binder.h | 2 + src/observer/sql/parser/yacc_sql.cpp | 347 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 9 +- 9 files changed, 299 insertions(+), 199 deletions(-) diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index 85aff6da..f1706837 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -23,6 +23,7 @@ enum class AttrType BOOLEANS, ///< boolean类型,当前不是由parser解析出来的,是程序内部使用的 DATES, ///< 日期类型(4字节) NULLS, ///< 空字段 + LIST, ///< 列表 MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; diff --git a/src/observer/common/type/data_type.cpp b/src/observer/common/type/data_type.cpp index 3955a77c..99e16f4f 100644 --- a/src/observer/common/type/data_type.cpp +++ b/src/observer/common/type/data_type.cpp @@ -23,4 +23,5 @@ array, static_cast(AttrType::MAXTYPE)> DataType::type_ make_unique(AttrType::BOOLEANS), make_unique(), make_unique(), + }; diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 422ab976..18e695c6 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -205,7 +205,8 @@ RC ComparisonExpr::try_get_value(Value &cell) const return RC::INVALID_ARGUMENT; } -RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { +RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) +{ Value left_value; Value right_value; @@ -220,17 +221,17 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { }; // 辅助函数:检查表达式是否为子查询并返回类型转换后的指针 - auto get_subquery_expr = [](const std::unique_ptr &expr) -> SubQueryExpr* { + auto get_subquery_expr = [](const std::unique_ptr &expr) -> SubQueryExpr * { return expr->type() == ExprType::SUBQUERY ? dynamic_cast(expr.get()) : nullptr; }; // 检查左侧和右侧是否为子查询表达式 - SubQueryExpr *left_subquery_expr = get_subquery_expr(left_); + SubQueryExpr *left_subquery_expr = get_subquery_expr(left_); SubQueryExpr *right_subquery_expr = get_subquery_expr(right_); // 处理 EXISTS 和 NOT EXISTS 操作 if (comp_ == EXISTS_OP || comp_ == NOT_EXISTS_OP) { - RC rc = right_->get_value(tuple, right_value); + RC rc = right_->get_value(tuple, right_value); bool exists = (rc == RC::SUCCESS); value.set_boolean(comp_ == EXISTS_OP ? exists : !exists); // 调用 right_subquery_expr->close() 确保资源释放 @@ -253,7 +254,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { // 检查子查询是否有多行结果 if (left_subquery_expr && left_subquery_expr->has_more_row(tuple)) { - left_subquery_expr->close(); // 关闭子查询 + left_subquery_expr->close(); // 关闭子查询 return RC::INVALID_ARGUMENT; } @@ -262,13 +263,13 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { if (left_value.is_null()) { value.set_boolean(false); if (right_subquery_expr) { - right_subquery_expr->close(); // 关闭子查询 + right_subquery_expr->close(); // 关闭子查询 } return RC::SUCCESS; } bool has_match = false; - bool has_null = false; + bool has_null = false; while (RC::SUCCESS == (rc = right_->get_value(tuple, right_value))) { if (right_value.is_null()) { @@ -305,7 +306,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { // 比较左值和右值 bool bool_value = false; - rc = compare_value(left_value, right_value, bool_value); + rc = compare_value(left_value, right_value, bool_value); if (rc == RC::SUCCESS) { value.set_boolean(bool_value); } @@ -321,7 +322,6 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { return rc; } - RC ComparisonExpr::eval(Chunk &chunk, std::vector &select) { RC rc = RC::SUCCESS; @@ -845,4 +845,12 @@ AttrType SubQueryExpr::value_type() const std::unique_ptr SubQueryExpr::deep_copy() const { return {}; +} + +ListExpr::ListExpr(std::vector &&exprs) +{ + for (auto expr : exprs) { + exprs_.emplace_back(std::unique_ptr(expr)); + } + exprs.clear(); } \ No newline at end of file diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index b7156792..9855041c 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -49,6 +49,7 @@ enum class ExprType ARITHMETIC, ///< 算术运算 AGGREGATION, ///< 聚合运算 SUBQUERY, ///< 子查询 + EXPRLIST ///< 列表 }; /** @@ -596,12 +597,13 @@ class AggregateExpr : public Expression } } - RC traverse_check(const std::function& check_func) override + RC traverse_check(const std::function &check_func) override { RC rc = RC::SUCCESS; if (RC::SUCCESS != (rc = child_->traverse_check(check_func))) { return rc; - } if (RC::SUCCESS != (rc = check_func(this))) { + } + if (RC::SUCCESS != (rc = check_func(this))) { return rc; } return rc; @@ -621,14 +623,14 @@ class PhysicalOperator; class SubQueryExpr : public Expression { public: - explicit SubQueryExpr( SelectSqlNode &select_node); + explicit SubQueryExpr(SelectSqlNode &select_node); virtual ~SubQueryExpr(); - RC open(Trx* trx); - RC close(); + RC open(Trx *trx); + RC close(); bool has_more_row(const Tuple &tuple) const; - RC get_value(const Tuple &tuple, Value &value) override; + RC get_value(const Tuple &tuple, Value &value) override; RC try_get_value(Value &value) const override; @@ -638,16 +640,16 @@ class SubQueryExpr : public Expression std::unique_ptr deep_copy() const; - RC generate_select_stmt(Db* db, const std::unordered_map &tables); + RC generate_select_stmt(Db *db, const std::unordered_map &tables); RC generate_logical_oper(); RC generate_physical_oper(); - size_t res_nums() const{return res_query.size();} + size_t res_nums() const { return res_query.size(); } private: - SelectSqlNode& sql_node_; - std::unique_ptr select_stmt_; - std::unique_ptr logical_oper_; + SelectSqlNode &sql_node_; + std::unique_ptr select_stmt_; + std::unique_ptr logical_oper_; std::unique_ptr physical_oper_; private: @@ -655,4 +657,54 @@ class SubQueryExpr : public Expression bool res_query_avaliable=false; size_t visited_index=0; -}; \ No newline at end of file +}; + +class ListExpr : public Expression +{ +public: + explicit ListExpr(std::vector&& exprs); + explicit ListExpr(std::vector>&& exprs) : exprs_(std::move(exprs)) {} + virtual ~ListExpr() = default; + + void reset() noexcept + { + cur_idx_ = 0; + } + + RC get_value(const Tuple &tuple, Value &value) override + { + if (cur_idx_ >= exprs_.size()) { + return RC::RECORD_EOF; + } + return exprs_[cur_idx_++]->get_value(tuple, value); // 移除const_cast + } + + RC try_get_value(Value &value) const override { return RC::UNIMPLEMENTED; } + + ExprType type() const override { return ExprType::EXPRLIST; } + + AttrType value_type() const override { return AttrType::UNDEFINED; } + + // 通过引用传递std::function避免拷贝 + void traverse(const std::function& func, const std::function& filter) override + { + if (filter(this)) { + for (auto& expr : exprs_) { + expr->traverse(func, filter); + } + func(this); + } + } + + RC traverse_check(const std::function& check_func) override + { + return RC::SUCCESS; + + } + + std::vector>& get_list(){return exprs_;} + +private: + size_t cur_idx_ = 0; + std::vector> exprs_; +}; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 56de451c..aca88313 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -184,13 +184,16 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrvalue_type(), right->value_type()); auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); - if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { + if (right->type() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST) { + // 暂时在这里不做处理 + return RC::SUCCESS; + } else if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { ExprType left_type = left->type(); auto cast_expr = make_unique(std::move(left), right->value_type()); if (left_type == ExprType::VALUE) { Value left_val; - rc=cast_expr->try_get_value(left_val); + rc = cast_expr->try_get_value(left_val); if (OB_FAIL(rc)) { LOG_WARN("failed to get value from left child", strrc(rc)); return rc; diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index bd17677c..60426f00 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -116,6 +116,10 @@ RC ExpressionBinder::bind_expression(unique_ptr &expr, vector(expr->type())); return RC::INTERNAL; @@ -465,7 +469,7 @@ RC ExpressionBinder::bind_aggregate_expression( } auto aggregate_expr = make_unique(aggregate_type, std::move(child_expr)); - // aggregate_expr->set_name(unbound_aggregate_expr->name()); + // set name 阶段 if (unbound_aggregate_expr->name_empty()) { string name; @@ -492,9 +496,28 @@ RC ExpressionBinder::bind_aggregate_expression( RC ExpressionBinder::bind_subquery_expression( std::unique_ptr &expr, std::vector> &bound_expressions) { + RC rc = RC::SUCCESS; auto subquery_expr = dynamic_cast(expr.get()); - subquery_expr->generate_select_stmt(context_.get_db(),context_.table_map()); + rc = subquery_expr->generate_select_stmt(context_.get_db(), context_.table_map()); bound_expressions.emplace_back(std::move(expr)); - return RC::SUCCESS; + return rc; +} +RC ExpressionBinder::bind_exprlist_expression( + std::unique_ptr &expr, std::vector> &bound_expressions) +{ + RC rc = RC::SUCCESS; + auto list_expr = dynamic_cast(expr.get()); + vector> child_bound_expressions; + for (auto &child_expr : list_expr->get_list()) { + if (child_expr->type()!=ExprType::VALUE) { + LOG_WARN("invalid children type of LIST expression: %d", child_bound_expressions.size()); + return RC::INVALID_ARGUMENT; + } + +} + +bound_expressions.emplace_back(std::move(expr)); +return rc; + } diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index e90d3a32..323b29a6 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -77,6 +77,8 @@ class ExpressionBinder std::unique_ptr &aggregate_expr, std::vector> &bound_expressions); RC bind_subquery_expression( std::unique_ptr &expr, std::vector> &bound_expressions); + RC bind_exprlist_expression( + std::unique_ptr &expr, std::vector> &bound_expressions); private: BinderContext &context_; }; \ No newline at end of file diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index a6913fdd..fbedb453 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -597,7 +597,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 68 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 199 +#define YYLAST 193 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 71 @@ -668,12 +668,12 @@ static const yytype_int16 yyrline[] = 282, 288, 296, 310, 320, 344, 347, 360, 372, 395, 399, 404, 410, 413, 414, 415, 416, 419, 436, 439, 450, 454, 458, 464, 470, 473, 480, 491, 505, 534, - 543, 552, 567, 570, 573, 576, 579, 583, 586, 591, - 597, 600, 603, 610, 613, 616, 621, 629, 636, 643, - 648, 658, 663, 673, 692, 695, 701, 705, 709, 716, - 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, - 727, 732, 735, 742, 748, 755, 762, 769, 778, 783, - 796, 804, 814, 815 + 543, 552, 567, 570, 573, 576, 579, 588, 591, 596, + 602, 605, 608, 615, 618, 621, 626, 634, 641, 648, + 653, 663, 668, 678, 697, 700, 706, 710, 714, 721, + 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 737, 740, 747, 753, 760, 767, 774, 783, 788, + 801, 809, 819, 820 }; #endif @@ -718,7 +718,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-106) +#define YYPACT_NINF (-96) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -732,26 +732,26 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 93, -1, 16, 22, 22, -55, 5, -106, 33, -21, - -31, -106, -106, -106, -106, -106, -8, -6, 93, 79, - 77, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, 17, 19, 24, 38, -13, -106, -106, -106, -16, - -106, 22, -106, -106, -106, 1, -106, -106, -106, 62, - -106, -106, 52, 53, 72, 68, 73, -106, -106, -106, - -106, 101, 78, -106, 86, 110, 29, -4, 71, -106, - 74, -106, 22, 22, 22, 22, 111, 76, 102, 99, - 81, 64, 82, 84, 85, 87, -106, -106, -106, 122, - -106, -106, -44, -44, -106, -106, 22, -106, -2, 99, - 137, 22, -106, 107, -106, 123, 3, 143, 139, -106, - -106, -106, 144, -106, 64, 98, 2, 64, 158, -106, - -106, -106, -106, -7, 84, 147, 108, 76, 162, 149, - -106, -18, -106, -106, -106, -106, -106, -106, -106, 141, - 22, 22, 22, 99, 112, 115, 145, -106, -106, 143, - 126, 155, -106, 175, -106, 64, 159, -106, -106, -106, - 25, -106, 138, -106, -106, -106, 160, -106, -106, 132, - -106, -106, 22, 149, -106, -19, 133, 9, -106, 161, - -106, -106, 124, -106, -106, 22, -106, -106 + 89, 9, 13, 27, 27, -57, 28, -96, 6, 17, + 11, -96, -96, -96, -96, -96, 22, 12, 89, 73, + 78, -96, -96, -96, -96, -96, -96, -96, -96, -96, + -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, + -96, 29, 34, 38, 48, -11, -96, -96, -96, -17, + -96, 27, -96, -96, -96, -1, -96, -96, -96, 71, + -96, -96, 50, 54, 74, 65, 72, -96, -96, -96, + -96, 100, 77, -96, 81, 105, 106, 20, 68, -96, + 69, -96, 27, 27, 27, 27, 109, 75, 95, 98, + 79, -26, 88, 90, 92, 97, -96, -96, -96, 114, + -96, -96, -39, -39, -96, -96, 27, -96, 0, 98, + 119, 27, -96, 101, -96, 122, 16, 138, 141, -96, + -96, -96, 140, -96, -26, 91, 33, -26, 154, -96, + -96, -96, -96, -8, 90, 143, 104, 75, 158, 145, + -96, -20, -96, -96, -96, -96, -96, -96, -96, 137, + 27, 27, 27, 98, 108, 111, 139, -96, -96, 138, + 123, 152, -96, 171, -96, -26, 155, -96, -96, -96, + -50, -96, 134, -96, -96, -96, 156, -96, -96, 128, + -96, -96, 27, 145, -96, -23, 129, 3, -96, 157, + -96, -96, 120, -96, -96, 27, -96, -96 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -784,11 +784,11 @@ static const yytype_int8 yydefact[] = /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -106, -106, 171, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, 31, 57, 7, -106, -106, - -106, 10, -83, -106, -106, -106, 150, -106, -3, -45, - 88, -106, -106, -106, -106, 60, -105, -80, -106, -106, - 4, -106, -106, -106, -106, -106, -106 + -96, -96, 167, -96, -96, -96, -96, -96, -96, -96, + -96, -96, -96, -96, -96, 30, 52, 2, -96, -96, + -96, 5, -89, -96, -96, -96, 146, -96, -3, -51, + 82, -96, -96, -96, -96, 55, -95, -72, -96, -96, + -2, -96, -96, -96, -96, -96, -96 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -806,50 +806,50 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 76, 59, 80, 4, 123, 80, 79, 77, 114, 60, - 45, 41, 167, 42, 193, 156, 155, 157, 61, 45, - 98, 63, 46, 78, 84, 85, 194, 156, 43, 157, - 44, 46, 129, 64, 130, 131, 132, 102, 103, 104, - 105, 139, 168, 66, 153, 45, 151, 152, 173, 47, - 48, 49, 50, 97, 51, 52, 65, 46, 47, 48, - 49, 50, 81, 51, 52, 81, 125, 82, 83, 84, - 85, 171, 172, 62, 99, 82, 83, 84, 85, 68, - 69, 71, 183, 72, 47, 48, 49, 50, 73, 51, - 52, 82, 83, 84, 85, 82, 83, 84, 85, 46, - 1, 2, 74, 121, 87, 170, 125, 125, 3, 4, - 5, 6, 7, 8, 9, 10, 88, 89, 90, 11, - 12, 13, 91, 92, 93, 94, 47, 48, 140, 50, - 14, 15, 141, 95, 96, 100, 106, 187, 101, 16, - 107, 17, 111, 110, 18, 113, 120, 115, 116, 118, - 187, 119, 142, 143, 144, 145, 146, 147, 148, 149, - 124, 127, 136, 128, 82, 83, 84, 85, 134, 137, - 154, 160, 161, 163, 165, 169, 174, 175, 179, 181, - 177, 182, 151, 184, 185, 186, 195, 192, 196, 67, - 178, 159, 191, 190, 0, 75, 122, 162, 0, 197 + 79, 59, 114, 80, 80, 4, 77, 60, 193, 46, + 167, 156, 45, 157, 123, 155, 82, 83, 84, 85, + 194, 41, 78, 42, 46, 43, 156, 44, 157, 84, + 85, 102, 103, 104, 105, 139, 47, 48, 153, 50, + 168, 61, 76, 45, 98, 129, 62, 130, 131, 132, + 45, 47, 48, 49, 50, 46, 51, 52, 173, 63, + 125, 66, 46, 81, 81, 82, 83, 84, 85, 82, + 83, 84, 85, 68, 99, 64, 183, 151, 152, 171, + 172, 69, 47, 48, 49, 50, 65, 51, 52, 47, + 48, 49, 50, 71, 51, 52, 1, 2, 72, 170, + 125, 125, 73, 121, 3, 4, 5, 6, 7, 8, + 9, 10, 74, 87, 88, 11, 12, 13, 89, 91, + 90, 140, 92, 93, 94, 141, 14, 15, 95, 96, + 97, 187, 100, 101, 106, 16, 110, 17, 120, 107, + 18, 111, 124, 113, 187, 142, 143, 144, 145, 146, + 147, 148, 149, 115, 116, 127, 118, 82, 83, 84, + 85, 119, 128, 134, 136, 137, 154, 160, 161, 163, + 165, 169, 174, 175, 177, 179, 181, 182, 151, 184, + 185, 186, 195, 192, 196, 67, 159, 191, 190, 178, + 122, 75, 162, 197 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { - 45, 4, 4, 16, 109, 4, 51, 23, 91, 64, - 23, 12, 30, 14, 5, 34, 23, 36, 13, 23, - 24, 42, 35, 39, 68, 69, 17, 34, 12, 36, - 14, 35, 29, 64, 31, 32, 33, 82, 83, 84, - 85, 124, 60, 49, 127, 23, 44, 45, 153, 62, - 63, 64, 65, 24, 67, 68, 64, 35, 62, 63, - 64, 65, 64, 67, 68, 64, 111, 66, 67, 68, - 69, 151, 152, 40, 77, 66, 67, 68, 69, 0, - 3, 64, 165, 64, 62, 63, 64, 65, 64, 67, - 68, 66, 67, 68, 69, 66, 67, 68, 69, 35, - 7, 8, 64, 106, 42, 150, 151, 152, 15, 16, - 17, 18, 19, 20, 21, 22, 64, 64, 46, 26, - 27, 28, 54, 50, 23, 47, 62, 63, 30, 65, - 37, 38, 34, 47, 24, 64, 25, 182, 64, 46, - 64, 48, 43, 41, 51, 64, 24, 65, 64, 64, - 195, 64, 54, 55, 56, 57, 58, 59, 60, 61, - 23, 54, 23, 40, 66, 67, 68, 69, 25, 25, - 12, 24, 64, 11, 25, 34, 64, 62, 52, 24, - 35, 6, 44, 24, 24, 53, 25, 54, 64, 18, - 159, 134, 185, 183, -1, 45, 108, 137, -1, 195 + 51, 4, 91, 4, 4, 16, 23, 64, 5, 35, + 30, 34, 23, 36, 109, 23, 66, 67, 68, 69, + 17, 12, 39, 14, 35, 12, 34, 14, 36, 68, + 69, 82, 83, 84, 85, 124, 62, 63, 127, 65, + 60, 13, 45, 23, 24, 29, 40, 31, 32, 33, + 23, 62, 63, 64, 65, 35, 67, 68, 153, 42, + 111, 49, 35, 64, 64, 66, 67, 68, 69, 66, + 67, 68, 69, 0, 77, 64, 165, 44, 45, 151, + 152, 3, 62, 63, 64, 65, 64, 67, 68, 62, + 63, 64, 65, 64, 67, 68, 7, 8, 64, 150, + 151, 152, 64, 106, 15, 16, 17, 18, 19, 20, + 21, 22, 64, 42, 64, 26, 27, 28, 64, 54, + 46, 30, 50, 23, 47, 34, 37, 38, 47, 24, + 24, 182, 64, 64, 25, 46, 41, 48, 24, 64, + 51, 43, 23, 64, 195, 54, 55, 56, 57, 58, + 59, 60, 61, 65, 64, 54, 64, 66, 67, 68, + 69, 64, 40, 25, 23, 25, 12, 24, 64, 11, + 25, 34, 64, 62, 35, 52, 24, 6, 44, 24, + 24, 53, 25, 54, 64, 18, 134, 185, 183, 159, + 108, 45, 137, 195 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -863,7 +863,7 @@ static const yytype_int8 yystos[] = 116, 12, 14, 12, 14, 23, 35, 62, 63, 64, 65, 67, 68, 93, 99, 100, 102, 103, 104, 99, 64, 13, 40, 42, 64, 64, 49, 73, 0, 3, - 117, 64, 64, 64, 64, 97, 100, 23, 39, 100, + 117, 64, 64, 64, 64, 97, 99, 23, 39, 100, 4, 64, 66, 67, 68, 69, 101, 42, 64, 64, 46, 54, 50, 23, 47, 47, 24, 24, 24, 99, 64, 64, 100, 100, 100, 100, 25, 64, 105, 106, @@ -2248,94 +2248,99 @@ YYLTYPE yylloc = yyloc_default; #line 2249 "yacc_sql.cpp" break; - case 66: /* expression: LBRACE expression RBRACE */ + case 66: /* expression: LBRACE expression_list RBRACE */ #line 579 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[-1].expression); + { + if ((yyvsp[-1].expression_list)->size() == 1) { + (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); + } else { + (yyval.expression) = new ListExpr(std::move(*(yyvsp[-1].expression_list))); + } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); + delete (yyvsp[-1].expression_list); } -#line 2258 "yacc_sql.cpp" +#line 2263 "yacc_sql.cpp" break; case 67: /* expression: '-' expression */ -#line 583 "yacc_sql.y" +#line 588 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2266 "yacc_sql.cpp" +#line 2271 "yacc_sql.cpp" break; case 68: /* expression: value */ -#line 586 "yacc_sql.y" +#line 591 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2276 "yacc_sql.cpp" +#line 2281 "yacc_sql.cpp" break; case 69: /* expression: rel_attr */ -#line 591 "yacc_sql.y" +#line 596 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2287 "yacc_sql.cpp" +#line 2292 "yacc_sql.cpp" break; case 70: /* expression: '*' */ -#line 597 "yacc_sql.y" +#line 602 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2295 "yacc_sql.cpp" +#line 2300 "yacc_sql.cpp" break; case 71: /* expression: aggr_func_expr */ -#line 600 "yacc_sql.y" +#line 605 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2303 "yacc_sql.cpp" +#line 2308 "yacc_sql.cpp" break; case 72: /* expression: sub_query_expr */ -#line 603 "yacc_sql.y" +#line 608 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2311 "yacc_sql.cpp" +#line 2316 "yacc_sql.cpp" break; case 73: /* alias: %empty */ -#line 610 "yacc_sql.y" +#line 615 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2319 "yacc_sql.cpp" +#line 2324 "yacc_sql.cpp" break; case 74: /* alias: ID */ -#line 613 "yacc_sql.y" +#line 618 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2327 "yacc_sql.cpp" +#line 2332 "yacc_sql.cpp" break; case 75: /* alias: AS ID */ -#line 616 "yacc_sql.y" +#line 621 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2335 "yacc_sql.cpp" +#line 2340 "yacc_sql.cpp" break; case 76: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 622 "yacc_sql.y" +#line 627 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2343,37 +2348,37 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2347 "yacc_sql.cpp" +#line 2352 "yacc_sql.cpp" break; case 77: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 630 "yacc_sql.y" +#line 635 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2355 "yacc_sql.cpp" +#line 2360 "yacc_sql.cpp" break; case 78: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 637 "yacc_sql.y" +#line 642 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2363 "yacc_sql.cpp" +#line 2368 "yacc_sql.cpp" break; case 79: /* rel_attr: ID */ -#line 643 "yacc_sql.y" +#line 648 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2373 "yacc_sql.cpp" +#line 2378 "yacc_sql.cpp" break; case 80: /* rel_attr: ID DOT ID */ -#line 648 "yacc_sql.y" +#line 653 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2381,19 +2386,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2385 "yacc_sql.cpp" +#line 2390 "yacc_sql.cpp" break; case 81: /* relation: ID */ -#line 658 "yacc_sql.y" +#line 663 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2393 "yacc_sql.cpp" +#line 2398 "yacc_sql.cpp" break; case 82: /* rel_list: relation alias */ -#line 663 "yacc_sql.y" +#line 668 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2404,11 +2409,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2408 "yacc_sql.cpp" +#line 2413 "yacc_sql.cpp" break; case 83: /* rel_list: relation alias COMMA rel_list */ -#line 673 "yacc_sql.y" +#line 678 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2424,196 +2429,196 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); } -#line 2428 "yacc_sql.cpp" +#line 2433 "yacc_sql.cpp" break; case 84: /* where: %empty */ -#line 692 "yacc_sql.y" +#line 697 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2436 "yacc_sql.cpp" +#line 2441 "yacc_sql.cpp" break; case 85: /* where: WHERE condition */ -#line 695 "yacc_sql.y" +#line 700 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2444 "yacc_sql.cpp" +#line 2449 "yacc_sql.cpp" break; case 86: /* condition: expression comp_op expression */ -#line 702 "yacc_sql.y" +#line 707 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2452 "yacc_sql.cpp" +#line 2457 "yacc_sql.cpp" break; case 87: /* condition: condition AND condition */ -#line 706 "yacc_sql.y" +#line 711 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2460 "yacc_sql.cpp" +#line 2465 "yacc_sql.cpp" break; case 88: /* condition: condition OR condition */ -#line 710 "yacc_sql.y" +#line 715 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2468 "yacc_sql.cpp" +#line 2473 "yacc_sql.cpp" break; case 89: /* comp_op: EQ */ -#line 716 "yacc_sql.y" +#line 721 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2474 "yacc_sql.cpp" +#line 2479 "yacc_sql.cpp" break; case 90: /* comp_op: LT */ -#line 717 "yacc_sql.y" +#line 722 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2480 "yacc_sql.cpp" +#line 2485 "yacc_sql.cpp" break; case 91: /* comp_op: GT */ -#line 718 "yacc_sql.y" +#line 723 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2486 "yacc_sql.cpp" +#line 2491 "yacc_sql.cpp" break; case 92: /* comp_op: LE */ -#line 719 "yacc_sql.y" +#line 724 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2492 "yacc_sql.cpp" +#line 2497 "yacc_sql.cpp" break; case 93: /* comp_op: GE */ -#line 720 "yacc_sql.y" +#line 725 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2498 "yacc_sql.cpp" +#line 2503 "yacc_sql.cpp" break; case 94: /* comp_op: NE */ -#line 721 "yacc_sql.y" +#line 726 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2504 "yacc_sql.cpp" +#line 2509 "yacc_sql.cpp" break; case 95: /* comp_op: IS */ -#line 722 "yacc_sql.y" +#line 727 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2510 "yacc_sql.cpp" +#line 2515 "yacc_sql.cpp" break; case 96: /* comp_op: IS NOT */ -#line 723 "yacc_sql.y" +#line 728 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2516 "yacc_sql.cpp" +#line 2521 "yacc_sql.cpp" break; case 97: /* comp_op: LIKE */ -#line 724 "yacc_sql.y" +#line 729 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2522 "yacc_sql.cpp" +#line 2527 "yacc_sql.cpp" break; case 98: /* comp_op: NOT LIKE */ -#line 725 "yacc_sql.y" +#line 730 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2528 "yacc_sql.cpp" +#line 2533 "yacc_sql.cpp" break; case 99: /* comp_op: IN */ -#line 726 "yacc_sql.y" +#line 731 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2534 "yacc_sql.cpp" +#line 2539 "yacc_sql.cpp" break; case 100: /* comp_op: NOT IN */ -#line 727 "yacc_sql.y" +#line 732 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2540 "yacc_sql.cpp" +#line 2545 "yacc_sql.cpp" break; case 101: /* opt_order_by: %empty */ -#line 732 "yacc_sql.y" +#line 737 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2548 "yacc_sql.cpp" +#line 2553 "yacc_sql.cpp" break; case 102: /* opt_order_by: ORDER BY sort_list */ -#line 736 "yacc_sql.y" +#line 741 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2557 "yacc_sql.cpp" +#line 2562 "yacc_sql.cpp" break; case 103: /* sort_list: sort_unit */ -#line 743 "yacc_sql.y" +#line 748 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2566 "yacc_sql.cpp" +#line 2571 "yacc_sql.cpp" break; case 104: /* sort_list: sort_unit COMMA sort_list */ -#line 749 "yacc_sql.y" +#line 754 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2575 "yacc_sql.cpp" +#line 2580 "yacc_sql.cpp" break; case 105: /* sort_unit: expression */ -#line 756 "yacc_sql.y" +#line 761 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2585 "yacc_sql.cpp" +#line 2590 "yacc_sql.cpp" break; case 106: /* sort_unit: expression DESC */ -#line 763 "yacc_sql.y" +#line 768 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2595 "yacc_sql.cpp" +#line 2600 "yacc_sql.cpp" break; case 107: /* sort_unit: expression ASC */ -#line 770 "yacc_sql.y" +#line 775 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode();//默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2605 "yacc_sql.cpp" +#line 2610 "yacc_sql.cpp" break; case 108: /* group_by: %empty */ -#line 778 "yacc_sql.y" +#line 783 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2613 "yacc_sql.cpp" +#line 2618 "yacc_sql.cpp" break; case 109: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 784 "yacc_sql.y" +#line 789 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2623,20 +2628,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2627 "yacc_sql.cpp" +#line 2632 "yacc_sql.cpp" break; case 110: /* explain_stmt: EXPLAIN command_wrapper */ -#line 797 "yacc_sql.y" +#line 802 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2636 "yacc_sql.cpp" +#line 2641 "yacc_sql.cpp" break; case 111: /* set_variable_stmt: SET ID EQ value */ -#line 805 "yacc_sql.y" +#line 810 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2644,11 +2649,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2648 "yacc_sql.cpp" +#line 2653 "yacc_sql.cpp" break; -#line 2652 "yacc_sql.cpp" +#line 2657 "yacc_sql.cpp" default: break; } @@ -2877,7 +2882,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 817 "yacc_sql.y" +#line 822 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 8d48b7da..f02e0801 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -576,9 +576,14 @@ expression: | expression '/' expression { $$ = create_arithmetic_expression(ArithmeticExpr::Type::DIV, $1, $3, sql_string, &@$); } - | LBRACE expression RBRACE { - $$ = $2; + | LBRACE expression_list RBRACE { + if ($2->size() == 1) { + $$ = $2->front().get(); + } else { + $$ = new ExprListExpr(std::move(*$2)); + } $$->set_name(token_name(sql_string, &@$)); + delete $2; } | '-' expression %prec UMINUS { $$ = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, $2, nullptr, sql_string, &@$); From 0ef3e9869695489af519b77c2017715dc1788779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Tue, 1 Oct 2024 03:46:38 +0000 Subject: [PATCH 076/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=B2=A1=E6=9C=89reset=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 5 +++++ src/observer/sql/expr/expression.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 18e695c6..3f352487 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -260,6 +260,11 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) // 处理 IN 和 NOT IN 操作 if (comp_ == IN_OP || comp_ == NOT_IN_OP) { + + if (right_->type() == ExprType::EXPRLIST) { + static_cast(right_.get())->reset(); + } + if (left_value.is_null()) { value.set_boolean(false); if (right_subquery_expr) { diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 9855041c..940d70eb 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -143,6 +143,8 @@ class Expression // 后序遍历 检查 virtual RC traverse_check(const std::function &check_func) { return check_func(this); } + // + protected: /** * @brief 表达式在下层算子返回的 chunk 中的位置 From 84b8efc405647d68dd13ca665d9933655fb38408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Tue, 1 Oct 2024 04:15:18 +0000 Subject: [PATCH 077/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=90=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=BD=AC=E6=8D=A2=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/optimizer/logical_plan_generator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index aca88313..8f3835fb 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -172,7 +172,8 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrtype() == ExprType::SUBQUERY) { auto *sub_query_expr = dynamic_cast(expr); - return sub_query_expr->generate_logical_oper(); + rc = sub_query_expr->generate_logical_oper(); + return rc; } if (expr->type() == ExprType::COMPARISON) { @@ -184,7 +185,8 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrvalue_type(), right->value_type()); auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); - if (right->type() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST) { + if (right->type() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST || + left->type() == ExprType::SUBQUERY || left->type() == ExprType::EXPRLIST) { // 暂时在这里不做处理 return RC::SUCCESS; } else if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { From 5f2e4cb9cf6350dd9a74fa54041224919a33469b Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 1 Oct 2024 19:08:27 +0800 Subject: [PATCH 078/308] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90mul?= =?UTF-8?q?ti-index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/3rd/benchmark | 2 +- .../sql/executor/show_index_executor.cpp | 7 +- src/observer/sql/parser/lex_sql.cpp | 5232 ++++++----------- src/observer/sql/parser/lex_sql.h | 244 +- src/observer/sql/parser/parse_defs.h | 6 +- src/observer/sql/parser/yacc_sql.cpp | 4420 +++++--------- src/observer/sql/parser/yacc_sql.hpp | 207 +- src/observer/sql/parser/yacc_sql.y | 2 +- src/observer/sql/stmt/create_index_stmt.cpp | 22 +- src/observer/sql/stmt/create_index_stmt.h | 10 +- src/observer/storage/index/bplus_tree.cpp | 134 +- src/observer/storage/index/bplus_tree.h | 111 +- .../storage/index/bplus_tree_index.cpp | 42 +- src/observer/storage/index/bplus_tree_index.h | 4 +- src/observer/storage/index/bplus_tree_log.h | 2 +- src/observer/storage/index/index.cpp | 3 +- src/observer/storage/index/index.h | 3 +- src/observer/storage/index/index_meta.cpp | 68 +- src/observer/storage/index/index_meta.h | 48 +- src/observer/storage/table/table.cpp | 31 +- src/observer/storage/table/table.h | 2 +- src/observer/storage/table/table_meta.cpp | 12 +- src/observer/storage/table/table_meta.h | 1 - 23 files changed, 3605 insertions(+), 7008 deletions(-) diff --git a/deps/3rd/benchmark b/deps/3rd/benchmark index 3fd1e6a7..23d8c1e5 160000 --- a/deps/3rd/benchmark +++ b/deps/3rd/benchmark @@ -1 +1 @@ -Subproject commit 3fd1e6a7aee12e6878d7e039f947ea81140b4f5a +Subproject commit 23d8c1e58941ca48b4ef67595addaf78412109ef diff --git a/src/observer/sql/executor/show_index_executor.cpp b/src/observer/sql/executor/show_index_executor.cpp index 0ac3fb54..7aefac37 100644 --- a/src/observer/sql/executor/show_index_executor.cpp +++ b/src/observer/sql/executor/show_index_executor.cpp @@ -51,8 +51,11 @@ RC ShowIndexExecutor::execute(SQLStageEvent *sql_event) const TableMeta &table_meta = table->table_meta(); for (int i = 0; i < table_meta.index_num(); i++) { auto index = table_meta.index(i); - // TODO 目前尚未支持唯一索引 - oper->append({table_name, "1", index->name(), "1", index->field()}); + oper->append({table_name, "1", index->name()}); + auto fields = index->fields(); + for (auto &name : fields) { + oper->append({"1", name.name()}); + } } sql_result->set_operator(unique_ptr(oper)); diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index fdb66b11..edbf1b14 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,21 +8,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -75,62 +77,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -154,12 +156,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -187,7 +189,7 @@ typedef void *yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin, yyscanner) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -205,7 +207,7 @@ typedef void *yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -220,85 +222,88 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -307,55 +312,59 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -static void yyensure_buffer_stack(yyscan_t yyscanner); -static void yy_load_buffer_state(yyscan_t yyscanner); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -363,2250 +372,296 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state(yyscan_t yyscanner); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); -static int yy_get_next_buffer(yyscan_t yyscanner); -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t)(yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 70 #define YY_END_OF_BUFFER 71 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info -{ - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[206] = {0, - 0, - 0, - 0, - 0, - 71, - 69, - 1, - 2, - 69, - 69, - 69, - 49, - 50, - 65, - 63, - 51, - 64, - 6, - 66, - 3, - 5, - 56, - 52, - 58, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 70, - 55, - 0, - 67, - 0, - 68, - 3, - 0, - 53, - 54, - 57, - 62, - 62, - 62, - 44, - 62, - 43, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 60, - 62, - 62, - 62, - 62, - 62, - 15, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 4, - 22, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 32, - 62, - 62, - 62, - 59, - 62, - 62, - 62, - 28, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 62, - 19, - 33, - 62, - 62, - 39, - 35, - 62, - 9, - 11, - 7, - 62, - 62, - 62, - 20, - 62, - 8, - 62, - 62, - 62, - 62, - 24, - 48, - 61, - 38, - 36, - 62, - 62, - 16, - 62, - 17, - 62, - 62, - 62, - 62, - 29, - 62, - 62, - 62, - 62, - 34, - 62, - 42, - 14, - 62, - 47, - 62, - 62, - 62, - 62, - 62, - 12, - 62, - 62, - 21, - 30, - 10, - 26, - 62, - 46, - 40, - 23, - 62, - 62, - 18, - 62, - 13, - 27, - 25, - 41, - 62, - - 62, - 45, - 37, - 31, - 0}; - -static const YY_CHAR yy_ec[256] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 3, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 4, - 5, - 1, - 1, - 1, - 1, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 1, - 16, - 17, - 18, - 19, - 1, - 1, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 36, - 1, - 1, - 1, - 1, - 36, - 1, - 45, - 46, - 47, - 48, - - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 36, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 36, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1}; - -static const YY_CHAR yy_meta[69] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2}; - -static const flex_int16_t yy_base[211] = {0, - 0, - 0, - 0, - 0, - 551, - 552, - 552, - 552, - 532, - 537, - 535, - 552, - 552, - 552, - 552, - 552, - 525, - 552, - 552, - 56, - 552, - 54, - 552, - 521, - 55, - 59, - 60, - 61, - 64, - 89, - 63, - 62, - 76, - 81, - 523, - 101, - 103, - 113, - 110, - 134, - 121, - 117, - 127, - 124, - 552, - 552, - 532, - 552, - 530, - 552, - 69, - 519, - 552, - 552, - 552, - 0, - 518, - 140, - 515, - 138, - 514, - 144, - 150, - 142, - 166, - 141, - 167, - 153, - 178, - 169, - 164, - 176, - 177, - 193, - 235, - 513, - 179, - 204, - 194, - 181, - 206, - 510, - 211, - 215, - 207, - 218, - 212, - 236, - 232, - 225, - 260, - 509, - 508, - 233, - 254, - 228, - 264, - 272, - 275, - 276, - - 288, - 273, - 279, - 291, - 287, - 296, - 297, - 298, - 299, - 312, - 311, - 316, - 322, - 289, - 330, - 326, - 328, - 507, - 329, - 337, - 334, - 506, - 315, - 340, - 351, - 341, - 354, - 352, - 363, - 369, - 505, - 504, - 367, - 355, - 502, - 499, - 365, - 496, - 491, - 488, - 376, - 371, - 388, - 484, - 372, - 483, - 374, - 375, - 398, - 399, - 481, - 462, - 414, - 411, - 410, - 394, - 390, - 404, - 423, - 396, - 424, - 407, - 427, - 429, - 364, - 408, - 430, - 434, - 435, - 304, - 441, - 301, - 300, - 437, - 290, - 442, - 451, - 447, - 450, - 449, - 469, - 467, - 470, - 257, - 249, - 248, - 238, - 454, - 203, - 202, - 201, - 459, - 479, - 170, - 478, - 118, - 115, - 87, - 86, - 494, - - 480, - 84, - 80, - 77, - 552, - 543, - 545, - 547, - 88, - 87}; - -static const flex_int16_t yy_def[211] = {0, - 205, - 1, - 206, - 206, - 205, - 205, - 205, - 205, - 205, - 207, - 208, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 205, - 205, - 207, - 205, - 208, - 205, - 205, - 205, - 205, - 205, - 205, - 210, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 205, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - 209, - - 209, - 209, - 209, - 209, - 0, - 205, - 205, - 205, - 205, - 205}; - -static const flex_int16_t yy_nxt[621] = {0, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 52, - 56, - 51, - 53, - 54, - 56, - 56, - 56, - 56, - 56, - 56, - 62, - 66, - 52, - 60, - 51, - 67, - 74, - 63, - 58, - 56, - 57, - 56, - 56, - 59, - 64, - 56, - 56, - 65, - 68, - 56, - 73, - - 56, - 56, - 61, - 56, - 62, - 66, - 69, - 60, - 75, - 67, - 74, - 63, - 58, - 76, - 77, - 56, - 59, - 56, - 64, - 70, - 65, - 68, - 71, - 73, - 56, - 72, - 61, - 56, - 78, - 56, - 69, - 56, - 56, - 75, - 79, - 56, - 80, - 76, - 56, - 77, - 88, - 56, - 81, - 83, - 70, - 82, - 90, - 71, - 56, - 72, - 91, - 89, - 56, - 78, - 56, - 56, - 56, - 84, - 56, - 79, - 85, - 80, - 93, - 94, - 56, - 88, - 81, - 56, - 83, - 96, - 82, - 90, - 86, - 97, - 95, - 91, - 89, - 87, - 56, - 99, - 56, - 56, - 84, - 56, - 56, - 85, - 102, - 93, - 94, - 98, - 56, - 56, - 56, - 56, - 96, - 56, - 86, - 100, - 97, - 95, - - 106, - 87, - 105, - 99, - 101, - 103, - 115, - 56, - 56, - 107, - 108, - 102, - 104, - 117, - 98, - 56, - 56, - 56, - 56, - 118, - 56, - 56, - 100, - 109, - 106, - 56, - 56, - 105, - 101, - 56, - 103, - 115, - 56, - 116, - 107, - 108, - 119, - 104, - 117, - 56, - 123, - 120, - 56, - 118, - 125, - 121, - 56, - 56, - 109, - 56, - 56, - 124, - 56, - 122, - 127, - 128, - 126, - 110, - 116, - 111, - 130, - 119, - 56, - 56, - 132, - 123, - 120, - 112, - 56, - 125, - 121, - 56, - 113, - 114, - 56, - 131, - 124, - 122, - 56, - 127, - 128, - 126, - 110, - 129, - 111, - 130, - 56, - 56, - 132, - 56, - 56, - 134, - 112, - 56, - 135, - 133, - 113, - 114, - 136, - 137, - - 131, - 56, - 56, - 56, - 56, - 56, - 142, - 139, - 129, - 138, - 56, - 56, - 56, - 56, - 56, - 56, - 134, - 140, - 56, - 135, - 133, - 141, - 151, - 136, - 137, - 56, - 56, - 143, - 144, - 56, - 56, - 142, - 139, - 146, - 138, - 147, - 56, - 145, - 148, - 149, - 56, - 140, - 56, - 56, - 56, - 150, - 141, - 151, - 56, - 153, - 154, - 56, - 143, - 144, - 56, - 56, - 158, - 157, - 146, - 155, - 147, - 145, - 152, - 148, - 149, - 56, - 56, - 156, - 56, - 56, - 150, - 161, - 160, - 162, - 153, - 154, - 159, - 56, - 56, - 56, - 158, - 56, - 157, - 56, - 155, - 56, - 56, - 152, - 56, - 56, - 56, - 163, - 156, - 167, - 166, - 169, - 161, - 160, - 162, - 164, - - 159, - 165, - 56, - 168, - 56, - 174, - 172, - 171, - 56, - 170, - 56, - 179, - 56, - 56, - 178, - 163, - 173, - 167, - 56, - 166, - 169, - 56, - 56, - 164, - 56, - 56, - 165, - 168, - 56, - 177, - 174, - 172, - 171, - 170, - 175, - 176, - 179, - 56, - 56, - 178, - 173, - 56, - 180, - 56, - 56, - 182, - 185, - 181, - 56, - 56, - 183, - 56, - 184, - 186, - 177, - 56, - 56, - 187, - 175, - 176, - 190, - 56, - 188, - 56, - 56, - 56, - 193, - 180, - 56, - 182, - 185, - 192, - 181, - 56, - 195, - 183, - 56, - 184, - 186, - 189, - 191, - 56, - 187, - 56, - 56, - 190, - 199, - 188, - 194, - 200, - 197, - 193, - 56, - 56, - 56, - 56, - 192, - 56, - 56, - 195, - - 201, - 202, - 56, - 189, - 191, - 56, - 196, - 198, - 56, - 204, - 56, - 199, - 194, - 56, - 200, - 197, - 56, - 203, - 56, - 56, - 56, - 56, - 56, - 92, - 56, - 201, - 202, - 56, - 56, - 56, - 196, - 198, - 56, - 92, - 204, - 50, - 48, - 56, - 55, - 51, - 50, - 48, - 203, - 45, - 45, - 47, - 47, - 49, - 49, - 46, - 205, - 5, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205}; - -static const flex_int16_t yy_chk[621] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 20, - 25, - 20, - 22, - 22, - 26, - 27, - 28, - 32, - 31, - 29, - 27, - 28, - 51, - 26, - 51, - 28, - 32, - 27, - 25, - 210, - 209, - 33, - 204, - 25, - 27, - 203, - 34, - 27, - 28, - 202, - 31, - - 199, - 198, - 26, - 30, - 27, - 28, - 29, - 26, - 33, - 28, - 32, - 27, - 25, - 33, - 34, - 36, - 25, - 37, - 27, - 30, - 27, - 28, - 30, - 31, - 39, - 30, - 26, - 38, - 36, - 197, - 29, - 42, - 196, - 33, - 36, - 41, - 37, - 33, - 44, - 34, - 41, - 43, - 37, - 39, - 30, - 38, - 43, - 30, - 40, - 30, - 44, - 42, - 60, - 36, - 58, - 66, - 64, - 40, - 62, - 36, - 40, - 37, - 58, - 60, - 63, - 41, - 37, - 68, - 39, - 63, - 38, - 43, - 40, - 64, - 62, - 44, - 42, - 40, - 71, - 66, - 65, - 67, - 40, - 70, - 194, - 40, - 68, - 58, - 60, - 65, - 72, - 73, - 69, - 77, - 63, - 80, - 40, - 67, - 64, - 62, - - 71, - 40, - 70, - 66, - 67, - 69, - 77, - 74, - 79, - 72, - 73, - 68, - 69, - 79, - 65, - 191, - 190, - 189, - 78, - 80, - 81, - 85, - 67, - 74, - 71, - 83, - 87, - 70, - 67, - 84, - 69, - 77, - 86, - 78, - 72, - 73, - 81, - 69, - 79, - 90, - 85, - 83, - 96, - 80, - 87, - 84, - 89, - 94, - 74, - 75, - 88, - 86, - 187, - 84, - 89, - 90, - 88, - 75, - 78, - 75, - 94, - 81, - 186, - 185, - 96, - 85, - 83, - 75, - 95, - 87, - 84, - 184, - 75, - 75, - 91, - 95, - 86, - 84, - 97, - 89, - 90, - 88, - 75, - 91, - 75, - 94, - 98, - 102, - 96, - 99, - 100, - 98, - 75, - 103, - 99, - 97, - 75, - 75, - 99, - 100, - - 95, - 105, - 101, - 114, - 175, - 104, - 105, - 102, - 91, - 101, - 106, - 107, - 108, - 109, - 173, - 172, - 98, - 103, - 170, - 99, - 97, - 104, - 114, - 99, - 100, - 111, - 110, - 106, - 107, - 123, - 112, - 105, - 102, - 109, - 101, - 110, - 113, - 108, - 111, - 112, - 116, - 103, - 117, - 119, - 115, - 113, - 104, - 114, - 121, - 116, - 117, - 120, - 106, - 107, - 124, - 126, - 123, - 121, - 109, - 119, - 110, - 108, - 115, - 111, - 112, - 125, - 128, - 120, - 127, - 134, - 113, - 126, - 125, - 127, - 116, - 117, - 124, - 129, - 165, - 137, - 123, - 133, - 121, - 130, - 119, - 142, - 145, - 115, - 147, - 148, - 141, - 128, - 120, - 134, - 133, - 141, - 126, - 125, - 127, - 129, - - 124, - 130, - 143, - 137, - 157, - 148, - 145, - 143, - 156, - 142, - 160, - 157, - 149, - 150, - 156, - 128, - 147, - 134, - 158, - 133, - 141, - 162, - 166, - 129, - 155, - 154, - 130, - 137, - 153, - 155, - 148, - 145, - 143, - 142, - 149, - 150, - 157, - 159, - 161, - 156, - 147, - 163, - 159, - 164, - 167, - 162, - 166, - 161, - 168, - 169, - 163, - 174, - 164, - 167, - 155, - 171, - 176, - 168, - 149, - 150, - 174, - 178, - 169, - 180, - 179, - 177, - 178, - 159, - 188, - 162, - 166, - 177, - 161, - 192, - 180, - 163, - 152, - 164, - 167, - 171, - 176, - 182, - 168, - 181, - 183, - 174, - 188, - 169, - 179, - 192, - 182, - 178, - 195, - 193, - 201, - 151, - 177, - 146, - 144, - 180, - - 193, - 195, - 140, - 171, - 176, - 139, - 181, - 183, - 200, - 201, - 138, - 188, - 179, - 136, - 192, - 182, - 135, - 200, - 132, - 131, - 122, - 118, - 93, - 92, - 82, - 193, - 195, - 76, - 61, - 59, - 181, - 183, - 57, - 52, - 201, - 49, - 47, - 35, - 24, - 17, - 11, - 10, - 200, - 206, - 206, - 207, - 207, - 208, - 208, - 9, - 5, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205, - 205}; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[206] = + { 0, + 0, 0, 0, 0, 71, 69, 1, 2, 69, 69, + 69, 49, 50, 65, 63, 51, 64, 6, 66, 3, + 5, 56, 52, 58, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 70, 55, 0, 67, 0, 68, + 3, 0, 53, 54, 57, 62, 62, 62, 44, 62, + 43, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 60, 62, 62, 62, 62, + 62, 15, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 4, 22, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 32, 62, 62, 62, 59, 62, 62, + 62, 28, 62, 62, 62, 62, 62, 62, 62, 62, + 19, 33, 62, 62, 39, 35, 62, 9, 11, 7, + 62, 62, 62, 20, 62, 8, 62, 62, 62, 62, + 24, 48, 61, 38, 36, 62, 62, 16, 62, 17, + 62, 62, 62, 62, 29, 62, 62, 62, 62, 34, + 62, 42, 14, 62, 47, 62, 62, 62, 62, 62, + 12, 62, 62, 21, 30, 10, 26, 62, 46, 40, + 23, 62, 62, 18, 62, 13, 27, 25, 41, 62, + + 62, 45, 37, 31, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, + 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 36, + 1, 1, 1, 1, 36, 1, 45, 46, 47, 48, + + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 36, 61, 62, 63, 64, 65, 66, 67, + 68, 36, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[69] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2 + } ; + +static const flex_int16_t yy_base[211] = + { 0, + 0, 0, 0, 0, 551, 552, 552, 552, 532, 537, + 535, 552, 552, 552, 552, 552, 525, 552, 552, 56, + 552, 54, 552, 521, 55, 59, 60, 61, 64, 89, + 63, 62, 76, 81, 523, 101, 103, 113, 110, 134, + 121, 117, 127, 124, 552, 552, 532, 552, 530, 552, + 69, 519, 552, 552, 552, 0, 518, 140, 515, 138, + 514, 144, 150, 142, 166, 141, 167, 153, 178, 169, + 164, 176, 177, 193, 235, 513, 179, 204, 194, 181, + 206, 510, 211, 215, 207, 218, 212, 236, 232, 225, + 260, 509, 508, 233, 254, 228, 264, 272, 275, 276, + + 288, 273, 279, 291, 287, 296, 297, 298, 299, 312, + 311, 316, 322, 289, 330, 326, 328, 507, 329, 337, + 334, 506, 315, 340, 351, 341, 354, 352, 363, 369, + 505, 504, 367, 355, 502, 499, 365, 496, 491, 488, + 376, 371, 388, 484, 372, 483, 374, 375, 398, 399, + 481, 462, 414, 411, 410, 394, 390, 404, 423, 396, + 424, 407, 427, 429, 364, 408, 430, 434, 435, 304, + 441, 301, 300, 437, 290, 442, 451, 447, 450, 449, + 469, 467, 470, 257, 249, 248, 238, 454, 203, 202, + 201, 459, 479, 170, 478, 118, 115, 87, 86, 494, + + 480, 84, 80, 77, 552, 543, 545, 547, 88, 87 + } ; + +static const flex_int16_t yy_def[211] = + { 0, + 205, 1, 206, 206, 205, 205, 205, 205, 205, 207, + 208, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 205, 205, 207, 205, 208, 205, + 205, 205, 205, 205, 205, 210, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 205, 209, 209, 209, 209, 209, 209, 209, 209, + + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + + 209, 209, 209, 209, 0, 205, 205, 205, 205, 205 + } ; + +static const flex_int16_t yy_nxt[621] = + { 0, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, + 43, 44, 35, 35, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 35, 37, 38, 35, + 39, 40, 41, 42, 43, 44, 35, 35, 52, 56, + 51, 53, 54, 56, 56, 56, 56, 56, 56, 62, + 66, 52, 60, 51, 67, 74, 63, 58, 56, 57, + 56, 56, 59, 64, 56, 56, 65, 68, 56, 73, + + 56, 56, 61, 56, 62, 66, 69, 60, 75, 67, + 74, 63, 58, 76, 77, 56, 59, 56, 64, 70, + 65, 68, 71, 73, 56, 72, 61, 56, 78, 56, + 69, 56, 56, 75, 79, 56, 80, 76, 56, 77, + 88, 56, 81, 83, 70, 82, 90, 71, 56, 72, + 91, 89, 56, 78, 56, 56, 56, 84, 56, 79, + 85, 80, 93, 94, 56, 88, 81, 56, 83, 96, + 82, 90, 86, 97, 95, 91, 89, 87, 56, 99, + 56, 56, 84, 56, 56, 85, 102, 93, 94, 98, + 56, 56, 56, 56, 96, 56, 86, 100, 97, 95, + + 106, 87, 105, 99, 101, 103, 115, 56, 56, 107, + 108, 102, 104, 117, 98, 56, 56, 56, 56, 118, + 56, 56, 100, 109, 106, 56, 56, 105, 101, 56, + 103, 115, 56, 116, 107, 108, 119, 104, 117, 56, + 123, 120, 56, 118, 125, 121, 56, 56, 109, 56, + 56, 124, 56, 122, 127, 128, 126, 110, 116, 111, + 130, 119, 56, 56, 132, 123, 120, 112, 56, 125, + 121, 56, 113, 114, 56, 131, 124, 122, 56, 127, + 128, 126, 110, 129, 111, 130, 56, 56, 132, 56, + 56, 134, 112, 56, 135, 133, 113, 114, 136, 137, + + 131, 56, 56, 56, 56, 56, 142, 139, 129, 138, + 56, 56, 56, 56, 56, 56, 134, 140, 56, 135, + 133, 141, 151, 136, 137, 56, 56, 143, 144, 56, + 56, 142, 139, 146, 138, 147, 56, 145, 148, 149, + 56, 140, 56, 56, 56, 150, 141, 151, 56, 153, + 154, 56, 143, 144, 56, 56, 158, 157, 146, 155, + 147, 145, 152, 148, 149, 56, 56, 156, 56, 56, + 150, 161, 160, 162, 153, 154, 159, 56, 56, 56, + 158, 56, 157, 56, 155, 56, 56, 152, 56, 56, + 56, 163, 156, 167, 166, 169, 161, 160, 162, 164, + + 159, 165, 56, 168, 56, 174, 172, 171, 56, 170, + 56, 179, 56, 56, 178, 163, 173, 167, 56, 166, + 169, 56, 56, 164, 56, 56, 165, 168, 56, 177, + 174, 172, 171, 170, 175, 176, 179, 56, 56, 178, + 173, 56, 180, 56, 56, 182, 185, 181, 56, 56, + 183, 56, 184, 186, 177, 56, 56, 187, 175, 176, + 190, 56, 188, 56, 56, 56, 193, 180, 56, 182, + 185, 192, 181, 56, 195, 183, 56, 184, 186, 189, + 191, 56, 187, 56, 56, 190, 199, 188, 194, 200, + 197, 193, 56, 56, 56, 56, 192, 56, 56, 195, + + 201, 202, 56, 189, 191, 56, 196, 198, 56, 204, + 56, 199, 194, 56, 200, 197, 56, 203, 56, 56, + 56, 56, 56, 92, 56, 201, 202, 56, 56, 56, + 196, 198, 56, 92, 204, 50, 48, 56, 55, 51, + 50, 48, 203, 45, 45, 47, 47, 49, 49, 46, + 205, 5, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205 + } ; + +static const flex_int16_t yy_chk[621] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, + 20, 22, 22, 26, 27, 28, 32, 31, 29, 27, + 28, 51, 26, 51, 28, 32, 27, 25, 210, 209, + 33, 204, 25, 27, 203, 34, 27, 28, 202, 31, + + 199, 198, 26, 30, 27, 28, 29, 26, 33, 28, + 32, 27, 25, 33, 34, 36, 25, 37, 27, 30, + 27, 28, 30, 31, 39, 30, 26, 38, 36, 197, + 29, 42, 196, 33, 36, 41, 37, 33, 44, 34, + 41, 43, 37, 39, 30, 38, 43, 30, 40, 30, + 44, 42, 60, 36, 58, 66, 64, 40, 62, 36, + 40, 37, 58, 60, 63, 41, 37, 68, 39, 63, + 38, 43, 40, 64, 62, 44, 42, 40, 71, 66, + 65, 67, 40, 70, 194, 40, 68, 58, 60, 65, + 72, 73, 69, 77, 63, 80, 40, 67, 64, 62, + + 71, 40, 70, 66, 67, 69, 77, 74, 79, 72, + 73, 68, 69, 79, 65, 191, 190, 189, 78, 80, + 81, 85, 67, 74, 71, 83, 87, 70, 67, 84, + 69, 77, 86, 78, 72, 73, 81, 69, 79, 90, + 85, 83, 96, 80, 87, 84, 89, 94, 74, 75, + 88, 86, 187, 84, 89, 90, 88, 75, 78, 75, + 94, 81, 186, 185, 96, 85, 83, 75, 95, 87, + 84, 184, 75, 75, 91, 95, 86, 84, 97, 89, + 90, 88, 75, 91, 75, 94, 98, 102, 96, 99, + 100, 98, 75, 103, 99, 97, 75, 75, 99, 100, + + 95, 105, 101, 114, 175, 104, 105, 102, 91, 101, + 106, 107, 108, 109, 173, 172, 98, 103, 170, 99, + 97, 104, 114, 99, 100, 111, 110, 106, 107, 123, + 112, 105, 102, 109, 101, 110, 113, 108, 111, 112, + 116, 103, 117, 119, 115, 113, 104, 114, 121, 116, + 117, 120, 106, 107, 124, 126, 123, 121, 109, 119, + 110, 108, 115, 111, 112, 125, 128, 120, 127, 134, + 113, 126, 125, 127, 116, 117, 124, 129, 165, 137, + 123, 133, 121, 130, 119, 142, 145, 115, 147, 148, + 141, 128, 120, 134, 133, 141, 126, 125, 127, 129, + + 124, 130, 143, 137, 157, 148, 145, 143, 156, 142, + 160, 157, 149, 150, 156, 128, 147, 134, 158, 133, + 141, 162, 166, 129, 155, 154, 130, 137, 153, 155, + 148, 145, 143, 142, 149, 150, 157, 159, 161, 156, + 147, 163, 159, 164, 167, 162, 166, 161, 168, 169, + 163, 174, 164, 167, 155, 171, 176, 168, 149, 150, + 174, 178, 169, 180, 179, 177, 178, 159, 188, 162, + 166, 177, 161, 192, 180, 163, 152, 164, 167, 171, + 176, 182, 168, 181, 183, 174, 188, 169, 179, 192, + 182, 178, 195, 193, 201, 151, 177, 146, 144, 180, + + 193, 195, 140, 171, 176, 139, 181, 183, 200, 201, + 138, 188, 179, 136, 192, 182, 135, 200, 132, 131, + 122, 118, 93, 92, 82, 193, 195, 76, 61, 59, + 181, 183, 57, 52, 201, 49, 47, 35, 24, 17, + 11, 10, 200, 206, 206, 207, 207, 208, 208, 9, + 5, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205 + } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2618,8 +673,8 @@ static const flex_int16_t yy_chk[621] = {0, #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -2633,15 +688,13 @@ static const flex_int16_t yy_chk[621] = {0, #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) \ - LOG_DEBUG("%s", #token); \ - return token +#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token #line 698 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -2670,124 +723,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t -{ - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char *yy_last_accepting_cpos; + { - int yylineno_r; - int yy_flex_debug_r; + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; - YYSTYPE *yylval_r; + int yylineno_r; + int yy_flex_debug_r; - YYLTYPE *yylloc_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; -}; /* end struct yyguts_t */ + YYSTYPE * yylval_r; -static int yy_init_globals(yyscan_t yyscanner); + YYLTYPE * yylloc_r; -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -#define yylval yyg->yylval_r + }; /* end struct yyguts_t */ -#define yylloc yyg->yylloc_r +static int yy_init_globals ( yyscan_t yyscanner ); -int yylex_init(yyscan_t *scanner); + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner); +static int yyinput ( yyscan_t yyscanner ); #else -static int input(yyscan_t yyscanner); +static int input ( yyscan_t yyscanner ); #endif #endif @@ -2807,38 +860,42 @@ static int input(yyscan_t yyscanner); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - yy_size_t n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -2857,7 +914,7 @@ static int input(yyscan_t yyscanner); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -2868,9 +925,11 @@ static int input(yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -2882,510 +941,589 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP YY_USER_ACTION +#define YY_RULE_SETUP \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if (!yyg->yy_init) { - yyg->yy_init = 1; + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!yyg->yy_start) - yyg->yy_start = 1; /* first start state */ + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_load_buffer_state(yyscanner); - } + yy_load_buffer_state( yyscanner ); + } - { + { #line 75 "lex_sql.l" + #line 993 "lex_sql.cpp" - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 206) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_base[yy_current_state] != 552); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - if (yy_act == 0) { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - - case 1: YY_RULE_SETUP + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 206 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 552 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 77 "lex_sql.l" - // ignore whitespace - YY_BREAK - case 2: - /* rule 2 can match eol */ - YY_RULE_SETUP +// ignore whitespace + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP #line 78 "lex_sql.l" - ; - YY_BREAK - case 3: YY_RULE_SETUP +; + YY_BREAK +case 3: +YY_RULE_SETUP #line 80 "lex_sql.l" - yylval->number = atoi(yytext); - RETURN_TOKEN(NUMBER); - YY_BREAK - case 4: YY_RULE_SETUP +yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); + YY_BREAK +case 4: +YY_RULE_SETUP #line 81 "lex_sql.l" - yylval->floats = (float)(atof(yytext)); - RETURN_TOKEN(FLOAT); - YY_BREAK - case 5: YY_RULE_SETUP +yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); + YY_BREAK +case 5: +YY_RULE_SETUP #line 83 "lex_sql.l" - RETURN_TOKEN(SEMICOLON); - YY_BREAK - case 6: YY_RULE_SETUP +RETURN_TOKEN(SEMICOLON); + YY_BREAK +case 6: +YY_RULE_SETUP #line 84 "lex_sql.l" - RETURN_TOKEN(DOT); - YY_BREAK - case 7: YY_RULE_SETUP +RETURN_TOKEN(DOT); + YY_BREAK +case 7: +YY_RULE_SETUP #line 85 "lex_sql.l" - RETURN_TOKEN(EXIT); - YY_BREAK - case 8: YY_RULE_SETUP +RETURN_TOKEN(EXIT); + YY_BREAK +case 8: +YY_RULE_SETUP #line 86 "lex_sql.l" - RETURN_TOKEN(HELP); - YY_BREAK - case 9: YY_RULE_SETUP +RETURN_TOKEN(HELP); + YY_BREAK +case 9: +YY_RULE_SETUP #line 87 "lex_sql.l" - RETURN_TOKEN(DESC); - YY_BREAK - case 10: YY_RULE_SETUP +RETURN_TOKEN(DESC); + YY_BREAK +case 10: +YY_RULE_SETUP #line 88 "lex_sql.l" - RETURN_TOKEN(CREATE); - YY_BREAK - case 11: YY_RULE_SETUP +RETURN_TOKEN(CREATE); + YY_BREAK +case 11: +YY_RULE_SETUP #line 89 "lex_sql.l" - RETURN_TOKEN(DROP); - YY_BREAK - case 12: YY_RULE_SETUP +RETURN_TOKEN(DROP); + YY_BREAK +case 12: +YY_RULE_SETUP #line 90 "lex_sql.l" - RETURN_TOKEN(TABLE); - YY_BREAK - case 13: YY_RULE_SETUP +RETURN_TOKEN(TABLE); + YY_BREAK +case 13: +YY_RULE_SETUP #line 91 "lex_sql.l" - RETURN_TOKEN(TABLES); - YY_BREAK - case 14: YY_RULE_SETUP +RETURN_TOKEN(TABLES); + YY_BREAK +case 14: +YY_RULE_SETUP #line 92 "lex_sql.l" - RETURN_TOKEN(INDEX); - YY_BREAK - case 15: YY_RULE_SETUP +RETURN_TOKEN(INDEX); + YY_BREAK +case 15: +YY_RULE_SETUP #line 93 "lex_sql.l" - RETURN_TOKEN(ON); - YY_BREAK - case 16: YY_RULE_SETUP +RETURN_TOKEN(ON); + YY_BREAK +case 16: +YY_RULE_SETUP #line 94 "lex_sql.l" - RETURN_TOKEN(SHOW); - YY_BREAK - case 17: YY_RULE_SETUP +RETURN_TOKEN(SHOW); + YY_BREAK +case 17: +YY_RULE_SETUP #line 95 "lex_sql.l" - RETURN_TOKEN(SYNC); - YY_BREAK - case 18: YY_RULE_SETUP +RETURN_TOKEN(SYNC); + YY_BREAK +case 18: +YY_RULE_SETUP #line 96 "lex_sql.l" - RETURN_TOKEN(SELECT); - YY_BREAK - case 19: YY_RULE_SETUP +RETURN_TOKEN(SELECT); + YY_BREAK +case 19: +YY_RULE_SETUP #line 97 "lex_sql.l" - RETURN_TOKEN(CALC); - YY_BREAK - case 20: YY_RULE_SETUP +RETURN_TOKEN(CALC); + YY_BREAK +case 20: +YY_RULE_SETUP #line 98 "lex_sql.l" - RETURN_TOKEN(FROM); - YY_BREAK - case 21: YY_RULE_SETUP +RETURN_TOKEN(FROM); + YY_BREAK +case 21: +YY_RULE_SETUP #line 99 "lex_sql.l" - RETURN_TOKEN(WHERE); - YY_BREAK - case 22: YY_RULE_SETUP +RETURN_TOKEN(WHERE); + YY_BREAK +case 22: +YY_RULE_SETUP #line 100 "lex_sql.l" - RETURN_TOKEN(AND); - YY_BREAK - case 23: YY_RULE_SETUP +RETURN_TOKEN(AND); + YY_BREAK +case 23: +YY_RULE_SETUP #line 101 "lex_sql.l" - RETURN_TOKEN(INSERT); - YY_BREAK - case 24: YY_RULE_SETUP +RETURN_TOKEN(INSERT); + YY_BREAK +case 24: +YY_RULE_SETUP #line 102 "lex_sql.l" - RETURN_TOKEN(INTO); - YY_BREAK - case 25: YY_RULE_SETUP +RETURN_TOKEN(INTO); + YY_BREAK +case 25: +YY_RULE_SETUP #line 103 "lex_sql.l" - RETURN_TOKEN(VALUES); - YY_BREAK - case 26: YY_RULE_SETUP +RETURN_TOKEN(VALUES); + YY_BREAK +case 26: +YY_RULE_SETUP #line 104 "lex_sql.l" - RETURN_TOKEN(DELETE); - YY_BREAK - case 27: YY_RULE_SETUP +RETURN_TOKEN(DELETE); + YY_BREAK +case 27: +YY_RULE_SETUP #line 105 "lex_sql.l" - RETURN_TOKEN(UPDATE); - YY_BREAK - case 28: YY_RULE_SETUP +RETURN_TOKEN(UPDATE); + YY_BREAK +case 28: +YY_RULE_SETUP #line 106 "lex_sql.l" - RETURN_TOKEN(SET); - YY_BREAK - case 29: YY_RULE_SETUP +RETURN_TOKEN(SET); + YY_BREAK +case 29: +YY_RULE_SETUP #line 107 "lex_sql.l" - RETURN_TOKEN(TRX_BEGIN); - YY_BREAK - case 30: YY_RULE_SETUP +RETURN_TOKEN(TRX_BEGIN); + YY_BREAK +case 30: +YY_RULE_SETUP #line 108 "lex_sql.l" - RETURN_TOKEN(TRX_COMMIT); - YY_BREAK - case 31: YY_RULE_SETUP +RETURN_TOKEN(TRX_COMMIT); + YY_BREAK +case 31: +YY_RULE_SETUP #line 109 "lex_sql.l" - RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK - case 32: YY_RULE_SETUP +RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK +case 32: +YY_RULE_SETUP #line 110 "lex_sql.l" - RETURN_TOKEN(INT_T); - YY_BREAK - case 33: YY_RULE_SETUP +RETURN_TOKEN(INT_T); + YY_BREAK +case 33: +YY_RULE_SETUP #line 111 "lex_sql.l" - RETURN_TOKEN(STRING_T); - YY_BREAK - case 34: YY_RULE_SETUP +RETURN_TOKEN(STRING_T); + YY_BREAK +case 34: +YY_RULE_SETUP #line 112 "lex_sql.l" - RETURN_TOKEN(FLOAT_T); - YY_BREAK - case 35: YY_RULE_SETUP +RETURN_TOKEN(FLOAT_T); + YY_BREAK +case 35: +YY_RULE_SETUP #line 113 "lex_sql.l" - RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK - case 36: YY_RULE_SETUP +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK +case 36: +YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(NULL_T); - YY_BREAK - case 37: YY_RULE_SETUP +RETURN_TOKEN(NULL_T); + YY_BREAK +case 37: +YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(NULLABLE); - YY_BREAK - case 38: YY_RULE_SETUP +RETURN_TOKEN(NULLABLE); + YY_BREAK +case 38: +YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(LOAD); - YY_BREAK - case 39: YY_RULE_SETUP +RETURN_TOKEN(LOAD); + YY_BREAK +case 39: +YY_RULE_SETUP #line 117 "lex_sql.l" - RETURN_TOKEN(DATA); - YY_BREAK - case 40: YY_RULE_SETUP +RETURN_TOKEN(DATA); + YY_BREAK +case 40: +YY_RULE_SETUP #line 118 "lex_sql.l" - RETURN_TOKEN(INFILE); - YY_BREAK - case 41: YY_RULE_SETUP +RETURN_TOKEN(INFILE); + YY_BREAK +case 41: +YY_RULE_SETUP #line 119 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); - YY_BREAK - case 42: YY_RULE_SETUP +RETURN_TOKEN(EXPLAIN); + YY_BREAK +case 42: +YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(GROUP); - YY_BREAK - case 43: YY_RULE_SETUP +RETURN_TOKEN(GROUP); + YY_BREAK +case 43: +YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(BY); - YY_BREAK - case 44: YY_RULE_SETUP +RETURN_TOKEN(BY); + YY_BREAK +case 44: +YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(AS); - YY_BREAK - case 45: YY_RULE_SETUP +RETURN_TOKEN(AS); + YY_BREAK +case 45: +YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(STORAGE); - YY_BREAK - case 46: YY_RULE_SETUP +RETURN_TOKEN(STORAGE); + YY_BREAK +case 46: +YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(FORMAT); - YY_BREAK - case 47: YY_RULE_SETUP +RETURN_TOKEN(FORMAT); + YY_BREAK +case 47: +YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(INNER); - YY_BREAK - case 48: YY_RULE_SETUP +RETURN_TOKEN(INNER); + YY_BREAK +case 48: +YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(JOIN); - YY_BREAK - case 49: YY_RULE_SETUP +RETURN_TOKEN(JOIN); + YY_BREAK +case 49: +YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(LBRACE); - YY_BREAK - case 50: YY_RULE_SETUP +RETURN_TOKEN(LBRACE); + YY_BREAK +case 50: +YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(RBRACE); - YY_BREAK - case 51: YY_RULE_SETUP +RETURN_TOKEN(RBRACE); + YY_BREAK +case 51: +YY_RULE_SETUP #line 130 "lex_sql.l" - RETURN_TOKEN(COMMA); - YY_BREAK - case 52: YY_RULE_SETUP +RETURN_TOKEN(COMMA); + YY_BREAK +case 52: +YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(EQ); - YY_BREAK - case 53: YY_RULE_SETUP +RETURN_TOKEN(EQ); + YY_BREAK +case 53: +YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(LE); - YY_BREAK - case 54: YY_RULE_SETUP +RETURN_TOKEN(LE); + YY_BREAK +case 54: +YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 55: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 55: +YY_RULE_SETUP #line 134 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 56: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 56: +YY_RULE_SETUP #line 135 "lex_sql.l" - RETURN_TOKEN(LT); - YY_BREAK - case 57: YY_RULE_SETUP +RETURN_TOKEN(LT); + YY_BREAK +case 57: +YY_RULE_SETUP #line 136 "lex_sql.l" - RETURN_TOKEN(GE); - YY_BREAK - case 58: YY_RULE_SETUP +RETURN_TOKEN(GE); + YY_BREAK +case 58: +YY_RULE_SETUP #line 137 "lex_sql.l" - RETURN_TOKEN(GT); - YY_BREAK - case 59: YY_RULE_SETUP +RETURN_TOKEN(GT); + YY_BREAK +case 59: +YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(NOT); - YY_BREAK - case 60: YY_RULE_SETUP +RETURN_TOKEN(NOT); + YY_BREAK +case 60: +YY_RULE_SETUP #line 139 "lex_sql.l" - RETURN_TOKEN(IS); - YY_BREAK - case 61: YY_RULE_SETUP +RETURN_TOKEN(IS); + YY_BREAK +case 61: +YY_RULE_SETUP #line 140 "lex_sql.l" - RETURN_TOKEN(LIKE); - YY_BREAK - case 62: YY_RULE_SETUP +RETURN_TOKEN(LIKE); + YY_BREAK +case 62: +YY_RULE_SETUP #line 142 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(ID); - YY_BREAK - case 63: +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK +case 63: #line 145 "lex_sql.l" - case 64: +case 64: #line 146 "lex_sql.l" - case 65: +case 65: #line 147 "lex_sql.l" - case 66: YY_RULE_SETUP +case 66: +YY_RULE_SETUP #line 147 "lex_sql.l" - { - return yytext[0]; - } - YY_BREAK - case 67: - /* rule 67 can match eol */ - YY_RULE_SETUP +{ return yytext[0]; } + YY_BREAK +case 67: +/* rule 67 can match eol */ +YY_RULE_SETUP #line 148 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 68: - /* rule 68 can match eol */ - YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 68: +/* rule 68 can match eol */ +YY_RULE_SETUP #line 149 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 69: YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 69: +YY_RULE_SETUP #line 151 "lex_sql.l" - LOG_DEBUG("Unknown character [%c]",yytext[0]); - return yytext[0]; - YY_BREAK - case 70: YY_RULE_SETUP +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 70: +YY_RULE_SETUP #line 152 "lex_sql.l" - ECHO; - YY_BREAK +ECHO; + YY_BREAK #line 1394 "lex_sql.cpp" - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(STR): yyterminate(); - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if (yywrap(yyscanner)) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(STR): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3395,149 +1533,171 @@ YY_DECL * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(yyscan_t yyscanner) +static int yy_get_next_buffer (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else { - yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - yy_size_t new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if (yyg->yy_n_chars == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin, yyscanner); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = - (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(yyscan_t yyscanner) + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_current_state = yyg->yy_start; - - for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 206) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 206 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -3545,27 +1705,29 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 206) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 205); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 206 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 205); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -3574,133 +1736,141 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner) + static int yyinput (yyscan_t yyscanner) #else -static int input(yyscan_t yyscanner) + static int input (yyscan_t yyscanner) #endif { - int c; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin, yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap(yyscanner)) - return 0; - - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file, yyscan_t yyscanner) + void yyrestart (FILE * input_file , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); - yy_load_buffer_state(yyscanner); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(yyscanner); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state(yyscan_t yyscanner) +static void yy_load_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -3709,105 +1879,105 @@ static void yy_load_buffer_state(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file, yyscanner); + yy_init_buffer( b, file , yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!b) - return; + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf, yyscanner); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *)b, yyscanner); + yyfree( (void *) b , yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_flush_buffer(b, yyscanner); + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - b->yy_input_file = file; - b->yy_fill_buffer = 1; + yy_flush_buffer( b , yyscanner); - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!b) - return; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(yyscanner); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -3816,95 +1986,99 @@ void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state(yyscan_t yyscanner) +void yypop_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(yyscan_t yyscanner) +static void yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = - (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( - yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -3913,31 +2087,33 @@ static void yyensure_buffer_stack(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b, yyscanner); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -3948,10 +2124,10 @@ YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - - return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -3961,175 +2137,177 @@ YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n, yyscanner); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n, yyscanner); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyextra; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno(yyscan_t yyscanner) +int yyget_lineno (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column(yyscan_t yyscanner) +int yyget_column (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!YY_CURRENT_BUFFER) - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yycolumn; + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in(yyscan_t yyscanner) +FILE *yyget_in (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyin; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out(yyscan_t yyscanner) +FILE *yyget_out (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyout; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng(yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyleng; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text(yyscan_t yyscanner) +char *yyget_text (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yytext; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyextra = user_defined; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno(int _line_number, yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_lineno called with no buffer"); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column(int _column_no, yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_column called with no buffer"); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yycolumn = _column_no; + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -4138,80 +2316,80 @@ void yyset_column(int _column_no, yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str, yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyin = _in_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; } -void yyset_out(FILE *_out_str, yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyout = _out_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; } -int yyget_debug(yyscan_t yyscanner) +int yyget_debug (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yy_flex_debug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void yyset_debug(int _bdebug, yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flex_debug = _bdebug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ -YYSTYPE *yyget_lval(yyscan_t yyscanner) +YYSTYPE * yyget_lval (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylval; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc(yyscan_t yyscanner) +YYLTYPE *yyget_lloc (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; } - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylloc = yylloc_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t *ptr_yy_globals) +int yylex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -4221,94 +2399,94 @@ int yylex_init(yyscan_t *ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra(yy_user_defined, &dummy_yyguts); + yyset_extra (yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - yyset_extra(yy_user_defined, *ptr_yy_globals); + yyset_extra (yy_user_defined, *ptr_yy_globals); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } -static int yy_init_globals(yyscan_t yyscanner) +static int yy_init_globals (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(yyscan_t yyscanner) +int yylex_destroy (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack, yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack, yyscanner); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals(yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree(yyscanner, yyscanner); - yyscanner = NULL; - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; } /* @@ -4316,59 +2494,63 @@ int yylex_destroy(yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s, yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - int n; - for (n = 0; s[n]; ++n) - ; + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size, yyscan_t yyscanner) +void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr, yyscan_t yyscanner) +void yyfree (void * ptr , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - free((char *)ptr); /* see yyrealloc() for (char *) cast */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 152 "lex_sql.l" -void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } + +void scan_string(const char *str, yyscan_t scanner) { + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); +} + diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 7e27df55..e8700426 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,21 +12,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -79,62 +81,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -155,7 +157,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -195,72 +197,73 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -}; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -283,69 +286,69 @@ void yyfree(void *, yyscan_t yyscanner); #define YY_EXTRA_TYPE void * #endif -int yylex_init(yyscan_t *scanner); +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -373,9 +376,11 @@ static int yy_flex_strlen(const char *, yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -539,6 +544,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #line 152 "lex_sql.l" + #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 0a6bd1bb..3997a133 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -213,9 +213,9 @@ struct DropTableSqlNode */ struct CreateIndexSqlNode { - std::string index_name; ///< Index name - std::string relation_name; ///< Relation name - std::string attribute_name; ///< Attribute name + std::string index_name; ///< Index name + std::string relation_name; ///< Relation name + std::vector attribute_name; ///< Attribute name }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index fad42e1e..27bb39c2 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,9 +63,13 @@ /* Pull parsers. */ #define YYPULL 1 + + + /* First part of user prologue. */ #line 2 "yacc_sql.y" + #include #include #include @@ -88,180 +92,189 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression( - ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, + Expression *left, + Expression *right, + const char *sql_string, + YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundAggregateExpr *create_aggregate_expression( - const char *aggregate_name, Expression *child, const char *sql_string, YYLTYPE *llocp) +UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, + Expression *child, + const char *sql_string, + YYLTYPE *llocp) { UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, child); expr->set_name(token_name(sql_string, llocp)); return expr; } + #line 125 "yacc_sql.cpp" -#ifndef YY_CAST -#ifdef __cplusplus -#define YY_CAST(Type, Val) static_cast(Val) -#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) -#else -#define YY_CAST(Type, Val) ((Type)(Val)) -#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) -#endif -#endif -#ifndef YY_NULLPTR -#if defined __cplusplus -#if 201103L <= __cplusplus -#define YY_NULLPTR nullptr -#else -#define YY_NULLPTR 0 -#endif -#else -#define YY_NULLPTR ((void *)0) -#endif -#endif +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_BY = 5, /* BY */ - YYSYMBOL_CREATE = 6, /* CREATE */ - YYSYMBOL_DROP = 7, /* DROP */ - YYSYMBOL_GROUP = 8, /* GROUP */ - YYSYMBOL_TABLE = 9, /* TABLE */ - YYSYMBOL_TABLES = 10, /* TABLES */ - YYSYMBOL_INDEX = 11, /* INDEX */ - YYSYMBOL_CALC = 12, /* CALC */ - YYSYMBOL_SELECT = 13, /* SELECT */ - YYSYMBOL_DESC = 14, /* DESC */ - YYSYMBOL_SHOW = 15, /* SHOW */ - YYSYMBOL_SYNC = 16, /* SYNC */ - YYSYMBOL_INSERT = 17, /* INSERT */ - YYSYMBOL_DELETE = 18, /* DELETE */ - YYSYMBOL_UPDATE = 19, /* UPDATE */ - YYSYMBOL_LBRACE = 20, /* LBRACE */ - YYSYMBOL_RBRACE = 21, /* RBRACE */ - YYSYMBOL_COMMA = 22, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 23, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 24, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 25, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 26, /* INT_T */ - YYSYMBOL_STRING_T = 27, /* STRING_T */ - YYSYMBOL_FLOAT_T = 28, /* FLOAT_T */ - YYSYMBOL_DATE_T = 29, /* DATE_T */ - YYSYMBOL_NOT = 30, /* NOT */ - YYSYMBOL_NULL_T = 31, /* NULL_T */ - YYSYMBOL_NULLABLE = 32, /* NULLABLE */ - YYSYMBOL_HELP = 33, /* HELP */ - YYSYMBOL_EXIT = 34, /* EXIT */ - YYSYMBOL_DOT = 35, /* DOT */ - YYSYMBOL_INTO = 36, /* INTO */ - YYSYMBOL_VALUES = 37, /* VALUES */ - YYSYMBOL_FROM = 38, /* FROM */ - YYSYMBOL_WHERE = 39, /* WHERE */ - YYSYMBOL_AND = 40, /* AND */ - YYSYMBOL_SET = 41, /* SET */ - YYSYMBOL_ON = 42, /* ON */ - YYSYMBOL_LOAD = 43, /* LOAD */ - YYSYMBOL_DATA = 44, /* DATA */ - YYSYMBOL_INFILE = 45, /* INFILE */ - YYSYMBOL_EXPLAIN = 46, /* EXPLAIN */ - YYSYMBOL_STORAGE = 47, /* STORAGE */ - YYSYMBOL_FORMAT = 48, /* FORMAT */ - YYSYMBOL_INNER = 49, /* INNER */ - YYSYMBOL_JOIN = 50, /* JOIN */ - YYSYMBOL_EQ = 51, /* EQ */ - YYSYMBOL_LT = 52, /* LT */ - YYSYMBOL_GT = 53, /* GT */ - YYSYMBOL_LE = 54, /* LE */ - YYSYMBOL_GE = 55, /* GE */ - YYSYMBOL_NE = 56, /* NE */ - YYSYMBOL_LIKE = 57, /* LIKE */ - YYSYMBOL_IS = 58, /* IS */ - YYSYMBOL_NUMBER = 59, /* NUMBER */ - YYSYMBOL_FLOAT = 60, /* FLOAT */ - YYSYMBOL_ID = 61, /* ID */ - YYSYMBOL_SSS = 62, /* SSS */ - YYSYMBOL_63_ = 63, /* '+' */ - YYSYMBOL_64_ = 64, /* '-' */ - YYSYMBOL_65_ = 65, /* '*' */ - YYSYMBOL_66_ = 66, /* '/' */ - YYSYMBOL_UMINUS = 67, /* UMINUS */ - YYSYMBOL_YYACCEPT = 68, /* $accept */ - YYSYMBOL_commands = 69, /* commands */ - YYSYMBOL_command_wrapper = 70, /* command_wrapper */ - YYSYMBOL_exit_stmt = 71, /* exit_stmt */ - YYSYMBOL_help_stmt = 72, /* help_stmt */ - YYSYMBOL_sync_stmt = 73, /* sync_stmt */ - YYSYMBOL_begin_stmt = 74, /* begin_stmt */ - YYSYMBOL_commit_stmt = 75, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 76, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 77, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 78, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 79, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 80, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 81, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 82, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 83, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 84, /* attr_def_list */ - YYSYMBOL_attr_def = 85, /* attr_def */ - YYSYMBOL_nullable_constraint = 86, /* nullable_constraint */ - YYSYMBOL_number = 87, /* number */ - YYSYMBOL_type = 88, /* type */ - YYSYMBOL_insert_stmt = 89, /* insert_stmt */ - YYSYMBOL_values_list = 90, /* values_list */ - YYSYMBOL_value_list = 91, /* value_list */ - YYSYMBOL_value = 92, /* value */ - YYSYMBOL_storage_format = 93, /* storage_format */ - YYSYMBOL_delete_stmt = 94, /* delete_stmt */ - YYSYMBOL_update_stmt = 95, /* update_stmt */ - YYSYMBOL_setClauses = 96, /* setClauses */ - YYSYMBOL_setClause = 97, /* setClause */ - YYSYMBOL_select_stmt = 98, /* select_stmt */ - YYSYMBOL_calc_stmt = 99, /* calc_stmt */ - YYSYMBOL_expression_list = 100, /* expression_list */ - YYSYMBOL_expression = 101, /* expression */ - YYSYMBOL_alias = 102, /* alias */ - YYSYMBOL_aggr_func_expr = 103, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 104, /* rel_attr */ - YYSYMBOL_relation = 105, /* relation */ - YYSYMBOL_rel_list = 106, /* rel_list */ - YYSYMBOL_joinClause = 107, /* joinClause */ - YYSYMBOL_joinClauses = 108, /* joinClauses */ - YYSYMBOL_where = 109, /* where */ - YYSYMBOL_condition_list = 110, /* condition_list */ - YYSYMBOL_condition = 111, /* condition */ - YYSYMBOL_comp_op = 112, /* comp_op */ - YYSYMBOL_group_by = 113, /* group_by */ - YYSYMBOL_load_data_stmt = 114, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 115, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 116, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 117 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_BY = 5, /* BY */ + YYSYMBOL_CREATE = 6, /* CREATE */ + YYSYMBOL_DROP = 7, /* DROP */ + YYSYMBOL_GROUP = 8, /* GROUP */ + YYSYMBOL_TABLE = 9, /* TABLE */ + YYSYMBOL_TABLES = 10, /* TABLES */ + YYSYMBOL_INDEX = 11, /* INDEX */ + YYSYMBOL_CALC = 12, /* CALC */ + YYSYMBOL_SELECT = 13, /* SELECT */ + YYSYMBOL_DESC = 14, /* DESC */ + YYSYMBOL_SHOW = 15, /* SHOW */ + YYSYMBOL_SYNC = 16, /* SYNC */ + YYSYMBOL_INSERT = 17, /* INSERT */ + YYSYMBOL_DELETE = 18, /* DELETE */ + YYSYMBOL_UPDATE = 19, /* UPDATE */ + YYSYMBOL_LBRACE = 20, /* LBRACE */ + YYSYMBOL_RBRACE = 21, /* RBRACE */ + YYSYMBOL_COMMA = 22, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 23, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 24, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 25, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 26, /* INT_T */ + YYSYMBOL_STRING_T = 27, /* STRING_T */ + YYSYMBOL_FLOAT_T = 28, /* FLOAT_T */ + YYSYMBOL_DATE_T = 29, /* DATE_T */ + YYSYMBOL_NOT = 30, /* NOT */ + YYSYMBOL_NULL_T = 31, /* NULL_T */ + YYSYMBOL_NULLABLE = 32, /* NULLABLE */ + YYSYMBOL_HELP = 33, /* HELP */ + YYSYMBOL_EXIT = 34, /* EXIT */ + YYSYMBOL_DOT = 35, /* DOT */ + YYSYMBOL_INTO = 36, /* INTO */ + YYSYMBOL_VALUES = 37, /* VALUES */ + YYSYMBOL_FROM = 38, /* FROM */ + YYSYMBOL_WHERE = 39, /* WHERE */ + YYSYMBOL_AND = 40, /* AND */ + YYSYMBOL_SET = 41, /* SET */ + YYSYMBOL_ON = 42, /* ON */ + YYSYMBOL_LOAD = 43, /* LOAD */ + YYSYMBOL_DATA = 44, /* DATA */ + YYSYMBOL_INFILE = 45, /* INFILE */ + YYSYMBOL_EXPLAIN = 46, /* EXPLAIN */ + YYSYMBOL_STORAGE = 47, /* STORAGE */ + YYSYMBOL_FORMAT = 48, /* FORMAT */ + YYSYMBOL_INNER = 49, /* INNER */ + YYSYMBOL_JOIN = 50, /* JOIN */ + YYSYMBOL_EQ = 51, /* EQ */ + YYSYMBOL_LT = 52, /* LT */ + YYSYMBOL_GT = 53, /* GT */ + YYSYMBOL_LE = 54, /* LE */ + YYSYMBOL_GE = 55, /* GE */ + YYSYMBOL_NE = 56, /* NE */ + YYSYMBOL_LIKE = 57, /* LIKE */ + YYSYMBOL_IS = 58, /* IS */ + YYSYMBOL_NUMBER = 59, /* NUMBER */ + YYSYMBOL_FLOAT = 60, /* FLOAT */ + YYSYMBOL_ID = 61, /* ID */ + YYSYMBOL_SSS = 62, /* SSS */ + YYSYMBOL_63_ = 63, /* '+' */ + YYSYMBOL_64_ = 64, /* '-' */ + YYSYMBOL_65_ = 65, /* '*' */ + YYSYMBOL_66_ = 66, /* '/' */ + YYSYMBOL_UMINUS = 67, /* UMINUS */ + YYSYMBOL_YYACCEPT = 68, /* $accept */ + YYSYMBOL_commands = 69, /* commands */ + YYSYMBOL_command_wrapper = 70, /* command_wrapper */ + YYSYMBOL_exit_stmt = 71, /* exit_stmt */ + YYSYMBOL_help_stmt = 72, /* help_stmt */ + YYSYMBOL_sync_stmt = 73, /* sync_stmt */ + YYSYMBOL_begin_stmt = 74, /* begin_stmt */ + YYSYMBOL_commit_stmt = 75, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 76, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 77, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 78, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 79, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 80, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 81, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 82, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 83, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 84, /* attr_def_list */ + YYSYMBOL_attr_def = 85, /* attr_def */ + YYSYMBOL_nullable_constraint = 86, /* nullable_constraint */ + YYSYMBOL_number = 87, /* number */ + YYSYMBOL_type = 88, /* type */ + YYSYMBOL_insert_stmt = 89, /* insert_stmt */ + YYSYMBOL_values_list = 90, /* values_list */ + YYSYMBOL_value_list = 91, /* value_list */ + YYSYMBOL_value = 92, /* value */ + YYSYMBOL_storage_format = 93, /* storage_format */ + YYSYMBOL_delete_stmt = 94, /* delete_stmt */ + YYSYMBOL_update_stmt = 95, /* update_stmt */ + YYSYMBOL_setClauses = 96, /* setClauses */ + YYSYMBOL_setClause = 97, /* setClause */ + YYSYMBOL_select_stmt = 98, /* select_stmt */ + YYSYMBOL_calc_stmt = 99, /* calc_stmt */ + YYSYMBOL_expression_list = 100, /* expression_list */ + YYSYMBOL_expression = 101, /* expression */ + YYSYMBOL_alias = 102, /* alias */ + YYSYMBOL_aggr_func_expr = 103, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 104, /* rel_attr */ + YYSYMBOL_relation = 105, /* relation */ + YYSYMBOL_rel_list = 106, /* rel_list */ + YYSYMBOL_joinClause = 107, /* joinClause */ + YYSYMBOL_joinClauses = 108, /* joinClauses */ + YYSYMBOL_where = 109, /* where */ + YYSYMBOL_condition_list = 110, /* condition_list */ + YYSYMBOL_condition = 111, /* condition */ + YYSYMBOL_comp_op = 112, /* comp_op */ + YYSYMBOL_group_by = 113, /* group_by */ + YYSYMBOL_load_data_stmt = 114, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 115, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 116, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 117 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; + + + #ifdef short -#undef short +# undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -269,11 +282,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -#include /* INFRINGES ON USER NAME SPACE */ -#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_STDINT_H -#endif +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -303,15 +316,16 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -#undef UINT_LEAST8_MAX -#undef UINT_LEAST16_MAX -#define UINT_LEAST8_MAX 255 -#define UINT_LEAST16_MAX 65535 +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -321,7 +335,8 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -330,38 +345,42 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -#define YYPTRDIFF_T __PTRDIFF_TYPE__ -#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -#elif defined PTRDIFF_MAX -#ifndef ptrdiff_t -#include /* INFRINGES ON USER NAME SPACE */ -#endif -#define YYPTRDIFF_T ptrdiff_t -#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -#else -#define YYPTRDIFF_T long -#define YYPTRDIFF_MAXIMUM LONG_MAX -#endif +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T -#ifdef __SIZE_TYPE__ -#define YYSIZE_T __SIZE_TYPE__ -#elif defined size_t -#define YYSIZE_T size_t -#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YYSIZE_T size_t -#else -#define YYSIZE_T unsigned -#endif +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -370,2228 +389,563 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -#if defined YYENABLE_NLS && YYENABLE_NLS -#if ENABLE_NLS -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_(Msgid) dgettext("bison-runtime", Msgid) -#endif -#endif -#ifndef YY_ -#define YY_(Msgid) Msgid -#endif +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif #endif + #ifndef YY_ATTRIBUTE_PURE -#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) -#else -#define YY_ATTRIBUTE_PURE -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define YY_ATTRIBUTE_UNUSED -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if !defined lint || defined __GNUC__ -#define YY_USE(E) ((void)(E)) +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) #else -#define YY_USE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -#endif -#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") -#else -#define YY_INITIAL_VALUE(Value) Value +# define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_END +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -#define YY_INITIAL_VALUE(Value) /* Nothing. */ +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ -#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") -#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_END +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END #endif -#define YY_ASSERT(E) ((void)(0 && (E))) + +#define YY_ASSERT(E) ((void) (0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -#ifdef YYSTACK_USE_ALLOCA -#if YYSTACK_USE_ALLOCA -#ifdef __GNUC__ -#define YYSTACK_ALLOC __builtin_alloca -#elif defined __BUILTIN_VA_ARG_INCR -#include /* INFRINGES ON USER NAME SPACE */ -#elif defined _AIX -#define YYSTACK_ALLOC __alloca -#elif defined _MSC_VER -#include /* INFRINGES ON USER NAME SPACE */ -#define alloca _alloca -#else -#define YYSTACK_ALLOC alloca -#if !defined _ALLOCA_H && !defined EXIT_SUCCESS -#include /* INFRINGES ON USER NAME SPACE */ -/* Use EXIT_SUCCESS as a witness for stdlib.h. */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#endif -#endif -#endif - -#ifdef YYSTACK_ALLOC -/* Pacify GCC's 'empty if-body' warning. */ -#define YYSTACK_FREE(Ptr) \ - do { /* empty */ \ - ; \ - } while (0) -#ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -#endif -#else -#define YYSTACK_ALLOC YYMALLOC -#define YYSTACK_FREE YYFREE -#ifndef YYSTACK_ALLOC_MAXIMUM -#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -#endif -#if (defined __cplusplus && !defined EXIT_SUCCESS && \ - !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) -#include /* INFRINGES ON USER NAME SPACE */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef YYMALLOC -#define YYMALLOC malloc -#if !defined malloc && !defined EXIT_SUCCESS -void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#ifndef YYFREE -#define YYFREE free -#if !defined free && !defined EXIT_SUCCESS -void free(void *); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#endif +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif #endif /* 1 */ -#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ - defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -#define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) -#define YYCOPY_NEEDED 1 +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF(*yyptr); \ - } while (0) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -#ifndef YYCOPY -#if defined __GNUC__ && 1 < __GNUC__ -#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) -#else -#define YYCOPY(Dst, Src, Count) \ - do { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } while (0) -#endif -#endif +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 69 +#define YYFINAL 69 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 199 +#define YYLAST 199 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 68 +#define YYNTOKENS 68 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 50 +#define YYNNTS 50 /* YYNRULES -- Number of rules. */ -#define YYNRULES 117 +#define YYNRULES 117 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 213 +#define YYNSTATES 213 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 318 +#define YYMAXUTOK 318 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = {0, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 65, - 63, - 2, - 64, - 2, - 66, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 67}; +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 65, 63, 2, 64, 2, 66, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 67 +}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = {0, - 212, - 212, - 220, - 221, - 222, - 223, - 224, - 225, - 226, - 227, - 228, - 229, - 230, - 231, - 232, - 233, - 234, - 235, - 236, - 237, - 238, - 239, - 240, - 244, - 250, - 255, - 261, - 267, - 273, - 279, - 286, - 292, - 300, - 310, - 324, - 334, - 358, - 361, - 374, - 386, - 411, - 415, - 420, - 426, - 429, - 430, - 431, - 432, - 436, - 449, - 455, - 462, - 468, - 476, - 480, - 484, - 490, - 497, - 500, - 507, - 520, - 535, - 541, - 549, - 559, - 582, - 618, - 627, - 636, - 651, - 654, - 657, - 660, - 663, - 667, - 670, - 675, - 681, - 684, - 691, - 694, - 697, - 702, - 710, - 716, - 721, - 731, - 737, - 747, - 765, - 776, - 782, - 792, - 795, - 801, - 804, - 809, - 816, - 828, - 840, - 852, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 882, - 887, - 900, - 908, - 918, - 919}; +static const yytype_int16 yyrline[] = +{ + 0, 212, 212, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 244, 250, 255, 261, 267, 273, + 279, 286, 292, 300, 310, 324, 334, 358, 361, 374, + 386, 411, 415, 420, 426, 429, 430, 431, 432, 436, + 449, 455, 462, 468, 476, 480, 484, 490, 497, 500, + 507, 520, 535, 541, 549, 559, 582, 618, 627, 636, + 651, 654, 657, 660, 663, 667, 670, 675, 681, 684, + 691, 694, 697, 702, 710, 716, 721, 731, 737, 747, + 765, 776, 782, 792, 795, 801, 804, 809, 816, 828, + 840, 852, 867, 868, 869, 870, 871, 872, 873, 874, + 875, 876, 882, 887, 900, 908, 918, 919 +}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = {"\"end of file\"", - "error", - "\"invalid token\"", - "SEMICOLON", - "AS", - "BY", - "CREATE", - "DROP", - "GROUP", - "TABLE", - "TABLES", - "INDEX", - "CALC", - "SELECT", - "DESC", - "SHOW", - "SYNC", - "INSERT", - "DELETE", - "UPDATE", - "LBRACE", - "RBRACE", - "COMMA", - "TRX_BEGIN", - "TRX_COMMIT", - "TRX_ROLLBACK", - "INT_T", - "STRING_T", - "FLOAT_T", - "DATE_T", - "NOT", - "NULL_T", - "NULLABLE", - "HELP", - "EXIT", - "DOT", - "INTO", - "VALUES", - "FROM", - "WHERE", - "AND", - "SET", - "ON", - "LOAD", - "DATA", - "INFILE", - "EXPLAIN", - "STORAGE", - "FORMAT", - "INNER", - "JOIN", - "EQ", - "LT", - "GT", - "LE", - "GE", - "NE", - "LIKE", - "IS", - "NUMBER", - "FLOAT", - "ID", - "SSS", - "'+'", - "'-'", - "'*'", - "'/'", - "UMINUS", - "$accept", - "commands", - "command_wrapper", - "exit_stmt", - "help_stmt", - "sync_stmt", - "begin_stmt", - "commit_stmt", - "rollback_stmt", - "drop_table_stmt", - "show_tables_stmt", - "desc_table_stmt", - "show_index_stmt", - "create_index_stmt", - "drop_index_stmt", - "create_table_stmt", - "attr_def_list", - "attr_def", - "nullable_constraint", - "number", - "type", - "insert_stmt", - "values_list", - "value_list", - "value", - "storage_format", - "delete_stmt", - "update_stmt", - "setClauses", - "setClause", - "select_stmt", - "calc_stmt", - "expression_list", - "expression", - "alias", - "aggr_func_expr", - "rel_attr", - "relation", - "rel_list", - "joinClause", - "joinClauses", - "where", - "condition_list", - "condition", - "comp_op", - "group_by", - "load_data_stmt", - "explain_stmt", - "set_variable_stmt", - "opt_semicolon", - YY_NULLPTR}; - -static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "BY", "CREATE", "DROP", "GROUP", "TABLE", "TABLES", "INDEX", "CALC", + "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", + "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", + "STRING_T", "FLOAT_T", "DATE_T", "NOT", "NULL_T", "NULLABLE", "HELP", + "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "SET", "ON", + "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", + "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", + "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", + "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", + "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", + "show_tables_stmt", "desc_table_stmt", "show_index_stmt", + "create_index_stmt", "drop_index_stmt", "create_table_stmt", + "attr_def_list", "attr_def", "nullable_constraint", "number", "type", + "insert_stmt", "values_list", "value_list", "value", "storage_format", + "delete_stmt", "update_stmt", "setClauses", "setClause", "select_stmt", + "calc_stmt", "expression_list", "expression", "alias", "aggr_func_expr", + "rel_attr", "relation", "rel_list", "joinClause", "joinClauses", "where", + "condition_list", "condition", "comp_op", "group_by", "load_data_stmt", + "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif #define YYPACT_NINF (-149) -#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) 0 +#define yytable_value_is_error(Yyn) \ + 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {98, - 6, - 13, - 37, - 37, - -51, - 8, - -149, - -13, - -8, - -26, - -149, - -149, - -149, - -149, - -149, - -19, - 7, - 98, - 59, - 66, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - 14, - 19, - 26, - 34, - 37, - -149, - -149, - -149, - -7, - -149, - 37, - -149, - -149, - -149, - -1, - -149, - -149, - 62, - -149, - -149, - 80, - 58, - 64, - 79, - 75, - 82, - -149, - -149, - -149, - -149, - 108, - 88, - -149, - 91, - 20, - 17, - 68, - -149, - 73, - -149, - 37, - 37, - 37, - 37, - 118, - 81, - 81, - 106, - 114, - 93, - -4, - 95, - 97, - 99, - 100, - -149, - -149, - 134, - -149, - -149, - -40, - -40, - -149, - -149, - 37, - -149, - 0, - 114, - -149, - 136, - 76, - -149, - 111, - -10, - -149, - -149, - 123, - 65, - 141, - 144, - -149, - -149, - -149, - 115, - 145, - -149, - -4, - 146, - 131, - 94, - 94, - -149, - 129, - -4, - 93, - -149, - 161, - -149, - -149, - -149, - -149, - 1, - 97, - 150, - 112, - 81, - 81, - -149, - 18, - -149, - 152, - 117, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - 147, - 76, - 76, - 76, - -149, - -149, - 119, - 116, - 148, - -149, - -149, - 141, - 135, - 155, - 139, - 137, - 114, - 5, - -149, - -149, - -4, - -4, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - 157, - -149, - -149, - 140, - -149, - -149, - 76, - 133, - -149, - -149, - 87, - 2, - 138, - -149, - 81, - -149, - -149, - -149, - 124, - -149, - -149}; +static const yytype_int16 yypact[] = +{ + 98, 6, 13, 37, 37, -51, 8, -149, -13, -8, + -26, -149, -149, -149, -149, -149, -19, 7, 98, 59, + 66, -149, -149, -149, -149, -149, -149, -149, -149, -149, + -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, + -149, -149, 14, 19, 26, 34, 37, -149, -149, -149, + -7, -149, 37, -149, -149, -149, -1, -149, -149, 62, + -149, -149, 80, 58, 64, 79, 75, 82, -149, -149, + -149, -149, 108, 88, -149, 91, 20, 17, 68, -149, + 73, -149, 37, 37, 37, 37, 118, 81, 81, 106, + 114, 93, -4, 95, 97, 99, 100, -149, -149, 134, + -149, -149, -40, -40, -149, -149, 37, -149, 0, 114, + -149, 136, 76, -149, 111, -10, -149, -149, 123, 65, + 141, 144, -149, -149, -149, 115, 145, -149, -4, 146, + 131, 94, 94, -149, 129, -4, 93, -149, 161, -149, + -149, -149, -149, 1, 97, 150, 112, 81, 81, -149, + 18, -149, 152, 117, -149, -149, -149, -149, -149, -149, + -149, 147, 76, 76, 76, -149, -149, 119, 116, 148, + -149, -149, 141, 135, 155, 139, 137, 114, 5, -149, + -149, -4, -4, -149, -149, -149, -149, -149, -149, -149, + -149, -149, 157, -149, -149, 140, -149, -149, 76, 133, + -149, -149, 87, 2, 138, -149, 81, -149, -149, -149, + 124, -149, -149 +}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_int8 yydefact[] = {0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 27, - 28, - 29, - 25, - 24, - 0, - 0, - 0, - 0, - 116, - 23, - 22, - 15, - 16, - 17, - 18, - 9, - 10, - 11, - 14, - 12, - 13, - 8, - 5, - 7, - 6, - 4, - 3, - 19, - 20, - 21, - 0, - 0, - 0, - 0, - 0, - 57, - 54, - 55, - 85, - 56, - 0, - 78, - 76, - 67, - 80, - 79, - 77, - 0, - 32, - 31, - 0, - 0, - 0, - 0, - 0, - 0, - 114, - 1, - 117, - 2, - 0, - 0, - 30, - 0, - 0, - 0, - 0, - 75, - 0, - 81, - 0, - 0, - 0, - 0, - 68, - 0, - 0, - 0, - 93, - 0, - 0, - 0, - 0, - 0, - 0, - 74, - 84, - 0, - 86, - 82, - 70, - 71, - 72, - 73, - 0, - 87, - 80, - 93, - 33, - 0, - 95, - 60, - 0, - 93, - 62, - 115, - 0, - 0, - 37, - 0, - 35, - 83, - 69, - 0, - 88, - 112, - 0, - 49, - 85, - 0, - 0, - 94, - 96, - 0, - 0, - 61, - 0, - 45, - 46, - 47, - 48, - 43, - 0, - 0, - 0, - 0, - 0, - 65, - 0, - 52, - 0, - 0, - 102, - 103, - 104, - 105, - 106, - 107, - 110, - 108, - 0, - 0, - 95, - 64, - 63, - 0, - 0, - 0, - 42, - 40, - 37, - 58, - 0, - 0, - 91, - 93, - 80, - 89, - 50, - 0, - 0, - 111, - 109, - 99, - 101, - 98, - 100, - 97, - 113, - 44, - 0, - 41, - 38, - 0, - 36, - 34, - 95, - 0, - 112, - 53, - 0, - 43, - 0, - 90, - 0, - 66, - 51, - 39, - 0, - 92, - 59}; +static const yytype_int8 yydefact[] = +{ + 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, + 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, + 116, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, + 20, 21, 0, 0, 0, 0, 0, 57, 54, 55, + 85, 56, 0, 78, 76, 67, 80, 79, 77, 0, + 32, 31, 0, 0, 0, 0, 0, 0, 114, 1, + 117, 2, 0, 0, 30, 0, 0, 0, 0, 75, + 0, 81, 0, 0, 0, 0, 68, 0, 0, 0, + 93, 0, 0, 0, 0, 0, 0, 74, 84, 0, + 86, 82, 70, 71, 72, 73, 0, 87, 80, 93, + 33, 0, 95, 60, 0, 93, 62, 115, 0, 0, + 37, 0, 35, 83, 69, 0, 88, 112, 0, 49, + 85, 0, 0, 94, 96, 0, 0, 61, 0, 45, + 46, 47, 48, 43, 0, 0, 0, 0, 0, 65, + 0, 52, 0, 0, 102, 103, 104, 105, 106, 107, + 110, 108, 0, 0, 95, 64, 63, 0, 0, 0, + 42, 40, 37, 58, 0, 0, 91, 93, 80, 89, + 50, 0, 0, 111, 109, 99, 101, 98, 100, 97, + 113, 44, 0, 41, 38, 0, 36, 34, 95, 0, + 112, 53, 0, 43, 0, 90, 0, 66, 51, 39, + 0, 92, 59 +}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-149, - -149, - 166, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - -149, - 15, - 46, - -12, - -149, - -149, - -149, - -149, - 10, - -92, - -149, - -149, - -149, - -149, - 57, - -149, - -149, - -3, - -38, - 142, - -149, - -110, - -81, - 47, - -149, - -9, - -104, - -148, - -149, - 67, - -6, - -149, - -149, - -149, - -149}; +static const yytype_int16 yypgoto[] = +{ + -149, -149, 166, -149, -149, -149, -149, -149, -149, -149, + -149, -149, -149, -149, -149, -149, 15, 46, -12, -149, + -149, -149, -149, 10, -92, -149, -149, -149, -149, 57, + -149, -149, -3, -38, 142, -149, -110, -81, 47, -149, + -9, -104, -148, -149, 67, -6, -149, -149, -149, -149 +}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = {0, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 145, - 120, - 171, - 192, - 143, - 34, - 129, - 150, - 54, - 196, - 35, - 36, - 115, - 116, - 37, - 38, - 55, - 56, - 126, - 57, - 58, - 175, - 109, - 176, - 177, - 113, - 133, - 134, - 162, - 149, - 39, - 40, - 41, - 71}; +static const yytype_uint8 yydefgoto[] = +{ + 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 145, 120, 171, 192, + 143, 34, 129, 150, 54, 196, 35, 36, 115, 116, + 37, 38, 55, 56, 126, 57, 58, 175, 109, 176, + 177, 113, 133, 134, 162, 149, 39, 40, 41, 71 +}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = {117, - 59, - 132, - 80, - 80, - 127, - 108, - 110, - 76, - 80, - 60, - 137, - 136, - 77, - 79, - 42, - 189, - 43, - 61, - 62, - 131, - 168, - 44, - 63, - 45, - 84, - 85, - 47, - 78, - 112, - 64, - 169, - 169, - 170, - 170, - 65, - 151, - 46, - 98, - 180, - 181, - 97, - 66, - 165, - 102, - 103, - 104, - 105, - 47, - 125, - 205, - 67, - 186, - 188, - 132, - 48, - 49, - 46, - 51, - 69, - 81, - 81, - 82, - 83, - 84, - 85, - 81, - 178, - 47, - 70, - 185, - 187, - 131, - 200, - 99, - 72, - 48, - 49, - 50, - 51, - 73, - 52, - 53, - 82, - 83, - 84, - 85, - 74, - 132, - 201, - 151, - 139, - 140, - 141, - 142, - 75, - 48, - 49, - 50, - 51, - 87, - 52, - 53, - 124, - 1, - 2, - 131, - 47, - 208, - 181, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 88, - 89, - 91, - 11, - 12, - 13, - 153, - 90, - 92, - 93, - 94, - 100, - 95, - 14, - 15, - 96, - 101, - 48, - 49, - 130, - 51, - 16, - 106, - 17, - 107, - 111, - 18, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 112, - 114, - 123, - 128, - 118, - 119, - 138, - 121, - 122, - 135, - 144, - 146, - 147, - 78, - 148, - 152, - 164, - 167, - 173, - 182, - 174, - 183, - 191, - 197, - 184, - 203, - 193, - 190, - 198, - 195, - 206, - 68, - 212, - 199, - 194, - 204, - 210, - 172, - 209, - 202, - 166, - 207, - 179, - 0, - 211, - 86, - 163}; - -static const yytype_int16 yycheck[] = {92, - 4, - 112, - 4, - 4, - 109, - 87, - 88, - 46, - 4, - 61, - 115, - 22, - 20, - 52, - 9, - 164, - 11, - 10, - 11, - 112, - 20, - 9, - 36, - 11, - 65, - 66, - 31, - 35, - 39, - 38, - 30, - 30, - 32, - 32, - 61, - 128, - 20, - 21, - 21, - 22, - 21, - 61, - 135, - 82, - 83, - 84, - 85, - 31, - 49, - 198, - 44, - 162, - 163, - 164, - 59, - 60, - 20, - 62, - 0, - 61, - 61, - 63, - 64, - 65, - 66, - 61, - 148, - 31, - 3, - 162, - 163, - 164, - 177, - 77, - 61, - 59, - 60, - 61, - 62, - 61, - 64, - 65, - 63, - 64, - 65, - 66, - 61, - 198, - 181, - 182, - 26, - 27, - 28, - 29, - 61, - 59, - 60, - 61, - 62, - 38, - 64, - 65, - 106, - 6, - 7, - 198, - 31, - 21, - 22, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 38, - 61, - 41, - 23, - 24, - 25, - 30, - 61, - 51, - 45, - 20, - 61, - 42, - 33, - 34, - 42, - 61, - 59, - 60, - 61, - 62, - 41, - 22, - 43, - 61, - 37, - 46, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 39, - 61, - 21, - 20, - 62, - 61, - 36, - 61, - 61, - 51, - 22, - 20, - 50, - 35, - 22, - 22, - 40, - 9, - 21, - 20, - 61, - 57, - 59, - 21, - 30, - 21, - 31, - 61, - 42, - 47, - 50, - 18, - 61, - 49, - 172, - 48, - 51, - 144, - 203, - 182, - 136, - 200, - 148, - -1, - 206, - 56, - 132}; +static const yytype_uint8 yytable[] = +{ + 117, 59, 132, 80, 80, 127, 108, 110, 76, 80, + 60, 137, 136, 77, 79, 42, 189, 43, 61, 62, + 131, 168, 44, 63, 45, 84, 85, 47, 78, 112, + 64, 169, 169, 170, 170, 65, 151, 46, 98, 180, + 181, 97, 66, 165, 102, 103, 104, 105, 47, 125, + 205, 67, 186, 188, 132, 48, 49, 46, 51, 69, + 81, 81, 82, 83, 84, 85, 81, 178, 47, 70, + 185, 187, 131, 200, 99, 72, 48, 49, 50, 51, + 73, 52, 53, 82, 83, 84, 85, 74, 132, 201, + 151, 139, 140, 141, 142, 75, 48, 49, 50, 51, + 87, 52, 53, 124, 1, 2, 131, 47, 208, 181, + 3, 4, 5, 6, 7, 8, 9, 10, 88, 89, + 91, 11, 12, 13, 153, 90, 92, 93, 94, 100, + 95, 14, 15, 96, 101, 48, 49, 130, 51, 16, + 106, 17, 107, 111, 18, 154, 155, 156, 157, 158, + 159, 160, 161, 112, 114, 123, 128, 118, 119, 138, + 121, 122, 135, 144, 146, 147, 78, 148, 152, 164, + 167, 173, 182, 174, 183, 191, 197, 184, 203, 193, + 190, 198, 195, 206, 68, 212, 199, 194, 204, 210, + 172, 209, 202, 166, 207, 179, 0, 211, 86, 163 +}; + +static const yytype_int16 yycheck[] = +{ + 92, 4, 112, 4, 4, 109, 87, 88, 46, 4, + 61, 115, 22, 20, 52, 9, 164, 11, 10, 11, + 112, 20, 9, 36, 11, 65, 66, 31, 35, 39, + 38, 30, 30, 32, 32, 61, 128, 20, 21, 21, + 22, 21, 61, 135, 82, 83, 84, 85, 31, 49, + 198, 44, 162, 163, 164, 59, 60, 20, 62, 0, + 61, 61, 63, 64, 65, 66, 61, 148, 31, 3, + 162, 163, 164, 177, 77, 61, 59, 60, 61, 62, + 61, 64, 65, 63, 64, 65, 66, 61, 198, 181, + 182, 26, 27, 28, 29, 61, 59, 60, 61, 62, + 38, 64, 65, 106, 6, 7, 198, 31, 21, 22, + 12, 13, 14, 15, 16, 17, 18, 19, 38, 61, + 41, 23, 24, 25, 30, 61, 51, 45, 20, 61, + 42, 33, 34, 42, 61, 59, 60, 61, 62, 41, + 22, 43, 61, 37, 46, 51, 52, 53, 54, 55, + 56, 57, 58, 39, 61, 21, 20, 62, 61, 36, + 61, 61, 51, 22, 20, 50, 35, 22, 22, 40, + 9, 21, 20, 61, 57, 59, 21, 30, 21, 31, + 61, 42, 47, 50, 18, 61, 49, 172, 48, 51, + 144, 203, 182, 136, 200, 148, -1, 206, 56, 132 +}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_int8 yystos[] = {0, - 6, - 7, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 23, - 24, - 25, - 33, - 34, - 41, - 43, - 46, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 89, - 94, - 95, - 98, - 99, - 114, - 115, - 116, - 9, - 11, - 9, - 11, - 20, - 31, - 59, - 60, - 61, - 62, - 64, - 65, - 92, - 100, - 101, - 103, - 104, - 100, - 61, - 10, - 11, - 36, - 38, - 61, - 61, - 44, - 70, - 0, - 3, - 117, - 61, - 61, - 61, - 61, - 101, - 20, - 35, - 101, - 4, - 61, - 63, - 64, - 65, - 66, - 102, - 38, - 38, - 61, - 61, - 41, - 51, - 45, - 20, - 42, - 42, - 21, - 21, - 100, - 61, - 61, - 101, - 101, - 101, - 101, - 22, - 61, - 105, - 106, - 105, - 37, - 39, - 109, - 61, - 96, - 97, - 92, - 62, - 61, - 85, - 61, - 61, - 21, - 100, - 49, - 102, - 109, - 20, - 90, - 61, - 92, - 104, - 110, - 111, - 51, - 22, - 109, - 36, - 26, - 27, - 28, - 29, - 88, - 22, - 84, - 20, - 50, - 22, - 113, - 91, - 92, - 22, - 30, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 112, - 112, - 40, - 92, - 97, - 9, - 20, - 30, - 32, - 86, - 85, - 21, - 61, - 105, - 107, - 108, - 105, - 106, - 21, - 22, - 20, - 57, - 30, - 92, - 104, - 92, - 104, - 110, - 61, - 59, - 87, - 31, - 84, - 47, - 93, - 21, - 42, - 49, - 109, - 92, - 91, - 21, - 48, - 110, - 50, - 113, - 21, - 86, - 51, - 108, - 61}; +static const yytype_int8 yystos[] = +{ + 0, 6, 7, 12, 13, 14, 15, 16, 17, 18, + 19, 23, 24, 25, 33, 34, 41, 43, 46, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 89, 94, 95, 98, 99, 114, + 115, 116, 9, 11, 9, 11, 20, 31, 59, 60, + 61, 62, 64, 65, 92, 100, 101, 103, 104, 100, + 61, 10, 11, 36, 38, 61, 61, 44, 70, 0, + 3, 117, 61, 61, 61, 61, 101, 20, 35, 101, + 4, 61, 63, 64, 65, 66, 102, 38, 38, 61, + 61, 41, 51, 45, 20, 42, 42, 21, 21, 100, + 61, 61, 101, 101, 101, 101, 22, 61, 105, 106, + 105, 37, 39, 109, 61, 96, 97, 92, 62, 61, + 85, 61, 61, 21, 100, 49, 102, 109, 20, 90, + 61, 92, 104, 110, 111, 51, 22, 109, 36, 26, + 27, 28, 29, 88, 22, 84, 20, 50, 22, 113, + 91, 92, 22, 30, 51, 52, 53, 54, 55, 56, + 57, 58, 112, 112, 40, 92, 97, 9, 20, 30, + 32, 86, 85, 21, 61, 105, 107, 108, 105, 106, + 21, 22, 20, 57, 30, 92, 104, 92, 104, 110, + 61, 59, 87, 31, 84, 47, 93, 21, 42, 49, + 109, 92, 91, 21, 48, 110, 50, 113, 21, 86, + 51, 108, 61 +}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr1[] = {0, - 68, - 69, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 84, - 85, - 85, - 86, - 86, - 86, - 87, - 88, - 88, - 88, - 88, - 89, - 90, - 90, - 91, - 91, - 92, - 92, - 92, - 92, - 93, - 93, - 94, - 95, - 96, - 96, - 97, - 98, - 98, - 99, - 100, - 100, - 101, - 101, - 101, - 101, - 101, - 101, - 101, - 101, - 101, - 101, - 102, - 102, - 102, - 103, - 103, - 104, - 104, - 105, - 106, - 106, - 107, - 108, - 108, - 109, - 109, - 110, - 110, - 110, - 111, - 111, - 111, - 111, - 112, - 112, - 112, - 112, - 112, - 112, - 112, - 112, - 112, - 112, - 113, - 114, - 115, - 116, - 117, - 117}; +static const yytype_int8 yyr1[] = +{ + 0, 68, 69, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 84, 85, + 85, 86, 86, 86, 87, 88, 88, 88, 88, 89, + 90, 90, 91, 91, 92, 92, 92, 92, 93, 93, + 94, 95, 96, 96, 97, 98, 98, 99, 100, 100, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 102, 102, 102, 103, 103, 104, 104, 105, 106, 106, + 107, 108, 108, 109, 109, 110, 110, 110, 111, 111, + 111, 111, 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 113, 114, 115, 116, 117, 117 +}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = {0, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 3, - 2, - 2, - 4, - 8, - 5, - 8, - 0, - 3, - 6, - 3, - 2, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 5, - 3, - 5, - 1, - 3, - 1, - 1, - 1, - 1, - 0, - 4, - 4, - 5, - 1, - 3, - 3, - 6, - 9, - 2, - 2, - 4, - 3, - 3, - 3, - 3, - 3, - 2, - 1, - 1, - 1, - 1, - 0, - 1, - 2, - 4, - 3, - 1, - 3, - 1, - 2, - 4, - 3, - 1, - 4, - 0, - 2, - 0, - 1, - 3, - 3, - 3, - 3, - 3, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 2, - 0, - 7, - 2, - 4, - 0, - 1}; - -enum +static const yytype_int8 yyr2[] = { - YYENOMEM = -2 + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 2, 2, 4, 8, 5, 8, 0, 3, 6, + 3, 2, 1, 0, 1, 1, 1, 1, 1, 5, + 3, 5, 1, 3, 1, 1, 1, 1, 0, 4, + 4, 5, 1, 3, 3, 6, 9, 2, 2, 4, + 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, + 0, 1, 2, 4, 3, 1, 3, 1, 2, 4, + 3, 1, 4, 0, 2, 0, 1, 3, 3, 3, + 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, + 1, 2, 0, 7, 2, 4, 0, 1 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK(yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } else { \ - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -2603,131 +957,151 @@ enum the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } else { \ - (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ - } \ - while (0) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* Enable debugging if requested. */ #if YYDEBUG -#ifndef YYFPRINTF -#include /* INFRINGES ON USER NAME SPACE */ -#define YYFPRINTF fprintf -#endif +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -#define YYDPRINTF(Args) \ - do { \ - if (yydebug) \ - YYFPRINTF Args; \ - } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YYLOCATION_PRINT +# ifndef YYLOCATION_PRINT -#if defined YY_LOCATION_PRINT +# if defined YY_LOCATION_PRINT -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) { - res += YYFPRINTF(yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF(yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) { - if (yylocp->first_line < yylocp->last_line) { - res += YYFPRINTF(yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF(yyo, ".%d", end_col); - } else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF(yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } return res; } -#define YYLOCATION_PRINT yy_location_print_ +# define YYLOCATION_PRINT yy_location_print_ -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -#else +# else -#define YYLOCATION_PRINT(File, Loc) ((void)0) -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT YYLOCATION_PRINT +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT -#endif -#endif /* !defined YYLOCATION_PRINT */ +# endif +# endif /* !defined YYLOCATION_PRINT */ + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ - do { \ - if (yydebug) { \ - YYFPRINTF(stderr, "%s ", Title); \ - yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF(stderr, "\n"); \ - } \ - } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { FILE *yyoutput = yyo; - YY_USE(yyoutput); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YYLOCATION_PRINT(yyo, yylocationp); - YYFPRINTF(yyo, ": "); - yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF(yyo, ")"); + YYLOCATION_PRINT (yyo, yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -2735,66 +1109,70 @@ static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *co | TOP (included). | `------------------------------------------------------------------*/ -static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF(stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) { - int yybot = *yybottom; - YYFPRINTF(stderr, " %d", yybot); - } - YYFPRINTF(stderr, "\n"); + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); } -#define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print((Bottom), (Top)); \ - } while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, - ParsedSqlResult *sql_result, void *scanner) +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF(stderr, " $%d = ", yyi + 1); - yy_symbol_print(stderr, - YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), - sql_string, - sql_result, - scanner); - YYFPRINTF(stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); + YYFPRINTF (stderr, "\n"); + } } -#define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ - } while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -#define YYDPRINTF(Args) ((void)0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -#define YY_STACK_PRINT(Bottom, Top) -#define YY_REDUCE_PRINT(Rule) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ + /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -2805,15 +1183,16 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif + /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -2822,59 +1201,69 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default(yyn)) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } + + + #ifndef yystrlen -#if defined __GLIBC__ && defined _STRING_H -#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) -#else +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ -static YYPTRDIFF_T yystrlen(const char *yystr) +static YYPTRDIFF_T +yystrlen (const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -#endif +# endif #endif #ifndef yystpcpy -#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -#define yystpcpy stpcpy -#else +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char *yystpcpy(char *yydest, const char *yysrc) +static char * +yystpcpy (char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -2882,7 +1271,7 @@ static char *yystpcpy(char *yydest, const char *yysrc) return yyd - 1; } -#endif +# endif #endif #ifndef yytnamerr @@ -2893,45 +1282,52 @@ static char *yystpcpy(char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) { - if (*yystr == '"') { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) { - case '\'': - case ',': goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes:; - } + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } if (yyres) - return yystpcpy(yyres, yystr) - yyres; + return yystpcpy (yyres, yystr) - yyres; else - return yystrlen(yystr); + return yystrlen (yystr); } #endif -static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -2958,17 +1354,19 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -2980,12 +1378,11 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) { - enum - { - YYARGS_MAX = 5 - }; + enum { YYARGS_MAX = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -2995,13 +1392,16 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) { -#define YYCASE_(N, S) \ - case N: yyformat = S; break + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -3010,118 +1410,134 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen(yyformat) - 2 * yycount + 1; + yysize = yystrlen (yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) { - YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) { - *yymsg_alloc = 2 * yysize; - if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } else { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } } return 0; } + /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, - const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YY_USE(yyvaluep); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + + + + /*----------. | yyparse. | `----------*/ -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +int +yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - /* Lookahead token kind. */ - int yychar; - - /* The semantic value of the lookahead symbol. */ - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ - YY_INITIAL_VALUE(static YYSTYPE yyval_default;) - YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); - - /* Location data for the lookahead symbol. */ - static YYLTYPE yyloc_default -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = {1, 1, 1, 1} -#endif - ; - YYLTYPE yylloc = yyloc_default; +/* Lookahead token kind. */ +int yychar; + - /* Number of syntax errors so far. */ - int yynerrs = 0; +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Number of syntax errors so far. */ + int yynerrs = 0; - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -3137,23 +1553,24 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF((stderr, "Starting parse\n")); + YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -3162,90 +1579,93 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) have just been pushed. So pushing a state here evens the stacks. */ yyssp++; + /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF((stderr, "Entering state %d\n", yystate)); - YY_ASSERT(0 <= yystate && yystate < YYNSTATES); + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST(yy_state_t, yystate); + *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else - { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -#if defined yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow(YY_("memory exhausted"), - &yyss1, - yysize * YYSIZEOF(*yyssp), - &yyvs1, - yysize * YYSIZEOF(*yyvsp), - &yyls1, - yysize * YYSIZEOF(*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -#else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); - if (!yyptr) + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) YYNOMEM; - YYSTACK_RELOCATE(yyss_alloc, yyss); - YYSTACK_RELOCATE(yyvs_alloc, yyvs); - YYSTACK_RELOCATE(yyls_alloc, yyls); -#undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE(yyss1); - } -#endif + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + YYNOMEM; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ @@ -3255,34 +1675,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default(yyn)) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) { - YYDPRINTF((stderr, "Reading a token\n")); - yychar = yylex(&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF((stderr, "Now at end of input.\n")); - } else if (yychar == YYerror) { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { - yytoken = YYTRANSLATE(yychar); - YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -3290,12 +1716,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) { - if (yytable_value_is_error(yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -3303,7 +1730,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3314,6 +1741,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yychar = YYEMPTY; goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -3323,6 +1751,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) goto yyerrlab; goto yyreduce; + /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -3338,118 +1767,119 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1 - yylen]; + yyval = yyvsp[1-yylen]; /* Default location. */ - YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT(yyn); - switch (yyn) { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 213 "yacc_sql.y" + YY_REDUCE_PRINT (yyn); + switch (yyn) { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } + case 2: /* commands: command_wrapper opt_semicolon */ +#line 213 "yacc_sql.y" + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } #line 1785 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ + case 24: /* exit_stmt: EXIT */ #line 244 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } #line 1794 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ + case 25: /* help_stmt: HELP */ #line 250 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } #line 1802 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ + case 26: /* sync_stmt: SYNC */ #line 255 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } #line 1810 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ + case 27: /* begin_stmt: TRX_BEGIN */ #line 261 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } #line 1818 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ + case 28: /* commit_stmt: TRX_COMMIT */ #line 267 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } #line 1826 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ + case 29: /* rollback_stmt: TRX_ROLLBACK */ #line 273 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } #line 1834 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ + case 30: /* drop_table_stmt: DROP TABLE ID */ #line 279 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1844 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ + case 31: /* show_tables_stmt: SHOW TABLES */ #line 286 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } #line 1852 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ + case 32: /* desc_table_stmt: DESC ID */ #line 292 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1862 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ #line 301 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1873 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ + case 34: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ #line 311 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name = (yyvsp[-1].string); + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.emplace_back((yyvsp[-1].string)); free((yyvsp[-5].string)); free((yyvsp[-3].string)); free((yyvsp[-1].string)); @@ -3457,11 +1887,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 1888 "yacc_sql.cpp" break; - case 35: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 35: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 325 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); @@ -3469,12 +1899,12 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 1900 "yacc_sql.cpp" break; - case 36: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 36: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 335 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-5].string); + create_table.relation_name = (yyvsp[-5].string); free((yyvsp[-5].string)); std::vector *src_attrs = (yyvsp[-2].attr_infos); @@ -3494,7 +1924,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 1925 "yacc_sql.cpp" break; - case 37: /* attr_def_list: %empty */ + case 37: /* attr_def_list: %empty */ #line 358 "yacc_sql.y" { (yyval.attr_infos) = nullptr; @@ -3502,7 +1932,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 1933 "yacc_sql.cpp" break; - case 38: /* attr_def_list: COMMA attr_def attr_def_list */ + case 38: /* attr_def_list: COMMA attr_def attr_def_list */ #line 362 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -3516,13 +1946,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 1947 "yacc_sql.cpp" break; - case 39: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ + case 39: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ #line 375 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; @@ -3532,10 +1962,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 1963 "yacc_sql.cpp" break; - case 40: /* attr_def: ID type nullable_constraint */ + case 40: /* attr_def: ID type nullable_constraint */ #line 387 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -3558,7 +1988,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 1989 "yacc_sql.cpp" break; - case 41: /* nullable_constraint: NOT NULL_T */ + case 41: /* nullable_constraint: NOT NULL_T */ #line 412 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false @@ -3566,7 +1996,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 1997 "yacc_sql.cpp" break; - case 42: /* nullable_constraint: NULLABLE */ + case 42: /* nullable_constraint: NULLABLE */ #line 416 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true @@ -3574,7 +2004,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2005 "yacc_sql.cpp" break; - case 43: /* nullable_constraint: %empty */ + case 43: /* nullable_constraint: %empty */ #line 420 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL @@ -3582,50 +2012,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2013 "yacc_sql.cpp" break; - case 44: /* number: NUMBER */ + case 44: /* number: NUMBER */ #line 426 "yacc_sql.y" - { - (yyval.number) = (yyvsp[0].number); - } + {(yyval.number) = (yyvsp[0].number);} #line 2019 "yacc_sql.cpp" break; - case 45: /* type: INT_T */ + case 45: /* type: INT_T */ #line 429 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::INTS); - } + { (yyval.number) = static_cast(AttrType::INTS); } #line 2025 "yacc_sql.cpp" break; - case 46: /* type: STRING_T */ + case 46: /* type: STRING_T */ #line 430 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::CHARS); - } + { (yyval.number) = static_cast(AttrType::CHARS); } #line 2031 "yacc_sql.cpp" break; - case 47: /* type: FLOAT_T */ + case 47: /* type: FLOAT_T */ #line 431 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::FLOATS); - } + { (yyval.number) = static_cast(AttrType::FLOATS); } #line 2037 "yacc_sql.cpp" break; - case 48: /* type: DATE_T */ + case 48: /* type: DATE_T */ #line 432 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::DATES); - } + { (yyval.number) = static_cast(AttrType::DATES); } #line 2043 "yacc_sql.cpp" break; - case 49: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 49: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 437 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -3636,7 +2056,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2057 "yacc_sql.cpp" break; - case 50: /* values_list: LBRACE value_list RBRACE */ + case 50: /* values_list: LBRACE value_list RBRACE */ #line 450 "yacc_sql.y" { (yyval.values_list) = new std::vector>; @@ -3646,7 +2066,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2067 "yacc_sql.cpp" break; - case 51: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 51: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 456 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); @@ -3655,7 +2075,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2076 "yacc_sql.cpp" break; - case 52: /* value_list: value */ + case 52: /* value_list: value */ #line 463 "yacc_sql.y" { (yyval.value_list) = new std::vector; @@ -3665,7 +2085,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2086 "yacc_sql.cpp" break; - case 53: /* value_list: value_list COMMA value */ + case 53: /* value_list: value_list COMMA value */ #line 469 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); @@ -3674,28 +2094,28 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2095 "yacc_sql.cpp" break; - case 54: /* value: NUMBER */ + case 54: /* value: NUMBER */ #line 476 "yacc_sql.y" - { + { (yyval.value) = new Value((int)(yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2104 "yacc_sql.cpp" break; - case 55: /* value: FLOAT */ + case 55: /* value: FLOAT */ #line 480 "yacc_sql.y" - { + { (yyval.value) = new Value((float)(yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2113 "yacc_sql.cpp" break; - case 56: /* value: SSS */ + case 56: /* value: SSS */ #line 484 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); + { + char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); @@ -3703,15 +2123,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2124 "yacc_sql.cpp" break; - case 57: /* value: NULL_T */ + case 57: /* value: NULL_T */ #line 490 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } #line 2132 "yacc_sql.cpp" break; - case 58: /* storage_format: %empty */ + case 58: /* storage_format: %empty */ #line 497 "yacc_sql.y" { (yyval.string) = nullptr; @@ -3719,7 +2139,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2140 "yacc_sql.cpp" break; - case 59: /* storage_format: STORAGE FORMAT EQ ID */ + case 59: /* storage_format: STORAGE FORMAT EQ ID */ #line 501 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); @@ -3727,10 +2147,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2148 "yacc_sql.cpp" break; - case 60: /* delete_stmt: DELETE FROM ID where */ + case 60: /* delete_stmt: DELETE FROM ID where */ #line 508 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].condition_list) != nullptr) { (yyval.sql_node)->deletion.conditions.swap(*(yyvsp[0].condition_list)); @@ -3741,10 +2161,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2162 "yacc_sql.cpp" break; - case 61: /* update_stmt: UPDATE ID SET setClauses where */ + case 61: /* update_stmt: UPDATE ID SET setClauses where */ #line 521 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].condition_list) != nullptr) { @@ -3757,7 +2177,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2178 "yacc_sql.cpp" break; - case 62: /* setClauses: setClause */ + case 62: /* setClauses: setClause */ #line 536 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; @@ -3767,7 +2187,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2188 "yacc_sql.cpp" break; - case 63: /* setClauses: setClauses COMMA setClause */ + case 63: /* setClauses: setClauses COMMA setClause */ #line 542 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); @@ -3776,18 +2196,18 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2197 "yacc_sql.cpp" break; - case 64: /* setClause: ID EQ value */ + case 64: /* setClause: ID EQ value */ #line 550 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); + (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } #line 2208 "yacc_sql.cpp" break; - case 65: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ + case 65: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ #line 560 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -3814,7 +2234,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2235 "yacc_sql.cpp" break; - case 66: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ + case 66: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ #line 583 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -3851,7 +2271,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2272 "yacc_sql.cpp" break; - case 67: /* calc_stmt: CALC expression_list */ + case 67: /* calc_stmt: CALC expression_list */ #line 619 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -3861,7 +2281,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2282 "yacc_sql.cpp" break; - case 68: /* expression_list: expression alias */ + case 68: /* expression_list: expression alias */ #line 628 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; @@ -3874,7 +2294,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2295 "yacc_sql.cpp" break; - case 69: /* expression_list: expression alias COMMA expression_list */ + case 69: /* expression_list: expression alias COMMA expression_list */ #line 637 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -3885,69 +2305,64 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } #line 2312 "yacc_sql.cpp" break; - case 70: /* expression: expression '+' expression */ + case 70: /* expression: expression '+' expression */ #line 651 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2320 "yacc_sql.cpp" break; - case 71: /* expression: expression '-' expression */ + case 71: /* expression: expression '-' expression */ #line 654 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2328 "yacc_sql.cpp" break; - case 72: /* expression: expression '*' expression */ + case 72: /* expression: expression '*' expression */ #line 657 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2336 "yacc_sql.cpp" break; - case 73: /* expression: expression '/' expression */ + case 73: /* expression: expression '/' expression */ #line 660 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2344 "yacc_sql.cpp" break; - case 74: /* expression: LBRACE expression RBRACE */ + case 74: /* expression: LBRACE expression RBRACE */ #line 663 "yacc_sql.y" - { + { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } #line 2353 "yacc_sql.cpp" break; - case 75: /* expression: '-' expression */ + case 75: /* expression: '-' expression */ #line 667 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } #line 2361 "yacc_sql.cpp" break; - case 76: /* expression: value */ + case 76: /* expression: value */ #line 670 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); @@ -3955,91 +2370,91 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2371 "yacc_sql.cpp" break; - case 77: /* expression: rel_attr */ + case 77: /* expression: rel_attr */ #line 675 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } #line 2382 "yacc_sql.cpp" break; - case 78: /* expression: '*' */ + case 78: /* expression: '*' */ #line 681 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } #line 2390 "yacc_sql.cpp" break; - case 79: /* expression: aggr_func_expr */ + case 79: /* expression: aggr_func_expr */ #line 684 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } #line 2398 "yacc_sql.cpp" break; - case 80: /* alias: %empty */ + case 80: /* alias: %empty */ #line 691 "yacc_sql.y" - { + { (yyval.string) = nullptr; } #line 2406 "yacc_sql.cpp" break; - case 81: /* alias: ID */ + case 81: /* alias: ID */ #line 694 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2414 "yacc_sql.cpp" break; - case 82: /* alias: AS ID */ + case 82: /* alias: AS ID */ #line 697 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2422 "yacc_sql.cpp" break; - case 83: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 83: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 703 "yacc_sql.y" { - if ((*(yyvsp[-1].expression_list)).size() != 1) { - (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); - } else { - (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); - } + if((*(yyvsp[-1].expression_list)).size() != 1) { + (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); + } else { + (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); + } } #line 2434 "yacc_sql.cpp" break; - case 84: /* aggr_func_expr: ID LBRACE RBRACE */ + case 84: /* aggr_func_expr: ID LBRACE RBRACE */ #line 711 "yacc_sql.y" - { - (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); - } + { + (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); + } #line 2442 "yacc_sql.cpp" break; - case 85: /* rel_attr: ID */ + case 85: /* rel_attr: ID */ #line 716 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 2452 "yacc_sql.cpp" break; - case 86: /* rel_attr: ID DOT ID */ + case 86: /* rel_attr: ID DOT ID */ #line 721 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); @@ -4048,22 +2463,22 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2464 "yacc_sql.cpp" break; - case 87: /* relation: ID */ + case 87: /* relation: ID */ #line 731 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2472 "yacc_sql.cpp" break; - case 88: /* rel_list: relation alias */ + case 88: /* rel_list: relation alias */ #line 737 "yacc_sql.y" - { + { (yyval.relation_list) = new std::vector(); - if (nullptr != (yyvsp[0].string)) { - (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); free((yyvsp[0].string)); - } else { + }else{ (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); @@ -4071,19 +2486,18 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2487 "yacc_sql.cpp" break; - case 89: /* rel_list: relation alias COMMA rel_list */ + case 89: /* rel_list: relation alias COMMA rel_list */ #line 747 "yacc_sql.y" - { + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if (nullptr != (yyvsp[-2].string)) { - (yyval.relation_list) - ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); free((yyvsp[-2].string)); - } else { + }else{ (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } @@ -4092,10 +2506,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2507 "yacc_sql.cpp" break; - case 90: /* joinClause: relation ON condition_list */ + case 90: /* joinClause: relation ON condition_list */ #line 766 "yacc_sql.y" { - (yyval.join_clause) = new JoinSqlNode; + (yyval.join_clause) = new JoinSqlNode; (yyval.join_clause)->relation = (yyvsp[-2].string); (yyval.join_clause)->conditions.swap(*(yyvsp[0].condition_list)); free((yyvsp[-2].string)); @@ -4104,7 +2518,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2519 "yacc_sql.cpp" break; - case 91: /* joinClauses: joinClause */ + case 91: /* joinClauses: joinClause */ #line 777 "yacc_sql.y" { (yyval.join_clauses) = new std::vector; @@ -4114,7 +2528,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2529 "yacc_sql.cpp" break; - case 92: /* joinClauses: joinClause INNER JOIN joinClauses */ + case 92: /* joinClauses: joinClause INNER JOIN joinClauses */ #line 783 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); @@ -4124,7 +2538,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2539 "yacc_sql.cpp" break; - case 93: /* where: %empty */ + case 93: /* where: %empty */ #line 792 "yacc_sql.y" { (yyval.condition_list) = nullptr; @@ -4132,15 +2546,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2547 "yacc_sql.cpp" break; - case 94: /* where: WHERE condition_list */ + case 94: /* where: WHERE condition_list */ #line 795 "yacc_sql.y" - { - (yyval.condition_list) = (yyvsp[0].condition_list); + { + (yyval.condition_list) = (yyvsp[0].condition_list); } #line 2555 "yacc_sql.cpp" break; - case 95: /* condition_list: %empty */ + case 95: /* condition_list: %empty */ #line 801 "yacc_sql.y" { (yyval.condition_list) = nullptr; @@ -4148,9 +2562,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2563 "yacc_sql.cpp" break; - case 96: /* condition_list: condition */ + case 96: /* condition_list: condition */ #line 804 "yacc_sql.y" - { + { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); @@ -4158,9 +2572,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2573 "yacc_sql.cpp" break; - case 97: /* condition_list: condition AND condition_list */ + case 97: /* condition_list: condition AND condition_list */ #line 809 "yacc_sql.y" - { + { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); @@ -4168,15 +2582,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2583 "yacc_sql.cpp" break; - case 98: /* condition: rel_attr comp_op value */ + case 98: /* condition: rel_attr comp_op value */ #line 817 "yacc_sql.y" { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 1; - (yyval.condition)->left_attr = *(yyvsp[-2].rel_attr); + (yyval.condition) = new ConditionSqlNode; + (yyval.condition)->left_is_attr = 1; + (yyval.condition)->left_attr = *(yyvsp[-2].rel_attr); (yyval.condition)->right_is_attr = 0; - (yyval.condition)->right_value = *(yyvsp[0].value); - (yyval.condition)->comp = (yyvsp[-1].comp); + (yyval.condition)->right_value = *(yyvsp[0].value); + (yyval.condition)->comp = (yyvsp[-1].comp); delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); @@ -4184,15 +2598,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2599 "yacc_sql.cpp" break; - case 99: /* condition: value comp_op value */ + case 99: /* condition: value comp_op value */ #line 829 "yacc_sql.y" { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 0; - (yyval.condition)->left_value = *(yyvsp[-2].value); + (yyval.condition) = new ConditionSqlNode; + (yyval.condition)->left_is_attr = 0; + (yyval.condition)->left_value = *(yyvsp[-2].value); (yyval.condition)->right_is_attr = 0; - (yyval.condition)->right_value = *(yyvsp[0].value); - (yyval.condition)->comp = (yyvsp[-1].comp); + (yyval.condition)->right_value = *(yyvsp[0].value); + (yyval.condition)->comp = (yyvsp[-1].comp); delete (yyvsp[-2].value); delete (yyvsp[0].value); @@ -4200,15 +2614,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2615 "yacc_sql.cpp" break; - case 100: /* condition: rel_attr comp_op rel_attr */ + case 100: /* condition: rel_attr comp_op rel_attr */ #line 841 "yacc_sql.y" { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 1; - (yyval.condition)->left_attr = *(yyvsp[-2].rel_attr); + (yyval.condition) = new ConditionSqlNode; + (yyval.condition)->left_is_attr = 1; + (yyval.condition)->left_attr = *(yyvsp[-2].rel_attr); (yyval.condition)->right_is_attr = 1; - (yyval.condition)->right_attr = *(yyvsp[0].rel_attr); - (yyval.condition)->comp = (yyvsp[-1].comp); + (yyval.condition)->right_attr = *(yyvsp[0].rel_attr); + (yyval.condition)->comp = (yyvsp[-1].comp); delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); @@ -4216,15 +2630,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2631 "yacc_sql.cpp" break; - case 101: /* condition: value comp_op rel_attr */ + case 101: /* condition: value comp_op rel_attr */ #line 853 "yacc_sql.y" { - (yyval.condition) = new ConditionSqlNode; - (yyval.condition)->left_is_attr = 0; - (yyval.condition)->left_value = *(yyvsp[-2].value); + (yyval.condition) = new ConditionSqlNode; + (yyval.condition)->left_is_attr = 0; + (yyval.condition)->left_value = *(yyvsp[-2].value); (yyval.condition)->right_is_attr = 1; - (yyval.condition)->right_attr = *(yyvsp[0].rel_attr); - (yyval.condition)->comp = (yyvsp[-1].comp); + (yyval.condition)->right_attr = *(yyvsp[0].rel_attr); + (yyval.condition)->comp = (yyvsp[-1].comp); delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); @@ -4232,87 +2646,67 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2647 "yacc_sql.cpp" break; - case 102: /* comp_op: EQ */ + case 102: /* comp_op: EQ */ #line 867 "yacc_sql.y" - { - (yyval.comp) = EQUAL_TO; - } + { (yyval.comp) = EQUAL_TO; } #line 2653 "yacc_sql.cpp" break; - case 103: /* comp_op: LT */ + case 103: /* comp_op: LT */ #line 868 "yacc_sql.y" - { - (yyval.comp) = LESS_THAN; - } + { (yyval.comp) = LESS_THAN; } #line 2659 "yacc_sql.cpp" break; - case 104: /* comp_op: GT */ + case 104: /* comp_op: GT */ #line 869 "yacc_sql.y" - { - (yyval.comp) = GREAT_THAN; - } + { (yyval.comp) = GREAT_THAN; } #line 2665 "yacc_sql.cpp" break; - case 105: /* comp_op: LE */ + case 105: /* comp_op: LE */ #line 870 "yacc_sql.y" - { - (yyval.comp) = LESS_EQUAL; - } + { (yyval.comp) = LESS_EQUAL; } #line 2671 "yacc_sql.cpp" break; - case 106: /* comp_op: GE */ + case 106: /* comp_op: GE */ #line 871 "yacc_sql.y" - { - (yyval.comp) = GREAT_EQUAL; - } + { (yyval.comp) = GREAT_EQUAL; } #line 2677 "yacc_sql.cpp" break; - case 107: /* comp_op: NE */ + case 107: /* comp_op: NE */ #line 872 "yacc_sql.y" - { - (yyval.comp) = NOT_EQUAL; - } + { (yyval.comp) = NOT_EQUAL; } #line 2683 "yacc_sql.cpp" break; - case 108: /* comp_op: IS */ + case 108: /* comp_op: IS */ #line 873 "yacc_sql.y" - { - (yyval.comp) = OP_IS; - } + { (yyval.comp) = OP_IS; } #line 2689 "yacc_sql.cpp" break; - case 109: /* comp_op: IS NOT */ + case 109: /* comp_op: IS NOT */ #line 874 "yacc_sql.y" - { - (yyval.comp) = OP_IS_NOT; - } + { (yyval.comp) = OP_IS_NOT; } #line 2695 "yacc_sql.cpp" break; - case 110: /* comp_op: LIKE */ + case 110: /* comp_op: LIKE */ #line 875 "yacc_sql.y" - { - (yyval.comp) = LIKE_OP; - } + { (yyval.comp) = LIKE_OP;} #line 2701 "yacc_sql.cpp" break; - case 111: /* comp_op: NOT LIKE */ + case 111: /* comp_op: NOT LIKE */ #line 876 "yacc_sql.y" - { - (yyval.comp) = NOT_LIKE_OP; - } + {(yyval.comp) = NOT_LIKE_OP;} #line 2707 "yacc_sql.cpp" break; - case 112: /* group_by: %empty */ + case 112: /* group_by: %empty */ #line 882 "yacc_sql.y" { (yyval.expression_list) = nullptr; @@ -4320,33 +2714,33 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2715 "yacc_sql.cpp" break; - case 113: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ + case 113: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ #line 888 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } #line 2729 "yacc_sql.cpp" break; - case 114: /* explain_stmt: EXPLAIN command_wrapper */ + case 114: /* explain_stmt: EXPLAIN command_wrapper */ #line 901 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } #line 2738 "yacc_sql.cpp" break; - case 115: /* set_variable_stmt: SET ID EQ value */ + case 115: /* set_variable_stmt: SET ID EQ value */ #line 909 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); @@ -4355,10 +2749,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2750 "yacc_sql.cpp" break; + #line 2754 "yacc_sql.cpp" - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -4370,9 +2765,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; @@ -4383,67 +2778,84 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) { - ++yynerrs; - { - yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) { - if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); - yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); - if (yymsg) { - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } - yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; } - } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } else { - yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; + } } - } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; + /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -4456,40 +2868,45 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) { - yyn = yypact[yystate]; - if (!yypact_value_is_default(yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - yystate = *yyssp; - YY_STACK_PRINT(yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -4497,14 +2914,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; + /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -4512,6 +2930,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 0; goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -4519,38 +2938,44 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 1; goto yyreturnlab; + /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; + /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE(yychar); - yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK(yylen); - YY_STACK_PRINT(yyss, yyssp); - while (yyssp != yyss) { - yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - } + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE(yyss); + YYSTACK_FREE (yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); + YYSTACK_FREE (yymsg); return yyresult; } @@ -4559,8 +2984,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) -{ +int sql_parse(const char *s, ParsedSqlResult *sql_result) { yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 90ee2baf..9e1a1ee7 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -#define YY_YY_YACC_SQL_HPP_INCLUDED +# define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -#define YYDEBUG 0 +# define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,116 +47,117 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -#define YYTOKENTYPE -enum yytokentype -{ - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - BY = 260, /* BY */ - CREATE = 261, /* CREATE */ - DROP = 262, /* DROP */ - GROUP = 263, /* GROUP */ - TABLE = 264, /* TABLE */ - TABLES = 265, /* TABLES */ - INDEX = 266, /* INDEX */ - CALC = 267, /* CALC */ - SELECT = 268, /* SELECT */ - DESC = 269, /* DESC */ - SHOW = 270, /* SHOW */ - SYNC = 271, /* SYNC */ - INSERT = 272, /* INSERT */ - DELETE = 273, /* DELETE */ - UPDATE = 274, /* UPDATE */ - LBRACE = 275, /* LBRACE */ - RBRACE = 276, /* RBRACE */ - COMMA = 277, /* COMMA */ - TRX_BEGIN = 278, /* TRX_BEGIN */ - TRX_COMMIT = 279, /* TRX_COMMIT */ - TRX_ROLLBACK = 280, /* TRX_ROLLBACK */ - INT_T = 281, /* INT_T */ - STRING_T = 282, /* STRING_T */ - FLOAT_T = 283, /* FLOAT_T */ - DATE_T = 284, /* DATE_T */ - NOT = 285, /* NOT */ - NULL_T = 286, /* NULL_T */ - NULLABLE = 287, /* NULLABLE */ - HELP = 288, /* HELP */ - EXIT = 289, /* EXIT */ - DOT = 290, /* DOT */ - INTO = 291, /* INTO */ - VALUES = 292, /* VALUES */ - FROM = 293, /* FROM */ - WHERE = 294, /* WHERE */ - AND = 295, /* AND */ - SET = 296, /* SET */ - ON = 297, /* ON */ - LOAD = 298, /* LOAD */ - DATA = 299, /* DATA */ - INFILE = 300, /* INFILE */ - EXPLAIN = 301, /* EXPLAIN */ - STORAGE = 302, /* STORAGE */ - FORMAT = 303, /* FORMAT */ - INNER = 304, /* INNER */ - JOIN = 305, /* JOIN */ - EQ = 306, /* EQ */ - LT = 307, /* LT */ - GT = 308, /* GT */ - LE = 309, /* LE */ - GE = 310, /* GE */ - NE = 311, /* NE */ - LIKE = 312, /* LIKE */ - IS = 313, /* IS */ - NUMBER = 314, /* NUMBER */ - FLOAT = 315, /* FLOAT */ - ID = 316, /* ID */ - SSS = 317, /* SSS */ - UMINUS = 318 /* UMINUS */ -}; -typedef enum yytokentype yytoken_kind_t; +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + BY = 260, /* BY */ + CREATE = 261, /* CREATE */ + DROP = 262, /* DROP */ + GROUP = 263, /* GROUP */ + TABLE = 264, /* TABLE */ + TABLES = 265, /* TABLES */ + INDEX = 266, /* INDEX */ + CALC = 267, /* CALC */ + SELECT = 268, /* SELECT */ + DESC = 269, /* DESC */ + SHOW = 270, /* SHOW */ + SYNC = 271, /* SYNC */ + INSERT = 272, /* INSERT */ + DELETE = 273, /* DELETE */ + UPDATE = 274, /* UPDATE */ + LBRACE = 275, /* LBRACE */ + RBRACE = 276, /* RBRACE */ + COMMA = 277, /* COMMA */ + TRX_BEGIN = 278, /* TRX_BEGIN */ + TRX_COMMIT = 279, /* TRX_COMMIT */ + TRX_ROLLBACK = 280, /* TRX_ROLLBACK */ + INT_T = 281, /* INT_T */ + STRING_T = 282, /* STRING_T */ + FLOAT_T = 283, /* FLOAT_T */ + DATE_T = 284, /* DATE_T */ + NOT = 285, /* NOT */ + NULL_T = 286, /* NULL_T */ + NULLABLE = 287, /* NULLABLE */ + HELP = 288, /* HELP */ + EXIT = 289, /* EXIT */ + DOT = 290, /* DOT */ + INTO = 291, /* INTO */ + VALUES = 292, /* VALUES */ + FROM = 293, /* FROM */ + WHERE = 294, /* WHERE */ + AND = 295, /* AND */ + SET = 296, /* SET */ + ON = 297, /* ON */ + LOAD = 298, /* LOAD */ + DATA = 299, /* DATA */ + INFILE = 300, /* INFILE */ + EXPLAIN = 301, /* EXPLAIN */ + STORAGE = 302, /* STORAGE */ + FORMAT = 303, /* FORMAT */ + INNER = 304, /* INNER */ + JOIN = 305, /* JOIN */ + EQ = 306, /* EQ */ + LT = 307, /* LT */ + GT = 308, /* GT */ + LE = 309, /* LE */ + GE = 310, /* GE */ + NE = 311, /* NE */ + LIKE = 312, /* LIKE */ + IS = 313, /* IS */ + NUMBER = 314, /* NUMBER */ + FLOAT = 315, /* FLOAT */ + ID = 316, /* ID */ + SSS = 317, /* SSS */ + UMINUS = 318 /* UMINUS */ + }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 125 "yacc_sql.y" - ParsedSqlNode *sql_node; - ConditionSqlNode *condition; - Value *value; - enum CompOp comp; - RelAttrSqlNode *rel_attr; - std::vector *attr_infos; - AttrInfoSqlNode *attr_info; - Expression *expression; - std::vector> *expression_list; - std::vector *value_list; - std::vector> *values_list; - std::vector *condition_list; - std::vector *rel_attr_list; - std::vector *relation_list; - SetClauseSqlNode *set_clause; - std::vector *set_clauses; - JoinSqlNode *join_clause; - std::vector *join_clauses; - char *string; - int number; - float floats; - bool nullable_info; + ParsedSqlNode * sql_node; + ConditionSqlNode * condition; + Value * value; + enum CompOp comp; + RelAttrSqlNode * rel_attr; + std::vector * attr_infos; + AttrInfoSqlNode * attr_info; + Expression * expression; + std::vector> * expression_list; + std::vector * value_list; + std::vector> * values_list; + std::vector * condition_list; + std::vector * rel_attr_list; + std::vector * relation_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; + JoinSqlNode * join_clause; + std::vector * join_clauses; + char * string; + int number; + float floats; + bool nullable_info; #line 152 "yacc_sql.hpp" + }; typedef union YYSTYPE YYSTYPE; -#define YYSTYPE_IS_TRIVIAL 1 -#define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -165,10 +166,14 @@ struct YYLTYPE int last_line; int last_column; }; -#define YYLTYPE_IS_DECLARED 1 -#define YYLTYPE_IS_TRIVIAL 1 +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 #endif -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); + + + +int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); + #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 7b025a20..9d6c0459 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -313,7 +313,7 @@ create_index_stmt: /*create index 语句的语法解析树*/ CreateIndexSqlNode &create_index = $$->create_index; create_index.index_name = $3; create_index.relation_name = $5; - create_index.attribute_name = $7; + create_index.attribute_name.emplace_back($7); free($3); free($5); free($7); diff --git a/src/observer/sql/stmt/create_index_stmt.cpp b/src/observer/sql/stmt/create_index_stmt.cpp index 93fae663..9b0d0b7e 100644 --- a/src/observer/sql/stmt/create_index_stmt.cpp +++ b/src/observer/sql/stmt/create_index_stmt.cpp @@ -26,10 +26,9 @@ RC CreateIndexStmt::create(Db *db, const CreateIndexSqlNode &create_index, Stmt stmt = nullptr; const char *table_name = create_index.relation_name.c_str(); - if (is_blank(table_name) || is_blank(create_index.index_name.c_str()) || - is_blank(create_index.attribute_name.c_str())) { - LOG_WARN("invalid argument. db=%p, table_name=%p, index name=%s, attribute name=%s", - db, table_name, create_index.index_name.c_str(), create_index.attribute_name.c_str()); + if (is_blank(table_name) || is_blank(create_index.index_name.c_str())) { + LOG_WARN("invalid argument. db=%p, table_name=%p, index name=%s", + db, table_name, create_index.index_name.c_str()); return RC::INVALID_ARGUMENT; } @@ -40,11 +39,14 @@ RC CreateIndexStmt::create(Db *db, const CreateIndexSqlNode &create_index, Stmt return RC::SCHEMA_TABLE_NOT_EXIST; } - const FieldMeta *field_meta = table->table_meta().field(create_index.attribute_name.c_str()); - if (nullptr == field_meta) { - LOG_WARN("no such field in table. db=%s, table=%s, field name=%s", - db->name(), table_name, create_index.attribute_name.c_str()); - return RC::SCHEMA_FIELD_NOT_EXIST; + vector field_metas; + for (const auto& attribute_name : create_index.attribute_name) { + const FieldMeta *field_meta = table->table_meta().field(attribute_name.c_str()); + if (nullptr == field_meta) { + LOG_WARN("no such field in table. db=%s, table=%s, field name=%s", + db->name(), table_name, attribute_name.c_str()); + return RC::SCHEMA_FIELD_NOT_EXIST; + } } Index *index = table->find_index(create_index.index_name.c_str()); @@ -53,6 +55,6 @@ RC CreateIndexStmt::create(Db *db, const CreateIndexSqlNode &create_index, Stmt return RC::SCHEMA_INDEX_NAME_REPEAT; } - stmt = new CreateIndexStmt(table, field_meta, create_index.index_name); + stmt = new CreateIndexStmt(table, field_metas, create_index.index_name); return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/create_index_stmt.h b/src/observer/sql/stmt/create_index_stmt.h index 6cd9fbbe..722523f8 100644 --- a/src/observer/sql/stmt/create_index_stmt.h +++ b/src/observer/sql/stmt/create_index_stmt.h @@ -29,7 +29,7 @@ class FieldMeta; class CreateIndexStmt : public Stmt { public: - CreateIndexStmt(Table *table, const FieldMeta *field_meta, const std::string &index_name) + CreateIndexStmt(Table *table, const vector &field_meta, const std::string &index_name) : table_(table), field_meta_(field_meta), index_name_(index_name) {} @@ -38,14 +38,14 @@ class CreateIndexStmt : public Stmt StmtType type() const override { return StmtType::CREATE_INDEX; } Table *table() const { return table_; } - const FieldMeta *field_meta() const { return field_meta_; } + const vector &field_meta() const { return field_meta_; } const std::string &index_name() const { return index_name_; } public: static RC create(Db *db, const CreateIndexSqlNode &create_index, Stmt *&stmt); private: - Table *table_ = nullptr; - const FieldMeta *field_meta_ = nullptr; - std::string index_name_; + Table *table_ = nullptr; + const vector &field_meta_; + std::string index_name_; }; diff --git a/src/observer/storage/index/bplus_tree.cpp b/src/observer/storage/index/bplus_tree.cpp index 80bbcbb8..46f5a6e9 100644 --- a/src/observer/storage/index/bplus_tree.cpp +++ b/src/observer/storage/index/bplus_tree.cpp @@ -59,7 +59,7 @@ void IndexNodeHandler::init_empty(bool leaf) } PageNum IndexNodeHandler::page_num() const { return frame_->page_num(); } -int IndexNodeHandler::key_size() const { return header_.key_length; } +int IndexNodeHandler::key_size() const { return header_.index().fields_total_len(); } int IndexNodeHandler::value_size() const { @@ -784,8 +784,8 @@ RC BplusTreeHandler::sync() return disk_buffer_pool_->flush_all_pages(); } -RC BplusTreeHandler::create(LogHandler &log_handler, BufferPoolManager &bpm, const char *file_name, AttrType attr_type, - int attr_length, int internal_max_size /* = -1*/, int leaf_max_size /* = -1 */) +RC BplusTreeHandler::create( + LogHandler &log_handler, BufferPoolManager &bpm, const char *file_name, const IndexMeta &index) { RC rc = bpm.create_file(file_name); if (OB_FAIL(rc)) { @@ -803,7 +803,7 @@ RC BplusTreeHandler::create(LogHandler &log_handler, BufferPoolManager &bpm, con } LOG_INFO("Successfully open index file %s.", file_name); - rc = this->create(log_handler, *bp, attr_type, attr_length, internal_max_size, leaf_max_size); + rc = this->create(log_handler, *bp, index); if (OB_FAIL(rc)) { bpm.close_file(file_name); return rc; @@ -813,16 +813,8 @@ RC BplusTreeHandler::create(LogHandler &log_handler, BufferPoolManager &bpm, con return rc; } -RC BplusTreeHandler::create(LogHandler &log_handler, DiskBufferPool &buffer_pool, AttrType attr_type, int attr_length, - int internal_max_size /* = -1 */, int leaf_max_size /* = -1 */) +RC BplusTreeHandler::create(LogHandler &log_handler, DiskBufferPool &buffer_pool, const IndexMeta &index) { - if (internal_max_size < 0) { - internal_max_size = calc_internal_page_capacity(attr_length); - } - if (leaf_max_size < 0) { - leaf_max_size = calc_leaf_page_capacity(attr_length); - } - log_handler_ = &log_handler; disk_buffer_pool_ = &buffer_pool; @@ -844,14 +836,12 @@ RC BplusTreeHandler::create(LogHandler &log_handler, DiskBufferPool &buffer_pool return RC::INTERNAL; } - char *pdata = header_frame->data(); - IndexFileHeader *file_header = (IndexFileHeader *)pdata; - file_header->attr_length = attr_length; - file_header->key_length = attr_length + sizeof(RID); - file_header->attr_type = attr_type; - file_header->internal_max_size = internal_max_size; - file_header->leaf_max_size = leaf_max_size; - file_header->root_page = BP_INVALID_PAGE_NUM; + char *pdata = header_frame->data(); + auto *file_header = (IndexFileHeader *)pdata; + rc = file_header->init(index); + if (OB_FAIL(rc)) { + LOG_WARN("fail to init file_header, index:%s", index.to_string().c_str()); + } // 取消记录日志的原因请参考下面的sync调用的地方。 // mtr.logger().init_header_page(header_frame, *file_header); @@ -868,8 +858,8 @@ RC BplusTreeHandler::create(LogHandler &log_handler, DiskBufferPool &buffer_pool return RC::NOMEM; } - key_comparator_.init(file_header->attr_type, file_header->attr_length); - key_printer_.init(file_header->attr_type, file_header->attr_length); + key_comparator_.init(index); + key_printer_.init(index); /* 虽然我们针对B+树记录了WAL,但是我们记录的都是逻辑日志,并没有记录某个页面如何修改的物理日志。 @@ -940,8 +930,8 @@ RC BplusTreeHandler::open(LogHandler &log_handler, DiskBufferPool &buffer_pool) // close old page_handle buffer_pool.unpin_page(frame); - key_comparator_.init(file_header_.attr_type, file_header_.attr_length); - key_printer_.init(file_header_.attr_type, file_header_.attr_length); + key_comparator_.init(file_header_.index()); + key_printer_.init(file_header_.index()); LOG_INFO("Successfully open index"); return RC::SUCCESS; } @@ -1422,8 +1412,8 @@ RC BplusTreeHandler::recover_init_header_page( header_dirty_ = false; frame->mark_dirty(); - key_comparator_.init(file_header_.attr_type, file_header_.attr_length); - key_printer_.init(file_header_.attr_type, file_header_.attr_length); + key_comparator_.init(file_header_.index()); + key_printer_.init(file_header_.index()); return RC::SUCCESS; } @@ -1826,8 +1816,7 @@ RC BplusTreeScanner::open(const char *left_user_key, int left_len, bool left_inc // 校验输入的键值是否是合法范围 if (left_user_key && right_user_key) { - const auto &attr_comparator = tree_handler_.key_comparator_.attr_comparator(); - const int result = attr_comparator(left_user_key, right_user_key); + const int result = tree_handler_.key_comparator_.compare_key(left_user_key, right_user_key); if (result > 0 || // left < right // left == right but is (left,right)/[left,right) or (left,right] (result == 0 && (left_inclusive == false || right_inclusive == false))) { @@ -1851,18 +1840,18 @@ RC BplusTreeScanner::open(const char *left_user_key, int left_len, bool left_inc } else { char *fixed_left_key = const_cast(left_user_key); - if (tree_handler_.file_header_.attr_type == AttrType::CHARS) { - bool should_inclusive_after_fix = false; - rc = fix_user_key(left_user_key, left_len, true /*greater*/, &fixed_left_key, &should_inclusive_after_fix); - if (OB_FAIL(rc)) { - LOG_WARN("failed to fix left user key. rc=%s", strrc(rc)); - return rc; - } - - if (should_inclusive_after_fix) { - left_inclusive = true; - } - } +// if (tree_handler_.file_header_.attr_type == AttrType::CHARS) { +// bool should_inclusive_after_fix = false; +// rc = fix_user_key(left_user_key, left_len, true /*greater*/, &fixed_left_key, &should_inclusive_after_fix); +// if (OB_FAIL(rc)) { +// LOG_WARN("failed to fix left user key. rc=%s", strrc(rc)); +// return rc; +// } +// +// if (should_inclusive_after_fix) { +// left_inclusive = true; +// } +// } MemPoolItem::item_unique_ptr left_pkey; if (left_inclusive) { @@ -1916,29 +1905,29 @@ RC BplusTreeScanner::open(const char *left_user_key, int left_len, bool left_inc right_key_ = nullptr; } else { - char *fixed_right_key = const_cast(right_user_key); - bool should_include_after_fix = false; - if (tree_handler_.file_header_.attr_type == AttrType::CHARS) { - rc = fix_user_key(right_user_key, right_len, false /*want_greater*/, &fixed_right_key, &should_include_after_fix); - if (OB_FAIL(rc)) { - LOG_WARN("failed to fix right user key. rc=%s", strrc(rc)); - return rc; - } - - if (should_include_after_fix) { - right_inclusive = true; - } - } - if (right_inclusive) { - right_key_ = tree_handler_.make_key(fixed_right_key, *RID::max()); - } else { - right_key_ = tree_handler_.make_key(fixed_right_key, *RID::min()); - } - - if (fixed_right_key != right_user_key) { - delete[] fixed_right_key; - fixed_right_key = nullptr; - } +// char *fixed_right_key = const_cast(right_user_key); +// bool should_include_after_fix = false; +// if (tree_handler_.file_header_.attr_type == AttrType::CHARS) { +// rc = fix_user_key(right_user_key, right_len, false /*want_greater*/, &fixed_right_key, &should_include_after_fix); +// if (OB_FAIL(rc)) { +// LOG_WARN("failed to fix right user key. rc=%s", strrc(rc)); +// return rc; +// } +// +// if (should_include_after_fix) { +// right_inclusive = true; +// } +// } +// if (right_inclusive) { +// right_key_ = tree_handler_.make_key(fixed_right_key, *RID::max()); +// } else { +// right_key_ = tree_handler_.make_key(fixed_right_key, *RID::min()); +// } +// +// if (fixed_right_key != right_user_key) { +// delete[] fixed_right_key; +// fixed_right_key = nullptr; +// } } if (touch_end()) { @@ -2036,8 +2025,8 @@ RC BplusTreeScanner::fix_user_key( } // 这里很粗暴,变长字段才需要做调整,其它默认都不需要做调整 - assert(tree_handler_.file_header_.attr_type == AttrType::CHARS); - assert(strlen(user_key) >= static_cast(key_len)); +// assert(tree_handler_.file_header_.attr_type == AttrType::CHARS); +// assert(strlen(user_key) >= static_cast(key_len)); *should_inclusive = false; @@ -2078,3 +2067,16 @@ RC BplusTreeScanner::fix_user_key( *fixed_key = key_buf; return RC::SUCCESS; } + +RC IndexFileHeader::init(const IndexMeta &index) +{ + root_page = BP_INVALID_PAGE_NUM; + index_ = index; + attr_length = index.fields_total_len(); + key_length = attr_length + static_cast(sizeof(RID)); + + internal_max_size = calc_internal_page_capacity(index.fields_total_len()); + leaf_max_size = calc_leaf_page_capacity(index.fields_total_len()); + + return RC::SUCCESS; +} diff --git a/src/observer/storage/index/bplus_tree.h b/src/observer/storage/index/bplus_tree.h index dd752056..f6241693 100644 --- a/src/observer/storage/index/bplus_tree.h +++ b/src/observer/storage/index/bplus_tree.h @@ -56,6 +56,10 @@ enum class BplusTreeOperationType class AttrComparator { public: + AttrComparator() = default; + + AttrComparator(AttrType type, int length) { init(type, length); } + void init(AttrType type, int length) { attr_type_ = type; @@ -89,50 +93,42 @@ class AttrComparator class KeyComparator { public: - void init(AttrType type, int length) { attr_comparator_.init(type, length); } - - const AttrComparator &attr_comparator() const { return attr_comparator_; } - - int operator()(const char *v1, const char *v2) const + void init(const IndexMeta &index) { - int result = attr_comparator_(v1, v2); - if (result != 0) { - return result; + index_ = index; + for (const auto &i : index.fields()) { + attr_comparator_.emplace_back(i.type(), (i.len())); } - - const RID *rid1 = (const RID *)(v1 + attr_comparator_.attr_length()); - const RID *rid2 = (const RID *)(v2 + attr_comparator_.attr_length()); - return RID::compare(rid1, rid2); } -private: - AttrComparator attr_comparator_; -}; + [[nodiscard]] const vector &attr_comparator() const { return attr_comparator_; } -/** - * @brief 属性打印,调试使用(BplusTree) - * @ingroup BPlusTree - */ -class AttrPrinter -{ -public: - void init(AttrType type, int length) + int compare_key(const char *v1, const char *v2) const { - attr_type_ = type; - attr_length_ = length; + for (int i = 0; i < index_.fields().size(); i++) { + int result = attr_comparator_[i](v1, v2); + if (result != 0) { + return result; + } + } + return 0; } - int attr_length() const { return attr_length_; } - - string operator()(const char *v) const + int operator()(const char *v1, const char *v2) const { - Value value(attr_type_, const_cast(v), attr_length_); - return value.to_string(); + auto result = compare_key(v1, v2); + if (result != 0) { + return result; + } + + const RID *rid1 = (const RID *)(v1 + index_.fields_total_len()); + const RID *rid2 = (const RID *)(v2 + index_.fields_total_len()); + return RID::compare(rid1, rid2); } private: - AttrType attr_type_; - int attr_length_; + IndexMeta index_; + vector attr_comparator_; }; /** @@ -142,22 +138,20 @@ class AttrPrinter class KeyPrinter { public: - void init(AttrType type, int length) { attr_printer_.init(type, length); } - - const AttrPrinter &attr_printer() const { return attr_printer_; } + void init(const IndexMeta &index) { index_ = index; } string operator()(const char *v) const { stringstream ss; - ss << "{key:" << attr_printer_(v) << ","; + ss << "{key:" << index_.to_string() << ","; - const RID *rid = (const RID *)(v + attr_printer_.attr_length()); + const RID *rid = (const RID *)(v + index_.fields_total_len()); ss << "rid:{" << rid->to_string() << "}}"; return ss.str(); } private: - AttrPrinter attr_printer_; + IndexMeta index_; }; /** @@ -166,33 +160,34 @@ class KeyPrinter * @details this is the first page of bplus tree. * only one field can be supported, can you extend it to multi-fields? */ -struct IndexFileHeader +class IndexFileHeader { - IndexFileHeader() - { - memset(this, 0, sizeof(IndexFileHeader)); - root_page = BP_INVALID_PAGE_NUM; - } - PageNum root_page; ///< 根节点在磁盘中的页号 - int32_t internal_max_size; ///< 内部节点最大的键值对数 - int32_t leaf_max_size; ///< 叶子节点最大的键值对数 - int32_t attr_length; ///< 键值的长度 - int32_t key_length; ///< attr length + sizeof(RID) - AttrType attr_type; ///< 键值的类型 - - const string to_string() const +public: + [[nodiscard]] RC init(const IndexMeta &index); + + [[nodiscard]] string to_string() const { stringstream ss; - ss << "attr_length:" << attr_length << "," - << "key_length:" << key_length << "," - << "attr_type:" << attr_type_to_string(attr_type) << "," + ss << "index:" << index_.to_string() << "," << "root_page:" << root_page << "," << "internal_max_size:" << internal_max_size << "," << "leaf_max_size:" << leaf_max_size << ";"; return ss.str(); } + +public: + [[nodiscard]] const IndexMeta &index() const { return index_; } + + PageNum root_page = BP_INVALID_PAGE_NUM; ///< 根节点在磁盘中的页号 + int32_t internal_max_size; ///< 内部节点最大的键值对数 + int32_t leaf_max_size; ///< 叶子节点最大的键值对数 + int32_t attr_length; ///< 字段部分的长度 + int32_t key_length; ///< 键的长度 + +private: + IndexMeta index_; ///< 索引元数据 }; /** @@ -459,10 +454,8 @@ class BplusTreeHandler * @param internal_max_size 内部节点最大大小 * @param leaf_max_size 叶子节点最大大小 */ - RC create(LogHandler &log_handler, BufferPoolManager &bpm, const char *file_name, AttrType attr_type, int attr_length, - int internal_max_size = -1, int leaf_max_size = -1); - RC create(LogHandler &log_handler, DiskBufferPool &buffer_pool, AttrType attr_type, int attr_length, - int internal_max_size = -1, int leaf_max_size = -1); + RC create(LogHandler &log_handler, BufferPoolManager &bpm, const char *file_name, const IndexMeta &index); + RC create(LogHandler &log_handler, DiskBufferPool &buffer_pool, const IndexMeta &index); /** * @brief 打开一个B+树 diff --git a/src/observer/storage/index/bplus_tree_index.cpp b/src/observer/storage/index/bplus_tree_index.cpp index c132d112..64f062fe 100644 --- a/src/observer/storage/index/bplus_tree_index.cpp +++ b/src/observer/storage/index/bplus_tree_index.cpp @@ -19,60 +19,60 @@ See the Mulan PSL v2 for more details. */ BplusTreeIndex::~BplusTreeIndex() noexcept { close(); } -RC BplusTreeIndex::create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) +RC BplusTreeIndex::create(Table *table, const char *file_name, const IndexMeta &index_meta) { if (inited_) { - LOG_WARN("Failed to create index due to the index has been created before. file_name:%s, index:%s, field:%s", - file_name, index_meta.name(), index_meta.field()); + LOG_WARN("Failed to create index due to the index has been created before. file_name:%s, index:%s", + file_name, index_meta.to_string().c_str()); return RC::RECORD_OPENNED; } - Index::init(index_meta, field_meta); + Index::init(index_meta); BufferPoolManager &bpm = table->db()->buffer_pool_manager(); - RC rc = index_handler_.create(table->db()->log_handler(), bpm, file_name, field_meta.type(), field_meta.len()); + RC rc = index_handler_.create(table->db()->log_handler(), bpm, file_name, index_meta); if (RC::SUCCESS != rc) { - LOG_WARN("Failed to create index_handler, file_name:%s, index:%s, field:%s, rc:%s", - file_name, index_meta.name(), index_meta.field(), strrc(rc)); + LOG_WARN("Failed to create index_handler, file_name:%s, index:%s, rc:%s", + file_name, index_meta.to_string().c_str(), strrc(rc)); return rc; } inited_ = true; table_ = table; - LOG_INFO("Successfully create index, file_name:%s, index:%s, field:%s", - file_name, index_meta.name(), index_meta.field()); + LOG_INFO("Successfully create index, file_name:%s, index:%s", + file_name, index_meta.to_string().c_str()); return RC::SUCCESS; } -RC BplusTreeIndex::open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) +RC BplusTreeIndex::open(Table *table, const char *file_name, const IndexMeta &index_meta) { if (inited_) { - LOG_WARN("Failed to open index due to the index has been initedd before. file_name:%s, index:%s, field:%s", - file_name, index_meta.name(), index_meta.field()); + LOG_WARN("Failed to open index due to the index has been initedd before. file_name:%s, index:%s", + file_name, index_meta.to_string().c_str()); return RC::RECORD_OPENNED; } - Index::init(index_meta, field_meta); + Index::init(index_meta); BufferPoolManager &bpm = table->db()->buffer_pool_manager(); RC rc = index_handler_.open(table->db()->log_handler(), bpm, file_name); if (RC::SUCCESS != rc) { - LOG_WARN("Failed to open index_handler, file_name:%s, index:%s, field:%s, rc:%s", - file_name, index_meta.name(), index_meta.field(), strrc(rc)); + LOG_WARN("Failed to open index_handler, file_name:%s, index:%s, rc:%s", + file_name, index_meta.to_string().c_str(), strrc(rc)); return rc; } inited_ = true; table_ = table; - LOG_INFO("Successfully open index, file_name:%s, index:%s, field:%s", - file_name, index_meta.name(), index_meta.field()); + LOG_INFO("Successfully open index, file_name:%s, index:%s", + file_name, index_meta.to_string().c_str()); return RC::SUCCESS; } RC BplusTreeIndex::close() { if (inited_) { - LOG_INFO("Begin to close index, index:%s, field:%s", index_meta_.name(), index_meta_.field()); + LOG_INFO("Begin to close index, index:%s", index_meta_.to_string().c_str()); index_handler_.close(); inited_ = false; } @@ -82,12 +82,14 @@ RC BplusTreeIndex::close() RC BplusTreeIndex::insert_entry(const char *record, const RID *rid) { - return index_handler_.insert_entry(record + field_meta_.offset(), rid); + char *entry = index_meta_.make_entry_from_record(record); + return index_handler_.insert_entry(entry, rid); } RC BplusTreeIndex::delete_entry(const char *record, const RID *rid) { - return index_handler_.delete_entry(record + field_meta_.offset(), rid); + char *entry = index_meta_.make_entry_from_record(record); + return index_handler_.delete_entry(entry, rid); } IndexScanner *BplusTreeIndex::create_scanner( diff --git a/src/observer/storage/index/bplus_tree_index.h b/src/observer/storage/index/bplus_tree_index.h index ad274592..a0a25ac9 100644 --- a/src/observer/storage/index/bplus_tree_index.h +++ b/src/observer/storage/index/bplus_tree_index.h @@ -27,8 +27,8 @@ class BplusTreeIndex : public Index BplusTreeIndex() = default; virtual ~BplusTreeIndex() noexcept; - RC create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta); - RC open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta); + RC create(Table *table, const char *file_name, const IndexMeta &index_meta); + RC open(Table *table, const char *file_name, const IndexMeta &index_meta); RC close(); RC insert_entry(const char *record, const RID *rid) override; diff --git a/src/observer/storage/index/bplus_tree_log.h b/src/observer/storage/index/bplus_tree_log.h index 35eb45b2..c94a5863 100644 --- a/src/observer/storage/index/bplus_tree_log.h +++ b/src/observer/storage/index/bplus_tree_log.h @@ -26,7 +26,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/clog/log_replayer.h" // #include "storage/index/bplus_tree_log_entry.h" -struct IndexFileHeader; +class IndexFileHeader; class LogEntry; class LogHandler; class BplusTreeHandler; diff --git a/src/observer/storage/index/index.cpp b/src/observer/storage/index/index.cpp index 6fa51531..b364f7f9 100644 --- a/src/observer/storage/index/index.cpp +++ b/src/observer/storage/index/index.cpp @@ -14,9 +14,8 @@ See the Mulan PSL v2 for more details. */ #include "storage/index/index.h" -RC Index::init(const IndexMeta &index_meta, const FieldMeta &field_meta) +RC Index::init(const IndexMeta &index_meta) { index_meta_ = index_meta; - field_meta_ = field_meta; return RC::SUCCESS; } diff --git a/src/observer/storage/index/index.h b/src/observer/storage/index/index.h index f02b426f..b610302d 100644 --- a/src/observer/storage/index/index.h +++ b/src/observer/storage/index/index.h @@ -78,11 +78,10 @@ class Index virtual RC sync() = 0; protected: - RC init(const IndexMeta &index_meta, const FieldMeta &field_meta); + RC init(const IndexMeta &index_meta); protected: IndexMeta index_meta_; ///< 索引的元数据 - FieldMeta field_meta_; ///< 当前实现仅考虑一个字段的索引 }; /** diff --git a/src/observer/storage/index/index_meta.cpp b/src/observer/storage/index/index_meta.cpp index 32604b9f..d6a535dc 100644 --- a/src/observer/storage/index/index_meta.cpp +++ b/src/observer/storage/index/index_meta.cpp @@ -8,64 +8,36 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -// -// Created by Wangyunlai.wyl on 2021/5/18. -// +#include "index_meta.h" -#include "storage/index/index_meta.h" -#include "common/lang/string.h" -#include "common/log/log.h" -#include "storage/field/field_meta.h" -#include "storage/table/table_meta.h" -#include "json/json.h" - -const static Json::StaticString FIELD_NAME("name"); -const static Json::StaticString FIELD_FIELD_NAME("field_name"); - -RC IndexMeta::init(const char *name, const FieldMeta &field) +RC IndexMeta::init(const char *name, const vector &fields) { - if (common::is_blank(name)) { - LOG_ERROR("Failed to init index, name is empty."); - return RC::INVALID_ARGUMENT; + name_ = name; + fields_total_len_ = 0; + fields_ = fields; + + for (auto &field : fields) { + fields_offset_.emplace_back(fields_total_len_); + fields_total_len_ += field.len(); } - name_ = name; - field_ = field.name(); return RC::SUCCESS; } -void IndexMeta::to_json(Json::Value &json_value) const +string IndexMeta::to_string() const { - json_value[FIELD_NAME] = name_; - json_value[FIELD_FIELD_NAME] = field_; + std::ostringstream oss; + // TODO + return oss.str(); } -RC IndexMeta::from_json(const TableMeta &table, const Json::Value &json_value, IndexMeta &index) +void IndexMeta::to_json(Json::Value &json_value) const { - const Json::Value &name_value = json_value[FIELD_NAME]; - const Json::Value &field_value = json_value[FIELD_FIELD_NAME]; - if (!name_value.isString()) { - LOG_ERROR("Index name is not a string. json value=%s", name_value.toStyledString().c_str()); - return RC::INTERNAL; - } - - if (!field_value.isString()) { - LOG_ERROR("Field name of index [%s] is not a string. json value=%s", - name_value.asCString(), field_value.toStyledString().c_str()); - return RC::INTERNAL; - } - - const FieldMeta *field = table.field(field_value.asCString()); - if (nullptr == field) { - LOG_ERROR("Deserialize index [%s]: no such field: %s", name_value.asCString(), field_value.asCString()); - return RC::SCHEMA_FIELD_MISSING; - } - - return index.init(name_value.asCString(), *field); + // TODO } -const char *IndexMeta::name() const { return name_.c_str(); } - -const char *IndexMeta::field() const { return field_.c_str(); } - -void IndexMeta::desc(ostream &os) const { os << "index name=" << name_ << ", field=" << field_; } \ No newline at end of file +RC IndexMeta::from_json(const Json::Value &json_value, IndexMeta &index) +{ + // TODO + return RC::SUCCESS; +} diff --git a/src/observer/storage/index/index_meta.h b/src/observer/storage/index/index_meta.h index 04d10642..ed661ab2 100644 --- a/src/observer/storage/index/index_meta.h +++ b/src/observer/storage/index/index_meta.h @@ -16,6 +16,9 @@ See the Mulan PSL v2 for more details. */ #include "common/rc.h" #include "common/lang/string.h" +#include "storage/field/field_meta.h" + +#include class TableMeta; class FieldMeta; @@ -35,19 +38,42 @@ class IndexMeta public: IndexMeta() = default; - RC init(const char *name, const FieldMeta &field); + [[nodiscard]] RC init(const char *name, const vector &fields); -public: - const char *name() const; - const char *field() const; + void desc(ostream &os) const { os << to_string(); } - void desc(ostream &os) const; + [[nodiscard]] string to_string() const; -public: - void to_json(Json::Value &json_value) const; - static RC from_json(const TableMeta &table, const Json::Value &json_value, IndexMeta &index); + void to_json(Json::Value &json_value) const; + + [[nodiscard]] static RC from_json(const Json::Value &json_value, IndexMeta &index); + + [[nodiscard]] char *make_entry_from_record(const char *record) + { + char *entry = new char[fields_total_len_]; + for (size_t i = 0; i < fields_.size(); i++) { + auto &field = fields_[i]; + memcpy(entry + fields_offset_[i], record + field.offset(), field.len()); + } + return entry; + } + + void make_entry_from_record(char *entry, const char *record) + { + for (size_t i = 0; i < fields_.size(); i++) { + auto &field = fields_[i]; + memcpy(entry + fields_offset_[i], record + field.offset(), field.len()); + } + } + + [[nodiscard]] const char *name() const { return name_.c_str(); } + [[nodiscard]] int fields_total_len() const { return fields_total_len_; } + [[nodiscard]] const vector &fields_offset() const { return fields_offset_; } + [[nodiscard]] const vector &fields() const { return fields_; } -protected: - string name_; // index's name - string field_; // field's name +private: + string name_; + int fields_total_len_ = 0; + vector fields_offset_; + vector fields_; }; diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 76a634fa..da939300 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -193,19 +193,11 @@ RC Table::open(Db *db, const char *meta_file, const char *base_dir) const int index_num = table_meta_.index_num(); for (int i = 0; i < index_num; i++) { const IndexMeta *index_meta = table_meta_.index(i); - const FieldMeta *field_meta = table_meta_.field(index_meta->field()); - if (field_meta == nullptr) { - LOG_ERROR("Found invalid index meta info which has a non-exists field. table=%s, index=%s, field=%s", - name(), index_meta->name(), index_meta->field()); - // skip cleanup - // do all cleanup action in destructive Table function - return RC::INTERNAL; - } BplusTreeIndex *index = new BplusTreeIndex(); string index_file = table_index_file(base_dir, name(), index_meta->name()); - rc = index->open(this, index_file.c_str(), *index_meta, *field_meta); + rc = index->open(this, index_file.c_str(), *index_meta); if (rc != RC::SUCCESS) { delete index; LOG_ERROR("Failed to open index. table=%s, index=%s, file=%s, rc=%s", @@ -397,19 +389,19 @@ RC Table::get_chunk_scanner(ChunkFileScanner &scanner, Trx *trx, ReadWriteMode m return rc; } -RC Table::create_index(Trx *trx, const FieldMeta *field_meta, const char *index_name) +RC Table::create_index(Trx *trx, const vector &field_meta, const char *index_name) { - if (common::is_blank(index_name) || nullptr == field_meta) { + if (common::is_blank(index_name)) { LOG_INFO("Invalid input arguments, table name is %s, index_name is blank or attribute_name is blank", name()); return RC::INVALID_ARGUMENT; } IndexMeta new_index_meta; - RC rc = new_index_meta.init(index_name, *field_meta); + RC rc = new_index_meta.init(index_name, field_meta); if (rc != RC::SUCCESS) { - LOG_INFO("Failed to init IndexMeta in table:%s, index_name:%s, field_name:%s", - name(), index_name, field_meta->name()); + LOG_INFO("Failed to init IndexMeta in table:%s, index:%s", + name(), new_index_meta.to_string().c_str()); return rc; } @@ -417,7 +409,7 @@ RC Table::create_index(Trx *trx, const FieldMeta *field_meta, const char *index_ BplusTreeIndex *index = new BplusTreeIndex(); string index_file = table_index_file(base_dir_.c_str(), name(), index_name); - rc = index->create(this, index_file.c_str(), new_index_meta, *field_meta); + rc = index->create(this, index_file.c_str(), new_index_meta); if (rc != RC::SUCCESS) { delete index; LOG_ERROR("Failed to create bplus tree index. file name=%s, rc=%d:%s", index_file.c_str(), rc, strrc(rc)); @@ -584,10 +576,11 @@ Index *Table::find_index(const char *index_name) const } Index *Table::find_index_by_field(const char *field_name) const { - const TableMeta &table_meta = this->table_meta(); - const IndexMeta *index_meta = table_meta.find_index_by_field(field_name); - if (index_meta != nullptr) { - return this->find_index(index_meta->name()); + for (const auto &index : indexes_) { + auto name = index->index_meta().fields().front().name(); + if (0 == strcmp(name, field_name)) { + return index; + } } return nullptr; } diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index 2ff716dd..7ac924a0 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -89,7 +89,7 @@ class Table RC recover_insert_record(Record &record); // TODO refactor - RC create_index(Trx *trx, const FieldMeta *field_meta, const char *index_name); + RC create_index(Trx *trx, const vector &field_meta, const char *index_name); RC get_record_scanner(RecordFileScanner &scanner, Trx *trx, ReadWriteMode mode); diff --git a/src/observer/storage/table/table_meta.cpp b/src/observer/storage/table/table_meta.cpp index 5241f598..07b57729 100644 --- a/src/observer/storage/table/table_meta.cpp +++ b/src/observer/storage/table/table_meta.cpp @@ -158,16 +158,6 @@ const IndexMeta *TableMeta::index(const char *name) const return nullptr; } -const IndexMeta *TableMeta::find_index_by_field(const char *field) const -{ - for (const IndexMeta &index : indexes_) { - if (0 == strcmp(index.field(), field)) { - return &index; - } - } - return nullptr; -} - const IndexMeta *TableMeta::index(int i) const { return &indexes_[i]; } int TableMeta::index_num() const { return indexes_.size(); } @@ -293,7 +283,7 @@ int TableMeta::deserialize(std::istream &is) IndexMeta &index = indexes[i]; const Json::Value &index_value = indexes_value[i]; - rc = IndexMeta::from_json(*this, index_value, index); + rc = IndexMeta::from_json(index_value, index); if (rc != RC::SUCCESS) { LOG_ERROR("Failed to deserialize table meta. table name=%s", table_name.c_str()); return -1; diff --git a/src/observer/storage/table/table_meta.h b/src/observer/storage/table/table_meta.h index 6f438018..a13bde02 100644 --- a/src/observer/storage/table/table_meta.h +++ b/src/observer/storage/table/table_meta.h @@ -58,7 +58,6 @@ class TableMeta : public common::Serializable int sys_field_num() const; const IndexMeta *index(const char *name) const; - const IndexMeta *find_index_by_field(const char *field) const; const IndexMeta *index(int i) const; int index_num() const; From e3070f4c5fa4ce3962fac5970215f7c2b709060a Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 1 Oct 2024 19:10:41 +0800 Subject: [PATCH 079/308] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90mul?= =?UTF-8?q?ti-index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/stmt/create_index_stmt.h | 6 +- src/observer/storage/index/bplus_tree.cpp | 108 +++----------------- src/observer/storage/index/bplus_tree.h | 30 ++---- src/observer/storage/index/bplus_tree_log.h | 2 +- src/observer/storage/index/index_meta.h | 8 +- 5 files changed, 32 insertions(+), 122 deletions(-) diff --git a/src/observer/sql/stmt/create_index_stmt.h b/src/observer/sql/stmt/create_index_stmt.h index 722523f8..0e30bb84 100644 --- a/src/observer/sql/stmt/create_index_stmt.h +++ b/src/observer/sql/stmt/create_index_stmt.h @@ -37,9 +37,9 @@ class CreateIndexStmt : public Stmt StmtType type() const override { return StmtType::CREATE_INDEX; } - Table *table() const { return table_; } - const vector &field_meta() const { return field_meta_; } - const std::string &index_name() const { return index_name_; } + Table *table() const { return table_; } + const vector &field_meta() const { return field_meta_; } + const std::string &index_name() const { return index_name_; } public: static RC create(Db *db, const CreateIndexSqlNode &create_index, Stmt *&stmt); diff --git a/src/observer/storage/index/bplus_tree.cpp b/src/observer/storage/index/bplus_tree.cpp index 46f5a6e9..fc064261 100644 --- a/src/observer/storage/index/bplus_tree.cpp +++ b/src/observer/storage/index/bplus_tree.cpp @@ -59,7 +59,7 @@ void IndexNodeHandler::init_empty(bool leaf) } PageNum IndexNodeHandler::page_num() const { return frame_->page_num(); } -int IndexNodeHandler::key_size() const { return header_.index().fields_total_len(); } +int IndexNodeHandler::key_size() const { return header_.key_length; } int IndexNodeHandler::value_size() const { @@ -836,12 +836,9 @@ RC BplusTreeHandler::create(LogHandler &log_handler, DiskBufferPool &buffer_pool return RC::INTERNAL; } - char *pdata = header_frame->data(); - auto *file_header = (IndexFileHeader *)pdata; - rc = file_header->init(index); - if (OB_FAIL(rc)) { - LOG_WARN("fail to init file_header, index:%s", index.to_string().c_str()); - } + char *pdata = header_frame->data(); + IndexFileHeader *file_header = (IndexFileHeader *)pdata; + file_header->init(index); // 取消记录日志的原因请参考下面的sync调用的地方。 // mtr.logger().init_header_page(header_frame, *file_header); @@ -1840,18 +1837,6 @@ RC BplusTreeScanner::open(const char *left_user_key, int left_len, bool left_inc } else { char *fixed_left_key = const_cast(left_user_key); -// if (tree_handler_.file_header_.attr_type == AttrType::CHARS) { -// bool should_inclusive_after_fix = false; -// rc = fix_user_key(left_user_key, left_len, true /*greater*/, &fixed_left_key, &should_inclusive_after_fix); -// if (OB_FAIL(rc)) { -// LOG_WARN("failed to fix left user key. rc=%s", strrc(rc)); -// return rc; -// } -// -// if (should_inclusive_after_fix) { -// left_inclusive = true; -// } -// } MemPoolItem::item_unique_ptr left_pkey; if (left_inclusive) { @@ -1905,29 +1890,17 @@ RC BplusTreeScanner::open(const char *left_user_key, int left_len, bool left_inc right_key_ = nullptr; } else { -// char *fixed_right_key = const_cast(right_user_key); -// bool should_include_after_fix = false; -// if (tree_handler_.file_header_.attr_type == AttrType::CHARS) { -// rc = fix_user_key(right_user_key, right_len, false /*want_greater*/, &fixed_right_key, &should_include_after_fix); -// if (OB_FAIL(rc)) { -// LOG_WARN("failed to fix right user key. rc=%s", strrc(rc)); -// return rc; -// } -// -// if (should_include_after_fix) { -// right_inclusive = true; -// } -// } -// if (right_inclusive) { -// right_key_ = tree_handler_.make_key(fixed_right_key, *RID::max()); -// } else { -// right_key_ = tree_handler_.make_key(fixed_right_key, *RID::min()); -// } -// -// if (fixed_right_key != right_user_key) { -// delete[] fixed_right_key; -// fixed_right_key = nullptr; -// } + char *fixed_right_key = const_cast(right_user_key); + if (right_inclusive) { + right_key_ = tree_handler_.make_key(fixed_right_key, *RID::max()); + } else { + right_key_ = tree_handler_.make_key(fixed_right_key, *RID::min()); + } + + if (fixed_right_key != right_user_key) { + delete[] fixed_right_key; + fixed_right_key = nullptr; + } } if (touch_end()) { @@ -2017,57 +1990,6 @@ RC BplusTreeScanner::close() return RC::SUCCESS; } -RC BplusTreeScanner::fix_user_key( - const char *user_key, int key_len, bool want_greater, char **fixed_key, bool *should_inclusive) -{ - if (nullptr == fixed_key || nullptr == should_inclusive) { - return RC::INVALID_ARGUMENT; - } - - // 这里很粗暴,变长字段才需要做调整,其它默认都不需要做调整 -// assert(tree_handler_.file_header_.attr_type == AttrType::CHARS); -// assert(strlen(user_key) >= static_cast(key_len)); - - *should_inclusive = false; - - int32_t attr_length = tree_handler_.file_header_.attr_length; - char *key_buf = new char[attr_length]; - if (nullptr == key_buf) { - return RC::NOMEM; - } - - if (key_len <= attr_length) { - memcpy(key_buf, user_key, key_len); - memset(key_buf + key_len, 0, attr_length - key_len); - - *fixed_key = key_buf; - return RC::SUCCESS; - } - - // key_len > attr_length - memcpy(key_buf, user_key, attr_length); - - char c = user_key[attr_length]; - if (c == 0) { - *fixed_key = key_buf; - return RC::SUCCESS; - } - - // 扫描 >=/> user_key 的数据 - // 示例:>=/> ABCD1 的数据,attr_length=4, - // 等价于扫描 >= ABCE 的数据 - // 如果是扫描 <=/< user_key的数据 - // 示例:<=/< ABCD1 <==> <= ABCD (attr_length=4) - // NOTE: 假设都是普通的ASCII字符,不包含二进制字符,使用char不会溢出 - *should_inclusive = true; - if (want_greater) { - key_buf[attr_length - 1]++; - } - - *fixed_key = key_buf; - return RC::SUCCESS; -} - RC IndexFileHeader::init(const IndexMeta &index) { root_page = BP_INVALID_PAGE_NUM; diff --git a/src/observer/storage/index/bplus_tree.h b/src/observer/storage/index/bplus_tree.h index f6241693..c707d277 100644 --- a/src/observer/storage/index/bplus_tree.h +++ b/src/observer/storage/index/bplus_tree.h @@ -101,8 +101,6 @@ class KeyComparator } } - [[nodiscard]] const vector &attr_comparator() const { return attr_comparator_; } - int compare_key(const char *v1, const char *v2) const { for (int i = 0; i < index_.fields().size(); i++) { @@ -160,16 +158,22 @@ class KeyPrinter * @details this is the first page of bplus tree. * only one field can be supported, can you extend it to multi-fields? */ -class IndexFileHeader +struct IndexFileHeader { -public: - [[nodiscard]] RC init(const IndexMeta &index); + RC init(const IndexMeta &index); - [[nodiscard]] string to_string() const + PageNum root_page = BP_INVALID_PAGE_NUM; ///< 根节点在磁盘中的页号 + int32_t internal_max_size; ///< 内部节点最大的键值对数 + int32_t leaf_max_size; ///< 叶子节点最大的键值对数 + int32_t attr_length; ///< 字段部分的长度 + int32_t key_length; ///< 键的长度 + + const string to_string() const { stringstream ss; - ss << "index:" << index_.to_string() << "," + ss << "attr_length:" << attr_length << "," + << "key_length:" << key_length << "," << "root_page:" << root_page << "," << "internal_max_size:" << internal_max_size << "," << "leaf_max_size:" << leaf_max_size << ";"; @@ -177,15 +181,8 @@ class IndexFileHeader return ss.str(); } -public: [[nodiscard]] const IndexMeta &index() const { return index_; } - PageNum root_page = BP_INVALID_PAGE_NUM; ///< 根节点在磁盘中的页号 - int32_t internal_max_size; ///< 内部节点最大的键值对数 - int32_t leaf_max_size; ///< 叶子节点最大的键值对数 - int32_t attr_length; ///< 字段部分的长度 - int32_t key_length; ///< 键的长度 - private: IndexMeta index_; ///< 索引元数据 }; @@ -689,11 +686,6 @@ class BplusTreeScanner RC close(); private: - /** - * 如果key的类型是CHARS, 扩展或缩减user_key的大小刚好是schema中定义的大小 - */ - RC fix_user_key(const char *user_key, int key_len, bool want_greater, char **fixed_key, bool *should_inclusive); - void fetch_item(RID &rid); /** diff --git a/src/observer/storage/index/bplus_tree_log.h b/src/observer/storage/index/bplus_tree_log.h index c94a5863..35eb45b2 100644 --- a/src/observer/storage/index/bplus_tree_log.h +++ b/src/observer/storage/index/bplus_tree_log.h @@ -26,7 +26,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/clog/log_replayer.h" // #include "storage/index/bplus_tree_log_entry.h" -class IndexFileHeader; +struct IndexFileHeader; class LogEntry; class LogHandler; class BplusTreeHandler; diff --git a/src/observer/storage/index/index_meta.h b/src/observer/storage/index/index_meta.h index ed661ab2..a9951711 100644 --- a/src/observer/storage/index/index_meta.h +++ b/src/observer/storage/index/index_meta.h @@ -46,15 +46,12 @@ class IndexMeta void to_json(Json::Value &json_value) const; - [[nodiscard]] static RC from_json(const Json::Value &json_value, IndexMeta &index); + static RC from_json(const Json::Value &json_value, IndexMeta &index); [[nodiscard]] char *make_entry_from_record(const char *record) { char *entry = new char[fields_total_len_]; - for (size_t i = 0; i < fields_.size(); i++) { - auto &field = fields_[i]; - memcpy(entry + fields_offset_[i], record + field.offset(), field.len()); - } + make_entry_from_record(entry, record); return entry; } @@ -68,7 +65,6 @@ class IndexMeta [[nodiscard]] const char *name() const { return name_.c_str(); } [[nodiscard]] int fields_total_len() const { return fields_total_len_; } - [[nodiscard]] const vector &fields_offset() const { return fields_offset_; } [[nodiscard]] const vector &fields() const { return fields_; } private: From d90c3f2958cf5305bb69347fbeeb6d63c2cf5a0a Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 1 Oct 2024 19:47:46 +0800 Subject: [PATCH 080/308] fix show index --- src/observer/sql/executor/show_index_executor.cpp | 10 ++++++---- .../sql/operator/string_list_physical_operator.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/observer/sql/executor/show_index_executor.cpp b/src/observer/sql/executor/show_index_executor.cpp index 7aefac37..67e66c61 100644 --- a/src/observer/sql/executor/show_index_executor.cpp +++ b/src/observer/sql/executor/show_index_executor.cpp @@ -50,12 +50,14 @@ RC ShowIndexExecutor::execute(SQLStageEvent *sql_event) auto oper = new StringListPhysicalOperator; const TableMeta &table_meta = table->table_meta(); for (int i = 0; i < table_meta.index_num(); i++) { - auto index = table_meta.index(i); - oper->append({table_name, "1", index->name()}); - auto fields = index->fields(); + auto index = table_meta.index(i); + vector list = {table_name, "1", index->name()}; + auto fields = index->fields(); for (auto &name : fields) { - oper->append({"1", name.name()}); + list.emplace_back("1"); + list.emplace_back(name.name()); } + oper->append(list); } sql_result->set_operator(unique_ptr(oper)); diff --git a/src/observer/sql/operator/string_list_physical_operator.h b/src/observer/sql/operator/string_list_physical_operator.h index 86ffd3fc..2ed7ddfd 100644 --- a/src/observer/sql/operator/string_list_physical_operator.h +++ b/src/observer/sql/operator/string_list_physical_operator.h @@ -35,7 +35,7 @@ class StringListPhysicalOperator : public PhysicalOperator strings_.emplace_back(begin, end); } - void append(std::initializer_list init) { strings_.emplace_back(init); } + void append(const std::vector &init) { strings_.emplace_back(init); } template void append(const T &v) From 50ee02479992ca5b66d24c7b5225357512d646b8 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 1 Oct 2024 20:22:32 +0800 Subject: [PATCH 081/308] fix bug: field_metas.push_back(*field_meta); --- src/observer/sql/stmt/create_index_stmt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/observer/sql/stmt/create_index_stmt.cpp b/src/observer/sql/stmt/create_index_stmt.cpp index 9b0d0b7e..d00ddfed 100644 --- a/src/observer/sql/stmt/create_index_stmt.cpp +++ b/src/observer/sql/stmt/create_index_stmt.cpp @@ -47,6 +47,7 @@ RC CreateIndexStmt::create(Db *db, const CreateIndexSqlNode &create_index, Stmt db->name(), table_name, attribute_name.c_str()); return RC::SCHEMA_FIELD_NOT_EXIST; } + field_metas.push_back(*field_meta); } Index *index = table->find_index(create_index.index_name.c_str()); From d894f23e3970617e8b15e3497d9c19135adf140d Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 1 Oct 2024 21:23:36 +0800 Subject: [PATCH 082/308] finish IndexMeta::to_string, IndexMeta::to_json, IndexMeta::from_json --- src/observer/storage/index/index_meta.cpp | 49 +++++++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/src/observer/storage/index/index_meta.cpp b/src/observer/storage/index/index_meta.cpp index d6a535dc..abf380d2 100644 --- a/src/observer/storage/index/index_meta.cpp +++ b/src/observer/storage/index/index_meta.cpp @@ -27,17 +27,60 @@ RC IndexMeta::init(const char *name, const vector &fields) string IndexMeta::to_string() const { std::ostringstream oss; - // TODO + oss << "Index Name: " << name_ << ", Fields: ["; + for (size_t i = 0; i < fields_.size(); ++i) { + oss << fields_[i].name(); + if (i < fields_.size() - 1) { + oss << ", "; + } + } + oss << "], Total Length: " << fields_total_len_; return oss.str(); } void IndexMeta::to_json(Json::Value &json_value) const { - // TODO + json_value["name"] = name_; + json_value["fields_total_len"] = fields_total_len_; + + Json::Value fields_json(Json::arrayValue); + for (const auto &field : fields_) { + Json::Value field_json; + field.to_json(field_json); + fields_json.append(field_json); + } + json_value["fields"] = fields_json; + + Json::Value offsets_json(Json::arrayValue); + for (const auto &offset : fields_offset_) { + offsets_json.append(offset); + } + json_value["fields_offset"] = offsets_json; } RC IndexMeta::from_json(const Json::Value &json_value, IndexMeta &index) { - // TODO + if (!json_value.isMember("name") || !json_value.isMember("fields") || !json_value.isMember("fields_total_len") || !json_value.isMember("fields_offset")) { + return RC::INVALID_ARGUMENT; + } + + index.name_ = json_value["name"].asString(); + index.fields_total_len_ = json_value["fields_total_len"].asInt(); + + const Json::Value &fields_json = json_value["fields"]; + for (const auto &field_json : fields_json) { + FieldMeta field; + RC rc = FieldMeta::from_json(field_json, field); + if (rc != RC::SUCCESS) { + return rc; + } + index.fields_.push_back(field); + } + + const Json::Value &offsets_json = json_value["fields_offset"]; + for (const auto &offset : offsets_json) { + index.fields_offset_.push_back(offset.asInt()); + } + return RC::SUCCESS; } From 1c99098d0846ef22c0c4378ff61b1df00303a400 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 1 Oct 2024 21:31:18 +0800 Subject: [PATCH 083/308] =?UTF-8?q?=E4=BF=AE=E6=94=B9IndexFileHeader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/index/bplus_tree.cpp | 10 +++++----- src/observer/storage/index/bplus_tree.h | 6 +----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/observer/storage/index/bplus_tree.cpp b/src/observer/storage/index/bplus_tree.cpp index fc064261..09b9d7fc 100644 --- a/src/observer/storage/index/bplus_tree.cpp +++ b/src/observer/storage/index/bplus_tree.cpp @@ -855,6 +855,7 @@ RC BplusTreeHandler::create(LogHandler &log_handler, DiskBufferPool &buffer_pool return RC::NOMEM; } + index_meta_ = index; key_comparator_.init(index); key_printer_.init(index); @@ -927,8 +928,8 @@ RC BplusTreeHandler::open(LogHandler &log_handler, DiskBufferPool &buffer_pool) // close old page_handle buffer_pool.unpin_page(frame); - key_comparator_.init(file_header_.index()); - key_printer_.init(file_header_.index()); + key_comparator_.init(index_meta_); + key_printer_.init(index_meta_); LOG_INFO("Successfully open index"); return RC::SUCCESS; } @@ -1409,8 +1410,8 @@ RC BplusTreeHandler::recover_init_header_page( header_dirty_ = false; frame->mark_dirty(); - key_comparator_.init(file_header_.index()); - key_printer_.init(file_header_.index()); + key_comparator_.init(index_meta_); + key_printer_.init(index_meta_); return RC::SUCCESS; } @@ -1993,7 +1994,6 @@ RC BplusTreeScanner::close() RC IndexFileHeader::init(const IndexMeta &index) { root_page = BP_INVALID_PAGE_NUM; - index_ = index; attr_length = index.fields_total_len(); key_length = attr_length + static_cast(sizeof(RID)); diff --git a/src/observer/storage/index/bplus_tree.h b/src/observer/storage/index/bplus_tree.h index c707d277..f003e75f 100644 --- a/src/observer/storage/index/bplus_tree.h +++ b/src/observer/storage/index/bplus_tree.h @@ -180,11 +180,6 @@ struct IndexFileHeader return ss.str(); } - - [[nodiscard]] const IndexMeta &index() const { return index_; } - -private: - IndexMeta index_; ///< 索引元数据 }; /** @@ -630,6 +625,7 @@ class BplusTreeHandler DiskBufferPool *disk_buffer_pool_ = nullptr; /// 磁盘缓冲池 bool header_dirty_ = false; /// 是否需要更新头页面 IndexFileHeader file_header_; + IndexMeta index_meta_; // 在调整根节点时,需要加上这个锁。 // 这个锁可以使用递归读写锁,但是这里偷懒先不改 From 28e008606e43ac55993b43cf1f8cfec8b888367d Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 1 Oct 2024 23:08:23 +0800 Subject: [PATCH 084/308] =?UTF-8?q?fix=20bug:=20field=5Fmetas=E7=9A=84?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E8=A2=AB=E5=BC=B9=E5=87=BA=E6=A0=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/stmt/create_index_stmt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/stmt/create_index_stmt.cpp b/src/observer/sql/stmt/create_index_stmt.cpp index d00ddfed..79d84311 100644 --- a/src/observer/sql/stmt/create_index_stmt.cpp +++ b/src/observer/sql/stmt/create_index_stmt.cpp @@ -47,7 +47,7 @@ RC CreateIndexStmt::create(Db *db, const CreateIndexSqlNode &create_index, Stmt db->name(), table_name, attribute_name.c_str()); return RC::SCHEMA_FIELD_NOT_EXIST; } - field_metas.push_back(*field_meta); + field_metas.emplace_back(*field_meta); } Index *index = table->find_index(create_index.index_name.c_str()); From 933b004959f1657efc796dbecd421a5e69a5f2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Tue, 1 Oct 2024 15:41:30 +0000 Subject: [PATCH 085/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=90=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=BD=AC=E6=8D=A2=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/optimizer/logical_plan_generator.cpp | 5 +++++ src/observer/sql/parser/expression_binder.cpp | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 8f3835fb..d97273b0 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -181,12 +181,17 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrleft(); auto &right = comp_expr->right(); + const auto op = comp_expr->comp(); + if (left->value_type() != right->value_type()) { auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); if (right->type() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST || left->type() == ExprType::SUBQUERY || left->type() == ExprType::EXPRLIST) { + if (op != CompOp::IN_OP || op != CompOp::NOT_IN_OP) { + return RC::UNSUPPORTED; + } // 暂时在这里不做处理 return RC::SUCCESS; } else if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 60426f00..7f0164ca 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -259,7 +259,7 @@ RC ExpressionBinder::bind_comparison_expression( return RC::SUCCESS; } - auto comparison_expr = static_cast(expr.get()); + auto comparison_expr = dynamic_cast(expr.get()); vector> child_bound_expressions; unique_ptr &left_expr = comparison_expr->left(); @@ -277,7 +277,7 @@ RC ExpressionBinder::bind_comparison_expression( unique_ptr &left = child_bound_expressions[0]; if (left.get() != left_expr.get()) { - left_expr.reset(left.release()); + left_expr = std::move(left); } child_bound_expressions.clear(); @@ -293,7 +293,7 @@ RC ExpressionBinder::bind_comparison_expression( unique_ptr &right = child_bound_expressions[0]; if (right.get() != right_expr.get()) { - right_expr.reset(right.release()); + right_expr = std::move(right); } bound_expressions.emplace_back(std::move(expr)); @@ -327,7 +327,7 @@ RC ExpressionBinder::bind_conjunction_expression( unique_ptr &child = child_bound_expressions[0]; if (child.get() != child_expr.get()) { - child_expr.reset(child.release()); + child_expr = std::move(child); } } @@ -361,7 +361,7 @@ RC ExpressionBinder::bind_arithmetic_expression( unique_ptr &left = child_bound_expressions[0]; if (left.get() != left_expr.get()) { - left_expr.reset(left.release()); + left_expr = std::move(left); } child_bound_expressions.clear(); @@ -377,7 +377,7 @@ RC ExpressionBinder::bind_arithmetic_expression( unique_ptr &right = child_bound_expressions[0]; if (right.get() != right_expr.get()) { - right_expr.reset(right.release()); + right_expr = std::move(right); } bound_expressions.emplace_back(std::move(expr)); From 22d7a48e1b2d72d7e0ae4064661c92e2a8eb1aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Tue, 1 Oct 2024 17:25:51 +0000 Subject: [PATCH 086/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=90=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=BD=AC=E6=8D=A2=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 4 ++++ src/observer/sql/expr/expression.h | 2 ++ .../sql/optimizer/logical_plan_generator.cpp | 20 ++++++++++++++++--- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 3f352487..a47125d0 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -797,6 +797,10 @@ RC SubQueryExpr::generate_physical_oper() } return open(nullptr); } +bool SubQueryExpr::one_row_ret() const +{ + return (sql_node_.expressions.size() == 1 && sql_node_.expressions[0]->type() == ExprType::UNBOUND_AGGREGATION); +} // 子算子树的 open 和 close 逻辑由外部控制 RC SubQueryExpr::open(Trx *trx) diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 940d70eb..30572ba4 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -648,6 +648,8 @@ class SubQueryExpr : public Expression size_t res_nums() const { return res_query.size(); } + bool one_row_ret() const; + private: SelectSqlNode &sql_node_; std::unique_ptr select_stmt_; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index d97273b0..e6a5342e 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -182,6 +182,23 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrright(); const auto op = comp_expr->comp(); + // 处理合法子查询 + auto sub_right = dynamic_cast(right.get()); + if (sub_right != nullptr) { + if (op == IN_OP || op == NOT_IN_OP) { + + } else if (!sub_right->one_row_ret()) { + return RC::UNSUPPORTED; + } + } + auto sub_left = dynamic_cast(left.get()); + if (sub_left != nullptr) { + if (op == IN_OP || op == NOT_IN_OP) { + + } else if (!sub_left->one_row_ret()) { + return RC::UNSUPPORTED; + } + } if (left->value_type() != right->value_type()) { auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); @@ -189,9 +206,6 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrtype() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST || left->type() == ExprType::SUBQUERY || left->type() == ExprType::EXPRLIST) { - if (op != CompOp::IN_OP || op != CompOp::NOT_IN_OP) { - return RC::UNSUPPORTED; - } // 暂时在这里不做处理 return RC::SUCCESS; } else if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { From ae7040eeaaa8a3f0dd619d9841b555146d319e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Tue, 1 Oct 2024 18:25:26 +0000 Subject: [PATCH 087/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=90=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=BD=AC=E6=8D=A2=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 11 +++----- src/observer/sql/expr/expression.h | 2 +- .../operator/table_scan_physical_operator.cpp | 1 + .../sql/optimizer/logical_plan_generator.cpp | 20 ++------------ .../sql/optimizer/physical_plan_generator.cpp | 27 ++++++++++++++++--- 5 files changed, 31 insertions(+), 30 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index a47125d0..e3244724 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -253,7 +253,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) } // 检查子查询是否有多行结果 - if (left_subquery_expr && left_subquery_expr->has_more_row(tuple)) { + if (left_subquery_expr && left_subquery_expr->has_more_row()) { left_subquery_expr->close(); // 关闭子查询 return RC::INVALID_ARGUMENT; } @@ -304,7 +304,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) } // 检查右侧子查询是否有多行结果 - if (right_subquery_expr && right_subquery_expr->has_more_row(tuple)) { + if (right_subquery_expr && right_subquery_expr->has_more_row()) { right_subquery_expr->close(); return RC::INVALID_ARGUMENT; } @@ -797,10 +797,7 @@ RC SubQueryExpr::generate_physical_oper() } return open(nullptr); } -bool SubQueryExpr::one_row_ret() const -{ - return (sql_node_.expressions.size() == 1 && sql_node_.expressions[0]->type() == ExprType::UNBOUND_AGGREGATION); -} +bool SubQueryExpr::one_row_ret() const { return res_query.size() == 1; } // 子算子树的 open 和 close 逻辑由外部控制 RC SubQueryExpr::open(Trx *trx) @@ -830,7 +827,7 @@ RC SubQueryExpr::close() return RC::SUCCESS; } -bool SubQueryExpr::has_more_row(const Tuple &tuple) const { return visited_index + 1 < res_query.size(); } +bool SubQueryExpr::has_more_row() const { return res_query.size() > 1; } RC SubQueryExpr::get_value(const Tuple &tuple, Value &value) { diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 30572ba4..fda618d5 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -630,7 +630,7 @@ class SubQueryExpr : public Expression RC open(Trx *trx); RC close(); - bool has_more_row(const Tuple &tuple) const; + bool has_more_row() const; RC get_value(const Tuple &tuple, Value &value) override; diff --git a/src/observer/sql/operator/table_scan_physical_operator.cpp b/src/observer/sql/operator/table_scan_physical_operator.cpp index c7eabaaa..5f0b6908 100644 --- a/src/observer/sql/operator/table_scan_physical_operator.cpp +++ b/src/observer/sql/operator/table_scan_physical_operator.cpp @@ -75,6 +75,7 @@ RC TableScanPhysicalOperator::filter(RowTuple &tuple, bool &result) for (unique_ptr &expr : predicates_) { rc = expr->get_value(tuple, value); if (rc != RC::SUCCESS) { + close(); return rc; } diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index e6a5342e..a3a23a04 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -181,24 +181,8 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrleft(); auto &right = comp_expr->right(); - const auto op = comp_expr->comp(); - // 处理合法子查询 - auto sub_right = dynamic_cast(right.get()); - if (sub_right != nullptr) { - if (op == IN_OP || op == NOT_IN_OP) { - - } else if (!sub_right->one_row_ret()) { - return RC::UNSUPPORTED; - } - } - auto sub_left = dynamic_cast(left.get()); - if (sub_left != nullptr) { - if (op == IN_OP || op == NOT_IN_OP) { - - } else if (!sub_left->one_row_ret()) { - return RC::UNSUPPORTED; - } - } + if (!(right->type() == ExprType::EXPRLIST && (comp_expr->comp() == IN_OP || comp_expr->comp() == NOT_IN_OP))) + return RC::UNSUPPORTED; if (left->value_type() != right->value_type()) { auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index aee3cf4d..ebd2520c 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -131,24 +131,43 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u // 看看是否有可以用于索引查找的表达式 Table *table = table_get_oper.table(); - auto process_subquery = [](Expression* expr) { + auto process_subquery = [](Expression *expr) { if (expr->type() == ExprType::SUBQUERY) { - SubQueryExpr* sub_query_expr = static_cast(expr); + SubQueryExpr *sub_query_expr = static_cast(expr); sub_query_expr->generate_physical_oper(); } - return RC::SUCCESS; + return RC::SUCCESS; }; Index *index = nullptr; ValueExpr *value_expr = nullptr; for (auto &expr : predicates) { - //先执行子查询 + // 先执行子查询 if (RC rc = expr->traverse_check(process_subquery); RC::SUCCESS != rc) { return rc; } if (expr->type() == ExprType::COMPARISON) { auto comparison_expr = static_cast(expr.get()); + + // 子查询合法化 + if (comparison_expr->comp() == IN_OP || comparison_expr->comp() == NOT_IN_OP) { + continue; + } else { + auto get_subquery_expr = [](const std::unique_ptr &expr) -> SubQueryExpr * { + return expr->type() == ExprType::SUBQUERY ? dynamic_cast(expr.get()) : nullptr; + }; + // 检查左侧和右侧是否为子查询表达式 + SubQueryExpr *left_subquery_expr = get_subquery_expr(comparison_expr->left()); + if (left_subquery_expr != nullptr && !left_subquery_expr->one_row_ret()) { + return RC::UNSUPPORTED; + } + SubQueryExpr *right_subquery_expr = get_subquery_expr(comparison_expr->right()); + if (right_subquery_expr != nullptr && right_subquery_expr->one_row_ret()) { + return RC::UNSUPPORTED; + } + } + // 简单处理,就找等值查询 if (comparison_expr->comp() != EQUAL_TO) { continue; From dc0f46a0c609192ae064450188d22cbfdab6751b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Tue, 1 Oct 2024 18:38:27 +0000 Subject: [PATCH 088/308] =?UTF-8?q?=E6=84=9A=E8=A0=A2=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/optimizer/logical_plan_generator.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index a3a23a04..dd4712a4 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -181,8 +181,11 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrleft(); auto &right = comp_expr->right(); - if (!(right->type() == ExprType::EXPRLIST && (comp_expr->comp() == IN_OP || comp_expr->comp() == NOT_IN_OP))) - return RC::UNSUPPORTED; + if (right->type() == ExprType::EXPRLIST) { + if (comp_expr->comp() != IN_OP && comp_expr->comp() != NOT_IN_OP) { + return RC::UNSUPPORTED; + } + } if (left->value_type() != right->value_type()) { auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); From dadda91ef876fd647064c83fbd39f40c85582f12 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 2 Oct 2024 03:25:08 +0800 Subject: [PATCH 089/308] =?UTF-8?q?fix=20bug:=20field=5Fmetas=E7=9A=84?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E8=A2=AB=E5=BC=B9=E5=87=BA=E6=A0=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/stmt/create_index_stmt.cpp | 13 +++++-------- src/observer/storage/field/field_meta.h | 8 ++++---- src/observer/storage/table/table_meta.cpp | 18 ++++++++++++++++++ src/observer/storage/table/table_meta.h | 1 + 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/observer/sql/stmt/create_index_stmt.cpp b/src/observer/sql/stmt/create_index_stmt.cpp index 79d84311..289b12e3 100644 --- a/src/observer/sql/stmt/create_index_stmt.cpp +++ b/src/observer/sql/stmt/create_index_stmt.cpp @@ -40,14 +40,11 @@ RC CreateIndexStmt::create(Db *db, const CreateIndexSqlNode &create_index, Stmt } vector field_metas; - for (const auto& attribute_name : create_index.attribute_name) { - const FieldMeta *field_meta = table->table_meta().field(attribute_name.c_str()); - if (nullptr == field_meta) { - LOG_WARN("no such field in table. db=%s, table=%s, field name=%s", - db->name(), table_name, attribute_name.c_str()); - return RC::SCHEMA_FIELD_NOT_EXIST; - } - field_metas.emplace_back(*field_meta); + RC rc = table->table_meta().get_field_metas(create_index.attribute_name, field_metas); + if (OB_FAIL(rc)) { + LOG_WARN("no such field in table. db=%s, table=%s", + db->name(), table_name); + return rc; } Index *index = table->find_index(create_index.index_name.c_str()); diff --git a/src/observer/storage/field/field_meta.h b/src/observer/storage/field/field_meta.h index 007a8069..3c78d03d 100644 --- a/src/observer/storage/field/field_meta.h +++ b/src/observer/storage/field/field_meta.h @@ -31,13 +31,13 @@ class FieldMeta public: FieldMeta(); - FieldMeta(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, - bool nullable = false); + FieldMeta( + const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable); ~FieldMeta() = default; - RC init(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, - bool nullable = false); + RC init( + const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable); public: const char *name() const; diff --git a/src/observer/storage/table/table_meta.cpp b/src/observer/storage/table/table_meta.cpp index 07b57729..a7fad473 100644 --- a/src/observer/storage/table/table_meta.cpp +++ b/src/observer/storage/table/table_meta.cpp @@ -135,6 +135,24 @@ const FieldMeta *TableMeta::field(const char *name) const return nullptr; } +RC TableMeta::get_field_metas(const vector &fields, vector &result) const +{ + for (const auto &attribute_name : fields) { + FieldMeta field_meta; + for (const FieldMeta &field : fields_) { + if (0 == strcmp(field.name(), attribute_name.c_str())) { + field_meta = field; + break; + } + } + if (field_meta.len() == 0) { + return RC::SCHEMA_FIELD_NOT_EXIST; + } + result.emplace_back(field_meta); + } + return RC::SUCCESS; +} + const FieldMeta *TableMeta::find_field_by_offset(int offset) const { for (const FieldMeta &field : fields_) { diff --git a/src/observer/storage/table/table_meta.h b/src/observer/storage/table/table_meta.h index a13bde02..c05707f7 100644 --- a/src/observer/storage/table/table_meta.h +++ b/src/observer/storage/table/table_meta.h @@ -49,6 +49,7 @@ class TableMeta : public common::Serializable const FieldMeta *trx_field() const; const FieldMeta *field(int index) const; const FieldMeta *field(const char *name) const; + RC get_field_metas(const vector& fields, vector &result) const; const FieldMeta *find_field_by_offset(int offset) const; auto field_metas() const -> const std::vector *{ return &fields_; } auto trx_fields() const -> std::span; From 7cfdfb3d5d94669a4a929c3d614b53ad6089eb2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 2 Oct 2024 04:29:05 +0000 Subject: [PATCH 090/308] =?UTF-8?q?=E9=9D=9Ein=E7=9A=84=E5=AD=90=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=BF=94=E5=9B=9E=E5=80=BC=E5=8F=AF=E4=BB=A5=E4=B8=BA?= =?UTF-8?q?0=E6=88=961?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index e3244724..abbda81e 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -797,7 +797,7 @@ RC SubQueryExpr::generate_physical_oper() } return open(nullptr); } -bool SubQueryExpr::one_row_ret() const { return res_query.size() == 1; } +bool SubQueryExpr::one_row_ret() const { return res_query.size() <= 1; } // 子算子树的 open 和 close 逻辑由外部控制 RC SubQueryExpr::open(Trx *trx) From 1f9750cde7ef48c3d2edb0e1db9908a078b9fdd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 2 Oct 2024 04:38:02 +0000 Subject: [PATCH 091/308] =?UTF-8?q?=E9=9D=9Ein=E7=9A=84=E5=AD=90=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=BF=94=E5=9B=9E=E5=80=BC=E5=8F=AF=E4=BB=A5=E4=B8=BA?= =?UTF-8?q?0=E6=88=961?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/optimizer/physical_plan_generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index ebd2520c..99b48cc5 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -163,7 +163,7 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u return RC::UNSUPPORTED; } SubQueryExpr *right_subquery_expr = get_subquery_expr(comparison_expr->right()); - if (right_subquery_expr != nullptr && right_subquery_expr->one_row_ret()) { + if (right_subquery_expr != nullptr && !right_subquery_expr->one_row_ret()) { return RC::UNSUPPORTED; } } From d265048cd0154647450124ccd29700cb078eb10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 2 Oct 2024 05:47:31 +0000 Subject: [PATCH 092/308] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AD=90=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 80 ++++------------------------ 1 file changed, 11 insertions(+), 69 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index abbda81e..f194740b 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -209,67 +209,26 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { Value left_value; Value right_value; - - // 辅助函数:获取表达式值,处理子查询返回值 - auto get_expr_value = [&tuple](const std::unique_ptr &expr, Value &value) -> RC { - RC rc = expr->get_value(tuple, value); - if (expr->type() == ExprType::SUBQUERY && rc == RC::RECORD_EOF) { - value.set_null(true); - return RC::SUCCESS; - } - return rc; - }; - - // 辅助函数:检查表达式是否为子查询并返回类型转换后的指针 - auto get_subquery_expr = [](const std::unique_ptr &expr) -> SubQueryExpr * { - return expr->type() == ExprType::SUBQUERY ? dynamic_cast(expr.get()) : nullptr; - }; - - // 检查左侧和右侧是否为子查询表达式 - SubQueryExpr *left_subquery_expr = get_subquery_expr(left_); - SubQueryExpr *right_subquery_expr = get_subquery_expr(right_); - // 处理 EXISTS 和 NOT EXISTS 操作 if (comp_ == EXISTS_OP || comp_ == NOT_EXISTS_OP) { RC rc = right_->get_value(tuple, right_value); bool exists = (rc == RC::SUCCESS); value.set_boolean(comp_ == EXISTS_OP ? exists : !exists); - // 调用 right_subquery_expr->close() 确保资源释放 - if (right_subquery_expr) { - right_subquery_expr->close(); - } return exists ? RC::SUCCESS : RC::RECORD_EOF; } // 获取左值 - RC rc = get_expr_value(left_, left_value); - if (rc != RC::SUCCESS) { + RC rc = left_->get_value(tuple, left_value); + if (rc != RC::SUCCESS && !left_value.is_null()) { LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); - // 调用 left_subquery_expr->close() 确保资源释放 - if (left_subquery_expr) { - left_subquery_expr->close(); - } return rc; } - // 检查子查询是否有多行结果 - if (left_subquery_expr && left_subquery_expr->has_more_row()) { - left_subquery_expr->close(); // 关闭子查询 - return RC::INVALID_ARGUMENT; - } - // 处理 IN 和 NOT IN 操作 if (comp_ == IN_OP || comp_ == NOT_IN_OP) { - if (right_->type() == ExprType::EXPRLIST) { - static_cast(right_.get())->reset(); - } - if (left_value.is_null()) { value.set_boolean(false); - if (right_subquery_expr) { - right_subquery_expr->close(); // 关闭子查询 - } return RC::SUCCESS; } @@ -286,29 +245,17 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) bool result = (comp_ == IN_OP) ? has_match : (!has_null && !has_match); value.set_boolean(result); - // 调用 right_subquery_expr->close() 确保资源释放 - if (right_subquery_expr) { - right_subquery_expr->close(); - } + return (rc == RC::RECORD_EOF) ? RC::SUCCESS : rc; } // 获取右值 - rc = get_expr_value(right_, right_value); + rc = right_->get_value(tuple, right_value); if (rc != RC::SUCCESS) { LOG_WARN("failed to get value of right expression. rc=%s", strrc(rc)); - if (right_subquery_expr) { - right_subquery_expr->close(); - } return rc; } - // 检查右侧子查询是否有多行结果 - if (right_subquery_expr && right_subquery_expr->has_more_row()) { - right_subquery_expr->close(); - return RC::INVALID_ARGUMENT; - } - // 比较左值和右值 bool bool_value = false; rc = compare_value(left_value, right_value, bool_value); @@ -316,14 +263,6 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) value.set_boolean(bool_value); } - // 调用 left_subquery_expr 和 right_subquery_expr 的 close 确保资源释放 - if (left_subquery_expr) { - left_subquery_expr->close(); - } - if (right_subquery_expr) { - right_subquery_expr->close(); - } - return rc; } @@ -831,17 +770,20 @@ bool SubQueryExpr::has_more_row() const { return res_query.size() > 1; } RC SubQueryExpr::get_value(const Tuple &tuple, Value &value) { + if (res_query.empty()) { + value.set_null(true); + return RC::RECORD_EOF; + } if (visited_index == res_query.size()) { return RC::RECORD_EOF; } - value=res_query[visited_index++]; - return RC::SUCCESS; + value = res_query[visited_index++]; + return RC::SUCCESS; } RC SubQueryExpr::try_get_value(Value &value) const { return RC::UNIMPLEMENTED; } -ExprType SubQueryExpr::type() const { return ExprType::SUBQUERY; -} +ExprType SubQueryExpr::type() const { return ExprType::SUBQUERY; } AttrType SubQueryExpr::value_type() const { From 795c63d70bf54298d605ac287c17c13c7e83bda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 2 Oct 2024 06:10:44 +0000 Subject: [PATCH 093/308] =?UTF-8?q?=E5=BF=98=E8=AE=B0=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=EF=BC=8C=E5=92=8C=E5=AD=90=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 8 +++++++- src/observer/sql/expr/expression.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index f194740b..9c4b7dba 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -226,6 +226,12 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) // 处理 IN 和 NOT IN 操作 if (comp_ == IN_OP || comp_ == NOT_IN_OP) { + if (right_->type() == ExprType::EXPRLIST) { + dynamic_cast(right_.get())->reset(); + } + if (right_->type() == ExprType::SUBQUERY) { + dynamic_cast(right_.get())->reset(); + } if (left_value.is_null()) { value.set_boolean(false); @@ -760,7 +766,7 @@ RC SubQueryExpr::open(Trx *trx) return rc; } -RC SubQueryExpr::close() +RC SubQueryExpr::reset() { visited_index = 0; return RC::SUCCESS; diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index fda618d5..f4899dd4 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -629,7 +629,7 @@ class SubQueryExpr : public Expression virtual ~SubQueryExpr(); RC open(Trx *trx); - RC close(); + RC reset(); bool has_more_row() const; RC get_value(const Tuple &tuple, Value &value) override; From da1f4c2ec18d2acdc8e272c364f47b92dea60fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 2 Oct 2024 06:24:54 +0000 Subject: [PATCH 094/308] =?UTF-8?q?=E5=AD=90=E6=9F=A5=E8=AF=A2=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E4=BD=8D=E7=BD=AE=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 9c4b7dba..54db7730 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -223,15 +223,15 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); return rc; } - + //重置右值 + if (right_->type() == ExprType::SUBQUERY) { + dynamic_cast(right_.get())->reset(); + } // 处理 IN 和 NOT IN 操作 if (comp_ == IN_OP || comp_ == NOT_IN_OP) { if (right_->type() == ExprType::EXPRLIST) { dynamic_cast(right_.get())->reset(); } - if (right_->type() == ExprType::SUBQUERY) { - dynamic_cast(right_.get())->reset(); - } if (left_value.is_null()) { value.set_boolean(false); From cd753764049a5b37690bbaaa518323dbe75772f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 2 Oct 2024 06:49:14 +0000 Subject: [PATCH 095/308] =?UTF-8?q?=E6=96=B0=E5=A2=9Ereset=E6=96=B9?= =?UTF-8?q?=E4=BE=BF=E7=AE=A1=E7=90=86expr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 19 +++++-------------- src/observer/sql/expr/expression.h | 7 ++++--- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 54db7730..fdea85e3 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -209,13 +209,10 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { Value left_value; Value right_value; - // 处理 EXISTS 和 NOT EXISTS 操作 - if (comp_ == EXISTS_OP || comp_ == NOT_EXISTS_OP) { - RC rc = right_->get_value(tuple, right_value); - bool exists = (rc == RC::SUCCESS); - value.set_boolean(comp_ == EXISTS_OP ? exists : !exists); - return exists ? RC::SUCCESS : RC::RECORD_EOF; - } + + // 重置 + left_->reset(); + right_->reset(); // 获取左值 RC rc = left_->get_value(tuple, left_value); @@ -223,15 +220,9 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); return rc; } - //重置右值 - if (right_->type() == ExprType::SUBQUERY) { - dynamic_cast(right_.get())->reset(); - } + // 处理 IN 和 NOT IN 操作 if (comp_ == IN_OP || comp_ == NOT_IN_OP) { - if (right_->type() == ExprType::EXPRLIST) { - dynamic_cast(right_.get())->reset(); - } if (left_value.is_null()) { value.set_boolean(false); diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index f4899dd4..51aa1f61 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -143,7 +143,7 @@ class Expression // 后序遍历 检查 virtual RC traverse_check(const std::function &check_func) { return check_func(this); } - // + virtual RC reset() { return RC::SUCCESS; } protected: /** @@ -629,7 +629,7 @@ class SubQueryExpr : public Expression virtual ~SubQueryExpr(); RC open(Trx *trx); - RC reset(); + RC reset() override; bool has_more_row() const; RC get_value(const Tuple &tuple, Value &value) override; @@ -670,9 +670,10 @@ class ListExpr : public Expression explicit ListExpr(std::vector>&& exprs) : exprs_(std::move(exprs)) {} virtual ~ListExpr() = default; - void reset() noexcept + RC reset() override { cur_idx_ = 0; + return RC::SUCCESS; } RC get_value(const Tuple &tuple, Value &value) override From d8665b5e43681fec230ad75788887129ee6c51b9 Mon Sep 17 00:00:00 2001 From: Koschei Date: Wed, 2 Oct 2024 17:09:30 +0800 Subject: [PATCH 096/308] style: clang format codes --- src/observer/sql/expr/expression.cpp | 10 +- src/observer/sql/expr/expression.h | 57 +- .../sql/optimizer/logical_plan_generator.h | 2 +- .../sql/optimizer/physical_plan_generator.cpp | 2 +- .../sql/optimizer/physical_plan_generator.h | 2 +- src/observer/sql/parser/expression_binder.cpp | 10 +- src/observer/sql/parser/expression_binder.h | 7 +- src/observer/sql/parser/lex_sql.cpp | 5348 +++++++++++------ src/observer/sql/parser/lex_sql.h | 244 +- src/observer/sql/parser/parse_defs.h | 2 +- src/observer/sql/parser/yacc_sql.cpp | 4580 +++++++++----- src/observer/sql/parser/yacc_sql.hpp | 215 +- src/observer/sql/stmt/filter_stmt.cpp | 1 - src/observer/sql/stmt/filter_stmt.h | 2 +- src/observer/sql/stmt/select_stmt.cpp | 2 +- src/observer/sql/stmt/select_stmt.h | 2 +- 16 files changed, 7006 insertions(+), 3480 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index b47a8f52..583d9259 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -788,15 +788,9 @@ RC SubQueryExpr::try_get_value(Value &value) const { return RC::UNIMPLEMENTED; } ExprType SubQueryExpr::type() const { return ExprType::SUBQUERY; } -AttrType SubQueryExpr::value_type() const -{ - return AttrType::UNDEFINED; -} +AttrType SubQueryExpr::value_type() const { return AttrType::UNDEFINED; } -std::unique_ptr SubQueryExpr::deep_copy() const -{ - return {}; -} +std::unique_ptr SubQueryExpr::deep_copy() const { return {}; } ListExpr::ListExpr(std::vector &&exprs) { diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 5d6fc9eb..4311b585 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -71,7 +71,7 @@ enum class ExprType class Expression { public: - Expression() = default; + Expression() = default; virtual ~Expression() = default; /** @@ -164,9 +164,9 @@ class Expression class StarExpr : public Expression { public: - StarExpr() : table_name_() {} + StarExpr() : table_name_() {} explicit StarExpr(const char *table_name) : table_name_(table_name) {} - ~ StarExpr() override = default; + ~StarExpr() override = default; ExprType type() const override { return ExprType::STAR; } AttrType value_type() const override { return AttrType::UNDEFINED; } @@ -208,8 +208,8 @@ class UnboundFieldExpr : public Expression class FieldExpr : public Expression { public: - FieldExpr() = default; - FieldExpr(const Table *table, const FieldMeta *field) : field_(table, field) {} + FieldExpr() = default; + FieldExpr(const Table *table, const FieldMeta *field) : field_(table, field) {} explicit FieldExpr(const Field &field) : field_(field) {} virtual ~FieldExpr() = default; @@ -242,7 +242,7 @@ class FieldExpr : public Expression class ValueExpr : public Expression { public: - ValueExpr() = default; + ValueExpr() = default; explicit ValueExpr(const Value &value) : value_(value) {} ~ValueExpr() override = default; @@ -275,7 +275,7 @@ class ValueExpr : public Expression class CastExpr : public Expression { public: - CastExpr(std::unique_ptr child, AttrType cast_type); + CastExpr(std::unique_ptr child, AttrType cast_type); virtual ~CastExpr(); ExprType type() const override { return ExprType::CAST; } @@ -321,8 +321,8 @@ class CastExpr : public Expression class ComparisonExpr : public Expression { public: - ComparisonExpr(CompOp comp, Expression *left, Expression *right); - ComparisonExpr(CompOp comp, std::unique_ptr left, std::unique_ptr right); + ComparisonExpr(CompOp comp, Expression *left, Expression *right); + ComparisonExpr(CompOp comp, std::unique_ptr left, std::unique_ptr right); virtual ~ComparisonExpr(); ExprType type() const override { return ExprType::COMPARISON; } @@ -407,9 +407,9 @@ class ConjunctionExpr : public Expression }; public: - ConjunctionExpr(Type type, std::vector> &children); - ConjunctionExpr(Type type, std::unique_ptr children); - ConjunctionExpr(Type type, Expression *left, Expression *right); + ConjunctionExpr(Type type, std::vector> &children); + ConjunctionExpr(Type type, std::unique_ptr children); + ConjunctionExpr(Type type, Expression *left, Expression *right); ~ConjunctionExpr() override = default; ExprType type() const override { return ExprType::CONJUNCTION; } @@ -466,8 +466,8 @@ class ArithmeticExpr : public Expression }; public: - ArithmeticExpr(Type type, Expression *left, Expression *right); - ArithmeticExpr(Type type, std::unique_ptr left, std::unique_ptr right); + ArithmeticExpr(Type type, Expression *left, Expression *right); + ArithmeticExpr(Type type, std::unique_ptr left, std::unique_ptr right); virtual ~ArithmeticExpr() = default; bool equal(const Expression &other) const override; @@ -540,8 +540,8 @@ class ArithmeticExpr : public Expression class UnboundAggregateExpr : public Expression { public: - UnboundAggregateExpr(const char *aggregate_name, Expression *child); - UnboundAggregateExpr(const char *aggregate_name, std::unique_ptr child); + UnboundAggregateExpr(const char *aggregate_name, Expression *child); + UnboundAggregateExpr(const char *aggregate_name, std::unique_ptr child); virtual ~UnboundAggregateExpr() = default; ExprType type() const override { return ExprType::UNBOUND_AGGREGATION; } @@ -571,8 +571,8 @@ class AggregateExpr : public Expression }; public: - AggregateExpr(Type type, Expression *child); - AggregateExpr(Type type, std::unique_ptr child); + AggregateExpr(Type type, Expression *child); + AggregateExpr(Type type, std::unique_ptr child); virtual ~AggregateExpr() = default; bool equal(const Expression &other) const override; @@ -657,15 +657,15 @@ class SubQueryExpr : public Expression std::unique_ptr physical_oper_; std::vector res_query; - bool res_query_avaliable = false; - size_t visited_index = 0; + bool res_query_avaliable = false; + size_t visited_index = 0; }; class ListExpr : public Expression { public: - explicit ListExpr(std::vector&& exprs); - explicit ListExpr(std::vector>&& exprs) : exprs_(std::move(exprs)) {} + explicit ListExpr(std::vector &&exprs); + explicit ListExpr(std::vector> &&exprs) : exprs_(std::move(exprs)) {} virtual ~ListExpr() = default; RC reset() override @@ -689,24 +689,21 @@ class ListExpr : public Expression AttrType value_type() const override { return AttrType::UNDEFINED; } // 通过引用传递std::function避免拷贝 - void traverse(const std::function& func, const std::function& filter) override + void traverse(const std::function &func, const std::function &filter) override { if (filter(this)) { - for (auto& expr : exprs_) { + for (auto &expr : exprs_) { expr->traverse(func, filter); } func(this); } } - RC traverse_check(const std::function& check_func) override - { - return RC::SUCCESS; - } + RC traverse_check(const std::function &check_func) override { return RC::SUCCESS; } - std::vector>& get_list(){return exprs_;} + std::vector> &get_list() { return exprs_; } private: - size_t cur_idx_ = 0; + size_t cur_idx_ = 0; std::vector> exprs_; }; diff --git a/src/observer/sql/optimizer/logical_plan_generator.h b/src/observer/sql/optimizer/logical_plan_generator.h index 8a47bb2b..3ea73ca3 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.h +++ b/src/observer/sql/optimizer/logical_plan_generator.h @@ -46,7 +46,7 @@ class LogicalPlanGenerator static RC create_plan(UpdateStmt *update_stmt, std::unique_ptr &logical_operator); static RC create_plan(ExplainStmt *explain_stmt, std::unique_ptr &logical_operator); - static RC create_group_by_plan(SelectStmt *select_stmt, std::unique_ptr &logical_operator); + static RC create_group_by_plan(SelectStmt *select_stmt, std::unique_ptr &logical_operator); static int implicit_cast_cost(AttrType from, AttrType to); }; diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index 131e7d48..2ab627aa 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -136,7 +136,7 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u SubQueryExpr *sub_query_expr = static_cast(expr); sub_query_expr->generate_physical_oper(); } - return RC::SUCCESS; + return RC::SUCCESS; }; Index *index = nullptr; diff --git a/src/observer/sql/optimizer/physical_plan_generator.h b/src/observer/sql/optimizer/physical_plan_generator.h index 59c039e2..e13755a5 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.h +++ b/src/observer/sql/optimizer/physical_plan_generator.h @@ -38,7 +38,7 @@ class GroupByLogicalOperator; class PhysicalPlanGenerator { public: - PhysicalPlanGenerator() = default; + PhysicalPlanGenerator() = default; virtual ~PhysicalPlanGenerator() = default; static RC create(LogicalOperator &logical_operator, std::unique_ptr &oper); diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index f8cfb286..8e3586dc 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -547,14 +547,12 @@ RC ExpressionBinder::bind_exprlist_expression( auto list_expr = dynamic_cast(expr.get()); vector> child_bound_expressions; for (auto &child_expr : list_expr->get_list()) { - if (child_expr->type()!=ExprType::VALUE) { + if (child_expr->type() != ExprType::VALUE) { LOG_WARN("invalid children type of LIST expression: %d", child_bound_expressions.size()); return RC::INVALID_ARGUMENT; } + } -} - -bound_expressions.emplace_back(std::move(expr)); -return rc; - + bound_expressions.emplace_back(std::move(expr)); + return rc; } diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index 2b22a6fc..f5fe0d73 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -36,7 +36,7 @@ class BinderContext const std::vector
&query_tables() const { return query_tables_; } std::unordered_map &table_map() { return *tables_; } - bool only_one_table (); + bool only_one_table(); private: Db *db_; @@ -78,8 +78,9 @@ class ExpressionBinder std::unique_ptr &aggregate_expr, std::vector> &bound_expressions); RC bind_subquery_expression( std::unique_ptr &expr, std::vector> &bound_expressions); - RC bind_exprlist_expression( - std::unique_ptr &expr, std::vector> &bound_expressions); + RC bind_exprlist_expression( + std::unique_ptr &expr, std::vector> &bound_expressions); + private: bool multi_tables_; BinderContext &context_; diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 5ba8ec31..b2e14d17 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,23 +8,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -77,62 +75,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -156,12 +154,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -189,7 +187,7 @@ typedef void* yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_NEW_FILE yyrestart(yyin, yyscanner) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -207,7 +205,7 @@ typedef void* yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -222,88 +220,85 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - + +#define YY_LESS_LINENO(n) +#define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } while (0) +#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - - }; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -312,59 +307,55 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) +#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner); +static void yy_load_buffer_state(yyscan_t yyscanner); +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -372,305 +363,2322 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state(yyscan_t yyscanner); +static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); +static int yy_get_next_buffer(yyscan_t yyscanner); +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t)(yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 75 #define YY_END_OF_BUFFER 76 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[214] = - { 0, - 0, 0, 0, 0, 76, 74, 1, 2, 74, 74, - 74, 54, 55, 70, 68, 56, 69, 6, 71, 3, - 5, 61, 57, 63, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 75, 60, 0, 72, 0, 73, - 3, 0, 58, 59, 62, 67, 67, 67, 46, 67, - 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 48, 65, 67, 67, 67, 67, - 67, 15, 23, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 4, 22, 47, 67, 67, 67, 67, 67, - - 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 33, 67, 67, 67, 64, - 67, 67, 67, 67, 29, 67, 67, 67, 67, 67, - 67, 67, 67, 19, 34, 67, 67, 40, 36, 67, - 9, 11, 67, 7, 67, 67, 67, 20, 67, 8, - 67, 67, 67, 67, 25, 53, 66, 39, 37, 67, - 67, 67, 16, 67, 17, 67, 67, 67, 67, 30, - 67, 67, 67, 67, 67, 35, 67, 43, 14, 67, - 52, 67, 67, 44, 67, 67, 67, 12, 67, 67, - 21, 31, 10, 27, 49, 67, 51, 41, 24, 67, - - 67, 18, 67, 13, 28, 26, 42, 67, 67, 50, - 38, 32, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, - 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 36, - 1, 1, 1, 1, 36, 1, 45, 46, 47, 48, - - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 36, 61, 62, 63, 64, 65, 66, 67, - 68, 36, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[69] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2 - } ; - -static const flex_int16_t yy_base[219] = - { 0, - 0, 0, 0, 0, 575, 576, 576, 576, 556, 568, - 566, 576, 576, 576, 576, 576, 556, 576, 576, 56, - 576, 54, 576, 552, 55, 59, 60, 61, 64, 89, - 63, 62, 76, 81, 547, 101, 103, 118, 110, 134, - 121, 117, 127, 138, 576, 576, 556, 576, 554, 576, - 69, 544, 576, 576, 576, 0, 543, 141, 124, 142, - 542, 144, 165, 155, 167, 159, 173, 169, 166, 180, - 181, 190, 191, 177, 236, 541, 192, 200, 212, 184, - 206, 539, 223, 221, 225, 219, 226, 233, 255, 257, - 248, 243, 538, 534, 532, 267, 268, 228, 278, 282, - - 288, 272, 285, 291, 301, 294, 298, 296, 299, 302, - 309, 321, 319, 331, 333, 315, 326, 337, 339, 531, - 345, 343, 350, 353, 530, 202, 356, 363, 358, 368, - 360, 375, 364, 528, 527, 376, 379, 526, 524, 380, - 521, 520, 381, 519, 383, 384, 396, 518, 390, 517, - 392, 400, 393, 411, 516, 513, 491, 489, 412, 418, - 419, 423, 488, 431, 486, 434, 422, 438, 445, 437, - 449, 451, 453, 448, 452, 424, 456, 406, 394, 458, - 323, 459, 463, 314, 476, 474, 466, 478, 475, 482, - 308, 307, 304, 258, 239, 493, 216, 198, 194, 496, - - 503, 148, 499, 115, 113, 87, 86, 514, 500, 84, - 80, 77, 576, 563, 565, 567, 88, 87 - } ; - -static const flex_int16_t yy_def[219] = - { 0, - 213, 1, 214, 214, 213, 213, 213, 213, 213, 215, - 216, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 213, 213, 215, 213, 216, 213, - 213, 213, 213, 213, 213, 218, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 213, 217, 217, 217, 217, 217, 217, 217, - - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 0, 213, 213, 213, 213, 213 - } ; - -static const flex_int16_t yy_nxt[645] = - { 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, - 43, 44, 35, 35, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 35, 37, 38, 35, - 39, 40, 41, 42, 43, 44, 35, 35, 52, 56, - 51, 53, 54, 56, 56, 56, 56, 56, 56, 62, - 66, 52, 60, 51, 67, 74, 63, 58, 56, 57, - 56, 56, 59, 64, 56, 56, 65, 68, 56, 73, - - 56, 56, 61, 56, 62, 66, 69, 60, 75, 67, - 74, 63, 58, 76, 77, 56, 59, 56, 64, 70, - 65, 68, 71, 73, 56, 72, 61, 56, 78, 56, - 69, 56, 56, 75, 79, 56, 80, 76, 56, 77, - 89, 56, 81, 84, 70, 95, 91, 71, 56, 72, - 82, 90, 56, 78, 83, 56, 56, 85, 56, 79, - 86, 80, 56, 94, 92, 89, 81, 96, 84, 56, - 95, 91, 87, 56, 97, 82, 90, 88, 83, 56, - 56, 56, 85, 56, 98, 86, 99, 56, 94, 92, - 100, 56, 96, 105, 56, 56, 87, 101, 56, 97, - - 106, 88, 104, 102, 56, 56, 56, 111, 56, 98, - 103, 99, 56, 107, 56, 100, 56, 108, 105, 117, - 56, 101, 120, 109, 110, 106, 56, 104, 102, 118, - 56, 119, 111, 56, 103, 56, 121, 56, 107, 56, - 56, 108, 56, 163, 117, 122, 120, 56, 109, 110, - 56, 123, 126, 56, 118, 124, 119, 56, 112, 127, - 113, 121, 56, 125, 135, 128, 132, 163, 114, 56, - 122, 56, 56, 115, 116, 129, 123, 126, 131, 130, - 124, 56, 56, 112, 127, 113, 56, 125, 135, 134, - 128, 132, 56, 114, 133, 140, 56, 115, 116, 56, - - 129, 137, 56, 131, 130, 56, 141, 138, 56, 136, - 56, 139, 56, 56, 134, 56, 56, 146, 56, 133, - 140, 56, 56, 56, 145, 142, 137, 147, 56, 56, - 148, 141, 138, 56, 136, 56, 139, 56, 143, 144, - 56, 149, 146, 150, 151, 56, 152, 56, 155, 145, - 142, 56, 147, 56, 153, 148, 154, 56, 156, 56, - 157, 158, 143, 144, 56, 149, 160, 56, 150, 151, - 56, 152, 56, 155, 56, 159, 162, 56, 56, 153, - 161, 154, 56, 156, 165, 157, 158, 167, 166, 56, - 56, 160, 164, 56, 56, 56, 170, 56, 56, 168, - - 159, 162, 175, 171, 56, 161, 56, 56, 56, 165, - 56, 169, 167, 166, 56, 177, 164, 172, 173, 174, - 56, 170, 176, 168, 178, 56, 56, 175, 171, 181, - 180, 183, 56, 56, 179, 169, 56, 56, 56, 185, - 177, 172, 173, 174, 186, 56, 176, 182, 56, 178, - 187, 56, 56, 181, 184, 180, 183, 188, 179, 56, - 189, 190, 56, 56, 185, 56, 56, 56, 191, 186, - 56, 182, 56, 56, 193, 187, 194, 56, 184, 196, - 56, 198, 188, 200, 189, 195, 190, 192, 56, 56, - 56, 203, 56, 191, 197, 201, 56, 199, 205, 193, - - 56, 194, 56, 56, 196, 56, 198, 56, 200, 195, - 56, 192, 202, 56, 56, 204, 203, 56, 197, 206, - 201, 199, 210, 205, 209, 207, 208, 56, 56, 212, - 56, 56, 56, 56, 56, 56, 202, 211, 56, 204, - 56, 56, 56, 206, 56, 56, 56, 210, 56, 209, - 207, 208, 93, 56, 212, 56, 56, 56, 93, 50, - 48, 56, 211, 45, 45, 47, 47, 49, 49, 55, - 51, 50, 48, 46, 213, 5, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213 - } ; - -static const flex_int16_t yy_chk[645] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, - 20, 22, 22, 26, 27, 28, 32, 31, 29, 27, - 28, 51, 26, 51, 28, 32, 27, 25, 218, 217, - 33, 212, 25, 27, 211, 34, 27, 28, 210, 31, - - 207, 206, 26, 30, 27, 28, 29, 26, 33, 28, - 32, 27, 25, 33, 34, 36, 25, 37, 27, 30, - 27, 28, 30, 31, 39, 30, 26, 205, 36, 204, - 29, 42, 38, 33, 36, 41, 37, 33, 59, 34, - 41, 43, 37, 39, 30, 59, 43, 30, 40, 30, - 38, 42, 44, 36, 38, 58, 60, 40, 62, 36, - 40, 37, 202, 58, 44, 41, 37, 60, 39, 64, - 59, 43, 40, 66, 62, 38, 42, 40, 38, 63, - 69, 65, 40, 68, 63, 40, 64, 67, 58, 44, - 65, 74, 60, 69, 70, 71, 40, 66, 80, 62, - - 69, 40, 68, 67, 72, 73, 77, 74, 199, 63, - 67, 64, 198, 70, 78, 65, 126, 71, 69, 77, - 81, 66, 80, 72, 73, 69, 79, 68, 67, 78, - 197, 79, 74, 86, 67, 84, 81, 83, 70, 85, - 87, 71, 98, 126, 77, 83, 80, 88, 72, 73, - 75, 84, 86, 195, 78, 85, 79, 92, 75, 87, - 75, 81, 91, 85, 98, 88, 92, 126, 75, 89, - 83, 90, 194, 75, 75, 89, 84, 86, 91, 90, - 85, 96, 97, 75, 87, 75, 102, 85, 98, 97, - 88, 92, 99, 75, 96, 102, 100, 75, 75, 103, - - 89, 100, 101, 91, 90, 104, 103, 101, 106, 99, - 108, 101, 107, 109, 97, 105, 110, 107, 193, 96, - 102, 192, 191, 111, 106, 104, 100, 108, 184, 116, - 109, 103, 101, 113, 99, 112, 101, 181, 105, 105, - 117, 110, 107, 111, 112, 114, 113, 115, 116, 106, - 104, 118, 108, 119, 114, 109, 115, 122, 117, 121, - 118, 119, 105, 105, 123, 110, 122, 124, 111, 112, - 127, 113, 129, 116, 131, 121, 124, 128, 133, 114, - 123, 115, 130, 117, 128, 118, 119, 130, 129, 132, - 136, 122, 127, 137, 140, 143, 133, 145, 146, 131, - - 121, 124, 145, 136, 149, 123, 151, 153, 179, 128, - 147, 132, 130, 129, 152, 147, 127, 137, 140, 143, - 178, 133, 146, 131, 149, 154, 159, 145, 136, 153, - 152, 159, 160, 161, 151, 132, 167, 162, 176, 161, - 147, 137, 140, 143, 162, 164, 146, 154, 166, 149, - 164, 170, 168, 153, 160, 152, 159, 166, 151, 169, - 167, 168, 174, 171, 161, 172, 175, 173, 169, 162, - 177, 154, 180, 182, 172, 164, 173, 183, 160, 175, - 187, 180, 166, 183, 167, 174, 168, 171, 186, 189, - 185, 187, 188, 169, 177, 185, 190, 182, 189, 172, - - 165, 173, 163, 158, 175, 157, 180, 196, 183, 174, - 200, 171, 186, 203, 209, 188, 187, 201, 177, 190, - 185, 182, 203, 189, 201, 196, 200, 156, 208, 209, - 155, 150, 148, 144, 142, 141, 186, 208, 139, 188, - 138, 135, 134, 190, 125, 120, 95, 203, 94, 201, - 196, 200, 93, 82, 209, 76, 61, 57, 52, 49, - 47, 35, 208, 214, 214, 215, 215, 216, 216, 24, - 17, 11, 10, 9, 5, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213 - } ; +{ + flex_int32_t yy_verify; + flex_int32_t yy_nxt; +}; +static const flex_int16_t yy_accept[214] = {0, + 0, + 0, + 0, + 0, + 76, + 74, + 1, + 2, + 74, + 74, + 74, + 54, + 55, + 70, + 68, + 56, + 69, + 6, + 71, + 3, + 5, + 61, + 57, + 63, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 75, + 60, + 0, + 72, + 0, + 73, + 3, + 0, + 58, + 59, + 62, + 67, + 67, + 67, + 46, + 67, + 45, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 48, + 65, + 67, + 67, + 67, + 67, + 67, + 15, + 23, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 4, + 22, + 47, + 67, + 67, + 67, + 67, + 67, + + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 33, + 67, + 67, + 67, + 64, + 67, + 67, + 67, + 67, + 29, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 67, + 19, + 34, + 67, + 67, + 40, + 36, + 67, + 9, + 11, + 67, + 7, + 67, + 67, + 67, + 20, + 67, + 8, + 67, + 67, + 67, + 67, + 25, + 53, + 66, + 39, + 37, + 67, + 67, + 67, + 16, + 67, + 17, + 67, + 67, + 67, + 67, + 30, + 67, + 67, + 67, + 67, + 67, + 35, + 67, + 43, + 14, + 67, + 52, + 67, + 67, + 44, + 67, + 67, + 67, + 12, + 67, + 67, + 21, + 31, + 10, + 27, + 49, + 67, + 51, + 41, + 24, + 67, + + 67, + 18, + 67, + 13, + 28, + 26, + 42, + 67, + 67, + 50, + 38, + 32, + 0}; + +static const YY_CHAR yy_ec[256] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 3, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 4, + 5, + 1, + 1, + 1, + 1, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 1, + 16, + 17, + 18, + 19, + 1, + 1, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 36, + 1, + 1, + 1, + 1, + 36, + 1, + 45, + 46, + 47, + 48, + + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 36, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 36, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1}; + +static const YY_CHAR yy_meta[69] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2}; + +static const flex_int16_t yy_base[219] = {0, + 0, + 0, + 0, + 0, + 575, + 576, + 576, + 576, + 556, + 568, + 566, + 576, + 576, + 576, + 576, + 576, + 556, + 576, + 576, + 56, + 576, + 54, + 576, + 552, + 55, + 59, + 60, + 61, + 64, + 89, + 63, + 62, + 76, + 81, + 547, + 101, + 103, + 118, + 110, + 134, + 121, + 117, + 127, + 138, + 576, + 576, + 556, + 576, + 554, + 576, + 69, + 544, + 576, + 576, + 576, + 0, + 543, + 141, + 124, + 142, + 542, + 144, + 165, + 155, + 167, + 159, + 173, + 169, + 166, + 180, + 181, + 190, + 191, + 177, + 236, + 541, + 192, + 200, + 212, + 184, + 206, + 539, + 223, + 221, + 225, + 219, + 226, + 233, + 255, + 257, + 248, + 243, + 538, + 534, + 532, + 267, + 268, + 228, + 278, + 282, + + 288, + 272, + 285, + 291, + 301, + 294, + 298, + 296, + 299, + 302, + 309, + 321, + 319, + 331, + 333, + 315, + 326, + 337, + 339, + 531, + 345, + 343, + 350, + 353, + 530, + 202, + 356, + 363, + 358, + 368, + 360, + 375, + 364, + 528, + 527, + 376, + 379, + 526, + 524, + 380, + 521, + 520, + 381, + 519, + 383, + 384, + 396, + 518, + 390, + 517, + 392, + 400, + 393, + 411, + 516, + 513, + 491, + 489, + 412, + 418, + 419, + 423, + 488, + 431, + 486, + 434, + 422, + 438, + 445, + 437, + 449, + 451, + 453, + 448, + 452, + 424, + 456, + 406, + 394, + 458, + 323, + 459, + 463, + 314, + 476, + 474, + 466, + 478, + 475, + 482, + 308, + 307, + 304, + 258, + 239, + 493, + 216, + 198, + 194, + 496, + + 503, + 148, + 499, + 115, + 113, + 87, + 86, + 514, + 500, + 84, + 80, + 77, + 576, + 563, + 565, + 567, + 88, + 87}; + +static const flex_int16_t yy_def[219] = {0, + 213, + 1, + 214, + 214, + 213, + 213, + 213, + 213, + 213, + 215, + 216, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 213, + 213, + 215, + 213, + 216, + 213, + 213, + 213, + 213, + 213, + 213, + 218, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 213, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 217, + 0, + 213, + 213, + 213, + 213, + 213}; + +static const flex_int16_t yy_nxt[645] = {0, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 52, + 56, + 51, + 53, + 54, + 56, + 56, + 56, + 56, + 56, + 56, + 62, + 66, + 52, + 60, + 51, + 67, + 74, + 63, + 58, + 56, + 57, + 56, + 56, + 59, + 64, + 56, + 56, + 65, + 68, + 56, + 73, + + 56, + 56, + 61, + 56, + 62, + 66, + 69, + 60, + 75, + 67, + 74, + 63, + 58, + 76, + 77, + 56, + 59, + 56, + 64, + 70, + 65, + 68, + 71, + 73, + 56, + 72, + 61, + 56, + 78, + 56, + 69, + 56, + 56, + 75, + 79, + 56, + 80, + 76, + 56, + 77, + 89, + 56, + 81, + 84, + 70, + 95, + 91, + 71, + 56, + 72, + 82, + 90, + 56, + 78, + 83, + 56, + 56, + 85, + 56, + 79, + 86, + 80, + 56, + 94, + 92, + 89, + 81, + 96, + 84, + 56, + 95, + 91, + 87, + 56, + 97, + 82, + 90, + 88, + 83, + 56, + 56, + 56, + 85, + 56, + 98, + 86, + 99, + 56, + 94, + 92, + 100, + 56, + 96, + 105, + 56, + 56, + 87, + 101, + 56, + 97, + + 106, + 88, + 104, + 102, + 56, + 56, + 56, + 111, + 56, + 98, + 103, + 99, + 56, + 107, + 56, + 100, + 56, + 108, + 105, + 117, + 56, + 101, + 120, + 109, + 110, + 106, + 56, + 104, + 102, + 118, + 56, + 119, + 111, + 56, + 103, + 56, + 121, + 56, + 107, + 56, + 56, + 108, + 56, + 163, + 117, + 122, + 120, + 56, + 109, + 110, + 56, + 123, + 126, + 56, + 118, + 124, + 119, + 56, + 112, + 127, + 113, + 121, + 56, + 125, + 135, + 128, + 132, + 163, + 114, + 56, + 122, + 56, + 56, + 115, + 116, + 129, + 123, + 126, + 131, + 130, + 124, + 56, + 56, + 112, + 127, + 113, + 56, + 125, + 135, + 134, + 128, + 132, + 56, + 114, + 133, + 140, + 56, + 115, + 116, + 56, + + 129, + 137, + 56, + 131, + 130, + 56, + 141, + 138, + 56, + 136, + 56, + 139, + 56, + 56, + 134, + 56, + 56, + 146, + 56, + 133, + 140, + 56, + 56, + 56, + 145, + 142, + 137, + 147, + 56, + 56, + 148, + 141, + 138, + 56, + 136, + 56, + 139, + 56, + 143, + 144, + 56, + 149, + 146, + 150, + 151, + 56, + 152, + 56, + 155, + 145, + 142, + 56, + 147, + 56, + 153, + 148, + 154, + 56, + 156, + 56, + 157, + 158, + 143, + 144, + 56, + 149, + 160, + 56, + 150, + 151, + 56, + 152, + 56, + 155, + 56, + 159, + 162, + 56, + 56, + 153, + 161, + 154, + 56, + 156, + 165, + 157, + 158, + 167, + 166, + 56, + 56, + 160, + 164, + 56, + 56, + 56, + 170, + 56, + 56, + 168, + + 159, + 162, + 175, + 171, + 56, + 161, + 56, + 56, + 56, + 165, + 56, + 169, + 167, + 166, + 56, + 177, + 164, + 172, + 173, + 174, + 56, + 170, + 176, + 168, + 178, + 56, + 56, + 175, + 171, + 181, + 180, + 183, + 56, + 56, + 179, + 169, + 56, + 56, + 56, + 185, + 177, + 172, + 173, + 174, + 186, + 56, + 176, + 182, + 56, + 178, + 187, + 56, + 56, + 181, + 184, + 180, + 183, + 188, + 179, + 56, + 189, + 190, + 56, + 56, + 185, + 56, + 56, + 56, + 191, + 186, + 56, + 182, + 56, + 56, + 193, + 187, + 194, + 56, + 184, + 196, + 56, + 198, + 188, + 200, + 189, + 195, + 190, + 192, + 56, + 56, + 56, + 203, + 56, + 191, + 197, + 201, + 56, + 199, + 205, + 193, + + 56, + 194, + 56, + 56, + 196, + 56, + 198, + 56, + 200, + 195, + 56, + 192, + 202, + 56, + 56, + 204, + 203, + 56, + 197, + 206, + 201, + 199, + 210, + 205, + 209, + 207, + 208, + 56, + 56, + 212, + 56, + 56, + 56, + 56, + 56, + 56, + 202, + 211, + 56, + 204, + 56, + 56, + 56, + 206, + 56, + 56, + 56, + 210, + 56, + 209, + 207, + 208, + 93, + 56, + 212, + 56, + 56, + 56, + 93, + 50, + 48, + 56, + 211, + 45, + 45, + 47, + 47, + 49, + 49, + 55, + 51, + 50, + 48, + 46, + 213, + 5, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213}; + +static const flex_int16_t yy_chk[645] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 20, + 25, + 20, + 22, + 22, + 26, + 27, + 28, + 32, + 31, + 29, + 27, + 28, + 51, + 26, + 51, + 28, + 32, + 27, + 25, + 218, + 217, + 33, + 212, + 25, + 27, + 211, + 34, + 27, + 28, + 210, + 31, + + 207, + 206, + 26, + 30, + 27, + 28, + 29, + 26, + 33, + 28, + 32, + 27, + 25, + 33, + 34, + 36, + 25, + 37, + 27, + 30, + 27, + 28, + 30, + 31, + 39, + 30, + 26, + 205, + 36, + 204, + 29, + 42, + 38, + 33, + 36, + 41, + 37, + 33, + 59, + 34, + 41, + 43, + 37, + 39, + 30, + 59, + 43, + 30, + 40, + 30, + 38, + 42, + 44, + 36, + 38, + 58, + 60, + 40, + 62, + 36, + 40, + 37, + 202, + 58, + 44, + 41, + 37, + 60, + 39, + 64, + 59, + 43, + 40, + 66, + 62, + 38, + 42, + 40, + 38, + 63, + 69, + 65, + 40, + 68, + 63, + 40, + 64, + 67, + 58, + 44, + 65, + 74, + 60, + 69, + 70, + 71, + 40, + 66, + 80, + 62, + + 69, + 40, + 68, + 67, + 72, + 73, + 77, + 74, + 199, + 63, + 67, + 64, + 198, + 70, + 78, + 65, + 126, + 71, + 69, + 77, + 81, + 66, + 80, + 72, + 73, + 69, + 79, + 68, + 67, + 78, + 197, + 79, + 74, + 86, + 67, + 84, + 81, + 83, + 70, + 85, + 87, + 71, + 98, + 126, + 77, + 83, + 80, + 88, + 72, + 73, + 75, + 84, + 86, + 195, + 78, + 85, + 79, + 92, + 75, + 87, + 75, + 81, + 91, + 85, + 98, + 88, + 92, + 126, + 75, + 89, + 83, + 90, + 194, + 75, + 75, + 89, + 84, + 86, + 91, + 90, + 85, + 96, + 97, + 75, + 87, + 75, + 102, + 85, + 98, + 97, + 88, + 92, + 99, + 75, + 96, + 102, + 100, + 75, + 75, + 103, + + 89, + 100, + 101, + 91, + 90, + 104, + 103, + 101, + 106, + 99, + 108, + 101, + 107, + 109, + 97, + 105, + 110, + 107, + 193, + 96, + 102, + 192, + 191, + 111, + 106, + 104, + 100, + 108, + 184, + 116, + 109, + 103, + 101, + 113, + 99, + 112, + 101, + 181, + 105, + 105, + 117, + 110, + 107, + 111, + 112, + 114, + 113, + 115, + 116, + 106, + 104, + 118, + 108, + 119, + 114, + 109, + 115, + 122, + 117, + 121, + 118, + 119, + 105, + 105, + 123, + 110, + 122, + 124, + 111, + 112, + 127, + 113, + 129, + 116, + 131, + 121, + 124, + 128, + 133, + 114, + 123, + 115, + 130, + 117, + 128, + 118, + 119, + 130, + 129, + 132, + 136, + 122, + 127, + 137, + 140, + 143, + 133, + 145, + 146, + 131, + + 121, + 124, + 145, + 136, + 149, + 123, + 151, + 153, + 179, + 128, + 147, + 132, + 130, + 129, + 152, + 147, + 127, + 137, + 140, + 143, + 178, + 133, + 146, + 131, + 149, + 154, + 159, + 145, + 136, + 153, + 152, + 159, + 160, + 161, + 151, + 132, + 167, + 162, + 176, + 161, + 147, + 137, + 140, + 143, + 162, + 164, + 146, + 154, + 166, + 149, + 164, + 170, + 168, + 153, + 160, + 152, + 159, + 166, + 151, + 169, + 167, + 168, + 174, + 171, + 161, + 172, + 175, + 173, + 169, + 162, + 177, + 154, + 180, + 182, + 172, + 164, + 173, + 183, + 160, + 175, + 187, + 180, + 166, + 183, + 167, + 174, + 168, + 171, + 186, + 189, + 185, + 187, + 188, + 169, + 177, + 185, + 190, + 182, + 189, + 172, + + 165, + 173, + 163, + 158, + 175, + 157, + 180, + 196, + 183, + 174, + 200, + 171, + 186, + 203, + 209, + 188, + 187, + 201, + 177, + 190, + 185, + 182, + 203, + 189, + 201, + 196, + 200, + 156, + 208, + 209, + 155, + 150, + 148, + 144, + 142, + 141, + 186, + 208, + 139, + 188, + 138, + 135, + 134, + 190, + 125, + 120, + 95, + 203, + 94, + 201, + 196, + 200, + 93, + 82, + 209, + 76, + 61, + 57, + 52, + 49, + 47, + 35, + 208, + 214, + 214, + 215, + 215, + 216, + 216, + 24, + 17, + 11, + 10, + 9, + 5, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213, + 213}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -682,8 +2690,8 @@ static const flex_int16_t yy_chk[645] = #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -697,13 +2705,15 @@ static const flex_int16_t yy_chk[645] = #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#define RETURN_TOKEN(token) \ + LOG_DEBUG("%s", #token); \ + return token #line 707 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -732,124 +2742,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t - { +{ + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char *yy_last_accepting_cpos; - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; + int yylineno_r; + int yy_flex_debug_r; - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; + char *yytext_r; + int yy_more_flag; + int yy_more_len; - int yylineno_r; - int yy_flex_debug_r; + YYSTYPE *yylval_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + YYLTYPE *yylloc_r; - YYSTYPE * yylval_r; +}; /* end struct yyguts_t */ - YYLTYPE * yylloc_r; +static int yy_init_globals(yyscan_t yyscanner); - }; /* end struct yyguts_t */ +/* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ +#define yylval yyg->yylval_r -static int yy_init_globals ( yyscan_t yyscanner ); +#define yylloc yyg->yylloc_r - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); +static int yyinput(yyscan_t yyscanner); #else -static int input ( yyscan_t yyscanner ); +static int input(yyscan_t yyscanner); #endif #endif @@ -869,42 +2879,38 @@ static int input ( yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO \ + do { \ + if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ + } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ +#define YY_INPUT(buf, result, max_size) \ + if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ + int c = '*'; \ + yy_size_t n; \ + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ + buf[n] = (char)c; \ + if (c == '\n') \ + buf[n++] = (char)c; \ + if (c == EOF && ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + result = n; \ + } else { \ + errno = 0; \ + while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ + if (errno != EINTR) { \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + break; \ + } \ + errno = 0; \ + clearerr(yyin); \ + } \ + } #endif @@ -923,7 +2929,7 @@ static int input ( yyscan_t yyscanner ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -934,11 +2940,9 @@ static int input ( yyscan_t yyscanner ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -950,614 +2954,530 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK /*LINTED*/ break; #endif -#define YY_RULE_SETUP \ - YY_USER_ACTION +#define YY_RULE_SETUP YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; + if (!yyg->yy_init) { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ + if (!yyg->yy_start) + yyg->yy_start = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if (!yyin) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if (!yyout) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_load_buffer_state( yyscanner ); - } + yy_load_buffer_state(yyscanner); + } - { + { #line 75 "lex_sql.l" - #line 1002 "lex_sql.cpp" - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 214 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 576 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP + while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_match: + do { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 214) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } while (yy_base[yy_current_state] != 576); + + yy_find_action: + yy_act = yy_accept[yy_current_state]; + if (yy_act == 0) { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + do_action: /* This label is used only to access EOF actions. */ + + switch (yy_act) { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + + case 1: YY_RULE_SETUP #line 77 "lex_sql.l" -// ignore whitespace - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP + // ignore whitespace + YY_BREAK + case 2: + /* rule 2 can match eol */ + YY_RULE_SETUP #line 78 "lex_sql.l" -; - YY_BREAK -case 3: -YY_RULE_SETUP + ; + YY_BREAK + case 3: YY_RULE_SETUP #line 80 "lex_sql.l" -yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); - YY_BREAK -case 4: -YY_RULE_SETUP + yylval->number = atoi(yytext); + RETURN_TOKEN(NUMBER); + YY_BREAK + case 4: YY_RULE_SETUP #line 81 "lex_sql.l" -yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); - YY_BREAK -case 5: -YY_RULE_SETUP + yylval->floats = (float)(atof(yytext)); + RETURN_TOKEN(FLOAT); + YY_BREAK + case 5: YY_RULE_SETUP #line 83 "lex_sql.l" -RETURN_TOKEN(SEMICOLON); - YY_BREAK -case 6: -YY_RULE_SETUP + RETURN_TOKEN(SEMICOLON); + YY_BREAK + case 6: YY_RULE_SETUP #line 84 "lex_sql.l" -RETURN_TOKEN(DOT); - YY_BREAK -case 7: -YY_RULE_SETUP + RETURN_TOKEN(DOT); + YY_BREAK + case 7: YY_RULE_SETUP #line 85 "lex_sql.l" -RETURN_TOKEN(EXIT); - YY_BREAK -case 8: -YY_RULE_SETUP + RETURN_TOKEN(EXIT); + YY_BREAK + case 8: YY_RULE_SETUP #line 86 "lex_sql.l" -RETURN_TOKEN(HELP); - YY_BREAK -case 9: -YY_RULE_SETUP + RETURN_TOKEN(HELP); + YY_BREAK + case 9: YY_RULE_SETUP #line 87 "lex_sql.l" -RETURN_TOKEN(DESC); - YY_BREAK -case 10: -YY_RULE_SETUP + RETURN_TOKEN(DESC); + YY_BREAK + case 10: YY_RULE_SETUP #line 88 "lex_sql.l" -RETURN_TOKEN(CREATE); - YY_BREAK -case 11: -YY_RULE_SETUP + RETURN_TOKEN(CREATE); + YY_BREAK + case 11: YY_RULE_SETUP #line 89 "lex_sql.l" -RETURN_TOKEN(DROP); - YY_BREAK -case 12: -YY_RULE_SETUP + RETURN_TOKEN(DROP); + YY_BREAK + case 12: YY_RULE_SETUP #line 90 "lex_sql.l" -RETURN_TOKEN(TABLE); - YY_BREAK -case 13: -YY_RULE_SETUP + RETURN_TOKEN(TABLE); + YY_BREAK + case 13: YY_RULE_SETUP #line 91 "lex_sql.l" -RETURN_TOKEN(TABLES); - YY_BREAK -case 14: -YY_RULE_SETUP + RETURN_TOKEN(TABLES); + YY_BREAK + case 14: YY_RULE_SETUP #line 92 "lex_sql.l" -RETURN_TOKEN(INDEX); - YY_BREAK -case 15: -YY_RULE_SETUP + RETURN_TOKEN(INDEX); + YY_BREAK + case 15: YY_RULE_SETUP #line 93 "lex_sql.l" -RETURN_TOKEN(ON); - YY_BREAK -case 16: -YY_RULE_SETUP + RETURN_TOKEN(ON); + YY_BREAK + case 16: YY_RULE_SETUP #line 94 "lex_sql.l" -RETURN_TOKEN(SHOW); - YY_BREAK -case 17: -YY_RULE_SETUP + RETURN_TOKEN(SHOW); + YY_BREAK + case 17: YY_RULE_SETUP #line 95 "lex_sql.l" -RETURN_TOKEN(SYNC); - YY_BREAK -case 18: -YY_RULE_SETUP + RETURN_TOKEN(SYNC); + YY_BREAK + case 18: YY_RULE_SETUP #line 96 "lex_sql.l" -RETURN_TOKEN(SELECT); - YY_BREAK -case 19: -YY_RULE_SETUP + RETURN_TOKEN(SELECT); + YY_BREAK + case 19: YY_RULE_SETUP #line 97 "lex_sql.l" -RETURN_TOKEN(CALC); - YY_BREAK -case 20: -YY_RULE_SETUP + RETURN_TOKEN(CALC); + YY_BREAK + case 20: YY_RULE_SETUP #line 98 "lex_sql.l" -RETURN_TOKEN(FROM); - YY_BREAK -case 21: -YY_RULE_SETUP + RETURN_TOKEN(FROM); + YY_BREAK + case 21: YY_RULE_SETUP #line 99 "lex_sql.l" -RETURN_TOKEN(WHERE); - YY_BREAK -case 22: -YY_RULE_SETUP + RETURN_TOKEN(WHERE); + YY_BREAK + case 22: YY_RULE_SETUP #line 100 "lex_sql.l" -RETURN_TOKEN(AND); - YY_BREAK -case 23: -YY_RULE_SETUP + RETURN_TOKEN(AND); + YY_BREAK + case 23: YY_RULE_SETUP #line 101 "lex_sql.l" -RETURN_TOKEN(OR); - YY_BREAK -case 24: -YY_RULE_SETUP + RETURN_TOKEN(OR); + YY_BREAK + case 24: YY_RULE_SETUP #line 102 "lex_sql.l" -RETURN_TOKEN(INSERT); - YY_BREAK -case 25: -YY_RULE_SETUP + RETURN_TOKEN(INSERT); + YY_BREAK + case 25: YY_RULE_SETUP #line 103 "lex_sql.l" -RETURN_TOKEN(INTO); - YY_BREAK -case 26: -YY_RULE_SETUP + RETURN_TOKEN(INTO); + YY_BREAK + case 26: YY_RULE_SETUP #line 104 "lex_sql.l" -RETURN_TOKEN(VALUES); - YY_BREAK -case 27: -YY_RULE_SETUP + RETURN_TOKEN(VALUES); + YY_BREAK + case 27: YY_RULE_SETUP #line 105 "lex_sql.l" -RETURN_TOKEN(DELETE); - YY_BREAK -case 28: -YY_RULE_SETUP + RETURN_TOKEN(DELETE); + YY_BREAK + case 28: YY_RULE_SETUP #line 106 "lex_sql.l" -RETURN_TOKEN(UPDATE); - YY_BREAK -case 29: -YY_RULE_SETUP + RETURN_TOKEN(UPDATE); + YY_BREAK + case 29: YY_RULE_SETUP #line 107 "lex_sql.l" -RETURN_TOKEN(SET); - YY_BREAK -case 30: -YY_RULE_SETUP + RETURN_TOKEN(SET); + YY_BREAK + case 30: YY_RULE_SETUP #line 108 "lex_sql.l" -RETURN_TOKEN(TRX_BEGIN); - YY_BREAK -case 31: -YY_RULE_SETUP + RETURN_TOKEN(TRX_BEGIN); + YY_BREAK + case 31: YY_RULE_SETUP #line 109 "lex_sql.l" -RETURN_TOKEN(TRX_COMMIT); - YY_BREAK -case 32: -YY_RULE_SETUP + RETURN_TOKEN(TRX_COMMIT); + YY_BREAK + case 32: YY_RULE_SETUP #line 110 "lex_sql.l" -RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK -case 33: -YY_RULE_SETUP + RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK + case 33: YY_RULE_SETUP #line 111 "lex_sql.l" -RETURN_TOKEN(INT_T); - YY_BREAK -case 34: -YY_RULE_SETUP + RETURN_TOKEN(INT_T); + YY_BREAK + case 34: YY_RULE_SETUP #line 112 "lex_sql.l" -RETURN_TOKEN(STRING_T); - YY_BREAK -case 35: -YY_RULE_SETUP + RETURN_TOKEN(STRING_T); + YY_BREAK + case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(FLOAT_T); - YY_BREAK -case 36: -YY_RULE_SETUP + RETURN_TOKEN(FLOAT_T); + YY_BREAK + case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK -case 37: -YY_RULE_SETUP + RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK + case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(NULL_T); - YY_BREAK -case 38: -YY_RULE_SETUP + RETURN_TOKEN(NULL_T); + YY_BREAK + case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(NULLABLE); - YY_BREAK -case 39: -YY_RULE_SETUP + RETURN_TOKEN(NULLABLE); + YY_BREAK + case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(LOAD); - YY_BREAK -case 40: -YY_RULE_SETUP + RETURN_TOKEN(LOAD); + YY_BREAK + case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(DATA); - YY_BREAK -case 41: -YY_RULE_SETUP + RETURN_TOKEN(DATA); + YY_BREAK + case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(INFILE); - YY_BREAK -case 42: -YY_RULE_SETUP + RETURN_TOKEN(INFILE); + YY_BREAK + case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); - YY_BREAK -case 43: -YY_RULE_SETUP + RETURN_TOKEN(EXPLAIN); + YY_BREAK + case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(GROUP); - YY_BREAK -case 44: -YY_RULE_SETUP + RETURN_TOKEN(GROUP); + YY_BREAK + case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(ORDER); - YY_BREAK -case 45: -YY_RULE_SETUP + RETURN_TOKEN(ORDER); + YY_BREAK + case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(BY); - YY_BREAK -case 46: -YY_RULE_SETUP + RETURN_TOKEN(BY); + YY_BREAK + case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(AS); - YY_BREAK -case 47: -YY_RULE_SETUP + RETURN_TOKEN(AS); + YY_BREAK + case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(ASC); - YY_BREAK -case 48: -YY_RULE_SETUP + RETURN_TOKEN(ASC); + YY_BREAK + case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(IN); - YY_BREAK -case 49: -YY_RULE_SETUP + RETURN_TOKEN(IN); + YY_BREAK + case 49: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(EXISTS); - YY_BREAK -case 50: -YY_RULE_SETUP + RETURN_TOKEN(EXISTS); + YY_BREAK + case 50: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(STORAGE); - YY_BREAK -case 51: -YY_RULE_SETUP + RETURN_TOKEN(STORAGE); + YY_BREAK + case 51: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(FORMAT); - YY_BREAK -case 52: -YY_RULE_SETUP + RETURN_TOKEN(FORMAT); + YY_BREAK + case 52: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(INNER); - YY_BREAK -case 53: -YY_RULE_SETUP + RETURN_TOKEN(INNER); + YY_BREAK + case 53: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(JOIN); - YY_BREAK -case 54: -YY_RULE_SETUP + RETURN_TOKEN(JOIN); + YY_BREAK + case 54: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(LBRACE); - YY_BREAK -case 55: -YY_RULE_SETUP + RETURN_TOKEN(LBRACE); + YY_BREAK + case 55: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(RBRACE); - YY_BREAK -case 56: -YY_RULE_SETUP + RETURN_TOKEN(RBRACE); + YY_BREAK + case 56: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(COMMA); - YY_BREAK -case 57: -YY_RULE_SETUP + RETURN_TOKEN(COMMA); + YY_BREAK + case 57: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(EQ); - YY_BREAK -case 58: -YY_RULE_SETUP + RETURN_TOKEN(EQ); + YY_BREAK + case 58: YY_RULE_SETUP #line 137 "lex_sql.l" -RETURN_TOKEN(LE); - YY_BREAK -case 59: -YY_RULE_SETUP + RETURN_TOKEN(LE); + YY_BREAK + case 59: YY_RULE_SETUP #line 138 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 60: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 60: YY_RULE_SETUP #line 139 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 61: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 61: YY_RULE_SETUP #line 140 "lex_sql.l" -RETURN_TOKEN(LT); - YY_BREAK -case 62: -YY_RULE_SETUP + RETURN_TOKEN(LT); + YY_BREAK + case 62: YY_RULE_SETUP #line 141 "lex_sql.l" -RETURN_TOKEN(GE); - YY_BREAK -case 63: -YY_RULE_SETUP + RETURN_TOKEN(GE); + YY_BREAK + case 63: YY_RULE_SETUP #line 142 "lex_sql.l" -RETURN_TOKEN(GT); - YY_BREAK -case 64: -YY_RULE_SETUP + RETURN_TOKEN(GT); + YY_BREAK + case 64: YY_RULE_SETUP #line 143 "lex_sql.l" -RETURN_TOKEN(NOT); - YY_BREAK -case 65: -YY_RULE_SETUP + RETURN_TOKEN(NOT); + YY_BREAK + case 65: YY_RULE_SETUP #line 144 "lex_sql.l" -RETURN_TOKEN(IS); - YY_BREAK -case 66: -YY_RULE_SETUP + RETURN_TOKEN(IS); + YY_BREAK + case 66: YY_RULE_SETUP #line 145 "lex_sql.l" -RETURN_TOKEN(LIKE); - YY_BREAK -case 67: -YY_RULE_SETUP + RETURN_TOKEN(LIKE); + YY_BREAK + case 67: YY_RULE_SETUP #line 147 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); - YY_BREAK -case 68: + yylval->string = strdup(yytext); + RETURN_TOKEN(ID); + YY_BREAK + case 68: #line 150 "lex_sql.l" -case 69: + case 69: #line 151 "lex_sql.l" -case 70: + case 70: #line 152 "lex_sql.l" -case 71: -YY_RULE_SETUP + case 71: YY_RULE_SETUP #line 152 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK -case 72: -/* rule 72 can match eol */ -YY_RULE_SETUP + { + return yytext[0]; + } + YY_BREAK + case 72: + /* rule 72 can match eol */ + YY_RULE_SETUP #line 153 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 73: -/* rule 73 can match eol */ -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 73: + /* rule 73 can match eol */ + YY_RULE_SETUP #line 154 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 74: -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 74: YY_RULE_SETUP #line 156 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; - YY_BREAK -case 75: -YY_RULE_SETUP + LOG_DEBUG("Unknown character [%c]",yytext[0]); + return yytext[0]; + YY_BREAK + case 75: YY_RULE_SETUP #line 157 "lex_sql.l" -ECHO; - YY_BREAK + ECHO; + YY_BREAK #line 1428 "lex_sql.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STR): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap( yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(STR): yyterminate(); + + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if (yy_next_state) { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_END_OF_FILE: { + yyg->yy_did_buffer_switch_on_eof = 0; + + if (yywrap(yyscanner)) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else { + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1567,171 +3487,149 @@ case YY_STATE_EOF(STR): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (yyscan_t yyscanner) +static int yy_get_next_buffer(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) + YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); + + if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ + if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for (i = 0; i < number_to_move; ++i) + *(dest++) = *(source++); + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else { + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); + + if (b->yy_is_our_buffer) { + yy_size_t new_size = b->yy_buf_size * 2; + + if (new_size <= 0) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); + } else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if (!b->yy_ch_buf) + YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + } + + if (num_to_read > YY_READ_BUF_SIZE) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if (yyg->yy_n_chars == 0) { + if (number_to_move == YY_MORE_ADJ) { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin, yyscanner); + } + + else { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = + (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); + if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +static yy_state_type yy_get_previous_state(yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 214 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + yy_current_state = yyg->yy_start; + + for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 214) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -1739,29 +3637,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 214 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 213); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 214) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 213); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -1770,141 +3666,133 @@ static int yy_get_next_buffer (yyscan_t yyscanner) #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) +static int yyinput(yyscan_t yyscanner) #else - static int input (yyscan_t yyscanner) +static int input(yyscan_t yyscanner) #endif { - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin , yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + int c; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin, yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: { + if (yywrap(yyscanner)) + return 0; + + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; + } + } + } - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) +void yyrestart(FILE *input_file, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); + yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); + yy_load_buffer_state(yyscanner); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack(yyscanner); + if (YY_CURRENT_BUFFER == new_buffer) + return; + + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state(yyscanner); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state (yyscan_t yyscanner) +static void yy_load_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -1913,105 +3801,105 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); + if (!b->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer( b, file , yyscanner); + yy_init_buffer(b, file, yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! b ) - return; + if (!b) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); + if (b->yy_is_our_buffer) + yyfree((void *)b->yy_ch_buf, yyscanner); - yyfree( (void *) b , yyscanner ); + yyfree((void *)b, yyscanner); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + int oerrno = errno; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flush_buffer( b , yyscanner); + yy_flush_buffer(b, yyscanner); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!b) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); + if (b == YY_CURRENT_BUFFER) + yy_load_buffer_state(yyscanner); } /** Pushes the new state onto the stack. The new state becomes @@ -2020,99 +3908,95 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state (yyscan_t yyscanner) +void yypop_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (yyscan_t yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = + (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( + yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -2121,33 +4005,31 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b , yyscanner ); - - return b; + YY_BUFFER_STATE b; + + if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + + b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b, yyscanner); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -2158,10 +4040,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) { - - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + + return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2171,177 +4053,175 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n , yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t)(_yybytes_len + 2); + buf = (char *)yyalloc(n, yyscanner); + if (!buf) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + + for (i = 0; i < _yybytes_len; ++i) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf, n, yyscanner); + if (!b) + YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + fprintf(stderr, "%s\n", msg); + exit(YY_EXIT_FAILURE); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } while (0) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno (yyscan_t yyscanner) +int yyget_lineno(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (!YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column (yyscan_t yyscanner) +int yyget_column(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; + if (!YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in (yyscan_t yyscanner) +FILE *yyget_in(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out (yyscan_t yyscanner) +FILE *yyget_out(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text (yyscan_t yyscanner) +char *yyget_text(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyextra = user_defined; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) +void yyset_lineno(int _line_number, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_lineno called with no buffer"); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int _column_no , yyscan_t yyscanner) +void yyset_column(int _column_no, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_column called with no buffer"); - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); - - yycolumn = _column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -2350,80 +4230,80 @@ void yyset_column (int _column_no , yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) +void yyset_in(FILE *_in_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyin = _in_str; } -void yyset_out (FILE * _out_str , yyscan_t yyscanner) +void yyset_out(FILE *_out_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyout = _out_str; } -int yyget_debug (yyscan_t yyscanner) +int yyget_debug(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yy_flex_debug; } -void yyset_debug (int _bdebug , yyscan_t yyscanner) +void yyset_debug(int _bdebug, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_flex_debug = _bdebug; } /* Accessor methods for yylval and yylloc */ -YYSTYPE * yyget_lval (yyscan_t yyscanner) +YYSTYPE *yyget_lval(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylval; } -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc (yyscan_t yyscanner) +YYLTYPE *yyget_lloc(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylloc; } - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t* ptr_yy_globals) +int yylex_init(yyscan_t *ptr_yy_globals) { - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -2433,94 +4313,94 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra (yy_user_defined, &dummy_yyguts); + yyset_extra(yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - yyset_extra (yy_user_defined, *ptr_yy_globals); + yyset_extra(yy_user_defined, *ptr_yy_globals); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } -static int yy_init_globals (yyscan_t yyscanner) +static int yy_init_globals(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) +int yylex_destroy(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while (YY_CURRENT_BUFFER) { + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack, yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree(yyg->yy_start_stack, yyscanner); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals(yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree(yyscanner, yyscanner); + yyscanner = NULL; + return 0; } /* @@ -2528,63 +4408,59 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + int i; + for (i = 0; i < n; ++i) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +static int yy_flex_strlen(const char *s, yyscan_t yyscanner) { - int n; - for ( n = 0; s[n]; ++n ) - ; + int n; + for (n = 0; s[n]; ++n) + ; - return n; + return n; } #endif -void *yyalloc (yy_size_t size , yyscan_t yyscanner) +void *yyalloc(yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree (void * ptr , yyscan_t yyscanner) +void yyfree(void *ptr, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + free((char *)ptr); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 157 "lex_sql.l" - -void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); -} - +void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index d93e7c65..4fa33a30 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,23 +12,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -81,62 +79,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -157,7 +155,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -197,73 +195,72 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -286,69 +283,69 @@ void yyfree ( void * , yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -376,11 +373,9 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -544,7 +539,6 @@ extern int yylex \ #line 157 "lex_sql.l" - #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index af6a829a..fe0ba645 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -90,7 +90,7 @@ struct ConditionSqlNode struct RelationNode { RelationNode(std::string relation_, std::string alias_) : relation(std::move(relation_)), alias(std::move(alias_)) {} - explicit RelationNode(std::string relation_) : relation(std::move(relation_)) {} + explicit RelationNode(std::string relation_) : relation(std::move(relation_)) {} std::string relation; ///< 查询的表 std::string alias; ///< 该表的别名 (may be NULL) }; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 76af95d3..c48d710a 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,13 +63,9 @@ /* Pull parsers. */ #define YYPULL 1 - - - /* First part of user prologue. */ #line 2 "yacc_sql.y" - #include #include #include @@ -92,196 +88,187 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, - Expression *left, - Expression *right, - const char *sql_string, - YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression( + ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, - Expression *child, - const char *sql_string, - YYLTYPE *llocp) +UnboundAggregateExpr *create_aggregate_expression( + const char *aggregate_name, Expression *child, const char *sql_string, YYLTYPE *llocp) { UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, child); expr->set_name(token_name(sql_string, llocp)); return expr; } - #line 125 "yacc_sql.cpp" -# ifndef YY_CAST -# ifdef __cplusplus -# define YY_CAST(Type, Val) static_cast (Val) -# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -# else -# define YY_CAST(Type, Val) ((Type) (Val)) -# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -# endif -# endif -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif +#ifndef YY_CAST +#ifdef __cplusplus +#define YY_CAST(Type, Val) static_cast(Val) +#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) +#else +#define YY_CAST(Type, Val) ((Type)(Val)) +#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) +#endif +#endif +#ifndef YY_NULLPTR +#if defined __cplusplus +#if 201103L <= __cplusplus +#define YY_NULLPTR nullptr +#else +#define YY_NULLPTR 0 +#endif +#else +#define YY_NULLPTR ((void *)0) +#endif +#endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_ORDER = 11, /* ORDER */ - YYSYMBOL_TABLE = 12, /* TABLE */ - YYSYMBOL_TABLES = 13, /* TABLES */ - YYSYMBOL_INDEX = 14, /* INDEX */ - YYSYMBOL_CALC = 15, /* CALC */ - YYSYMBOL_SELECT = 16, /* SELECT */ - YYSYMBOL_DESC = 17, /* DESC */ - YYSYMBOL_SHOW = 18, /* SHOW */ - YYSYMBOL_SYNC = 19, /* SYNC */ - YYSYMBOL_INSERT = 20, /* INSERT */ - YYSYMBOL_DELETE = 21, /* DELETE */ - YYSYMBOL_UPDATE = 22, /* UPDATE */ - YYSYMBOL_LBRACE = 23, /* LBRACE */ - YYSYMBOL_RBRACE = 24, /* RBRACE */ - YYSYMBOL_COMMA = 25, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 29, /* INT_T */ - YYSYMBOL_IN = 30, /* IN */ - YYSYMBOL_STRING_T = 31, /* STRING_T */ - YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ - YYSYMBOL_DATE_T = 33, /* DATE_T */ - YYSYMBOL_NOT = 34, /* NOT */ - YYSYMBOL_NULL_T = 35, /* NULL_T */ - YYSYMBOL_NULLABLE = 36, /* NULLABLE */ - YYSYMBOL_HELP = 37, /* HELP */ - YYSYMBOL_EXIT = 38, /* EXIT */ - YYSYMBOL_DOT = 39, /* DOT */ - YYSYMBOL_INTO = 40, /* INTO */ - YYSYMBOL_VALUES = 41, /* VALUES */ - YYSYMBOL_FROM = 42, /* FROM */ - YYSYMBOL_WHERE = 43, /* WHERE */ - YYSYMBOL_AND = 44, /* AND */ - YYSYMBOL_OR = 45, /* OR */ - YYSYMBOL_SET = 46, /* SET */ - YYSYMBOL_ON = 47, /* ON */ - YYSYMBOL_LOAD = 48, /* LOAD */ - YYSYMBOL_DATA = 49, /* DATA */ - YYSYMBOL_INFILE = 50, /* INFILE */ - YYSYMBOL_EXPLAIN = 51, /* EXPLAIN */ - YYSYMBOL_STORAGE = 52, /* STORAGE */ - YYSYMBOL_FORMAT = 53, /* FORMAT */ - YYSYMBOL_INNER = 54, /* INNER */ - YYSYMBOL_JOIN = 55, /* JOIN */ - YYSYMBOL_EQ = 56, /* EQ */ - YYSYMBOL_LT = 57, /* LT */ - YYSYMBOL_GT = 58, /* GT */ - YYSYMBOL_LE = 59, /* LE */ - YYSYMBOL_GE = 60, /* GE */ - YYSYMBOL_NE = 61, /* NE */ - YYSYMBOL_LIKE = 62, /* LIKE */ - YYSYMBOL_IS = 63, /* IS */ - YYSYMBOL_NUMBER = 64, /* NUMBER */ - YYSYMBOL_FLOAT = 65, /* FLOAT */ - YYSYMBOL_ID = 66, /* ID */ - YYSYMBOL_SSS = 67, /* SSS */ - YYSYMBOL_68_ = 68, /* '+' */ - YYSYMBOL_69_ = 69, /* '-' */ - YYSYMBOL_70_ = 70, /* '*' */ - YYSYMBOL_71_ = 71, /* '/' */ - YYSYMBOL_UMINUS = 72, /* UMINUS */ - YYSYMBOL_YYACCEPT = 73, /* $accept */ - YYSYMBOL_commands = 74, /* commands */ - YYSYMBOL_command_wrapper = 75, /* command_wrapper */ - YYSYMBOL_exit_stmt = 76, /* exit_stmt */ - YYSYMBOL_help_stmt = 77, /* help_stmt */ - YYSYMBOL_sync_stmt = 78, /* sync_stmt */ - YYSYMBOL_begin_stmt = 79, /* begin_stmt */ - YYSYMBOL_commit_stmt = 80, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 81, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 82, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 83, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 84, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 85, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 86, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 87, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 88, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 89, /* attr_def_list */ - YYSYMBOL_attr_def = 90, /* attr_def */ - YYSYMBOL_nullable_constraint = 91, /* nullable_constraint */ - YYSYMBOL_number = 92, /* number */ - YYSYMBOL_type = 93, /* type */ - YYSYMBOL_insert_stmt = 94, /* insert_stmt */ - YYSYMBOL_values_list = 95, /* values_list */ - YYSYMBOL_value_list = 96, /* value_list */ - YYSYMBOL_value = 97, /* value */ - YYSYMBOL_storage_format = 98, /* storage_format */ - YYSYMBOL_delete_stmt = 99, /* delete_stmt */ - YYSYMBOL_update_stmt = 100, /* update_stmt */ - YYSYMBOL_setClauses = 101, /* setClauses */ - YYSYMBOL_setClause = 102, /* setClause */ - YYSYMBOL_select_stmt = 103, /* select_stmt */ - YYSYMBOL_calc_stmt = 104, /* calc_stmt */ - YYSYMBOL_expression_list = 105, /* expression_list */ - YYSYMBOL_expression = 106, /* expression */ - YYSYMBOL_alias = 107, /* alias */ - YYSYMBOL_aggr_func_expr = 108, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 109, /* sub_query_expr */ - YYSYMBOL_rel_attr = 110, /* rel_attr */ - YYSYMBOL_relation = 111, /* relation */ - YYSYMBOL_rel_list = 112, /* rel_list */ - YYSYMBOL_joinClauses = 113, /* joinClauses */ - YYSYMBOL_where = 114, /* where */ - YYSYMBOL_condition = 115, /* condition */ - YYSYMBOL_comp_op = 116, /* comp_op */ - YYSYMBOL_opt_order_by = 117, /* opt_order_by */ - YYSYMBOL_sort_list = 118, /* sort_list */ - YYSYMBOL_sort_unit = 119, /* sort_unit */ - YYSYMBOL_group_by = 120, /* group_by */ - YYSYMBOL_load_data_stmt = 121, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 122, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 123, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 124 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_ORDER = 11, /* ORDER */ + YYSYMBOL_TABLE = 12, /* TABLE */ + YYSYMBOL_TABLES = 13, /* TABLES */ + YYSYMBOL_INDEX = 14, /* INDEX */ + YYSYMBOL_CALC = 15, /* CALC */ + YYSYMBOL_SELECT = 16, /* SELECT */ + YYSYMBOL_DESC = 17, /* DESC */ + YYSYMBOL_SHOW = 18, /* SHOW */ + YYSYMBOL_SYNC = 19, /* SYNC */ + YYSYMBOL_INSERT = 20, /* INSERT */ + YYSYMBOL_DELETE = 21, /* DELETE */ + YYSYMBOL_UPDATE = 22, /* UPDATE */ + YYSYMBOL_LBRACE = 23, /* LBRACE */ + YYSYMBOL_RBRACE = 24, /* RBRACE */ + YYSYMBOL_COMMA = 25, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 29, /* INT_T */ + YYSYMBOL_IN = 30, /* IN */ + YYSYMBOL_STRING_T = 31, /* STRING_T */ + YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ + YYSYMBOL_DATE_T = 33, /* DATE_T */ + YYSYMBOL_NOT = 34, /* NOT */ + YYSYMBOL_NULL_T = 35, /* NULL_T */ + YYSYMBOL_NULLABLE = 36, /* NULLABLE */ + YYSYMBOL_HELP = 37, /* HELP */ + YYSYMBOL_EXIT = 38, /* EXIT */ + YYSYMBOL_DOT = 39, /* DOT */ + YYSYMBOL_INTO = 40, /* INTO */ + YYSYMBOL_VALUES = 41, /* VALUES */ + YYSYMBOL_FROM = 42, /* FROM */ + YYSYMBOL_WHERE = 43, /* WHERE */ + YYSYMBOL_AND = 44, /* AND */ + YYSYMBOL_OR = 45, /* OR */ + YYSYMBOL_SET = 46, /* SET */ + YYSYMBOL_ON = 47, /* ON */ + YYSYMBOL_LOAD = 48, /* LOAD */ + YYSYMBOL_DATA = 49, /* DATA */ + YYSYMBOL_INFILE = 50, /* INFILE */ + YYSYMBOL_EXPLAIN = 51, /* EXPLAIN */ + YYSYMBOL_STORAGE = 52, /* STORAGE */ + YYSYMBOL_FORMAT = 53, /* FORMAT */ + YYSYMBOL_INNER = 54, /* INNER */ + YYSYMBOL_JOIN = 55, /* JOIN */ + YYSYMBOL_EQ = 56, /* EQ */ + YYSYMBOL_LT = 57, /* LT */ + YYSYMBOL_GT = 58, /* GT */ + YYSYMBOL_LE = 59, /* LE */ + YYSYMBOL_GE = 60, /* GE */ + YYSYMBOL_NE = 61, /* NE */ + YYSYMBOL_LIKE = 62, /* LIKE */ + YYSYMBOL_IS = 63, /* IS */ + YYSYMBOL_NUMBER = 64, /* NUMBER */ + YYSYMBOL_FLOAT = 65, /* FLOAT */ + YYSYMBOL_ID = 66, /* ID */ + YYSYMBOL_SSS = 67, /* SSS */ + YYSYMBOL_68_ = 68, /* '+' */ + YYSYMBOL_69_ = 69, /* '-' */ + YYSYMBOL_70_ = 70, /* '*' */ + YYSYMBOL_71_ = 71, /* '/' */ + YYSYMBOL_UMINUS = 72, /* UMINUS */ + YYSYMBOL_YYACCEPT = 73, /* $accept */ + YYSYMBOL_commands = 74, /* commands */ + YYSYMBOL_command_wrapper = 75, /* command_wrapper */ + YYSYMBOL_exit_stmt = 76, /* exit_stmt */ + YYSYMBOL_help_stmt = 77, /* help_stmt */ + YYSYMBOL_sync_stmt = 78, /* sync_stmt */ + YYSYMBOL_begin_stmt = 79, /* begin_stmt */ + YYSYMBOL_commit_stmt = 80, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 81, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 82, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 83, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 84, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 85, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 86, /* create_index_stmt */ + YYSYMBOL_drop_index_stmt = 87, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 88, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 89, /* attr_def_list */ + YYSYMBOL_attr_def = 90, /* attr_def */ + YYSYMBOL_nullable_constraint = 91, /* nullable_constraint */ + YYSYMBOL_number = 92, /* number */ + YYSYMBOL_type = 93, /* type */ + YYSYMBOL_insert_stmt = 94, /* insert_stmt */ + YYSYMBOL_values_list = 95, /* values_list */ + YYSYMBOL_value_list = 96, /* value_list */ + YYSYMBOL_value = 97, /* value */ + YYSYMBOL_storage_format = 98, /* storage_format */ + YYSYMBOL_delete_stmt = 99, /* delete_stmt */ + YYSYMBOL_update_stmt = 100, /* update_stmt */ + YYSYMBOL_setClauses = 101, /* setClauses */ + YYSYMBOL_setClause = 102, /* setClause */ + YYSYMBOL_select_stmt = 103, /* select_stmt */ + YYSYMBOL_calc_stmt = 104, /* calc_stmt */ + YYSYMBOL_expression_list = 105, /* expression_list */ + YYSYMBOL_expression = 106, /* expression */ + YYSYMBOL_alias = 107, /* alias */ + YYSYMBOL_aggr_func_expr = 108, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 109, /* sub_query_expr */ + YYSYMBOL_rel_attr = 110, /* rel_attr */ + YYSYMBOL_relation = 111, /* relation */ + YYSYMBOL_rel_list = 112, /* rel_list */ + YYSYMBOL_joinClauses = 113, /* joinClauses */ + YYSYMBOL_where = 114, /* where */ + YYSYMBOL_condition = 115, /* condition */ + YYSYMBOL_comp_op = 116, /* comp_op */ + YYSYMBOL_opt_order_by = 117, /* opt_order_by */ + YYSYMBOL_sort_list = 118, /* sort_list */ + YYSYMBOL_sort_unit = 119, /* sort_unit */ + YYSYMBOL_group_by = 120, /* group_by */ + YYSYMBOL_load_data_stmt = 121, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 122, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 123, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 124 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; - - - #ifdef short -# undef short +#undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -289,11 +276,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -# include /* INFRINGES ON USER NAME SPACE */ -# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_STDINT_H -# endif +#include /* INFRINGES ON USER NAME SPACE */ +#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_STDINT_H +#endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -323,16 +310,15 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 +#undef UINT_LEAST8_MAX +#undef UINT_LEAST16_MAX +#define UINT_LEAST8_MAX 255 +#define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -342,8 +328,7 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -352,42 +337,38 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -# define YYPTRDIFF_T __PTRDIFF_TYPE__ -# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -# elif defined PTRDIFF_MAX -# ifndef ptrdiff_t -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYPTRDIFF_T ptrdiff_t -# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -# else -# define YYPTRDIFF_T long -# define YYPTRDIFF_MAXIMUM LONG_MAX -# endif +#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +#define YYPTRDIFF_T __PTRDIFF_TYPE__ +#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +#elif defined PTRDIFF_MAX +#ifndef ptrdiff_t +#include /* INFRINGES ON USER NAME SPACE */ +#endif +#define YYPTRDIFF_T ptrdiff_t +#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +#else +#define YYPTRDIFF_T long +#define YYPTRDIFF_MAXIMUM LONG_MAX +#endif #endif #ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned -# endif +#ifdef __SIZE_TYPE__ +#define YYSIZE_T __SIZE_TYPE__ +#elif defined size_t +#define YYSIZE_T size_t +#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YYSIZE_T size_t +#else +#define YYSIZE_T unsigned +#endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST (YYPTRDIFF_T, \ - (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ - ? YYPTRDIFF_MAXIMUM \ - : YY_CAST (YYSIZE_T, -1))) - -#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) +#define YYSIZE_MAXIMUM \ + YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -396,579 +377,2331 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif +#if defined YYENABLE_NLS && YYENABLE_NLS +#if ENABLE_NLS +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_(Msgid) dgettext("bison-runtime", Msgid) +#endif +#endif +#ifndef YY_ +#define YY_(Msgid) Msgid +#endif #endif - #ifndef YY_ATTRIBUTE_PURE -# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define YY_ATTRIBUTE_PURE -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) +#else +#define YY_ATTRIBUTE_PURE +#endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -# else -# define YY_ATTRIBUTE_UNUSED -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#else +#define YY_ATTRIBUTE_UNUSED +#endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +#if !defined lint || defined __GNUC__ +#define YY_USE(E) ((void)(E)) #else -# define YY_USE(E) /* empty */ +#define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") +#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") +#else +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +#endif +#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") #else -# define YY_INITIAL_VALUE(Value) Value +#define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +#define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -# define YY_IGNORE_USELESS_CAST_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -# define YY_IGNORE_USELESS_CAST_END \ - _Pragma ("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ +#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") +#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_END +#define YY_IGNORE_USELESS_CAST_BEGIN +#define YY_IGNORE_USELESS_CAST_END #endif - -#define YY_ASSERT(E) ((void) (0 && (E))) +#define YY_ASSERT(E) ((void)(0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif +#ifdef YYSTACK_USE_ALLOCA +#if YYSTACK_USE_ALLOCA +#ifdef __GNUC__ +#define YYSTACK_ALLOC __builtin_alloca +#elif defined __BUILTIN_VA_ARG_INCR +#include /* INFRINGES ON USER NAME SPACE */ +#elif defined _AIX +#define YYSTACK_ALLOC __alloca +#elif defined _MSC_VER +#include /* INFRINGES ON USER NAME SPACE */ +#define alloca _alloca +#else +#define YYSTACK_ALLOC alloca +#if !defined _ALLOCA_H && !defined EXIT_SUCCESS +#include /* INFRINGES ON USER NAME SPACE */ +/* Use EXIT_SUCCESS as a witness for stdlib.h. */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#endif +#endif +#endif + +#ifdef YYSTACK_ALLOC +/* Pacify GCC's 'empty if-body' warning. */ +#define YYSTACK_FREE(Ptr) \ + do { /* empty */ \ + ; \ + } while (0) +#ifndef YYSTACK_ALLOC_MAXIMUM +/* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +#endif +#else +#define YYSTACK_ALLOC YYMALLOC +#define YYSTACK_FREE YYFREE +#ifndef YYSTACK_ALLOC_MAXIMUM +#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +#endif +#if (defined __cplusplus && !defined EXIT_SUCCESS && \ + !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) +#include /* INFRINGES ON USER NAME SPACE */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef YYMALLOC +#define YYMALLOC malloc +#if !defined malloc && !defined EXIT_SUCCESS +void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#ifndef YYFREE +#define YYFREE free +#if !defined free && !defined EXIT_SUCCESS +void free(void *); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#endif #endif /* 1 */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ + defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) +#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ - + YYSIZEOF (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) +#define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +#define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF (*yyptr); \ - } \ - while (0) +#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF(*yyptr); \ + } while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif +#ifndef YYCOPY +#if defined __GNUC__ && 1 < __GNUC__ +#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) +#else +#define YYCOPY(Dst, Src, Count) \ + do { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } while (0) +#endif +#endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 70 +#define YYFINAL 70 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 220 +#define YYLAST 220 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 73 +#define YYNTOKENS 73 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 52 +#define YYNNTS 52 /* YYNRULES -- Number of rules. */ -#define YYNRULES 123 +#define YYNRULES 123 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 222 +#define YYNSTATES 222 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 323 - +#define YYMAXUTOK 323 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 70, 68, 2, 69, 2, 71, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 72 -}; +static const yytype_int8 yytranslate[] = {0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 70, + 68, + 2, + 69, + 2, + 71, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 72}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = -{ - 0, 220, 220, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, - 245, 246, 247, 248, 252, 258, 263, 269, 275, 281, - 287, 294, 300, 308, 318, 332, 342, 366, 369, 382, - 394, 419, 423, 428, 434, 437, 438, 439, 440, 444, - 457, 463, 470, 476, 484, 488, 492, 498, 505, 508, - 515, 527, 541, 547, 555, 565, 594, 627, 636, 645, - 661, 664, 667, 670, 673, 682, 685, 690, 696, 699, - 702, 709, 712, 715, 720, 728, 735, 742, 747, 757, - 763, 773, 790, 797, 809, 812, 818, 822, 826, 833, - 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, - 844, 849, 852, 860, 865, 873, 879, 885, 895, 900, - 913, 921, 931, 932 -}; +static const yytype_int16 yyrline[] = {0, + 220, + 220, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 252, + 258, + 263, + 269, + 275, + 281, + 287, + 294, + 300, + 308, + 318, + 332, + 342, + 366, + 369, + 382, + 394, + 419, + 423, + 428, + 434, + 437, + 438, + 439, + 440, + 444, + 457, + 463, + 470, + 476, + 484, + 488, + 492, + 498, + 505, + 508, + 515, + 527, + 541, + 547, + 555, + 565, + 594, + 627, + 636, + 645, + 661, + 664, + 667, + 670, + 673, + 682, + 685, + 690, + 696, + 699, + 702, + 709, + 712, + 715, + 720, + 728, + 735, + 742, + 747, + 757, + 763, + 773, + 790, + 797, + 809, + 812, + 818, + 822, + 826, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 849, + 852, + 860, + 865, + 873, + 879, + 885, + 895, + 900, + 913, + 921, + 931, + 932}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", - "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "ORDER", "TABLE", - "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", - "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", - "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", - "DATE_T", "NOT", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", "INTO", - "VALUES", "FROM", "WHERE", "AND", "OR", "SET", "ON", "LOAD", "DATA", - "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", "JOIN", "EQ", "LT", - "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", "SSS", - "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", - "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", - "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", - "desc_table_stmt", "show_index_stmt", "create_index_stmt", - "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", - "nullable_constraint", "number", "type", "insert_stmt", "values_list", - "value_list", "value", "storage_format", "delete_stmt", "update_stmt", - "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", - "expression", "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", - "relation", "rel_list", "joinClauses", "where", "condition", "comp_op", - "opt_order_by", "sort_list", "sort_unit", "group_by", "load_data_stmt", - "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR -}; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} +static const char *const yytname[] = {"\"end of file\"", + "error", + "\"invalid token\"", + "SEMICOLON", + "AS", + "ASC", + "BY", + "CREATE", + "DROP", + "EXISTS", + "GROUP", + "ORDER", + "TABLE", + "TABLES", + "INDEX", + "CALC", + "SELECT", + "DESC", + "SHOW", + "SYNC", + "INSERT", + "DELETE", + "UPDATE", + "LBRACE", + "RBRACE", + "COMMA", + "TRX_BEGIN", + "TRX_COMMIT", + "TRX_ROLLBACK", + "INT_T", + "IN", + "STRING_T", + "FLOAT_T", + "DATE_T", + "NOT", + "NULL_T", + "NULLABLE", + "HELP", + "EXIT", + "DOT", + "INTO", + "VALUES", + "FROM", + "WHERE", + "AND", + "OR", + "SET", + "ON", + "LOAD", + "DATA", + "INFILE", + "EXPLAIN", + "STORAGE", + "FORMAT", + "INNER", + "JOIN", + "EQ", + "LT", + "GT", + "LE", + "GE", + "NE", + "LIKE", + "IS", + "NUMBER", + "FLOAT", + "ID", + "SSS", + "'+'", + "'-'", + "'*'", + "'/'", + "UMINUS", + "$accept", + "commands", + "command_wrapper", + "exit_stmt", + "help_stmt", + "sync_stmt", + "begin_stmt", + "commit_stmt", + "rollback_stmt", + "drop_table_stmt", + "show_tables_stmt", + "desc_table_stmt", + "show_index_stmt", + "create_index_stmt", + "drop_index_stmt", + "create_table_stmt", + "attr_def_list", + "attr_def", + "nullable_constraint", + "number", + "type", + "insert_stmt", + "values_list", + "value_list", + "value", + "storage_format", + "delete_stmt", + "update_stmt", + "setClauses", + "setClause", + "select_stmt", + "calc_stmt", + "expression_list", + "expression", + "alias", + "aggr_func_expr", + "sub_query_expr", + "rel_attr", + "relation", + "rel_list", + "joinClauses", + "where", + "condition", + "comp_op", + "opt_order_by", + "sort_list", + "sort_unit", + "group_by", + "load_data_stmt", + "explain_stmt", + "set_variable_stmt", + "opt_semicolon", + YY_NULLPTR}; + +static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif #define YYPACT_NINF (-153) -#define yypact_value_is_default(Yyn) \ - ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) \ - 0 +#define yytable_value_is_error(Yyn) 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 135, 24, 72, 66, 66, -58, 67, -153, -26, -20, - -37, -153, -153, -153, -153, -153, -35, -7, 135, 45, - 48, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -10, -1, 11, 19, -12, -153, -153, -153, - -13, -153, 66, -153, -153, -153, -2, -153, -153, -153, - 49, -153, -153, 68, 43, 50, 15, 61, 64, -153, - -153, -153, -153, 92, 71, -153, 73, 95, 97, 59, - 56, -153, 74, -153, 66, 66, 66, 66, 102, 75, - 75, 93, 94, 78, -5, 79, 82, 100, 101, -153, - -153, -153, 114, -153, -153, 29, 29, -153, -153, 66, - -153, 21, 94, -153, 116, 66, -153, 89, -19, -153, - -153, 118, 17, 144, 136, -153, -153, -153, 105, 145, - -153, -5, 146, 134, 58, -5, 78, -153, 162, -153, - -153, -153, -153, 5, 82, 151, 110, 75, 75, 166, - 80, -153, 155, -153, -25, -153, -153, -153, -153, -153, - -153, -153, 148, 66, 66, 66, -153, -153, 113, 120, - 150, -153, -153, 144, 128, 163, 141, 94, 12, -153, - 183, -153, -153, -5, -5, -153, -153, -153, 27, -153, - 154, -153, -153, 175, -153, -153, 147, -153, -153, 66, - -153, 66, -153, 83, 54, 152, -27, -153, 2, -153, - 176, -153, -153, 140, 156, -153, -153, 66, -153, 75, - -153, -153 -}; +static const yytype_int16 yypact[] = {135, + 24, + 72, + 66, + 66, + -58, + 67, + -153, + -26, + -20, + -37, + -153, + -153, + -153, + -153, + -153, + -35, + -7, + 135, + 45, + 48, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -10, + -1, + 11, + 19, + -12, + -153, + -153, + -153, + -13, + -153, + 66, + -153, + -153, + -153, + -2, + -153, + -153, + -153, + 49, + -153, + -153, + 68, + 43, + 50, + 15, + 61, + 64, + -153, + -153, + -153, + -153, + 92, + 71, + -153, + 73, + 95, + 97, + 59, + 56, + -153, + 74, + -153, + 66, + 66, + 66, + 66, + 102, + 75, + 75, + 93, + 94, + 78, + -5, + 79, + 82, + 100, + 101, + -153, + -153, + -153, + 114, + -153, + -153, + 29, + 29, + -153, + -153, + 66, + -153, + 21, + 94, + -153, + 116, + 66, + -153, + 89, + -19, + -153, + -153, + 118, + 17, + 144, + 136, + -153, + -153, + -153, + 105, + 145, + -153, + -5, + 146, + 134, + 58, + -5, + 78, + -153, + 162, + -153, + -153, + -153, + -153, + 5, + 82, + 151, + 110, + 75, + 75, + 166, + 80, + -153, + 155, + -153, + -25, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + 148, + 66, + 66, + 66, + -153, + -153, + 113, + 120, + 150, + -153, + -153, + 144, + 128, + 163, + 141, + 94, + 12, + -153, + 183, + -153, + -153, + -5, + -5, + -153, + -153, + -153, + 27, + -153, + 154, + -153, + -153, + 175, + -153, + -153, + 147, + -153, + -153, + 66, + -153, + 66, + -153, + 83, + 54, + 152, + -27, + -153, + 2, + -153, + 176, + -153, + -153, + 140, + 156, + -153, + -153, + 66, + -153, + 75, + -153, + -153}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_int8 yydefact[] = -{ - 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, - 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 122, 23, 22, 15, 16, 17, 18, 9, 10, 11, - 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 0, 0, 0, 0, 57, 54, 55, - 87, 56, 0, 78, 76, 67, 81, 79, 80, 77, - 0, 32, 31, 0, 0, 0, 0, 0, 0, 120, - 1, 123, 2, 0, 0, 30, 0, 0, 0, 0, - 0, 75, 0, 82, 0, 0, 0, 0, 68, 0, - 0, 0, 94, 0, 0, 0, 0, 0, 0, 86, - 74, 85, 0, 88, 83, 70, 71, 72, 73, 0, - 89, 81, 94, 33, 0, 0, 60, 0, 94, 62, - 121, 0, 0, 37, 0, 35, 84, 69, 0, 90, - 118, 0, 49, 0, 95, 0, 0, 61, 0, 45, - 46, 47, 48, 43, 0, 0, 0, 0, 0, 111, - 0, 52, 0, 109, 0, 99, 100, 101, 102, 103, - 104, 107, 105, 0, 0, 0, 64, 63, 0, 0, - 0, 42, 40, 37, 58, 0, 0, 94, 81, 91, - 0, 65, 50, 0, 0, 110, 108, 106, 96, 97, - 98, 119, 44, 0, 41, 38, 0, 36, 34, 0, - 118, 0, 53, 0, 43, 0, 92, 66, 115, 112, - 113, 51, 39, 0, 0, 117, 116, 0, 59, 0, - 114, 93 -}; +static const yytype_int8 yydefact[] = {0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 27, + 28, + 29, + 25, + 24, + 0, + 0, + 0, + 0, + 122, + 23, + 22, + 15, + 16, + 17, + 18, + 9, + 10, + 11, + 14, + 12, + 13, + 8, + 5, + 7, + 6, + 4, + 3, + 19, + 20, + 21, + 0, + 0, + 0, + 0, + 0, + 57, + 54, + 55, + 87, + 56, + 0, + 78, + 76, + 67, + 81, + 79, + 80, + 77, + 0, + 32, + 31, + 0, + 0, + 0, + 0, + 0, + 0, + 120, + 1, + 123, + 2, + 0, + 0, + 30, + 0, + 0, + 0, + 0, + 0, + 75, + 0, + 82, + 0, + 0, + 0, + 0, + 68, + 0, + 0, + 0, + 94, + 0, + 0, + 0, + 0, + 0, + 0, + 86, + 74, + 85, + 0, + 88, + 83, + 70, + 71, + 72, + 73, + 0, + 89, + 81, + 94, + 33, + 0, + 0, + 60, + 0, + 94, + 62, + 121, + 0, + 0, + 37, + 0, + 35, + 84, + 69, + 0, + 90, + 118, + 0, + 49, + 0, + 95, + 0, + 0, + 61, + 0, + 45, + 46, + 47, + 48, + 43, + 0, + 0, + 0, + 0, + 0, + 111, + 0, + 52, + 0, + 109, + 0, + 99, + 100, + 101, + 102, + 103, + 104, + 107, + 105, + 0, + 0, + 0, + 64, + 63, + 0, + 0, + 0, + 42, + 40, + 37, + 58, + 0, + 0, + 94, + 81, + 91, + 0, + 65, + 50, + 0, + 0, + 110, + 108, + 106, + 96, + 97, + 98, + 119, + 44, + 0, + 41, + 38, + 0, + 36, + 34, + 0, + 118, + 0, + 53, + 0, + 43, + 0, + 92, + 66, + 115, + 112, + 113, + 51, + 39, + 0, + 0, + 117, + 116, + 0, + 59, + 0, + 114, + 93}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -153, -153, 189, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, 36, 69, 6, -153, - -153, -153, -153, 28, -91, -153, -153, -153, -153, 81, - 168, -153, -3, -52, 159, -153, -153, -153, -69, 70, - 0, -103, -152, -153, -153, 3, -153, 16, -153, -153, - -153, -153 -}; +static const yytype_int16 yypgoto[] = {-153, + -153, + 189, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + -153, + 36, + 69, + 6, + -153, + -153, + -153, + -153, + 28, + -91, + -153, + -153, + -153, + -153, + 81, + 168, + -153, + -3, + -52, + 159, + -153, + -153, + -153, + -69, + 70, + 0, + -103, + -152, + -153, + -153, + 3, + -153, + 16, + -153, + -153, + -153, + -153}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = -{ - 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 145, 123, 172, 193, - 143, 34, 132, 150, 54, 197, 35, 36, 118, 119, - 37, 38, 55, 56, 129, 57, 58, 59, 176, 112, - 177, 116, 134, 163, 181, 209, 210, 149, 39, 40, - 41, 72 -}; +static const yytype_uint8 yydefgoto[] = {0, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 145, + 123, + 172, + 193, + 143, + 34, + 132, + 150, + 54, + 197, + 35, + 36, + 118, + 119, + 37, + 38, + 55, + 56, + 129, + 57, + 58, + 59, + 176, + 112, + 177, + 116, + 134, + 163, + 181, + 209, + 210, + 149, + 39, + 40, + 41, + 72}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = -{ - 81, 60, 82, 120, 4, 185, 136, 215, 61, 130, - 79, 46, 189, 190, 64, 137, 82, 164, 165, 216, - 111, 113, 65, 47, 115, 82, 80, 214, 169, 66, - 47, 67, 105, 106, 107, 108, 42, 186, 43, 170, - 151, 171, 68, 78, 166, 70, 139, 206, 140, 141, - 142, 71, 48, 49, 50, 51, 73, 52, 53, 48, - 49, 93, 51, 133, 83, 74, 84, 85, 86, 87, - 84, 85, 86, 87, 200, 128, 102, 75, 83, 178, - 62, 63, 46, 101, 44, 76, 45, 83, 170, 46, - 171, 89, 202, 151, 47, 84, 85, 86, 87, 86, - 87, 47, 164, 165, 182, 183, 127, 211, 183, 91, - 90, 188, 133, 133, 95, 96, 92, 94, 97, 99, - 98, 100, 103, 48, 49, 50, 51, 109, 52, 53, - 48, 49, 50, 51, 114, 52, 53, 115, 126, 131, - 104, 110, 1, 2, 117, 135, 121, 133, 122, 208, - 3, 4, 5, 6, 7, 8, 9, 10, 138, 146, - 147, 11, 12, 13, 153, 208, 124, 125, 154, 144, - 148, 152, 14, 15, 168, 174, 175, 180, 184, 191, - 196, 16, 187, 17, 192, 194, 18, 198, 199, 201, - 155, 156, 157, 158, 159, 160, 161, 162, 164, 204, - 205, 217, 84, 85, 86, 87, 218, 69, 213, 195, - 212, 219, 203, 173, 77, 88, 207, 167, 179, 221, - 220 -}; - -static const yytype_uint8 yycheck[] = -{ - 52, 4, 4, 94, 16, 30, 25, 5, 66, 112, - 23, 23, 164, 165, 40, 118, 4, 44, 45, 17, - 89, 90, 42, 35, 43, 4, 39, 54, 23, 66, - 35, 66, 84, 85, 86, 87, 12, 62, 14, 34, - 131, 36, 49, 46, 135, 0, 29, 199, 31, 32, - 33, 3, 64, 65, 66, 67, 66, 69, 70, 64, - 65, 46, 67, 115, 66, 66, 68, 69, 70, 71, - 68, 69, 70, 71, 177, 54, 79, 66, 66, 148, - 13, 14, 23, 24, 12, 66, 14, 66, 34, 23, - 36, 42, 183, 184, 35, 68, 69, 70, 71, 70, - 71, 35, 44, 45, 24, 25, 109, 24, 25, 66, - 42, 163, 164, 165, 50, 23, 66, 56, 47, 24, - 47, 24, 66, 64, 65, 66, 67, 25, 69, 70, - 64, 65, 66, 67, 41, 69, 70, 43, 24, 23, - 66, 66, 7, 8, 66, 56, 67, 199, 66, 201, - 15, 16, 17, 18, 19, 20, 21, 22, 40, 23, - 55, 26, 27, 28, 30, 217, 66, 66, 34, 25, - 25, 25, 37, 38, 12, 24, 66, 11, 23, 66, - 52, 46, 34, 48, 64, 35, 51, 24, 47, 6, - 56, 57, 58, 59, 60, 61, 62, 63, 44, 24, - 53, 25, 68, 69, 70, 71, 66, 18, 56, 173, - 204, 55, 184, 144, 46, 56, 200, 136, 148, 219, - 217 -}; +static const yytype_uint8 yytable[] = {81, + 60, + 82, + 120, + 4, + 185, + 136, + 215, + 61, + 130, + 79, + 46, + 189, + 190, + 64, + 137, + 82, + 164, + 165, + 216, + 111, + 113, + 65, + 47, + 115, + 82, + 80, + 214, + 169, + 66, + 47, + 67, + 105, + 106, + 107, + 108, + 42, + 186, + 43, + 170, + 151, + 171, + 68, + 78, + 166, + 70, + 139, + 206, + 140, + 141, + 142, + 71, + 48, + 49, + 50, + 51, + 73, + 52, + 53, + 48, + 49, + 93, + 51, + 133, + 83, + 74, + 84, + 85, + 86, + 87, + 84, + 85, + 86, + 87, + 200, + 128, + 102, + 75, + 83, + 178, + 62, + 63, + 46, + 101, + 44, + 76, + 45, + 83, + 170, + 46, + 171, + 89, + 202, + 151, + 47, + 84, + 85, + 86, + 87, + 86, + 87, + 47, + 164, + 165, + 182, + 183, + 127, + 211, + 183, + 91, + 90, + 188, + 133, + 133, + 95, + 96, + 92, + 94, + 97, + 99, + 98, + 100, + 103, + 48, + 49, + 50, + 51, + 109, + 52, + 53, + 48, + 49, + 50, + 51, + 114, + 52, + 53, + 115, + 126, + 131, + 104, + 110, + 1, + 2, + 117, + 135, + 121, + 133, + 122, + 208, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 138, + 146, + 147, + 11, + 12, + 13, + 153, + 208, + 124, + 125, + 154, + 144, + 148, + 152, + 14, + 15, + 168, + 174, + 175, + 180, + 184, + 191, + 196, + 16, + 187, + 17, + 192, + 194, + 18, + 198, + 199, + 201, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 164, + 204, + 205, + 217, + 84, + 85, + 86, + 87, + 218, + 69, + 213, + 195, + 212, + 219, + 203, + 173, + 77, + 88, + 207, + 167, + 179, + 221, + 220}; + +static const yytype_uint8 yycheck[] = {52, + 4, + 4, + 94, + 16, + 30, + 25, + 5, + 66, + 112, + 23, + 23, + 164, + 165, + 40, + 118, + 4, + 44, + 45, + 17, + 89, + 90, + 42, + 35, + 43, + 4, + 39, + 54, + 23, + 66, + 35, + 66, + 84, + 85, + 86, + 87, + 12, + 62, + 14, + 34, + 131, + 36, + 49, + 46, + 135, + 0, + 29, + 199, + 31, + 32, + 33, + 3, + 64, + 65, + 66, + 67, + 66, + 69, + 70, + 64, + 65, + 46, + 67, + 115, + 66, + 66, + 68, + 69, + 70, + 71, + 68, + 69, + 70, + 71, + 177, + 54, + 79, + 66, + 66, + 148, + 13, + 14, + 23, + 24, + 12, + 66, + 14, + 66, + 34, + 23, + 36, + 42, + 183, + 184, + 35, + 68, + 69, + 70, + 71, + 70, + 71, + 35, + 44, + 45, + 24, + 25, + 109, + 24, + 25, + 66, + 42, + 163, + 164, + 165, + 50, + 23, + 66, + 56, + 47, + 24, + 47, + 24, + 66, + 64, + 65, + 66, + 67, + 25, + 69, + 70, + 64, + 65, + 66, + 67, + 41, + 69, + 70, + 43, + 24, + 23, + 66, + 66, + 7, + 8, + 66, + 56, + 67, + 199, + 66, + 201, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 40, + 23, + 55, + 26, + 27, + 28, + 30, + 217, + 66, + 66, + 34, + 25, + 25, + 25, + 37, + 38, + 12, + 24, + 66, + 11, + 23, + 66, + 52, + 46, + 34, + 48, + 64, + 35, + 51, + 24, + 47, + 6, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 44, + 24, + 53, + 25, + 68, + 69, + 70, + 71, + 66, + 18, + 56, + 173, + 204, + 55, + 184, + 144, + 46, + 56, + 200, + 136, + 148, + 219, + 217}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_int8 yystos[] = -{ - 0, 7, 8, 15, 16, 17, 18, 19, 20, 21, - 22, 26, 27, 28, 37, 38, 46, 48, 51, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 94, 99, 100, 103, 104, 121, - 122, 123, 12, 14, 12, 14, 23, 35, 64, 65, - 66, 67, 69, 70, 97, 105, 106, 108, 109, 110, - 105, 66, 13, 14, 40, 42, 66, 66, 49, 75, - 0, 3, 124, 66, 66, 66, 66, 103, 105, 23, - 39, 106, 4, 66, 68, 69, 70, 71, 107, 42, - 42, 66, 66, 46, 56, 50, 23, 47, 47, 24, - 24, 24, 105, 66, 66, 106, 106, 106, 106, 25, - 66, 111, 112, 111, 41, 43, 114, 66, 101, 102, - 97, 67, 66, 90, 66, 66, 24, 105, 54, 107, - 114, 23, 95, 106, 115, 56, 25, 114, 40, 29, - 31, 32, 33, 93, 25, 89, 23, 55, 25, 120, - 96, 97, 25, 30, 34, 56, 57, 58, 59, 60, - 61, 62, 63, 116, 44, 45, 97, 102, 12, 23, - 34, 36, 91, 90, 24, 66, 111, 113, 111, 112, - 11, 117, 24, 25, 23, 30, 62, 34, 106, 115, - 115, 66, 64, 92, 35, 89, 52, 98, 24, 47, - 114, 6, 97, 96, 24, 53, 115, 120, 106, 118, - 119, 24, 91, 56, 54, 5, 17, 25, 66, 55, - 118, 113 -}; +static const yytype_int8 yystos[] = {0, + 7, + 8, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 26, + 27, + 28, + 37, + 38, + 46, + 48, + 51, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 94, + 99, + 100, + 103, + 104, + 121, + 122, + 123, + 12, + 14, + 12, + 14, + 23, + 35, + 64, + 65, + 66, + 67, + 69, + 70, + 97, + 105, + 106, + 108, + 109, + 110, + 105, + 66, + 13, + 14, + 40, + 42, + 66, + 66, + 49, + 75, + 0, + 3, + 124, + 66, + 66, + 66, + 66, + 103, + 105, + 23, + 39, + 106, + 4, + 66, + 68, + 69, + 70, + 71, + 107, + 42, + 42, + 66, + 66, + 46, + 56, + 50, + 23, + 47, + 47, + 24, + 24, + 24, + 105, + 66, + 66, + 106, + 106, + 106, + 106, + 25, + 66, + 111, + 112, + 111, + 41, + 43, + 114, + 66, + 101, + 102, + 97, + 67, + 66, + 90, + 66, + 66, + 24, + 105, + 54, + 107, + 114, + 23, + 95, + 106, + 115, + 56, + 25, + 114, + 40, + 29, + 31, + 32, + 33, + 93, + 25, + 89, + 23, + 55, + 25, + 120, + 96, + 97, + 25, + 30, + 34, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 116, + 44, + 45, + 97, + 102, + 12, + 23, + 34, + 36, + 91, + 90, + 24, + 66, + 111, + 113, + 111, + 112, + 11, + 117, + 24, + 25, + 23, + 30, + 62, + 34, + 106, + 115, + 115, + 66, + 64, + 92, + 35, + 89, + 52, + 98, + 24, + 47, + 114, + 6, + 97, + 96, + 24, + 53, + 115, + 120, + 106, + 118, + 119, + 24, + 91, + 56, + 54, + 5, + 17, + 25, + 66, + 55, + 118, + 113}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr1[] = -{ - 0, 73, 74, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 89, 90, - 90, 91, 91, 91, 92, 93, 93, 93, 93, 94, - 95, 95, 96, 96, 97, 97, 97, 97, 98, 98, - 99, 100, 101, 101, 102, 103, 103, 104, 105, 105, - 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 107, 107, 107, 108, 108, 109, 110, 110, 111, - 112, 112, 113, 113, 114, 114, 115, 115, 115, 116, - 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 117, 117, 118, 118, 119, 119, 119, 120, 121, - 122, 123, 124, 124 -}; +static const yytype_int8 yyr1[] = {0, + 73, + 74, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 89, + 90, + 90, + 91, + 91, + 91, + 92, + 93, + 93, + 93, + 93, + 94, + 95, + 95, + 96, + 96, + 97, + 97, + 97, + 97, + 98, + 98, + 99, + 100, + 101, + 101, + 102, + 103, + 103, + 104, + 105, + 105, + 106, + 106, + 106, + 106, + 106, + 106, + 106, + 106, + 106, + 106, + 106, + 107, + 107, + 107, + 108, + 108, + 109, + 110, + 110, + 111, + 112, + 112, + 113, + 113, + 114, + 114, + 115, + 115, + 115, + 116, + 116, + 116, + 116, + 116, + 116, + 116, + 116, + 116, + 116, + 116, + 116, + 117, + 117, + 118, + 118, + 119, + 119, + 119, + 120, + 121, + 122, + 123, + 124, + 124}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = +static const yytype_int8 yyr2[] = {0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 2, + 2, + 4, + 8, + 5, + 8, + 0, + 3, + 6, + 3, + 2, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 5, + 3, + 5, + 1, + 3, + 1, + 1, + 1, + 1, + 0, + 4, + 4, + 5, + 1, + 3, + 3, + 7, + 9, + 2, + 2, + 4, + 3, + 3, + 3, + 3, + 3, + 2, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 2, + 4, + 3, + 3, + 1, + 3, + 1, + 2, + 4, + 3, + 6, + 0, + 2, + 3, + 3, + 3, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 2, + 1, + 2, + 0, + 3, + 1, + 3, + 1, + 2, + 2, + 0, + 7, + 2, + 4, + 0, + 1}; + +enum { - 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 2, 2, 4, 8, 5, 8, 0, 3, 6, - 3, 2, 1, 0, 1, 1, 1, 1, 1, 5, - 3, 5, 1, 3, 1, 1, 1, 1, 0, 4, - 4, 5, 1, 3, 3, 7, 9, 2, 2, 4, - 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, - 1, 0, 1, 2, 4, 3, 3, 1, 3, 1, - 2, 4, 3, 6, 0, 2, 3, 3, 3, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, - 2, 0, 3, 1, 3, 1, 2, 2, 0, 7, - 2, 4, 0, 1 + YYENOMEM = -2 }; - -enum { YYENOMEM = -2 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK(yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } else { \ + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -980,151 +2713,131 @@ enum { YYENOMEM = -2 }; the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) +#define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) { \ + (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ + } else { \ + (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) - /* Enable debugging if requested. */ #if YYDEBUG -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +#ifndef YYFPRINTF +#include /* INFRINGES ON USER NAME SPACE */ +#define YYFPRINTF fprintf +#endif +#define YYDPRINTF(Args) \ + do { \ + if (yydebug) \ + YYFPRINTF Args; \ + } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YYLOCATION_PRINT +#ifndef YYLOCATION_PRINT -# if defined YY_LOCATION_PRINT +#if defined YY_LOCATION_PRINT - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) { + res += YYFPRINTF(yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF(yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) { + if (yylocp->first_line < yylocp->last_line) { + res += YYFPRINTF(yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF(yyo, ".%d", end_col); + } else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF(yyo, "-%d", end_col); + } return res; } -# define YYLOCATION_PRINT yy_location_print_ - - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) - -# else +#define YYLOCATION_PRINT yy_location_print_ -# define YYLOCATION_PRINT(File, Loc) ((void) 0) - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT YYLOCATION_PRINT +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -# endif -# endif /* !defined YYLOCATION_PRINT */ +#else +#define YYLOCATION_PRINT(File, Loc) ((void)0) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT YYLOCATION_PRINT -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +#endif +#endif /* !defined YYLOCATION_PRINT */ +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ + do { \ + if (yydebug) { \ + YYFPRINTF(stderr, "%s ", Title); \ + yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF(stderr, "\n"); \ + } \ + } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyoutput); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); - YYLOCATION_PRINT (yyo, yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF (yyo, ")"); + YYLOCATION_PRINT(yyo, yylocationp); + YYFPRINTF(yyo, ": "); + yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF(yyo, ")"); } /*------------------------------------------------------------------. @@ -1132,70 +2845,66 @@ yy_symbol_print (FILE *yyo, | TOP (included). | `------------------------------------------------------------------*/ -static void -yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); + YYFPRINTF(stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) { + int yybot = *yybottom; + YYFPRINTF(stderr, " %d", yybot); + } + YYFPRINTF(stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - +#define YY_STACK_PRINT(Bottom, Top) \ + do { \ + if (yydebug) \ + yy_stack_print((Bottom), (Top)); \ + } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, + ParsedSqlResult *sql_result, void *scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", - yyrule - 1, yylno); + YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); - YYFPRINTF (stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) { + YYFPRINTF(stderr, " $%d = ", yyi + 1); + yy_symbol_print(stderr, + YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), + sql_string, + sql_result, + scanner); + YYFPRINTF(stderr, "\n"); + } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ -} while (0) +#define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug) \ + yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ + } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) +#define YYDPRINTF(Args) ((void)0) +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +#define YY_STACK_PRINT(Bottom, Top) +#define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -1206,16 +2915,15 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 +#define YYMAXDEPTH 10000 #endif - /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -1224,69 +2932,59 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default(yyn)) { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } - - - #ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else +#if defined __GLIBC__ && defined _STRING_H +#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) +#else /* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) +static YYPTRDIFF_T yystrlen(const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -# endif +#endif #endif #ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +#define yystpcpy stpcpy +#else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) +static char *yystpcpy(char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -1294,7 +2992,7 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } -# endif +#endif #endif #ifndef yytnamerr @@ -1305,52 +3003,45 @@ yystpcpy (char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) +static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) { - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': + if (*yystr == '"') { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) { + case '\'': + case ',': goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes:; + } if (yyres) - return yystpcpy (yyres, yystr) - yyres; + return yystpcpy(yyres, yystr) - yyres; else - return yystrlen (yystr); + return yystrlen(yystr); } #endif - -static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -1377,19 +3068,17 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) - { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -1401,11 +3090,12 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) +static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) { - enum { YYARGS_MAX = 5 }; + enum + { + YYARGS_MAX = 5 + }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -1415,16 +3105,13 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) - { -#define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break + switch (yycount) { +#define YYCASE_(N, S) \ + case N: yyformat = S; break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1433,134 +3120,118 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; + yysize = yystrlen(yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) { + YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) { + *yymsg_alloc = 2 * yysize; + if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { + yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } else { + ++yyp; + ++yyformat; + } } return 0; } - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, + const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyvaluep); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - - - - /*----------. | yyparse. | `----------*/ -int -yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { -/* Lookahead token kind. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; + /* Lookahead token kind. */ + int yychar; + + /* The semantic value of the lookahead symbol. */ + /* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ + YY_INITIAL_VALUE(static YYSTYPE yyval_default;) + YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); + + /* Location data for the lookahead symbol. */ + static YYLTYPE yyloc_default +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = {1, 1, 1, 1} +#endif + ; + YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -1576,24 +3247,23 @@ YYLTYPE yylloc = yyloc_default; YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF ((stderr, "Starting parse\n")); + YYDPRINTF((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; - /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -1602,93 +3272,90 @@ YYLTYPE yylloc = yyloc_default; have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YYDPRINTF((stderr, "Entering state %d\n", yystate)); + YY_ASSERT(0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST (yy_state_t, yystate); + *yyssp = YY_CAST(yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else + { + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +#if defined yyoverflow { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -# if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * YYSIZEOF (*yyssp), - &yyvs1, yysize * YYSIZEOF (*yyvsp), - &yyls1, yysize * YYSIZEOF (*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow(YY_("memory exhausted"), + &yyss1, + yysize * YYSIZEOF(*yyssp), + &yyvs1, + yysize * YYSIZEOF(*yyvsp), + &yyls1, + yysize * YYSIZEOF(*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +#else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + YYNOMEM; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); + if (!yyptr) YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = - YY_CAST (union yyalloc *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); - if (! yyptr) - YYNOMEM; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif + YYSTACK_RELOCATE(yyss_alloc, yyss); + YYSTACK_RELOCATE(yyvs_alloc, yyvs); + YYSTACK_RELOCATE(yyls_alloc, yyls); +#undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE(yyss1); + } +#endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF ((stderr, "Stack size increased to %ld\n", - YY_CAST (long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; goto yybackup; - /*-----------. | yybackup. | `-----------*/ @@ -1698,40 +3365,34 @@ YYLTYPE yylloc = yyloc_default; /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yypact_value_is_default(yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token\n")); - yychar = yylex (&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) { + YYDPRINTF((stderr, "Reading a token\n")); + yychar = yylex(&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) - { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else if (yychar == YYerror) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF((stderr, "Now at end of input.\n")); + } else if (yychar == YYerror) { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } else { + yytoken = YYTRANSLATE(yychar); + YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -1739,13 +3400,12 @@ YYLTYPE yylloc = yyloc_default; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) { + if (yytable_value_is_error(yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -1753,7 +3413,7 @@ YYLTYPE yylloc = yyloc_default; yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -1764,7 +3424,6 @@ YYLTYPE yylloc = yyloc_default; yychar = YYEMPTY; goto yynewstate; - /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -1774,7 +3433,6 @@ YYLTYPE yylloc = yyloc_default; goto yyerrlab; goto yyreduce; - /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -1790,119 +3448,118 @@ YYLTYPE yylloc = yyloc_default; users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + yyval = yyvsp[1 - yylen]; /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: /* commands: command_wrapper opt_semicolon */ + YY_REDUCE_PRINT(yyn); + switch (yyn) { + case 2: /* commands: command_wrapper opt_semicolon */ #line 221 "yacc_sql.y" - { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } #line 1808 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ + case 24: /* exit_stmt: EXIT */ #line 252 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } #line 1817 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ + case 25: /* help_stmt: HELP */ #line 258 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } #line 1825 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ + case 26: /* sync_stmt: SYNC */ #line 263 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } #line 1833 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ + case 27: /* begin_stmt: TRX_BEGIN */ #line 269 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } #line 1841 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ + case 28: /* commit_stmt: TRX_COMMIT */ #line 275 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } #line 1849 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ + case 29: /* rollback_stmt: TRX_ROLLBACK */ #line 281 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } #line 1857 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ + case 30: /* drop_table_stmt: DROP TABLE ID */ #line 287 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1867 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ + case 31: /* show_tables_stmt: SHOW TABLES */ #line 294 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } #line 1875 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ + case 32: /* desc_table_stmt: DESC ID */ #line 300 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1885 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ #line 309 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1896 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ + case 34: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ #line 319 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name = (yyvsp[-1].string); + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name = (yyvsp[-1].string); free((yyvsp[-5].string)); free((yyvsp[-3].string)); free((yyvsp[-1].string)); @@ -1910,11 +3567,11 @@ YYLTYPE yylloc = yyloc_default; #line 1911 "yacc_sql.cpp" break; - case 35: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 35: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 333 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); @@ -1922,12 +3579,12 @@ YYLTYPE yylloc = yyloc_default; #line 1923 "yacc_sql.cpp" break; - case 36: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 36: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 343 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-5].string); + create_table.relation_name = (yyvsp[-5].string); free((yyvsp[-5].string)); std::vector *src_attrs = (yyvsp[-2].attr_infos); @@ -1947,7 +3604,7 @@ YYLTYPE yylloc = yyloc_default; #line 1948 "yacc_sql.cpp" break; - case 37: /* attr_def_list: %empty */ + case 37: /* attr_def_list: %empty */ #line 366 "yacc_sql.y" { (yyval.attr_infos) = nullptr; @@ -1955,7 +3612,7 @@ YYLTYPE yylloc = yyloc_default; #line 1956 "yacc_sql.cpp" break; - case 38: /* attr_def_list: COMMA attr_def attr_def_list */ + case 38: /* attr_def_list: COMMA attr_def attr_def_list */ #line 370 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -1969,13 +3626,13 @@ YYLTYPE yylloc = yyloc_default; #line 1970 "yacc_sql.cpp" break; - case 39: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ + case 39: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ #line 383 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; @@ -1985,10 +3642,10 @@ YYLTYPE yylloc = yyloc_default; #line 1986 "yacc_sql.cpp" break; - case 40: /* attr_def: ID type nullable_constraint */ + case 40: /* attr_def: ID type nullable_constraint */ #line 395 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -2011,7 +3668,7 @@ YYLTYPE yylloc = yyloc_default; #line 2012 "yacc_sql.cpp" break; - case 41: /* nullable_constraint: NOT NULL_T */ + case 41: /* nullable_constraint: NOT NULL_T */ #line 420 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false @@ -2019,7 +3676,7 @@ YYLTYPE yylloc = yyloc_default; #line 2020 "yacc_sql.cpp" break; - case 42: /* nullable_constraint: NULLABLE */ + case 42: /* nullable_constraint: NULLABLE */ #line 424 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true @@ -2027,7 +3684,7 @@ YYLTYPE yylloc = yyloc_default; #line 2028 "yacc_sql.cpp" break; - case 43: /* nullable_constraint: %empty */ + case 43: /* nullable_constraint: %empty */ #line 428 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL @@ -2035,40 +3692,50 @@ YYLTYPE yylloc = yyloc_default; #line 2036 "yacc_sql.cpp" break; - case 44: /* number: NUMBER */ + case 44: /* number: NUMBER */ #line 434 "yacc_sql.y" - {(yyval.number) = (yyvsp[0].number);} + { + (yyval.number) = (yyvsp[0].number); + } #line 2042 "yacc_sql.cpp" break; - case 45: /* type: INT_T */ + case 45: /* type: INT_T */ #line 437 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::INTS); } + { + (yyval.number) = static_cast(AttrType::INTS); + } #line 2048 "yacc_sql.cpp" break; - case 46: /* type: STRING_T */ + case 46: /* type: STRING_T */ #line 438 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::CHARS); } + { + (yyval.number) = static_cast(AttrType::CHARS); + } #line 2054 "yacc_sql.cpp" break; - case 47: /* type: FLOAT_T */ + case 47: /* type: FLOAT_T */ #line 439 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::FLOATS); } + { + (yyval.number) = static_cast(AttrType::FLOATS); + } #line 2060 "yacc_sql.cpp" break; - case 48: /* type: DATE_T */ + case 48: /* type: DATE_T */ #line 440 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::DATES); } + { + (yyval.number) = static_cast(AttrType::DATES); + } #line 2066 "yacc_sql.cpp" break; - case 49: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 49: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 445 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -2079,7 +3746,7 @@ YYLTYPE yylloc = yyloc_default; #line 2080 "yacc_sql.cpp" break; - case 50: /* values_list: LBRACE value_list RBRACE */ + case 50: /* values_list: LBRACE value_list RBRACE */ #line 458 "yacc_sql.y" { (yyval.values_list) = new std::vector>; @@ -2089,7 +3756,7 @@ YYLTYPE yylloc = yyloc_default; #line 2090 "yacc_sql.cpp" break; - case 51: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 51: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 464 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); @@ -2098,7 +3765,7 @@ YYLTYPE yylloc = yyloc_default; #line 2099 "yacc_sql.cpp" break; - case 52: /* value_list: value */ + case 52: /* value_list: value */ #line 471 "yacc_sql.y" { (yyval.value_list) = new std::vector; @@ -2108,7 +3775,7 @@ YYLTYPE yylloc = yyloc_default; #line 2109 "yacc_sql.cpp" break; - case 53: /* value_list: value_list COMMA value */ + case 53: /* value_list: value_list COMMA value */ #line 477 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); @@ -2117,28 +3784,28 @@ YYLTYPE yylloc = yyloc_default; #line 2118 "yacc_sql.cpp" break; - case 54: /* value: NUMBER */ + case 54: /* value: NUMBER */ #line 484 "yacc_sql.y" - { + { (yyval.value) = new Value((int)(yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2127 "yacc_sql.cpp" break; - case 55: /* value: FLOAT */ + case 55: /* value: FLOAT */ #line 488 "yacc_sql.y" - { + { (yyval.value) = new Value((float)(yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2136 "yacc_sql.cpp" break; - case 56: /* value: SSS */ + case 56: /* value: SSS */ #line 492 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); + { + char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); @@ -2146,15 +3813,15 @@ YYLTYPE yylloc = yyloc_default; #line 2147 "yacc_sql.cpp" break; - case 57: /* value: NULL_T */ + case 57: /* value: NULL_T */ #line 498 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } #line 2155 "yacc_sql.cpp" break; - case 58: /* storage_format: %empty */ + case 58: /* storage_format: %empty */ #line 505 "yacc_sql.y" { (yyval.string) = nullptr; @@ -2162,7 +3829,7 @@ YYLTYPE yylloc = yyloc_default; #line 2163 "yacc_sql.cpp" break; - case 59: /* storage_format: STORAGE FORMAT EQ ID */ + case 59: /* storage_format: STORAGE FORMAT EQ ID */ #line 509 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); @@ -2170,10 +3837,10 @@ YYLTYPE yylloc = yyloc_default; #line 2171 "yacc_sql.cpp" break; - case 60: /* delete_stmt: DELETE FROM ID where */ + case 60: /* delete_stmt: DELETE FROM ID where */ #line 516 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); @@ -2183,10 +3850,10 @@ YYLTYPE yylloc = yyloc_default; #line 2184 "yacc_sql.cpp" break; - case 61: /* update_stmt: UPDATE ID SET setClauses where */ + case 61: /* update_stmt: UPDATE ID SET setClauses where */ #line 528 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -2198,7 +3865,7 @@ YYLTYPE yylloc = yyloc_default; #line 2199 "yacc_sql.cpp" break; - case 62: /* setClauses: setClause */ + case 62: /* setClauses: setClause */ #line 542 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; @@ -2208,7 +3875,7 @@ YYLTYPE yylloc = yyloc_default; #line 2209 "yacc_sql.cpp" break; - case 63: /* setClauses: setClauses COMMA setClause */ + case 63: /* setClauses: setClauses COMMA setClause */ #line 548 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); @@ -2217,18 +3884,18 @@ YYLTYPE yylloc = yyloc_default; #line 2218 "yacc_sql.cpp" break; - case 64: /* setClause: ID EQ value */ + case 64: /* setClause: ID EQ value */ #line 556 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); + (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } #line 2229 "yacc_sql.cpp" break; - case 65: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ + case 65: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ #line 566 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2261,7 +3928,7 @@ YYLTYPE yylloc = yyloc_default; #line 2262 "yacc_sql.cpp" break; - case 66: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ + case 66: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ #line 595 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2276,7 +3943,8 @@ YYLTYPE yylloc = yyloc_default; } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); + ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -2284,7 +3952,8 @@ YYLTYPE yylloc = yyloc_default; if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -2295,7 +3964,7 @@ YYLTYPE yylloc = yyloc_default; #line 2296 "yacc_sql.cpp" break; - case 67: /* calc_stmt: CALC expression_list */ + case 67: /* calc_stmt: CALC expression_list */ #line 628 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -2305,7 +3974,7 @@ YYLTYPE yylloc = yyloc_default; #line 2306 "yacc_sql.cpp" break; - case 68: /* expression_list: expression alias */ + case 68: /* expression_list: expression alias */ #line 637 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; @@ -2318,7 +3987,7 @@ YYLTYPE yylloc = yyloc_default; #line 2319 "yacc_sql.cpp" break; - case 69: /* expression_list: expression alias COMMA expression_list */ + case 69: /* expression_list: expression alias COMMA expression_list */ #line 646 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -2329,47 +3998,51 @@ YYLTYPE yylloc = yyloc_default; if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } #line 2336 "yacc_sql.cpp" break; - case 70: /* expression: expression '+' expression */ + case 70: /* expression: expression '+' expression */ #line 661 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2344 "yacc_sql.cpp" break; - case 71: /* expression: expression '-' expression */ + case 71: /* expression: expression '-' expression */ #line 664 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2352 "yacc_sql.cpp" break; - case 72: /* expression: expression '*' expression */ + case 72: /* expression: expression '*' expression */ #line 667 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2360 "yacc_sql.cpp" break; - case 73: /* expression: expression '/' expression */ + case 73: /* expression: expression '/' expression */ #line 670 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2368 "yacc_sql.cpp" break; - case 74: /* expression: LBRACE expression_list RBRACE */ + case 74: /* expression: LBRACE expression_list RBRACE */ #line 673 "yacc_sql.y" - { + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -2381,17 +4054,18 @@ YYLTYPE yylloc = yyloc_default; #line 2382 "yacc_sql.cpp" break; - case 75: /* expression: '-' expression */ + case 75: /* expression: '-' expression */ #line 682 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } #line 2390 "yacc_sql.cpp" break; - case 76: /* expression: value */ + case 76: /* expression: value */ #line 685 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); @@ -2399,86 +4073,86 @@ YYLTYPE yylloc = yyloc_default; #line 2400 "yacc_sql.cpp" break; - case 77: /* expression: rel_attr */ + case 77: /* expression: rel_attr */ #line 690 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } #line 2411 "yacc_sql.cpp" break; - case 78: /* expression: '*' */ + case 78: /* expression: '*' */ #line 696 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } #line 2419 "yacc_sql.cpp" break; - case 79: /* expression: aggr_func_expr */ + case 79: /* expression: aggr_func_expr */ #line 699 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } #line 2427 "yacc_sql.cpp" break; - case 80: /* expression: sub_query_expr */ + case 80: /* expression: sub_query_expr */ #line 702 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } #line 2435 "yacc_sql.cpp" break; - case 81: /* alias: %empty */ + case 81: /* alias: %empty */ #line 709 "yacc_sql.y" - { + { (yyval.string) = nullptr; } #line 2443 "yacc_sql.cpp" break; - case 82: /* alias: ID */ + case 82: /* alias: ID */ #line 712 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2451 "yacc_sql.cpp" break; - case 83: /* alias: AS ID */ + case 83: /* alias: AS ID */ #line 715 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2459 "yacc_sql.cpp" break; - case 84: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 84: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 721 "yacc_sql.y" { - if((*(yyvsp[-1].expression_list)).size() != 1) { - (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); - } else { - (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); - } + if ((*(yyvsp[-1].expression_list)).size() != 1) { + (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); + } else { + (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); + } } #line 2471 "yacc_sql.cpp" break; - case 85: /* aggr_func_expr: ID LBRACE RBRACE */ + case 85: /* aggr_func_expr: ID LBRACE RBRACE */ #line 729 "yacc_sql.y" - { - (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); - } + { + (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); + } #line 2479 "yacc_sql.cpp" break; - case 86: /* sub_query_expr: LBRACE select_stmt RBRACE */ + case 86: /* sub_query_expr: LBRACE select_stmt RBRACE */ #line 736 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); @@ -2486,20 +4160,20 @@ YYLTYPE yylloc = yyloc_default; #line 2487 "yacc_sql.cpp" break; - case 87: /* rel_attr: ID */ + case 87: /* rel_attr: ID */ #line 742 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 2497 "yacc_sql.cpp" break; - case 88: /* rel_attr: ID DOT ID */ + case 88: /* rel_attr: ID DOT ID */ #line 747 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); @@ -2508,22 +4182,22 @@ YYLTYPE yylloc = yyloc_default; #line 2509 "yacc_sql.cpp" break; - case 89: /* relation: ID */ + case 89: /* relation: ID */ #line 757 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2517 "yacc_sql.cpp" break; - case 90: /* rel_list: relation alias */ + case 90: /* rel_list: relation alias */ #line 763 "yacc_sql.y" - { + { (yyval.relation_list) = new std::vector(); - if(nullptr!=(yyvsp[0].string)){ - (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); + if (nullptr != (yyvsp[0].string)) { + (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); free((yyvsp[0].string)); - }else{ + } else { (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); @@ -2531,18 +4205,19 @@ YYLTYPE yylloc = yyloc_default; #line 2532 "yacc_sql.cpp" break; - case 91: /* rel_list: relation alias COMMA rel_list */ + case 91: /* rel_list: relation alias COMMA rel_list */ #line 773 "yacc_sql.y" - { + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if(nullptr!=(yyvsp[-2].string)){ - (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); + if (nullptr != (yyvsp[-2].string)) { + (yyval.relation_list) + ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); free((yyvsp[-2].string)); - }else{ + } else { (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); @@ -2550,7 +4225,7 @@ YYLTYPE yylloc = yyloc_default; #line 2551 "yacc_sql.cpp" break; - case 92: /* joinClauses: relation ON condition */ + case 92: /* joinClauses: relation ON condition */ #line 791 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; @@ -2561,19 +4236,20 @@ YYLTYPE yylloc = yyloc_default; #line 2562 "yacc_sql.cpp" break; - case 93: /* joinClauses: relation ON condition INNER JOIN joinClauses */ + case 93: /* joinClauses: relation ON condition INNER JOIN joinClauses */ #line 798 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } #line 2574 "yacc_sql.cpp" break; - case 94: /* where: %empty */ + case 94: /* where: %empty */ #line 809 "yacc_sql.y" { (yyval.expression) = nullptr; @@ -2581,15 +4257,15 @@ YYLTYPE yylloc = yyloc_default; #line 2582 "yacc_sql.cpp" break; - case 95: /* where: WHERE condition */ + case 95: /* where: WHERE condition */ #line 812 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + { + (yyval.expression) = (yyvsp[0].expression); } #line 2590 "yacc_sql.cpp" break; - case 96: /* condition: expression comp_op expression */ + case 96: /* condition: expression comp_op expression */ #line 819 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); @@ -2597,95 +4273,121 @@ YYLTYPE yylloc = yyloc_default; #line 2598 "yacc_sql.cpp" break; - case 97: /* condition: condition AND condition */ + case 97: /* condition: condition AND condition */ #line 823 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2606 "yacc_sql.cpp" break; - case 98: /* condition: condition OR condition */ + case 98: /* condition: condition OR condition */ #line 827 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2614 "yacc_sql.cpp" break; - case 99: /* comp_op: EQ */ + case 99: /* comp_op: EQ */ #line 833 "yacc_sql.y" - { (yyval.comp) = EQUAL_TO; } + { + (yyval.comp) = EQUAL_TO; + } #line 2620 "yacc_sql.cpp" break; - case 100: /* comp_op: LT */ + case 100: /* comp_op: LT */ #line 834 "yacc_sql.y" - { (yyval.comp) = LESS_THAN; } + { + (yyval.comp) = LESS_THAN; + } #line 2626 "yacc_sql.cpp" break; - case 101: /* comp_op: GT */ + case 101: /* comp_op: GT */ #line 835 "yacc_sql.y" - { (yyval.comp) = GREAT_THAN; } + { + (yyval.comp) = GREAT_THAN; + } #line 2632 "yacc_sql.cpp" break; - case 102: /* comp_op: LE */ + case 102: /* comp_op: LE */ #line 836 "yacc_sql.y" - { (yyval.comp) = LESS_EQUAL; } + { + (yyval.comp) = LESS_EQUAL; + } #line 2638 "yacc_sql.cpp" break; - case 103: /* comp_op: GE */ + case 103: /* comp_op: GE */ #line 837 "yacc_sql.y" - { (yyval.comp) = GREAT_EQUAL; } + { + (yyval.comp) = GREAT_EQUAL; + } #line 2644 "yacc_sql.cpp" break; - case 104: /* comp_op: NE */ + case 104: /* comp_op: NE */ #line 838 "yacc_sql.y" - { (yyval.comp) = NOT_EQUAL; } + { + (yyval.comp) = NOT_EQUAL; + } #line 2650 "yacc_sql.cpp" break; - case 105: /* comp_op: IS */ + case 105: /* comp_op: IS */ #line 839 "yacc_sql.y" - { (yyval.comp) = OP_IS; } + { + (yyval.comp) = OP_IS; + } #line 2656 "yacc_sql.cpp" break; - case 106: /* comp_op: IS NOT */ + case 106: /* comp_op: IS NOT */ #line 840 "yacc_sql.y" - { (yyval.comp) = OP_IS_NOT; } + { + (yyval.comp) = OP_IS_NOT; + } #line 2662 "yacc_sql.cpp" break; - case 107: /* comp_op: LIKE */ + case 107: /* comp_op: LIKE */ #line 841 "yacc_sql.y" - { (yyval.comp) = LIKE_OP;} + { + (yyval.comp) = LIKE_OP; + } #line 2668 "yacc_sql.cpp" break; - case 108: /* comp_op: NOT LIKE */ + case 108: /* comp_op: NOT LIKE */ #line 842 "yacc_sql.y" - {(yyval.comp) = NOT_LIKE_OP;} + { + (yyval.comp) = NOT_LIKE_OP; + } #line 2674 "yacc_sql.cpp" break; - case 109: /* comp_op: IN */ + case 109: /* comp_op: IN */ #line 843 "yacc_sql.y" - { (yyval.comp) = IN_OP; } + { + (yyval.comp) = IN_OP; + } #line 2680 "yacc_sql.cpp" break; - case 110: /* comp_op: NOT IN */ + case 110: /* comp_op: NOT IN */ #line 844 "yacc_sql.y" - { (yyval.comp) = NOT_IN_OP; } + { + (yyval.comp) = NOT_IN_OP; + } #line 2686 "yacc_sql.cpp" break; - case 111: /* opt_order_by: %empty */ + case 111: /* opt_order_by: %empty */ #line 849 "yacc_sql.y" { (yyval.orderby_list) = nullptr; @@ -2693,64 +4395,64 @@ YYLTYPE yylloc = yyloc_default; #line 2694 "yacc_sql.cpp" break; - case 112: /* opt_order_by: ORDER BY sort_list */ + case 112: /* opt_order_by: ORDER BY sort_list */ #line 853 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } #line 2703 "yacc_sql.cpp" break; - case 113: /* sort_list: sort_unit */ + case 113: /* sort_list: sort_unit */ #line 861 "yacc_sql.y" - { + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } + } #line 2712 "yacc_sql.cpp" break; - case 114: /* sort_list: sort_unit COMMA sort_list */ + case 114: /* sort_list: sort_unit COMMA sort_list */ #line 866 "yacc_sql.y" - { + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } + } #line 2721 "yacc_sql.cpp" break; - case 115: /* sort_unit: expression */ + case 115: /* sort_unit: expression */ #line 874 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2731 "yacc_sql.cpp" break; - case 116: /* sort_unit: expression DESC */ + case 116: /* sort_unit: expression DESC */ #line 880 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } + } #line 2741 "yacc_sql.cpp" break; - case 117: /* sort_unit: expression ASC */ + case 117: /* sort_unit: expression ASC */ #line 886 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2751 "yacc_sql.cpp" break; - case 118: /* group_by: %empty */ + case 118: /* group_by: %empty */ #line 895 "yacc_sql.y" { (yyval.expression_list) = nullptr; @@ -2758,33 +4460,33 @@ YYLTYPE yylloc = yyloc_default; #line 2759 "yacc_sql.cpp" break; - case 119: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ + case 119: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ #line 901 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } #line 2773 "yacc_sql.cpp" break; - case 120: /* explain_stmt: EXPLAIN command_wrapper */ + case 120: /* explain_stmt: EXPLAIN command_wrapper */ #line 914 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } #line 2782 "yacc_sql.cpp" break; - case 121: /* set_variable_stmt: SET ID EQ value */ + case 121: /* set_variable_stmt: SET ID EQ value */ #line 922 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); @@ -2793,11 +4495,10 @@ YYLTYPE yylloc = yyloc_default; #line 2794 "yacc_sql.cpp" break; - #line 2798 "yacc_sql.cpp" - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -2809,9 +4510,9 @@ YYLTYPE yylloc = yyloc_default; case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; *++yyvsp = yyval; @@ -2822,84 +4523,67 @@ YYLTYPE yylloc = yyloc_default; number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp - ? yytable[yyi] - : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; - /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) - { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } - } - yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; + if (!yyerrstatus) { + ++yynerrs; + { + yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) { + if (yymsg != yymsgbuf) + YYSTACK_FREE(yymsg); + yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); + if (yymsg) { + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } else { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } } + yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } + } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; - } + if (yychar <= YYEOF) { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else { + yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; } + } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; - /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -2912,45 +4596,40 @@ YYLTYPE yylloc = yyloc_default; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); yystate = *yyssp; goto yyerrlab1; - /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) { + yyn = yypact[yystate]; + if (!yypact_value_is_default(yyn)) { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + yystate = *yyssp; + YY_STACK_PRINT(yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -2958,15 +4637,14 @@ YYLTYPE yylloc = yyloc_default; yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; - /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -2974,7 +4652,6 @@ YYLTYPE yylloc = yyloc_default; yyresult = 0; goto yyreturnlab; - /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -2982,44 +4659,38 @@ YYLTYPE yylloc = yyloc_default; yyresult = 1; goto yyreturnlab; - /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; - /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE(yychar); + yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - } + YYPOPSTACK(yylen); + YY_STACK_PRINT(yyss, yyssp); + while (yyssp != yyss) { + yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE (yyss); + YYSTACK_FREE(yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); + YYSTACK_FREE(yymsg); return yyresult; } @@ -3028,7 +4699,8 @@ YYLTYPE yylloc = yyloc_default; //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) { +int sql_parse(const char *s, ParsedSqlResult *sql_result) +{ yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index c2e50530..f2e304ad 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -# define YY_YY_YACC_SQL_HPP_INCLUDED +#define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -# define YYDEBUG 0 +#define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,121 +47,120 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - ORDER = 266, /* ORDER */ - TABLE = 267, /* TABLE */ - TABLES = 268, /* TABLES */ - INDEX = 269, /* INDEX */ - CALC = 270, /* CALC */ - SELECT = 271, /* SELECT */ - DESC = 272, /* DESC */ - SHOW = 273, /* SHOW */ - SYNC = 274, /* SYNC */ - INSERT = 275, /* INSERT */ - DELETE = 276, /* DELETE */ - UPDATE = 277, /* UPDATE */ - LBRACE = 278, /* LBRACE */ - RBRACE = 279, /* RBRACE */ - COMMA = 280, /* COMMA */ - TRX_BEGIN = 281, /* TRX_BEGIN */ - TRX_COMMIT = 282, /* TRX_COMMIT */ - TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ - INT_T = 284, /* INT_T */ - IN = 285, /* IN */ - STRING_T = 286, /* STRING_T */ - FLOAT_T = 287, /* FLOAT_T */ - DATE_T = 288, /* DATE_T */ - NOT = 289, /* NOT */ - NULL_T = 290, /* NULL_T */ - NULLABLE = 291, /* NULLABLE */ - HELP = 292, /* HELP */ - EXIT = 293, /* EXIT */ - DOT = 294, /* DOT */ - INTO = 295, /* INTO */ - VALUES = 296, /* VALUES */ - FROM = 297, /* FROM */ - WHERE = 298, /* WHERE */ - AND = 299, /* AND */ - OR = 300, /* OR */ - SET = 301, /* SET */ - ON = 302, /* ON */ - LOAD = 303, /* LOAD */ - DATA = 304, /* DATA */ - INFILE = 305, /* INFILE */ - EXPLAIN = 306, /* EXPLAIN */ - STORAGE = 307, /* STORAGE */ - FORMAT = 308, /* FORMAT */ - INNER = 309, /* INNER */ - JOIN = 310, /* JOIN */ - EQ = 311, /* EQ */ - LT = 312, /* LT */ - GT = 313, /* GT */ - LE = 314, /* LE */ - GE = 315, /* GE */ - NE = 316, /* NE */ - LIKE = 317, /* LIKE */ - IS = 318, /* IS */ - NUMBER = 319, /* NUMBER */ - FLOAT = 320, /* FLOAT */ - ID = 321, /* ID */ - SSS = 322, /* SSS */ - UMINUS = 323 /* UMINUS */ - }; - typedef enum yytokentype yytoken_kind_t; +#define YYTOKENTYPE +enum yytokentype +{ + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + ORDER = 266, /* ORDER */ + TABLE = 267, /* TABLE */ + TABLES = 268, /* TABLES */ + INDEX = 269, /* INDEX */ + CALC = 270, /* CALC */ + SELECT = 271, /* SELECT */ + DESC = 272, /* DESC */ + SHOW = 273, /* SHOW */ + SYNC = 274, /* SYNC */ + INSERT = 275, /* INSERT */ + DELETE = 276, /* DELETE */ + UPDATE = 277, /* UPDATE */ + LBRACE = 278, /* LBRACE */ + RBRACE = 279, /* RBRACE */ + COMMA = 280, /* COMMA */ + TRX_BEGIN = 281, /* TRX_BEGIN */ + TRX_COMMIT = 282, /* TRX_COMMIT */ + TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ + INT_T = 284, /* INT_T */ + IN = 285, /* IN */ + STRING_T = 286, /* STRING_T */ + FLOAT_T = 287, /* FLOAT_T */ + DATE_T = 288, /* DATE_T */ + NOT = 289, /* NOT */ + NULL_T = 290, /* NULL_T */ + NULLABLE = 291, /* NULLABLE */ + HELP = 292, /* HELP */ + EXIT = 293, /* EXIT */ + DOT = 294, /* DOT */ + INTO = 295, /* INTO */ + VALUES = 296, /* VALUES */ + FROM = 297, /* FROM */ + WHERE = 298, /* WHERE */ + AND = 299, /* AND */ + OR = 300, /* OR */ + SET = 301, /* SET */ + ON = 302, /* ON */ + LOAD = 303, /* LOAD */ + DATA = 304, /* DATA */ + INFILE = 305, /* INFILE */ + EXPLAIN = 306, /* EXPLAIN */ + STORAGE = 307, /* STORAGE */ + FORMAT = 308, /* FORMAT */ + INNER = 309, /* INNER */ + JOIN = 310, /* JOIN */ + EQ = 311, /* EQ */ + LT = 312, /* LT */ + GT = 313, /* GT */ + LE = 314, /* LE */ + GE = 315, /* GE */ + NE = 316, /* NE */ + LIKE = 317, /* LIKE */ + IS = 318, /* IS */ + NUMBER = 319, /* NUMBER */ + FLOAT = 320, /* FLOAT */ + ID = 321, /* ID */ + SSS = 322, /* SSS */ + UMINUS = 323 /* UMINUS */ +}; +typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 130 "yacc_sql.y" - ParsedSqlNode * sql_node; - Value * value; - enum CompOp comp; - RelAttrSqlNode * rel_attr; - std::vector * attr_infos; - AttrInfoSqlNode * attr_info; - Expression * expression; - std::vector> * expression_list; - std::vector * value_list; - std::vector> * values_list; - SetClauseSqlNode * set_clause; - std::vector * set_clauses; - JoinSqlNode * join_clauses; - std::vector * rel_attr_list; - std::vector * relation_list; - OrderBySqlNode * orderby_unit; - std::vector * orderby_list; - char * string; - int number; - float floats; - bool nullable_info; + ParsedSqlNode *sql_node; + Value *value; + enum CompOp comp; + RelAttrSqlNode *rel_attr; + std::vector *attr_infos; + AttrInfoSqlNode *attr_info; + Expression *expression; + std::vector> *expression_list; + std::vector *value_list; + std::vector> *values_list; + SetClauseSqlNode *set_clause; + std::vector *set_clauses; + JoinSqlNode *join_clauses; + std::vector *rel_attr_list; + std::vector *relation_list; + OrderBySqlNode *orderby_unit; + std::vector *orderby_list; + char *string; + int number; + float floats; + bool nullable_info; #line 156 "yacc_sql.hpp" - }; typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 +#define YYSTYPE_IS_TRIVIAL 1 +#define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -170,14 +169,10 @@ struct YYLTYPE int last_line; int last_column; }; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 +#define YYLTYPE_IS_DECLARED 1 +#define YYLTYPE_IS_TRIVIAL 1 #endif - - - -int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); - +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/stmt/filter_stmt.cpp b/src/observer/sql/stmt/filter_stmt.cpp index 9d17bbcd..7ae7a4b8 100644 --- a/src/observer/sql/stmt/filter_stmt.cpp +++ b/src/observer/sql/stmt/filter_stmt.cpp @@ -56,4 +56,3 @@ RC FilterStmt::create(Db *db, Table *default_table, std::unordered_map Date: Wed, 2 Oct 2024 21:16:22 +0800 Subject: [PATCH 097/308] =?UTF-8?q?fix=20bug:=20field=5Fmetas=E7=9A=84?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E8=A2=AB=E5=BC=B9=E5=87=BA=E6=A0=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/stmt/create_index_stmt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/observer/sql/stmt/create_index_stmt.h b/src/observer/sql/stmt/create_index_stmt.h index 0e30bb84..03df22ac 100644 --- a/src/observer/sql/stmt/create_index_stmt.h +++ b/src/observer/sql/stmt/create_index_stmt.h @@ -45,7 +45,7 @@ class CreateIndexStmt : public Stmt static RC create(Db *db, const CreateIndexSqlNode &create_index, Stmt *&stmt); private: - Table *table_ = nullptr; - const vector &field_meta_; - std::string index_name_; + Table *table_ = nullptr; + vector field_meta_; + std::string index_name_; }; From df8b10445edbf7cffda46cc9243a6a296797d528 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 2 Oct 2024 21:49:12 +0800 Subject: [PATCH 098/308] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=A4=9A=E7=B4=A2=E5=BC=95=E7=9A=84=E8=AF=AD=E6=B3=95=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/yacc_sql.cpp | 929 +++++++++++----------- src/observer/sql/parser/yacc_sql.hpp | 3 +- src/observer/sql/parser/yacc_sql.y | 25 +- src/observer/sql/stmt/create_index_stmt.h | 1 + 4 files changed, 501 insertions(+), 457 deletions(-) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 27bb39c2..c3f86f73 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -231,42 +231,43 @@ enum yysymbol_kind_t YYSYMBOL_desc_table_stmt = 79, /* desc_table_stmt */ YYSYMBOL_show_index_stmt = 80, /* show_index_stmt */ YYSYMBOL_create_index_stmt = 81, /* create_index_stmt */ - YYSYMBOL_drop_index_stmt = 82, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 83, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 84, /* attr_def_list */ - YYSYMBOL_attr_def = 85, /* attr_def */ - YYSYMBOL_nullable_constraint = 86, /* nullable_constraint */ - YYSYMBOL_number = 87, /* number */ - YYSYMBOL_type = 88, /* type */ - YYSYMBOL_insert_stmt = 89, /* insert_stmt */ - YYSYMBOL_values_list = 90, /* values_list */ - YYSYMBOL_value_list = 91, /* value_list */ - YYSYMBOL_value = 92, /* value */ - YYSYMBOL_storage_format = 93, /* storage_format */ - YYSYMBOL_delete_stmt = 94, /* delete_stmt */ - YYSYMBOL_update_stmt = 95, /* update_stmt */ - YYSYMBOL_setClauses = 96, /* setClauses */ - YYSYMBOL_setClause = 97, /* setClause */ - YYSYMBOL_select_stmt = 98, /* select_stmt */ - YYSYMBOL_calc_stmt = 99, /* calc_stmt */ - YYSYMBOL_expression_list = 100, /* expression_list */ - YYSYMBOL_expression = 101, /* expression */ - YYSYMBOL_alias = 102, /* alias */ - YYSYMBOL_aggr_func_expr = 103, /* aggr_func_expr */ - YYSYMBOL_rel_attr = 104, /* rel_attr */ - YYSYMBOL_relation = 105, /* relation */ - YYSYMBOL_rel_list = 106, /* rel_list */ - YYSYMBOL_joinClause = 107, /* joinClause */ - YYSYMBOL_joinClauses = 108, /* joinClauses */ - YYSYMBOL_where = 109, /* where */ - YYSYMBOL_condition_list = 110, /* condition_list */ - YYSYMBOL_condition = 111, /* condition */ - YYSYMBOL_comp_op = 112, /* comp_op */ - YYSYMBOL_group_by = 113, /* group_by */ - YYSYMBOL_load_data_stmt = 114, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 115, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 116, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 117 /* opt_semicolon */ + YYSYMBOL_attr_list = 82, /* attr_list */ + YYSYMBOL_drop_index_stmt = 83, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 84, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 85, /* attr_def_list */ + YYSYMBOL_attr_def = 86, /* attr_def */ + YYSYMBOL_nullable_constraint = 87, /* nullable_constraint */ + YYSYMBOL_number = 88, /* number */ + YYSYMBOL_type = 89, /* type */ + YYSYMBOL_insert_stmt = 90, /* insert_stmt */ + YYSYMBOL_values_list = 91, /* values_list */ + YYSYMBOL_value_list = 92, /* value_list */ + YYSYMBOL_value = 93, /* value */ + YYSYMBOL_storage_format = 94, /* storage_format */ + YYSYMBOL_delete_stmt = 95, /* delete_stmt */ + YYSYMBOL_update_stmt = 96, /* update_stmt */ + YYSYMBOL_setClauses = 97, /* setClauses */ + YYSYMBOL_setClause = 98, /* setClause */ + YYSYMBOL_select_stmt = 99, /* select_stmt */ + YYSYMBOL_calc_stmt = 100, /* calc_stmt */ + YYSYMBOL_expression_list = 101, /* expression_list */ + YYSYMBOL_expression = 102, /* expression */ + YYSYMBOL_alias = 103, /* alias */ + YYSYMBOL_aggr_func_expr = 104, /* aggr_func_expr */ + YYSYMBOL_rel_attr = 105, /* rel_attr */ + YYSYMBOL_relation = 106, /* relation */ + YYSYMBOL_rel_list = 107, /* rel_list */ + YYSYMBOL_joinClause = 108, /* joinClause */ + YYSYMBOL_joinClauses = 109, /* joinClauses */ + YYSYMBOL_where = 110, /* where */ + YYSYMBOL_condition_list = 111, /* condition_list */ + YYSYMBOL_condition = 112, /* condition */ + YYSYMBOL_comp_op = 113, /* comp_op */ + YYSYMBOL_group_by = 114, /* group_by */ + YYSYMBOL_load_data_stmt = 115, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 116, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 117, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 118 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -597,16 +598,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 69 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 199 +#define YYLAST 202 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 68 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 50 +#define YYNNTS 51 /* YYNRULES -- Number of rules. */ -#define YYNRULES 117 +#define YYNRULES 119 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 213 +#define YYNSTATES 216 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 318 @@ -661,18 +662,18 @@ static const yytype_int8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 212, 212, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 244, 250, 255, 261, 267, 273, - 279, 286, 292, 300, 310, 324, 334, 358, 361, 374, - 386, 411, 415, 420, 426, 429, 430, 431, 432, 436, - 449, 455, 462, 468, 476, 480, 484, 490, 497, 500, - 507, 520, 535, 541, 549, 559, 582, 618, 627, 636, - 651, 654, 657, 660, 663, 667, 670, 675, 681, 684, - 691, 694, 697, 702, 710, 716, 721, 731, 737, 747, - 765, 776, 782, 792, 795, 801, 804, 809, 816, 828, - 840, 852, 867, 868, 869, 870, 871, 872, 873, 874, - 875, 876, 882, 887, 900, 908, 918, 919 + 0, 214, 214, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 246, 252, 257, 263, 269, 275, + 281, 288, 294, 302, 312, 326, 332, 341, 351, 375, + 378, 391, 403, 428, 432, 437, 443, 446, 447, 448, + 449, 453, 466, 472, 479, 485, 493, 497, 501, 507, + 514, 517, 524, 537, 552, 558, 566, 576, 599, 635, + 644, 653, 668, 671, 674, 677, 680, 684, 687, 692, + 698, 701, 708, 711, 714, 719, 727, 733, 738, 748, + 754, 764, 782, 793, 799, 809, 812, 818, 821, 826, + 833, 845, 857, 869, 884, 885, 886, 887, 888, 889, + 890, 891, 892, 893, 899, 904, 917, 925, 935, 936 }; #endif @@ -700,7 +701,7 @@ static const char *const yytname[] = "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", "show_index_stmt", - "create_index_stmt", "drop_index_stmt", "create_table_stmt", + "create_index_stmt", "attr_list", "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", "number", "type", "insert_stmt", "values_list", "value_list", "value", "storage_format", "delete_stmt", "update_stmt", "setClauses", "setClause", "select_stmt", @@ -717,7 +718,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-149) +#define YYPACT_NINF (-160) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -731,28 +732,28 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 98, 6, 13, 37, 37, -51, 8, -149, -13, -8, - -26, -149, -149, -149, -149, -149, -19, 7, 98, 59, - 66, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, 14, 19, 26, 34, 37, -149, -149, -149, - -7, -149, 37, -149, -149, -149, -1, -149, -149, 62, - -149, -149, 80, 58, 64, 79, 75, 82, -149, -149, - -149, -149, 108, 88, -149, 91, 20, 17, 68, -149, - 73, -149, 37, 37, 37, 37, 118, 81, 81, 106, - 114, 93, -4, 95, 97, 99, 100, -149, -149, 134, - -149, -149, -40, -40, -149, -149, 37, -149, 0, 114, - -149, 136, 76, -149, 111, -10, -149, -149, 123, 65, - 141, 144, -149, -149, -149, 115, 145, -149, -4, 146, - 131, 94, 94, -149, 129, -4, 93, -149, 161, -149, - -149, -149, -149, 1, 97, 150, 112, 81, 81, -149, - 18, -149, 152, 117, -149, -149, -149, -149, -149, -149, - -149, 147, 76, 76, 76, -149, -149, 119, 116, 148, - -149, -149, 141, 135, 155, 139, 137, 114, 5, -149, - -149, -4, -4, -149, -149, -149, -149, -149, -149, -149, - -149, -149, 157, -149, -149, 140, -149, -149, 76, 133, - -149, -149, 87, 2, 138, -149, 81, -149, -149, -149, - 124, -149, -149 + 105, 6, 10, 45, 45, -50, 23, -160, -18, -13, + -38, -160, -160, -160, -160, -160, -26, -4, 105, 52, + 34, -160, -160, -160, -160, -160, -160, -160, -160, -160, + -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, + -160, -160, 12, 20, 35, 36, 45, -160, -160, -160, + -7, -160, 45, -160, -160, -160, -2, -160, -160, 60, + -160, -160, 61, 39, 41, 73, 62, 70, -160, -160, + -160, -160, 96, 83, -160, 84, 21, 18, 66, -160, + 74, -160, 45, 45, 45, 45, 115, 79, 79, 104, + 103, 82, -9, 85, 88, 89, 91, -160, -160, 123, + -160, -160, -8, -8, -160, -160, 45, -160, -1, 103, + -160, 125, -15, -160, 102, -12, -160, -160, 118, 3, + 133, 136, -160, -160, -160, 116, 143, -160, -9, 145, + 134, 106, 106, -160, 128, -9, 82, -160, 161, -160, + -160, -160, -160, -6, 88, 150, 111, 79, 79, -160, + 67, -160, 153, 117, -160, -160, -160, -160, -160, -160, + -160, 146, -15, -15, -15, -160, -160, 114, 119, 148, + -160, -160, 133, 130, 158, 160, 140, 135, 103, 5, + -160, -160, -9, -9, -160, -160, -160, -160, -160, -160, + -160, -160, -160, 162, -160, -160, 137, -160, 111, -160, + -15, 138, -160, -160, 72, 37, 139, -160, -160, 79, + -160, -160, -160, 126, -160, -160 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -762,46 +763,48 @@ static const yytype_int8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 116, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 118, 23, 22, 15, 16, 17, 18, 9, 10, 11, 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 0, 0, 0, 0, 57, 54, 55, - 85, 56, 0, 78, 76, 67, 80, 79, 77, 0, - 32, 31, 0, 0, 0, 0, 0, 0, 114, 1, - 117, 2, 0, 0, 30, 0, 0, 0, 0, 75, - 0, 81, 0, 0, 0, 0, 68, 0, 0, 0, - 93, 0, 0, 0, 0, 0, 0, 74, 84, 0, - 86, 82, 70, 71, 72, 73, 0, 87, 80, 93, - 33, 0, 95, 60, 0, 93, 62, 115, 0, 0, - 37, 0, 35, 83, 69, 0, 88, 112, 0, 49, - 85, 0, 0, 94, 96, 0, 0, 61, 0, 45, - 46, 47, 48, 43, 0, 0, 0, 0, 0, 65, - 0, 52, 0, 0, 102, 103, 104, 105, 106, 107, - 110, 108, 0, 0, 95, 64, 63, 0, 0, 0, - 42, 40, 37, 58, 0, 0, 91, 93, 80, 89, - 50, 0, 0, 111, 109, 99, 101, 98, 100, 97, - 113, 44, 0, 41, 38, 0, 36, 34, 95, 0, - 112, 53, 0, 43, 0, 90, 0, 66, 51, 39, - 0, 92, 59 + 20, 21, 0, 0, 0, 0, 0, 59, 56, 57, + 87, 58, 0, 80, 78, 69, 82, 81, 79, 0, + 32, 31, 0, 0, 0, 0, 0, 0, 116, 1, + 119, 2, 0, 0, 30, 0, 0, 0, 0, 77, + 0, 83, 0, 0, 0, 0, 70, 0, 0, 0, + 95, 0, 0, 0, 0, 0, 0, 76, 86, 0, + 88, 84, 72, 73, 74, 75, 0, 89, 82, 95, + 33, 0, 97, 62, 0, 95, 64, 117, 0, 0, + 39, 0, 37, 85, 71, 0, 90, 114, 0, 51, + 87, 0, 0, 96, 98, 0, 0, 63, 0, 47, + 48, 49, 50, 45, 0, 0, 0, 0, 0, 67, + 0, 54, 0, 0, 104, 105, 106, 107, 108, 109, + 112, 110, 0, 0, 97, 66, 65, 0, 0, 0, + 44, 42, 39, 60, 35, 0, 0, 93, 95, 82, + 91, 52, 0, 0, 113, 111, 101, 103, 100, 102, + 99, 115, 46, 0, 43, 40, 0, 38, 0, 34, + 97, 0, 114, 55, 0, 45, 0, 36, 92, 0, + 68, 53, 41, 0, 94, 61 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -149, -149, 166, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, 15, 46, -12, -149, - -149, -149, -149, 10, -92, -149, -149, -149, -149, 57, - -149, -149, -3, -38, 142, -149, -110, -81, 47, -149, - -9, -104, -148, -149, 67, -6, -149, -149, -149, -149 + -160, -160, 168, -160, -160, -160, -160, -160, -160, -160, + -160, -160, -160, -160, -5, -160, -160, 17, 47, -11, + -160, -160, -160, -160, 9, -92, -160, -160, -160, -160, + 59, -160, -160, -3, 49, 141, -160, -108, -80, 48, + -160, -10, -103, -159, -160, 68, 0, -160, -160, -160, + -160 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 145, 120, 171, 192, - 143, 34, 129, 150, 54, 196, 35, 36, 115, 116, - 37, 38, 55, 56, 126, 57, 58, 175, 109, 176, - 177, 113, 133, 134, 162, 149, 39, 40, 41, 71 + 28, 29, 30, 31, 175, 32, 33, 145, 120, 171, + 193, 143, 34, 129, 150, 54, 197, 35, 36, 115, + 116, 37, 38, 55, 56, 126, 57, 58, 176, 109, + 177, 178, 113, 133, 134, 162, 149, 39, 40, 41, + 71 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -809,50 +812,52 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 117, 59, 132, 80, 80, 127, 108, 110, 76, 80, - 60, 137, 136, 77, 79, 42, 189, 43, 61, 62, - 131, 168, 44, 63, 45, 84, 85, 47, 78, 112, - 64, 169, 169, 170, 170, 65, 151, 46, 98, 180, - 181, 97, 66, 165, 102, 103, 104, 105, 47, 125, - 205, 67, 186, 188, 132, 48, 49, 46, 51, 69, - 81, 81, 82, 83, 84, 85, 81, 178, 47, 70, - 185, 187, 131, 200, 99, 72, 48, 49, 50, 51, - 73, 52, 53, 82, 83, 84, 85, 74, 132, 201, - 151, 139, 140, 141, 142, 75, 48, 49, 50, 51, - 87, 52, 53, 124, 1, 2, 131, 47, 208, 181, - 3, 4, 5, 6, 7, 8, 9, 10, 88, 89, - 91, 11, 12, 13, 153, 90, 92, 93, 94, 100, - 95, 14, 15, 96, 101, 48, 49, 130, 51, 16, - 106, 17, 107, 111, 18, 154, 155, 156, 157, 158, - 159, 160, 161, 112, 114, 123, 128, 118, 119, 138, - 121, 122, 135, 144, 146, 147, 78, 148, 152, 164, - 167, 173, 182, 174, 183, 191, 197, 184, 203, 193, - 190, 198, 195, 206, 68, 212, 199, 194, 204, 210, - 172, 209, 202, 166, 207, 179, 0, 211, 86, 163 + 117, 59, 80, 80, 132, 190, 127, 108, 110, 80, + 136, 60, 137, 77, 168, 42, 47, 43, 63, 44, + 131, 45, 47, 65, 169, 64, 170, 112, 78, 139, + 140, 141, 142, 61, 62, 66, 151, 70, 46, 98, + 67, 208, 97, 165, 48, 49, 130, 51, 125, 47, + 48, 49, 69, 51, 187, 189, 132, 84, 85, 81, + 81, 82, 83, 84, 85, 46, 81, 169, 179, 170, + 186, 188, 131, 72, 99, 202, 47, 48, 49, 50, + 51, 73, 52, 53, 82, 83, 84, 85, 181, 182, + 203, 151, 132, 211, 182, 76, 74, 75, 87, 88, + 89, 79, 90, 124, 48, 49, 50, 51, 131, 52, + 53, 1, 2, 92, 91, 93, 94, 3, 4, 5, + 6, 7, 8, 9, 10, 95, 96, 100, 11, 12, + 13, 102, 103, 104, 105, 101, 153, 106, 14, 15, + 107, 111, 112, 114, 123, 128, 16, 118, 17, 119, + 121, 18, 122, 135, 138, 144, 146, 154, 155, 156, + 157, 158, 159, 160, 161, 148, 147, 152, 164, 78, + 167, 173, 174, 183, 184, 191, 185, 196, 192, 194, + 198, 199, 200, 205, 201, 206, 68, 215, 209, 195, + 213, 172, 204, 207, 212, 166, 180, 86, 0, 214, + 163, 0, 210 }; static const yytype_int16 yycheck[] = { - 92, 4, 112, 4, 4, 109, 87, 88, 46, 4, - 61, 115, 22, 20, 52, 9, 164, 11, 10, 11, - 112, 20, 9, 36, 11, 65, 66, 31, 35, 39, - 38, 30, 30, 32, 32, 61, 128, 20, 21, 21, - 22, 21, 61, 135, 82, 83, 84, 85, 31, 49, - 198, 44, 162, 163, 164, 59, 60, 20, 62, 0, - 61, 61, 63, 64, 65, 66, 61, 148, 31, 3, - 162, 163, 164, 177, 77, 61, 59, 60, 61, 62, - 61, 64, 65, 63, 64, 65, 66, 61, 198, 181, - 182, 26, 27, 28, 29, 61, 59, 60, 61, 62, - 38, 64, 65, 106, 6, 7, 198, 31, 21, 22, - 12, 13, 14, 15, 16, 17, 18, 19, 38, 61, - 41, 23, 24, 25, 30, 61, 51, 45, 20, 61, - 42, 33, 34, 42, 61, 59, 60, 61, 62, 41, - 22, 43, 61, 37, 46, 51, 52, 53, 54, 55, - 56, 57, 58, 39, 61, 21, 20, 62, 61, 36, - 61, 61, 51, 22, 20, 50, 35, 22, 22, 40, - 9, 21, 20, 61, 57, 59, 21, 30, 21, 31, - 61, 42, 47, 50, 18, 61, 49, 172, 48, 51, - 144, 203, 182, 136, 200, 148, -1, 206, 56, 132 + 92, 4, 4, 4, 112, 164, 109, 87, 88, 4, + 22, 61, 115, 20, 20, 9, 31, 11, 36, 9, + 112, 11, 31, 61, 30, 38, 32, 39, 35, 26, + 27, 28, 29, 10, 11, 61, 128, 3, 20, 21, + 44, 200, 21, 135, 59, 60, 61, 62, 49, 31, + 59, 60, 0, 62, 162, 163, 164, 65, 66, 61, + 61, 63, 64, 65, 66, 20, 61, 30, 148, 32, + 162, 163, 164, 61, 77, 178, 31, 59, 60, 61, + 62, 61, 64, 65, 63, 64, 65, 66, 21, 22, + 182, 183, 200, 21, 22, 46, 61, 61, 38, 38, + 61, 52, 61, 106, 59, 60, 61, 62, 200, 64, + 65, 6, 7, 51, 41, 45, 20, 12, 13, 14, + 15, 16, 17, 18, 19, 42, 42, 61, 23, 24, + 25, 82, 83, 84, 85, 61, 30, 22, 33, 34, + 61, 37, 39, 61, 21, 20, 41, 62, 43, 61, + 61, 46, 61, 51, 36, 22, 20, 51, 52, 53, + 54, 55, 56, 57, 58, 22, 50, 22, 40, 35, + 9, 21, 61, 20, 57, 61, 30, 47, 59, 31, + 22, 21, 42, 21, 49, 48, 18, 61, 50, 172, + 51, 144, 183, 198, 205, 136, 148, 56, -1, 209, + 132, -1, 202 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -862,25 +867,25 @@ static const yytype_int8 yystos[] = 0, 6, 7, 12, 13, 14, 15, 16, 17, 18, 19, 23, 24, 25, 33, 34, 41, 43, 46, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 89, 94, 95, 98, 99, 114, - 115, 116, 9, 11, 9, 11, 20, 31, 59, 60, - 61, 62, 64, 65, 92, 100, 101, 103, 104, 100, + 80, 81, 83, 84, 90, 95, 96, 99, 100, 115, + 116, 117, 9, 11, 9, 11, 20, 31, 59, 60, + 61, 62, 64, 65, 93, 101, 102, 104, 105, 101, 61, 10, 11, 36, 38, 61, 61, 44, 70, 0, - 3, 117, 61, 61, 61, 61, 101, 20, 35, 101, - 4, 61, 63, 64, 65, 66, 102, 38, 38, 61, - 61, 41, 51, 45, 20, 42, 42, 21, 21, 100, - 61, 61, 101, 101, 101, 101, 22, 61, 105, 106, - 105, 37, 39, 109, 61, 96, 97, 92, 62, 61, - 85, 61, 61, 21, 100, 49, 102, 109, 20, 90, - 61, 92, 104, 110, 111, 51, 22, 109, 36, 26, - 27, 28, 29, 88, 22, 84, 20, 50, 22, 113, - 91, 92, 22, 30, 51, 52, 53, 54, 55, 56, - 57, 58, 112, 112, 40, 92, 97, 9, 20, 30, - 32, 86, 85, 21, 61, 105, 107, 108, 105, 106, - 21, 22, 20, 57, 30, 92, 104, 92, 104, 110, - 61, 59, 87, 31, 84, 47, 93, 21, 42, 49, - 109, 92, 91, 21, 48, 110, 50, 113, 21, 86, - 51, 108, 61 + 3, 118, 61, 61, 61, 61, 102, 20, 35, 102, + 4, 61, 63, 64, 65, 66, 103, 38, 38, 61, + 61, 41, 51, 45, 20, 42, 42, 21, 21, 101, + 61, 61, 102, 102, 102, 102, 22, 61, 106, 107, + 106, 37, 39, 110, 61, 97, 98, 93, 62, 61, + 86, 61, 61, 21, 101, 49, 103, 110, 20, 91, + 61, 93, 105, 111, 112, 51, 22, 110, 36, 26, + 27, 28, 29, 89, 22, 85, 20, 50, 22, 114, + 92, 93, 22, 30, 51, 52, 53, 54, 55, 56, + 57, 58, 113, 113, 40, 93, 98, 9, 20, 30, + 32, 87, 86, 21, 61, 82, 106, 108, 109, 106, + 107, 21, 22, 20, 57, 30, 93, 105, 93, 105, + 111, 61, 59, 88, 31, 85, 47, 94, 22, 21, + 42, 49, 110, 93, 92, 21, 48, 82, 111, 50, + 114, 21, 87, 51, 109, 61 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -889,15 +894,15 @@ static const yytype_int8 yyr1[] = 0, 68, 69, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 84, 85, - 85, 86, 86, 86, 87, 88, 88, 88, 88, 89, - 90, 90, 91, 91, 92, 92, 92, 92, 93, 93, - 94, 95, 96, 96, 97, 98, 98, 99, 100, 100, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 102, 102, 102, 103, 103, 104, 104, 105, 106, 106, - 107, 108, 108, 109, 109, 110, 110, 110, 111, 111, - 111, 111, 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 113, 114, 115, 116, 117, 117 + 77, 78, 79, 80, 81, 82, 82, 83, 84, 85, + 85, 86, 86, 87, 87, 87, 88, 89, 89, 89, + 89, 90, 91, 91, 92, 92, 93, 93, 93, 93, + 94, 94, 95, 96, 97, 97, 98, 99, 99, 100, + 101, 101, 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 103, 103, 103, 104, 104, 105, 105, 106, + 107, 107, 108, 109, 109, 110, 110, 111, 111, 111, + 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 114, 115, 116, 117, 118, 118 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -906,15 +911,15 @@ static const yytype_int8 yyr2[] = 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 2, 2, 4, 8, 5, 8, 0, 3, 6, - 3, 2, 1, 0, 1, 1, 1, 1, 1, 5, - 3, 5, 1, 3, 1, 1, 1, 1, 0, 4, - 4, 5, 1, 3, 3, 6, 9, 2, 2, 4, - 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, - 0, 1, 2, 4, 3, 1, 3, 1, 2, 4, - 3, 1, 4, 0, 2, 0, 1, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 2, 0, 7, 2, 4, 0, 1 + 3, 2, 2, 4, 8, 1, 3, 5, 8, 0, + 3, 6, 3, 2, 1, 0, 1, 1, 1, 1, + 1, 5, 3, 5, 1, 3, 1, 1, 1, 1, + 0, 4, 4, 5, 1, 3, 3, 6, 9, 2, + 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, + 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, + 2, 4, 3, 1, 4, 0, 2, 0, 1, 3, + 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 2, 0, 7, 2, 4, 0, 1 }; @@ -1776,119 +1781,139 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 213 "yacc_sql.y" +#line 215 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1785 "yacc_sql.cpp" +#line 1790 "yacc_sql.cpp" break; case 24: /* exit_stmt: EXIT */ -#line 244 "yacc_sql.y" +#line 246 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1794 "yacc_sql.cpp" +#line 1799 "yacc_sql.cpp" break; case 25: /* help_stmt: HELP */ -#line 250 "yacc_sql.y" +#line 252 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1802 "yacc_sql.cpp" +#line 1807 "yacc_sql.cpp" break; case 26: /* sync_stmt: SYNC */ -#line 255 "yacc_sql.y" +#line 257 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1810 "yacc_sql.cpp" +#line 1815 "yacc_sql.cpp" break; case 27: /* begin_stmt: TRX_BEGIN */ -#line 261 "yacc_sql.y" +#line 263 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1818 "yacc_sql.cpp" +#line 1823 "yacc_sql.cpp" break; case 28: /* commit_stmt: TRX_COMMIT */ -#line 267 "yacc_sql.y" +#line 269 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1826 "yacc_sql.cpp" +#line 1831 "yacc_sql.cpp" break; case 29: /* rollback_stmt: TRX_ROLLBACK */ -#line 273 "yacc_sql.y" +#line 275 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1834 "yacc_sql.cpp" +#line 1839 "yacc_sql.cpp" break; case 30: /* drop_table_stmt: DROP TABLE ID */ -#line 279 "yacc_sql.y" +#line 281 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1844 "yacc_sql.cpp" +#line 1849 "yacc_sql.cpp" break; case 31: /* show_tables_stmt: SHOW TABLES */ -#line 286 "yacc_sql.y" +#line 288 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1852 "yacc_sql.cpp" +#line 1857 "yacc_sql.cpp" break; case 32: /* desc_table_stmt: DESC ID */ -#line 292 "yacc_sql.y" +#line 294 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1862 "yacc_sql.cpp" +#line 1867 "yacc_sql.cpp" break; case 33: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 301 "yacc_sql.y" +#line 303 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1873 "yacc_sql.cpp" +#line 1878 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 311 "yacc_sql.y" + case 34: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE attr_list RBRACE */ +#line 313 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; create_index.index_name = (yyvsp[-5].string); create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.emplace_back((yyvsp[-1].string)); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $7 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); - free((yyvsp[-1].string)); } -#line 1888 "yacc_sql.cpp" +#line 1893 "yacc_sql.cpp" + break; + + case 35: /* attr_list: ID */ +#line 327 "yacc_sql.y" + { + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + free((yyvsp[0].string)); + } +#line 1903 "yacc_sql.cpp" break; - case 35: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 325 "yacc_sql.y" + case 36: /* attr_list: ID COMMA attr_list */ +#line 333 "yacc_sql.y" + { + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + free((yyvsp[-2].string)); + } +#line 1913 "yacc_sql.cpp" + break; + + case 37: /* drop_index_stmt: DROP INDEX ID ON ID */ +#line 342 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1896,11 +1921,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1900 "yacc_sql.cpp" +#line 1925 "yacc_sql.cpp" break; - case 36: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 335 "yacc_sql.y" + case 38: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ +#line 352 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1921,19 +1946,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); } } -#line 1925 "yacc_sql.cpp" +#line 1950 "yacc_sql.cpp" break; - case 37: /* attr_def_list: %empty */ -#line 358 "yacc_sql.y" + case 39: /* attr_def_list: %empty */ +#line 375 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1933 "yacc_sql.cpp" +#line 1958 "yacc_sql.cpp" break; - case 38: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 362 "yacc_sql.y" + case 40: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 379 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1943,11 +1968,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1947 "yacc_sql.cpp" +#line 1972 "yacc_sql.cpp" break; - case 39: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 375 "yacc_sql.y" + case 41: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ +#line 392 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -1959,11 +1984,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 1963 "yacc_sql.cpp" +#line 1988 "yacc_sql.cpp" break; - case 40: /* attr_def: ID type nullable_constraint */ -#line 387 "yacc_sql.y" + case 42: /* attr_def: ID type nullable_constraint */ +#line 404 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -1985,65 +2010,65 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 1989 "yacc_sql.cpp" +#line 2014 "yacc_sql.cpp" break; - case 41: /* nullable_constraint: NOT NULL_T */ -#line 412 "yacc_sql.y" + case 43: /* nullable_constraint: NOT NULL_T */ +#line 429 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 1997 "yacc_sql.cpp" +#line 2022 "yacc_sql.cpp" break; - case 42: /* nullable_constraint: NULLABLE */ -#line 416 "yacc_sql.y" + case 44: /* nullable_constraint: NULLABLE */ +#line 433 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } -#line 2005 "yacc_sql.cpp" +#line 2030 "yacc_sql.cpp" break; - case 43: /* nullable_constraint: %empty */ -#line 420 "yacc_sql.y" + case 45: /* nullable_constraint: %empty */ +#line 437 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 2013 "yacc_sql.cpp" +#line 2038 "yacc_sql.cpp" break; - case 44: /* number: NUMBER */ -#line 426 "yacc_sql.y" + case 46: /* number: NUMBER */ +#line 443 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 2019 "yacc_sql.cpp" +#line 2044 "yacc_sql.cpp" break; - case 45: /* type: INT_T */ -#line 429 "yacc_sql.y" + case 47: /* type: INT_T */ +#line 446 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2025 "yacc_sql.cpp" +#line 2050 "yacc_sql.cpp" break; - case 46: /* type: STRING_T */ -#line 430 "yacc_sql.y" + case 48: /* type: STRING_T */ +#line 447 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2031 "yacc_sql.cpp" +#line 2056 "yacc_sql.cpp" break; - case 47: /* type: FLOAT_T */ -#line 431 "yacc_sql.y" + case 49: /* type: FLOAT_T */ +#line 448 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2037 "yacc_sql.cpp" +#line 2062 "yacc_sql.cpp" break; - case 48: /* type: DATE_T */ -#line 432 "yacc_sql.y" + case 50: /* type: DATE_T */ +#line 449 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2043 "yacc_sql.cpp" +#line 2068 "yacc_sql.cpp" break; - case 49: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 437 "yacc_sql.y" + case 51: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 454 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2053,102 +2078,102 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2057 "yacc_sql.cpp" +#line 2082 "yacc_sql.cpp" break; - case 50: /* values_list: LBRACE value_list RBRACE */ -#line 450 "yacc_sql.y" + case 52: /* values_list: LBRACE value_list RBRACE */ +#line 467 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2067 "yacc_sql.cpp" +#line 2092 "yacc_sql.cpp" break; - case 51: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 456 "yacc_sql.y" + case 53: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 473 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2076 "yacc_sql.cpp" +#line 2101 "yacc_sql.cpp" break; - case 52: /* value_list: value */ -#line 463 "yacc_sql.y" + case 54: /* value_list: value */ +#line 480 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2086 "yacc_sql.cpp" +#line 2111 "yacc_sql.cpp" break; - case 53: /* value_list: value_list COMMA value */ -#line 469 "yacc_sql.y" + case 55: /* value_list: value_list COMMA value */ +#line 486 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2095 "yacc_sql.cpp" +#line 2120 "yacc_sql.cpp" break; - case 54: /* value: NUMBER */ -#line 476 "yacc_sql.y" + case 56: /* value: NUMBER */ +#line 493 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2104 "yacc_sql.cpp" +#line 2129 "yacc_sql.cpp" break; - case 55: /* value: FLOAT */ -#line 480 "yacc_sql.y" + case 57: /* value: FLOAT */ +#line 497 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2113 "yacc_sql.cpp" +#line 2138 "yacc_sql.cpp" break; - case 56: /* value: SSS */ -#line 484 "yacc_sql.y" + case 58: /* value: SSS */ +#line 501 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2124 "yacc_sql.cpp" +#line 2149 "yacc_sql.cpp" break; - case 57: /* value: NULL_T */ -#line 490 "yacc_sql.y" + case 59: /* value: NULL_T */ +#line 507 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2132 "yacc_sql.cpp" +#line 2157 "yacc_sql.cpp" break; - case 58: /* storage_format: %empty */ -#line 497 "yacc_sql.y" + case 60: /* storage_format: %empty */ +#line 514 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2140 "yacc_sql.cpp" +#line 2165 "yacc_sql.cpp" break; - case 59: /* storage_format: STORAGE FORMAT EQ ID */ -#line 501 "yacc_sql.y" + case 61: /* storage_format: STORAGE FORMAT EQ ID */ +#line 518 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2148 "yacc_sql.cpp" +#line 2173 "yacc_sql.cpp" break; - case 60: /* delete_stmt: DELETE FROM ID where */ -#line 508 "yacc_sql.y" + case 62: /* delete_stmt: DELETE FROM ID where */ +#line 525 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2158,11 +2183,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2162 "yacc_sql.cpp" +#line 2187 "yacc_sql.cpp" break; - case 61: /* update_stmt: UPDATE ID SET setClauses where */ -#line 521 "yacc_sql.y" + case 63: /* update_stmt: UPDATE ID SET setClauses where */ +#line 538 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2174,41 +2199,41 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2178 "yacc_sql.cpp" +#line 2203 "yacc_sql.cpp" break; - case 62: /* setClauses: setClause */ -#line 536 "yacc_sql.y" + case 64: /* setClauses: setClause */ +#line 553 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2188 "yacc_sql.cpp" +#line 2213 "yacc_sql.cpp" break; - case 63: /* setClauses: setClauses COMMA setClause */ -#line 542 "yacc_sql.y" + case 65: /* setClauses: setClauses COMMA setClause */ +#line 559 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2197 "yacc_sql.cpp" +#line 2222 "yacc_sql.cpp" break; - case 64: /* setClause: ID EQ value */ -#line 550 "yacc_sql.y" + case 66: /* setClause: ID EQ value */ +#line 567 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } -#line 2208 "yacc_sql.cpp" +#line 2233 "yacc_sql.cpp" break; - case 65: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ -#line 560 "yacc_sql.y" + case 67: /* select_stmt: SELECT expression_list FROM rel_list where group_by */ +#line 577 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-4].expression_list) != nullptr) { @@ -2231,11 +2256,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2235 "yacc_sql.cpp" +#line 2260 "yacc_sql.cpp" break; - case 66: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 583 "yacc_sql.y" + case 68: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 600 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2268,21 +2293,21 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2272 "yacc_sql.cpp" +#line 2297 "yacc_sql.cpp" break; - case 67: /* calc_stmt: CALC expression_list */ -#line 619 "yacc_sql.y" + case 69: /* calc_stmt: CALC expression_list */ +#line 636 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2282 "yacc_sql.cpp" +#line 2307 "yacc_sql.cpp" break; - case 68: /* expression_list: expression alias */ -#line 628 "yacc_sql.y" + case 70: /* expression_list: expression alias */ +#line 645 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2291,11 +2316,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2295 "yacc_sql.cpp" +#line 2320 "yacc_sql.cpp" break; - case 69: /* expression_list: expression alias COMMA expression_list */ -#line 637 "yacc_sql.y" + case 71: /* expression_list: expression alias COMMA expression_list */ +#line 654 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2308,121 +2333,121 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2312 "yacc_sql.cpp" +#line 2337 "yacc_sql.cpp" break; - case 70: /* expression: expression '+' expression */ -#line 651 "yacc_sql.y" + case 72: /* expression: expression '+' expression */ +#line 668 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2320 "yacc_sql.cpp" +#line 2345 "yacc_sql.cpp" break; - case 71: /* expression: expression '-' expression */ -#line 654 "yacc_sql.y" + case 73: /* expression: expression '-' expression */ +#line 671 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2328 "yacc_sql.cpp" +#line 2353 "yacc_sql.cpp" break; - case 72: /* expression: expression '*' expression */ -#line 657 "yacc_sql.y" + case 74: /* expression: expression '*' expression */ +#line 674 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2336 "yacc_sql.cpp" +#line 2361 "yacc_sql.cpp" break; - case 73: /* expression: expression '/' expression */ -#line 660 "yacc_sql.y" + case 75: /* expression: expression '/' expression */ +#line 677 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2344 "yacc_sql.cpp" +#line 2369 "yacc_sql.cpp" break; - case 74: /* expression: LBRACE expression RBRACE */ -#line 663 "yacc_sql.y" + case 76: /* expression: LBRACE expression RBRACE */ +#line 680 "yacc_sql.y" { (yyval.expression) = (yyvsp[-1].expression); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2353 "yacc_sql.cpp" +#line 2378 "yacc_sql.cpp" break; - case 75: /* expression: '-' expression */ -#line 667 "yacc_sql.y" + case 77: /* expression: '-' expression */ +#line 684 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2361 "yacc_sql.cpp" +#line 2386 "yacc_sql.cpp" break; - case 76: /* expression: value */ -#line 670 "yacc_sql.y" + case 78: /* expression: value */ +#line 687 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2371 "yacc_sql.cpp" +#line 2396 "yacc_sql.cpp" break; - case 77: /* expression: rel_attr */ -#line 675 "yacc_sql.y" + case 79: /* expression: rel_attr */ +#line 692 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2382 "yacc_sql.cpp" +#line 2407 "yacc_sql.cpp" break; - case 78: /* expression: '*' */ -#line 681 "yacc_sql.y" + case 80: /* expression: '*' */ +#line 698 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2390 "yacc_sql.cpp" +#line 2415 "yacc_sql.cpp" break; - case 79: /* expression: aggr_func_expr */ -#line 684 "yacc_sql.y" + case 81: /* expression: aggr_func_expr */ +#line 701 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2398 "yacc_sql.cpp" +#line 2423 "yacc_sql.cpp" break; - case 80: /* alias: %empty */ -#line 691 "yacc_sql.y" + case 82: /* alias: %empty */ +#line 708 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2406 "yacc_sql.cpp" +#line 2431 "yacc_sql.cpp" break; - case 81: /* alias: ID */ -#line 694 "yacc_sql.y" + case 83: /* alias: ID */ +#line 711 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2414 "yacc_sql.cpp" +#line 2439 "yacc_sql.cpp" break; - case 82: /* alias: AS ID */ -#line 697 "yacc_sql.y" + case 84: /* alias: AS ID */ +#line 714 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2422 "yacc_sql.cpp" +#line 2447 "yacc_sql.cpp" break; - case 83: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 703 "yacc_sql.y" + case 85: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 720 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2430,29 +2455,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2434 "yacc_sql.cpp" +#line 2459 "yacc_sql.cpp" break; - case 84: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 711 "yacc_sql.y" + case 86: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 728 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2442 "yacc_sql.cpp" +#line 2467 "yacc_sql.cpp" break; - case 85: /* rel_attr: ID */ -#line 716 "yacc_sql.y" + case 87: /* rel_attr: ID */ +#line 733 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2452 "yacc_sql.cpp" +#line 2477 "yacc_sql.cpp" break; - case 86: /* rel_attr: ID DOT ID */ -#line 721 "yacc_sql.y" + case 88: /* rel_attr: ID DOT ID */ +#line 738 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2460,19 +2485,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2464 "yacc_sql.cpp" +#line 2489 "yacc_sql.cpp" break; - case 87: /* relation: ID */ -#line 731 "yacc_sql.y" + case 89: /* relation: ID */ +#line 748 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2472 "yacc_sql.cpp" +#line 2497 "yacc_sql.cpp" break; - case 88: /* rel_list: relation alias */ -#line 737 "yacc_sql.y" + case 90: /* rel_list: relation alias */ +#line 754 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2483,11 +2508,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2487 "yacc_sql.cpp" +#line 2512 "yacc_sql.cpp" break; - case 89: /* rel_list: relation alias COMMA rel_list */ -#line 747 "yacc_sql.y" + case 91: /* rel_list: relation alias COMMA rel_list */ +#line 764 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2503,11 +2528,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); } -#line 2507 "yacc_sql.cpp" +#line 2532 "yacc_sql.cpp" break; - case 90: /* joinClause: relation ON condition_list */ -#line 766 "yacc_sql.y" + case 92: /* joinClause: relation ON condition_list */ +#line 783 "yacc_sql.y" { (yyval.join_clause) = new JoinSqlNode; (yyval.join_clause)->relation = (yyvsp[-2].string); @@ -2515,75 +2540,75 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].condition_list); } -#line 2519 "yacc_sql.cpp" +#line 2544 "yacc_sql.cpp" break; - case 91: /* joinClauses: joinClause */ -#line 777 "yacc_sql.y" + case 93: /* joinClauses: joinClause */ +#line 794 "yacc_sql.y" { (yyval.join_clauses) = new std::vector; (yyval.join_clauses)->emplace_back(*(yyvsp[0].join_clause)); delete (yyvsp[0].join_clause); } -#line 2529 "yacc_sql.cpp" +#line 2554 "yacc_sql.cpp" break; - case 92: /* joinClauses: joinClause INNER JOIN joinClauses */ -#line 783 "yacc_sql.y" + case 94: /* joinClauses: joinClause INNER JOIN joinClauses */ +#line 800 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->emplace_back(*(yyvsp[-3].join_clause)); delete (yyvsp[-3].join_clause); } -#line 2539 "yacc_sql.cpp" +#line 2564 "yacc_sql.cpp" break; - case 93: /* where: %empty */ -#line 792 "yacc_sql.y" + case 95: /* where: %empty */ +#line 809 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2547 "yacc_sql.cpp" +#line 2572 "yacc_sql.cpp" break; - case 94: /* where: WHERE condition_list */ -#line 795 "yacc_sql.y" + case 96: /* where: WHERE condition_list */ +#line 812 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); } -#line 2555 "yacc_sql.cpp" +#line 2580 "yacc_sql.cpp" break; - case 95: /* condition_list: %empty */ -#line 801 "yacc_sql.y" + case 97: /* condition_list: %empty */ +#line 818 "yacc_sql.y" { (yyval.condition_list) = nullptr; } -#line 2563 "yacc_sql.cpp" +#line 2588 "yacc_sql.cpp" break; - case 96: /* condition_list: condition */ -#line 804 "yacc_sql.y" + case 98: /* condition_list: condition */ +#line 821 "yacc_sql.y" { (yyval.condition_list) = new std::vector; (yyval.condition_list)->emplace_back(*(yyvsp[0].condition)); delete (yyvsp[0].condition); } -#line 2573 "yacc_sql.cpp" +#line 2598 "yacc_sql.cpp" break; - case 97: /* condition_list: condition AND condition_list */ -#line 809 "yacc_sql.y" + case 99: /* condition_list: condition AND condition_list */ +#line 826 "yacc_sql.y" { (yyval.condition_list) = (yyvsp[0].condition_list); (yyval.condition_list)->emplace_back(*(yyvsp[-2].condition)); delete (yyvsp[-2].condition); } -#line 2583 "yacc_sql.cpp" +#line 2608 "yacc_sql.cpp" break; - case 98: /* condition: rel_attr comp_op value */ -#line 817 "yacc_sql.y" + case 100: /* condition: rel_attr comp_op value */ +#line 834 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2595,11 +2620,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].value); } -#line 2599 "yacc_sql.cpp" +#line 2624 "yacc_sql.cpp" break; - case 99: /* condition: value comp_op value */ -#line 829 "yacc_sql.y" + case 101: /* condition: value comp_op value */ +#line 846 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2611,11 +2636,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].value); } -#line 2615 "yacc_sql.cpp" +#line 2640 "yacc_sql.cpp" break; - case 100: /* condition: rel_attr comp_op rel_attr */ -#line 841 "yacc_sql.y" + case 102: /* condition: rel_attr comp_op rel_attr */ +#line 858 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 1; @@ -2627,11 +2652,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].rel_attr); delete (yyvsp[0].rel_attr); } -#line 2631 "yacc_sql.cpp" +#line 2656 "yacc_sql.cpp" break; - case 101: /* condition: value comp_op rel_attr */ -#line 853 "yacc_sql.y" + case 103: /* condition: value comp_op rel_attr */ +#line 870 "yacc_sql.y" { (yyval.condition) = new ConditionSqlNode; (yyval.condition)->left_is_attr = 0; @@ -2643,79 +2668,79 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-2].value); delete (yyvsp[0].rel_attr); } -#line 2647 "yacc_sql.cpp" +#line 2672 "yacc_sql.cpp" break; - case 102: /* comp_op: EQ */ -#line 867 "yacc_sql.y" + case 104: /* comp_op: EQ */ +#line 884 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2653 "yacc_sql.cpp" +#line 2678 "yacc_sql.cpp" break; - case 103: /* comp_op: LT */ -#line 868 "yacc_sql.y" + case 105: /* comp_op: LT */ +#line 885 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2659 "yacc_sql.cpp" +#line 2684 "yacc_sql.cpp" break; - case 104: /* comp_op: GT */ -#line 869 "yacc_sql.y" + case 106: /* comp_op: GT */ +#line 886 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2665 "yacc_sql.cpp" +#line 2690 "yacc_sql.cpp" break; - case 105: /* comp_op: LE */ -#line 870 "yacc_sql.y" + case 107: /* comp_op: LE */ +#line 887 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2671 "yacc_sql.cpp" +#line 2696 "yacc_sql.cpp" break; - case 106: /* comp_op: GE */ -#line 871 "yacc_sql.y" + case 108: /* comp_op: GE */ +#line 888 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2677 "yacc_sql.cpp" +#line 2702 "yacc_sql.cpp" break; - case 107: /* comp_op: NE */ -#line 872 "yacc_sql.y" + case 109: /* comp_op: NE */ +#line 889 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2683 "yacc_sql.cpp" +#line 2708 "yacc_sql.cpp" break; - case 108: /* comp_op: IS */ -#line 873 "yacc_sql.y" + case 110: /* comp_op: IS */ +#line 890 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2689 "yacc_sql.cpp" +#line 2714 "yacc_sql.cpp" break; - case 109: /* comp_op: IS NOT */ -#line 874 "yacc_sql.y" + case 111: /* comp_op: IS NOT */ +#line 891 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2695 "yacc_sql.cpp" +#line 2720 "yacc_sql.cpp" break; - case 110: /* comp_op: LIKE */ -#line 875 "yacc_sql.y" + case 112: /* comp_op: LIKE */ +#line 892 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2701 "yacc_sql.cpp" +#line 2726 "yacc_sql.cpp" break; - case 111: /* comp_op: NOT LIKE */ -#line 876 "yacc_sql.y" + case 113: /* comp_op: NOT LIKE */ +#line 893 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2707 "yacc_sql.cpp" +#line 2732 "yacc_sql.cpp" break; - case 112: /* group_by: %empty */ -#line 882 "yacc_sql.y" + case 114: /* group_by: %empty */ +#line 899 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2715 "yacc_sql.cpp" +#line 2740 "yacc_sql.cpp" break; - case 113: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 888 "yacc_sql.y" + case 115: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 905 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2725,20 +2750,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2729 "yacc_sql.cpp" +#line 2754 "yacc_sql.cpp" break; - case 114: /* explain_stmt: EXPLAIN command_wrapper */ -#line 901 "yacc_sql.y" + case 116: /* explain_stmt: EXPLAIN command_wrapper */ +#line 918 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2738 "yacc_sql.cpp" +#line 2763 "yacc_sql.cpp" break; - case 115: /* set_variable_stmt: SET ID EQ value */ -#line 909 "yacc_sql.y" + case 117: /* set_variable_stmt: SET ID EQ value */ +#line 926 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2746,11 +2771,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2750 "yacc_sql.cpp" +#line 2775 "yacc_sql.cpp" break; -#line 2754 "yacc_sql.cpp" +#line 2779 "yacc_sql.cpp" default: break; } @@ -2979,7 +3004,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 921 "yacc_sql.y" +#line 938 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 9e1a1ee7..4427a593 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -147,8 +147,9 @@ union YYSTYPE int number; float floats; bool nullable_info; + std::vector * index_attr_list; -#line 152 "yacc_sql.hpp" +#line 153 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 9d6c0459..c8c2d195 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -145,6 +145,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, int number; float floats; bool nullable_info; + std::vector * index_attr_list; } %token NUMBER @@ -179,6 +180,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type setClauses %type joinClause %type joinClauses +%type attr_list %type calc_stmt %type select_stmt %type insert_stmt @@ -306,17 +308,32 @@ show_index_stmt: } ; -create_index_stmt: /*create index 语句的语法解析树*/ - CREATE INDEX ID ON ID LBRACE ID RBRACE +create_index_stmt: + CREATE INDEX ID ON ID LBRACE attr_list RBRACE { $$ = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = $$->create_index; create_index.index_name = $3; create_index.relation_name = $5; - create_index.attribute_name.emplace_back($7); + create_index.attribute_name.swap(*$7); // $7 是 vector 类型 + delete $7; // 释放指针 free($3); free($5); - free($7); + } + ; + +attr_list: + ID + { + $$ = new std::vector; // 创建一个新的 vector + $$->emplace_back($1); // 将列名加入 vector + free($1); + } + | ID COMMA attr_list + { + $$ = $3; // 使用现有的 vector + $$->emplace($$->begin(), $1); // 将新列名加入 vector 开头 + free($1); } ; diff --git a/src/observer/sql/stmt/create_index_stmt.h b/src/observer/sql/stmt/create_index_stmt.h index 03df22ac..cac4850d 100644 --- a/src/observer/sql/stmt/create_index_stmt.h +++ b/src/observer/sql/stmt/create_index_stmt.h @@ -17,6 +17,7 @@ See the Mulan PSL v2 for more details. */ #include #include "sql/stmt/stmt.h" +#include "storage/table/table_meta.h" struct CreateIndexSqlNode; class Table; From 15de09a59db9207a9f79e0c834407ab8fa80fe9c Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 2 Oct 2024 23:06:44 +0800 Subject: [PATCH 099/308] fix bug: new_record.data()[null_offset] = 0; --- src/observer/sql/operator/update_physical_operator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 39080363..0db22451 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -58,7 +58,7 @@ RC UpdatePhysicalOperator::open(Trx *trx) if (values_[i].is_null()) { new_record.data()[null_offset] = '1'; } else { - new_record.data()[null_offset] = '0'; + new_record.data()[null_offset] = 0; } } else { if (values_[i].is_null()) { From 51e86a78c672bbdfcacd53e3b4780399e63fc082 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 3 Oct 2024 03:33:52 +0800 Subject: [PATCH 100/308] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=20null=20?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E5=AD=97=E4=BD=9C=E4=B8=BA=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/yacc_sql.cpp | 1928 +++++++++++++------------- src/observer/sql/parser/yacc_sql.y | 6 +- 2 files changed, 968 insertions(+), 966 deletions(-) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index f3c4a3e1..699bda39 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -571,16 +571,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 70 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 233 +#define YYLAST 225 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 73 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 53 /* YYNRULES -- Number of rules. */ -#define YYNRULES 125 +#define YYNRULES 126 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 225 +#define YYNSTATES 226 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 323 @@ -964,66 +964,63 @@ static const yytype_int16 yyrline[] = {0, 411, 436, 440, - 445, - 451, - 454, + 444, + 449, 455, - 456, - 457, + 458, + 459, + 460, 461, - 474, - 480, - 487, - 493, - 501, + 465, + 478, + 484, + 491, + 497, 505, 509, - 515, - 522, - 525, - 532, - 544, - 558, - 564, - 572, - 582, - 611, - 644, - 653, - 662, - 678, - 681, - 684, - 687, - 690, - 699, - 702, - 707, - 713, - 716, - 719, - 726, - 729, - 732, - 737, - 745, - 752, - 759, - 764, - 774, - 780, - 790, - 807, - 814, - 826, - 829, - 835, + 513, + 519, + 526, + 529, + 536, + 548, + 562, + 568, + 576, + 586, + 615, + 648, + 657, + 666, + 682, + 685, + 688, + 691, + 694, + 703, + 706, + 711, + 717, + 720, + 723, + 730, + 733, + 736, + 741, + 749, + 756, + 763, + 768, + 778, + 784, + 794, + 811, + 818, + 830, + 833, 839, 843, - 850, - 851, - 852, - 853, + 847, 854, 855, 856, @@ -1032,19 +1029,23 @@ static const yytype_int16 yyrline[] = {0, 859, 860, 861, - 866, - 869, - 877, - 882, - 890, - 896, - 902, - 912, - 917, - 930, - 938, - 948, - 949}; + 862, + 863, + 864, + 865, + 870, + 873, + 881, + 886, + 894, + 900, + 906, + 916, + 921, + 934, + 942, + 952, + 953}; #endif /** Accessing symbol of state STATE. */ @@ -1188,7 +1189,7 @@ static const char *const yytname[] = {"\"end of file\"", static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif -#define YYPACT_NINF (-160) +#define YYPACT_NINF (-158) #define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) @@ -1198,231 +1199,232 @@ static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysy /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {137, - 70, - 71, - 64, - 64, - -54, - 17, - -160, - 16, +static const yytype_int16 yypact[] = {81, + 103, + 112, + -18, + -18, + -35, + 14, + -158, + 13, -5, - 12, - -160, - -160, - -160, - -160, - -160, - 25, - 46, - 137, - 98, + 17, + -158, + -158, + -158, + -158, + -158, + 48, 43, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - 36, - 37, - 38, - 39, - -12, - -160, - -160, - -160, - 6, - -160, + 81, + 62, + 122, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, 64, - -160, - -160, - -160, - -2, - -160, - -160, - -160, - 65, - -160, - -160, - 66, - 44, - 48, - 63, - 59, - 67, - -160, - -160, - -160, - -160, + 85, + 92, 93, - 73, - -160, - 78, - 94, + -10, + -158, + -158, + -158, + -9, + -158, + -18, + -158, + -158, + -158, + -2, + -158, + -158, + -158, + 111, + -158, + -158, + 118, 95, - 57, - 69, - -160, - 74, - -160, - 64, - 64, - 64, - 64, - 107, - 75, - 75, 96, - 99, - 77, - -26, - 79, - 81, 82, - 84, - -160, - -160, - -160, - 112, - -160, - -160, - -20, - -20, - -160, - -160, - 64, - -160, - 11, - 99, - -160, - 115, - 64, - -160, - 83, - -15, - -160, - -160, - 120, - -7, - 142, - 138, - -160, - -160, - -160, + 107, 114, + -158, + -158, + -158, + -158, + 142, + 119, + -158, + 120, + 144, 146, - -160, - -26, - 147, - 136, - 45, - -26, - 77, - -160, - 150, - -160, - -160, - -160, - -160, - 13, - 81, - 149, + 15, + 105, + -158, + 106, + -158, + -18, + -18, + -18, + -18, + 148, + 108, + 108, + 134, + 133, + 113, + 26, 110, - 75, - 75, - 166, - 72, - -160, - 155, - -160, - -14, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - 145, - 64, - 64, - 64, - -160, - -160, - 116, + 115, 117, - 151, - -160, - -160, - 142, - 128, + 121, + -158, + -158, + -158, + 154, + -158, + -158, + -29, + -29, + -158, + -158, + -18, + -158, + 11, + 133, + -158, + 157, + -18, + -158, + 126, + -7, + -158, + -158, + 145, + 102, 159, 163, - 143, - 99, - 9, - -160, + -158, + -158, + -158, + 135, + 164, + -158, + 26, + 166, + 86, + 42, + 26, + 113, + -158, + 176, + -158, + -158, + -158, + -158, + 87, + 115, + 168, + 127, + 108, + 108, 183, - -160, - -160, - -26, - -26, - -160, - -160, - -160, - -9, - -160, - 156, - -160, - -160, + 80, + -158, + 172, + -158, + -4, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + 162, + -18, + -18, + -18, + -158, + -158, + 131, + 136, 167, - -160, - -160, - 148, - -160, - 110, - -160, - 64, - -160, - 64, - -160, - 76, - 52, - 152, - -160, - -27, - -160, - 2, - -160, + -158, + -158, + -158, + 159, + 147, + 173, 177, - -160, - -160, - 144, - 154, - -160, - -160, - 64, - -160, - 75, - -160, - -160}; + 156, + 133, + 12, + -158, + 198, + -158, + -158, + 26, + 26, + -158, + -158, + -158, + 68, + -158, + 161, + -158, + -158, + 182, + -158, + -158, + 155, + -158, + 127, + -158, + -18, + -158, + -18, + -158, + 116, + -12, + 151, + -158, + -25, + -158, + 4, + -158, + 184, + -158, + -158, + 149, + 158, + -158, + -158, + -18, + -158, + 108, + -158, + -158}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero @@ -1447,7 +1449,7 @@ static const yytype_int8 yydefact[] = {0, 0, 0, 0, - 124, + 125, 23, 22, 15, @@ -1474,19 +1476,19 @@ static const yytype_int8 yydefact[] = {0, 0, 0, 0, - 59, - 56, + 60, 57, - 89, 58, + 90, + 59, 0, - 80, - 78, - 69, - 83, 81, - 82, 79, + 70, + 84, + 82, + 83, + 80, 0, 32, 31, @@ -1496,9 +1498,9 @@ static const yytype_int8 yydefact[] = {0, 0, 0, 0, - 122, + 123, 1, - 125, + 126, 2, 0, 0, @@ -1508,119 +1510,120 @@ static const yytype_int8 yydefact[] = {0, 0, 0, 0, - 77, + 78, 0, - 84, + 85, 0, 0, 0, 0, - 70, + 71, 0, 0, 0, - 96, + 97, 0, 0, 0, 0, 0, 0, + 89, + 77, 88, - 76, - 87, 0, - 90, - 85, - 72, + 91, + 86, 73, 74, 75, + 76, 0, - 91, - 83, - 96, + 92, + 84, + 97, 33, 0, 0, - 62, + 63, 0, - 96, - 64, - 123, + 97, + 65, + 124, 0, 0, 39, 0, 37, - 86, - 71, + 87, + 72, 0, - 92, - 120, + 93, + 121, 0, - 51, + 52, 0, - 97, + 98, 0, 0, - 63, + 64, 0, - 47, 48, 49, 50, - 45, + 51, + 46, 0, 0, 0, 0, 0, - 113, + 114, 0, - 54, + 55, 0, - 111, + 112, 0, - 101, 102, 103, 104, 105, 106, - 109, 107, + 110, + 108, 0, 0, 0, + 67, 66, - 65, 0, 0, 0, + 45, 44, 42, 39, - 60, + 61, 35, 0, 0, - 96, - 83, - 93, + 97, + 84, + 94, 0, - 67, - 52, + 68, + 53, 0, 0, - 112, - 110, - 108, - 98, + 113, + 111, + 109, 99, 100, - 121, - 46, + 101, + 122, + 47, 0, 43, 40, @@ -1629,84 +1632,84 @@ static const yytype_int8 yydefact[] = {0, 0, 34, 0, - 120, + 121, 0, - 55, + 56, 0, - 45, + 46, 0, 36, - 94, - 68, - 117, - 114, + 95, + 69, + 118, 115, - 53, + 116, + 54, 41, 0, 0, + 120, 119, - 118, 0, - 61, + 62, 0, - 116, - 95}; + 117, + 96}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-160, - -160, - 185, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - -160, - 14, - -160, - -160, - 41, - 68, +static const yytype_int16 yypgoto[] = {-158, + -158, + 192, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + 16, + -158, + -158, + 37, + 70, 5, - -160, - -160, - -160, - -160, - 30, + -158, + -158, + -158, + -158, + 31, -91, - -160, - -160, - -160, - -160, - 80, - 171, - -160, + -158, + -158, + -158, + -158, + 83, + 174, + -158, -3, -52, - 162, - -160, - -160, - -160, - -69, - 85, - -1, - -104, - -159, - -160, - -160, + 165, + -158, + -158, + -158, + -78, + 74, 0, - -160, - 20, - -160, - -160, - -160, - -160}; + -108, + -157, + -158, + -158, + 3, + -158, + 22, + -158, + -158, + -158, + -158}; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = {0, @@ -1723,19 +1726,19 @@ static const yytype_uint8 yydefgoto[] = {0, 29, 30, 31, - 176, + 177, 32, 33, 145, 123, - 172, - 194, + 173, + 195, 143, 34, 132, 150, 54, - 198, + 199, 35, 36, 118, @@ -1748,15 +1751,15 @@ static const yytype_uint8 yydefgoto[] = {0, 57, 58, 59, - 177, - 112, 178, + 112, + 179, 116, 134, 163, - 182, - 212, + 183, 213, + 214, 149, 39, 40, @@ -1770,65 +1773,65 @@ static const yytype_uint8 yytable[] = {81, 60, 82, 120, + 130, + 46, 4, - 190, 191, - 218, - 130, - 47, - 136, + 192, + 219, + 137, + 111, + 113, 46, - 61, + 79, 82, - 137, 82, - 186, + 47, + 136, 164, 165, - 219, - 111, - 113, - 139, + 220, + 170, + 171, + 172, 47, - 140, - 141, - 142, - 217, - 115, - 79, + 187, 62, 63, + 218, + 80, + 61, 105, 106, 107, 108, - 169, + 115, 65, - 48, - 49, + 46, + 101, 151, - 51, - 209, - 78, - 166, - 80, - 71, - 170, - 187, - 171, 86, 87, + 78, + 166, + 210, 48, 49, 50, 51, + 47, + 52, + 53, 64, + 48, + 49, + 50, + 51, + 188, 52, 53, - 84, - 85, - 86, - 87, + 47, + 70, 133, 83, 128, @@ -1836,88 +1839,32 @@ static const yytype_uint8 yytable[] = {81, 85, 86, 87, + 180, + 203, 84, 85, 86, 87, - 202, - 83, 102, 83, - 66, - 179, - 46, - 101, - 42, - 44, - 43, - 45, - 170, - 46, - 171, - 164, - 165, - 67, - 47, - 204, - 151, - 68, - 183, - 184, - 70, - 47, - 214, - 184, - 73, - 74, - 75, - 76, - 127, - 89, - 90, - 93, - 91, - 189, - 133, - 133, - 92, - 94, - 96, - 95, - 99, - 100, - 97, + 83, 48, 49, 50, 51, - 98, + 66, 52, 53, + 164, + 165, + 1, + 2, 48, 49, - 50, + 68, 51, - 109, - 52, - 53, - 103, - 126, - 114, - 131, - 135, - 104, - 110, - 115, - 117, - 1, - 2, - 121, - 122, - 124, - 133, - 125, - 211, + 205, + 151, 3, 4, 5, @@ -1926,38 +1873,44 @@ static const yytype_uint8 yytable[] = {81, 8, 9, 10, - 138, - 146, - 168, + 184, + 185, + 127, 11, 12, 13, + 169, + 190, + 133, + 133, + 67, + 42, 153, - 144, - 211, - 147, - 154, - 148, - 152, - 174, + 43, 14, 15, - 175, - 181, - 185, - 188, - 197, - 193, - 192, + 154, + 170, + 171, + 172, + 44, + 71, + 45, 16, - 199, + 93, 17, - 195, - 200, + 73, + 139, 18, - 203, - 201, - 206, + 140, + 141, + 142, + 84, + 85, + 86, + 87, + 215, + 185, 155, 156, 157, @@ -1966,193 +1919,179 @@ static const yytype_uint8 yytable[] = {81, 160, 161, 162, - 164, - 207, - 220, - 69, + 133, + 74, + 212, + 89, 84, 85, 86, 87, + 75, + 76, + 90, + 91, + 92, + 94, + 95, + 96, + 97, + 98, + 99, + 212, + 100, + 103, + 104, + 109, + 110, + 114, + 115, + 121, + 126, + 117, + 131, + 122, + 135, + 124, + 144, + 138, + 146, + 125, + 168, + 148, + 147, + 152, + 175, + 176, + 182, + 186, + 189, + 193, + 200, + 198, + 194, + 201, + 196, + 202, + 204, + 164, + 207, + 217, + 208, + 221, + 69, + 197, 216, + 223, + 174, 222, - 221, - 215, - 173, - 208, - 196, - 205, + 209, + 206, + 0, 167, 77, 88, - 0, - 223, + 181, + 225, 224, - 210, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 180}; + 211}; static const yytype_int16 yycheck[] = {52, 4, 4, 94, + 112, + 23, 16, 164, 165, 5, - 112, - 35, - 25, + 118, + 89, + 90, + 23, 23, - 66, 4, - 118, 4, - 30, + 35, + 25, 44, 45, 17, - 89, - 90, - 29, + 34, 35, - 31, - 32, - 33, - 54, - 43, - 23, + 36, + 35, + 30, 13, 14, + 54, + 39, + 66, 84, 85, 86, 87, - 23, - 42, - 64, - 65, - 131, - 67, - 201, - 46, - 135, - 39, - 3, - 34, - 62, - 36, - 70, - 71, - 64, - 65, - 66, - 67, - 40, - 69, - 70, - 68, - 69, - 70, - 71, - 115, - 66, - 54, - 68, - 69, - 70, - 71, - 68, - 69, - 70, - 71, - 178, - 66, - 79, - 66, - 66, - 148, - 23, - 24, - 12, - 12, - 14, - 14, - 34, - 23, - 36, - 44, - 45, - 66, - 35, - 184, - 185, - 49, - 24, - 25, - 0, - 35, - 24, - 25, - 66, - 66, - 66, - 66, - 109, - 42, + 43, 42, - 46, - 66, - 163, - 164, - 165, - 66, - 56, - 23, - 50, - 24, + 23, 24, - 47, + 131, + 70, + 71, + 46, + 135, + 202, 64, 65, 66, 67, - 47, + 35, 69, 70, + 40, 64, 65, 66, 67, - 25, + 62, 69, 70, + 35, + 0, + 115, 66, - 24, - 41, - 23, - 56, + 54, + 68, + 69, + 70, + 71, + 148, + 179, + 68, + 69, + 70, + 71, + 79, 66, 66, - 43, + 64, + 65, + 66, + 67, 66, + 69, + 70, + 44, + 45, 7, 8, + 64, + 65, + 49, 67, - 66, - 66, - 201, - 66, - 203, + 185, + 186, 15, 16, 17, @@ -2161,38 +2100,44 @@ static const yytype_int16 yycheck[] = {52, 20, 21, 22, - 40, - 23, - 12, + 24, + 25, + 109, 26, 27, 28, + 23, + 163, + 164, + 165, + 66, + 12, 30, - 25, - 220, - 55, - 34, - 25, - 25, - 24, + 14, 37, 38, - 66, - 11, - 23, 34, - 52, - 64, - 66, + 34, + 35, + 36, + 12, + 3, + 14, + 46, 46, - 25, 48, - 35, - 24, + 66, + 29, 51, - 6, - 47, + 31, + 32, + 33, + 68, + 69, + 70, + 71, 24, + 25, 56, 57, 58, @@ -2201,40 +2146,82 @@ static const yytype_int16 yycheck[] = {52, 61, 62, 63, - 44, - 53, - 25, - 18, + 202, + 66, + 204, + 42, 68, 69, 70, 71, + 66, + 66, + 42, + 66, + 66, + 56, + 50, + 23, + 47, + 47, + 24, + 221, + 24, + 66, + 66, + 25, + 66, + 41, + 43, + 67, + 24, + 66, + 23, + 66, 56, + 66, + 25, + 40, + 23, + 66, + 12, + 25, 55, + 25, + 24, 66, - 206, + 11, + 23, + 34, + 66, + 25, + 52, + 64, + 24, + 35, + 47, + 6, + 44, + 24, + 56, + 53, + 25, + 18, + 174, + 207, + 55, 144, - 199, - 173, - 185, + 66, + 200, + 186, + -1, 136, 46, 56, - -1, - 220, - 222, - 202, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 148}; + 148, + 223, + 221, + 203}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ @@ -2409,6 +2396,7 @@ static const yytype_int8 yystos[] = {0, 12, 23, 34, + 35, 36, 92, 91, @@ -2511,6 +2499,7 @@ static const yytype_int8 yyr1[] = {0, 92, 92, 92, + 92, 93, 94, 94, @@ -2638,6 +2627,7 @@ static const yytype_int8 yyr2[] = {0, 3, 2, 1, + 1, 0, 1, 1, @@ -3506,7 +3496,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1811 "yacc_sql.cpp" +#line 1809 "yacc_sql.cpp" break; case 24: /* exit_stmt: EXIT */ @@ -3515,7 +3505,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1820 "yacc_sql.cpp" +#line 1818 "yacc_sql.cpp" break; case 25: /* help_stmt: HELP */ @@ -3523,7 +3513,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1828 "yacc_sql.cpp" +#line 1826 "yacc_sql.cpp" break; case 26: /* sync_stmt: SYNC */ @@ -3531,7 +3521,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1836 "yacc_sql.cpp" +#line 1834 "yacc_sql.cpp" break; case 27: /* begin_stmt: TRX_BEGIN */ @@ -3539,7 +3529,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1844 "yacc_sql.cpp" +#line 1842 "yacc_sql.cpp" break; case 28: /* commit_stmt: TRX_COMMIT */ @@ -3547,7 +3537,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1852 "yacc_sql.cpp" +#line 1850 "yacc_sql.cpp" break; case 29: /* rollback_stmt: TRX_ROLLBACK */ @@ -3555,7 +3545,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1860 "yacc_sql.cpp" +#line 1858 "yacc_sql.cpp" break; case 30: /* drop_table_stmt: DROP TABLE ID */ @@ -3565,7 +3555,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1870 "yacc_sql.cpp" +#line 1868 "yacc_sql.cpp" break; case 31: /* show_tables_stmt: SHOW TABLES */ @@ -3573,7 +3563,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1878 "yacc_sql.cpp" +#line 1876 "yacc_sql.cpp" break; case 32: /* desc_table_stmt: DESC ID */ @@ -3583,7 +3573,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1888 "yacc_sql.cpp" +#line 1886 "yacc_sql.cpp" break; case 33: /* show_index_stmt: SHOW INDEX FROM relation */ @@ -3594,7 +3584,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1899 "yacc_sql.cpp" +#line 1897 "yacc_sql.cpp" break; case 34: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE attr_list RBRACE */ @@ -3609,7 +3599,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1914 "yacc_sql.cpp" +#line 1912 "yacc_sql.cpp" break; case 35: /* attr_list: ID */ @@ -3619,7 +3609,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1924 "yacc_sql.cpp" +#line 1922 "yacc_sql.cpp" break; case 36: /* attr_list: ID COMMA attr_list */ @@ -3630,7 +3620,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 1934 "yacc_sql.cpp" +#line 1932 "yacc_sql.cpp" break; case 37: /* drop_index_stmt: DROP INDEX ID ON ID */ @@ -3642,7 +3632,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1946 "yacc_sql.cpp" +#line 1944 "yacc_sql.cpp" break; case 38: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ @@ -3667,7 +3657,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); } } -#line 1971 "yacc_sql.cpp" +#line 1969 "yacc_sql.cpp" break; case 39: /* attr_def_list: %empty */ @@ -3675,7 +3665,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.attr_infos) = nullptr; } -#line 1979 "yacc_sql.cpp" +#line 1977 "yacc_sql.cpp" break; case 40: /* attr_def_list: COMMA attr_def attr_def_list */ @@ -3689,7 +3679,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1993 "yacc_sql.cpp" +#line 1991 "yacc_sql.cpp" break; case 41: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ @@ -3705,7 +3695,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 2009 "yacc_sql.cpp" +#line 2007 "yacc_sql.cpp" break; case 42: /* attr_def: ID type nullable_constraint */ @@ -3731,7 +3721,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2035 "yacc_sql.cpp" +#line 2033 "yacc_sql.cpp" break; case 43: /* nullable_constraint: NOT NULL_T */ @@ -3739,67 +3729,75 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2043 "yacc_sql.cpp" +#line 2041 "yacc_sql.cpp" break; case 44: /* nullable_constraint: NULLABLE */ #line 441 "yacc_sql.y" { - (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true + (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2051 "yacc_sql.cpp" +#line 2049 "yacc_sql.cpp" break; - case 45: /* nullable_constraint: %empty */ + case 45: /* nullable_constraint: NULL_T */ #line 445 "yacc_sql.y" + { + (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 + } +#line 2057 "yacc_sql.cpp" + break; + + case 46: /* nullable_constraint: %empty */ +#line 449 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 2059 "yacc_sql.cpp" +#line 2065 "yacc_sql.cpp" break; - case 46: /* number: NUMBER */ -#line 451 "yacc_sql.y" + case 47: /* number: NUMBER */ +#line 455 "yacc_sql.y" { (yyval.number) = (yyvsp[0].number); } -#line 2065 "yacc_sql.cpp" +#line 2071 "yacc_sql.cpp" break; - case 47: /* type: INT_T */ -#line 454 "yacc_sql.y" + case 48: /* type: INT_T */ +#line 458 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2071 "yacc_sql.cpp" +#line 2077 "yacc_sql.cpp" break; - case 48: /* type: STRING_T */ -#line 455 "yacc_sql.y" + case 49: /* type: STRING_T */ +#line 459 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2077 "yacc_sql.cpp" +#line 2083 "yacc_sql.cpp" break; - case 49: /* type: FLOAT_T */ -#line 456 "yacc_sql.y" + case 50: /* type: FLOAT_T */ +#line 460 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2083 "yacc_sql.cpp" +#line 2089 "yacc_sql.cpp" break; - case 50: /* type: DATE_T */ -#line 457 "yacc_sql.y" + case 51: /* type: DATE_T */ +#line 461 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2089 "yacc_sql.cpp" +#line 2095 "yacc_sql.cpp" break; - case 51: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 462 "yacc_sql.y" + case 52: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 466 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -3809,102 +3807,102 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2103 "yacc_sql.cpp" +#line 2109 "yacc_sql.cpp" break; - case 52: /* values_list: LBRACE value_list RBRACE */ -#line 475 "yacc_sql.y" + case 53: /* values_list: LBRACE value_list RBRACE */ +#line 479 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2113 "yacc_sql.cpp" +#line 2119 "yacc_sql.cpp" break; - case 53: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 481 "yacc_sql.y" + case 54: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 485 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2122 "yacc_sql.cpp" +#line 2128 "yacc_sql.cpp" break; - case 54: /* value_list: value */ -#line 488 "yacc_sql.y" + case 55: /* value_list: value */ +#line 492 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2132 "yacc_sql.cpp" +#line 2138 "yacc_sql.cpp" break; - case 55: /* value_list: value_list COMMA value */ -#line 494 "yacc_sql.y" + case 56: /* value_list: value_list COMMA value */ +#line 498 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2141 "yacc_sql.cpp" +#line 2147 "yacc_sql.cpp" break; - case 56: /* value: NUMBER */ -#line 501 "yacc_sql.y" + case 57: /* value: NUMBER */ +#line 505 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2150 "yacc_sql.cpp" +#line 2156 "yacc_sql.cpp" break; - case 57: /* value: FLOAT */ -#line 505 "yacc_sql.y" + case 58: /* value: FLOAT */ +#line 509 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2159 "yacc_sql.cpp" +#line 2165 "yacc_sql.cpp" break; - case 58: /* value: SSS */ -#line 509 "yacc_sql.y" + case 59: /* value: SSS */ +#line 513 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2170 "yacc_sql.cpp" +#line 2176 "yacc_sql.cpp" break; - case 59: /* value: NULL_T */ -#line 515 "yacc_sql.y" + case 60: /* value: NULL_T */ +#line 519 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2178 "yacc_sql.cpp" +#line 2184 "yacc_sql.cpp" break; - case 60: /* storage_format: %empty */ -#line 522 "yacc_sql.y" + case 61: /* storage_format: %empty */ +#line 526 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2186 "yacc_sql.cpp" +#line 2192 "yacc_sql.cpp" break; - case 61: /* storage_format: STORAGE FORMAT EQ ID */ -#line 526 "yacc_sql.y" + case 62: /* storage_format: STORAGE FORMAT EQ ID */ +#line 530 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2194 "yacc_sql.cpp" +#line 2200 "yacc_sql.cpp" break; - case 62: /* delete_stmt: DELETE FROM ID where */ -#line 533 "yacc_sql.y" + case 63: /* delete_stmt: DELETE FROM ID where */ +#line 537 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -3913,11 +3911,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2207 "yacc_sql.cpp" +#line 2213 "yacc_sql.cpp" break; - case 63: /* update_stmt: UPDATE ID SET setClauses where */ -#line 545 "yacc_sql.y" + case 64: /* update_stmt: UPDATE ID SET setClauses where */ +#line 549 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -3928,41 +3926,41 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2222 "yacc_sql.cpp" +#line 2228 "yacc_sql.cpp" break; - case 64: /* setClauses: setClause */ -#line 559 "yacc_sql.y" + case 65: /* setClauses: setClause */ +#line 563 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2232 "yacc_sql.cpp" +#line 2238 "yacc_sql.cpp" break; - case 65: /* setClauses: setClauses COMMA setClause */ -#line 565 "yacc_sql.y" + case 66: /* setClauses: setClauses COMMA setClause */ +#line 569 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2241 "yacc_sql.cpp" +#line 2247 "yacc_sql.cpp" break; - case 66: /* setClause: ID EQ value */ -#line 573 "yacc_sql.y" + case 67: /* setClause: ID EQ value */ +#line 577 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } -#line 2252 "yacc_sql.cpp" +#line 2258 "yacc_sql.cpp" break; - case 67: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 583 "yacc_sql.y" + case 68: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ +#line 587 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-5].expression_list) != nullptr) { @@ -3991,11 +3989,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].orderby_list); } } -#line 2285 "yacc_sql.cpp" +#line 2291 "yacc_sql.cpp" break; - case 68: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 612 "yacc_sql.y" + case 69: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 616 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4027,21 +4025,21 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2319 "yacc_sql.cpp" +#line 2325 "yacc_sql.cpp" break; - case 69: /* calc_stmt: CALC expression_list */ -#line 645 "yacc_sql.y" + case 70: /* calc_stmt: CALC expression_list */ +#line 649 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2329 "yacc_sql.cpp" +#line 2335 "yacc_sql.cpp" break; - case 70: /* expression_list: expression alias */ -#line 654 "yacc_sql.y" + case 71: /* expression_list: expression alias */ +#line 658 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4050,11 +4048,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2342 "yacc_sql.cpp" +#line 2348 "yacc_sql.cpp" break; - case 71: /* expression_list: expression alias COMMA expression_list */ -#line 663 "yacc_sql.y" + case 72: /* expression_list: expression alias COMMA expression_list */ +#line 667 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4067,47 +4065,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2359 "yacc_sql.cpp" +#line 2365 "yacc_sql.cpp" break; - case 72: /* expression: expression '+' expression */ -#line 678 "yacc_sql.y" + case 73: /* expression: expression '+' expression */ +#line 682 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2367 "yacc_sql.cpp" +#line 2373 "yacc_sql.cpp" break; - case 73: /* expression: expression '-' expression */ -#line 681 "yacc_sql.y" + case 74: /* expression: expression '-' expression */ +#line 685 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2375 "yacc_sql.cpp" +#line 2381 "yacc_sql.cpp" break; - case 74: /* expression: expression '*' expression */ -#line 684 "yacc_sql.y" + case 75: /* expression: expression '*' expression */ +#line 688 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2383 "yacc_sql.cpp" +#line 2389 "yacc_sql.cpp" break; - case 75: /* expression: expression '/' expression */ -#line 687 "yacc_sql.y" + case 76: /* expression: expression '/' expression */ +#line 691 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2391 "yacc_sql.cpp" +#line 2397 "yacc_sql.cpp" break; - case 76: /* expression: LBRACE expression_list RBRACE */ -#line 690 "yacc_sql.y" + case 77: /* expression: LBRACE expression_list RBRACE */ +#line 694 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -4117,89 +4115,89 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2405 "yacc_sql.cpp" +#line 2411 "yacc_sql.cpp" break; - case 77: /* expression: '-' expression */ -#line 699 "yacc_sql.y" + case 78: /* expression: '-' expression */ +#line 703 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2413 "yacc_sql.cpp" +#line 2419 "yacc_sql.cpp" break; - case 78: /* expression: value */ -#line 702 "yacc_sql.y" + case 79: /* expression: value */ +#line 706 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2423 "yacc_sql.cpp" +#line 2429 "yacc_sql.cpp" break; - case 79: /* expression: rel_attr */ -#line 707 "yacc_sql.y" + case 80: /* expression: rel_attr */ +#line 711 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2434 "yacc_sql.cpp" +#line 2440 "yacc_sql.cpp" break; - case 80: /* expression: '*' */ -#line 713 "yacc_sql.y" + case 81: /* expression: '*' */ +#line 717 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2442 "yacc_sql.cpp" +#line 2448 "yacc_sql.cpp" break; - case 81: /* expression: aggr_func_expr */ -#line 716 "yacc_sql.y" + case 82: /* expression: aggr_func_expr */ +#line 720 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2450 "yacc_sql.cpp" +#line 2456 "yacc_sql.cpp" break; - case 82: /* expression: sub_query_expr */ -#line 719 "yacc_sql.y" + case 83: /* expression: sub_query_expr */ +#line 723 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2458 "yacc_sql.cpp" +#line 2464 "yacc_sql.cpp" break; - case 83: /* alias: %empty */ -#line 726 "yacc_sql.y" + case 84: /* alias: %empty */ +#line 730 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2466 "yacc_sql.cpp" +#line 2472 "yacc_sql.cpp" break; - case 84: /* alias: ID */ -#line 729 "yacc_sql.y" + case 85: /* alias: ID */ +#line 733 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2474 "yacc_sql.cpp" +#line 2480 "yacc_sql.cpp" break; - case 85: /* alias: AS ID */ -#line 732 "yacc_sql.y" + case 86: /* alias: AS ID */ +#line 736 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2482 "yacc_sql.cpp" +#line 2488 "yacc_sql.cpp" break; - case 86: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 738 "yacc_sql.y" + case 87: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 742 "yacc_sql.y" { if ((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); @@ -4207,37 +4205,37 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2494 "yacc_sql.cpp" +#line 2500 "yacc_sql.cpp" break; - case 87: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 746 "yacc_sql.y" + case 88: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 750 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); } -#line 2502 "yacc_sql.cpp" +#line 2508 "yacc_sql.cpp" break; - case 88: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 753 "yacc_sql.y" + case 89: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 757 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2510 "yacc_sql.cpp" +#line 2516 "yacc_sql.cpp" break; - case 89: /* rel_attr: ID */ -#line 759 "yacc_sql.y" + case 90: /* rel_attr: ID */ +#line 763 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2520 "yacc_sql.cpp" +#line 2526 "yacc_sql.cpp" break; - case 90: /* rel_attr: ID DOT ID */ -#line 764 "yacc_sql.y" + case 91: /* rel_attr: ID DOT ID */ +#line 768 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -4245,19 +4243,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2532 "yacc_sql.cpp" +#line 2538 "yacc_sql.cpp" break; - case 91: /* relation: ID */ -#line 774 "yacc_sql.y" + case 92: /* relation: ID */ +#line 778 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2540 "yacc_sql.cpp" +#line 2546 "yacc_sql.cpp" break; - case 92: /* rel_list: relation alias */ -#line 780 "yacc_sql.y" + case 93: /* rel_list: relation alias */ +#line 784 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if (nullptr != (yyvsp[0].string)) { @@ -4268,11 +4266,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2555 "yacc_sql.cpp" +#line 2561 "yacc_sql.cpp" break; - case 93: /* rel_list: relation alias COMMA rel_list */ -#line 790 "yacc_sql.y" + case 94: /* rel_list: relation alias COMMA rel_list */ +#line 794 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -4288,22 +4286,22 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-3].string)); } -#line 2574 "yacc_sql.cpp" +#line 2580 "yacc_sql.cpp" break; - case 94: /* joinClauses: relation ON condition */ -#line 808 "yacc_sql.y" + case 95: /* joinClauses: relation ON condition */ +#line 812 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2585 "yacc_sql.cpp" +#line 2591 "yacc_sql.cpp" break; - case 95: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 815 "yacc_sql.y" + case 96: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 819 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -4312,222 +4310,222 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2597 "yacc_sql.cpp" +#line 2603 "yacc_sql.cpp" break; - case 96: /* where: %empty */ -#line 826 "yacc_sql.y" + case 97: /* where: %empty */ +#line 830 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2605 "yacc_sql.cpp" +#line 2611 "yacc_sql.cpp" break; - case 97: /* where: WHERE condition */ -#line 829 "yacc_sql.y" + case 98: /* where: WHERE condition */ +#line 833 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2613 "yacc_sql.cpp" +#line 2619 "yacc_sql.cpp" break; - case 98: /* condition: expression comp_op expression */ -#line 836 "yacc_sql.y" + case 99: /* condition: expression comp_op expression */ +#line 840 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2621 "yacc_sql.cpp" +#line 2627 "yacc_sql.cpp" break; - case 99: /* condition: condition AND condition */ -#line 840 "yacc_sql.y" + case 100: /* condition: condition AND condition */ +#line 844 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2629 "yacc_sql.cpp" +#line 2635 "yacc_sql.cpp" break; - case 100: /* condition: condition OR condition */ -#line 844 "yacc_sql.y" + case 101: /* condition: condition OR condition */ +#line 848 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2637 "yacc_sql.cpp" +#line 2643 "yacc_sql.cpp" break; - case 101: /* comp_op: EQ */ -#line 850 "yacc_sql.y" + case 102: /* comp_op: EQ */ +#line 854 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2643 "yacc_sql.cpp" +#line 2649 "yacc_sql.cpp" break; - case 102: /* comp_op: LT */ -#line 851 "yacc_sql.y" + case 103: /* comp_op: LT */ +#line 855 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2649 "yacc_sql.cpp" +#line 2655 "yacc_sql.cpp" break; - case 103: /* comp_op: GT */ -#line 852 "yacc_sql.y" + case 104: /* comp_op: GT */ +#line 856 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2655 "yacc_sql.cpp" +#line 2661 "yacc_sql.cpp" break; - case 104: /* comp_op: LE */ -#line 853 "yacc_sql.y" + case 105: /* comp_op: LE */ +#line 857 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2661 "yacc_sql.cpp" +#line 2667 "yacc_sql.cpp" break; - case 105: /* comp_op: GE */ -#line 854 "yacc_sql.y" + case 106: /* comp_op: GE */ +#line 858 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2667 "yacc_sql.cpp" +#line 2673 "yacc_sql.cpp" break; - case 106: /* comp_op: NE */ -#line 855 "yacc_sql.y" + case 107: /* comp_op: NE */ +#line 859 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2673 "yacc_sql.cpp" +#line 2679 "yacc_sql.cpp" break; - case 107: /* comp_op: IS */ -#line 856 "yacc_sql.y" + case 108: /* comp_op: IS */ +#line 860 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2679 "yacc_sql.cpp" +#line 2685 "yacc_sql.cpp" break; - case 108: /* comp_op: IS NOT */ -#line 857 "yacc_sql.y" + case 109: /* comp_op: IS NOT */ +#line 861 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2685 "yacc_sql.cpp" +#line 2691 "yacc_sql.cpp" break; - case 109: /* comp_op: LIKE */ -#line 858 "yacc_sql.y" + case 110: /* comp_op: LIKE */ +#line 862 "yacc_sql.y" { (yyval.comp) = LIKE_OP; } -#line 2691 "yacc_sql.cpp" +#line 2697 "yacc_sql.cpp" break; - case 110: /* comp_op: NOT LIKE */ -#line 859 "yacc_sql.y" + case 111: /* comp_op: NOT LIKE */ +#line 863 "yacc_sql.y" { (yyval.comp) = NOT_LIKE_OP; } -#line 2697 "yacc_sql.cpp" +#line 2703 "yacc_sql.cpp" break; - case 111: /* comp_op: IN */ -#line 860 "yacc_sql.y" + case 112: /* comp_op: IN */ +#line 864 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2703 "yacc_sql.cpp" +#line 2709 "yacc_sql.cpp" break; - case 112: /* comp_op: NOT IN */ -#line 861 "yacc_sql.y" + case 113: /* comp_op: NOT IN */ +#line 865 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2709 "yacc_sql.cpp" +#line 2715 "yacc_sql.cpp" break; - case 113: /* opt_order_by: %empty */ -#line 866 "yacc_sql.y" + case 114: /* opt_order_by: %empty */ +#line 870 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2717 "yacc_sql.cpp" +#line 2723 "yacc_sql.cpp" break; - case 114: /* opt_order_by: ORDER BY sort_list */ -#line 870 "yacc_sql.y" + case 115: /* opt_order_by: ORDER BY sort_list */ +#line 874 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } -#line 2726 "yacc_sql.cpp" +#line 2732 "yacc_sql.cpp" break; - case 115: /* sort_list: sort_unit */ -#line 878 "yacc_sql.y" + case 116: /* sort_list: sort_unit */ +#line 882 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2735 "yacc_sql.cpp" +#line 2741 "yacc_sql.cpp" break; - case 116: /* sort_list: sort_unit COMMA sort_list */ -#line 883 "yacc_sql.y" + case 117: /* sort_list: sort_unit COMMA sort_list */ +#line 887 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2744 "yacc_sql.cpp" +#line 2750 "yacc_sql.cpp" break; - case 117: /* sort_unit: expression */ -#line 891 "yacc_sql.y" + case 118: /* sort_unit: expression */ +#line 895 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2754 "yacc_sql.cpp" +#line 2760 "yacc_sql.cpp" break; - case 118: /* sort_unit: expression DESC */ -#line 897 "yacc_sql.y" + case 119: /* sort_unit: expression DESC */ +#line 901 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2764 "yacc_sql.cpp" +#line 2770 "yacc_sql.cpp" break; - case 119: /* sort_unit: expression ASC */ -#line 903 "yacc_sql.y" + case 120: /* sort_unit: expression ASC */ +#line 907 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2774 "yacc_sql.cpp" +#line 2780 "yacc_sql.cpp" break; - case 120: /* group_by: %empty */ -#line 912 "yacc_sql.y" + case 121: /* group_by: %empty */ +#line 916 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2782 "yacc_sql.cpp" +#line 2788 "yacc_sql.cpp" break; - case 121: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 918 "yacc_sql.y" + case 122: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 922 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -4537,20 +4535,20 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); free(tmp_file_name); } -#line 2796 "yacc_sql.cpp" +#line 2802 "yacc_sql.cpp" break; - case 122: /* explain_stmt: EXPLAIN command_wrapper */ -#line 931 "yacc_sql.y" + case 123: /* explain_stmt: EXPLAIN command_wrapper */ +#line 935 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2805 "yacc_sql.cpp" +#line 2811 "yacc_sql.cpp" break; - case 123: /* set_variable_stmt: SET ID EQ value */ -#line 939 "yacc_sql.y" + case 124: /* set_variable_stmt: SET ID EQ value */ +#line 943 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -4558,10 +4556,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2817 "yacc_sql.cpp" +#line 2823 "yacc_sql.cpp" break; -#line 2821 "yacc_sql.cpp" +#line 2827 "yacc_sql.cpp" default: break; } @@ -4760,7 +4758,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) return yyresult; } -#line 951 "yacc_sql.y" +#line 955 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index c1ee33e1..f52338aa 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -439,7 +439,11 @@ nullable_constraint: } | NULLABLE { - $$ = true; // NULLABLE 对应的可空性为 true + $$ = true; // NULLABLE 对应的可空性为 true 2022 + } + | NULL_T + { + $$ = true; // NULL 对应的可空性也为 true 2023 } | /* empty */ { From 5d306104851de5cceac8b71d681de346ce32cb0b Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 3 Oct 2024 03:35:12 +0800 Subject: [PATCH 101/308] =?UTF-8?q?test:=20=E5=A2=9E=E5=8A=A0=E5=AF=B9=20n?= =?UTF-8?q?ull=20=E5=85=B3=E9=94=AE=E5=AD=97=E5=AE=9A=E4=B9=89=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-null.result | 2 +- test/case/test/primary-null.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/case/result/primary-null.result b/test/case/result/primary-null.result index b04d9522..fab17418 100644 --- a/test/case/result/primary-null.result +++ b/test/case/result/primary-null.result @@ -1,5 +1,5 @@ INITIALIZATION -CREATE TABLE null_table(id int, num int nullable, price float not null, birthday date nullable); +CREATE TABLE null_table(id int, num int nullable, price float not null, birthday date null); SUCCESS CREATE TABLE null_table2(id int, num int nullable, price float not null, birthday date nullable); SUCCESS diff --git a/test/case/test/primary-null.test b/test/case/test/primary-null.test index e86fead7..b707001f 100644 --- a/test/case/test/primary-null.test +++ b/test/case/test/primary-null.test @@ -1,5 +1,5 @@ -- echo initialization -CREATE TABLE null_table(id int, num int nullable, price float not null, birthday date nullable); +CREATE TABLE null_table(id int, num int nullable, price float not null, birthday date null); CREATE TABLE null_table2(id int, num int nullable, price float not null, birthday date nullable); CREATE INDEX index_num on null_table(num); From b568e9382bfb4c28b78f51eb0c8ed05fe1bef038 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 3 Oct 2024 03:47:25 +0800 Subject: [PATCH 102/308] =?UTF-8?q?fix:=20=E5=8C=85=E5=90=AB=20null=20?= =?UTF-8?q?=E7=9A=84=E8=B0=93=E8=AF=8D=E6=9D=A1=E4=BB=B6=E4=B8=8D=E5=81=9A?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/optimizer/logical_plan_generator.cpp | 82 ++++++++++--------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 0d0723de..fec757f6 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -187,50 +187,52 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrvalue_type() != right->value_type()) { - auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); - auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); - - if (right->type() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST || - left->type() == ExprType::SUBQUERY || left->type() == ExprType::EXPRLIST) { - // 暂时在这里不做处理 - return RC::SUCCESS; - } else if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { - ExprType left_type = left->type(); - auto cast_expr = make_unique(std::move(left), right->value_type()); - - if (left_type == ExprType::VALUE) { - Value left_val; - rc = cast_expr->try_get_value(left_val); - if (OB_FAIL(rc)) { - LOG_WARN("failed to get value from left child", strrc(rc)); - return rc; + if (left->value_type() != AttrType::NULLS && right->value_type() != AttrType::NULLS) { + if (left->value_type() != right->value_type()) { + auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); + auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); + + if (right->type() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST || + left->type() == ExprType::SUBQUERY || left->type() == ExprType::EXPRLIST) { + // 暂时在这里不做处理 + return RC::SUCCESS; + } else if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { + ExprType left_type = left->type(); + auto cast_expr = make_unique(std::move(left), right->value_type()); + + if (left_type == ExprType::VALUE) { + Value left_val; + rc = cast_expr->try_get_value(left_val); + if (OB_FAIL(rc)) { + LOG_WARN("failed to get value from left child", strrc(rc)); + return rc; + } + left = make_unique(left_val); + } else { + left = std::move(cast_expr); } - left = make_unique(left_val); - } else { - left = std::move(cast_expr); - } - } else if (right_to_left_cost < left_to_right_cost && right_to_left_cost != INT32_MAX) { - ExprType right_type = right->type(); - auto cast_expr = make_unique(std::move(right), left->value_type()); - - if (right_type == ExprType::VALUE) { - Value right_val; - rc = cast_expr->try_get_value(right_val); - if (OB_FAIL(rc)) { - LOG_WARN("failed to get value from right child", strrc(rc)); - return rc; + } else if (right_to_left_cost < left_to_right_cost && right_to_left_cost != INT32_MAX) { + ExprType right_type = right->type(); + auto cast_expr = make_unique(std::move(right), left->value_type()); + + if (right_type == ExprType::VALUE) { + Value right_val; + rc = cast_expr->try_get_value(right_val); + if (OB_FAIL(rc)) { + LOG_WARN("failed to get value from right child", strrc(rc)); + return rc; + } + right = make_unique(right_val); + } else { + right = std::move(cast_expr); } - right = make_unique(right_val); } else { - right = std::move(cast_expr); + rc = RC::UNSUPPORTED; + LOG_WARN("unsupported cast from %s to %s", + attr_type_to_string(left->value_type()), + attr_type_to_string(right->value_type())); + return rc; } - } else { - rc = RC::UNSUPPORTED; - LOG_WARN("unsupported cast from %s to %s", - attr_type_to_string(left->value_type()), - attr_type_to_string(right->value_type())); - return rc; } } } From 447813f9a456d5422a422ed5af111e9cc10f19d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 3 Oct 2024 06:57:44 +0000 Subject: [PATCH 103/308] =?UTF-8?q?=E5=88=9D=E6=AD=A5=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=A4=8D=E6=9D=82=E5=AD=90=E6=9F=A5=E8=AF=A2=EF=BC=88=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=AD=90=E6=9F=A5=E8=AF=A2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/net/plain_communicator.cpp | 176 ++++++--------- src/observer/sql/expr/expression.cpp | 161 ++++++++++---- src/observer/sql/expr/expression.h | 6 +- src/observer/sql/expr/expression_iterator.cpp | 22 +- src/observer/sql/expr/expression_iterator.h | 2 +- .../sql/operator/physical_operator.cpp | 7 + src/observer/sql/operator/physical_operator.h | 2 + .../operator/predicate_physical_operator.cpp | 11 +- .../operator/table_scan_physical_operator.cpp | 13 +- .../sql/optimizer/logical_plan_generator.cpp | 6 +- .../sql/optimizer/physical_plan_generator.cpp | 40 +--- src/observer/sql/parser/expression_binder.cpp | 9 + src/observer/sql/parser/yacc_sql.cpp | 206 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 3 +- src/observer/sql/stmt/select_stmt.cpp | 9 +- src/observer/sql/stmt/select_stmt.h | 3 +- src/observer/storage/buffer/frame.cpp | 8 - src/observer/storage/field/field_meta.h | 8 +- 18 files changed, 360 insertions(+), 332 deletions(-) diff --git a/src/observer/net/plain_communicator.cpp b/src/observer/net/plain_communicator.cpp index e1674671..bbc5a5ea 100644 --- a/src/observer/net/plain_communicator.cpp +++ b/src/observer/net/plain_communicator.cpp @@ -160,6 +160,7 @@ RC PlainCommunicator::write_debug(SessionEvent *request, bool &need_disconnect) RC PlainCommunicator::write_result(SessionEvent *event, bool &need_disconnect) { RC rc = write_result_internal(event, need_disconnect); + if (!need_disconnect) { RC rc1 = write_debug(event, need_disconnect); if (OB_FAIL(rc1)) { @@ -181,7 +182,6 @@ RC PlainCommunicator::write_result(SessionEvent *event, bool &need_disconnect) RC PlainCommunicator::write_result_internal(SessionEvent *event, bool &need_disconnect) { RC rc = RC::SUCCESS; - need_disconnect = true; SqlResult *sql_result = event->sql_result(); @@ -197,91 +197,63 @@ RC PlainCommunicator::write_result_internal(SessionEvent *event, bool &need_disc return write_state(event, need_disconnect); } - const TupleSchema &schema = sql_result->tuple_schema(); - const int cell_num = schema.cell_num(); + const TupleSchema &schema = sql_result->tuple_schema(); + const int cell_num = schema.cell_num(); - for (int i = 0; i < cell_num; i++) { - const TupleCellSpec &spec = schema.cell_at(i); - const char *alias = spec.alias(); - if (nullptr != alias || alias[0] != 0) { - if (0 != i) { - const char *delim = " | "; + auto write_output_head = [&]() { + for (int i = 0; i < cell_num; i++) { + const TupleCellSpec &spec = schema.cell_at(i); + const char *alias = spec.alias(); + if (nullptr != alias || alias[0] != 0) { + if (0 != i) { + const char *delim = " | "; + rc = writer_->writen(delim, strlen(delim)); + if (OB_FAIL(rc)) { + LOG_WARN("failed to send data to client. err=%s", strerror(errno)); + return rc; + } + } - rc = writer_->writen(delim, strlen(delim)); + int len = strlen(alias); + rc = writer_->writen(alias, len); if (OB_FAIL(rc)) { LOG_WARN("failed to send data to client. err=%s", strerror(errno)); + sql_result->close(); return rc; } } + } - int len = strlen(alias); - - rc = writer_->writen(alias, len); + if (cell_num > 0) { + char newline = '\n'; + rc = writer_->writen(&newline, 1); if (OB_FAIL(rc)) { LOG_WARN("failed to send data to client. err=%s", strerror(errno)); sql_result->close(); return rc; } } - } - - if (cell_num > 0) { - char newline = '\n'; - - rc = writer_->writen(&newline, 1); - if (OB_FAIL(rc)) { - LOG_WARN("failed to send data to client. err=%s", strerror(errno)); - sql_result->close(); - return rc; - } - } + return RC::SUCCESS; + }; rc = RC::SUCCESS; - if (event->session()->get_execution_mode() == ExecutionMode::CHUNK_ITERATOR - && event->session()->used_chunk_mode()) { - rc = write_chunk_result(sql_result); - } else { - rc = write_tuple_result(sql_result); - } - - if (OB_FAIL(rc)) { - return rc; - } - - if (cell_num == 0) { - // 除了select之外,其它的消息通常不会通过operator来返回结果,表头和行数据都是空的 - // 这里针对这种情况做特殊处理,当表头和行数据都是空的时候,就返回处理的结果 - // 可能是insert/delete等操作,不直接返回给客户端数据,这里把处理结果返回给客户端 - RC rc_close = sql_result->close(); - if (rc == RC::SUCCESS) { - rc = rc_close; - } - sql_result->set_return_code(rc); - return write_state(event, need_disconnect); - } else { - need_disconnect = false; - } - - RC rc_close = sql_result->close(); - if (OB_SUCC(rc)) { - rc = rc_close; - } - - return rc; -} - -RC PlainCommunicator::write_tuple_result(SqlResult *sql_result) -{ - RC rc = RC::SUCCESS; Tuple *tuple = nullptr; + bool is_first = true; while (RC::SUCCESS == (rc = sql_result->next_tuple(tuple))) { assert(tuple != nullptr); + if (is_first) { + rc = write_output_head(); + if (RC::SUCCESS != rc) { + return rc; + } + is_first = false; + } + int cell_num = tuple->cell_num(); for (int i = 0; i < cell_num; i++) { if (i != 0) { const char *delim = " | "; - rc = writer_->writen(delim, strlen(delim)); if (OB_FAIL(rc)) { LOG_WARN("failed to send data to client. err=%s", strerror(errno)); @@ -293,13 +265,11 @@ RC PlainCommunicator::write_tuple_result(SqlResult *sql_result) Value value; rc = tuple->cell_at(i, value); if (rc != RC::SUCCESS) { - LOG_WARN("failed to get tuple cell value. rc=%s", strrc(rc)); sql_result->close(); return rc; } - string cell_str = value.to_string(); - + std::string cell_str = value.to_string(); rc = writer_->writen(cell_str.data(), cell_str.size()); if (OB_FAIL(rc)) { LOG_WARN("failed to send data to client. err=%s", strerror(errno)); @@ -309,7 +279,6 @@ RC PlainCommunicator::write_tuple_result(SqlResult *sql_result) } char newline = '\n'; - rc = writer_->writen(&newline, 1); if (OB_FAIL(rc)) { LOG_WARN("failed to send data to client. err=%s", strerror(errno)); @@ -320,54 +289,45 @@ RC PlainCommunicator::write_tuple_result(SqlResult *sql_result) if (rc == RC::RECORD_EOF) { rc = RC::SUCCESS; + if (is_first) { + rc = write_output_head(); + if (RC::SUCCESS != rc) { + return rc; + } + is_first = false; + } + } else { + sql_result->close(); + sql_result->set_return_code(rc); + return write_state(event, need_disconnect); } - return rc; -} -RC PlainCommunicator::write_chunk_result(SqlResult *sql_result) -{ - RC rc = RC::SUCCESS; - Chunk chunk; - while (RC::SUCCESS == (rc = sql_result->next_chunk(chunk))) { - int col_num = chunk.column_num(); - for (int row_idx = 0; row_idx < chunk.rows(); row_idx++) { - for (int col_idx = 0; col_idx < col_num; col_idx++) { - if (col_idx != 0) { - const char *delim = " | "; - - rc = writer_->writen(delim, strlen(delim)); - if (OB_FAIL(rc)) { - LOG_WARN("failed to send data to client. err=%s", strerror(errno)); - sql_result->close(); - return rc; - } - } - - Value value = chunk.get_value(col_idx, row_idx); - - string cell_str = value.to_string(); + if (cell_num == 0) { + // 除了select之外,其它的消息通常不会通过operator来返回结果,表头和行数据都是空的 + // 这里针对这种情况做特殊处理,当表头和行数据都是空的时候,就返回处理的结果 + // 可能是insert/delete等操作,不直接返回给客户端数据,这里把处理结果返回给客户端 + RC rc_close = sql_result->close(); + if (rc == RC::SUCCESS) { + rc = rc_close; + } + sql_result->set_return_code(rc); + return write_state(event, need_disconnect); + } else { - rc = writer_->writen(cell_str.data(), cell_str.size()); - if (OB_FAIL(rc)) { - LOG_WARN("failed to send data to client. err=%s", strerror(errno)); - sql_result->close(); - return rc; - } - } - char newline = '\n'; + // rc = writer_->writen(send_message_delimiter_.data(), send_message_delimiter_.size()); + // if (OB_FAIL(rc)) { + // LOG_ERROR("Failed to send data back to client. ret=%s, error=%s", strrc(rc), strerror(errno)); + // sql_result->close(); + // return rc; + // } - rc = writer_->writen(&newline, 1); - if (OB_FAIL(rc)) { - LOG_WARN("failed to send data to client. err=%s", strerror(errno)); - sql_result->close(); - return rc; - } - } - chunk.reset(); + need_disconnect = false; } - if (rc == RC::RECORD_EOF) { - rc = RC::SUCCESS; + RC rc_close = sql_result->close(); + if (OB_SUCC(rc)) { + rc = rc_close; } + return rc; } \ No newline at end of file diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index fdea85e3..44370375 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -122,6 +122,9 @@ RC CastExpr::try_get_value(Value &result) const ComparisonExpr::ComparisonExpr(CompOp comp, Expression *left, Expression *right) : comp_(comp), left_(std::unique_ptr(left)), right_(std::unique_ptr(right)) {} +ComparisonExpr::ComparisonExpr(CompOp comp, std::unique_ptr left, std::unique_ptr right) + : comp_(comp), left_(std::move(left)), right_(std::move(right)) +{} ComparisonExpr::~ComparisonExpr() = default; @@ -210,56 +213,133 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) Value left_value; Value right_value; - // 重置 - left_->reset(); - right_->reset(); + SubQueryExpr *left_subquery_expr = nullptr; + SubQueryExpr *right_subquery_expr = nullptr; + + // Lambda to check if the expression is a subquery and open it + auto if_subquery_open = [&tuple](const std::unique_ptr &expr) { + SubQueryExpr *sqexp = nullptr; + if (expr->type() == ExprType::SUBQUERY) { + sqexp = dynamic_cast(expr.get()); + sqexp->open(nullptr, tuple); // Open the subquery expression (pass nullptr for now) + } + return sqexp; + }; + + left_subquery_expr = if_subquery_open(left_); + right_subquery_expr = if_subquery_open(right_); + + RC rc = RC::SUCCESS; - // 获取左值 - RC rc = left_->get_value(tuple, left_value); - if (rc != RC::SUCCESS && !left_value.is_null()) { + // Lambda to retrieve the value from an expression + auto get_value = [&tuple](const std::unique_ptr &expr, Value &value) { + RC rc = expr->get_value(tuple, value); + if (expr->type() == ExprType::SUBQUERY && RC::RECORD_EOF == rc) { + value.set_null(true); + rc = RC::SUCCESS; + } + return rc; + }; + + // Get the value of the left expression + rc = get_value(left_, left_value); + if (rc != RC::SUCCESS) { LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); + + // Close subquery expressions before returning + if (left_subquery_expr) + left_subquery_expr->close(); + if (right_subquery_expr) + right_subquery_expr->close(); + return rc; } - // 处理 IN 和 NOT IN 操作 - if (comp_ == IN_OP || comp_ == NOT_IN_OP) { + // Check if the left subquery has more rows (error if true) + if (left_subquery_expr && left_subquery_expr->has_more_row(tuple)) { + if (left_subquery_expr) + left_subquery_expr->close(); + if (right_subquery_expr) + right_subquery_expr->close(); + + return RC::INVALID_ARGUMENT; + } + // Handle IN and NOT IN operations + if (comp_ == IN_OP || comp_ == NOT_IN_OP) { if (left_value.is_null()) { value.set_boolean(false); + + // Close subquery expressions before returning + if (left_subquery_expr) + left_subquery_expr->close(); + if (right_subquery_expr) + right_subquery_expr->close(); + return RC::SUCCESS; } - bool has_match = false; - bool has_null = false; + if (right_->type() == ExprType::EXPRLIST) { + static_cast(right_.get())->reset(); + } + bool res = false; // Flag to indicate if a match is found + bool has_null = false; // Flag to indicate if any NULL value is found while (RC::SUCCESS == (rc = right_->get_value(tuple, right_value))) { if (right_value.is_null()) { has_null = true; } else if (left_value.compare(right_value) == 0) { - has_match = true; + res = true; } } + value.set_boolean(comp_ == IN_OP ? res : (has_null ? false : !res)); - bool result = (comp_ == IN_OP) ? has_match : (!has_null && !has_match); - value.set_boolean(result); + // Close subquery expressions before returning + if (left_subquery_expr) + left_subquery_expr->close(); + if (right_subquery_expr) + right_subquery_expr->close(); - return (rc == RC::RECORD_EOF) ? RC::SUCCESS : rc; + return rc == RC::RECORD_EOF ? RC::SUCCESS : rc; } - // 获取右值 - rc = right_->get_value(tuple, right_value); + // Get the value of the right expression + rc = get_value(right_, right_value); if (rc != RC::SUCCESS) { LOG_WARN("failed to get value of right expression. rc=%s", strrc(rc)); + + // Close subquery expressions before returning + if (left_subquery_expr) + left_subquery_expr->close(); + if (right_subquery_expr) + right_subquery_expr->close(); + return rc; } - // 比较左值和右值 + // Check if the right subquery has more rows (error if true) + if (right_subquery_expr && right_subquery_expr->has_more_row(tuple)) { + if (left_subquery_expr) + left_subquery_expr->close(); + if (right_subquery_expr) + right_subquery_expr->close(); + + return RC::INVALID_ARGUMENT; + } + + // Compare the left and right values bool bool_value = false; rc = compare_value(left_value, right_value, bool_value); if (rc == RC::SUCCESS) { value.set_boolean(bool_value); } + // Close subquery expressions before returning + if (left_subquery_expr) + left_subquery_expr->close(); + if (right_subquery_expr) + right_subquery_expr->close(); + return rc; } @@ -684,7 +764,7 @@ RC SubQueryExpr::generate_select_stmt(Db *db, const std::unordered_mapopen(trx); - if (OB_FAIL(rc)) { - return rc; - } + physical_oper_->set_parent_tuple(&tuple); + rc = physical_oper_->open(trx); - Value sub_query_value; - res_query.clear(); - while (RC::SUCCESS == physical_oper_->next()) { - physical_oper_->current_tuple()->cell_at(0, sub_query_value); - res_query.push_back(sub_query_value); - } - - res_query_avaliable = true; - visited_index = 0; - rc = physical_oper_->close(); return rc; } @@ -763,28 +831,29 @@ RC SubQueryExpr::reset() return RC::SUCCESS; } -bool SubQueryExpr::has_more_row() const { return res_query.size() > 1; } +bool SubQueryExpr::has_more_row(const Tuple &tuple) const +{ + physical_oper_->set_parent_tuple(&tuple); + return physical_oper_->next() != RC::RECORD_EOF; +} RC SubQueryExpr::get_value(const Tuple &tuple, Value &value) { - if (res_query.empty()) { - value.set_null(true); - return RC::RECORD_EOF; - } - if (visited_index == res_query.size()) { - return RC::RECORD_EOF; + physical_oper_->set_parent_tuple(&tuple); + + if (RC rc = physical_oper_->next(); RC::SUCCESS != rc) { + return rc; } - value = res_query[visited_index++]; - return RC::SUCCESS; + return physical_oper_->current_tuple()->cell_at(0, value); } +RC SubQueryExpr::close() { return physical_oper_->close(); } + RC SubQueryExpr::try_get_value(Value &value) const { return RC::UNIMPLEMENTED; } ExprType SubQueryExpr::type() const { return ExprType::SUBQUERY; } -AttrType SubQueryExpr::value_type() const -{ - return AttrType::UNDEFINED; +AttrType SubQueryExpr::value_type() const { return AttrType::UNDEFINED; } std::unique_ptr SubQueryExpr::deep_copy() const diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 51aa1f61..9ab31142 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -319,6 +319,7 @@ class ComparisonExpr : public Expression { public: ComparisonExpr(CompOp comp, Expression *left, Expression *right); + ComparisonExpr(CompOp comp, std::unique_ptr left, std::unique_ptr right); virtual ~ComparisonExpr(); ExprType type() const override { return ExprType::COMPARISON; } @@ -628,9 +629,10 @@ class SubQueryExpr : public Expression explicit SubQueryExpr(SelectSqlNode &select_node); virtual ~SubQueryExpr(); - RC open(Trx *trx); + RC open(Trx *trx,const Tuple&tuple); RC reset() override; - bool has_more_row() const; + RC close(); + bool has_more_row(const Tuple &tuple) const; RC get_value(const Tuple &tuple, Value &value) override; diff --git a/src/observer/sql/expr/expression_iterator.cpp b/src/observer/sql/expr/expression_iterator.cpp index ca8cd6d5..d7dd08e2 100644 --- a/src/observer/sql/expr/expression_iterator.cpp +++ b/src/observer/sql/expr/expression_iterator.cpp @@ -18,29 +18,31 @@ See the Mulan PSL v2 for more details. */ using namespace std; -RC ExpressionIterator::iterate_child_expr(Expression &expr, function &)> callback) +RC ExpressionIterator::iterate_child_expr(Expression &expr, const function &)> &callback) { RC rc = RC::SUCCESS; switch (expr.type()) { case ExprType::CAST: { - auto &cast_expr = static_cast(expr); - rc = callback(cast_expr.child()); + auto &cast_expr = dynamic_cast(expr); + rc = callback(cast_expr.child()); } break; case ExprType::COMPARISON: { - auto &comparison_expr = static_cast(expr); - rc = callback(comparison_expr.left()); + auto &comparison_expr = dynamic_cast(expr); + rc = callback(comparison_expr.left()); if (OB_SUCC(rc)) { rc = callback(comparison_expr.right()); + } else { + return rc; } } break; case ExprType::CONJUNCTION: { - auto &conjunction_expr = static_cast(expr); + auto &conjunction_expr = dynamic_cast(expr); for (auto &child : conjunction_expr.children()) { rc = callback(child); if (OB_FAIL(rc)) { @@ -51,16 +53,16 @@ RC ExpressionIterator::iterate_child_expr(Expression &expr, function(expr); - rc = callback(arithmetic_expr.left()); + auto &arithmetic_expr = dynamic_cast(expr); + rc = callback(arithmetic_expr.left()); if (OB_SUCC(rc)) { rc = callback(arithmetic_expr.right()); } } break; case ExprType::AGGREGATION: { - auto &aggregate_expr = static_cast(expr); - rc = callback(aggregate_expr.child()); + auto &aggregate_expr = dynamic_cast(expr); + rc = callback(aggregate_expr.child()); } break; case ExprType::NONE: diff --git a/src/observer/sql/expr/expression_iterator.h b/src/observer/sql/expr/expression_iterator.h index 2ad0298c..83214ff9 100644 --- a/src/observer/sql/expr/expression_iterator.h +++ b/src/observer/sql/expr/expression_iterator.h @@ -24,5 +24,5 @@ class Expression; class ExpressionIterator { public: - static RC iterate_child_expr(Expression &expr, std::function &)> callback); + static RC iterate_child_expr(Expression &expr, const std::function &)>& callback); }; \ No newline at end of file diff --git a/src/observer/sql/operator/physical_operator.cpp b/src/observer/sql/operator/physical_operator.cpp index c3a4c5ec..9b13c78f 100644 --- a/src/observer/sql/operator/physical_operator.cpp +++ b/src/observer/sql/operator/physical_operator.cpp @@ -41,3 +41,10 @@ std::string physical_operator_type_name(PhysicalOperatorType type) std::string PhysicalOperator::name() const { return physical_operator_type_name(type()); } std::string PhysicalOperator::param() const { return ""; } +void PhysicalOperator::set_parent_tuple(const Tuple *tuple) +{ + parent_tuple_ = tuple; + for (auto &child : children_) { + child->set_parent_tuple(tuple); + } +} diff --git a/src/observer/sql/operator/physical_operator.h b/src/observer/sql/operator/physical_operator.h index 63f5c6f2..f7f697be 100644 --- a/src/observer/sql/operator/physical_operator.h +++ b/src/observer/sql/operator/physical_operator.h @@ -87,9 +87,11 @@ class PhysicalOperator virtual RC tuple_schema(TupleSchema &schema) const { return RC::UNIMPLEMENTED; } void add_child(std::unique_ptr oper) { children_.emplace_back(std::move(oper)); } + void set_parent_tuple(const Tuple* tuple); std::vector> &children() { return children_; } protected: std::vector> children_; + const Tuple* parent_tuple_ = nullptr;//不相关子查询的时候使用 }; diff --git a/src/observer/sql/operator/predicate_physical_operator.cpp b/src/observer/sql/operator/predicate_physical_operator.cpp index 61b56445..b7568297 100644 --- a/src/observer/sql/operator/predicate_physical_operator.cpp +++ b/src/observer/sql/operator/predicate_physical_operator.cpp @@ -38,6 +38,8 @@ RC PredicatePhysicalOperator::next() RC rc = RC::SUCCESS; PhysicalOperator *oper = children_.front().get(); + Tuple * tp = nullptr; + JoinedTuple jt; while (RC::SUCCESS == (rc = oper->next())) { Tuple *tuple = oper->current_tuple(); if (nullptr == tuple) { @@ -45,9 +47,16 @@ RC PredicatePhysicalOperator::next() LOG_WARN("failed to get tuple from operator"); break; } + if (parent_tuple_) { + jt.set_left(tuple); + jt.set_right(const_cast(parent_tuple_)); + tp = &jt; + } else { + tp = tuple; + } Value value; - rc = expression_->get_value(*tuple, value); + rc = expression_->get_value(*tp, value); if (rc != RC::SUCCESS) { return rc; } diff --git a/src/observer/sql/operator/table_scan_physical_operator.cpp b/src/observer/sql/operator/table_scan_physical_operator.cpp index 5f0b6908..e6b0d83d 100644 --- a/src/observer/sql/operator/table_scan_physical_operator.cpp +++ b/src/observer/sql/operator/table_scan_physical_operator.cpp @@ -70,10 +70,17 @@ void TableScanPhysicalOperator::set_predicates(vector> && RC TableScanPhysicalOperator::filter(RowTuple &tuple, bool &result) { - RC rc = RC::SUCCESS; - Value value; + RC rc = RC::SUCCESS; + Value value; + Tuple *tp = &tuple; + JoinedTuple jt; + jt.set_left(&tuple); + jt.set_right(const_cast(parent_tuple_)); + if (parent_tuple_) { + tp = &jt; + } for (unique_ptr &expr : predicates_) { - rc = expr->get_value(tuple, value); + rc = expr->get_value(*tp, value); if (rc != RC::SUCCESS) { close(); return rc; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index dd4712a4..6d684daf 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -171,12 +171,8 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrtype() == ExprType::SUBQUERY) { - auto *sub_query_expr = dynamic_cast(expr); - rc = sub_query_expr->generate_logical_oper(); - return rc; } - - if (expr->type() == ExprType::COMPARISON) { + else if (expr->type() == ExprType::COMPARISON) { auto *comp_expr = dynamic_cast(expr); auto &left = comp_expr->left(); auto &right = comp_expr->right(); diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index 99b48cc5..5755b759 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -131,42 +131,12 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u // 看看是否有可以用于索引查找的表达式 Table *table = table_get_oper.table(); - auto process_subquery = [](Expression *expr) { - if (expr->type() == ExprType::SUBQUERY) { - SubQueryExpr *sub_query_expr = static_cast(expr); - sub_query_expr->generate_physical_oper(); - } - return RC::SUCCESS; - }; - Index *index = nullptr; ValueExpr *value_expr = nullptr; for (auto &expr : predicates) { - // 先执行子查询 - if (RC rc = expr->traverse_check(process_subquery); RC::SUCCESS != rc) { - return rc; - } if (expr->type() == ExprType::COMPARISON) { - auto comparison_expr = static_cast(expr.get()); - - // 子查询合法化 - if (comparison_expr->comp() == IN_OP || comparison_expr->comp() == NOT_IN_OP) { - continue; - } else { - auto get_subquery_expr = [](const std::unique_ptr &expr) -> SubQueryExpr * { - return expr->type() == ExprType::SUBQUERY ? dynamic_cast(expr.get()) : nullptr; - }; - // 检查左侧和右侧是否为子查询表达式 - SubQueryExpr *left_subquery_expr = get_subquery_expr(comparison_expr->left()); - if (left_subquery_expr != nullptr && !left_subquery_expr->one_row_ret()) { - return RC::UNSUPPORTED; - } - SubQueryExpr *right_subquery_expr = get_subquery_expr(comparison_expr->right()); - if (right_subquery_expr != nullptr && !right_subquery_expr->one_row_ret()) { - return RC::UNSUPPORTED; - } - } + auto comparison_expr = dynamic_cast(expr.get()); // 简单处理,就找等值查询 if (comparison_expr->comp() != EQUAL_TO) { @@ -183,12 +153,12 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u FieldExpr *field_expr = nullptr; if (left_expr->type() == ExprType::FIELD) { ASSERT(right_expr->type() == ExprType::VALUE, "right expr should be a value expr while left is field expr"); - field_expr = static_cast(left_expr.get()); - value_expr = static_cast(right_expr.get()); + field_expr = dynamic_cast(left_expr.get()); + value_expr = dynamic_cast(right_expr.get()); } else if (right_expr->type() == ExprType::FIELD) { ASSERT(left_expr->type() == ExprType::VALUE, "left expr should be a value expr while right is a field expr"); - field_expr = static_cast(right_expr.get()); - value_expr = static_cast(left_expr.get()); + field_expr = dynamic_cast(right_expr.get()); + value_expr = dynamic_cast(left_expr.get()); } if (field_expr == nullptr) { diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 7f0164ca..d6780f16 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -500,6 +500,15 @@ RC ExpressionBinder::bind_subquery_expression( auto subquery_expr = dynamic_cast(expr.get()); rc = subquery_expr->generate_select_stmt(context_.get_db(), context_.table_map()); + if (OB_FAIL(rc)) { + return rc; + } + rc = subquery_expr->generate_logical_oper(); + if (OB_FAIL(rc)) { + return rc; + } + rc = subquery_expr->generate_physical_oper(); + bound_expressions.emplace_back(std::move(expr)); return rc; } diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index fbedb453..d8b7a662 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -662,18 +662,18 @@ static const yytype_int8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 209, 209, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 240, 246, 251, 257, 263, 269, 275, - 282, 288, 296, 310, 320, 344, 347, 360, 372, 395, - 399, 404, 410, 413, 414, 415, 416, 419, 436, 439, - 450, 454, 458, 464, 470, 473, 480, 491, 505, 534, - 543, 552, 567, 570, 573, 576, 579, 588, 591, 596, - 602, 605, 608, 615, 618, 621, 626, 634, 641, 648, - 653, 663, 668, 678, 697, 700, 706, 710, 714, 721, - 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, - 732, 737, 740, 747, 753, 760, 767, 774, 783, 788, - 801, 809, 819, 820 + 0, 210, 210, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 241, 247, 252, 258, 264, 270, 276, + 283, 289, 297, 311, 321, 345, 348, 361, 373, 396, + 400, 405, 411, 414, 415, 416, 417, 420, 437, 440, + 451, 455, 459, 465, 471, 474, 481, 492, 506, 535, + 544, 553, 568, 571, 574, 577, 580, 589, 592, 597, + 603, 606, 609, 616, 619, 622, 627, 635, 642, 649, + 654, 664, 669, 679, 698, 701, 707, 711, 715, 722, + 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, + 733, 738, 741, 748, 754, 761, 768, 775, 784, 789, + 802, 810, 820, 821 }; #endif @@ -1771,7 +1771,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 210 "yacc_sql.y" +#line 211 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); @@ -1780,7 +1780,7 @@ YYLTYPE yylloc = yyloc_default; break; case 23: /* exit_stmt: EXIT */ -#line 240 "yacc_sql.y" +#line 241 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); @@ -1789,7 +1789,7 @@ YYLTYPE yylloc = yyloc_default; break; case 24: /* help_stmt: HELP */ -#line 246 "yacc_sql.y" +#line 247 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } @@ -1797,7 +1797,7 @@ YYLTYPE yylloc = yyloc_default; break; case 25: /* sync_stmt: SYNC */ -#line 251 "yacc_sql.y" +#line 252 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } @@ -1805,7 +1805,7 @@ YYLTYPE yylloc = yyloc_default; break; case 26: /* begin_stmt: TRX_BEGIN */ -#line 257 "yacc_sql.y" +#line 258 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } @@ -1813,7 +1813,7 @@ YYLTYPE yylloc = yyloc_default; break; case 27: /* commit_stmt: TRX_COMMIT */ -#line 263 "yacc_sql.y" +#line 264 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } @@ -1821,7 +1821,7 @@ YYLTYPE yylloc = yyloc_default; break; case 28: /* rollback_stmt: TRX_ROLLBACK */ -#line 269 "yacc_sql.y" +#line 270 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } @@ -1829,7 +1829,7 @@ YYLTYPE yylloc = yyloc_default; break; case 29: /* drop_table_stmt: DROP TABLE ID */ -#line 275 "yacc_sql.y" +#line 276 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); @@ -1839,7 +1839,7 @@ YYLTYPE yylloc = yyloc_default; break; case 30: /* show_tables_stmt: SHOW TABLES */ -#line 282 "yacc_sql.y" +#line 283 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } @@ -1847,7 +1847,7 @@ YYLTYPE yylloc = yyloc_default; break; case 31: /* desc_table_stmt: DESC ID */ -#line 288 "yacc_sql.y" +#line 289 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); @@ -1857,7 +1857,7 @@ YYLTYPE yylloc = yyloc_default; break; case 32: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE ID RBRACE */ -#line 297 "yacc_sql.y" +#line 298 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1872,7 +1872,7 @@ YYLTYPE yylloc = yyloc_default; break; case 33: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 311 "yacc_sql.y" +#line 312 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1884,7 +1884,7 @@ YYLTYPE yylloc = yyloc_default; break; case 34: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 321 "yacc_sql.y" +#line 322 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; @@ -1909,7 +1909,7 @@ YYLTYPE yylloc = yyloc_default; break; case 35: /* attr_def_list: %empty */ -#line 344 "yacc_sql.y" +#line 345 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } @@ -1917,7 +1917,7 @@ YYLTYPE yylloc = yyloc_default; break; case 36: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 348 "yacc_sql.y" +#line 349 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -1931,7 +1931,7 @@ YYLTYPE yylloc = yyloc_default; break; case 37: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 361 "yacc_sql.y" +#line 362 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -1947,7 +1947,7 @@ YYLTYPE yylloc = yyloc_default; break; case 38: /* attr_def: ID type nullable_constraint */ -#line 373 "yacc_sql.y" +#line 374 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -1971,7 +1971,7 @@ YYLTYPE yylloc = yyloc_default; break; case 39: /* nullable_constraint: NOT NULL_T */ -#line 396 "yacc_sql.y" +#line 397 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } @@ -1979,7 +1979,7 @@ YYLTYPE yylloc = yyloc_default; break; case 40: /* nullable_constraint: NULLABLE */ -#line 400 "yacc_sql.y" +#line 401 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true } @@ -1987,7 +1987,7 @@ YYLTYPE yylloc = yyloc_default; break; case 41: /* nullable_constraint: %empty */ -#line 404 "yacc_sql.y" +#line 405 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } @@ -1995,37 +1995,37 @@ YYLTYPE yylloc = yyloc_default; break; case 42: /* number: NUMBER */ -#line 410 "yacc_sql.y" +#line 411 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} #line 2001 "yacc_sql.cpp" break; case 43: /* type: INT_T */ -#line 413 "yacc_sql.y" +#line 414 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } #line 2007 "yacc_sql.cpp" break; case 44: /* type: STRING_T */ -#line 414 "yacc_sql.y" +#line 415 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } #line 2013 "yacc_sql.cpp" break; case 45: /* type: FLOAT_T */ -#line 415 "yacc_sql.y" +#line 416 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } #line 2019 "yacc_sql.cpp" break; case 46: /* type: DATE_T */ -#line 416 "yacc_sql.y" +#line 417 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } #line 2025 "yacc_sql.cpp" break; case 47: /* insert_stmt: INSERT INTO ID VALUES LBRACE value value_list RBRACE */ -#line 420 "yacc_sql.y" +#line 421 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -2042,7 +2042,7 @@ YYLTYPE yylloc = yyloc_default; break; case 48: /* value_list: %empty */ -#line 436 "yacc_sql.y" +#line 437 "yacc_sql.y" { (yyval.value_list) = nullptr; } @@ -2050,7 +2050,7 @@ YYLTYPE yylloc = yyloc_default; break; case 49: /* value_list: COMMA value value_list */ -#line 439 "yacc_sql.y" +#line 440 "yacc_sql.y" { if ((yyvsp[0].value_list) != nullptr) { (yyval.value_list) = (yyvsp[0].value_list); @@ -2064,7 +2064,7 @@ YYLTYPE yylloc = yyloc_default; break; case 50: /* value: NUMBER */ -#line 450 "yacc_sql.y" +#line 451 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); @@ -2073,7 +2073,7 @@ YYLTYPE yylloc = yyloc_default; break; case 51: /* value: FLOAT */ -#line 454 "yacc_sql.y" +#line 455 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); @@ -2082,7 +2082,7 @@ YYLTYPE yylloc = yyloc_default; break; case 52: /* value: SSS */ -#line 458 "yacc_sql.y" +#line 459 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); @@ -2093,7 +2093,7 @@ YYLTYPE yylloc = yyloc_default; break; case 53: /* value: NULL_T */ -#line 464 "yacc_sql.y" +#line 465 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } @@ -2101,7 +2101,7 @@ YYLTYPE yylloc = yyloc_default; break; case 54: /* storage_format: %empty */ -#line 470 "yacc_sql.y" +#line 471 "yacc_sql.y" { (yyval.string) = nullptr; } @@ -2109,7 +2109,7 @@ YYLTYPE yylloc = yyloc_default; break; case 55: /* storage_format: STORAGE FORMAT EQ ID */ -#line 474 "yacc_sql.y" +#line 475 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } @@ -2117,7 +2117,7 @@ YYLTYPE yylloc = yyloc_default; break; case 56: /* delete_stmt: DELETE FROM ID where */ -#line 481 "yacc_sql.y" +#line 482 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2130,7 +2130,7 @@ YYLTYPE yylloc = yyloc_default; break; case 57: /* update_stmt: UPDATE ID SET ID EQ value where */ -#line 492 "yacc_sql.y" +#line 493 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-5].string); @@ -2146,7 +2146,7 @@ YYLTYPE yylloc = yyloc_default; break; case 58: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 506 "yacc_sql.y" +#line 507 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-5].expression_list) != nullptr) { @@ -2177,7 +2177,7 @@ YYLTYPE yylloc = yyloc_default; break; case 59: /* calc_stmt: CALC expression_list */ -#line 535 "yacc_sql.y" +#line 536 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); @@ -2187,7 +2187,7 @@ YYLTYPE yylloc = yyloc_default; break; case 60: /* expression_list: expression alias */ -#line 544 "yacc_sql.y" +#line 545 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2200,7 +2200,7 @@ YYLTYPE yylloc = yyloc_default; break; case 61: /* expression_list: expression alias COMMA expression_list */ -#line 553 "yacc_sql.y" +#line 554 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2217,7 +2217,7 @@ YYLTYPE yylloc = yyloc_default; break; case 62: /* expression: expression '+' expression */ -#line 567 "yacc_sql.y" +#line 568 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } @@ -2225,7 +2225,7 @@ YYLTYPE yylloc = yyloc_default; break; case 63: /* expression: expression '-' expression */ -#line 570 "yacc_sql.y" +#line 571 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } @@ -2233,7 +2233,7 @@ YYLTYPE yylloc = yyloc_default; break; case 64: /* expression: expression '*' expression */ -#line 573 "yacc_sql.y" +#line 574 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } @@ -2241,7 +2241,7 @@ YYLTYPE yylloc = yyloc_default; break; case 65: /* expression: expression '/' expression */ -#line 576 "yacc_sql.y" +#line 577 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } @@ -2249,7 +2249,7 @@ YYLTYPE yylloc = yyloc_default; break; case 66: /* expression: LBRACE expression_list RBRACE */ -#line 579 "yacc_sql.y" +#line 580 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2263,7 +2263,7 @@ YYLTYPE yylloc = yyloc_default; break; case 67: /* expression: '-' expression */ -#line 588 "yacc_sql.y" +#line 589 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } @@ -2271,7 +2271,7 @@ YYLTYPE yylloc = yyloc_default; break; case 68: /* expression: value */ -#line 591 "yacc_sql.y" +#line 592 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); @@ -2281,7 +2281,7 @@ YYLTYPE yylloc = yyloc_default; break; case 69: /* expression: rel_attr */ -#line 596 "yacc_sql.y" +#line 597 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); @@ -2292,7 +2292,7 @@ YYLTYPE yylloc = yyloc_default; break; case 70: /* expression: '*' */ -#line 602 "yacc_sql.y" +#line 603 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } @@ -2300,7 +2300,7 @@ YYLTYPE yylloc = yyloc_default; break; case 71: /* expression: aggr_func_expr */ -#line 605 "yacc_sql.y" +#line 606 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } @@ -2308,7 +2308,7 @@ YYLTYPE yylloc = yyloc_default; break; case 72: /* expression: sub_query_expr */ -#line 608 "yacc_sql.y" +#line 609 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } @@ -2316,7 +2316,7 @@ YYLTYPE yylloc = yyloc_default; break; case 73: /* alias: %empty */ -#line 615 "yacc_sql.y" +#line 616 "yacc_sql.y" { (yyval.string) = nullptr; } @@ -2324,7 +2324,7 @@ YYLTYPE yylloc = yyloc_default; break; case 74: /* alias: ID */ -#line 618 "yacc_sql.y" +#line 619 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } @@ -2332,7 +2332,7 @@ YYLTYPE yylloc = yyloc_default; break; case 75: /* alias: AS ID */ -#line 621 "yacc_sql.y" +#line 622 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } @@ -2340,7 +2340,7 @@ YYLTYPE yylloc = yyloc_default; break; case 76: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 627 "yacc_sql.y" +#line 628 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2352,7 +2352,7 @@ YYLTYPE yylloc = yyloc_default; break; case 77: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 635 "yacc_sql.y" +#line 636 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } @@ -2360,7 +2360,7 @@ YYLTYPE yylloc = yyloc_default; break; case 78: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 642 "yacc_sql.y" +#line 643 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } @@ -2368,7 +2368,7 @@ YYLTYPE yylloc = yyloc_default; break; case 79: /* rel_attr: ID */ -#line 648 "yacc_sql.y" +#line 649 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); @@ -2378,7 +2378,7 @@ YYLTYPE yylloc = yyloc_default; break; case 80: /* rel_attr: ID DOT ID */ -#line 653 "yacc_sql.y" +#line 654 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2390,7 +2390,7 @@ YYLTYPE yylloc = yyloc_default; break; case 81: /* relation: ID */ -#line 663 "yacc_sql.y" +#line 664 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } @@ -2398,7 +2398,7 @@ YYLTYPE yylloc = yyloc_default; break; case 82: /* rel_list: relation alias */ -#line 668 "yacc_sql.y" +#line 669 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2413,7 +2413,7 @@ YYLTYPE yylloc = yyloc_default; break; case 83: /* rel_list: relation alias COMMA rel_list */ -#line 678 "yacc_sql.y" +#line 679 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2433,7 +2433,7 @@ YYLTYPE yylloc = yyloc_default; break; case 84: /* where: %empty */ -#line 697 "yacc_sql.y" +#line 698 "yacc_sql.y" { (yyval.expression) = nullptr; } @@ -2441,7 +2441,7 @@ YYLTYPE yylloc = yyloc_default; break; case 85: /* where: WHERE condition */ -#line 700 "yacc_sql.y" +#line 701 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } @@ -2449,7 +2449,7 @@ YYLTYPE yylloc = yyloc_default; break; case 86: /* condition: expression comp_op expression */ -#line 707 "yacc_sql.y" +#line 708 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } @@ -2457,7 +2457,7 @@ YYLTYPE yylloc = yyloc_default; break; case 87: /* condition: condition AND condition */ -#line 711 "yacc_sql.y" +#line 712 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } @@ -2465,7 +2465,7 @@ YYLTYPE yylloc = yyloc_default; break; case 88: /* condition: condition OR condition */ -#line 715 "yacc_sql.y" +#line 716 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } @@ -2473,79 +2473,79 @@ YYLTYPE yylloc = yyloc_default; break; case 89: /* comp_op: EQ */ -#line 721 "yacc_sql.y" +#line 722 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } #line 2479 "yacc_sql.cpp" break; case 90: /* comp_op: LT */ -#line 722 "yacc_sql.y" +#line 723 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } #line 2485 "yacc_sql.cpp" break; case 91: /* comp_op: GT */ -#line 723 "yacc_sql.y" +#line 724 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } #line 2491 "yacc_sql.cpp" break; case 92: /* comp_op: LE */ -#line 724 "yacc_sql.y" +#line 725 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } #line 2497 "yacc_sql.cpp" break; case 93: /* comp_op: GE */ -#line 725 "yacc_sql.y" +#line 726 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } #line 2503 "yacc_sql.cpp" break; case 94: /* comp_op: NE */ -#line 726 "yacc_sql.y" +#line 727 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } #line 2509 "yacc_sql.cpp" break; case 95: /* comp_op: IS */ -#line 727 "yacc_sql.y" +#line 728 "yacc_sql.y" { (yyval.comp) = OP_IS; } #line 2515 "yacc_sql.cpp" break; case 96: /* comp_op: IS NOT */ -#line 728 "yacc_sql.y" +#line 729 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } #line 2521 "yacc_sql.cpp" break; case 97: /* comp_op: LIKE */ -#line 729 "yacc_sql.y" +#line 730 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} #line 2527 "yacc_sql.cpp" break; case 98: /* comp_op: NOT LIKE */ -#line 730 "yacc_sql.y" +#line 731 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} #line 2533 "yacc_sql.cpp" break; case 99: /* comp_op: IN */ -#line 731 "yacc_sql.y" +#line 732 "yacc_sql.y" { (yyval.comp) = IN_OP; } #line 2539 "yacc_sql.cpp" break; case 100: /* comp_op: NOT IN */ -#line 732 "yacc_sql.y" +#line 733 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } #line 2545 "yacc_sql.cpp" break; case 101: /* opt_order_by: %empty */ -#line 737 "yacc_sql.y" +#line 738 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } @@ -2553,7 +2553,7 @@ YYLTYPE yylloc = yyloc_default; break; case 102: /* opt_order_by: ORDER BY sort_list */ -#line 741 "yacc_sql.y" +#line 742 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); @@ -2562,7 +2562,7 @@ YYLTYPE yylloc = yyloc_default; break; case 103: /* sort_list: sort_unit */ -#line 748 "yacc_sql.y" +#line 749 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); @@ -2571,7 +2571,7 @@ YYLTYPE yylloc = yyloc_default; break; case 104: /* sort_list: sort_unit COMMA sort_list */ -#line 754 "yacc_sql.y" +#line 755 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); @@ -2580,7 +2580,7 @@ YYLTYPE yylloc = yyloc_default; break; case 105: /* sort_unit: expression */ -#line 761 "yacc_sql.y" +#line 762 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); @@ -2590,7 +2590,7 @@ YYLTYPE yylloc = yyloc_default; break; case 106: /* sort_unit: expression DESC */ -#line 768 "yacc_sql.y" +#line 769 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); @@ -2600,7 +2600,7 @@ YYLTYPE yylloc = yyloc_default; break; case 107: /* sort_unit: expression ASC */ -#line 775 "yacc_sql.y" +#line 776 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode();//默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); @@ -2610,7 +2610,7 @@ YYLTYPE yylloc = yyloc_default; break; case 108: /* group_by: %empty */ -#line 783 "yacc_sql.y" +#line 784 "yacc_sql.y" { (yyval.expression_list) = nullptr; } @@ -2618,7 +2618,7 @@ YYLTYPE yylloc = yyloc_default; break; case 109: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 789 "yacc_sql.y" +#line 790 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2632,7 +2632,7 @@ YYLTYPE yylloc = yyloc_default; break; case 110: /* explain_stmt: EXPLAIN command_wrapper */ -#line 802 "yacc_sql.y" +#line 803 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); @@ -2641,7 +2641,7 @@ YYLTYPE yylloc = yyloc_default; break; case 111: /* set_variable_stmt: SET ID EQ value */ -#line 810 "yacc_sql.y" +#line 811 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2882,7 +2882,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 822 "yacc_sql.y" +#line 823 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index f02e0801..55dd0191 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -201,6 +201,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %left OR %left AND +%left EQ LT GT LE GE NE %left '+' '-' %left '*' '/' %nonassoc UMINUS @@ -580,7 +581,7 @@ expression: if ($2->size() == 1) { $$ = $2->front().get(); } else { - $$ = new ExprListExpr(std::move(*$2)); + $$ = new ListExpr(std::move(*$2)); } $$->set_name(token_name(sql_string, &@$)); delete $2; diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 20531f76..fc1f0ec5 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -31,7 +31,8 @@ SelectStmt::~SelectStmt() } } -RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt) +RC SelectStmt::create( + Db *db, SelectSqlNode &select_sql, Stmt *&stmt, const std::unordered_map &parent_table_map) { if (nullptr == db) { LOG_WARN("invalid argument. db is null"); @@ -42,8 +43,8 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt) // collect tables in `from` statement vector
tables; - unordered_map table_map; - // unordered_map table_alias_map; + unordered_map table_map = parent_table_map; + for (size_t i = 0; i < select_sql.relations.size(); i++) { const char *table_name = select_sql.relations[i].relation.c_str(); if (nullptr == table_name) { @@ -96,7 +97,7 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt) // create filter statement in `where` statement FilterStmt *filter_stmt = nullptr; - RC rc = FilterStmt::create(db, default_table, &table_map, select_sql.condition, filter_stmt); + RC rc = FilterStmt::create(db, default_table, &table_map, select_sql.condition, filter_stmt); if (rc != RC::SUCCESS) { LOG_WARN("cannot construct filter stmt"); return rc; diff --git a/src/observer/sql/stmt/select_stmt.h b/src/observer/sql/stmt/select_stmt.h index 3faf245d..f37e170a 100644 --- a/src/observer/sql/stmt/select_stmt.h +++ b/src/observer/sql/stmt/select_stmt.h @@ -40,7 +40,8 @@ class SelectStmt : public Stmt size_t query_expressions_size() const { return query_expressions_.size(); } public: - static RC create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt); + static RC create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt, + const std::unordered_map &parent_table_map = {}); public: const std::vector
&tables() const { return tables_; } diff --git a/src/observer/storage/buffer/frame.cpp b/src/observer/storage/buffer/frame.cpp index d1152abc..00edc4e3 100644 --- a/src/observer/storage/buffer/frame.cpp +++ b/src/observer/storage/buffer/frame.cpp @@ -236,14 +236,6 @@ int Frame::unpin() this, write_locker_, read_lockers_.find(xid) != read_lockers_.end(), pin_count, frame_id_.to_string().c_str(), xid, lbt()); - if (0 == pin_count) { - ASSERT(write_locker_ == 0, - "frame unpin to 0 failed while someone hold the write lock. write locker=%lx, frameId=%s, xid=%lx", - write_locker_, frame_id_.to_string().c_str(), xid); - ASSERT(read_lockers_.empty(), - "frame unpin to 0 failed while someone hold the read locks. reader num=%d, frameId=%s, xid=%lx", - read_lockers_.size(), frame_id_.to_string().c_str(), xid); - } return pin_count; } diff --git a/src/observer/storage/field/field_meta.h b/src/observer/storage/field/field_meta.h index 3c78d03d..007a8069 100644 --- a/src/observer/storage/field/field_meta.h +++ b/src/observer/storage/field/field_meta.h @@ -31,13 +31,13 @@ class FieldMeta public: FieldMeta(); - FieldMeta( - const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable); + FieldMeta(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, + bool nullable = false); ~FieldMeta() = default; - RC init( - const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable); + RC init(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, + bool nullable = false); public: const char *name() const; From 58ce9910a5717042dd93deaa80a8a68dd916e945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 3 Oct 2024 07:57:06 +0000 Subject: [PATCH 104/308] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86or=EF=BC=8C?= =?UTF-8?q?=E5=92=8Csimple=20sub=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ .../sql/optimizer/predicate_pushdown_rewriter.cpp | 6 +++--- src/observer/sql/parser/expression_binder.cpp | 7 +------ src/observer/sql/parser/expression_binder.h | 15 +++++++++++---- src/observer/sql/stmt/filter_stmt.cpp | 1 + src/observer/sql/stmt/select_stmt.cpp | 11 +++++------ 6 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index f04a2b3d..f4438c87 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,6 @@ GPATH GTAGS docs/book test_sql +./CMakeLists.txt +test #*# diff --git a/src/observer/sql/optimizer/predicate_pushdown_rewriter.cpp b/src/observer/sql/optimizer/predicate_pushdown_rewriter.cpp index 342218f7..6d4fd219 100644 --- a/src/observer/sql/optimizer/predicate_pushdown_rewriter.cpp +++ b/src/observer/sql/optimizer/predicate_pushdown_rewriter.cpp @@ -96,8 +96,8 @@ RC PredicatePushdownRewriter::get_exprs_can_pushdown( ConjunctionExpr *conjunction_expr = static_cast(expr.get()); // 或 操作的比较,太复杂,现在不考虑 if (conjunction_expr->conjunction_type() == ConjunctionExpr::Type::OR) { - LOG_WARN("unsupported or operation"); - rc = RC::UNIMPLEMENTED; + // TODO LOG_WARN("unsupported or operation"); + rc = RC::SUCCESS; return rc; } @@ -119,7 +119,7 @@ RC PredicatePushdownRewriter::get_exprs_can_pushdown( } } else if (expr->type() == ExprType::COMPARISON) { // 如果是比较操作,并且比较的左边或右边是表某个列值,那么就下推下去 - auto comparison_expr = static_cast(expr.get()); + auto comparison_expr = static_cast(expr.get()); std::unique_ptr &left_expr = comparison_expr->left(); std::unique_ptr &right_expr = comparison_expr->right(); diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index d6780f16..0f4b8381 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -174,12 +174,7 @@ RC ExpressionBinder::bind_unbound_field_expression( Table *table = nullptr; if (is_blank(table_name)) { - if (!context_.only_one_table()) { - LOG_INFO("cannot determine table for field: %s", field_name); - return RC::SCHEMA_TABLE_NOT_EXIST; - } - - table = context_.query_tables()[0]; + table = context_.default_table(); } else { table = context_.find_table(table_name); if (nullptr == table) { diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index 323b29a6..4d924927 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -36,10 +36,17 @@ class BinderContext const std::vector
&query_tables() const { return query_tables_; } std::unordered_map &table_map() { return *tables_; } - bool only_one_table (); + bool only_one_table(); private: - Db *db_; + Db *db_; + +public: + [[nodiscard]] Table *default_table() const { return default_table_; } + void set_default_table(Table *default_table) { default_table_ = default_table; } + +private: + Table *default_table_; std::vector
query_tables_; std::unordered_map *tables_; }; @@ -77,8 +84,8 @@ class ExpressionBinder std::unique_ptr &aggregate_expr, std::vector> &bound_expressions); RC bind_subquery_expression( std::unique_ptr &expr, std::vector> &bound_expressions); - RC bind_exprlist_expression( - std::unique_ptr &expr, std::vector> &bound_expressions); + RC bind_exprlist_expression( + std::unique_ptr &expr, std::vector> &bound_expressions); private: BinderContext &context_; }; \ No newline at end of file diff --git a/src/observer/sql/stmt/filter_stmt.cpp b/src/observer/sql/stmt/filter_stmt.cpp index 9d17bbcd..193c68dc 100644 --- a/src/observer/sql/stmt/filter_stmt.cpp +++ b/src/observer/sql/stmt/filter_stmt.cpp @@ -42,6 +42,7 @@ RC FilterStmt::create(Db *db, Table *default_table, std::unordered_map> bound_expressions; ExpressionBinder expression_binder(binder_context); @@ -90,11 +94,6 @@ RC SelectStmt::create( } } - Table *default_table = nullptr; - if (tables.size() == 1) { - default_table = tables[0]; - } - // create filter statement in `where` statement FilterStmt *filter_stmt = nullptr; RC rc = FilterStmt::create(db, default_table, &table_map, select_sql.condition, filter_stmt); From 9a06542f4a6553347a0fcd2b50ff5c0f3975231d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 3 Oct 2024 12:03:31 +0000 Subject: [PATCH 105/308] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E7=9A=84os=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/net/plain_communicator.cpp | 223 ++++++++++++++---------- src/observer/net/plain_communicator.h | 2 + 2 files changed, 130 insertions(+), 95 deletions(-) diff --git a/src/observer/net/plain_communicator.cpp b/src/observer/net/plain_communicator.cpp index bbc5a5ea..725c53bc 100644 --- a/src/observer/net/plain_communicator.cpp +++ b/src/observer/net/plain_communicator.cpp @@ -181,7 +181,7 @@ RC PlainCommunicator::write_result(SessionEvent *event, bool &need_disconnect) RC PlainCommunicator::write_result_internal(SessionEvent *event, bool &need_disconnect) { - RC rc = RC::SUCCESS; + RC rc = RC::SUCCESS; need_disconnect = true; SqlResult *sql_result = event->sql_result(); @@ -197,109 +197,64 @@ RC PlainCommunicator::write_result_internal(SessionEvent *event, bool &need_disc return write_state(event, need_disconnect); } - const TupleSchema &schema = sql_result->tuple_schema(); - const int cell_num = schema.cell_num(); + const TupleSchema &schema = sql_result->tuple_schema(); + const int cell_num = schema.cell_num(); - auto write_output_head = [&]() { - for (int i = 0; i < cell_num; i++) { - const TupleCellSpec &spec = schema.cell_at(i); - const char *alias = spec.alias(); - if (nullptr != alias || alias[0] != 0) { - if (0 != i) { - const char *delim = " | "; - rc = writer_->writen(delim, strlen(delim)); - if (OB_FAIL(rc)) { - LOG_WARN("failed to send data to client. err=%s", strerror(errno)); - return rc; - } - } - int len = strlen(alias); - rc = writer_->writen(alias, len); - if (OB_FAIL(rc)) { - LOG_WARN("failed to send data to client. err=%s", strerror(errno)); - sql_result->close(); - return rc; - } + for (int i = 0; i < cell_num; i++) { + const TupleCellSpec &spec = schema.cell_at(i); + const char *alias = spec.alias(); + if (nullptr != alias || alias[0] != 0) { + if (0 != i) { + title_stream << " | "; } + title_stream << alias; // 将alias存入流中 } + } - if (cell_num > 0) { - char newline = '\n'; - rc = writer_->writen(&newline, 1); - if (OB_FAIL(rc)) { - LOG_WARN("failed to send data to client. err=%s", strerror(errno)); - sql_result->close(); - return rc; - } - } - return RC::SUCCESS; - }; - - rc = RC::SUCCESS; - Tuple *tuple = nullptr; - bool is_first = true; - while (RC::SUCCESS == (rc = sql_result->next_tuple(tuple))) { - assert(tuple != nullptr); + if (cell_num > 0) { + title_stream << '\n'; // 将换行符存入流中 + } - if (is_first) { - rc = write_output_head(); - if (RC::SUCCESS != rc) { - return rc; - } - is_first = false; - } + if (event->session()->get_execution_mode() == ExecutionMode::CHUNK_ITERATOR && event->session()->used_chunk_mode()) { + rc = write_chunk_result(sql_result); + } else { + rc = write_tuple_result(sql_result); + } - int cell_num = tuple->cell_num(); - for (int i = 0; i < cell_num; i++) { - if (i != 0) { - const char *delim = " | "; - rc = writer_->writen(delim, strlen(delim)); - if (OB_FAIL(rc)) { - LOG_WARN("failed to send data to client. err=%s", strerror(errno)); - sql_result->close(); - return rc; - } - } + if (OB_FAIL(rc)) { + sql_result->close(); + sql_result->set_return_code(rc); + return write_state(event, need_disconnect); + } else { - Value value; - rc = tuple->cell_at(i, value); - if (rc != RC::SUCCESS) { - sql_result->close(); - return rc; - } + // 将 title_stream 中的内容一次性写入到 writer_ + std::string buffer = title_stream.str(); // 获取整个缓冲区的内容 + title_stream.str(""); // 清空流内容 + title_stream.clear(); // 重置流状态(但不会清空内容) - std::string cell_str = value.to_string(); - rc = writer_->writen(cell_str.data(), cell_str.size()); - if (OB_FAIL(rc)) { - LOG_WARN("failed to send data to client. err=%s", strerror(errno)); - sql_result->close(); - return rc; - } + rc = writer_->writen(buffer.c_str(), buffer.size()); + if (OB_FAIL(rc)) { + LOG_WARN("failed to send data to client. err=%s", strerror(errno)); + sql_result->close(); + return rc; } - char newline = '\n'; - rc = writer_->writen(&newline, 1); + buffer.clear(); // 清空字符串内容 + + // 将 sql_result_stream 中的内容一次性写入到 writer_ + buffer = sql_result_stream.str(); // 获取缓冲区的内容 + sql_result_stream.str(""); // 清空流内容 + sql_result_stream.clear(); // 重置流状态 + + rc = writer_->writen(buffer.c_str(), buffer.size()); + buffer.clear(); // 清空字符串内容 if (OB_FAIL(rc)) { LOG_WARN("failed to send data to client. err=%s", strerror(errno)); sql_result->close(); return rc; } - } - if (rc == RC::RECORD_EOF) { - rc = RC::SUCCESS; - if (is_first) { - rc = write_output_head(); - if (RC::SUCCESS != rc) { - return rc; - } - is_first = false; - } - } else { - sql_result->close(); - sql_result->set_return_code(rc); - return write_state(event, need_disconnect); } if (cell_num == 0) { @@ -313,14 +268,6 @@ RC PlainCommunicator::write_result_internal(SessionEvent *event, bool &need_disc sql_result->set_return_code(rc); return write_state(event, need_disconnect); } else { - - // rc = writer_->writen(send_message_delimiter_.data(), send_message_delimiter_.size()); - // if (OB_FAIL(rc)) { - // LOG_ERROR("Failed to send data back to client. ret=%s, error=%s", strrc(rc), strerror(errno)); - // sql_result->close(); - // return rc; - // } - need_disconnect = false; } @@ -329,5 +276,91 @@ RC PlainCommunicator::write_result_internal(SessionEvent *event, bool &need_disc rc = rc_close; } + return rc; +} + +RC PlainCommunicator::write_tuple_result(SqlResult *sql_result) +{ + RC rc = RC::SUCCESS; + Tuple *tuple = nullptr; + + while (RC::SUCCESS == (rc = sql_result->next_tuple(tuple))) { + assert(tuple != nullptr); + + int cell_num = tuple->cell_num(); + for (int i = 0; i < cell_num; i++) { + if (i != 0) { + const char *delim = " | "; + sql_result_stream << delim; // 将分隔符存入流中 + } + + Value value; + rc = tuple->cell_at(i, value); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to get tuple cell value. rc=%s", strrc(rc)); + sql_result->close(); + return rc; + } + + // 将cell的值存入流中 + std::string cell_str = value.to_string(); + sql_result_stream << cell_str; + } + + // 将换行符存入流中 + sql_result_stream << '\n'; + } + + if (rc == RC::RECORD_EOF) { + rc = RC::SUCCESS; + } + return rc; +} + +RC PlainCommunicator::write_chunk_result(SqlResult *sql_result) +{ + RC rc = RC::SUCCESS; + Chunk chunk; + while (RC::SUCCESS == (rc = sql_result->next_chunk(chunk))) { + int col_num = chunk.column_num(); + for (int row_idx = 0; row_idx < chunk.rows(); row_idx++) { + for (int col_idx = 0; col_idx < col_num; col_idx++) { + if (col_idx != 0) { + const char *delim = " | "; + + rc = writer_->writen(delim, strlen(delim)); + if (OB_FAIL(rc)) { + LOG_WARN("failed to send data to client. err=%s", strerror(errno)); + sql_result->close(); + return rc; + } + } + + Value value = chunk.get_value(col_idx, row_idx); + + string cell_str = value.to_string(); + + rc = writer_->writen(cell_str.data(), cell_str.size()); + if (OB_FAIL(rc)) { + LOG_WARN("failed to send data to client. err=%s", strerror(errno)); + sql_result->close(); + return rc; + } + } + char newline = '\n'; + + rc = writer_->writen(&newline, 1); + if (OB_FAIL(rc)) { + LOG_WARN("failed to send data to client. err=%s", strerror(errno)); + sql_result->close(); + return rc; + } + } + chunk.reset(); + } + + if (rc == RC::RECORD_EOF) { + rc = RC::SUCCESS; + } return rc; } \ No newline at end of file diff --git a/src/observer/net/plain_communicator.h b/src/observer/net/plain_communicator.h index 0dfabf9a..81e0be86 100644 --- a/src/observer/net/plain_communicator.h +++ b/src/observer/net/plain_communicator.h @@ -43,4 +43,6 @@ class PlainCommunicator : public Communicator protected: vector send_message_delimiter_; ///< 发送消息分隔符 vector debug_message_prefix_; ///< 调试信息前缀 + std::ostringstream title_stream; + std::ostringstream sql_result_stream; }; From d34a78594ce6bd1b48716b76bd427bd8edd2e89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 3 Oct 2024 12:31:02 +0000 Subject: [PATCH 106/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=A4=8D?= =?UTF-8?q?=E6=9D=82=E5=AD=90=E6=9F=A5=E8=AF=A2=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 44370375..6f8e00e3 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -210,6 +210,7 @@ RC ComparisonExpr::try_get_value(Value &cell) const RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) { + RC rc = RC::SUCCESS; Value left_value; Value right_value; @@ -217,19 +218,30 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) SubQueryExpr *right_subquery_expr = nullptr; // Lambda to check if the expression is a subquery and open it - auto if_subquery_open = [&tuple](const std::unique_ptr &expr) { - SubQueryExpr *sqexp = nullptr; + auto if_subquery_open = [&tuple](const std::unique_ptr &expr, SubQueryExpr *&subquery_expr) -> RC { if (expr->type() == ExprType::SUBQUERY) { - sqexp = dynamic_cast(expr.get()); - sqexp->open(nullptr, tuple); // Open the subquery expression (pass nullptr for now) + subquery_expr = dynamic_cast(expr.get()); + RC rc = subquery_expr->open(nullptr, tuple); // Open the subquery expression (pass nullptr for now) + if (OB_FAIL(rc)) { + return rc; + } } - return sqexp; + return RC::SUCCESS; }; - left_subquery_expr = if_subquery_open(left_); - right_subquery_expr = if_subquery_open(right_); + // Check and open the left subquery expression if it exists + rc = if_subquery_open(left_, left_subquery_expr); + if (OB_FAIL(rc)) { + LOG_WARN("failed to open left subquery expression. rc=%s", strrc(rc)); + return rc; + } - RC rc = RC::SUCCESS; + // Check and open the right subquery expression if it exists + rc = if_subquery_open(right_, right_subquery_expr); + if (OB_FAIL(rc)) { + LOG_WARN("failed to open right subquery expression. rc=%s", strrc(rc)); + return rc; + } // Lambda to retrieve the value from an expression auto get_value = [&tuple](const std::unique_ptr &expr, Value &value) { From 2f990ba0615d3d0d4958f8baf3e69a5c6e0b6f4d Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 3 Oct 2024 20:54:44 +0800 Subject: [PATCH 107/308] =?UTF-8?q?=E5=AE=8C=E6=88=90UNIQUE=E7=9A=84?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/lex_sql.cpp | 5383 +++++++++----------------- src/observer/sql/parser/lex_sql.h | 246 +- src/observer/sql/parser/lex_sql.l | 1 + src/observer/sql/parser/parse_defs.h | 1 + src/observer/sql/parser/yacc_sql.cpp | 5055 ++++++++---------------- src/observer/sql/parser/yacc_sql.hpp | 227 +- src/observer/sql/parser/yacc_sql.y | 23 +- 7 files changed, 3703 insertions(+), 7233 deletions(-) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index b2e14d17..96d1ea9c 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,21 +8,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -75,62 +77,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -154,12 +156,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -187,7 +189,7 @@ typedef void *yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin, yyscanner) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -205,7 +207,7 @@ typedef void *yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -220,85 +222,88 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -307,55 +312,59 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -static void yyensure_buffer_stack(yyscan_t yyscanner); -static void yy_load_buffer_state(yyscan_t yyscanner); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -363,2322 +372,311 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state(yyscan_t yyscanner); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); -static int yy_get_next_buffer(yyscan_t yyscanner); -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t)(yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 75 -#define YY_END_OF_BUFFER 76 +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; +#define YY_NUM_RULES 76 +#define YY_END_OF_BUFFER 77 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info -{ - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[214] = {0, - 0, - 0, - 0, - 0, - 76, - 74, - 1, - 2, - 74, - 74, - 74, - 54, - 55, - 70, - 68, - 56, - 69, - 6, - 71, - 3, - 5, - 61, - 57, - 63, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 75, - 60, - 0, - 72, - 0, - 73, - 3, - 0, - 58, - 59, - 62, - 67, - 67, - 67, - 46, - 67, - 45, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 48, - 65, - 67, - 67, - 67, - 67, - 67, - 15, - 23, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 4, - 22, - 47, - 67, - 67, - 67, - 67, - 67, - - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 33, - 67, - 67, - 67, - 64, - 67, - 67, - 67, - 67, - 29, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 67, - 19, - 34, - 67, - 67, - 40, - 36, - 67, - 9, - 11, - 67, - 7, - 67, - 67, - 67, - 20, - 67, - 8, - 67, - 67, - 67, - 67, - 25, - 53, - 66, - 39, - 37, - 67, - 67, - 67, - 16, - 67, - 17, - 67, - 67, - 67, - 67, - 30, - 67, - 67, - 67, - 67, - 67, - 35, - 67, - 43, - 14, - 67, - 52, - 67, - 67, - 44, - 67, - 67, - 67, - 12, - 67, - 67, - 21, - 31, - 10, - 27, - 49, - 67, - 51, - 41, - 24, - 67, - - 67, - 18, - 67, - 13, - 28, - 26, - 42, - 67, - 67, - 50, - 38, - 32, - 0}; - -static const YY_CHAR yy_ec[256] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 3, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 4, - 5, - 1, - 1, - 1, - 1, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 1, - 16, - 17, - 18, - 19, - 1, - 1, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 36, - 1, - 1, - 1, - 1, - 36, - 1, - 45, - 46, - 47, - 48, - - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 36, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 36, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1}; - -static const YY_CHAR yy_meta[69] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2}; - -static const flex_int16_t yy_base[219] = {0, - 0, - 0, - 0, - 0, - 575, - 576, - 576, - 576, - 556, - 568, - 566, - 576, - 576, - 576, - 576, - 576, - 556, - 576, - 576, - 56, - 576, - 54, - 576, - 552, - 55, - 59, - 60, - 61, - 64, - 89, - 63, - 62, - 76, - 81, - 547, - 101, - 103, - 118, - 110, - 134, - 121, - 117, - 127, - 138, - 576, - 576, - 556, - 576, - 554, - 576, - 69, - 544, - 576, - 576, - 576, - 0, - 543, - 141, - 124, - 142, - 542, - 144, - 165, - 155, - 167, - 159, - 173, - 169, - 166, - 180, - 181, - 190, - 191, - 177, - 236, - 541, - 192, - 200, - 212, - 184, - 206, - 539, - 223, - 221, - 225, - 219, - 226, - 233, - 255, - 257, - 248, - 243, - 538, - 534, - 532, - 267, - 268, - 228, - 278, - 282, - - 288, - 272, - 285, - 291, - 301, - 294, - 298, - 296, - 299, - 302, - 309, - 321, - 319, - 331, - 333, - 315, - 326, - 337, - 339, - 531, - 345, - 343, - 350, - 353, - 530, - 202, - 356, - 363, - 358, - 368, - 360, - 375, - 364, - 528, - 527, - 376, - 379, - 526, - 524, - 380, - 521, - 520, - 381, - 519, - 383, - 384, - 396, - 518, - 390, - 517, - 392, - 400, - 393, - 411, - 516, - 513, - 491, - 489, - 412, - 418, - 419, - 423, - 488, - 431, - 486, - 434, - 422, - 438, - 445, - 437, - 449, - 451, - 453, - 448, - 452, - 424, - 456, - 406, - 394, - 458, - 323, - 459, - 463, - 314, - 476, - 474, - 466, - 478, - 475, - 482, - 308, - 307, - 304, - 258, - 239, - 493, - 216, - 198, - 194, - 496, - - 503, - 148, - 499, - 115, - 113, - 87, - 86, - 514, - 500, - 84, - 80, - 77, - 576, - 563, - 565, - 567, - 88, - 87}; - -static const flex_int16_t yy_def[219] = {0, - 213, - 1, - 214, - 214, - 213, - 213, - 213, - 213, - 213, - 215, - 216, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 213, - 213, - 215, - 213, - 216, - 213, - 213, - 213, - 213, - 213, - 213, - 218, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 213, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 217, - 0, - 213, - 213, - 213, - 213, - 213}; - -static const flex_int16_t yy_nxt[645] = {0, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 52, - 56, - 51, - 53, - 54, - 56, - 56, - 56, - 56, - 56, - 56, - 62, - 66, - 52, - 60, - 51, - 67, - 74, - 63, - 58, - 56, - 57, - 56, - 56, - 59, - 64, - 56, - 56, - 65, - 68, - 56, - 73, - - 56, - 56, - 61, - 56, - 62, - 66, - 69, - 60, - 75, - 67, - 74, - 63, - 58, - 76, - 77, - 56, - 59, - 56, - 64, - 70, - 65, - 68, - 71, - 73, - 56, - 72, - 61, - 56, - 78, - 56, - 69, - 56, - 56, - 75, - 79, - 56, - 80, - 76, - 56, - 77, - 89, - 56, - 81, - 84, - 70, - 95, - 91, - 71, - 56, - 72, - 82, - 90, - 56, - 78, - 83, - 56, - 56, - 85, - 56, - 79, - 86, - 80, - 56, - 94, - 92, - 89, - 81, - 96, - 84, - 56, - 95, - 91, - 87, - 56, - 97, - 82, - 90, - 88, - 83, - 56, - 56, - 56, - 85, - 56, - 98, - 86, - 99, - 56, - 94, - 92, - 100, - 56, - 96, - 105, - 56, - 56, - 87, - 101, - 56, - 97, - - 106, - 88, - 104, - 102, - 56, - 56, - 56, - 111, - 56, - 98, - 103, - 99, - 56, - 107, - 56, - 100, - 56, - 108, - 105, - 117, - 56, - 101, - 120, - 109, - 110, - 106, - 56, - 104, - 102, - 118, - 56, - 119, - 111, - 56, - 103, - 56, - 121, - 56, - 107, - 56, - 56, - 108, - 56, - 163, - 117, - 122, - 120, - 56, - 109, - 110, - 56, - 123, - 126, - 56, - 118, - 124, - 119, - 56, - 112, - 127, - 113, - 121, - 56, - 125, - 135, - 128, - 132, - 163, - 114, - 56, - 122, - 56, - 56, - 115, - 116, - 129, - 123, - 126, - 131, - 130, - 124, - 56, - 56, - 112, - 127, - 113, - 56, - 125, - 135, - 134, - 128, - 132, - 56, - 114, - 133, - 140, - 56, - 115, - 116, - 56, - - 129, - 137, - 56, - 131, - 130, - 56, - 141, - 138, - 56, - 136, - 56, - 139, - 56, - 56, - 134, - 56, - 56, - 146, - 56, - 133, - 140, - 56, - 56, - 56, - 145, - 142, - 137, - 147, - 56, - 56, - 148, - 141, - 138, - 56, - 136, - 56, - 139, - 56, - 143, - 144, - 56, - 149, - 146, - 150, - 151, - 56, - 152, - 56, - 155, - 145, - 142, - 56, - 147, - 56, - 153, - 148, - 154, - 56, - 156, - 56, - 157, - 158, - 143, - 144, - 56, - 149, - 160, - 56, - 150, - 151, - 56, - 152, - 56, - 155, - 56, - 159, - 162, - 56, - 56, - 153, - 161, - 154, - 56, - 156, - 165, - 157, - 158, - 167, - 166, - 56, - 56, - 160, - 164, - 56, - 56, - 56, - 170, - 56, - 56, - 168, - - 159, - 162, - 175, - 171, - 56, - 161, - 56, - 56, - 56, - 165, - 56, - 169, - 167, - 166, - 56, - 177, - 164, - 172, - 173, - 174, - 56, - 170, - 176, - 168, - 178, - 56, - 56, - 175, - 171, - 181, - 180, - 183, - 56, - 56, - 179, - 169, - 56, - 56, - 56, - 185, - 177, - 172, - 173, - 174, - 186, - 56, - 176, - 182, - 56, - 178, - 187, - 56, - 56, - 181, - 184, - 180, - 183, - 188, - 179, - 56, - 189, - 190, - 56, - 56, - 185, - 56, - 56, - 56, - 191, - 186, - 56, - 182, - 56, - 56, - 193, - 187, - 194, - 56, - 184, - 196, - 56, - 198, - 188, - 200, - 189, - 195, - 190, - 192, - 56, - 56, - 56, - 203, - 56, - 191, - 197, - 201, - 56, - 199, - 205, - 193, - - 56, - 194, - 56, - 56, - 196, - 56, - 198, - 56, - 200, - 195, - 56, - 192, - 202, - 56, - 56, - 204, - 203, - 56, - 197, - 206, - 201, - 199, - 210, - 205, - 209, - 207, - 208, - 56, - 56, - 212, - 56, - 56, - 56, - 56, - 56, - 56, - 202, - 211, - 56, - 204, - 56, - 56, - 56, - 206, - 56, - 56, - 56, - 210, - 56, - 209, - 207, - 208, - 93, - 56, - 212, - 56, - 56, - 56, - 93, - 50, - 48, - 56, - 211, - 45, - 45, - 47, - 47, - 49, - 49, - 55, - 51, - 50, - 48, - 46, - 213, - 5, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213}; - -static const flex_int16_t yy_chk[645] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 20, - 25, - 20, - 22, - 22, - 26, - 27, - 28, - 32, - 31, - 29, - 27, - 28, - 51, - 26, - 51, - 28, - 32, - 27, - 25, - 218, - 217, - 33, - 212, - 25, - 27, - 211, - 34, - 27, - 28, - 210, - 31, - - 207, - 206, - 26, - 30, - 27, - 28, - 29, - 26, - 33, - 28, - 32, - 27, - 25, - 33, - 34, - 36, - 25, - 37, - 27, - 30, - 27, - 28, - 30, - 31, - 39, - 30, - 26, - 205, - 36, - 204, - 29, - 42, - 38, - 33, - 36, - 41, - 37, - 33, - 59, - 34, - 41, - 43, - 37, - 39, - 30, - 59, - 43, - 30, - 40, - 30, - 38, - 42, - 44, - 36, - 38, - 58, - 60, - 40, - 62, - 36, - 40, - 37, - 202, - 58, - 44, - 41, - 37, - 60, - 39, - 64, - 59, - 43, - 40, - 66, - 62, - 38, - 42, - 40, - 38, - 63, - 69, - 65, - 40, - 68, - 63, - 40, - 64, - 67, - 58, - 44, - 65, - 74, - 60, - 69, - 70, - 71, - 40, - 66, - 80, - 62, - - 69, - 40, - 68, - 67, - 72, - 73, - 77, - 74, - 199, - 63, - 67, - 64, - 198, - 70, - 78, - 65, - 126, - 71, - 69, - 77, - 81, - 66, - 80, - 72, - 73, - 69, - 79, - 68, - 67, - 78, - 197, - 79, - 74, - 86, - 67, - 84, - 81, - 83, - 70, - 85, - 87, - 71, - 98, - 126, - 77, - 83, - 80, - 88, - 72, - 73, - 75, - 84, - 86, - 195, - 78, - 85, - 79, - 92, - 75, - 87, - 75, - 81, - 91, - 85, - 98, - 88, - 92, - 126, - 75, - 89, - 83, - 90, - 194, - 75, - 75, - 89, - 84, - 86, - 91, - 90, - 85, - 96, - 97, - 75, - 87, - 75, - 102, - 85, - 98, - 97, - 88, - 92, - 99, - 75, - 96, - 102, - 100, - 75, - 75, - 103, - - 89, - 100, - 101, - 91, - 90, - 104, - 103, - 101, - 106, - 99, - 108, - 101, - 107, - 109, - 97, - 105, - 110, - 107, - 193, - 96, - 102, - 192, - 191, - 111, - 106, - 104, - 100, - 108, - 184, - 116, - 109, - 103, - 101, - 113, - 99, - 112, - 101, - 181, - 105, - 105, - 117, - 110, - 107, - 111, - 112, - 114, - 113, - 115, - 116, - 106, - 104, - 118, - 108, - 119, - 114, - 109, - 115, - 122, - 117, - 121, - 118, - 119, - 105, - 105, - 123, - 110, - 122, - 124, - 111, - 112, - 127, - 113, - 129, - 116, - 131, - 121, - 124, - 128, - 133, - 114, - 123, - 115, - 130, - 117, - 128, - 118, - 119, - 130, - 129, - 132, - 136, - 122, - 127, - 137, - 140, - 143, - 133, - 145, - 146, - 131, - - 121, - 124, - 145, - 136, - 149, - 123, - 151, - 153, - 179, - 128, - 147, - 132, - 130, - 129, - 152, - 147, - 127, - 137, - 140, - 143, - 178, - 133, - 146, - 131, - 149, - 154, - 159, - 145, - 136, - 153, - 152, - 159, - 160, - 161, - 151, - 132, - 167, - 162, - 176, - 161, - 147, - 137, - 140, - 143, - 162, - 164, - 146, - 154, - 166, - 149, - 164, - 170, - 168, - 153, - 160, - 152, - 159, - 166, - 151, - 169, - 167, - 168, - 174, - 171, - 161, - 172, - 175, - 173, - 169, - 162, - 177, - 154, - 180, - 182, - 172, - 164, - 173, - 183, - 160, - 175, - 187, - 180, - 166, - 183, - 167, - 174, - 168, - 171, - 186, - 189, - 185, - 187, - 188, - 169, - 177, - 185, - 190, - 182, - 189, - 172, - - 165, - 173, - 163, - 158, - 175, - 157, - 180, - 196, - 183, - 174, - 200, - 171, - 186, - 203, - 209, - 188, - 187, - 201, - 177, - 190, - 185, - 182, - 203, - 189, - 201, - 196, - 200, - 156, - 208, - 209, - 155, - 150, - 148, - 144, - 142, - 141, - 186, - 208, - 139, - 188, - 138, - 135, - 134, - 190, - 125, - 120, - 95, - 203, - 94, - 201, - 196, - 200, - 93, - 82, - 209, - 76, - 61, - 57, - 52, - 49, - 47, - 35, - 208, - 214, - 214, - 215, - 215, - 216, - 216, - 24, - 17, - 11, - 10, - 9, - 5, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213, - 213}; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[219] = + { 0, + 0, 0, 0, 0, 77, 75, 1, 2, 75, 75, + 75, 55, 56, 71, 69, 57, 70, 6, 72, 3, + 5, 62, 58, 64, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 76, 61, 0, 73, 0, 74, + 3, 0, 59, 60, 63, 68, 68, 68, 47, 68, + 46, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 49, 66, 68, 68, 68, 68, + 68, 15, 23, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 4, 22, 48, 68, 68, 68, 68, + + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 33, 68, 68, 68, + 65, 68, 68, 68, 68, 29, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 19, 34, 68, 68, 41, + 36, 68, 9, 11, 68, 7, 68, 68, 68, 20, + 68, 8, 68, 68, 68, 68, 25, 54, 67, 40, + 38, 68, 68, 68, 16, 68, 17, 68, 68, 68, + 68, 68, 30, 68, 68, 68, 68, 68, 35, 68, + 44, 14, 68, 53, 68, 68, 45, 68, 68, 68, + 12, 68, 68, 68, 21, 31, 10, 27, 50, 68, + + 52, 42, 24, 68, 68, 18, 68, 13, 37, 28, + 26, 43, 68, 68, 51, 39, 32, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, + 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, + + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[71] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + } ; + +static const flex_int16_t yy_base[224] = + { 0, + 0, 0, 0, 0, 592, 593, 593, 593, 573, 585, + 583, 593, 593, 593, 593, 593, 573, 593, 593, 58, + 593, 56, 593, 569, 57, 61, 62, 63, 64, 83, + 65, 69, 91, 76, 571, 117, 108, 97, 103, 120, + 134, 143, 137, 112, 593, 593, 580, 593, 578, 593, + 73, 568, 593, 593, 593, 0, 567, 138, 147, 160, + 566, 151, 152, 164, 169, 166, 176, 177, 182, 179, + 184, 186, 191, 185, 237, 565, 200, 173, 203, 209, + 226, 564, 212, 235, 238, 211, 229, 223, 243, 240, + 244, 250, 263, 563, 555, 554, 257, 258, 282, 276, + + 264, 285, 297, 300, 283, 289, 299, 305, 284, 308, + 309, 302, 314, 311, 317, 328, 321, 335, 345, 347, + 553, 342, 356, 343, 361, 551, 344, 346, 357, 362, + 367, 369, 373, 377, 375, 550, 548, 376, 382, 544, + 543, 383, 542, 541, 386, 540, 387, 402, 403, 539, + 401, 538, 395, 411, 409, 413, 534, 533, 532, 531, + 412, 416, 422, 430, 529, 439, 527, 420, 440, 442, + 441, 451, 518, 445, 458, 459, 448, 462, 516, 456, + 513, 489, 472, 484, 474, 473, 483, 477, 478, 485, + 487, 490, 500, 488, 446, 405, 372, 331, 318, 503, + + 219, 217, 215, 504, 512, 194, 514, 174, 126, 123, + 89, 88, 517, 515, 86, 82, 79, 593, 571, 573, + 575, 90, 79 + } ; + +static const flex_int16_t yy_def[224] = + { 0, + 218, 1, 219, 219, 218, 218, 218, 218, 218, 220, + 221, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 218, 218, 220, 218, 221, 218, + 218, 218, 218, 218, 218, 223, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 218, 222, 222, 222, 222, 222, 222, + + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 0, 218, 218, + 218, 218, 218 + } ; + +static const flex_int16_t yy_nxt[664] = + { 0, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, + 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, + 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, + 52, 56, 51, 53, 54, 56, 56, 56, 56, 56, + 56, 62, 66, 56, 60, 52, 67, 51, 63, 58, + 56, 57, 74, 56, 59, 64, 56, 56, 65, 68, + + 56, 73, 56, 56, 61, 56, 69, 62, 66, 77, + 60, 56, 67, 70, 63, 58, 71, 56, 74, 72, + 59, 64, 56, 75, 65, 68, 56, 73, 76, 82, + 61, 56, 69, 83, 56, 77, 84, 56, 93, 70, + 56, 80, 71, 85, 78, 72, 86, 81, 56, 75, + 79, 56, 56, 89, 76, 82, 92, 56, 87, 83, + 95, 56, 84, 88, 93, 56, 56, 80, 96, 85, + 78, 99, 86, 81, 56, 90, 79, 91, 56, 89, + 56, 98, 92, 56, 87, 97, 95, 56, 56, 88, + 56, 56, 101, 56, 96, 100, 56, 99, 56, 56, + + 56, 90, 119, 91, 102, 56, 103, 98, 56, 106, + 105, 97, 108, 104, 56, 112, 107, 56, 101, 110, + 109, 100, 120, 56, 111, 56, 56, 118, 119, 56, + 102, 56, 103, 56, 123, 106, 105, 56, 108, 104, + 56, 112, 107, 56, 127, 110, 109, 121, 120, 56, + 111, 56, 56, 118, 56, 129, 122, 56, 56, 113, + 123, 114, 128, 130, 56, 124, 132, 131, 125, 115, + 127, 56, 56, 121, 116, 117, 126, 56, 56, 136, + 133, 129, 122, 139, 135, 113, 134, 114, 128, 130, + 56, 124, 132, 131, 125, 115, 56, 56, 56, 56, + + 116, 117, 126, 56, 140, 136, 133, 138, 141, 139, + 135, 56, 134, 56, 56, 149, 56, 144, 137, 56, + 142, 143, 56, 56, 148, 56, 145, 146, 56, 147, + 140, 56, 56, 138, 141, 56, 152, 153, 154, 150, + 155, 149, 56, 144, 137, 56, 142, 143, 151, 56, + 148, 156, 145, 146, 157, 147, 56, 56, 56, 56, + 56, 56, 152, 153, 154, 150, 155, 158, 159, 160, + 56, 56, 161, 163, 151, 56, 56, 156, 167, 162, + 157, 56, 166, 56, 164, 165, 56, 56, 170, 56, + 56, 56, 168, 158, 159, 160, 56, 56, 161, 163, + + 56, 56, 169, 174, 167, 162, 178, 173, 166, 56, + 164, 165, 171, 172, 170, 56, 56, 56, 168, 56, + 175, 176, 180, 56, 177, 56, 56, 56, 169, 174, + 56, 186, 178, 173, 56, 181, 56, 182, 171, 172, + 179, 183, 188, 191, 56, 184, 175, 176, 180, 185, + 177, 189, 187, 56, 56, 56, 56, 186, 190, 56, + 56, 181, 56, 182, 194, 56, 179, 183, 188, 191, + 56, 184, 56, 56, 195, 185, 56, 189, 187, 192, + 193, 197, 198, 196, 190, 199, 56, 56, 56, 200, + 194, 56, 56, 204, 201, 202, 205, 56, 56, 56, + + 195, 56, 56, 56, 56, 192, 193, 197, 198, 196, + 207, 199, 203, 209, 56, 200, 206, 56, 56, 204, + 201, 202, 205, 210, 208, 211, 56, 56, 56, 56, + 56, 56, 56, 214, 213, 212, 207, 215, 203, 209, + 216, 56, 206, 56, 217, 56, 56, 56, 56, 210, + 208, 211, 56, 56, 56, 56, 56, 56, 56, 214, + 213, 212, 56, 215, 56, 56, 216, 56, 56, 56, + 217, 45, 45, 47, 47, 49, 49, 94, 56, 56, + 56, 56, 94, 50, 48, 56, 55, 51, 50, 48, + 46, 218, 5, 218, 218, 218, 218, 218, 218, 218, + + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218 + } ; + +static const flex_int16_t yy_chk[664] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, + 223, 27, 28, 32, 26, 51, 28, 51, 27, 25, + 34, 222, 32, 217, 25, 27, 216, 30, 27, 28, + + 215, 31, 212, 211, 26, 33, 29, 27, 28, 34, + 26, 38, 28, 30, 27, 25, 30, 39, 32, 30, + 25, 27, 37, 33, 27, 28, 44, 31, 33, 38, + 26, 36, 29, 38, 40, 34, 39, 210, 44, 30, + 209, 37, 30, 40, 36, 30, 40, 37, 41, 33, + 36, 43, 58, 41, 33, 38, 43, 42, 40, 38, + 58, 59, 39, 40, 44, 62, 63, 37, 59, 40, + 36, 63, 40, 37, 60, 42, 36, 42, 64, 41, + 66, 62, 43, 65, 40, 60, 58, 78, 208, 40, + 67, 68, 65, 70, 59, 64, 69, 63, 71, 74, + + 72, 42, 78, 42, 66, 73, 67, 62, 206, 69, + 68, 60, 70, 67, 77, 74, 69, 79, 65, 72, + 71, 64, 79, 80, 73, 86, 83, 77, 78, 203, + 66, 202, 67, 201, 83, 69, 68, 88, 70, 67, + 81, 74, 69, 87, 86, 72, 71, 80, 79, 84, + 73, 75, 85, 77, 90, 88, 81, 89, 91, 75, + 83, 75, 87, 89, 92, 84, 91, 90, 85, 75, + 86, 97, 98, 80, 75, 75, 85, 93, 101, 98, + 92, 88, 81, 101, 97, 75, 93, 75, 87, 89, + 100, 84, 91, 90, 85, 75, 99, 105, 109, 102, + + 75, 75, 85, 106, 102, 98, 92, 100, 102, 101, + 97, 103, 93, 107, 104, 109, 112, 105, 99, 108, + 103, 104, 110, 111, 108, 114, 106, 106, 113, 107, + 102, 115, 199, 100, 102, 117, 112, 113, 114, 110, + 115, 109, 116, 105, 99, 198, 103, 104, 111, 118, + 108, 116, 106, 106, 117, 107, 122, 124, 127, 119, + 128, 120, 112, 113, 114, 110, 115, 118, 119, 120, + 123, 129, 122, 124, 111, 125, 130, 116, 129, 123, + 117, 131, 128, 132, 125, 127, 197, 133, 132, 135, + 138, 134, 130, 118, 119, 120, 139, 142, 122, 124, + + 145, 147, 131, 138, 129, 123, 147, 135, 128, 153, + 125, 127, 133, 134, 132, 151, 148, 149, 130, 196, + 139, 142, 149, 155, 145, 154, 161, 156, 131, 138, + 162, 161, 147, 135, 168, 151, 163, 153, 133, 134, + 148, 154, 163, 168, 164, 155, 139, 142, 149, 156, + 145, 164, 162, 166, 169, 171, 170, 161, 166, 174, + 195, 151, 177, 153, 171, 172, 148, 154, 163, 168, + 180, 155, 175, 176, 172, 156, 178, 164, 162, 169, + 170, 175, 176, 174, 166, 177, 183, 186, 185, 178, + 171, 188, 189, 186, 180, 183, 188, 187, 184, 190, + + 172, 191, 194, 182, 192, 169, 170, 175, 176, 174, + 190, 177, 185, 192, 193, 178, 189, 200, 204, 186, + 180, 183, 188, 193, 191, 194, 205, 181, 207, 214, + 179, 213, 173, 205, 204, 200, 190, 207, 185, 192, + 213, 167, 189, 165, 214, 160, 159, 158, 157, 193, + 191, 194, 152, 150, 146, 144, 143, 141, 140, 205, + 204, 200, 137, 207, 136, 126, 213, 121, 96, 95, + 214, 219, 219, 220, 220, 221, 221, 94, 82, 76, + 61, 57, 52, 49, 47, 35, 24, 17, 11, 10, + 9, 5, 218, 218, 218, 218, 218, 218, 218, 218, + + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218 + } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2690,8 +688,8 @@ static const flex_int16_t yy_chk[645] = {0, #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -2705,16 +703,14 @@ static const flex_int16_t yy_chk[645] = {0, #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) \ - LOG_DEBUG("%s", #token); \ - return token -#line 707 "lex_sql.cpp" +#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#line 713 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -2723,7 +719,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 716 "lex_sql.cpp" +#line 722 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -2742,124 +738,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t -{ - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char *yy_last_accepting_cpos; + { - int yylineno_r; - int yy_flex_debug_r; + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; - YYSTYPE *yylval_r; + int yylineno_r; + int yy_flex_debug_r; - YYLTYPE *yylloc_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; -}; /* end struct yyguts_t */ + YYSTYPE * yylval_r; -static int yy_init_globals(yyscan_t yyscanner); + YYLTYPE * yylloc_r; -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -#define yylval yyg->yylval_r + }; /* end struct yyguts_t */ -#define yylloc yyg->yylloc_r +static int yy_init_globals ( yyscan_t yyscanner ); -int yylex_init(yyscan_t *scanner); + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); - -int yyget_debug(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner); +static int yyinput ( yyscan_t yyscanner ); #else -static int input(yyscan_t yyscanner); +static int input ( yyscan_t yyscanner ); #endif #endif @@ -2879,38 +875,42 @@ static int input(yyscan_t yyscanner); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - yy_size_t n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -2929,7 +929,7 @@ static int input(yyscan_t yyscanner); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -2940,9 +940,11 @@ static int input(yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -2954,530 +956,619 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP YY_USER_ACTION +#define YY_RULE_SETUP \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if (!yyg->yy_init) { - yyg->yy_init = 1; + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!yyg->yy_start) - yyg->yy_start = 1; /* first start state */ + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_load_buffer_state(yyscanner); - } + yy_load_buffer_state( yyscanner ); + } - { + { #line 75 "lex_sql.l" -#line 1002 "lex_sql.cpp" - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 214) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_base[yy_current_state] != 576); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - if (yy_act == 0) { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - - case 1: YY_RULE_SETUP +#line 1008 "lex_sql.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 219 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 593 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 77 "lex_sql.l" - // ignore whitespace - YY_BREAK - case 2: - /* rule 2 can match eol */ - YY_RULE_SETUP +// ignore whitespace + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP #line 78 "lex_sql.l" - ; - YY_BREAK - case 3: YY_RULE_SETUP +; + YY_BREAK +case 3: +YY_RULE_SETUP #line 80 "lex_sql.l" - yylval->number = atoi(yytext); - RETURN_TOKEN(NUMBER); - YY_BREAK - case 4: YY_RULE_SETUP +yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); + YY_BREAK +case 4: +YY_RULE_SETUP #line 81 "lex_sql.l" - yylval->floats = (float)(atof(yytext)); - RETURN_TOKEN(FLOAT); - YY_BREAK - case 5: YY_RULE_SETUP +yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); + YY_BREAK +case 5: +YY_RULE_SETUP #line 83 "lex_sql.l" - RETURN_TOKEN(SEMICOLON); - YY_BREAK - case 6: YY_RULE_SETUP +RETURN_TOKEN(SEMICOLON); + YY_BREAK +case 6: +YY_RULE_SETUP #line 84 "lex_sql.l" - RETURN_TOKEN(DOT); - YY_BREAK - case 7: YY_RULE_SETUP +RETURN_TOKEN(DOT); + YY_BREAK +case 7: +YY_RULE_SETUP #line 85 "lex_sql.l" - RETURN_TOKEN(EXIT); - YY_BREAK - case 8: YY_RULE_SETUP +RETURN_TOKEN(EXIT); + YY_BREAK +case 8: +YY_RULE_SETUP #line 86 "lex_sql.l" - RETURN_TOKEN(HELP); - YY_BREAK - case 9: YY_RULE_SETUP +RETURN_TOKEN(HELP); + YY_BREAK +case 9: +YY_RULE_SETUP #line 87 "lex_sql.l" - RETURN_TOKEN(DESC); - YY_BREAK - case 10: YY_RULE_SETUP +RETURN_TOKEN(DESC); + YY_BREAK +case 10: +YY_RULE_SETUP #line 88 "lex_sql.l" - RETURN_TOKEN(CREATE); - YY_BREAK - case 11: YY_RULE_SETUP +RETURN_TOKEN(CREATE); + YY_BREAK +case 11: +YY_RULE_SETUP #line 89 "lex_sql.l" - RETURN_TOKEN(DROP); - YY_BREAK - case 12: YY_RULE_SETUP +RETURN_TOKEN(DROP); + YY_BREAK +case 12: +YY_RULE_SETUP #line 90 "lex_sql.l" - RETURN_TOKEN(TABLE); - YY_BREAK - case 13: YY_RULE_SETUP +RETURN_TOKEN(TABLE); + YY_BREAK +case 13: +YY_RULE_SETUP #line 91 "lex_sql.l" - RETURN_TOKEN(TABLES); - YY_BREAK - case 14: YY_RULE_SETUP +RETURN_TOKEN(TABLES); + YY_BREAK +case 14: +YY_RULE_SETUP #line 92 "lex_sql.l" - RETURN_TOKEN(INDEX); - YY_BREAK - case 15: YY_RULE_SETUP +RETURN_TOKEN(INDEX); + YY_BREAK +case 15: +YY_RULE_SETUP #line 93 "lex_sql.l" - RETURN_TOKEN(ON); - YY_BREAK - case 16: YY_RULE_SETUP +RETURN_TOKEN(ON); + YY_BREAK +case 16: +YY_RULE_SETUP #line 94 "lex_sql.l" - RETURN_TOKEN(SHOW); - YY_BREAK - case 17: YY_RULE_SETUP +RETURN_TOKEN(SHOW); + YY_BREAK +case 17: +YY_RULE_SETUP #line 95 "lex_sql.l" - RETURN_TOKEN(SYNC); - YY_BREAK - case 18: YY_RULE_SETUP +RETURN_TOKEN(SYNC); + YY_BREAK +case 18: +YY_RULE_SETUP #line 96 "lex_sql.l" - RETURN_TOKEN(SELECT); - YY_BREAK - case 19: YY_RULE_SETUP +RETURN_TOKEN(SELECT); + YY_BREAK +case 19: +YY_RULE_SETUP #line 97 "lex_sql.l" - RETURN_TOKEN(CALC); - YY_BREAK - case 20: YY_RULE_SETUP +RETURN_TOKEN(CALC); + YY_BREAK +case 20: +YY_RULE_SETUP #line 98 "lex_sql.l" - RETURN_TOKEN(FROM); - YY_BREAK - case 21: YY_RULE_SETUP +RETURN_TOKEN(FROM); + YY_BREAK +case 21: +YY_RULE_SETUP #line 99 "lex_sql.l" - RETURN_TOKEN(WHERE); - YY_BREAK - case 22: YY_RULE_SETUP +RETURN_TOKEN(WHERE); + YY_BREAK +case 22: +YY_RULE_SETUP #line 100 "lex_sql.l" - RETURN_TOKEN(AND); - YY_BREAK - case 23: YY_RULE_SETUP +RETURN_TOKEN(AND); + YY_BREAK +case 23: +YY_RULE_SETUP #line 101 "lex_sql.l" - RETURN_TOKEN(OR); - YY_BREAK - case 24: YY_RULE_SETUP +RETURN_TOKEN(OR); + YY_BREAK +case 24: +YY_RULE_SETUP #line 102 "lex_sql.l" - RETURN_TOKEN(INSERT); - YY_BREAK - case 25: YY_RULE_SETUP +RETURN_TOKEN(INSERT); + YY_BREAK +case 25: +YY_RULE_SETUP #line 103 "lex_sql.l" - RETURN_TOKEN(INTO); - YY_BREAK - case 26: YY_RULE_SETUP +RETURN_TOKEN(INTO); + YY_BREAK +case 26: +YY_RULE_SETUP #line 104 "lex_sql.l" - RETURN_TOKEN(VALUES); - YY_BREAK - case 27: YY_RULE_SETUP +RETURN_TOKEN(VALUES); + YY_BREAK +case 27: +YY_RULE_SETUP #line 105 "lex_sql.l" - RETURN_TOKEN(DELETE); - YY_BREAK - case 28: YY_RULE_SETUP +RETURN_TOKEN(DELETE); + YY_BREAK +case 28: +YY_RULE_SETUP #line 106 "lex_sql.l" - RETURN_TOKEN(UPDATE); - YY_BREAK - case 29: YY_RULE_SETUP +RETURN_TOKEN(UPDATE); + YY_BREAK +case 29: +YY_RULE_SETUP #line 107 "lex_sql.l" - RETURN_TOKEN(SET); - YY_BREAK - case 30: YY_RULE_SETUP +RETURN_TOKEN(SET); + YY_BREAK +case 30: +YY_RULE_SETUP #line 108 "lex_sql.l" - RETURN_TOKEN(TRX_BEGIN); - YY_BREAK - case 31: YY_RULE_SETUP +RETURN_TOKEN(TRX_BEGIN); + YY_BREAK +case 31: +YY_RULE_SETUP #line 109 "lex_sql.l" - RETURN_TOKEN(TRX_COMMIT); - YY_BREAK - case 32: YY_RULE_SETUP +RETURN_TOKEN(TRX_COMMIT); + YY_BREAK +case 32: +YY_RULE_SETUP #line 110 "lex_sql.l" - RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK - case 33: YY_RULE_SETUP +RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK +case 33: +YY_RULE_SETUP #line 111 "lex_sql.l" - RETURN_TOKEN(INT_T); - YY_BREAK - case 34: YY_RULE_SETUP +RETURN_TOKEN(INT_T); + YY_BREAK +case 34: +YY_RULE_SETUP #line 112 "lex_sql.l" - RETURN_TOKEN(STRING_T); - YY_BREAK - case 35: YY_RULE_SETUP +RETURN_TOKEN(STRING_T); + YY_BREAK +case 35: +YY_RULE_SETUP #line 113 "lex_sql.l" - RETURN_TOKEN(FLOAT_T); - YY_BREAK - case 36: YY_RULE_SETUP +RETURN_TOKEN(FLOAT_T); + YY_BREAK +case 36: +YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK - case 37: YY_RULE_SETUP +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK +case 37: +YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(NULL_T); - YY_BREAK - case 38: YY_RULE_SETUP +RETURN_TOKEN(UNIQUE); + YY_BREAK +case 38: +YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(NULLABLE); - YY_BREAK - case 39: YY_RULE_SETUP +RETURN_TOKEN(NULL_T); + YY_BREAK +case 39: +YY_RULE_SETUP #line 117 "lex_sql.l" - RETURN_TOKEN(LOAD); - YY_BREAK - case 40: YY_RULE_SETUP +RETURN_TOKEN(NULLABLE); + YY_BREAK +case 40: +YY_RULE_SETUP #line 118 "lex_sql.l" - RETURN_TOKEN(DATA); - YY_BREAK - case 41: YY_RULE_SETUP +RETURN_TOKEN(LOAD); + YY_BREAK +case 41: +YY_RULE_SETUP #line 119 "lex_sql.l" - RETURN_TOKEN(INFILE); - YY_BREAK - case 42: YY_RULE_SETUP +RETURN_TOKEN(DATA); + YY_BREAK +case 42: +YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); - YY_BREAK - case 43: YY_RULE_SETUP +RETURN_TOKEN(INFILE); + YY_BREAK +case 43: +YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(GROUP); - YY_BREAK - case 44: YY_RULE_SETUP +RETURN_TOKEN(EXPLAIN); + YY_BREAK +case 44: +YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(ORDER); - YY_BREAK - case 45: YY_RULE_SETUP +RETURN_TOKEN(GROUP); + YY_BREAK +case 45: +YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(BY); - YY_BREAK - case 46: YY_RULE_SETUP +RETURN_TOKEN(ORDER); + YY_BREAK +case 46: +YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(AS); - YY_BREAK - case 47: YY_RULE_SETUP +RETURN_TOKEN(BY); + YY_BREAK +case 47: +YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(ASC); - YY_BREAK - case 48: YY_RULE_SETUP +RETURN_TOKEN(AS); + YY_BREAK +case 48: +YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(IN); - YY_BREAK - case 49: YY_RULE_SETUP +RETURN_TOKEN(ASC); + YY_BREAK +case 49: +YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(EXISTS); - YY_BREAK - case 50: YY_RULE_SETUP +RETURN_TOKEN(IN); + YY_BREAK +case 50: +YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(STORAGE); - YY_BREAK - case 51: YY_RULE_SETUP +RETURN_TOKEN(EXISTS); + YY_BREAK +case 51: +YY_RULE_SETUP #line 129 "lex_sql.l" - RETURN_TOKEN(FORMAT); - YY_BREAK - case 52: YY_RULE_SETUP +RETURN_TOKEN(STORAGE); + YY_BREAK +case 52: +YY_RULE_SETUP #line 130 "lex_sql.l" - RETURN_TOKEN(INNER); - YY_BREAK - case 53: YY_RULE_SETUP +RETURN_TOKEN(FORMAT); + YY_BREAK +case 53: +YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(JOIN); - YY_BREAK - case 54: YY_RULE_SETUP +RETURN_TOKEN(INNER); + YY_BREAK +case 54: +YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(LBRACE); - YY_BREAK - case 55: YY_RULE_SETUP +RETURN_TOKEN(JOIN); + YY_BREAK +case 55: +YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(RBRACE); - YY_BREAK - case 56: YY_RULE_SETUP -#line 135 "lex_sql.l" - RETURN_TOKEN(COMMA); - YY_BREAK - case 57: YY_RULE_SETUP +RETURN_TOKEN(LBRACE); + YY_BREAK +case 56: +YY_RULE_SETUP +#line 134 "lex_sql.l" +RETURN_TOKEN(RBRACE); + YY_BREAK +case 57: +YY_RULE_SETUP #line 136 "lex_sql.l" - RETURN_TOKEN(EQ); - YY_BREAK - case 58: YY_RULE_SETUP +RETURN_TOKEN(COMMA); + YY_BREAK +case 58: +YY_RULE_SETUP #line 137 "lex_sql.l" - RETURN_TOKEN(LE); - YY_BREAK - case 59: YY_RULE_SETUP +RETURN_TOKEN(EQ); + YY_BREAK +case 59: +YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 60: YY_RULE_SETUP +RETURN_TOKEN(LE); + YY_BREAK +case 60: +YY_RULE_SETUP #line 139 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 61: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 61: +YY_RULE_SETUP #line 140 "lex_sql.l" - RETURN_TOKEN(LT); - YY_BREAK - case 62: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 62: +YY_RULE_SETUP #line 141 "lex_sql.l" - RETURN_TOKEN(GE); - YY_BREAK - case 63: YY_RULE_SETUP +RETURN_TOKEN(LT); + YY_BREAK +case 63: +YY_RULE_SETUP #line 142 "lex_sql.l" - RETURN_TOKEN(GT); - YY_BREAK - case 64: YY_RULE_SETUP +RETURN_TOKEN(GE); + YY_BREAK +case 64: +YY_RULE_SETUP #line 143 "lex_sql.l" - RETURN_TOKEN(NOT); - YY_BREAK - case 65: YY_RULE_SETUP +RETURN_TOKEN(GT); + YY_BREAK +case 65: +YY_RULE_SETUP #line 144 "lex_sql.l" - RETURN_TOKEN(IS); - YY_BREAK - case 66: YY_RULE_SETUP +RETURN_TOKEN(NOT); + YY_BREAK +case 66: +YY_RULE_SETUP #line 145 "lex_sql.l" - RETURN_TOKEN(LIKE); - YY_BREAK - case 67: YY_RULE_SETUP -#line 147 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(ID); - YY_BREAK - case 68: -#line 150 "lex_sql.l" - case 69: +RETURN_TOKEN(IS); + YY_BREAK +case 67: +YY_RULE_SETUP +#line 146 "lex_sql.l" +RETURN_TOKEN(LIKE); + YY_BREAK +case 68: +YY_RULE_SETUP +#line 148 "lex_sql.l" +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK +case 69: #line 151 "lex_sql.l" - case 70: -#line 152 "lex_sql.l" - case 71: YY_RULE_SETUP +case 70: #line 152 "lex_sql.l" - { - return yytext[0]; - } - YY_BREAK - case 72: - /* rule 72 can match eol */ - YY_RULE_SETUP +case 71: #line 153 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 73: - /* rule 73 can match eol */ - YY_RULE_SETUP +case 72: +YY_RULE_SETUP +#line 153 "lex_sql.l" +{ return yytext[0]; } + YY_BREAK +case 73: +/* rule 73 can match eol */ +YY_RULE_SETUP #line 154 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 74: YY_RULE_SETUP -#line 156 "lex_sql.l" - LOG_DEBUG("Unknown character [%c]",yytext[0]); - return yytext[0]; - YY_BREAK - case 75: YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 74: +/* rule 74 can match eol */ +YY_RULE_SETUP +#line 155 "lex_sql.l" +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 75: +YY_RULE_SETUP #line 157 "lex_sql.l" - ECHO; - YY_BREAK -#line 1428 "lex_sql.cpp" - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(STR): yyterminate(); - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if (yywrap(yyscanner)) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 76: +YY_RULE_SETUP +#line 158 "lex_sql.l" +ECHO; + YY_BREAK +#line 1439 "lex_sql.cpp" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(STR): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3487,149 +1578,171 @@ YY_DECL * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(yyscan_t yyscanner) +static int yy_get_next_buffer (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else { - yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - yy_size_t new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if (yyg->yy_n_chars == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin, yyscanner); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = - (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(yyscan_t yyscanner) + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_current_state = yyg->yy_start; - - for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 214) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 219 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -3637,27 +1750,29 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 214) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 213); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 219 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 218); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -3666,133 +1781,141 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner) + static int yyinput (yyscan_t yyscanner) #else -static int input(yyscan_t yyscanner) + static int input (yyscan_t yyscanner) #endif { - int c; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin, yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap(yyscanner)) - return 0; - - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file, yyscan_t yyscanner) + void yyrestart (FILE * input_file , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); - yy_load_buffer_state(yyscanner); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(yyscanner); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state(yyscan_t yyscanner) +static void yy_load_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -3801,105 +1924,105 @@ static void yy_load_buffer_state(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file, yyscanner); + yy_init_buffer( b, file , yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!b) - return; + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf, yyscanner); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *)b, yyscanner); + yyfree( (void *) b , yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_flush_buffer(b, yyscanner); + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - b->yy_input_file = file; - b->yy_fill_buffer = 1; + yy_flush_buffer( b , yyscanner); - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!b) - return; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(yyscanner); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -3908,95 +2031,99 @@ void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state(yyscan_t yyscanner) +void yypop_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(yyscan_t yyscanner) +static void yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = - (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( - yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -4005,31 +2132,33 @@ static void yyensure_buffer_stack(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b, yyscanner); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -4040,10 +2169,10 @@ YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - - return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -4053,175 +2182,177 @@ YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n, yyscanner); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n, yyscanner); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyextra; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno(yyscan_t yyscanner) +int yyget_lineno (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column(yyscan_t yyscanner) +int yyget_column (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!YY_CURRENT_BUFFER) - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yycolumn; + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in(yyscan_t yyscanner) +FILE *yyget_in (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyin; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out(yyscan_t yyscanner) +FILE *yyget_out (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyout; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng(yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyleng; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text(yyscan_t yyscanner) +char *yyget_text (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yytext; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyextra = user_defined; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno(int _line_number, yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_lineno called with no buffer"); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column(int _column_no, yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_column called with no buffer"); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yycolumn = _column_no; + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -4230,80 +2361,80 @@ void yyset_column(int _column_no, yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str, yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyin = _in_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; } -void yyset_out(FILE *_out_str, yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyout = _out_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; } -int yyget_debug(yyscan_t yyscanner) +int yyget_debug (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yy_flex_debug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void yyset_debug(int _bdebug, yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flex_debug = _bdebug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ -YYSTYPE *yyget_lval(yyscan_t yyscanner) +YYSTYPE * yyget_lval (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylval; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc(yyscan_t yyscanner) +YYLTYPE *yyget_lloc (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; } - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylloc = yylloc_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t *ptr_yy_globals) +int yylex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -4313,94 +2444,94 @@ int yylex_init(yyscan_t *ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra(yy_user_defined, &dummy_yyguts); + yyset_extra (yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - yyset_extra(yy_user_defined, *ptr_yy_globals); + yyset_extra (yy_user_defined, *ptr_yy_globals); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } -static int yy_init_globals(yyscan_t yyscanner) +static int yy_init_globals (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(yyscan_t yyscanner) +int yylex_destroy (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack, yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack, yyscanner); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals(yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree(yyscanner, yyscanner); - yyscanner = NULL; - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; } /* @@ -4408,59 +2539,63 @@ int yylex_destroy(yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s, yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - int n; - for (n = 0; s[n]; ++n) - ; + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size, yyscan_t yyscanner) +void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr, yyscan_t yyscanner) +void yyfree (void * ptr , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - free((char *)ptr); /* see yyrealloc() for (char *) cast */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 157 "lex_sql.l" +#line 158 "lex_sql.l" + + +void scan_string(const char *str, yyscan_t scanner) { + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); +} -void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 4fa33a30..6e1826e1 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,21 +12,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -79,62 +81,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -155,7 +157,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -195,72 +197,73 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -}; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -283,69 +286,69 @@ void yyfree(void *, yyscan_t yyscanner); #define YY_EXTRA_TYPE void * #endif -int yylex_init(yyscan_t *scanner); +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -373,9 +376,11 @@ static int yy_flex_strlen(const char *, yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -537,7 +542,8 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #undef yyTABLES_NAME #endif -#line 157 "lex_sql.l" +#line 158 "lex_sql.l" + #line 548 "lex_sql.h" #undef yyIN_HEADER diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index e5065b25..df222089 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -112,6 +112,7 @@ INT RETURN_TOKEN(INT_T); CHAR RETURN_TOKEN(STRING_T); FLOAT RETURN_TOKEN(FLOAT_T); DATE RETURN_TOKEN(DATE_T); // 增加 DATE 的 token +UNIQUE RETURN_TOKEN(UNIQUE); NULL RETURN_TOKEN(NULL_T); NULLABLE RETURN_TOKEN(NULLABLE); LOAD RETURN_TOKEN(LOAD); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 7473fa0f..cd88ab85 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -227,6 +227,7 @@ struct DropTableSqlNode */ struct CreateIndexSqlNode { + bool unique; ///< unique index std::string index_name; ///< Index name std::string relation_name; ///< Relation name std::vector attribute_name; ///< Attribute name diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 699bda39..04a4e9cd 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,9 +63,13 @@ /* Pull parsers. */ #define YYPULL 1 + + + /* First part of user prologue. */ #line 2 "yacc_sql.y" + #include #include #include @@ -88,188 +92,199 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression( - ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, + Expression *left, + Expression *right, + const char *sql_string, + YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundAggregateExpr *create_aggregate_expression( - const char *aggregate_name, Expression *child, const char *sql_string, YYLTYPE *llocp) +UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, + Expression *child, + const char *sql_string, + YYLTYPE *llocp) { UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, child); expr->set_name(token_name(sql_string, llocp)); return expr; } + #line 125 "yacc_sql.cpp" -#ifndef YY_CAST -#ifdef __cplusplus -#define YY_CAST(Type, Val) static_cast(Val) -#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) -#else -#define YY_CAST(Type, Val) ((Type)(Val)) -#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) -#endif -#endif -#ifndef YY_NULLPTR -#if defined __cplusplus -#if 201103L <= __cplusplus -#define YY_NULLPTR nullptr -#else -#define YY_NULLPTR 0 -#endif -#else -#define YY_NULLPTR ((void *)0) -#endif -#endif +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_ORDER = 11, /* ORDER */ - YYSYMBOL_TABLE = 12, /* TABLE */ - YYSYMBOL_TABLES = 13, /* TABLES */ - YYSYMBOL_INDEX = 14, /* INDEX */ - YYSYMBOL_CALC = 15, /* CALC */ - YYSYMBOL_SELECT = 16, /* SELECT */ - YYSYMBOL_DESC = 17, /* DESC */ - YYSYMBOL_SHOW = 18, /* SHOW */ - YYSYMBOL_SYNC = 19, /* SYNC */ - YYSYMBOL_INSERT = 20, /* INSERT */ - YYSYMBOL_DELETE = 21, /* DELETE */ - YYSYMBOL_UPDATE = 22, /* UPDATE */ - YYSYMBOL_LBRACE = 23, /* LBRACE */ - YYSYMBOL_RBRACE = 24, /* RBRACE */ - YYSYMBOL_COMMA = 25, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 29, /* INT_T */ - YYSYMBOL_IN = 30, /* IN */ - YYSYMBOL_STRING_T = 31, /* STRING_T */ - YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ - YYSYMBOL_DATE_T = 33, /* DATE_T */ - YYSYMBOL_NOT = 34, /* NOT */ - YYSYMBOL_NULL_T = 35, /* NULL_T */ - YYSYMBOL_NULLABLE = 36, /* NULLABLE */ - YYSYMBOL_HELP = 37, /* HELP */ - YYSYMBOL_EXIT = 38, /* EXIT */ - YYSYMBOL_DOT = 39, /* DOT */ - YYSYMBOL_INTO = 40, /* INTO */ - YYSYMBOL_VALUES = 41, /* VALUES */ - YYSYMBOL_FROM = 42, /* FROM */ - YYSYMBOL_WHERE = 43, /* WHERE */ - YYSYMBOL_AND = 44, /* AND */ - YYSYMBOL_OR = 45, /* OR */ - YYSYMBOL_SET = 46, /* SET */ - YYSYMBOL_ON = 47, /* ON */ - YYSYMBOL_LOAD = 48, /* LOAD */ - YYSYMBOL_DATA = 49, /* DATA */ - YYSYMBOL_INFILE = 50, /* INFILE */ - YYSYMBOL_EXPLAIN = 51, /* EXPLAIN */ - YYSYMBOL_STORAGE = 52, /* STORAGE */ - YYSYMBOL_FORMAT = 53, /* FORMAT */ - YYSYMBOL_INNER = 54, /* INNER */ - YYSYMBOL_JOIN = 55, /* JOIN */ - YYSYMBOL_EQ = 56, /* EQ */ - YYSYMBOL_LT = 57, /* LT */ - YYSYMBOL_GT = 58, /* GT */ - YYSYMBOL_LE = 59, /* LE */ - YYSYMBOL_GE = 60, /* GE */ - YYSYMBOL_NE = 61, /* NE */ - YYSYMBOL_LIKE = 62, /* LIKE */ - YYSYMBOL_IS = 63, /* IS */ - YYSYMBOL_NUMBER = 64, /* NUMBER */ - YYSYMBOL_FLOAT = 65, /* FLOAT */ - YYSYMBOL_ID = 66, /* ID */ - YYSYMBOL_SSS = 67, /* SSS */ - YYSYMBOL_68_ = 68, /* '+' */ - YYSYMBOL_69_ = 69, /* '-' */ - YYSYMBOL_70_ = 70, /* '*' */ - YYSYMBOL_71_ = 71, /* '/' */ - YYSYMBOL_UMINUS = 72, /* UMINUS */ - YYSYMBOL_YYACCEPT = 73, /* $accept */ - YYSYMBOL_commands = 74, /* commands */ - YYSYMBOL_command_wrapper = 75, /* command_wrapper */ - YYSYMBOL_exit_stmt = 76, /* exit_stmt */ - YYSYMBOL_help_stmt = 77, /* help_stmt */ - YYSYMBOL_sync_stmt = 78, /* sync_stmt */ - YYSYMBOL_begin_stmt = 79, /* begin_stmt */ - YYSYMBOL_commit_stmt = 80, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 81, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 82, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 83, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 84, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 85, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 86, /* create_index_stmt */ - YYSYMBOL_attr_list = 87, /* attr_list */ - YYSYMBOL_drop_index_stmt = 88, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 89, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 90, /* attr_def_list */ - YYSYMBOL_attr_def = 91, /* attr_def */ - YYSYMBOL_nullable_constraint = 92, /* nullable_constraint */ - YYSYMBOL_number = 93, /* number */ - YYSYMBOL_type = 94, /* type */ - YYSYMBOL_insert_stmt = 95, /* insert_stmt */ - YYSYMBOL_values_list = 96, /* values_list */ - YYSYMBOL_value_list = 97, /* value_list */ - YYSYMBOL_value = 98, /* value */ - YYSYMBOL_storage_format = 99, /* storage_format */ - YYSYMBOL_delete_stmt = 100, /* delete_stmt */ - YYSYMBOL_update_stmt = 101, /* update_stmt */ - YYSYMBOL_setClauses = 102, /* setClauses */ - YYSYMBOL_setClause = 103, /* setClause */ - YYSYMBOL_select_stmt = 104, /* select_stmt */ - YYSYMBOL_calc_stmt = 105, /* calc_stmt */ - YYSYMBOL_expression_list = 106, /* expression_list */ - YYSYMBOL_expression = 107, /* expression */ - YYSYMBOL_alias = 108, /* alias */ - YYSYMBOL_aggr_func_expr = 109, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 110, /* sub_query_expr */ - YYSYMBOL_rel_attr = 111, /* rel_attr */ - YYSYMBOL_relation = 112, /* relation */ - YYSYMBOL_rel_list = 113, /* rel_list */ - YYSYMBOL_joinClauses = 114, /* joinClauses */ - YYSYMBOL_where = 115, /* where */ - YYSYMBOL_condition = 116, /* condition */ - YYSYMBOL_comp_op = 117, /* comp_op */ - YYSYMBOL_opt_order_by = 118, /* opt_order_by */ - YYSYMBOL_sort_list = 119, /* sort_list */ - YYSYMBOL_sort_unit = 120, /* sort_unit */ - YYSYMBOL_group_by = 121, /* group_by */ - YYSYMBOL_load_data_stmt = 122, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 123, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 124, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 125 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_ORDER = 11, /* ORDER */ + YYSYMBOL_TABLE = 12, /* TABLE */ + YYSYMBOL_TABLES = 13, /* TABLES */ + YYSYMBOL_INDEX = 14, /* INDEX */ + YYSYMBOL_CALC = 15, /* CALC */ + YYSYMBOL_SELECT = 16, /* SELECT */ + YYSYMBOL_DESC = 17, /* DESC */ + YYSYMBOL_SHOW = 18, /* SHOW */ + YYSYMBOL_SYNC = 19, /* SYNC */ + YYSYMBOL_INSERT = 20, /* INSERT */ + YYSYMBOL_DELETE = 21, /* DELETE */ + YYSYMBOL_UPDATE = 22, /* UPDATE */ + YYSYMBOL_LBRACE = 23, /* LBRACE */ + YYSYMBOL_RBRACE = 24, /* RBRACE */ + YYSYMBOL_COMMA = 25, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 29, /* INT_T */ + YYSYMBOL_IN = 30, /* IN */ + YYSYMBOL_STRING_T = 31, /* STRING_T */ + YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ + YYSYMBOL_DATE_T = 33, /* DATE_T */ + YYSYMBOL_NOT = 34, /* NOT */ + YYSYMBOL_UNIQUE = 35, /* UNIQUE */ + YYSYMBOL_NULL_T = 36, /* NULL_T */ + YYSYMBOL_NULLABLE = 37, /* NULLABLE */ + YYSYMBOL_HELP = 38, /* HELP */ + YYSYMBOL_EXIT = 39, /* EXIT */ + YYSYMBOL_DOT = 40, /* DOT */ + YYSYMBOL_INTO = 41, /* INTO */ + YYSYMBOL_VALUES = 42, /* VALUES */ + YYSYMBOL_FROM = 43, /* FROM */ + YYSYMBOL_WHERE = 44, /* WHERE */ + YYSYMBOL_AND = 45, /* AND */ + YYSYMBOL_OR = 46, /* OR */ + YYSYMBOL_SET = 47, /* SET */ + YYSYMBOL_ON = 48, /* ON */ + YYSYMBOL_LOAD = 49, /* LOAD */ + YYSYMBOL_DATA = 50, /* DATA */ + YYSYMBOL_INFILE = 51, /* INFILE */ + YYSYMBOL_EXPLAIN = 52, /* EXPLAIN */ + YYSYMBOL_STORAGE = 53, /* STORAGE */ + YYSYMBOL_FORMAT = 54, /* FORMAT */ + YYSYMBOL_INNER = 55, /* INNER */ + YYSYMBOL_JOIN = 56, /* JOIN */ + YYSYMBOL_EQ = 57, /* EQ */ + YYSYMBOL_LT = 58, /* LT */ + YYSYMBOL_GT = 59, /* GT */ + YYSYMBOL_LE = 60, /* LE */ + YYSYMBOL_GE = 61, /* GE */ + YYSYMBOL_NE = 62, /* NE */ + YYSYMBOL_LIKE = 63, /* LIKE */ + YYSYMBOL_IS = 64, /* IS */ + YYSYMBOL_NUMBER = 65, /* NUMBER */ + YYSYMBOL_FLOAT = 66, /* FLOAT */ + YYSYMBOL_ID = 67, /* ID */ + YYSYMBOL_SSS = 68, /* SSS */ + YYSYMBOL_69_ = 69, /* '+' */ + YYSYMBOL_70_ = 70, /* '-' */ + YYSYMBOL_71_ = 71, /* '*' */ + YYSYMBOL_72_ = 72, /* '/' */ + YYSYMBOL_UMINUS = 73, /* UMINUS */ + YYSYMBOL_YYACCEPT = 74, /* $accept */ + YYSYMBOL_commands = 75, /* commands */ + YYSYMBOL_command_wrapper = 76, /* command_wrapper */ + YYSYMBOL_exit_stmt = 77, /* exit_stmt */ + YYSYMBOL_help_stmt = 78, /* help_stmt */ + YYSYMBOL_sync_stmt = 79, /* sync_stmt */ + YYSYMBOL_begin_stmt = 80, /* begin_stmt */ + YYSYMBOL_commit_stmt = 81, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 82, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 83, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 84, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 85, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 86, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 87, /* create_index_stmt */ + YYSYMBOL_opt_unique = 88, /* opt_unique */ + YYSYMBOL_attr_list = 89, /* attr_list */ + YYSYMBOL_drop_index_stmt = 90, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 91, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 92, /* attr_def_list */ + YYSYMBOL_attr_def = 93, /* attr_def */ + YYSYMBOL_nullable_constraint = 94, /* nullable_constraint */ + YYSYMBOL_number = 95, /* number */ + YYSYMBOL_type = 96, /* type */ + YYSYMBOL_insert_stmt = 97, /* insert_stmt */ + YYSYMBOL_values_list = 98, /* values_list */ + YYSYMBOL_value_list = 99, /* value_list */ + YYSYMBOL_value = 100, /* value */ + YYSYMBOL_storage_format = 101, /* storage_format */ + YYSYMBOL_delete_stmt = 102, /* delete_stmt */ + YYSYMBOL_update_stmt = 103, /* update_stmt */ + YYSYMBOL_setClauses = 104, /* setClauses */ + YYSYMBOL_setClause = 105, /* setClause */ + YYSYMBOL_select_stmt = 106, /* select_stmt */ + YYSYMBOL_calc_stmt = 107, /* calc_stmt */ + YYSYMBOL_expression_list = 108, /* expression_list */ + YYSYMBOL_expression = 109, /* expression */ + YYSYMBOL_alias = 110, /* alias */ + YYSYMBOL_aggr_func_expr = 111, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 112, /* sub_query_expr */ + YYSYMBOL_rel_attr = 113, /* rel_attr */ + YYSYMBOL_relation = 114, /* relation */ + YYSYMBOL_rel_list = 115, /* rel_list */ + YYSYMBOL_joinClauses = 116, /* joinClauses */ + YYSYMBOL_where = 117, /* where */ + YYSYMBOL_condition = 118, /* condition */ + YYSYMBOL_comp_op = 119, /* comp_op */ + YYSYMBOL_opt_order_by = 120, /* opt_order_by */ + YYSYMBOL_sort_list = 121, /* sort_list */ + YYSYMBOL_sort_unit = 122, /* sort_unit */ + YYSYMBOL_group_by = 123, /* group_by */ + YYSYMBOL_load_data_stmt = 124, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 125, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 126, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 127 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; + + + #ifdef short -#undef short +# undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -277,11 +292,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -#include /* INFRINGES ON USER NAME SPACE */ -#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_STDINT_H -#endif +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -311,15 +326,16 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -#undef UINT_LEAST8_MAX -#undef UINT_LEAST16_MAX -#define UINT_LEAST8_MAX 255 -#define UINT_LEAST16_MAX 65535 +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -329,7 +345,8 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -338,38 +355,42 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -#define YYPTRDIFF_T __PTRDIFF_TYPE__ -#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -#elif defined PTRDIFF_MAX -#ifndef ptrdiff_t -#include /* INFRINGES ON USER NAME SPACE */ -#endif -#define YYPTRDIFF_T ptrdiff_t -#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -#else -#define YYPTRDIFF_T long -#define YYPTRDIFF_MAXIMUM LONG_MAX -#endif +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T -#ifdef __SIZE_TYPE__ -#define YYSIZE_T __SIZE_TYPE__ -#elif defined size_t -#define YYSIZE_T size_t -#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YYSIZE_T size_t -#else -#define YYSIZE_T unsigned -#endif +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -378,2365 +399,582 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -#if defined YYENABLE_NLS && YYENABLE_NLS -#if ENABLE_NLS -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_(Msgid) dgettext("bison-runtime", Msgid) -#endif -#endif -#ifndef YY_ -#define YY_(Msgid) Msgid -#endif +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif #endif + #ifndef YY_ATTRIBUTE_PURE -#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) -#else -#define YY_ATTRIBUTE_PURE -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define YY_ATTRIBUTE_UNUSED -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if !defined lint || defined __GNUC__ -#define YY_USE(E) ((void)(E)) +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) #else -#define YY_USE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") -#else -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -#endif -#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#define YY_INITIAL_VALUE(Value) Value +# define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_END +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -#define YY_INITIAL_VALUE(Value) /* Nothing. */ +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ -#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") -#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_END +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END #endif -#define YY_ASSERT(E) ((void)(0 && (E))) + +#define YY_ASSERT(E) ((void) (0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -#ifdef YYSTACK_USE_ALLOCA -#if YYSTACK_USE_ALLOCA -#ifdef __GNUC__ -#define YYSTACK_ALLOC __builtin_alloca -#elif defined __BUILTIN_VA_ARG_INCR -#include /* INFRINGES ON USER NAME SPACE */ -#elif defined _AIX -#define YYSTACK_ALLOC __alloca -#elif defined _MSC_VER -#include /* INFRINGES ON USER NAME SPACE */ -#define alloca _alloca -#else -#define YYSTACK_ALLOC alloca -#if !defined _ALLOCA_H && !defined EXIT_SUCCESS -#include /* INFRINGES ON USER NAME SPACE */ -/* Use EXIT_SUCCESS as a witness for stdlib.h. */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#endif -#endif -#endif - -#ifdef YYSTACK_ALLOC -/* Pacify GCC's 'empty if-body' warning. */ -#define YYSTACK_FREE(Ptr) \ - do { /* empty */ \ - ; \ - } while (0) -#ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -#endif -#else -#define YYSTACK_ALLOC YYMALLOC -#define YYSTACK_FREE YYFREE -#ifndef YYSTACK_ALLOC_MAXIMUM -#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -#endif -#if (defined __cplusplus && !defined EXIT_SUCCESS && \ - !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) -#include /* INFRINGES ON USER NAME SPACE */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef YYMALLOC -#define YYMALLOC malloc -#if !defined malloc && !defined EXIT_SUCCESS -void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#ifndef YYFREE -#define YYFREE free -#if !defined free && !defined EXIT_SUCCESS -void free(void *); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#endif +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif #endif /* 1 */ -#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ - defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -#define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) -#define YYCOPY_NEEDED 1 +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF(*yyptr); \ - } while (0) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -#ifndef YYCOPY -#if defined __GNUC__ && 1 < __GNUC__ -#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) -#else -#define YYCOPY(Dst, Src, Count) \ - do { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } while (0) -#endif -#endif +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 70 +#define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 225 +#define YYLAST 230 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 73 +#define YYNTOKENS 74 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 53 +#define YYNNTS 54 /* YYNRULES -- Number of rules. */ -#define YYNRULES 126 +#define YYNRULES 128 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 226 +#define YYNSTATES 228 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 323 +#define YYMAXUTOK 324 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = {0, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 70, - 68, - 2, - 69, - 2, - 71, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 72}; +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 71, 69, 2, 70, 2, 72, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 73 +}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = {0, - 222, - 222, - 230, - 231, - 232, - 233, - 234, - 235, - 236, - 237, - 238, - 239, - 240, - 241, - 242, - 243, - 244, - 245, - 246, - 247, - 248, - 249, - 250, - 254, - 260, - 265, - 271, - 277, - 283, - 289, - 296, - 302, - 310, - 320, - 334, - 340, - 349, - 359, - 383, - 386, - 399, - 411, - 436, - 440, - 444, - 449, - 455, - 458, - 459, - 460, - 461, - 465, - 478, - 484, - 491, - 497, - 505, - 509, - 513, - 519, - 526, - 529, - 536, - 548, - 562, - 568, - 576, - 586, - 615, - 648, - 657, - 666, - 682, - 685, - 688, - 691, - 694, - 703, - 706, - 711, - 717, - 720, - 723, - 730, - 733, - 736, - 741, - 749, - 756, - 763, - 768, - 778, - 784, - 794, - 811, - 818, - 830, - 833, - 839, - 843, - 847, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 870, - 873, - 881, - 886, - 894, - 900, - 906, - 916, - 921, - 934, - 942, - 952, - 953}; +static const yytype_int16 yyrline[] = +{ + 0, 225, 225, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 257, 263, 268, 274, 280, 286, + 292, 299, 305, 313, 323, 338, 339, 343, 349, 358, + 368, 392, 395, 408, 420, 445, 449, 453, 458, 464, + 467, 468, 469, 470, 474, 487, 493, 500, 506, 514, + 518, 522, 528, 535, 538, 545, 557, 571, 577, 585, + 595, 624, 657, 666, 675, 691, 694, 697, 700, 703, + 712, 715, 720, 726, 729, 732, 739, 742, 745, 750, + 758, 765, 772, 777, 787, 793, 803, 820, 827, 839, + 842, 848, 852, 856, 863, 864, 865, 866, 867, 868, + 869, 870, 871, 872, 873, 874, 879, 882, 890, 895, + 903, 909, 915, 925, 930, 943, 951, 961, 962 +}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = {"\"end of file\"", - "error", - "\"invalid token\"", - "SEMICOLON", - "AS", - "ASC", - "BY", - "CREATE", - "DROP", - "EXISTS", - "GROUP", - "ORDER", - "TABLE", - "TABLES", - "INDEX", - "CALC", - "SELECT", - "DESC", - "SHOW", - "SYNC", - "INSERT", - "DELETE", - "UPDATE", - "LBRACE", - "RBRACE", - "COMMA", - "TRX_BEGIN", - "TRX_COMMIT", - "TRX_ROLLBACK", - "INT_T", - "IN", - "STRING_T", - "FLOAT_T", - "DATE_T", - "NOT", - "NULL_T", - "NULLABLE", - "HELP", - "EXIT", - "DOT", - "INTO", - "VALUES", - "FROM", - "WHERE", - "AND", - "OR", - "SET", - "ON", - "LOAD", - "DATA", - "INFILE", - "EXPLAIN", - "STORAGE", - "FORMAT", - "INNER", - "JOIN", - "EQ", - "LT", - "GT", - "LE", - "GE", - "NE", - "LIKE", - "IS", - "NUMBER", - "FLOAT", - "ID", - "SSS", - "'+'", - "'-'", - "'*'", - "'/'", - "UMINUS", - "$accept", - "commands", - "command_wrapper", - "exit_stmt", - "help_stmt", - "sync_stmt", - "begin_stmt", - "commit_stmt", - "rollback_stmt", - "drop_table_stmt", - "show_tables_stmt", - "desc_table_stmt", - "show_index_stmt", - "create_index_stmt", - "attr_list", - "drop_index_stmt", - "create_table_stmt", - "attr_def_list", - "attr_def", - "nullable_constraint", - "number", - "type", - "insert_stmt", - "values_list", - "value_list", - "value", - "storage_format", - "delete_stmt", - "update_stmt", - "setClauses", - "setClause", - "select_stmt", - "calc_stmt", - "expression_list", - "expression", - "alias", - "aggr_func_expr", - "sub_query_expr", - "rel_attr", - "relation", - "rel_list", - "joinClauses", - "where", - "condition", - "comp_op", - "opt_order_by", - "sort_list", - "sort_unit", - "group_by", - "load_data_stmt", - "explain_stmt", - "set_variable_stmt", - "opt_semicolon", - YY_NULLPTR}; - -static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "ORDER", "TABLE", + "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", + "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", + "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", + "DATE_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", + "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", "ON", "LOAD", + "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", "JOIN", "EQ", + "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", + "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", + "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", + "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", + "desc_table_stmt", "show_index_stmt", "create_index_stmt", "opt_unique", + "attr_list", "drop_index_stmt", "create_table_stmt", "attr_def_list", + "attr_def", "nullable_constraint", "number", "type", "insert_stmt", + "values_list", "value_list", "value", "storage_format", "delete_stmt", + "update_stmt", "setClauses", "setClause", "select_stmt", "calc_stmt", + "expression_list", "expression", "alias", "aggr_func_expr", + "sub_query_expr", "rel_attr", "relation", "rel_list", "joinClauses", + "where", "condition", "comp_op", "opt_order_by", "sort_list", + "sort_unit", "group_by", "load_data_stmt", "explain_stmt", + "set_variable_stmt", "opt_semicolon", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -#define YYPACT_NINF (-158) +#define YYPACT_NINF (-155) -#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) 0 +#define yytable_value_is_error(Yyn) \ + 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {81, - 103, - 112, - -18, - -18, - -35, - 14, - -158, - 13, - -5, - 17, - -158, - -158, - -158, - -158, - -158, - 48, - 43, - 81, - 62, - 122, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - 64, - 85, - 92, - 93, - -10, - -158, - -158, - -158, - -9, - -158, - -18, - -158, - -158, - -158, - -2, - -158, - -158, - -158, - 111, - -158, - -158, - 118, - 95, - 96, - 82, - 107, - 114, - -158, - -158, - -158, - -158, - 142, - 119, - -158, - 120, - 144, - 146, - 15, - 105, - -158, - 106, - -158, - -18, - -18, - -18, - -18, - 148, - 108, - 108, - 134, - 133, - 113, - 26, - 110, - 115, - 117, - 121, - -158, - -158, - -158, - 154, - -158, - -158, - -29, - -29, - -158, - -158, - -18, - -158, - 11, - 133, - -158, - 157, - -18, - -158, - 126, - -7, - -158, - -158, - 145, - 102, - 159, - 163, - -158, - -158, - -158, - 135, - 164, - -158, - 26, - 166, - 86, - 42, - 26, - 113, - -158, - 176, - -158, - -158, - -158, - -158, - 87, - 115, - 168, - 127, - 108, - 108, - 183, - 80, - -158, - 172, - -158, - -4, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - 162, - -18, - -18, - -18, - -158, - -158, - 131, - 136, - 167, - -158, - -158, - -158, - 159, - 147, - 173, - 177, - 156, - 133, - 12, - -158, - 198, - -158, - -158, - 26, - 26, - -158, - -158, - -158, - 68, - -158, - 161, - -158, - -158, - 182, - -158, - -158, - 155, - -158, - 127, - -158, - -18, - -158, - -18, - -158, - 116, - -12, - 151, - -158, - -25, - -158, - 4, - -158, - 184, - -158, - -158, - 149, - 158, - -158, - -158, - -18, - -158, - 108, - -158, - -158}; +static const yytype_int16 yypact[] = +{ + 101, 1, 112, 29, 29, -44, 16, -155, -10, -2, + 24, -155, -155, -155, -155, -155, 35, 10, 101, 83, + 107, -155, -155, -155, -155, -155, -155, -155, -155, -155, + -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, + -155, -155, 58, -155, 116, 64, 66, -9, -155, -155, + -155, 5, -155, 29, -155, -155, -155, -1, -155, -155, + -155, 91, -155, -155, 92, 70, 71, 98, 89, 96, + -155, -155, -155, -155, 129, 87, -155, 108, 131, 133, + 14, 100, -155, 109, -155, 29, 29, 29, 29, 143, + 110, 110, 127, 114, 111, -19, 113, 115, 132, 117, + -155, -155, -155, 151, -155, -155, 15, 15, -155, -155, + 29, -155, 0, 114, -155, 156, 29, -155, 126, -4, + -155, -155, 144, -7, 161, 120, -155, -155, -155, 134, + 163, -155, -19, 164, 102, -27, -19, 111, -155, 179, + -155, -155, -155, -155, 67, 115, 168, 170, 110, 110, + 183, 81, -155, 172, -155, -21, -155, -155, -155, -155, + -155, -155, -155, 162, 29, 29, 29, -155, -155, 130, + 135, 165, -155, -155, -155, 161, 145, 136, 154, 114, + 11, -155, 193, -155, -155, -19, -19, -155, -155, -155, + 72, -155, 159, -155, -155, 181, -155, -155, 152, -155, + 182, 184, 29, -155, 29, -155, 90, 17, 153, 136, + -155, 43, -155, 3, -155, 186, -155, -155, 142, -155, + 157, -155, -155, 29, -155, 110, -155, -155 +}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_int8 yydefact[] = {0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 27, - 28, - 29, - 25, - 24, - 0, - 0, - 0, - 0, - 125, - 23, - 22, - 15, - 16, - 17, - 18, - 9, - 10, - 11, - 14, - 12, - 13, - 8, - 5, - 7, - 6, - 4, - 3, - 19, - 20, - 21, - 0, - 0, - 0, - 0, - 0, - 60, - 57, - 58, - 90, - 59, - 0, - 81, - 79, - 70, - 84, - 82, - 83, - 80, - 0, - 32, - 31, - 0, - 0, - 0, - 0, - 0, - 0, - 123, - 1, - 126, - 2, - 0, - 0, - 30, - 0, - 0, - 0, - 0, - 0, - 78, - 0, - 85, - 0, - 0, - 0, - 0, - 71, - 0, - 0, - 0, - 97, - 0, - 0, - 0, - 0, - 0, - 0, - 89, - 77, - 88, - 0, - 91, - 86, - 73, - 74, - 75, - 76, - 0, - 92, - 84, - 97, - 33, - 0, - 0, - 63, - 0, - 97, - 65, - 124, - 0, - 0, - 39, - 0, - 37, - 87, - 72, - 0, - 93, - 121, - 0, - 52, - 0, - 98, - 0, - 0, - 64, - 0, - 48, - 49, - 50, - 51, - 46, - 0, - 0, - 0, - 0, - 0, - 114, - 0, - 55, - 0, - 112, - 0, - 102, - 103, - 104, - 105, - 106, - 107, - 110, - 108, - 0, - 0, - 0, - 67, - 66, - 0, - 0, - 0, - 45, - 44, - 42, - 39, - 61, - 35, - 0, - 0, - 97, - 84, - 94, - 0, - 68, - 53, - 0, - 0, - 113, - 111, - 109, - 99, - 100, - 101, - 122, - 47, - 0, - 43, - 40, - 0, - 38, - 0, - 34, - 0, - 121, - 0, - 56, - 0, - 46, - 0, - 36, - 95, - 69, - 118, - 115, - 116, - 54, - 41, - 0, - 0, - 120, - 119, - 0, - 62, - 0, - 117, - 96}; +static const yytype_uint8 yydefact[] = +{ + 0, 36, 0, 0, 0, 0, 0, 26, 0, 0, + 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, + 127, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, + 20, 21, 0, 35, 0, 0, 0, 0, 62, 59, + 60, 92, 61, 0, 83, 81, 72, 86, 84, 85, + 82, 0, 32, 31, 0, 0, 0, 0, 0, 0, + 125, 1, 128, 2, 0, 0, 30, 0, 0, 0, + 0, 0, 80, 0, 87, 0, 0, 0, 0, 73, + 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, + 91, 79, 90, 0, 93, 88, 75, 76, 77, 78, + 0, 94, 86, 99, 33, 0, 0, 65, 0, 99, + 67, 126, 0, 0, 41, 0, 39, 89, 74, 0, + 95, 123, 0, 54, 0, 100, 0, 0, 66, 0, + 50, 51, 52, 53, 48, 0, 0, 0, 0, 0, + 116, 0, 57, 0, 114, 0, 104, 105, 106, 107, + 108, 109, 112, 110, 0, 0, 0, 69, 68, 0, + 0, 0, 47, 46, 44, 41, 63, 0, 0, 99, + 86, 96, 0, 70, 55, 0, 0, 115, 113, 111, + 101, 102, 103, 124, 49, 0, 45, 42, 0, 40, + 37, 0, 0, 123, 0, 58, 0, 48, 0, 0, + 34, 97, 71, 120, 117, 118, 56, 43, 0, 38, + 0, 122, 121, 0, 64, 0, 119, 98 +}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-158, - -158, - 192, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - -158, - 16, - -158, - -158, - 37, - 70, - 5, - -158, - -158, - -158, - -158, - 31, - -91, - -158, - -158, - -158, - -158, - 83, - 174, - -158, - -3, - -52, - 165, - -158, - -158, - -158, - -78, - 74, - 0, - -108, - -157, - -158, - -158, - 3, - -158, - 22, - -158, - -158, - -158, - -158}; +static const yytype_int16 yypgoto[] = +{ + -155, -155, 194, -155, -155, -155, -155, -155, -155, -155, + -155, -155, -155, -155, -155, 6, -155, -155, 39, 73, + 9, -155, -155, -155, -155, 31, -93, -155, -155, -155, + -155, 82, 173, -155, -3, -53, 166, -155, -155, -155, + -85, 75, 2, -103, -154, -155, -155, 7, -155, 18, + -155, -155, -155, -155 +}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = {0, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 177, - 32, - 33, - 145, - 123, - 173, - 195, - 143, - 34, - 132, - 150, - 54, - 199, - 35, - 36, - 118, - 119, - 37, - 38, - 55, - 56, - 129, - 57, - 58, - 59, - 178, - 112, - 179, - 116, - 134, - 163, - 183, - 213, - 214, - 149, - 39, - 40, - 41, - 72}; +static const yytype_uint8 yydefgoto[] = +{ + 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 44, 201, 32, 33, 146, 124, + 174, 195, 144, 34, 133, 151, 55, 199, 35, 36, + 119, 120, 37, 38, 56, 57, 130, 58, 59, 60, + 178, 113, 179, 117, 135, 164, 183, 214, 215, 150, + 39, 40, 41, 73 +}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = {81, - 60, - 82, - 120, - 130, - 46, - 4, - 191, - 192, - 219, - 137, - 111, - 113, - 46, - 79, - 82, - 82, - 47, - 136, - 164, - 165, - 220, - 170, - 171, - 172, - 47, - 187, - 62, - 63, - 218, - 80, - 61, - 105, - 106, - 107, - 108, - 115, - 65, - 46, - 101, - 151, - 86, - 87, - 78, - 166, - 210, - 48, - 49, - 50, - 51, - 47, - 52, - 53, - 64, - 48, - 49, - 50, - 51, - 188, - 52, - 53, - 47, - 70, - 133, - 83, - 128, - 84, - 85, - 86, - 87, - 180, - 203, - 84, - 85, - 86, - 87, - 102, - 83, - 83, - 48, - 49, - 50, - 51, - 66, - 52, - 53, - 164, - 165, - 1, - 2, - 48, - 49, - 68, - 51, - 205, - 151, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 184, - 185, - 127, - 11, - 12, - 13, - 169, - 190, - 133, - 133, - 67, - 42, - 153, - 43, - 14, - 15, - 154, - 170, - 171, - 172, - 44, - 71, - 45, - 16, - 93, - 17, - 73, - 139, - 18, - 140, - 141, - 142, - 84, - 85, - 86, - 87, - 215, - 185, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 133, - 74, - 212, - 89, - 84, - 85, - 86, - 87, - 75, - 76, - 90, - 91, - 92, - 94, - 95, - 96, - 97, - 98, - 99, - 212, - 100, - 103, - 104, - 109, - 110, - 114, - 115, - 121, - 126, - 117, - 131, - 122, - 135, - 124, - 144, - 138, - 146, - 125, - 168, - 148, - 147, - 152, - 175, - 176, - 182, - 186, - 189, - 193, - 200, - 198, - 194, - 201, - 196, - 202, - 204, - 164, - 207, - 217, - 208, - 221, - 69, - 197, - 216, - 223, - 174, - 222, - 209, - 206, - 0, - 167, - 77, - 88, - 181, - 225, - 224, - 211}; - -static const yytype_int16 yycheck[] = {52, - 4, - 4, - 94, - 112, - 23, - 16, - 164, - 165, - 5, - 118, - 89, - 90, - 23, - 23, - 4, - 4, - 35, - 25, - 44, - 45, - 17, - 34, - 35, - 36, - 35, - 30, - 13, - 14, - 54, - 39, - 66, - 84, - 85, - 86, - 87, - 43, - 42, - 23, - 24, - 131, - 70, - 71, - 46, - 135, - 202, - 64, - 65, - 66, - 67, - 35, - 69, - 70, - 40, - 64, - 65, - 66, - 67, - 62, - 69, - 70, - 35, - 0, - 115, - 66, - 54, - 68, - 69, - 70, - 71, - 148, - 179, - 68, - 69, - 70, - 71, - 79, - 66, - 66, - 64, - 65, - 66, - 67, - 66, - 69, - 70, - 44, - 45, - 7, - 8, - 64, - 65, - 49, - 67, - 185, - 186, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 24, - 25, - 109, - 26, - 27, - 28, - 23, - 163, - 164, - 165, - 66, - 12, - 30, - 14, - 37, - 38, - 34, - 34, - 35, - 36, - 12, - 3, - 14, - 46, - 46, - 48, - 66, - 29, - 51, - 31, - 32, - 33, - 68, - 69, - 70, - 71, - 24, - 25, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 202, - 66, - 204, - 42, - 68, - 69, - 70, - 71, - 66, - 66, - 42, - 66, - 66, - 56, - 50, - 23, - 47, - 47, - 24, - 221, - 24, - 66, - 66, - 25, - 66, - 41, - 43, - 67, - 24, - 66, - 23, - 66, - 56, - 66, - 25, - 40, - 23, - 66, - 12, - 25, - 55, - 25, - 24, - 66, - 11, - 23, - 34, - 66, - 25, - 52, - 64, - 24, - 35, - 47, - 6, - 44, - 24, - 56, - 53, - 25, - 18, - 174, - 207, - 55, - 144, - 66, - 200, - 186, - -1, - 136, - 46, - 56, - 148, - 223, - 221, - 203}; +static const yytype_uint8 yytable[] = +{ + 82, 61, 121, 83, 83, 112, 114, 4, 221, 187, + 131, 191, 192, 42, 47, 83, 138, 48, 165, 166, + 222, 137, 140, 62, 141, 142, 143, 48, 80, 63, + 64, 65, 106, 107, 108, 109, 43, 47, 102, 152, + 116, 66, 188, 167, 79, 81, 49, 50, 211, 52, + 48, 171, 47, 172, 173, 129, 49, 50, 51, 52, + 69, 53, 54, 134, 180, 48, 84, 84, 85, 86, + 87, 88, 85, 86, 87, 88, 203, 103, 84, 49, + 50, 51, 52, 71, 53, 54, 87, 88, 165, 166, + 170, 67, 205, 152, 49, 50, 51, 52, 220, 53, + 54, 171, 68, 172, 173, 184, 185, 128, 1, 2, + 72, 190, 134, 134, 216, 185, 3, 4, 5, 6, + 7, 8, 9, 10, 45, 74, 46, 11, 12, 13, + 75, 76, 154, 77, 90, 91, 155, 92, 93, 14, + 15, 85, 86, 87, 88, 94, 95, 96, 16, 134, + 17, 213, 97, 18, 98, 100, 99, 101, 116, 156, + 157, 158, 159, 160, 161, 162, 163, 104, 110, 115, + 213, 85, 86, 87, 88, 127, 105, 111, 118, 132, + 125, 122, 123, 136, 126, 139, 145, 147, 149, 153, + 148, 169, 176, 177, 182, 186, 189, 193, 198, 204, + 194, 196, 202, 200, 165, 207, 208, 209, 210, 224, + 218, 223, 70, 225, 197, 219, 217, 206, 175, 168, + 78, 212, 0, 89, 181, 0, 0, 227, 0, 0, + 226 +}; + +static const yytype_int16 yycheck[] = +{ + 53, 4, 95, 4, 4, 90, 91, 16, 5, 30, + 113, 165, 166, 12, 23, 4, 119, 36, 45, 46, + 17, 25, 29, 67, 31, 32, 33, 36, 23, 13, + 14, 41, 85, 86, 87, 88, 35, 23, 24, 132, + 44, 43, 63, 136, 47, 40, 65, 66, 202, 68, + 36, 34, 23, 36, 37, 55, 65, 66, 67, 68, + 50, 70, 71, 116, 149, 36, 67, 67, 69, 70, + 71, 72, 69, 70, 71, 72, 179, 80, 67, 65, + 66, 67, 68, 0, 70, 71, 71, 72, 45, 46, + 23, 67, 185, 186, 65, 66, 67, 68, 55, 70, + 71, 34, 67, 36, 37, 24, 25, 110, 7, 8, + 3, 164, 165, 166, 24, 25, 15, 16, 17, 18, + 19, 20, 21, 22, 12, 67, 14, 26, 27, 28, + 14, 67, 30, 67, 43, 43, 34, 67, 67, 38, + 39, 69, 70, 71, 72, 47, 57, 51, 47, 202, + 49, 204, 23, 52, 67, 24, 48, 24, 44, 57, + 58, 59, 60, 61, 62, 63, 64, 67, 25, 42, + 223, 69, 70, 71, 72, 24, 67, 67, 67, 23, + 48, 68, 67, 57, 67, 41, 25, 67, 25, 25, + 56, 12, 24, 23, 11, 23, 34, 67, 53, 6, + 65, 36, 48, 67, 45, 24, 54, 25, 24, 67, + 57, 25, 18, 56, 175, 209, 207, 186, 145, 137, + 47, 203, -1, 57, 149, -1, -1, 225, -1, -1, + 223 +}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_int8 yystos[] = {0, - 7, - 8, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 26, - 27, - 28, - 37, - 38, - 46, - 48, - 51, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 88, - 89, - 95, - 100, - 101, - 104, - 105, - 122, - 123, - 124, - 12, - 14, - 12, - 14, - 23, - 35, - 64, - 65, - 66, - 67, - 69, - 70, - 98, - 106, - 107, - 109, - 110, - 111, - 106, - 66, - 13, - 14, - 40, - 42, - 66, - 66, - 49, - 75, - 0, - 3, - 125, - 66, - 66, - 66, - 66, - 104, - 106, - 23, - 39, - 107, - 4, - 66, - 68, - 69, - 70, - 71, - 108, - 42, - 42, - 66, - 66, - 46, - 56, - 50, - 23, - 47, - 47, - 24, - 24, - 24, - 106, - 66, - 66, - 107, - 107, - 107, - 107, - 25, - 66, - 112, - 113, - 112, - 41, - 43, - 115, - 66, - 102, - 103, - 98, - 67, - 66, - 91, - 66, - 66, - 24, - 106, - 54, - 108, - 115, - 23, - 96, - 107, - 116, - 56, - 25, - 115, - 40, - 29, - 31, - 32, - 33, - 94, - 25, - 90, - 23, - 55, - 25, - 121, - 97, - 98, - 25, - 30, - 34, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 117, - 44, - 45, - 98, - 103, - 12, - 23, - 34, - 35, - 36, - 92, - 91, - 24, - 66, - 87, - 112, - 114, - 112, - 113, - 11, - 118, - 24, - 25, - 23, - 30, - 62, - 34, - 107, - 116, - 116, - 66, - 64, - 93, - 35, - 90, - 52, - 99, - 25, - 24, - 47, - 115, - 6, - 98, - 97, - 24, - 53, - 87, - 116, - 121, - 107, - 119, - 120, - 24, - 92, - 56, - 54, - 5, - 17, - 25, - 66, - 55, - 119, - 114}; +static const yytype_int8 yystos[] = +{ + 0, 7, 8, 15, 16, 17, 18, 19, 20, 21, + 22, 26, 27, 28, 38, 39, 47, 49, 52, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 90, 91, 97, 102, 103, 106, 107, 124, + 125, 126, 12, 35, 88, 12, 14, 23, 36, 65, + 66, 67, 68, 70, 71, 100, 108, 109, 111, 112, + 113, 108, 67, 13, 14, 41, 43, 67, 67, 50, + 76, 0, 3, 127, 67, 14, 67, 67, 106, 108, + 23, 40, 109, 4, 67, 69, 70, 71, 72, 110, + 43, 43, 67, 67, 47, 57, 51, 23, 67, 48, + 24, 24, 24, 108, 67, 67, 109, 109, 109, 109, + 25, 67, 114, 115, 114, 42, 44, 117, 67, 104, + 105, 100, 68, 67, 93, 48, 67, 24, 108, 55, + 110, 117, 23, 98, 109, 118, 57, 25, 117, 41, + 29, 31, 32, 33, 96, 25, 92, 67, 56, 25, + 123, 99, 100, 25, 30, 34, 57, 58, 59, 60, + 61, 62, 63, 64, 119, 45, 46, 100, 105, 12, + 23, 34, 36, 37, 94, 93, 24, 23, 114, 116, + 114, 115, 11, 120, 24, 25, 23, 30, 63, 34, + 109, 118, 118, 67, 65, 95, 36, 92, 53, 101, + 67, 89, 48, 117, 6, 100, 99, 24, 54, 25, + 24, 118, 123, 109, 121, 122, 24, 94, 57, 89, + 55, 5, 17, 25, 67, 56, 121, 116 +}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr1[] = {0, - 73, - 74, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 87, - 88, - 89, - 90, - 90, - 91, - 91, - 92, - 92, - 92, - 92, - 93, - 94, - 94, - 94, - 94, - 95, - 96, - 96, - 97, - 97, - 98, - 98, - 98, - 98, - 99, - 99, - 100, - 101, - 102, - 102, - 103, - 104, - 104, - 105, - 106, - 106, - 107, - 107, - 107, - 107, - 107, - 107, - 107, - 107, - 107, - 107, - 107, - 108, - 108, - 108, - 109, - 109, - 110, - 111, - 111, - 112, - 113, - 113, - 114, - 114, - 115, - 115, - 116, - 116, - 116, - 117, - 117, - 117, - 117, - 117, - 117, - 117, - 117, - 117, - 117, - 117, - 117, - 118, - 118, - 119, - 119, - 120, - 120, - 120, - 121, - 122, - 123, - 124, - 125, - 125}; +static const yytype_int8 yyr1[] = +{ + 0, 74, 75, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 88, 89, 89, 90, + 91, 92, 92, 93, 93, 94, 94, 94, 94, 95, + 96, 96, 96, 96, 97, 98, 98, 99, 99, 100, + 100, 100, 100, 101, 101, 102, 103, 104, 104, 105, + 106, 106, 107, 108, 108, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 110, 110, 110, 111, + 111, 112, 113, 113, 114, 115, 115, 116, 116, 117, + 117, 118, 118, 118, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 120, 120, 121, 121, + 122, 122, 122, 123, 124, 125, 126, 127, 127 +}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = {0, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 3, - 2, - 2, - 4, - 8, - 1, - 3, - 5, - 8, - 0, - 3, - 6, - 3, - 2, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 5, - 3, - 5, - 1, - 3, - 1, - 1, - 1, - 1, - 0, - 4, - 4, - 5, - 1, - 3, - 3, - 7, - 9, - 2, - 2, - 4, - 3, - 3, - 3, - 3, - 3, - 2, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 2, - 4, - 3, - 3, - 1, - 3, - 1, - 2, - 4, - 3, - 6, - 0, - 2, - 3, - 3, - 3, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 2, - 1, - 2, - 0, - 3, - 1, - 3, - 1, - 2, - 2, - 0, - 7, - 2, - 4, - 0, - 1}; - -enum +static const yytype_int8 yyr2[] = { - YYENOMEM = -2 + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, + 8, 0, 3, 6, 3, 2, 1, 1, 0, 1, + 1, 1, 1, 1, 5, 3, 5, 1, 3, 1, + 1, 1, 1, 0, 4, 4, 5, 1, 3, 3, + 7, 9, 2, 2, 4, 3, 3, 3, 3, 3, + 2, 1, 1, 1, 1, 1, 0, 1, 2, 4, + 3, 3, 1, 3, 1, 2, 4, 3, 6, 0, + 2, 3, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 2, 1, 2, 0, 3, 1, 3, + 1, 2, 2, 0, 7, 2, 4, 0, 1 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK(yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } else { \ - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -2748,131 +986,151 @@ enum the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } else { \ - (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ - } \ - while (0) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* Enable debugging if requested. */ #if YYDEBUG -#ifndef YYFPRINTF -#include /* INFRINGES ON USER NAME SPACE */ -#define YYFPRINTF fprintf -#endif +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -#define YYDPRINTF(Args) \ - do { \ - if (yydebug) \ - YYFPRINTF Args; \ - } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YYLOCATION_PRINT +# ifndef YYLOCATION_PRINT -#if defined YY_LOCATION_PRINT +# if defined YY_LOCATION_PRINT -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) { - res += YYFPRINTF(yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF(yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) { - if (yylocp->first_line < yylocp->last_line) { - res += YYFPRINTF(yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF(yyo, ".%d", end_col); - } else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF(yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } return res; } -#define YYLOCATION_PRINT yy_location_print_ +# define YYLOCATION_PRINT yy_location_print_ -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -#else +# else -#define YYLOCATION_PRINT(File, Loc) ((void)0) -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT YYLOCATION_PRINT +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT -#endif -#endif /* !defined YYLOCATION_PRINT */ +# endif +# endif /* !defined YYLOCATION_PRINT */ + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ - do { \ - if (yydebug) { \ - YYFPRINTF(stderr, "%s ", Title); \ - yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF(stderr, "\n"); \ - } \ - } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { FILE *yyoutput = yyo; - YY_USE(yyoutput); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YYLOCATION_PRINT(yyo, yylocationp); - YYFPRINTF(yyo, ": "); - yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF(yyo, ")"); + YYLOCATION_PRINT (yyo, yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -2880,66 +1138,70 @@ static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *co | TOP (included). | `------------------------------------------------------------------*/ -static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF(stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) { - int yybot = *yybottom; - YYFPRINTF(stderr, " %d", yybot); - } - YYFPRINTF(stderr, "\n"); + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); } -#define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print((Bottom), (Top)); \ - } while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, - ParsedSqlResult *sql_result, void *scanner) +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF(stderr, " $%d = ", yyi + 1); - yy_symbol_print(stderr, - YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), - sql_string, - sql_result, - scanner); - YYFPRINTF(stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); + YYFPRINTF (stderr, "\n"); + } } -#define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ - } while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -#define YYDPRINTF(Args) ((void)0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -#define YY_STACK_PRINT(Bottom, Top) -#define YY_REDUCE_PRINT(Rule) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ + /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -2950,15 +1212,16 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif + /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -2967,59 +1230,69 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default(yyn)) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } + + + #ifndef yystrlen -#if defined __GLIBC__ && defined _STRING_H -#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) -#else +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ -static YYPTRDIFF_T yystrlen(const char *yystr) +static YYPTRDIFF_T +yystrlen (const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -#endif +# endif #endif #ifndef yystpcpy -#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -#define yystpcpy stpcpy -#else +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char *yystpcpy(char *yydest, const char *yysrc) +static char * +yystpcpy (char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -3027,7 +1300,7 @@ static char *yystpcpy(char *yydest, const char *yysrc) return yyd - 1; } -#endif +# endif #endif #ifndef yytnamerr @@ -3038,45 +1311,52 @@ static char *yystpcpy(char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) { - if (*yystr == '"') { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) { - case '\'': - case ',': goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes:; - } + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } if (yyres) - return yystpcpy(yyres, yystr) - yyres; + return yystpcpy (yyres, yystr) - yyres; else - return yystrlen(yystr); + return yystrlen (yystr); } #endif -static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -3103,17 +1383,19 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -3125,12 +1407,11 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) { - enum - { - YYARGS_MAX = 5 - }; + enum { YYARGS_MAX = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -3140,13 +1421,16 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) { -#define YYCASE_(N, S) \ - case N: yyformat = S; break + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -3155,118 +1439,134 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen(yyformat) - 2 * yycount + 1; + yysize = yystrlen (yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) { - YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) { - *yymsg_alloc = 2 * yysize; - if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } else { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } } return 0; } + /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, - const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YY_USE(yyvaluep); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + + + + /*----------. | yyparse. | `----------*/ -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +int +yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - /* Lookahead token kind. */ - int yychar; - - /* The semantic value of the lookahead symbol. */ - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ - YY_INITIAL_VALUE(static YYSTYPE yyval_default;) - YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); - - /* Location data for the lookahead symbol. */ - static YYLTYPE yyloc_default -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = {1, 1, 1, 1} -#endif - ; - YYLTYPE yylloc = yyloc_default; +/* Lookahead token kind. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - /* Number of syntax errors so far. */ - int yynerrs = 0; +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -3282,23 +1582,24 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF((stderr, "Starting parse\n")); + YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -3307,90 +1608,93 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) have just been pushed. So pushing a state here evens the stacks. */ yyssp++; + /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF((stderr, "Entering state %d\n", yystate)); - YY_ASSERT(0 <= yystate && yystate < YYNSTATES); + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST(yy_state_t, yystate); + *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else - { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -#if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow(YY_("memory exhausted"), - &yyss1, - yysize * YYSIZEOF(*yyssp), - &yyvs1, - yysize * YYSIZEOF(*yyvsp), - &yyls1, - yysize * YYSIZEOF(*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -#else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); - if (!yyptr) + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) YYNOMEM; - YYSTACK_RELOCATE(yyss_alloc, yyss); - YYSTACK_RELOCATE(yyvs_alloc, yyvs); - YYSTACK_RELOCATE(yyls_alloc, yyls); -#undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE(yyss1); - } -#endif + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + YYNOMEM; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ @@ -3400,34 +1704,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default(yyn)) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) { - YYDPRINTF((stderr, "Reading a token\n")); - yychar = yylex(&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF((stderr, "Now at end of input.\n")); - } else if (yychar == YYerror) { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { - yytoken = YYTRANSLATE(yychar); - YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -3435,12 +1745,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) { - if (yytable_value_is_error(yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -3448,7 +1759,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3459,6 +1770,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yychar = YYEMPTY; goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -3468,6 +1780,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) goto yyerrlab; goto yyreduce; + /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -3483,164 +1796,177 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1 - yylen]; + yyval = yyvsp[1-yylen]; /* Default location. */ - YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT(yyn); - switch (yyn) { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 223 "yacc_sql.y" + YY_REDUCE_PRINT (yyn); + switch (yyn) { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } -#line 1809 "yacc_sql.cpp" + case 2: /* commands: command_wrapper opt_semicolon */ +#line 226 "yacc_sql.y" + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } +#line 1814 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ -#line 254 "yacc_sql.y" - { + case 24: /* exit_stmt: EXIT */ +#line 257 "yacc_sql.y" + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1818 "yacc_sql.cpp" +#line 1823 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ -#line 260 "yacc_sql.y" - { + case 25: /* help_stmt: HELP */ +#line 263 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1826 "yacc_sql.cpp" +#line 1831 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ -#line 265 "yacc_sql.y" - { + case 26: /* sync_stmt: SYNC */ +#line 268 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1834 "yacc_sql.cpp" +#line 1839 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ -#line 271 "yacc_sql.y" - { + case 27: /* begin_stmt: TRX_BEGIN */ +#line 274 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1842 "yacc_sql.cpp" +#line 1847 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ -#line 277 "yacc_sql.y" - { + case 28: /* commit_stmt: TRX_COMMIT */ +#line 280 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1850 "yacc_sql.cpp" +#line 1855 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ -#line 283 "yacc_sql.y" - { + case 29: /* rollback_stmt: TRX_ROLLBACK */ +#line 286 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1858 "yacc_sql.cpp" +#line 1863 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ -#line 289 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + case 30: /* drop_table_stmt: DROP TABLE ID */ +#line 292 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1868 "yacc_sql.cpp" +#line 1873 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ -#line 296 "yacc_sql.y" - { + case 31: /* show_tables_stmt: SHOW TABLES */ +#line 299 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1876 "yacc_sql.cpp" +#line 1881 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ -#line 302 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + case 32: /* desc_table_stmt: DESC ID */ +#line 305 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1886 "yacc_sql.cpp" +#line 1891 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 311 "yacc_sql.y" + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ +#line 314 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1897 "yacc_sql.cpp" +#line 1902 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 321 "yacc_sql.y" + case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ +#line 324 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $7 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1912 "yacc_sql.cpp" +#line 1918 "yacc_sql.cpp" break; - case 35: /* attr_list: ID */ -#line 335 "yacc_sql.y" + case 35: /* opt_unique: UNIQUE */ +#line 338 "yacc_sql.y" + { (yyval.unique) = true; } +#line 1924 "yacc_sql.cpp" + break; + + case 36: /* opt_unique: %empty */ +#line 339 "yacc_sql.y" + { (yyval.unique) = false; } +#line 1930 "yacc_sql.cpp" + break; + + case 37: /* attr_list: ID */ +#line 344 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1922 "yacc_sql.cpp" +#line 1940 "yacc_sql.cpp" break; - case 36: /* attr_list: ID COMMA attr_list */ -#line 341 "yacc_sql.y" + case 38: /* attr_list: ID COMMA attr_list */ +#line 350 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list) - ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 1932 "yacc_sql.cpp" +#line 1950 "yacc_sql.cpp" break; - case 37: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 350 "yacc_sql.y" + case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ +#line 359 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1944 "yacc_sql.cpp" +#line 1962 "yacc_sql.cpp" break; - case 38: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 360 "yacc_sql.y" + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ +#line 369 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-5].string); + create_table.relation_name = (yyvsp[-5].string); free((yyvsp[-5].string)); std::vector *src_attrs = (yyvsp[-2].attr_infos); @@ -3657,19 +1983,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); } } -#line 1969 "yacc_sql.cpp" +#line 1987 "yacc_sql.cpp" break; - case 39: /* attr_def_list: %empty */ -#line 383 "yacc_sql.y" + case 41: /* attr_def_list: %empty */ +#line 392 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1977 "yacc_sql.cpp" +#line 1995 "yacc_sql.cpp" break; - case 40: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 387 "yacc_sql.y" + case 42: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 396 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -3679,29 +2005,29 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 1991 "yacc_sql.cpp" +#line 2009 "yacc_sql.cpp" break; - case 41: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 400 "yacc_sql.y" + case 43: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ +#line 409 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; } free((yyvsp[-5].string)); } -#line 2007 "yacc_sql.cpp" +#line 2025 "yacc_sql.cpp" break; - case 42: /* attr_def: ID type nullable_constraint */ -#line 412 "yacc_sql.y" + case 44: /* attr_def: ID type nullable_constraint */ +#line 421 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -3721,85 +2047,75 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2033 "yacc_sql.cpp" +#line 2051 "yacc_sql.cpp" break; - case 43: /* nullable_constraint: NOT NULL_T */ -#line 437 "yacc_sql.y" + case 45: /* nullable_constraint: NOT NULL_T */ +#line 446 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2041 "yacc_sql.cpp" +#line 2059 "yacc_sql.cpp" break; - case 44: /* nullable_constraint: NULLABLE */ -#line 441 "yacc_sql.y" + case 46: /* nullable_constraint: NULLABLE */ +#line 450 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2049 "yacc_sql.cpp" +#line 2067 "yacc_sql.cpp" break; - case 45: /* nullable_constraint: NULL_T */ -#line 445 "yacc_sql.y" + case 47: /* nullable_constraint: NULL_T */ +#line 454 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2057 "yacc_sql.cpp" +#line 2075 "yacc_sql.cpp" break; - case 46: /* nullable_constraint: %empty */ -#line 449 "yacc_sql.y" + case 48: /* nullable_constraint: %empty */ +#line 458 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 2065 "yacc_sql.cpp" +#line 2083 "yacc_sql.cpp" break; - case 47: /* number: NUMBER */ -#line 455 "yacc_sql.y" - { - (yyval.number) = (yyvsp[0].number); - } -#line 2071 "yacc_sql.cpp" + case 49: /* number: NUMBER */ +#line 464 "yacc_sql.y" + {(yyval.number) = (yyvsp[0].number);} +#line 2089 "yacc_sql.cpp" break; - case 48: /* type: INT_T */ -#line 458 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::INTS); - } -#line 2077 "yacc_sql.cpp" + case 50: /* type: INT_T */ +#line 467 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::INTS); } +#line 2095 "yacc_sql.cpp" break; - case 49: /* type: STRING_T */ -#line 459 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::CHARS); - } -#line 2083 "yacc_sql.cpp" + case 51: /* type: STRING_T */ +#line 468 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::CHARS); } +#line 2101 "yacc_sql.cpp" break; - case 50: /* type: FLOAT_T */ -#line 460 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::FLOATS); - } -#line 2089 "yacc_sql.cpp" + case 52: /* type: FLOAT_T */ +#line 469 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::FLOATS); } +#line 2107 "yacc_sql.cpp" break; - case 51: /* type: DATE_T */ -#line 461 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::DATES); - } -#line 2095 "yacc_sql.cpp" + case 53: /* type: DATE_T */ +#line 470 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 2113 "yacc_sql.cpp" break; - case 52: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 466 "yacc_sql.y" + case 54: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 475 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -3807,117 +2123,117 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2109 "yacc_sql.cpp" +#line 2127 "yacc_sql.cpp" break; - case 53: /* values_list: LBRACE value_list RBRACE */ -#line 479 "yacc_sql.y" + case 55: /* values_list: LBRACE value_list RBRACE */ +#line 488 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2119 "yacc_sql.cpp" +#line 2137 "yacc_sql.cpp" break; - case 54: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 485 "yacc_sql.y" + case 56: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 494 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2128 "yacc_sql.cpp" +#line 2146 "yacc_sql.cpp" break; - case 55: /* value_list: value */ -#line 492 "yacc_sql.y" + case 57: /* value_list: value */ +#line 501 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2138 "yacc_sql.cpp" +#line 2156 "yacc_sql.cpp" break; - case 56: /* value_list: value_list COMMA value */ -#line 498 "yacc_sql.y" + case 58: /* value_list: value_list COMMA value */ +#line 507 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2147 "yacc_sql.cpp" +#line 2165 "yacc_sql.cpp" break; - case 57: /* value: NUMBER */ -#line 505 "yacc_sql.y" - { + case 59: /* value: NUMBER */ +#line 514 "yacc_sql.y" + { (yyval.value) = new Value((int)(yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2156 "yacc_sql.cpp" +#line 2174 "yacc_sql.cpp" break; - case 58: /* value: FLOAT */ -#line 509 "yacc_sql.y" - { + case 60: /* value: FLOAT */ +#line 518 "yacc_sql.y" + { (yyval.value) = new Value((float)(yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2165 "yacc_sql.cpp" +#line 2183 "yacc_sql.cpp" break; - case 59: /* value: SSS */ -#line 513 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); + case 61: /* value: SSS */ +#line 522 "yacc_sql.y" + { + char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2176 "yacc_sql.cpp" +#line 2194 "yacc_sql.cpp" break; - case 60: /* value: NULL_T */ -#line 519 "yacc_sql.y" - { + case 62: /* value: NULL_T */ +#line 528 "yacc_sql.y" + { (yyval.value) = new Value(NullValue()); } -#line 2184 "yacc_sql.cpp" +#line 2202 "yacc_sql.cpp" break; - case 61: /* storage_format: %empty */ -#line 526 "yacc_sql.y" + case 63: /* storage_format: %empty */ +#line 535 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2192 "yacc_sql.cpp" +#line 2210 "yacc_sql.cpp" break; - case 62: /* storage_format: STORAGE FORMAT EQ ID */ -#line 530 "yacc_sql.y" + case 64: /* storage_format: STORAGE FORMAT EQ ID */ +#line 539 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2200 "yacc_sql.cpp" +#line 2218 "yacc_sql.cpp" break; - case 63: /* delete_stmt: DELETE FROM ID where */ -#line 537 "yacc_sql.y" + case 65: /* delete_stmt: DELETE FROM ID where */ +#line 546 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); } free((yyvsp[-1].string)); } -#line 2213 "yacc_sql.cpp" +#line 2231 "yacc_sql.cpp" break; - case 64: /* update_stmt: UPDATE ID SET setClauses where */ -#line 549 "yacc_sql.y" + case 66: /* update_stmt: UPDATE ID SET setClauses where */ +#line 558 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -3926,41 +2242,41 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2228 "yacc_sql.cpp" +#line 2246 "yacc_sql.cpp" break; - case 65: /* setClauses: setClause */ -#line 563 "yacc_sql.y" + case 67: /* setClauses: setClause */ +#line 572 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2238 "yacc_sql.cpp" +#line 2256 "yacc_sql.cpp" break; - case 66: /* setClauses: setClauses COMMA setClause */ -#line 569 "yacc_sql.y" + case 68: /* setClauses: setClauses COMMA setClause */ +#line 578 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2247 "yacc_sql.cpp" +#line 2265 "yacc_sql.cpp" break; - case 67: /* setClause: ID EQ value */ -#line 577 "yacc_sql.y" + case 69: /* setClause: ID EQ value */ +#line 586 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); + (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } -#line 2258 "yacc_sql.cpp" +#line 2276 "yacc_sql.cpp" break; - case 68: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 587 "yacc_sql.y" + case 70: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ +#line 596 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-5].expression_list) != nullptr) { @@ -3989,11 +2305,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].orderby_list); } } -#line 2291 "yacc_sql.cpp" +#line 2309 "yacc_sql.cpp" break; - case 69: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 616 "yacc_sql.y" + case 71: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 625 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4007,8 +2323,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); - ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -4016,8 +2331,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -4025,21 +2339,21 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2325 "yacc_sql.cpp" +#line 2343 "yacc_sql.cpp" break; - case 70: /* calc_stmt: CALC expression_list */ -#line 649 "yacc_sql.y" + case 72: /* calc_stmt: CALC expression_list */ +#line 658 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2335 "yacc_sql.cpp" +#line 2353 "yacc_sql.cpp" break; - case 71: /* expression_list: expression alias */ -#line 658 "yacc_sql.y" + case 73: /* expression_list: expression alias */ +#line 667 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4048,11 +2362,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2348 "yacc_sql.cpp" +#line 2366 "yacc_sql.cpp" break; - case 72: /* expression_list: expression alias COMMA expression_list */ -#line 667 "yacc_sql.y" + case 74: /* expression_list: expression alias COMMA expression_list */ +#line 676 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4062,51 +2376,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2365 "yacc_sql.cpp" +#line 2383 "yacc_sql.cpp" break; - case 73: /* expression: expression '+' expression */ -#line 682 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 75: /* expression: expression '+' expression */ +#line 691 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2373 "yacc_sql.cpp" +#line 2391 "yacc_sql.cpp" break; - case 74: /* expression: expression '-' expression */ -#line 685 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 76: /* expression: expression '-' expression */ +#line 694 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2381 "yacc_sql.cpp" +#line 2399 "yacc_sql.cpp" break; - case 75: /* expression: expression '*' expression */ -#line 688 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 77: /* expression: expression '*' expression */ +#line 697 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2389 "yacc_sql.cpp" +#line 2407 "yacc_sql.cpp" break; - case 76: /* expression: expression '/' expression */ -#line 691 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 78: /* expression: expression '/' expression */ +#line 700 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2397 "yacc_sql.cpp" +#line 2415 "yacc_sql.cpp" break; - case 77: /* expression: LBRACE expression_list RBRACE */ -#line 694 "yacc_sql.y" - { + case 79: /* expression: LBRACE expression_list RBRACE */ +#line 703 "yacc_sql.y" + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -4115,454 +2425,426 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2411 "yacc_sql.cpp" +#line 2429 "yacc_sql.cpp" break; - case 78: /* expression: '-' expression */ -#line 703 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + case 80: /* expression: '-' expression */ +#line 712 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2419 "yacc_sql.cpp" +#line 2437 "yacc_sql.cpp" break; - case 79: /* expression: value */ -#line 706 "yacc_sql.y" - { + case 81: /* expression: value */ +#line 715 "yacc_sql.y" + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2429 "yacc_sql.cpp" +#line 2447 "yacc_sql.cpp" break; - case 80: /* expression: rel_attr */ -#line 711 "yacc_sql.y" - { + case 82: /* expression: rel_attr */ +#line 720 "yacc_sql.y" + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2440 "yacc_sql.cpp" +#line 2458 "yacc_sql.cpp" break; - case 81: /* expression: '*' */ -#line 717 "yacc_sql.y" - { + case 83: /* expression: '*' */ +#line 726 "yacc_sql.y" + { (yyval.expression) = new StarExpr(); } -#line 2448 "yacc_sql.cpp" +#line 2466 "yacc_sql.cpp" break; - case 82: /* expression: aggr_func_expr */ -#line 720 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + case 84: /* expression: aggr_func_expr */ +#line 729 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2456 "yacc_sql.cpp" +#line 2474 "yacc_sql.cpp" break; - case 83: /* expression: sub_query_expr */ -#line 723 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + case 85: /* expression: sub_query_expr */ +#line 732 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2464 "yacc_sql.cpp" +#line 2482 "yacc_sql.cpp" break; - case 84: /* alias: %empty */ -#line 730 "yacc_sql.y" - { + case 86: /* alias: %empty */ +#line 739 "yacc_sql.y" + { (yyval.string) = nullptr; } -#line 2472 "yacc_sql.cpp" +#line 2490 "yacc_sql.cpp" break; - case 85: /* alias: ID */ -#line 733 "yacc_sql.y" - { + case 87: /* alias: ID */ +#line 742 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2480 "yacc_sql.cpp" +#line 2498 "yacc_sql.cpp" break; - case 86: /* alias: AS ID */ -#line 736 "yacc_sql.y" - { + case 88: /* alias: AS ID */ +#line 745 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2488 "yacc_sql.cpp" +#line 2506 "yacc_sql.cpp" break; - case 87: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 742 "yacc_sql.y" + case 89: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 751 "yacc_sql.y" { - if ((*(yyvsp[-1].expression_list)).size() != 1) { - (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); - } else { - (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); - } + if((*(yyvsp[-1].expression_list)).size() != 1) { + (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); + } else { + (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); + } } -#line 2500 "yacc_sql.cpp" +#line 2518 "yacc_sql.cpp" break; - case 88: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 750 "yacc_sql.y" - { - (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); - } -#line 2508 "yacc_sql.cpp" + case 90: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 759 "yacc_sql.y" + { + (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); + } +#line 2526 "yacc_sql.cpp" break; - case 89: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 757 "yacc_sql.y" + case 91: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 766 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2516 "yacc_sql.cpp" +#line 2534 "yacc_sql.cpp" break; - case 90: /* rel_attr: ID */ -#line 763 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 92: /* rel_attr: ID */ +#line 772 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2526 "yacc_sql.cpp" +#line 2544 "yacc_sql.cpp" break; - case 91: /* rel_attr: ID DOT ID */ -#line 768 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 93: /* rel_attr: ID DOT ID */ +#line 777 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2538 "yacc_sql.cpp" +#line 2556 "yacc_sql.cpp" break; - case 92: /* relation: ID */ -#line 778 "yacc_sql.y" - { + case 94: /* relation: ID */ +#line 787 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2546 "yacc_sql.cpp" +#line 2564 "yacc_sql.cpp" break; - case 93: /* rel_list: relation alias */ -#line 784 "yacc_sql.y" - { + case 95: /* rel_list: relation alias */ +#line 793 "yacc_sql.y" + { (yyval.relation_list) = new std::vector(); - if (nullptr != (yyvsp[0].string)) { - (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); free((yyvsp[0].string)); - } else { + }else{ (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); } -#line 2561 "yacc_sql.cpp" +#line 2579 "yacc_sql.cpp" break; - case 94: /* rel_list: relation alias COMMA rel_list */ -#line 794 "yacc_sql.y" - { + case 96: /* rel_list: relation alias COMMA rel_list */ +#line 803 "yacc_sql.y" + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if (nullptr != (yyvsp[-2].string)) { - (yyval.relation_list) - ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); free((yyvsp[-2].string)); - } else { + }else{ (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); } -#line 2580 "yacc_sql.cpp" +#line 2598 "yacc_sql.cpp" break; - case 95: /* joinClauses: relation ON condition */ -#line 812 "yacc_sql.y" + case 97: /* joinClauses: relation ON condition */ +#line 821 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2591 "yacc_sql.cpp" +#line 2609 "yacc_sql.cpp" break; - case 96: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 819 "yacc_sql.y" + case 98: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 828 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2603 "yacc_sql.cpp" +#line 2621 "yacc_sql.cpp" break; - case 97: /* where: %empty */ -#line 830 "yacc_sql.y" + case 99: /* where: %empty */ +#line 839 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2611 "yacc_sql.cpp" +#line 2629 "yacc_sql.cpp" break; - case 98: /* where: WHERE condition */ -#line 833 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + case 100: /* where: WHERE condition */ +#line 842 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); } -#line 2619 "yacc_sql.cpp" +#line 2637 "yacc_sql.cpp" break; - case 99: /* condition: expression comp_op expression */ -#line 840 "yacc_sql.y" + case 101: /* condition: expression comp_op expression */ +#line 849 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2627 "yacc_sql.cpp" - break; - - case 100: /* condition: condition AND condition */ -#line 844 "yacc_sql.y" - { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); - } -#line 2635 "yacc_sql.cpp" +#line 2645 "yacc_sql.cpp" break; - case 101: /* condition: condition OR condition */ -#line 848 "yacc_sql.y" + case 102: /* condition: condition AND condition */ +#line 853 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2643 "yacc_sql.cpp" +#line 2653 "yacc_sql.cpp" break; - case 102: /* comp_op: EQ */ -#line 854 "yacc_sql.y" - { - (yyval.comp) = EQUAL_TO; - } -#line 2649 "yacc_sql.cpp" - break; - - case 103: /* comp_op: LT */ -#line 855 "yacc_sql.y" - { - (yyval.comp) = LESS_THAN; - } -#line 2655 "yacc_sql.cpp" - break; - - case 104: /* comp_op: GT */ -#line 856 "yacc_sql.y" + case 103: /* condition: condition OR condition */ +#line 857 "yacc_sql.y" { - (yyval.comp) = GREAT_THAN; + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2661 "yacc_sql.cpp" break; - case 105: /* comp_op: LE */ -#line 857 "yacc_sql.y" - { - (yyval.comp) = LESS_EQUAL; - } + case 104: /* comp_op: EQ */ +#line 863 "yacc_sql.y" + { (yyval.comp) = EQUAL_TO; } #line 2667 "yacc_sql.cpp" break; - case 106: /* comp_op: GE */ -#line 858 "yacc_sql.y" - { - (yyval.comp) = GREAT_EQUAL; - } + case 105: /* comp_op: LT */ +#line 864 "yacc_sql.y" + { (yyval.comp) = LESS_THAN; } #line 2673 "yacc_sql.cpp" break; - case 107: /* comp_op: NE */ -#line 859 "yacc_sql.y" - { - (yyval.comp) = NOT_EQUAL; - } + case 106: /* comp_op: GT */ +#line 865 "yacc_sql.y" + { (yyval.comp) = GREAT_THAN; } #line 2679 "yacc_sql.cpp" break; - case 108: /* comp_op: IS */ -#line 860 "yacc_sql.y" - { - (yyval.comp) = OP_IS; - } + case 107: /* comp_op: LE */ +#line 866 "yacc_sql.y" + { (yyval.comp) = LESS_EQUAL; } #line 2685 "yacc_sql.cpp" break; - case 109: /* comp_op: IS NOT */ -#line 861 "yacc_sql.y" - { - (yyval.comp) = OP_IS_NOT; - } + case 108: /* comp_op: GE */ +#line 867 "yacc_sql.y" + { (yyval.comp) = GREAT_EQUAL; } #line 2691 "yacc_sql.cpp" break; - case 110: /* comp_op: LIKE */ -#line 862 "yacc_sql.y" - { - (yyval.comp) = LIKE_OP; - } + case 109: /* comp_op: NE */ +#line 868 "yacc_sql.y" + { (yyval.comp) = NOT_EQUAL; } #line 2697 "yacc_sql.cpp" break; - case 111: /* comp_op: NOT LIKE */ -#line 863 "yacc_sql.y" - { - (yyval.comp) = NOT_LIKE_OP; - } + case 110: /* comp_op: IS */ +#line 869 "yacc_sql.y" + { (yyval.comp) = OP_IS; } #line 2703 "yacc_sql.cpp" break; - case 112: /* comp_op: IN */ -#line 864 "yacc_sql.y" - { - (yyval.comp) = IN_OP; - } + case 111: /* comp_op: IS NOT */ +#line 870 "yacc_sql.y" + { (yyval.comp) = OP_IS_NOT; } #line 2709 "yacc_sql.cpp" break; - case 113: /* comp_op: NOT IN */ -#line 865 "yacc_sql.y" - { - (yyval.comp) = NOT_IN_OP; - } + case 112: /* comp_op: LIKE */ +#line 871 "yacc_sql.y" + { (yyval.comp) = LIKE_OP;} #line 2715 "yacc_sql.cpp" break; - case 114: /* opt_order_by: %empty */ -#line 870 "yacc_sql.y" + case 113: /* comp_op: NOT LIKE */ +#line 872 "yacc_sql.y" + {(yyval.comp) = NOT_LIKE_OP;} +#line 2721 "yacc_sql.cpp" + break; + + case 114: /* comp_op: IN */ +#line 873 "yacc_sql.y" + { (yyval.comp) = IN_OP; } +#line 2727 "yacc_sql.cpp" + break; + + case 115: /* comp_op: NOT IN */ +#line 874 "yacc_sql.y" + { (yyval.comp) = NOT_IN_OP; } +#line 2733 "yacc_sql.cpp" + break; + + case 116: /* opt_order_by: %empty */ +#line 879 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2723 "yacc_sql.cpp" +#line 2741 "yacc_sql.cpp" break; - case 115: /* opt_order_by: ORDER BY sort_list */ -#line 874 "yacc_sql.y" + case 117: /* opt_order_by: ORDER BY sort_list */ +#line 883 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2732 "yacc_sql.cpp" +#line 2750 "yacc_sql.cpp" break; - case 116: /* sort_list: sort_unit */ -#line 882 "yacc_sql.y" - { + case 118: /* sort_list: sort_unit */ +#line 891 "yacc_sql.y" + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } -#line 2741 "yacc_sql.cpp" + } +#line 2759 "yacc_sql.cpp" break; - case 117: /* sort_list: sort_unit COMMA sort_list */ -#line 887 "yacc_sql.y" - { + case 119: /* sort_list: sort_unit COMMA sort_list */ +#line 896 "yacc_sql.y" + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } -#line 2750 "yacc_sql.cpp" + } +#line 2768 "yacc_sql.cpp" break; - case 118: /* sort_unit: expression */ -#line 895 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + case 120: /* sort_unit: expression */ +#line 904 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2760 "yacc_sql.cpp" + } +#line 2778 "yacc_sql.cpp" break; - case 119: /* sort_unit: expression DESC */ -#line 901 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 121: /* sort_unit: expression DESC */ +#line 910 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } -#line 2770 "yacc_sql.cpp" + } +#line 2788 "yacc_sql.cpp" break; - case 120: /* sort_unit: expression ASC */ -#line 907 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 122: /* sort_unit: expression ASC */ +#line 916 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2780 "yacc_sql.cpp" + } +#line 2798 "yacc_sql.cpp" break; - case 121: /* group_by: %empty */ -#line 916 "yacc_sql.y" + case 123: /* group_by: %empty */ +#line 925 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2788 "yacc_sql.cpp" +#line 2806 "yacc_sql.cpp" break; - case 122: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 922 "yacc_sql.y" + case 124: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 931 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2802 "yacc_sql.cpp" +#line 2820 "yacc_sql.cpp" break; - case 123: /* explain_stmt: EXPLAIN command_wrapper */ -#line 935 "yacc_sql.y" + case 125: /* explain_stmt: EXPLAIN command_wrapper */ +#line 944 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2811 "yacc_sql.cpp" +#line 2829 "yacc_sql.cpp" break; - case 124: /* set_variable_stmt: SET ID EQ value */ -#line 943 "yacc_sql.y" + case 126: /* set_variable_stmt: SET ID EQ value */ +#line 952 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2823 "yacc_sql.cpp" +#line 2841 "yacc_sql.cpp" break; -#line 2827 "yacc_sql.cpp" - default: break; - } +#line 2845 "yacc_sql.cpp" + + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -4574,9 +2856,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; @@ -4587,67 +2869,84 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) { - ++yynerrs; - { - yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) { - if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); - yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); - if (yymsg) { - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } - yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; } - } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } else { - yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; + } } - } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; + /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -4660,40 +2959,45 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) { - yyn = yypact[yystate]; - if (!yypact_value_is_default(yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - yystate = *yyssp; - YY_STACK_PRINT(yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -4701,14 +3005,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; + /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -4716,6 +3021,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 0; goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -4723,48 +3029,53 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 1; goto yyreturnlab; + /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; + /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE(yychar); - yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK(yylen); - YY_STACK_PRINT(yyss, yyssp); - while (yyssp != yyss) { - yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - } + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE(yyss); + YYSTACK_FREE (yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); + YYSTACK_FREE (yymsg); return yyresult; } -#line 955 "yacc_sql.y" +#line 964 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) -{ +int sql_parse(const char *s, ParsedSqlResult *sql_result) { yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 6f2bae58..d32430f9 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -#define YY_YY_YACC_SQL_HPP_INCLUDED +# define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -#define YYDEBUG 0 +# define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,121 +47,124 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -#define YYTOKENTYPE -enum yytokentype -{ - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - ORDER = 266, /* ORDER */ - TABLE = 267, /* TABLE */ - TABLES = 268, /* TABLES */ - INDEX = 269, /* INDEX */ - CALC = 270, /* CALC */ - SELECT = 271, /* SELECT */ - DESC = 272, /* DESC */ - SHOW = 273, /* SHOW */ - SYNC = 274, /* SYNC */ - INSERT = 275, /* INSERT */ - DELETE = 276, /* DELETE */ - UPDATE = 277, /* UPDATE */ - LBRACE = 278, /* LBRACE */ - RBRACE = 279, /* RBRACE */ - COMMA = 280, /* COMMA */ - TRX_BEGIN = 281, /* TRX_BEGIN */ - TRX_COMMIT = 282, /* TRX_COMMIT */ - TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ - INT_T = 284, /* INT_T */ - IN = 285, /* IN */ - STRING_T = 286, /* STRING_T */ - FLOAT_T = 287, /* FLOAT_T */ - DATE_T = 288, /* DATE_T */ - NOT = 289, /* NOT */ - NULL_T = 290, /* NULL_T */ - NULLABLE = 291, /* NULLABLE */ - HELP = 292, /* HELP */ - EXIT = 293, /* EXIT */ - DOT = 294, /* DOT */ - INTO = 295, /* INTO */ - VALUES = 296, /* VALUES */ - FROM = 297, /* FROM */ - WHERE = 298, /* WHERE */ - AND = 299, /* AND */ - OR = 300, /* OR */ - SET = 301, /* SET */ - ON = 302, /* ON */ - LOAD = 303, /* LOAD */ - DATA = 304, /* DATA */ - INFILE = 305, /* INFILE */ - EXPLAIN = 306, /* EXPLAIN */ - STORAGE = 307, /* STORAGE */ - FORMAT = 308, /* FORMAT */ - INNER = 309, /* INNER */ - JOIN = 310, /* JOIN */ - EQ = 311, /* EQ */ - LT = 312, /* LT */ - GT = 313, /* GT */ - LE = 314, /* LE */ - GE = 315, /* GE */ - NE = 316, /* NE */ - LIKE = 317, /* LIKE */ - IS = 318, /* IS */ - NUMBER = 319, /* NUMBER */ - FLOAT = 320, /* FLOAT */ - ID = 321, /* ID */ - SSS = 322, /* SSS */ - UMINUS = 323 /* UMINUS */ -}; -typedef enum yytokentype yytoken_kind_t; +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + ORDER = 266, /* ORDER */ + TABLE = 267, /* TABLE */ + TABLES = 268, /* TABLES */ + INDEX = 269, /* INDEX */ + CALC = 270, /* CALC */ + SELECT = 271, /* SELECT */ + DESC = 272, /* DESC */ + SHOW = 273, /* SHOW */ + SYNC = 274, /* SYNC */ + INSERT = 275, /* INSERT */ + DELETE = 276, /* DELETE */ + UPDATE = 277, /* UPDATE */ + LBRACE = 278, /* LBRACE */ + RBRACE = 279, /* RBRACE */ + COMMA = 280, /* COMMA */ + TRX_BEGIN = 281, /* TRX_BEGIN */ + TRX_COMMIT = 282, /* TRX_COMMIT */ + TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ + INT_T = 284, /* INT_T */ + IN = 285, /* IN */ + STRING_T = 286, /* STRING_T */ + FLOAT_T = 287, /* FLOAT_T */ + DATE_T = 288, /* DATE_T */ + NOT = 289, /* NOT */ + UNIQUE = 290, /* UNIQUE */ + NULL_T = 291, /* NULL_T */ + NULLABLE = 292, /* NULLABLE */ + HELP = 293, /* HELP */ + EXIT = 294, /* EXIT */ + DOT = 295, /* DOT */ + INTO = 296, /* INTO */ + VALUES = 297, /* VALUES */ + FROM = 298, /* FROM */ + WHERE = 299, /* WHERE */ + AND = 300, /* AND */ + OR = 301, /* OR */ + SET = 302, /* SET */ + ON = 303, /* ON */ + LOAD = 304, /* LOAD */ + DATA = 305, /* DATA */ + INFILE = 306, /* INFILE */ + EXPLAIN = 307, /* EXPLAIN */ + STORAGE = 308, /* STORAGE */ + FORMAT = 309, /* FORMAT */ + INNER = 310, /* INNER */ + JOIN = 311, /* JOIN */ + EQ = 312, /* EQ */ + LT = 313, /* LT */ + GT = 314, /* GT */ + LE = 315, /* LE */ + GE = 316, /* GE */ + NE = 317, /* NE */ + LIKE = 318, /* LIKE */ + IS = 319, /* IS */ + NUMBER = 320, /* NUMBER */ + FLOAT = 321, /* FLOAT */ + ID = 322, /* ID */ + SSS = 323, /* SSS */ + UMINUS = 324 /* UMINUS */ + }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 130 "yacc_sql.y" - - ParsedSqlNode *sql_node; - Value *value; - enum CompOp comp; - RelAttrSqlNode *rel_attr; - std::vector *attr_infos; - AttrInfoSqlNode *attr_info; - Expression *expression; - std::vector> *expression_list; - std::vector *value_list; - std::vector> *values_list; - SetClauseSqlNode *set_clause; - std::vector *set_clauses; - JoinSqlNode *join_clauses; - std::vector *rel_attr_list; - std::vector *relation_list; - OrderBySqlNode *orderby_unit; - std::vector *orderby_list; - char *string; - int number; - float floats; - bool nullable_info; - std::vector *index_attr_list; - -#line 157 "yacc_sql.hpp" +#line 131 "yacc_sql.y" + + ParsedSqlNode * sql_node; + Value * value; + enum CompOp comp; + RelAttrSqlNode * rel_attr; + std::vector * attr_infos; + AttrInfoSqlNode * attr_info; + Expression * expression; + std::vector> * expression_list; + std::vector * value_list; + std::vector> * values_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; + JoinSqlNode * join_clauses; + std::vector * rel_attr_list; + std::vector * relation_list; + OrderBySqlNode * orderby_unit; + std::vector * orderby_list; + char * string; + int number; + float floats; + bool nullable_info; + std::vector * index_attr_list; + bool unique; + +#line 159 "yacc_sql.hpp" + }; typedef union YYSTYPE YYSTYPE; -#define YYSTYPE_IS_TRIVIAL 1 -#define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -170,10 +173,14 @@ struct YYLTYPE int last_line; int last_column; }; -#define YYLTYPE_IS_DECLARED 1 -#define YYLTYPE_IS_TRIVIAL 1 +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 #endif -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); + + + +int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); + #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index f52338aa..eba4678c 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -96,6 +96,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, FLOAT_T DATE_T NOT + UNIQUE NULL_T NULLABLE HELP @@ -150,6 +151,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, float floats; bool nullable_info; std::vector * index_attr_list; + bool unique; } %token NUMBER @@ -187,6 +189,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, %type sort_list %type opt_order_by %type attr_list +%type opt_unique %type calc_stmt %type select_stmt %type insert_stmt @@ -317,19 +320,25 @@ show_index_stmt: ; create_index_stmt: - CREATE INDEX ID ON ID LBRACE attr_list RBRACE + CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE { $$ = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = $$->create_index; - create_index.index_name = $3; - create_index.relation_name = $5; - create_index.attribute_name.swap(*$7); // $7 是 vector 类型 - delete $7; // 释放指针 - free($3); - free($5); + create_index.unique = $2; // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = $4; + create_index.relation_name = $6; + create_index.attribute_name.swap(*$8); // $8 是 vector 类型 + delete $8; // 释放指针 + free($4); + free($6); } ; +opt_unique: + UNIQUE { $$ = true; } + | /* 空 */ { $$ = false; } + ; + attr_list: ID { From f4f156f8d8b4b9182cbcd6689367fe4f5a6ae6d5 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 3 Oct 2024 21:01:32 +0800 Subject: [PATCH 108/308] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=B4=A2=E5=BC=95?= =?UTF-8?q?=E5=85=83=E6=95=B0=E6=8D=AE=E7=9A=84UNIQUE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/executor/create_index_executor.cpp | 2 +- src/observer/sql/stmt/create_index_stmt.cpp | 2 +- src/observer/sql/stmt/create_index_stmt.h | 6 ++++-- src/observer/storage/index/index_meta.cpp | 5 ++++- src/observer/storage/index/index_meta.h | 4 +++- src/observer/storage/table/table.cpp | 4 ++-- src/observer/storage/table/table.h | 2 +- 7 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/observer/sql/executor/create_index_executor.cpp b/src/observer/sql/executor/create_index_executor.cpp index 6c99dda0..6550b395 100644 --- a/src/observer/sql/executor/create_index_executor.cpp +++ b/src/observer/sql/executor/create_index_executor.cpp @@ -32,5 +32,5 @@ RC CreateIndexExecutor::execute(SQLStageEvent *sql_event) Trx *trx = session->current_trx(); Table *table = create_index_stmt->table(); - return table->create_index(trx, create_index_stmt->field_meta(), create_index_stmt->index_name().c_str()); + return table->create_index(trx, create_index_stmt->field_meta(), create_index_stmt->index_name().c_str(), create_index_stmt->unique()); } \ No newline at end of file diff --git a/src/observer/sql/stmt/create_index_stmt.cpp b/src/observer/sql/stmt/create_index_stmt.cpp index 289b12e3..35e09c6d 100644 --- a/src/observer/sql/stmt/create_index_stmt.cpp +++ b/src/observer/sql/stmt/create_index_stmt.cpp @@ -53,6 +53,6 @@ RC CreateIndexStmt::create(Db *db, const CreateIndexSqlNode &create_index, Stmt return RC::SCHEMA_INDEX_NAME_REPEAT; } - stmt = new CreateIndexStmt(table, field_metas, create_index.index_name); + stmt = new CreateIndexStmt(table, field_metas, create_index.index_name, create_index.unique); return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/create_index_stmt.h b/src/observer/sql/stmt/create_index_stmt.h index cac4850d..03e4c8d7 100644 --- a/src/observer/sql/stmt/create_index_stmt.h +++ b/src/observer/sql/stmt/create_index_stmt.h @@ -30,8 +30,8 @@ class FieldMeta; class CreateIndexStmt : public Stmt { public: - CreateIndexStmt(Table *table, const vector &field_meta, const std::string &index_name) - : table_(table), field_meta_(field_meta), index_name_(index_name) + CreateIndexStmt(Table *table, const vector &field_meta, const std::string &index_name, bool unique) + : table_(table), field_meta_(field_meta), index_name_(index_name), unique_(unique) {} virtual ~CreateIndexStmt() = default; @@ -41,6 +41,7 @@ class CreateIndexStmt : public Stmt Table *table() const { return table_; } const vector &field_meta() const { return field_meta_; } const std::string &index_name() const { return index_name_; } + bool unique() const { return unique_; } public: static RC create(Db *db, const CreateIndexSqlNode &create_index, Stmt *&stmt); @@ -49,4 +50,5 @@ class CreateIndexStmt : public Stmt Table *table_ = nullptr; vector field_meta_; std::string index_name_; + bool unique_; }; diff --git a/src/observer/storage/index/index_meta.cpp b/src/observer/storage/index/index_meta.cpp index be02d61c..393c4274 100644 --- a/src/observer/storage/index/index_meta.cpp +++ b/src/observer/storage/index/index_meta.cpp @@ -10,11 +10,12 @@ See the Mulan PSL v2 for more details. */ #include "index_meta.h" -RC IndexMeta::init(const char *name, const vector &fields) +RC IndexMeta::init(const char *name, const vector &fields, bool unique) { name_ = name; fields_total_len_ = 0; fields_ = fields; + unique_ = unique; for (auto &field : fields) { fields_offset_.emplace_back(fields_total_len_); @@ -42,6 +43,7 @@ void IndexMeta::to_json(Json::Value &json_value) const { json_value["name"] = name_; json_value["fields_total_len"] = fields_total_len_; + json_value["unique"] = unique_; Json::Value fields_json(Json::arrayValue); for (const auto &field : fields_) { @@ -67,6 +69,7 @@ RC IndexMeta::from_json(const Json::Value &json_value, IndexMeta &index) index.name_ = json_value["name"].asString(); index.fields_total_len_ = json_value["fields_total_len"].asInt(); + index.unique_ = json_value["unique"].asBool(); const Json::Value &fields_json = json_value["fields"]; for (const auto &field_json : fields_json) { diff --git a/src/observer/storage/index/index_meta.h b/src/observer/storage/index/index_meta.h index a9951711..c0ace1c0 100644 --- a/src/observer/storage/index/index_meta.h +++ b/src/observer/storage/index/index_meta.h @@ -38,7 +38,7 @@ class IndexMeta public: IndexMeta() = default; - [[nodiscard]] RC init(const char *name, const vector &fields); + [[nodiscard]] RC init(const char *name, const vector &fields, bool unique); void desc(ostream &os) const { os << to_string(); } @@ -66,10 +66,12 @@ class IndexMeta [[nodiscard]] const char *name() const { return name_.c_str(); } [[nodiscard]] int fields_total_len() const { return fields_total_len_; } [[nodiscard]] const vector &fields() const { return fields_; } + [[nodiscard]] bool unique() const { return unique_; } private: string name_; int fields_total_len_ = 0; vector fields_offset_; vector fields_; + bool unique_; }; diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index da939300..d62a2a83 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -389,7 +389,7 @@ RC Table::get_chunk_scanner(ChunkFileScanner &scanner, Trx *trx, ReadWriteMode m return rc; } -RC Table::create_index(Trx *trx, const vector &field_meta, const char *index_name) +RC Table::create_index(Trx *trx, const vector &field_meta, const char *index_name, bool unique) { if (common::is_blank(index_name)) { LOG_INFO("Invalid input arguments, table name is %s, index_name is blank or attribute_name is blank", name()); @@ -398,7 +398,7 @@ RC Table::create_index(Trx *trx, const vector &field_meta, const char IndexMeta new_index_meta; - RC rc = new_index_meta.init(index_name, field_meta); + RC rc = new_index_meta.init(index_name, field_meta, unique); if (rc != RC::SUCCESS) { LOG_INFO("Failed to init IndexMeta in table:%s, index:%s", name(), new_index_meta.to_string().c_str()); diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index 7ac924a0..af285967 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -89,7 +89,7 @@ class Table RC recover_insert_record(Record &record); // TODO refactor - RC create_index(Trx *trx, const vector &field_meta, const char *index_name); + RC create_index(Trx *trx, const vector &field_meta, const char *index_name, bool unique); RC get_record_scanner(RecordFileScanner &scanner, Trx *trx, ReadWriteMode mode); From 3da8111fd160d0932490d72673e262f17dd18ce0 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 3 Oct 2024 21:12:29 +0800 Subject: [PATCH 109/308] =?UTF-8?q?BplusTreeIndex::insert=5Fentry=E7=8B=AC?= =?UTF-8?q?=E7=AB=8B=E6=80=A7=E6=A3=80=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/index/bplus_tree_index.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/observer/storage/index/bplus_tree_index.cpp b/src/observer/storage/index/bplus_tree_index.cpp index 64f062fe..4e13a75d 100644 --- a/src/observer/storage/index/bplus_tree_index.cpp +++ b/src/observer/storage/index/bplus_tree_index.cpp @@ -83,6 +83,19 @@ RC BplusTreeIndex::close() RC BplusTreeIndex::insert_entry(const char *record, const RID *rid) { char *entry = index_meta_.make_entry_from_record(record); + if (index_meta_.unique()) { + IndexScanner *scanner = create_scanner(entry, index_meta_.fields_total_len(), true, entry, index_meta_.fields_total_len(), true); + if (scanner != nullptr) { + RID existing_rid; + if (scanner->next_entry(&existing_rid) == RC::SUCCESS) { + delete scanner; + LOG_WARN("Key already exists, duplicate entry is not allowed."); + return RC::RECORD_DUPLICATE_KEY; + } + delete scanner; + } + } + return index_handler_.insert_entry(entry, rid); } From c6c8cfef0a8e01569c5c8d82d0cf9f9b7cf93922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Thu, 3 Oct 2024 14:18:36 +0000 Subject: [PATCH 110/308] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86=E5=AD=90?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/common/lang/defer.h | 2 +- src/observer/common/value.h | 22 ++- src/observer/sql/expr/expression.cpp | 77 ++------- src/observer/sql/expr/expression.h | 154 ------------------ src/observer/sql/expr/expression_iterator.cpp | 96 +++++++++++ src/observer/sql/expr/expression_iterator.h | 4 +- .../sql/optimizer/logical_plan_generator.cpp | 84 +--------- .../sql/optimizer/logical_plan_generator.h | 2 - test/case/miniob_test.py | 6 +- 9 files changed, 137 insertions(+), 310 deletions(-) diff --git a/deps/common/lang/defer.h b/deps/common/lang/defer.h index 8035f9d1..a0dcbe0e 100644 --- a/deps/common/lang/defer.h +++ b/deps/common/lang/defer.h @@ -40,4 +40,4 @@ class DeferHelper #define SCOPE_UNIQUE_NAME(B) _SCOPE_UNIQUE_NAME(B, __LINE__) -#define DEFER(...) common::DeferHelper SCOPE_UNIQUE_NAME(defer_helper_)([&]() { __VA_ARGS__; }) +#define DEFER(...) common::DeferHelper SCOPE_UNIQUE_NAME(defer_helper_)([&]() { __VA_ARGS__; }) \ No newline at end of file diff --git a/src/observer/common/value.h b/src/observer/common/value.h index a27f8077..781cb521 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -100,7 +100,7 @@ class Value final string to_string() const; - int compare(const Value &other) const; + int compare(const Value &other) const; bool LIKE(const Value &other) const; const char *data() const; @@ -113,12 +113,20 @@ class Value final * 获取对应的值 * 如果当前的类型与期望获取的类型不符,就会执行转换操作 */ - int get_int() const; - float get_float() const; - string get_string() const; - bool get_boolean() const; - bool is_null() const { return is_null_; } - inline bool is_str() const{ return attr_type_ == AttrType::CHARS; } + int get_int() const; + float get_float() const; + string get_string() const; + bool get_boolean() const; + bool is_null() const { return is_null_; } + inline bool is_str() const { return attr_type_ == AttrType::CHARS; } + + static int implicit_cast_cost(AttrType from, AttrType to) + { + if (from == to) { + return 0; + } + return DataType::type_instance(from)->cast_cost(to); + } private: void set_null(); diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 6f8e00e3..9eb9857b 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -218,7 +218,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) SubQueryExpr *right_subquery_expr = nullptr; // Lambda to check if the expression is a subquery and open it - auto if_subquery_open = [&tuple](const std::unique_ptr &expr, SubQueryExpr *&subquery_expr) -> RC { + auto open_subquery = [&tuple](const std::unique_ptr &expr, SubQueryExpr *&subquery_expr) -> RC { if (expr->type() == ExprType::SUBQUERY) { subquery_expr = dynamic_cast(expr.get()); RC rc = subquery_expr->open(nullptr, tuple); // Open the subquery expression (pass nullptr for now) @@ -230,50 +230,30 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) }; // Check and open the left subquery expression if it exists - rc = if_subquery_open(left_, left_subquery_expr); + rc = open_subquery(left_, left_subquery_expr); if (OB_FAIL(rc)) { LOG_WARN("failed to open left subquery expression. rc=%s", strrc(rc)); return rc; } // Check and open the right subquery expression if it exists - rc = if_subquery_open(right_, right_subquery_expr); + rc = open_subquery(right_, right_subquery_expr); if (OB_FAIL(rc)) { LOG_WARN("failed to open right subquery expression. rc=%s", strrc(rc)); return rc; } - - // Lambda to retrieve the value from an expression - auto get_value = [&tuple](const std::unique_ptr &expr, Value &value) { - RC rc = expr->get_value(tuple, value); - if (expr->type() == ExprType::SUBQUERY && RC::RECORD_EOF == rc) { - value.set_null(true); - rc = RC::SUCCESS; - } - return rc; - }; + DEFER(if (nullptr != left_subquery_expr) left_subquery_expr->close(); + if (nullptr != right_subquery_expr) right_subquery_expr->close();); // Get the value of the left expression - rc = get_value(left_, left_value); + rc = left_->get_value(tuple, left_value); if (rc != RC::SUCCESS) { LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); - - // Close subquery expressions before returning - if (left_subquery_expr) - left_subquery_expr->close(); - if (right_subquery_expr) - right_subquery_expr->close(); - return rc; } // Check if the left subquery has more rows (error if true) if (left_subquery_expr && left_subquery_expr->has_more_row(tuple)) { - if (left_subquery_expr) - left_subquery_expr->close(); - if (right_subquery_expr) - right_subquery_expr->close(); - return RC::INVALID_ARGUMENT; } @@ -281,13 +261,6 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) if (comp_ == IN_OP || comp_ == NOT_IN_OP) { if (left_value.is_null()) { value.set_boolean(false); - - // Close subquery expressions before returning - if (left_subquery_expr) - left_subquery_expr->close(); - if (right_subquery_expr) - right_subquery_expr->close(); - return RC::SUCCESS; } @@ -305,37 +278,18 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) } } value.set_boolean(comp_ == IN_OP ? res : (has_null ? false : !res)); - - // Close subquery expressions before returning - if (left_subquery_expr) - left_subquery_expr->close(); - if (right_subquery_expr) - right_subquery_expr->close(); - return rc == RC::RECORD_EOF ? RC::SUCCESS : rc; } // Get the value of the right expression - rc = get_value(right_, right_value); + rc = right_->get_value(tuple, right_value); if (rc != RC::SUCCESS) { LOG_WARN("failed to get value of right expression. rc=%s", strrc(rc)); - - // Close subquery expressions before returning - if (left_subquery_expr) - left_subquery_expr->close(); - if (right_subquery_expr) - right_subquery_expr->close(); - return rc; } // Check if the right subquery has more rows (error if true) if (right_subquery_expr && right_subquery_expr->has_more_row(tuple)) { - if (left_subquery_expr) - left_subquery_expr->close(); - if (right_subquery_expr) - right_subquery_expr->close(); - return RC::INVALID_ARGUMENT; } @@ -345,13 +299,6 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) if (rc == RC::SUCCESS) { value.set_boolean(bool_value); } - - // Close subquery expressions before returning - if (left_subquery_expr) - left_subquery_expr->close(); - if (right_subquery_expr) - right_subquery_expr->close(); - return rc; } @@ -852,11 +799,15 @@ bool SubQueryExpr::has_more_row(const Tuple &tuple) const RC SubQueryExpr::get_value(const Tuple &tuple, Value &value) { physical_oper_->set_parent_tuple(&tuple); - - if (RC rc = physical_oper_->next(); RC::SUCCESS != rc) { + RC rc = physical_oper_->next(); + if (OB_FAIL(rc)) { return rc; } - return physical_oper_->current_tuple()->cell_at(0, value); + rc = physical_oper_->current_tuple()->cell_at(0, value); + if (rc == RC::RECORD_EOF) + value.set_null(true); + + return RC::SUCCESS; } RC SubQueryExpr::close() { return physical_oper_->close(); } diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 9ab31142..d19e04cf 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -126,22 +126,6 @@ class Expression */ virtual RC eval(Chunk &chunk, std::vector &select) { return RC::UNIMPLEMENTED; } - virtual void traverse(const std::function &func) - { - constexpr auto always_true = [](const Expression *) { return true; }; - this->traverse(func, always_true); - } - - // 带条件的 后序遍历 dfs - virtual void traverse(const std::function &func, const std::function &filter) - { - if (filter(this)) { - func(this); - } - } - - // 后序遍历 检查 - virtual RC traverse_check(const std::function &check_func) { return check_func(this); } virtual RC reset() { return RC::SUCCESS; } @@ -285,24 +269,6 @@ class CastExpr : public Expression std::unique_ptr &child() { return child_; } - void traverse(const std::function &func, const std::function &filter) override - { - if (filter(this)) { - child_->traverse(func, filter); - func(this); - } - } - - RC traverse_check(const std::function &check_func) override - { - if (RC rc = child_->traverse_check(check_func); RC::SUCCESS != rc) { - return rc; - } else if (rc = check_func(this); RC::SUCCESS != rc) { - return rc; - } - return RC::SUCCESS; - } - private: RC cast(const Value &value, Value &cast_value) const; @@ -351,36 +317,6 @@ class ComparisonExpr : public Expression template RC compare_column(const Column &left, const Column &right, std::vector &result) const; - bool has_rhs() const - { - // return right_; - // 虽然 IS_[NOT]_NULL 的情况下 rhs 是 null ValueExpr 但仍然提供这个接口 - return comp_ != OP_IS && comp_ != OP_IS_NOT; - } - - void traverse(const std::function &func, const std::function &filter) override - { - if (filter(this)) { - left_->traverse(func, filter); - if (has_rhs()) { - right_->traverse(func, filter); - } - func(this); - } - } - - RC traverse_check(const std::function &check_func) override - { - RC rc = RC::SUCCESS; - if (RC::SUCCESS != (rc = left_->traverse_check(check_func))) { - return rc; - } else if (has_rhs() && RC::SUCCESS != (rc = right_->traverse_check(check_func))) { - return rc; - } else if (RC::SUCCESS != (rc = check_func(this))) { - return rc; - } - return RC::SUCCESS; - } private: CompOp comp_; @@ -417,30 +353,6 @@ class ConjunctionExpr : public Expression std::vector> &children() { return children_; } - void traverse(const std::function &func, const std::function &filter) override - { - if (filter(this)) { - for (auto &child : children_) { - child->traverse(func, filter); - } - func(this); - } - } - - RC traverse_check(const std::function &check_func) override - { - RC rc = RC::SUCCESS; - for (auto &child : children_) { - if (RC::SUCCESS != (rc = child->traverse_check(check_func))) { - return rc; - } - } - if (RC::SUCCESS != (rc = check_func(this))) { - return rc; - } - return RC::SUCCESS; - } - private: Type conjunction_type_; std::vector> children_; @@ -490,35 +402,6 @@ class ArithmeticExpr : public Expression std::unique_ptr &left() { return left_; } std::unique_ptr &right() { return right_; } - bool has_rhs() const - { - // return arithmetic_type_ != Type::NEGATIVE; // logical - return right_ != nullptr; // physical - } - - void traverse(const std::function &func, const std::function &filter) override - { - if (filter(this)) { - left_->traverse(func, filter); - if (has_rhs()) { - right_->traverse(func, filter); - } - func(this); - } - } - - RC traverse_check(const std::function &check_func) override - { - RC rc = RC::SUCCESS; - if (RC::SUCCESS != (rc = left_->traverse_check(check_func))) { - return rc; - } else if (has_rhs() && RC::SUCCESS != (rc = right_->traverse_check(check_func))) { - return rc; - } else if (RC::SUCCESS != (rc = check_func(this))) { - return rc; - } - return RC::SUCCESS; - } private: RC calc_value(const Value &left_value, const Value &right_value, Value &value) const; @@ -591,27 +474,6 @@ class AggregateExpr : public Expression std::unique_ptr create_aggregator() const; - // 聚集函数表达式的 traverse[_check] 需要特殊对待 param 可能是个 * - void traverse(const std::function &func, const std::function &filter) override - { - if (filter(this)) { - child_->traverse(func, filter); - func(this); - } - } - - RC traverse_check(const std::function &check_func) override - { - RC rc = RC::SUCCESS; - if (RC::SUCCESS != (rc = child_->traverse_check(check_func))) { - return rc; - } - if (RC::SUCCESS != (rc = check_func(this))) { - return rc; - } - return rc; - } - public: static RC type_from_string(const char *type_str, Type &type); @@ -692,22 +554,6 @@ class ListExpr : public Expression AttrType value_type() const override { return AttrType::UNDEFINED; } - // 通过引用传递std::function避免拷贝 - void traverse(const std::function& func, const std::function& filter) override - { - if (filter(this)) { - for (auto& expr : exprs_) { - expr->traverse(func, filter); - } - func(this); - } - } - - RC traverse_check(const std::function& check_func) override - { - return RC::SUCCESS; - - } std::vector>& get_list(){return exprs_;} diff --git a/src/observer/sql/expr/expression_iterator.cpp b/src/observer/sql/expr/expression_iterator.cpp index d7dd08e2..b3c494d6 100644 --- a/src/observer/sql/expr/expression_iterator.cpp +++ b/src/observer/sql/expr/expression_iterator.cpp @@ -78,5 +78,101 @@ RC ExpressionIterator::iterate_child_expr(Expression &expr, const function &expr) +{ + RC rc = RC::SUCCESS; + + switch (expr->type()) { + case ExprType::CAST: { + + } break; + + case ExprType::COMPARISON: { + auto *comp_expr = dynamic_cast(expr.get()); + auto &left = comp_expr->left(); + auto &right = comp_expr->right(); + + if (right->type() == ExprType::EXPRLIST) { + if (comp_expr->comp() != IN_OP && comp_expr->comp() != NOT_IN_OP) { + return RC::UNSUPPORTED; + } + } + + if (left->value_type() != right->value_type()) { + auto left_to_right_cost = Value::implicit_cast_cost(left->value_type(), right->value_type()); + auto right_to_left_cost = Value::implicit_cast_cost(right->value_type(), left->value_type()); + + if (right->type() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST || + left->type() == ExprType::SUBQUERY || left->type() == ExprType::EXPRLIST) { + // 暂时在这里不做处理 + return RC::SUCCESS; + } else if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { + ExprType left_type = left->type(); + auto cast_expr = make_unique(std::move(left), right->value_type()); + + if (left_type == ExprType::VALUE) { + Value left_val; + rc = cast_expr->try_get_value(left_val); + if (OB_FAIL(rc)) { + LOG_WARN("failed to get value from left child", strrc(rc)); + return rc; + } + left = make_unique(left_val); + } else { + left = std::move(cast_expr); + } + } else if (right_to_left_cost < left_to_right_cost && right_to_left_cost != INT32_MAX) { + ExprType right_type = right->type(); + auto cast_expr = make_unique(std::move(right), left->value_type()); + + if (right_type == ExprType::VALUE) { + Value right_val; + rc = cast_expr->try_get_value(right_val); + if (OB_FAIL(rc)) { + LOG_WARN("failed to get value from right child", strrc(rc)); + return rc; + } + right = make_unique(right_val); + } else { + right = std::move(cast_expr); + } + } else { + rc = RC::UNSUPPORTED; + LOG_WARN("unsupported cast from %s to %s", + attr_type_to_string(left->value_type()), + attr_type_to_string(right->value_type())); + return rc; + } + } + + } break; + + case ExprType::CONJUNCTION: { + auto conjunction_expr = dynamic_cast(expr.get()); + for (auto &child : conjunction_expr->children()) { + rc = condition_iterate_expr(child); + if (OB_FAIL(rc)) { + break; + } + } + } break; + + case ExprType::ARITHMETIC: + case ExprType::AGGREGATION: + case ExprType::NONE: + case ExprType::STAR: + case ExprType::UNBOUND_FIELD: + case ExprType::FIELD: + case ExprType::VALUE: { + // Do nothing + } break; + + default: { + ASSERT(false, "Unknown expression type"); + } + } + return rc; } \ No newline at end of file diff --git a/src/observer/sql/expr/expression_iterator.h b/src/observer/sql/expr/expression_iterator.h index 83214ff9..a207b57f 100644 --- a/src/observer/sql/expr/expression_iterator.h +++ b/src/observer/sql/expr/expression_iterator.h @@ -24,5 +24,7 @@ class Expression; class ExpressionIterator { public: - static RC iterate_child_expr(Expression &expr, const std::function &)>& callback); + static RC iterate_child_expr(Expression &expr, const std::function &)> &callback); + static RC condition_iterate_expr( + std::unique_ptr &expr); }; \ No newline at end of file diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 6d684daf..17dcc6db 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -163,97 +163,21 @@ RC LogicalPlanGenerator::create_plan(FilterStmt *filter_stmt, unique_ptrcondition_empty()) { return {}; } - std::unique_ptr &condition = filter_stmt->condition(); - - std::function generate_subquery_logical_oper = [&](Expression *expr) -> RC { - if (expr == nullptr) { - return RC::INVALID_ARGUMENT; - } - // 已经全部在yacc阶段就改成expr了,现在主要是处理子查询 - if (expr->type() == ExprType::SUBQUERY) { - } - else if (expr->type() == ExprType::COMPARISON) { - auto *comp_expr = dynamic_cast(expr); - auto &left = comp_expr->left(); - auto &right = comp_expr->right(); - - if (right->type() == ExprType::EXPRLIST) { - if (comp_expr->comp() != IN_OP && comp_expr->comp() != NOT_IN_OP) { - return RC::UNSUPPORTED; - } - } - - if (left->value_type() != right->value_type()) { - auto left_to_right_cost = implicit_cast_cost(left->value_type(), right->value_type()); - auto right_to_left_cost = implicit_cast_cost(right->value_type(), left->value_type()); - - if (right->type() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST || - left->type() == ExprType::SUBQUERY || left->type() == ExprType::EXPRLIST) { - // 暂时在这里不做处理 - return RC::SUCCESS; - } else if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { - ExprType left_type = left->type(); - auto cast_expr = make_unique(std::move(left), right->value_type()); - - if (left_type == ExprType::VALUE) { - Value left_val; - rc = cast_expr->try_get_value(left_val); - if (OB_FAIL(rc)) { - LOG_WARN("failed to get value from left child", strrc(rc)); - return rc; - } - left = make_unique(left_val); - } else { - left = std::move(cast_expr); - } - } else if (right_to_left_cost < left_to_right_cost && right_to_left_cost != INT32_MAX) { - ExprType right_type = right->type(); - auto cast_expr = make_unique(std::move(right), left->value_type()); - - if (right_type == ExprType::VALUE) { - Value right_val; - rc = cast_expr->try_get_value(right_val); - if (OB_FAIL(rc)) { - LOG_WARN("failed to get value from right child", strrc(rc)); - return rc; - } - right = make_unique(right_val); - } else { - right = std::move(cast_expr); - } - } else { - rc = RC::UNSUPPORTED; - LOG_WARN("unsupported cast from %s to %s", - attr_type_to_string(left->value_type()), - attr_type_to_string(right->value_type())); - return rc; - } - } - } - - return RC::SUCCESS; - }; - // 递归遍历 condition 检查所有子查询 - rc = filter_stmt->condition()->traverse_check(generate_subquery_logical_oper); + rc = ExpressionIterator::condition_iterate_expr(filter_stmt->condition()); + if (OB_FAIL(rc)) { return rc; } // 构建 ConjunctionExpr 并将其传递给 logical_operator - unique_ptr conjunction_expr(new ConjunctionExpr(ConjunctionExpr::Type::AND, std::move(condition))); + unique_ptr conjunction_expr( + new ConjunctionExpr(ConjunctionExpr::Type::AND, std::move(filter_stmt->condition()))); logical_operator = std::make_unique(std::move(conjunction_expr)); return rc; } -int LogicalPlanGenerator::implicit_cast_cost(AttrType from, AttrType to) -{ - if (from == to) { - return 0; - } - return DataType::type_instance(from)->cast_cost(to); -} RC LogicalPlanGenerator::create_plan(InsertStmt *insert_stmt, unique_ptr &logical_operator) { diff --git a/src/observer/sql/optimizer/logical_plan_generator.h b/src/observer/sql/optimizer/logical_plan_generator.h index 8a47bb2b..f8513703 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.h +++ b/src/observer/sql/optimizer/logical_plan_generator.h @@ -45,8 +45,6 @@ class LogicalPlanGenerator static RC create_plan(DeleteStmt *delete_stmt, std::unique_ptr &logical_operator); static RC create_plan(UpdateStmt *update_stmt, std::unique_ptr &logical_operator); static RC create_plan(ExplainStmt *explain_stmt, std::unique_ptr &logical_operator); - static RC create_group_by_plan(SelectStmt *select_stmt, std::unique_ptr &logical_operator); - static int implicit_cast_cost(AttrType from, AttrType to); }; diff --git a/test/case/miniob_test.py b/test/case/miniob_test.py index 752aed06..85cb79e8 100755 --- a/test/case/miniob_test.py +++ b/test/case/miniob_test.py @@ -46,7 +46,9 @@ 运行 basic 测试用例 python3 miniob_test.py --test-cases=basic - +python3 miniob_test.py --test-cases=primary-date +python3 miniob_test.py --test-cases=primary-complex-sub-query +python3 miniob_test.py --test-cases=primary-simple-sub-query 如果要运行多个测试用例,则在 --test-cases 参数中使用 ',' 分隔写多个即可 """ @@ -1023,7 +1025,7 @@ def compile(work_dir: str, build_dir: str, cmake_args: str, make_args: str, rebu make_command = ["make", "--silent", "-C", build_path] if isinstance(make_args, str): if not make_args: - make_command.append('-j4') + make_command.append('-j16') else: args = make_args.split(';') for arg in args: From e770377da678fb842e07b34c2fa4eda5bcf534cb Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 3 Oct 2024 23:01:56 +0800 Subject: [PATCH 111/308] =?UTF-8?q?=E4=BF=AE=E6=94=B9ix=5Fcompare?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/index/bplus_tree_index.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/observer/storage/index/bplus_tree_index.cpp b/src/observer/storage/index/bplus_tree_index.cpp index 4e13a75d..92ce2ca3 100644 --- a/src/observer/storage/index/bplus_tree_index.cpp +++ b/src/observer/storage/index/bplus_tree_index.cpp @@ -84,18 +84,15 @@ RC BplusTreeIndex::insert_entry(const char *record, const RID *rid) { char *entry = index_meta_.make_entry_from_record(record); if (index_meta_.unique()) { - IndexScanner *scanner = create_scanner(entry, index_meta_.fields_total_len(), true, entry, index_meta_.fields_total_len(), true); - if (scanner != nullptr) { - RID existing_rid; - if (scanner->next_entry(&existing_rid) == RC::SUCCESS) { - delete scanner; - LOG_WARN("Key already exists, duplicate entry is not allowed."); - return RC::RECORD_DUPLICATE_KEY; - } - delete scanner; + list entries; + RC rc = index_handler_.get_entry(entry, index_meta_.fields_total_len(), entries); + if (OB_FAIL(rc)) { + return rc; + } + if (!entries.empty()) { + return RC::RECORD_DUPLICATE_KEY; } } - return index_handler_.insert_entry(entry, rid); } From f554f3406367ecbf633c6de6974998e3a4442962 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 3 Oct 2024 23:29:02 +0800 Subject: [PATCH 112/308] =?UTF-8?q?fix:=20=E5=8C=85=E5=90=AB=20null=20?= =?UTF-8?q?=E7=9A=84=E8=B0=93=E8=AF=8D=E6=9D=A1=E4=BB=B6=E4=B8=8D=E5=81=9A?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression_iterator.cpp | 82 ++++++++++--------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/src/observer/sql/expr/expression_iterator.cpp b/src/observer/sql/expr/expression_iterator.cpp index 5f1cdb39..055947e5 100644 --- a/src/observer/sql/expr/expression_iterator.cpp +++ b/src/observer/sql/expr/expression_iterator.cpp @@ -97,50 +97,52 @@ RC ExpressionIterator::condition_iterate_expr(std::unique_ptr &expr) } } - if (left->value_type() != right->value_type()) { - auto left_to_right_cost = Value::implicit_cast_cost(left->value_type(), right->value_type()); - auto right_to_left_cost = Value::implicit_cast_cost(right->value_type(), left->value_type()); - - if (right->type() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST || - left->type() == ExprType::SUBQUERY || left->type() == ExprType::EXPRLIST) { - // 暂时在这里不做处理 - return RC::SUCCESS; - } else if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { - ExprType left_type = left->type(); - auto cast_expr = make_unique(std::move(left), right->value_type()); - - if (left_type == ExprType::VALUE) { - Value left_val; - rc = cast_expr->try_get_value(left_val); - if (OB_FAIL(rc)) { - LOG_WARN("failed to get value from left child", strrc(rc)); - return rc; + if (left->value_type() != AttrType::NULLS && right->value_type() != AttrType::NULLS) { + if (left->value_type() != right->value_type()) { + auto left_to_right_cost = Value::implicit_cast_cost(left->value_type(), right->value_type()); + auto right_to_left_cost = Value::implicit_cast_cost(right->value_type(), left->value_type()); + + if (right->type() == ExprType::SUBQUERY || right->type() == ExprType::EXPRLIST || + left->type() == ExprType::SUBQUERY || left->type() == ExprType::EXPRLIST) { + // 暂时在这里不做处理 + return RC::SUCCESS; + } else if (left_to_right_cost <= right_to_left_cost && left_to_right_cost != INT32_MAX) { + ExprType left_type = left->type(); + auto cast_expr = make_unique(std::move(left), right->value_type()); + + if (left_type == ExprType::VALUE) { + Value left_val; + rc = cast_expr->try_get_value(left_val); + if (OB_FAIL(rc)) { + LOG_WARN("failed to get value from left child", strrc(rc)); + return rc; + } + left = make_unique(left_val); + } else { + left = std::move(cast_expr); } - left = make_unique(left_val); - } else { - left = std::move(cast_expr); - } - } else if (right_to_left_cost < left_to_right_cost && right_to_left_cost != INT32_MAX) { - ExprType right_type = right->type(); - auto cast_expr = make_unique(std::move(right), left->value_type()); - - if (right_type == ExprType::VALUE) { - Value right_val; - rc = cast_expr->try_get_value(right_val); - if (OB_FAIL(rc)) { - LOG_WARN("failed to get value from right child", strrc(rc)); - return rc; + } else if (right_to_left_cost < left_to_right_cost && right_to_left_cost != INT32_MAX) { + ExprType right_type = right->type(); + auto cast_expr = make_unique(std::move(right), left->value_type()); + + if (right_type == ExprType::VALUE) { + Value right_val; + rc = cast_expr->try_get_value(right_val); + if (OB_FAIL(rc)) { + LOG_WARN("failed to get value from right child", strrc(rc)); + return rc; + } + right = make_unique(right_val); + } else { + right = std::move(cast_expr); } - right = make_unique(right_val); } else { - right = std::move(cast_expr); + rc = RC::UNSUPPORTED; + LOG_WARN("unsupported cast from %s to %s", + attr_type_to_string(left->value_type()), + attr_type_to_string(right->value_type())); + return rc; } - } else { - rc = RC::UNSUPPORTED; - LOG_WARN("unsupported cast from %s to %s", - attr_type_to_string(left->value_type()), - attr_type_to_string(right->value_type())); - return rc; } } } break; From 3266b41fa28a00e646813d0f5ad7787c9e7e77ec Mon Sep 17 00:00:00 2001 From: Koschei Date: Fri, 4 Oct 2024 00:59:59 +0800 Subject: [PATCH 113/308] =?UTF-8?q?test:=20=E5=8A=A0=E5=BC=BA=E5=94=AF?= =?UTF-8?q?=E4=B8=80=E7=B4=A2=E5=BC=95=E5=92=8C=E5=A4=8D=E6=9D=82=E5=AD=90?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=9A=84=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/primary-complex-sub-query.result | 3 ++ test/case/result/primary-unique.result | 39 +++++++++++++++---- test/case/test/primary-complex-sub-query.test | 2 + test/case/test/primary-unique.test | 12 +++++- 4 files changed, 47 insertions(+), 9 deletions(-) diff --git a/test/case/result/primary-complex-sub-query.result b/test/case/result/primary-complex-sub-query.result index d499849b..867495e2 100644 --- a/test/case/result/primary-complex-sub-query.result +++ b/test/case/result/primary-complex-sub-query.result @@ -77,6 +77,9 @@ select * from csq_1 where feat1 <> (select avg(csq_2.feat2) from csq_2 where csq 2 | 2 | 12 ID | COL1 | FEAT1 +select * from csq_1 where feat1 > (select min(csq_2.feat2) from csq_2 where csq_2.feat2 > csq_1.feat1); +ID | COL1 | FEAT1 + select * from csq_1 where col1 not in (select csq_2.col2 from csq_2 where csq_2.id in (select csq_3.id from csq_3 where csq_1.id = csq_3.id)); 1 | 4 | 11.2 2 | 2 | 12 diff --git a/test/case/result/primary-unique.result b/test/case/result/primary-unique.result index 54a36709..e8810115 100644 --- a/test/case/result/primary-unique.result +++ b/test/case/result/primary-unique.result @@ -1,24 +1,47 @@ INITIALIZATION -CREATE TABLE unique_table(id int, col1 int, col2 int); +CREATE TABLE UNIQUE_TABLE(ID INT, COL1 INT, COL2 INT); SUCCESS -INSERT INTO unique_table VALUES (1,1,1); +CREATE TABLE UNIQUE_TABLE2(ID1 INT, ID2 INT, COL1 INT, COL2 INT); +SUCCESS +INSERT INTO UNIQUE_TABLE VALUES (1,1,1); +SUCCESS +INSERT INTO UNIQUE_TABLE2 VALUES (1,1,1,1); SUCCESS 1. UNIQUE TEST -CREATE UNIQUE INDEX index_id on unique_table(id); +CREATE UNIQUE INDEX INDEX_ID ON UNIQUE_TABLE(ID); SUCCESS -INSERT INTO unique_table VALUES (2,1,1); +INSERT INTO UNIQUE_TABLE VALUES (2,1,1); SUCCESS -CREATE UNIQUE INDEX index_id on unique_table(id); +CREATE UNIQUE INDEX INDEX_ID ON UNIQUE_TABLE(ID); FAILURE -INSERT INTO unique_table VALUES (3,2,1); +INSERT INTO UNIQUE_TABLE VALUES (3,2,1); +SUCCESS +INSERT INTO UNIQUE_TABLE VALUES (1,2,1); +FAILURE + +CREATE UNIQUE INDEX INDEX_ID ON UNIQUE_TABLE2(ID1, ID2); SUCCESS -INSERT INTO unique_table VALUES (1,2,1); +INSERT INTO UNIQUE_TABLE2 VALUES (1,1,2,1); FAILURE +INSERT INTO UNIQUE_TABLE2 VALUES (1,2,1,1); +SUCCESS +INSERT INTO UNIQUE_TABLE2 VALUES (1,2,2,1); +FAILURE +INSERT INTO UNIQUE_TABLE2 VALUES (1,3,4,2); +SUCCESS +INSERT INTO UNIQUE_TABLE2 VALUES (2,1,1,1); +SUCCESS 2. SELECT -SELECT * FROM unique_table; +SELECT * FROM UNIQUE_TABLE; 1 | 1 | 1 2 | 1 | 1 3 | 2 | 1 ID | COL1 | COL2 +SELECT * FROM UNIQUE_TABLE2; +1 | 1 | 1 | 1 +1 | 2 | 1 | 1 +1 | 3 | 4 | 2 +2 | 1 | 1 | 1 +ID1 | ID2 | COL1 | COL2 diff --git a/test/case/test/primary-complex-sub-query.test b/test/case/test/primary-complex-sub-query.test index e5ef032b..ded38b1a 100644 --- a/test/case/test/primary-complex-sub-query.test +++ b/test/case/test/primary-complex-sub-query.test @@ -37,6 +37,8 @@ INSERT INTO csq_3 VALUES (5, 5, 14.6); -- sort select * from csq_1 where feat1 <> (select avg(csq_2.feat2) from csq_2 where csq_2.feat2 > csq_1.feat1); +-- sort select * from csq_1 where feat1 > (select min(csq_2.feat2) from csq_2 where csq_2.feat2 > csq_1.feat1); + -- sort select * from csq_1 where col1 not in (select csq_2.col2 from csq_2 where csq_2.id in (select csq_3.id from csq_3 where csq_1.id = csq_3.id)); -- echo 2. Select with empty table diff --git a/test/case/test/primary-unique.test b/test/case/test/primary-unique.test index 7ced3ef4..0c3b18b1 100644 --- a/test/case/test/primary-unique.test +++ b/test/case/test/primary-unique.test @@ -1,6 +1,8 @@ -- echo initialization CREATE TABLE unique_table(id int, col1 int, col2 int); +CREATE TABLE unique_table2(id1 int, id2 int, col1 int, col2 int); INSERT INTO unique_table VALUES (1,1,1); +INSERT INTO unique_table2 VALUES (1,1,1,1); -- echo 1. unique test CREATE UNIQUE INDEX index_id on unique_table(id); @@ -9,5 +11,13 @@ CREATE UNIQUE INDEX index_id on unique_table(id); INSERT INTO unique_table VALUES (3,2,1); INSERT INTO unique_table VALUES (1,2,1); +CREATE UNIQUE INDEX index_id on unique_table2(id1, id2); +INSERT INTO unique_table2 VALUES (1,1,2,1); +INSERT INTO unique_table2 VALUES (1,2,1,1); +INSERT INTO unique_table2 VALUES (1,2,2,1); +INSERT INTO unique_table2 VALUES (1,3,4,2); +INSERT INTO unique_table2 VALUES (2,1,1,1); + -- echo 2. select --- sort SELECT * FROM unique_table; \ No newline at end of file +-- sort SELECT * FROM unique_table; +-- sort SELECT * FROM unique_table2; From 68b3ffcf139c663017fb4b4c2af368f32d1a6a4b Mon Sep 17 00:00:00 2001 From: Koschei Date: Fri, 4 Oct 2024 03:56:50 +0800 Subject: [PATCH 114/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=20update-sel?= =?UTF-8?q?ect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 4 +- .../sql/operator/update_logical_operator.cpp | 2 +- .../sql/operator/update_logical_operator.h | 17 +- .../sql/operator/update_physical_operator.cpp | 63 ++- .../sql/operator/update_physical_operator.h | 17 +- .../sql/optimizer/logical_plan_generator.cpp | 2 +- .../sql/optimizer/physical_plan_generator.cpp | 3 +- src/observer/sql/parser/expression_binder.cpp | 2 + src/observer/sql/parser/parse_defs.h | 4 +- src/observer/sql/parser/yacc_sql.cpp | 448 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 10 +- src/observer/sql/stmt/update_stmt.cpp | 70 +-- src/observer/sql/stmt/update_stmt.h | 19 +- 13 files changed, 359 insertions(+), 302 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index bc8968c0..d1e27ba5 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -775,6 +775,7 @@ RC SubQueryExpr::generate_physical_oper() } return rc; } + bool SubQueryExpr::one_row_ret() const { return res_query.size() <= 1; } // 子算子树的 open 和 close 逻辑由外部控制 @@ -807,8 +808,9 @@ RC SubQueryExpr::get_value(const Tuple &tuple, Value &value) return rc; } rc = physical_oper_->current_tuple()->cell_at(0, value); - if (rc == RC::RECORD_EOF) + if (rc == RC::RECORD_EOF) { value.set_null(true); + } return RC::SUCCESS; } diff --git a/src/observer/sql/operator/update_logical_operator.cpp b/src/observer/sql/operator/update_logical_operator.cpp index 63fb9ab2..b7a387d3 100644 --- a/src/observer/sql/operator/update_logical_operator.cpp +++ b/src/observer/sql/operator/update_logical_operator.cpp @@ -13,6 +13,6 @@ #include "update_logical_operator.h" UpdateLogicalOperator::UpdateLogicalOperator( - Table *table, std::vector field_metas, std::vector values) + Table *table, std::vector field_metas, std::vector> values) : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)) {} diff --git a/src/observer/sql/operator/update_logical_operator.h b/src/observer/sql/operator/update_logical_operator.h index c354d89a..ab18e8f4 100644 --- a/src/observer/sql/operator/update_logical_operator.h +++ b/src/observer/sql/operator/update_logical_operator.h @@ -21,16 +21,17 @@ class UpdateLogicalOperator : public LogicalOperator { public: - explicit UpdateLogicalOperator(Table *table, std::vector field_metas, std::vector values); + explicit UpdateLogicalOperator( + Table *table, std::vector field_metas, std::vector> values); ~UpdateLogicalOperator() override = default; - LogicalOperatorType type() const override { return LogicalOperatorType::UPDATE; } - Table *table() const { return table_; } - const std::vector &field_metas() const { return field_metas_; } - const std::vector &values() const { return values_; } + LogicalOperatorType type() const override { return LogicalOperatorType::UPDATE; } + Table *table() const { return table_; } + std::vector &field_metas() { return field_metas_; } + std::vector> &values() { return values_; } private: - Table *table_ = nullptr; - std::vector field_metas_; - std::vector values_; + Table *table_ = nullptr; + std::vector field_metas_; + std::vector> values_; }; diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 0db22451..59f8eca7 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -11,8 +11,7 @@ ***************************************************************/ #include "update_physical_operator.h" - -#include +#include "storage/trx/trx.h" RC UpdatePhysicalOperator::open(Trx *trx) { @@ -44,6 +43,60 @@ RC UpdatePhysicalOperator::open(Trx *trx) child->close(); + // 得到真正的 value,并做校验 + RowTuple tuple; + Value value; + std::vector real_values; + SubQueryExpr *sub_query_expr = nullptr; + for (int i = 0; i < values_.size(); ++i) { + auto &value_expr = values_[i]; + auto &field_meta = field_metas_[i]; + + if ((sub_query_expr = dynamic_cast(value_expr.get()))) { + sub_query_expr->open(trx_, tuple); + } + + // 得到表达式的值 + rc = value_expr->get_value(tuple, value); + if (OB_FAIL(rc)) { + LOG_ERROR("Failed to get value for field: %s", + field_meta.name()); + return rc; + } + + // 进行类型校验 + if (value.attr_type() != field_meta.type()) { + // 尝试转换,发生转换时不考虑数值溢出 + Value to_value; + // 更新不允许非目标类型的类型提升 + rc = Value::cast_to(value, field_meta.type(), to_value, false); + if (rc != RC::SUCCESS) { + LOG_ERROR("Schema field type mismatch and cast to failed. Field: %s, Expected Type: %s, Provided Type: %s", + field_meta.name(), + attr_type_to_string(field_meta.type()), + attr_type_to_string(value.attr_type())); + return RC::SCHEMA_FIELD_TYPE_MISMATCH; + } + // 转换成功 + value = std::move(to_value); + } else if (value.length() > field_meta.len()) { + LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", + field_meta.name(), + attr_type_to_string(field_meta.type()), + field_meta.offset(), + value.length(), + field_meta.len()); + return RC::VALUE_TOO_LONG; + } + + if (sub_query_expr) { + sub_query_expr->close(); + sub_query_expr = nullptr; + } + + real_values.emplace_back(std::move(value)); + } + // 先收集记录再更新 // 记录的有效性由事务来保证,如果事务不保证删除的有效性,那说明此事务类型不支持并发控制,比如VacuousTrx Record new_record; @@ -52,16 +105,16 @@ RC UpdatePhysicalOperator::open(Trx *trx) new_record.set_rid(old_record.rid()); new_record.copy_data(old_record.data(), old_record.len()); for (int i = 0; i < field_metas_.size(); ++i) { - new_record.set_field(field_metas_[i].offset(), field_metas_[i].len(), values_[i]); + new_record.set_field(field_metas_[i].offset(), field_metas_[i].len(), real_values[i]); if (field_metas_[i].nullable()) { auto null_offset = field_metas_[i].offset() + field_metas_[i].len() - 1; - if (values_[i].is_null()) { + if (real_values[i].is_null()) { new_record.data()[null_offset] = '1'; } else { new_record.data()[null_offset] = 0; } } else { - if (values_[i].is_null()) { + if (real_values[i].is_null()) { return RC::NOT_NULLABLE_VALUE; } } diff --git a/src/observer/sql/operator/update_physical_operator.h b/src/observer/sql/operator/update_physical_operator.h index 1ee5787e..a8e6c6d3 100644 --- a/src/observer/sql/operator/update_physical_operator.h +++ b/src/observer/sql/operator/update_physical_operator.h @@ -24,15 +24,14 @@ class UpdateStmt; class UpdatePhysicalOperator : public PhysicalOperator { public: - UpdatePhysicalOperator(Table *table, std::vector field_metas, std::vector values) + UpdatePhysicalOperator( + Table *table, std::vector field_metas, std::vector> values) : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)) {} ~UpdatePhysicalOperator() override = default; - PhysicalOperatorType type() const override { return PhysicalOperatorType::UPDATE; } - const std::vector &field_metas() const { return field_metas_; } - const std::vector &values() const { return values_; } + PhysicalOperatorType type() const override { return PhysicalOperatorType::UPDATE; } RC open(Trx *trx) override; RC next() override; @@ -41,9 +40,9 @@ class UpdatePhysicalOperator : public PhysicalOperator Tuple *current_tuple() override { return nullptr; } private: - Trx *trx_ = nullptr; - Table *table_ = nullptr; - std::vector field_metas_; - std::vector values_; - std::vector records_; + Trx *trx_ = nullptr; + Table *table_ = nullptr; + std::vector field_metas_; + std::vector> values_; + std::vector records_; }; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 312d5f8a..fee79b07 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -228,7 +228,7 @@ RC LogicalPlanGenerator::create_plan(UpdateStmt *update_stmt, unique_ptr(table, field_metas, values); + auto update_oper = std::make_unique(table, std::move(field_metas), std::move(values)); if (predicate_oper) { predicate_oper->add_child(std::move(table_get_oper)); diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index 32dc564d..5cc3b410 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -297,7 +297,8 @@ RC PhysicalPlanGenerator::create_plan(UpdateLogicalOperator &update_oper, std::u } } - oper = std::make_unique(update_oper.table(), update_oper.field_metas(), update_oper.values()); + oper = std::make_unique( + update_oper.table(), std::move(update_oper.field_metas()), std::move(update_oper.values())); if (child_physical_oper) { oper->add_child(std::move(child_physical_oper)); diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 0058ba41..69d8a3f5 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -525,6 +525,7 @@ RC ExpressionBinder::bind_aggregate_expression( bound_expressions.emplace_back(std::move(aggregate_expr)); return RC::SUCCESS; } + RC ExpressionBinder::bind_subquery_expression( std::unique_ptr &expr, std::vector> &bound_expressions) { @@ -544,6 +545,7 @@ RC ExpressionBinder::bind_subquery_expression( bound_expressions.emplace_back(std::move(expr)); return rc; } + RC ExpressionBinder::bind_exprlist_expression( std::unique_ptr &expr, std::vector> &bound_expressions) { diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index cd88ab85..917da14d 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -170,8 +170,8 @@ struct DeleteSqlNode */ struct SetClauseSqlNode { - std::string field_name; ///< 更新的字段 - Value value; ///< 更新的值 + std::string field_name; ///< 更新的字段 + std::unique_ptr value; ///< 更新的值 }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index a91e6d9a..7d72e7c2 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -990,42 +990,44 @@ static const yytype_int16 yyrline[] = {0, 546, 558, 572, - 578, - 586, - 596, - 625, - 658, - 667, - 676, - 692, - 695, - 698, - 701, - 704, - 713, - 716, - 721, - 727, - 730, - 733, - 740, - 743, - 746, - 751, - 759, - 766, - 773, - 778, - 788, - 794, - 804, - 821, - 828, - 840, - 843, - 849, - 853, - 857, + 577, + 584, + 594, + 623, + 656, + 665, + 674, + 690, + 693, + 696, + 699, + 702, + 711, + 714, + 719, + 725, + 728, + 731, + 738, + 741, + 744, + 749, + 757, + 764, + 771, + 776, + 786, + 792, + 802, + 819, + 826, + 838, + 841, + 847, + 851, + 855, + 862, + 863, 864, 865, 866, @@ -1036,21 +1038,19 @@ static const yytype_int16 yyrline[] = {0, 871, 872, 873, - 874, - 875, - 880, - 883, - 891, - 896, - 904, - 910, - 916, - 926, - 931, - 944, - 952, - 962, - 963}; + 878, + 881, + 889, + 894, + 902, + 908, + 914, + 924, + 929, + 942, + 950, + 960, + 961}; #endif /** Accessing symbol of state STATE. */ @@ -1216,17 +1216,17 @@ static const yytype_int16 yypact[] = {101, -155, -10, -2, - 24, + -24, -155, -155, -155, -155, -155, - 35, + 24, 10, 101, - 83, - 107, + 110, + 99, -155, -155, -155, @@ -1283,33 +1283,33 @@ static const yytype_int16 yypact[] = {101, 129, 87, -155, - 108, - 131, + 107, + 132, 133, 14, 100, -155, - 109, + 108, -155, 29, 29, 29, 29, 143, - 110, - 110, + 109, + 109, 127, 114, 111, -19, 113, 115, - 132, + 131, 117, -155, -155, -155, - 151, + 153, -155, -155, 15, @@ -1321,7 +1321,7 @@ static const yytype_int16 yypact[] = {101, 0, 114, -155, - 156, + 157, 29, -155, 126, @@ -1342,7 +1342,7 @@ static const yytype_int16 yypact[] = {101, 164, 102, -27, - -19, + 29, 111, -155, 179, @@ -1354,8 +1354,8 @@ static const yytype_int16 yypact[] = {101, 115, 168, 170, - 110, - 110, + 109, + 109, 183, 81, -155, @@ -1373,7 +1373,7 @@ static const yytype_int16 yypact[] = {101, 29, 29, 29, - -155, + 72, -155, 130, 135, @@ -1384,11 +1384,11 @@ static const yytype_int16 yypact[] = {101, 161, 145, 136, - 154, + 151, 114, 11, -155, - 193, + 196, -155, -155, -19, @@ -1414,24 +1414,24 @@ static const yytype_int16 yypact[] = {101, -155, 90, 17, - 153, + 154, 136, -155, 43, -155, 3, -155, - 186, + 185, -155, -155, 142, -155, - 157, + 156, -155, -155, 29, -155, - 110, + 109, -155, -155}; @@ -1670,7 +1670,7 @@ static const yytype_uint8 yydefact[] = {0, /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = {-155, -155, - 194, + 195, -155, -155, -155, @@ -1825,7 +1825,7 @@ static const yytype_uint8 yytable[] = {82, 116, 66, 188, - 167, + 67, 79, 81, 49, @@ -1865,7 +1865,7 @@ static const yytype_uint8 yytable[] = {82, 50, 51, 52, - 71, + 167, 53, 54, 87, @@ -1873,7 +1873,7 @@ static const yytype_uint8 yytable[] = {82, 165, 166, 170, - 67, + 68, 205, 152, 49, @@ -1884,7 +1884,7 @@ static const yytype_uint8 yytable[] = {82, 53, 54, 171, - 68, + 72, 172, 173, 184, @@ -1892,7 +1892,7 @@ static const yytype_uint8 yytable[] = {82, 128, 1, 2, - 72, + 71, 190, 134, 134, @@ -1937,8 +1937,8 @@ static const yytype_uint8 yytable[] = {82, 97, 18, 98, - 100, 99, + 100, 101, 116, 156, @@ -1957,12 +1957,12 @@ static const yytype_uint8 yytable[] = {82, 86, 87, 88, - 127, 105, 111, + 127, 118, - 132, 125, + 132, 122, 123, 136, @@ -1981,10 +1981,10 @@ static const yytype_uint8 yytable[] = {82, 189, 193, 198, - 204, + 202, 194, 196, - 202, + 204, 200, 165, 207, @@ -1992,10 +1992,10 @@ static const yytype_uint8 yytable[] = {82, 209, 210, 224, - 218, 223, - 70, + 218, 225, + 70, 197, 219, 217, @@ -2057,7 +2057,7 @@ static const yytype_int16 yycheck[] = {53, 44, 43, 63, - 136, + 67, 47, 40, 65, @@ -2097,7 +2097,7 @@ static const yytype_int16 yycheck[] = {53, 66, 67, 68, - 0, + 136, 70, 71, 71, @@ -2116,7 +2116,7 @@ static const yytype_int16 yycheck[] = {53, 70, 71, 34, - 67, + 3, 36, 37, 24, @@ -2124,7 +2124,7 @@ static const yytype_int16 yycheck[] = {53, 110, 7, 8, - 3, + 0, 164, 165, 166, @@ -2169,9 +2169,9 @@ static const yytype_int16 yycheck[] = {53, 23, 52, 67, - 24, 48, 24, + 24, 44, 57, 58, @@ -2189,12 +2189,12 @@ static const yytype_int16 yycheck[] = {53, 70, 71, 72, - 24, 67, 67, + 24, 67, - 23, 48, + 23, 68, 67, 57, @@ -2213,10 +2213,10 @@ static const yytype_int16 yycheck[] = {53, 34, 67, 53, - 6, + 48, 65, 36, - 48, + 6, 67, 45, 24, @@ -2224,10 +2224,10 @@ static const yytype_int16 yycheck[] = {53, 25, 24, 67, - 57, 25, - 18, + 57, 56, + 18, 175, 209, 207, @@ -2415,7 +2415,7 @@ static const yytype_int8 yystos[] = {0, 119, 45, 46, - 100, + 109, 105, 12, 23, @@ -3979,34 +3979,32 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 573 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; - (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); - delete (yyvsp[0].set_clause); + (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2256 "yacc_sql.cpp" +#line 2255 "yacc_sql.cpp" break; case 68: /* setClauses: setClauses COMMA setClause */ -#line 579 "yacc_sql.y" +#line 578 "yacc_sql.y" { - (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); - delete (yyvsp[0].set_clause); + (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2265 "yacc_sql.cpp" +#line 2263 "yacc_sql.cpp" break; - case 69: /* setClause: ID EQ value */ -#line 587 "yacc_sql.y" + case 69: /* setClause: ID EQ expression */ +#line 585 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2276 "yacc_sql.cpp" +#line 2274 "yacc_sql.cpp" break; case 70: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 597 "yacc_sql.y" +#line 595 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-5].expression_list) != nullptr) { @@ -4035,11 +4033,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].orderby_list); } } -#line 2309 "yacc_sql.cpp" +#line 2307 "yacc_sql.cpp" break; case 71: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 626 "yacc_sql.y" +#line 624 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4071,21 +4069,21 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2343 "yacc_sql.cpp" +#line 2341 "yacc_sql.cpp" break; case 72: /* calc_stmt: CALC expression_list */ -#line 659 "yacc_sql.y" +#line 657 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2353 "yacc_sql.cpp" +#line 2351 "yacc_sql.cpp" break; case 73: /* expression_list: expression alias */ -#line 668 "yacc_sql.y" +#line 666 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4094,11 +4092,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2366 "yacc_sql.cpp" +#line 2364 "yacc_sql.cpp" break; case 74: /* expression_list: expression alias COMMA expression_list */ -#line 677 "yacc_sql.y" +#line 675 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4111,47 +4109,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2383 "yacc_sql.cpp" +#line 2381 "yacc_sql.cpp" break; case 75: /* expression: expression '+' expression */ -#line 692 "yacc_sql.y" +#line 690 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2391 "yacc_sql.cpp" +#line 2389 "yacc_sql.cpp" break; case 76: /* expression: expression '-' expression */ -#line 695 "yacc_sql.y" +#line 693 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2399 "yacc_sql.cpp" +#line 2397 "yacc_sql.cpp" break; case 77: /* expression: expression '*' expression */ -#line 698 "yacc_sql.y" +#line 696 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2407 "yacc_sql.cpp" +#line 2405 "yacc_sql.cpp" break; case 78: /* expression: expression '/' expression */ -#line 701 "yacc_sql.y" +#line 699 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2415 "yacc_sql.cpp" +#line 2413 "yacc_sql.cpp" break; case 79: /* expression: LBRACE expression_list RBRACE */ -#line 704 "yacc_sql.y" +#line 702 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -4161,89 +4159,89 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2429 "yacc_sql.cpp" +#line 2427 "yacc_sql.cpp" break; case 80: /* expression: '-' expression */ -#line 713 "yacc_sql.y" +#line 711 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2437 "yacc_sql.cpp" +#line 2435 "yacc_sql.cpp" break; case 81: /* expression: value */ -#line 716 "yacc_sql.y" +#line 714 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2447 "yacc_sql.cpp" +#line 2445 "yacc_sql.cpp" break; case 82: /* expression: rel_attr */ -#line 721 "yacc_sql.y" +#line 719 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2458 "yacc_sql.cpp" +#line 2456 "yacc_sql.cpp" break; case 83: /* expression: '*' */ -#line 727 "yacc_sql.y" +#line 725 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2466 "yacc_sql.cpp" +#line 2464 "yacc_sql.cpp" break; case 84: /* expression: aggr_func_expr */ -#line 730 "yacc_sql.y" +#line 728 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2474 "yacc_sql.cpp" +#line 2472 "yacc_sql.cpp" break; case 85: /* expression: sub_query_expr */ -#line 733 "yacc_sql.y" +#line 731 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2482 "yacc_sql.cpp" +#line 2480 "yacc_sql.cpp" break; case 86: /* alias: %empty */ -#line 740 "yacc_sql.y" +#line 738 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2490 "yacc_sql.cpp" +#line 2488 "yacc_sql.cpp" break; case 87: /* alias: ID */ -#line 743 "yacc_sql.y" +#line 741 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2498 "yacc_sql.cpp" +#line 2496 "yacc_sql.cpp" break; case 88: /* alias: AS ID */ -#line 746 "yacc_sql.y" +#line 744 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2506 "yacc_sql.cpp" +#line 2504 "yacc_sql.cpp" break; case 89: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 752 "yacc_sql.y" +#line 750 "yacc_sql.y" { if ((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); @@ -4251,37 +4249,37 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2518 "yacc_sql.cpp" +#line 2516 "yacc_sql.cpp" break; case 90: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 760 "yacc_sql.y" +#line 758 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); } -#line 2526 "yacc_sql.cpp" +#line 2524 "yacc_sql.cpp" break; case 91: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 767 "yacc_sql.y" +#line 765 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2534 "yacc_sql.cpp" +#line 2532 "yacc_sql.cpp" break; case 92: /* rel_attr: ID */ -#line 773 "yacc_sql.y" +#line 771 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2544 "yacc_sql.cpp" +#line 2542 "yacc_sql.cpp" break; case 93: /* rel_attr: ID DOT ID */ -#line 778 "yacc_sql.y" +#line 776 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -4289,19 +4287,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2556 "yacc_sql.cpp" +#line 2554 "yacc_sql.cpp" break; case 94: /* relation: ID */ -#line 788 "yacc_sql.y" +#line 786 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2564 "yacc_sql.cpp" +#line 2562 "yacc_sql.cpp" break; case 95: /* rel_list: relation alias */ -#line 794 "yacc_sql.y" +#line 792 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if (nullptr != (yyvsp[0].string)) { @@ -4312,11 +4310,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2579 "yacc_sql.cpp" +#line 2577 "yacc_sql.cpp" break; case 96: /* rel_list: relation alias COMMA rel_list */ -#line 804 "yacc_sql.y" +#line 802 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -4332,22 +4330,22 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-3].string)); } -#line 2598 "yacc_sql.cpp" +#line 2596 "yacc_sql.cpp" break; case 97: /* joinClauses: relation ON condition */ -#line 822 "yacc_sql.y" +#line 820 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2609 "yacc_sql.cpp" +#line 2607 "yacc_sql.cpp" break; case 98: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 829 "yacc_sql.y" +#line 827 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -4356,222 +4354,222 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2621 "yacc_sql.cpp" +#line 2619 "yacc_sql.cpp" break; case 99: /* where: %empty */ -#line 840 "yacc_sql.y" +#line 838 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2629 "yacc_sql.cpp" +#line 2627 "yacc_sql.cpp" break; case 100: /* where: WHERE condition */ -#line 843 "yacc_sql.y" +#line 841 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2637 "yacc_sql.cpp" +#line 2635 "yacc_sql.cpp" break; case 101: /* condition: expression comp_op expression */ -#line 850 "yacc_sql.y" +#line 848 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2645 "yacc_sql.cpp" +#line 2643 "yacc_sql.cpp" break; case 102: /* condition: condition AND condition */ -#line 854 "yacc_sql.y" +#line 852 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2653 "yacc_sql.cpp" +#line 2651 "yacc_sql.cpp" break; case 103: /* condition: condition OR condition */ -#line 858 "yacc_sql.y" +#line 856 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2661 "yacc_sql.cpp" +#line 2659 "yacc_sql.cpp" break; case 104: /* comp_op: EQ */ -#line 864 "yacc_sql.y" +#line 862 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2667 "yacc_sql.cpp" +#line 2665 "yacc_sql.cpp" break; case 105: /* comp_op: LT */ -#line 865 "yacc_sql.y" +#line 863 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2673 "yacc_sql.cpp" +#line 2671 "yacc_sql.cpp" break; case 106: /* comp_op: GT */ -#line 866 "yacc_sql.y" +#line 864 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2679 "yacc_sql.cpp" +#line 2677 "yacc_sql.cpp" break; case 107: /* comp_op: LE */ -#line 867 "yacc_sql.y" +#line 865 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2685 "yacc_sql.cpp" +#line 2683 "yacc_sql.cpp" break; case 108: /* comp_op: GE */ -#line 868 "yacc_sql.y" +#line 866 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2691 "yacc_sql.cpp" +#line 2689 "yacc_sql.cpp" break; case 109: /* comp_op: NE */ -#line 869 "yacc_sql.y" +#line 867 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2697 "yacc_sql.cpp" +#line 2695 "yacc_sql.cpp" break; case 110: /* comp_op: IS */ -#line 870 "yacc_sql.y" +#line 868 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2703 "yacc_sql.cpp" +#line 2701 "yacc_sql.cpp" break; case 111: /* comp_op: IS NOT */ -#line 871 "yacc_sql.y" +#line 869 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2709 "yacc_sql.cpp" +#line 2707 "yacc_sql.cpp" break; case 112: /* comp_op: LIKE */ -#line 872 "yacc_sql.y" +#line 870 "yacc_sql.y" { (yyval.comp) = LIKE_OP; } -#line 2715 "yacc_sql.cpp" +#line 2713 "yacc_sql.cpp" break; case 113: /* comp_op: NOT LIKE */ -#line 873 "yacc_sql.y" +#line 871 "yacc_sql.y" { (yyval.comp) = NOT_LIKE_OP; } -#line 2721 "yacc_sql.cpp" +#line 2719 "yacc_sql.cpp" break; case 114: /* comp_op: IN */ -#line 874 "yacc_sql.y" +#line 872 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2727 "yacc_sql.cpp" +#line 2725 "yacc_sql.cpp" break; case 115: /* comp_op: NOT IN */ -#line 875 "yacc_sql.y" +#line 873 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2733 "yacc_sql.cpp" +#line 2731 "yacc_sql.cpp" break; case 116: /* opt_order_by: %empty */ -#line 880 "yacc_sql.y" +#line 878 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2741 "yacc_sql.cpp" +#line 2739 "yacc_sql.cpp" break; case 117: /* opt_order_by: ORDER BY sort_list */ -#line 884 "yacc_sql.y" +#line 882 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } -#line 2750 "yacc_sql.cpp" +#line 2748 "yacc_sql.cpp" break; case 118: /* sort_list: sort_unit */ -#line 892 "yacc_sql.y" +#line 890 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2759 "yacc_sql.cpp" +#line 2757 "yacc_sql.cpp" break; case 119: /* sort_list: sort_unit COMMA sort_list */ -#line 897 "yacc_sql.y" +#line 895 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2768 "yacc_sql.cpp" +#line 2766 "yacc_sql.cpp" break; case 120: /* sort_unit: expression */ -#line 905 "yacc_sql.y" +#line 903 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2778 "yacc_sql.cpp" +#line 2776 "yacc_sql.cpp" break; case 121: /* sort_unit: expression DESC */ -#line 911 "yacc_sql.y" +#line 909 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2788 "yacc_sql.cpp" +#line 2786 "yacc_sql.cpp" break; case 122: /* sort_unit: expression ASC */ -#line 917 "yacc_sql.y" +#line 915 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2798 "yacc_sql.cpp" +#line 2796 "yacc_sql.cpp" break; case 123: /* group_by: %empty */ -#line 926 "yacc_sql.y" +#line 924 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2806 "yacc_sql.cpp" +#line 2804 "yacc_sql.cpp" break; case 124: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 932 "yacc_sql.y" +#line 930 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -4581,20 +4579,20 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); free(tmp_file_name); } -#line 2820 "yacc_sql.cpp" +#line 2818 "yacc_sql.cpp" break; case 125: /* explain_stmt: EXPLAIN command_wrapper */ -#line 945 "yacc_sql.y" +#line 943 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2829 "yacc_sql.cpp" +#line 2827 "yacc_sql.cpp" break; case 126: /* set_variable_stmt: SET ID EQ value */ -#line 953 "yacc_sql.y" +#line 951 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -4602,10 +4600,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2841 "yacc_sql.cpp" +#line 2839 "yacc_sql.cpp" break; -#line 2845 "yacc_sql.cpp" +#line 2843 "yacc_sql.cpp" default: break; } @@ -4804,7 +4802,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) return yyresult; } -#line 965 "yacc_sql.y" +#line 963 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 4c241501..c9b396a6 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -572,22 +572,20 @@ setClauses: setClause { $$ = new std::vector; - $$->emplace_back(*$1); - delete $1; + $$->emplace_back(std::move(*$1)); } | setClauses COMMA setClause { - $$->emplace_back(*$3); - delete $3; + $$->emplace_back(std::move(*$3)); } ; setClause: - ID EQ value + ID EQ expression { $$ = new SetClauseSqlNode; $$->field_name = $1; - $$->value = std::move(*$3); + $$->value = std::unique_ptr($3); free($1); } ; diff --git a/src/observer/sql/stmt/update_stmt.cpp b/src/observer/sql/stmt/update_stmt.cpp index d6eaed01..a82492ba 100644 --- a/src/observer/sql/stmt/update_stmt.cpp +++ b/src/observer/sql/stmt/update_stmt.cpp @@ -20,8 +20,8 @@ See the Mulan PSL v2 for more details. */ #include -UpdateStmt::UpdateStmt( - Table *table, std::vector field_metas, std::vector values, FilterStmt *filter_stmt) +UpdateStmt::UpdateStmt(Table *table, std::vector field_metas, + std::vector> values, FilterStmt *filter_stmt) : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)), filter_stmt_(filter_stmt) {} @@ -34,7 +34,10 @@ RC UpdateStmt::create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt) set_clauses_logger << "invalid argument. db=" << db << ", table_name=" << table_name; set_clauses_logger << ", set_clauses=["; for (const auto &clause : update_sql.set_clauses) { - set_clauses_logger << "{" << clause.field_name << ": " << clause.value.to_string() << "}, "; + // 实现表达式打印 + // set_clauses_logger << "{" << clause.field_name << ": " << clause.value.to_string() << "}, "; + set_clauses_logger << "{" << clause.field_name << ": " + << "}, "; } set_clauses_logger << "]"; LOG_WARN("%s", set_clauses_logger.str().c_str()); @@ -48,59 +51,58 @@ RC UpdateStmt::create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt) return RC::SCHEMA_TABLE_NOT_EXIST; } - auto table_meta = table->table_meta(); - std::vector field_metas; - std::vector values; + auto table_meta = table->table_meta(); + std::vector field_metas; + std::vector> values; + RC rc = RC::SUCCESS; for (auto &clause : update_sql.set_clauses) { // check whether the field exists auto field_meta = table_meta.field(clause.field_name.c_str()); if (field_meta == nullptr) { - LOG_WARN("no such field. db=%s, table_name=%s", db->name(), table_name); + LOG_WARN("Field does not exist. db=%s, table_name=%s, field_name=%s", + db->name(), table_name, clause.field_name.c_str()); return RC::SCHEMA_FIELD_NOT_EXIST; } - // check whether the value valid - auto value = clause.value; - if (value.attr_type() != field_meta->type()) { - // 尝试转换,发生转换时不考虑数值溢出 - Value to_value; - // 更新不允许非目标类型的类型提升 - RC rc = Value::cast_to(value, field_meta->type(), to_value, false); - if (rc != RC::SUCCESS) { - LOG_ERROR("Schema field type mismatch and cast to failed. Field: %s, Expected Type: %s, Provided Type: %s", - field_meta->name(), - attr_type_to_string(field_meta->type()), - attr_type_to_string(value.attr_type())); - return RC::SCHEMA_FIELD_TYPE_MISMATCH; - } - // 转换成功 - value = std::move(to_value); - } else if (value.length() > field_meta->len()) { - LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", - field_meta->name(), - attr_type_to_string(field_meta->type()), - field_meta->offset(), - value.length(), - field_meta->len()); - return RC::VALUE_TOO_LONG; + // check whether the value is valid + std::unordered_map table_map; + table_map.insert(std::pair(std::string(table_name), table)); + + vector> expressions; + BinderContext binder_context; + + binder_context.add_table(table); + binder_context.add_db(db); + binder_context.set_tables(&table_map); + binder_context.set_default_table(table); + + ExpressionBinder expression_binder(binder_context); + rc = expression_binder.bind_expression(clause.value, expressions); + + if (OB_FAIL(rc)) { + LOG_WARN("Failed to bind expression for field: %s", + clause.field_name.c_str()); + return rc; } + // 表达式值类型检查延迟到 UpdatePhysicalOperator 阶段 + field_metas.emplace_back(*field_meta); - values.emplace_back(value); + values.emplace_back(std::move(expressions[0])); } std::unordered_map table_map; table_map.insert(std::pair(std::string(table_name), table)); FilterStmt *filter_stmt = nullptr; - RC rc = FilterStmt::create(db, table, &table_map, update_sql.conditions, filter_stmt); + rc = FilterStmt::create(db, table, &table_map, update_sql.conditions, filter_stmt); if (rc != RC::SUCCESS) { LOG_WARN("failed to create filter statement. rc=%d:%s", rc, strrc(rc)); return rc; } // everything alright - stmt = new UpdateStmt(table, field_metas, values, filter_stmt); + stmt = new UpdateStmt(table, std::move(field_metas), std::move(values), filter_stmt); return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/update_stmt.h b/src/observer/sql/stmt/update_stmt.h index 13153107..9e66b0f8 100644 --- a/src/observer/sql/stmt/update_stmt.h +++ b/src/observer/sql/stmt/update_stmt.h @@ -29,20 +29,21 @@ class UpdateStmt : public Stmt { public: UpdateStmt() = default; - UpdateStmt(Table *table, std::vector field_metas, std::vector values, FilterStmt *filter_stmt); + UpdateStmt(Table *table, std::vector field_metas, std::vector> values, + FilterStmt *filter_stmt); StmtType type() const override { return StmtType::UPDATE; } - Table *table() const { return table_; } - const std::vector &field_metas() const { return field_metas_; } - const std::vector &values() const { return values_; } - FilterStmt *filter_stmt() const { return filter_stmt_; } + Table *table() const { return table_; } + std::vector &field_metas() { return field_metas_; } + std::vector> &values() { return values_; } + FilterStmt *filter_stmt() const { return filter_stmt_; } static RC create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt); private: - Table *table_ = nullptr; - std::vector field_metas_; - std::vector values_; - FilterStmt *filter_stmt_ = nullptr; + Table *table_ = nullptr; + std::vector field_metas_; + std::vector> values_; + FilterStmt *filter_stmt_ = nullptr; }; From a6fc8a77c4ead64ea64018fe5cb6de6af2f8ad05 Mon Sep 17 00:00:00 2001 From: Koschei Date: Fri, 4 Oct 2024 04:25:30 +0800 Subject: [PATCH 115/308] =?UTF-8?q?fix:=20update-select=20=E4=B8=AD?= =?UTF-8?q?=E5=8F=AA=E5=85=81=E8=AE=B8=E5=AD=90=E6=9F=A5=E8=AF=A2=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=B8=80=E8=A1=8C=E4=B8=80=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 3 ++- src/observer/sql/operator/update_physical_operator.cpp | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 0335954b..7cccf7d8 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -81,7 +81,8 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(VALUE_TOO_LONG) \ DEFINE_RC(TO_LONG_SUBQUERY_EXPR) \ DEFINE_RC(NOT_NULLABLE_VALUE) \ - DEFINE_RC(NOT_NULL_AFTER_IS) + DEFINE_RC(NOT_NULL_AFTER_IS) \ + DEFINE_RC(SUBQUERY_RETURNED_MULTIPLE_ROWS) enum class RC { diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 59f8eca7..bc119928 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -64,6 +64,13 @@ RC UpdatePhysicalOperator::open(Trx *trx) return rc; } + // 如果是子查询只能有一行一列 + if (sub_query_expr && sub_query_expr->has_more_row(tuple)) { + LOG_ERROR("Subquery returned more than one row for field: %s", + field_meta.name()); + return RC::SUBQUERY_RETURNED_MULTIPLE_ROWS; + } + // 进行类型校验 if (value.attr_type() != field_meta.type()) { // 尝试转换,发生转换时不考虑数值溢出 From 0a51ffbbfe0b92f7fef0d6ac27e2e3aa76201778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Fri, 4 Oct 2024 07:11:36 +0000 Subject: [PATCH 116/308] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86exists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 12 + src/observer/sql/parser/expression_binder.cpp | 50 +- src/observer/sql/parser/expression_binder.h | 2 - src/observer/sql/parser/lex_sql.cpp | 5421 ++++++----------- src/observer/sql/parser/lex_sql.h | 249 +- src/observer/sql/parser/yacc_sql.cpp | 4972 +++++---------- src/observer/sql/parser/yacc_sql.hpp | 221 +- src/observer/sql/parser/yacc_sql.y | 9 + test/case/miniob_test.py | 2 +- 9 files changed, 3660 insertions(+), 7278 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index bc8968c0..2d1f7449 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -246,6 +246,18 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) DEFER(if (nullptr != left_subquery_expr) left_subquery_expr->close(); if (nullptr != right_subquery_expr) right_subquery_expr->close();); + if (comp_ == EXISTS_OP || comp_ == NOT_EXISTS_OP) { + int visited_num = 0; + while (RC::SUCCESS == (rc = right_->get_value(tuple, right_value))) { + if (!right_value.is_null()) { + visited_num++; + } + } + + value.set_boolean(comp_ == EXISTS_OP ? (visited_num > 0) : visited_num = 0); + return RC::SUCCESS; + } + // Get the value of the left expression rc = left_->get_value(tuple, left_value); if (rc != RC::SUCCESS) { diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 0058ba41..7b188786 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -30,28 +30,6 @@ Table *BinderContext::find_table(const char *table_name) const } return iter->second; } -bool BinderContext::only_one_table() -{ - { - if (query_tables_.empty()) { - return false; // 如果列表为空,返回false - } else if (query_tables_.size() == 1) { - return true; - } - - // 获取第一个表指针作为基准 - Table *first_table = query_tables_[0]; - - // 遍历整个向量,检查所有的表是否与第一个表相同 - for (size_t i = 1; i < query_tables_.size(); ++i) { - if (query_tables_[i] != first_table) { - return false; // 如果有不同的表,返回false - } - } - - return true; // 如果所有的表都是一样的,返回true - } -} //////////////////////////////////////////////////////////////////////////////// static void wildcard_fields(Table *table, vector> &expressions, bool multi_tables = false) @@ -285,8 +263,9 @@ RC ExpressionBinder::bind_cast_expression( RC ExpressionBinder::bind_comparison_expression( unique_ptr &expr, vector> &bound_expressions) { + RC rc = RC::SUCCESS; if (nullptr == expr) { - return RC::SUCCESS; + return rc; } auto comparison_expr = dynamic_cast(expr.get()); @@ -295,21 +274,22 @@ RC ExpressionBinder::bind_comparison_expression( unique_ptr &left_expr = comparison_expr->left(); unique_ptr &right_expr = comparison_expr->right(); - RC rc = bind_expression(left_expr, child_bound_expressions); - if (rc != RC::SUCCESS) { - return rc; - } + if (nullptr != left_expr) { + rc = bind_expression(left_expr, child_bound_expressions); + if (rc != RC::SUCCESS) { + return rc; + } - if (child_bound_expressions.size() != 1) { - LOG_WARN("invalid left children number of comparison expression: %d", child_bound_expressions.size()); - return RC::INVALID_ARGUMENT; - } + if (child_bound_expressions.size() != 1) { + LOG_WARN("invalid left children number of comparison expression: %d", child_bound_expressions.size()); + return RC::INVALID_ARGUMENT; + } - unique_ptr &left = child_bound_expressions[0]; - if (left.get() != left_expr.get()) { - left_expr = std::move(left); + unique_ptr &left = child_bound_expressions[0]; + if (left.get() != left_expr.get()) { + left_expr = std::move(left); + } } - child_bound_expressions.clear(); rc = bind_expression(right_expr, child_bound_expressions); if (rc != RC::SUCCESS) { diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index 49166a30..63577ac5 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -36,8 +36,6 @@ class BinderContext const std::vector
&query_tables() const { return query_tables_; } std::unordered_map &table_map() { return *tables_; } - bool only_one_table(); - private: Db *db_; diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 4e463496..b39ebdb0 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,4 +1,4 @@ -#line 1 "lex_sql.cpp" +#line 2 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -8,21 +8,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); -#line 25 "lex_sql.cpp" +#line 26 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -75,62 +77,61 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -154,12 +155,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -187,7 +188,7 @@ typedef void *yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin, yyscanner) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -205,7 +206,7 @@ typedef void *yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -220,85 +221,88 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -307,55 +311,59 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -static void yyensure_buffer_stack(yyscan_t yyscanner); -static void yy_load_buffer_state(yyscan_t yyscanner); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -363,2377 +371,311 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state(yyscan_t yyscanner); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); -static int yy_get_next_buffer(yyscan_t yyscanner); -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t)(yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 76 #define YY_END_OF_BUFFER 77 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info -{ - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[219] = {0, - 0, - 0, - 0, - 0, - 77, - 75, - 1, - 2, - 75, - 75, - 75, - 55, - 56, - 71, - 69, - 57, - 70, - 6, - 72, - 3, - 5, - 62, - 58, - 64, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 76, - 61, - 0, - 73, - 0, - 74, - 3, - 0, - 59, - 60, - 63, - 68, - 68, - 68, - 47, - 68, - 46, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 49, - 66, - 68, - 68, - 68, - 68, - 68, - 15, - 23, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 4, - 22, - 48, - 68, - 68, - 68, - 68, - - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 33, - 68, - 68, - 68, - 65, - 68, - 68, - 68, - 68, - 29, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 19, - 34, - 68, - 68, - 41, - 36, - 68, - 9, - 11, - 68, - 7, - 68, - 68, - 68, - 20, - 68, - 8, - 68, - 68, - 68, - 68, - 25, - 54, - 67, - 40, - 38, - 68, - 68, - 68, - 16, - 68, - 17, - 68, - 68, - 68, - 68, - 68, - 30, - 68, - 68, - 68, - 68, - 68, - 35, - 68, - 44, - 14, - 68, - 53, - 68, - 68, - 45, - 68, - 68, - 68, - 12, - 68, - 68, - 68, - 21, - 31, - 10, - 27, - 50, - 68, - - 52, - 42, - 24, - 68, - 68, - 18, - 68, - 13, - 37, - 28, - 26, - 43, - 68, - 68, - 51, - 39, - 32, - 0}; - -static const YY_CHAR yy_ec[256] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 3, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 4, - 5, - 1, - 1, - 1, - 1, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 1, - 16, - 17, - 18, - 19, - 1, - 1, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 1, - 1, - 1, - 1, - 45, - 1, - 46, - 47, - 48, - 49, - - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 45, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1}; - -static const YY_CHAR yy_meta[71] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2}; - -static const flex_int16_t yy_base[224] = {0, - 0, - 0, - 0, - 0, - 592, - 593, - 593, - 593, - 573, - 585, - 583, - 593, - 593, - 593, - 593, - 593, - 573, - 593, - 593, - 58, - 593, - 56, - 593, - 569, - 57, - 61, - 62, - 63, - 64, - 83, - 65, - 69, - 91, - 76, - 571, - 117, - 108, - 97, - 103, - 120, - 134, - 143, - 137, - 112, - 593, - 593, - 580, - 593, - 578, - 593, - 73, - 568, - 593, - 593, - 593, - 0, - 567, - 138, - 147, - 160, - 566, - 151, - 152, - 164, - 169, - 166, - 176, - 177, - 182, - 179, - 184, - 186, - 191, - 185, - 237, - 565, - 200, - 173, - 203, - 209, - 226, - 564, - 212, - 235, - 238, - 211, - 229, - 223, - 243, - 240, - 244, - 250, - 263, - 563, - 555, - 554, - 257, - 258, - 282, - 276, - - 264, - 285, - 297, - 300, - 283, - 289, - 299, - 305, - 284, - 308, - 309, - 302, - 314, - 311, - 317, - 328, - 321, - 335, - 345, - 347, - 553, - 342, - 356, - 343, - 361, - 551, - 344, - 346, - 357, - 362, - 367, - 369, - 373, - 377, - 375, - 550, - 548, - 376, - 382, - 544, - 543, - 383, - 542, - 541, - 386, - 540, - 387, - 402, - 403, - 539, - 401, - 538, - 395, - 411, - 409, - 413, - 534, - 533, - 532, - 531, - 412, - 416, - 422, - 430, - 529, - 439, - 527, - 420, - 440, - 442, - 441, - 451, - 518, - 445, - 458, - 459, - 448, - 462, - 516, - 456, - 513, - 489, - 472, - 484, - 474, - 473, - 483, - 477, - 478, - 485, - 487, - 490, - 500, - 488, - 446, - 405, - 372, - 331, - 318, - 503, - - 219, - 217, - 215, - 504, - 512, - 194, - 514, - 174, - 126, - 123, - 89, - 88, - 517, - 515, - 86, - 82, - 79, - 593, - 571, - 573, - 575, - 90, - 79}; - -static const flex_int16_t yy_def[224] = {0, - 218, - 1, - 219, - 219, - 218, - 218, - 218, - 218, - 218, - 220, - 221, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 218, - 218, - 220, - 218, - 221, - 218, - 218, - 218, - 218, - 218, - 218, - 223, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 218, - 222, - 222, - 222, - 222, - 222, - 222, - - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 0, - 218, - 218, - 218, - 218, - 218}; - -static const flex_int16_t yy_nxt[664] = {0, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 35, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 52, - 56, - 51, - 53, - 54, - 56, - 56, - 56, - 56, - 56, - 56, - 62, - 66, - 56, - 60, - 52, - 67, - 51, - 63, - 58, - 56, - 57, - 74, - 56, - 59, - 64, - 56, - 56, - 65, - 68, - - 56, - 73, - 56, - 56, - 61, - 56, - 69, - 62, - 66, - 77, - 60, - 56, - 67, - 70, - 63, - 58, - 71, - 56, - 74, - 72, - 59, - 64, - 56, - 75, - 65, - 68, - 56, - 73, - 76, - 82, - 61, - 56, - 69, - 83, - 56, - 77, - 84, - 56, - 93, - 70, - 56, - 80, - 71, - 85, - 78, - 72, - 86, - 81, - 56, - 75, - 79, - 56, - 56, - 89, - 76, - 82, - 92, - 56, - 87, - 83, - 95, - 56, - 84, - 88, - 93, - 56, - 56, - 80, - 96, - 85, - 78, - 99, - 86, - 81, - 56, - 90, - 79, - 91, - 56, - 89, - 56, - 98, - 92, - 56, - 87, - 97, - 95, - 56, - 56, - 88, - 56, - 56, - 101, - 56, - 96, - 100, - 56, - 99, - 56, - 56, - - 56, - 90, - 119, - 91, - 102, - 56, - 103, - 98, - 56, - 106, - 105, - 97, - 108, - 104, - 56, - 112, - 107, - 56, - 101, - 110, - 109, - 100, - 120, - 56, - 111, - 56, - 56, - 118, - 119, - 56, - 102, - 56, - 103, - 56, - 123, - 106, - 105, - 56, - 108, - 104, - 56, - 112, - 107, - 56, - 127, - 110, - 109, - 121, - 120, - 56, - 111, - 56, - 56, - 118, - 56, - 129, - 122, - 56, - 56, - 113, - 123, - 114, - 128, - 130, - 56, - 124, - 132, - 131, - 125, - 115, - 127, - 56, - 56, - 121, - 116, - 117, - 126, - 56, - 56, - 136, - 133, - 129, - 122, - 139, - 135, - 113, - 134, - 114, - 128, - 130, - 56, - 124, - 132, - 131, - 125, - 115, - 56, - 56, - 56, - 56, - - 116, - 117, - 126, - 56, - 140, - 136, - 133, - 138, - 141, - 139, - 135, - 56, - 134, - 56, - 56, - 149, - 56, - 144, - 137, - 56, - 142, - 143, - 56, - 56, - 148, - 56, - 145, - 146, - 56, - 147, - 140, - 56, - 56, - 138, - 141, - 56, - 152, - 153, - 154, - 150, - 155, - 149, - 56, - 144, - 137, - 56, - 142, - 143, - 151, - 56, - 148, - 156, - 145, - 146, - 157, - 147, - 56, - 56, - 56, - 56, - 56, - 56, - 152, - 153, - 154, - 150, - 155, - 158, - 159, - 160, - 56, - 56, - 161, - 163, - 151, - 56, - 56, - 156, - 167, - 162, - 157, - 56, - 166, - 56, - 164, - 165, - 56, - 56, - 170, - 56, - 56, - 56, - 168, - 158, - 159, - 160, - 56, - 56, - 161, - 163, - - 56, - 56, - 169, - 174, - 167, - 162, - 178, - 173, - 166, - 56, - 164, - 165, - 171, - 172, - 170, - 56, - 56, - 56, - 168, - 56, - 175, - 176, - 180, - 56, - 177, - 56, - 56, - 56, - 169, - 174, - 56, - 186, - 178, - 173, - 56, - 181, - 56, - 182, - 171, - 172, - 179, - 183, - 188, - 191, - 56, - 184, - 175, - 176, - 180, - 185, - 177, - 189, - 187, - 56, - 56, - 56, - 56, - 186, - 190, - 56, - 56, - 181, - 56, - 182, - 194, - 56, - 179, - 183, - 188, - 191, - 56, - 184, - 56, - 56, - 195, - 185, - 56, - 189, - 187, - 192, - 193, - 197, - 198, - 196, - 190, - 199, - 56, - 56, - 56, - 200, - 194, - 56, - 56, - 204, - 201, - 202, - 205, - 56, - 56, - 56, - - 195, - 56, - 56, - 56, - 56, - 192, - 193, - 197, - 198, - 196, - 207, - 199, - 203, - 209, - 56, - 200, - 206, - 56, - 56, - 204, - 201, - 202, - 205, - 210, - 208, - 211, - 56, - 56, - 56, - 56, - 56, - 56, - 56, - 214, - 213, - 212, - 207, - 215, - 203, - 209, - 216, - 56, - 206, - 56, - 217, - 56, - 56, - 56, - 56, - 210, - 208, - 211, - 56, - 56, - 56, - 56, - 56, - 56, - 56, - 214, - 213, - 212, - 56, - 215, - 56, - 56, - 216, - 56, - 56, - 56, - 217, - 45, - 45, - 47, - 47, - 49, - 49, - 94, - 56, - 56, - 56, - 56, - 94, - 50, - 48, - 56, - 55, - 51, - 50, - 48, - 46, - 218, - 5, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218}; - -static const flex_int16_t yy_chk[664] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 20, - 25, - 20, - 22, - 22, - 26, - 27, - 28, - 29, - 31, - 223, - 27, - 28, - 32, - 26, - 51, - 28, - 51, - 27, - 25, - 34, - 222, - 32, - 217, - 25, - 27, - 216, - 30, - 27, - 28, - - 215, - 31, - 212, - 211, - 26, - 33, - 29, - 27, - 28, - 34, - 26, - 38, - 28, - 30, - 27, - 25, - 30, - 39, - 32, - 30, - 25, - 27, - 37, - 33, - 27, - 28, - 44, - 31, - 33, - 38, - 26, - 36, - 29, - 38, - 40, - 34, - 39, - 210, - 44, - 30, - 209, - 37, - 30, - 40, - 36, - 30, - 40, - 37, - 41, - 33, - 36, - 43, - 58, - 41, - 33, - 38, - 43, - 42, - 40, - 38, - 58, - 59, - 39, - 40, - 44, - 62, - 63, - 37, - 59, - 40, - 36, - 63, - 40, - 37, - 60, - 42, - 36, - 42, - 64, - 41, - 66, - 62, - 43, - 65, - 40, - 60, - 58, - 78, - 208, - 40, - 67, - 68, - 65, - 70, - 59, - 64, - 69, - 63, - 71, - 74, - - 72, - 42, - 78, - 42, - 66, - 73, - 67, - 62, - 206, - 69, - 68, - 60, - 70, - 67, - 77, - 74, - 69, - 79, - 65, - 72, - 71, - 64, - 79, - 80, - 73, - 86, - 83, - 77, - 78, - 203, - 66, - 202, - 67, - 201, - 83, - 69, - 68, - 88, - 70, - 67, - 81, - 74, - 69, - 87, - 86, - 72, - 71, - 80, - 79, - 84, - 73, - 75, - 85, - 77, - 90, - 88, - 81, - 89, - 91, - 75, - 83, - 75, - 87, - 89, - 92, - 84, - 91, - 90, - 85, - 75, - 86, - 97, - 98, - 80, - 75, - 75, - 85, - 93, - 101, - 98, - 92, - 88, - 81, - 101, - 97, - 75, - 93, - 75, - 87, - 89, - 100, - 84, - 91, - 90, - 85, - 75, - 99, - 105, - 109, - 102, - - 75, - 75, - 85, - 106, - 102, - 98, - 92, - 100, - 102, - 101, - 97, - 103, - 93, - 107, - 104, - 109, - 112, - 105, - 99, - 108, - 103, - 104, - 110, - 111, - 108, - 114, - 106, - 106, - 113, - 107, - 102, - 115, - 199, - 100, - 102, - 117, - 112, - 113, - 114, - 110, - 115, - 109, - 116, - 105, - 99, - 198, - 103, - 104, - 111, - 118, - 108, - 116, - 106, - 106, - 117, - 107, - 122, - 124, - 127, - 119, - 128, - 120, - 112, - 113, - 114, - 110, - 115, - 118, - 119, - 120, - 123, - 129, - 122, - 124, - 111, - 125, - 130, - 116, - 129, - 123, - 117, - 131, - 128, - 132, - 125, - 127, - 197, - 133, - 132, - 135, - 138, - 134, - 130, - 118, - 119, - 120, - 139, - 142, - 122, - 124, - - 145, - 147, - 131, - 138, - 129, - 123, - 147, - 135, - 128, - 153, - 125, - 127, - 133, - 134, - 132, - 151, - 148, - 149, - 130, - 196, - 139, - 142, - 149, - 155, - 145, - 154, - 161, - 156, - 131, - 138, - 162, - 161, - 147, - 135, - 168, - 151, - 163, - 153, - 133, - 134, - 148, - 154, - 163, - 168, - 164, - 155, - 139, - 142, - 149, - 156, - 145, - 164, - 162, - 166, - 169, - 171, - 170, - 161, - 166, - 174, - 195, - 151, - 177, - 153, - 171, - 172, - 148, - 154, - 163, - 168, - 180, - 155, - 175, - 176, - 172, - 156, - 178, - 164, - 162, - 169, - 170, - 175, - 176, - 174, - 166, - 177, - 183, - 186, - 185, - 178, - 171, - 188, - 189, - 186, - 180, - 183, - 188, - 187, - 184, - 190, - - 172, - 191, - 194, - 182, - 192, - 169, - 170, - 175, - 176, - 174, - 190, - 177, - 185, - 192, - 193, - 178, - 189, - 200, - 204, - 186, - 180, - 183, - 188, - 193, - 191, - 194, - 205, - 181, - 207, - 214, - 179, - 213, - 173, - 205, - 204, - 200, - 190, - 207, - 185, - 192, - 213, - 167, - 189, - 165, - 214, - 160, - 159, - 158, - 157, - 193, - 191, - 194, - 152, - 150, - 146, - 144, - 143, - 141, - 140, - 205, - 204, - 200, - 137, - 207, - 136, - 126, - 213, - 121, - 96, - 95, - 214, - 219, - 219, - 220, - 220, - 221, - 221, - 94, - 82, - 76, - 61, - 57, - 52, - 49, - 47, - 35, - 24, - 17, - 11, - 10, - 9, - 5, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218}; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[219] = + { 0, + 0, 0, 0, 0, 77, 75, 1, 2, 75, 75, + 75, 55, 56, 71, 69, 57, 70, 6, 72, 3, + 5, 62, 58, 64, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 76, 61, 0, 73, 0, 74, + 3, 0, 59, 60, 63, 68, 68, 68, 47, 68, + 46, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 49, 66, 68, 68, 68, 68, + 68, 15, 23, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 4, 22, 48, 68, 68, 68, 68, + + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 33, 68, 68, 68, + 65, 68, 68, 68, 68, 29, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 19, 34, 68, 68, 41, + 36, 68, 9, 11, 68, 7, 68, 68, 68, 20, + 68, 8, 68, 68, 68, 68, 25, 54, 67, 40, + 38, 68, 68, 68, 16, 68, 17, 68, 68, 68, + 68, 68, 30, 68, 68, 68, 68, 68, 35, 68, + 44, 14, 68, 53, 68, 68, 45, 68, 68, 68, + 12, 68, 68, 68, 21, 31, 10, 27, 50, 68, + + 52, 42, 24, 68, 68, 18, 68, 13, 37, 28, + 26, 43, 68, 68, 51, 39, 32, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, + 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, + + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[71] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + } ; + +static const flex_int16_t yy_base[224] = + { 0, + 0, 0, 0, 0, 592, 593, 593, 593, 573, 585, + 583, 593, 593, 593, 593, 593, 573, 593, 593, 58, + 593, 56, 593, 569, 57, 61, 62, 63, 64, 83, + 65, 69, 91, 76, 571, 117, 108, 97, 103, 120, + 134, 143, 137, 112, 593, 593, 580, 593, 578, 593, + 73, 568, 593, 593, 593, 0, 567, 138, 147, 160, + 566, 151, 152, 164, 169, 166, 176, 177, 182, 179, + 184, 186, 191, 185, 237, 565, 200, 173, 203, 209, + 226, 564, 212, 235, 238, 211, 229, 223, 243, 240, + 244, 250, 263, 563, 555, 554, 257, 258, 282, 276, + + 264, 285, 297, 300, 283, 289, 299, 305, 284, 308, + 309, 302, 314, 311, 317, 328, 321, 335, 345, 347, + 553, 342, 356, 343, 361, 551, 344, 346, 357, 362, + 367, 369, 373, 377, 375, 550, 548, 376, 382, 544, + 543, 383, 542, 541, 386, 540, 387, 402, 403, 539, + 401, 538, 395, 411, 409, 413, 534, 533, 532, 531, + 412, 416, 422, 430, 529, 439, 527, 420, 440, 442, + 441, 451, 518, 445, 458, 459, 448, 462, 516, 456, + 513, 489, 472, 484, 474, 473, 483, 477, 478, 485, + 487, 490, 500, 488, 446, 405, 372, 331, 318, 503, + + 219, 217, 215, 504, 512, 194, 514, 174, 126, 123, + 89, 88, 517, 515, 86, 82, 79, 593, 571, 573, + 575, 90, 79 + } ; + +static const flex_int16_t yy_def[224] = + { 0, + 218, 1, 219, 219, 218, 218, 218, 218, 218, 220, + 221, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 218, 218, 220, 218, 221, 218, + 218, 218, 218, 218, 218, 223, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 218, 222, 222, 222, 222, 222, 222, + + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 0, 218, 218, + 218, 218, 218 + } ; + +static const flex_int16_t yy_nxt[664] = + { 0, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, + 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, + 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, + 52, 56, 51, 53, 54, 56, 56, 56, 56, 56, + 56, 62, 66, 56, 60, 52, 67, 51, 63, 58, + 56, 57, 74, 56, 59, 64, 56, 56, 65, 68, + + 56, 73, 56, 56, 61, 56, 69, 62, 66, 77, + 60, 56, 67, 70, 63, 58, 71, 56, 74, 72, + 59, 64, 56, 75, 65, 68, 56, 73, 76, 82, + 61, 56, 69, 83, 56, 77, 84, 56, 93, 70, + 56, 80, 71, 85, 78, 72, 86, 81, 56, 75, + 79, 56, 56, 89, 76, 82, 92, 56, 87, 83, + 95, 56, 84, 88, 93, 56, 56, 80, 96, 85, + 78, 99, 86, 81, 56, 90, 79, 91, 56, 89, + 56, 98, 92, 56, 87, 97, 95, 56, 56, 88, + 56, 56, 101, 56, 96, 100, 56, 99, 56, 56, + + 56, 90, 119, 91, 102, 56, 103, 98, 56, 106, + 105, 97, 108, 104, 56, 112, 107, 56, 101, 110, + 109, 100, 120, 56, 111, 56, 56, 118, 119, 56, + 102, 56, 103, 56, 123, 106, 105, 56, 108, 104, + 56, 112, 107, 56, 127, 110, 109, 121, 120, 56, + 111, 56, 56, 118, 56, 129, 122, 56, 56, 113, + 123, 114, 128, 130, 56, 124, 132, 131, 125, 115, + 127, 56, 56, 121, 116, 117, 126, 56, 56, 136, + 133, 129, 122, 139, 135, 113, 134, 114, 128, 130, + 56, 124, 132, 131, 125, 115, 56, 56, 56, 56, + + 116, 117, 126, 56, 140, 136, 133, 138, 141, 139, + 135, 56, 134, 56, 56, 149, 56, 144, 137, 56, + 142, 143, 56, 56, 148, 56, 145, 146, 56, 147, + 140, 56, 56, 138, 141, 56, 152, 153, 154, 150, + 155, 149, 56, 144, 137, 56, 142, 143, 151, 56, + 148, 156, 145, 146, 157, 147, 56, 56, 56, 56, + 56, 56, 152, 153, 154, 150, 155, 158, 159, 160, + 56, 56, 161, 163, 151, 56, 56, 156, 167, 162, + 157, 56, 166, 56, 164, 165, 56, 56, 170, 56, + 56, 56, 168, 158, 159, 160, 56, 56, 161, 163, + + 56, 56, 169, 174, 167, 162, 178, 173, 166, 56, + 164, 165, 171, 172, 170, 56, 56, 56, 168, 56, + 175, 176, 180, 56, 177, 56, 56, 56, 169, 174, + 56, 186, 178, 173, 56, 181, 56, 182, 171, 172, + 179, 183, 188, 191, 56, 184, 175, 176, 180, 185, + 177, 189, 187, 56, 56, 56, 56, 186, 190, 56, + 56, 181, 56, 182, 194, 56, 179, 183, 188, 191, + 56, 184, 56, 56, 195, 185, 56, 189, 187, 192, + 193, 197, 198, 196, 190, 199, 56, 56, 56, 200, + 194, 56, 56, 204, 201, 202, 205, 56, 56, 56, + + 195, 56, 56, 56, 56, 192, 193, 197, 198, 196, + 207, 199, 203, 209, 56, 200, 206, 56, 56, 204, + 201, 202, 205, 210, 208, 211, 56, 56, 56, 56, + 56, 56, 56, 214, 213, 212, 207, 215, 203, 209, + 216, 56, 206, 56, 217, 56, 56, 56, 56, 210, + 208, 211, 56, 56, 56, 56, 56, 56, 56, 214, + 213, 212, 56, 215, 56, 56, 216, 56, 56, 56, + 217, 45, 45, 47, 47, 49, 49, 94, 56, 56, + 56, 56, 94, 50, 48, 56, 55, 51, 50, 48, + 46, 218, 5, 218, 218, 218, 218, 218, 218, 218, + + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218 + } ; + +static const flex_int16_t yy_chk[664] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, + 223, 27, 28, 32, 26, 51, 28, 51, 27, 25, + 34, 222, 32, 217, 25, 27, 216, 30, 27, 28, + + 215, 31, 212, 211, 26, 33, 29, 27, 28, 34, + 26, 38, 28, 30, 27, 25, 30, 39, 32, 30, + 25, 27, 37, 33, 27, 28, 44, 31, 33, 38, + 26, 36, 29, 38, 40, 34, 39, 210, 44, 30, + 209, 37, 30, 40, 36, 30, 40, 37, 41, 33, + 36, 43, 58, 41, 33, 38, 43, 42, 40, 38, + 58, 59, 39, 40, 44, 62, 63, 37, 59, 40, + 36, 63, 40, 37, 60, 42, 36, 42, 64, 41, + 66, 62, 43, 65, 40, 60, 58, 78, 208, 40, + 67, 68, 65, 70, 59, 64, 69, 63, 71, 74, + + 72, 42, 78, 42, 66, 73, 67, 62, 206, 69, + 68, 60, 70, 67, 77, 74, 69, 79, 65, 72, + 71, 64, 79, 80, 73, 86, 83, 77, 78, 203, + 66, 202, 67, 201, 83, 69, 68, 88, 70, 67, + 81, 74, 69, 87, 86, 72, 71, 80, 79, 84, + 73, 75, 85, 77, 90, 88, 81, 89, 91, 75, + 83, 75, 87, 89, 92, 84, 91, 90, 85, 75, + 86, 97, 98, 80, 75, 75, 85, 93, 101, 98, + 92, 88, 81, 101, 97, 75, 93, 75, 87, 89, + 100, 84, 91, 90, 85, 75, 99, 105, 109, 102, + + 75, 75, 85, 106, 102, 98, 92, 100, 102, 101, + 97, 103, 93, 107, 104, 109, 112, 105, 99, 108, + 103, 104, 110, 111, 108, 114, 106, 106, 113, 107, + 102, 115, 199, 100, 102, 117, 112, 113, 114, 110, + 115, 109, 116, 105, 99, 198, 103, 104, 111, 118, + 108, 116, 106, 106, 117, 107, 122, 124, 127, 119, + 128, 120, 112, 113, 114, 110, 115, 118, 119, 120, + 123, 129, 122, 124, 111, 125, 130, 116, 129, 123, + 117, 131, 128, 132, 125, 127, 197, 133, 132, 135, + 138, 134, 130, 118, 119, 120, 139, 142, 122, 124, + + 145, 147, 131, 138, 129, 123, 147, 135, 128, 153, + 125, 127, 133, 134, 132, 151, 148, 149, 130, 196, + 139, 142, 149, 155, 145, 154, 161, 156, 131, 138, + 162, 161, 147, 135, 168, 151, 163, 153, 133, 134, + 148, 154, 163, 168, 164, 155, 139, 142, 149, 156, + 145, 164, 162, 166, 169, 171, 170, 161, 166, 174, + 195, 151, 177, 153, 171, 172, 148, 154, 163, 168, + 180, 155, 175, 176, 172, 156, 178, 164, 162, 169, + 170, 175, 176, 174, 166, 177, 183, 186, 185, 178, + 171, 188, 189, 186, 180, 183, 188, 187, 184, 190, + + 172, 191, 194, 182, 192, 169, 170, 175, 176, 174, + 190, 177, 185, 192, 193, 178, 189, 200, 204, 186, + 180, 183, 188, 193, 191, 194, 205, 181, 207, 214, + 179, 213, 173, 205, 204, 200, 190, 207, 185, 192, + 213, 167, 189, 165, 214, 160, 159, 158, 157, 193, + 191, 194, 152, 150, 146, 144, 143, 141, 140, 205, + 204, 200, 137, 207, 136, 126, 213, 121, 96, 95, + 214, 219, 219, 220, 220, 221, 221, 94, 82, 76, + 61, 57, 52, 49, 47, 35, 24, 17, 11, 10, + 9, 5, 218, 218, 218, 218, 218, 218, 218, 218, + + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218 + } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2745,8 +687,8 @@ static const flex_int16_t yy_chk[664] = {0, #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -2760,15 +702,13 @@ static const flex_int16_t yy_chk[664] = {0, #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) \ - LOG_DEBUG("%s", #token); \ - return token +#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token #line 713 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -2797,124 +737,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t -{ - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char *yy_last_accepting_cpos; + { - int yylineno_r; - int yy_flex_debug_r; + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; - YYSTYPE *yylval_r; + int yylineno_r; + int yy_flex_debug_r; - YYLTYPE *yylloc_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; -}; /* end struct yyguts_t */ + YYSTYPE * yylval_r; -static int yy_init_globals(yyscan_t yyscanner); + YYLTYPE * yylloc_r; -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -#define yylval yyg->yylval_r + }; /* end struct yyguts_t */ -#define yylloc yyg->yylloc_r +static int yy_init_globals ( yyscan_t yyscanner ); -int yylex_init(yyscan_t *scanner); + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + int yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner); +static int yyinput ( yyscan_t yyscanner ); #else -static int input(yyscan_t yyscanner); +static int input ( yyscan_t yyscanner ); #endif #endif @@ -2934,38 +874,42 @@ static int input(yyscan_t yyscanner); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - yy_size_t n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -2984,7 +928,7 @@ static int input(yyscan_t yyscanner); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -2995,9 +939,11 @@ static int input(yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -3009,534 +955,619 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP YY_USER_ACTION +#define YY_RULE_SETUP \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if (!yyg->yy_init) { - yyg->yy_init = 1; + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!yyg->yy_start) - yyg->yy_start = 1; /* first start state */ + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_load_buffer_state(yyscanner); - } + yy_load_buffer_state( yyscanner ); + } - { + { #line 75 "lex_sql.l" + #line 1008 "lex_sql.cpp" - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 219) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_base[yy_current_state] != 593); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - if (yy_act == 0) { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - - case 1: YY_RULE_SETUP + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 219 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 593 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 77 "lex_sql.l" - // ignore whitespace - YY_BREAK - case 2: - /* rule 2 can match eol */ - YY_RULE_SETUP +// ignore whitespace + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP #line 78 "lex_sql.l" - ; - YY_BREAK - case 3: YY_RULE_SETUP +; + YY_BREAK +case 3: +YY_RULE_SETUP #line 80 "lex_sql.l" - yylval->number = atoi(yytext); - RETURN_TOKEN(NUMBER); - YY_BREAK - case 4: YY_RULE_SETUP +yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); + YY_BREAK +case 4: +YY_RULE_SETUP #line 81 "lex_sql.l" - yylval->floats = (float)(atof(yytext)); - RETURN_TOKEN(FLOAT); - YY_BREAK - case 5: YY_RULE_SETUP +yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); + YY_BREAK +case 5: +YY_RULE_SETUP #line 83 "lex_sql.l" - RETURN_TOKEN(SEMICOLON); - YY_BREAK - case 6: YY_RULE_SETUP +RETURN_TOKEN(SEMICOLON); + YY_BREAK +case 6: +YY_RULE_SETUP #line 84 "lex_sql.l" - RETURN_TOKEN(DOT); - YY_BREAK - case 7: YY_RULE_SETUP +RETURN_TOKEN(DOT); + YY_BREAK +case 7: +YY_RULE_SETUP #line 85 "lex_sql.l" - RETURN_TOKEN(EXIT); - YY_BREAK - case 8: YY_RULE_SETUP +RETURN_TOKEN(EXIT); + YY_BREAK +case 8: +YY_RULE_SETUP #line 86 "lex_sql.l" - RETURN_TOKEN(HELP); - YY_BREAK - case 9: YY_RULE_SETUP +RETURN_TOKEN(HELP); + YY_BREAK +case 9: +YY_RULE_SETUP #line 87 "lex_sql.l" - RETURN_TOKEN(DESC); - YY_BREAK - case 10: YY_RULE_SETUP +RETURN_TOKEN(DESC); + YY_BREAK +case 10: +YY_RULE_SETUP #line 88 "lex_sql.l" - RETURN_TOKEN(CREATE); - YY_BREAK - case 11: YY_RULE_SETUP +RETURN_TOKEN(CREATE); + YY_BREAK +case 11: +YY_RULE_SETUP #line 89 "lex_sql.l" - RETURN_TOKEN(DROP); - YY_BREAK - case 12: YY_RULE_SETUP +RETURN_TOKEN(DROP); + YY_BREAK +case 12: +YY_RULE_SETUP #line 90 "lex_sql.l" - RETURN_TOKEN(TABLE); - YY_BREAK - case 13: YY_RULE_SETUP +RETURN_TOKEN(TABLE); + YY_BREAK +case 13: +YY_RULE_SETUP #line 91 "lex_sql.l" - RETURN_TOKEN(TABLES); - YY_BREAK - case 14: YY_RULE_SETUP +RETURN_TOKEN(TABLES); + YY_BREAK +case 14: +YY_RULE_SETUP #line 92 "lex_sql.l" - RETURN_TOKEN(INDEX); - YY_BREAK - case 15: YY_RULE_SETUP +RETURN_TOKEN(INDEX); + YY_BREAK +case 15: +YY_RULE_SETUP #line 93 "lex_sql.l" - RETURN_TOKEN(ON); - YY_BREAK - case 16: YY_RULE_SETUP +RETURN_TOKEN(ON); + YY_BREAK +case 16: +YY_RULE_SETUP #line 94 "lex_sql.l" - RETURN_TOKEN(SHOW); - YY_BREAK - case 17: YY_RULE_SETUP +RETURN_TOKEN(SHOW); + YY_BREAK +case 17: +YY_RULE_SETUP #line 95 "lex_sql.l" - RETURN_TOKEN(SYNC); - YY_BREAK - case 18: YY_RULE_SETUP +RETURN_TOKEN(SYNC); + YY_BREAK +case 18: +YY_RULE_SETUP #line 96 "lex_sql.l" - RETURN_TOKEN(SELECT); - YY_BREAK - case 19: YY_RULE_SETUP +RETURN_TOKEN(SELECT); + YY_BREAK +case 19: +YY_RULE_SETUP #line 97 "lex_sql.l" - RETURN_TOKEN(CALC); - YY_BREAK - case 20: YY_RULE_SETUP +RETURN_TOKEN(CALC); + YY_BREAK +case 20: +YY_RULE_SETUP #line 98 "lex_sql.l" - RETURN_TOKEN(FROM); - YY_BREAK - case 21: YY_RULE_SETUP +RETURN_TOKEN(FROM); + YY_BREAK +case 21: +YY_RULE_SETUP #line 99 "lex_sql.l" - RETURN_TOKEN(WHERE); - YY_BREAK - case 22: YY_RULE_SETUP +RETURN_TOKEN(WHERE); + YY_BREAK +case 22: +YY_RULE_SETUP #line 100 "lex_sql.l" - RETURN_TOKEN(AND); - YY_BREAK - case 23: YY_RULE_SETUP +RETURN_TOKEN(AND); + YY_BREAK +case 23: +YY_RULE_SETUP #line 101 "lex_sql.l" - RETURN_TOKEN(OR); - YY_BREAK - case 24: YY_RULE_SETUP +RETURN_TOKEN(OR); + YY_BREAK +case 24: +YY_RULE_SETUP #line 102 "lex_sql.l" - RETURN_TOKEN(INSERT); - YY_BREAK - case 25: YY_RULE_SETUP +RETURN_TOKEN(INSERT); + YY_BREAK +case 25: +YY_RULE_SETUP #line 103 "lex_sql.l" - RETURN_TOKEN(INTO); - YY_BREAK - case 26: YY_RULE_SETUP +RETURN_TOKEN(INTO); + YY_BREAK +case 26: +YY_RULE_SETUP #line 104 "lex_sql.l" - RETURN_TOKEN(VALUES); - YY_BREAK - case 27: YY_RULE_SETUP +RETURN_TOKEN(VALUES); + YY_BREAK +case 27: +YY_RULE_SETUP #line 105 "lex_sql.l" - RETURN_TOKEN(DELETE); - YY_BREAK - case 28: YY_RULE_SETUP +RETURN_TOKEN(DELETE); + YY_BREAK +case 28: +YY_RULE_SETUP #line 106 "lex_sql.l" - RETURN_TOKEN(UPDATE); - YY_BREAK - case 29: YY_RULE_SETUP +RETURN_TOKEN(UPDATE); + YY_BREAK +case 29: +YY_RULE_SETUP #line 107 "lex_sql.l" - RETURN_TOKEN(SET); - YY_BREAK - case 30: YY_RULE_SETUP +RETURN_TOKEN(SET); + YY_BREAK +case 30: +YY_RULE_SETUP #line 108 "lex_sql.l" - RETURN_TOKEN(TRX_BEGIN); - YY_BREAK - case 31: YY_RULE_SETUP +RETURN_TOKEN(TRX_BEGIN); + YY_BREAK +case 31: +YY_RULE_SETUP #line 109 "lex_sql.l" - RETURN_TOKEN(TRX_COMMIT); - YY_BREAK - case 32: YY_RULE_SETUP +RETURN_TOKEN(TRX_COMMIT); + YY_BREAK +case 32: +YY_RULE_SETUP #line 110 "lex_sql.l" - RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK - case 33: YY_RULE_SETUP +RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK +case 33: +YY_RULE_SETUP #line 111 "lex_sql.l" - RETURN_TOKEN(INT_T); - YY_BREAK - case 34: YY_RULE_SETUP +RETURN_TOKEN(INT_T); + YY_BREAK +case 34: +YY_RULE_SETUP #line 112 "lex_sql.l" - RETURN_TOKEN(STRING_T); - YY_BREAK - case 35: YY_RULE_SETUP +RETURN_TOKEN(STRING_T); + YY_BREAK +case 35: +YY_RULE_SETUP #line 113 "lex_sql.l" - RETURN_TOKEN(FLOAT_T); - YY_BREAK - case 36: YY_RULE_SETUP +RETURN_TOKEN(FLOAT_T); + YY_BREAK +case 36: +YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK - case 37: YY_RULE_SETUP +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK +case 37: +YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(UNIQUE); - YY_BREAK - case 38: YY_RULE_SETUP +RETURN_TOKEN(UNIQUE); + YY_BREAK +case 38: +YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(NULL_T); - YY_BREAK - case 39: YY_RULE_SETUP +RETURN_TOKEN(NULL_T); + YY_BREAK +case 39: +YY_RULE_SETUP #line 117 "lex_sql.l" - RETURN_TOKEN(NULLABLE); - YY_BREAK - case 40: YY_RULE_SETUP +RETURN_TOKEN(NULLABLE); + YY_BREAK +case 40: +YY_RULE_SETUP #line 118 "lex_sql.l" - RETURN_TOKEN(LOAD); - YY_BREAK - case 41: YY_RULE_SETUP +RETURN_TOKEN(LOAD); + YY_BREAK +case 41: +YY_RULE_SETUP #line 119 "lex_sql.l" - RETURN_TOKEN(DATA); - YY_BREAK - case 42: YY_RULE_SETUP +RETURN_TOKEN(DATA); + YY_BREAK +case 42: +YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(INFILE); - YY_BREAK - case 43: YY_RULE_SETUP +RETURN_TOKEN(INFILE); + YY_BREAK +case 43: +YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); - YY_BREAK - case 44: YY_RULE_SETUP +RETURN_TOKEN(EXPLAIN); + YY_BREAK +case 44: +YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(GROUP); - YY_BREAK - case 45: YY_RULE_SETUP +RETURN_TOKEN(GROUP); + YY_BREAK +case 45: +YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(ORDER); - YY_BREAK - case 46: YY_RULE_SETUP +RETURN_TOKEN(ORDER); + YY_BREAK +case 46: +YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(BY); - YY_BREAK - case 47: YY_RULE_SETUP +RETURN_TOKEN(BY); + YY_BREAK +case 47: +YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(AS); - YY_BREAK - case 48: YY_RULE_SETUP +RETURN_TOKEN(AS); + YY_BREAK +case 48: +YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(ASC); - YY_BREAK - case 49: YY_RULE_SETUP +RETURN_TOKEN(ASC); + YY_BREAK +case 49: +YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(IN); - YY_BREAK - case 50: YY_RULE_SETUP +RETURN_TOKEN(IN); + YY_BREAK +case 50: +YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(EXISTS); - YY_BREAK - case 51: YY_RULE_SETUP +RETURN_TOKEN(EXISTS); + YY_BREAK +case 51: +YY_RULE_SETUP #line 129 "lex_sql.l" - RETURN_TOKEN(STORAGE); - YY_BREAK - case 52: YY_RULE_SETUP +RETURN_TOKEN(STORAGE); + YY_BREAK +case 52: +YY_RULE_SETUP #line 130 "lex_sql.l" - RETURN_TOKEN(FORMAT); - YY_BREAK - case 53: YY_RULE_SETUP +RETURN_TOKEN(FORMAT); + YY_BREAK +case 53: +YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(INNER); - YY_BREAK - case 54: YY_RULE_SETUP +RETURN_TOKEN(INNER); + YY_BREAK +case 54: +YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(JOIN); - YY_BREAK - case 55: YY_RULE_SETUP +RETURN_TOKEN(JOIN); + YY_BREAK +case 55: +YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(LBRACE); - YY_BREAK - case 56: YY_RULE_SETUP +RETURN_TOKEN(LBRACE); + YY_BREAK +case 56: +YY_RULE_SETUP #line 134 "lex_sql.l" - RETURN_TOKEN(RBRACE); - YY_BREAK - case 57: YY_RULE_SETUP +RETURN_TOKEN(RBRACE); + YY_BREAK +case 57: +YY_RULE_SETUP #line 136 "lex_sql.l" - RETURN_TOKEN(COMMA); - YY_BREAK - case 58: YY_RULE_SETUP +RETURN_TOKEN(COMMA); + YY_BREAK +case 58: +YY_RULE_SETUP #line 137 "lex_sql.l" - RETURN_TOKEN(EQ); - YY_BREAK - case 59: YY_RULE_SETUP +RETURN_TOKEN(EQ); + YY_BREAK +case 59: +YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(LE); - YY_BREAK - case 60: YY_RULE_SETUP +RETURN_TOKEN(LE); + YY_BREAK +case 60: +YY_RULE_SETUP #line 139 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 61: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 61: +YY_RULE_SETUP #line 140 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 62: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 62: +YY_RULE_SETUP #line 141 "lex_sql.l" - RETURN_TOKEN(LT); - YY_BREAK - case 63: YY_RULE_SETUP +RETURN_TOKEN(LT); + YY_BREAK +case 63: +YY_RULE_SETUP #line 142 "lex_sql.l" - RETURN_TOKEN(GE); - YY_BREAK - case 64: YY_RULE_SETUP +RETURN_TOKEN(GE); + YY_BREAK +case 64: +YY_RULE_SETUP #line 143 "lex_sql.l" - RETURN_TOKEN(GT); - YY_BREAK - case 65: YY_RULE_SETUP +RETURN_TOKEN(GT); + YY_BREAK +case 65: +YY_RULE_SETUP #line 144 "lex_sql.l" - RETURN_TOKEN(NOT); - YY_BREAK - case 66: YY_RULE_SETUP +RETURN_TOKEN(NOT); + YY_BREAK +case 66: +YY_RULE_SETUP #line 145 "lex_sql.l" - RETURN_TOKEN(IS); - YY_BREAK - case 67: YY_RULE_SETUP +RETURN_TOKEN(IS); + YY_BREAK +case 67: +YY_RULE_SETUP #line 146 "lex_sql.l" - RETURN_TOKEN(LIKE); - YY_BREAK - case 68: YY_RULE_SETUP +RETURN_TOKEN(LIKE); + YY_BREAK +case 68: +YY_RULE_SETUP #line 148 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(ID); - YY_BREAK - case 69: +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK +case 69: #line 151 "lex_sql.l" - case 70: +case 70: #line 152 "lex_sql.l" - case 71: +case 71: #line 153 "lex_sql.l" - case 72: YY_RULE_SETUP +case 72: +YY_RULE_SETUP #line 153 "lex_sql.l" - { - return yytext[0]; - } - YY_BREAK - case 73: - /* rule 73 can match eol */ - YY_RULE_SETUP +{ return yytext[0]; } + YY_BREAK +case 73: +/* rule 73 can match eol */ +YY_RULE_SETUP #line 154 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 74: - /* rule 74 can match eol */ - YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 74: +/* rule 74 can match eol */ +YY_RULE_SETUP #line 155 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 75: YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 75: +YY_RULE_SETUP #line 157 "lex_sql.l" - LOG_DEBUG("Unknown character [%c]",yytext[0]); - return yytext[0]; - YY_BREAK - case 76: YY_RULE_SETUP +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 76: +YY_RULE_SETUP #line 158 "lex_sql.l" - ECHO; - YY_BREAK +ECHO; + YY_BREAK #line 1439 "lex_sql.cpp" - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(STR): yyterminate(); - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if (yywrap(yyscanner)) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(STR): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3546,149 +1577,171 @@ YY_DECL * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(yyscan_t yyscanner) +static int yy_get_next_buffer (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else { - yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - yy_size_t new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if (yyg->yy_n_chars == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin, yyscanner); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = - (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(yyscan_t yyscanner) + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_current_state = yyg->yy_start; - - for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 219) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 219 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -3696,27 +1749,29 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 219) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 218); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 219 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 218); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -3725,133 +1780,141 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner) + static int yyinput (yyscan_t yyscanner) #else -static int input(yyscan_t yyscanner) + static int input (yyscan_t yyscanner) #endif { - int c; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin, yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap(yyscanner)) - return 0; - - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file, yyscan_t yyscanner) + void yyrestart (FILE * input_file , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); - yy_load_buffer_state(yyscanner); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(yyscanner); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state(yyscan_t yyscanner) +static void yy_load_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -3860,105 +1923,105 @@ static void yy_load_buffer_state(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file, yyscanner); + yy_init_buffer( b, file , yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!b) - return; + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf, yyscanner); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *)b, yyscanner); + yyfree( (void *) b , yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_flush_buffer(b, yyscanner); + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - b->yy_input_file = file; - b->yy_fill_buffer = 1; + yy_flush_buffer( b , yyscanner); - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!b) - return; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(yyscanner); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -3967,95 +2030,99 @@ void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state(yyscan_t yyscanner) +void yypop_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(yyscan_t yyscanner) +static void yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = - (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( - yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -4064,31 +2131,33 @@ static void yyensure_buffer_stack(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b, yyscanner); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -4099,10 +2168,10 @@ YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - - return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -4112,175 +2181,177 @@ YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n, yyscanner); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n, yyscanner); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyextra; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno(yyscan_t yyscanner) +int yyget_lineno (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column(yyscan_t yyscanner) +int yyget_column (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!YY_CURRENT_BUFFER) - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yycolumn; + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in(yyscan_t yyscanner) +FILE *yyget_in (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyin; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out(yyscan_t yyscanner) +FILE *yyget_out (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyout; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng(yyscan_t yyscanner) +int yyget_leng (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyleng; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text(yyscan_t yyscanner) +char *yyget_text (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yytext; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyextra = user_defined; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno(int _line_number, yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_lineno called with no buffer"); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column(int _column_no, yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_column called with no buffer"); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yycolumn = _column_no; + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -4289,80 +2360,80 @@ void yyset_column(int _column_no, yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str, yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyin = _in_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; } -void yyset_out(FILE *_out_str, yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyout = _out_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; } -int yyget_debug(yyscan_t yyscanner) +int yyget_debug (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yy_flex_debug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void yyset_debug(int _bdebug, yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flex_debug = _bdebug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ -YYSTYPE *yyget_lval(yyscan_t yyscanner) +YYSTYPE * yyget_lval (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylval; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc(yyscan_t yyscanner) +YYLTYPE *yyget_lloc (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; } - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylloc = yylloc_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t *ptr_yy_globals) +int yylex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -4372,94 +2443,94 @@ int yylex_init(yyscan_t *ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra(yy_user_defined, &dummy_yyguts); + yyset_extra (yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - yyset_extra(yy_user_defined, *ptr_yy_globals); + yyset_extra (yy_user_defined, *ptr_yy_globals); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } -static int yy_init_globals(yyscan_t yyscanner) +static int yy_init_globals (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(yyscan_t yyscanner) +int yylex_destroy (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack, yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack, yyscanner); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals(yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree(yyscanner, yyscanner); - yyscanner = NULL; - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; } /* @@ -4467,59 +2538,63 @@ int yylex_destroy(yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s, yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - int n; - for (n = 0; s[n]; ++n) - ; + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size, yyscan_t yyscanner) +void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr, yyscan_t yyscanner) +void yyfree (void * ptr , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - free((char *)ptr); /* see yyrealloc() for (char *) cast */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 158 "lex_sql.l" -void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } + +void scan_string(const char *str, yyscan_t scanner) { + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); +} + diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index df1e3748..55d09f5f 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,7 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 5 "lex_sql.h" +#line 6 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -12,21 +12,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); -#line 29 "lex_sql.h" +#line 30 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -79,62 +81,61 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -155,7 +156,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -195,72 +196,73 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -}; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -283,69 +285,69 @@ void yyfree(void *, yyscan_t yyscanner); #define YY_EXTRA_TYPE void * #endif -int yylex_init(yyscan_t *scanner); +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + int yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -373,9 +375,11 @@ static int yy_flex_strlen(const char *, yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -539,6 +543,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #line 158 "lex_sql.l" + #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index a91e6d9a..fdbeb678 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,9 +63,13 @@ /* Pull parsers. */ #define YYPULL 1 + + + /* First part of user prologue. */ #line 2 "yacc_sql.y" + #include #include #include @@ -88,190 +92,199 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression( - ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, + Expression *left, + Expression *right, + const char *sql_string, + YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundAggregateExpr *create_aggregate_expression( - const char *aggregate_name, Expression *child, const char *sql_string, YYLTYPE *llocp) +UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, + Expression *child, + const char *sql_string, + YYLTYPE *llocp) { UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, child); expr->set_name(token_name(sql_string, llocp)); return expr; } + #line 125 "yacc_sql.cpp" -#ifndef YY_CAST -#ifdef __cplusplus -#define YY_CAST(Type, Val) static_cast(Val) -#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) -#else -#define YY_CAST(Type, Val) ((Type)(Val)) -#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) -#endif -#endif -#ifndef YY_NULLPTR -#if defined __cplusplus -#if 201103L <= __cplusplus -#define YY_NULLPTR nullptr -#else -#define YY_NULLPTR 0 -#endif -#else -#define YY_NULLPTR ((void *)0) -#endif -#endif +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_ORDER = 11, /* ORDER */ - YYSYMBOL_TABLE = 12, /* TABLE */ - YYSYMBOL_TABLES = 13, /* TABLES */ - YYSYMBOL_INDEX = 14, /* INDEX */ - YYSYMBOL_CALC = 15, /* CALC */ - YYSYMBOL_SELECT = 16, /* SELECT */ - YYSYMBOL_DESC = 17, /* DESC */ - YYSYMBOL_SHOW = 18, /* SHOW */ - YYSYMBOL_SYNC = 19, /* SYNC */ - YYSYMBOL_INSERT = 20, /* INSERT */ - YYSYMBOL_DELETE = 21, /* DELETE */ - YYSYMBOL_UPDATE = 22, /* UPDATE */ - YYSYMBOL_LBRACE = 23, /* LBRACE */ - YYSYMBOL_RBRACE = 24, /* RBRACE */ - YYSYMBOL_COMMA = 25, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 29, /* INT_T */ - YYSYMBOL_IN = 30, /* IN */ - YYSYMBOL_STRING_T = 31, /* STRING_T */ - YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ - YYSYMBOL_DATE_T = 33, /* DATE_T */ - YYSYMBOL_NOT = 34, /* NOT */ - YYSYMBOL_UNIQUE = 35, /* UNIQUE */ - YYSYMBOL_NULL_T = 36, /* NULL_T */ - YYSYMBOL_NULLABLE = 37, /* NULLABLE */ - YYSYMBOL_HELP = 38, /* HELP */ - YYSYMBOL_EXIT = 39, /* EXIT */ - YYSYMBOL_DOT = 40, /* DOT */ - YYSYMBOL_INTO = 41, /* INTO */ - YYSYMBOL_VALUES = 42, /* VALUES */ - YYSYMBOL_FROM = 43, /* FROM */ - YYSYMBOL_WHERE = 44, /* WHERE */ - YYSYMBOL_AND = 45, /* AND */ - YYSYMBOL_OR = 46, /* OR */ - YYSYMBOL_SET = 47, /* SET */ - YYSYMBOL_ON = 48, /* ON */ - YYSYMBOL_LOAD = 49, /* LOAD */ - YYSYMBOL_DATA = 50, /* DATA */ - YYSYMBOL_INFILE = 51, /* INFILE */ - YYSYMBOL_EXPLAIN = 52, /* EXPLAIN */ - YYSYMBOL_STORAGE = 53, /* STORAGE */ - YYSYMBOL_FORMAT = 54, /* FORMAT */ - YYSYMBOL_INNER = 55, /* INNER */ - YYSYMBOL_JOIN = 56, /* JOIN */ - YYSYMBOL_EQ = 57, /* EQ */ - YYSYMBOL_LT = 58, /* LT */ - YYSYMBOL_GT = 59, /* GT */ - YYSYMBOL_LE = 60, /* LE */ - YYSYMBOL_GE = 61, /* GE */ - YYSYMBOL_NE = 62, /* NE */ - YYSYMBOL_LIKE = 63, /* LIKE */ - YYSYMBOL_IS = 64, /* IS */ - YYSYMBOL_NUMBER = 65, /* NUMBER */ - YYSYMBOL_FLOAT = 66, /* FLOAT */ - YYSYMBOL_ID = 67, /* ID */ - YYSYMBOL_SSS = 68, /* SSS */ - YYSYMBOL_69_ = 69, /* '+' */ - YYSYMBOL_70_ = 70, /* '-' */ - YYSYMBOL_71_ = 71, /* '*' */ - YYSYMBOL_72_ = 72, /* '/' */ - YYSYMBOL_UMINUS = 73, /* UMINUS */ - YYSYMBOL_YYACCEPT = 74, /* $accept */ - YYSYMBOL_commands = 75, /* commands */ - YYSYMBOL_command_wrapper = 76, /* command_wrapper */ - YYSYMBOL_exit_stmt = 77, /* exit_stmt */ - YYSYMBOL_help_stmt = 78, /* help_stmt */ - YYSYMBOL_sync_stmt = 79, /* sync_stmt */ - YYSYMBOL_begin_stmt = 80, /* begin_stmt */ - YYSYMBOL_commit_stmt = 81, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 82, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 83, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 84, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 85, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 86, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 87, /* create_index_stmt */ - YYSYMBOL_opt_unique = 88, /* opt_unique */ - YYSYMBOL_attr_list = 89, /* attr_list */ - YYSYMBOL_drop_index_stmt = 90, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 91, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 92, /* attr_def_list */ - YYSYMBOL_attr_def = 93, /* attr_def */ - YYSYMBOL_nullable_constraint = 94, /* nullable_constraint */ - YYSYMBOL_number = 95, /* number */ - YYSYMBOL_type = 96, /* type */ - YYSYMBOL_insert_stmt = 97, /* insert_stmt */ - YYSYMBOL_values_list = 98, /* values_list */ - YYSYMBOL_value_list = 99, /* value_list */ - YYSYMBOL_value = 100, /* value */ - YYSYMBOL_storage_format = 101, /* storage_format */ - YYSYMBOL_delete_stmt = 102, /* delete_stmt */ - YYSYMBOL_update_stmt = 103, /* update_stmt */ - YYSYMBOL_setClauses = 104, /* setClauses */ - YYSYMBOL_setClause = 105, /* setClause */ - YYSYMBOL_select_stmt = 106, /* select_stmt */ - YYSYMBOL_calc_stmt = 107, /* calc_stmt */ - YYSYMBOL_expression_list = 108, /* expression_list */ - YYSYMBOL_expression = 109, /* expression */ - YYSYMBOL_alias = 110, /* alias */ - YYSYMBOL_aggr_func_expr = 111, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 112, /* sub_query_expr */ - YYSYMBOL_rel_attr = 113, /* rel_attr */ - YYSYMBOL_relation = 114, /* relation */ - YYSYMBOL_rel_list = 115, /* rel_list */ - YYSYMBOL_joinClauses = 116, /* joinClauses */ - YYSYMBOL_where = 117, /* where */ - YYSYMBOL_condition = 118, /* condition */ - YYSYMBOL_comp_op = 119, /* comp_op */ - YYSYMBOL_opt_order_by = 120, /* opt_order_by */ - YYSYMBOL_sort_list = 121, /* sort_list */ - YYSYMBOL_sort_unit = 122, /* sort_unit */ - YYSYMBOL_group_by = 123, /* group_by */ - YYSYMBOL_load_data_stmt = 124, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 125, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 126, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 127 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_ORDER = 11, /* ORDER */ + YYSYMBOL_TABLE = 12, /* TABLE */ + YYSYMBOL_TABLES = 13, /* TABLES */ + YYSYMBOL_INDEX = 14, /* INDEX */ + YYSYMBOL_CALC = 15, /* CALC */ + YYSYMBOL_SELECT = 16, /* SELECT */ + YYSYMBOL_DESC = 17, /* DESC */ + YYSYMBOL_SHOW = 18, /* SHOW */ + YYSYMBOL_SYNC = 19, /* SYNC */ + YYSYMBOL_INSERT = 20, /* INSERT */ + YYSYMBOL_DELETE = 21, /* DELETE */ + YYSYMBOL_UPDATE = 22, /* UPDATE */ + YYSYMBOL_LBRACE = 23, /* LBRACE */ + YYSYMBOL_RBRACE = 24, /* RBRACE */ + YYSYMBOL_COMMA = 25, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 29, /* INT_T */ + YYSYMBOL_IN = 30, /* IN */ + YYSYMBOL_STRING_T = 31, /* STRING_T */ + YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ + YYSYMBOL_DATE_T = 33, /* DATE_T */ + YYSYMBOL_NOT = 34, /* NOT */ + YYSYMBOL_UNIQUE = 35, /* UNIQUE */ + YYSYMBOL_NULL_T = 36, /* NULL_T */ + YYSYMBOL_NULLABLE = 37, /* NULLABLE */ + YYSYMBOL_HELP = 38, /* HELP */ + YYSYMBOL_EXIT = 39, /* EXIT */ + YYSYMBOL_DOT = 40, /* DOT */ + YYSYMBOL_INTO = 41, /* INTO */ + YYSYMBOL_VALUES = 42, /* VALUES */ + YYSYMBOL_FROM = 43, /* FROM */ + YYSYMBOL_WHERE = 44, /* WHERE */ + YYSYMBOL_AND = 45, /* AND */ + YYSYMBOL_OR = 46, /* OR */ + YYSYMBOL_SET = 47, /* SET */ + YYSYMBOL_ON = 48, /* ON */ + YYSYMBOL_LOAD = 49, /* LOAD */ + YYSYMBOL_DATA = 50, /* DATA */ + YYSYMBOL_INFILE = 51, /* INFILE */ + YYSYMBOL_EXPLAIN = 52, /* EXPLAIN */ + YYSYMBOL_STORAGE = 53, /* STORAGE */ + YYSYMBOL_FORMAT = 54, /* FORMAT */ + YYSYMBOL_INNER = 55, /* INNER */ + YYSYMBOL_JOIN = 56, /* JOIN */ + YYSYMBOL_EQ = 57, /* EQ */ + YYSYMBOL_LT = 58, /* LT */ + YYSYMBOL_GT = 59, /* GT */ + YYSYMBOL_LE = 60, /* LE */ + YYSYMBOL_GE = 61, /* GE */ + YYSYMBOL_NE = 62, /* NE */ + YYSYMBOL_LIKE = 63, /* LIKE */ + YYSYMBOL_IS = 64, /* IS */ + YYSYMBOL_NUMBER = 65, /* NUMBER */ + YYSYMBOL_FLOAT = 66, /* FLOAT */ + YYSYMBOL_ID = 67, /* ID */ + YYSYMBOL_SSS = 68, /* SSS */ + YYSYMBOL_69_ = 69, /* '+' */ + YYSYMBOL_70_ = 70, /* '-' */ + YYSYMBOL_71_ = 71, /* '*' */ + YYSYMBOL_72_ = 72, /* '/' */ + YYSYMBOL_UMINUS = 73, /* UMINUS */ + YYSYMBOL_YYACCEPT = 74, /* $accept */ + YYSYMBOL_commands = 75, /* commands */ + YYSYMBOL_command_wrapper = 76, /* command_wrapper */ + YYSYMBOL_exit_stmt = 77, /* exit_stmt */ + YYSYMBOL_help_stmt = 78, /* help_stmt */ + YYSYMBOL_sync_stmt = 79, /* sync_stmt */ + YYSYMBOL_begin_stmt = 80, /* begin_stmt */ + YYSYMBOL_commit_stmt = 81, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 82, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 83, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 84, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 85, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 86, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 87, /* create_index_stmt */ + YYSYMBOL_opt_unique = 88, /* opt_unique */ + YYSYMBOL_attr_list = 89, /* attr_list */ + YYSYMBOL_drop_index_stmt = 90, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 91, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 92, /* attr_def_list */ + YYSYMBOL_attr_def = 93, /* attr_def */ + YYSYMBOL_nullable_constraint = 94, /* nullable_constraint */ + YYSYMBOL_number = 95, /* number */ + YYSYMBOL_type = 96, /* type */ + YYSYMBOL_insert_stmt = 97, /* insert_stmt */ + YYSYMBOL_values_list = 98, /* values_list */ + YYSYMBOL_value_list = 99, /* value_list */ + YYSYMBOL_value = 100, /* value */ + YYSYMBOL_storage_format = 101, /* storage_format */ + YYSYMBOL_delete_stmt = 102, /* delete_stmt */ + YYSYMBOL_update_stmt = 103, /* update_stmt */ + YYSYMBOL_setClauses = 104, /* setClauses */ + YYSYMBOL_setClause = 105, /* setClause */ + YYSYMBOL_select_stmt = 106, /* select_stmt */ + YYSYMBOL_calc_stmt = 107, /* calc_stmt */ + YYSYMBOL_expression_list = 108, /* expression_list */ + YYSYMBOL_expression = 109, /* expression */ + YYSYMBOL_alias = 110, /* alias */ + YYSYMBOL_aggr_func_expr = 111, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 112, /* sub_query_expr */ + YYSYMBOL_rel_attr = 113, /* rel_attr */ + YYSYMBOL_relation = 114, /* relation */ + YYSYMBOL_rel_list = 115, /* rel_list */ + YYSYMBOL_joinClauses = 116, /* joinClauses */ + YYSYMBOL_where = 117, /* where */ + YYSYMBOL_condition = 118, /* condition */ + YYSYMBOL_comp_op = 119, /* comp_op */ + YYSYMBOL_opt_order_by = 120, /* opt_order_by */ + YYSYMBOL_sort_list = 121, /* sort_list */ + YYSYMBOL_sort_unit = 122, /* sort_unit */ + YYSYMBOL_group_by = 123, /* group_by */ + YYSYMBOL_load_data_stmt = 124, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 125, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 126, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 127 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; + + + #ifdef short -#undef short +# undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -279,11 +292,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -#include /* INFRINGES ON USER NAME SPACE */ -#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_STDINT_H -#endif +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -313,15 +326,16 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -#undef UINT_LEAST8_MAX -#undef UINT_LEAST16_MAX -#define UINT_LEAST8_MAX 255 -#define UINT_LEAST16_MAX 65535 +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -331,7 +345,8 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -340,38 +355,42 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -#define YYPTRDIFF_T __PTRDIFF_TYPE__ -#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -#elif defined PTRDIFF_MAX -#ifndef ptrdiff_t -#include /* INFRINGES ON USER NAME SPACE */ -#endif -#define YYPTRDIFF_T ptrdiff_t -#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -#else -#define YYPTRDIFF_T long -#define YYPTRDIFF_MAXIMUM LONG_MAX -#endif +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T -#ifdef __SIZE_TYPE__ -#define YYSIZE_T __SIZE_TYPE__ -#elif defined size_t -#define YYSIZE_T size_t -#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YYSIZE_T size_t -#else -#define YYSIZE_T unsigned -#endif +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -380,2392 +399,592 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -#if defined YYENABLE_NLS && YYENABLE_NLS -#if ENABLE_NLS -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_(Msgid) dgettext("bison-runtime", Msgid) -#endif -#endif -#ifndef YY_ -#define YY_(Msgid) Msgid -#endif +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif #endif + #ifndef YY_ATTRIBUTE_PURE -#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) -#else -#define YY_ATTRIBUTE_PURE -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define YY_ATTRIBUTE_UNUSED -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if !defined lint || defined __GNUC__ -#define YY_USE(E) ((void)(E)) +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) #else -#define YY_USE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -#endif -#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") -#else -#define YY_INITIAL_VALUE(Value) Value +# define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_END +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -#define YY_INITIAL_VALUE(Value) /* Nothing. */ +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ -#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") -#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_END +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END #endif -#define YY_ASSERT(E) ((void)(0 && (E))) + +#define YY_ASSERT(E) ((void) (0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -#ifdef YYSTACK_USE_ALLOCA -#if YYSTACK_USE_ALLOCA -#ifdef __GNUC__ -#define YYSTACK_ALLOC __builtin_alloca -#elif defined __BUILTIN_VA_ARG_INCR -#include /* INFRINGES ON USER NAME SPACE */ -#elif defined _AIX -#define YYSTACK_ALLOC __alloca -#elif defined _MSC_VER -#include /* INFRINGES ON USER NAME SPACE */ -#define alloca _alloca -#else -#define YYSTACK_ALLOC alloca -#if !defined _ALLOCA_H && !defined EXIT_SUCCESS -#include /* INFRINGES ON USER NAME SPACE */ -/* Use EXIT_SUCCESS as a witness for stdlib.h. */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#endif -#endif -#endif - -#ifdef YYSTACK_ALLOC -/* Pacify GCC's 'empty if-body' warning. */ -#define YYSTACK_FREE(Ptr) \ - do { /* empty */ \ - ; \ - } while (0) -#ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -#endif -#else -#define YYSTACK_ALLOC YYMALLOC -#define YYSTACK_FREE YYFREE -#ifndef YYSTACK_ALLOC_MAXIMUM -#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -#endif -#if (defined __cplusplus && !defined EXIT_SUCCESS && \ - !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) -#include /* INFRINGES ON USER NAME SPACE */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef YYMALLOC -#define YYMALLOC malloc -#if !defined malloc && !defined EXIT_SUCCESS -void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#ifndef YYFREE -#define YYFREE free -#if !defined free && !defined EXIT_SUCCESS -void free(void *); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#endif +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif #endif /* 1 */ -#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ - defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -#define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) -#define YYCOPY_NEEDED 1 +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF(*yyptr); \ - } while (0) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -#ifndef YYCOPY -#if defined __GNUC__ && 1 < __GNUC__ -#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) -#else -#define YYCOPY(Dst, Src, Count) \ - do { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } while (0) -#endif -#endif +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 71 +#define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 230 +#define YYLAST 250 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 74 +#define YYNTOKENS 74 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 54 +#define YYNNTS 54 /* YYNRULES -- Number of rules. */ -#define YYNRULES 128 +#define YYNRULES 131 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 228 +#define YYNSTATES 232 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 324 +#define YYMAXUTOK 324 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = {0, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 71, - 69, - 2, - 70, - 2, - 72, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 73}; +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 71, 69, 2, 70, 2, 72, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 73 +}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = {0, - 226, - 226, - 234, - 235, - 236, - 237, - 238, - 239, - 240, - 241, - 242, - 243, - 244, - 245, - 246, - 247, - 248, - 249, - 250, - 251, - 252, - 253, - 254, - 258, - 264, - 269, - 275, - 281, - 287, - 293, - 300, - 306, - 314, - 324, - 339, - 340, - 344, - 350, - 359, - 369, - 393, - 396, - 409, - 421, - 446, - 450, - 454, - 459, - 465, - 468, - 469, - 470, - 471, - 475, - 488, - 494, - 501, - 507, - 515, - 519, - 523, - 529, - 536, - 539, - 546, - 558, - 572, - 578, - 586, - 596, - 625, - 658, - 667, - 676, - 692, - 695, - 698, - 701, - 704, - 713, - 716, - 721, - 727, - 730, - 733, - 740, - 743, - 746, - 751, - 759, - 766, - 773, - 778, - 788, - 794, - 804, - 821, - 828, - 840, - 843, - 849, - 853, - 857, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 880, - 883, - 891, - 896, - 904, - 910, - 916, - 926, - 931, - 944, - 952, - 962, - 963}; +static const yytype_int16 yyrline[] = +{ + 0, 226, 226, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 258, 264, 269, 275, 281, 287, + 293, 300, 306, 314, 324, 339, 340, 344, 350, 359, + 369, 393, 396, 409, 421, 446, 450, 454, 459, 465, + 468, 469, 470, 471, 475, 488, 494, 501, 507, 515, + 519, 523, 529, 536, 539, 546, 558, 572, 578, 586, + 596, 625, 658, 667, 676, 692, 695, 698, 701, 704, + 713, 716, 721, 727, 730, 733, 740, 743, 746, 751, + 759, 766, 773, 778, 788, 794, 804, 821, 828, 840, + 843, 849, 853, 860, 864, 871, 872, 873, 874, 875, + 876, 877, 878, 879, 880, 881, 882, 883, 884, 889, + 892, 900, 905, 913, 919, 925, 935, 940, 953, 961, + 971, 972 +}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = {"\"end of file\"", - "error", - "\"invalid token\"", - "SEMICOLON", - "AS", - "ASC", - "BY", - "CREATE", - "DROP", - "EXISTS", - "GROUP", - "ORDER", - "TABLE", - "TABLES", - "INDEX", - "CALC", - "SELECT", - "DESC", - "SHOW", - "SYNC", - "INSERT", - "DELETE", - "UPDATE", - "LBRACE", - "RBRACE", - "COMMA", - "TRX_BEGIN", - "TRX_COMMIT", - "TRX_ROLLBACK", - "INT_T", - "IN", - "STRING_T", - "FLOAT_T", - "DATE_T", - "NOT", - "UNIQUE", - "NULL_T", - "NULLABLE", - "HELP", - "EXIT", - "DOT", - "INTO", - "VALUES", - "FROM", - "WHERE", - "AND", - "OR", - "SET", - "ON", - "LOAD", - "DATA", - "INFILE", - "EXPLAIN", - "STORAGE", - "FORMAT", - "INNER", - "JOIN", - "EQ", - "LT", - "GT", - "LE", - "GE", - "NE", - "LIKE", - "IS", - "NUMBER", - "FLOAT", - "ID", - "SSS", - "'+'", - "'-'", - "'*'", - "'/'", - "UMINUS", - "$accept", - "commands", - "command_wrapper", - "exit_stmt", - "help_stmt", - "sync_stmt", - "begin_stmt", - "commit_stmt", - "rollback_stmt", - "drop_table_stmt", - "show_tables_stmt", - "desc_table_stmt", - "show_index_stmt", - "create_index_stmt", - "opt_unique", - "attr_list", - "drop_index_stmt", - "create_table_stmt", - "attr_def_list", - "attr_def", - "nullable_constraint", - "number", - "type", - "insert_stmt", - "values_list", - "value_list", - "value", - "storage_format", - "delete_stmt", - "update_stmt", - "setClauses", - "setClause", - "select_stmt", - "calc_stmt", - "expression_list", - "expression", - "alias", - "aggr_func_expr", - "sub_query_expr", - "rel_attr", - "relation", - "rel_list", - "joinClauses", - "where", - "condition", - "comp_op", - "opt_order_by", - "sort_list", - "sort_unit", - "group_by", - "load_data_stmt", - "explain_stmt", - "set_variable_stmt", - "opt_semicolon", - YY_NULLPTR}; - -static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "ORDER", "TABLE", + "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", + "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", + "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", + "DATE_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", + "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", "ON", "LOAD", + "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", "JOIN", "EQ", + "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", + "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", + "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", + "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", + "desc_table_stmt", "show_index_stmt", "create_index_stmt", "opt_unique", + "attr_list", "drop_index_stmt", "create_table_stmt", "attr_def_list", + "attr_def", "nullable_constraint", "number", "type", "insert_stmt", + "values_list", "value_list", "value", "storage_format", "delete_stmt", + "update_stmt", "setClauses", "setClause", "select_stmt", "calc_stmt", + "expression_list", "expression", "alias", "aggr_func_expr", + "sub_query_expr", "rel_attr", "relation", "rel_list", "joinClauses", + "where", "condition", "comp_op", "opt_order_by", "sort_list", + "sort_unit", "group_by", "load_data_stmt", "explain_stmt", + "set_variable_stmt", "opt_semicolon", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -#define YYPACT_NINF (-155) +#define YYPACT_NINF (-162) -#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) 0 +#define yytable_value_is_error(Yyn) \ + 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {101, - 1, - 112, - 29, - 29, - -44, - 16, - -155, - -10, - -2, - 24, - -155, - -155, - -155, - -155, - -155, - 35, - 10, - 101, - 83, - 107, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - 58, - -155, - 116, - 64, - 66, - -9, - -155, - -155, - -155, - 5, - -155, - 29, - -155, - -155, - -155, - -1, - -155, - -155, - -155, - 91, - -155, - -155, - 92, - 70, - 71, - 98, - 89, - 96, - -155, - -155, - -155, - -155, - 129, - 87, - -155, - 108, - 131, - 133, - 14, - 100, - -155, - 109, - -155, - 29, - 29, - 29, - 29, - 143, - 110, - 110, - 127, - 114, - 111, - -19, - 113, - 115, - 132, - 117, - -155, - -155, - -155, - 151, - -155, - -155, - 15, - 15, - -155, - -155, - 29, - -155, - 0, - 114, - -155, - 156, - 29, - -155, - 126, - -4, - -155, - -155, - 144, - -7, - 161, - 120, - -155, - -155, - -155, - 134, - 163, - -155, - -19, - 164, - 102, - -27, - -19, - 111, - -155, - 179, - -155, - -155, - -155, - -155, - 67, - 115, - 168, - 170, - 110, - 110, - 183, - 81, - -155, - 172, - -155, - -21, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - 162, - 29, - 29, - 29, - -155, - -155, - 130, - 135, - 165, - -155, - -155, - -155, - 161, - 145, - 136, - 154, - 114, - 11, - -155, - 193, - -155, - -155, - -19, - -19, - -155, - -155, - -155, - 72, - -155, - 159, - -155, - -155, - 181, - -155, - -155, - 152, - -155, - 182, - 184, - 29, - -155, - 29, - -155, - 90, - 17, - 153, - 136, - -155, - 43, - -155, - 3, - -155, - 186, - -155, - -155, - 142, - -155, - 157, - -155, - -155, - 29, - -155, - 110, - -155, - -155}; +static const yytype_int16 yypact[] = +{ + 198, 1, 10, 133, 133, -37, 5, -162, -18, 17, + -8, -162, -162, -162, -162, -162, 18, 15, 198, 92, + 90, -162, -162, -162, -162, -162, -162, -162, -162, -162, + -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, + -162, -162, 28, -162, 82, 30, 31, 68, -162, -162, + -162, -2, -162, 133, -162, -162, -162, 2, -162, -162, + -162, 58, -162, -162, 59, 36, 38, 61, 49, 69, + -162, -162, -162, -162, 102, 62, -162, 78, 104, 106, + 126, 64, -162, 70, -162, 133, 133, 133, 133, 107, + 73, 73, 100, 99, 77, -19, 79, 84, 97, 91, + -162, -162, -162, 122, -162, -162, -44, -44, -162, -162, + 133, -162, 3, 99, -162, 134, 118, -162, 103, -13, + -162, -162, 120, 35, 138, 98, -162, -162, -162, 108, + 141, -162, -19, 142, -162, -162, -1, -162, -162, -162, + -162, -162, -162, -162, 125, 52, 7, 133, -19, 77, + -162, 156, -162, -162, -162, -162, 14, 84, 146, 148, + 73, 73, 161, 63, -162, 150, -162, -162, -162, -162, + 133, 118, 118, -29, -162, -162, 123, 130, 151, -162, + -162, -162, 138, 149, 140, 160, 99, 16, -162, 203, + -162, -162, -19, -19, -29, -162, 165, -162, -162, 187, + -162, -162, 158, -162, 196, 199, 118, -162, 133, -162, + 65, 20, 170, 140, -162, -30, -162, 9, -162, 197, + -162, -162, 162, -162, 172, -162, -162, 133, -162, 73, + -162, -162 +}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = {0, - 36, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 27, - 28, - 29, - 25, - 24, - 0, - 0, - 0, - 0, - 127, - 23, - 22, - 15, - 16, - 17, - 18, - 9, - 10, - 11, - 14, - 12, - 13, - 8, - 5, - 7, - 6, - 4, - 3, - 19, - 20, - 21, - 0, - 35, - 0, - 0, - 0, - 0, - 62, - 59, - 60, - 92, - 61, - 0, - 83, - 81, - 72, - 86, - 84, - 85, - 82, - 0, - 32, - 31, - 0, - 0, - 0, - 0, - 0, - 0, - 125, - 1, - 128, - 2, - 0, - 0, - 30, - 0, - 0, - 0, - 0, - 0, - 80, - 0, - 87, - 0, - 0, - 0, - 0, - 73, - 0, - 0, - 0, - 99, - 0, - 0, - 0, - 0, - 0, - 0, - 91, - 79, - 90, - 0, - 93, - 88, - 75, - 76, - 77, - 78, - 0, - 94, - 86, - 99, - 33, - 0, - 0, - 65, - 0, - 99, - 67, - 126, - 0, - 0, - 41, - 0, - 39, - 89, - 74, - 0, - 95, - 123, - 0, - 54, - 0, - 100, - 0, - 0, - 66, - 0, - 50, - 51, - 52, - 53, - 48, - 0, - 0, - 0, - 0, - 0, - 116, - 0, - 57, - 0, - 114, - 0, - 104, - 105, - 106, - 107, - 108, - 109, - 112, - 110, - 0, - 0, - 0, - 69, - 68, - 0, - 0, - 0, - 47, - 46, - 44, - 41, - 63, - 0, - 0, - 99, - 86, - 96, - 0, - 70, - 55, - 0, - 0, - 115, - 113, - 111, - 101, - 102, - 103, - 124, - 49, - 0, - 45, - 42, - 0, - 40, - 37, - 0, - 0, - 123, - 0, - 58, - 0, - 48, - 0, - 0, - 34, - 97, - 71, - 120, - 117, - 118, - 56, - 43, - 0, - 38, - 0, - 122, - 121, - 0, - 64, - 0, - 119, - 98}; +static const yytype_uint8 yydefact[] = +{ + 0, 36, 0, 0, 0, 0, 0, 26, 0, 0, + 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, + 130, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, + 20, 21, 0, 35, 0, 0, 0, 0, 62, 59, + 60, 92, 61, 0, 83, 81, 72, 86, 84, 85, + 82, 0, 32, 31, 0, 0, 0, 0, 0, 0, + 128, 1, 131, 2, 0, 0, 30, 0, 0, 0, + 0, 0, 80, 0, 87, 0, 0, 0, 0, 73, + 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, + 91, 79, 90, 0, 93, 88, 75, 76, 77, 78, + 0, 94, 86, 99, 33, 0, 0, 65, 0, 99, + 67, 129, 0, 0, 41, 0, 39, 89, 74, 0, + 95, 126, 0, 54, 117, 115, 0, 105, 106, 107, + 108, 109, 110, 113, 111, 0, 100, 0, 0, 0, + 66, 0, 50, 51, 52, 53, 48, 0, 0, 0, + 0, 0, 119, 0, 57, 0, 118, 116, 114, 112, + 0, 0, 0, 102, 69, 68, 0, 0, 0, 47, + 46, 44, 41, 63, 0, 0, 99, 86, 96, 0, + 70, 55, 0, 0, 101, 103, 104, 127, 49, 0, + 45, 42, 0, 40, 37, 0, 0, 126, 0, 58, + 0, 48, 0, 0, 34, 97, 71, 123, 120, 121, + 56, 43, 0, 38, 0, 125, 124, 0, 64, 0, + 122, 98 +}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-155, - -155, - 194, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - 6, - -155, - -155, - 39, - 73, - 9, - -155, - -155, - -155, - -155, - 31, - -93, - -155, - -155, - -155, - -155, - 82, - 173, - -155, - -3, - -53, - 166, - -155, - -155, - -155, - -85, - 75, - 2, - -103, - -154, - -155, - -155, - 7, - -155, - 18, - -155, - -155, - -155, - -155}; +static const yytype_int16 yypgoto[] = +{ + -162, -162, 212, -162, -162, -162, -162, -162, -162, -162, + -162, -162, -162, -162, -162, 19, -162, -162, 51, 74, + 23, -162, -162, -162, -162, 42, -93, -162, -162, -162, + -162, 89, 192, -162, -3, -53, 183, -162, -162, -162, + -86, 80, 13, -110, -161, 101, -162, 21, -162, 37, + -162, -162, -162, -162 +}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = {0, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 44, - 201, - 32, - 33, - 146, - 124, - 174, - 195, - 144, - 34, - 133, - 151, - 55, - 199, - 35, - 36, - 119, - 120, - 37, - 38, - 56, - 57, - 130, - 58, - 59, - 60, - 178, - 113, - 179, - 117, - 135, - 164, - 183, - 214, - 215, - 150, - 39, - 40, - 41, - 73}; +static const yytype_uint8 yydefgoto[] = +{ + 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 44, 205, 32, 33, 158, 124, + 181, 199, 156, 34, 133, 163, 55, 203, 35, 36, + 119, 120, 37, 38, 56, 57, 130, 58, 59, 60, + 185, 113, 186, 117, 146, 147, 190, 218, 219, 162, + 39, 40, 41, 73 +}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = {82, - 61, - 121, - 83, - 83, - 112, - 114, - 4, - 221, - 187, - 131, - 191, - 192, - 42, - 47, - 83, - 138, - 48, - 165, - 166, - 222, - 137, - 140, - 62, - 141, - 142, - 143, - 48, - 80, - 63, - 64, - 65, - 106, - 107, - 108, - 109, - 43, - 47, - 102, - 152, - 116, - 66, - 188, - 167, - 79, - 81, - 49, - 50, - 211, - 52, - 48, - 171, - 47, - 172, - 173, - 129, - 49, - 50, - 51, - 52, - 69, - 53, - 54, - 134, - 180, - 48, - 84, - 84, - 85, - 86, - 87, - 88, - 85, - 86, - 87, - 88, - 203, - 103, - 84, - 49, - 50, - 51, - 52, - 71, - 53, - 54, - 87, - 88, - 165, - 166, - 170, - 67, - 205, - 152, - 49, - 50, - 51, - 52, - 220, - 53, - 54, - 171, - 68, - 172, - 173, - 184, - 185, - 128, - 1, - 2, - 72, - 190, - 134, - 134, - 216, - 185, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 45, - 74, - 46, - 11, - 12, - 13, - 75, - 76, - 154, - 77, - 90, - 91, - 155, - 92, - 93, - 14, - 15, - 85, - 86, - 87, - 88, - 94, - 95, - 96, - 16, - 134, - 17, - 213, - 97, - 18, - 98, - 100, - 99, - 101, - 116, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 163, - 104, - 110, - 115, - 213, - 85, - 86, - 87, - 88, - 127, - 105, - 111, - 118, - 132, - 125, - 122, - 123, - 136, - 126, - 139, - 145, - 147, - 149, - 153, - 148, - 169, - 176, - 177, - 182, - 186, - 189, - 193, - 198, - 204, - 194, - 196, - 202, - 200, - 165, - 207, - 208, - 209, - 210, - 224, - 218, - 223, - 70, - 225, - 197, - 219, - 217, - 206, - 175, - 168, - 78, - 212, - 0, - 89, - 181, - 0, - 0, - 227, - 0, - 0, - 226}; - -static const yytype_int16 yycheck[] = {53, - 4, - 95, - 4, - 4, - 90, - 91, - 16, - 5, - 30, - 113, - 165, - 166, - 12, - 23, - 4, - 119, - 36, - 45, - 46, - 17, - 25, - 29, - 67, - 31, - 32, - 33, - 36, - 23, - 13, - 14, - 41, - 85, - 86, - 87, - 88, - 35, - 23, - 24, - 132, - 44, - 43, - 63, - 136, - 47, - 40, - 65, - 66, - 202, - 68, - 36, - 34, - 23, - 36, - 37, - 55, - 65, - 66, - 67, - 68, - 50, - 70, - 71, - 116, - 149, - 36, - 67, - 67, - 69, - 70, - 71, - 72, - 69, - 70, - 71, - 72, - 179, - 80, - 67, - 65, - 66, - 67, - 68, - 0, - 70, - 71, - 71, - 72, - 45, - 46, - 23, - 67, - 185, - 186, - 65, - 66, - 67, - 68, - 55, - 70, - 71, - 34, - 67, - 36, - 37, - 24, - 25, - 110, - 7, - 8, - 3, - 164, - 165, - 166, - 24, - 25, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 12, - 67, - 14, - 26, - 27, - 28, - 14, - 67, - 30, - 67, - 43, - 43, - 34, - 67, - 67, - 38, - 39, - 69, - 70, - 71, - 72, - 47, - 57, - 51, - 47, - 202, - 49, - 204, - 23, - 52, - 67, - 24, - 48, - 24, - 44, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 67, - 25, - 42, - 223, - 69, - 70, - 71, - 72, - 24, - 67, - 67, - 67, - 23, - 48, - 68, - 67, - 57, - 67, - 41, - 25, - 67, - 25, - 25, - 56, - 12, - 24, - 23, - 11, - 23, - 34, - 67, - 53, - 6, - 65, - 36, - 48, - 67, - 45, - 24, - 54, - 25, - 24, - 67, - 57, - 25, - 18, - 56, - 175, - 209, - 207, - 186, - 145, - 137, - 47, - 203, - -1, - 57, - 149, - -1, - -1, - 225, - -1, - -1, - 223}; +static const yytype_uint8 yytable[] = +{ + 82, 61, 121, 131, 112, 114, 83, 83, 166, 150, + 195, 196, 149, 42, 225, 171, 172, 48, 63, 64, + 83, 80, 45, 65, 46, 224, 226, 87, 88, 167, + 62, 116, 106, 107, 108, 109, 43, 177, 81, 164, + 85, 86, 87, 88, 79, 215, 49, 50, 178, 52, + 179, 180, 171, 172, 178, 174, 179, 180, 129, 67, + 66, 134, 168, 145, 152, 69, 153, 154, 155, 84, + 84, 85, 86, 87, 88, 187, 207, 103, 85, 86, + 87, 88, 135, 84, 4, 68, 136, 191, 192, 220, + 192, 47, 71, 72, 173, 74, 75, 76, 77, 209, + 164, 90, 91, 92, 48, 93, 95, 128, 94, 137, + 138, 139, 140, 141, 142, 143, 144, 194, 145, 145, + 96, 85, 86, 87, 88, 97, 99, 134, 100, 98, + 101, 104, 110, 49, 50, 51, 52, 105, 53, 54, + 111, 47, 115, 116, 118, 125, 127, 122, 135, 47, + 102, 123, 136, 145, 48, 217, 47, 132, 126, 169, + 148, 151, 48, 157, 160, 159, 161, 165, 176, 48, + 183, 184, 189, 193, 217, 137, 138, 139, 140, 141, + 142, 143, 144, 49, 50, 51, 52, 200, 53, 54, + 197, 49, 50, 51, 52, 198, 53, 54, 49, 50, + 51, 52, 202, 53, 54, 1, 2, 204, 206, 208, + 171, 211, 212, 3, 4, 5, 6, 7, 8, 9, + 10, 213, 227, 214, 11, 12, 13, 222, 229, 228, + 70, 182, 223, 201, 221, 210, 14, 15, 175, 78, + 89, 188, 231, 0, 216, 16, 170, 17, 230, 0, + 18 +}; + +static const yytype_int16 yycheck[] = +{ + 53, 4, 95, 113, 90, 91, 4, 4, 9, 119, + 171, 172, 25, 12, 5, 45, 46, 36, 13, 14, + 4, 23, 12, 41, 14, 55, 17, 71, 72, 30, + 67, 44, 85, 86, 87, 88, 35, 23, 40, 132, + 69, 70, 71, 72, 47, 206, 65, 66, 34, 68, + 36, 37, 45, 46, 34, 148, 36, 37, 55, 67, + 43, 9, 63, 116, 29, 50, 31, 32, 33, 67, + 67, 69, 70, 71, 72, 161, 186, 80, 69, 70, + 71, 72, 30, 67, 16, 67, 34, 24, 25, 24, + 25, 23, 0, 3, 147, 67, 14, 67, 67, 192, + 193, 43, 43, 67, 36, 67, 57, 110, 47, 57, + 58, 59, 60, 61, 62, 63, 64, 170, 171, 172, + 51, 69, 70, 71, 72, 23, 48, 9, 24, 67, + 24, 67, 25, 65, 66, 67, 68, 67, 70, 71, + 67, 23, 42, 44, 67, 48, 24, 68, 30, 23, + 24, 67, 34, 206, 36, 208, 23, 23, 67, 34, + 57, 41, 36, 25, 56, 67, 25, 25, 12, 36, + 24, 23, 11, 23, 227, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 36, 70, 71, + 67, 65, 66, 67, 68, 65, 70, 71, 65, 66, + 67, 68, 53, 70, 71, 7, 8, 67, 48, 6, + 45, 24, 54, 15, 16, 17, 18, 19, 20, 21, + 22, 25, 25, 24, 26, 27, 28, 57, 56, 67, + 18, 157, 213, 182, 211, 193, 38, 39, 149, 47, + 57, 161, 229, -1, 207, 47, 145, 49, 227, -1, + 52 +}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_int8 yystos[] = {0, - 7, - 8, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 26, - 27, - 28, - 38, - 39, - 47, - 49, - 52, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 90, - 91, - 97, - 102, - 103, - 106, - 107, - 124, - 125, - 126, - 12, - 35, - 88, - 12, - 14, - 23, - 36, - 65, - 66, - 67, - 68, - 70, - 71, - 100, - 108, - 109, - 111, - 112, - 113, - 108, - 67, - 13, - 14, - 41, - 43, - 67, - 67, - 50, - 76, - 0, - 3, - 127, - 67, - 14, - 67, - 67, - 106, - 108, - 23, - 40, - 109, - 4, - 67, - 69, - 70, - 71, - 72, - 110, - 43, - 43, - 67, - 67, - 47, - 57, - 51, - 23, - 67, - 48, - 24, - 24, - 24, - 108, - 67, - 67, - 109, - 109, - 109, - 109, - 25, - 67, - 114, - 115, - 114, - 42, - 44, - 117, - 67, - 104, - 105, - 100, - 68, - 67, - 93, - 48, - 67, - 24, - 108, - 55, - 110, - 117, - 23, - 98, - 109, - 118, - 57, - 25, - 117, - 41, - 29, - 31, - 32, - 33, - 96, - 25, - 92, - 67, - 56, - 25, - 123, - 99, - 100, - 25, - 30, - 34, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 119, - 45, - 46, - 100, - 105, - 12, - 23, - 34, - 36, - 37, - 94, - 93, - 24, - 23, - 114, - 116, - 114, - 115, - 11, - 120, - 24, - 25, - 23, - 30, - 63, - 34, - 109, - 118, - 118, - 67, - 65, - 95, - 36, - 92, - 53, - 101, - 67, - 89, - 48, - 117, - 6, - 100, - 99, - 24, - 54, - 25, - 24, - 118, - 123, - 109, - 121, - 122, - 24, - 94, - 57, - 89, - 55, - 5, - 17, - 25, - 67, - 56, - 121, - 116}; +static const yytype_int8 yystos[] = +{ + 0, 7, 8, 15, 16, 17, 18, 19, 20, 21, + 22, 26, 27, 28, 38, 39, 47, 49, 52, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 90, 91, 97, 102, 103, 106, 107, 124, + 125, 126, 12, 35, 88, 12, 14, 23, 36, 65, + 66, 67, 68, 70, 71, 100, 108, 109, 111, 112, + 113, 108, 67, 13, 14, 41, 43, 67, 67, 50, + 76, 0, 3, 127, 67, 14, 67, 67, 106, 108, + 23, 40, 109, 4, 67, 69, 70, 71, 72, 110, + 43, 43, 67, 67, 47, 57, 51, 23, 67, 48, + 24, 24, 24, 108, 67, 67, 109, 109, 109, 109, + 25, 67, 114, 115, 114, 42, 44, 117, 67, 104, + 105, 100, 68, 67, 93, 48, 67, 24, 108, 55, + 110, 117, 23, 98, 9, 30, 34, 57, 58, 59, + 60, 61, 62, 63, 64, 109, 118, 119, 57, 25, + 117, 41, 29, 31, 32, 33, 96, 25, 92, 67, + 56, 25, 123, 99, 100, 25, 9, 30, 63, 34, + 119, 45, 46, 109, 100, 105, 12, 23, 34, 36, + 37, 94, 93, 24, 23, 114, 116, 114, 115, 11, + 120, 24, 25, 23, 109, 118, 118, 67, 65, 95, + 36, 92, 53, 101, 67, 89, 48, 117, 6, 100, + 99, 24, 54, 25, 24, 118, 123, 109, 121, 122, + 24, 94, 57, 89, 55, 5, 17, 25, 67, 56, + 121, 116 +}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr1[] = {0, - 74, - 75, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 88, - 89, - 89, - 90, - 91, - 92, - 92, - 93, - 93, - 94, - 94, - 94, - 94, - 95, - 96, - 96, - 96, - 96, - 97, - 98, - 98, - 99, - 99, - 100, - 100, - 100, - 100, - 101, - 101, - 102, - 103, - 104, - 104, - 105, - 106, - 106, - 107, - 108, - 108, - 109, - 109, - 109, - 109, - 109, - 109, - 109, - 109, - 109, - 109, - 109, - 110, - 110, - 110, - 111, - 111, - 112, - 113, - 113, - 114, - 115, - 115, - 116, - 116, - 117, - 117, - 118, - 118, - 118, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 120, - 120, - 121, - 121, - 122, - 122, - 122, - 123, - 124, - 125, - 126, - 127, - 127}; +static const yytype_int8 yyr1[] = +{ + 0, 74, 75, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 88, 89, 89, 90, + 91, 92, 92, 93, 93, 94, 94, 94, 94, 95, + 96, 96, 96, 96, 97, 98, 98, 99, 99, 100, + 100, 100, 100, 101, 101, 102, 103, 104, 104, 105, + 106, 106, 107, 108, 108, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 110, 110, 110, 111, + 111, 112, 113, 113, 114, 115, 115, 116, 116, 117, + 117, 118, 118, 118, 118, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 120, + 120, 121, 121, 122, 122, 122, 123, 124, 125, 126, + 127, 127 +}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = {0, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 3, - 2, - 2, - 4, - 9, - 1, - 0, - 1, - 3, - 5, - 8, - 0, - 3, - 6, - 3, - 2, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 5, - 3, - 5, - 1, - 3, - 1, - 1, - 1, - 1, - 0, - 4, - 4, - 5, - 1, - 3, - 3, - 7, - 9, - 2, - 2, - 4, - 3, - 3, - 3, - 3, - 3, - 2, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 2, - 4, - 3, - 3, - 1, - 3, - 1, - 2, - 4, - 3, - 6, - 0, - 2, - 3, - 3, - 3, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 2, - 1, - 2, - 0, - 3, - 1, - 3, - 1, - 2, - 2, - 0, - 7, - 2, - 4, - 0, - 1}; - -enum +static const yytype_int8 yyr2[] = { - YYENOMEM = -2 + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, + 8, 0, 3, 6, 3, 2, 1, 1, 0, 1, + 1, 1, 1, 1, 5, 3, 5, 1, 3, 1, + 1, 1, 1, 0, 4, 4, 5, 1, 3, 3, + 7, 9, 2, 2, 4, 3, 3, 3, 3, 3, + 2, 1, 1, 1, 1, 1, 0, 1, 2, 4, + 3, 3, 1, 3, 1, 2, 4, 3, 6, 0, + 2, 3, 2, 3, 3, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 2, 1, 2, 1, 2, 0, + 3, 1, 3, 1, 2, 2, 0, 7, 2, 4, + 0, 1 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK(yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } else { \ - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -2777,131 +996,151 @@ enum the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } else { \ - (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ - } \ - while (0) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* Enable debugging if requested. */ #if YYDEBUG -#ifndef YYFPRINTF -#include /* INFRINGES ON USER NAME SPACE */ -#define YYFPRINTF fprintf -#endif +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -#define YYDPRINTF(Args) \ - do { \ - if (yydebug) \ - YYFPRINTF Args; \ - } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YYLOCATION_PRINT +# ifndef YYLOCATION_PRINT -#if defined YY_LOCATION_PRINT +# if defined YY_LOCATION_PRINT -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) { - res += YYFPRINTF(yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF(yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) { - if (yylocp->first_line < yylocp->last_line) { - res += YYFPRINTF(yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF(yyo, ".%d", end_col); - } else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF(yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } return res; } -#define YYLOCATION_PRINT yy_location_print_ +# define YYLOCATION_PRINT yy_location_print_ -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -#else +# else -#define YYLOCATION_PRINT(File, Loc) ((void)0) -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT YYLOCATION_PRINT +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT -#endif -#endif /* !defined YYLOCATION_PRINT */ +# endif +# endif /* !defined YYLOCATION_PRINT */ + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ - do { \ - if (yydebug) { \ - YYFPRINTF(stderr, "%s ", Title); \ - yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF(stderr, "\n"); \ - } \ - } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { FILE *yyoutput = yyo; - YY_USE(yyoutput); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YYLOCATION_PRINT(yyo, yylocationp); - YYFPRINTF(yyo, ": "); - yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF(yyo, ")"); + YYLOCATION_PRINT (yyo, yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -2909,66 +1148,70 @@ static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *co | TOP (included). | `------------------------------------------------------------------*/ -static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF(stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) { - int yybot = *yybottom; - YYFPRINTF(stderr, " %d", yybot); - } - YYFPRINTF(stderr, "\n"); + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); } -#define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print((Bottom), (Top)); \ - } while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, - ParsedSqlResult *sql_result, void *scanner) +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF(stderr, " $%d = ", yyi + 1); - yy_symbol_print(stderr, - YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), - sql_string, - sql_result, - scanner); - YYFPRINTF(stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); + YYFPRINTF (stderr, "\n"); + } } -#define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ - } while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -#define YYDPRINTF(Args) ((void)0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -#define YY_STACK_PRINT(Bottom, Top) -#define YY_REDUCE_PRINT(Rule) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ + /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -2979,15 +1222,16 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif + /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -2996,59 +1240,69 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default(yyn)) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } + + + #ifndef yystrlen -#if defined __GLIBC__ && defined _STRING_H -#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) -#else +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ -static YYPTRDIFF_T yystrlen(const char *yystr) +static YYPTRDIFF_T +yystrlen (const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -#endif +# endif #endif #ifndef yystpcpy -#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -#define yystpcpy stpcpy -#else +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char *yystpcpy(char *yydest, const char *yysrc) +static char * +yystpcpy (char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -3056,7 +1310,7 @@ static char *yystpcpy(char *yydest, const char *yysrc) return yyd - 1; } -#endif +# endif #endif #ifndef yytnamerr @@ -3067,45 +1321,52 @@ static char *yystpcpy(char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) { - if (*yystr == '"') { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) { - case '\'': - case ',': goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes:; - } + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } if (yyres) - return yystpcpy(yyres, yystr) - yyres; + return yystpcpy (yyres, yystr) - yyres; else - return yystrlen(yystr); + return yystrlen (yystr); } #endif -static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -3132,17 +1393,19 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -3154,12 +1417,11 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) { - enum - { - YYARGS_MAX = 5 - }; + enum { YYARGS_MAX = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -3169,13 +1431,16 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) { -#define YYCASE_(N, S) \ - case N: yyformat = S; break + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -3184,118 +1449,134 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen(yyformat) - 2 * yycount + 1; + yysize = yystrlen (yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) { - YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) { - *yymsg_alloc = 2 * yysize; - if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } else { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } } return 0; } + /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, - const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YY_USE(yyvaluep); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + + + + /*----------. | yyparse. | `----------*/ -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +int +yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - /* Lookahead token kind. */ - int yychar; - - /* The semantic value of the lookahead symbol. */ - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ - YY_INITIAL_VALUE(static YYSTYPE yyval_default;) - YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); - - /* Location data for the lookahead symbol. */ - static YYLTYPE yyloc_default -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = {1, 1, 1, 1} -#endif - ; - YYLTYPE yylloc = yyloc_default; +/* Lookahead token kind. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - /* Number of syntax errors so far. */ - int yynerrs = 0; +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -3311,23 +1592,24 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF((stderr, "Starting parse\n")); + YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -3336,90 +1618,93 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) have just been pushed. So pushing a state here evens the stacks. */ yyssp++; + /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF((stderr, "Entering state %d\n", yystate)); - YY_ASSERT(0 <= yystate && yystate < YYNSTATES); + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST(yy_state_t, yystate); + *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else - { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -#if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow(YY_("memory exhausted"), - &yyss1, - yysize * YYSIZEOF(*yyssp), - &yyvs1, - yysize * YYSIZEOF(*yyvsp), - &yyls1, - yysize * YYSIZEOF(*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -#else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); - if (!yyptr) + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) YYNOMEM; - YYSTACK_RELOCATE(yyss_alloc, yyss); - YYSTACK_RELOCATE(yyvs_alloc, yyvs); - YYSTACK_RELOCATE(yyls_alloc, yyls); -#undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE(yyss1); - } -#endif + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + YYNOMEM; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ @@ -3429,34 +1714,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default(yyn)) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) { - YYDPRINTF((stderr, "Reading a token\n")); - yychar = yylex(&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF((stderr, "Now at end of input.\n")); - } else if (yychar == YYerror) { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { - yytoken = YYTRANSLATE(yychar); - YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -3464,12 +1755,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) { - if (yytable_value_is_error(yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -3477,7 +1769,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3488,6 +1780,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yychar = YYEMPTY; goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -3497,6 +1790,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) goto yyerrlab; goto yyreduce; + /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -3512,181 +1806,177 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1 - yylen]; + yyval = yyvsp[1-yylen]; /* Default location. */ - YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT(yyn); - switch (yyn) { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 227 "yacc_sql.y" + YY_REDUCE_PRINT (yyn); + switch (yyn) { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } -#line 1814 "yacc_sql.cpp" + case 2: /* commands: command_wrapper opt_semicolon */ +#line 227 "yacc_sql.y" + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } +#line 1824 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ + case 24: /* exit_stmt: EXIT */ #line 258 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1823 "yacc_sql.cpp" +#line 1833 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ + case 25: /* help_stmt: HELP */ #line 264 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1831 "yacc_sql.cpp" +#line 1841 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ + case 26: /* sync_stmt: SYNC */ #line 269 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1839 "yacc_sql.cpp" +#line 1849 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ + case 27: /* begin_stmt: TRX_BEGIN */ #line 275 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1847 "yacc_sql.cpp" +#line 1857 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ + case 28: /* commit_stmt: TRX_COMMIT */ #line 281 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1855 "yacc_sql.cpp" +#line 1865 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ + case 29: /* rollback_stmt: TRX_ROLLBACK */ #line 287 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1863 "yacc_sql.cpp" +#line 1873 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ + case 30: /* drop_table_stmt: DROP TABLE ID */ #line 293 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1873 "yacc_sql.cpp" +#line 1883 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ + case 31: /* show_tables_stmt: SHOW TABLES */ #line 300 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1881 "yacc_sql.cpp" +#line 1891 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ + case 32: /* desc_table_stmt: DESC ID */ #line 306 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1891 "yacc_sql.cpp" +#line 1901 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ #line 315 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1902 "yacc_sql.cpp" +#line 1912 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ + case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ #line 325 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1918 "yacc_sql.cpp" +#line 1928 "yacc_sql.cpp" break; - case 35: /* opt_unique: UNIQUE */ + case 35: /* opt_unique: UNIQUE */ #line 339 "yacc_sql.y" - { - (yyval.unique) = true; - } -#line 1924 "yacc_sql.cpp" + { (yyval.unique) = true; } +#line 1934 "yacc_sql.cpp" break; - case 36: /* opt_unique: %empty */ + case 36: /* opt_unique: %empty */ #line 340 "yacc_sql.y" - { - (yyval.unique) = false; - } -#line 1930 "yacc_sql.cpp" + { (yyval.unique) = false; } +#line 1940 "yacc_sql.cpp" break; - case 37: /* attr_list: ID */ + case 37: /* attr_list: ID */ #line 345 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1940 "yacc_sql.cpp" +#line 1950 "yacc_sql.cpp" break; - case 38: /* attr_list: ID COMMA attr_list */ + case 38: /* attr_list: ID COMMA attr_list */ #line 351 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list) - ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 1950 "yacc_sql.cpp" +#line 1960 "yacc_sql.cpp" break; - case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 360 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1962 "yacc_sql.cpp" +#line 1972 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 370 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-5].string); + create_table.relation_name = (yyvsp[-5].string); free((yyvsp[-5].string)); std::vector *src_attrs = (yyvsp[-2].attr_infos); @@ -3703,18 +1993,18 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); } } -#line 1987 "yacc_sql.cpp" +#line 1997 "yacc_sql.cpp" break; - case 41: /* attr_def_list: %empty */ + case 41: /* attr_def_list: %empty */ #line 393 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1995 "yacc_sql.cpp" +#line 2005 "yacc_sql.cpp" break; - case 42: /* attr_def_list: COMMA attr_def attr_def_list */ + case 42: /* attr_def_list: COMMA attr_def attr_def_list */ #line 397 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -3725,29 +2015,29 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2009 "yacc_sql.cpp" +#line 2019 "yacc_sql.cpp" break; - case 43: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ + case 43: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ #line 410 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; } free((yyvsp[-5].string)); } -#line 2025 "yacc_sql.cpp" +#line 2035 "yacc_sql.cpp" break; - case 44: /* attr_def: ID type nullable_constraint */ + case 44: /* attr_def: ID type nullable_constraint */ #line 422 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -3767,85 +2057,75 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2051 "yacc_sql.cpp" +#line 2061 "yacc_sql.cpp" break; - case 45: /* nullable_constraint: NOT NULL_T */ + case 45: /* nullable_constraint: NOT NULL_T */ #line 447 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2059 "yacc_sql.cpp" +#line 2069 "yacc_sql.cpp" break; - case 46: /* nullable_constraint: NULLABLE */ + case 46: /* nullable_constraint: NULLABLE */ #line 451 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2067 "yacc_sql.cpp" +#line 2077 "yacc_sql.cpp" break; - case 47: /* nullable_constraint: NULL_T */ + case 47: /* nullable_constraint: NULL_T */ #line 455 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2075 "yacc_sql.cpp" +#line 2085 "yacc_sql.cpp" break; - case 48: /* nullable_constraint: %empty */ + case 48: /* nullable_constraint: %empty */ #line 459 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 2083 "yacc_sql.cpp" +#line 2093 "yacc_sql.cpp" break; - case 49: /* number: NUMBER */ + case 49: /* number: NUMBER */ #line 465 "yacc_sql.y" - { - (yyval.number) = (yyvsp[0].number); - } -#line 2089 "yacc_sql.cpp" + {(yyval.number) = (yyvsp[0].number);} +#line 2099 "yacc_sql.cpp" break; - case 50: /* type: INT_T */ + case 50: /* type: INT_T */ #line 468 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::INTS); - } -#line 2095 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::INTS); } +#line 2105 "yacc_sql.cpp" break; - case 51: /* type: STRING_T */ + case 51: /* type: STRING_T */ #line 469 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::CHARS); - } -#line 2101 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::CHARS); } +#line 2111 "yacc_sql.cpp" break; - case 52: /* type: FLOAT_T */ + case 52: /* type: FLOAT_T */ #line 470 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::FLOATS); - } -#line 2107 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::FLOATS); } +#line 2117 "yacc_sql.cpp" break; - case 53: /* type: DATE_T */ + case 53: /* type: DATE_T */ #line 471 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::DATES); - } -#line 2113 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 2123 "yacc_sql.cpp" break; - case 54: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 54: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 476 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -3853,117 +2133,117 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2127 "yacc_sql.cpp" +#line 2137 "yacc_sql.cpp" break; - case 55: /* values_list: LBRACE value_list RBRACE */ + case 55: /* values_list: LBRACE value_list RBRACE */ #line 489 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2137 "yacc_sql.cpp" +#line 2147 "yacc_sql.cpp" break; - case 56: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 56: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 495 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2146 "yacc_sql.cpp" +#line 2156 "yacc_sql.cpp" break; - case 57: /* value_list: value */ + case 57: /* value_list: value */ #line 502 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2156 "yacc_sql.cpp" +#line 2166 "yacc_sql.cpp" break; - case 58: /* value_list: value_list COMMA value */ + case 58: /* value_list: value_list COMMA value */ #line 508 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2165 "yacc_sql.cpp" +#line 2175 "yacc_sql.cpp" break; - case 59: /* value: NUMBER */ + case 59: /* value: NUMBER */ #line 515 "yacc_sql.y" - { + { (yyval.value) = new Value((int)(yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2174 "yacc_sql.cpp" +#line 2184 "yacc_sql.cpp" break; - case 60: /* value: FLOAT */ + case 60: /* value: FLOAT */ #line 519 "yacc_sql.y" - { + { (yyval.value) = new Value((float)(yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2183 "yacc_sql.cpp" +#line 2193 "yacc_sql.cpp" break; - case 61: /* value: SSS */ + case 61: /* value: SSS */ #line 523 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); + { + char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2194 "yacc_sql.cpp" +#line 2204 "yacc_sql.cpp" break; - case 62: /* value: NULL_T */ + case 62: /* value: NULL_T */ #line 529 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } -#line 2202 "yacc_sql.cpp" +#line 2212 "yacc_sql.cpp" break; - case 63: /* storage_format: %empty */ + case 63: /* storage_format: %empty */ #line 536 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2210 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; - case 64: /* storage_format: STORAGE FORMAT EQ ID */ + case 64: /* storage_format: STORAGE FORMAT EQ ID */ #line 540 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2218 "yacc_sql.cpp" +#line 2228 "yacc_sql.cpp" break; - case 65: /* delete_stmt: DELETE FROM ID where */ + case 65: /* delete_stmt: DELETE FROM ID where */ #line 547 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); } free((yyvsp[-1].string)); } -#line 2231 "yacc_sql.cpp" +#line 2241 "yacc_sql.cpp" break; - case 66: /* update_stmt: UPDATE ID SET setClauses where */ + case 66: /* update_stmt: UPDATE ID SET setClauses where */ #line 559 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -3972,40 +2252,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2246 "yacc_sql.cpp" +#line 2256 "yacc_sql.cpp" break; - case 67: /* setClauses: setClause */ + case 67: /* setClauses: setClause */ #line 573 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2256 "yacc_sql.cpp" +#line 2266 "yacc_sql.cpp" break; - case 68: /* setClauses: setClauses COMMA setClause */ + case 68: /* setClauses: setClauses COMMA setClause */ #line 579 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2265 "yacc_sql.cpp" +#line 2275 "yacc_sql.cpp" break; - case 69: /* setClause: ID EQ value */ + case 69: /* setClause: ID EQ value */ #line 587 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); + (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } -#line 2276 "yacc_sql.cpp" +#line 2286 "yacc_sql.cpp" break; - case 70: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ + case 70: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ #line 597 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -4035,10 +2315,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].orderby_list); } } -#line 2309 "yacc_sql.cpp" +#line 2319 "yacc_sql.cpp" break; - case 71: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ + case 71: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ #line 626 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -4053,8 +2333,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); - ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -4062,8 +2341,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -4071,20 +2349,20 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2343 "yacc_sql.cpp" +#line 2353 "yacc_sql.cpp" break; - case 72: /* calc_stmt: CALC expression_list */ + case 72: /* calc_stmt: CALC expression_list */ #line 659 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2353 "yacc_sql.cpp" +#line 2363 "yacc_sql.cpp" break; - case 73: /* expression_list: expression alias */ + case 73: /* expression_list: expression alias */ #line 668 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; @@ -4094,10 +2372,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2366 "yacc_sql.cpp" +#line 2376 "yacc_sql.cpp" break; - case 74: /* expression_list: expression alias COMMA expression_list */ + case 74: /* expression_list: expression alias COMMA expression_list */ #line 677 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -4108,51 +2386,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2383 "yacc_sql.cpp" +#line 2393 "yacc_sql.cpp" break; - case 75: /* expression: expression '+' expression */ + case 75: /* expression: expression '+' expression */ #line 692 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2391 "yacc_sql.cpp" +#line 2401 "yacc_sql.cpp" break; - case 76: /* expression: expression '-' expression */ + case 76: /* expression: expression '-' expression */ #line 695 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2399 "yacc_sql.cpp" +#line 2409 "yacc_sql.cpp" break; - case 77: /* expression: expression '*' expression */ + case 77: /* expression: expression '*' expression */ #line 698 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2407 "yacc_sql.cpp" +#line 2417 "yacc_sql.cpp" break; - case 78: /* expression: expression '/' expression */ + case 78: /* expression: expression '/' expression */ #line 701 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2415 "yacc_sql.cpp" +#line 2425 "yacc_sql.cpp" break; - case 79: /* expression: LBRACE expression_list RBRACE */ + case 79: /* expression: LBRACE expression_list RBRACE */ #line 704 "yacc_sql.y" - { + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -4161,181 +2435,179 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2429 "yacc_sql.cpp" +#line 2439 "yacc_sql.cpp" break; - case 80: /* expression: '-' expression */ + case 80: /* expression: '-' expression */ #line 713 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2437 "yacc_sql.cpp" +#line 2447 "yacc_sql.cpp" break; - case 81: /* expression: value */ + case 81: /* expression: value */ #line 716 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2447 "yacc_sql.cpp" +#line 2457 "yacc_sql.cpp" break; - case 82: /* expression: rel_attr */ + case 82: /* expression: rel_attr */ #line 721 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2458 "yacc_sql.cpp" +#line 2468 "yacc_sql.cpp" break; - case 83: /* expression: '*' */ + case 83: /* expression: '*' */ #line 727 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } -#line 2466 "yacc_sql.cpp" +#line 2476 "yacc_sql.cpp" break; - case 84: /* expression: aggr_func_expr */ + case 84: /* expression: aggr_func_expr */ #line 730 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2474 "yacc_sql.cpp" +#line 2484 "yacc_sql.cpp" break; - case 85: /* expression: sub_query_expr */ + case 85: /* expression: sub_query_expr */ #line 733 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2482 "yacc_sql.cpp" +#line 2492 "yacc_sql.cpp" break; - case 86: /* alias: %empty */ + case 86: /* alias: %empty */ #line 740 "yacc_sql.y" - { + { (yyval.string) = nullptr; } -#line 2490 "yacc_sql.cpp" +#line 2500 "yacc_sql.cpp" break; - case 87: /* alias: ID */ + case 87: /* alias: ID */ #line 743 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } -#line 2498 "yacc_sql.cpp" +#line 2508 "yacc_sql.cpp" break; - case 88: /* alias: AS ID */ + case 88: /* alias: AS ID */ #line 746 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } -#line 2506 "yacc_sql.cpp" +#line 2516 "yacc_sql.cpp" break; - case 89: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 89: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 752 "yacc_sql.y" { - if ((*(yyvsp[-1].expression_list)).size() != 1) { - (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); - } else { - (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); - } + if((*(yyvsp[-1].expression_list)).size() != 1) { + (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); + } else { + (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); + } } -#line 2518 "yacc_sql.cpp" +#line 2528 "yacc_sql.cpp" break; - case 90: /* aggr_func_expr: ID LBRACE RBRACE */ + case 90: /* aggr_func_expr: ID LBRACE RBRACE */ #line 760 "yacc_sql.y" - { - (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); - } -#line 2526 "yacc_sql.cpp" + { + (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); + } +#line 2536 "yacc_sql.cpp" break; - case 91: /* sub_query_expr: LBRACE select_stmt RBRACE */ + case 91: /* sub_query_expr: LBRACE select_stmt RBRACE */ #line 767 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2534 "yacc_sql.cpp" +#line 2544 "yacc_sql.cpp" break; - case 92: /* rel_attr: ID */ + case 92: /* rel_attr: ID */ #line 773 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2544 "yacc_sql.cpp" +#line 2554 "yacc_sql.cpp" break; - case 93: /* rel_attr: ID DOT ID */ + case 93: /* rel_attr: ID DOT ID */ #line 778 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2556 "yacc_sql.cpp" +#line 2566 "yacc_sql.cpp" break; - case 94: /* relation: ID */ + case 94: /* relation: ID */ #line 788 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } -#line 2564 "yacc_sql.cpp" +#line 2574 "yacc_sql.cpp" break; - case 95: /* rel_list: relation alias */ + case 95: /* rel_list: relation alias */ #line 794 "yacc_sql.y" - { + { (yyval.relation_list) = new std::vector(); - if (nullptr != (yyvsp[0].string)) { - (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); free((yyvsp[0].string)); - } else { + }else{ (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); } -#line 2579 "yacc_sql.cpp" +#line 2589 "yacc_sql.cpp" break; - case 96: /* rel_list: relation alias COMMA rel_list */ + case 96: /* rel_list: relation alias COMMA rel_list */ #line 804 "yacc_sql.y" - { + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if (nullptr != (yyvsp[-2].string)) { - (yyval.relation_list) - ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); free((yyvsp[-2].string)); - } else { + }else{ (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); } -#line 2598 "yacc_sql.cpp" +#line 2608 "yacc_sql.cpp" break; - case 97: /* joinClauses: relation ON condition */ + case 97: /* joinClauses: relation ON condition */ #line 822 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; @@ -4343,272 +2615,269 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2609 "yacc_sql.cpp" +#line 2619 "yacc_sql.cpp" break; - case 98: /* joinClauses: relation ON condition INNER JOIN joinClauses */ + case 98: /* joinClauses: relation ON condition INNER JOIN joinClauses */ #line 829 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2621 "yacc_sql.cpp" +#line 2631 "yacc_sql.cpp" break; - case 99: /* where: %empty */ + case 99: /* where: %empty */ #line 840 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2629 "yacc_sql.cpp" +#line 2639 "yacc_sql.cpp" break; - case 100: /* where: WHERE condition */ + case 100: /* where: WHERE condition */ #line 843 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + { + (yyval.expression) = (yyvsp[0].expression); } -#line 2637 "yacc_sql.cpp" +#line 2647 "yacc_sql.cpp" break; - case 101: /* condition: expression comp_op expression */ + case 101: /* condition: expression comp_op expression */ #line 850 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2645 "yacc_sql.cpp" +#line 2655 "yacc_sql.cpp" break; - case 102: /* condition: condition AND condition */ + case 102: /* condition: comp_op expression */ #line 854 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + Value val; + val.set_null(true); + ValueExpr *temp_expr = new ValueExpr(val); + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2653 "yacc_sql.cpp" +#line 2666 "yacc_sql.cpp" break; - case 103: /* condition: condition OR condition */ -#line 858 "yacc_sql.y" + case 103: /* condition: condition AND condition */ +#line 861 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2661 "yacc_sql.cpp" +#line 2674 "yacc_sql.cpp" break; - case 104: /* comp_op: EQ */ -#line 864 "yacc_sql.y" + case 104: /* condition: condition OR condition */ +#line 865 "yacc_sql.y" { - (yyval.comp) = EQUAL_TO; + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2667 "yacc_sql.cpp" +#line 2682 "yacc_sql.cpp" break; - case 105: /* comp_op: LT */ -#line 865 "yacc_sql.y" - { - (yyval.comp) = LESS_THAN; - } -#line 2673 "yacc_sql.cpp" + case 105: /* comp_op: EQ */ +#line 871 "yacc_sql.y" + { (yyval.comp) = EQUAL_TO; } +#line 2688 "yacc_sql.cpp" break; - case 106: /* comp_op: GT */ -#line 866 "yacc_sql.y" - { - (yyval.comp) = GREAT_THAN; - } -#line 2679 "yacc_sql.cpp" + case 106: /* comp_op: LT */ +#line 872 "yacc_sql.y" + { (yyval.comp) = LESS_THAN; } +#line 2694 "yacc_sql.cpp" break; - case 107: /* comp_op: LE */ -#line 867 "yacc_sql.y" - { - (yyval.comp) = LESS_EQUAL; - } -#line 2685 "yacc_sql.cpp" + case 107: /* comp_op: GT */ +#line 873 "yacc_sql.y" + { (yyval.comp) = GREAT_THAN; } +#line 2700 "yacc_sql.cpp" break; - case 108: /* comp_op: GE */ -#line 868 "yacc_sql.y" - { - (yyval.comp) = GREAT_EQUAL; - } -#line 2691 "yacc_sql.cpp" + case 108: /* comp_op: LE */ +#line 874 "yacc_sql.y" + { (yyval.comp) = LESS_EQUAL; } +#line 2706 "yacc_sql.cpp" break; - case 109: /* comp_op: NE */ -#line 869 "yacc_sql.y" - { - (yyval.comp) = NOT_EQUAL; - } -#line 2697 "yacc_sql.cpp" + case 109: /* comp_op: GE */ +#line 875 "yacc_sql.y" + { (yyval.comp) = GREAT_EQUAL; } +#line 2712 "yacc_sql.cpp" break; - case 110: /* comp_op: IS */ -#line 870 "yacc_sql.y" - { - (yyval.comp) = OP_IS; - } -#line 2703 "yacc_sql.cpp" + case 110: /* comp_op: NE */ +#line 876 "yacc_sql.y" + { (yyval.comp) = NOT_EQUAL; } +#line 2718 "yacc_sql.cpp" break; - case 111: /* comp_op: IS NOT */ -#line 871 "yacc_sql.y" - { - (yyval.comp) = OP_IS_NOT; - } -#line 2709 "yacc_sql.cpp" + case 111: /* comp_op: IS */ +#line 877 "yacc_sql.y" + { (yyval.comp) = OP_IS; } +#line 2724 "yacc_sql.cpp" break; - case 112: /* comp_op: LIKE */ -#line 872 "yacc_sql.y" - { - (yyval.comp) = LIKE_OP; - } -#line 2715 "yacc_sql.cpp" + case 112: /* comp_op: IS NOT */ +#line 878 "yacc_sql.y" + { (yyval.comp) = OP_IS_NOT; } +#line 2730 "yacc_sql.cpp" break; - case 113: /* comp_op: NOT LIKE */ -#line 873 "yacc_sql.y" - { - (yyval.comp) = NOT_LIKE_OP; - } -#line 2721 "yacc_sql.cpp" + case 113: /* comp_op: LIKE */ +#line 879 "yacc_sql.y" + { (yyval.comp) = LIKE_OP;} +#line 2736 "yacc_sql.cpp" break; - case 114: /* comp_op: IN */ -#line 874 "yacc_sql.y" - { - (yyval.comp) = IN_OP; - } -#line 2727 "yacc_sql.cpp" + case 114: /* comp_op: NOT LIKE */ +#line 880 "yacc_sql.y" + {(yyval.comp) = NOT_LIKE_OP;} +#line 2742 "yacc_sql.cpp" break; - case 115: /* comp_op: NOT IN */ -#line 875 "yacc_sql.y" - { - (yyval.comp) = NOT_IN_OP; - } -#line 2733 "yacc_sql.cpp" + case 115: /* comp_op: IN */ +#line 881 "yacc_sql.y" + { (yyval.comp) = IN_OP; } +#line 2748 "yacc_sql.cpp" break; - case 116: /* opt_order_by: %empty */ -#line 880 "yacc_sql.y" + case 116: /* comp_op: NOT IN */ +#line 882 "yacc_sql.y" + { (yyval.comp) = NOT_IN_OP; } +#line 2754 "yacc_sql.cpp" + break; + + case 117: /* comp_op: EXISTS */ +#line 883 "yacc_sql.y" + { (yyval.comp) = EXISTS_OP; } +#line 2760 "yacc_sql.cpp" + break; + + case 118: /* comp_op: NOT EXISTS */ +#line 884 "yacc_sql.y" + { (yyval.comp) = NOT_EXISTS_OP; } +#line 2766 "yacc_sql.cpp" + break; + + case 119: /* opt_order_by: %empty */ +#line 889 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2741 "yacc_sql.cpp" +#line 2774 "yacc_sql.cpp" break; - case 117: /* opt_order_by: ORDER BY sort_list */ -#line 884 "yacc_sql.y" + case 120: /* opt_order_by: ORDER BY sort_list */ +#line 893 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2750 "yacc_sql.cpp" +#line 2783 "yacc_sql.cpp" break; - case 118: /* sort_list: sort_unit */ -#line 892 "yacc_sql.y" - { + case 121: /* sort_list: sort_unit */ +#line 901 "yacc_sql.y" + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } -#line 2759 "yacc_sql.cpp" + } +#line 2792 "yacc_sql.cpp" break; - case 119: /* sort_list: sort_unit COMMA sort_list */ -#line 897 "yacc_sql.y" - { + case 122: /* sort_list: sort_unit COMMA sort_list */ +#line 906 "yacc_sql.y" + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } -#line 2768 "yacc_sql.cpp" + } +#line 2801 "yacc_sql.cpp" break; - case 120: /* sort_unit: expression */ -#line 905 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + case 123: /* sort_unit: expression */ +#line 914 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2778 "yacc_sql.cpp" + } +#line 2811 "yacc_sql.cpp" break; - case 121: /* sort_unit: expression DESC */ -#line 911 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 124: /* sort_unit: expression DESC */ +#line 920 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } -#line 2788 "yacc_sql.cpp" + } +#line 2821 "yacc_sql.cpp" break; - case 122: /* sort_unit: expression ASC */ -#line 917 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 125: /* sort_unit: expression ASC */ +#line 926 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2798 "yacc_sql.cpp" + } +#line 2831 "yacc_sql.cpp" break; - case 123: /* group_by: %empty */ -#line 926 "yacc_sql.y" + case 126: /* group_by: %empty */ +#line 935 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2806 "yacc_sql.cpp" +#line 2839 "yacc_sql.cpp" break; - case 124: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 932 "yacc_sql.y" + case 127: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 941 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2820 "yacc_sql.cpp" +#line 2853 "yacc_sql.cpp" break; - case 125: /* explain_stmt: EXPLAIN command_wrapper */ -#line 945 "yacc_sql.y" + case 128: /* explain_stmt: EXPLAIN command_wrapper */ +#line 954 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2829 "yacc_sql.cpp" +#line 2862 "yacc_sql.cpp" break; - case 126: /* set_variable_stmt: SET ID EQ value */ -#line 953 "yacc_sql.y" + case 129: /* set_variable_stmt: SET ID EQ value */ +#line 962 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2841 "yacc_sql.cpp" +#line 2874 "yacc_sql.cpp" break; -#line 2845 "yacc_sql.cpp" - default: break; - } +#line 2878 "yacc_sql.cpp" + + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -4620,9 +2889,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; @@ -4633,67 +2902,84 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) { - ++yynerrs; - { - yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) { - if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); - yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); - if (yymsg) { - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } - yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; } - } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } else { - yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; + } } - } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; + /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -4706,40 +2992,45 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) { - yyn = yypact[yystate]; - if (!yypact_value_is_default(yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - yystate = *yyssp; - YY_STACK_PRINT(yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -4747,14 +3038,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; + /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -4762,6 +3054,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 0; goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -4769,48 +3062,53 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 1; goto yyreturnlab; + /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; + /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE(yychar); - yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK(yylen); - YY_STACK_PRINT(yyss, yyssp); - while (yyssp != yyss) { - yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - } + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE(yyss); + YYSTACK_FREE (yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); + YYSTACK_FREE (yymsg); return yyresult; } -#line 965 "yacc_sql.y" +#line 974 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) -{ +int sql_parse(const char *s, ParsedSqlResult *sql_result) { yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 70e5e881..d32430f9 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -#define YY_YY_YACC_SQL_HPP_INCLUDED +# define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -#define YYDEBUG 0 +# define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,123 +47,124 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -#define YYTOKENTYPE -enum yytokentype -{ - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - ORDER = 266, /* ORDER */ - TABLE = 267, /* TABLE */ - TABLES = 268, /* TABLES */ - INDEX = 269, /* INDEX */ - CALC = 270, /* CALC */ - SELECT = 271, /* SELECT */ - DESC = 272, /* DESC */ - SHOW = 273, /* SHOW */ - SYNC = 274, /* SYNC */ - INSERT = 275, /* INSERT */ - DELETE = 276, /* DELETE */ - UPDATE = 277, /* UPDATE */ - LBRACE = 278, /* LBRACE */ - RBRACE = 279, /* RBRACE */ - COMMA = 280, /* COMMA */ - TRX_BEGIN = 281, /* TRX_BEGIN */ - TRX_COMMIT = 282, /* TRX_COMMIT */ - TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ - INT_T = 284, /* INT_T */ - IN = 285, /* IN */ - STRING_T = 286, /* STRING_T */ - FLOAT_T = 287, /* FLOAT_T */ - DATE_T = 288, /* DATE_T */ - NOT = 289, /* NOT */ - UNIQUE = 290, /* UNIQUE */ - NULL_T = 291, /* NULL_T */ - NULLABLE = 292, /* NULLABLE */ - HELP = 293, /* HELP */ - EXIT = 294, /* EXIT */ - DOT = 295, /* DOT */ - INTO = 296, /* INTO */ - VALUES = 297, /* VALUES */ - FROM = 298, /* FROM */ - WHERE = 299, /* WHERE */ - AND = 300, /* AND */ - OR = 301, /* OR */ - SET = 302, /* SET */ - ON = 303, /* ON */ - LOAD = 304, /* LOAD */ - DATA = 305, /* DATA */ - INFILE = 306, /* INFILE */ - EXPLAIN = 307, /* EXPLAIN */ - STORAGE = 308, /* STORAGE */ - FORMAT = 309, /* FORMAT */ - INNER = 310, /* INNER */ - JOIN = 311, /* JOIN */ - EQ = 312, /* EQ */ - LT = 313, /* LT */ - GT = 314, /* GT */ - LE = 315, /* LE */ - GE = 316, /* GE */ - NE = 317, /* NE */ - LIKE = 318, /* LIKE */ - IS = 319, /* IS */ - NUMBER = 320, /* NUMBER */ - FLOAT = 321, /* FLOAT */ - ID = 322, /* ID */ - SSS = 323, /* SSS */ - UMINUS = 324 /* UMINUS */ -}; -typedef enum yytokentype yytoken_kind_t; +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + ORDER = 266, /* ORDER */ + TABLE = 267, /* TABLE */ + TABLES = 268, /* TABLES */ + INDEX = 269, /* INDEX */ + CALC = 270, /* CALC */ + SELECT = 271, /* SELECT */ + DESC = 272, /* DESC */ + SHOW = 273, /* SHOW */ + SYNC = 274, /* SYNC */ + INSERT = 275, /* INSERT */ + DELETE = 276, /* DELETE */ + UPDATE = 277, /* UPDATE */ + LBRACE = 278, /* LBRACE */ + RBRACE = 279, /* RBRACE */ + COMMA = 280, /* COMMA */ + TRX_BEGIN = 281, /* TRX_BEGIN */ + TRX_COMMIT = 282, /* TRX_COMMIT */ + TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ + INT_T = 284, /* INT_T */ + IN = 285, /* IN */ + STRING_T = 286, /* STRING_T */ + FLOAT_T = 287, /* FLOAT_T */ + DATE_T = 288, /* DATE_T */ + NOT = 289, /* NOT */ + UNIQUE = 290, /* UNIQUE */ + NULL_T = 291, /* NULL_T */ + NULLABLE = 292, /* NULLABLE */ + HELP = 293, /* HELP */ + EXIT = 294, /* EXIT */ + DOT = 295, /* DOT */ + INTO = 296, /* INTO */ + VALUES = 297, /* VALUES */ + FROM = 298, /* FROM */ + WHERE = 299, /* WHERE */ + AND = 300, /* AND */ + OR = 301, /* OR */ + SET = 302, /* SET */ + ON = 303, /* ON */ + LOAD = 304, /* LOAD */ + DATA = 305, /* DATA */ + INFILE = 306, /* INFILE */ + EXPLAIN = 307, /* EXPLAIN */ + STORAGE = 308, /* STORAGE */ + FORMAT = 309, /* FORMAT */ + INNER = 310, /* INNER */ + JOIN = 311, /* JOIN */ + EQ = 312, /* EQ */ + LT = 313, /* LT */ + GT = 314, /* GT */ + LE = 315, /* LE */ + GE = 316, /* GE */ + NE = 317, /* NE */ + LIKE = 318, /* LIKE */ + IS = 319, /* IS */ + NUMBER = 320, /* NUMBER */ + FLOAT = 321, /* FLOAT */ + ID = 322, /* ID */ + SSS = 323, /* SSS */ + UMINUS = 324 /* UMINUS */ + }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 131 "yacc_sql.y" - ParsedSqlNode *sql_node; - Value *value; - enum CompOp comp; - RelAttrSqlNode *rel_attr; - std::vector *attr_infos; - AttrInfoSqlNode *attr_info; - Expression *expression; - std::vector> *expression_list; - std::vector *value_list; - std::vector> *values_list; - SetClauseSqlNode *set_clause; - std::vector *set_clauses; - JoinSqlNode *join_clauses; - std::vector *rel_attr_list; - std::vector *relation_list; - OrderBySqlNode *orderby_unit; - std::vector *orderby_list; - char *string; - int number; - float floats; - bool nullable_info; - std::vector *index_attr_list; - bool unique; + ParsedSqlNode * sql_node; + Value * value; + enum CompOp comp; + RelAttrSqlNode * rel_attr; + std::vector * attr_infos; + AttrInfoSqlNode * attr_info; + Expression * expression; + std::vector> * expression_list; + std::vector * value_list; + std::vector> * values_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; + JoinSqlNode * join_clauses; + std::vector * rel_attr_list; + std::vector * relation_list; + OrderBySqlNode * orderby_unit; + std::vector * orderby_list; + char * string; + int number; + float floats; + bool nullable_info; + std::vector * index_attr_list; + bool unique; #line 159 "yacc_sql.hpp" + }; typedef union YYSTYPE YYSTYPE; -#define YYSTYPE_IS_TRIVIAL 1 -#define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -172,10 +173,14 @@ struct YYLTYPE int last_line; int last_column; }; -#define YYLTYPE_IS_DECLARED 1 -#define YYLTYPE_IS_TRIVIAL 1 +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 #endif -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); + + + +int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); + #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 4c241501..fd8225bc 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -850,6 +850,13 @@ condition: { $$ = new ComparisonExpr($2, $1, $3); } + | comp_op expression + { + Value val; + val.set_null(true); + ValueExpr *temp_expr = new ValueExpr(val); + $$ = new ComparisonExpr($1,temp_expr, $2); + } | condition AND condition { $$ = new ConjunctionExpr(ConjunctionExpr::Type::AND, $1, $3); @@ -873,6 +880,8 @@ comp_op: | NOT LIKE {$$ = NOT_LIKE_OP;} | IN { $$ = IN_OP; } | NOT IN { $$ = NOT_IN_OP; } + | EXISTS { $$ = EXISTS_OP; } + | NOT EXISTS { $$ = NOT_EXISTS_OP; } ; opt_order_by: diff --git a/test/case/miniob_test.py b/test/case/miniob_test.py index a098515f..13c28c9f 100755 --- a/test/case/miniob_test.py +++ b/test/case/miniob_test.py @@ -1058,7 +1058,7 @@ def compile(work_dir: str, build_dir: str, cmake_args: str, make_args: str, rebu make_command = ["make", "--silent", "-C", build_path] if isinstance(make_args, str): if not make_args: - make_command.append('-j4') + make_command.append('-j24') else: args = make_args.split(';') for arg in args: From b2c22f82b91272f5cf118f18e0255930c7fb5c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Fri, 4 Oct 2024 07:19:40 +0000 Subject: [PATCH 117/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86not=20exists?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 2d1f7449..c7526239 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -248,16 +248,22 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) if (comp_ == EXISTS_OP || comp_ == NOT_EXISTS_OP) { int visited_num = 0; + // 遍历right_并统计非NULL的值 while (RC::SUCCESS == (rc = right_->get_value(tuple, right_value))) { if (!right_value.is_null()) { visited_num++; } } - - value.set_boolean(comp_ == EXISTS_OP ? (visited_num > 0) : visited_num = 0); + // 如果是EXISTS_OP,判断是否存在非NULL值;如果是NOT_EXISTS_OP,判断是否没有任何非NULL值 + if (comp_ == EXISTS_OP) { + value.set_boolean(visited_num > 0); // 如果存在至少一个非NULL值,返回true + } else if (comp_ == NOT_EXISTS_OP) { + value.set_boolean(visited_num == 0); // 如果所有值都是NULL或者没有值,返回true + } return RC::SUCCESS; } + // Get the value of the left expression rc = left_->get_value(tuple, left_value); if (rc != RC::SUCCESS) { From afb58b77b3a5a6cf42b3ec4ef043db6197a7c58d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Fri, 4 Oct 2024 08:51:25 +0000 Subject: [PATCH 118/308] =?UTF-8?q?alias=20=E6=94=AF=E6=8C=81table.*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 5 +- src/observer/sql/parser/yacc_sql.cpp | 566 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 3 + .../result/primary-complex-sub-query.result | 3 - test/case/result/primary-insert.result | 2 +- test/case/result/primary-null.result | 2 +- test/case/result/primary-show-index.result | 35 -- test/case/result/primary-typecast.result | 151 ----- test/case/result/primary-unique.result | 39 +- test/case/result/primary-update-plus.result | 71 --- test/case/test/primary-complex-sub-query.test | 2 - test/case/test/primary-insert.test | 4 +- test/case/test/primary-null.test | 2 +- test/case/test/primary-show-index.test | 19 - test/case/test/primary-typecast.test | 44 -- test/case/test/primary-unique.test | 12 +- test/case/test/primary-update-plus.test | 32 - 17 files changed, 306 insertions(+), 686 deletions(-) delete mode 100644 test/case/result/primary-show-index.result delete mode 100644 test/case/result/primary-typecast.result delete mode 100644 test/case/result/primary-update-plus.result delete mode 100644 test/case/test/primary-show-index.test delete mode 100644 test/case/test/primary-typecast.test delete mode 100644 test/case/test/primary-update-plus.test diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index c7526239..02941d73 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -254,11 +254,10 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) visited_num++; } } - // 如果是EXISTS_OP,判断是否存在非NULL值;如果是NOT_EXISTS_OP,判断是否没有任何非NULL值 if (comp_ == EXISTS_OP) { - value.set_boolean(visited_num > 0); // 如果存在至少一个非NULL值,返回true + value.set_boolean(visited_num > 0); } else if (comp_ == NOT_EXISTS_OP) { - value.set_boolean(visited_num == 0); // 如果所有值都是NULL或者没有值,返回true + value.set_boolean(visited_num == 0); } return RC::SUCCESS; } diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index fdbeb678..0fa96ec7 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -614,9 +614,9 @@ union yyalloc /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 54 /* YYNRULES -- Number of rules. */ -#define YYNRULES 131 +#define YYNRULES 132 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 232 +#define YYNSTATES 233 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 324 @@ -680,12 +680,12 @@ static const yytype_int16 yyrline[] = 468, 469, 470, 471, 475, 488, 494, 501, 507, 515, 519, 523, 529, 536, 539, 546, 558, 572, 578, 586, 596, 625, 658, 667, 676, 692, 695, 698, 701, 704, - 713, 716, 721, 727, 730, 733, 740, 743, 746, 751, - 759, 766, 773, 778, 788, 794, 804, 821, 828, 840, - 843, 849, 853, 860, 864, 871, 872, 873, 874, 875, - 876, 877, 878, 879, 880, 881, 882, 883, 884, 889, - 892, 900, 905, 913, 919, 925, 935, 940, 953, 961, - 971, 972 + 713, 716, 721, 727, 730, 733, 736, 743, 746, 749, + 754, 762, 769, 776, 781, 791, 797, 807, 824, 831, + 843, 846, 852, 856, 863, 867, 874, 875, 876, 877, + 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, + 892, 895, 903, 908, 916, 922, 928, 938, 943, 956, + 964, 974, 975 }; #endif @@ -732,7 +732,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-162) +#define YYPACT_NINF (-161) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -746,30 +746,30 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 198, 1, 10, 133, 133, -37, 5, -162, -18, 17, - -8, -162, -162, -162, -162, -162, 18, 15, 198, 92, - 90, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, 28, -162, 82, 30, 31, 68, -162, -162, - -162, -2, -162, 133, -162, -162, -162, 2, -162, -162, - -162, 58, -162, -162, 59, 36, 38, 61, 49, 69, - -162, -162, -162, -162, 102, 62, -162, 78, 104, 106, - 126, 64, -162, 70, -162, 133, 133, 133, 133, 107, - 73, 73, 100, 99, 77, -19, 79, 84, 97, 91, - -162, -162, -162, 122, -162, -162, -44, -44, -162, -162, - 133, -162, 3, 99, -162, 134, 118, -162, 103, -13, - -162, -162, 120, 35, 138, 98, -162, -162, -162, 108, - 141, -162, -19, 142, -162, -162, -1, -162, -162, -162, - -162, -162, -162, -162, 125, 52, 7, 133, -19, 77, - -162, 156, -162, -162, -162, -162, 14, 84, 146, 148, - 73, 73, 161, 63, -162, 150, -162, -162, -162, -162, - 133, 118, 118, -29, -162, -162, 123, 130, 151, -162, - -162, -162, 138, 149, 140, 160, 99, 16, -162, 203, - -162, -162, -19, -19, -29, -162, 165, -162, -162, 187, - -162, -162, 158, -162, 196, 199, 118, -162, 133, -162, - 65, 20, 170, 140, -162, -30, -162, 9, -162, 197, - -162, -162, 162, -162, 172, -162, -162, 133, -162, 73, - -162, -162 + 184, -4, 29, 119, 119, -50, 40, -161, 9, -29, + -37, -161, -161, -161, -161, -161, -30, 5, 184, 60, + 70, -161, -161, -161, -161, -161, -161, -161, -161, -161, + -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, + -161, -161, 16, -161, 49, 44, 54, 112, -161, -161, + -161, -1, -161, 119, -161, -161, -161, 0, -161, -161, + -161, 51, -161, -161, 82, 55, 57, 80, 69, 78, + -161, -161, -161, -161, 108, 65, -161, 85, 113, 114, + 79, -47, -161, 72, -161, 119, 119, 119, 119, 115, + 74, 74, 101, 107, 86, -20, 84, 102, 124, 106, + -161, -161, -161, 150, -161, -161, -161, -13, -13, -161, + -161, 119, -161, 7, 107, -161, 153, 100, -161, 131, + -15, -161, -161, 140, 81, 168, 127, -161, -161, -161, + 139, 171, -161, -20, 172, -161, -161, 12, -161, -161, + -161, -161, -161, -161, -161, 164, 27, 20, 119, -20, + 86, -161, 195, -161, -161, -161, -161, 15, 102, 185, + 190, 74, 74, 197, 68, -161, 191, -161, -161, -161, + -161, 119, 100, 100, 35, -161, -161, 148, 151, 181, + -161, -161, -161, 168, 165, 152, 173, 107, 1, -161, + 214, -161, -161, -20, -20, 35, -161, 179, -161, -161, + 201, -161, -161, 174, -161, 202, 205, 100, -161, 119, + -161, 92, -11, 169, 152, -161, -27, -161, 10, -161, + 207, -161, -161, 163, -161, 178, -161, -161, 119, -161, + 74, -161, -161 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -779,49 +779,49 @@ static const yytype_uint8 yydefact[] = { 0, 36, 0, 0, 0, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 130, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 131, 23, 22, 15, 16, 17, 18, 9, 10, 11, 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, 20, 21, 0, 35, 0, 0, 0, 0, 62, 59, - 60, 92, 61, 0, 83, 81, 72, 86, 84, 85, + 60, 93, 61, 0, 83, 81, 72, 87, 85, 86, 82, 0, 32, 31, 0, 0, 0, 0, 0, 0, - 128, 1, 131, 2, 0, 0, 30, 0, 0, 0, - 0, 0, 80, 0, 87, 0, 0, 0, 0, 73, - 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, - 91, 79, 90, 0, 93, 88, 75, 76, 77, 78, - 0, 94, 86, 99, 33, 0, 0, 65, 0, 99, - 67, 129, 0, 0, 41, 0, 39, 89, 74, 0, - 95, 126, 0, 54, 117, 115, 0, 105, 106, 107, - 108, 109, 110, 113, 111, 0, 100, 0, 0, 0, - 66, 0, 50, 51, 52, 53, 48, 0, 0, 0, - 0, 0, 119, 0, 57, 0, 118, 116, 114, 112, - 0, 0, 0, 102, 69, 68, 0, 0, 0, 47, - 46, 44, 41, 63, 0, 0, 99, 86, 96, 0, - 70, 55, 0, 0, 101, 103, 104, 127, 49, 0, - 45, 42, 0, 40, 37, 0, 0, 126, 0, 58, - 0, 48, 0, 0, 34, 97, 71, 123, 120, 121, - 56, 43, 0, 38, 0, 125, 124, 0, 64, 0, - 122, 98 + 129, 1, 132, 2, 0, 0, 30, 0, 0, 0, + 0, 0, 80, 0, 88, 0, 0, 0, 0, 73, + 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, + 92, 79, 91, 0, 94, 84, 89, 75, 76, 77, + 78, 0, 95, 87, 100, 33, 0, 0, 65, 0, + 100, 67, 130, 0, 0, 41, 0, 39, 90, 74, + 0, 96, 127, 0, 54, 118, 116, 0, 106, 107, + 108, 109, 110, 111, 114, 112, 0, 101, 0, 0, + 0, 66, 0, 50, 51, 52, 53, 48, 0, 0, + 0, 0, 0, 120, 0, 57, 0, 119, 117, 115, + 113, 0, 0, 0, 103, 69, 68, 0, 0, 0, + 47, 46, 44, 41, 63, 0, 0, 100, 87, 97, + 0, 70, 55, 0, 0, 102, 104, 105, 128, 49, + 0, 45, 42, 0, 40, 37, 0, 0, 127, 0, + 58, 0, 48, 0, 0, 34, 98, 71, 124, 121, + 122, 56, 43, 0, 38, 0, 126, 125, 0, 64, + 0, 123, 99 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -162, -162, 212, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, 19, -162, -162, 51, 74, - 23, -162, -162, -162, -162, 42, -93, -162, -162, -162, - -162, 89, 192, -162, -3, -53, 183, -162, -162, -162, - -86, 80, 13, -110, -161, 101, -162, 21, -162, 37, - -162, -162, -162, -162 + -161, -161, 217, -161, -161, -161, -161, -161, -161, -161, + -161, -161, -161, -161, -161, 23, -161, -161, 56, 83, + 26, -161, -161, -161, -161, 46, -93, -161, -161, -161, + -161, 93, 198, -161, -3, -53, 187, -161, -161, -161, + -84, 87, 17, -111, -160, 96, -161, 18, -161, 42, + -161, -161, -161, -161 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 205, 32, 33, 158, 124, - 181, 199, 156, 34, 133, 163, 55, 203, 35, 36, - 119, 120, 37, 38, 56, 57, 130, 58, 59, 60, - 185, 113, 186, 117, 146, 147, 190, 218, 219, 162, + 28, 29, 30, 31, 44, 206, 32, 33, 159, 125, + 182, 200, 157, 34, 134, 164, 55, 204, 35, 36, + 120, 121, 37, 38, 56, 57, 131, 58, 59, 60, + 186, 114, 187, 118, 147, 148, 191, 219, 220, 163, 39, 40, 41, 73 }; @@ -830,62 +830,62 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 82, 61, 121, 131, 112, 114, 83, 83, 166, 150, - 195, 196, 149, 42, 225, 171, 172, 48, 63, 64, - 83, 80, 45, 65, 46, 224, 226, 87, 88, 167, - 62, 116, 106, 107, 108, 109, 43, 177, 81, 164, - 85, 86, 87, 88, 79, 215, 49, 50, 178, 52, - 179, 180, 171, 172, 178, 174, 179, 180, 129, 67, - 66, 134, 168, 145, 152, 69, 153, 154, 155, 84, - 84, 85, 86, 87, 88, 187, 207, 103, 85, 86, - 87, 88, 135, 84, 4, 68, 136, 191, 192, 220, - 192, 47, 71, 72, 173, 74, 75, 76, 77, 209, - 164, 90, 91, 92, 48, 93, 95, 128, 94, 137, - 138, 139, 140, 141, 142, 143, 144, 194, 145, 145, - 96, 85, 86, 87, 88, 97, 99, 134, 100, 98, - 101, 104, 110, 49, 50, 51, 52, 105, 53, 54, - 111, 47, 115, 116, 118, 125, 127, 122, 135, 47, - 102, 123, 136, 145, 48, 217, 47, 132, 126, 169, - 148, 151, 48, 157, 160, 159, 161, 165, 176, 48, - 183, 184, 189, 193, 217, 137, 138, 139, 140, 141, - 142, 143, 144, 49, 50, 51, 52, 200, 53, 54, - 197, 49, 50, 51, 52, 198, 53, 54, 49, 50, - 51, 52, 202, 53, 54, 1, 2, 204, 206, 208, - 171, 211, 212, 3, 4, 5, 6, 7, 8, 9, - 10, 213, 227, 214, 11, 12, 13, 222, 229, 228, - 70, 182, 223, 201, 221, 210, 14, 15, 175, 78, - 89, 188, 231, 0, 216, 16, 170, 17, 230, 0, - 18 + 82, 61, 122, 132, 83, 83, 113, 115, 42, 151, + 150, 83, 196, 197, 66, 226, 48, 62, 172, 173, + 104, 167, 80, 179, 105, 180, 181, 227, 225, 117, + 67, 43, 107, 108, 109, 110, 135, 68, 178, 81, + 165, 45, 168, 46, 79, 49, 50, 216, 52, 179, + 65, 180, 181, 63, 64, 69, 175, 136, 87, 88, + 71, 137, 130, 75, 146, 172, 173, 84, 84, 85, + 86, 87, 88, 72, 84, 169, 208, 103, 188, 85, + 86, 87, 88, 74, 138, 139, 140, 141, 142, 143, + 144, 145, 192, 193, 90, 174, 85, 86, 87, 88, + 210, 165, 47, 102, 85, 86, 87, 88, 129, 135, + 153, 76, 154, 155, 156, 48, 221, 193, 195, 146, + 146, 77, 92, 47, 93, 91, 95, 94, 4, 96, + 136, 97, 98, 99, 137, 47, 48, 100, 101, 106, + 111, 112, 47, 116, 49, 50, 51, 52, 48, 53, + 54, 117, 123, 119, 146, 48, 218, 138, 139, 140, + 141, 142, 143, 144, 145, 49, 50, 51, 52, 124, + 53, 54, 126, 127, 128, 218, 133, 49, 50, 51, + 52, 152, 53, 54, 49, 50, 51, 52, 149, 53, + 54, 1, 2, 158, 160, 161, 162, 166, 170, 3, + 4, 5, 6, 7, 8, 9, 10, 177, 190, 184, + 11, 12, 13, 185, 194, 198, 199, 201, 203, 205, + 209, 207, 14, 15, 172, 212, 223, 214, 213, 215, + 229, 16, 228, 17, 230, 70, 18, 224, 222, 202, + 211, 183, 171, 176, 89, 78, 231, 232, 0, 189, + 217 }; static const yytype_int16 yycheck[] = { - 53, 4, 95, 113, 90, 91, 4, 4, 9, 119, - 171, 172, 25, 12, 5, 45, 46, 36, 13, 14, - 4, 23, 12, 41, 14, 55, 17, 71, 72, 30, - 67, 44, 85, 86, 87, 88, 35, 23, 40, 132, - 69, 70, 71, 72, 47, 206, 65, 66, 34, 68, - 36, 37, 45, 46, 34, 148, 36, 37, 55, 67, - 43, 9, 63, 116, 29, 50, 31, 32, 33, 67, - 67, 69, 70, 71, 72, 161, 186, 80, 69, 70, - 71, 72, 30, 67, 16, 67, 34, 24, 25, 24, - 25, 23, 0, 3, 147, 67, 14, 67, 67, 192, - 193, 43, 43, 67, 36, 67, 57, 110, 47, 57, - 58, 59, 60, 61, 62, 63, 64, 170, 171, 172, - 51, 69, 70, 71, 72, 23, 48, 9, 24, 67, - 24, 67, 25, 65, 66, 67, 68, 67, 70, 71, - 67, 23, 42, 44, 67, 48, 24, 68, 30, 23, - 24, 67, 34, 206, 36, 208, 23, 23, 67, 34, - 57, 41, 36, 25, 56, 67, 25, 25, 12, 36, - 24, 23, 11, 23, 227, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 36, 70, 71, - 67, 65, 66, 67, 68, 65, 70, 71, 65, 66, - 67, 68, 53, 70, 71, 7, 8, 67, 48, 6, - 45, 24, 54, 15, 16, 17, 18, 19, 20, 21, - 22, 25, 25, 24, 26, 27, 28, 57, 56, 67, - 18, 157, 213, 182, 211, 193, 38, 39, 149, 47, - 57, 161, 229, -1, 207, 47, 145, 49, 227, -1, - 52 + 53, 4, 95, 114, 4, 4, 90, 91, 12, 120, + 25, 4, 172, 173, 43, 5, 36, 67, 45, 46, + 67, 9, 23, 34, 71, 36, 37, 17, 55, 44, + 67, 35, 85, 86, 87, 88, 9, 67, 23, 40, + 133, 12, 30, 14, 47, 65, 66, 207, 68, 34, + 41, 36, 37, 13, 14, 50, 149, 30, 71, 72, + 0, 34, 55, 14, 117, 45, 46, 67, 67, 69, + 70, 71, 72, 3, 67, 63, 187, 80, 162, 69, + 70, 71, 72, 67, 57, 58, 59, 60, 61, 62, + 63, 64, 24, 25, 43, 148, 69, 70, 71, 72, + 193, 194, 23, 24, 69, 70, 71, 72, 111, 9, + 29, 67, 31, 32, 33, 36, 24, 25, 171, 172, + 173, 67, 67, 23, 67, 43, 57, 47, 16, 51, + 30, 23, 67, 48, 34, 23, 36, 24, 24, 67, + 25, 67, 23, 42, 65, 66, 67, 68, 36, 70, + 71, 44, 68, 67, 207, 36, 209, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 67, + 70, 71, 48, 67, 24, 228, 23, 65, 66, 67, + 68, 41, 70, 71, 65, 66, 67, 68, 57, 70, + 71, 7, 8, 25, 67, 56, 25, 25, 34, 15, + 16, 17, 18, 19, 20, 21, 22, 12, 11, 24, + 26, 27, 28, 23, 23, 67, 65, 36, 53, 67, + 6, 48, 38, 39, 45, 24, 57, 25, 54, 24, + 67, 47, 25, 49, 56, 18, 52, 214, 212, 183, + 194, 158, 146, 150, 57, 47, 228, 230, -1, 162, + 208 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -902,20 +902,20 @@ static const yytype_int8 yystos[] = 76, 0, 3, 127, 67, 14, 67, 67, 106, 108, 23, 40, 109, 4, 67, 69, 70, 71, 72, 110, 43, 43, 67, 67, 47, 57, 51, 23, 67, 48, - 24, 24, 24, 108, 67, 67, 109, 109, 109, 109, - 25, 67, 114, 115, 114, 42, 44, 117, 67, 104, - 105, 100, 68, 67, 93, 48, 67, 24, 108, 55, - 110, 117, 23, 98, 9, 30, 34, 57, 58, 59, - 60, 61, 62, 63, 64, 109, 118, 119, 57, 25, - 117, 41, 29, 31, 32, 33, 96, 25, 92, 67, - 56, 25, 123, 99, 100, 25, 9, 30, 63, 34, - 119, 45, 46, 109, 100, 105, 12, 23, 34, 36, - 37, 94, 93, 24, 23, 114, 116, 114, 115, 11, - 120, 24, 25, 23, 109, 118, 118, 67, 65, 95, - 36, 92, 53, 101, 67, 89, 48, 117, 6, 100, - 99, 24, 54, 25, 24, 118, 123, 109, 121, 122, - 24, 94, 57, 89, 55, 5, 17, 25, 67, 56, - 121, 116 + 24, 24, 24, 108, 67, 71, 67, 109, 109, 109, + 109, 25, 67, 114, 115, 114, 42, 44, 117, 67, + 104, 105, 100, 68, 67, 93, 48, 67, 24, 108, + 55, 110, 117, 23, 98, 9, 30, 34, 57, 58, + 59, 60, 61, 62, 63, 64, 109, 118, 119, 57, + 25, 117, 41, 29, 31, 32, 33, 96, 25, 92, + 67, 56, 25, 123, 99, 100, 25, 9, 30, 63, + 34, 119, 45, 46, 109, 100, 105, 12, 23, 34, + 36, 37, 94, 93, 24, 23, 114, 116, 114, 115, + 11, 120, 24, 25, 23, 109, 118, 118, 67, 65, + 95, 36, 92, 53, 101, 67, 89, 48, 117, 6, + 100, 99, 24, 54, 25, 24, 118, 123, 109, 121, + 122, 24, 94, 57, 89, 55, 5, 17, 25, 67, + 56, 121, 116 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -929,12 +929,12 @@ static const yytype_int8 yyr1[] = 96, 96, 96, 96, 97, 98, 98, 99, 99, 100, 100, 100, 100, 101, 101, 102, 103, 104, 104, 105, 106, 106, 107, 108, 108, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 110, 110, 110, 111, - 111, 112, 113, 113, 114, 115, 115, 116, 116, 117, - 117, 118, 118, 118, 118, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 119, 119, 120, - 120, 121, 121, 122, 122, 122, 123, 124, 125, 126, - 127, 127 + 109, 109, 109, 109, 109, 109, 109, 110, 110, 110, + 111, 111, 112, 113, 113, 114, 115, 115, 116, 116, + 117, 117, 118, 118, 118, 118, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 120, 120, 121, 121, 122, 122, 122, 123, 124, 125, + 126, 127, 127 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -948,12 +948,12 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 5, 3, 5, 1, 3, 1, 1, 1, 1, 0, 4, 4, 5, 1, 3, 3, 7, 9, 2, 2, 4, 3, 3, 3, 3, 3, - 2, 1, 1, 1, 1, 1, 0, 1, 2, 4, - 3, 3, 1, 3, 1, 2, 4, 3, 6, 0, - 2, 3, 2, 3, 3, 1, 1, 1, 1, 1, - 1, 1, 2, 1, 2, 1, 2, 1, 2, 0, - 3, 1, 3, 1, 2, 2, 0, 7, 2, 4, - 0, 1 + 2, 1, 1, 1, 3, 1, 1, 0, 1, 2, + 4, 3, 3, 1, 3, 1, 2, 4, 3, 6, + 0, 2, 3, 2, 3, 3, 1, 1, 1, 1, + 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, + 0, 3, 1, 3, 1, 2, 2, 0, 7, 2, + 4, 0, 1 }; @@ -2475,48 +2475,56 @@ YYLTYPE yylloc = yyloc_default; #line 2476 "yacc_sql.cpp" break; - case 84: /* expression: aggr_func_expr */ + case 84: /* expression: ID DOT '*' */ #line 730 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = new StarExpr((yyvsp[-2].string)); } #line 2484 "yacc_sql.cpp" break; - case 85: /* expression: sub_query_expr */ + case 85: /* expression: aggr_func_expr */ #line 733 "yacc_sql.y" { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } #line 2492 "yacc_sql.cpp" break; - case 86: /* alias: %empty */ -#line 740 "yacc_sql.y" - { - (yyval.string) = nullptr; + case 86: /* expression: sub_query_expr */ +#line 736 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } #line 2500 "yacc_sql.cpp" break; - case 87: /* alias: ID */ + case 87: /* alias: %empty */ #line 743 "yacc_sql.y" - { - (yyval.string) = (yyvsp[0].string); + { + (yyval.string) = nullptr; } #line 2508 "yacc_sql.cpp" break; - case 88: /* alias: AS ID */ + case 88: /* alias: ID */ #line 746 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2516 "yacc_sql.cpp" break; - case 89: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 752 "yacc_sql.y" + case 89: /* alias: AS ID */ +#line 749 "yacc_sql.y" + { + (yyval.string) = (yyvsp[0].string); + } +#line 2524 "yacc_sql.cpp" + break; + + case 90: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 755 "yacc_sql.y" { if((*(yyvsp[-1].expression_list)).size() != 1) { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); @@ -2524,37 +2532,37 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); } } -#line 2528 "yacc_sql.cpp" +#line 2536 "yacc_sql.cpp" break; - case 90: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 760 "yacc_sql.y" + case 91: /* aggr_func_expr: ID LBRACE RBRACE */ +#line 763 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr("max",new StarExpr() ); } -#line 2536 "yacc_sql.cpp" +#line 2544 "yacc_sql.cpp" break; - case 91: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 767 "yacc_sql.y" + case 92: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 770 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2544 "yacc_sql.cpp" +#line 2552 "yacc_sql.cpp" break; - case 92: /* rel_attr: ID */ -#line 773 "yacc_sql.y" + case 93: /* rel_attr: ID */ +#line 776 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2554 "yacc_sql.cpp" +#line 2562 "yacc_sql.cpp" break; - case 93: /* rel_attr: ID DOT ID */ -#line 778 "yacc_sql.y" + case 94: /* rel_attr: ID DOT ID */ +#line 781 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2562,19 +2570,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2566 "yacc_sql.cpp" +#line 2574 "yacc_sql.cpp" break; - case 94: /* relation: ID */ -#line 788 "yacc_sql.y" + case 95: /* relation: ID */ +#line 791 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2574 "yacc_sql.cpp" +#line 2582 "yacc_sql.cpp" break; - case 95: /* rel_list: relation alias */ -#line 794 "yacc_sql.y" + case 96: /* rel_list: relation alias */ +#line 797 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2585,11 +2593,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2589 "yacc_sql.cpp" +#line 2597 "yacc_sql.cpp" break; - case 96: /* rel_list: relation alias COMMA rel_list */ -#line 804 "yacc_sql.y" + case 97: /* rel_list: relation alias COMMA rel_list */ +#line 807 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2604,22 +2612,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2608 "yacc_sql.cpp" +#line 2616 "yacc_sql.cpp" break; - case 97: /* joinClauses: relation ON condition */ -#line 822 "yacc_sql.y" + case 98: /* joinClauses: relation ON condition */ +#line 825 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2619 "yacc_sql.cpp" +#line 2627 "yacc_sql.cpp" break; - case 98: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 829 "yacc_sql.y" + case 99: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 832 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2627,219 +2635,219 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2631 "yacc_sql.cpp" +#line 2639 "yacc_sql.cpp" break; - case 99: /* where: %empty */ -#line 840 "yacc_sql.y" + case 100: /* where: %empty */ +#line 843 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2639 "yacc_sql.cpp" +#line 2647 "yacc_sql.cpp" break; - case 100: /* where: WHERE condition */ -#line 843 "yacc_sql.y" + case 101: /* where: WHERE condition */ +#line 846 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2647 "yacc_sql.cpp" +#line 2655 "yacc_sql.cpp" break; - case 101: /* condition: expression comp_op expression */ -#line 850 "yacc_sql.y" + case 102: /* condition: expression comp_op expression */ +#line 853 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2655 "yacc_sql.cpp" +#line 2663 "yacc_sql.cpp" break; - case 102: /* condition: comp_op expression */ -#line 854 "yacc_sql.y" + case 103: /* condition: comp_op expression */ +#line 857 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2666 "yacc_sql.cpp" +#line 2674 "yacc_sql.cpp" break; - case 103: /* condition: condition AND condition */ -#line 861 "yacc_sql.y" + case 104: /* condition: condition AND condition */ +#line 864 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2674 "yacc_sql.cpp" +#line 2682 "yacc_sql.cpp" break; - case 104: /* condition: condition OR condition */ -#line 865 "yacc_sql.y" + case 105: /* condition: condition OR condition */ +#line 868 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2682 "yacc_sql.cpp" +#line 2690 "yacc_sql.cpp" break; - case 105: /* comp_op: EQ */ -#line 871 "yacc_sql.y" + case 106: /* comp_op: EQ */ +#line 874 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2688 "yacc_sql.cpp" +#line 2696 "yacc_sql.cpp" break; - case 106: /* comp_op: LT */ -#line 872 "yacc_sql.y" + case 107: /* comp_op: LT */ +#line 875 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2694 "yacc_sql.cpp" +#line 2702 "yacc_sql.cpp" break; - case 107: /* comp_op: GT */ -#line 873 "yacc_sql.y" + case 108: /* comp_op: GT */ +#line 876 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2700 "yacc_sql.cpp" +#line 2708 "yacc_sql.cpp" break; - case 108: /* comp_op: LE */ -#line 874 "yacc_sql.y" + case 109: /* comp_op: LE */ +#line 877 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2706 "yacc_sql.cpp" +#line 2714 "yacc_sql.cpp" break; - case 109: /* comp_op: GE */ -#line 875 "yacc_sql.y" + case 110: /* comp_op: GE */ +#line 878 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2712 "yacc_sql.cpp" +#line 2720 "yacc_sql.cpp" break; - case 110: /* comp_op: NE */ -#line 876 "yacc_sql.y" + case 111: /* comp_op: NE */ +#line 879 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2718 "yacc_sql.cpp" +#line 2726 "yacc_sql.cpp" break; - case 111: /* comp_op: IS */ -#line 877 "yacc_sql.y" + case 112: /* comp_op: IS */ +#line 880 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2724 "yacc_sql.cpp" +#line 2732 "yacc_sql.cpp" break; - case 112: /* comp_op: IS NOT */ -#line 878 "yacc_sql.y" + case 113: /* comp_op: IS NOT */ +#line 881 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2730 "yacc_sql.cpp" +#line 2738 "yacc_sql.cpp" break; - case 113: /* comp_op: LIKE */ -#line 879 "yacc_sql.y" + case 114: /* comp_op: LIKE */ +#line 882 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2736 "yacc_sql.cpp" +#line 2744 "yacc_sql.cpp" break; - case 114: /* comp_op: NOT LIKE */ -#line 880 "yacc_sql.y" + case 115: /* comp_op: NOT LIKE */ +#line 883 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2742 "yacc_sql.cpp" +#line 2750 "yacc_sql.cpp" break; - case 115: /* comp_op: IN */ -#line 881 "yacc_sql.y" + case 116: /* comp_op: IN */ +#line 884 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2748 "yacc_sql.cpp" +#line 2756 "yacc_sql.cpp" break; - case 116: /* comp_op: NOT IN */ -#line 882 "yacc_sql.y" + case 117: /* comp_op: NOT IN */ +#line 885 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2754 "yacc_sql.cpp" +#line 2762 "yacc_sql.cpp" break; - case 117: /* comp_op: EXISTS */ -#line 883 "yacc_sql.y" + case 118: /* comp_op: EXISTS */ +#line 886 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2760 "yacc_sql.cpp" +#line 2768 "yacc_sql.cpp" break; - case 118: /* comp_op: NOT EXISTS */ -#line 884 "yacc_sql.y" + case 119: /* comp_op: NOT EXISTS */ +#line 887 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2766 "yacc_sql.cpp" +#line 2774 "yacc_sql.cpp" break; - case 119: /* opt_order_by: %empty */ -#line 889 "yacc_sql.y" + case 120: /* opt_order_by: %empty */ +#line 892 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2774 "yacc_sql.cpp" +#line 2782 "yacc_sql.cpp" break; - case 120: /* opt_order_by: ORDER BY sort_list */ -#line 893 "yacc_sql.y" + case 121: /* opt_order_by: ORDER BY sort_list */ +#line 896 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2783 "yacc_sql.cpp" +#line 2791 "yacc_sql.cpp" break; - case 121: /* sort_list: sort_unit */ -#line 901 "yacc_sql.y" + case 122: /* sort_list: sort_unit */ +#line 904 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2792 "yacc_sql.cpp" +#line 2800 "yacc_sql.cpp" break; - case 122: /* sort_list: sort_unit COMMA sort_list */ -#line 906 "yacc_sql.y" + case 123: /* sort_list: sort_unit COMMA sort_list */ +#line 909 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2801 "yacc_sql.cpp" +#line 2809 "yacc_sql.cpp" break; - case 123: /* sort_unit: expression */ -#line 914 "yacc_sql.y" + case 124: /* sort_unit: expression */ +#line 917 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2811 "yacc_sql.cpp" +#line 2819 "yacc_sql.cpp" break; - case 124: /* sort_unit: expression DESC */ -#line 920 "yacc_sql.y" + case 125: /* sort_unit: expression DESC */ +#line 923 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2821 "yacc_sql.cpp" +#line 2829 "yacc_sql.cpp" break; - case 125: /* sort_unit: expression ASC */ -#line 926 "yacc_sql.y" + case 126: /* sort_unit: expression ASC */ +#line 929 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2831 "yacc_sql.cpp" +#line 2839 "yacc_sql.cpp" break; - case 126: /* group_by: %empty */ -#line 935 "yacc_sql.y" + case 127: /* group_by: %empty */ +#line 938 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2839 "yacc_sql.cpp" +#line 2847 "yacc_sql.cpp" break; - case 127: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 941 "yacc_sql.y" + case 128: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 944 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2849,20 +2857,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2853 "yacc_sql.cpp" +#line 2861 "yacc_sql.cpp" break; - case 128: /* explain_stmt: EXPLAIN command_wrapper */ -#line 954 "yacc_sql.y" + case 129: /* explain_stmt: EXPLAIN command_wrapper */ +#line 957 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2862 "yacc_sql.cpp" +#line 2870 "yacc_sql.cpp" break; - case 129: /* set_variable_stmt: SET ID EQ value */ -#line 962 "yacc_sql.y" + case 130: /* set_variable_stmt: SET ID EQ value */ +#line 965 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2870,11 +2878,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2874 "yacc_sql.cpp" +#line 2882 "yacc_sql.cpp" break; -#line 2878 "yacc_sql.cpp" +#line 2886 "yacc_sql.cpp" default: break; } @@ -3103,7 +3111,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 974 "yacc_sql.y" +#line 977 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index fd8225bc..ffac2761 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -727,6 +727,9 @@ expression: | '*' { $$ = new StarExpr(); } + | ID DOT '*' { + $$ = new StarExpr($1); + } | aggr_func_expr { $$ = $1; // AggrFuncExpr } diff --git a/test/case/result/primary-complex-sub-query.result b/test/case/result/primary-complex-sub-query.result index 867495e2..d499849b 100644 --- a/test/case/result/primary-complex-sub-query.result +++ b/test/case/result/primary-complex-sub-query.result @@ -77,9 +77,6 @@ select * from csq_1 where feat1 <> (select avg(csq_2.feat2) from csq_2 where csq 2 | 2 | 12 ID | COL1 | FEAT1 -select * from csq_1 where feat1 > (select min(csq_2.feat2) from csq_2 where csq_2.feat2 > csq_1.feat1); -ID | COL1 | FEAT1 - select * from csq_1 where col1 not in (select csq_2.col2 from csq_2 where csq_2.id in (select csq_3.id from csq_3 where csq_1.id = csq_3.id)); 1 | 4 | 11.2 2 | 2 | 12 diff --git a/test/case/result/primary-insert.result b/test/case/result/primary-insert.result index d2f7e3ed..cb054382 100644 --- a/test/case/result/primary-insert.result +++ b/test/case/result/primary-insert.result @@ -11,7 +11,7 @@ SUCCESS 2. ERROR INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1); FAILURE -INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1,1,1); +INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1,1); FAILURE 3. SELECT diff --git a/test/case/result/primary-null.result b/test/case/result/primary-null.result index fab17418..b04d9522 100644 --- a/test/case/result/primary-null.result +++ b/test/case/result/primary-null.result @@ -1,5 +1,5 @@ INITIALIZATION -CREATE TABLE null_table(id int, num int nullable, price float not null, birthday date null); +CREATE TABLE null_table(id int, num int nullable, price float not null, birthday date nullable); SUCCESS CREATE TABLE null_table2(id int, num int nullable, price float not null, birthday date nullable); SUCCESS diff --git a/test/case/result/primary-show-index.result b/test/case/result/primary-show-index.result deleted file mode 100644 index 7c46933c..00000000 --- a/test/case/result/primary-show-index.result +++ /dev/null @@ -1,35 +0,0 @@ -INITIALIZATION -CREATE TABLE INDEX_TABLE_1(ID INT, AGE INT) -SUCCESS -INSERT INTO INDEX_TABLE_1 VALUES (1,1); -SUCCESS -INSERT INTO INDEX_TABLE_1 VALUES (2,2); -SUCCESS -INSERT INTO INDEX_TABLE_1 VALUES (3,3); -SUCCESS -INSERT INTO INDEX_TABLE_1 VALUES (1,2); -SUCCESS -INSERT INTO INDEX_TABLE_1 VALUES (1,3); -SUCCESS - -1. SHOW EMPTY INDEX -SHOW INDEX FROM INDEX_TABLE_1; -TABLE | NON_UNIQUE | KEY_NAME | SEQ_IN_INDEX | COLUMN_NAME - -2. SHOW AN INDEX -CREATE INDEX INDEX_ID_1 ON INDEX_TABLE_1(ID); -SUCCESS -SHOW INDEX FROM INDEX_TABLE_1; -TABLE | NON_UNIQUE | KEY_NAME | SEQ_IN_INDEX | COLUMN_NAME -INDEX_TABLE_1 | 1 | INDEX_ID_1 | 1 | ID - -3. SHOW INDEXES -CREATE INDEX INDEX_ID_2 ON INDEX_TABLE_1(ID); -SUCCESS -CREATE INDEX INDEX_ID_3 ON INDEX_TABLE_1(AGE); -SUCCESS -SHOW INDEX FROM INDEX_TABLE_1; -TABLE | NON_UNIQUE | KEY_NAME | SEQ_IN_INDEX | COLUMN_NAME -INDEX_TABLE_1 | 1 | INDEX_ID_1 | 1 | ID -INDEX_TABLE_1 | 1 | INDEX_ID_2 | 1 | ID -INDEX_TABLE_1 | 1 | INDEX_ID_3 | 1 | AGE diff --git a/test/case/result/primary-typecast.result b/test/case/result/primary-typecast.result deleted file mode 100644 index 7f12df7f..00000000 --- a/test/case/result/primary-typecast.result +++ /dev/null @@ -1,151 +0,0 @@ -INITIALIZATION -CREATE TABLE TYPECAST_TABLE_1(ID INT, NAME CHAR(20), AGE FLOAT); -SUCCESS - -1. INSERT ROWS -INSERT INTO TYPECAST_TABLE_1 VALUES(666, 666, 666); -SUCCESS -INSERT INTO TYPECAST_TABLE_1 VALUES('1', '1', '1'); -SUCCESS -INSERT INTO TYPECAST_TABLE_1 VALUES('ABC', 'ABC', 'ABC'); -SUCCESS -INSERT INTO TYPECAST_TABLE_1 VALUES('0.5', '0.5', '0.5'); -SUCCESS -INSERT INTO TYPECAST_TABLE_1 VALUES('3ABC', 'ABCD', '3.14ADC'); -SUCCESS -INSERT INTO TYPECAST_TABLE_1 VALUES('4ABC', 'DCBA', 'G3.14ADC'); -SUCCESS -INSERT INTO TYPECAST_TABLE_1 VALUES(1.5, 1.5, 1.5); -SUCCESS -INSERT INTO TYPECAST_TABLE_1 VALUES(-1.5, -1.5, -1.5); -SUCCESS -SELECT * FROM TYPECAST_TABLE_1; --2 | 1.5 | -1.5 -0 | 0.5 | 0.5 -0 | ABC | 0 -1 | 1 | 1 -2 | 1.5 | 1.5 -3 | ABCD | 3.14 -4 | DCBA | 0 -666 | 666 | 666 -ID | NAME | AGE - -2. QUERY ROWS -SELECT * FROM TYPECAST_TABLE_1 WHERE ID > 0.5; -1 | 1 | 1 -2 | 1.5 | 1.5 -3 | ABCD | 3.14 -4 | DCBA | 0 -666 | 666 | 666 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE ID > '0.1'; -1 | 1 | 1 -2 | 1.5 | 1.5 -3 | ABCD | 3.14 -4 | DCBA | 0 -666 | 666 | 666 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE ID > '1ADC'; -2 | 1.5 | 1.5 -3 | ABCD | 3.14 -4 | DCBA | 0 -666 | 666 | 666 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE ID < '1.5ADC'; --2 | 1.5 | -1.5 -0 | 0.5 | 0.5 -0 | ABC | 0 -1 | 1 | 1 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE NAME >= 1; --2 | 1.5 | -1.5 -1 | 1 | 1 -2 | 1.5 | 1.5 -666 | 666 | 666 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE NAME > 1.3; --2 | 1.5 | -1.5 -2 | 1.5 | 1.5 -666 | 666 | 666 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE NAME > '1ADC'; -0 | ABC | 0 -3 | ABCD | 3.14 -4 | DCBA | 0 -666 | 666 | 666 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE AGE > 1; -2 | 1.5 | 1.5 -3 | ABCD | 3.14 -666 | 666 | 666 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE AGE > 1.2; -2 | 1.5 | 1.5 -3 | ABCD | 3.14 -666 | 666 | 666 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE AGE > 2.5; -3 | ABCD | 3.14 -666 | 666 | 666 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE AGE > '1ADC'; -2 | 1.5 | 1.5 -3 | ABCD | 3.14 -666 | 666 | 666 -ID | NAME | AGE - -3. UPDATE ROWS -UPDATE TYPECAST_TABLE_1 SET ID = 6, NAME = 6, AGE = 6 WHERE ID = 1; -SUCCESS -UPDATE TYPECAST_TABLE_1 SET ID = '66', NAME = '66', AGE = '66' WHERE ID = 2; -SUCCESS -UPDATE TYPECAST_TABLE_1 SET ID = 'JF', NAME = 'JF', AGE = 'JF' WHERE ID = -2; -SUCCESS -UPDATE TYPECAST_TABLE_1 SET ID = '0.5', NAME = '0.5', AGE = '0.5' WHERE ID = 0; -SUCCESS -UPDATE TYPECAST_TABLE_1 SET ID = '3ABC', NAME = 'ABCD', AGE = '3.14ADC' WHERE ID = 4; -SUCCESS -UPDATE TYPECAST_TABLE_1 SET ID = '4ABC', NAME = 'DCBA', AGE = 'G3.14ADC' WHERE ID = 4; -SUCCESS -UPDATE TYPECAST_TABLE_1 SET ID = 6.6, NAME = 6.6, AGE = '6.6' WHERE ID = 3; -SUCCESS -UPDATE TYPECAST_TABLE_1 SET ID = -8.8, NAME = -8.8, AGE = '-8.8' WHERE ID = 666; -SUCCESS -SELECT * FROM TYPECAST_TABLE_1; --9 | 8.8 | -8.8 -0 | 0.5 | 0.5 -0 | 0.5 | 0.5 -0 | 0.5 | 0.5 -6 | 6 | 6 -66 | 66 | 66 -7 | 6.6 | 6.6 -7 | 6.6 | 6.6 -ID | NAME | AGE - -4. QUERY ROWS AGAIN -SELECT * FROM TYPECAST_TABLE_1 WHERE '1A' = 2; -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE '1.5A' = 2; -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE '1.5A' = 2.0; -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE '2A' = 2.0; --9 | 8.8 | -8.8 -0 | 0.5 | 0.5 -0 | 0.5 | 0.5 -0 | 0.5 | 0.5 -6 | 6 | 6 -66 | 66 | 66 -7 | 6.6 | 6.6 -7 | 6.6 | 6.6 -ID | NAME | AGE -SELECT * FROM TYPECAST_TABLE_1 WHERE '2.0-A' = 2.0; --9 | 8.8 | -8.8 -0 | 0.5 | 0.5 -0 | 0.5 | 0.5 -0 | 0.5 | 0.5 -6 | 6 | 6 -66 | 66 | 66 -7 | 6.6 | 6.6 -7 | 6.6 | 6.6 -ID | NAME | AGE diff --git a/test/case/result/primary-unique.result b/test/case/result/primary-unique.result index e8810115..54a36709 100644 --- a/test/case/result/primary-unique.result +++ b/test/case/result/primary-unique.result @@ -1,47 +1,24 @@ INITIALIZATION -CREATE TABLE UNIQUE_TABLE(ID INT, COL1 INT, COL2 INT); +CREATE TABLE unique_table(id int, col1 int, col2 int); SUCCESS -CREATE TABLE UNIQUE_TABLE2(ID1 INT, ID2 INT, COL1 INT, COL2 INT); -SUCCESS -INSERT INTO UNIQUE_TABLE VALUES (1,1,1); -SUCCESS -INSERT INTO UNIQUE_TABLE2 VALUES (1,1,1,1); +INSERT INTO unique_table VALUES (1,1,1); SUCCESS 1. UNIQUE TEST -CREATE UNIQUE INDEX INDEX_ID ON UNIQUE_TABLE(ID); +CREATE UNIQUE INDEX index_id on unique_table(id); SUCCESS -INSERT INTO UNIQUE_TABLE VALUES (2,1,1); +INSERT INTO unique_table VALUES (2,1,1); SUCCESS -CREATE UNIQUE INDEX INDEX_ID ON UNIQUE_TABLE(ID); +CREATE UNIQUE INDEX index_id on unique_table(id); FAILURE -INSERT INTO UNIQUE_TABLE VALUES (3,2,1); -SUCCESS -INSERT INTO UNIQUE_TABLE VALUES (1,2,1); -FAILURE - -CREATE UNIQUE INDEX INDEX_ID ON UNIQUE_TABLE2(ID1, ID2); +INSERT INTO unique_table VALUES (3,2,1); SUCCESS -INSERT INTO UNIQUE_TABLE2 VALUES (1,1,2,1); +INSERT INTO unique_table VALUES (1,2,1); FAILURE -INSERT INTO UNIQUE_TABLE2 VALUES (1,2,1,1); -SUCCESS -INSERT INTO UNIQUE_TABLE2 VALUES (1,2,2,1); -FAILURE -INSERT INTO UNIQUE_TABLE2 VALUES (1,3,4,2); -SUCCESS -INSERT INTO UNIQUE_TABLE2 VALUES (2,1,1,1); -SUCCESS 2. SELECT -SELECT * FROM UNIQUE_TABLE; +SELECT * FROM unique_table; 1 | 1 | 1 2 | 1 | 1 3 | 2 | 1 ID | COL1 | COL2 -SELECT * FROM UNIQUE_TABLE2; -1 | 1 | 1 | 1 -1 | 2 | 1 | 1 -1 | 3 | 4 | 2 -2 | 1 | 1 | 1 -ID1 | ID2 | COL1 | COL2 diff --git a/test/case/result/primary-update-plus.result b/test/case/result/primary-update-plus.result deleted file mode 100644 index 9c38bf76..00000000 --- a/test/case/result/primary-update-plus.result +++ /dev/null @@ -1,71 +0,0 @@ -INITIALIZATION -CREATE TABLE STUDENT (ID INT, NAME CHAR(9), MAJOR CHAR(32)); -SUCCESS -INSERT INTO STUDENT VALUES (0, 'KANGKANGA', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); -SUCCESS -INSERT INTO STUDENT VALUES (1, 'TOMTOMTOM', 'COMPUTER SCIENCECOMPUTER SCIENCE'); -SUCCESS -INSERT INTO STUDENT VALUES (2, 'JERRYJERR', 'COMPUTER SCIENCECOMPUTER SCIENCE'); -SUCCESS -INSERT INTO STUDENT VALUES (3, 'JACKJACKJ', 'ELECTRICAL ENGINEERINGER SCIENCE'); -SUCCESS -INSERT INTO STUDENT VALUES (3, 'JERRYJERR', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); -SUCCESS - -1. UPDATE A ROW -UPDATE STUDENT SET MAJOR = 'ELECTRICAL ENGINEERING' WHERE ID = 2; -SUCCESS -SELECT * FROM STUDENT WHERE ID >= 1; -1 | TOMTOMTOM | COMPUTER SCIENCECOMPUTER SCIENCE -2 | JERRYJERR | ELECTRICAL ENGINEERING -3 | JACKJACKJ | ELECTRICAL ENGINEERINGER SCIENCE -3 | JERRYJERR | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -ID | NAME | MAJOR -SELECT * FROM STUDENT WHERE ID = 0; -0 | KANGKANGA | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -ID | NAME | MAJOR - -2. UPDATE NON-EXISTENT ROW -UPDATE STUDENT SET ID = 100 WHERE NAME = 'JERRYJERRY'; -SUCCESS -SELECT * FROM STUDENT WHERE ID > 2; -3 | JACKJACKJ | ELECTRICAL ENGINEERINGER SCIENCE -3 | JERRYJERR | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -ID | NAME | MAJOR -SELECT * FROM STUDENT WHERE ID < 101; -0 | KANGKANGA | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -1 | TOMTOMTOM | COMPUTER SCIENCECOMPUTER SCIENCE -2 | JERRYJERR | ELECTRICAL ENGINEERING -3 | JACKJACKJ | ELECTRICAL ENGINEERINGER SCIENCE -3 | JERRYJERR | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -ID | NAME | MAJOR - -3. UPDATE ROWS -UPDATE STUDENT SET NAME = '12345678' WHERE ID < 3; -SUCCESS -SELECT * FROM STUDENT WHERE ID = 2; -2 | 12345678 | ELECTRICAL ENGINEERING -ID | NAME | MAJOR -SELECT * FROM STUDENT WHERE NAME = '12345678'; -0 | 12345678 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -1 | 12345678 | COMPUTER SCIENCECOMPUTER SCIENCE -2 | 12345678 | ELECTRICAL ENGINEERING -ID | NAME | MAJOR - -4. UPDATE ROWS AGAIN -UPDATE STUDENT SET NAME = '9876543210' WHERE ID < 3; -FAILURE -SELECT * FROM STUDENT WHERE ID = 2; -2 | 12345678 | ELECTRICAL ENGINEERING -ID | NAME | MAJOR -SELECT * FROM STUDENT WHERE NAME = '9876543210'; -ID | NAME | MAJOR - -5. UPDATE MULTIPLE COLUMNS -UPDATE STUDENT SET NAME = 'MULNAME', ID = 666, MAJOR = 'MULMAJOR' WHERE ID = 1; -SUCCESS -SELECT * FROM STUDENT WHERE ID = 1; -ID | NAME | MAJOR -SELECT * FROM STUDENT WHERE NAME = 'MULNAME' AND MAJOR = 'MULMAJOR'; -666 | MULNAME | MULMAJOR -ID | NAME | MAJOR diff --git a/test/case/test/primary-complex-sub-query.test b/test/case/test/primary-complex-sub-query.test index ded38b1a..e5ef032b 100644 --- a/test/case/test/primary-complex-sub-query.test +++ b/test/case/test/primary-complex-sub-query.test @@ -37,8 +37,6 @@ INSERT INTO csq_3 VALUES (5, 5, 14.6); -- sort select * from csq_1 where feat1 <> (select avg(csq_2.feat2) from csq_2 where csq_2.feat2 > csq_1.feat1); --- sort select * from csq_1 where feat1 > (select min(csq_2.feat2) from csq_2 where csq_2.feat2 > csq_1.feat1); - -- sort select * from csq_1 where col1 not in (select csq_2.col2 from csq_2 where csq_2.id in (select csq_3.id from csq_3 where csq_1.id = csq_3.id)); -- echo 2. Select with empty table diff --git a/test/case/test/primary-insert.test b/test/case/test/primary-insert.test index 19c214d8..429afc87 100644 --- a/test/case/test/primary-insert.test +++ b/test/case/test/primary-insert.test @@ -7,7 +7,7 @@ INSERT INTO insert_table VALUES (2,'N2',1,1),(3,'N3',2,1); -- echo 2. error INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1); -INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1,1,1); +INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1,1); -- echo 3. select --- sort SELECT * FROM insert_table; +-- sort SELECT * FROM insert_table; \ No newline at end of file diff --git a/test/case/test/primary-null.test b/test/case/test/primary-null.test index b707001f..e86fead7 100644 --- a/test/case/test/primary-null.test +++ b/test/case/test/primary-null.test @@ -1,5 +1,5 @@ -- echo initialization -CREATE TABLE null_table(id int, num int nullable, price float not null, birthday date null); +CREATE TABLE null_table(id int, num int nullable, price float not null, birthday date nullable); CREATE TABLE null_table2(id int, num int nullable, price float not null, birthday date nullable); CREATE INDEX index_num on null_table(num); diff --git a/test/case/test/primary-show-index.test b/test/case/test/primary-show-index.test deleted file mode 100644 index f5b3311b..00000000 --- a/test/case/test/primary-show-index.test +++ /dev/null @@ -1,19 +0,0 @@ --- echo INITIALIZATION -CREATE TABLE Index_table_1(id int, age int) -insert into Index_table_1 values (1,1); -insert into Index_table_1 values (2,2); -insert into Index_table_1 values (3,3); -insert into Index_table_1 values (1,2); -insert into Index_table_1 values (1,3); - --- echo 1. show empty index -SHOW INDEX FROM Index_table_1; - --- echo 2. show an index -CREATE INDEX index_id_1 on Index_table_1(id); -SHOW INDEX FROM Index_table_1; - --- echo 3. show indexes -CREATE INDEX index_id_2 on Index_table_1(id); -CREATE INDEX index_id_3 on Index_table_1(age); -SHOW INDEX FROM Index_table_1; diff --git a/test/case/test/primary-typecast.test b/test/case/test/primary-typecast.test deleted file mode 100644 index f87e8be7..00000000 --- a/test/case/test/primary-typecast.test +++ /dev/null @@ -1,44 +0,0 @@ --- echo initialization -CREATE TABLE Typecast_table_1(id int, name char(20), age float); - --- echo 1. insert rows -INSERT INTO Typecast_table_1 VALUES(666, 666, 666); -INSERT INTO Typecast_table_1 VALUES('1', '1', '1'); -INSERT INTO Typecast_table_1 VALUES('abc', 'abc', 'abc'); -INSERT INTO Typecast_table_1 VALUES('0.5', '0.5', '0.5'); -INSERT INTO Typecast_table_1 VALUES('3abc', 'abcd', '3.14adc'); -INSERT INTO Typecast_table_1 VALUES('4abc', 'dcba', 'g3.14adc'); -INSERT INTO Typecast_table_1 VALUES(1.5, 1.5, 1.5); -INSERT INTO Typecast_table_1 VALUES(-1.5, -1.5, -1.5); --- sort select * from Typecast_table_1; - --- echo 2. query rows --- sort SELECT * from Typecast_table_1 WHERE id > 0.5; --- sort SELECT * from Typecast_table_1 WHERE id > '0.1'; --- sort SELECT * from Typecast_table_1 WHERE id > '1adc'; --- sort SELECT * from Typecast_table_1 WHERE id < '1.5adc'; --- sort SELECT * from Typecast_table_1 WHERE name >= 1; --- sort SELECT * from Typecast_table_1 WHERE name > 1.3; --- sort SELECT * from Typecast_table_1 WHERE name > '1adc'; --- sort SELECT * from Typecast_table_1 WHERE age > 1; --- sort SELECT * from Typecast_table_1 WHERE age > 1.2; --- sort SELECT * from Typecast_table_1 WHERE age > 2.5; --- sort SELECT * from Typecast_table_1 WHERE age > '1adc'; - --- echo 3. update rows -UPDATE Typecast_table_1 SET id = 6, name = 6, age = 6 where id = 1; -UPDATE Typecast_table_1 SET id = '66', name = '66', age = '66' where id = 2; -UPDATE Typecast_table_1 SET id = 'jf', name = 'jf', age = 'jf' where id = -2; -UPDATE Typecast_table_1 SET id = '0.5', name = '0.5', age = '0.5' where id = 0; -UPDATE Typecast_table_1 SET id = '3abc', name = 'abcd', age = '3.14adc' where id = 4; -UPDATE Typecast_table_1 SET id = '4abc', name = 'dcba', age = 'g3.14adc' where id = 4; -UPDATE Typecast_table_1 SET id = 6.6, name = 6.6, age = '6.6' where id = 3; -UPDATE Typecast_table_1 SET id = -8.8, name = -8.8, age = '-8.8' where id = 666; --- sort select * from Typecast_table_1; - --- echo 4. query rows again --- sort SELECT * FROM Typecast_table_1 WHERE '1a' = 2; --- sort SELECT * FROM Typecast_table_1 WHERE '1.5a' = 2; --- sort SELECT * FROM Typecast_table_1 WHERE '1.5a' = 2.0; --- sort SELECT * FROM Typecast_table_1 WHERE '2a' = 2.0; --- sort SELECT * FROM Typecast_table_1 WHERE '2.0-a' = 2.0; diff --git a/test/case/test/primary-unique.test b/test/case/test/primary-unique.test index 0c3b18b1..7ced3ef4 100644 --- a/test/case/test/primary-unique.test +++ b/test/case/test/primary-unique.test @@ -1,8 +1,6 @@ -- echo initialization CREATE TABLE unique_table(id int, col1 int, col2 int); -CREATE TABLE unique_table2(id1 int, id2 int, col1 int, col2 int); INSERT INTO unique_table VALUES (1,1,1); -INSERT INTO unique_table2 VALUES (1,1,1,1); -- echo 1. unique test CREATE UNIQUE INDEX index_id on unique_table(id); @@ -11,13 +9,5 @@ CREATE UNIQUE INDEX index_id on unique_table(id); INSERT INTO unique_table VALUES (3,2,1); INSERT INTO unique_table VALUES (1,2,1); -CREATE UNIQUE INDEX index_id on unique_table2(id1, id2); -INSERT INTO unique_table2 VALUES (1,1,2,1); -INSERT INTO unique_table2 VALUES (1,2,1,1); -INSERT INTO unique_table2 VALUES (1,2,2,1); -INSERT INTO unique_table2 VALUES (1,3,4,2); -INSERT INTO unique_table2 VALUES (2,1,1,1); - -- echo 2. select --- sort SELECT * FROM unique_table; --- sort SELECT * FROM unique_table2; +-- sort SELECT * FROM unique_table; \ No newline at end of file diff --git a/test/case/test/primary-update-plus.test b/test/case/test/primary-update-plus.test deleted file mode 100644 index bc4e49a1..00000000 --- a/test/case/test/primary-update-plus.test +++ /dev/null @@ -1,32 +0,0 @@ --- echo initialization -create table student (id int, name char(9), major char(32)); -insert into student values (0, 'KangKanga', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); -insert into student values (1, 'TomTomTom', 'Computer ScienceComputer Science'); -insert into student values (2, 'JerryJerr', 'Computer ScienceComputer Science'); -insert into student values (3, 'JackJackJ', 'Electrical Engineeringer Science'); -insert into student values (3, 'JerryJerr', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); - --- echo 1. update a row -update student set major = 'Electrical Engineering' where id = 2; --- sort select * from student where id >= 1; --- sort select * from student where id = 0; - --- echo 2. update non-existent row -update student set id = 100 where name = 'JerryJerry'; --- sort select * from student where id > 2; --- sort select * from student where id < 101; - --- echo 3. update rows -update student set name = '12345678' where id < 3; --- sort select * from student where id = 2; --- sort select * from student where name = '12345678'; - --- echo 4. update rows again -update student set name = '9876543210' where id < 3; --- sort select * from student where id = 2; --- sort select * from student where name = '9876543210'; - --- echo 5. update multiple columns -update student set name = 'MulName', id = 666, major = 'MulMajor' where id = 1; --- sort select * from student where id = 1; --- sort select * from student where name = 'MulName' and major = 'MulMajor'; From c55661fe034cd7a77db5bd882ea3bb81ed961e98 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 4 Oct 2024 17:05:21 +0800 Subject: [PATCH 119/308] =?UTF-8?q?fix:=20find=5Findex=5Fby=5Ffield?= =?UTF-8?q?=E7=B4=A2=E5=BC=95=E5=8C=B9=E9=85=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/3rd/benchmark | 2 +- deps/3rd/googletest | 2 +- src/observer/storage/table/table.cpp | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/deps/3rd/benchmark b/deps/3rd/benchmark index 23d8c1e5..24e0bd82 160000 --- a/deps/3rd/benchmark +++ b/deps/3rd/benchmark @@ -1 +1 @@ -Subproject commit 23d8c1e58941ca48b4ef67595addaf78412109ef +Subproject commit 24e0bd827a8bec8121b128b0634cb34402fb3259 diff --git a/deps/3rd/googletest b/deps/3rd/googletest index 6dae7eb4..a1e255a5 160000 --- a/deps/3rd/googletest +++ b/deps/3rd/googletest @@ -1 +1 @@ -Subproject commit 6dae7eb4a5c3a169f3e298392bff4680224aa94a +Subproject commit a1e255a582377e1006bb88a408ac3f933ba7c916 diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index d62a2a83..fa0f03db 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -577,9 +577,11 @@ Index *Table::find_index(const char *index_name) const Index *Table::find_index_by_field(const char *field_name) const { for (const auto &index : indexes_) { - auto name = index->index_meta().fields().front().name(); - if (0 == strcmp(name, field_name)) { - return index; + if (index->index_meta().fields().size() == 1) { + auto name = index->index_meta().fields().front().name(); + if (0 == strcmp(name, field_name)) { + return index; + } } } return nullptr; From 67b34d4ffdfdf01bb6645fab964bf315fea047cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Fri, 4 Oct 2024 09:07:03 +0000 Subject: [PATCH 120/308] =?UTF-8?q?*=E4=B8=8D=E8=83=BD=E6=9C=89=E5=88=AB?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 1 + src/observer/sql/parser/expression_binder.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 0335954b..20688f7c 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -21,6 +21,7 @@ See the Mulan PSL v2 for more details. */ #define DEFINE_RCS \ DEFINE_RC(SUCCESS) \ + DEFINE_RC(INVALID_ALIAS) \ DEFINE_RC(INVALID_ARGUMENT) \ DEFINE_RC(UNIMPLEMENTED) \ DEFINE_RC(SQL_SYNTAX) \ diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 7b188786..172a2b7e 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -128,6 +128,10 @@ RC ExpressionBinder::bind_star_expression( auto star_expr = static_cast(expr.get()); + if (!is_blank(star_expr->name())) { + return RC::INVALID_ALIAS; + } + vector
tables_to_wildcard; const char *table_name = star_expr->table_name(); From aca3bfe1602f5794c8765da077010b2d558ad860 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 4 Oct 2024 17:31:35 +0800 Subject: [PATCH 121/308] =?UTF-8?q?fix:=20compare=5Fkey=E5=BF=BD=E7=95=A5f?= =?UTF-8?q?ields=5Foffset=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/index/bplus_tree.h | 7 +++++-- src/observer/storage/index/index_meta.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/observer/storage/index/bplus_tree.h b/src/observer/storage/index/bplus_tree.h index f003e75f..6ccbf61c 100644 --- a/src/observer/storage/index/bplus_tree.h +++ b/src/observer/storage/index/bplus_tree.h @@ -103,8 +103,11 @@ class KeyComparator int compare_key(const char *v1, const char *v2) const { - for (int i = 0; i < index_.fields().size(); i++) { - int result = attr_comparator_[i](v1, v2); + auto field_number = index_.fields().size(); + auto &fields_offset = index_.fields_offset(); + for (int i = 0; i < field_number; i++) { + int offset = fields_offset[i]; + int result = attr_comparator_[i](v1 + offset, v2 + offset); if (result != 0) { return result; } diff --git a/src/observer/storage/index/index_meta.h b/src/observer/storage/index/index_meta.h index c0ace1c0..a3f5a71a 100644 --- a/src/observer/storage/index/index_meta.h +++ b/src/observer/storage/index/index_meta.h @@ -67,6 +67,7 @@ class IndexMeta [[nodiscard]] int fields_total_len() const { return fields_total_len_; } [[nodiscard]] const vector &fields() const { return fields_; } [[nodiscard]] bool unique() const { return unique_; } + [[nodiscard]] const vector &fields_offset() const { return fields_offset_; } private: string name_; From e1a52144912310af15f748fe60fff18486979c51 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 4 Oct 2024 19:53:31 +0800 Subject: [PATCH 122/308] =?UTF-8?q?fix:=20update=20rollback=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/operator/update_physical_operator.cpp | 19 ++++++++++++++++++- .../sql/operator/update_physical_operator.h | 13 ++++++++----- src/observer/storage/record/record.h | 10 ++++++++++ src/observer/storage/table/table.cpp | 10 ++++++---- 4 files changed, 42 insertions(+), 10 deletions(-) diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 0db22451..f46bcbdc 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -62,20 +62,37 @@ RC UpdatePhysicalOperator::open(Trx *trx) } } else { if (values_[i].is_null()) { + rollback(); return RC::NOT_NULLABLE_VALUE; } } } - rc = trx_->update_record(table_, old_record, new_record); + auto rollback_old_record = old_record.clone(); + auto rollback_new_record = new_record.clone(); + rc = trx_->update_record(table_, old_record, new_record); if (rc != RC::SUCCESS) { LOG_WARN("failed to update record: %s", strrc(rc)); + rollback(); return rc; + } else { + log_records.emplace_back(rollback_old_record, rollback_new_record); } } return RC::SUCCESS; } +void UpdatePhysicalOperator::rollback() +{ + RC rc; + for (auto &[rollback_old_record, rollback_new_record] : log_records) { + rc = trx_->update_record(table_, rollback_new_record, rollback_old_record); + if (OB_FAIL(rc)) { + LOG_WARN("failed to update record: %s", strrc(rc)); + } + } +} + RC UpdatePhysicalOperator::next() { return RC::RECORD_EOF; } RC UpdatePhysicalOperator::close() { return RC::SUCCESS; } diff --git a/src/observer/sql/operator/update_physical_operator.h b/src/observer/sql/operator/update_physical_operator.h index 1ee5787e..4038b366 100644 --- a/src/observer/sql/operator/update_physical_operator.h +++ b/src/observer/sql/operator/update_physical_operator.h @@ -41,9 +41,12 @@ class UpdatePhysicalOperator : public PhysicalOperator Tuple *current_tuple() override { return nullptr; } private: - Trx *trx_ = nullptr; - Table *table_ = nullptr; - std::vector field_metas_; - std::vector values_; - std::vector records_; + void rollback(); + + Trx *trx_ = nullptr; + Table *table_ = nullptr; + std::vector field_metas_; + std::vector values_; + std::vector records_; + vector> log_records; }; diff --git a/src/observer/storage/record/record.h b/src/observer/storage/record/record.h index 27364106..51cf64e7 100644 --- a/src/observer/storage/record/record.h +++ b/src/observer/storage/record/record.h @@ -142,6 +142,16 @@ class Record return *this; } + Record clone() + { + Record new_record; + new_record.rid_ = this->rid_; + new_record.len_ = this->len_; + new_record.data_ = (char *)malloc(this->len_); + memcpy(new_record.data_, this->data_, this->len_); + return new_record; + } + Record(Record &&other) { rid_ = other.rid_; diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index fa0f03db..6d30335f 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -528,10 +528,12 @@ RC Table::update_record(const Record &old_record, const Record &new_record) // 出现重复键 if (rc != RC::SUCCESS) { // 因为有些索引还没有插入,删除失败不应该报错 - rc = delete_entry_of_indexes(new_record.data(), new_record.rid(), false); - ASSERT(RC::SUCCESS == rc, - "failed to rollback index data when insert index entries failed. table name=%s, rc=%s", - name(), strrc(rc)); + RC delete_entry_of_indexes_rc = delete_entry_of_indexes(new_record.data(), new_record.rid(), false); + if (RC::SUCCESS != delete_entry_of_indexes_rc) { + LOG_WARN("failed to rollback index data when insert index entries failed. table name=%s, rc=%s", name(), strrc(delete_entry_of_indexes_rc)); + return delete_entry_of_indexes_rc; + } + return rc; } // 最后更新记录 From e1c084a632fd65c771b1a7108e0e8429d18d739d Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 4 Oct 2024 20:01:02 +0800 Subject: [PATCH 123/308] =?UTF-8?q?=E6=9B=B4=E6=96=B0show=20index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/executor/show_index_executor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/executor/show_index_executor.cpp b/src/observer/sql/executor/show_index_executor.cpp index 67e66c61..a52f508c 100644 --- a/src/observer/sql/executor/show_index_executor.cpp +++ b/src/observer/sql/executor/show_index_executor.cpp @@ -51,7 +51,7 @@ RC ShowIndexExecutor::execute(SQLStageEvent *sql_event) const TableMeta &table_meta = table->table_meta(); for (int i = 0; i < table_meta.index_num(); i++) { auto index = table_meta.index(i); - vector list = {table_name, "1", index->name()}; + vector list = {table_name, index->unique() ? "0" : "1", index->name()}; auto fields = index->fields(); for (auto &name : fields) { list.emplace_back("1"); From 2a6107ce7efa63a92f06f2461f46a2028131918c Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 4 Oct 2024 20:09:34 +0800 Subject: [PATCH 124/308] =?UTF-8?q?fix=20bug:=20show=20index=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/executor/show_index_executor.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/observer/sql/executor/show_index_executor.cpp b/src/observer/sql/executor/show_index_executor.cpp index a52f508c..427d32e3 100644 --- a/src/observer/sql/executor/show_index_executor.cpp +++ b/src/observer/sql/executor/show_index_executor.cpp @@ -50,14 +50,15 @@ RC ShowIndexExecutor::execute(SQLStageEvent *sql_event) auto oper = new StringListPhysicalOperator; const TableMeta &table_meta = table->table_meta(); for (int i = 0; i < table_meta.index_num(); i++) { - auto index = table_meta.index(i); - vector list = {table_name, index->unique() ? "0" : "1", index->name()}; - auto fields = index->fields(); - for (auto &name : fields) { - list.emplace_back("1"); - list.emplace_back(name.name()); + auto index = table_meta.index(i); + for (size_t j = 0; j < index->fields().size(); j++) { + auto unique = index->unique() ? "0" : "1"; + auto name = index->name(); + auto id = std::to_string(j + 1); + auto field_name = index->fields()[j].name(); + vector list = {table_name, unique, name, id, field_name}; + oper->append(list); } - oper->append(list); } sql_result->set_operator(unique_ptr(oper)); From e2cf4a93e62d7accca86db6c5cb69bbbb5dc37e3 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 00:24:27 +0800 Subject: [PATCH 125/308] refactor functions --- src/observer/sql/expr/expression.cpp | 5 +- src/observer/sql/expr/expression.h | 13 +- src/observer/sql/parser/expression_binder.cpp | 88 +- src/observer/sql/parser/lex_sql.cpp | 5416 ++++++----------- src/observer/sql/parser/lex_sql.h | 244 +- src/observer/sql/parser/yacc_sql.cpp | 4959 +++++---------- src/observer/sql/parser/yacc_sql.hpp | 221 +- src/observer/sql/parser/yacc_sql.y | 14 +- 8 files changed, 3641 insertions(+), 7319 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index bc8968c0..4e3463d9 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -629,10 +629,7 @@ RC ArithmeticExpr::try_get_value(Value &value) const //////////////////////////////////////////////////////////////////////////////// -UnboundAggregateExpr::UnboundAggregateExpr(const char *aggregate_name, Expression *child) - : aggregate_name_(aggregate_name), child_(child) -{} -UnboundAggregateExpr::UnboundAggregateExpr(const char *aggregate_name, std::unique_ptr child) +UnboundAggregateExpr::UnboundAggregateExpr(const char *aggregate_name, std::vector> child) : aggregate_name_(aggregate_name), child_(std::move(child)) {} diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index a6c9cc7f..475caa90 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -421,22 +421,21 @@ class ArithmeticExpr : public Expression class UnboundAggregateExpr : public Expression { public: - UnboundAggregateExpr(const char *aggregate_name, Expression *child); - UnboundAggregateExpr(const char *aggregate_name, std::unique_ptr child); + UnboundAggregateExpr(const char *aggregate_name, std::vector> child); virtual ~UnboundAggregateExpr() = default; ExprType type() const override { return ExprType::UNBOUND_AGGREGATION; } const char *aggregate_name() const { return aggregate_name_.c_str(); } - std::unique_ptr &child() { return child_; } + const std::vector> &child() { return child_; } - RC get_value(const Tuple &tuple, Value &value) override { return RC::INTERNAL; } - AttrType value_type() const override { return child_->value_type(); } + RC get_value(const Tuple &, Value &) override { return RC::INTERNAL; } + AttrType value_type() const override { return {}; } private: - std::string aggregate_name_; - std::unique_ptr child_; + std::string aggregate_name_; + std::vector> child_; }; class AggregateExpr : public Expression diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 0058ba41..411700bf 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -471,59 +471,57 @@ RC ExpressionBinder::bind_aggregate_expression( const char *aggregate_name = unbound_aggregate_expr->aggregate_name(); AggregateExpr::Type aggregate_type; RC rc = AggregateExpr::type_from_string(aggregate_name, aggregate_type); - if (OB_FAIL(rc)) { - LOG_WARN("invalid aggregate name: %s", aggregate_name); - return rc; - } - - unique_ptr &child_expr = unbound_aggregate_expr->child(); - vector> child_bound_expressions; + if (OB_SUCC(rc)) { + unique_ptr &child_expr = unbound_aggregate_expr->args().front(); + vector> child_bound_expressions; + + if (child_expr->type() == ExprType::STAR && aggregate_type == AggregateExpr::Type::COUNT) { + ValueExpr *value_expr = new ValueExpr(Value(1)); + child_expr.reset(value_expr); + // count(*) 输出星号 + child_expr->set_name("*"); + } else { + rc = bind_expression(child_expr, child_bound_expressions); + if (OB_FAIL(rc)) { + return rc; + } - if (child_expr->type() == ExprType::STAR && aggregate_type == AggregateExpr::Type::COUNT) { - ValueExpr *value_expr = new ValueExpr(Value(1)); - child_expr.reset(value_expr); - // count(*) 输出星号 - child_expr->set_name("*"); - } else { - rc = bind_expression(child_expr, child_bound_expressions); - if (OB_FAIL(rc)) { - return rc; - } + if (child_bound_expressions.size() != 1) { + LOG_WARN("invalid children number of aggregate expression: %d", child_bound_expressions.size()); + return RC::INVALID_ARGUMENT; + } - if (child_bound_expressions.size() != 1) { - LOG_WARN("invalid children number of aggregate expression: %d", child_bound_expressions.size()); - return RC::INVALID_ARGUMENT; + if (child_bound_expressions[0].get() != child_expr.get()) { + child_expr.reset(child_bound_expressions[0].release()); + } } - if (child_bound_expressions[0].get() != child_expr.get()) { - child_expr.reset(child_bound_expressions[0].release()); + auto aggregate_expr = make_unique(aggregate_type, std::move(child_expr)); + + // set name 阶段 + if (unbound_aggregate_expr->name_empty()) { + string name; + switch (aggregate_type) { + case AggregateExpr::Type::COUNT: name = "COUNT(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::SUM: name = "SUM(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::AVG: name = "AVG(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::MAX: name = "MAX(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateExpr::Type::MIN: name = "MIN(" + std::string(aggregate_expr->child()->name()) + ")"; break; + default: name = "UNKNOWN_AGGREGATE"; break; + } + aggregate_expr->set_name(name); + } else { + aggregate_expr->set_name(unbound_aggregate_expr->name()); } - } - - auto aggregate_expr = make_unique(aggregate_type, std::move(child_expr)); - - // set name 阶段 - if (unbound_aggregate_expr->name_empty()) { - string name; - switch (aggregate_type) { - case AggregateExpr::Type::COUNT: name = "COUNT(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::SUM: name = "SUM(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::AVG: name = "AVG(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::MAX: name = "MAX(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::MIN: name = "MIN(" + std::string(aggregate_expr->child()->name()) + ")"; break; - default: name = "UNKNOWN_AGGREGATE"; break; + rc = check_aggregate_expression(*aggregate_expr); + if (OB_FAIL(rc)) { + return rc; } - aggregate_expr->set_name(name); - } else { - aggregate_expr->set_name(unbound_aggregate_expr->name()); - } - rc = check_aggregate_expression(*aggregate_expr); - if (OB_FAIL(rc)) { - return rc; + bound_expressions.emplace_back(std::move(aggregate_expr)); + return RC::SUCCESS; } - bound_expressions.emplace_back(std::move(aggregate_expr)); - return RC::SUCCESS; + return RC::INTERNAL; } RC ExpressionBinder::bind_subquery_expression( std::unique_ptr &expr, std::vector> &bound_expressions) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 4e463496..96d1ea9c 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,21 +8,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -75,62 +77,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -154,12 +156,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -187,7 +189,7 @@ typedef void *yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin, yyscanner) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -205,7 +207,7 @@ typedef void *yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -220,85 +222,88 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -307,55 +312,59 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -static void yyensure_buffer_stack(yyscan_t yyscanner); -static void yy_load_buffer_state(yyscan_t yyscanner); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -363,2377 +372,311 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state(yyscan_t yyscanner); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); -static int yy_get_next_buffer(yyscan_t yyscanner); -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t)(yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 76 #define YY_END_OF_BUFFER 77 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info -{ - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[219] = {0, - 0, - 0, - 0, - 0, - 77, - 75, - 1, - 2, - 75, - 75, - 75, - 55, - 56, - 71, - 69, - 57, - 70, - 6, - 72, - 3, - 5, - 62, - 58, - 64, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 76, - 61, - 0, - 73, - 0, - 74, - 3, - 0, - 59, - 60, - 63, - 68, - 68, - 68, - 47, - 68, - 46, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 49, - 66, - 68, - 68, - 68, - 68, - 68, - 15, - 23, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 4, - 22, - 48, - 68, - 68, - 68, - 68, - - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 33, - 68, - 68, - 68, - 65, - 68, - 68, - 68, - 68, - 29, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 68, - 19, - 34, - 68, - 68, - 41, - 36, - 68, - 9, - 11, - 68, - 7, - 68, - 68, - 68, - 20, - 68, - 8, - 68, - 68, - 68, - 68, - 25, - 54, - 67, - 40, - 38, - 68, - 68, - 68, - 16, - 68, - 17, - 68, - 68, - 68, - 68, - 68, - 30, - 68, - 68, - 68, - 68, - 68, - 35, - 68, - 44, - 14, - 68, - 53, - 68, - 68, - 45, - 68, - 68, - 68, - 12, - 68, - 68, - 68, - 21, - 31, - 10, - 27, - 50, - 68, - - 52, - 42, - 24, - 68, - 68, - 18, - 68, - 13, - 37, - 28, - 26, - 43, - 68, - 68, - 51, - 39, - 32, - 0}; - -static const YY_CHAR yy_ec[256] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 3, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 4, - 5, - 1, - 1, - 1, - 1, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 1, - 16, - 17, - 18, - 19, - 1, - 1, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 1, - 1, - 1, - 1, - 45, - 1, - 46, - 47, - 48, - 49, - - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 45, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1}; - -static const YY_CHAR yy_meta[71] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2}; - -static const flex_int16_t yy_base[224] = {0, - 0, - 0, - 0, - 0, - 592, - 593, - 593, - 593, - 573, - 585, - 583, - 593, - 593, - 593, - 593, - 593, - 573, - 593, - 593, - 58, - 593, - 56, - 593, - 569, - 57, - 61, - 62, - 63, - 64, - 83, - 65, - 69, - 91, - 76, - 571, - 117, - 108, - 97, - 103, - 120, - 134, - 143, - 137, - 112, - 593, - 593, - 580, - 593, - 578, - 593, - 73, - 568, - 593, - 593, - 593, - 0, - 567, - 138, - 147, - 160, - 566, - 151, - 152, - 164, - 169, - 166, - 176, - 177, - 182, - 179, - 184, - 186, - 191, - 185, - 237, - 565, - 200, - 173, - 203, - 209, - 226, - 564, - 212, - 235, - 238, - 211, - 229, - 223, - 243, - 240, - 244, - 250, - 263, - 563, - 555, - 554, - 257, - 258, - 282, - 276, - - 264, - 285, - 297, - 300, - 283, - 289, - 299, - 305, - 284, - 308, - 309, - 302, - 314, - 311, - 317, - 328, - 321, - 335, - 345, - 347, - 553, - 342, - 356, - 343, - 361, - 551, - 344, - 346, - 357, - 362, - 367, - 369, - 373, - 377, - 375, - 550, - 548, - 376, - 382, - 544, - 543, - 383, - 542, - 541, - 386, - 540, - 387, - 402, - 403, - 539, - 401, - 538, - 395, - 411, - 409, - 413, - 534, - 533, - 532, - 531, - 412, - 416, - 422, - 430, - 529, - 439, - 527, - 420, - 440, - 442, - 441, - 451, - 518, - 445, - 458, - 459, - 448, - 462, - 516, - 456, - 513, - 489, - 472, - 484, - 474, - 473, - 483, - 477, - 478, - 485, - 487, - 490, - 500, - 488, - 446, - 405, - 372, - 331, - 318, - 503, - - 219, - 217, - 215, - 504, - 512, - 194, - 514, - 174, - 126, - 123, - 89, - 88, - 517, - 515, - 86, - 82, - 79, - 593, - 571, - 573, - 575, - 90, - 79}; - -static const flex_int16_t yy_def[224] = {0, - 218, - 1, - 219, - 219, - 218, - 218, - 218, - 218, - 218, - 220, - 221, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 218, - 218, - 220, - 218, - 221, - 218, - 218, - 218, - 218, - 218, - 218, - 223, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 218, - 222, - 222, - 222, - 222, - 222, - 222, - - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 222, - 0, - 218, - 218, - 218, - 218, - 218}; - -static const flex_int16_t yy_nxt[664] = {0, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 35, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 52, - 56, - 51, - 53, - 54, - 56, - 56, - 56, - 56, - 56, - 56, - 62, - 66, - 56, - 60, - 52, - 67, - 51, - 63, - 58, - 56, - 57, - 74, - 56, - 59, - 64, - 56, - 56, - 65, - 68, - - 56, - 73, - 56, - 56, - 61, - 56, - 69, - 62, - 66, - 77, - 60, - 56, - 67, - 70, - 63, - 58, - 71, - 56, - 74, - 72, - 59, - 64, - 56, - 75, - 65, - 68, - 56, - 73, - 76, - 82, - 61, - 56, - 69, - 83, - 56, - 77, - 84, - 56, - 93, - 70, - 56, - 80, - 71, - 85, - 78, - 72, - 86, - 81, - 56, - 75, - 79, - 56, - 56, - 89, - 76, - 82, - 92, - 56, - 87, - 83, - 95, - 56, - 84, - 88, - 93, - 56, - 56, - 80, - 96, - 85, - 78, - 99, - 86, - 81, - 56, - 90, - 79, - 91, - 56, - 89, - 56, - 98, - 92, - 56, - 87, - 97, - 95, - 56, - 56, - 88, - 56, - 56, - 101, - 56, - 96, - 100, - 56, - 99, - 56, - 56, - - 56, - 90, - 119, - 91, - 102, - 56, - 103, - 98, - 56, - 106, - 105, - 97, - 108, - 104, - 56, - 112, - 107, - 56, - 101, - 110, - 109, - 100, - 120, - 56, - 111, - 56, - 56, - 118, - 119, - 56, - 102, - 56, - 103, - 56, - 123, - 106, - 105, - 56, - 108, - 104, - 56, - 112, - 107, - 56, - 127, - 110, - 109, - 121, - 120, - 56, - 111, - 56, - 56, - 118, - 56, - 129, - 122, - 56, - 56, - 113, - 123, - 114, - 128, - 130, - 56, - 124, - 132, - 131, - 125, - 115, - 127, - 56, - 56, - 121, - 116, - 117, - 126, - 56, - 56, - 136, - 133, - 129, - 122, - 139, - 135, - 113, - 134, - 114, - 128, - 130, - 56, - 124, - 132, - 131, - 125, - 115, - 56, - 56, - 56, - 56, - - 116, - 117, - 126, - 56, - 140, - 136, - 133, - 138, - 141, - 139, - 135, - 56, - 134, - 56, - 56, - 149, - 56, - 144, - 137, - 56, - 142, - 143, - 56, - 56, - 148, - 56, - 145, - 146, - 56, - 147, - 140, - 56, - 56, - 138, - 141, - 56, - 152, - 153, - 154, - 150, - 155, - 149, - 56, - 144, - 137, - 56, - 142, - 143, - 151, - 56, - 148, - 156, - 145, - 146, - 157, - 147, - 56, - 56, - 56, - 56, - 56, - 56, - 152, - 153, - 154, - 150, - 155, - 158, - 159, - 160, - 56, - 56, - 161, - 163, - 151, - 56, - 56, - 156, - 167, - 162, - 157, - 56, - 166, - 56, - 164, - 165, - 56, - 56, - 170, - 56, - 56, - 56, - 168, - 158, - 159, - 160, - 56, - 56, - 161, - 163, - - 56, - 56, - 169, - 174, - 167, - 162, - 178, - 173, - 166, - 56, - 164, - 165, - 171, - 172, - 170, - 56, - 56, - 56, - 168, - 56, - 175, - 176, - 180, - 56, - 177, - 56, - 56, - 56, - 169, - 174, - 56, - 186, - 178, - 173, - 56, - 181, - 56, - 182, - 171, - 172, - 179, - 183, - 188, - 191, - 56, - 184, - 175, - 176, - 180, - 185, - 177, - 189, - 187, - 56, - 56, - 56, - 56, - 186, - 190, - 56, - 56, - 181, - 56, - 182, - 194, - 56, - 179, - 183, - 188, - 191, - 56, - 184, - 56, - 56, - 195, - 185, - 56, - 189, - 187, - 192, - 193, - 197, - 198, - 196, - 190, - 199, - 56, - 56, - 56, - 200, - 194, - 56, - 56, - 204, - 201, - 202, - 205, - 56, - 56, - 56, - - 195, - 56, - 56, - 56, - 56, - 192, - 193, - 197, - 198, - 196, - 207, - 199, - 203, - 209, - 56, - 200, - 206, - 56, - 56, - 204, - 201, - 202, - 205, - 210, - 208, - 211, - 56, - 56, - 56, - 56, - 56, - 56, - 56, - 214, - 213, - 212, - 207, - 215, - 203, - 209, - 216, - 56, - 206, - 56, - 217, - 56, - 56, - 56, - 56, - 210, - 208, - 211, - 56, - 56, - 56, - 56, - 56, - 56, - 56, - 214, - 213, - 212, - 56, - 215, - 56, - 56, - 216, - 56, - 56, - 56, - 217, - 45, - 45, - 47, - 47, - 49, - 49, - 94, - 56, - 56, - 56, - 56, - 94, - 50, - 48, - 56, - 55, - 51, - 50, - 48, - 46, - 218, - 5, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218}; - -static const flex_int16_t yy_chk[664] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 20, - 25, - 20, - 22, - 22, - 26, - 27, - 28, - 29, - 31, - 223, - 27, - 28, - 32, - 26, - 51, - 28, - 51, - 27, - 25, - 34, - 222, - 32, - 217, - 25, - 27, - 216, - 30, - 27, - 28, - - 215, - 31, - 212, - 211, - 26, - 33, - 29, - 27, - 28, - 34, - 26, - 38, - 28, - 30, - 27, - 25, - 30, - 39, - 32, - 30, - 25, - 27, - 37, - 33, - 27, - 28, - 44, - 31, - 33, - 38, - 26, - 36, - 29, - 38, - 40, - 34, - 39, - 210, - 44, - 30, - 209, - 37, - 30, - 40, - 36, - 30, - 40, - 37, - 41, - 33, - 36, - 43, - 58, - 41, - 33, - 38, - 43, - 42, - 40, - 38, - 58, - 59, - 39, - 40, - 44, - 62, - 63, - 37, - 59, - 40, - 36, - 63, - 40, - 37, - 60, - 42, - 36, - 42, - 64, - 41, - 66, - 62, - 43, - 65, - 40, - 60, - 58, - 78, - 208, - 40, - 67, - 68, - 65, - 70, - 59, - 64, - 69, - 63, - 71, - 74, - - 72, - 42, - 78, - 42, - 66, - 73, - 67, - 62, - 206, - 69, - 68, - 60, - 70, - 67, - 77, - 74, - 69, - 79, - 65, - 72, - 71, - 64, - 79, - 80, - 73, - 86, - 83, - 77, - 78, - 203, - 66, - 202, - 67, - 201, - 83, - 69, - 68, - 88, - 70, - 67, - 81, - 74, - 69, - 87, - 86, - 72, - 71, - 80, - 79, - 84, - 73, - 75, - 85, - 77, - 90, - 88, - 81, - 89, - 91, - 75, - 83, - 75, - 87, - 89, - 92, - 84, - 91, - 90, - 85, - 75, - 86, - 97, - 98, - 80, - 75, - 75, - 85, - 93, - 101, - 98, - 92, - 88, - 81, - 101, - 97, - 75, - 93, - 75, - 87, - 89, - 100, - 84, - 91, - 90, - 85, - 75, - 99, - 105, - 109, - 102, - - 75, - 75, - 85, - 106, - 102, - 98, - 92, - 100, - 102, - 101, - 97, - 103, - 93, - 107, - 104, - 109, - 112, - 105, - 99, - 108, - 103, - 104, - 110, - 111, - 108, - 114, - 106, - 106, - 113, - 107, - 102, - 115, - 199, - 100, - 102, - 117, - 112, - 113, - 114, - 110, - 115, - 109, - 116, - 105, - 99, - 198, - 103, - 104, - 111, - 118, - 108, - 116, - 106, - 106, - 117, - 107, - 122, - 124, - 127, - 119, - 128, - 120, - 112, - 113, - 114, - 110, - 115, - 118, - 119, - 120, - 123, - 129, - 122, - 124, - 111, - 125, - 130, - 116, - 129, - 123, - 117, - 131, - 128, - 132, - 125, - 127, - 197, - 133, - 132, - 135, - 138, - 134, - 130, - 118, - 119, - 120, - 139, - 142, - 122, - 124, - - 145, - 147, - 131, - 138, - 129, - 123, - 147, - 135, - 128, - 153, - 125, - 127, - 133, - 134, - 132, - 151, - 148, - 149, - 130, - 196, - 139, - 142, - 149, - 155, - 145, - 154, - 161, - 156, - 131, - 138, - 162, - 161, - 147, - 135, - 168, - 151, - 163, - 153, - 133, - 134, - 148, - 154, - 163, - 168, - 164, - 155, - 139, - 142, - 149, - 156, - 145, - 164, - 162, - 166, - 169, - 171, - 170, - 161, - 166, - 174, - 195, - 151, - 177, - 153, - 171, - 172, - 148, - 154, - 163, - 168, - 180, - 155, - 175, - 176, - 172, - 156, - 178, - 164, - 162, - 169, - 170, - 175, - 176, - 174, - 166, - 177, - 183, - 186, - 185, - 178, - 171, - 188, - 189, - 186, - 180, - 183, - 188, - 187, - 184, - 190, - - 172, - 191, - 194, - 182, - 192, - 169, - 170, - 175, - 176, - 174, - 190, - 177, - 185, - 192, - 193, - 178, - 189, - 200, - 204, - 186, - 180, - 183, - 188, - 193, - 191, - 194, - 205, - 181, - 207, - 214, - 179, - 213, - 173, - 205, - 204, - 200, - 190, - 207, - 185, - 192, - 213, - 167, - 189, - 165, - 214, - 160, - 159, - 158, - 157, - 193, - 191, - 194, - 152, - 150, - 146, - 144, - 143, - 141, - 140, - 205, - 204, - 200, - 137, - 207, - 136, - 126, - 213, - 121, - 96, - 95, - 214, - 219, - 219, - 220, - 220, - 221, - 221, - 94, - 82, - 76, - 61, - 57, - 52, - 49, - 47, - 35, - 24, - 17, - 11, - 10, - 9, - 5, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218, - 218}; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[219] = + { 0, + 0, 0, 0, 0, 77, 75, 1, 2, 75, 75, + 75, 55, 56, 71, 69, 57, 70, 6, 72, 3, + 5, 62, 58, 64, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 76, 61, 0, 73, 0, 74, + 3, 0, 59, 60, 63, 68, 68, 68, 47, 68, + 46, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 49, 66, 68, 68, 68, 68, + 68, 15, 23, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 4, 22, 48, 68, 68, 68, 68, + + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 33, 68, 68, 68, + 65, 68, 68, 68, 68, 29, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 19, 34, 68, 68, 41, + 36, 68, 9, 11, 68, 7, 68, 68, 68, 20, + 68, 8, 68, 68, 68, 68, 25, 54, 67, 40, + 38, 68, 68, 68, 16, 68, 17, 68, 68, 68, + 68, 68, 30, 68, 68, 68, 68, 68, 35, 68, + 44, 14, 68, 53, 68, 68, 45, 68, 68, 68, + 12, 68, 68, 68, 21, 31, 10, 27, 50, 68, + + 52, 42, 24, 68, 68, 18, 68, 13, 37, 28, + 26, 43, 68, 68, 51, 39, 32, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, + 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, + + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[71] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + } ; + +static const flex_int16_t yy_base[224] = + { 0, + 0, 0, 0, 0, 592, 593, 593, 593, 573, 585, + 583, 593, 593, 593, 593, 593, 573, 593, 593, 58, + 593, 56, 593, 569, 57, 61, 62, 63, 64, 83, + 65, 69, 91, 76, 571, 117, 108, 97, 103, 120, + 134, 143, 137, 112, 593, 593, 580, 593, 578, 593, + 73, 568, 593, 593, 593, 0, 567, 138, 147, 160, + 566, 151, 152, 164, 169, 166, 176, 177, 182, 179, + 184, 186, 191, 185, 237, 565, 200, 173, 203, 209, + 226, 564, 212, 235, 238, 211, 229, 223, 243, 240, + 244, 250, 263, 563, 555, 554, 257, 258, 282, 276, + + 264, 285, 297, 300, 283, 289, 299, 305, 284, 308, + 309, 302, 314, 311, 317, 328, 321, 335, 345, 347, + 553, 342, 356, 343, 361, 551, 344, 346, 357, 362, + 367, 369, 373, 377, 375, 550, 548, 376, 382, 544, + 543, 383, 542, 541, 386, 540, 387, 402, 403, 539, + 401, 538, 395, 411, 409, 413, 534, 533, 532, 531, + 412, 416, 422, 430, 529, 439, 527, 420, 440, 442, + 441, 451, 518, 445, 458, 459, 448, 462, 516, 456, + 513, 489, 472, 484, 474, 473, 483, 477, 478, 485, + 487, 490, 500, 488, 446, 405, 372, 331, 318, 503, + + 219, 217, 215, 504, 512, 194, 514, 174, 126, 123, + 89, 88, 517, 515, 86, 82, 79, 593, 571, 573, + 575, 90, 79 + } ; + +static const flex_int16_t yy_def[224] = + { 0, + 218, 1, 219, 219, 218, 218, 218, 218, 218, 220, + 221, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 218, 218, 220, 218, 221, 218, + 218, 218, 218, 218, 218, 223, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 218, 222, 222, 222, 222, 222, 222, + + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 0, 218, 218, + 218, 218, 218 + } ; + +static const flex_int16_t yy_nxt[664] = + { 0, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, + 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, + 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, + 52, 56, 51, 53, 54, 56, 56, 56, 56, 56, + 56, 62, 66, 56, 60, 52, 67, 51, 63, 58, + 56, 57, 74, 56, 59, 64, 56, 56, 65, 68, + + 56, 73, 56, 56, 61, 56, 69, 62, 66, 77, + 60, 56, 67, 70, 63, 58, 71, 56, 74, 72, + 59, 64, 56, 75, 65, 68, 56, 73, 76, 82, + 61, 56, 69, 83, 56, 77, 84, 56, 93, 70, + 56, 80, 71, 85, 78, 72, 86, 81, 56, 75, + 79, 56, 56, 89, 76, 82, 92, 56, 87, 83, + 95, 56, 84, 88, 93, 56, 56, 80, 96, 85, + 78, 99, 86, 81, 56, 90, 79, 91, 56, 89, + 56, 98, 92, 56, 87, 97, 95, 56, 56, 88, + 56, 56, 101, 56, 96, 100, 56, 99, 56, 56, + + 56, 90, 119, 91, 102, 56, 103, 98, 56, 106, + 105, 97, 108, 104, 56, 112, 107, 56, 101, 110, + 109, 100, 120, 56, 111, 56, 56, 118, 119, 56, + 102, 56, 103, 56, 123, 106, 105, 56, 108, 104, + 56, 112, 107, 56, 127, 110, 109, 121, 120, 56, + 111, 56, 56, 118, 56, 129, 122, 56, 56, 113, + 123, 114, 128, 130, 56, 124, 132, 131, 125, 115, + 127, 56, 56, 121, 116, 117, 126, 56, 56, 136, + 133, 129, 122, 139, 135, 113, 134, 114, 128, 130, + 56, 124, 132, 131, 125, 115, 56, 56, 56, 56, + + 116, 117, 126, 56, 140, 136, 133, 138, 141, 139, + 135, 56, 134, 56, 56, 149, 56, 144, 137, 56, + 142, 143, 56, 56, 148, 56, 145, 146, 56, 147, + 140, 56, 56, 138, 141, 56, 152, 153, 154, 150, + 155, 149, 56, 144, 137, 56, 142, 143, 151, 56, + 148, 156, 145, 146, 157, 147, 56, 56, 56, 56, + 56, 56, 152, 153, 154, 150, 155, 158, 159, 160, + 56, 56, 161, 163, 151, 56, 56, 156, 167, 162, + 157, 56, 166, 56, 164, 165, 56, 56, 170, 56, + 56, 56, 168, 158, 159, 160, 56, 56, 161, 163, + + 56, 56, 169, 174, 167, 162, 178, 173, 166, 56, + 164, 165, 171, 172, 170, 56, 56, 56, 168, 56, + 175, 176, 180, 56, 177, 56, 56, 56, 169, 174, + 56, 186, 178, 173, 56, 181, 56, 182, 171, 172, + 179, 183, 188, 191, 56, 184, 175, 176, 180, 185, + 177, 189, 187, 56, 56, 56, 56, 186, 190, 56, + 56, 181, 56, 182, 194, 56, 179, 183, 188, 191, + 56, 184, 56, 56, 195, 185, 56, 189, 187, 192, + 193, 197, 198, 196, 190, 199, 56, 56, 56, 200, + 194, 56, 56, 204, 201, 202, 205, 56, 56, 56, + + 195, 56, 56, 56, 56, 192, 193, 197, 198, 196, + 207, 199, 203, 209, 56, 200, 206, 56, 56, 204, + 201, 202, 205, 210, 208, 211, 56, 56, 56, 56, + 56, 56, 56, 214, 213, 212, 207, 215, 203, 209, + 216, 56, 206, 56, 217, 56, 56, 56, 56, 210, + 208, 211, 56, 56, 56, 56, 56, 56, 56, 214, + 213, 212, 56, 215, 56, 56, 216, 56, 56, 56, + 217, 45, 45, 47, 47, 49, 49, 94, 56, 56, + 56, 56, 94, 50, 48, 56, 55, 51, 50, 48, + 46, 218, 5, 218, 218, 218, 218, 218, 218, 218, + + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218 + } ; + +static const flex_int16_t yy_chk[664] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, + 223, 27, 28, 32, 26, 51, 28, 51, 27, 25, + 34, 222, 32, 217, 25, 27, 216, 30, 27, 28, + + 215, 31, 212, 211, 26, 33, 29, 27, 28, 34, + 26, 38, 28, 30, 27, 25, 30, 39, 32, 30, + 25, 27, 37, 33, 27, 28, 44, 31, 33, 38, + 26, 36, 29, 38, 40, 34, 39, 210, 44, 30, + 209, 37, 30, 40, 36, 30, 40, 37, 41, 33, + 36, 43, 58, 41, 33, 38, 43, 42, 40, 38, + 58, 59, 39, 40, 44, 62, 63, 37, 59, 40, + 36, 63, 40, 37, 60, 42, 36, 42, 64, 41, + 66, 62, 43, 65, 40, 60, 58, 78, 208, 40, + 67, 68, 65, 70, 59, 64, 69, 63, 71, 74, + + 72, 42, 78, 42, 66, 73, 67, 62, 206, 69, + 68, 60, 70, 67, 77, 74, 69, 79, 65, 72, + 71, 64, 79, 80, 73, 86, 83, 77, 78, 203, + 66, 202, 67, 201, 83, 69, 68, 88, 70, 67, + 81, 74, 69, 87, 86, 72, 71, 80, 79, 84, + 73, 75, 85, 77, 90, 88, 81, 89, 91, 75, + 83, 75, 87, 89, 92, 84, 91, 90, 85, 75, + 86, 97, 98, 80, 75, 75, 85, 93, 101, 98, + 92, 88, 81, 101, 97, 75, 93, 75, 87, 89, + 100, 84, 91, 90, 85, 75, 99, 105, 109, 102, + + 75, 75, 85, 106, 102, 98, 92, 100, 102, 101, + 97, 103, 93, 107, 104, 109, 112, 105, 99, 108, + 103, 104, 110, 111, 108, 114, 106, 106, 113, 107, + 102, 115, 199, 100, 102, 117, 112, 113, 114, 110, + 115, 109, 116, 105, 99, 198, 103, 104, 111, 118, + 108, 116, 106, 106, 117, 107, 122, 124, 127, 119, + 128, 120, 112, 113, 114, 110, 115, 118, 119, 120, + 123, 129, 122, 124, 111, 125, 130, 116, 129, 123, + 117, 131, 128, 132, 125, 127, 197, 133, 132, 135, + 138, 134, 130, 118, 119, 120, 139, 142, 122, 124, + + 145, 147, 131, 138, 129, 123, 147, 135, 128, 153, + 125, 127, 133, 134, 132, 151, 148, 149, 130, 196, + 139, 142, 149, 155, 145, 154, 161, 156, 131, 138, + 162, 161, 147, 135, 168, 151, 163, 153, 133, 134, + 148, 154, 163, 168, 164, 155, 139, 142, 149, 156, + 145, 164, 162, 166, 169, 171, 170, 161, 166, 174, + 195, 151, 177, 153, 171, 172, 148, 154, 163, 168, + 180, 155, 175, 176, 172, 156, 178, 164, 162, 169, + 170, 175, 176, 174, 166, 177, 183, 186, 185, 178, + 171, 188, 189, 186, 180, 183, 188, 187, 184, 190, + + 172, 191, 194, 182, 192, 169, 170, 175, 176, 174, + 190, 177, 185, 192, 193, 178, 189, 200, 204, 186, + 180, 183, 188, 193, 191, 194, 205, 181, 207, 214, + 179, 213, 173, 205, 204, 200, 190, 207, 185, 192, + 213, 167, 189, 165, 214, 160, 159, 158, 157, 193, + 191, 194, 152, 150, 146, 144, 143, 141, 140, 205, + 204, 200, 137, 207, 136, 126, 213, 121, 96, 95, + 214, 219, 219, 220, 220, 221, 221, 94, 82, 76, + 61, 57, 52, 49, 47, 35, 24, 17, 11, 10, + 9, 5, 218, 218, 218, 218, 218, 218, 218, 218, + + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, + 218, 218, 218 + } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2745,8 +688,8 @@ static const flex_int16_t yy_chk[664] = {0, #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -2760,15 +703,13 @@ static const flex_int16_t yy_chk[664] = {0, #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) \ - LOG_DEBUG("%s", #token); \ - return token +#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token #line 713 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -2797,124 +738,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t -{ - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char *yy_last_accepting_cpos; + { - int yylineno_r; - int yy_flex_debug_r; + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; - YYSTYPE *yylval_r; + int yylineno_r; + int yy_flex_debug_r; - YYLTYPE *yylloc_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; -}; /* end struct yyguts_t */ + YYSTYPE * yylval_r; -static int yy_init_globals(yyscan_t yyscanner); + YYLTYPE * yylloc_r; -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -#define yylval yyg->yylval_r + }; /* end struct yyguts_t */ -#define yylloc yyg->yylloc_r +static int yy_init_globals ( yyscan_t yyscanner ); -int yylex_init(yyscan_t *scanner); + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner); +static int yyinput ( yyscan_t yyscanner ); #else -static int input(yyscan_t yyscanner); +static int input ( yyscan_t yyscanner ); #endif #endif @@ -2934,38 +875,42 @@ static int input(yyscan_t yyscanner); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - yy_size_t n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -2984,7 +929,7 @@ static int input(yyscan_t yyscanner); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -2995,9 +940,11 @@ static int input(yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -3009,534 +956,619 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP YY_USER_ACTION +#define YY_RULE_SETUP \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if (!yyg->yy_init) { - yyg->yy_init = 1; + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!yyg->yy_start) - yyg->yy_start = 1; /* first start state */ + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_load_buffer_state(yyscanner); - } + yy_load_buffer_state( yyscanner ); + } - { + { #line 75 "lex_sql.l" + #line 1008 "lex_sql.cpp" - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 219) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_base[yy_current_state] != 593); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - if (yy_act == 0) { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - - case 1: YY_RULE_SETUP + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 219 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 593 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 77 "lex_sql.l" - // ignore whitespace - YY_BREAK - case 2: - /* rule 2 can match eol */ - YY_RULE_SETUP +// ignore whitespace + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP #line 78 "lex_sql.l" - ; - YY_BREAK - case 3: YY_RULE_SETUP +; + YY_BREAK +case 3: +YY_RULE_SETUP #line 80 "lex_sql.l" - yylval->number = atoi(yytext); - RETURN_TOKEN(NUMBER); - YY_BREAK - case 4: YY_RULE_SETUP +yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); + YY_BREAK +case 4: +YY_RULE_SETUP #line 81 "lex_sql.l" - yylval->floats = (float)(atof(yytext)); - RETURN_TOKEN(FLOAT); - YY_BREAK - case 5: YY_RULE_SETUP +yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); + YY_BREAK +case 5: +YY_RULE_SETUP #line 83 "lex_sql.l" - RETURN_TOKEN(SEMICOLON); - YY_BREAK - case 6: YY_RULE_SETUP +RETURN_TOKEN(SEMICOLON); + YY_BREAK +case 6: +YY_RULE_SETUP #line 84 "lex_sql.l" - RETURN_TOKEN(DOT); - YY_BREAK - case 7: YY_RULE_SETUP +RETURN_TOKEN(DOT); + YY_BREAK +case 7: +YY_RULE_SETUP #line 85 "lex_sql.l" - RETURN_TOKEN(EXIT); - YY_BREAK - case 8: YY_RULE_SETUP +RETURN_TOKEN(EXIT); + YY_BREAK +case 8: +YY_RULE_SETUP #line 86 "lex_sql.l" - RETURN_TOKEN(HELP); - YY_BREAK - case 9: YY_RULE_SETUP +RETURN_TOKEN(HELP); + YY_BREAK +case 9: +YY_RULE_SETUP #line 87 "lex_sql.l" - RETURN_TOKEN(DESC); - YY_BREAK - case 10: YY_RULE_SETUP +RETURN_TOKEN(DESC); + YY_BREAK +case 10: +YY_RULE_SETUP #line 88 "lex_sql.l" - RETURN_TOKEN(CREATE); - YY_BREAK - case 11: YY_RULE_SETUP +RETURN_TOKEN(CREATE); + YY_BREAK +case 11: +YY_RULE_SETUP #line 89 "lex_sql.l" - RETURN_TOKEN(DROP); - YY_BREAK - case 12: YY_RULE_SETUP +RETURN_TOKEN(DROP); + YY_BREAK +case 12: +YY_RULE_SETUP #line 90 "lex_sql.l" - RETURN_TOKEN(TABLE); - YY_BREAK - case 13: YY_RULE_SETUP +RETURN_TOKEN(TABLE); + YY_BREAK +case 13: +YY_RULE_SETUP #line 91 "lex_sql.l" - RETURN_TOKEN(TABLES); - YY_BREAK - case 14: YY_RULE_SETUP +RETURN_TOKEN(TABLES); + YY_BREAK +case 14: +YY_RULE_SETUP #line 92 "lex_sql.l" - RETURN_TOKEN(INDEX); - YY_BREAK - case 15: YY_RULE_SETUP +RETURN_TOKEN(INDEX); + YY_BREAK +case 15: +YY_RULE_SETUP #line 93 "lex_sql.l" - RETURN_TOKEN(ON); - YY_BREAK - case 16: YY_RULE_SETUP +RETURN_TOKEN(ON); + YY_BREAK +case 16: +YY_RULE_SETUP #line 94 "lex_sql.l" - RETURN_TOKEN(SHOW); - YY_BREAK - case 17: YY_RULE_SETUP +RETURN_TOKEN(SHOW); + YY_BREAK +case 17: +YY_RULE_SETUP #line 95 "lex_sql.l" - RETURN_TOKEN(SYNC); - YY_BREAK - case 18: YY_RULE_SETUP +RETURN_TOKEN(SYNC); + YY_BREAK +case 18: +YY_RULE_SETUP #line 96 "lex_sql.l" - RETURN_TOKEN(SELECT); - YY_BREAK - case 19: YY_RULE_SETUP +RETURN_TOKEN(SELECT); + YY_BREAK +case 19: +YY_RULE_SETUP #line 97 "lex_sql.l" - RETURN_TOKEN(CALC); - YY_BREAK - case 20: YY_RULE_SETUP +RETURN_TOKEN(CALC); + YY_BREAK +case 20: +YY_RULE_SETUP #line 98 "lex_sql.l" - RETURN_TOKEN(FROM); - YY_BREAK - case 21: YY_RULE_SETUP +RETURN_TOKEN(FROM); + YY_BREAK +case 21: +YY_RULE_SETUP #line 99 "lex_sql.l" - RETURN_TOKEN(WHERE); - YY_BREAK - case 22: YY_RULE_SETUP +RETURN_TOKEN(WHERE); + YY_BREAK +case 22: +YY_RULE_SETUP #line 100 "lex_sql.l" - RETURN_TOKEN(AND); - YY_BREAK - case 23: YY_RULE_SETUP +RETURN_TOKEN(AND); + YY_BREAK +case 23: +YY_RULE_SETUP #line 101 "lex_sql.l" - RETURN_TOKEN(OR); - YY_BREAK - case 24: YY_RULE_SETUP +RETURN_TOKEN(OR); + YY_BREAK +case 24: +YY_RULE_SETUP #line 102 "lex_sql.l" - RETURN_TOKEN(INSERT); - YY_BREAK - case 25: YY_RULE_SETUP +RETURN_TOKEN(INSERT); + YY_BREAK +case 25: +YY_RULE_SETUP #line 103 "lex_sql.l" - RETURN_TOKEN(INTO); - YY_BREAK - case 26: YY_RULE_SETUP +RETURN_TOKEN(INTO); + YY_BREAK +case 26: +YY_RULE_SETUP #line 104 "lex_sql.l" - RETURN_TOKEN(VALUES); - YY_BREAK - case 27: YY_RULE_SETUP +RETURN_TOKEN(VALUES); + YY_BREAK +case 27: +YY_RULE_SETUP #line 105 "lex_sql.l" - RETURN_TOKEN(DELETE); - YY_BREAK - case 28: YY_RULE_SETUP +RETURN_TOKEN(DELETE); + YY_BREAK +case 28: +YY_RULE_SETUP #line 106 "lex_sql.l" - RETURN_TOKEN(UPDATE); - YY_BREAK - case 29: YY_RULE_SETUP +RETURN_TOKEN(UPDATE); + YY_BREAK +case 29: +YY_RULE_SETUP #line 107 "lex_sql.l" - RETURN_TOKEN(SET); - YY_BREAK - case 30: YY_RULE_SETUP +RETURN_TOKEN(SET); + YY_BREAK +case 30: +YY_RULE_SETUP #line 108 "lex_sql.l" - RETURN_TOKEN(TRX_BEGIN); - YY_BREAK - case 31: YY_RULE_SETUP +RETURN_TOKEN(TRX_BEGIN); + YY_BREAK +case 31: +YY_RULE_SETUP #line 109 "lex_sql.l" - RETURN_TOKEN(TRX_COMMIT); - YY_BREAK - case 32: YY_RULE_SETUP +RETURN_TOKEN(TRX_COMMIT); + YY_BREAK +case 32: +YY_RULE_SETUP #line 110 "lex_sql.l" - RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK - case 33: YY_RULE_SETUP +RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK +case 33: +YY_RULE_SETUP #line 111 "lex_sql.l" - RETURN_TOKEN(INT_T); - YY_BREAK - case 34: YY_RULE_SETUP +RETURN_TOKEN(INT_T); + YY_BREAK +case 34: +YY_RULE_SETUP #line 112 "lex_sql.l" - RETURN_TOKEN(STRING_T); - YY_BREAK - case 35: YY_RULE_SETUP +RETURN_TOKEN(STRING_T); + YY_BREAK +case 35: +YY_RULE_SETUP #line 113 "lex_sql.l" - RETURN_TOKEN(FLOAT_T); - YY_BREAK - case 36: YY_RULE_SETUP +RETURN_TOKEN(FLOAT_T); + YY_BREAK +case 36: +YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK - case 37: YY_RULE_SETUP +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK +case 37: +YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(UNIQUE); - YY_BREAK - case 38: YY_RULE_SETUP +RETURN_TOKEN(UNIQUE); + YY_BREAK +case 38: +YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(NULL_T); - YY_BREAK - case 39: YY_RULE_SETUP +RETURN_TOKEN(NULL_T); + YY_BREAK +case 39: +YY_RULE_SETUP #line 117 "lex_sql.l" - RETURN_TOKEN(NULLABLE); - YY_BREAK - case 40: YY_RULE_SETUP +RETURN_TOKEN(NULLABLE); + YY_BREAK +case 40: +YY_RULE_SETUP #line 118 "lex_sql.l" - RETURN_TOKEN(LOAD); - YY_BREAK - case 41: YY_RULE_SETUP +RETURN_TOKEN(LOAD); + YY_BREAK +case 41: +YY_RULE_SETUP #line 119 "lex_sql.l" - RETURN_TOKEN(DATA); - YY_BREAK - case 42: YY_RULE_SETUP +RETURN_TOKEN(DATA); + YY_BREAK +case 42: +YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(INFILE); - YY_BREAK - case 43: YY_RULE_SETUP +RETURN_TOKEN(INFILE); + YY_BREAK +case 43: +YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); - YY_BREAK - case 44: YY_RULE_SETUP +RETURN_TOKEN(EXPLAIN); + YY_BREAK +case 44: +YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(GROUP); - YY_BREAK - case 45: YY_RULE_SETUP +RETURN_TOKEN(GROUP); + YY_BREAK +case 45: +YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(ORDER); - YY_BREAK - case 46: YY_RULE_SETUP +RETURN_TOKEN(ORDER); + YY_BREAK +case 46: +YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(BY); - YY_BREAK - case 47: YY_RULE_SETUP +RETURN_TOKEN(BY); + YY_BREAK +case 47: +YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(AS); - YY_BREAK - case 48: YY_RULE_SETUP +RETURN_TOKEN(AS); + YY_BREAK +case 48: +YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(ASC); - YY_BREAK - case 49: YY_RULE_SETUP +RETURN_TOKEN(ASC); + YY_BREAK +case 49: +YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(IN); - YY_BREAK - case 50: YY_RULE_SETUP +RETURN_TOKEN(IN); + YY_BREAK +case 50: +YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(EXISTS); - YY_BREAK - case 51: YY_RULE_SETUP +RETURN_TOKEN(EXISTS); + YY_BREAK +case 51: +YY_RULE_SETUP #line 129 "lex_sql.l" - RETURN_TOKEN(STORAGE); - YY_BREAK - case 52: YY_RULE_SETUP +RETURN_TOKEN(STORAGE); + YY_BREAK +case 52: +YY_RULE_SETUP #line 130 "lex_sql.l" - RETURN_TOKEN(FORMAT); - YY_BREAK - case 53: YY_RULE_SETUP +RETURN_TOKEN(FORMAT); + YY_BREAK +case 53: +YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(INNER); - YY_BREAK - case 54: YY_RULE_SETUP +RETURN_TOKEN(INNER); + YY_BREAK +case 54: +YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(JOIN); - YY_BREAK - case 55: YY_RULE_SETUP +RETURN_TOKEN(JOIN); + YY_BREAK +case 55: +YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(LBRACE); - YY_BREAK - case 56: YY_RULE_SETUP +RETURN_TOKEN(LBRACE); + YY_BREAK +case 56: +YY_RULE_SETUP #line 134 "lex_sql.l" - RETURN_TOKEN(RBRACE); - YY_BREAK - case 57: YY_RULE_SETUP +RETURN_TOKEN(RBRACE); + YY_BREAK +case 57: +YY_RULE_SETUP #line 136 "lex_sql.l" - RETURN_TOKEN(COMMA); - YY_BREAK - case 58: YY_RULE_SETUP +RETURN_TOKEN(COMMA); + YY_BREAK +case 58: +YY_RULE_SETUP #line 137 "lex_sql.l" - RETURN_TOKEN(EQ); - YY_BREAK - case 59: YY_RULE_SETUP +RETURN_TOKEN(EQ); + YY_BREAK +case 59: +YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(LE); - YY_BREAK - case 60: YY_RULE_SETUP +RETURN_TOKEN(LE); + YY_BREAK +case 60: +YY_RULE_SETUP #line 139 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 61: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 61: +YY_RULE_SETUP #line 140 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 62: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 62: +YY_RULE_SETUP #line 141 "lex_sql.l" - RETURN_TOKEN(LT); - YY_BREAK - case 63: YY_RULE_SETUP +RETURN_TOKEN(LT); + YY_BREAK +case 63: +YY_RULE_SETUP #line 142 "lex_sql.l" - RETURN_TOKEN(GE); - YY_BREAK - case 64: YY_RULE_SETUP +RETURN_TOKEN(GE); + YY_BREAK +case 64: +YY_RULE_SETUP #line 143 "lex_sql.l" - RETURN_TOKEN(GT); - YY_BREAK - case 65: YY_RULE_SETUP +RETURN_TOKEN(GT); + YY_BREAK +case 65: +YY_RULE_SETUP #line 144 "lex_sql.l" - RETURN_TOKEN(NOT); - YY_BREAK - case 66: YY_RULE_SETUP +RETURN_TOKEN(NOT); + YY_BREAK +case 66: +YY_RULE_SETUP #line 145 "lex_sql.l" - RETURN_TOKEN(IS); - YY_BREAK - case 67: YY_RULE_SETUP +RETURN_TOKEN(IS); + YY_BREAK +case 67: +YY_RULE_SETUP #line 146 "lex_sql.l" - RETURN_TOKEN(LIKE); - YY_BREAK - case 68: YY_RULE_SETUP +RETURN_TOKEN(LIKE); + YY_BREAK +case 68: +YY_RULE_SETUP #line 148 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(ID); - YY_BREAK - case 69: +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK +case 69: #line 151 "lex_sql.l" - case 70: +case 70: #line 152 "lex_sql.l" - case 71: +case 71: #line 153 "lex_sql.l" - case 72: YY_RULE_SETUP +case 72: +YY_RULE_SETUP #line 153 "lex_sql.l" - { - return yytext[0]; - } - YY_BREAK - case 73: - /* rule 73 can match eol */ - YY_RULE_SETUP +{ return yytext[0]; } + YY_BREAK +case 73: +/* rule 73 can match eol */ +YY_RULE_SETUP #line 154 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 74: - /* rule 74 can match eol */ - YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 74: +/* rule 74 can match eol */ +YY_RULE_SETUP #line 155 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 75: YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 75: +YY_RULE_SETUP #line 157 "lex_sql.l" - LOG_DEBUG("Unknown character [%c]",yytext[0]); - return yytext[0]; - YY_BREAK - case 76: YY_RULE_SETUP +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 76: +YY_RULE_SETUP #line 158 "lex_sql.l" - ECHO; - YY_BREAK +ECHO; + YY_BREAK #line 1439 "lex_sql.cpp" - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(STR): yyterminate(); - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if (yywrap(yyscanner)) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(STR): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3546,149 +1578,171 @@ YY_DECL * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(yyscan_t yyscanner) +static int yy_get_next_buffer (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else { - yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - yy_size_t new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if (yyg->yy_n_chars == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin, yyscanner); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = - (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(yyscan_t yyscanner) + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_current_state = yyg->yy_start; - - for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 219) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 219 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -3696,27 +1750,29 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 219) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 218); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 219 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 218); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -3725,133 +1781,141 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner) + static int yyinput (yyscan_t yyscanner) #else -static int input(yyscan_t yyscanner) + static int input (yyscan_t yyscanner) #endif { - int c; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin, yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap(yyscanner)) - return 0; - - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file, yyscan_t yyscanner) + void yyrestart (FILE * input_file , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); - yy_load_buffer_state(yyscanner); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(yyscanner); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state(yyscan_t yyscanner) +static void yy_load_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -3860,105 +1924,105 @@ static void yy_load_buffer_state(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file, yyscanner); + yy_init_buffer( b, file , yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!b) - return; + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf, yyscanner); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *)b, yyscanner); + yyfree( (void *) b , yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_flush_buffer(b, yyscanner); + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - b->yy_input_file = file; - b->yy_fill_buffer = 1; + yy_flush_buffer( b , yyscanner); - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!b) - return; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(yyscanner); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -3967,95 +2031,99 @@ void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state(yyscan_t yyscanner) +void yypop_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(yyscan_t yyscanner) +static void yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = - (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( - yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -4064,31 +2132,33 @@ static void yyensure_buffer_stack(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b, yyscanner); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -4099,10 +2169,10 @@ YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - - return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -4112,175 +2182,177 @@ YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n, yyscanner); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n, yyscanner); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyextra; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno(yyscan_t yyscanner) +int yyget_lineno (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column(yyscan_t yyscanner) +int yyget_column (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!YY_CURRENT_BUFFER) - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yycolumn; + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in(yyscan_t yyscanner) +FILE *yyget_in (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyin; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out(yyscan_t yyscanner) +FILE *yyget_out (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyout; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng(yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyleng; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text(yyscan_t yyscanner) +char *yyget_text (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yytext; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyextra = user_defined; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno(int _line_number, yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_lineno called with no buffer"); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column(int _column_no, yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_column called with no buffer"); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yycolumn = _column_no; + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -4289,80 +2361,80 @@ void yyset_column(int _column_no, yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str, yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyin = _in_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; } -void yyset_out(FILE *_out_str, yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyout = _out_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; } -int yyget_debug(yyscan_t yyscanner) +int yyget_debug (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yy_flex_debug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void yyset_debug(int _bdebug, yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flex_debug = _bdebug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ -YYSTYPE *yyget_lval(yyscan_t yyscanner) +YYSTYPE * yyget_lval (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylval; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc(yyscan_t yyscanner) +YYLTYPE *yyget_lloc (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; } - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylloc = yylloc_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t *ptr_yy_globals) +int yylex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -4372,94 +2444,94 @@ int yylex_init(yyscan_t *ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra(yy_user_defined, &dummy_yyguts); + yyset_extra (yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - yyset_extra(yy_user_defined, *ptr_yy_globals); + yyset_extra (yy_user_defined, *ptr_yy_globals); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } -static int yy_init_globals(yyscan_t yyscanner) +static int yy_init_globals (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(yyscan_t yyscanner) +int yylex_destroy (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack, yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack, yyscanner); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals(yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree(yyscanner, yyscanner); - yyscanner = NULL; - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; } /* @@ -4467,59 +2539,63 @@ int yylex_destroy(yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s, yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - int n; - for (n = 0; s[n]; ++n) - ; + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size, yyscan_t yyscanner) +void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr, yyscan_t yyscanner) +void yyfree (void * ptr , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - free((char *)ptr); /* see yyrealloc() for (char *) cast */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 158 "lex_sql.l" -void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } + +void scan_string(const char *str, yyscan_t scanner) { + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); +} + diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index df1e3748..6e1826e1 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,21 +12,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -79,62 +81,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -155,7 +157,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -195,72 +197,73 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -}; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -283,69 +286,69 @@ void yyfree(void *, yyscan_t yyscanner); #define YY_EXTRA_TYPE void * #endif -int yylex_init(yyscan_t *scanner); +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -373,9 +376,11 @@ static int yy_flex_strlen(const char *, yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -539,6 +544,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #line 158 "lex_sql.l" + #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index a91e6d9a..0a2567f0 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,9 +63,13 @@ /* Pull parsers. */ #define YYPULL 1 + + + /* First part of user prologue. */ #line 2 "yacc_sql.y" + #include #include #include @@ -88,190 +92,199 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression( - ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, + Expression *left, + Expression *right, + const char *sql_string, + YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundAggregateExpr *create_aggregate_expression( - const char *aggregate_name, Expression *child, const char *sql_string, YYLTYPE *llocp) +UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, + std::vector> child, + const char *sql_string, + YYLTYPE *llocp) { - UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, child); + UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } + #line 125 "yacc_sql.cpp" -#ifndef YY_CAST -#ifdef __cplusplus -#define YY_CAST(Type, Val) static_cast(Val) -#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) -#else -#define YY_CAST(Type, Val) ((Type)(Val)) -#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) -#endif -#endif -#ifndef YY_NULLPTR -#if defined __cplusplus -#if 201103L <= __cplusplus -#define YY_NULLPTR nullptr -#else -#define YY_NULLPTR 0 -#endif -#else -#define YY_NULLPTR ((void *)0) -#endif -#endif +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_ORDER = 11, /* ORDER */ - YYSYMBOL_TABLE = 12, /* TABLE */ - YYSYMBOL_TABLES = 13, /* TABLES */ - YYSYMBOL_INDEX = 14, /* INDEX */ - YYSYMBOL_CALC = 15, /* CALC */ - YYSYMBOL_SELECT = 16, /* SELECT */ - YYSYMBOL_DESC = 17, /* DESC */ - YYSYMBOL_SHOW = 18, /* SHOW */ - YYSYMBOL_SYNC = 19, /* SYNC */ - YYSYMBOL_INSERT = 20, /* INSERT */ - YYSYMBOL_DELETE = 21, /* DELETE */ - YYSYMBOL_UPDATE = 22, /* UPDATE */ - YYSYMBOL_LBRACE = 23, /* LBRACE */ - YYSYMBOL_RBRACE = 24, /* RBRACE */ - YYSYMBOL_COMMA = 25, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 29, /* INT_T */ - YYSYMBOL_IN = 30, /* IN */ - YYSYMBOL_STRING_T = 31, /* STRING_T */ - YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ - YYSYMBOL_DATE_T = 33, /* DATE_T */ - YYSYMBOL_NOT = 34, /* NOT */ - YYSYMBOL_UNIQUE = 35, /* UNIQUE */ - YYSYMBOL_NULL_T = 36, /* NULL_T */ - YYSYMBOL_NULLABLE = 37, /* NULLABLE */ - YYSYMBOL_HELP = 38, /* HELP */ - YYSYMBOL_EXIT = 39, /* EXIT */ - YYSYMBOL_DOT = 40, /* DOT */ - YYSYMBOL_INTO = 41, /* INTO */ - YYSYMBOL_VALUES = 42, /* VALUES */ - YYSYMBOL_FROM = 43, /* FROM */ - YYSYMBOL_WHERE = 44, /* WHERE */ - YYSYMBOL_AND = 45, /* AND */ - YYSYMBOL_OR = 46, /* OR */ - YYSYMBOL_SET = 47, /* SET */ - YYSYMBOL_ON = 48, /* ON */ - YYSYMBOL_LOAD = 49, /* LOAD */ - YYSYMBOL_DATA = 50, /* DATA */ - YYSYMBOL_INFILE = 51, /* INFILE */ - YYSYMBOL_EXPLAIN = 52, /* EXPLAIN */ - YYSYMBOL_STORAGE = 53, /* STORAGE */ - YYSYMBOL_FORMAT = 54, /* FORMAT */ - YYSYMBOL_INNER = 55, /* INNER */ - YYSYMBOL_JOIN = 56, /* JOIN */ - YYSYMBOL_EQ = 57, /* EQ */ - YYSYMBOL_LT = 58, /* LT */ - YYSYMBOL_GT = 59, /* GT */ - YYSYMBOL_LE = 60, /* LE */ - YYSYMBOL_GE = 61, /* GE */ - YYSYMBOL_NE = 62, /* NE */ - YYSYMBOL_LIKE = 63, /* LIKE */ - YYSYMBOL_IS = 64, /* IS */ - YYSYMBOL_NUMBER = 65, /* NUMBER */ - YYSYMBOL_FLOAT = 66, /* FLOAT */ - YYSYMBOL_ID = 67, /* ID */ - YYSYMBOL_SSS = 68, /* SSS */ - YYSYMBOL_69_ = 69, /* '+' */ - YYSYMBOL_70_ = 70, /* '-' */ - YYSYMBOL_71_ = 71, /* '*' */ - YYSYMBOL_72_ = 72, /* '/' */ - YYSYMBOL_UMINUS = 73, /* UMINUS */ - YYSYMBOL_YYACCEPT = 74, /* $accept */ - YYSYMBOL_commands = 75, /* commands */ - YYSYMBOL_command_wrapper = 76, /* command_wrapper */ - YYSYMBOL_exit_stmt = 77, /* exit_stmt */ - YYSYMBOL_help_stmt = 78, /* help_stmt */ - YYSYMBOL_sync_stmt = 79, /* sync_stmt */ - YYSYMBOL_begin_stmt = 80, /* begin_stmt */ - YYSYMBOL_commit_stmt = 81, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 82, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 83, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 84, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 85, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 86, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 87, /* create_index_stmt */ - YYSYMBOL_opt_unique = 88, /* opt_unique */ - YYSYMBOL_attr_list = 89, /* attr_list */ - YYSYMBOL_drop_index_stmt = 90, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 91, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 92, /* attr_def_list */ - YYSYMBOL_attr_def = 93, /* attr_def */ - YYSYMBOL_nullable_constraint = 94, /* nullable_constraint */ - YYSYMBOL_number = 95, /* number */ - YYSYMBOL_type = 96, /* type */ - YYSYMBOL_insert_stmt = 97, /* insert_stmt */ - YYSYMBOL_values_list = 98, /* values_list */ - YYSYMBOL_value_list = 99, /* value_list */ - YYSYMBOL_value = 100, /* value */ - YYSYMBOL_storage_format = 101, /* storage_format */ - YYSYMBOL_delete_stmt = 102, /* delete_stmt */ - YYSYMBOL_update_stmt = 103, /* update_stmt */ - YYSYMBOL_setClauses = 104, /* setClauses */ - YYSYMBOL_setClause = 105, /* setClause */ - YYSYMBOL_select_stmt = 106, /* select_stmt */ - YYSYMBOL_calc_stmt = 107, /* calc_stmt */ - YYSYMBOL_expression_list = 108, /* expression_list */ - YYSYMBOL_expression = 109, /* expression */ - YYSYMBOL_alias = 110, /* alias */ - YYSYMBOL_aggr_func_expr = 111, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 112, /* sub_query_expr */ - YYSYMBOL_rel_attr = 113, /* rel_attr */ - YYSYMBOL_relation = 114, /* relation */ - YYSYMBOL_rel_list = 115, /* rel_list */ - YYSYMBOL_joinClauses = 116, /* joinClauses */ - YYSYMBOL_where = 117, /* where */ - YYSYMBOL_condition = 118, /* condition */ - YYSYMBOL_comp_op = 119, /* comp_op */ - YYSYMBOL_opt_order_by = 120, /* opt_order_by */ - YYSYMBOL_sort_list = 121, /* sort_list */ - YYSYMBOL_sort_unit = 122, /* sort_unit */ - YYSYMBOL_group_by = 123, /* group_by */ - YYSYMBOL_load_data_stmt = 124, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 125, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 126, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 127 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_ORDER = 11, /* ORDER */ + YYSYMBOL_TABLE = 12, /* TABLE */ + YYSYMBOL_TABLES = 13, /* TABLES */ + YYSYMBOL_INDEX = 14, /* INDEX */ + YYSYMBOL_CALC = 15, /* CALC */ + YYSYMBOL_SELECT = 16, /* SELECT */ + YYSYMBOL_DESC = 17, /* DESC */ + YYSYMBOL_SHOW = 18, /* SHOW */ + YYSYMBOL_SYNC = 19, /* SYNC */ + YYSYMBOL_INSERT = 20, /* INSERT */ + YYSYMBOL_DELETE = 21, /* DELETE */ + YYSYMBOL_UPDATE = 22, /* UPDATE */ + YYSYMBOL_LBRACE = 23, /* LBRACE */ + YYSYMBOL_RBRACE = 24, /* RBRACE */ + YYSYMBOL_COMMA = 25, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 29, /* INT_T */ + YYSYMBOL_IN = 30, /* IN */ + YYSYMBOL_STRING_T = 31, /* STRING_T */ + YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ + YYSYMBOL_DATE_T = 33, /* DATE_T */ + YYSYMBOL_NOT = 34, /* NOT */ + YYSYMBOL_UNIQUE = 35, /* UNIQUE */ + YYSYMBOL_NULL_T = 36, /* NULL_T */ + YYSYMBOL_NULLABLE = 37, /* NULLABLE */ + YYSYMBOL_HELP = 38, /* HELP */ + YYSYMBOL_EXIT = 39, /* EXIT */ + YYSYMBOL_DOT = 40, /* DOT */ + YYSYMBOL_INTO = 41, /* INTO */ + YYSYMBOL_VALUES = 42, /* VALUES */ + YYSYMBOL_FROM = 43, /* FROM */ + YYSYMBOL_WHERE = 44, /* WHERE */ + YYSYMBOL_AND = 45, /* AND */ + YYSYMBOL_OR = 46, /* OR */ + YYSYMBOL_SET = 47, /* SET */ + YYSYMBOL_ON = 48, /* ON */ + YYSYMBOL_LOAD = 49, /* LOAD */ + YYSYMBOL_DATA = 50, /* DATA */ + YYSYMBOL_INFILE = 51, /* INFILE */ + YYSYMBOL_EXPLAIN = 52, /* EXPLAIN */ + YYSYMBOL_STORAGE = 53, /* STORAGE */ + YYSYMBOL_FORMAT = 54, /* FORMAT */ + YYSYMBOL_INNER = 55, /* INNER */ + YYSYMBOL_JOIN = 56, /* JOIN */ + YYSYMBOL_EQ = 57, /* EQ */ + YYSYMBOL_LT = 58, /* LT */ + YYSYMBOL_GT = 59, /* GT */ + YYSYMBOL_LE = 60, /* LE */ + YYSYMBOL_GE = 61, /* GE */ + YYSYMBOL_NE = 62, /* NE */ + YYSYMBOL_LIKE = 63, /* LIKE */ + YYSYMBOL_IS = 64, /* IS */ + YYSYMBOL_NUMBER = 65, /* NUMBER */ + YYSYMBOL_FLOAT = 66, /* FLOAT */ + YYSYMBOL_ID = 67, /* ID */ + YYSYMBOL_SSS = 68, /* SSS */ + YYSYMBOL_69_ = 69, /* '+' */ + YYSYMBOL_70_ = 70, /* '-' */ + YYSYMBOL_71_ = 71, /* '*' */ + YYSYMBOL_72_ = 72, /* '/' */ + YYSYMBOL_UMINUS = 73, /* UMINUS */ + YYSYMBOL_YYACCEPT = 74, /* $accept */ + YYSYMBOL_commands = 75, /* commands */ + YYSYMBOL_command_wrapper = 76, /* command_wrapper */ + YYSYMBOL_exit_stmt = 77, /* exit_stmt */ + YYSYMBOL_help_stmt = 78, /* help_stmt */ + YYSYMBOL_sync_stmt = 79, /* sync_stmt */ + YYSYMBOL_begin_stmt = 80, /* begin_stmt */ + YYSYMBOL_commit_stmt = 81, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 82, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 83, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 84, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 85, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 86, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 87, /* create_index_stmt */ + YYSYMBOL_opt_unique = 88, /* opt_unique */ + YYSYMBOL_attr_list = 89, /* attr_list */ + YYSYMBOL_drop_index_stmt = 90, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 91, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 92, /* attr_def_list */ + YYSYMBOL_attr_def = 93, /* attr_def */ + YYSYMBOL_nullable_constraint = 94, /* nullable_constraint */ + YYSYMBOL_number = 95, /* number */ + YYSYMBOL_type = 96, /* type */ + YYSYMBOL_insert_stmt = 97, /* insert_stmt */ + YYSYMBOL_values_list = 98, /* values_list */ + YYSYMBOL_value_list = 99, /* value_list */ + YYSYMBOL_value = 100, /* value */ + YYSYMBOL_storage_format = 101, /* storage_format */ + YYSYMBOL_delete_stmt = 102, /* delete_stmt */ + YYSYMBOL_update_stmt = 103, /* update_stmt */ + YYSYMBOL_setClauses = 104, /* setClauses */ + YYSYMBOL_setClause = 105, /* setClause */ + YYSYMBOL_select_stmt = 106, /* select_stmt */ + YYSYMBOL_calc_stmt = 107, /* calc_stmt */ + YYSYMBOL_expression_list = 108, /* expression_list */ + YYSYMBOL_expression = 109, /* expression */ + YYSYMBOL_alias = 110, /* alias */ + YYSYMBOL_aggr_func_expr = 111, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 112, /* sub_query_expr */ + YYSYMBOL_rel_attr = 113, /* rel_attr */ + YYSYMBOL_relation = 114, /* relation */ + YYSYMBOL_rel_list = 115, /* rel_list */ + YYSYMBOL_joinClauses = 116, /* joinClauses */ + YYSYMBOL_where = 117, /* where */ + YYSYMBOL_condition = 118, /* condition */ + YYSYMBOL_comp_op = 119, /* comp_op */ + YYSYMBOL_opt_order_by = 120, /* opt_order_by */ + YYSYMBOL_sort_list = 121, /* sort_list */ + YYSYMBOL_sort_unit = 122, /* sort_unit */ + YYSYMBOL_group_by = 123, /* group_by */ + YYSYMBOL_load_data_stmt = 124, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 125, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 126, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 127 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; + + + #ifdef short -#undef short +# undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -279,11 +292,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -#include /* INFRINGES ON USER NAME SPACE */ -#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_STDINT_H -#endif +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -313,15 +326,16 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -#undef UINT_LEAST8_MAX -#undef UINT_LEAST16_MAX -#define UINT_LEAST8_MAX 255 -#define UINT_LEAST16_MAX 65535 +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -331,7 +345,8 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -340,38 +355,42 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -#define YYPTRDIFF_T __PTRDIFF_TYPE__ -#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -#elif defined PTRDIFF_MAX -#ifndef ptrdiff_t -#include /* INFRINGES ON USER NAME SPACE */ -#endif -#define YYPTRDIFF_T ptrdiff_t -#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -#else -#define YYPTRDIFF_T long -#define YYPTRDIFF_MAXIMUM LONG_MAX -#endif +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T -#ifdef __SIZE_TYPE__ -#define YYSIZE_T __SIZE_TYPE__ -#elif defined size_t -#define YYSIZE_T size_t -#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YYSIZE_T size_t -#else -#define YYSIZE_T unsigned -#endif +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -380,2392 +399,578 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -#if defined YYENABLE_NLS && YYENABLE_NLS -#if ENABLE_NLS -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_(Msgid) dgettext("bison-runtime", Msgid) -#endif -#endif -#ifndef YY_ -#define YY_(Msgid) Msgid -#endif +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif #endif + #ifndef YY_ATTRIBUTE_PURE -#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) -#else -#define YY_ATTRIBUTE_PURE -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define YY_ATTRIBUTE_UNUSED -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if !defined lint || defined __GNUC__ -#define YY_USE(E) ((void)(E)) +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) #else -#define YY_USE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") -#else -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -#endif -#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#define YY_INITIAL_VALUE(Value) Value +# define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_END +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -#define YY_INITIAL_VALUE(Value) /* Nothing. */ +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ -#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") -#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_END +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END #endif -#define YY_ASSERT(E) ((void)(0 && (E))) + +#define YY_ASSERT(E) ((void) (0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -#ifdef YYSTACK_USE_ALLOCA -#if YYSTACK_USE_ALLOCA -#ifdef __GNUC__ -#define YYSTACK_ALLOC __builtin_alloca -#elif defined __BUILTIN_VA_ARG_INCR -#include /* INFRINGES ON USER NAME SPACE */ -#elif defined _AIX -#define YYSTACK_ALLOC __alloca -#elif defined _MSC_VER -#include /* INFRINGES ON USER NAME SPACE */ -#define alloca _alloca -#else -#define YYSTACK_ALLOC alloca -#if !defined _ALLOCA_H && !defined EXIT_SUCCESS -#include /* INFRINGES ON USER NAME SPACE */ -/* Use EXIT_SUCCESS as a witness for stdlib.h. */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#endif -#endif -#endif - -#ifdef YYSTACK_ALLOC -/* Pacify GCC's 'empty if-body' warning. */ -#define YYSTACK_FREE(Ptr) \ - do { /* empty */ \ - ; \ - } while (0) -#ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -#endif -#else -#define YYSTACK_ALLOC YYMALLOC -#define YYSTACK_FREE YYFREE -#ifndef YYSTACK_ALLOC_MAXIMUM -#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -#endif -#if (defined __cplusplus && !defined EXIT_SUCCESS && \ - !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) -#include /* INFRINGES ON USER NAME SPACE */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef YYMALLOC -#define YYMALLOC malloc -#if !defined malloc && !defined EXIT_SUCCESS -void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#ifndef YYFREE -#define YYFREE free -#if !defined free && !defined EXIT_SUCCESS -void free(void *); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#endif +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif #endif /* 1 */ -#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ - defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -#define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) -#define YYCOPY_NEEDED 1 +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF(*yyptr); \ - } while (0) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -#ifndef YYCOPY -#if defined __GNUC__ && 1 < __GNUC__ -#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) -#else -#define YYCOPY(Dst, Src, Count) \ - do { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } while (0) -#endif -#endif +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 71 +#define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 230 +#define YYLAST 217 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 74 +#define YYNTOKENS 74 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 54 +#define YYNNTS 54 /* YYNRULES -- Number of rules. */ -#define YYNRULES 128 +#define YYNRULES 127 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 228 +#define YYNSTATES 227 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 324 +#define YYMAXUTOK 324 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = {0, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 71, - 69, - 2, - 70, - 2, - 72, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 73}; +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 71, 69, 2, 70, 2, 72, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 73 +}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = {0, - 226, - 226, - 234, - 235, - 236, - 237, - 238, - 239, - 240, - 241, - 242, - 243, - 244, - 245, - 246, - 247, - 248, - 249, - 250, - 251, - 252, - 253, - 254, - 258, - 264, - 269, - 275, - 281, - 287, - 293, - 300, - 306, - 314, - 324, - 339, - 340, - 344, - 350, - 359, - 369, - 393, - 396, - 409, - 421, - 446, - 450, - 454, - 459, - 465, - 468, - 469, - 470, - 471, - 475, - 488, - 494, - 501, - 507, - 515, - 519, - 523, - 529, - 536, - 539, - 546, - 558, - 572, - 578, - 586, - 596, - 625, - 658, - 667, - 676, - 692, - 695, - 698, - 701, - 704, - 713, - 716, - 721, - 727, - 730, - 733, - 740, - 743, - 746, - 751, - 759, - 766, - 773, - 778, - 788, - 794, - 804, - 821, - 828, - 840, - 843, - 849, - 853, - 857, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 880, - 883, - 891, - 896, - 904, - 910, - 916, - 926, - 931, - 944, - 952, - 962, - 963}; +static const yytype_int16 yyrline[] = +{ + 0, 226, 226, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 258, 264, 269, 275, 281, 287, + 293, 300, 306, 314, 324, 339, 340, 344, 350, 359, + 369, 393, 396, 409, 421, 446, 450, 454, 459, 465, + 468, 469, 470, 471, 475, 488, 494, 501, 507, 515, + 519, 523, 529, 536, 539, 546, 558, 572, 578, 586, + 596, 625, 658, 667, 676, 692, 695, 698, 701, 704, + 713, 716, 721, 727, 730, 733, 740, 743, 746, 751, + 758, 765, 770, 780, 786, 796, 813, 820, 832, 835, + 841, 845, 849, 856, 857, 858, 859, 860, 861, 862, + 863, 864, 865, 866, 867, 872, 875, 883, 888, 896, + 902, 908, 918, 923, 936, 944, 954, 955 +}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = {"\"end of file\"", - "error", - "\"invalid token\"", - "SEMICOLON", - "AS", - "ASC", - "BY", - "CREATE", - "DROP", - "EXISTS", - "GROUP", - "ORDER", - "TABLE", - "TABLES", - "INDEX", - "CALC", - "SELECT", - "DESC", - "SHOW", - "SYNC", - "INSERT", - "DELETE", - "UPDATE", - "LBRACE", - "RBRACE", - "COMMA", - "TRX_BEGIN", - "TRX_COMMIT", - "TRX_ROLLBACK", - "INT_T", - "IN", - "STRING_T", - "FLOAT_T", - "DATE_T", - "NOT", - "UNIQUE", - "NULL_T", - "NULLABLE", - "HELP", - "EXIT", - "DOT", - "INTO", - "VALUES", - "FROM", - "WHERE", - "AND", - "OR", - "SET", - "ON", - "LOAD", - "DATA", - "INFILE", - "EXPLAIN", - "STORAGE", - "FORMAT", - "INNER", - "JOIN", - "EQ", - "LT", - "GT", - "LE", - "GE", - "NE", - "LIKE", - "IS", - "NUMBER", - "FLOAT", - "ID", - "SSS", - "'+'", - "'-'", - "'*'", - "'/'", - "UMINUS", - "$accept", - "commands", - "command_wrapper", - "exit_stmt", - "help_stmt", - "sync_stmt", - "begin_stmt", - "commit_stmt", - "rollback_stmt", - "drop_table_stmt", - "show_tables_stmt", - "desc_table_stmt", - "show_index_stmt", - "create_index_stmt", - "opt_unique", - "attr_list", - "drop_index_stmt", - "create_table_stmt", - "attr_def_list", - "attr_def", - "nullable_constraint", - "number", - "type", - "insert_stmt", - "values_list", - "value_list", - "value", - "storage_format", - "delete_stmt", - "update_stmt", - "setClauses", - "setClause", - "select_stmt", - "calc_stmt", - "expression_list", - "expression", - "alias", - "aggr_func_expr", - "sub_query_expr", - "rel_attr", - "relation", - "rel_list", - "joinClauses", - "where", - "condition", - "comp_op", - "opt_order_by", - "sort_list", - "sort_unit", - "group_by", - "load_data_stmt", - "explain_stmt", - "set_variable_stmt", - "opt_semicolon", - YY_NULLPTR}; - -static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "ORDER", "TABLE", + "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", + "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", + "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", + "DATE_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", "EXIT", "DOT", + "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", "ON", "LOAD", + "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", "JOIN", "EQ", + "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", + "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", + "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", + "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", + "desc_table_stmt", "show_index_stmt", "create_index_stmt", "opt_unique", + "attr_list", "drop_index_stmt", "create_table_stmt", "attr_def_list", + "attr_def", "nullable_constraint", "number", "type", "insert_stmt", + "values_list", "value_list", "value", "storage_format", "delete_stmt", + "update_stmt", "setClauses", "setClause", "select_stmt", "calc_stmt", + "expression_list", "expression", "alias", "aggr_func_expr", + "sub_query_expr", "rel_attr", "relation", "rel_list", "joinClauses", + "where", "condition", "comp_op", "opt_order_by", "sort_list", + "sort_unit", "group_by", "load_data_stmt", "explain_stmt", + "set_variable_stmt", "opt_semicolon", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -#define YYPACT_NINF (-155) +#define YYPACT_NINF (-154) -#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) 0 +#define yytable_value_is_error(Yyn) \ + 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {101, - 1, - 112, - 29, - 29, - -44, - 16, - -155, - -10, - -2, - 24, - -155, - -155, - -155, - -155, - -155, - 35, - 10, - 101, - 83, - 107, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - 58, - -155, - 116, - 64, - 66, - -9, - -155, - -155, - -155, - 5, - -155, - 29, - -155, - -155, - -155, - -1, - -155, - -155, - -155, - 91, - -155, - -155, - 92, - 70, - 71, - 98, - 89, - 96, - -155, - -155, - -155, - -155, - 129, - 87, - -155, - 108, - 131, - 133, - 14, - 100, - -155, - 109, - -155, - 29, - 29, - 29, - 29, - 143, - 110, - 110, - 127, - 114, - 111, - -19, - 113, - 115, - 132, - 117, - -155, - -155, - -155, - 151, - -155, - -155, - 15, - 15, - -155, - -155, - 29, - -155, - 0, - 114, - -155, - 156, - 29, - -155, - 126, - -4, - -155, - -155, - 144, - -7, - 161, - 120, - -155, - -155, - -155, - 134, - 163, - -155, - -19, - 164, - 102, - -27, - -19, - 111, - -155, - 179, - -155, - -155, - -155, - -155, - 67, - 115, - 168, - 170, - 110, - 110, - 183, - 81, - -155, - 172, - -155, - -21, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - 162, - 29, - 29, - 29, - -155, - -155, - 130, - 135, - 165, - -155, - -155, - -155, - 161, - 145, - 136, - 154, - 114, - 11, - -155, - 193, - -155, - -155, - -19, - -19, - -155, - -155, - -155, - 72, - -155, - 159, - -155, - -155, - 181, - -155, - -155, - 152, - -155, - 182, - 184, - 29, - -155, - 29, - -155, - 90, - 17, - 153, - 136, - -155, - 43, - -155, - 3, - -155, - 186, - -155, - -155, - 142, - -155, - 157, - -155, - -155, - 29, - -155, - 110, - -155, - -155}; +static const yytype_int16 yypact[] = +{ + 81, 1, 15, -14, -14, -41, 45, -154, -2, 2, + -24, -154, -154, -154, -154, -154, -6, 33, 81, 90, + 92, -154, -154, -154, -154, -154, -154, -154, -154, -154, + -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, + -154, -154, 47, -154, 101, 49, 58, 14, -154, -154, + -154, -9, -154, -14, -154, -154, -154, -1, -154, -154, + -154, 84, -154, -154, 96, 59, 68, 91, 94, 98, + -154, -154, -154, -154, 133, 93, -154, 109, 134, 135, + -14, 97, -154, 99, -154, -14, -14, -14, -14, 136, + 103, 103, 120, 119, 104, -19, 105, 107, 117, 108, + -154, -154, 143, -154, -154, -7, -7, -154, -154, -14, + -154, 0, 119, -154, 145, -14, -154, 115, 16, -154, + -154, 137, -8, 151, 110, -154, -154, -154, 123, 155, + -154, -19, 156, 83, 41, -19, 104, -154, 170, -154, + -154, -154, -154, 95, 107, 159, 161, 103, 103, 174, + 69, -154, 163, -154, -23, -154, -154, -154, -154, -154, + -154, -154, 153, -14, -14, -14, -154, -154, 121, 124, + 154, -154, -154, -154, 151, 138, 125, 146, 119, 11, + -154, 187, -154, -154, -19, -19, -154, -154, -154, 52, + -154, 150, -154, -154, 172, -154, -154, 144, -154, 175, + 173, -14, -154, -14, -154, 80, 100, 142, 125, -154, + -27, -154, 3, -154, 176, -154, -154, 139, -154, 147, + -154, -154, -14, -154, 103, -154, -154 +}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = {0, - 36, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 27, - 28, - 29, - 25, - 24, - 0, - 0, - 0, - 0, - 127, - 23, - 22, - 15, - 16, - 17, - 18, - 9, - 10, - 11, - 14, - 12, - 13, - 8, - 5, - 7, - 6, - 4, - 3, - 19, - 20, - 21, - 0, - 35, - 0, - 0, - 0, - 0, - 62, - 59, - 60, - 92, - 61, - 0, - 83, - 81, - 72, - 86, - 84, - 85, - 82, - 0, - 32, - 31, - 0, - 0, - 0, - 0, - 0, - 0, - 125, - 1, - 128, - 2, - 0, - 0, - 30, - 0, - 0, - 0, - 0, - 0, - 80, - 0, - 87, - 0, - 0, - 0, - 0, - 73, - 0, - 0, - 0, - 99, - 0, - 0, - 0, - 0, - 0, - 0, - 91, - 79, - 90, - 0, - 93, - 88, - 75, - 76, - 77, - 78, - 0, - 94, - 86, - 99, - 33, - 0, - 0, - 65, - 0, - 99, - 67, - 126, - 0, - 0, - 41, - 0, - 39, - 89, - 74, - 0, - 95, - 123, - 0, - 54, - 0, - 100, - 0, - 0, - 66, - 0, - 50, - 51, - 52, - 53, - 48, - 0, - 0, - 0, - 0, - 0, - 116, - 0, - 57, - 0, - 114, - 0, - 104, - 105, - 106, - 107, - 108, - 109, - 112, - 110, - 0, - 0, - 0, - 69, - 68, - 0, - 0, - 0, - 47, - 46, - 44, - 41, - 63, - 0, - 0, - 99, - 86, - 96, - 0, - 70, - 55, - 0, - 0, - 115, - 113, - 111, - 101, - 102, - 103, - 124, - 49, - 0, - 45, - 42, - 0, - 40, - 37, - 0, - 0, - 123, - 0, - 58, - 0, - 48, - 0, - 0, - 34, - 97, - 71, - 120, - 117, - 118, - 56, - 43, - 0, - 38, - 0, - 122, - 121, - 0, - 64, - 0, - 119, - 98}; +static const yytype_int8 yydefact[] = +{ + 0, 36, 0, 0, 0, 0, 0, 26, 0, 0, + 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, + 126, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, + 20, 21, 0, 35, 0, 0, 0, 0, 62, 59, + 60, 91, 61, 0, 83, 81, 72, 86, 84, 85, + 82, 0, 32, 31, 0, 0, 0, 0, 0, 0, + 124, 1, 127, 2, 0, 0, 30, 0, 0, 0, + 0, 0, 80, 0, 87, 0, 0, 0, 0, 73, + 0, 0, 0, 98, 0, 0, 0, 0, 0, 0, + 90, 79, 0, 92, 88, 75, 76, 77, 78, 0, + 93, 86, 98, 33, 0, 0, 65, 0, 98, 67, + 125, 0, 0, 41, 0, 39, 89, 74, 0, 94, + 122, 0, 54, 0, 99, 0, 0, 66, 0, 50, + 51, 52, 53, 48, 0, 0, 0, 0, 0, 115, + 0, 57, 0, 113, 0, 103, 104, 105, 106, 107, + 108, 111, 109, 0, 0, 0, 69, 68, 0, 0, + 0, 47, 46, 44, 41, 63, 0, 0, 98, 86, + 95, 0, 70, 55, 0, 0, 114, 112, 110, 100, + 101, 102, 123, 49, 0, 45, 42, 0, 40, 37, + 0, 0, 122, 0, 58, 0, 48, 0, 0, 34, + 96, 71, 119, 116, 117, 56, 43, 0, 38, 0, + 121, 120, 0, 64, 0, 118, 97 +}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-155, - -155, - 194, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - -155, - 6, - -155, - -155, - 39, - 73, - 9, - -155, - -155, - -155, - -155, - 31, - -93, - -155, - -155, - -155, - -155, - 82, - 173, - -155, - -3, - -53, - 166, - -155, - -155, - -155, - -85, - 75, - 2, - -103, - -154, - -155, - -155, - 7, - -155, - 18, - -155, - -155, - -155, - -155}; +static const yytype_int16 yypgoto[] = +{ + -154, -154, 184, -154, -154, -154, -154, -154, -154, -154, + -154, -154, -154, -154, -154, -4, -154, -154, 31, 63, + 4, -154, -154, -154, -154, 23, -93, -154, -154, -154, + -154, 73, 164, -154, -3, -53, 157, -154, -154, -154, + -85, 64, -11, -102, -153, -154, -154, -5, -154, 13, + -154, -154, -154, -154 +}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = {0, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 44, - 201, - 32, - 33, - 146, - 124, - 174, - 195, - 144, - 34, - 133, - 151, - 55, - 199, - 35, - 36, - 119, - 120, - 37, - 38, - 56, - 57, - 130, - 58, - 59, - 60, - 178, - 113, - 179, - 117, - 135, - 164, - 183, - 214, - 215, - 150, - 39, - 40, - 41, - 73}; +static const yytype_uint8 yydefgoto[] = +{ + 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 44, 200, 32, 33, 145, 123, + 173, 194, 143, 34, 132, 150, 55, 198, 35, 36, + 118, 119, 37, 38, 56, 57, 129, 58, 59, 60, + 177, 112, 178, 116, 134, 163, 182, 213, 214, 149, + 39, 40, 41, 73 +}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = {82, - 61, - 121, - 83, - 83, - 112, - 114, - 4, - 221, - 187, - 131, - 191, - 192, - 42, - 47, - 83, - 138, - 48, - 165, - 166, - 222, - 137, - 140, - 62, - 141, - 142, - 143, - 48, - 80, - 63, - 64, - 65, - 106, - 107, - 108, - 109, - 43, - 47, - 102, - 152, - 116, - 66, - 188, - 167, - 79, - 81, - 49, - 50, - 211, - 52, - 48, - 171, - 47, - 172, - 173, - 129, - 49, - 50, - 51, - 52, - 69, - 53, - 54, - 134, - 180, - 48, - 84, - 84, - 85, - 86, - 87, - 88, - 85, - 86, - 87, - 88, - 203, - 103, - 84, - 49, - 50, - 51, - 52, - 71, - 53, - 54, - 87, - 88, - 165, - 166, - 170, - 67, - 205, - 152, - 49, - 50, - 51, - 52, - 220, - 53, - 54, - 171, - 68, - 172, - 173, - 184, - 185, - 128, - 1, - 2, - 72, - 190, - 134, - 134, - 216, - 185, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 45, - 74, - 46, - 11, - 12, - 13, - 75, - 76, - 154, - 77, - 90, - 91, - 155, - 92, - 93, - 14, - 15, - 85, - 86, - 87, - 88, - 94, - 95, - 96, - 16, - 134, - 17, - 213, - 97, - 18, - 98, - 100, - 99, - 101, - 116, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 163, - 104, - 110, - 115, - 213, - 85, - 86, - 87, - 88, - 127, - 105, - 111, - 118, - 132, - 125, - 122, - 123, - 136, - 126, - 139, - 145, - 147, - 149, - 153, - 148, - 169, - 176, - 177, - 182, - 186, - 189, - 193, - 198, - 204, - 194, - 196, - 202, - 200, - 165, - 207, - 208, - 209, - 210, - 224, - 218, - 223, - 70, - 225, - 197, - 219, - 217, - 206, - 175, - 168, - 78, - 212, - 0, - 89, - 181, - 0, - 0, - 227, - 0, - 0, - 226}; - -static const yytype_int16 yycheck[] = {53, - 4, - 95, - 4, - 4, - 90, - 91, - 16, - 5, - 30, - 113, - 165, - 166, - 12, - 23, - 4, - 119, - 36, - 45, - 46, - 17, - 25, - 29, - 67, - 31, - 32, - 33, - 36, - 23, - 13, - 14, - 41, - 85, - 86, - 87, - 88, - 35, - 23, - 24, - 132, - 44, - 43, - 63, - 136, - 47, - 40, - 65, - 66, - 202, - 68, - 36, - 34, - 23, - 36, - 37, - 55, - 65, - 66, - 67, - 68, - 50, - 70, - 71, - 116, - 149, - 36, - 67, - 67, - 69, - 70, - 71, - 72, - 69, - 70, - 71, - 72, - 179, - 80, - 67, - 65, - 66, - 67, - 68, - 0, - 70, - 71, - 71, - 72, - 45, - 46, - 23, - 67, - 185, - 186, - 65, - 66, - 67, - 68, - 55, - 70, - 71, - 34, - 67, - 36, - 37, - 24, - 25, - 110, - 7, - 8, - 3, - 164, - 165, - 166, - 24, - 25, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 12, - 67, - 14, - 26, - 27, - 28, - 14, - 67, - 30, - 67, - 43, - 43, - 34, - 67, - 67, - 38, - 39, - 69, - 70, - 71, - 72, - 47, - 57, - 51, - 47, - 202, - 49, - 204, - 23, - 52, - 67, - 24, - 48, - 24, - 44, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 67, - 25, - 42, - 223, - 69, - 70, - 71, - 72, - 24, - 67, - 67, - 67, - 23, - 48, - 68, - 67, - 57, - 67, - 41, - 25, - 67, - 25, - 25, - 56, - 12, - 24, - 23, - 11, - 23, - 34, - 67, - 53, - 6, - 65, - 36, - 48, - 67, - 45, - 24, - 54, - 25, - 24, - 67, - 57, - 25, - 18, - 56, - 175, - 209, - 207, - 186, - 145, - 137, - 47, - 203, - -1, - 57, - 149, - -1, - -1, - 225, - -1, - -1, - 223}; +static const yytype_uint8 yytable[] = +{ + 82, 61, 120, 83, 83, 111, 113, 186, 220, 47, + 130, 190, 191, 42, 80, 83, 137, 48, 164, 165, + 221, 139, 48, 140, 141, 142, 62, 45, 219, 46, + 4, 81, 105, 106, 107, 108, 43, 47, 151, 65, + 187, 136, 166, 67, 79, 66, 49, 50, 210, 52, + 48, 49, 50, 51, 52, 128, 53, 54, 63, 64, + 115, 68, 133, 179, 87, 88, 84, 84, 85, 86, + 87, 88, 85, 86, 87, 88, 202, 102, 84, 49, + 50, 51, 52, 69, 53, 54, 164, 165, 1, 2, + 71, 204, 151, 183, 184, 72, 3, 4, 5, 6, + 7, 8, 9, 10, 215, 184, 127, 11, 12, 13, + 189, 133, 133, 153, 74, 75, 76, 154, 169, 14, + 15, 85, 86, 87, 88, 77, 92, 90, 16, 170, + 17, 171, 172, 18, 170, 93, 171, 172, 94, 91, + 155, 156, 157, 158, 159, 160, 161, 162, 133, 96, + 212, 95, 85, 86, 87, 88, 97, 99, 100, 101, + 98, 109, 114, 115, 103, 124, 104, 126, 131, 212, + 110, 117, 135, 121, 122, 125, 144, 146, 138, 147, + 148, 152, 168, 175, 176, 181, 185, 188, 192, 193, + 195, 197, 199, 203, 201, 164, 206, 209, 207, 217, + 208, 222, 70, 224, 218, 196, 223, 174, 205, 167, + 216, 78, 180, 226, 89, 211, 0, 225 +}; + +static const yytype_int16 yycheck[] = +{ + 53, 4, 95, 4, 4, 90, 91, 30, 5, 23, + 112, 164, 165, 12, 23, 4, 118, 36, 45, 46, + 17, 29, 36, 31, 32, 33, 67, 12, 55, 14, + 16, 40, 85, 86, 87, 88, 35, 23, 131, 41, + 63, 25, 135, 67, 47, 43, 65, 66, 201, 68, + 36, 65, 66, 67, 68, 55, 70, 71, 13, 14, + 44, 67, 115, 148, 71, 72, 67, 67, 69, 70, + 71, 72, 69, 70, 71, 72, 178, 80, 67, 65, + 66, 67, 68, 50, 70, 71, 45, 46, 7, 8, + 0, 184, 185, 24, 25, 3, 15, 16, 17, 18, + 19, 20, 21, 22, 24, 25, 109, 26, 27, 28, + 163, 164, 165, 30, 67, 14, 67, 34, 23, 38, + 39, 69, 70, 71, 72, 67, 67, 43, 47, 34, + 49, 36, 37, 52, 34, 67, 36, 37, 47, 43, + 57, 58, 59, 60, 61, 62, 63, 64, 201, 51, + 203, 57, 69, 70, 71, 72, 23, 48, 24, 24, + 67, 25, 42, 44, 67, 48, 67, 24, 23, 222, + 67, 67, 57, 68, 67, 67, 25, 67, 41, 56, + 25, 25, 12, 24, 23, 11, 23, 34, 67, 65, + 36, 53, 67, 6, 48, 45, 24, 24, 54, 57, + 25, 25, 18, 56, 208, 174, 67, 144, 185, 136, + 206, 47, 148, 224, 57, 202, -1, 222 +}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_int8 yystos[] = {0, - 7, - 8, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 26, - 27, - 28, - 38, - 39, - 47, - 49, - 52, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 90, - 91, - 97, - 102, - 103, - 106, - 107, - 124, - 125, - 126, - 12, - 35, - 88, - 12, - 14, - 23, - 36, - 65, - 66, - 67, - 68, - 70, - 71, - 100, - 108, - 109, - 111, - 112, - 113, - 108, - 67, - 13, - 14, - 41, - 43, - 67, - 67, - 50, - 76, - 0, - 3, - 127, - 67, - 14, - 67, - 67, - 106, - 108, - 23, - 40, - 109, - 4, - 67, - 69, - 70, - 71, - 72, - 110, - 43, - 43, - 67, - 67, - 47, - 57, - 51, - 23, - 67, - 48, - 24, - 24, - 24, - 108, - 67, - 67, - 109, - 109, - 109, - 109, - 25, - 67, - 114, - 115, - 114, - 42, - 44, - 117, - 67, - 104, - 105, - 100, - 68, - 67, - 93, - 48, - 67, - 24, - 108, - 55, - 110, - 117, - 23, - 98, - 109, - 118, - 57, - 25, - 117, - 41, - 29, - 31, - 32, - 33, - 96, - 25, - 92, - 67, - 56, - 25, - 123, - 99, - 100, - 25, - 30, - 34, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 119, - 45, - 46, - 100, - 105, - 12, - 23, - 34, - 36, - 37, - 94, - 93, - 24, - 23, - 114, - 116, - 114, - 115, - 11, - 120, - 24, - 25, - 23, - 30, - 63, - 34, - 109, - 118, - 118, - 67, - 65, - 95, - 36, - 92, - 53, - 101, - 67, - 89, - 48, - 117, - 6, - 100, - 99, - 24, - 54, - 25, - 24, - 118, - 123, - 109, - 121, - 122, - 24, - 94, - 57, - 89, - 55, - 5, - 17, - 25, - 67, - 56, - 121, - 116}; +static const yytype_int8 yystos[] = +{ + 0, 7, 8, 15, 16, 17, 18, 19, 20, 21, + 22, 26, 27, 28, 38, 39, 47, 49, 52, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 90, 91, 97, 102, 103, 106, 107, 124, + 125, 126, 12, 35, 88, 12, 14, 23, 36, 65, + 66, 67, 68, 70, 71, 100, 108, 109, 111, 112, + 113, 108, 67, 13, 14, 41, 43, 67, 67, 50, + 76, 0, 3, 127, 67, 14, 67, 67, 106, 108, + 23, 40, 109, 4, 67, 69, 70, 71, 72, 110, + 43, 43, 67, 67, 47, 57, 51, 23, 67, 48, + 24, 24, 108, 67, 67, 109, 109, 109, 109, 25, + 67, 114, 115, 114, 42, 44, 117, 67, 104, 105, + 100, 68, 67, 93, 48, 67, 24, 108, 55, 110, + 117, 23, 98, 109, 118, 57, 25, 117, 41, 29, + 31, 32, 33, 96, 25, 92, 67, 56, 25, 123, + 99, 100, 25, 30, 34, 57, 58, 59, 60, 61, + 62, 63, 64, 119, 45, 46, 100, 105, 12, 23, + 34, 36, 37, 94, 93, 24, 23, 114, 116, 114, + 115, 11, 120, 24, 25, 23, 30, 63, 34, 109, + 118, 118, 67, 65, 95, 36, 92, 53, 101, 67, + 89, 48, 117, 6, 100, 99, 24, 54, 25, 24, + 118, 123, 109, 121, 122, 24, 94, 57, 89, 55, + 5, 17, 25, 67, 56, 121, 116 +}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr1[] = {0, - 74, - 75, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 88, - 89, - 89, - 90, - 91, - 92, - 92, - 93, - 93, - 94, - 94, - 94, - 94, - 95, - 96, - 96, - 96, - 96, - 97, - 98, - 98, - 99, - 99, - 100, - 100, - 100, - 100, - 101, - 101, - 102, - 103, - 104, - 104, - 105, - 106, - 106, - 107, - 108, - 108, - 109, - 109, - 109, - 109, - 109, - 109, - 109, - 109, - 109, - 109, - 109, - 110, - 110, - 110, - 111, - 111, - 112, - 113, - 113, - 114, - 115, - 115, - 116, - 116, - 117, - 117, - 118, - 118, - 118, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 119, - 120, - 120, - 121, - 121, - 122, - 122, - 122, - 123, - 124, - 125, - 126, - 127, - 127}; +static const yytype_int8 yyr1[] = +{ + 0, 74, 75, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 88, 89, 89, 90, + 91, 92, 92, 93, 93, 94, 94, 94, 94, 95, + 96, 96, 96, 96, 97, 98, 98, 99, 99, 100, + 100, 100, 100, 101, 101, 102, 103, 104, 104, 105, + 106, 106, 107, 108, 108, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 110, 110, 110, 111, + 112, 113, 113, 114, 115, 115, 116, 116, 117, 117, + 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 120, 120, 121, 121, 122, + 122, 122, 123, 124, 125, 126, 127, 127 +}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = {0, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 3, - 2, - 2, - 4, - 9, - 1, - 0, - 1, - 3, - 5, - 8, - 0, - 3, - 6, - 3, - 2, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 5, - 3, - 5, - 1, - 3, - 1, - 1, - 1, - 1, - 0, - 4, - 4, - 5, - 1, - 3, - 3, - 7, - 9, - 2, - 2, - 4, - 3, - 3, - 3, - 3, - 3, - 2, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 2, - 4, - 3, - 3, - 1, - 3, - 1, - 2, - 4, - 3, - 6, - 0, - 2, - 3, - 3, - 3, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 2, - 1, - 2, - 0, - 3, - 1, - 3, - 1, - 2, - 2, - 0, - 7, - 2, - 4, - 0, - 1}; - -enum +static const yytype_int8 yyr2[] = { - YYENOMEM = -2 + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, + 8, 0, 3, 6, 3, 2, 1, 1, 0, 1, + 1, 1, 1, 1, 5, 3, 5, 1, 3, 1, + 1, 1, 1, 0, 4, 4, 5, 1, 3, 3, + 7, 9, 2, 2, 4, 3, 3, 3, 3, 3, + 2, 1, 1, 1, 1, 1, 0, 1, 2, 4, + 3, 1, 3, 1, 2, 4, 3, 6, 0, 2, + 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, + 2, 1, 2, 1, 2, 0, 3, 1, 3, 1, + 2, 2, 0, 7, 2, 4, 0, 1 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK(yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } else { \ - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -2777,131 +982,151 @@ enum the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } else { \ - (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ - } \ - while (0) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* Enable debugging if requested. */ #if YYDEBUG -#ifndef YYFPRINTF -#include /* INFRINGES ON USER NAME SPACE */ -#define YYFPRINTF fprintf -#endif +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -#define YYDPRINTF(Args) \ - do { \ - if (yydebug) \ - YYFPRINTF Args; \ - } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YYLOCATION_PRINT +# ifndef YYLOCATION_PRINT -#if defined YY_LOCATION_PRINT +# if defined YY_LOCATION_PRINT -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) { - res += YYFPRINTF(yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF(yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) { - if (yylocp->first_line < yylocp->last_line) { - res += YYFPRINTF(yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF(yyo, ".%d", end_col); - } else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF(yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } return res; } -#define YYLOCATION_PRINT yy_location_print_ +# define YYLOCATION_PRINT yy_location_print_ -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -#else +# else -#define YYLOCATION_PRINT(File, Loc) ((void)0) -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT YYLOCATION_PRINT +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT -#endif -#endif /* !defined YYLOCATION_PRINT */ +# endif +# endif /* !defined YYLOCATION_PRINT */ + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ - do { \ - if (yydebug) { \ - YYFPRINTF(stderr, "%s ", Title); \ - yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF(stderr, "\n"); \ - } \ - } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { FILE *yyoutput = yyo; - YY_USE(yyoutput); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YYLOCATION_PRINT(yyo, yylocationp); - YYFPRINTF(yyo, ": "); - yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF(yyo, ")"); + YYLOCATION_PRINT (yyo, yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -2909,66 +1134,70 @@ static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *co | TOP (included). | `------------------------------------------------------------------*/ -static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF(stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) { - int yybot = *yybottom; - YYFPRINTF(stderr, " %d", yybot); - } - YYFPRINTF(stderr, "\n"); + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); } -#define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print((Bottom), (Top)); \ - } while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, - ParsedSqlResult *sql_result, void *scanner) +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF(stderr, " $%d = ", yyi + 1); - yy_symbol_print(stderr, - YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), - sql_string, - sql_result, - scanner); - YYFPRINTF(stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); + YYFPRINTF (stderr, "\n"); + } } -#define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ - } while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -#define YYDPRINTF(Args) ((void)0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -#define YY_STACK_PRINT(Bottom, Top) -#define YY_REDUCE_PRINT(Rule) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ + /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -2979,15 +1208,16 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif + /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -2996,59 +1226,69 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default(yyn)) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } + + + #ifndef yystrlen -#if defined __GLIBC__ && defined _STRING_H -#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) -#else +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ -static YYPTRDIFF_T yystrlen(const char *yystr) +static YYPTRDIFF_T +yystrlen (const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -#endif +# endif #endif #ifndef yystpcpy -#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -#define yystpcpy stpcpy -#else +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char *yystpcpy(char *yydest, const char *yysrc) +static char * +yystpcpy (char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -3056,7 +1296,7 @@ static char *yystpcpy(char *yydest, const char *yysrc) return yyd - 1; } -#endif +# endif #endif #ifndef yytnamerr @@ -3067,45 +1307,52 @@ static char *yystpcpy(char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) { - if (*yystr == '"') { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) { - case '\'': - case ',': goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes:; - } + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } if (yyres) - return yystpcpy(yyres, yystr) - yyres; + return yystpcpy (yyres, yystr) - yyres; else - return yystrlen(yystr); + return yystrlen (yystr); } #endif -static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -3132,17 +1379,19 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -3154,12 +1403,11 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) { - enum - { - YYARGS_MAX = 5 - }; + enum { YYARGS_MAX = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -3169,13 +1417,16 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) { -#define YYCASE_(N, S) \ - case N: yyformat = S; break + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -3184,118 +1435,134 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen(yyformat) - 2 * yycount + 1; + yysize = yystrlen (yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) { - YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) { - *yymsg_alloc = 2 * yysize; - if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } else { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } } return 0; } + /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, - const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YY_USE(yyvaluep); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + + + + /*----------. | yyparse. | `----------*/ -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +int +yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - /* Lookahead token kind. */ - int yychar; - - /* The semantic value of the lookahead symbol. */ - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ - YY_INITIAL_VALUE(static YYSTYPE yyval_default;) - YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); - - /* Location data for the lookahead symbol. */ - static YYLTYPE yyloc_default -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = {1, 1, 1, 1} -#endif - ; - YYLTYPE yylloc = yyloc_default; +/* Lookahead token kind. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -3311,23 +1578,24 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF((stderr, "Starting parse\n")); + YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -3336,90 +1604,93 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) have just been pushed. So pushing a state here evens the stacks. */ yyssp++; + /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF((stderr, "Entering state %d\n", yystate)); - YY_ASSERT(0 <= yystate && yystate < YYNSTATES); + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST(yy_state_t, yystate); + *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else - { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -#if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow(YY_("memory exhausted"), - &yyss1, - yysize * YYSIZEOF(*yyssp), - &yyvs1, - yysize * YYSIZEOF(*yyvsp), - &yyls1, - yysize * YYSIZEOF(*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -#else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); - if (!yyptr) + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) YYNOMEM; - YYSTACK_RELOCATE(yyss_alloc, yyss); - YYSTACK_RELOCATE(yyvs_alloc, yyvs); - YYSTACK_RELOCATE(yyls_alloc, yyls); -#undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE(yyss1); - } -#endif + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + YYNOMEM; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ @@ -3429,34 +1700,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default(yyn)) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) { - YYDPRINTF((stderr, "Reading a token\n")); - yychar = yylex(&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF((stderr, "Now at end of input.\n")); - } else if (yychar == YYerror) { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { - yytoken = YYTRANSLATE(yychar); - YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -3464,12 +1741,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) { - if (yytable_value_is_error(yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -3477,7 +1755,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3488,6 +1766,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yychar = YYEMPTY; goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -3497,6 +1776,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) goto yyerrlab; goto yyreduce; + /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -3512,181 +1792,177 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1 - yylen]; + yyval = yyvsp[1-yylen]; /* Default location. */ - YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT(yyn); - switch (yyn) { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 227 "yacc_sql.y" + YY_REDUCE_PRINT (yyn); + switch (yyn) { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } -#line 1814 "yacc_sql.cpp" + case 2: /* commands: command_wrapper opt_semicolon */ +#line 227 "yacc_sql.y" + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } +#line 1810 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ + case 24: /* exit_stmt: EXIT */ #line 258 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1823 "yacc_sql.cpp" +#line 1819 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ + case 25: /* help_stmt: HELP */ #line 264 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1831 "yacc_sql.cpp" +#line 1827 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ + case 26: /* sync_stmt: SYNC */ #line 269 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1839 "yacc_sql.cpp" +#line 1835 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ + case 27: /* begin_stmt: TRX_BEGIN */ #line 275 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1847 "yacc_sql.cpp" +#line 1843 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ + case 28: /* commit_stmt: TRX_COMMIT */ #line 281 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1855 "yacc_sql.cpp" +#line 1851 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ + case 29: /* rollback_stmt: TRX_ROLLBACK */ #line 287 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1863 "yacc_sql.cpp" +#line 1859 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ + case 30: /* drop_table_stmt: DROP TABLE ID */ #line 293 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1873 "yacc_sql.cpp" +#line 1869 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ + case 31: /* show_tables_stmt: SHOW TABLES */ #line 300 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1881 "yacc_sql.cpp" +#line 1877 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ + case 32: /* desc_table_stmt: DESC ID */ #line 306 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1891 "yacc_sql.cpp" +#line 1887 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ #line 315 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1902 "yacc_sql.cpp" +#line 1898 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ + case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ #line 325 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1918 "yacc_sql.cpp" +#line 1914 "yacc_sql.cpp" break; - case 35: /* opt_unique: UNIQUE */ + case 35: /* opt_unique: UNIQUE */ #line 339 "yacc_sql.y" - { - (yyval.unique) = true; - } -#line 1924 "yacc_sql.cpp" + { (yyval.unique) = true; } +#line 1920 "yacc_sql.cpp" break; - case 36: /* opt_unique: %empty */ + case 36: /* opt_unique: %empty */ #line 340 "yacc_sql.y" - { - (yyval.unique) = false; - } -#line 1930 "yacc_sql.cpp" + { (yyval.unique) = false; } +#line 1926 "yacc_sql.cpp" break; - case 37: /* attr_list: ID */ + case 37: /* attr_list: ID */ #line 345 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1940 "yacc_sql.cpp" +#line 1936 "yacc_sql.cpp" break; - case 38: /* attr_list: ID COMMA attr_list */ + case 38: /* attr_list: ID COMMA attr_list */ #line 351 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list) - ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 1950 "yacc_sql.cpp" +#line 1946 "yacc_sql.cpp" break; - case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 360 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1962 "yacc_sql.cpp" +#line 1958 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 370 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-5].string); + create_table.relation_name = (yyvsp[-5].string); free((yyvsp[-5].string)); std::vector *src_attrs = (yyvsp[-2].attr_infos); @@ -3703,18 +1979,18 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); } } -#line 1987 "yacc_sql.cpp" +#line 1983 "yacc_sql.cpp" break; - case 41: /* attr_def_list: %empty */ + case 41: /* attr_def_list: %empty */ #line 393 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1995 "yacc_sql.cpp" +#line 1991 "yacc_sql.cpp" break; - case 42: /* attr_def_list: COMMA attr_def attr_def_list */ + case 42: /* attr_def_list: COMMA attr_def attr_def_list */ #line 397 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -3725,29 +2001,29 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2009 "yacc_sql.cpp" +#line 2005 "yacc_sql.cpp" break; - case 43: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ + case 43: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ #line 410 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; } free((yyvsp[-5].string)); } -#line 2025 "yacc_sql.cpp" +#line 2021 "yacc_sql.cpp" break; - case 44: /* attr_def: ID type nullable_constraint */ + case 44: /* attr_def: ID type nullable_constraint */ #line 422 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -3767,85 +2043,75 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2051 "yacc_sql.cpp" +#line 2047 "yacc_sql.cpp" break; - case 45: /* nullable_constraint: NOT NULL_T */ + case 45: /* nullable_constraint: NOT NULL_T */ #line 447 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2059 "yacc_sql.cpp" +#line 2055 "yacc_sql.cpp" break; - case 46: /* nullable_constraint: NULLABLE */ + case 46: /* nullable_constraint: NULLABLE */ #line 451 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2067 "yacc_sql.cpp" +#line 2063 "yacc_sql.cpp" break; - case 47: /* nullable_constraint: NULL_T */ + case 47: /* nullable_constraint: NULL_T */ #line 455 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2075 "yacc_sql.cpp" +#line 2071 "yacc_sql.cpp" break; - case 48: /* nullable_constraint: %empty */ + case 48: /* nullable_constraint: %empty */ #line 459 "yacc_sql.y" { (yyval.nullable_info) = false; // 默认情况为 NOT NULL } -#line 2083 "yacc_sql.cpp" +#line 2079 "yacc_sql.cpp" break; - case 49: /* number: NUMBER */ + case 49: /* number: NUMBER */ #line 465 "yacc_sql.y" - { - (yyval.number) = (yyvsp[0].number); - } -#line 2089 "yacc_sql.cpp" + {(yyval.number) = (yyvsp[0].number);} +#line 2085 "yacc_sql.cpp" break; - case 50: /* type: INT_T */ + case 50: /* type: INT_T */ #line 468 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::INTS); - } -#line 2095 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::INTS); } +#line 2091 "yacc_sql.cpp" break; - case 51: /* type: STRING_T */ + case 51: /* type: STRING_T */ #line 469 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::CHARS); - } -#line 2101 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::CHARS); } +#line 2097 "yacc_sql.cpp" break; - case 52: /* type: FLOAT_T */ + case 52: /* type: FLOAT_T */ #line 470 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::FLOATS); - } -#line 2107 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::FLOATS); } +#line 2103 "yacc_sql.cpp" break; - case 53: /* type: DATE_T */ + case 53: /* type: DATE_T */ #line 471 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::DATES); - } -#line 2113 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 2109 "yacc_sql.cpp" break; - case 54: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 54: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 476 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -3853,117 +2119,117 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2127 "yacc_sql.cpp" +#line 2123 "yacc_sql.cpp" break; - case 55: /* values_list: LBRACE value_list RBRACE */ + case 55: /* values_list: LBRACE value_list RBRACE */ #line 489 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2137 "yacc_sql.cpp" +#line 2133 "yacc_sql.cpp" break; - case 56: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 56: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 495 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2146 "yacc_sql.cpp" +#line 2142 "yacc_sql.cpp" break; - case 57: /* value_list: value */ + case 57: /* value_list: value */ #line 502 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2156 "yacc_sql.cpp" +#line 2152 "yacc_sql.cpp" break; - case 58: /* value_list: value_list COMMA value */ + case 58: /* value_list: value_list COMMA value */ #line 508 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2165 "yacc_sql.cpp" +#line 2161 "yacc_sql.cpp" break; - case 59: /* value: NUMBER */ + case 59: /* value: NUMBER */ #line 515 "yacc_sql.y" - { + { (yyval.value) = new Value((int)(yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2174 "yacc_sql.cpp" +#line 2170 "yacc_sql.cpp" break; - case 60: /* value: FLOAT */ + case 60: /* value: FLOAT */ #line 519 "yacc_sql.y" - { + { (yyval.value) = new Value((float)(yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2183 "yacc_sql.cpp" +#line 2179 "yacc_sql.cpp" break; - case 61: /* value: SSS */ + case 61: /* value: SSS */ #line 523 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); + { + char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2194 "yacc_sql.cpp" +#line 2190 "yacc_sql.cpp" break; - case 62: /* value: NULL_T */ + case 62: /* value: NULL_T */ #line 529 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } -#line 2202 "yacc_sql.cpp" +#line 2198 "yacc_sql.cpp" break; - case 63: /* storage_format: %empty */ + case 63: /* storage_format: %empty */ #line 536 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2210 "yacc_sql.cpp" +#line 2206 "yacc_sql.cpp" break; - case 64: /* storage_format: STORAGE FORMAT EQ ID */ + case 64: /* storage_format: STORAGE FORMAT EQ ID */ #line 540 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2218 "yacc_sql.cpp" +#line 2214 "yacc_sql.cpp" break; - case 65: /* delete_stmt: DELETE FROM ID where */ + case 65: /* delete_stmt: DELETE FROM ID where */ #line 547 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); } free((yyvsp[-1].string)); } -#line 2231 "yacc_sql.cpp" +#line 2227 "yacc_sql.cpp" break; - case 66: /* update_stmt: UPDATE ID SET setClauses where */ + case 66: /* update_stmt: UPDATE ID SET setClauses where */ #line 559 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -3972,40 +2238,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2246 "yacc_sql.cpp" +#line 2242 "yacc_sql.cpp" break; - case 67: /* setClauses: setClause */ + case 67: /* setClauses: setClause */ #line 573 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2256 "yacc_sql.cpp" +#line 2252 "yacc_sql.cpp" break; - case 68: /* setClauses: setClauses COMMA setClause */ + case 68: /* setClauses: setClauses COMMA setClause */ #line 579 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(*(yyvsp[0].set_clause)); delete (yyvsp[0].set_clause); } -#line 2265 "yacc_sql.cpp" +#line 2261 "yacc_sql.cpp" break; - case 69: /* setClause: ID EQ value */ + case 69: /* setClause: ID EQ value */ #line 587 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); + (yyval.set_clause)->value = std::move(*(yyvsp[0].value)); free((yyvsp[-2].string)); } -#line 2276 "yacc_sql.cpp" +#line 2272 "yacc_sql.cpp" break; - case 70: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ + case 70: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ #line 597 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -4035,10 +2301,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].orderby_list); } } -#line 2309 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; - case 71: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ + case 71: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ #line 626 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -4053,8 +2319,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); - ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -4062,8 +2327,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -4071,20 +2335,20 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2343 "yacc_sql.cpp" +#line 2339 "yacc_sql.cpp" break; - case 72: /* calc_stmt: CALC expression_list */ + case 72: /* calc_stmt: CALC expression_list */ #line 659 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2353 "yacc_sql.cpp" +#line 2349 "yacc_sql.cpp" break; - case 73: /* expression_list: expression alias */ + case 73: /* expression_list: expression alias */ #line 668 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; @@ -4094,10 +2358,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2366 "yacc_sql.cpp" +#line 2362 "yacc_sql.cpp" break; - case 74: /* expression_list: expression alias COMMA expression_list */ + case 74: /* expression_list: expression alias COMMA expression_list */ #line 677 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -4108,51 +2372,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2383 "yacc_sql.cpp" +#line 2379 "yacc_sql.cpp" break; - case 75: /* expression: expression '+' expression */ + case 75: /* expression: expression '+' expression */ #line 692 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2391 "yacc_sql.cpp" +#line 2387 "yacc_sql.cpp" break; - case 76: /* expression: expression '-' expression */ + case 76: /* expression: expression '-' expression */ #line 695 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2399 "yacc_sql.cpp" +#line 2395 "yacc_sql.cpp" break; - case 77: /* expression: expression '*' expression */ + case 77: /* expression: expression '*' expression */ #line 698 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2407 "yacc_sql.cpp" +#line 2403 "yacc_sql.cpp" break; - case 78: /* expression: expression '/' expression */ + case 78: /* expression: expression '/' expression */ #line 701 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2415 "yacc_sql.cpp" +#line 2411 "yacc_sql.cpp" break; - case 79: /* expression: LBRACE expression_list RBRACE */ + case 79: /* expression: LBRACE expression_list RBRACE */ #line 704 "yacc_sql.y" - { + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -4161,454 +2421,414 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2429 "yacc_sql.cpp" +#line 2425 "yacc_sql.cpp" break; - case 80: /* expression: '-' expression */ + case 80: /* expression: '-' expression */ #line 713 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2437 "yacc_sql.cpp" +#line 2433 "yacc_sql.cpp" break; - case 81: /* expression: value */ + case 81: /* expression: value */ #line 716 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2447 "yacc_sql.cpp" +#line 2443 "yacc_sql.cpp" break; - case 82: /* expression: rel_attr */ + case 82: /* expression: rel_attr */ #line 721 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2458 "yacc_sql.cpp" +#line 2454 "yacc_sql.cpp" break; - case 83: /* expression: '*' */ + case 83: /* expression: '*' */ #line 727 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } -#line 2466 "yacc_sql.cpp" +#line 2462 "yacc_sql.cpp" break; - case 84: /* expression: aggr_func_expr */ + case 84: /* expression: aggr_func_expr */ #line 730 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2474 "yacc_sql.cpp" +#line 2470 "yacc_sql.cpp" break; - case 85: /* expression: sub_query_expr */ + case 85: /* expression: sub_query_expr */ #line 733 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2482 "yacc_sql.cpp" +#line 2478 "yacc_sql.cpp" break; - case 86: /* alias: %empty */ + case 86: /* alias: %empty */ #line 740 "yacc_sql.y" - { + { (yyval.string) = nullptr; } -#line 2490 "yacc_sql.cpp" +#line 2486 "yacc_sql.cpp" break; - case 87: /* alias: ID */ + case 87: /* alias: ID */ #line 743 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } -#line 2498 "yacc_sql.cpp" +#line 2494 "yacc_sql.cpp" break; - case 88: /* alias: AS ID */ + case 88: /* alias: AS ID */ #line 746 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } -#line 2506 "yacc_sql.cpp" +#line 2502 "yacc_sql.cpp" break; - case 89: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 89: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 752 "yacc_sql.y" { - if ((*(yyvsp[-1].expression_list)).size() != 1) { - (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); - } else { - (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move((*(yyvsp[-1].expression_list))[0])); - } - } -#line 2518 "yacc_sql.cpp" - break; - - case 90: /* aggr_func_expr: ID LBRACE RBRACE */ -#line 760 "yacc_sql.y" - { - (yyval.expression) = new UnboundAggregateExpr("max", new StarExpr()); + (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2526 "yacc_sql.cpp" +#line 2510 "yacc_sql.cpp" break; - case 91: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 767 "yacc_sql.y" + case 90: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 759 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2534 "yacc_sql.cpp" +#line 2518 "yacc_sql.cpp" break; - case 92: /* rel_attr: ID */ -#line 773 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 91: /* rel_attr: ID */ +#line 765 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2544 "yacc_sql.cpp" +#line 2528 "yacc_sql.cpp" break; - case 93: /* rel_attr: ID DOT ID */ -#line 778 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 92: /* rel_attr: ID DOT ID */ +#line 770 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2556 "yacc_sql.cpp" +#line 2540 "yacc_sql.cpp" break; - case 94: /* relation: ID */ -#line 788 "yacc_sql.y" - { + case 93: /* relation: ID */ +#line 780 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2564 "yacc_sql.cpp" +#line 2548 "yacc_sql.cpp" break; - case 95: /* rel_list: relation alias */ -#line 794 "yacc_sql.y" - { + case 94: /* rel_list: relation alias */ +#line 786 "yacc_sql.y" + { (yyval.relation_list) = new std::vector(); - if (nullptr != (yyvsp[0].string)) { - (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); free((yyvsp[0].string)); - } else { + }else{ (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); } -#line 2579 "yacc_sql.cpp" +#line 2563 "yacc_sql.cpp" break; - case 96: /* rel_list: relation alias COMMA rel_list */ -#line 804 "yacc_sql.y" - { + case 95: /* rel_list: relation alias COMMA rel_list */ +#line 796 "yacc_sql.y" + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if (nullptr != (yyvsp[-2].string)) { - (yyval.relation_list) - ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); free((yyvsp[-2].string)); - } else { + }else{ (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); } -#line 2598 "yacc_sql.cpp" +#line 2582 "yacc_sql.cpp" break; - case 97: /* joinClauses: relation ON condition */ -#line 822 "yacc_sql.y" + case 96: /* joinClauses: relation ON condition */ +#line 814 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2609 "yacc_sql.cpp" +#line 2593 "yacc_sql.cpp" break; - case 98: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 829 "yacc_sql.y" + case 97: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 821 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2621 "yacc_sql.cpp" +#line 2605 "yacc_sql.cpp" break; - case 99: /* where: %empty */ -#line 840 "yacc_sql.y" + case 98: /* where: %empty */ +#line 832 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2629 "yacc_sql.cpp" +#line 2613 "yacc_sql.cpp" break; - case 100: /* where: WHERE condition */ -#line 843 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + case 99: /* where: WHERE condition */ +#line 835 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); } -#line 2637 "yacc_sql.cpp" +#line 2621 "yacc_sql.cpp" break; - case 101: /* condition: expression comp_op expression */ -#line 850 "yacc_sql.y" + case 100: /* condition: expression comp_op expression */ +#line 842 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2645 "yacc_sql.cpp" +#line 2629 "yacc_sql.cpp" break; - case 102: /* condition: condition AND condition */ -#line 854 "yacc_sql.y" + case 101: /* condition: condition AND condition */ +#line 846 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2653 "yacc_sql.cpp" +#line 2637 "yacc_sql.cpp" break; - case 103: /* condition: condition OR condition */ -#line 858 "yacc_sql.y" + case 102: /* condition: condition OR condition */ +#line 850 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2661 "yacc_sql.cpp" +#line 2645 "yacc_sql.cpp" break; - case 104: /* comp_op: EQ */ -#line 864 "yacc_sql.y" - { - (yyval.comp) = EQUAL_TO; - } -#line 2667 "yacc_sql.cpp" + case 103: /* comp_op: EQ */ +#line 856 "yacc_sql.y" + { (yyval.comp) = EQUAL_TO; } +#line 2651 "yacc_sql.cpp" break; - case 105: /* comp_op: LT */ -#line 865 "yacc_sql.y" - { - (yyval.comp) = LESS_THAN; - } -#line 2673 "yacc_sql.cpp" + case 104: /* comp_op: LT */ +#line 857 "yacc_sql.y" + { (yyval.comp) = LESS_THAN; } +#line 2657 "yacc_sql.cpp" break; - case 106: /* comp_op: GT */ -#line 866 "yacc_sql.y" - { - (yyval.comp) = GREAT_THAN; - } -#line 2679 "yacc_sql.cpp" + case 105: /* comp_op: GT */ +#line 858 "yacc_sql.y" + { (yyval.comp) = GREAT_THAN; } +#line 2663 "yacc_sql.cpp" break; - case 107: /* comp_op: LE */ -#line 867 "yacc_sql.y" - { - (yyval.comp) = LESS_EQUAL; - } -#line 2685 "yacc_sql.cpp" + case 106: /* comp_op: LE */ +#line 859 "yacc_sql.y" + { (yyval.comp) = LESS_EQUAL; } +#line 2669 "yacc_sql.cpp" break; - case 108: /* comp_op: GE */ -#line 868 "yacc_sql.y" - { - (yyval.comp) = GREAT_EQUAL; - } -#line 2691 "yacc_sql.cpp" + case 107: /* comp_op: GE */ +#line 860 "yacc_sql.y" + { (yyval.comp) = GREAT_EQUAL; } +#line 2675 "yacc_sql.cpp" break; - case 109: /* comp_op: NE */ -#line 869 "yacc_sql.y" - { - (yyval.comp) = NOT_EQUAL; - } -#line 2697 "yacc_sql.cpp" + case 108: /* comp_op: NE */ +#line 861 "yacc_sql.y" + { (yyval.comp) = NOT_EQUAL; } +#line 2681 "yacc_sql.cpp" break; - case 110: /* comp_op: IS */ -#line 870 "yacc_sql.y" - { - (yyval.comp) = OP_IS; - } -#line 2703 "yacc_sql.cpp" + case 109: /* comp_op: IS */ +#line 862 "yacc_sql.y" + { (yyval.comp) = OP_IS; } +#line 2687 "yacc_sql.cpp" break; - case 111: /* comp_op: IS NOT */ -#line 871 "yacc_sql.y" - { - (yyval.comp) = OP_IS_NOT; - } -#line 2709 "yacc_sql.cpp" + case 110: /* comp_op: IS NOT */ +#line 863 "yacc_sql.y" + { (yyval.comp) = OP_IS_NOT; } +#line 2693 "yacc_sql.cpp" break; - case 112: /* comp_op: LIKE */ -#line 872 "yacc_sql.y" - { - (yyval.comp) = LIKE_OP; - } -#line 2715 "yacc_sql.cpp" + case 111: /* comp_op: LIKE */ +#line 864 "yacc_sql.y" + { (yyval.comp) = LIKE_OP;} +#line 2699 "yacc_sql.cpp" break; - case 113: /* comp_op: NOT LIKE */ -#line 873 "yacc_sql.y" - { - (yyval.comp) = NOT_LIKE_OP; - } -#line 2721 "yacc_sql.cpp" + case 112: /* comp_op: NOT LIKE */ +#line 865 "yacc_sql.y" + {(yyval.comp) = NOT_LIKE_OP;} +#line 2705 "yacc_sql.cpp" break; - case 114: /* comp_op: IN */ -#line 874 "yacc_sql.y" - { - (yyval.comp) = IN_OP; - } -#line 2727 "yacc_sql.cpp" + case 113: /* comp_op: IN */ +#line 866 "yacc_sql.y" + { (yyval.comp) = IN_OP; } +#line 2711 "yacc_sql.cpp" break; - case 115: /* comp_op: NOT IN */ -#line 875 "yacc_sql.y" - { - (yyval.comp) = NOT_IN_OP; - } -#line 2733 "yacc_sql.cpp" + case 114: /* comp_op: NOT IN */ +#line 867 "yacc_sql.y" + { (yyval.comp) = NOT_IN_OP; } +#line 2717 "yacc_sql.cpp" break; - case 116: /* opt_order_by: %empty */ -#line 880 "yacc_sql.y" + case 115: /* opt_order_by: %empty */ +#line 872 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2741 "yacc_sql.cpp" +#line 2725 "yacc_sql.cpp" break; - case 117: /* opt_order_by: ORDER BY sort_list */ -#line 884 "yacc_sql.y" + case 116: /* opt_order_by: ORDER BY sort_list */ +#line 876 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2750 "yacc_sql.cpp" +#line 2734 "yacc_sql.cpp" break; - case 118: /* sort_list: sort_unit */ -#line 892 "yacc_sql.y" - { + case 117: /* sort_list: sort_unit */ +#line 884 "yacc_sql.y" + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } -#line 2759 "yacc_sql.cpp" + } +#line 2743 "yacc_sql.cpp" break; - case 119: /* sort_list: sort_unit COMMA sort_list */ -#line 897 "yacc_sql.y" - { + case 118: /* sort_list: sort_unit COMMA sort_list */ +#line 889 "yacc_sql.y" + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } -#line 2768 "yacc_sql.cpp" + } +#line 2752 "yacc_sql.cpp" break; - case 120: /* sort_unit: expression */ -#line 905 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + case 119: /* sort_unit: expression */ +#line 897 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2778 "yacc_sql.cpp" + } +#line 2762 "yacc_sql.cpp" break; - case 121: /* sort_unit: expression DESC */ -#line 911 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 120: /* sort_unit: expression DESC */ +#line 903 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } -#line 2788 "yacc_sql.cpp" + } +#line 2772 "yacc_sql.cpp" break; - case 122: /* sort_unit: expression ASC */ -#line 917 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 121: /* sort_unit: expression ASC */ +#line 909 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2798 "yacc_sql.cpp" + } +#line 2782 "yacc_sql.cpp" break; - case 123: /* group_by: %empty */ -#line 926 "yacc_sql.y" + case 122: /* group_by: %empty */ +#line 918 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2806 "yacc_sql.cpp" +#line 2790 "yacc_sql.cpp" break; - case 124: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 932 "yacc_sql.y" + case 123: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 924 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2820 "yacc_sql.cpp" +#line 2804 "yacc_sql.cpp" break; - case 125: /* explain_stmt: EXPLAIN command_wrapper */ -#line 945 "yacc_sql.y" + case 124: /* explain_stmt: EXPLAIN command_wrapper */ +#line 937 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2829 "yacc_sql.cpp" +#line 2813 "yacc_sql.cpp" break; - case 126: /* set_variable_stmt: SET ID EQ value */ -#line 953 "yacc_sql.y" + case 125: /* set_variable_stmt: SET ID EQ value */ +#line 945 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2841 "yacc_sql.cpp" +#line 2825 "yacc_sql.cpp" break; -#line 2845 "yacc_sql.cpp" - default: break; - } +#line 2829 "yacc_sql.cpp" + + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -4620,9 +2840,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; @@ -4633,67 +2853,84 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) { - ++yynerrs; - { - yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) { - if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); - yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); - if (yymsg) { - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } - yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; } - } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } else { - yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; + } } - } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; + /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -4706,40 +2943,45 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) { - yyn = yypact[yystate]; - if (!yypact_value_is_default(yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - yystate = *yyssp; - YY_STACK_PRINT(yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -4747,14 +2989,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; + /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -4762,6 +3005,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 0; goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -4769,48 +3013,53 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 1; goto yyreturnlab; + /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; + /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE(yychar); - yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK(yylen); - YY_STACK_PRINT(yyss, yyssp); - while (yyssp != yyss) { - yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - } + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE(yyss); + YYSTACK_FREE (yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); + YYSTACK_FREE (yymsg); return yyresult; } -#line 965 "yacc_sql.y" +#line 957 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) -{ +int sql_parse(const char *s, ParsedSqlResult *sql_result) { yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 70e5e881..d32430f9 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -#define YY_YY_YACC_SQL_HPP_INCLUDED +# define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -#define YYDEBUG 0 +# define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,123 +47,124 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -#define YYTOKENTYPE -enum yytokentype -{ - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - ORDER = 266, /* ORDER */ - TABLE = 267, /* TABLE */ - TABLES = 268, /* TABLES */ - INDEX = 269, /* INDEX */ - CALC = 270, /* CALC */ - SELECT = 271, /* SELECT */ - DESC = 272, /* DESC */ - SHOW = 273, /* SHOW */ - SYNC = 274, /* SYNC */ - INSERT = 275, /* INSERT */ - DELETE = 276, /* DELETE */ - UPDATE = 277, /* UPDATE */ - LBRACE = 278, /* LBRACE */ - RBRACE = 279, /* RBRACE */ - COMMA = 280, /* COMMA */ - TRX_BEGIN = 281, /* TRX_BEGIN */ - TRX_COMMIT = 282, /* TRX_COMMIT */ - TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ - INT_T = 284, /* INT_T */ - IN = 285, /* IN */ - STRING_T = 286, /* STRING_T */ - FLOAT_T = 287, /* FLOAT_T */ - DATE_T = 288, /* DATE_T */ - NOT = 289, /* NOT */ - UNIQUE = 290, /* UNIQUE */ - NULL_T = 291, /* NULL_T */ - NULLABLE = 292, /* NULLABLE */ - HELP = 293, /* HELP */ - EXIT = 294, /* EXIT */ - DOT = 295, /* DOT */ - INTO = 296, /* INTO */ - VALUES = 297, /* VALUES */ - FROM = 298, /* FROM */ - WHERE = 299, /* WHERE */ - AND = 300, /* AND */ - OR = 301, /* OR */ - SET = 302, /* SET */ - ON = 303, /* ON */ - LOAD = 304, /* LOAD */ - DATA = 305, /* DATA */ - INFILE = 306, /* INFILE */ - EXPLAIN = 307, /* EXPLAIN */ - STORAGE = 308, /* STORAGE */ - FORMAT = 309, /* FORMAT */ - INNER = 310, /* INNER */ - JOIN = 311, /* JOIN */ - EQ = 312, /* EQ */ - LT = 313, /* LT */ - GT = 314, /* GT */ - LE = 315, /* LE */ - GE = 316, /* GE */ - NE = 317, /* NE */ - LIKE = 318, /* LIKE */ - IS = 319, /* IS */ - NUMBER = 320, /* NUMBER */ - FLOAT = 321, /* FLOAT */ - ID = 322, /* ID */ - SSS = 323, /* SSS */ - UMINUS = 324 /* UMINUS */ -}; -typedef enum yytokentype yytoken_kind_t; +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + ORDER = 266, /* ORDER */ + TABLE = 267, /* TABLE */ + TABLES = 268, /* TABLES */ + INDEX = 269, /* INDEX */ + CALC = 270, /* CALC */ + SELECT = 271, /* SELECT */ + DESC = 272, /* DESC */ + SHOW = 273, /* SHOW */ + SYNC = 274, /* SYNC */ + INSERT = 275, /* INSERT */ + DELETE = 276, /* DELETE */ + UPDATE = 277, /* UPDATE */ + LBRACE = 278, /* LBRACE */ + RBRACE = 279, /* RBRACE */ + COMMA = 280, /* COMMA */ + TRX_BEGIN = 281, /* TRX_BEGIN */ + TRX_COMMIT = 282, /* TRX_COMMIT */ + TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ + INT_T = 284, /* INT_T */ + IN = 285, /* IN */ + STRING_T = 286, /* STRING_T */ + FLOAT_T = 287, /* FLOAT_T */ + DATE_T = 288, /* DATE_T */ + NOT = 289, /* NOT */ + UNIQUE = 290, /* UNIQUE */ + NULL_T = 291, /* NULL_T */ + NULLABLE = 292, /* NULLABLE */ + HELP = 293, /* HELP */ + EXIT = 294, /* EXIT */ + DOT = 295, /* DOT */ + INTO = 296, /* INTO */ + VALUES = 297, /* VALUES */ + FROM = 298, /* FROM */ + WHERE = 299, /* WHERE */ + AND = 300, /* AND */ + OR = 301, /* OR */ + SET = 302, /* SET */ + ON = 303, /* ON */ + LOAD = 304, /* LOAD */ + DATA = 305, /* DATA */ + INFILE = 306, /* INFILE */ + EXPLAIN = 307, /* EXPLAIN */ + STORAGE = 308, /* STORAGE */ + FORMAT = 309, /* FORMAT */ + INNER = 310, /* INNER */ + JOIN = 311, /* JOIN */ + EQ = 312, /* EQ */ + LT = 313, /* LT */ + GT = 314, /* GT */ + LE = 315, /* LE */ + GE = 316, /* GE */ + NE = 317, /* NE */ + LIKE = 318, /* LIKE */ + IS = 319, /* IS */ + NUMBER = 320, /* NUMBER */ + FLOAT = 321, /* FLOAT */ + ID = 322, /* ID */ + SSS = 323, /* SSS */ + UMINUS = 324 /* UMINUS */ + }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 131 "yacc_sql.y" - ParsedSqlNode *sql_node; - Value *value; - enum CompOp comp; - RelAttrSqlNode *rel_attr; - std::vector *attr_infos; - AttrInfoSqlNode *attr_info; - Expression *expression; - std::vector> *expression_list; - std::vector *value_list; - std::vector> *values_list; - SetClauseSqlNode *set_clause; - std::vector *set_clauses; - JoinSqlNode *join_clauses; - std::vector *rel_attr_list; - std::vector *relation_list; - OrderBySqlNode *orderby_unit; - std::vector *orderby_list; - char *string; - int number; - float floats; - bool nullable_info; - std::vector *index_attr_list; - bool unique; + ParsedSqlNode * sql_node; + Value * value; + enum CompOp comp; + RelAttrSqlNode * rel_attr; + std::vector * attr_infos; + AttrInfoSqlNode * attr_info; + Expression * expression; + std::vector> * expression_list; + std::vector * value_list; + std::vector> * values_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; + JoinSqlNode * join_clauses; + std::vector * rel_attr_list; + std::vector * relation_list; + OrderBySqlNode * orderby_unit; + std::vector * orderby_list; + char * string; + int number; + float floats; + bool nullable_info; + std::vector * index_attr_list; + bool unique; #line 159 "yacc_sql.hpp" + }; typedef union YYSTYPE YYSTYPE; -#define YYSTYPE_IS_TRIVIAL 1 -#define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -172,10 +173,14 @@ struct YYLTYPE int last_line; int last_column; }; -#define YYLTYPE_IS_DECLARED 1 -#define YYLTYPE_IS_TRIVIAL 1 +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 #endif -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); + + + +int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); + #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 4c241501..3941e917 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -42,11 +42,11 @@ ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, } UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, - Expression *child, + std::vector> child, const char *sql_string, YYLTYPE *llocp) { - UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, child); + UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } @@ -750,16 +750,8 @@ alias: aggr_func_expr: ID LBRACE expression_list RBRACE { - if((*$3).size() != 1) { - $$ = new UnboundAggregateExpr("max",new StarExpr() ); - } else { - $$ = new UnboundAggregateExpr($1, std::move((*$3)[0])); - } + $$ = new UnboundAggregateExpr($1, std::move(*$3)); } - | ID LBRACE RBRACE - { - $$ = new UnboundAggregateExpr("max",new StarExpr() ); - } ; sub_query_expr: From 202c49826112da9054e35730f2917227fcc40108 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 00:29:30 +0800 Subject: [PATCH 126/308] refactor functions --- src/observer/sql/expr/expression.h | 2 +- src/observer/sql/parser/expression_binder.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 475caa90..1c834e22 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -428,7 +428,7 @@ class UnboundAggregateExpr : public Expression const char *aggregate_name() const { return aggregate_name_.c_str(); } - const std::vector> &child() { return child_; } + std::vector> &child() { return child_; } RC get_value(const Tuple &, Value &) override { return RC::INTERNAL; } AttrType value_type() const override { return {}; } diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 411700bf..7d4f73c1 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -472,7 +472,7 @@ RC ExpressionBinder::bind_aggregate_expression( AggregateExpr::Type aggregate_type; RC rc = AggregateExpr::type_from_string(aggregate_name, aggregate_type); if (OB_SUCC(rc)) { - unique_ptr &child_expr = unbound_aggregate_expr->args().front(); + unique_ptr &child_expr = unbound_aggregate_expr->child().front(); vector> child_bound_expressions; if (child_expr->type() == ExprType::STAR && aggregate_type == AggregateExpr::Type::COUNT) { From a73c57375f295b0f79da5891025e06e2e3eccd03 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 00:34:57 +0800 Subject: [PATCH 127/308] fix: assert(unbound_aggregate_expr->child().size() == 1) --- src/observer/sql/parser/expression_binder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 7d4f73c1..76be1cfb 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -471,7 +471,7 @@ RC ExpressionBinder::bind_aggregate_expression( const char *aggregate_name = unbound_aggregate_expr->aggregate_name(); AggregateExpr::Type aggregate_type; RC rc = AggregateExpr::type_from_string(aggregate_name, aggregate_type); - if (OB_SUCC(rc)) { + if (OB_SUCC(rc) && unbound_aggregate_expr->child().size() == 1) { unique_ptr &child_expr = unbound_aggregate_expr->child().front(); vector> child_bound_expressions; From d9ca7803e448dd9193a07f99412d3f13ca7c32c6 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 00:41:10 +0800 Subject: [PATCH 128/308] fix bug: expression_list empty args --- src/observer/sql/parser/yacc_sql.y | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 3941e917..40b825a0 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -664,7 +664,10 @@ calc_stmt: ; expression_list: - expression alias + /* empty */ { + $$ = new std::vector>; + } + | expression alias { $$ = new std::vector>; if (nullptr != $2) { From b221403652ca74c6fb9916d030e02effff4c8727 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 00:48:19 +0800 Subject: [PATCH 129/308] count argument --- src/observer/sql/parser/expression_binder.cpp | 5 +- src/observer/sql/parser/yacc_sql.cpp | 412 +++++++++--------- 2 files changed, 214 insertions(+), 203 deletions(-) diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 76be1cfb..0598be1e 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -471,7 +471,10 @@ RC ExpressionBinder::bind_aggregate_expression( const char *aggregate_name = unbound_aggregate_expr->aggregate_name(); AggregateExpr::Type aggregate_type; RC rc = AggregateExpr::type_from_string(aggregate_name, aggregate_type); - if (OB_SUCC(rc) && unbound_aggregate_expr->child().size() == 1) { + if (OB_SUCC(rc)) { + if (unbound_aggregate_expr->child().size() != 1) { + return RC::INVALID_ARGUMENT; + } unique_ptr &child_expr = unbound_aggregate_expr->child().front(); vector> child_bound_expressions; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 0a2567f0..d9bcc77c 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -614,7 +614,7 @@ union yyalloc /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 54 /* YYNRULES -- Number of rules. */ -#define YYNRULES 127 +#define YYNRULES 128 /* YYNSTATES -- Number of states. */ #define YYNSTATES 227 @@ -679,12 +679,12 @@ static const yytype_int16 yyrline[] = 369, 393, 396, 409, 421, 446, 450, 454, 459, 465, 468, 469, 470, 471, 475, 488, 494, 501, 507, 515, 519, 523, 529, 536, 539, 546, 558, 572, 578, 586, - 596, 625, 658, 667, 676, 692, 695, 698, 701, 704, - 713, 716, 721, 727, 730, 733, 740, 743, 746, 751, - 758, 765, 770, 780, 786, 796, 813, 820, 832, 835, - 841, 845, 849, 856, 857, 858, 859, 860, 861, 862, - 863, 864, 865, 866, 867, 872, 875, 883, 888, 896, - 902, 908, 918, 923, 936, 944, 954, 955 + 596, 625, 658, 667, 670, 679, 695, 698, 701, 704, + 707, 716, 719, 724, 730, 733, 736, 743, 746, 749, + 754, 761, 768, 773, 783, 789, 799, 816, 823, 835, + 838, 844, 848, 852, 859, 860, 861, 862, 863, 864, + 865, 866, 867, 868, 869, 870, 875, 878, 886, 891, + 899, 905, 911, 921, 926, 939, 947, 957, 958 }; #endif @@ -773,31 +773,31 @@ static const yytype_int16 yypact[] = /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_int8 yydefact[] = +static const yytype_uint8 yydefact[] = { - 0, 36, 0, 0, 0, 0, 0, 26, 0, 0, + 0, 36, 0, 73, 73, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 126, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 127, 23, 22, 15, 16, 17, 18, 9, 10, 11, 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 35, 0, 0, 0, 0, 62, 59, - 60, 91, 61, 0, 83, 81, 72, 86, 84, 85, - 82, 0, 32, 31, 0, 0, 0, 0, 0, 0, - 124, 1, 127, 2, 0, 0, 30, 0, 0, 0, - 0, 0, 80, 0, 87, 0, 0, 0, 0, 73, - 0, 0, 0, 98, 0, 0, 0, 0, 0, 0, - 90, 79, 0, 92, 88, 75, 76, 77, 78, 0, - 93, 86, 98, 33, 0, 0, 65, 0, 98, 67, - 125, 0, 0, 41, 0, 39, 89, 74, 0, 94, - 122, 0, 54, 0, 99, 0, 0, 66, 0, 50, - 51, 52, 53, 48, 0, 0, 0, 0, 0, 115, - 0, 57, 0, 113, 0, 103, 104, 105, 106, 107, - 108, 111, 109, 0, 0, 0, 69, 68, 0, 0, - 0, 47, 46, 44, 41, 63, 0, 0, 98, 86, - 95, 0, 70, 55, 0, 0, 114, 112, 110, 100, - 101, 102, 123, 49, 0, 45, 42, 0, 40, 37, - 0, 0, 122, 0, 58, 0, 48, 0, 0, 34, - 96, 71, 119, 116, 117, 56, 43, 0, 38, 0, - 121, 120, 0, 64, 0, 118, 97 + 20, 21, 0, 35, 0, 0, 0, 73, 62, 59, + 60, 92, 61, 0, 84, 82, 72, 87, 85, 86, + 83, 0, 32, 31, 0, 0, 0, 0, 0, 0, + 125, 1, 128, 2, 0, 0, 30, 0, 0, 0, + 73, 0, 81, 0, 88, 0, 0, 0, 0, 74, + 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, + 91, 80, 0, 93, 89, 76, 77, 78, 79, 73, + 94, 87, 99, 33, 0, 0, 65, 0, 99, 67, + 126, 0, 0, 41, 0, 39, 90, 75, 0, 95, + 123, 0, 54, 0, 100, 0, 0, 66, 0, 50, + 51, 52, 53, 48, 0, 0, 0, 0, 0, 116, + 0, 57, 0, 114, 0, 104, 105, 106, 107, 108, + 109, 112, 110, 0, 0, 0, 69, 68, 0, 0, + 0, 47, 46, 44, 41, 63, 0, 0, 99, 87, + 96, 0, 70, 55, 0, 0, 115, 113, 111, 101, + 102, 103, 124, 49, 0, 45, 42, 0, 40, 37, + 0, 0, 123, 0, 58, 0, 48, 0, 0, 34, + 97, 71, 120, 117, 118, 56, 43, 0, 38, 0, + 122, 121, 0, 64, 0, 119, 98 }; /* YYPGOTO[NTERM-NUM]. */ @@ -916,12 +916,12 @@ static const yytype_int8 yyr1[] = 91, 92, 92, 93, 93, 94, 94, 94, 94, 95, 96, 96, 96, 96, 97, 98, 98, 99, 99, 100, 100, 100, 100, 101, 101, 102, 103, 104, 104, 105, - 106, 106, 107, 108, 108, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 110, 110, 110, 111, - 112, 113, 113, 114, 115, 115, 116, 116, 117, 117, - 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 120, 120, 121, 121, 122, - 122, 122, 123, 124, 125, 126, 127, 127 + 106, 106, 107, 108, 108, 108, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 110, 110, 110, + 111, 112, 113, 113, 114, 115, 115, 116, 116, 117, + 117, 118, 118, 118, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 120, 120, 121, 121, + 122, 122, 122, 123, 124, 125, 126, 127, 127 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -934,12 +934,12 @@ static const yytype_int8 yyr2[] = 8, 0, 3, 6, 3, 2, 1, 1, 0, 1, 1, 1, 1, 1, 5, 3, 5, 1, 3, 1, 1, 1, 1, 0, 4, 4, 5, 1, 3, 3, - 7, 9, 2, 2, 4, 3, 3, 3, 3, 3, - 2, 1, 1, 1, 1, 1, 0, 1, 2, 4, - 3, 1, 3, 1, 2, 4, 3, 6, 0, 2, - 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, - 2, 1, 2, 1, 2, 0, 3, 1, 3, 1, - 2, 2, 0, 7, 2, 4, 0, 1 + 7, 9, 2, 0, 2, 4, 3, 3, 3, 3, + 3, 2, 1, 1, 1, 1, 1, 0, 1, 2, + 4, 3, 1, 3, 1, 2, 4, 3, 6, 0, + 2, 3, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 2, 1, 2, 0, 3, 1, 3, + 1, 2, 2, 0, 7, 2, 4, 0, 1 }; @@ -2348,8 +2348,16 @@ YYLTYPE yylloc = yyloc_default; #line 2349 "yacc_sql.cpp" break; - case 73: /* expression_list: expression alias */ -#line 668 "yacc_sql.y" + case 73: /* expression_list: %empty */ +#line 667 "yacc_sql.y" + { + (yyval.expression_list) = new std::vector>; + } +#line 2357 "yacc_sql.cpp" + break; + + case 74: /* expression_list: expression alias */ +#line 671 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2358,11 +2366,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2362 "yacc_sql.cpp" +#line 2370 "yacc_sql.cpp" break; - case 74: /* expression_list: expression alias COMMA expression_list */ -#line 677 "yacc_sql.y" + case 75: /* expression_list: expression alias COMMA expression_list */ +#line 680 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2375,43 +2383,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2379 "yacc_sql.cpp" +#line 2387 "yacc_sql.cpp" break; - case 75: /* expression: expression '+' expression */ -#line 692 "yacc_sql.y" + case 76: /* expression: expression '+' expression */ +#line 695 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2387 "yacc_sql.cpp" +#line 2395 "yacc_sql.cpp" break; - case 76: /* expression: expression '-' expression */ -#line 695 "yacc_sql.y" + case 77: /* expression: expression '-' expression */ +#line 698 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2395 "yacc_sql.cpp" +#line 2403 "yacc_sql.cpp" break; - case 77: /* expression: expression '*' expression */ -#line 698 "yacc_sql.y" + case 78: /* expression: expression '*' expression */ +#line 701 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2403 "yacc_sql.cpp" +#line 2411 "yacc_sql.cpp" break; - case 78: /* expression: expression '/' expression */ -#line 701 "yacc_sql.y" + case 79: /* expression: expression '/' expression */ +#line 704 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2411 "yacc_sql.cpp" +#line 2419 "yacc_sql.cpp" break; - case 79: /* expression: LBRACE expression_list RBRACE */ -#line 704 "yacc_sql.y" + case 80: /* expression: LBRACE expression_list RBRACE */ +#line 707 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2421,114 +2429,114 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2425 "yacc_sql.cpp" +#line 2433 "yacc_sql.cpp" break; - case 80: /* expression: '-' expression */ -#line 713 "yacc_sql.y" + case 81: /* expression: '-' expression */ +#line 716 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2433 "yacc_sql.cpp" +#line 2441 "yacc_sql.cpp" break; - case 81: /* expression: value */ -#line 716 "yacc_sql.y" + case 82: /* expression: value */ +#line 719 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2443 "yacc_sql.cpp" +#line 2451 "yacc_sql.cpp" break; - case 82: /* expression: rel_attr */ -#line 721 "yacc_sql.y" + case 83: /* expression: rel_attr */ +#line 724 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2454 "yacc_sql.cpp" +#line 2462 "yacc_sql.cpp" break; - case 83: /* expression: '*' */ -#line 727 "yacc_sql.y" + case 84: /* expression: '*' */ +#line 730 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2462 "yacc_sql.cpp" +#line 2470 "yacc_sql.cpp" break; - case 84: /* expression: aggr_func_expr */ -#line 730 "yacc_sql.y" + case 85: /* expression: aggr_func_expr */ +#line 733 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2470 "yacc_sql.cpp" +#line 2478 "yacc_sql.cpp" break; - case 85: /* expression: sub_query_expr */ -#line 733 "yacc_sql.y" + case 86: /* expression: sub_query_expr */ +#line 736 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2478 "yacc_sql.cpp" +#line 2486 "yacc_sql.cpp" break; - case 86: /* alias: %empty */ -#line 740 "yacc_sql.y" + case 87: /* alias: %empty */ +#line 743 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2486 "yacc_sql.cpp" +#line 2494 "yacc_sql.cpp" break; - case 87: /* alias: ID */ -#line 743 "yacc_sql.y" + case 88: /* alias: ID */ +#line 746 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2494 "yacc_sql.cpp" +#line 2502 "yacc_sql.cpp" break; - case 88: /* alias: AS ID */ -#line 746 "yacc_sql.y" + case 89: /* alias: AS ID */ +#line 749 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2502 "yacc_sql.cpp" +#line 2510 "yacc_sql.cpp" break; - case 89: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 752 "yacc_sql.y" + case 90: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 755 "yacc_sql.y" { (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2510 "yacc_sql.cpp" +#line 2518 "yacc_sql.cpp" break; - case 90: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 759 "yacc_sql.y" + case 91: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 762 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2518 "yacc_sql.cpp" +#line 2526 "yacc_sql.cpp" break; - case 91: /* rel_attr: ID */ -#line 765 "yacc_sql.y" + case 92: /* rel_attr: ID */ +#line 768 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2528 "yacc_sql.cpp" +#line 2536 "yacc_sql.cpp" break; - case 92: /* rel_attr: ID DOT ID */ -#line 770 "yacc_sql.y" + case 93: /* rel_attr: ID DOT ID */ +#line 773 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2536,19 +2544,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2540 "yacc_sql.cpp" +#line 2548 "yacc_sql.cpp" break; - case 93: /* relation: ID */ -#line 780 "yacc_sql.y" + case 94: /* relation: ID */ +#line 783 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2548 "yacc_sql.cpp" +#line 2556 "yacc_sql.cpp" break; - case 94: /* rel_list: relation alias */ -#line 786 "yacc_sql.y" + case 95: /* rel_list: relation alias */ +#line 789 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2559,11 +2567,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2563 "yacc_sql.cpp" +#line 2571 "yacc_sql.cpp" break; - case 95: /* rel_list: relation alias COMMA rel_list */ -#line 796 "yacc_sql.y" + case 96: /* rel_list: relation alias COMMA rel_list */ +#line 799 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2578,22 +2586,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2582 "yacc_sql.cpp" +#line 2590 "yacc_sql.cpp" break; - case 96: /* joinClauses: relation ON condition */ -#line 814 "yacc_sql.y" + case 97: /* joinClauses: relation ON condition */ +#line 817 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2593 "yacc_sql.cpp" +#line 2601 "yacc_sql.cpp" break; - case 97: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 821 "yacc_sql.y" + case 98: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 824 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2601,196 +2609,196 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2605 "yacc_sql.cpp" +#line 2613 "yacc_sql.cpp" break; - case 98: /* where: %empty */ -#line 832 "yacc_sql.y" + case 99: /* where: %empty */ +#line 835 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2613 "yacc_sql.cpp" +#line 2621 "yacc_sql.cpp" break; - case 99: /* where: WHERE condition */ -#line 835 "yacc_sql.y" + case 100: /* where: WHERE condition */ +#line 838 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2621 "yacc_sql.cpp" +#line 2629 "yacc_sql.cpp" break; - case 100: /* condition: expression comp_op expression */ -#line 842 "yacc_sql.y" + case 101: /* condition: expression comp_op expression */ +#line 845 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2629 "yacc_sql.cpp" +#line 2637 "yacc_sql.cpp" break; - case 101: /* condition: condition AND condition */ -#line 846 "yacc_sql.y" + case 102: /* condition: condition AND condition */ +#line 849 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2637 "yacc_sql.cpp" +#line 2645 "yacc_sql.cpp" break; - case 102: /* condition: condition OR condition */ -#line 850 "yacc_sql.y" + case 103: /* condition: condition OR condition */ +#line 853 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2645 "yacc_sql.cpp" +#line 2653 "yacc_sql.cpp" break; - case 103: /* comp_op: EQ */ -#line 856 "yacc_sql.y" + case 104: /* comp_op: EQ */ +#line 859 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2651 "yacc_sql.cpp" +#line 2659 "yacc_sql.cpp" break; - case 104: /* comp_op: LT */ -#line 857 "yacc_sql.y" + case 105: /* comp_op: LT */ +#line 860 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2657 "yacc_sql.cpp" +#line 2665 "yacc_sql.cpp" break; - case 105: /* comp_op: GT */ -#line 858 "yacc_sql.y" + case 106: /* comp_op: GT */ +#line 861 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2663 "yacc_sql.cpp" +#line 2671 "yacc_sql.cpp" break; - case 106: /* comp_op: LE */ -#line 859 "yacc_sql.y" + case 107: /* comp_op: LE */ +#line 862 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2669 "yacc_sql.cpp" +#line 2677 "yacc_sql.cpp" break; - case 107: /* comp_op: GE */ -#line 860 "yacc_sql.y" + case 108: /* comp_op: GE */ +#line 863 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2675 "yacc_sql.cpp" +#line 2683 "yacc_sql.cpp" break; - case 108: /* comp_op: NE */ -#line 861 "yacc_sql.y" + case 109: /* comp_op: NE */ +#line 864 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2681 "yacc_sql.cpp" +#line 2689 "yacc_sql.cpp" break; - case 109: /* comp_op: IS */ -#line 862 "yacc_sql.y" + case 110: /* comp_op: IS */ +#line 865 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2687 "yacc_sql.cpp" +#line 2695 "yacc_sql.cpp" break; - case 110: /* comp_op: IS NOT */ -#line 863 "yacc_sql.y" + case 111: /* comp_op: IS NOT */ +#line 866 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2693 "yacc_sql.cpp" +#line 2701 "yacc_sql.cpp" break; - case 111: /* comp_op: LIKE */ -#line 864 "yacc_sql.y" + case 112: /* comp_op: LIKE */ +#line 867 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2699 "yacc_sql.cpp" +#line 2707 "yacc_sql.cpp" break; - case 112: /* comp_op: NOT LIKE */ -#line 865 "yacc_sql.y" + case 113: /* comp_op: NOT LIKE */ +#line 868 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2705 "yacc_sql.cpp" +#line 2713 "yacc_sql.cpp" break; - case 113: /* comp_op: IN */ -#line 866 "yacc_sql.y" + case 114: /* comp_op: IN */ +#line 869 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2711 "yacc_sql.cpp" +#line 2719 "yacc_sql.cpp" break; - case 114: /* comp_op: NOT IN */ -#line 867 "yacc_sql.y" + case 115: /* comp_op: NOT IN */ +#line 870 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2717 "yacc_sql.cpp" +#line 2725 "yacc_sql.cpp" break; - case 115: /* opt_order_by: %empty */ -#line 872 "yacc_sql.y" + case 116: /* opt_order_by: %empty */ +#line 875 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2725 "yacc_sql.cpp" +#line 2733 "yacc_sql.cpp" break; - case 116: /* opt_order_by: ORDER BY sort_list */ -#line 876 "yacc_sql.y" + case 117: /* opt_order_by: ORDER BY sort_list */ +#line 879 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2734 "yacc_sql.cpp" +#line 2742 "yacc_sql.cpp" break; - case 117: /* sort_list: sort_unit */ -#line 884 "yacc_sql.y" + case 118: /* sort_list: sort_unit */ +#line 887 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2743 "yacc_sql.cpp" +#line 2751 "yacc_sql.cpp" break; - case 118: /* sort_list: sort_unit COMMA sort_list */ -#line 889 "yacc_sql.y" + case 119: /* sort_list: sort_unit COMMA sort_list */ +#line 892 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2752 "yacc_sql.cpp" +#line 2760 "yacc_sql.cpp" break; - case 119: /* sort_unit: expression */ -#line 897 "yacc_sql.y" + case 120: /* sort_unit: expression */ +#line 900 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2762 "yacc_sql.cpp" +#line 2770 "yacc_sql.cpp" break; - case 120: /* sort_unit: expression DESC */ -#line 903 "yacc_sql.y" + case 121: /* sort_unit: expression DESC */ +#line 906 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2772 "yacc_sql.cpp" +#line 2780 "yacc_sql.cpp" break; - case 121: /* sort_unit: expression ASC */ -#line 909 "yacc_sql.y" + case 122: /* sort_unit: expression ASC */ +#line 912 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2782 "yacc_sql.cpp" +#line 2790 "yacc_sql.cpp" break; - case 122: /* group_by: %empty */ -#line 918 "yacc_sql.y" + case 123: /* group_by: %empty */ +#line 921 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2790 "yacc_sql.cpp" +#line 2798 "yacc_sql.cpp" break; - case 123: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 924 "yacc_sql.y" + case 124: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 927 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2800,20 +2808,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2804 "yacc_sql.cpp" +#line 2812 "yacc_sql.cpp" break; - case 124: /* explain_stmt: EXPLAIN command_wrapper */ -#line 937 "yacc_sql.y" + case 125: /* explain_stmt: EXPLAIN command_wrapper */ +#line 940 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2813 "yacc_sql.cpp" +#line 2821 "yacc_sql.cpp" break; - case 125: /* set_variable_stmt: SET ID EQ value */ -#line 945 "yacc_sql.y" + case 126: /* set_variable_stmt: SET ID EQ value */ +#line 948 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2821,11 +2829,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2825 "yacc_sql.cpp" +#line 2833 "yacc_sql.cpp" break; -#line 2829 "yacc_sql.cpp" +#line 2837 "yacc_sql.cpp" default: break; } @@ -3054,7 +3062,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 957 "yacc_sql.y" +#line 960 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); From b719b710867ecb3fd5c8d6595e3e0f0d1d67775b Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 01:26:45 +0800 Subject: [PATCH 130/308] refactor function --- src/observer/sql/parser/expression_binder.cpp | 58 +++++++++++-------- src/observer/sql/parser/yacc_sql.cpp | 12 ++-- src/observer/sql/parser/yacc_sql.y | 12 ++-- 3 files changed, 46 insertions(+), 36 deletions(-) diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 0598be1e..39d89c63 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -414,7 +414,7 @@ RC ExpressionBinder::bind_arithmetic_expression( return RC::SUCCESS; } -RC check_aggregate_expression(AggregateExpr &expression) +RC check_aggregate_expression(AggregateFunctionExpr &expression) { // 必须有一个子表达式 Expression *child_expression = expression.child().get(); @@ -424,11 +424,11 @@ RC check_aggregate_expression(AggregateExpr &expression) } // 校验数据类型与聚合类型是否匹配 - AggregateExpr::Type aggregate_type = expression.aggregate_type(); - AttrType child_value_type = child_expression->value_type(); + AggregateFunctionExpr::Type aggregate_type = expression.aggregate_type(); + AttrType child_value_type = child_expression->value_type(); switch (aggregate_type) { - case AggregateExpr::Type::SUM: - case AggregateExpr::Type::AVG: { + case AggregateFunctionExpr::Type::SUM: + case AggregateFunctionExpr::Type::AVG: { // 仅支持数值类型 if (child_value_type != AttrType::INTS && child_value_type != AttrType::FLOATS) { LOG_WARN("invalid child value type for aggregate expression: %d", static_cast(child_value_type)); @@ -436,10 +436,10 @@ RC check_aggregate_expression(AggregateExpr &expression) } } break; - case AggregateExpr::Type::COUNT: + case AggregateFunctionExpr::Type::COUNT: - case AggregateExpr::Type::MAX: - case AggregateExpr::Type::MIN: { + case AggregateFunctionExpr::Type::MAX: + case AggregateFunctionExpr::Type::MIN: { // 任何类型都支持 } break; } @@ -467,18 +467,18 @@ RC ExpressionBinder::bind_aggregate_expression( return RC::SUCCESS; } - auto unbound_aggregate_expr = static_cast(expr.get()); - const char *aggregate_name = unbound_aggregate_expr->aggregate_name(); - AggregateExpr::Type aggregate_type; - RC rc = AggregateExpr::type_from_string(aggregate_name, aggregate_type); + auto unbound_function_expr = static_cast(expr.get()); + const char *aggregate_name = unbound_function_expr->function_name(); + AggregateFunctionExpr::Type aggregate_type; + RC rc = AggregateFunctionExpr::type_from_string(aggregate_name, aggregate_type); if (OB_SUCC(rc)) { - if (unbound_aggregate_expr->child().size() != 1) { + if (unbound_function_expr->args().size() != 1) { return RC::INVALID_ARGUMENT; } - unique_ptr &child_expr = unbound_aggregate_expr->child().front(); + unique_ptr &child_expr = unbound_function_expr->args().front(); vector> child_bound_expressions; - if (child_expr->type() == ExprType::STAR && aggregate_type == AggregateExpr::Type::COUNT) { + if (child_expr->type() == ExprType::STAR && aggregate_type == AggregateFunctionExpr::Type::COUNT) { ValueExpr *value_expr = new ValueExpr(Value(1)); child_expr.reset(value_expr); // count(*) 输出星号 @@ -499,22 +499,32 @@ RC ExpressionBinder::bind_aggregate_expression( } } - auto aggregate_expr = make_unique(aggregate_type, std::move(child_expr)); + auto aggregate_expr = make_unique(aggregate_type, std::move(child_expr)); // set name 阶段 - if (unbound_aggregate_expr->name_empty()) { + if (unbound_function_expr->name_empty()) { string name; switch (aggregate_type) { - case AggregateExpr::Type::COUNT: name = "COUNT(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::SUM: name = "SUM(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::AVG: name = "AVG(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::MAX: name = "MAX(" + std::string(aggregate_expr->child()->name()) + ")"; break; - case AggregateExpr::Type::MIN: name = "MIN(" + std::string(aggregate_expr->child()->name()) + ")"; break; + case AggregateFunctionExpr::Type::COUNT: + name = "COUNT(" + std::string(aggregate_expr->child()->name()) + ")"; + break; + case AggregateFunctionExpr::Type::SUM: + name = "SUM(" + std::string(aggregate_expr->child()->name()) + ")"; + break; + case AggregateFunctionExpr::Type::AVG: + name = "AVG(" + std::string(aggregate_expr->child()->name()) + ")"; + break; + case AggregateFunctionExpr::Type::MAX: + name = "MAX(" + std::string(aggregate_expr->child()->name()) + ")"; + break; + case AggregateFunctionExpr::Type::MIN: + name = "MIN(" + std::string(aggregate_expr->child()->name()) + ")"; + break; default: name = "UNKNOWN_AGGREGATE"; break; } aggregate_expr->set_name(name); } else { - aggregate_expr->set_name(unbound_aggregate_expr->name()); + aggregate_expr->set_name(unbound_function_expr->name()); } rc = check_aggregate_expression(*aggregate_expr); if (OB_FAIL(rc)) { @@ -524,7 +534,7 @@ RC ExpressionBinder::bind_aggregate_expression( return RC::SUCCESS; } - return RC::INTERNAL; + return RC::SUCCESS; } RC ExpressionBinder::bind_subquery_expression( std::unique_ptr &expr, std::vector> &bound_expressions) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index d9bcc77c..39d26bd0 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -110,12 +110,12 @@ ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, return expr; } -UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, - std::vector> child, - const char *sql_string, - YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression(const char *function_name, + std::vector> child, + const char *sql_string, + YYLTYPE *llocp) { - UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, std::move(child)); + UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } @@ -2512,7 +2512,7 @@ YYLTYPE yylloc = yyloc_default; case 90: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 755 "yacc_sql.y" { - (yyval.expression) = new UnboundAggregateExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } #line 2518 "yacc_sql.cpp" break; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 40b825a0..4a605ce8 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -41,12 +41,12 @@ ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, return expr; } -UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name, - std::vector> child, - const char *sql_string, - YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression(const char *function_name, + std::vector> child, + const char *sql_string, + YYLTYPE *llocp) { - UnboundAggregateExpr *expr = new UnboundAggregateExpr(aggregate_name, std::move(child)); + UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } @@ -753,7 +753,7 @@ alias: aggr_func_expr: ID LBRACE expression_list RBRACE { - $$ = new UnboundAggregateExpr($1, std::move(*$3)); + $$ = new UnboundFunctionExpr($1, std::move(*$3)); } ; From 5d7841c7f7301ab9ce88292aa30562218ab9e181 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 01:26:58 +0800 Subject: [PATCH 131/308] refactor function --- .../aggregate_hash_table_performance_test.cpp | 6 ++-- .../sql/expr/aggregate_hash_table.cpp | 2 +- src/observer/sql/expr/aggregate_hash_table.h | 18 +++++------ src/observer/sql/expr/expression.cpp | 26 ++++++++------- src/observer/sql/expr/expression.h | 24 +++++++------- src/observer/sql/expr/expression_iterator.cpp | 2 +- .../aggregate_vec_physical_operator.cpp | 10 +++--- .../operator/group_by_physical_operator.cpp | 4 +-- .../observer/aggregate_hash_table_test.cpp | 11 ++++--- unittest/observer/expression_test.cpp | 32 +++++++++---------- 10 files changed, 70 insertions(+), 65 deletions(-) diff --git a/benchmark/aggregate_hash_table_performance_test.cpp b/benchmark/aggregate_hash_table_performance_test.cpp index c2040bb5..20be695e 100644 --- a/benchmark/aggregate_hash_table_performance_test.cpp +++ b/benchmark/aggregate_hash_table_performance_test.cpp @@ -48,8 +48,8 @@ class DISABLED_StandardAggregateHashTableBenchmark : public AggregateHashTableBe { AggregateHashTableBenchmark::SetUp(state); - AggregateExpr aggregate_expr(AggregateExpr::Type::SUM, nullptr); - vector aggregate_exprs; + AggregateFunctionExpr aggregate_expr(AggregateFunctionExpr::Type::SUM, nullptr); + vector aggregate_exprs; aggregate_exprs.push_back(&aggregate_expr); standard_hash_table_ = make_unique(aggregate_exprs); } @@ -75,7 +75,7 @@ class DISABLED_LinearProbingAggregateHashTableBenchmark : public AggregateHashTa { AggregateHashTableBenchmark::SetUp(state); - linear_probing_hash_table_ = make_unique>(AggregateExpr::Type::SUM); + linear_probing_hash_table_ = make_unique>(AggregateFunctionExpr::Type::SUM); } protected: diff --git a/src/observer/sql/expr/aggregate_hash_table.cpp b/src/observer/sql/expr/aggregate_hash_table.cpp index fe16ebdb..1367c646 100644 --- a/src/observer/sql/expr/aggregate_hash_table.cpp +++ b/src/observer/sql/expr/aggregate_hash_table.cpp @@ -169,7 +169,7 @@ RC LinearProbingAggregateHashTable::iter_get(int pos, int &key, V &value) template void LinearProbingAggregateHashTable::aggregate(V *value, V value_to_aggregate) { - if (aggregate_type_ == AggregateExpr::Type::SUM) { + if (aggregate_type_ == AggregateFunctionExpr::Type::SUM) { *value += value_to_aggregate; } else { ASSERT(false, "unsupported aggregate type"); diff --git a/src/observer/sql/expr/aggregate_hash_table.h b/src/observer/sql/expr/aggregate_hash_table.h index 969cf7e1..f4df1687 100644 --- a/src/observer/sql/expr/aggregate_hash_table.h +++ b/src/observer/sql/expr/aggregate_hash_table.h @@ -82,7 +82,7 @@ class StandardAggregateHashTable : public AggregateHashTable { for (auto &expr : aggregations) { ASSERT(expr->type() == ExprType::AGGREGATION, "expect aggregate expression"); - auto *aggregation_expr = static_cast(expr); + auto *aggregation_expr = static_cast(expr); aggr_types_.push_back(aggregation_expr->aggregate_type()); } } @@ -96,8 +96,8 @@ class StandardAggregateHashTable : public AggregateHashTable private: /// group by values -> aggregate values - StandardHashTable aggr_values_; - std::vector aggr_types_; + StandardHashTable aggr_values_; + std::vector aggr_types_; }; /** @@ -128,7 +128,7 @@ class LinearProbingAggregateHashTable : public AggregateHashTable int scan_count_ = 0; }; - LinearProbingAggregateHashTable(AggregateExpr::Type aggregate_type, int capacity = DEFAULT_CAPACITY) + LinearProbingAggregateHashTable(AggregateFunctionExpr::Type aggregate_type, int capacity = DEFAULT_CAPACITY) : keys_(capacity, EMPTY_KEY), values_(capacity, 0), capacity_(capacity), aggregate_type_(aggregate_type) {} virtual ~LinearProbingAggregateHashTable() {} @@ -162,10 +162,10 @@ class LinearProbingAggregateHashTable : public AggregateHashTable static const int EMPTY_KEY; static const int DEFAULT_CAPACITY; - std::vector keys_; - std::vector values_; - int size_ = 0; - int capacity_ = 0; - AggregateExpr::Type aggregate_type_; + std::vector keys_; + std::vector values_; + int size_ = 0; + int capacity_ = 0; + AggregateFunctionExpr::Type aggregate_type_; }; #endif \ No newline at end of file diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 4e3463d9..e2fac8ee 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -244,7 +244,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) return rc; } DEFER(if (nullptr != left_subquery_expr) left_subquery_expr->close(); - if (nullptr != right_subquery_expr) right_subquery_expr->close();); + if (nullptr != right_subquery_expr) right_subquery_expr->close();); // Get the value of the left expression rc = left_->get_value(tuple, left_value); @@ -629,17 +629,18 @@ RC ArithmeticExpr::try_get_value(Value &value) const //////////////////////////////////////////////////////////////////////////////// -UnboundAggregateExpr::UnboundAggregateExpr(const char *aggregate_name, std::vector> child) - : aggregate_name_(aggregate_name), child_(std::move(child)) +UnboundFunctionExpr::UnboundFunctionExpr(const char *aggregate_name, std::vector> child) + : function_name_(aggregate_name), args_(std::move(child)) {} //////////////////////////////////////////////////////////////////////////////// -AggregateExpr::AggregateExpr(Type type, Expression *child) : aggregate_type_(type), child_(child) {} +AggregateFunctionExpr::AggregateFunctionExpr(Type type, Expression *child) : aggregate_type_(type), child_(child) {} -AggregateExpr::AggregateExpr(Type type, unique_ptr child) : aggregate_type_(type), child_(std::move(child)) +AggregateFunctionExpr::AggregateFunctionExpr(Type type, unique_ptr child) + : aggregate_type_(type), child_(std::move(child)) {} -RC AggregateExpr::get_column(Chunk &chunk, Column &column) +RC AggregateFunctionExpr::get_column(Chunk &chunk, Column &column) { RC rc = RC::SUCCESS; if (pos_ != -1) { @@ -650,7 +651,7 @@ RC AggregateExpr::get_column(Chunk &chunk, Column &column) return rc; } -bool AggregateExpr::equal(const Expression &other) const +bool AggregateFunctionExpr::equal(const Expression &other) const { if (this == &other) { return true; @@ -658,11 +659,11 @@ bool AggregateExpr::equal(const Expression &other) const if (other.type() != type()) { return false; } - const AggregateExpr &other_aggr_expr = static_cast(other); + const AggregateFunctionExpr &other_aggr_expr = static_cast(other); return aggregate_type_ == other_aggr_expr.aggregate_type() && child_->equal(*other_aggr_expr.child()); } -unique_ptr AggregateExpr::create_aggregator() const +unique_ptr AggregateFunctionExpr::create_aggregator() const { unique_ptr aggregator; switch (aggregate_type_) { @@ -694,9 +695,12 @@ unique_ptr AggregateExpr::create_aggregator() const return aggregator; } -RC AggregateExpr::get_value(const Tuple &tuple, Value &value) { return tuple.find_cell(TupleCellSpec(name()), value); } +RC AggregateFunctionExpr::get_value(const Tuple &tuple, Value &value) +{ + return tuple.find_cell(TupleCellSpec(name()), value); +} -RC AggregateExpr::type_from_string(const char *type_str, AggregateExpr::Type &type) +RC AggregateFunctionExpr::type_from_string(const char *type_str, AggregateFunctionExpr::Type &type) { RC rc = RC::SUCCESS; if (0 == strcasecmp(type_str, "count")) { diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 1c834e22..17f0bf26 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -42,7 +42,7 @@ enum class ExprType NONE, STAR, ///< 星号,表示所有字段 UNBOUND_FIELD, ///< 未绑定的字段,需要在resolver阶段解析为FieldExpr - UNBOUND_AGGREGATION, ///< 未绑定的聚合函数,需要在resolver阶段解析为AggregateExpr + UNBOUND_AGGREGATION, ///< 未绑定的聚合函数,需要在resolver阶段解析为AggregateFunctionExpr FIELD, ///< 字段。在实际执行时,根据行数据内容提取对应字段的值 VALUE, ///< 常量值 @@ -418,27 +418,27 @@ class ArithmeticExpr : public Expression std::unique_ptr right_; }; -class UnboundAggregateExpr : public Expression +class UnboundFunctionExpr : public Expression { public: - UnboundAggregateExpr(const char *aggregate_name, std::vector> child); - virtual ~UnboundAggregateExpr() = default; + UnboundFunctionExpr(const char *aggregate_name, std::vector> child); + virtual ~UnboundFunctionExpr() = default; ExprType type() const override { return ExprType::UNBOUND_AGGREGATION; } - const char *aggregate_name() const { return aggregate_name_.c_str(); } + const char *function_name() const { return function_name_.c_str(); } - std::vector> &child() { return child_; } + std::vector> &args() { return args_; } RC get_value(const Tuple &, Value &) override { return RC::INTERNAL; } AttrType value_type() const override { return {}; } private: - std::string aggregate_name_; - std::vector> child_; + std::string function_name_; + std::vector> args_; }; -class AggregateExpr : public Expression +class AggregateFunctionExpr : public Expression { public: enum class Type @@ -451,9 +451,9 @@ class AggregateExpr : public Expression }; public: - AggregateExpr(Type type, Expression *child); - AggregateExpr(Type type, std::unique_ptr child); - virtual ~AggregateExpr() = default; + AggregateFunctionExpr(Type type, Expression *child); + AggregateFunctionExpr(Type type, std::unique_ptr child); + virtual ~AggregateFunctionExpr() = default; bool equal(const Expression &other) const override; diff --git a/src/observer/sql/expr/expression_iterator.cpp b/src/observer/sql/expr/expression_iterator.cpp index 055947e5..932bdf09 100644 --- a/src/observer/sql/expr/expression_iterator.cpp +++ b/src/observer/sql/expr/expression_iterator.cpp @@ -57,7 +57,7 @@ RC ExpressionIterator::iterate_child_expr(Expression &expr, const function(expr); + auto &aggregate_expr = dynamic_cast(expr); rc = callback(aggregate_expr.child()); } break; diff --git a/src/observer/sql/operator/aggregate_vec_physical_operator.cpp b/src/observer/sql/operator/aggregate_vec_physical_operator.cpp index 8652f5b7..d9ccee03 100644 --- a/src/observer/sql/operator/aggregate_vec_physical_operator.cpp +++ b/src/observer/sql/operator/aggregate_vec_physical_operator.cpp @@ -24,7 +24,7 @@ AggregateVecPhysicalOperator::AggregateVecPhysicalOperator(vector value_expressions_.reserve(aggregate_expressions_.size()); ranges::for_each(aggregate_expressions_, [this](Expression *expr) { - auto *aggregate_expr = static_cast(expr); + auto *aggregate_expr = static_cast(expr); Expression *child_expr = aggregate_expr->child().get(); ASSERT(child_expr != nullptr, "aggregation expression must have a child expression"); value_expressions_.emplace_back(child_expr); @@ -33,9 +33,9 @@ AggregateVecPhysicalOperator::AggregateVecPhysicalOperator(vector for (size_t i = 0; i < aggregate_expressions_.size(); i++) { auto &expr = aggregate_expressions_[i]; ASSERT(expr->type() == ExprType::AGGREGATION, "expected an aggregation expression"); - auto *aggregate_expr = static_cast(expr); + auto *aggregate_expr = static_cast(expr); - if (aggregate_expr->aggregate_type() == AggregateExpr::Type::SUM) { + if (aggregate_expr->aggregate_type() == AggregateFunctionExpr::Type::SUM) { if (aggregate_expr->value_type() == AttrType::INTS) { void *aggr_value = malloc(sizeof(SumState)); ((SumState *)aggr_value)->value = 0; @@ -69,8 +69,8 @@ RC AggregateVecPhysicalOperator::open(Trx *trx) Column column; value_expressions_[aggr_idx]->get_column(chunk_, column); ASSERT(aggregate_expressions_[aggr_idx]->type() == ExprType::AGGREGATION, "expect aggregate expression"); - auto *aggregate_expr = static_cast(aggregate_expressions_[aggr_idx]); - if (aggregate_expr->aggregate_type() == AggregateExpr::Type::SUM) { + auto *aggregate_expr = static_cast(aggregate_expressions_[aggr_idx]); + if (aggregate_expr->aggregate_type() == AggregateFunctionExpr::Type::SUM) { if (aggregate_expr->value_type() == AttrType::INTS) { update_aggregate_state, int>(aggr_values_.at(aggr_idx), column); } else if (aggregate_expr->value_type() == AttrType::FLOATS) { diff --git a/src/observer/sql/operator/group_by_physical_operator.cpp b/src/observer/sql/operator/group_by_physical_operator.cpp index e28aea55..8828d86a 100644 --- a/src/observer/sql/operator/group_by_physical_operator.cpp +++ b/src/observer/sql/operator/group_by_physical_operator.cpp @@ -26,7 +26,7 @@ GroupByPhysicalOperator::GroupByPhysicalOperator(vector &&expressi aggregate_expressions_ = std::move(expressions); value_expressions_.reserve(aggregate_expressions_.size()); ranges::for_each(aggregate_expressions_, [this](Expression *expr) { - auto *aggregate_expr = static_cast(expr); + auto *aggregate_expr = static_cast(expr); Expression *child_expr = aggregate_expr->child().get(); ASSERT(child_expr != nullptr, "aggregate expression must have a child expression"); value_expressions_.emplace_back(child_expr); @@ -38,7 +38,7 @@ void GroupByPhysicalOperator::create_aggregator_list(AggregatorList &aggregator_ aggregator_list.clear(); aggregator_list.reserve(aggregate_expressions_.size()); ranges::for_each(aggregate_expressions_, [&aggregator_list](Expression *expr) { - auto *aggregate_expr = static_cast(expr); + auto *aggregate_expr = static_cast(expr); aggregator_list.emplace_back(aggregate_expr->create_aggregator()); }); } diff --git a/unittest/observer/aggregate_hash_table_test.cpp b/unittest/observer/aggregate_hash_table_test.cpp index 6eb62624..c2e997e6 100644 --- a/unittest/observer/aggregate_hash_table_test.cpp +++ b/unittest/observer/aggregate_hash_table_test.cpp @@ -32,7 +32,7 @@ TEST(AggregateHashTableTest, DISABLED_standard_hash_table) group_chunk.add_column(std::move(column1), 0); aggr_chunk.add_column(std::move(column2), 1); - AggregateExpr aggregate_expr(AggregateExpr::Type::SUM, nullptr); + AggregateFunctionExpr aggregate_expr(AggregateFunctionExpr::Type::SUM, nullptr); std::vector aggregate_exprs; aggregate_exprs.push_back(&aggregate_expr); auto standard_hash_table = std::make_unique(aggregate_exprs); @@ -75,7 +75,7 @@ TEST(AggregateHashTableTest, DISABLED_standard_hash_table) aggr_chunk.add_column(std::move(aggr1), 0); aggr_chunk.add_column(std::move(aggr2), 1); - AggregateExpr aggregate_expr(AggregateExpr::Type::SUM, nullptr); + AggregateFunctionExpr aggregate_expr(AggregateFunctionExpr::Type::SUM, nullptr); std::vector aggregate_exprs; aggregate_exprs.push_back(&aggregate_expr); aggregate_exprs.push_back(&aggregate_expr); @@ -120,8 +120,9 @@ TEST(AggregateHashTableTest, DISABLED_linear_probing_hash_table) group_chunk.add_column(std::move(column1), 0); aggr_chunk.add_column(std::move(column2), 1); - auto linear_probing_hash_table = std::make_unique>(AggregateExpr::Type::SUM); - RC rc = linear_probing_hash_table->add_chunk(group_chunk, aggr_chunk); + auto linear_probing_hash_table = + std::make_unique>(AggregateFunctionExpr::Type::SUM); + RC rc = linear_probing_hash_table->add_chunk(group_chunk, aggr_chunk); ASSERT_EQ(rc, RC::SUCCESS); Chunk output_chunk; output_chunk.add_column( @@ -159,7 +160,7 @@ TEST(AggregateHashTableTest, DISABLED_linear_probing_hash_table) aggr_chunk.add_column(std::move(column2), 1); auto linear_probing_hash_table = - std::make_unique>(AggregateExpr::Type::SUM, 256); + std::make_unique>(AggregateFunctionExpr::Type::SUM, 256); RC rc = linear_probing_hash_table->add_chunk(group_chunk, aggr_chunk); ASSERT_EQ(rc, RC::SUCCESS); Chunk output_chunk; diff --git a/unittest/observer/expression_test.cpp b/unittest/observer/expression_test.cpp index 9b8bb697..e90c3cb7 100644 --- a/unittest/observer/expression_test.cpp +++ b/unittest/observer/expression_test.cpp @@ -281,8 +281,8 @@ TEST(ComparisonExpr, comparison_expr_test) Value int_value(1); FieldMeta field_meta("col1", AttrType::INTS, 0, int_len, true, 0); Field field(nullptr, &field_meta); - unique_ptr right_expr = std::make_unique(field); - int count = 1024; + unique_ptr right_expr = std::make_unique(field); + int count = 1024; std::unique_ptr column_right = std::make_unique(AttrType::INTS, int_len, count); for (int i = 0; i < count; ++i) { int right_value = i; @@ -307,11 +307,11 @@ TEST(ComparisonExpr, comparison_expr_test) } } -TEST(AggregateExpr, aggregate_expr_test) +TEST(AggregateFunctionExpr, aggregate_expr_test) { Value int_value(1); unique_ptr value_expr(new ValueExpr(int_value)); - AggregateExpr aggregate_expr(AggregateExpr::Type::SUM, std::move(value_expr)); + AggregateFunctionExpr aggregate_expr(AggregateFunctionExpr::Type::SUM, std::move(value_expr)); aggregate_expr.equal(aggregate_expr); auto aggregator = aggregate_expr.create_aggregator(); for (int i = 0; i < 100; i++) { @@ -320,18 +320,18 @@ TEST(AggregateExpr, aggregate_expr_test) Value result; aggregator->evaluate(result); ASSERT_EQ(result.get_int(), 4950); - AggregateExpr::Type aggr_type; - ASSERT_EQ(RC::SUCCESS, AggregateExpr::type_from_string("sum", aggr_type)); - ASSERT_EQ(aggr_type, AggregateExpr::Type::SUM); - ASSERT_EQ(RC::SUCCESS, AggregateExpr::type_from_string("count", aggr_type)); - ASSERT_EQ(aggr_type, AggregateExpr::Type::COUNT); - ASSERT_EQ(RC::SUCCESS, AggregateExpr::type_from_string("avg", aggr_type)); - ASSERT_EQ(aggr_type, AggregateExpr::Type::AVG); - ASSERT_EQ(RC::SUCCESS, AggregateExpr::type_from_string("max", aggr_type)); - ASSERT_EQ(aggr_type, AggregateExpr::Type::MAX); - ASSERT_EQ(RC::SUCCESS, AggregateExpr::type_from_string("min", aggr_type)); - ASSERT_EQ(aggr_type, AggregateExpr::Type::MIN); - ASSERT_EQ(RC::INVALID_ARGUMENT, AggregateExpr::type_from_string("invalid type", aggr_type)); + AggregateFunctionExpr::Type aggr_type; + ASSERT_EQ(RC::SUCCESS, AggregateFunctionExpr::type_from_string("sum", aggr_type)); + ASSERT_EQ(aggr_type, AggregateFunctionExpr::Type::SUM); + ASSERT_EQ(RC::SUCCESS, AggregateFunctionExpr::type_from_string("count", aggr_type)); + ASSERT_EQ(aggr_type, AggregateFunctionExpr::Type::COUNT); + ASSERT_EQ(RC::SUCCESS, AggregateFunctionExpr::type_from_string("avg", aggr_type)); + ASSERT_EQ(aggr_type, AggregateFunctionExpr::Type::AVG); + ASSERT_EQ(RC::SUCCESS, AggregateFunctionExpr::type_from_string("max", aggr_type)); + ASSERT_EQ(aggr_type, AggregateFunctionExpr::Type::MAX); + ASSERT_EQ(RC::SUCCESS, AggregateFunctionExpr::type_from_string("min", aggr_type)); + ASSERT_EQ(aggr_type, AggregateFunctionExpr::Type::MIN); + ASSERT_EQ(RC::INVALID_ARGUMENT, AggregateFunctionExpr::type_from_string("invalid type", aggr_type)); } int main(int argc, char **argv) From 882b59cc699763856f913f885ab172fc8bfb19a6 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 5 Oct 2024 01:31:04 +0800 Subject: [PATCH 132/308] =?UTF-8?q?fix:=20update-select=20=E4=B8=AD?= =?UTF-8?q?=E5=AD=90=E6=9F=A5=E8=AF=A2=E7=9A=84=E7=BB=93=E6=9E=9C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E4=B8=BA=E7=A9=BA=E5=BD=93=E4=BD=9C=20null=20?= =?UTF-8?q?=E5=80=BC=E6=9D=A5=E5=B0=9D=E8=AF=95=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/value.cpp | 1 + src/observer/sql/expr/expression.cpp | 15 +++++++++++---- .../sql/operator/update_physical_operator.cpp | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 7bef1344..27e345f1 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -144,6 +144,7 @@ void Value::set_data(char *data, int length) } } +// 用于其他类型转成 null 值,但不是 null 类型 void Value::set_null() { is_null_ = true; } void Value::set_int(int val) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index d1e27ba5..25bb00d0 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -804,14 +804,21 @@ RC SubQueryExpr::get_value(const Tuple &tuple, Value &value) { physical_oper_->set_parent_tuple(&tuple); RC rc = physical_oper_->next(); - if (OB_FAIL(rc)) { - return rc; - } - rc = physical_oper_->current_tuple()->cell_at(0, value); if (rc == RC::RECORD_EOF) { + // 先返回 null 类型的值,之后再完善具体选择的列类型 + value.set_type(AttrType::NULLS); value.set_null(true); + return RC::SUCCESS; + } else if (OB_FAIL(rc)) { + // 其他错误 + return rc; } + // 到这里确保有一条记录 + rc = physical_oper_->current_tuple()->cell_at(0, value); + if (OB_FAIL(rc)) { + return rc; + } return RC::SUCCESS; } diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 592331e8..bb1a7b92 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -46,7 +46,7 @@ RC UpdatePhysicalOperator::open(Trx *trx) // 得到真正的 value,并做校验 RowTuple tuple; Value value; - std::vector real_values; + std::vector real_values(values_.size()); SubQueryExpr *sub_query_expr = nullptr; for (int i = 0; i < values_.size(); ++i) { auto &value_expr = values_[i]; @@ -101,7 +101,7 @@ RC UpdatePhysicalOperator::open(Trx *trx) sub_query_expr = nullptr; } - real_values.emplace_back(std::move(value)); + real_values[i] = std::move(value); } // 先收集记录再更新 From 8dbfd893970387cff74be4d8709bd9cdf3621c52 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 01:59:46 +0800 Subject: [PATCH 133/308] refactor set_name --- src/observer/sql/expr/expression.cpp | 4 +- src/observer/sql/expr/expression.h | 40 ++++++++++++------- src/observer/sql/parser/expression_binder.cpp | 33 +++------------ src/observer/sql/parser/expression_binder.h | 2 +- 4 files changed, 35 insertions(+), 44 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index e2fac8ee..a59ab8aa 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -631,7 +631,9 @@ RC ArithmeticExpr::try_get_value(Value &value) const UnboundFunctionExpr::UnboundFunctionExpr(const char *aggregate_name, std::vector> child) : function_name_(aggregate_name), args_(std::move(child)) -{} +{ + Expression::set_name(to_string()); +} //////////////////////////////////////////////////////////////////////////////// AggregateFunctionExpr::AggregateFunctionExpr(Type type, Expression *child) : aggregate_type_(type), child_(child) {} diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 17f0bf26..6cfacde0 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -40,19 +40,18 @@ class PhysicalOperator; enum class ExprType { NONE, - STAR, ///< 星号,表示所有字段 - UNBOUND_FIELD, ///< 未绑定的字段,需要在resolver阶段解析为FieldExpr - UNBOUND_AGGREGATION, ///< 未绑定的聚合函数,需要在resolver阶段解析为AggregateFunctionExpr - - FIELD, ///< 字段。在实际执行时,根据行数据内容提取对应字段的值 - VALUE, ///< 常量值 - CAST, ///< 需要做类型转换的表达式 - COMPARISON, ///< 需要做比较的表达式 - CONJUNCTION, ///< 多个表达式使用同一种关系(AND或OR)来联结 - ARITHMETIC, ///< 算术运算 - AGGREGATION, ///< 聚合运算 - SUBQUERY, ///< 子查询 - EXPRLIST ///< 列表 + STAR, ///< 星号,表示所有字段 + UNBOUND_FIELD, ///< 未绑定的字段,需要在resolver阶段解析为FieldExpr + UNBOUND_FUNCTION, ///< 未绑定的聚合函数,需要在resolver阶段解析为AggregateFunctionExpr + FIELD, ///< 字段。在实际执行时,根据行数据内容提取对应字段的值 + VALUE, ///< 常量值 + CAST, ///< 需要做类型转换的表达式 + COMPARISON, ///< 需要做比较的表达式 + CONJUNCTION, ///< 多个表达式使用同一种关系(AND或OR)来联结 + ARITHMETIC, ///< 算术运算 + AGGREGATION, ///< 聚合运算 + SUBQUERY, ///< 子查询 + EXPRLIST ///< 列表 }; /** @@ -424,10 +423,23 @@ class UnboundFunctionExpr : public Expression UnboundFunctionExpr(const char *aggregate_name, std::vector> child); virtual ~UnboundFunctionExpr() = default; - ExprType type() const override { return ExprType::UNBOUND_AGGREGATION; } + ExprType type() const override { return ExprType::UNBOUND_FUNCTION; } const char *function_name() const { return function_name_.c_str(); } + string to_string() const + { + string str = function_name_ + "("; + for (size_t i = 0; i < args_.size(); i++) { + str += args_[i]->name(); + if (i < args_.size() - 1) { + str += ","; + } + } + str += ")"; + return str; + } + std::vector> &args() { return args_; } RC get_value(const Tuple &, Value &) override { return RC::INTERNAL; } diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 39d89c63..5bcd82e8 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -94,8 +94,8 @@ RC ExpressionBinder::bind_expression(unique_ptr &expr, vector &expr, vector &expr, vector> &bound_expressions) { if (nullptr == expr) { @@ -502,30 +502,7 @@ RC ExpressionBinder::bind_aggregate_expression( auto aggregate_expr = make_unique(aggregate_type, std::move(child_expr)); // set name 阶段 - if (unbound_function_expr->name_empty()) { - string name; - switch (aggregate_type) { - case AggregateFunctionExpr::Type::COUNT: - name = "COUNT(" + std::string(aggregate_expr->child()->name()) + ")"; - break; - case AggregateFunctionExpr::Type::SUM: - name = "SUM(" + std::string(aggregate_expr->child()->name()) + ")"; - break; - case AggregateFunctionExpr::Type::AVG: - name = "AVG(" + std::string(aggregate_expr->child()->name()) + ")"; - break; - case AggregateFunctionExpr::Type::MAX: - name = "MAX(" + std::string(aggregate_expr->child()->name()) + ")"; - break; - case AggregateFunctionExpr::Type::MIN: - name = "MIN(" + std::string(aggregate_expr->child()->name()) + ")"; - break; - default: name = "UNKNOWN_AGGREGATE"; break; - } - aggregate_expr->set_name(name); - } else { - aggregate_expr->set_name(unbound_function_expr->name()); - } + aggregate_expr->set_name(unbound_function_expr->name()); rc = check_aggregate_expression(*aggregate_expr); if (OB_FAIL(rc)) { return rc; diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index 49166a30..faec1a56 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -81,7 +81,7 @@ class ExpressionBinder std::unique_ptr &conjunction_expr, std::vector> &bound_expressions); RC bind_arithmetic_expression( std::unique_ptr &arithmetic_expr, std::vector> &bound_expressions); - RC bind_aggregate_expression( + RC bind_function_expression( std::unique_ptr &aggregate_expr, std::vector> &bound_expressions); RC bind_subquery_expression( std::unique_ptr &expr, std::vector> &bound_expressions); From cf2882b76a89b99a1c92e7f43bf5ffbbb6ecd724 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 5 Oct 2024 02:29:39 +0800 Subject: [PATCH 134/308] =?UTF-8?q?fix:=20=E5=AD=90=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=B8=AD=20RC::RECORD=5FEOF=20=E5=BD=93=E6=88=90=20RC::SUCCESS?= =?UTF-8?q?=20=E8=BF=94=E5=9B=9E=E5=AF=BC=E8=87=B4=E7=9A=84=E6=AD=BB?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 6 ++++-- src/observer/sql/operator/update_physical_operator.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 25bb00d0..737cd1f7 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -271,7 +271,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) bool res = false; // Flag to indicate if a match is found bool has_null = false; // Flag to indicate if any NULL value is found - while (RC::SUCCESS == (rc = right_->get_value(tuple, right_value))) { + for (rc = RC::SUCCESS; rc == RC::SUCCESS; rc = right_->get_value(tuple, right_value)) { if (right_value.is_null()) { has_null = true; } else if (left_value.compare(right_value) == 0) { @@ -806,9 +806,11 @@ RC SubQueryExpr::get_value(const Tuple &tuple, Value &value) RC rc = physical_oper_->next(); if (rc == RC::RECORD_EOF) { // 先返回 null 类型的值,之后再完善具体选择的列类型 + // 如果已经成功执行过一次,结果不为空,那么这里的 value 不会被用到 value.set_type(AttrType::NULLS); value.set_null(true); - return RC::SUCCESS; + // 给调用者判断结果是否为空,而不是直接返回 RC::SUCCESS + return rc; } else if (OB_FAIL(rc)) { // 其他错误 return rc; diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index bb1a7b92..c4ec94ab 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -58,7 +58,7 @@ RC UpdatePhysicalOperator::open(Trx *trx) // 得到表达式的值 rc = value_expr->get_value(tuple, value); - if (OB_FAIL(rc)) { + if (OB_FAIL(rc) && rc != RC::RECORD_EOF) { LOG_ERROR("Failed to get value for field: %s", field_meta.name()); return rc; From d68fdb6cfb64bd0c668709ed8f65c4d7d80a8d90 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 03:24:18 +0800 Subject: [PATCH 135/308] new class: NormalFunctionExpr --- src/observer/common/rc.h | 3 ++- src/observer/sql/expr/expression.cpp | 15 +++++++++++ src/observer/sql/expr/expression.h | 25 +++++++++++++++++++ src/observer/sql/parser/expression_binder.cpp | 15 ++++++++--- 4 files changed, 54 insertions(+), 4 deletions(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 0335954b..98038ea2 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -81,7 +81,8 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(VALUE_TOO_LONG) \ DEFINE_RC(TO_LONG_SUBQUERY_EXPR) \ DEFINE_RC(NOT_NULLABLE_VALUE) \ - DEFINE_RC(NOT_NULL_AFTER_IS) + DEFINE_RC(NOT_NULL_AFTER_IS) \ + DEFINE_RC(UNKNOWN_FUNCTION) enum class RC { diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index a59ab8aa..8c408b39 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -833,3 +833,18 @@ ListExpr::ListExpr(std::vector &&exprs) } exprs.clear(); } + +RC NormalFunctionExpr::type_from_string(const char *type_str, NormalFunctionExpr::Type &type) +{ + RC rc = RC::SUCCESS; + if (0 == strcasecmp(type_str, "date_format")) { + type = Type::DATE_FORMAT; + } else if (0 == strcasecmp(type_str, "length")) { + type = Type::LENGTH; + } else if (0 == strcasecmp(type_str, "round")) { + type = Type::ROUND; + } else { + rc = RC::INVALID_ARGUMENT; + } + return rc; +} diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 6cfacde0..4af9f21b 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -50,6 +50,7 @@ enum class ExprType CONJUNCTION, ///< 多个表达式使用同一种关系(AND或OR)来联结 ARITHMETIC, ///< 算术运算 AGGREGATION, ///< 聚合运算 + NORMAL_FUNCTION, ///< 普通函数 SUBQUERY, ///< 子查询 EXPRLIST ///< 列表 }; @@ -450,6 +451,30 @@ class UnboundFunctionExpr : public Expression std::vector> args_; }; +class NormalFunctionExpr : public UnboundFunctionExpr +{ +public: + enum class Type + { + LENGTH, + ROUND, + DATE_FORMAT, + }; + + NormalFunctionExpr(Type type, const char *aggregate_name, std::vector> child) + : ::UnboundFunctionExpr(aggregate_name, std::move(child)), type_(type) + {} + + static RC type_from_string(const char *type_str, Type &type); + + ExprType type() const override { return ExprType::NORMAL_FUNCTION; } + + Type function_type() const { return type_; } + +private: + Type type_; +}; + class AggregateFunctionExpr : public Expression { public: diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 5bcd82e8..aeb2f42f 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -468,9 +468,9 @@ RC ExpressionBinder::bind_function_expression( } auto unbound_function_expr = static_cast(expr.get()); - const char *aggregate_name = unbound_function_expr->function_name(); + const char *function_name = unbound_function_expr->function_name(); AggregateFunctionExpr::Type aggregate_type; - RC rc = AggregateFunctionExpr::type_from_string(aggregate_name, aggregate_type); + RC rc = AggregateFunctionExpr::type_from_string(function_name, aggregate_type); if (OB_SUCC(rc)) { if (unbound_function_expr->args().size() != 1) { return RC::INVALID_ARGUMENT; @@ -511,7 +511,16 @@ RC ExpressionBinder::bind_function_expression( return RC::SUCCESS; } - return RC::SUCCESS; + NormalFunctionExpr::Type func_type; + rc = NormalFunctionExpr::type_from_string(function_name, func_type); + if (OB_SUCC(rc)) { + auto func_expr = make_unique( + func_type, unbound_function_expr->function_name(), std::move(unbound_function_expr->args())); + bound_expressions.emplace_back(std::move(func_expr)); + return RC::SUCCESS; + } + + return RC::UNKNOWN_FUNCTION; } RC ExpressionBinder::bind_subquery_expression( std::unique_ptr &expr, std::vector> &bound_expressions) From 25ca350e8d03a19fc11e23df8da97ebf8b797669 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 14:42:56 +0800 Subject: [PATCH 136/308] test binding_sonexpr --- src/observer/sql/expr/expression.h | 1 + src/observer/sql/parser/expression_binder.cpp | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 4af9f21b..c65b6ae6 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -442,6 +442,7 @@ class UnboundFunctionExpr : public Expression } std::vector> &args() { return args_; } + void set_args(std::vector> args) { args_ = std::move(args); } RC get_value(const Tuple &, Value &) override { return RC::INTERNAL; } AttrType value_type() const override { return {}; } diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index aeb2f42f..902ecac5 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -514,6 +514,15 @@ RC ExpressionBinder::bind_function_expression( NormalFunctionExpr::Type func_type; rc = NormalFunctionExpr::type_from_string(function_name, func_type); if (OB_SUCC(rc)) { + vector> child_bound_expressions; + for (auto &child_expr : unbound_function_expr->args()) { + rc = bind_expression(child_expr, child_bound_expressions); + if (OB_FAIL(rc)) { + return rc; + } + } + unbound_function_expr->set_args(std::move(child_bound_expressions)); + auto func_expr = make_unique( func_type, unbound_function_expr->function_name(), std::move(unbound_function_expr->args())); bound_expressions.emplace_back(std::move(func_expr)); From 21055750a25f4114bad6de300a73ae4efa06aac0 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 5 Oct 2024 16:32:13 +0800 Subject: [PATCH 137/308] =?UTF-8?q?fix:=20recordPageIterator=20=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=9C=A8=20close=20scan=20=E6=97=B6=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=8C=87=E5=90=91=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E9=87=8A=E6=94=BE=E7=9A=84=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/record/record_manager.cpp | 9 +++++++++ src/observer/storage/record/record_manager.h | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/src/observer/storage/record/record_manager.cpp b/src/observer/storage/record/record_manager.cpp index c6128ef9..1cfa4ee8 100644 --- a/src/observer/storage/record/record_manager.cpp +++ b/src/observer/storage/record/record_manager.cpp @@ -91,6 +91,14 @@ RC RecordPageIterator::next(Record &record) return record.rid().slot_num != -1 ? RC::SUCCESS : RC::RECORD_EOF; } +RC RecordPageIterator::cleanup() +{ + record_page_handler_ = nullptr; + page_num_ = BP_INVALID_PAGE_NUM; + next_slot_num_ = 0; + return RC::SUCCESS; +} + //////////////////////////////////////////////////////////////////////////////// RecordPageHandler::~RecordPageHandler() { cleanup(); } @@ -853,6 +861,7 @@ RC RecordFileScanner::close_scan() record_page_handler_->cleanup(); delete record_page_handler_; record_page_handler_ = nullptr; + record_page_iterator_.cleanup(); } return RC::SUCCESS; diff --git a/src/observer/storage/record/record_manager.h b/src/observer/storage/record/record_manager.h index baf4fe5f..35e78a23 100644 --- a/src/observer/storage/record/record_manager.h +++ b/src/observer/storage/record/record_manager.h @@ -111,6 +111,11 @@ class RecordPageIterator */ bool is_valid() const { return record_page_handler_ != nullptr; } + /** + * @brief 操作结束后做的清理工作,初始化成员变量为默认值 + */ + RC cleanup(); + private: RecordPageHandler *record_page_handler_ = nullptr; PageNum page_num_ = BP_INVALID_PAGE_NUM; From 493beff97cb50d03f9ee0127dc735d52aeb07d1e Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 17:49:14 +0800 Subject: [PATCH 138/308] add std_function --- CMakeLists.txt | 1 + src/observer/sql/expr/expression.cpp | 28 ++ src/observer/sql/expr/expression.h | 3 + src/observer/sql/expr/expression_iterator.cpp | 8 + src/observer/sql/expr/function.h | 69 +++ src/observer/sql/parser/yacc_sql.cpp | 438 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 13 +- 7 files changed, 345 insertions(+), 215 deletions(-) create mode 100644 src/observer/sql/expr/function.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 89b4291c..4bb7a921 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) +SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) OPTION(ENABLE_ASAN "Enable build with address sanitizer" ON) OPTION(ENABLE_TSAN "Build with thread sanitizer" OFF) OPTION(ENABLE_UBSAN "Build with undefined behavior sanitizer" OFF) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 8c408b39..6aa33fe1 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -848,3 +848,31 @@ RC NormalFunctionExpr::type_from_string(const char *type_str, NormalFunctionExpr } return rc; } + +RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) +{ + vector args_values_; + for (auto &expr : args()) { + Value value; + RC rc = expr->get_value(tuple, value); + if (OB_FAIL(rc)) { + return rc; + } + args_values_.push_back(value); + } + switch (type_) { + case Type::LENGTH: { + return STD::LENGTH(args_values_, result); + } + case Type::ROUND: { + return STD::ROUND(args_values_, result); + } + case Type::DATE_FORMAT: { + return STD::DATE_FORMAT(args_values_, result); + } + default: { + return RC::INTERNAL; + } + } + return RC::SUCCESS; +} diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index c65b6ae6..85dc10e1 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -22,6 +22,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/field/field.h" #include "sql/expr/aggregator.h" #include "storage/common/chunk.h" +#include "sql/expr/function.h" class Tuple; class SelectStmt; @@ -472,6 +473,8 @@ class NormalFunctionExpr : public UnboundFunctionExpr Type function_type() const { return type_; } + RC get_value(const Tuple &tuple, Value &value) override; + private: Type type_; }; diff --git a/src/observer/sql/expr/expression_iterator.cpp b/src/observer/sql/expr/expression_iterator.cpp index 932bdf09..a9354249 100644 --- a/src/observer/sql/expr/expression_iterator.cpp +++ b/src/observer/sql/expr/expression_iterator.cpp @@ -61,6 +61,13 @@ RC ExpressionIterator::iterate_child_expr(Expression &expr, const function(expr); + for (auto &child_expr : normal_function_expr.args()) { + rc = callback(child_expr); + } + } break; + case ExprType::NONE: case ExprType::STAR: case ExprType::UNBOUND_FIELD: @@ -159,6 +166,7 @@ RC ExpressionIterator::condition_iterate_expr(std::unique_ptr &expr) case ExprType::ARITHMETIC: case ExprType::AGGREGATION: + case ExprType::NORMAL_FUNCTION: case ExprType::NONE: case ExprType::STAR: case ExprType::UNBOUND_FIELD: diff --git a/src/observer/sql/expr/function.h b/src/observer/sql/expr/function.h new file mode 100644 index 00000000..5646525f --- /dev/null +++ b/src/observer/sql/expr/function.h @@ -0,0 +1,69 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +#pragma once + +#include "common/value.h" + +namespace STD { + +static inline RC LENGTH(const vector &args, Value &result) +{ + if (args.size() != 1) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + int length = static_cast(args[0].to_string().size()); + result = Value(length); + return RC::SUCCESS; +} + +static inline RC ROUND(const vector &args, Value &result) +{ + if (args.size() != 1 && args.size() != 2) { + return RC::INVALID_ARGUMENT; + } + float number; + int decimals = 0; // 默认四舍五入为整数 + if (args[0].attr_type() != AttrType::FLOATS) { + return RC::INVALID_ARGUMENT; + } + if (args.size() == 2) { + if (args[1].attr_type() != AttrType::INTS) { + return RC::INVALID_ARGUMENT; + } + decimals = args[1].get_int(); + } + number = args[0].get_float(); + float factor = std::pow(10.f, static_cast(decimals)); + float round = std::round(number * factor) / factor; + result = Value(round); + return RC::SUCCESS; +} + +static inline RC DATE_FORMAT(const vector &args, Value &result) +{ + if (args.size() != 2) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::DATES) { + return RC::INVALID_ARGUMENT; + } + if (args[1].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + + // TODO: DATE_FORMAT + return RC::SUCCESS; +} + +} // namespace STD \ No newline at end of file diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 39d26bd0..349f3257 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -614,7 +614,7 @@ union yyalloc /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 54 /* YYNRULES -- Number of rules. */ -#define YYNRULES 128 +#define YYNRULES 129 /* YYNSTATES -- Number of states. */ #define YYNSTATES 227 @@ -679,12 +679,12 @@ static const yytype_int16 yyrline[] = 369, 393, 396, 409, 421, 446, 450, 454, 459, 465, 468, 469, 470, 471, 475, 488, 494, 501, 507, 515, 519, 523, 529, 536, 539, 546, 558, 572, 578, 586, - 596, 625, 658, 667, 670, 679, 695, 698, 701, 704, - 707, 716, 719, 724, 730, 733, 736, 743, 746, 749, - 754, 761, 768, 773, 783, 789, 799, 816, 823, 835, - 838, 844, 848, 852, 859, 860, 861, 862, 863, 864, - 865, 866, 867, 868, 869, 870, 875, 878, 886, 891, - 899, 905, 911, 921, 926, 939, 947, 957, 958 + 597, 605, 634, 667, 676, 679, 688, 704, 707, 710, + 713, 716, 725, 728, 733, 739, 742, 745, 752, 755, + 758, 763, 770, 777, 782, 792, 798, 808, 825, 832, + 844, 847, 853, 857, 861, 868, 869, 870, 871, 872, + 873, 874, 875, 876, 877, 878, 879, 884, 887, 895, + 900, 908, 914, 920, 930, 935, 948, 956, 966, 967 }; #endif @@ -775,29 +775,29 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 36, 0, 73, 73, 0, 0, 26, 0, 0, + 0, 36, 0, 74, 74, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 127, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 128, 23, 22, 15, 16, 17, 18, 9, 10, 11, 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 35, 0, 0, 0, 73, 62, 59, - 60, 92, 61, 0, 84, 82, 72, 87, 85, 86, - 83, 0, 32, 31, 0, 0, 0, 0, 0, 0, - 125, 1, 128, 2, 0, 0, 30, 0, 0, 0, - 73, 0, 81, 0, 88, 0, 0, 0, 0, 74, - 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, - 91, 80, 0, 93, 89, 76, 77, 78, 79, 73, - 94, 87, 99, 33, 0, 0, 65, 0, 99, 67, - 126, 0, 0, 41, 0, 39, 90, 75, 0, 95, - 123, 0, 54, 0, 100, 0, 0, 66, 0, 50, - 51, 52, 53, 48, 0, 0, 0, 0, 0, 116, - 0, 57, 0, 114, 0, 104, 105, 106, 107, 108, - 109, 112, 110, 0, 0, 0, 69, 68, 0, 0, - 0, 47, 46, 44, 41, 63, 0, 0, 99, 87, - 96, 0, 70, 55, 0, 0, 115, 113, 111, 101, - 102, 103, 124, 49, 0, 45, 42, 0, 40, 37, - 0, 0, 123, 0, 58, 0, 48, 0, 0, 34, - 97, 71, 120, 117, 118, 56, 43, 0, 38, 0, - 122, 121, 0, 64, 0, 119, 98 + 20, 21, 0, 35, 0, 0, 0, 74, 62, 59, + 60, 93, 61, 0, 85, 83, 73, 88, 86, 87, + 84, 70, 32, 31, 0, 0, 0, 0, 0, 0, + 126, 1, 129, 2, 0, 0, 30, 0, 0, 0, + 74, 0, 82, 0, 89, 0, 0, 0, 0, 75, + 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, + 92, 81, 0, 94, 90, 77, 78, 79, 80, 74, + 95, 88, 100, 33, 0, 0, 65, 0, 100, 67, + 127, 0, 0, 41, 0, 39, 91, 76, 0, 96, + 124, 0, 54, 0, 101, 0, 0, 66, 0, 50, + 51, 52, 53, 48, 0, 0, 0, 0, 0, 117, + 0, 57, 0, 115, 0, 105, 106, 107, 108, 109, + 110, 113, 111, 0, 0, 0, 69, 68, 0, 0, + 0, 47, 46, 44, 41, 63, 0, 0, 100, 88, + 97, 0, 71, 55, 0, 0, 116, 114, 112, 102, + 103, 104, 125, 49, 0, 45, 42, 0, 40, 37, + 0, 0, 124, 0, 58, 0, 48, 0, 0, 34, + 98, 72, 121, 118, 119, 56, 43, 0, 38, 0, + 123, 122, 0, 64, 0, 120, 99 }; /* YYPGOTO[NTERM-NUM]. */ @@ -916,12 +916,12 @@ static const yytype_int8 yyr1[] = 91, 92, 92, 93, 93, 94, 94, 94, 94, 95, 96, 96, 96, 96, 97, 98, 98, 99, 99, 100, 100, 100, 100, 101, 101, 102, 103, 104, 104, 105, - 106, 106, 107, 108, 108, 108, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 110, 110, 110, - 111, 112, 113, 113, 114, 115, 115, 116, 116, 117, - 117, 118, 118, 118, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 120, 120, 121, 121, - 122, 122, 122, 123, 124, 125, 126, 127, 127 + 106, 106, 106, 107, 108, 108, 108, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 110, 110, + 110, 111, 112, 113, 113, 114, 115, 115, 116, 116, + 117, 117, 118, 118, 118, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 120, 120, 121, + 121, 122, 122, 122, 123, 124, 125, 126, 127, 127 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -934,12 +934,12 @@ static const yytype_int8 yyr2[] = 8, 0, 3, 6, 3, 2, 1, 1, 0, 1, 1, 1, 1, 1, 5, 3, 5, 1, 3, 1, 1, 1, 1, 0, 4, 4, 5, 1, 3, 3, - 7, 9, 2, 0, 2, 4, 3, 3, 3, 3, - 3, 2, 1, 1, 1, 1, 1, 0, 1, 2, - 4, 3, 1, 3, 1, 2, 4, 3, 6, 0, - 2, 3, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 2, 1, 2, 0, 3, 1, 3, - 1, 2, 2, 0, 7, 2, 4, 0, 1 + 2, 7, 9, 2, 0, 2, 4, 3, 3, 3, + 3, 3, 2, 1, 1, 1, 1, 1, 0, 1, + 2, 4, 3, 1, 3, 1, 2, 4, 3, 6, + 0, 2, 3, 3, 3, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 2, 1, 2, 0, 3, 1, + 3, 1, 2, 2, 0, 7, 2, 4, 0, 1 }; @@ -2271,8 +2271,20 @@ YYLTYPE yylloc = yyloc_default; #line 2272 "yacc_sql.cpp" break; - case 70: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 597 "yacc_sql.y" + case 70: /* select_stmt: SELECT expression_list */ +#line 598 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); + if ((yyvsp[0].expression_list) != nullptr) { + (yyval.sql_node)->selection.expressions.swap(*(yyvsp[0].expression_list)); + delete (yyvsp[0].expression_list); + } + } +#line 2284 "yacc_sql.cpp" + break; + + case 71: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ +#line 606 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-5].expression_list) != nullptr) { @@ -2301,11 +2313,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2305 "yacc_sql.cpp" +#line 2317 "yacc_sql.cpp" break; - case 71: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 626 "yacc_sql.y" + case 72: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 635 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2335,29 +2347,29 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2339 "yacc_sql.cpp" +#line 2351 "yacc_sql.cpp" break; - case 72: /* calc_stmt: CALC expression_list */ -#line 659 "yacc_sql.y" + case 73: /* calc_stmt: CALC expression_list */ +#line 668 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2349 "yacc_sql.cpp" +#line 2361 "yacc_sql.cpp" break; - case 73: /* expression_list: %empty */ -#line 667 "yacc_sql.y" + case 74: /* expression_list: %empty */ +#line 676 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2357 "yacc_sql.cpp" +#line 2369 "yacc_sql.cpp" break; - case 74: /* expression_list: expression alias */ -#line 671 "yacc_sql.y" + case 75: /* expression_list: expression alias */ +#line 680 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2366,11 +2378,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2370 "yacc_sql.cpp" +#line 2382 "yacc_sql.cpp" break; - case 75: /* expression_list: expression alias COMMA expression_list */ -#line 680 "yacc_sql.y" + case 76: /* expression_list: expression alias COMMA expression_list */ +#line 689 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2383,43 +2395,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2387 "yacc_sql.cpp" +#line 2399 "yacc_sql.cpp" break; - case 76: /* expression: expression '+' expression */ -#line 695 "yacc_sql.y" + case 77: /* expression: expression '+' expression */ +#line 704 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2395 "yacc_sql.cpp" +#line 2407 "yacc_sql.cpp" break; - case 77: /* expression: expression '-' expression */ -#line 698 "yacc_sql.y" + case 78: /* expression: expression '-' expression */ +#line 707 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2403 "yacc_sql.cpp" +#line 2415 "yacc_sql.cpp" break; - case 78: /* expression: expression '*' expression */ -#line 701 "yacc_sql.y" + case 79: /* expression: expression '*' expression */ +#line 710 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2411 "yacc_sql.cpp" +#line 2423 "yacc_sql.cpp" break; - case 79: /* expression: expression '/' expression */ -#line 704 "yacc_sql.y" + case 80: /* expression: expression '/' expression */ +#line 713 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2419 "yacc_sql.cpp" +#line 2431 "yacc_sql.cpp" break; - case 80: /* expression: LBRACE expression_list RBRACE */ -#line 707 "yacc_sql.y" + case 81: /* expression: LBRACE expression_list RBRACE */ +#line 716 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2429,114 +2441,114 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2433 "yacc_sql.cpp" +#line 2445 "yacc_sql.cpp" break; - case 81: /* expression: '-' expression */ -#line 716 "yacc_sql.y" + case 82: /* expression: '-' expression */ +#line 725 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2441 "yacc_sql.cpp" +#line 2453 "yacc_sql.cpp" break; - case 82: /* expression: value */ -#line 719 "yacc_sql.y" + case 83: /* expression: value */ +#line 728 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2451 "yacc_sql.cpp" +#line 2463 "yacc_sql.cpp" break; - case 83: /* expression: rel_attr */ -#line 724 "yacc_sql.y" + case 84: /* expression: rel_attr */ +#line 733 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2462 "yacc_sql.cpp" +#line 2474 "yacc_sql.cpp" break; - case 84: /* expression: '*' */ -#line 730 "yacc_sql.y" + case 85: /* expression: '*' */ +#line 739 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2470 "yacc_sql.cpp" +#line 2482 "yacc_sql.cpp" break; - case 85: /* expression: aggr_func_expr */ -#line 733 "yacc_sql.y" + case 86: /* expression: aggr_func_expr */ +#line 742 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2478 "yacc_sql.cpp" +#line 2490 "yacc_sql.cpp" break; - case 86: /* expression: sub_query_expr */ -#line 736 "yacc_sql.y" + case 87: /* expression: sub_query_expr */ +#line 745 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2486 "yacc_sql.cpp" +#line 2498 "yacc_sql.cpp" break; - case 87: /* alias: %empty */ -#line 743 "yacc_sql.y" + case 88: /* alias: %empty */ +#line 752 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2494 "yacc_sql.cpp" +#line 2506 "yacc_sql.cpp" break; - case 88: /* alias: ID */ -#line 746 "yacc_sql.y" + case 89: /* alias: ID */ +#line 755 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2502 "yacc_sql.cpp" +#line 2514 "yacc_sql.cpp" break; - case 89: /* alias: AS ID */ -#line 749 "yacc_sql.y" + case 90: /* alias: AS ID */ +#line 758 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2510 "yacc_sql.cpp" +#line 2522 "yacc_sql.cpp" break; - case 90: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 755 "yacc_sql.y" + case 91: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 764 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2518 "yacc_sql.cpp" +#line 2530 "yacc_sql.cpp" break; - case 91: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 762 "yacc_sql.y" + case 92: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 771 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2526 "yacc_sql.cpp" +#line 2538 "yacc_sql.cpp" break; - case 92: /* rel_attr: ID */ -#line 768 "yacc_sql.y" + case 93: /* rel_attr: ID */ +#line 777 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2536 "yacc_sql.cpp" +#line 2548 "yacc_sql.cpp" break; - case 93: /* rel_attr: ID DOT ID */ -#line 773 "yacc_sql.y" + case 94: /* rel_attr: ID DOT ID */ +#line 782 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2544,19 +2556,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2548 "yacc_sql.cpp" +#line 2560 "yacc_sql.cpp" break; - case 94: /* relation: ID */ -#line 783 "yacc_sql.y" + case 95: /* relation: ID */ +#line 792 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2556 "yacc_sql.cpp" +#line 2568 "yacc_sql.cpp" break; - case 95: /* rel_list: relation alias */ -#line 789 "yacc_sql.y" + case 96: /* rel_list: relation alias */ +#line 798 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2567,11 +2579,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2571 "yacc_sql.cpp" +#line 2583 "yacc_sql.cpp" break; - case 96: /* rel_list: relation alias COMMA rel_list */ -#line 799 "yacc_sql.y" + case 97: /* rel_list: relation alias COMMA rel_list */ +#line 808 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2586,22 +2598,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2590 "yacc_sql.cpp" +#line 2602 "yacc_sql.cpp" break; - case 97: /* joinClauses: relation ON condition */ -#line 817 "yacc_sql.y" + case 98: /* joinClauses: relation ON condition */ +#line 826 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2601 "yacc_sql.cpp" +#line 2613 "yacc_sql.cpp" break; - case 98: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 824 "yacc_sql.y" + case 99: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 833 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2609,196 +2621,196 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2613 "yacc_sql.cpp" +#line 2625 "yacc_sql.cpp" break; - case 99: /* where: %empty */ -#line 835 "yacc_sql.y" + case 100: /* where: %empty */ +#line 844 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2621 "yacc_sql.cpp" +#line 2633 "yacc_sql.cpp" break; - case 100: /* where: WHERE condition */ -#line 838 "yacc_sql.y" + case 101: /* where: WHERE condition */ +#line 847 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2629 "yacc_sql.cpp" +#line 2641 "yacc_sql.cpp" break; - case 101: /* condition: expression comp_op expression */ -#line 845 "yacc_sql.y" + case 102: /* condition: expression comp_op expression */ +#line 854 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2637 "yacc_sql.cpp" +#line 2649 "yacc_sql.cpp" break; - case 102: /* condition: condition AND condition */ -#line 849 "yacc_sql.y" + case 103: /* condition: condition AND condition */ +#line 858 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2645 "yacc_sql.cpp" +#line 2657 "yacc_sql.cpp" break; - case 103: /* condition: condition OR condition */ -#line 853 "yacc_sql.y" + case 104: /* condition: condition OR condition */ +#line 862 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2653 "yacc_sql.cpp" +#line 2665 "yacc_sql.cpp" break; - case 104: /* comp_op: EQ */ -#line 859 "yacc_sql.y" + case 105: /* comp_op: EQ */ +#line 868 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2659 "yacc_sql.cpp" +#line 2671 "yacc_sql.cpp" break; - case 105: /* comp_op: LT */ -#line 860 "yacc_sql.y" + case 106: /* comp_op: LT */ +#line 869 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2665 "yacc_sql.cpp" +#line 2677 "yacc_sql.cpp" break; - case 106: /* comp_op: GT */ -#line 861 "yacc_sql.y" + case 107: /* comp_op: GT */ +#line 870 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2671 "yacc_sql.cpp" +#line 2683 "yacc_sql.cpp" break; - case 107: /* comp_op: LE */ -#line 862 "yacc_sql.y" + case 108: /* comp_op: LE */ +#line 871 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2677 "yacc_sql.cpp" +#line 2689 "yacc_sql.cpp" break; - case 108: /* comp_op: GE */ -#line 863 "yacc_sql.y" + case 109: /* comp_op: GE */ +#line 872 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2683 "yacc_sql.cpp" +#line 2695 "yacc_sql.cpp" break; - case 109: /* comp_op: NE */ -#line 864 "yacc_sql.y" + case 110: /* comp_op: NE */ +#line 873 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2689 "yacc_sql.cpp" +#line 2701 "yacc_sql.cpp" break; - case 110: /* comp_op: IS */ -#line 865 "yacc_sql.y" + case 111: /* comp_op: IS */ +#line 874 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2695 "yacc_sql.cpp" +#line 2707 "yacc_sql.cpp" break; - case 111: /* comp_op: IS NOT */ -#line 866 "yacc_sql.y" + case 112: /* comp_op: IS NOT */ +#line 875 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2701 "yacc_sql.cpp" +#line 2713 "yacc_sql.cpp" break; - case 112: /* comp_op: LIKE */ -#line 867 "yacc_sql.y" + case 113: /* comp_op: LIKE */ +#line 876 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2707 "yacc_sql.cpp" +#line 2719 "yacc_sql.cpp" break; - case 113: /* comp_op: NOT LIKE */ -#line 868 "yacc_sql.y" + case 114: /* comp_op: NOT LIKE */ +#line 877 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2713 "yacc_sql.cpp" +#line 2725 "yacc_sql.cpp" break; - case 114: /* comp_op: IN */ -#line 869 "yacc_sql.y" + case 115: /* comp_op: IN */ +#line 878 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2719 "yacc_sql.cpp" +#line 2731 "yacc_sql.cpp" break; - case 115: /* comp_op: NOT IN */ -#line 870 "yacc_sql.y" + case 116: /* comp_op: NOT IN */ +#line 879 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2725 "yacc_sql.cpp" +#line 2737 "yacc_sql.cpp" break; - case 116: /* opt_order_by: %empty */ -#line 875 "yacc_sql.y" + case 117: /* opt_order_by: %empty */ +#line 884 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2733 "yacc_sql.cpp" +#line 2745 "yacc_sql.cpp" break; - case 117: /* opt_order_by: ORDER BY sort_list */ -#line 879 "yacc_sql.y" + case 118: /* opt_order_by: ORDER BY sort_list */ +#line 888 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2742 "yacc_sql.cpp" +#line 2754 "yacc_sql.cpp" break; - case 118: /* sort_list: sort_unit */ -#line 887 "yacc_sql.y" + case 119: /* sort_list: sort_unit */ +#line 896 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2751 "yacc_sql.cpp" +#line 2763 "yacc_sql.cpp" break; - case 119: /* sort_list: sort_unit COMMA sort_list */ -#line 892 "yacc_sql.y" + case 120: /* sort_list: sort_unit COMMA sort_list */ +#line 901 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2760 "yacc_sql.cpp" +#line 2772 "yacc_sql.cpp" break; - case 120: /* sort_unit: expression */ -#line 900 "yacc_sql.y" + case 121: /* sort_unit: expression */ +#line 909 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2770 "yacc_sql.cpp" +#line 2782 "yacc_sql.cpp" break; - case 121: /* sort_unit: expression DESC */ -#line 906 "yacc_sql.y" + case 122: /* sort_unit: expression DESC */ +#line 915 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2780 "yacc_sql.cpp" +#line 2792 "yacc_sql.cpp" break; - case 122: /* sort_unit: expression ASC */ -#line 912 "yacc_sql.y" + case 123: /* sort_unit: expression ASC */ +#line 921 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2790 "yacc_sql.cpp" +#line 2802 "yacc_sql.cpp" break; - case 123: /* group_by: %empty */ -#line 921 "yacc_sql.y" + case 124: /* group_by: %empty */ +#line 930 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2798 "yacc_sql.cpp" +#line 2810 "yacc_sql.cpp" break; - case 124: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 927 "yacc_sql.y" + case 125: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 936 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2808,20 +2820,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2812 "yacc_sql.cpp" +#line 2824 "yacc_sql.cpp" break; - case 125: /* explain_stmt: EXPLAIN command_wrapper */ -#line 940 "yacc_sql.y" + case 126: /* explain_stmt: EXPLAIN command_wrapper */ +#line 949 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2821 "yacc_sql.cpp" +#line 2833 "yacc_sql.cpp" break; - case 126: /* set_variable_stmt: SET ID EQ value */ -#line 948 "yacc_sql.y" + case 127: /* set_variable_stmt: SET ID EQ value */ +#line 957 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2829,11 +2841,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2833 "yacc_sql.cpp" +#line 2845 "yacc_sql.cpp" break; -#line 2837 "yacc_sql.cpp" +#line 2849 "yacc_sql.cpp" default: break; } @@ -3062,7 +3074,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 960 "yacc_sql.y" +#line 969 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 4a605ce8..8a19980a 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -592,8 +592,17 @@ setClause: } ; -select_stmt: /* select 语句的语法解析树*/ - SELECT expression_list FROM rel_list where group_by opt_order_by +select_stmt: + /* select 语句的语法解析树*/ + SELECT expression_list + { + $$ = new ParsedSqlNode(SCF_SELECT); + if ($2 != nullptr) { + $$->selection.expressions.swap(*$2); + delete $2; + } + } + | SELECT expression_list FROM rel_list where group_by opt_order_by { $$ = new ParsedSqlNode(SCF_SELECT); if ($2 != nullptr) { From 646991d5a91619ff34cd22661eb87a59c7899806 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 20:31:17 +0800 Subject: [PATCH 139/308] =?UTF-8?q?=E5=AE=9E=E7=8E=B0LENGTH,ROUND?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 31 +- src/observer/sql/expr/expression.h | 4 +- .../sql/operator/logical_operator.cpp | 1 - src/observer/sql/parser/expression_binder.cpp | 4 +- src/observer/sql/parser/yacc_sql.cpp | 498 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 17 +- src/observer/sql/stmt/calc_stmt.h | 17 +- 7 files changed, 306 insertions(+), 266 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 6aa33fe1..6a6462d0 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -632,7 +632,9 @@ RC ArithmeticExpr::try_get_value(Value &value) const UnboundFunctionExpr::UnboundFunctionExpr(const char *aggregate_name, std::vector> child) : function_name_(aggregate_name), args_(std::move(child)) { - Expression::set_name(to_string()); + if (::Expression::name_empty()) { + Expression::set_name(to_string()); + } } //////////////////////////////////////////////////////////////////////////////// @@ -876,3 +878,30 @@ RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) } return RC::SUCCESS; } +RC NormalFunctionExpr::try_get_value(Value &result) const +{ + vector args_values_; + for (auto &expr : args()) { + Value value; + RC rc = expr->try_get_value(value); + if (OB_FAIL(rc)) { + return rc; + } + args_values_.push_back(value); + } + switch (type_) { + case Type::LENGTH: { + return STD::LENGTH(args_values_, result); + } + case Type::ROUND: { + return STD::ROUND(args_values_, result); + } + case Type::DATE_FORMAT: { + return STD::DATE_FORMAT(args_values_, result); + } + default: { + return RC::INTERNAL; + } + } + return RC::SUCCESS; +} diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 85dc10e1..788b94bf 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -442,7 +442,8 @@ class UnboundFunctionExpr : public Expression return str; } - std::vector> &args() { return args_; } + std::vector> &args() { return args_; } + const std::vector> &args() const { return args_; } void set_args(std::vector> args) { args_ = std::move(args); } RC get_value(const Tuple &, Value &) override { return RC::INTERNAL; } @@ -474,6 +475,7 @@ class NormalFunctionExpr : public UnboundFunctionExpr Type function_type() const { return type_; } RC get_value(const Tuple &tuple, Value &value) override; + RC try_get_value(Value &value) const override; private: Type type_; diff --git a/src/observer/sql/operator/logical_operator.cpp b/src/observer/sql/operator/logical_operator.cpp index 502872bd..28b6dfec 100644 --- a/src/observer/sql/operator/logical_operator.cpp +++ b/src/observer/sql/operator/logical_operator.cpp @@ -21,7 +21,6 @@ bool LogicalOperator::can_generate_vectorized_operator(const LogicalOperatorType { bool bool_ret = false; switch (type) { - case LogicalOperatorType::CALC: case LogicalOperatorType::DELETE: case LogicalOperatorType::INSERT: bool_ret = false; break; diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 902ecac5..6f9f4fba 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -523,8 +523,10 @@ RC ExpressionBinder::bind_function_expression( } unbound_function_expr->set_args(std::move(child_bound_expressions)); - auto func_expr = make_unique( + string name = unbound_function_expr->name(); + auto func_expr = make_unique( func_type, unbound_function_expr->function_name(), std::move(unbound_function_expr->args())); + func_expr->set_name(name); bound_expressions.emplace_back(std::move(func_expr)); return RC::SUCCESS; } diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 349f3257..299b1eec 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -616,7 +616,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 129 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 227 +#define YYNSTATES 229 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 324 @@ -679,12 +679,12 @@ static const yytype_int16 yyrline[] = 369, 393, 396, 409, 421, 446, 450, 454, 459, 465, 468, 469, 470, 471, 475, 488, 494, 501, 507, 515, 519, 523, 529, 536, 539, 546, 558, 572, 578, 586, - 597, 605, 634, 667, 676, 679, 688, 704, 707, 710, - 713, 716, 725, 728, 733, 739, 742, 745, 752, 755, - 758, 763, 770, 777, 782, 792, 798, 808, 825, 832, - 844, 847, 853, 857, 861, 868, 869, 870, 871, 872, - 873, 874, 875, 876, 877, 878, 879, 884, 887, 895, - 900, 908, 914, 920, 930, 935, 948, 956, 966, 967 + 596, 625, 658, 664, 673, 676, 685, 701, 704, 707, + 710, 713, 722, 725, 730, 736, 739, 742, 749, 752, + 755, 760, 767, 774, 779, 789, 795, 805, 822, 829, + 841, 844, 850, 854, 858, 865, 866, 867, 868, 869, + 870, 871, 872, 873, 874, 875, 876, 881, 884, 892, + 897, 905, 911, 917, 927, 932, 945, 953, 963, 964 }; #endif @@ -745,29 +745,29 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 81, 1, 15, -14, -14, -41, 45, -154, -2, 2, - -24, -154, -154, -154, -154, -154, -6, 33, 81, 90, - 92, -154, -154, -154, -154, -154, -154, -154, -154, -154, + 102, -5, 12, 18, 18, -56, 48, -154, -21, -27, + -44, -154, -154, -154, -154, -154, -38, -18, 102, 37, + 39, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, 47, -154, 101, 49, 58, 14, -154, -154, - -154, -9, -154, -14, -154, -154, -154, -1, -154, -154, - -154, 84, -154, -154, 96, 59, 68, 91, 94, 98, - -154, -154, -154, -154, 133, 93, -154, 109, 134, 135, - -14, 97, -154, 99, -154, -14, -14, -14, -14, 136, - 103, 103, 120, 119, 104, -19, 105, 107, 117, 108, - -154, -154, 143, -154, -154, -7, -7, -154, -154, -14, - -154, 0, 119, -154, 145, -14, -154, 115, 16, -154, - -154, 137, -8, 151, 110, -154, -154, -154, 123, 155, - -154, -19, 156, 83, 41, -19, 104, -154, 170, -154, - -154, -154, -154, 95, 107, 159, 161, 103, 103, 174, - 69, -154, 163, -154, -23, -154, -154, -154, -154, -154, - -154, -154, 153, -14, -14, -14, -154, -154, 121, 124, - 154, -154, -154, -154, 151, 138, 125, 146, 119, 11, - -154, 187, -154, -154, -19, -19, -154, -154, -154, 52, - -154, 150, -154, -154, 172, -154, -154, 144, -154, 175, - 173, -14, -154, -14, -154, 80, 100, 142, 125, -154, - -27, -154, 3, -154, 176, -154, -154, 139, -154, 147, - -154, -154, -14, -154, 103, -154, -154 + -154, -154, -20, -154, 26, -14, -11, 29, -154, -154, + -154, -15, -154, 18, -154, -154, -154, -1, -154, -154, + -154, 15, -154, -154, 20, 7, 31, 30, 45, 36, + -154, -154, -154, -154, 88, 60, -154, 83, 18, 112, + 114, 18, 79, -154, 80, -154, 18, 18, 18, 18, + 123, 86, 86, 97, 111, 89, -17, 90, 92, 109, + 110, 15, -154, -154, 144, -154, -154, 19, 19, -154, + -154, 18, -154, 0, 111, -154, 146, 18, -154, 113, + -16, -154, -154, 135, 72, 153, 115, -154, -154, -154, + 124, 154, -154, -17, 156, 103, 61, -17, 89, -154, + 171, -154, -154, -154, -154, 23, 92, 160, 162, 86, + 86, 175, 91, -154, 164, -154, -25, -154, -154, -154, + -154, -154, -154, -154, 155, 18, 18, 18, -154, -154, + 121, 125, 157, -154, -154, -154, 153, 138, 127, 147, + 111, 6, -154, 186, -154, -154, -17, -17, -154, -154, + -154, 73, -154, 151, -154, -154, 173, -154, -154, 145, + -154, 176, 174, 18, -154, 18, -154, 101, 98, 143, + 127, -154, -24, -154, 10, -154, 177, -154, -154, 136, + -154, 148, -154, -154, 18, -154, 86, -154, -154 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -780,34 +780,34 @@ static const yytype_uint8 yydefact[] = 128, 23, 22, 15, 16, 17, 18, 9, 10, 11, 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, 20, 21, 0, 35, 0, 0, 0, 74, 62, 59, - 60, 93, 61, 0, 85, 83, 73, 88, 86, 87, - 84, 70, 32, 31, 0, 0, 0, 0, 0, 0, - 126, 1, 129, 2, 0, 0, 30, 0, 0, 0, - 74, 0, 82, 0, 89, 0, 0, 0, 0, 75, - 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, - 92, 81, 0, 94, 90, 77, 78, 79, 80, 74, - 95, 88, 100, 33, 0, 0, 65, 0, 100, 67, - 127, 0, 0, 41, 0, 39, 91, 76, 0, 96, - 124, 0, 54, 0, 101, 0, 0, 66, 0, 50, - 51, 52, 53, 48, 0, 0, 0, 0, 0, 117, - 0, 57, 0, 115, 0, 105, 106, 107, 108, 109, - 110, 113, 111, 0, 0, 0, 69, 68, 0, 0, - 0, 47, 46, 44, 41, 63, 0, 0, 100, 88, - 97, 0, 71, 55, 0, 0, 116, 114, 112, 102, - 103, 104, 125, 49, 0, 45, 42, 0, 40, 37, - 0, 0, 124, 0, 58, 0, 48, 0, 0, 34, - 98, 72, 121, 118, 119, 56, 43, 0, 38, 0, - 123, 122, 0, 64, 0, 120, 99 + 60, 93, 61, 0, 85, 83, 72, 88, 86, 87, + 84, 73, 32, 31, 0, 0, 0, 0, 0, 0, + 126, 1, 129, 2, 0, 0, 30, 0, 74, 0, + 0, 74, 0, 82, 0, 89, 0, 0, 0, 0, + 75, 0, 0, 0, 100, 0, 0, 0, 0, 0, + 0, 0, 92, 81, 0, 94, 90, 77, 78, 79, + 80, 74, 95, 88, 100, 33, 0, 0, 65, 0, + 100, 67, 127, 0, 0, 41, 0, 39, 91, 76, + 0, 96, 124, 0, 54, 0, 101, 0, 0, 66, + 0, 50, 51, 52, 53, 48, 0, 0, 0, 0, + 0, 117, 0, 57, 0, 115, 0, 105, 106, 107, + 108, 109, 110, 113, 111, 0, 0, 0, 69, 68, + 0, 0, 0, 47, 46, 44, 41, 63, 0, 0, + 100, 88, 97, 0, 70, 55, 0, 0, 116, 114, + 112, 102, 103, 104, 125, 49, 0, 45, 42, 0, + 40, 37, 0, 0, 124, 0, 58, 0, 48, 0, + 0, 34, 98, 71, 121, 118, 119, 56, 43, 0, + 38, 0, 123, 122, 0, 64, 0, 120, 99 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -154, -154, 184, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -4, -154, -154, 31, 63, - 4, -154, -154, -154, -154, 23, -93, -154, -154, -154, - -154, 73, 164, -154, -3, -53, 157, -154, -154, -154, - -85, 64, -11, -102, -153, -154, -154, -5, -154, 13, + -154, -154, 187, -154, -154, -154, -154, -154, -154, -154, + -154, -154, -154, -154, -154, -4, -154, -154, 32, 63, + 2, -154, -154, -154, -154, 24, -94, -154, -154, -154, + -154, 69, 165, -154, -3, -53, 158, -154, -154, -154, + -74, 64, -13, -108, -153, -154, -154, -8, -154, 13, -154, -154, -154, -154 }; @@ -815,10 +815,10 @@ static const yytype_int16 yypgoto[] = static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 200, 32, 33, 145, 123, - 173, 194, 143, 34, 132, 150, 55, 198, 35, 36, - 118, 119, 37, 38, 56, 57, 129, 58, 59, 60, - 177, 112, 178, 116, 134, 163, 182, 213, 214, 149, + 28, 29, 30, 31, 44, 202, 32, 33, 147, 125, + 175, 196, 145, 34, 134, 152, 55, 200, 35, 36, + 120, 121, 37, 38, 56, 57, 131, 58, 59, 60, + 179, 114, 180, 118, 136, 165, 184, 215, 216, 151, 39, 40, 41, 73 }; @@ -827,54 +827,54 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 82, 61, 120, 83, 83, 111, 113, 186, 220, 47, - 130, 190, 191, 42, 80, 83, 137, 48, 164, 165, - 221, 139, 48, 140, 141, 142, 62, 45, 219, 46, - 4, 81, 105, 106, 107, 108, 43, 47, 151, 65, - 187, 136, 166, 67, 79, 66, 49, 50, 210, 52, - 48, 49, 50, 51, 52, 128, 53, 54, 63, 64, - 115, 68, 133, 179, 87, 88, 84, 84, 85, 86, - 87, 88, 85, 86, 87, 88, 202, 102, 84, 49, - 50, 51, 52, 69, 53, 54, 164, 165, 1, 2, - 71, 204, 151, 183, 184, 72, 3, 4, 5, 6, - 7, 8, 9, 10, 215, 184, 127, 11, 12, 13, - 189, 133, 133, 153, 74, 75, 76, 154, 169, 14, - 15, 85, 86, 87, 88, 77, 92, 90, 16, 170, - 17, 171, 172, 18, 170, 93, 171, 172, 94, 91, - 155, 156, 157, 158, 159, 160, 161, 162, 133, 96, - 212, 95, 85, 86, 87, 88, 97, 99, 100, 101, - 98, 109, 114, 115, 103, 124, 104, 126, 131, 212, - 110, 117, 135, 121, 122, 125, 144, 146, 138, 147, - 148, 152, 168, 175, 176, 181, 185, 188, 192, 193, - 195, 197, 199, 203, 201, 164, 206, 209, 207, 217, - 208, 222, 70, 224, 218, 196, 223, 174, 205, 167, - 216, 78, 180, 226, 89, 211, 0, 225 + 83, 61, 122, 84, 84, 188, 132, 42, 81, 138, + 84, 62, 139, 192, 193, 222, 66, 113, 115, 48, + 65, 166, 167, 67, 45, 82, 46, 223, 117, 68, + 43, 221, 69, 107, 108, 109, 110, 71, 189, 153, + 75, 47, 72, 168, 80, 78, 171, 74, 49, 50, + 212, 52, 47, 76, 48, 130, 77, 172, 91, 173, + 174, 63, 64, 92, 135, 48, 85, 85, 86, 87, + 88, 89, 204, 85, 93, 101, 181, 95, 104, 86, + 87, 88, 89, 49, 50, 51, 52, 97, 53, 54, + 88, 89, 206, 153, 49, 50, 51, 52, 94, 53, + 54, 141, 96, 142, 143, 144, 166, 167, 129, 1, + 2, 98, 191, 135, 135, 185, 186, 3, 4, 5, + 6, 7, 8, 9, 10, 217, 186, 99, 11, 12, + 13, 100, 172, 155, 173, 174, 102, 156, 103, 116, + 14, 15, 86, 87, 88, 89, 105, 106, 111, 16, + 135, 17, 214, 112, 18, 117, 119, 126, 123, 124, + 157, 158, 159, 160, 161, 162, 163, 164, 128, 133, + 137, 214, 86, 87, 88, 89, 140, 127, 146, 150, + 149, 154, 148, 170, 177, 178, 183, 187, 194, 190, + 195, 199, 205, 197, 201, 203, 166, 208, 211, 209, + 219, 210, 224, 225, 226, 70, 220, 169, 198, 176, + 218, 207, 79, 228, 182, 90, 227, 213 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { - 53, 4, 95, 4, 4, 90, 91, 30, 5, 23, - 112, 164, 165, 12, 23, 4, 118, 36, 45, 46, - 17, 29, 36, 31, 32, 33, 67, 12, 55, 14, - 16, 40, 85, 86, 87, 88, 35, 23, 131, 41, - 63, 25, 135, 67, 47, 43, 65, 66, 201, 68, - 36, 65, 66, 67, 68, 55, 70, 71, 13, 14, - 44, 67, 115, 148, 71, 72, 67, 67, 69, 70, - 71, 72, 69, 70, 71, 72, 178, 80, 67, 65, - 66, 67, 68, 50, 70, 71, 45, 46, 7, 8, - 0, 184, 185, 24, 25, 3, 15, 16, 17, 18, - 19, 20, 21, 22, 24, 25, 109, 26, 27, 28, - 163, 164, 165, 30, 67, 14, 67, 34, 23, 38, - 39, 69, 70, 71, 72, 67, 67, 43, 47, 34, - 49, 36, 37, 52, 34, 67, 36, 37, 47, 43, - 57, 58, 59, 60, 61, 62, 63, 64, 201, 51, - 203, 57, 69, 70, 71, 72, 23, 48, 24, 24, - 67, 25, 42, 44, 67, 48, 67, 24, 23, 222, - 67, 67, 57, 68, 67, 67, 25, 67, 41, 56, - 25, 25, 12, 24, 23, 11, 23, 34, 67, 65, - 36, 53, 67, 6, 48, 45, 24, 24, 54, 57, - 25, 25, 18, 56, 208, 174, 67, 144, 185, 136, - 206, 47, 148, 224, 57, 202, -1, 222 + 53, 4, 96, 4, 4, 30, 114, 12, 23, 25, + 4, 67, 120, 166, 167, 5, 43, 91, 92, 36, + 41, 45, 46, 67, 12, 40, 14, 17, 44, 67, + 35, 55, 50, 86, 87, 88, 89, 0, 63, 133, + 14, 23, 3, 137, 47, 16, 23, 67, 65, 66, + 203, 68, 23, 67, 36, 55, 67, 34, 43, 36, + 37, 13, 14, 43, 117, 36, 67, 67, 69, 70, + 71, 72, 180, 67, 67, 78, 150, 47, 81, 69, + 70, 71, 72, 65, 66, 67, 68, 51, 70, 71, + 71, 72, 186, 187, 65, 66, 67, 68, 67, 70, + 71, 29, 57, 31, 32, 33, 45, 46, 111, 7, + 8, 23, 165, 166, 167, 24, 25, 15, 16, 17, + 18, 19, 20, 21, 22, 24, 25, 67, 26, 27, + 28, 48, 34, 30, 36, 37, 24, 34, 24, 42, + 38, 39, 69, 70, 71, 72, 67, 67, 25, 47, + 203, 49, 205, 67, 52, 44, 67, 48, 68, 67, + 57, 58, 59, 60, 61, 62, 63, 64, 24, 23, + 57, 224, 69, 70, 71, 72, 41, 67, 25, 25, + 56, 25, 67, 12, 24, 23, 11, 23, 67, 34, + 65, 53, 6, 36, 67, 48, 45, 24, 24, 54, + 57, 25, 25, 67, 56, 18, 210, 138, 176, 146, + 208, 187, 47, 226, 150, 57, 224, 204 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -888,22 +888,22 @@ static const yytype_int8 yystos[] = 125, 126, 12, 35, 88, 12, 14, 23, 36, 65, 66, 67, 68, 70, 71, 100, 108, 109, 111, 112, 113, 108, 67, 13, 14, 41, 43, 67, 67, 50, - 76, 0, 3, 127, 67, 14, 67, 67, 106, 108, - 23, 40, 109, 4, 67, 69, 70, 71, 72, 110, - 43, 43, 67, 67, 47, 57, 51, 23, 67, 48, - 24, 24, 108, 67, 67, 109, 109, 109, 109, 25, - 67, 114, 115, 114, 42, 44, 117, 67, 104, 105, - 100, 68, 67, 93, 48, 67, 24, 108, 55, 110, - 117, 23, 98, 109, 118, 57, 25, 117, 41, 29, - 31, 32, 33, 96, 25, 92, 67, 56, 25, 123, - 99, 100, 25, 30, 34, 57, 58, 59, 60, 61, - 62, 63, 64, 119, 45, 46, 100, 105, 12, 23, - 34, 36, 37, 94, 93, 24, 23, 114, 116, 114, - 115, 11, 120, 24, 25, 23, 30, 63, 34, 109, - 118, 118, 67, 65, 95, 36, 92, 53, 101, 67, - 89, 48, 117, 6, 100, 99, 24, 54, 25, 24, - 118, 123, 109, 121, 122, 24, 94, 57, 89, 55, - 5, 17, 25, 67, 56, 121, 116 + 76, 0, 3, 127, 67, 14, 67, 67, 16, 106, + 108, 23, 40, 109, 4, 67, 69, 70, 71, 72, + 110, 43, 43, 67, 67, 47, 57, 51, 23, 67, + 48, 108, 24, 24, 108, 67, 67, 109, 109, 109, + 109, 25, 67, 114, 115, 114, 42, 44, 117, 67, + 104, 105, 100, 68, 67, 93, 48, 67, 24, 108, + 55, 110, 117, 23, 98, 109, 118, 57, 25, 117, + 41, 29, 31, 32, 33, 96, 25, 92, 67, 56, + 25, 123, 99, 100, 25, 30, 34, 57, 58, 59, + 60, 61, 62, 63, 64, 119, 45, 46, 100, 105, + 12, 23, 34, 36, 37, 94, 93, 24, 23, 114, + 116, 114, 115, 11, 120, 24, 25, 23, 30, 63, + 34, 109, 118, 118, 67, 65, 95, 36, 92, 53, + 101, 67, 89, 48, 117, 6, 100, 99, 24, 54, + 25, 24, 118, 123, 109, 121, 122, 24, 94, 57, + 89, 55, 5, 17, 25, 67, 56, 121, 116 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -916,7 +916,7 @@ static const yytype_int8 yyr1[] = 91, 92, 92, 93, 93, 94, 94, 94, 94, 95, 96, 96, 96, 96, 97, 98, 98, 99, 99, 100, 100, 100, 100, 101, 101, 102, 103, 104, 104, 105, - 106, 106, 106, 107, 108, 108, 108, 109, 109, 109, + 106, 106, 107, 107, 108, 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 110, 110, 110, 111, 112, 113, 113, 114, 115, 115, 116, 116, 117, 117, 118, 118, 118, 119, 119, 119, 119, 119, @@ -934,7 +934,7 @@ static const yytype_int8 yyr2[] = 8, 0, 3, 6, 3, 2, 1, 1, 0, 1, 1, 1, 1, 1, 5, 3, 5, 1, 3, 1, 1, 1, 1, 0, 4, 4, 5, 1, 3, 3, - 2, 7, 9, 2, 0, 2, 4, 3, 3, 3, + 7, 9, 2, 2, 0, 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, 2, 4, 3, 6, 0, 2, 3, 3, 3, 1, 1, 1, 1, 1, @@ -2271,20 +2271,8 @@ YYLTYPE yylloc = yyloc_default; #line 2272 "yacc_sql.cpp" break; - case 70: /* select_stmt: SELECT expression_list */ -#line 598 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); - if ((yyvsp[0].expression_list) != nullptr) { - (yyval.sql_node)->selection.expressions.swap(*(yyvsp[0].expression_list)); - delete (yyvsp[0].expression_list); - } - } -#line 2284 "yacc_sql.cpp" - break; - - case 71: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 606 "yacc_sql.y" + case 70: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ +#line 597 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-5].expression_list) != nullptr) { @@ -2313,11 +2301,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2317 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; - case 72: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 635 "yacc_sql.y" + case 71: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 626 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2347,29 +2335,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2351 "yacc_sql.cpp" +#line 2339 "yacc_sql.cpp" break; - case 73: /* calc_stmt: CALC expression_list */ -#line 668 "yacc_sql.y" + case 72: /* calc_stmt: CALC expression_list */ +#line 659 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2361 "yacc_sql.cpp" +#line 2349 "yacc_sql.cpp" + break; + + case 73: /* calc_stmt: SELECT expression_list */ +#line 665 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); + (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); + delete (yyvsp[0].expression_list); + } +#line 2359 "yacc_sql.cpp" break; case 74: /* expression_list: %empty */ -#line 676 "yacc_sql.y" +#line 673 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2369 "yacc_sql.cpp" +#line 2367 "yacc_sql.cpp" break; case 75: /* expression_list: expression alias */ -#line 680 "yacc_sql.y" +#line 677 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2378,11 +2376,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2382 "yacc_sql.cpp" +#line 2380 "yacc_sql.cpp" break; case 76: /* expression_list: expression alias COMMA expression_list */ -#line 689 "yacc_sql.y" +#line 686 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2395,43 +2393,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2399 "yacc_sql.cpp" +#line 2397 "yacc_sql.cpp" break; case 77: /* expression: expression '+' expression */ -#line 704 "yacc_sql.y" +#line 701 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2407 "yacc_sql.cpp" +#line 2405 "yacc_sql.cpp" break; case 78: /* expression: expression '-' expression */ -#line 707 "yacc_sql.y" +#line 704 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2415 "yacc_sql.cpp" +#line 2413 "yacc_sql.cpp" break; case 79: /* expression: expression '*' expression */ -#line 710 "yacc_sql.y" +#line 707 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2423 "yacc_sql.cpp" +#line 2421 "yacc_sql.cpp" break; case 80: /* expression: expression '/' expression */ -#line 713 "yacc_sql.y" +#line 710 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2431 "yacc_sql.cpp" +#line 2429 "yacc_sql.cpp" break; case 81: /* expression: LBRACE expression_list RBRACE */ -#line 716 "yacc_sql.y" +#line 713 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2441,114 +2439,114 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2445 "yacc_sql.cpp" +#line 2443 "yacc_sql.cpp" break; case 82: /* expression: '-' expression */ -#line 725 "yacc_sql.y" +#line 722 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2453 "yacc_sql.cpp" +#line 2451 "yacc_sql.cpp" break; case 83: /* expression: value */ -#line 728 "yacc_sql.y" +#line 725 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2463 "yacc_sql.cpp" +#line 2461 "yacc_sql.cpp" break; case 84: /* expression: rel_attr */ -#line 733 "yacc_sql.y" +#line 730 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2474 "yacc_sql.cpp" +#line 2472 "yacc_sql.cpp" break; case 85: /* expression: '*' */ -#line 739 "yacc_sql.y" +#line 736 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2482 "yacc_sql.cpp" +#line 2480 "yacc_sql.cpp" break; case 86: /* expression: aggr_func_expr */ -#line 742 "yacc_sql.y" +#line 739 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2490 "yacc_sql.cpp" +#line 2488 "yacc_sql.cpp" break; case 87: /* expression: sub_query_expr */ -#line 745 "yacc_sql.y" +#line 742 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2498 "yacc_sql.cpp" +#line 2496 "yacc_sql.cpp" break; case 88: /* alias: %empty */ -#line 752 "yacc_sql.y" +#line 749 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2506 "yacc_sql.cpp" +#line 2504 "yacc_sql.cpp" break; case 89: /* alias: ID */ -#line 755 "yacc_sql.y" +#line 752 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2514 "yacc_sql.cpp" +#line 2512 "yacc_sql.cpp" break; case 90: /* alias: AS ID */ -#line 758 "yacc_sql.y" +#line 755 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2522 "yacc_sql.cpp" +#line 2520 "yacc_sql.cpp" break; case 91: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 764 "yacc_sql.y" +#line 761 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2530 "yacc_sql.cpp" +#line 2528 "yacc_sql.cpp" break; case 92: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 771 "yacc_sql.y" +#line 768 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2538 "yacc_sql.cpp" +#line 2536 "yacc_sql.cpp" break; case 93: /* rel_attr: ID */ -#line 777 "yacc_sql.y" +#line 774 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2548 "yacc_sql.cpp" +#line 2546 "yacc_sql.cpp" break; case 94: /* rel_attr: ID DOT ID */ -#line 782 "yacc_sql.y" +#line 779 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2556,19 +2554,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2560 "yacc_sql.cpp" +#line 2558 "yacc_sql.cpp" break; case 95: /* relation: ID */ -#line 792 "yacc_sql.y" +#line 789 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2568 "yacc_sql.cpp" +#line 2566 "yacc_sql.cpp" break; case 96: /* rel_list: relation alias */ -#line 798 "yacc_sql.y" +#line 795 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2579,11 +2577,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2583 "yacc_sql.cpp" +#line 2581 "yacc_sql.cpp" break; case 97: /* rel_list: relation alias COMMA rel_list */ -#line 808 "yacc_sql.y" +#line 805 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2598,22 +2596,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2602 "yacc_sql.cpp" +#line 2600 "yacc_sql.cpp" break; case 98: /* joinClauses: relation ON condition */ -#line 826 "yacc_sql.y" +#line 823 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2613 "yacc_sql.cpp" +#line 2611 "yacc_sql.cpp" break; case 99: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 833 "yacc_sql.y" +#line 830 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2621,196 +2619,196 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2625 "yacc_sql.cpp" +#line 2623 "yacc_sql.cpp" break; case 100: /* where: %empty */ -#line 844 "yacc_sql.y" +#line 841 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2633 "yacc_sql.cpp" +#line 2631 "yacc_sql.cpp" break; case 101: /* where: WHERE condition */ -#line 847 "yacc_sql.y" +#line 844 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2641 "yacc_sql.cpp" +#line 2639 "yacc_sql.cpp" break; case 102: /* condition: expression comp_op expression */ -#line 854 "yacc_sql.y" +#line 851 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2649 "yacc_sql.cpp" +#line 2647 "yacc_sql.cpp" break; case 103: /* condition: condition AND condition */ -#line 858 "yacc_sql.y" +#line 855 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2657 "yacc_sql.cpp" +#line 2655 "yacc_sql.cpp" break; case 104: /* condition: condition OR condition */ -#line 862 "yacc_sql.y" +#line 859 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2665 "yacc_sql.cpp" +#line 2663 "yacc_sql.cpp" break; case 105: /* comp_op: EQ */ -#line 868 "yacc_sql.y" +#line 865 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2671 "yacc_sql.cpp" +#line 2669 "yacc_sql.cpp" break; case 106: /* comp_op: LT */ -#line 869 "yacc_sql.y" +#line 866 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2677 "yacc_sql.cpp" +#line 2675 "yacc_sql.cpp" break; case 107: /* comp_op: GT */ -#line 870 "yacc_sql.y" +#line 867 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2683 "yacc_sql.cpp" +#line 2681 "yacc_sql.cpp" break; case 108: /* comp_op: LE */ -#line 871 "yacc_sql.y" +#line 868 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2689 "yacc_sql.cpp" +#line 2687 "yacc_sql.cpp" break; case 109: /* comp_op: GE */ -#line 872 "yacc_sql.y" +#line 869 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2695 "yacc_sql.cpp" +#line 2693 "yacc_sql.cpp" break; case 110: /* comp_op: NE */ -#line 873 "yacc_sql.y" +#line 870 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2701 "yacc_sql.cpp" +#line 2699 "yacc_sql.cpp" break; case 111: /* comp_op: IS */ -#line 874 "yacc_sql.y" +#line 871 "yacc_sql.y" { (yyval.comp) = OP_IS; } -#line 2707 "yacc_sql.cpp" +#line 2705 "yacc_sql.cpp" break; case 112: /* comp_op: IS NOT */ -#line 875 "yacc_sql.y" +#line 872 "yacc_sql.y" { (yyval.comp) = OP_IS_NOT; } -#line 2713 "yacc_sql.cpp" +#line 2711 "yacc_sql.cpp" break; case 113: /* comp_op: LIKE */ -#line 876 "yacc_sql.y" +#line 873 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2719 "yacc_sql.cpp" +#line 2717 "yacc_sql.cpp" break; case 114: /* comp_op: NOT LIKE */ -#line 877 "yacc_sql.y" +#line 874 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2725 "yacc_sql.cpp" +#line 2723 "yacc_sql.cpp" break; case 115: /* comp_op: IN */ -#line 878 "yacc_sql.y" +#line 875 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2731 "yacc_sql.cpp" +#line 2729 "yacc_sql.cpp" break; case 116: /* comp_op: NOT IN */ -#line 879 "yacc_sql.y" +#line 876 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2737 "yacc_sql.cpp" +#line 2735 "yacc_sql.cpp" break; case 117: /* opt_order_by: %empty */ -#line 884 "yacc_sql.y" +#line 881 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2745 "yacc_sql.cpp" +#line 2743 "yacc_sql.cpp" break; case 118: /* opt_order_by: ORDER BY sort_list */ -#line 888 "yacc_sql.y" +#line 885 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2754 "yacc_sql.cpp" +#line 2752 "yacc_sql.cpp" break; case 119: /* sort_list: sort_unit */ -#line 896 "yacc_sql.y" +#line 893 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2763 "yacc_sql.cpp" +#line 2761 "yacc_sql.cpp" break; case 120: /* sort_list: sort_unit COMMA sort_list */ -#line 901 "yacc_sql.y" +#line 898 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2772 "yacc_sql.cpp" +#line 2770 "yacc_sql.cpp" break; case 121: /* sort_unit: expression */ -#line 909 "yacc_sql.y" +#line 906 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2782 "yacc_sql.cpp" +#line 2780 "yacc_sql.cpp" break; case 122: /* sort_unit: expression DESC */ -#line 915 "yacc_sql.y" +#line 912 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2792 "yacc_sql.cpp" +#line 2790 "yacc_sql.cpp" break; case 123: /* sort_unit: expression ASC */ -#line 921 "yacc_sql.y" +#line 918 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2802 "yacc_sql.cpp" +#line 2800 "yacc_sql.cpp" break; case 124: /* group_by: %empty */ -#line 930 "yacc_sql.y" +#line 927 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2810 "yacc_sql.cpp" +#line 2808 "yacc_sql.cpp" break; case 125: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 936 "yacc_sql.y" +#line 933 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2820,20 +2818,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2824 "yacc_sql.cpp" +#line 2822 "yacc_sql.cpp" break; case 126: /* explain_stmt: EXPLAIN command_wrapper */ -#line 949 "yacc_sql.y" +#line 946 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2833 "yacc_sql.cpp" +#line 2831 "yacc_sql.cpp" break; case 127: /* set_variable_stmt: SET ID EQ value */ -#line 957 "yacc_sql.y" +#line 954 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2841,11 +2839,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2845 "yacc_sql.cpp" +#line 2843 "yacc_sql.cpp" break; -#line 2849 "yacc_sql.cpp" +#line 2847 "yacc_sql.cpp" default: break; } @@ -3074,7 +3072,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 969 "yacc_sql.y" +#line 966 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 8a19980a..b5350921 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -593,16 +593,7 @@ setClause: ; select_stmt: - /* select 语句的语法解析树*/ - SELECT expression_list - { - $$ = new ParsedSqlNode(SCF_SELECT); - if ($2 != nullptr) { - $$->selection.expressions.swap(*$2); - delete $2; - } - } - | SELECT expression_list FROM rel_list where group_by opt_order_by + SELECT expression_list FROM rel_list where group_by opt_order_by { $$ = new ParsedSqlNode(SCF_SELECT); if ($2 != nullptr) { @@ -670,6 +661,12 @@ calc_stmt: $$->calc.expressions.swap(*$2); delete $2; } + | SELECT expression_list + { + $$ = new ParsedSqlNode(SCF_CALC); + $$->calc.expressions.swap(*$2); + delete $2; + } ; expression_list: diff --git a/src/observer/sql/stmt/calc_stmt.h b/src/observer/sql/stmt/calc_stmt.h index d7a1b388..845b2f0e 100644 --- a/src/observer/sql/stmt/calc_stmt.h +++ b/src/observer/sql/stmt/calc_stmt.h @@ -19,6 +19,7 @@ See the Mulan PSL v2 for more details. */ #include "common/rc.h" #include "sql/expr/expression.h" #include "sql/stmt/stmt.h" +#include "sql/parser/expression_binder.h" class Db; class Table; @@ -38,8 +39,20 @@ class CalcStmt : public Stmt public: static RC create(CalcSqlNode &calc_sql, Stmt *&stmt) { - CalcStmt *calc_stmt = new CalcStmt(); - calc_stmt->expressions_ = std::move(calc_sql.expressions); + CalcStmt *calc_stmt = new CalcStmt(); + BinderContext binder_context; + vector> bound_expressions; + ExpressionBinder expression_binder(binder_context); + + for (unique_ptr &expression : calc_sql.expressions) { + RC rc = expression_binder.bind_expression(expression, bound_expressions); + if (OB_FAIL(rc)) { + LOG_INFO("bind expression failed. rc=%s", strrc(rc)); + return rc; + } + } + + calc_stmt->expressions_ = std::move(bound_expressions); stmt = calc_stmt; return RC::SUCCESS; } From 13f47064982ec5bc2d73be6eff6467a2b84041d6 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 20:45:42 +0800 Subject: [PATCH 140/308] =?UTF-8?q?=E5=AE=9E=E7=8E=B0LENGTH,ROUND?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/function.h | 1 + src/observer/sql/operator/insert_physical_operator.cpp | 4 ++-- src/observer/sql/operator/update_physical_operator.cpp | 2 +- src/observer/storage/index/bplus_tree.h | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/observer/sql/expr/function.h b/src/observer/sql/expr/function.h index 5646525f..a97ad174 100644 --- a/src/observer/sql/expr/function.h +++ b/src/observer/sql/expr/function.h @@ -11,6 +11,7 @@ See the Mulan PSL v2 for more details. */ #pragma once #include "common/value.h" +#include namespace STD { diff --git a/src/observer/sql/operator/insert_physical_operator.cpp b/src/observer/sql/operator/insert_physical_operator.cpp index d8f6130a..0c089623 100644 --- a/src/observer/sql/operator/insert_physical_operator.cpp +++ b/src/observer/sql/operator/insert_physical_operator.cpp @@ -25,7 +25,7 @@ RC InsertPhysicalOperator::open(Trx *trx) { RC rc; std::vector records(values_list_.size()); - for (int i = 0; i < values_list_.size(); ++i) { + for (size_t i = 0; i < values_list_.size(); ++i) { rc = table_->make_record(static_cast(values_list_[i].size()), values_list_[i].data(), records[i]); if (rc != RC::SUCCESS) { LOG_WARN("failed to make record. rc=%s", strrc(rc)); @@ -33,7 +33,7 @@ RC InsertPhysicalOperator::open(Trx *trx) } } - for (int i = 0; i < records.size(); ++i) { + for (size_t i = 0; i < records.size(); ++i) { rc = trx->insert_record(table_, records[i]); if (rc != RC::SUCCESS) { LOG_WARN("failed to insert record by transaction. rc=%s", strrc(rc)); diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index f46bcbdc..72aad50a 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -51,7 +51,7 @@ RC UpdatePhysicalOperator::open(Trx *trx) // rid 得手动拷贝 new_record.set_rid(old_record.rid()); new_record.copy_data(old_record.data(), old_record.len()); - for (int i = 0; i < field_metas_.size(); ++i) { + for (size_t i = 0; i < field_metas_.size(); ++i) { new_record.set_field(field_metas_[i].offset(), field_metas_[i].len(), values_[i]); if (field_metas_[i].nullable()) { auto null_offset = field_metas_[i].offset() + field_metas_[i].len() - 1; diff --git a/src/observer/storage/index/bplus_tree.h b/src/observer/storage/index/bplus_tree.h index 6ccbf61c..4a2bd71b 100644 --- a/src/observer/storage/index/bplus_tree.h +++ b/src/observer/storage/index/bplus_tree.h @@ -105,7 +105,7 @@ class KeyComparator { auto field_number = index_.fields().size(); auto &fields_offset = index_.fields_offset(); - for (int i = 0; i < field_number; i++) { + for (size_t i = 0; i < field_number; i++) { int offset = fields_offset[i]; int result = attr_comparator_[i](v1 + offset, v2 + offset); if (result != 0) { From 00a3feba4c742d9a769396d590843dd8730d23a5 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 20:57:02 +0800 Subject: [PATCH 141/308] =?UTF-8?q?fix=20bug:=20size=5Ft=E9=9D=9E=E8=B4=9F?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/operator/insert_physical_operator.cpp | 4 ++-- src/observer/sql/operator/update_physical_operator.cpp | 2 +- src/observer/storage/index/bplus_tree.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/observer/sql/operator/insert_physical_operator.cpp b/src/observer/sql/operator/insert_physical_operator.cpp index 0c089623..d8f6130a 100644 --- a/src/observer/sql/operator/insert_physical_operator.cpp +++ b/src/observer/sql/operator/insert_physical_operator.cpp @@ -25,7 +25,7 @@ RC InsertPhysicalOperator::open(Trx *trx) { RC rc; std::vector records(values_list_.size()); - for (size_t i = 0; i < values_list_.size(); ++i) { + for (int i = 0; i < values_list_.size(); ++i) { rc = table_->make_record(static_cast(values_list_[i].size()), values_list_[i].data(), records[i]); if (rc != RC::SUCCESS) { LOG_WARN("failed to make record. rc=%s", strrc(rc)); @@ -33,7 +33,7 @@ RC InsertPhysicalOperator::open(Trx *trx) } } - for (size_t i = 0; i < records.size(); ++i) { + for (int i = 0; i < records.size(); ++i) { rc = trx->insert_record(table_, records[i]); if (rc != RC::SUCCESS) { LOG_WARN("failed to insert record by transaction. rc=%s", strrc(rc)); diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 72aad50a..f46bcbdc 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -51,7 +51,7 @@ RC UpdatePhysicalOperator::open(Trx *trx) // rid 得手动拷贝 new_record.set_rid(old_record.rid()); new_record.copy_data(old_record.data(), old_record.len()); - for (size_t i = 0; i < field_metas_.size(); ++i) { + for (int i = 0; i < field_metas_.size(); ++i) { new_record.set_field(field_metas_[i].offset(), field_metas_[i].len(), values_[i]); if (field_metas_[i].nullable()) { auto null_offset = field_metas_[i].offset() + field_metas_[i].len() - 1; diff --git a/src/observer/storage/index/bplus_tree.h b/src/observer/storage/index/bplus_tree.h index 4a2bd71b..6ccbf61c 100644 --- a/src/observer/storage/index/bplus_tree.h +++ b/src/observer/storage/index/bplus_tree.h @@ -105,7 +105,7 @@ class KeyComparator { auto field_number = index_.fields().size(); auto &fields_offset = index_.fields_offset(); - for (size_t i = 0; i < field_number; i++) { + for (int i = 0; i < field_number; i++) { int offset = fields_offset[i]; int result = attr_comparator_[i](v1 + offset, v2 + offset); if (result != 0) { From cee9be3e18f0d913201c29fbd33aafb40afc5a75 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 21:12:12 +0800 Subject: [PATCH 142/308] =?UTF-8?q?=E5=AE=8C=E6=88=90function=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E8=BD=AC=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 788b94bf..9b0bf37f 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -474,6 +474,24 @@ class NormalFunctionExpr : public UnboundFunctionExpr Type function_type() const { return type_; } + AttrType value_type() const override + { + switch (type_) { + case Type::LENGTH: { + return AttrType::INTS; + } + case Type::ROUND: { + return AttrType::FLOATS; + } + case Type::DATE_FORMAT: { + return AttrType::CHARS; + } + default: { + return AttrType::UNDEFINED; + } + } + } + RC get_value(const Tuple &tuple, Value &value) override; RC try_get_value(Value &value) const override; From c37c6d722d2c836c645bca0ff6c74dcfb0610a30 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 22:06:43 +0800 Subject: [PATCH 143/308] =?UTF-8?q?=E5=AE=8C=E6=88=90DATE=5FFORMAT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/function.h | 59 ++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/src/observer/sql/expr/function.h b/src/observer/sql/expr/function.h index a97ad174..10103289 100644 --- a/src/observer/sql/expr/function.h +++ b/src/observer/sql/expr/function.h @@ -56,15 +56,68 @@ static inline RC DATE_FORMAT(const vector &args, Value &result) if (args.size() != 2) { return RC::INVALID_ARGUMENT; } - if (args[0].attr_type() != AttrType::DATES) { + if (args[0].attr_type() != AttrType::DATES && args[0].attr_type() != AttrType::CHARS) { return RC::INVALID_ARGUMENT; } if (args[1].attr_type() != AttrType::CHARS) { return RC::INVALID_ARGUMENT; } - // TODO: DATE_FORMAT + int year, month, day; + + if (args[0].attr_type() == AttrType::DATES) { + // 提取年、月、日(假设日期格式为YYYYMMDD) + int val = args[0].get_int(); + year = val / 10000; // 获取年份 + month = (val / 100) % 100; // 获取月份 + day = val % 100; // 获取日期 + } + + if (args[0].attr_type() == AttrType::CHARS) { + // 日期格式假设为 '2019-9-17' 或 '2019-09-17' + std::string date_str = args[0].to_string(); + sscanf(date_str.c_str(), "%d-%d-%d", &year, &month, &day); + } + + auto fmt = args[1].to_string(); + + string str; + + // 遍历格式字符串,并替换格式符 + for (size_t i = 0; i < fmt.length(); ++i) { + if (fmt[i] == '%' && i + 1 < fmt.length()) { + switch (fmt[i + 1]) { + case 'Y': // 四位数年份 + str += std::to_string(year); + break; + case 'y': // 两位数年份 + str += std::to_string(year).substr(2, 2); + break; + case 'm': // 两位数月份 + str += (month < 10 ? "0" : "") + std::to_string(month); + break; + case 'c': // 不带前导零的月份 + str += std::to_string(month); + break; + case 'd': // 两位数日期 + str += (day < 10 ? "0" : "") + std::to_string(day); + break; + case 'e': // 不带前导零的日期 + str += std::to_string(day); + break; + default: // 未知格式符,按原样输出 + str += fmt[i]; + str += fmt[i + 1]; + break; + } + ++i; // 跳过格式符的下一个字符 + } else { + str += fmt[i]; // 普通字符直接追加 + } + } + + result = Value(str.c_str()); return RC::SUCCESS; } -} // namespace STD \ No newline at end of file +} // namespace STD From c7837c558ba22448d2d8f79295e8bce7168fffe1 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 22:24:50 +0800 Subject: [PATCH 144/308] =?UTF-8?q?fix:=20DATE=5FFORMAT=E6=97=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E8=BD=AC=E6=8D=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/value.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 7bef1344..3273a63c 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -298,9 +298,7 @@ int Value::get_int() const return (int)(value_.bool_value_); } case AttrType::DATES: { - // 虽然 date 类型是用 int 存的,但是目前不需要 get_date 函数 - LOG_TRACE("failed to convert date to number. s=%d", value_.int_value_); - return 0; + return value_.int_value_; } default: { LOG_WARN("unknown data type. type=%d", attr_type_); From 17f7940c617332649daaf036a77739a30f812084 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 22:39:43 +0800 Subject: [PATCH 145/308] =?UTF-8?q?=E6=96=B0=E5=A2=9E%M,%D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/function.h | 227 +++++++++++++++++++------------ 1 file changed, 137 insertions(+), 90 deletions(-) diff --git a/src/observer/sql/expr/function.h b/src/observer/sql/expr/function.h index 10103289..4ded22f8 100644 --- a/src/observer/sql/expr/function.h +++ b/src/observer/sql/expr/function.h @@ -13,111 +13,158 @@ See the Mulan PSL v2 for more details. */ #include "common/value.h" #include -namespace STD { - -static inline RC LENGTH(const vector &args, Value &result) +class STD { - if (args.size() != 1) { - return RC::INVALID_ARGUMENT; - } - if (args[0].attr_type() != AttrType::CHARS) { - return RC::INVALID_ARGUMENT; +public: + static inline RC LENGTH(const vector &args, Value &result) + { + if (args.size() != 1) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + int length = static_cast(args[0].to_string().size()); + result = Value(length); + return RC::SUCCESS; } - int length = static_cast(args[0].to_string().size()); - result = Value(length); - return RC::SUCCESS; -} -static inline RC ROUND(const vector &args, Value &result) -{ - if (args.size() != 1 && args.size() != 2) { - return RC::INVALID_ARGUMENT; - } - float number; - int decimals = 0; // 默认四舍五入为整数 - if (args[0].attr_type() != AttrType::FLOATS) { - return RC::INVALID_ARGUMENT; - } - if (args.size() == 2) { - if (args[1].attr_type() != AttrType::INTS) { + static inline RC ROUND(const vector &args, Value &result) + { + if (args.size() != 1 && args.size() != 2) { return RC::INVALID_ARGUMENT; } - decimals = args[1].get_int(); + float number; + int decimals = 0; // 默认四舍五入为整数 + if (args[0].attr_type() != AttrType::FLOATS) { + return RC::INVALID_ARGUMENT; + } + if (args.size() == 2) { + if (args[1].attr_type() != AttrType::INTS) { + return RC::INVALID_ARGUMENT; + } + decimals = args[1].get_int(); + } + number = args[0].get_float(); + float factor = std::pow(10.f, static_cast(decimals)); + float round = std::round(number * factor) / factor; + result = Value(round); + return RC::SUCCESS; } - number = args[0].get_float(); - float factor = std::pow(10.f, static_cast(decimals)); - float round = std::round(number * factor) / factor; - result = Value(round); - return RC::SUCCESS; -} -static inline RC DATE_FORMAT(const vector &args, Value &result) -{ - if (args.size() != 2) { - return RC::INVALID_ARGUMENT; - } - if (args[0].attr_type() != AttrType::DATES && args[0].attr_type() != AttrType::CHARS) { - return RC::INVALID_ARGUMENT; - } - if (args[1].attr_type() != AttrType::CHARS) { - return RC::INVALID_ARGUMENT; - } + static inline RC DATE_FORMAT(const vector &args, Value &result) + { + if (args.size() != 2) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::DATES && args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + if (args[1].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } - int year, month, day; + int year, month, day; - if (args[0].attr_type() == AttrType::DATES) { - // 提取年、月、日(假设日期格式为YYYYMMDD) - int val = args[0].get_int(); - year = val / 10000; // 获取年份 - month = (val / 100) % 100; // 获取月份 - day = val % 100; // 获取日期 - } + if (args[0].attr_type() == AttrType::DATES) { + // 提取年、月、日(假设日期格式为YYYYMMDD) + int val = args[0].get_int(); + year = val / 10000; // 获取年份 + month = (val / 100) % 100; // 获取月份 + day = val % 100; // 获取日期 + } - if (args[0].attr_type() == AttrType::CHARS) { - // 日期格式假设为 '2019-9-17' 或 '2019-09-17' - std::string date_str = args[0].to_string(); - sscanf(date_str.c_str(), "%d-%d-%d", &year, &month, &day); - } + if (args[0].attr_type() == AttrType::CHARS) { + // 日期格式假设为 '2019-9-17' 或 '2019-09-17' + std::string date_str = args[0].to_string(); + sscanf(date_str.c_str(), "%d-%d-%d", &year, &month, &day); + } - auto fmt = args[1].to_string(); + auto fmt = args[1].to_string(); - string str; + string str; - // 遍历格式字符串,并替换格式符 - for (size_t i = 0; i < fmt.length(); ++i) { - if (fmt[i] == '%' && i + 1 < fmt.length()) { - switch (fmt[i + 1]) { - case 'Y': // 四位数年份 - str += std::to_string(year); - break; - case 'y': // 两位数年份 - str += std::to_string(year).substr(2, 2); - break; - case 'm': // 两位数月份 - str += (month < 10 ? "0" : "") + std::to_string(month); - break; - case 'c': // 不带前导零的月份 - str += std::to_string(month); - break; - case 'd': // 两位数日期 - str += (day < 10 ? "0" : "") + std::to_string(day); - break; - case 'e': // 不带前导零的日期 - str += std::to_string(day); - break; - default: // 未知格式符,按原样输出 - str += fmt[i]; - str += fmt[i + 1]; - break; + // 遍历格式字符串,并替换格式符 + for (size_t i = 0; i < fmt.length(); ++i) { + if (fmt[i] == '%' && i + 1 < fmt.length()) { + switch (fmt[i + 1]) { + case 'Y': // 四位数年份 + str += std::to_string(year); + break; + case 'y': // 两位数年份 + str += std::to_string(year).substr(2, 2); + break; + case 'm': // 两位数月份 + str += (month < 10 ? "0" : "") + std::to_string(month); + break; + case 'c': // 不带前导零的月份 + str += std::to_string(month); + break; + case 'M': // 完整的月份名称 + str += get_full_month_name(month); + break; + case 'd': // 两位数日期 + str += (day < 10 ? "0" : "") + std::to_string(day); + break; + case 'e': // 不带前导零的日期 + str += std::to_string(day); + break; + case 'D': // 带序数后缀的日期 + str += get_day_with_suffix(day); + break; + default: // 未知格式符,按原样输出 + str += fmt[i]; + str += fmt[i + 1]; + break; + } + ++i; // 跳过格式符的下一个字符 + } else { + str += fmt[i]; // 普通字符直接追加 } - ++i; // 跳过格式符的下一个字符 - } else { - str += fmt[i]; // 普通字符直接追加 } + + result = Value(str.c_str()); + return RC::SUCCESS; } - result = Value(str.c_str()); - return RC::SUCCESS; -} +private: + static inline string get_day_with_suffix(int day) + { + if (day >= 11 && day <= 13) { + return std::to_string(day) + "th"; + } + switch (day % 10) { + case 1: { + return std::to_string(day) + "st"; + } + case 2: { + return std::to_string(day) + "nd"; + } + case 3: { + return std::to_string(day) + "rd"; + } + default: { + return std::to_string(day) + "th"; + } + } + } -} // namespace STD + static inline string get_full_month_name(int month) + { + switch (month) { + case 1: return "January"; + case 2: return "February"; + case 3: return "March"; + case 4: return "April"; + case 5: return "May"; + case 6: return "June"; + case 7: return "July"; + case 8: return "August"; + case 9: return "September"; + case 10: return "October"; + case 11: return "November"; + case 12: return "December"; + default: return ""; // 如果月份值无效,返回一个错误字符串 + } + } +}; From fa8c5bd826f9d385c34cc878a1b8e0d3a5f02478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Sat, 5 Oct 2024 14:47:13 +0000 Subject: [PATCH 146/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86record=5Fpag?= =?UTF-8?q?e=5Fiterator=5F=E6=B2=A1=E6=9C=89cleanup=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.h | 8 + src/observer/sql/parser/yacc_sql.cpp | 260 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 4 + src/observer/sql/stmt/select_stmt.cpp | 9 + .../storage/record/record_manager.cpp | 3 +- src/observer/storage/record/record_manager.h | 10 +- test/case/miniob_test.py | 1 + test/case/result/primary-group-by.result | 10 +- test/case/test/primary-group-by.test | 6 +- 9 files changed, 176 insertions(+), 135 deletions(-) diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index a6c9cc7f..a99bfd42 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -554,3 +554,11 @@ class ListExpr : public Expression size_t cur_idx_ = 0; std::vector> exprs_; }; + +class order_unit_expr : public Expression +{ + + +private: + +}; \ No newline at end of file diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 0fa96ec7..d08a9ad1 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -607,16 +607,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 250 +#define YYLAST 252 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 74 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 54 /* YYNRULES -- Number of rules. */ -#define YYNRULES 132 +#define YYNRULES 133 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 233 +#define YYNSTATES 236 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 324 @@ -684,8 +684,8 @@ static const yytype_int16 yyrline[] = 754, 762, 769, 776, 781, 791, 797, 807, 824, 831, 843, 846, 852, 856, 863, 867, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, - 892, 895, 903, 908, 916, 922, 928, 938, 943, 956, - 964, 974, 975 + 892, 895, 903, 908, 916, 922, 928, 938, 941, 947, + 960, 968, 978, 979 }; #endif @@ -732,7 +732,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-161) +#define YYPACT_NINF (-163) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -746,30 +746,30 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 184, -4, 29, 119, 119, -50, 40, -161, 9, -29, - -37, -161, -161, -161, -161, -161, -30, 5, 184, 60, - 70, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, 16, -161, 49, 44, 54, 112, -161, -161, - -161, -1, -161, 119, -161, -161, -161, 0, -161, -161, - -161, 51, -161, -161, 82, 55, 57, 80, 69, 78, - -161, -161, -161, -161, 108, 65, -161, 85, 113, 114, - 79, -47, -161, 72, -161, 119, 119, 119, 119, 115, - 74, 74, 101, 107, 86, -20, 84, 102, 124, 106, - -161, -161, -161, 150, -161, -161, -161, -13, -13, -161, - -161, 119, -161, 7, 107, -161, 153, 100, -161, 131, - -15, -161, -161, 140, 81, 168, 127, -161, -161, -161, - 139, 171, -161, -20, 172, -161, -161, 12, -161, -161, - -161, -161, -161, -161, -161, 164, 27, 20, 119, -20, - 86, -161, 195, -161, -161, -161, -161, 15, 102, 185, - 190, 74, 74, 197, 68, -161, 191, -161, -161, -161, - -161, 119, 100, 100, 35, -161, -161, 148, 151, 181, - -161, -161, -161, 168, 165, 152, 173, 107, 1, -161, - 214, -161, -161, -20, -20, 35, -161, 179, -161, -161, - 201, -161, -161, 174, -161, 202, 205, 100, -161, 119, - -161, 92, -11, 169, 152, -161, -27, -161, 10, -161, - 207, -161, -161, 163, -161, 178, -161, -161, 119, -161, - 74, -161, -161 + 175, 7, 52, 150, 150, -41, 25, -163, 3, -14, + -10, -163, -163, -163, -163, -163, -7, 2, 175, 63, + 90, -163, -163, -163, -163, -163, -163, -163, -163, -163, + -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, + -163, -163, 8, -163, 81, 43, 56, 78, -163, -163, + -163, -15, -163, 150, -163, -163, -163, 0, -163, -163, + -163, 76, -163, -163, 82, 61, 62, 79, 73, 80, + -163, -163, -163, -163, 109, 66, -163, 87, 112, 113, + 88, -53, -163, 74, -163, 150, 150, 150, 150, 114, + 75, 75, 105, 106, 84, -20, 108, 85, 129, 111, + -163, -163, -163, 156, -163, -163, -163, 12, 12, -163, + -163, 150, -163, 6, 106, -163, 158, 104, -163, 127, + -12, -163, -163, 144, 22, 163, 122, -163, -163, -163, + 142, 174, 190, -20, 179, -163, -163, 11, -163, -163, + -163, -163, -163, -163, -163, 171, 28, 59, 150, -20, + 84, -163, 194, -163, -163, -163, -163, -6, 85, 183, + 185, 75, 75, 203, 199, 91, -163, 188, -163, -163, + -163, -163, 150, 104, 104, -48, -163, -163, 145, 154, + 187, -163, -163, -163, 163, 172, 159, 180, 106, 1, + -163, 150, 223, -163, -163, -20, -20, -48, -163, 186, + -163, -163, 206, -163, -163, 178, -163, 208, 210, 104, + 190, -163, 150, -163, 93, 72, 181, 159, -163, 4, + -163, 10, -163, 211, -163, -163, 168, -163, 184, -163, + -163, 150, -163, 75, -163, -163 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -779,49 +779,49 @@ static const yytype_uint8 yydefact[] = { 0, 36, 0, 0, 0, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 131, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 132, 23, 22, 15, 16, 17, 18, 9, 10, 11, 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, 20, 21, 0, 35, 0, 0, 0, 0, 62, 59, 60, 93, 61, 0, 83, 81, 72, 87, 85, 86, 82, 0, 32, 31, 0, 0, 0, 0, 0, 0, - 129, 1, 132, 2, 0, 0, 30, 0, 0, 0, + 130, 1, 133, 2, 0, 0, 30, 0, 0, 0, 0, 0, 80, 0, 88, 0, 0, 0, 0, 73, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 92, 79, 91, 0, 94, 84, 89, 75, 76, 77, 78, 0, 95, 87, 100, 33, 0, 0, 65, 0, - 100, 67, 130, 0, 0, 41, 0, 39, 90, 74, + 100, 67, 131, 0, 0, 41, 0, 39, 90, 74, 0, 96, 127, 0, 54, 118, 116, 0, 106, 107, 108, 109, 110, 111, 114, 112, 0, 101, 0, 0, 0, 66, 0, 50, 51, 52, 53, 48, 0, 0, - 0, 0, 0, 120, 0, 57, 0, 119, 117, 115, - 113, 0, 0, 0, 103, 69, 68, 0, 0, 0, - 47, 46, 44, 41, 63, 0, 0, 100, 87, 97, - 0, 70, 55, 0, 0, 102, 104, 105, 128, 49, - 0, 45, 42, 0, 40, 37, 0, 0, 127, 0, - 58, 0, 48, 0, 0, 34, 98, 71, 124, 121, - 122, 56, 43, 0, 38, 0, 126, 125, 0, 64, - 0, 123, 99 + 0, 0, 0, 0, 120, 0, 57, 0, 119, 117, + 115, 113, 0, 0, 0, 103, 69, 68, 0, 0, + 0, 47, 46, 44, 41, 63, 0, 0, 100, 87, + 97, 0, 0, 70, 55, 0, 0, 102, 104, 105, + 129, 49, 0, 45, 42, 0, 40, 37, 0, 0, + 127, 128, 0, 58, 0, 48, 0, 0, 34, 98, + 71, 124, 121, 122, 56, 43, 0, 38, 0, 126, + 125, 0, 64, 0, 123, 99 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -161, -161, 217, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, 23, -161, -161, 56, 83, - 26, -161, -161, -161, -161, 46, -93, -161, -161, -161, - -161, 93, 198, -161, -3, -53, 187, -161, -161, -161, - -84, 87, 17, -111, -160, 96, -161, 18, -161, 42, - -161, -161, -161, -161 + -163, -163, 219, -163, -163, -163, -163, -163, -163, -163, + -163, -163, -163, -163, -163, 24, -163, -163, 55, 86, + 27, -163, -163, -163, -163, 47, -93, -163, -163, -163, + -163, 95, 200, -163, -4, -52, 189, -163, -163, -163, + -84, 89, 15, -111, -162, 103, -163, 19, -163, 42, + -163, -163, -163, -163 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 206, 32, 33, 159, 125, - 182, 200, 157, 34, 134, 164, 55, 204, 35, 36, + 28, 29, 30, 31, 44, 208, 32, 33, 159, 125, + 183, 202, 157, 34, 134, 165, 55, 206, 35, 36, 120, 121, 37, 38, 56, 57, 131, 58, 59, 60, - 186, 114, 187, 118, 147, 148, 191, 219, 220, 163, + 187, 114, 188, 118, 147, 148, 193, 222, 223, 164, 39, 40, 41, 73 }; @@ -830,62 +830,62 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 82, 61, 122, 132, 83, 83, 113, 115, 42, 151, - 150, 83, 196, 197, 66, 226, 48, 62, 172, 173, - 104, 167, 80, 179, 105, 180, 181, 227, 225, 117, - 67, 43, 107, 108, 109, 110, 135, 68, 178, 81, - 165, 45, 168, 46, 79, 49, 50, 216, 52, 179, - 65, 180, 181, 63, 64, 69, 175, 136, 87, 88, - 71, 137, 130, 75, 146, 172, 173, 84, 84, 85, - 86, 87, 88, 72, 84, 169, 208, 103, 188, 85, - 86, 87, 88, 74, 138, 139, 140, 141, 142, 143, - 144, 145, 192, 193, 90, 174, 85, 86, 87, 88, - 210, 165, 47, 102, 85, 86, 87, 88, 129, 135, - 153, 76, 154, 155, 156, 48, 221, 193, 195, 146, - 146, 77, 92, 47, 93, 91, 95, 94, 4, 96, - 136, 97, 98, 99, 137, 47, 48, 100, 101, 106, - 111, 112, 47, 116, 49, 50, 51, 52, 48, 53, - 54, 117, 123, 119, 146, 48, 218, 138, 139, 140, - 141, 142, 143, 144, 145, 49, 50, 51, 52, 124, - 53, 54, 126, 127, 128, 218, 133, 49, 50, 51, - 52, 152, 53, 54, 49, 50, 51, 52, 149, 53, - 54, 1, 2, 158, 160, 161, 162, 166, 170, 3, - 4, 5, 6, 7, 8, 9, 10, 177, 190, 184, - 11, 12, 13, 185, 194, 198, 199, 201, 203, 205, - 209, 207, 14, 15, 172, 212, 223, 214, 213, 215, - 229, 16, 228, 17, 230, 70, 18, 224, 222, 202, - 211, 183, 171, 176, 89, 78, 231, 232, 0, 189, - 217 + 61, 82, 122, 132, 83, 83, 113, 115, 80, 151, + 83, 198, 199, 150, 104, 229, 48, 179, 105, 42, + 168, 85, 86, 87, 88, 81, 62, 230, 180, 66, + 181, 182, 117, 107, 108, 109, 110, 135, 63, 64, + 166, 169, 43, 79, 65, 49, 50, 219, 52, 173, + 174, 153, 69, 154, 155, 156, 176, 67, 136, 228, + 68, 130, 137, 71, 45, 146, 46, 84, 84, 85, + 86, 87, 88, 84, 170, 74, 103, 210, 189, 85, + 86, 87, 88, 87, 88, 138, 139, 140, 141, 142, + 143, 144, 145, 72, 4, 75, 175, 85, 86, 87, + 88, 47, 213, 166, 173, 174, 180, 129, 181, 182, + 76, 47, 102, 135, 48, 194, 195, 224, 195, 90, + 197, 146, 146, 77, 48, 91, 94, 47, 92, 93, + 95, 96, 97, 98, 136, 99, 100, 101, 137, 111, + 48, 106, 112, 49, 50, 51, 52, 116, 53, 54, + 117, 119, 124, 49, 50, 51, 52, 146, 53, 54, + 221, 138, 139, 140, 141, 142, 143, 144, 145, 49, + 50, 51, 52, 47, 53, 54, 123, 126, 127, 221, + 128, 133, 1, 2, 149, 152, 48, 211, 158, 160, + 3, 4, 5, 6, 7, 8, 9, 10, 161, 162, + 163, 11, 12, 13, 167, 171, 178, 185, 186, 191, + 192, 196, 200, 14, 15, 49, 50, 51, 52, 201, + 53, 54, 16, 203, 17, 205, 207, 18, 209, 212, + 215, 173, 216, 217, 218, 232, 231, 70, 226, 204, + 233, 227, 225, 214, 184, 177, 89, 78, 235, 172, + 234, 190, 220 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { - 53, 4, 95, 114, 4, 4, 90, 91, 12, 120, - 25, 4, 172, 173, 43, 5, 36, 67, 45, 46, - 67, 9, 23, 34, 71, 36, 37, 17, 55, 44, - 67, 35, 85, 86, 87, 88, 9, 67, 23, 40, - 133, 12, 30, 14, 47, 65, 66, 207, 68, 34, - 41, 36, 37, 13, 14, 50, 149, 30, 71, 72, - 0, 34, 55, 14, 117, 45, 46, 67, 67, 69, - 70, 71, 72, 3, 67, 63, 187, 80, 162, 69, - 70, 71, 72, 67, 57, 58, 59, 60, 61, 62, - 63, 64, 24, 25, 43, 148, 69, 70, 71, 72, - 193, 194, 23, 24, 69, 70, 71, 72, 111, 9, - 29, 67, 31, 32, 33, 36, 24, 25, 171, 172, - 173, 67, 67, 23, 67, 43, 57, 47, 16, 51, - 30, 23, 67, 48, 34, 23, 36, 24, 24, 67, - 25, 67, 23, 42, 65, 66, 67, 68, 36, 70, - 71, 44, 68, 67, 207, 36, 209, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 67, - 70, 71, 48, 67, 24, 228, 23, 65, 66, 67, - 68, 41, 70, 71, 65, 66, 67, 68, 57, 70, - 71, 7, 8, 25, 67, 56, 25, 25, 34, 15, - 16, 17, 18, 19, 20, 21, 22, 12, 11, 24, - 26, 27, 28, 23, 23, 67, 65, 36, 53, 67, - 6, 48, 38, 39, 45, 24, 57, 25, 54, 24, - 67, 47, 25, 49, 56, 18, 52, 214, 212, 183, - 194, 158, 146, 150, 57, 47, 228, 230, -1, 162, - 208 + 4, 53, 95, 114, 4, 4, 90, 91, 23, 120, + 4, 173, 174, 25, 67, 5, 36, 23, 71, 12, + 9, 69, 70, 71, 72, 40, 67, 17, 34, 43, + 36, 37, 44, 85, 86, 87, 88, 9, 13, 14, + 133, 30, 35, 47, 41, 65, 66, 209, 68, 45, + 46, 29, 50, 31, 32, 33, 149, 67, 30, 55, + 67, 55, 34, 0, 12, 117, 14, 67, 67, 69, + 70, 71, 72, 67, 63, 67, 80, 188, 162, 69, + 70, 71, 72, 71, 72, 57, 58, 59, 60, 61, + 62, 63, 64, 3, 16, 14, 148, 69, 70, 71, + 72, 23, 195, 196, 45, 46, 34, 111, 36, 37, + 67, 23, 24, 9, 36, 24, 25, 24, 25, 43, + 172, 173, 174, 67, 36, 43, 47, 23, 67, 67, + 57, 51, 23, 67, 30, 48, 24, 24, 34, 25, + 36, 67, 67, 65, 66, 67, 68, 42, 70, 71, + 44, 67, 67, 65, 66, 67, 68, 209, 70, 71, + 212, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 23, 70, 71, 68, 48, 67, 231, + 24, 23, 7, 8, 57, 41, 36, 191, 25, 67, + 15, 16, 17, 18, 19, 20, 21, 22, 56, 25, + 10, 26, 27, 28, 25, 34, 12, 24, 23, 6, + 11, 23, 67, 38, 39, 65, 66, 67, 68, 65, + 70, 71, 47, 36, 49, 53, 67, 52, 48, 6, + 24, 45, 54, 25, 24, 67, 25, 18, 57, 184, + 56, 217, 215, 196, 158, 150, 57, 47, 233, 146, + 231, 162, 210 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -908,14 +908,14 @@ static const yytype_int8 yystos[] = 55, 110, 117, 23, 98, 9, 30, 34, 57, 58, 59, 60, 61, 62, 63, 64, 109, 118, 119, 57, 25, 117, 41, 29, 31, 32, 33, 96, 25, 92, - 67, 56, 25, 123, 99, 100, 25, 9, 30, 63, - 34, 119, 45, 46, 109, 100, 105, 12, 23, 34, - 36, 37, 94, 93, 24, 23, 114, 116, 114, 115, - 11, 120, 24, 25, 23, 109, 118, 118, 67, 65, - 95, 36, 92, 53, 101, 67, 89, 48, 117, 6, - 100, 99, 24, 54, 25, 24, 118, 123, 109, 121, - 122, 24, 94, 57, 89, 55, 5, 17, 25, 67, - 56, 121, 116 + 67, 56, 25, 10, 123, 99, 100, 25, 9, 30, + 63, 34, 119, 45, 46, 109, 100, 105, 12, 23, + 34, 36, 37, 94, 93, 24, 23, 114, 116, 114, + 115, 6, 11, 120, 24, 25, 23, 109, 118, 118, + 67, 65, 95, 36, 92, 53, 101, 67, 89, 48, + 117, 108, 6, 100, 99, 24, 54, 25, 24, 118, + 123, 109, 121, 122, 24, 94, 57, 89, 55, 5, + 17, 25, 67, 56, 121, 116 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -933,8 +933,8 @@ static const yytype_int8 yyr1[] = 111, 111, 112, 113, 113, 114, 115, 115, 116, 116, 117, 117, 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 120, 120, 121, 121, 122, 122, 122, 123, 124, 125, - 126, 127, 127 + 120, 120, 121, 121, 122, 122, 122, 123, 123, 124, + 125, 126, 127, 127 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -952,8 +952,8 @@ static const yytype_int8 yyr2[] = 4, 3, 3, 1, 3, 1, 2, 4, 3, 6, 0, 2, 3, 2, 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, - 0, 3, 1, 3, 1, 2, 2, 0, 7, 2, - 4, 0, 1 + 0, 3, 1, 3, 1, 2, 2, 0, 3, 7, + 2, 4, 0, 1 }; @@ -2846,8 +2846,16 @@ YYLTYPE yylloc = yyloc_default; #line 2847 "yacc_sql.cpp" break; - case 128: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 944 "yacc_sql.y" + case 128: /* group_by: GROUP BY expression_list */ +#line 942 "yacc_sql.y" + { + (yyval.expression_list) = (yyvsp[0].expression_list); + } +#line 2855 "yacc_sql.cpp" + break; + + case 129: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 948 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2857,20 +2865,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2861 "yacc_sql.cpp" +#line 2869 "yacc_sql.cpp" break; - case 129: /* explain_stmt: EXPLAIN command_wrapper */ -#line 957 "yacc_sql.y" + case 130: /* explain_stmt: EXPLAIN command_wrapper */ +#line 961 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2870 "yacc_sql.cpp" +#line 2878 "yacc_sql.cpp" break; - case 130: /* set_variable_stmt: SET ID EQ value */ -#line 965 "yacc_sql.y" + case 131: /* set_variable_stmt: SET ID EQ value */ +#line 969 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2878,11 +2886,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2882 "yacc_sql.cpp" +#line 2890 "yacc_sql.cpp" break; -#line 2886 "yacc_sql.cpp" +#line 2894 "yacc_sql.cpp" default: break; } @@ -3111,7 +3119,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 977 "yacc_sql.y" +#line 981 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index ffac2761..7997e655 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -938,6 +938,10 @@ group_by: { $$ = nullptr; } + | GROUP BY expression_list + { + $$ = $3; + } ; load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 083f3b41..21ff6f88 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -94,6 +94,15 @@ RC SelectStmt::create( } } + vector> order_by_expressions; + for (OrderBySqlNode &unit : select_sql.order_by) { + RC rc = expression_binder.bind_expression(unit.expr, group_by_expressions); + if (OB_FAIL(rc)) { + LOG_INFO("bind expression failed. rc=%s", strrc(rc)); + return rc; + } + } + // create filter statement in `where` statement FilterStmt *filter_stmt = nullptr; RC rc = FilterStmt::create(db, default_table, &table_map, select_sql.conditions, filter_stmt); diff --git a/src/observer/storage/record/record_manager.cpp b/src/observer/storage/record/record_manager.cpp index c6128ef9..bc39e5aa 100644 --- a/src/observer/storage/record/record_manager.cpp +++ b/src/observer/storage/record/record_manager.cpp @@ -68,7 +68,7 @@ string PageHeader::to_string() const } //////////////////////////////////////////////////////////////////////////////// -RecordPageIterator::RecordPageIterator() {} +RecordPageIterator:: RecordPageIterator() {} RecordPageIterator::~RecordPageIterator() {} void RecordPageIterator::init(RecordPageHandler *record_page_handler, SlotNum start_slot_num /*=0*/) @@ -853,6 +853,7 @@ RC RecordFileScanner::close_scan() record_page_handler_->cleanup(); delete record_page_handler_; record_page_handler_ = nullptr; + record_page_iterator_.cleanup(); } return RC::SUCCESS; diff --git a/src/observer/storage/record/record_manager.h b/src/observer/storage/record/record_manager.h index baf4fe5f..ac7a0457 100644 --- a/src/observer/storage/record/record_manager.h +++ b/src/observer/storage/record/record_manager.h @@ -83,7 +83,7 @@ struct PageHeader class RecordPageIterator { public: - RecordPageIterator(); + RecordPageIterator(); ~RecordPageIterator(); /** @@ -111,6 +111,8 @@ class RecordPageIterator */ bool is_valid() const { return record_page_handler_ != nullptr; } + inline void cleanup() { record_page_handler_ = nullptr; } + private: RecordPageHandler *record_page_handler_ = nullptr; PageNum page_num_ = BP_INVALID_PAGE_NUM; @@ -125,8 +127,8 @@ class RecordPageIterator class RecordPageHandler { public: - RecordPageHandler(StorageFormat storage_format) : storage_format_(storage_format) {} - virtual ~RecordPageHandler(); + RecordPageHandler(StorageFormat storage_format) : storage_format_(storage_format) {} + virtual ~ RecordPageHandler(); static RecordPageHandler *create(StorageFormat format); /** @@ -357,7 +359,7 @@ class PaxRecordPageHandler : public RecordPageHandler class RecordFileHandler { public: - RecordFileHandler(StorageFormat storage_format) : storage_format_(storage_format) {}; + RecordFileHandler(StorageFormat storage_format) : storage_format_(storage_format){}; ~RecordFileHandler(); /** diff --git a/test/case/miniob_test.py b/test/case/miniob_test.py index 13c28c9f..f84bc292 100755 --- a/test/case/miniob_test.py +++ b/test/case/miniob_test.py @@ -50,6 +50,7 @@ python3 miniob_test.py --test-cases=primary-date python3 miniob_test.py --test-cases=primary-complex-sub-query python3 miniob_test.py --test-cases=primary-simple-sub-query +python3 miniob_test.py --test-cases=primary-group-by 如果要运行多个测试用例,则在 --test-cases 参数中使用 ',' 分隔写多个即可 """ diff --git a/test/case/result/primary-group-by.result b/test/case/result/primary-group-by.result index cec89e77..cb394af5 100644 --- a/test/case/result/primary-group-by.result +++ b/test/case/result/primary-group-by.result @@ -1,7 +1,7 @@ 1. CREATE TABLE -create table t_group_by (id int, score float, name char); +create table t_group_by (id int not null, score float not null, name char(1) null); SUCCESS -create table t_group_by_2 (id int, age int); +create table t_group_by_2 (id int not null, age int not null); SUCCESS 2. INSERT RECORDS @@ -40,6 +40,12 @@ select id, avg(score) from t_group_by group by id; 4 | 3 ID | AVG(SCORE) +select id, sum(score) from t_group_by group by id; +1 | 2 +3 | 12 +4 | 3 +ID | SUM(SCORE) + select name, min(id), max(score) from t_group_by group by name; A | 3 | 1 B | 1 | 2 diff --git a/test/case/test/primary-group-by.test b/test/case/test/primary-group-by.test index 01836179..616eb92a 100644 --- a/test/case/test/primary-group-by.test +++ b/test/case/test/primary-group-by.test @@ -1,6 +1,6 @@ -- echo 1. create table -create table t_group_by (id int, score float, name char); -create table t_group_by_2 (id int, age int); +create table t_group_by (id int not null, score float not null, name char(1) null); +create table t_group_by_2 (id int not null, age int not null); -- echo 2. insert records insert into t_group_by values(3, 1.0, 'a'); @@ -21,6 +21,8 @@ insert into t_group_by_2 values(4, 20); -- echo 3. primary group by -- sort select id, avg(score) from t_group_by group by id; +-- sort select id, sum(score) from t_group_by group by id; + -- sort select name, min(id), max(score) from t_group_by group by name; -- sort select id, name, avg(score) from t_group_by group by id, name; From a1593307a8bfd2966993af3b68e9ae4ab1fefaf3 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 22:55:51 +0800 Subject: [PATCH 147/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dget=5Fint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/value.cpp | 12 +++++++++++- src/observer/common/value.h | 1 + src/observer/sql/expr/function.h | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 3273a63c..6e6ca890 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -298,7 +298,9 @@ int Value::get_int() const return (int)(value_.bool_value_); } case AttrType::DATES: { - return value_.int_value_; + // 虽然 date 类型是用 int 存的,但是目前不需要 get_date 函数 + LOG_TRACE("failed to convert date to number. s=%d", value_.int_value_); + return 0; } default: { LOG_WARN("unknown data type. type=%d", attr_type_); @@ -384,3 +386,11 @@ bool Value::get_boolean() const } return false; } +int Value::get_date() const +{ + if (attr_type_ == AttrType::DATES) { + return value_.int_value_; + } else { + return 0; + } +} diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 95f91d66..21636d4d 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -117,6 +117,7 @@ class Value final float get_float() const; string get_string() const; bool get_boolean() const; + int get_date() const; bool is_null() const { return is_null_; } inline bool is_str() const { return attr_type_ == AttrType::CHARS; } diff --git a/src/observer/sql/expr/function.h b/src/observer/sql/expr/function.h index 4ded22f8..e7661c12 100644 --- a/src/observer/sql/expr/function.h +++ b/src/observer/sql/expr/function.h @@ -68,7 +68,7 @@ class STD if (args[0].attr_type() == AttrType::DATES) { // 提取年、月、日(假设日期格式为YYYYMMDD) - int val = args[0].get_int(); + int val = args[0].get_date(); year = val / 10000; // 获取年份 month = (val / 100) % 100; // 获取月份 day = val % 100; // 获取日期 From 13882949325b79a813ac921286ca530d9761af10 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 5 Oct 2024 23:06:27 +0800 Subject: [PATCH 148/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/function.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/observer/sql/expr/function.h b/src/observer/sql/expr/function.h index e7661c12..152c2cc7 100644 --- a/src/observer/sql/expr/function.h +++ b/src/observer/sql/expr/function.h @@ -113,7 +113,6 @@ class STD str += get_day_with_suffix(day); break; default: // 未知格式符,按原样输出 - str += fmt[i]; str += fmt[i + 1]; break; } From 3bb4b4b8eca404d6d4c1e2c376916372d60c9b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Sat, 5 Oct 2024 16:02:14 +0000 Subject: [PATCH 149/308] =?UTF-8?q?=E6=89=BE=E5=88=B0=E4=BA=86=E5=AD=90?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=B8=ADscale=20groupby=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=AD=A3=E5=B8=B8=E5=A4=84?= =?UTF-8?q?=E7=90=86=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 13 ++++++------- test/case/result/primary-complex-sub-query.result | 5 +++++ test/case/test/primary-complex-sub-query.test | 2 ++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 02941d73..81880248 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -262,7 +262,6 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) return RC::SUCCESS; } - // Get the value of the left expression rc = left_->get_value(tuple, left_value); if (rc != RC::SUCCESS) { @@ -820,14 +819,14 @@ RC SubQueryExpr::get_value(const Tuple &tuple, Value &value) { physical_oper_->set_parent_tuple(&tuple); RC rc = physical_oper_->next(); - if (OB_FAIL(rc)) { - return rc; - } - rc = physical_oper_->current_tuple()->cell_at(0, value); - if (rc == RC::RECORD_EOF) + if (rc == RC::RECORD_EOF) { value.set_null(true); + return RC::SUCCESS; + } + if (OB_SUCC(rc)) + rc = physical_oper_->current_tuple()->cell_at(0, value); - return RC::SUCCESS; + return rc; } RC SubQueryExpr::close() { return physical_oper_->close(); } diff --git a/test/case/result/primary-complex-sub-query.result b/test/case/result/primary-complex-sub-query.result index d499849b..969b7f9d 100644 --- a/test/case/result/primary-complex-sub-query.result +++ b/test/case/result/primary-complex-sub-query.result @@ -83,6 +83,11 @@ select * from csq_1 where col1 not in (select csq_2.col2 from csq_2 where csq_2. 3 | 3 | 13.5 ID | COL1 | FEAT1 +select * from csq_1 where feat1 <> (select min(csq_2.feat2) from csq_2 where csq_2.feat2 > csq_1.feat1); +1 | 4 | 11.2 +2 | 2 | 12 +ID | COL1 | FEAT1 + 2. SELECT WITH EMPTY TABLE select * from csq_1 where id in (select csq_2.id from csq_2 where csq_2.id in (select csq_3.id from csq_3 where 1=0)); ID | COL1 | FEAT1 diff --git a/test/case/test/primary-complex-sub-query.test b/test/case/test/primary-complex-sub-query.test index e5ef032b..a2a46a7d 100644 --- a/test/case/test/primary-complex-sub-query.test +++ b/test/case/test/primary-complex-sub-query.test @@ -39,6 +39,8 @@ INSERT INTO csq_3 VALUES (5, 5, 14.6); -- sort select * from csq_1 where col1 not in (select csq_2.col2 from csq_2 where csq_2.id in (select csq_3.id from csq_3 where csq_1.id = csq_3.id)); +-- sort select * from csq_1 where feat1 <> (select min(csq_2.feat2) from csq_2 where csq_2.feat2 > csq_1.feat1); + -- echo 2. Select with empty table -- sort select * from csq_1 where id in (select csq_2.id from csq_2 where csq_2.id in (select csq_3.id from csq_3 where 1=0)); -- sort select * from csq_1 where id in (select csq_2.id from csq_2 where csq_2.id in (select csq_3.id from csq_3 where 1=0) and 1=0); From 88c5316a426b6c21f6b29e8538cc48c56b01ae69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Sat, 5 Oct 2024 16:24:57 +0000 Subject: [PATCH 150/308] =?UTF-8?q?=E7=95=A5=E5=BE=AE=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 81880248..5ce1c778 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -264,7 +264,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) // Get the value of the left expression rc = left_->get_value(tuple, left_value); - if (rc != RC::SUCCESS) { + if (rc != RC::SUCCESS && rc != RC::RECORD_EOF) { LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); return rc; } @@ -300,7 +300,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) // Get the value of the right expression rc = right_->get_value(tuple, right_value); - if (rc != RC::SUCCESS) { + if (rc != RC::SUCCESS && rc != RC::RECORD_EOF) { LOG_WARN("failed to get value of right expression. rc=%s", strrc(rc)); return rc; } @@ -821,7 +821,7 @@ RC SubQueryExpr::get_value(const Tuple &tuple, Value &value) RC rc = physical_oper_->next(); if (rc == RC::RECORD_EOF) { value.set_null(true); - return RC::SUCCESS; + return rc; } if (OB_SUCC(rc)) rc = physical_oper_->current_tuple()->cell_at(0, value); From 32108c6a021d24d72ee48d737082d5d2fc575d8c Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 6 Oct 2024 00:35:57 +0800 Subject: [PATCH 151/308] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=AD=90?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=20in=20=E5=92=8C=20not=20in=20=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 33 +++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 737cd1f7..c0b93dec 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -269,16 +269,33 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) static_cast(right_.get())->reset(); } - bool res = false; // Flag to indicate if a match is found - bool has_null = false; // Flag to indicate if any NULL value is found - for (rc = RC::SUCCESS; rc == RC::SUCCESS; rc = right_->get_value(tuple, right_value)) { - if (right_value.is_null()) { - has_null = true; - } else if (left_value.compare(right_value) == 0) { - res = true; + // 比较表达式的结果,如果进入 while 循环且没有提前退出,那么结果即为该值 + bool res = comp_ == NOT_IN_OP; + + rc = right_->get_value(tuple, right_value); + if (rc == RC::RECORD_EOF) { + // 子查询结果为空,返回 null 值 + } else if (OB_FAIL(rc)) { + // 其他错误 + return rc; + } else if (left_value.compare(right_value) == 0) { + // 不为空才能比较,null 是不可比较的 + res = comp_ == IN_OP; + } else { + while (RC::SUCCESS == (rc = right_->get_value(tuple, right_value))) { + if (right_value.is_null()) { + // 对于 not in,一边有 null 就为假 + if (comp_ == NOT_IN_OP) { + res = false; + break; + } + } else if (left_value.compare(right_value) == 0) { + res = comp_ == IN_OP; + break; + } } } - value.set_boolean(comp_ == IN_OP ? res : (has_null ? false : !res)); + value.set_boolean(res); return rc == RC::RECORD_EOF ? RC::SUCCESS : rc; } From 6d608d9f469aebdf1f01821ddfa8596b0c57466e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Sat, 5 Oct 2024 16:42:05 +0000 Subject: [PATCH 152/308] =?UTF-8?q?alias=E5=AF=B9*=E7=9A=84=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/expression_binder.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 172a2b7e..72c3f021 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -131,6 +131,9 @@ RC ExpressionBinder::bind_star_expression( if (!is_blank(star_expr->name())) { return RC::INVALID_ALIAS; } + if (context_.query_tables().size() != 1 && is_blank(star_expr->name())) { + return RC::INVALID_ARGUMENT; + } vector
tables_to_wildcard; From 2e2f6cafa6b45cf7454157019d693b07e4a3d20a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Sat, 5 Oct 2024 16:48:59 +0000 Subject: [PATCH 153/308] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=9B=9E=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/expression_binder.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 72c3f021..172a2b7e 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -131,9 +131,6 @@ RC ExpressionBinder::bind_star_expression( if (!is_blank(star_expr->name())) { return RC::INVALID_ALIAS; } - if (context_.query_tables().size() != 1 && is_blank(star_expr->name())) { - return RC::INVALID_ARGUMENT; - } vector
tables_to_wildcard; From 07ddfea3a389d908209735059916173ec3649095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Sat, 5 Oct 2024 16:24:57 +0000 Subject: [PATCH 154/308] =?UTF-8?q?=E7=95=A5=E5=BE=AE=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index f2984481..e14d9a7c 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -248,7 +248,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) // Get the value of the left expression rc = left_->get_value(tuple, left_value); - if (rc != RC::SUCCESS) { + if (rc != RC::SUCCESS && rc != RC::RECORD_EOF) { LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); return rc; } @@ -301,7 +301,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) // Get the value of the right expression rc = right_->get_value(tuple, right_value); - if (rc != RC::SUCCESS) { + if (rc != RC::SUCCESS && rc != RC::RECORD_EOF) { LOG_WARN("failed to get value of right expression. rc=%s", strrc(rc)); return rc; } From 723635c8c61ab97233e5396eb0ff1ef8475238a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Sat, 5 Oct 2024 17:04:09 +0000 Subject: [PATCH 155/308] =?UTF-8?q?alias=E5=AF=B9=E4=BA=8E=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E8=A1=A8=E5=90=8D=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/stmt/select_stmt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 21ff6f88..4d1f6763 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -60,7 +60,8 @@ RC SelectStmt::create( // 建立别名 const string &table_alias = select_sql.relations[i].alias; if (!table_alias.empty()) { - table_map.insert({table_alias, table}); + const auto &success=table_map.insert({table_alias, table}); + if (!success.second) return RC::INVALID_ALIAS; } binder_context.add_table(table); From e287ab780b9b6d6c5401827365d9646711dbfd5b Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 6 Oct 2024 02:17:31 +0800 Subject: [PATCH 156/308] =?UTF-8?q?test:=20=E5=A2=9E=E5=BC=BA=E5=AD=90?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=9A=84=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../primary-complex-sub-query-plus.result | 62 +++++++++++++++++++ .../result/primary-simple-sub-query.result | 2 + .../test/primary-complex-sub-query-plus.test | 31 ++++++++++ test/case/test/primary-simple-sub-query.test | 3 +- 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 test/case/result/primary-complex-sub-query-plus.result create mode 100644 test/case/test/primary-complex-sub-query-plus.test diff --git a/test/case/result/primary-complex-sub-query-plus.result b/test/case/result/primary-complex-sub-query-plus.result new file mode 100644 index 00000000..fc5fa1f4 --- /dev/null +++ b/test/case/result/primary-complex-sub-query-plus.result @@ -0,0 +1,62 @@ +INITIALIZATION +CREATE TABLE CSQ_1(ID INT, COL1 INT, FEAT1 FLOAT); +SUCCESS +CREATE TABLE CSQ_2(ID INT, COL2 INT, FEAT2 FLOAT); +SUCCESS +CREATE TABLE CSQ_3(ID INT, COL3 INT, FEAT3 FLOAT); +SUCCESS + +INSERT INTO CSQ_1 VALUES (1, 4, 11.2); +SUCCESS +INSERT INTO CSQ_1 VALUES (2, 2, 12.0); +SUCCESS +INSERT INTO CSQ_1 VALUES (3, 3, 13.5); +SUCCESS +INSERT INTO CSQ_1 VALUES (4, 1, 10.8); +SUCCESS +INSERT INTO CSQ_1 VALUES (5, 5, 15.3); +SUCCESS +INSERT INTO CSQ_1 VALUES (6, 7, 12.4); +SUCCESS +INSERT INTO CSQ_1 VALUES (7, 6, 11.9); +SUCCESS + +INSERT INTO CSQ_2 VALUES (1, 2, 13.0); +SUCCESS +INSERT INTO CSQ_2 VALUES (2, 7, 10.5); +SUCCESS +INSERT INTO CSQ_2 VALUES (3, 9, 13.8); +SUCCESS +INSERT INTO CSQ_2 VALUES (4, 5, 14.1); +SUCCESS +INSERT INTO CSQ_2 VALUES (5, 3, 12.6); +SUCCESS +INSERT INTO CSQ_2 VALUES (6, 1, 10.2); +SUCCESS +INSERT INTO CSQ_2 VALUES (7, 4, 12.3); +SUCCESS + +INSERT INTO CSQ_3 VALUES (1, 2, 11.0); +SUCCESS +INSERT INTO CSQ_3 VALUES (2, 3, 13.4); +SUCCESS +INSERT INTO CSQ_3 VALUES (3, 6, 16.5); +SUCCESS +INSERT INTO CSQ_3 VALUES (4, 4, 12.9); +SUCCESS +INSERT INTO CSQ_3 VALUES (5, 5, 14.6); +SUCCESS +INSERT INTO CSQ_3 VALUES (6, 7, 11.7); +SUCCESS +INSERT INTO CSQ_3 VALUES (7, 8, 15.0); +SUCCESS + +1. SELECT +SELECT * FROM CSQ_1 WHERE FEAT1 <> (SELECT MIN(CSQ_2.FEAT2) FROM CSQ_2 WHERE CSQ_2.FEAT2 > CSQ_1.FEAT1); +1 | 4 | 11.2 +2 | 2 | 12 +3 | 3 | 13.5 +4 | 1 | 10.8 +6 | 7 | 12.4 +7 | 6 | 11.9 +ID | COL1 | FEAT1 diff --git a/test/case/result/primary-simple-sub-query.result b/test/case/result/primary-simple-sub-query.result index 0ffc1cfc..c698b122 100644 --- a/test/case/result/primary-simple-sub-query.result +++ b/test/case/result/primary-simple-sub-query.result @@ -82,6 +82,8 @@ select * from ssq_1 where feat1 <> (select avg(ssq_2.feat2) from ssq_2); ID | COL1 | FEAT1 2. SELECT WITH EMPTY TABLE +SELECT * FROM SSQ_1 WHERE COL1 NOT IN (2,NULL); +ID | COL1 | FEAT1 select * from ssq_1 where feat1 < (select max(ssq_2.feat2) from ssq_2 where 1=0); ID | COL1 | FEAT1 select * from ssq_1 where id in (select ssq_2.id from ssq_2 where 1=0); diff --git a/test/case/test/primary-complex-sub-query-plus.test b/test/case/test/primary-complex-sub-query-plus.test new file mode 100644 index 00000000..12dad880 --- /dev/null +++ b/test/case/test/primary-complex-sub-query-plus.test @@ -0,0 +1,31 @@ +-- echo initialization +CREATE TABLE csq_1(id int, col1 int, feat1 float); +CREATE TABLE csq_2(id int, col2 int, feat2 float); +CREATE TABLE csq_3(id int, col3 int, feat3 float); + +INSERT INTO csq_1 VALUES (1, 4, 11.2); +INSERT INTO csq_1 VALUES (2, 2, 12.0); +INSERT INTO csq_1 VALUES (3, 3, 13.5); +INSERT INTO csq_1 VALUES (4, 1, 10.8); +INSERT INTO csq_1 VALUES (5, 5, 15.3); +INSERT INTO csq_1 VALUES (6, 7, 12.4); +INSERT INTO csq_1 VALUES (7, 6, 11.9); + +INSERT INTO csq_2 VALUES (1, 2, 13.0); +INSERT INTO csq_2 VALUES (2, 7, 10.5); +INSERT INTO csq_2 VALUES (3, 9, 13.8); +INSERT INTO csq_2 VALUES (4, 5, 14.1); +INSERT INTO csq_2 VALUES (5, 3, 12.6); +INSERT INTO csq_2 VALUES (6, 1, 10.2); +INSERT INTO csq_2 VALUES (7, 4, 12.3); + +INSERT INTO csq_3 VALUES (1, 2, 11.0); +INSERT INTO csq_3 VALUES (2, 3, 13.4); +INSERT INTO csq_3 VALUES (3, 6, 16.5); +INSERT INTO csq_3 VALUES (4, 4, 12.9); +INSERT INTO csq_3 VALUES (5, 5, 14.6); +INSERT INTO csq_3 VALUES (6, 7, 11.7); +INSERT INTO csq_3 VALUES (7, 8, 15.0); + +-- echo 1. select +-- sort select * from csq_1 where feat1 <> (select min(csq_2.feat2) from csq_2 where csq_2.feat2 > csq_1.feat1); diff --git a/test/case/test/primary-simple-sub-query.test b/test/case/test/primary-simple-sub-query.test index 7ae8478b..2309e17c 100644 --- a/test/case/test/primary-simple-sub-query.test +++ b/test/case/test/primary-simple-sub-query.test @@ -32,6 +32,7 @@ INSERT INTO ssq_2 VALUES (5, 3, 12.6); -- sort select * from ssq_1 where feat1 <> (select avg(ssq_2.feat2) from ssq_2); -- echo 2. Select with empty table +-- sort select * from ssq_1 where col1 not in (2,null); -- sort select * from ssq_1 where feat1 < (select max(ssq_2.feat2) from ssq_2 where 1=0); -- sort select * from ssq_1 where id in (select ssq_2.id from ssq_2 where 1=0); -- sort select * from ssq_1 where id not in (select ssq_2.id from ssq_2 where 1=0); @@ -43,4 +44,4 @@ INSERT INTO ssq_2 VALUES (5, 3, 12.6); select * from ssq_1 where col1 = (select ssq_2.col2 from ssq_2); select * from ssq_1 where col1 = (select * from ssq_2); select * from ssq_1 where col1 in (select * from ssq_2); -select * from ssq_1 where col1 not in (select * from ssq_2); \ No newline at end of file +select * from ssq_1 where col1 not in (select * from ssq_2); From bf50f8a870a9f47521fe1e01566dc68edc8174b6 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sun, 6 Oct 2024 02:57:35 +0800 Subject: [PATCH 157/308] =?UTF-8?q?=E5=9C=A8MySQL=205.7=E5=8F=8A=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E7=89=88=E6=9C=AC=E4=B8=AD=EF=BC=8C=E5=94=AF?= =?UTF-8?q?=E4=B8=80=E7=B4=A2=E5=BC=95=E4=B8=8D=E5=85=81=E8=AE=B8=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E9=87=8D=E5=A4=8D=E7=9A=84=E9=9D=9E`NULL`=E5=80=BC?= =?UTF-8?q?=EF=BC=8C=E4=BD=86=E6=98=AF=E5=8F=AF=E4=BB=A5=E6=9C=89=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA`NULL`=E5=80=BC=EF=BC=8C=E5=9B=A0=E4=B8=BA`NULL`?= =?UTF-8?q?=E5=80=BC=E5=B9=B6=E4=B8=8D=E8=A2=AB=E8=A7=86=E4=B8=BA=E7=AD=89?= =?UTF-8?q?=E4=BA=8E=E5=8F=A6=E4=B8=80=E4=B8=AA`NULL`=E5=80=BC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 从MySQL 8.0开始,唯一索引的行为得到了改进,以符合SQL标准。在MySQL 8.0及更高版本中,唯一索引只允许一个`NULL`值。这意味着,如果列中已经包含了一个`NULL`值,后续尝试插入另一个`NULL`值的操作将会被拒绝,因为唯一索引要求`NULL`值也是唯一的。 --- src/observer/storage/index/bplus_tree.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/observer/storage/index/bplus_tree.h b/src/observer/storage/index/bplus_tree.h index 38fc135c..0d66ff8d 100644 --- a/src/observer/storage/index/bplus_tree.h +++ b/src/observer/storage/index/bplus_tree.h @@ -106,7 +106,18 @@ class KeyComparator auto field_number = index_.fields().size(); auto &fields_offset = index_.fields_offset(); for (int i = 0; i < field_number; i++) { - int offset = fields_offset[i]; + int offset = fields_offset[i]; + auto &field = index_.fields()[i]; + if (field.nullable()) { + bool v1_is_null = v1[offset + field.len() - 1] == '1'; + bool v2_is_null = v2[offset + field.len() - 1] == '1'; + if (v1_is_null) { + return -1; + } + if (v2_is_null) { + return 1; + } + } int result = attr_comparator_[i](v1 + offset, v2 + offset); if (result != 0) { return result; From 521b74b1316f523a3d5b23ab44e1db8253792065 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 7 Oct 2024 05:09:16 +0800 Subject: [PATCH 158/308] =?UTF-8?q?fix:=20=E5=9C=A8=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9A=84=E8=AE=B0=E5=BD=95=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E5=8D=B3=E4=BD=BF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=80=BC=E6=A0=A1=E9=AA=8C=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E4=B9=9F=E5=BA=94=E8=AF=A5=E8=BF=94=E5=9B=9E=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/operator/update_physical_operator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index c4ec94ab..7d2f1c89 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -43,6 +43,11 @@ RC UpdatePhysicalOperator::open(Trx *trx) child->close(); + // 如果需要更新的记录为空,直接返回成功,即使 value 校验异常也应该返回成功 + if (records_.empty()) { + return RC::SUCCESS; + } + // 得到真正的 value,并做校验 RowTuple tuple; Value value; From 2c17c8b27a0213ec9c095bd661be4890f978a8bb Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 7 Oct 2024 05:31:03 +0800 Subject: [PATCH 159/308] =?UTF-8?q?test:=20=E6=96=B0=E5=A2=9E=20update-sel?= =?UTF-8?q?ect=20=E7=9A=84=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-update-select.result | 126 ++++++++++++++++++ test/case/test/primary-update-select.test | 49 +++++++ 2 files changed, 175 insertions(+) create mode 100644 test/case/result/primary-update-select.result create mode 100644 test/case/test/primary-update-select.test diff --git a/test/case/result/primary-update-select.result b/test/case/result/primary-update-select.result new file mode 100644 index 00000000..5d2a503e --- /dev/null +++ b/test/case/result/primary-update-select.result @@ -0,0 +1,126 @@ +INIT DATA +CREATE TABLE UPDATE_TABLE_2(ID INT, T_NAME CHAR(4), COL1 INT, COL2 INT); +SUCCESS +CREATE TABLE UPDATE_TABLE_3(ID INT, T_NAME CHAR(4), COL1 INT, COL2 INT); +SUCCESS +INSERT INTO UPDATE_TABLE_2 VALUES (1,'N1',1,1); +SUCCESS +INSERT INTO UPDATE_TABLE_2 VALUES (2,'N2',1,1); +SUCCESS +INSERT INTO UPDATE_TABLE_2 VALUES (3,'N3',3,1); +SUCCESS +INSERT INTO UPDATE_TABLE_2 VALUES (4,'N3',4,2); +SUCCESS +INSERT INTO UPDATE_TABLE_2 VALUES (5,'N3',5,3); +SUCCESS +INSERT INTO UPDATE_TABLE_3 VALUES (1,'N1',1,1); +SUCCESS +INSERT INTO UPDATE_TABLE_3 VALUES (2,'N2',2,2); +SUCCESS +INSERT INTO UPDATE_TABLE_3 VALUES (3,'N3',3,3); +SUCCESS +INSERT INTO UPDATE_TABLE_3 VALUES (4,'N4',4,4); +SUCCESS +INSERT INTO UPDATE_TABLE_3 VALUES (5,'N5',5,5); +SUCCESS +INSERT INTO UPDATE_TABLE_3 VALUES (6,'N6',6,6); +SUCCESS +INSERT INTO UPDATE_TABLE_3 VALUES (6,'N6',6,6); +SUCCESS + +1. UPDATE-SELECT +UPDATE UPDATE_TABLE_2 SET T_NAME='N01', COL2=2 WHERE ID=1; +SUCCESS +UPDATE UPDATE_TABLE_2 SET COL1=2, COL2=(SELECT UPDATE_TABLE_3.COL2 FROM UPDATE_TABLE_3 WHERE UPDATE_TABLE_3.ID=1) WHERE ID=1; +SUCCESS +SELECT * FROM UPDATE_TABLE_2; +1 | N01 | 2 | 1 +2 | N2 | 1 | 1 +3 | N3 | 3 | 1 +4 | N3 | 4 | 2 +5 | N3 | 5 | 3 +ID | T_NAME | COL1 | COL2 + +2. UPDATE-SELECT ROWS +UPDATE UPDATE_TABLE_2 SET COL1=(SELECT UPDATE_TABLE_3.COL2 FROM UPDATE_TABLE_3) WHERE ID=1; +FAILURE +UPDATE UPDATE_TABLE_2 SET COL1=(SELECT UPDATE_TABLE_3.COL2 FROM UPDATE_TABLE_3 WHERE UPDATE_TABLE_3.ID>1) WHERE ID=1; +FAILURE +UPDATE UPDATE_TABLE_2 SET COL1=(SELECT UPDATE_TABLE_3.COL2 FROM UPDATE_TABLE_3 WHERE UPDATE_TABLE_3.ID<1) WHERE ID=1; +FAILURE +SELECT * FROM UPDATE_TABLE_2; +1 | N01 | 2 | 1 +2 | N2 | 1 | 1 +3 | N3 | 3 | 1 +4 | N3 | 4 | 2 +5 | N3 | 5 | 3 +ID | T_NAME | COL1 | COL2 + +3. UPDATE ROWS-SELECT ROWS +UPDATE UPDATE_TABLE_3 SET COL1=(SELECT COL2 FROM UPDATE_TABLE_2); +FAILURE +SELECT * FROM UPDATE_TABLE_3; +1 | N1 | 1 | 1 +2 | N2 | 2 | 2 +3 | N3 | 3 | 3 +4 | N4 | 4 | 4 +5 | N5 | 5 | 5 +6 | N6 | 6 | 6 +6 | N6 | 6 | 6 +ID | T_NAME | COL1 | COL2 + +3. UPDATE ROWS-SELECT COLS AND ROWS +UPDATE UPDATE_TABLE_3 SET COL1=(SELECT COL1, COL2 FROM UPDATE_TABLE_2); +FAILURE +SELECT * FROM UPDATE_TABLE_3; +1 | N1 | 1 | 1 +2 | N2 | 2 | 2 +3 | N3 | 3 | 3 +4 | N4 | 4 | 4 +5 | N5 | 5 | 5 +6 | N6 | 6 | 6 +6 | N6 | 6 | 6 +ID | T_NAME | COL1 | COL2 + +4. CHECK TYPECAST +UPDATE UPDATE_TABLE_3 SET T_NAME=813,COL1=547.82 WHERE ID=2; +SUCCESS +UPDATE UPDATE_TABLE_3 SET T_NAME=(SELECT UPDATE_TABLE_2.COL1 FROM UPDATE_TABLE_2 WHERE UPDATE_TABLE_2.ID=3), COL2=(SELECT MIN(UPDATE_TABLE_3.COL2) FROM UPDATE_TABLE_3 WHERE UPDATE_TABLE_3.ID=1) WHERE ID=5; +SUCCESS +SELECT * FROM UPDATE_TABLE_3; +1 | N1 | 1 | 1 +2 | 813 | 548 | 2 +3 | N3 | 3 | 3 +4 | N4 | 4 | 4 +5 | 3 | 5 | 1 +6 | N6 | 6 | 6 +6 | N6 | 6 | 6 +ID | T_NAME | COL1 | COL2 + +5. SUBQUERY RETURN NULL +UPDATE UPDATE_TABLE_3 SET COL1=2, COL2=(SELECT UPDATE_TABLE_2.COL2 FROM UPDATE_TABLE_2 WHERE UPDATE_TABLE_2.ID=999) WHERE ID=4; +FAILURE +UPDATE UPDATE_TABLE_3 SET COL1=2, COL2=(SELECT UPDATE_TABLE_2.COL2 FROM UPDATE_TABLE_2 WHERE UPDATE_TABLE_2.ID=999) WHERE ID=666; +SUCCESS +SELECT * FROM UPDATE_TABLE_3; +1 | N1 | 1 | 1 +2 | 813 | 548 | 2 +3 | N3 | 3 | 3 +4 | N4 | 4 | 4 +5 | 3 | 5 | 1 +6 | N6 | 6 | 6 +6 | N6 | 6 | 6 +ID | T_NAME | COL1 | COL2 + +6. SUBQUERY RETURN MULTIPLE ROWS +UPDATE UPDATE_TABLE_2 SET T_NAME=(SELECT UPDATE_TABLE_3.T_NAME FROM UPDATE_TABLE_3 WHERE UPDATE_TABLE_3.ID=6) WHERE COL1=5 AND COL2=3; +FAILURE +UPDATE UPDATE_TABLE_2 SET T_NAME=(SELECT UPDATE_TABLE_3.T_NAME FROM UPDATE_TABLE_3 WHERE UPDATE_TABLE_3.ID=6) WHERE COL1=5 AND COL2=6; +SUCCESS +SELECT * FROM UPDATE_TABLE_2; +1 | N01 | 2 | 1 +2 | N2 | 1 | 1 +3 | N3 | 3 | 1 +4 | N3 | 4 | 2 +5 | N3 | 5 | 3 +ID | T_NAME | COL1 | COL2 diff --git a/test/case/test/primary-update-select.test b/test/case/test/primary-update-select.test new file mode 100644 index 00000000..175e789d --- /dev/null +++ b/test/case/test/primary-update-select.test @@ -0,0 +1,49 @@ +-- echo init data +CREATE TABLE Update_table_2(id int, t_name char(4), col1 int, col2 int); +CREATE TABLE Update_table_3(id int, t_name char(4), col1 int, col2 int); +INSERT INTO Update_table_2 VALUES (1,'N1',1,1); +INSERT INTO Update_table_2 VALUES (2,'N2',1,1); +INSERT INTO Update_table_2 VALUES (3,'N3',3,1); +INSERT INTO Update_table_2 VALUES (4,'N3',4,2); +INSERT INTO Update_table_2 VALUES (5,'N3',5,3); +INSERT INTO Update_table_3 VALUES (1,'N1',1,1); +INSERT INTO Update_table_3 VALUES (2,'N2',2,2); +INSERT INTO Update_table_3 VALUES (3,'N3',3,3); +INSERT INTO Update_table_3 VALUES (4,'N4',4,4); +INSERT INTO Update_table_3 VALUES (5,'N5',5,5); +INSERT INTO Update_table_3 VALUES (6,'N6',6,6); +INSERT INTO Update_table_3 VALUES (6,'N6',6,6); + +-- echo 1. update-select +UPDATE Update_table_2 SET t_name='N01', col2=2 WHERE id=1; +UPDATE Update_table_2 SET col1=2, col2=(select Update_table_3.col2 from Update_table_3 where Update_table_3.id=1) WHERE id=1; +-- sort SELECT * FROM Update_table_2; + +-- echo 2. update-select rows +UPDATE Update_table_2 SET col1=(select Update_table_3.col2 from Update_table_3) WHERE id=1; +UPDATE Update_table_2 SET col1=(select Update_table_3.col2 from Update_table_3 where Update_table_3.id>1) WHERE id=1; +UPDATE Update_table_2 SET col1=(select Update_table_3.col2 from Update_table_3 where Update_table_3.id<1) WHERE id=1; +-- sort SELECT * FROM Update_table_2; + +-- echo 3. update rows-select rows +UPDATE Update_table_3 SET col1=(select col2 from Update_table_2); +-- sort SELECT * FROM Update_table_3; + +-- echo 3. update rows-select cols and rows +UPDATE Update_table_3 SET col1=(select col1, col2 from Update_table_2); +-- sort SELECT * FROM Update_table_3; + +-- echo 4. check typecast +UPDATE Update_table_3 SET t_name=813,col1=547.82 WHERE id=2; +UPDATE Update_table_3 SET t_name=(select Update_table_2.col1 from Update_table_2 where Update_table_2.id=3), col2=(select min(Update_table_3.col2) from Update_table_3 where Update_table_3.id=1) where id=5; +-- sort SELECT * FROM Update_table_3; + +-- echo 5. subquery return null +UPDATE Update_table_3 SET col1=2, col2=(select Update_table_2.col2 from Update_table_2 where Update_table_2.id=999) WHERE id=4; +UPDATE Update_table_3 SET col1=2, col2=(select Update_table_2.col2 from Update_table_2 where Update_table_2.id=999) WHERE id=666; +-- sort SELECT * FROM Update_table_3; + +-- echo 6. subquery return multiple rows +UPDATE Update_table_2 SET t_name=(select Update_table_3.t_name from Update_table_3 where Update_table_3.id=6) WHERE col1=5 and col2=3; +UPDATE Update_table_2 SET t_name=(select Update_table_3.t_name from Update_table_3 where Update_table_3.id=6) WHERE col1=5 and col2=6; +-- sort SELECT * FROM Update_table_2; From 29f995799e398939b529b9c83e3b7567179ea5b7 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 7 Oct 2024 05:33:16 +0800 Subject: [PATCH 160/308] =?UTF-8?q?build:=20=E7=A7=BB=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=9A=84=20DEBUG=20=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bb7a921..89b4291c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,6 @@ SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) -SET(DEBUG ON CACHE BOOL "Enable debug mode" FORCE) OPTION(ENABLE_ASAN "Enable build with address sanitizer" ON) OPTION(ENABLE_TSAN "Build with thread sanitizer" OFF) OPTION(ENABLE_UBSAN "Build with undefined behavior sanitizer" OFF) From fda1adb087e2ea9a4818f2f94ebe83e3b7ed1a9d Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 7 Oct 2024 14:43:32 +0800 Subject: [PATCH 161/308] =?UTF-8?q?fix:=20=E5=86=8D=E6=AC=A1=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20count(*)=20=E8=A1=A8=E5=A4=B4=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E6=98=9F=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 1 + src/observer/sql/parser/expression_binder.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index e14d9a7c..7bf1bfe0 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -906,6 +906,7 @@ RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) } return RC::SUCCESS; } + RC NormalFunctionExpr::try_get_value(Value &result) const { vector args_values_; diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 05ddbcb1..292efcb6 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -483,6 +483,7 @@ RC ExpressionBinder::bind_function_expression( child_expr.reset(value_expr); // count(*) 输出星号 child_expr->set_name("*"); + unbound_function_expr->set_name(unbound_function_expr->to_string()); } else { rc = bind_expression(child_expr, child_bound_expressions); if (OB_FAIL(rc)) { From 9ce408ef25faee8c285a8a4e22f12596916b44fa Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 7 Oct 2024 17:19:54 +0800 Subject: [PATCH 162/308] =?UTF-8?q?fix=20bug:=20=E8=81=9A=E5=90=88?= =?UTF-8?q?=E7=A9=BA=E5=80=BC=E4=B8=8D=E8=BE=93=E5=87=BANULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/aggregator.h | 76 +++++++++++++----------------- 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/src/observer/sql/expr/aggregator.h b/src/observer/sql/expr/aggregator.h index feac3d34..b1d9a542 100644 --- a/src/observer/sql/expr/aggregator.h +++ b/src/observer/sql/expr/aggregator.h @@ -31,10 +31,10 @@ class CountAggregator : public Aggregator public: RC accumulate(const Value &value) override { - // 只要传入的值类型不为未定义,就增加计数 - if (value.attr_type() != AttrType::UNDEFINED && !value.is_null()) { - count_++; + if (value.is_null()) { + return RC::SUCCESS; } + count_++; return RC::SUCCESS; } @@ -54,15 +54,12 @@ class SumAggregator : public Aggregator RC accumulate(const Value &value) override { if (value.is_null()) { - if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { - value_ = Value(NullValue()); - } + return RC::SUCCESS; + } + if (value_.is_null()) { + value_ = value; } else { - if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { - value_ = value; - } else { - Value::add(value, value_, value_); - } + Value::add(value, value_, value_); } return RC::SUCCESS; } @@ -74,7 +71,7 @@ class SumAggregator : public Aggregator } private: - Value value_; // 累加的和 + Value value_ = Value(NullValue()); // 累加的和 }; class AvgAggregator : public Aggregator @@ -83,17 +80,14 @@ class AvgAggregator : public Aggregator RC accumulate(const Value &value) override { if (value.is_null()) { - if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { - value_ = Value(NullValue()); - } + return RC::SUCCESS; + } + if (value_.is_null()) { + value_ = value; + count_ = 1; } else { - if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { - value_ = value; - count_ = 1; - } else { - Value::add(value, value_, value_); - count_++; - } + Value::add(value, value_, value_); + count_++; } return RC::SUCCESS; } @@ -117,8 +111,8 @@ class AvgAggregator : public Aggregator } private: - Value value_; // 累加的和 - int count_ = 0; // 计数器 + Value value_ = Value(NullValue()); // 累加的和 + int count_ = 0; // 计数器 }; class MaxAggregator : public Aggregator @@ -127,17 +121,14 @@ class MaxAggregator : public Aggregator RC accumulate(const Value &value) override { if (value.is_null()) { - if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { - value_ = Value(NullValue()); - } + return RC::SUCCESS; + } + if (value_.is_null()) { + value_ = value; } else { - if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { + // 更新最大值 + if (value.compare(value_) > 0) { value_ = value; - } else { - // 更新最大值 - if (value.compare(value_) > 0) { - value_ = value; - } } } return RC::SUCCESS; @@ -150,7 +141,7 @@ class MaxAggregator : public Aggregator } private: - Value value_; // 最大值 + Value value_ = Value(NullValue()); // 最大值 }; class MinAggregator : public Aggregator @@ -159,17 +150,14 @@ class MinAggregator : public Aggregator RC accumulate(const Value &value) override { if (value.is_null()) { - if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { - value_ = Value(NullValue()); - } + return RC::SUCCESS; + } + if (value_.is_null()) { + value_ = value; } else { - if (value_.attr_type() == AttrType::UNDEFINED || value_.attr_type() == AttrType::NULLS) { + // 更新最小值 + if (value.compare(value_) < 0) { value_ = value; - } else { - // 更新最小值 - if (value.compare(value_) < 0) { - value_ = value; - } } } return RC::SUCCESS; @@ -182,5 +170,5 @@ class MinAggregator : public Aggregator } private: - Value value_; // 最小值 + Value value_ = Value(NullValue()); // 最小值 }; From 1a0e93bb9878f8abcd6ccf32ffe4d757d5c080ca Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 7 Oct 2024 18:26:21 +0800 Subject: [PATCH 163/308] =?UTF-8?q?=E5=9C=A8function=E4=B8=AD=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=97=A5=E6=9C=9F=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/function.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/observer/sql/expr/function.h b/src/observer/sql/expr/function.h index 152c2cc7..503f81ad 100644 --- a/src/observer/sql/expr/function.h +++ b/src/observer/sql/expr/function.h @@ -11,6 +11,7 @@ See the Mulan PSL v2 for more details. */ #pragma once #include "common/value.h" +#include "common/utils.h" #include class STD @@ -80,6 +81,10 @@ class STD sscanf(date_str.c_str(), "%d-%d-%d", &year, &month, &day); } + if (!check_date(year, month, day)) { + return RC::ERROR_DATE; + } + auto fmt = args[1].to_string(); string str; From ea0a070de525cf3de91d04510ca87abe80860abc Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 7 Oct 2024 19:09:29 +0800 Subject: [PATCH 164/308] =?UTF-8?q?fix=20bug:=20=E8=81=9A=E5=90=88?= =?UTF-8?q?=E7=A9=BA=E5=80=BC=E4=B8=8D=E8=BE=93=E5=87=BANULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/aggregator.h | 131 ++++++++--------------------- 1 file changed, 37 insertions(+), 94 deletions(-) diff --git a/src/observer/sql/expr/aggregator.h b/src/observer/sql/expr/aggregator.h index b1d9a542..4f1b8d9d 100644 --- a/src/observer/sql/expr/aggregator.h +++ b/src/observer/sql/expr/aggregator.h @@ -2,16 +2,12 @@ miniob is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: - http://license.coscl.org.cn/MulanPSL2 + http: THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -// -// Created by Wangyunlai on 2024/05/29. -// - #pragma once #include "common/value.h" @@ -24,6 +20,9 @@ class Aggregator virtual RC accumulate(const Value &value) = 0; virtual RC evaluate(Value &result) = 0; + +protected: + Value value_ = Value(NullValue()); }; class CountAggregator : public Aggregator @@ -40,38 +39,12 @@ class CountAggregator : public Aggregator RC evaluate(Value &result) override { - result = Value(count_); // 返回计数结果 - return RC::SUCCESS; - } - -private: - int count_ = 0; // 计数器 -}; - -class SumAggregator : public Aggregator -{ -public: - RC accumulate(const Value &value) override - { - if (value.is_null()) { - return RC::SUCCESS; - } - if (value_.is_null()) { - value_ = value; - } else { - Value::add(value, value_, value_); - } - return RC::SUCCESS; - } - - RC evaluate(Value &result) override - { - result = value_; + result = Value(count_); return RC::SUCCESS; } private: - Value value_ = Value(NullValue()); // 累加的和 + int count_ = 0; }; class AvgAggregator : public Aggregator @@ -94,81 +67,51 @@ class AvgAggregator : public Aggregator RC evaluate(Value &result) override { - if (value_.is_null()) { - result = Value(NullValue()); - return RC::SUCCESS; - } - - if (count_ == 0) { - result = Value(0); // 避免除以零 - } else { - // 计算平均值 + if (count_ > 0) { Value avg = value_; - avg = Value(avg.get_float() / static_cast(count_)); // 这里假设 value_ 是 float 类型 + avg = Value(avg.get_float() / static_cast(count_)); result = avg; + } else { + result = Value(NullValue()); } return RC::SUCCESS; } private: - Value value_ = Value(NullValue()); // 累加的和 - int count_ = 0; // 计数器 + int count_ = 0; }; -class MaxAggregator : public Aggregator -{ -public: - RC accumulate(const Value &value) override - { - if (value.is_null()) { - return RC::SUCCESS; - } - if (value_.is_null()) { - value_ = value; - } else { - // 更新最大值 - if (value.compare(value_) > 0) { - value_ = value; - } - } - return RC::SUCCESS; +#define _agg(FUN) \ +public: \ + RC accumulate(const Value &value) override \ + { \ + if (value.is_null()) { \ + return RC::SUCCESS; \ + } \ + if (value_.is_null()) { \ + value_ = value; \ + } else { \ + FUN; \ + } \ + return RC::SUCCESS; \ + } \ + RC evaluate(Value &result) override \ + { \ + result = value_; \ + return RC::SUCCESS; \ } - RC evaluate(Value &result) override - { - result = value_; // 返回最大值 - return RC::SUCCESS; - } +class SumAggregator : public Aggregator +{ + _agg(Value::add(value, value_, value_)) +}; -private: - Value value_ = Value(NullValue()); // 最大值 +class MaxAggregator : public Aggregator +{ + _agg(if (value.compare(value_) > 0) { value_ = value; }) }; class MinAggregator : public Aggregator { -public: - RC accumulate(const Value &value) override - { - if (value.is_null()) { - return RC::SUCCESS; - } - if (value_.is_null()) { - value_ = value; - } else { - // 更新最小值 - if (value.compare(value_) < 0) { - value_ = value; - } - } - return RC::SUCCESS; - } - - RC evaluate(Value &result) override - { - result = value_; // 返回最小值 - return RC::SUCCESS; - } - -private: - Value value_ = Value(NullValue()); // 最小值 + _agg(if (value.compare(value_) < 0) { value_ = value; }) }; From 48494c8649d62922bf305838ff22025c7f8fcdd5 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 7 Oct 2024 19:18:19 +0800 Subject: [PATCH 165/308] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/function.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/observer/sql/expr/function.h b/src/observer/sql/expr/function.h index 503f81ad..dea0eb7e 100644 --- a/src/observer/sql/expr/function.h +++ b/src/observer/sql/expr/function.h @@ -78,7 +78,9 @@ class STD if (args[0].attr_type() == AttrType::CHARS) { // 日期格式假设为 '2019-9-17' 或 '2019-09-17' std::string date_str = args[0].to_string(); - sscanf(date_str.c_str(), "%d-%d-%d", &year, &month, &day); + if (sscanf(date_str.c_str(), "%d-%d-%d", &year, &month, &day) != 3) { + return RC::INVALID_ARGUMENT; + } } if (!check_date(year, month, day)) { From 8676f9a1e56b7ab7139ee96627901e9d45b3edf5 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 7 Oct 2024 23:39:38 +0800 Subject: [PATCH 166/308] =?UTF-8?q?feat:=20text=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=AD=98=E5=82=A8=E6=9C=80=E5=A4=9A=2065535?= =?UTF-8?q?=20=E5=AD=97=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/obclient/client.cpp | 2 +- src/observer/common/ini_setting.h | 2 +- src/observer/common/value.cpp | 2 +- src/observer/common/value.h | 2 +- src/observer/net/cli_communicator.cpp | 2 +- src/observer/net/plain_communicator.cpp | 2 +- src/observer/sql/parser/yacc_sql.cpp | 2 +- src/observer/sql/parser/yacc_sql.y | 2 +- src/observer/storage/buffer/page.h | 2 +- test/perf/client_performance_test.cpp | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/obclient/client.cpp b/src/obclient/client.cpp index 66c2f7e4..a383ff46 100644 --- a/src/obclient/client.cpp +++ b/src/obclient/client.cpp @@ -35,7 +35,7 @@ See the Mulan PSL v2 for more details. */ #include "readline/readline.h" #endif -#define MAX_MEM_BUFFER_SIZE 8192 +#define MAX_MEM_BUFFER_SIZE 131072 #define PORT_DEFAULT 6789 using namespace std; diff --git a/src/observer/common/ini_setting.h b/src/observer/common/ini_setting.h index 74a35de3..b26eb076 100644 --- a/src/observer/common/ini_setting.h +++ b/src/observer/common/ini_setting.h @@ -22,6 +22,6 @@ See the Mulan PSL v2 for more details. */ #define PORT "PORT" #define PORT_DEFAULT 6789 -#define SOCKET_BUFFER_SIZE 8192 +#define SOCKET_BUFFER_SIZE 131072 #define SESSION_STAGE_NAME "SessionStage" diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index db52825f..5e6b9aa2 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -204,7 +204,7 @@ void Value::set_string(const char *s, int len /*= 0*/) } } -void Value::set_text(const char *s, int len /*= 0*/) +void Value::set_text(const char *s, int len /*= 65535*/) { reset(); attr_type_ = AttrType::TEXTS; diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 7813e9b7..dbc7b68e 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -137,7 +137,7 @@ class Value final void set_float(float val); void set_date(int val); void set_string(const char *s, int len = 0); - void set_text(const char *s, int len = 0); + void set_text(const char *s, int len = 65535); void set_string_from_other(const Value &other); private: diff --git a/src/observer/net/cli_communicator.cpp b/src/observer/net/cli_communicator.cpp index f429f391..432cda89 100644 --- a/src/observer/net/cli_communicator.cpp +++ b/src/observer/net/cli_communicator.cpp @@ -28,7 +28,7 @@ See the Mulan PSL v2 for more details. */ #include "readline/readline.h" #endif -#define MAX_MEM_BUFFER_SIZE 8192 +#define MAX_MEM_BUFFER_SIZE 131072 #define PORT_DEFAULT 6789 using namespace common; diff --git a/src/observer/net/plain_communicator.cpp b/src/observer/net/plain_communicator.cpp index 98e0830f..71509490 100644 --- a/src/observer/net/plain_communicator.cpp +++ b/src/observer/net/plain_communicator.cpp @@ -37,7 +37,7 @@ RC PlainCommunicator::read_event(SessionEvent *&event) int data_len = 0; int read_len = 0; - const int max_packet_size = 8192; + const int max_packet_size = 131072; vector buf(max_packet_size); // 持续接收消息,直到遇到'\0'。将'\0'遇到的后续数据直接丢弃没有处理,因为目前仅支持一收一发的模式 diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 1e2af93c..380c26db 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -3750,7 +3750,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } else if ((yyval.attr_info)->type == AttrType::CHARS) { (yyval.attr_info)->length = 4; } else if ((yyval.attr_info)->type == AttrType::TEXTS) { - (yyval.attr_info)->length = 4096; + (yyval.attr_info)->length = 65535; } else { ASSERT(false, "$$->type is invalid."); } diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 5467970c..32fae0f5 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -433,7 +433,7 @@ attr_def: } else if ($$->type == AttrType::CHARS) { $$->length = 4; } else if ($$->type == AttrType::TEXTS) { - $$->length = 4096; + $$->length = 65535; } else { ASSERT(false, "$$->type is invalid."); } diff --git a/src/observer/storage/buffer/page.h b/src/observer/storage/buffer/page.h index d180aec0..8b1fd94b 100644 --- a/src/observer/storage/buffer/page.h +++ b/src/observer/storage/buffer/page.h @@ -23,7 +23,7 @@ static constexpr PageNum BP_INVALID_PAGE_NUM = -1; static constexpr PageNum BP_HEADER_PAGE = 0; -static constexpr const int BP_PAGE_SIZE = (1 << 13); +static constexpr const int BP_PAGE_SIZE = (1 << 17); // 128KB static constexpr const int BP_PAGE_DATA_SIZE = (BP_PAGE_SIZE - sizeof(PageNum) - sizeof(LSN) - sizeof(CheckSum)); /** diff --git a/test/perf/client_performance_test.cpp b/test/perf/client_performance_test.cpp index 25d2ddc7..fa4b8ee0 100644 --- a/test/perf/client_performance_test.cpp +++ b/test/perf/client_performance_test.cpp @@ -29,7 +29,7 @@ See the Mulan PSL v2 for more details. */ #include "common/metrics/metrics.h" #include "common/metrics/metrics_registry.h" -#define MAX_MEM_BUFFER_SIZE 8192 +#define MAX_MEM_BUFFER_SIZE 131072 #define PORT_DEFAULT 6789 using namespace common; From be93359ab8830d6d41542206999dc9ae8103fa7a Mon Sep 17 00:00:00 2001 From: Koschei Date: Tue, 8 Oct 2024 01:03:55 +0800 Subject: [PATCH 167/308] =?UTF-8?q?fix:=20=E5=A6=82=E6=9E=9C=E6=8F=92?= =?UTF-8?q?=E5=85=A5=E6=88=96=E6=9B=B4=E6=96=B0=E7=9A=84=20text=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E9=95=BF=E5=BA=A6=E8=B6=85=E8=BF=87=2065535?= =?UTF-8?q?=20=E5=BA=94=E8=AF=A5=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/char_type.cpp | 3 +++ src/observer/common/value.cpp | 13 ++++++++++ src/observer/common/value.h | 2 ++ .../sql/operator/update_physical_operator.cpp | 6 ++--- src/observer/storage/table/table.cpp | 24 +++++++++++++------ 5 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index 783664aa..fb39d0c0 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -34,6 +34,9 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ { switch (type) { case AttrType::TEXTS: { + if (val.length() > 65535) { + return RC::VALUE_TOO_LONG; + } result.set_text(val.value_.pointer_value_, val.length_); } break; case AttrType::DATES: { diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 5e6b9aa2..9b5a3be5 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -428,3 +428,16 @@ int Value::get_date() const return 0; } } + +RC Value::borrow_text(const Value &v) +{ + ASSERT(v.attr_type() != AttrType::TEXTS, "Only text type can be borrowed! "); + if (v.length_ > 65535) { + return RC::VALUE_TOO_LONG; + } + reset(); + attr_type_ = AttrType::TEXTS; + value_.pointer_value_ = v.value_.pointer_value_; + length_ = v.length_; + return RC::SUCCESS; +} diff --git a/src/observer/common/value.h b/src/observer/common/value.h index dbc7b68e..47d2891e 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -110,6 +110,8 @@ class Value final int length() const { return length_; } AttrType attr_type() const { return attr_type_; } + RC borrow_text(const Value &v); + public: /** * 获取对应的值 diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 7d2f1c89..2db6524d 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -83,10 +83,10 @@ RC UpdatePhysicalOperator::open(Trx *trx) // 更新不允许非目标类型的类型提升 rc = Value::cast_to(value, field_meta.type(), to_value, false); if (rc != RC::SUCCESS) { - LOG_ERROR("Schema field type mismatch and cast to failed. Field: %s, Expected Type: %s, Provided Type: %s", - field_meta.name(), + LOG_ERROR("Schema field type mismatch and cast to failed. Field: %s, Expected Type: %s, Provided Type: %s, Length: %d", + field_meta.name(), attr_type_to_string(field_meta.type()), - attr_type_to_string(value.attr_type())); + attr_type_to_string(value.attr_type()), value.length()); return RC::SCHEMA_FIELD_TYPE_MISMATCH; } // 转换成功 diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 99e7088f..08630853 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -302,12 +302,22 @@ RC Table::make_record(int value_num, const Value *values, Record &record) const Value &value = values[i]; if (field->type() != value.attr_type()) { Value real_value; - // 插入不允许非目标类型的类型提升 - rc = Value::cast_to(value, field->type(), real_value, false); - if (OB_FAIL(rc)) { - LOG_WARN("failed to cast value. table name:%s, field name:%s, value:%s", - table_meta_.name(), field->name(), value.to_string().c_str()); - break; + if (field->type() == AttrType::TEXTS && value.attr_type() == AttrType::CHARS) { + // 对于超长文本通过借用的方法减少拷贝 + rc = real_value.borrow_text(value); + if (OB_FAIL(rc)) { + LOG_WARN("failed to borrow text value. table name:%s, field name:%s, value length:%d", + table_meta_.name(), field->name(), value.length()); + break; + } + } else { + // 插入不允许非目标类型的类型提升 + rc = Value::cast_to(value, field->type(), real_value, false); + if (OB_FAIL(rc)) { + LOG_WARN("failed to cast value. table name:%s, field name:%s, value:%s", + table_meta_.name(), field->name(), value.to_string().c_str()); + break; + } } rc = set_value_to_record(record_data, real_value, field); } else { @@ -341,7 +351,7 @@ RC Table::set_value_to_record(char *record_data, const Value &value, const Field copy_len = data_len + 1; } } - // text 类型的话最多存 4096 字节,剩下截断了 + // text 类型的话最多存 65535 字节,超出则报错 memcpy(record_data + field->offset(), value.data(), copy_len); return RC::SUCCESS; } From 55c16250df9936d6a4c74cd6279f17bc4e45a90c Mon Sep 17 00:00:00 2001 From: Koschei Date: Tue, 8 Oct 2024 01:26:20 +0800 Subject: [PATCH 168/308] =?UTF-8?q?test:=20=E6=9B=B4=E6=96=B0=2022=20?= =?UTF-8?q?=E5=B9=B4=E7=9A=84=20text=20=E6=B5=8B=E8=AF=95=EF=BC=8C?= =?UTF-8?q?=E5=8D=B3=E4=BD=BF=E5=AD=97=E6=AE=B5=E9=95=BF=E5=BA=A6=E8=B6=85?= =?UTF-8?q?=E8=BF=87=204096=20=E4=B9=9F=E4=B8=8D=E6=88=AA=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-text.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/case/result/primary-text.result b/test/case/result/primary-text.result index 5b31e529..a8fddf11 100644 --- a/test/case/result/primary-text.result +++ b/test/case/result/primary-text.result @@ -46,5 +46,5 @@ select * from text_table; 2 | A TMP DATA 3 | THIS IS A VERY VERY LONG STRING3 4 | THIS IS A VERY VERY LONG STRING PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD1 -5 | THIS IS A VERY VERY LONG STRING PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD1 +5 | THIS IS A VERY VERY LONG STRING PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD PAD1 PAD PAD PAD PAD ID | INFO From e83b9c45957cfc8962b7475e6877a98900b712f7 Mon Sep 17 00:00:00 2001 From: Koschei Date: Tue, 8 Oct 2024 14:05:50 +0800 Subject: [PATCH 169/308] =?UTF-8?q?fix:=20=E5=8C=85=E5=90=AB=E5=AD=90?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=9A=84=20SQL=20=E6=9F=A5=E8=AF=A2=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E4=BD=86=E6=98=AF=E8=BE=93=E5=87=BA=E6=B5=81=E6=9C=AA?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=EF=BC=8C=E5=AF=BC=E8=87=B4=E4=B8=8B=E6=AC=A1?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BC=9A=E6=9C=89=E4=B8=8A=E6=AC=A1=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9C=AA=E8=BE=93=E5=87=BA=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/net/plain_communicator.cpp | 5 +++++ src/observer/sql/expr/expression.cpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/observer/net/plain_communicator.cpp b/src/observer/net/plain_communicator.cpp index 71509490..621ee8e6 100644 --- a/src/observer/net/plain_communicator.cpp +++ b/src/observer/net/plain_communicator.cpp @@ -222,6 +222,11 @@ RC PlainCommunicator::write_result_internal(SessionEvent *event, bool &need_disc } if (OB_FAIL(rc)) { + // 清空输出流,避免下次查询输出上次查询失败未输出的内容 + title_stream.str(""); // 清空流内容 + title_stream.clear(); // 重置流状态标志 + sql_result_stream.str(""); // 清空流内容 + sql_result_stream.clear(); // 重置流状态标志 sql_result->close(); sql_result->set_return_code(rc); return write_state(event, need_disconnect); diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 7bf1bfe0..0e165cab 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -255,7 +255,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) // Check if the left subquery has more rows (error if true) if (left_subquery_expr && left_subquery_expr->has_more_row(tuple)) { - return RC::INVALID_ARGUMENT; + return RC::SUBQUERY_RETURNED_MULTIPLE_ROWS; } // Handle IN and NOT IN operations @@ -308,7 +308,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) // Check if the right subquery has more rows (error if true) if (right_subquery_expr && right_subquery_expr->has_more_row(tuple)) { - return RC::INVALID_ARGUMENT; + return RC::SUBQUERY_RETURNED_MULTIPLE_ROWS; } // Compare the left and right values From 4bdbde35ee452732841560ee66548ce436d8073d Mon Sep 17 00:00:00 2001 From: Koschei Date: Tue, 8 Oct 2024 14:11:33 +0800 Subject: [PATCH 170/308] =?UTF-8?q?test:=20=E5=A2=9E=E5=BC=BA=E7=AE=80?= =?UTF-8?q?=E5=8D=95=E5=AD=90=E6=9F=A5=E8=AF=A2=E7=9A=84=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=EF=BC=8C=E5=AD=90=E6=9F=A5=E8=AF=A2=E5=A4=B1=E8=B4=A5=E5=90=8E?= =?UTF-8?q?=E5=AF=B9=E8=BE=93=E5=87=BA=E6=B5=81=E8=BF=9B=E8=A1=8C=E6=A3=80?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/primary-simple-sub-query.result | 70 ++++++++++--------- test/case/test/primary-simple-sub-query.test | 6 +- 2 files changed, 43 insertions(+), 33 deletions(-) diff --git a/test/case/result/primary-simple-sub-query.result b/test/case/result/primary-simple-sub-query.result index c698b122..a683dd80 100644 --- a/test/case/result/primary-simple-sub-query.result +++ b/test/case/result/primary-simple-sub-query.result @@ -1,81 +1,81 @@ INITIALIZATION -CREATE TABLE ssq_1(id int, col1 int, feat1 float); +CREATE TABLE SSQ_1(ID INT, COL1 INT, FEAT1 FLOAT); SUCCESS -CREATE TABLE ssq_2(id int, col2 int, feat2 float); +CREATE TABLE SSQ_2(ID INT, COL2 INT, FEAT2 FLOAT); SUCCESS -CREATE TABLE ssq_3(id int, col3 int, feat3 float); +CREATE TABLE SSQ_3(ID INT, COL3 INT, FEAT3 FLOAT); SUCCESS -INSERT INTO ssq_1 VALUES (1, 4, 11.2); +INSERT INTO SSQ_1 VALUES (1, 4, 11.2); SUCCESS -INSERT INTO ssq_1 VALUES (2, 2, 12.0); +INSERT INTO SSQ_1 VALUES (2, 2, 12.0); SUCCESS -INSERT INTO ssq_1 VALUES (3, 3, 13.5); +INSERT INTO SSQ_1 VALUES (3, 3, 13.5); SUCCESS -INSERT INTO ssq_2 VALUES (1, 2, 13.0); +INSERT INTO SSQ_2 VALUES (1, 2, 13.0); SUCCESS -INSERT INTO ssq_2 VALUES (2, 7, 10.5); +INSERT INTO SSQ_2 VALUES (2, 7, 10.5); SUCCESS -INSERT INTO ssq_2 VALUES (5, 3, 12.6); +INSERT INTO SSQ_2 VALUES (5, 3, 12.6); SUCCESS 1. SELECT -select * from ssq_1 where id in (select ssq_2.id from ssq_2); +SELECT * FROM SSQ_1 WHERE ID IN (SELECT SSQ_2.ID FROM SSQ_2); 1 | 4 | 11.2 2 | 2 | 12 ID | COL1 | FEAT1 -select * from ssq_1 where col1 not in (select ssq_2.col2 from ssq_2); +SELECT * FROM SSQ_1 WHERE COL1 NOT IN (SELECT SSQ_2.COL2 FROM SSQ_2); 1 | 4 | 11.2 ID | COL1 | FEAT1 -select * from ssq_1 where col1 = (select avg(ssq_2.col2) from ssq_2); +SELECT * FROM SSQ_1 WHERE COL1 = (SELECT AVG(SSQ_2.COL2) FROM SSQ_2); 1 | 4 | 11.2 ID | COL1 | FEAT1 -select * from ssq_1 where (select avg(ssq_2.col2) from ssq_2) = col1; +SELECT * FROM SSQ_1 WHERE (SELECT AVG(SSQ_2.COL2) FROM SSQ_2) = COL1; 1 | 4 | 11.2 ID | COL1 | FEAT1 -select * from ssq_1 where feat1 >= (select min(ssq_2.feat2) from ssq_2); +SELECT * FROM SSQ_1 WHERE FEAT1 >= (SELECT MIN(SSQ_2.FEAT2) FROM SSQ_2); 1 | 4 | 11.2 2 | 2 | 12 3 | 3 | 13.5 ID | COL1 | FEAT1 -select * from ssq_1 where (select min(ssq_2.feat2) from ssq_2) <= feat1; +SELECT * FROM SSQ_1 WHERE (SELECT MIN(SSQ_2.FEAT2) FROM SSQ_2) <= FEAT1; 1 | 4 | 11.2 2 | 2 | 12 3 | 3 | 13.5 ID | COL1 | FEAT1 -select * from ssq_1 where feat1 <= (select max(ssq_2.feat2) from ssq_2); +SELECT * FROM SSQ_1 WHERE FEAT1 <= (SELECT MAX(SSQ_2.FEAT2) FROM SSQ_2); 1 | 4 | 11.2 2 | 2 | 12 ID | COL1 | FEAT1 -select * from ssq_1 where (select max(ssq_2.feat2) from ssq_2) >= feat1; +SELECT * FROM SSQ_1 WHERE (SELECT MAX(SSQ_2.FEAT2) FROM SSQ_2) >= FEAT1; 1 | 4 | 11.2 2 | 2 | 12 ID | COL1 | FEAT1 -select * from ssq_1 where feat1 > (select min(ssq_2.feat2) from ssq_2); +SELECT * FROM SSQ_1 WHERE FEAT1 > (SELECT MIN(SSQ_2.FEAT2) FROM SSQ_2); 1 | 4 | 11.2 2 | 2 | 12 3 | 3 | 13.5 ID | COL1 | FEAT1 -select * from ssq_1 where (select min(ssq_2.feat2) from ssq_2) < feat1; +SELECT * FROM SSQ_1 WHERE (SELECT MIN(SSQ_2.FEAT2) FROM SSQ_2) < FEAT1; 1 | 4 | 11.2 2 | 2 | 12 3 | 3 | 13.5 ID | COL1 | FEAT1 -select * from ssq_1 where feat1 < (select max(ssq_2.feat2) from ssq_2); +SELECT * FROM SSQ_1 WHERE FEAT1 < (SELECT MAX(SSQ_2.FEAT2) FROM SSQ_2); 1 | 4 | 11.2 2 | 2 | 12 ID | COL1 | FEAT1 -select * from ssq_1 where (select max(ssq_2.feat2) from ssq_2) > feat1; +SELECT * FROM SSQ_1 WHERE (SELECT MAX(SSQ_2.FEAT2) FROM SSQ_2) > FEAT1; 1 | 4 | 11.2 2 | 2 | 12 ID | COL1 | FEAT1 -select * from ssq_1 where feat1 <> (select avg(ssq_2.feat2) from ssq_2); +SELECT * FROM SSQ_1 WHERE FEAT1 <> (SELECT AVG(SSQ_2.FEAT2) FROM SSQ_2); 1 | 4 | 11.2 2 | 2 | 12 3 | 3 | 13.5 @@ -84,28 +84,34 @@ ID | COL1 | FEAT1 2. SELECT WITH EMPTY TABLE SELECT * FROM SSQ_1 WHERE COL1 NOT IN (2,NULL); ID | COL1 | FEAT1 -select * from ssq_1 where feat1 < (select max(ssq_2.feat2) from ssq_2 where 1=0); +SELECT * FROM SSQ_1 WHERE FEAT1 < (SELECT MAX(SSQ_2.FEAT2) FROM SSQ_2 WHERE 1=0); ID | COL1 | FEAT1 -select * from ssq_1 where id in (select ssq_2.id from ssq_2 where 1=0); +SELECT * FROM SSQ_1 WHERE ID IN (SELECT SSQ_2.ID FROM SSQ_2 WHERE 1=0); ID | COL1 | FEAT1 -select * from ssq_1 where id not in (select ssq_2.id from ssq_2 where 1=0); +SELECT * FROM SSQ_1 WHERE ID NOT IN (SELECT SSQ_2.ID FROM SSQ_2 WHERE 1=0); 1 | 4 | 11.2 2 | 2 | 12 3 | 3 | 13.5 ID | COL1 | FEAT1 -select * from ssq_3 where feat3 < (select max(ssq_2.feat2) from ssq_2); +SELECT * FROM SSQ_3 WHERE FEAT3 < (SELECT MAX(SSQ_2.FEAT2) FROM SSQ_2); ID | COL3 | FEAT3 -select * from ssq_3 where id in (select ssq_2.id from ssq_2); +SELECT * FROM SSQ_3 WHERE ID IN (SELECT SSQ_2.ID FROM SSQ_2); ID | COL3 | FEAT3 -select * from ssq_3 where id not in (select ssq_2.id from ssq_2); +SELECT * FROM SSQ_3 WHERE ID NOT IN (SELECT SSQ_2.ID FROM SSQ_2); ID | COL3 | FEAT3 +SELECT * FROM SSQ_1 WHERE (SELECT SSQ_2.ID FROM SSQ_2 WHERE COL2 = 52) = ID; +ID | COL1 | FEAT1 3. ERROR -select * from ssq_1 where col1 = (select ssq_2.col2 from ssq_2); +SELECT * FROM SSQ_1 WHERE COL1 = (SELECT SSQ_2.COL2 FROM SSQ_2); FAILURE -select * from ssq_1 where col1 = (select * from ssq_2); +SELECT * FROM SSQ_1 WHERE COL1 = (SELECT * FROM SSQ_2); FAILURE -select * from ssq_1 where col1 in (select * from ssq_2); +SELECT * FROM SSQ_1 WHERE COL1 IN (SELECT * FROM SSQ_2); FAILURE -select * from ssq_1 where col1 not in (select * from ssq_2); +SELECT * FROM SSQ_1 WHERE COL1 NOT IN (SELECT * FROM SSQ_2); FAILURE + +4. STREAM CLEAR AFTER ERROR +SELECT * FROM SSQ_1 WHERE (SELECT SSQ_2.ID FROM SSQ_2 WHERE COL2 = 52) = ID; +ID | COL1 | FEAT1 diff --git a/test/case/test/primary-simple-sub-query.test b/test/case/test/primary-simple-sub-query.test index 2309e17c..1145c462 100644 --- a/test/case/test/primary-simple-sub-query.test +++ b/test/case/test/primary-simple-sub-query.test @@ -39,9 +39,13 @@ INSERT INTO ssq_2 VALUES (5, 3, 12.6); -- sort select * from ssq_3 where feat3 < (select max(ssq_2.feat2) from ssq_2); -- sort select * from ssq_3 where id in (select ssq_2.id from ssq_2); -- sort select * from ssq_3 where id not in (select ssq_2.id from ssq_2); +-- sort select * from ssq_1 where (select ssq_2.id from ssq_2 where col2 = 52) = id; ---echo 3. error +-- echo 3. error select * from ssq_1 where col1 = (select ssq_2.col2 from ssq_2); select * from ssq_1 where col1 = (select * from ssq_2); select * from ssq_1 where col1 in (select * from ssq_2); select * from ssq_1 where col1 not in (select * from ssq_2); + +-- echo 4. stream clear after error +-- sort select * from ssq_1 where (select ssq_2.id from ssq_2 where col2 = 52) = id; From 081394c360ae3bc77a65c1ebe5396127de41f554 Mon Sep 17 00:00:00 2001 From: Koschei Date: Tue, 8 Oct 2024 19:42:55 +0800 Subject: [PATCH 171/308] =?UTF-8?q?feat:=20=E5=AD=97=E6=AE=B5=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=94=AF=E6=8C=81=20null=20=E5=80=BC=EF=BC=8C?= =?UTF-8?q?=E9=99=A4=E9=9D=9E=E5=AE=9A=E4=B9=89=E4=B8=BA=20not=20null?= =?UTF-8?q?=EF=BC=8C=E4=B8=8E=20MySQL=208.0=20=E5=AF=B9=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/yacc_sql.cpp | 2 +- src/observer/sql/parser/yacc_sql.y | 2 +- src/observer/storage/field/field_meta.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 380c26db..8c9bd696 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -3790,7 +3790,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) case 48: /* nullable_constraint: %empty */ #line 462 "yacc_sql.y" { - (yyval.nullable_info) = false; // 默认情况为 NOT NULL + (yyval.nullable_info) = true; // 默认情况为 NULL } #line 2085 "yacc_sql.cpp" break; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 32fae0f5..8efd56d2 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -460,7 +460,7 @@ nullable_constraint: } | /* empty */ { - $$ = false; // 默认情况为 NOT NULL + $$ = true; // 默认情况为 NULL } ; diff --git a/src/observer/storage/field/field_meta.h b/src/observer/storage/field/field_meta.h index 007a8069..155f1bcb 100644 --- a/src/observer/storage/field/field_meta.h +++ b/src/observer/storage/field/field_meta.h @@ -31,13 +31,14 @@ class FieldMeta public: FieldMeta(); + // 除非字段定义为 not null,否则默认是 nullable 的 FieldMeta(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, - bool nullable = false); + bool nullable = true); ~FieldMeta() = default; RC init(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, - bool nullable = false); + bool nullable = true); public: const char *name() const; From 7aba7319ce44d1b8b0b3283dd4673b20f99d4d9f Mon Sep 17 00:00:00 2001 From: Koschei Date: Tue, 8 Oct 2024 19:47:45 +0800 Subject: [PATCH 172/308] =?UTF-8?q?test:=20=E4=BF=AE=E6=94=B9=20null=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=B8=BA=202023=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=EF=BC=8C=E6=94=AF=E6=8C=81=E5=AD=97=E6=AE=B5=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=20null=20=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-null.result | 6 +++--- test/case/test/primary-null.test | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/case/result/primary-null.result b/test/case/result/primary-null.result index fab17418..b8860fa1 100644 --- a/test/case/result/primary-null.result +++ b/test/case/result/primary-null.result @@ -1,7 +1,7 @@ INITIALIZATION -CREATE TABLE null_table(id int, num int nullable, price float not null, birthday date null); +CREATE TABLE null_table(id int not null, num int, price float not null, birthday date null); SUCCESS -CREATE TABLE null_table2(id int, num int nullable, price float not null, birthday date nullable); +CREATE TABLE null_table2(id int not null, num int, price float not null, birthday date null); SUCCESS CREATE INDEX index_num on null_table(num); SUCCESS @@ -164,7 +164,7 @@ AVG(NUM) 15 6. AGGREGATION WITH NULL COLUMNS -CREATE TABLE null_table3(id int, num int nullable); +CREATE TABLE null_table3(id int not null, num int null); SUCCESS INSERT INTO null_table3 VALUES (1, null); SUCCESS diff --git a/test/case/test/primary-null.test b/test/case/test/primary-null.test index b707001f..61fb6a10 100644 --- a/test/case/test/primary-null.test +++ b/test/case/test/primary-null.test @@ -1,6 +1,6 @@ -- echo initialization -CREATE TABLE null_table(id int, num int nullable, price float not null, birthday date null); -CREATE TABLE null_table2(id int, num int nullable, price float not null, birthday date nullable); +CREATE TABLE null_table(id int not null, num int, price float not null, birthday date null); +CREATE TABLE null_table2(id int not null, num int, price float not null, birthday date null); CREATE INDEX index_num on null_table(num); -- echo 1. insert @@ -74,7 +74,7 @@ SELECT count(birthday) FROM null_table; SELECT avg(num) FROM null_table; -- echo 6. aggregation with null columns -CREATE TABLE null_table3(id int, num int nullable); +CREATE TABLE null_table3(id int not null, num int null); INSERT INTO null_table3 VALUES (1, null); INSERT INTO null_table3 VALUES (2, null); SELECT count(num) FROM null_table3; From 881152584404a083da1235f53d52310c9be933f4 Mon Sep 17 00:00:00 2001 From: Koschei Date: Tue, 8 Oct 2024 20:09:54 +0800 Subject: [PATCH 173/308] =?UTF-8?q?test:=20=E4=BF=AE=E6=94=B9=20update-sel?= =?UTF-8?q?ect=20=E7=9A=84=E6=B5=8B=E8=AF=95=E4=B8=BA=202023=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=EF=BC=8C=E5=AD=97=E6=AE=B5=E9=BB=98=E8=AE=A4=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-update-select.result | 12 ++++++------ test/case/test/primary-update-select.test | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/case/result/primary-update-select.result b/test/case/result/primary-update-select.result index 5d2a503e..1bdc4267 100644 --- a/test/case/result/primary-update-select.result +++ b/test/case/result/primary-update-select.result @@ -46,10 +46,10 @@ UPDATE UPDATE_TABLE_2 SET COL1=(SELECT UPDATE_TABLE_3.COL2 FROM UPDATE_TABLE_3) FAILURE UPDATE UPDATE_TABLE_2 SET COL1=(SELECT UPDATE_TABLE_3.COL2 FROM UPDATE_TABLE_3 WHERE UPDATE_TABLE_3.ID>1) WHERE ID=1; FAILURE -UPDATE UPDATE_TABLE_2 SET COL1=(SELECT UPDATE_TABLE_3.COL2 FROM UPDATE_TABLE_3 WHERE UPDATE_TABLE_3.ID<1) WHERE ID=1; -FAILURE +UPDATE UPDATE_TABLE_2 SET T_NAME=(SELECT UPDATE_TABLE_3.COL2 FROM UPDATE_TABLE_3 WHERE UPDATE_TABLE_3.ID<1) WHERE ID=1; +SUCCESS SELECT * FROM UPDATE_TABLE_2; -1 | N01 | 2 | 1 +1 | NULL | 2 | 1 2 | N2 | 1 | 1 3 | N3 | 3 | 1 4 | N3 | 4 | 2 @@ -99,14 +99,14 @@ ID | T_NAME | COL1 | COL2 5. SUBQUERY RETURN NULL UPDATE UPDATE_TABLE_3 SET COL1=2, COL2=(SELECT UPDATE_TABLE_2.COL2 FROM UPDATE_TABLE_2 WHERE UPDATE_TABLE_2.ID=999) WHERE ID=4; -FAILURE +SUCCESS UPDATE UPDATE_TABLE_3 SET COL1=2, COL2=(SELECT UPDATE_TABLE_2.COL2 FROM UPDATE_TABLE_2 WHERE UPDATE_TABLE_2.ID=999) WHERE ID=666; SUCCESS SELECT * FROM UPDATE_TABLE_3; 1 | N1 | 1 | 1 2 | 813 | 548 | 2 3 | N3 | 3 | 3 -4 | N4 | 4 | 4 +4 | N4 | 2 | NULL 5 | 3 | 5 | 1 6 | N6 | 6 | 6 6 | N6 | 6 | 6 @@ -118,7 +118,7 @@ FAILURE UPDATE UPDATE_TABLE_2 SET T_NAME=(SELECT UPDATE_TABLE_3.T_NAME FROM UPDATE_TABLE_3 WHERE UPDATE_TABLE_3.ID=6) WHERE COL1=5 AND COL2=6; SUCCESS SELECT * FROM UPDATE_TABLE_2; -1 | N01 | 2 | 1 +1 | NULL | 2 | 1 2 | N2 | 1 | 1 3 | N3 | 3 | 1 4 | N3 | 4 | 2 diff --git a/test/case/test/primary-update-select.test b/test/case/test/primary-update-select.test index 175e789d..6733cc03 100644 --- a/test/case/test/primary-update-select.test +++ b/test/case/test/primary-update-select.test @@ -22,7 +22,7 @@ UPDATE Update_table_2 SET col1=2, col2=(select Update_table_3.col2 from Update_t -- echo 2. update-select rows UPDATE Update_table_2 SET col1=(select Update_table_3.col2 from Update_table_3) WHERE id=1; UPDATE Update_table_2 SET col1=(select Update_table_3.col2 from Update_table_3 where Update_table_3.id>1) WHERE id=1; -UPDATE Update_table_2 SET col1=(select Update_table_3.col2 from Update_table_3 where Update_table_3.id<1) WHERE id=1; +UPDATE Update_table_2 SET t_name=(select Update_table_3.col2 from Update_table_3 where Update_table_3.id<1) WHERE id=1; -- sort SELECT * FROM Update_table_2; -- echo 3. update rows-select rows From da47173166f2b922abad1780278a21b07ae7ee35 Mon Sep 17 00:00:00 2001 From: Koschei Date: Tue, 8 Oct 2024 20:44:00 +0800 Subject: [PATCH 174/308] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=AE=97=E5=AD=90=E4=BB=A3=E7=A0=81=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=20null=20=E5=80=BC=E5=8F=91=E7=94=9F=E6=97=A0?= =?UTF-8?q?=E6=84=8F=E4=B9=89=E7=9A=84=E6=95=B0=E6=8D=AE=E6=8B=B7=E8=B4=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/operator/update_physical_operator.cpp | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 2db6524d..583cc8f7 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -57,8 +57,14 @@ RC UpdatePhysicalOperator::open(Trx *trx) auto &value_expr = values_[i]; auto &field_meta = field_metas_[i]; - if ((sub_query_expr = dynamic_cast(value_expr.get()))) { - sub_query_expr->open(trx_, tuple); + if (value_expr->type() == ExprType::SUBQUERY) { + sub_query_expr = dynamic_cast(value_expr.get()); + rc = sub_query_expr->open(trx_, tuple); + if (OB_FAIL(rc)) { + LOG_ERROR("Failed to open subquery for field: %s", + field_meta.name()); + return rc; + } } // 得到表达式的值 @@ -117,7 +123,6 @@ RC UpdatePhysicalOperator::open(Trx *trx) new_record.set_rid(old_record.rid()); new_record.copy_data(old_record.data(), old_record.len()); for (int i = 0; i < field_metas_.size(); ++i) { - new_record.set_field(field_metas_[i].offset(), field_metas_[i].len(), real_values[i]); if (field_metas_[i].nullable()) { auto null_offset = field_metas_[i].offset() + field_metas_[i].len() - 1; if (real_values[i].is_null()) { @@ -125,10 +130,16 @@ RC UpdatePhysicalOperator::open(Trx *trx) } else { new_record.data()[null_offset] = 0; } - } else { - if (real_values[i].is_null()) { - rollback(); - return RC::NOT_NULLABLE_VALUE; + } else if (real_values[i].is_null()) { + rollback(); + return RC::NOT_NULLABLE_VALUE; + } + // 只有非 null 值才需要拷贝数据,防止读到垃圾数据 + if (!real_values[i].is_null()) { + rc = new_record.set_field(field_metas_[i].offset(), field_metas_[i].len(), real_values[i]); + if (OB_FAIL(rc)) { + LOG_ERROR("failed to set field: %s", strrc(rc)); + return rc; } } } From bca2631c4a8bc6a132e0b330cdfb23cef37003da Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 9 Oct 2024 09:53:39 +0800 Subject: [PATCH 175/308] =?UTF-8?q?=E5=AE=8C=E6=88=90create=5Ftable=5Fsele?= =?UTF-8?q?ct=E7=9A=84=E8=AF=AD=E6=B3=95=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/3rd/googletest | 2 +- src/observer/sql/parser/lex_sql.cpp | 5453 +++++++++----------------- src/observer/sql/parser/lex_sql.h | 244 +- src/observer/sql/parser/parse_defs.h | 7 +- src/observer/sql/parser/yacc_sql.cpp | 5072 ++++++++---------------- src/observer/sql/parser/yacc_sql.hpp | 223 +- src/observer/sql/parser/yacc_sql.y | 8 + 7 files changed, 3686 insertions(+), 7323 deletions(-) diff --git a/deps/3rd/googletest b/deps/3rd/googletest index a1e255a5..71815bbf 160000 --- a/deps/3rd/googletest +++ b/deps/3rd/googletest @@ -1 +1 @@ -Subproject commit a1e255a582377e1006bb88a408ac3f933ba7c916 +Subproject commit 71815bbf7de6e10c11821d654a2fae2cf42de0f7 diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 5777e557..ee7225ed 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,21 +8,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -75,62 +77,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -154,12 +156,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -187,7 +189,7 @@ typedef void *yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin, yyscanner) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -205,7 +207,7 @@ typedef void *yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -220,85 +222,88 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -307,55 +312,59 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -static void yyensure_buffer_stack(yyscan_t yyscanner); -static void yy_load_buffer_state(yyscan_t yyscanner); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -363,2404 +372,314 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state(yyscan_t yyscanner); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); -static int yy_get_next_buffer(yyscan_t yyscanner); -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t)(yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 77 #define YY_END_OF_BUFFER 78 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info -{ - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[222] = {0, - 0, - 0, - 0, - 0, - 78, - 76, - 1, - 2, - 76, - 76, - 76, - 56, - 57, - 72, - 70, - 58, - 71, - 6, - 73, - 3, - 5, - 63, - 59, - 65, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 77, - 62, - 0, - 74, - 0, - 75, - 3, - 0, - 60, - 61, - 64, - 69, - 69, - 69, - 48, - 69, - 47, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 50, - 67, - 69, - 69, - 69, - 69, - 69, - 15, - 23, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 4, - 22, - 49, - 69, - 69, - 69, - - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 33, - 69, - 69, - 69, - 66, - 69, - 69, - 69, - 69, - 29, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 19, - 34, - 69, - 69, - 42, - 36, - 69, - 9, - 11, - 69, - 7, - 69, - 69, - 69, - 20, - 69, - 8, - 69, - 69, - 69, - 69, - 25, - 55, - 68, - 41, - 39, - 69, - 69, - 69, - 16, - 69, - 17, - 69, - 37, - 69, - 69, - 69, - 69, - 30, - 69, - 69, - 69, - 69, - 69, - 35, - 69, - 45, - 14, - 69, - 54, - 69, - 69, - 46, - 69, - 69, - 69, - 12, - 69, - 69, - 69, - 21, - 31, - 10, - - 27, - 51, - 69, - 53, - 43, - 24, - 69, - 69, - 18, - 69, - 13, - 38, - 28, - 26, - 44, - 69, - 69, - 52, - 40, - 32, - 0}; - -static const YY_CHAR yy_ec[256] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 3, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 4, - 5, - 1, - 1, - 1, - 1, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 1, - 16, - 17, - 18, - 19, - 1, - 1, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 1, - 1, - 1, - 1, - 45, - 1, - 46, - 47, - 48, - 49, - - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 45, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1}; - -static const YY_CHAR yy_meta[71] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2}; - -static const flex_int16_t yy_base[227] = {0, - 0, - 0, - 0, - 0, - 601, - 602, - 602, - 602, - 582, - 594, - 592, - 602, - 602, - 602, - 602, - 602, - 582, - 602, - 602, - 58, - 602, - 56, - 602, - 578, - 57, - 61, - 62, - 63, - 64, - 83, - 65, - 69, - 91, - 76, - 580, - 117, - 108, - 97, - 103, - 120, - 134, - 146, - 137, - 112, - 602, - 602, - 589, - 602, - 587, - 602, - 73, - 577, - 602, - 602, - 602, - 0, - 576, - 152, - 147, - 161, - 575, - 151, - 171, - 157, - 173, - 163, - 178, - 177, - 184, - 188, - 181, - 191, - 195, - 183, - 241, - 567, - 205, - 206, - 211, - 185, - 212, - 566, - 224, - 215, - 237, - 226, - 243, - 234, - 250, - 238, - 255, - 272, - 260, - 239, - 565, - 564, - 563, - 270, - 286, - 267, - - 281, - 295, - 296, - 299, - 297, - 303, - 312, - 313, - 311, - 320, - 321, - 307, - 325, - 339, - 328, - 343, - 344, - 314, - 322, - 347, - 346, - 562, - 357, - 351, - 365, - 368, - 560, - 369, - 350, - 376, - 375, - 370, - 263, - 384, - 385, - 390, - 387, - 559, - 557, - 388, - 392, - 555, - 554, - 395, - 553, - 552, - 397, - 550, - 406, - 400, - 408, - 549, - 414, - 548, - 402, - 425, - 404, - 418, - 547, - 545, - 541, - 540, - 423, - 429, - 443, - 446, - 538, - 457, - 537, - 435, - 534, - 433, - 448, - 455, - 459, - 528, - 461, - 465, - 469, - 463, - 476, - 524, - 471, - 516, - 480, - 473, - 432, - 481, - 487, - 393, - 491, - 483, - 492, - 497, - 501, - 509, - 502, - 318, - 317, - 273, - - 269, - 246, - 499, - 219, - 217, - 189, - 514, - 506, - 179, - 523, - 138, - 126, - 123, - 89, - 88, - 526, - 527, - 86, - 82, - 79, - 602, - 583, - 585, - 587, - 90, - 79}; - -static const flex_int16_t yy_def[227] = {0, - 221, - 1, - 222, - 222, - 221, - 221, - 221, - 221, - 221, - 223, - 224, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 221, - 221, - 223, - 221, - 224, - 221, - 221, - 221, - 221, - 221, - 221, - 226, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 221, - 225, - 225, - 225, - 225, - 225, - - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 0, - 221, - 221, - 221, - 221, - 221}; - -static const flex_int16_t yy_nxt[673] = {0, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 35, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 52, - 56, - 51, - 53, - 54, - 56, - 56, - 56, - 56, - 56, - 56, - 62, - 66, - 56, - 60, - 52, - 67, - 51, - 63, - 58, - 56, - 57, - 74, - 56, - 59, - 64, - 56, - 56, - 65, - 68, - - 56, - 73, - 56, - 56, - 61, - 56, - 69, - 62, - 66, - 77, - 60, - 56, - 67, - 70, - 63, - 58, - 71, - 56, - 74, - 72, - 59, - 64, - 56, - 75, - 65, - 68, - 56, - 73, - 76, - 82, - 61, - 56, - 69, - 83, - 56, - 77, - 84, - 56, - 94, - 70, - 56, - 80, - 71, - 85, - 78, - 72, - 86, - 81, - 56, - 75, - 79, - 56, - 56, - 89, - 76, - 82, - 93, - 90, - 87, - 83, - 56, - 56, - 84, - 88, - 94, - 56, - 56, - 80, - 97, - 85, - 78, - 56, - 86, - 81, - 96, - 56, - 79, - 56, - 91, - 89, - 92, - 99, - 93, - 90, - 87, - 56, - 98, - 56, - 101, - 88, - 100, - 56, - 56, - 56, - 97, - 56, - 102, - 56, - 56, - 56, - - 96, - 103, - 56, - 56, - 91, - 56, - 92, - 99, - 104, - 56, - 106, - 107, - 98, - 113, - 101, - 105, - 100, - 110, - 108, - 56, - 56, - 109, - 102, - 122, - 111, - 56, - 56, - 103, - 112, - 56, - 121, - 56, - 119, - 56, - 104, - 120, - 106, - 107, - 56, - 113, - 56, - 105, - 123, - 110, - 108, - 125, - 124, - 109, - 56, - 122, - 111, - 56, - 56, - 56, - 112, - 56, - 121, - 56, - 119, - 128, - 56, - 120, - 136, - 114, - 56, - 115, - 130, - 126, - 123, - 56, - 131, - 125, - 124, - 116, - 56, - 127, - 129, - 56, - 117, - 118, - 132, - 56, - 133, - 56, - 56, - 128, - 56, - 56, - 136, - 114, - 135, - 115, - 130, - 126, - 134, - 56, - 131, - 137, - 172, - 116, - - 56, - 127, - 129, - 139, - 117, - 118, - 132, - 138, - 133, - 56, - 56, - 56, - 140, - 56, - 141, - 142, - 135, - 56, - 145, - 143, - 134, - 56, - 144, - 137, - 172, - 56, - 56, - 56, - 56, - 139, - 150, - 56, - 56, - 138, - 56, - 56, - 56, - 146, - 140, - 56, - 141, - 142, - 56, - 149, - 145, - 143, - 153, - 159, - 144, - 147, - 148, - 151, - 152, - 56, - 160, - 156, - 150, - 56, - 56, - 154, - 56, - 56, - 155, - 146, - 56, - 56, - 157, - 158, - 162, - 149, - 161, - 56, - 153, - 159, - 164, - 147, - 148, - 151, - 152, - 56, - 160, - 156, - 56, - 56, - 56, - 154, - 168, - 163, - 155, - 56, - 56, - 166, - 157, - 158, - 162, - 165, - 161, - 169, - 56, - 56, - - 164, - 56, - 56, - 173, - 56, - 170, - 56, - 56, - 171, - 56, - 167, - 56, - 168, - 163, - 56, - 177, - 56, - 166, - 56, - 176, - 56, - 165, - 56, - 169, - 174, - 181, - 175, - 183, - 56, - 173, - 178, - 170, - 56, - 179, - 171, - 180, - 167, - 56, - 182, - 56, - 187, - 177, - 189, - 56, - 185, - 176, - 56, - 56, - 184, - 56, - 174, - 181, - 175, - 183, - 188, - 186, - 178, - 56, - 194, - 179, - 56, - 180, - 56, - 191, - 182, - 190, - 187, - 192, - 189, - 56, - 185, - 56, - 195, - 56, - 184, - 56, - 193, - 56, - 197, - 56, - 188, - 186, - 198, - 56, - 194, - 56, - 196, - 56, - 200, - 191, - 56, - 190, - 201, - 192, - 56, - 56, - 205, - 56, - 195, - 199, - - 202, - 56, - 193, - 203, - 197, - 56, - 56, - 207, - 198, - 204, - 208, - 56, - 196, - 56, - 200, - 56, - 56, - 210, - 201, - 206, - 56, - 209, - 205, - 56, - 212, - 199, - 202, - 217, - 56, - 203, - 56, - 215, - 213, - 207, - 211, - 204, - 208, - 56, - 56, - 214, - 56, - 56, - 56, - 210, - 216, - 206, - 218, - 209, - 56, - 219, - 212, - 56, - 56, - 217, - 56, - 56, - 220, - 215, - 213, - 56, - 211, - 56, - 56, - 56, - 56, - 214, - 56, - 56, - 56, - 56, - 216, - 56, - 218, - 56, - 56, - 219, - 56, - 56, - 56, - 95, - 56, - 56, - 220, - 45, - 45, - 47, - 47, - 49, - 49, - 56, - 56, - 95, - 50, - 48, - 56, - 55, - 51, - 50, - 48, - 46, - - 221, - 5, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221}; - -static const flex_int16_t yy_chk[673] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 20, - 25, - 20, - 22, - 22, - 26, - 27, - 28, - 29, - 31, - 226, - 27, - 28, - 32, - 26, - 51, - 28, - 51, - 27, - 25, - 34, - 225, - 32, - 220, - 25, - 27, - 219, - 30, - 27, - 28, - - 218, - 31, - 215, - 214, - 26, - 33, - 29, - 27, - 28, - 34, - 26, - 38, - 28, - 30, - 27, - 25, - 30, - 39, - 32, - 30, - 25, - 27, - 37, - 33, - 27, - 28, - 44, - 31, - 33, - 38, - 26, - 36, - 29, - 38, - 40, - 34, - 39, - 213, - 44, - 30, - 212, - 37, - 30, - 40, - 36, - 30, - 40, - 37, - 41, - 33, - 36, - 43, - 211, - 41, - 33, - 38, - 43, - 41, - 40, - 38, - 42, - 59, - 39, - 40, - 44, - 62, - 58, - 37, - 59, - 40, - 36, - 64, - 40, - 37, - 58, - 60, - 36, - 66, - 42, - 41, - 42, - 62, - 43, - 41, - 40, - 63, - 60, - 65, - 64, - 40, - 63, - 68, - 67, - 209, - 59, - 71, - 65, - 74, - 69, - 80, - - 58, - 66, - 70, - 206, - 42, - 72, - 42, - 62, - 67, - 73, - 68, - 69, - 60, - 74, - 64, - 67, - 63, - 71, - 69, - 77, - 78, - 70, - 65, - 80, - 72, - 79, - 81, - 66, - 73, - 84, - 79, - 205, - 77, - 204, - 67, - 78, - 68, - 69, - 83, - 74, - 86, - 67, - 81, - 71, - 69, - 84, - 83, - 70, - 88, - 80, - 72, - 85, - 90, - 94, - 73, - 75, - 79, - 87, - 77, - 86, - 202, - 78, - 94, - 75, - 89, - 75, - 88, - 85, - 81, - 91, - 89, - 84, - 83, - 75, - 93, - 85, - 87, - 133, - 75, - 75, - 90, - 100, - 91, - 201, - 98, - 86, - 92, - 200, - 94, - 75, - 93, - 75, - 88, - 85, - 92, - 101, - 89, - 98, - 133, - 75, - - 99, - 85, - 87, - 100, - 75, - 75, - 90, - 99, - 91, - 102, - 103, - 105, - 101, - 104, - 102, - 103, - 93, - 106, - 105, - 103, - 92, - 112, - 104, - 98, - 133, - 109, - 107, - 108, - 118, - 100, - 109, - 199, - 198, - 99, - 110, - 111, - 119, - 106, - 101, - 113, - 102, - 103, - 115, - 108, - 105, - 103, - 112, - 118, - 104, - 107, - 107, - 110, - 111, - 114, - 119, - 115, - 109, - 116, - 117, - 113, - 121, - 120, - 114, - 106, - 129, - 124, - 116, - 117, - 121, - 108, - 120, - 123, - 112, - 118, - 124, - 107, - 107, - 110, - 111, - 125, - 119, - 115, - 126, - 128, - 132, - 113, - 129, - 123, - 114, - 131, - 130, - 126, - 116, - 117, - 121, - 125, - 120, - 130, - 134, - 135, - - 124, - 137, - 140, - 134, - 136, - 131, - 141, - 190, - 132, - 144, - 128, - 147, - 129, - 123, - 150, - 140, - 155, - 126, - 157, - 137, - 149, - 125, - 151, - 130, - 135, - 149, - 136, - 151, - 153, - 134, - 141, - 131, - 158, - 144, - 132, - 147, - 128, - 163, - 150, - 156, - 157, - 140, - 163, - 164, - 155, - 137, - 187, - 172, - 153, - 170, - 135, - 149, - 136, - 151, - 158, - 156, - 141, - 165, - 170, - 144, - 166, - 147, - 173, - 165, - 150, - 164, - 157, - 166, - 163, - 174, - 155, - 168, - 172, - 175, - 153, - 177, - 168, - 180, - 174, - 178, - 158, - 156, - 175, - 179, - 170, - 183, - 173, - 186, - 178, - 165, - 181, - 164, - 179, - 166, - 185, - 188, - 186, - 192, - 172, - 177, - - 180, - 189, - 168, - 181, - 174, - 191, - 193, - 189, - 175, - 183, - 191, - 194, - 173, - 203, - 178, - 195, - 197, - 193, - 179, - 188, - 208, - 192, - 186, - 196, - 195, - 177, - 180, - 208, - 207, - 181, - 184, - 203, - 196, - 189, - 194, - 183, - 191, - 210, - 182, - 197, - 216, - 217, - 176, - 193, - 207, - 188, - 210, - 192, - 171, - 216, - 195, - 169, - 167, - 208, - 162, - 161, - 217, - 203, - 196, - 160, - 194, - 159, - 154, - 152, - 148, - 197, - 146, - 145, - 143, - 142, - 207, - 139, - 210, - 138, - 127, - 216, - 122, - 97, - 96, - 95, - 82, - 76, - 217, - 222, - 222, - 223, - 223, - 224, - 224, - 61, - 57, - 52, - 49, - 47, - 35, - 24, - 17, - 11, - 10, - 9, - - 5, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221}; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[222] = + { 0, + 0, 0, 0, 0, 78, 76, 1, 2, 76, 76, + 76, 56, 57, 72, 70, 58, 71, 6, 73, 3, + 5, 63, 59, 65, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 77, 62, 0, 74, 0, 75, + 3, 0, 60, 61, 64, 69, 69, 69, 48, 69, + 47, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 50, 67, 69, 69, 69, 69, + 69, 15, 23, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 4, 22, 49, 69, 69, 69, + + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 33, 69, 69, + 69, 66, 69, 69, 69, 69, 29, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 19, 34, 69, + 69, 42, 36, 69, 9, 11, 69, 7, 69, 69, + 69, 20, 69, 8, 69, 69, 69, 69, 25, 55, + 68, 41, 39, 69, 69, 69, 16, 69, 17, 69, + 37, 69, 69, 69, 69, 30, 69, 69, 69, 69, + 69, 35, 69, 45, 14, 69, 54, 69, 69, 46, + 69, 69, 69, 12, 69, 69, 69, 21, 31, 10, + + 27, 51, 69, 53, 43, 24, 69, 69, 18, 69, + 13, 38, 28, 26, 44, 69, 69, 52, 40, 32, + 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, + 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, + + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[71] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + } ; + +static const flex_int16_t yy_base[227] = + { 0, + 0, 0, 0, 0, 601, 602, 602, 602, 582, 594, + 592, 602, 602, 602, 602, 602, 582, 602, 602, 58, + 602, 56, 602, 578, 57, 61, 62, 63, 64, 83, + 65, 69, 91, 76, 580, 117, 108, 97, 103, 120, + 134, 146, 137, 112, 602, 602, 589, 602, 587, 602, + 73, 577, 602, 602, 602, 0, 576, 152, 147, 161, + 575, 151, 171, 157, 173, 163, 178, 177, 184, 188, + 181, 191, 195, 183, 241, 567, 205, 206, 211, 185, + 212, 566, 224, 215, 237, 226, 243, 234, 250, 238, + 255, 272, 260, 239, 565, 564, 563, 270, 286, 267, + + 281, 295, 296, 299, 297, 303, 312, 313, 311, 320, + 321, 307, 325, 339, 328, 343, 344, 314, 322, 347, + 346, 562, 357, 351, 365, 368, 560, 369, 350, 376, + 375, 370, 263, 384, 385, 390, 387, 559, 557, 388, + 392, 555, 554, 395, 553, 552, 397, 550, 406, 400, + 408, 549, 414, 548, 402, 425, 404, 418, 547, 545, + 541, 540, 423, 429, 443, 446, 538, 457, 537, 435, + 534, 433, 448, 455, 459, 528, 461, 465, 469, 463, + 476, 524, 471, 516, 480, 473, 432, 481, 487, 393, + 491, 483, 492, 497, 501, 509, 502, 318, 317, 273, + + 269, 246, 499, 219, 217, 189, 514, 506, 179, 523, + 138, 126, 123, 89, 88, 526, 527, 86, 82, 79, + 602, 583, 585, 587, 90, 79 + } ; + +static const flex_int16_t yy_def[227] = + { 0, + 221, 1, 222, 222, 221, 221, 221, 221, 221, 223, + 224, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 221, 221, 223, 221, 224, 221, + 221, 221, 221, 221, 221, 226, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 221, 225, 225, 225, 225, 225, + + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 0, 221, 221, 221, 221, 221 + } ; + +static const flex_int16_t yy_nxt[673] = + { 0, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, + 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, + 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, + 52, 56, 51, 53, 54, 56, 56, 56, 56, 56, + 56, 62, 66, 56, 60, 52, 67, 51, 63, 58, + 56, 57, 74, 56, 59, 64, 56, 56, 65, 68, + + 56, 73, 56, 56, 61, 56, 69, 62, 66, 77, + 60, 56, 67, 70, 63, 58, 71, 56, 74, 72, + 59, 64, 56, 75, 65, 68, 56, 73, 76, 82, + 61, 56, 69, 83, 56, 77, 84, 56, 94, 70, + 56, 80, 71, 85, 78, 72, 86, 81, 56, 75, + 79, 56, 56, 89, 76, 82, 93, 90, 87, 83, + 56, 56, 84, 88, 94, 56, 56, 80, 97, 85, + 78, 56, 86, 81, 96, 56, 79, 56, 91, 89, + 92, 99, 93, 90, 87, 56, 98, 56, 101, 88, + 100, 56, 56, 56, 97, 56, 102, 56, 56, 56, + + 96, 103, 56, 56, 91, 56, 92, 99, 104, 56, + 106, 107, 98, 113, 101, 105, 100, 110, 108, 56, + 56, 109, 102, 122, 111, 56, 56, 103, 112, 56, + 121, 56, 119, 56, 104, 120, 106, 107, 56, 113, + 56, 105, 123, 110, 108, 125, 124, 109, 56, 122, + 111, 56, 56, 56, 112, 56, 121, 56, 119, 128, + 56, 120, 136, 114, 56, 115, 130, 126, 123, 56, + 131, 125, 124, 116, 56, 127, 129, 56, 117, 118, + 132, 56, 133, 56, 56, 128, 56, 56, 136, 114, + 135, 115, 130, 126, 134, 56, 131, 137, 172, 116, + + 56, 127, 129, 139, 117, 118, 132, 138, 133, 56, + 56, 56, 140, 56, 141, 142, 135, 56, 145, 143, + 134, 56, 144, 137, 172, 56, 56, 56, 56, 139, + 150, 56, 56, 138, 56, 56, 56, 146, 140, 56, + 141, 142, 56, 149, 145, 143, 153, 159, 144, 147, + 148, 151, 152, 56, 160, 156, 150, 56, 56, 154, + 56, 56, 155, 146, 56, 56, 157, 158, 162, 149, + 161, 56, 153, 159, 164, 147, 148, 151, 152, 56, + 160, 156, 56, 56, 56, 154, 168, 163, 155, 56, + 56, 166, 157, 158, 162, 165, 161, 169, 56, 56, + + 164, 56, 56, 173, 56, 170, 56, 56, 171, 56, + 167, 56, 168, 163, 56, 177, 56, 166, 56, 176, + 56, 165, 56, 169, 174, 181, 175, 183, 56, 173, + 178, 170, 56, 179, 171, 180, 167, 56, 182, 56, + 187, 177, 189, 56, 185, 176, 56, 56, 184, 56, + 174, 181, 175, 183, 188, 186, 178, 56, 194, 179, + 56, 180, 56, 191, 182, 190, 187, 192, 189, 56, + 185, 56, 195, 56, 184, 56, 193, 56, 197, 56, + 188, 186, 198, 56, 194, 56, 196, 56, 200, 191, + 56, 190, 201, 192, 56, 56, 205, 56, 195, 199, + + 202, 56, 193, 203, 197, 56, 56, 207, 198, 204, + 208, 56, 196, 56, 200, 56, 56, 210, 201, 206, + 56, 209, 205, 56, 212, 199, 202, 217, 56, 203, + 56, 215, 213, 207, 211, 204, 208, 56, 56, 214, + 56, 56, 56, 210, 216, 206, 218, 209, 56, 219, + 212, 56, 56, 217, 56, 56, 220, 215, 213, 56, + 211, 56, 56, 56, 56, 214, 56, 56, 56, 56, + 216, 56, 218, 56, 56, 219, 56, 56, 56, 95, + 56, 56, 220, 45, 45, 47, 47, 49, 49, 56, + 56, 95, 50, 48, 56, 55, 51, 50, 48, 46, + + 221, 5, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221 + } ; + +static const flex_int16_t yy_chk[673] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, + 226, 27, 28, 32, 26, 51, 28, 51, 27, 25, + 34, 225, 32, 220, 25, 27, 219, 30, 27, 28, + + 218, 31, 215, 214, 26, 33, 29, 27, 28, 34, + 26, 38, 28, 30, 27, 25, 30, 39, 32, 30, + 25, 27, 37, 33, 27, 28, 44, 31, 33, 38, + 26, 36, 29, 38, 40, 34, 39, 213, 44, 30, + 212, 37, 30, 40, 36, 30, 40, 37, 41, 33, + 36, 43, 211, 41, 33, 38, 43, 41, 40, 38, + 42, 59, 39, 40, 44, 62, 58, 37, 59, 40, + 36, 64, 40, 37, 58, 60, 36, 66, 42, 41, + 42, 62, 43, 41, 40, 63, 60, 65, 64, 40, + 63, 68, 67, 209, 59, 71, 65, 74, 69, 80, + + 58, 66, 70, 206, 42, 72, 42, 62, 67, 73, + 68, 69, 60, 74, 64, 67, 63, 71, 69, 77, + 78, 70, 65, 80, 72, 79, 81, 66, 73, 84, + 79, 205, 77, 204, 67, 78, 68, 69, 83, 74, + 86, 67, 81, 71, 69, 84, 83, 70, 88, 80, + 72, 85, 90, 94, 73, 75, 79, 87, 77, 86, + 202, 78, 94, 75, 89, 75, 88, 85, 81, 91, + 89, 84, 83, 75, 93, 85, 87, 133, 75, 75, + 90, 100, 91, 201, 98, 86, 92, 200, 94, 75, + 93, 75, 88, 85, 92, 101, 89, 98, 133, 75, + + 99, 85, 87, 100, 75, 75, 90, 99, 91, 102, + 103, 105, 101, 104, 102, 103, 93, 106, 105, 103, + 92, 112, 104, 98, 133, 109, 107, 108, 118, 100, + 109, 199, 198, 99, 110, 111, 119, 106, 101, 113, + 102, 103, 115, 108, 105, 103, 112, 118, 104, 107, + 107, 110, 111, 114, 119, 115, 109, 116, 117, 113, + 121, 120, 114, 106, 129, 124, 116, 117, 121, 108, + 120, 123, 112, 118, 124, 107, 107, 110, 111, 125, + 119, 115, 126, 128, 132, 113, 129, 123, 114, 131, + 130, 126, 116, 117, 121, 125, 120, 130, 134, 135, + + 124, 137, 140, 134, 136, 131, 141, 190, 132, 144, + 128, 147, 129, 123, 150, 140, 155, 126, 157, 137, + 149, 125, 151, 130, 135, 149, 136, 151, 153, 134, + 141, 131, 158, 144, 132, 147, 128, 163, 150, 156, + 157, 140, 163, 164, 155, 137, 187, 172, 153, 170, + 135, 149, 136, 151, 158, 156, 141, 165, 170, 144, + 166, 147, 173, 165, 150, 164, 157, 166, 163, 174, + 155, 168, 172, 175, 153, 177, 168, 180, 174, 178, + 158, 156, 175, 179, 170, 183, 173, 186, 178, 165, + 181, 164, 179, 166, 185, 188, 186, 192, 172, 177, + + 180, 189, 168, 181, 174, 191, 193, 189, 175, 183, + 191, 194, 173, 203, 178, 195, 197, 193, 179, 188, + 208, 192, 186, 196, 195, 177, 180, 208, 207, 181, + 184, 203, 196, 189, 194, 183, 191, 210, 182, 197, + 216, 217, 176, 193, 207, 188, 210, 192, 171, 216, + 195, 169, 167, 208, 162, 161, 217, 203, 196, 160, + 194, 159, 154, 152, 148, 197, 146, 145, 143, 142, + 207, 139, 210, 138, 127, 216, 122, 97, 96, 95, + 82, 76, 217, 222, 222, 223, 223, 224, 224, 61, + 57, 52, 49, 47, 35, 24, 17, 11, 10, 9, + + 5, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221 + } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2772,8 +691,8 @@ static const flex_int16_t yy_chk[673] = {0, #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -2787,15 +706,13 @@ static const flex_int16_t yy_chk[673] = {0, #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) \ - LOG_DEBUG("%s", #token); \ - return token +#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token #line 716 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -2824,124 +741,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t -{ - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char *yy_last_accepting_cpos; + { - int yylineno_r; - int yy_flex_debug_r; + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; - YYSTYPE *yylval_r; + int yylineno_r; + int yy_flex_debug_r; - YYLTYPE *yylloc_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; -}; /* end struct yyguts_t */ + YYSTYPE * yylval_r; -static int yy_init_globals(yyscan_t yyscanner); + YYLTYPE * yylloc_r; -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -#define yylval yyg->yylval_r + }; /* end struct yyguts_t */ -#define yylloc yyg->yylloc_r +static int yy_init_globals ( yyscan_t yyscanner ); -int yylex_init(yyscan_t *scanner); + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner); +static int yyinput ( yyscan_t yyscanner ); #else -static int input(yyscan_t yyscanner); +static int input ( yyscan_t yyscanner ); #endif #endif @@ -2961,38 +878,42 @@ static int input(yyscan_t yyscanner); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - yy_size_t n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -3011,7 +932,7 @@ static int input(yyscan_t yyscanner); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -3022,9 +943,11 @@ static int input(yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -3036,538 +959,624 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP YY_USER_ACTION +#define YY_RULE_SETUP \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if (!yyg->yy_init) { - yyg->yy_init = 1; + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!yyg->yy_start) - yyg->yy_start = 1; /* first start state */ + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_load_buffer_state(yyscanner); - } + yy_load_buffer_state( yyscanner ); + } - { + { #line 75 "lex_sql.l" + #line 1011 "lex_sql.cpp" - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 222) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_base[yy_current_state] != 602); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - if (yy_act == 0) { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - - case 1: YY_RULE_SETUP + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 222 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 602 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 77 "lex_sql.l" - // ignore whitespace - YY_BREAK - case 2: - /* rule 2 can match eol */ - YY_RULE_SETUP +// ignore whitespace + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP #line 78 "lex_sql.l" - ; - YY_BREAK - case 3: YY_RULE_SETUP +; + YY_BREAK +case 3: +YY_RULE_SETUP #line 80 "lex_sql.l" - yylval->number = atoi(yytext); - RETURN_TOKEN(NUMBER); - YY_BREAK - case 4: YY_RULE_SETUP +yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); + YY_BREAK +case 4: +YY_RULE_SETUP #line 81 "lex_sql.l" - yylval->floats = (float)(atof(yytext)); - RETURN_TOKEN(FLOAT); - YY_BREAK - case 5: YY_RULE_SETUP +yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); + YY_BREAK +case 5: +YY_RULE_SETUP #line 83 "lex_sql.l" - RETURN_TOKEN(SEMICOLON); - YY_BREAK - case 6: YY_RULE_SETUP +RETURN_TOKEN(SEMICOLON); + YY_BREAK +case 6: +YY_RULE_SETUP #line 84 "lex_sql.l" - RETURN_TOKEN(DOT); - YY_BREAK - case 7: YY_RULE_SETUP +RETURN_TOKEN(DOT); + YY_BREAK +case 7: +YY_RULE_SETUP #line 85 "lex_sql.l" - RETURN_TOKEN(EXIT); - YY_BREAK - case 8: YY_RULE_SETUP +RETURN_TOKEN(EXIT); + YY_BREAK +case 8: +YY_RULE_SETUP #line 86 "lex_sql.l" - RETURN_TOKEN(HELP); - YY_BREAK - case 9: YY_RULE_SETUP +RETURN_TOKEN(HELP); + YY_BREAK +case 9: +YY_RULE_SETUP #line 87 "lex_sql.l" - RETURN_TOKEN(DESC); - YY_BREAK - case 10: YY_RULE_SETUP +RETURN_TOKEN(DESC); + YY_BREAK +case 10: +YY_RULE_SETUP #line 88 "lex_sql.l" - RETURN_TOKEN(CREATE); - YY_BREAK - case 11: YY_RULE_SETUP +RETURN_TOKEN(CREATE); + YY_BREAK +case 11: +YY_RULE_SETUP #line 89 "lex_sql.l" - RETURN_TOKEN(DROP); - YY_BREAK - case 12: YY_RULE_SETUP +RETURN_TOKEN(DROP); + YY_BREAK +case 12: +YY_RULE_SETUP #line 90 "lex_sql.l" - RETURN_TOKEN(TABLE); - YY_BREAK - case 13: YY_RULE_SETUP +RETURN_TOKEN(TABLE); + YY_BREAK +case 13: +YY_RULE_SETUP #line 91 "lex_sql.l" - RETURN_TOKEN(TABLES); - YY_BREAK - case 14: YY_RULE_SETUP +RETURN_TOKEN(TABLES); + YY_BREAK +case 14: +YY_RULE_SETUP #line 92 "lex_sql.l" - RETURN_TOKEN(INDEX); - YY_BREAK - case 15: YY_RULE_SETUP +RETURN_TOKEN(INDEX); + YY_BREAK +case 15: +YY_RULE_SETUP #line 93 "lex_sql.l" - RETURN_TOKEN(ON); - YY_BREAK - case 16: YY_RULE_SETUP +RETURN_TOKEN(ON); + YY_BREAK +case 16: +YY_RULE_SETUP #line 94 "lex_sql.l" - RETURN_TOKEN(SHOW); - YY_BREAK - case 17: YY_RULE_SETUP +RETURN_TOKEN(SHOW); + YY_BREAK +case 17: +YY_RULE_SETUP #line 95 "lex_sql.l" - RETURN_TOKEN(SYNC); - YY_BREAK - case 18: YY_RULE_SETUP +RETURN_TOKEN(SYNC); + YY_BREAK +case 18: +YY_RULE_SETUP #line 96 "lex_sql.l" - RETURN_TOKEN(SELECT); - YY_BREAK - case 19: YY_RULE_SETUP +RETURN_TOKEN(SELECT); + YY_BREAK +case 19: +YY_RULE_SETUP #line 97 "lex_sql.l" - RETURN_TOKEN(CALC); - YY_BREAK - case 20: YY_RULE_SETUP +RETURN_TOKEN(CALC); + YY_BREAK +case 20: +YY_RULE_SETUP #line 98 "lex_sql.l" - RETURN_TOKEN(FROM); - YY_BREAK - case 21: YY_RULE_SETUP +RETURN_TOKEN(FROM); + YY_BREAK +case 21: +YY_RULE_SETUP #line 99 "lex_sql.l" - RETURN_TOKEN(WHERE); - YY_BREAK - case 22: YY_RULE_SETUP +RETURN_TOKEN(WHERE); + YY_BREAK +case 22: +YY_RULE_SETUP #line 100 "lex_sql.l" - RETURN_TOKEN(AND); - YY_BREAK - case 23: YY_RULE_SETUP +RETURN_TOKEN(AND); + YY_BREAK +case 23: +YY_RULE_SETUP #line 101 "lex_sql.l" - RETURN_TOKEN(OR); - YY_BREAK - case 24: YY_RULE_SETUP +RETURN_TOKEN(OR); + YY_BREAK +case 24: +YY_RULE_SETUP #line 102 "lex_sql.l" - RETURN_TOKEN(INSERT); - YY_BREAK - case 25: YY_RULE_SETUP +RETURN_TOKEN(INSERT); + YY_BREAK +case 25: +YY_RULE_SETUP #line 103 "lex_sql.l" - RETURN_TOKEN(INTO); - YY_BREAK - case 26: YY_RULE_SETUP +RETURN_TOKEN(INTO); + YY_BREAK +case 26: +YY_RULE_SETUP #line 104 "lex_sql.l" - RETURN_TOKEN(VALUES); - YY_BREAK - case 27: YY_RULE_SETUP +RETURN_TOKEN(VALUES); + YY_BREAK +case 27: +YY_RULE_SETUP #line 105 "lex_sql.l" - RETURN_TOKEN(DELETE); - YY_BREAK - case 28: YY_RULE_SETUP +RETURN_TOKEN(DELETE); + YY_BREAK +case 28: +YY_RULE_SETUP #line 106 "lex_sql.l" - RETURN_TOKEN(UPDATE); - YY_BREAK - case 29: YY_RULE_SETUP +RETURN_TOKEN(UPDATE); + YY_BREAK +case 29: +YY_RULE_SETUP #line 107 "lex_sql.l" - RETURN_TOKEN(SET); - YY_BREAK - case 30: YY_RULE_SETUP +RETURN_TOKEN(SET); + YY_BREAK +case 30: +YY_RULE_SETUP #line 108 "lex_sql.l" - RETURN_TOKEN(TRX_BEGIN); - YY_BREAK - case 31: YY_RULE_SETUP +RETURN_TOKEN(TRX_BEGIN); + YY_BREAK +case 31: +YY_RULE_SETUP #line 109 "lex_sql.l" - RETURN_TOKEN(TRX_COMMIT); - YY_BREAK - case 32: YY_RULE_SETUP +RETURN_TOKEN(TRX_COMMIT); + YY_BREAK +case 32: +YY_RULE_SETUP #line 110 "lex_sql.l" - RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK - case 33: YY_RULE_SETUP +RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK +case 33: +YY_RULE_SETUP #line 111 "lex_sql.l" - RETURN_TOKEN(INT_T); - YY_BREAK - case 34: YY_RULE_SETUP +RETURN_TOKEN(INT_T); + YY_BREAK +case 34: +YY_RULE_SETUP #line 112 "lex_sql.l" - RETURN_TOKEN(STRING_T); - YY_BREAK - case 35: YY_RULE_SETUP +RETURN_TOKEN(STRING_T); + YY_BREAK +case 35: +YY_RULE_SETUP #line 113 "lex_sql.l" - RETURN_TOKEN(FLOAT_T); - YY_BREAK - case 36: YY_RULE_SETUP +RETURN_TOKEN(FLOAT_T); + YY_BREAK +case 36: +YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK - case 37: YY_RULE_SETUP +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK +case 37: +YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token - YY_BREAK - case 38: YY_RULE_SETUP +RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + YY_BREAK +case 38: +YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(UNIQUE); - YY_BREAK - case 39: YY_RULE_SETUP +RETURN_TOKEN(UNIQUE); + YY_BREAK +case 39: +YY_RULE_SETUP #line 117 "lex_sql.l" - RETURN_TOKEN(NULL_T); - YY_BREAK - case 40: YY_RULE_SETUP +RETURN_TOKEN(NULL_T); + YY_BREAK +case 40: +YY_RULE_SETUP #line 118 "lex_sql.l" - RETURN_TOKEN(NULLABLE); - YY_BREAK - case 41: YY_RULE_SETUP +RETURN_TOKEN(NULLABLE); + YY_BREAK +case 41: +YY_RULE_SETUP #line 119 "lex_sql.l" - RETURN_TOKEN(LOAD); - YY_BREAK - case 42: YY_RULE_SETUP +RETURN_TOKEN(LOAD); + YY_BREAK +case 42: +YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(DATA); - YY_BREAK - case 43: YY_RULE_SETUP +RETURN_TOKEN(DATA); + YY_BREAK +case 43: +YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(INFILE); - YY_BREAK - case 44: YY_RULE_SETUP +RETURN_TOKEN(INFILE); + YY_BREAK +case 44: +YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); - YY_BREAK - case 45: YY_RULE_SETUP +RETURN_TOKEN(EXPLAIN); + YY_BREAK +case 45: +YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(GROUP); - YY_BREAK - case 46: YY_RULE_SETUP +RETURN_TOKEN(GROUP); + YY_BREAK +case 46: +YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(ORDER); - YY_BREAK - case 47: YY_RULE_SETUP +RETURN_TOKEN(ORDER); + YY_BREAK +case 47: +YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(BY); - YY_BREAK - case 48: YY_RULE_SETUP +RETURN_TOKEN(BY); + YY_BREAK +case 48: +YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(AS); - YY_BREAK - case 49: YY_RULE_SETUP +RETURN_TOKEN(AS); + YY_BREAK +case 49: +YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(ASC); - YY_BREAK - case 50: YY_RULE_SETUP +RETURN_TOKEN(ASC); + YY_BREAK +case 50: +YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(IN); - YY_BREAK - case 51: YY_RULE_SETUP +RETURN_TOKEN(IN); + YY_BREAK +case 51: +YY_RULE_SETUP #line 129 "lex_sql.l" - RETURN_TOKEN(EXISTS); - YY_BREAK - case 52: YY_RULE_SETUP +RETURN_TOKEN(EXISTS); + YY_BREAK +case 52: +YY_RULE_SETUP #line 130 "lex_sql.l" - RETURN_TOKEN(STORAGE); - YY_BREAK - case 53: YY_RULE_SETUP +RETURN_TOKEN(STORAGE); + YY_BREAK +case 53: +YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(FORMAT); - YY_BREAK - case 54: YY_RULE_SETUP +RETURN_TOKEN(FORMAT); + YY_BREAK +case 54: +YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(INNER); - YY_BREAK - case 55: YY_RULE_SETUP +RETURN_TOKEN(INNER); + YY_BREAK +case 55: +YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(JOIN); - YY_BREAK - case 56: YY_RULE_SETUP +RETURN_TOKEN(JOIN); + YY_BREAK +case 56: +YY_RULE_SETUP #line 134 "lex_sql.l" - RETURN_TOKEN(LBRACE); - YY_BREAK - case 57: YY_RULE_SETUP +RETURN_TOKEN(LBRACE); + YY_BREAK +case 57: +YY_RULE_SETUP #line 135 "lex_sql.l" - RETURN_TOKEN(RBRACE); - YY_BREAK - case 58: YY_RULE_SETUP +RETURN_TOKEN(RBRACE); + YY_BREAK +case 58: +YY_RULE_SETUP #line 137 "lex_sql.l" - RETURN_TOKEN(COMMA); - YY_BREAK - case 59: YY_RULE_SETUP +RETURN_TOKEN(COMMA); + YY_BREAK +case 59: +YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(EQ); - YY_BREAK - case 60: YY_RULE_SETUP +RETURN_TOKEN(EQ); + YY_BREAK +case 60: +YY_RULE_SETUP #line 139 "lex_sql.l" - RETURN_TOKEN(LE); - YY_BREAK - case 61: YY_RULE_SETUP +RETURN_TOKEN(LE); + YY_BREAK +case 61: +YY_RULE_SETUP #line 140 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 62: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 62: +YY_RULE_SETUP #line 141 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 63: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 63: +YY_RULE_SETUP #line 142 "lex_sql.l" - RETURN_TOKEN(LT); - YY_BREAK - case 64: YY_RULE_SETUP +RETURN_TOKEN(LT); + YY_BREAK +case 64: +YY_RULE_SETUP #line 143 "lex_sql.l" - RETURN_TOKEN(GE); - YY_BREAK - case 65: YY_RULE_SETUP +RETURN_TOKEN(GE); + YY_BREAK +case 65: +YY_RULE_SETUP #line 144 "lex_sql.l" - RETURN_TOKEN(GT); - YY_BREAK - case 66: YY_RULE_SETUP +RETURN_TOKEN(GT); + YY_BREAK +case 66: +YY_RULE_SETUP #line 145 "lex_sql.l" - RETURN_TOKEN(NOT); - YY_BREAK - case 67: YY_RULE_SETUP +RETURN_TOKEN(NOT); + YY_BREAK +case 67: +YY_RULE_SETUP #line 146 "lex_sql.l" - RETURN_TOKEN(IS); - YY_BREAK - case 68: YY_RULE_SETUP +RETURN_TOKEN(IS); + YY_BREAK +case 68: +YY_RULE_SETUP #line 147 "lex_sql.l" - RETURN_TOKEN(LIKE); - YY_BREAK - case 69: YY_RULE_SETUP +RETURN_TOKEN(LIKE); + YY_BREAK +case 69: +YY_RULE_SETUP #line 149 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(ID); - YY_BREAK - case 70: +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK +case 70: #line 152 "lex_sql.l" - case 71: +case 71: #line 153 "lex_sql.l" - case 72: +case 72: #line 154 "lex_sql.l" - case 73: YY_RULE_SETUP +case 73: +YY_RULE_SETUP #line 154 "lex_sql.l" - { - return yytext[0]; - } - YY_BREAK - case 74: - /* rule 74 can match eol */ - YY_RULE_SETUP +{ return yytext[0]; } + YY_BREAK +case 74: +/* rule 74 can match eol */ +YY_RULE_SETUP #line 155 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 75: - /* rule 75 can match eol */ - YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 75: +/* rule 75 can match eol */ +YY_RULE_SETUP #line 156 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 76: YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 76: +YY_RULE_SETUP #line 158 "lex_sql.l" - LOG_DEBUG("Unknown character [%c]",yytext[0]); - return yytext[0]; - YY_BREAK - case 77: YY_RULE_SETUP +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 77: +YY_RULE_SETUP #line 159 "lex_sql.l" - ECHO; - YY_BREAK +ECHO; + YY_BREAK #line 1447 "lex_sql.cpp" - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(STR): yyterminate(); - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if (yywrap(yyscanner)) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(STR): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3577,149 +1586,171 @@ YY_DECL * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(yyscan_t yyscanner) +static int yy_get_next_buffer (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else { - yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - yy_size_t new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if (yyg->yy_n_chars == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin, yyscanner); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = - (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(yyscan_t yyscanner) + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_current_state = yyg->yy_start; - - for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 222) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 222 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -3727,27 +1758,29 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 222) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 221); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 222 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 221); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -3756,133 +1789,141 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner) + static int yyinput (yyscan_t yyscanner) #else -static int input(yyscan_t yyscanner) + static int input (yyscan_t yyscanner) #endif { - int c; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin, yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap(yyscanner)) - return 0; - - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file, yyscan_t yyscanner) + void yyrestart (FILE * input_file , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); - yy_load_buffer_state(yyscanner); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(yyscanner); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state(yyscan_t yyscanner) +static void yy_load_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -3891,105 +1932,105 @@ static void yy_load_buffer_state(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file, yyscanner); + yy_init_buffer( b, file , yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!b) - return; + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf, yyscanner); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *)b, yyscanner); + yyfree( (void *) b , yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_flush_buffer(b, yyscanner); + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - b->yy_input_file = file; - b->yy_fill_buffer = 1; + yy_flush_buffer( b , yyscanner); - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!b) - return; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(yyscanner); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -3998,95 +2039,99 @@ void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state(yyscan_t yyscanner) +void yypop_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(yyscan_t yyscanner) +static void yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = - (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( - yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -4095,31 +2140,33 @@ static void yyensure_buffer_stack(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b, yyscanner); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -4130,10 +2177,10 @@ YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - - return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -4143,175 +2190,177 @@ YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n, yyscanner); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n, yyscanner); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyextra; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno(yyscan_t yyscanner) +int yyget_lineno (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column(yyscan_t yyscanner) +int yyget_column (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!YY_CURRENT_BUFFER) - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yycolumn; + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in(yyscan_t yyscanner) +FILE *yyget_in (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyin; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out(yyscan_t yyscanner) +FILE *yyget_out (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyout; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng(yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyleng; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text(yyscan_t yyscanner) +char *yyget_text (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yytext; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyextra = user_defined; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno(int _line_number, yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_lineno called with no buffer"); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column(int _column_no, yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_column called with no buffer"); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yycolumn = _column_no; + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -4320,80 +2369,80 @@ void yyset_column(int _column_no, yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str, yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyin = _in_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; } -void yyset_out(FILE *_out_str, yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyout = _out_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; } -int yyget_debug(yyscan_t yyscanner) +int yyget_debug (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yy_flex_debug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void yyset_debug(int _bdebug, yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flex_debug = _bdebug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ -YYSTYPE *yyget_lval(yyscan_t yyscanner) +YYSTYPE * yyget_lval (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylval; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc(yyscan_t yyscanner) +YYLTYPE *yyget_lloc (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; } - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylloc = yylloc_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t *ptr_yy_globals) +int yylex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -4403,94 +2452,94 @@ int yylex_init(yyscan_t *ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra(yy_user_defined, &dummy_yyguts); + yyset_extra (yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - yyset_extra(yy_user_defined, *ptr_yy_globals); + yyset_extra (yy_user_defined, *ptr_yy_globals); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } -static int yy_init_globals(yyscan_t yyscanner) +static int yy_init_globals (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(yyscan_t yyscanner) +int yylex_destroy (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack, yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack, yyscanner); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals(yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree(yyscanner, yyscanner); - yyscanner = NULL; - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; } /* @@ -4498,59 +2547,63 @@ int yylex_destroy(yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s, yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - int n; - for (n = 0; s[n]; ++n) - ; + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size, yyscan_t yyscanner) +void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr, yyscan_t yyscanner) +void yyfree (void * ptr , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - free((char *)ptr); /* see yyrealloc() for (char *) cast */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 159 "lex_sql.l" -void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } + +void scan_string(const char *str, yyscan_t scanner) { + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); +} + diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 48c24424..d9d6fa07 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,21 +12,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -79,62 +81,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -155,7 +157,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -195,72 +197,73 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -}; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -283,69 +286,69 @@ void yyfree(void *, yyscan_t yyscanner); #define YY_EXTRA_TYPE void * #endif -int yylex_init(yyscan_t *scanner); +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -373,9 +376,11 @@ static int yy_flex_strlen(const char *, yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -539,6 +544,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #line 159 "lex_sql.l" + #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 917da14d..9af3a54e 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -205,9 +205,10 @@ struct AttrInfoSqlNode */ struct CreateTableSqlNode { - std::string relation_name; ///< Relation name - std::vector attr_infos; ///< attributes - std::string storage_format; ///< storage format + std::string relation_name; ///< Relation name + std::vector attr_infos; ///< attributes + std::string storage_format; ///< storage format + SelectSqlNode create_table_select; ///< create table select }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 8c9bd696..7103cfa4 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,9 +63,13 @@ /* Pull parsers. */ #define YYPULL 1 + + + /* First part of user prologue. */ #line 2 "yacc_sql.y" + #include #include #include @@ -88,191 +92,200 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression( - ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, + Expression *left, + Expression *right, + const char *sql_string, + YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression( - const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression(const char *function_name, + std::vector> child, + const char *sql_string, + YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } + #line 125 "yacc_sql.cpp" -#ifndef YY_CAST -#ifdef __cplusplus -#define YY_CAST(Type, Val) static_cast(Val) -#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) -#else -#define YY_CAST(Type, Val) ((Type)(Val)) -#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) -#endif -#endif -#ifndef YY_NULLPTR -#if defined __cplusplus -#if 201103L <= __cplusplus -#define YY_NULLPTR nullptr -#else -#define YY_NULLPTR 0 -#endif -#else -#define YY_NULLPTR ((void *)0) -#endif -#endif +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_ORDER = 11, /* ORDER */ - YYSYMBOL_TABLE = 12, /* TABLE */ - YYSYMBOL_TABLES = 13, /* TABLES */ - YYSYMBOL_INDEX = 14, /* INDEX */ - YYSYMBOL_CALC = 15, /* CALC */ - YYSYMBOL_SELECT = 16, /* SELECT */ - YYSYMBOL_DESC = 17, /* DESC */ - YYSYMBOL_SHOW = 18, /* SHOW */ - YYSYMBOL_SYNC = 19, /* SYNC */ - YYSYMBOL_INSERT = 20, /* INSERT */ - YYSYMBOL_DELETE = 21, /* DELETE */ - YYSYMBOL_UPDATE = 22, /* UPDATE */ - YYSYMBOL_LBRACE = 23, /* LBRACE */ - YYSYMBOL_RBRACE = 24, /* RBRACE */ - YYSYMBOL_COMMA = 25, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 29, /* INT_T */ - YYSYMBOL_IN = 30, /* IN */ - YYSYMBOL_STRING_T = 31, /* STRING_T */ - YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ - YYSYMBOL_DATE_T = 33, /* DATE_T */ - YYSYMBOL_TEXT_T = 34, /* TEXT_T */ - YYSYMBOL_NOT = 35, /* NOT */ - YYSYMBOL_UNIQUE = 36, /* UNIQUE */ - YYSYMBOL_NULL_T = 37, /* NULL_T */ - YYSYMBOL_NULLABLE = 38, /* NULLABLE */ - YYSYMBOL_HELP = 39, /* HELP */ - YYSYMBOL_EXIT = 40, /* EXIT */ - YYSYMBOL_DOT = 41, /* DOT */ - YYSYMBOL_INTO = 42, /* INTO */ - YYSYMBOL_VALUES = 43, /* VALUES */ - YYSYMBOL_FROM = 44, /* FROM */ - YYSYMBOL_WHERE = 45, /* WHERE */ - YYSYMBOL_AND = 46, /* AND */ - YYSYMBOL_OR = 47, /* OR */ - YYSYMBOL_SET = 48, /* SET */ - YYSYMBOL_ON = 49, /* ON */ - YYSYMBOL_LOAD = 50, /* LOAD */ - YYSYMBOL_DATA = 51, /* DATA */ - YYSYMBOL_INFILE = 52, /* INFILE */ - YYSYMBOL_EXPLAIN = 53, /* EXPLAIN */ - YYSYMBOL_STORAGE = 54, /* STORAGE */ - YYSYMBOL_FORMAT = 55, /* FORMAT */ - YYSYMBOL_INNER = 56, /* INNER */ - YYSYMBOL_JOIN = 57, /* JOIN */ - YYSYMBOL_EQ = 58, /* EQ */ - YYSYMBOL_LT = 59, /* LT */ - YYSYMBOL_GT = 60, /* GT */ - YYSYMBOL_LE = 61, /* LE */ - YYSYMBOL_GE = 62, /* GE */ - YYSYMBOL_NE = 63, /* NE */ - YYSYMBOL_LIKE = 64, /* LIKE */ - YYSYMBOL_IS = 65, /* IS */ - YYSYMBOL_NUMBER = 66, /* NUMBER */ - YYSYMBOL_FLOAT = 67, /* FLOAT */ - YYSYMBOL_ID = 68, /* ID */ - YYSYMBOL_SSS = 69, /* SSS */ - YYSYMBOL_70_ = 70, /* '+' */ - YYSYMBOL_71_ = 71, /* '-' */ - YYSYMBOL_72_ = 72, /* '*' */ - YYSYMBOL_73_ = 73, /* '/' */ - YYSYMBOL_UMINUS = 74, /* UMINUS */ - YYSYMBOL_YYACCEPT = 75, /* $accept */ - YYSYMBOL_commands = 76, /* commands */ - YYSYMBOL_command_wrapper = 77, /* command_wrapper */ - YYSYMBOL_exit_stmt = 78, /* exit_stmt */ - YYSYMBOL_help_stmt = 79, /* help_stmt */ - YYSYMBOL_sync_stmt = 80, /* sync_stmt */ - YYSYMBOL_begin_stmt = 81, /* begin_stmt */ - YYSYMBOL_commit_stmt = 82, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 83, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 84, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 85, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 86, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 87, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 88, /* create_index_stmt */ - YYSYMBOL_opt_unique = 89, /* opt_unique */ - YYSYMBOL_attr_list = 90, /* attr_list */ - YYSYMBOL_drop_index_stmt = 91, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 92, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 93, /* attr_def_list */ - YYSYMBOL_attr_def = 94, /* attr_def */ - YYSYMBOL_nullable_constraint = 95, /* nullable_constraint */ - YYSYMBOL_number = 96, /* number */ - YYSYMBOL_type = 97, /* type */ - YYSYMBOL_insert_stmt = 98, /* insert_stmt */ - YYSYMBOL_values_list = 99, /* values_list */ - YYSYMBOL_value_list = 100, /* value_list */ - YYSYMBOL_value = 101, /* value */ - YYSYMBOL_storage_format = 102, /* storage_format */ - YYSYMBOL_delete_stmt = 103, /* delete_stmt */ - YYSYMBOL_update_stmt = 104, /* update_stmt */ - YYSYMBOL_setClauses = 105, /* setClauses */ - YYSYMBOL_setClause = 106, /* setClause */ - YYSYMBOL_select_stmt = 107, /* select_stmt */ - YYSYMBOL_calc_stmt = 108, /* calc_stmt */ - YYSYMBOL_expression_list = 109, /* expression_list */ - YYSYMBOL_expression = 110, /* expression */ - YYSYMBOL_alias = 111, /* alias */ - YYSYMBOL_aggr_func_expr = 112, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 113, /* sub_query_expr */ - YYSYMBOL_rel_attr = 114, /* rel_attr */ - YYSYMBOL_relation = 115, /* relation */ - YYSYMBOL_rel_list = 116, /* rel_list */ - YYSYMBOL_joinClauses = 117, /* joinClauses */ - YYSYMBOL_where = 118, /* where */ - YYSYMBOL_condition = 119, /* condition */ - YYSYMBOL_comp_op = 120, /* comp_op */ - YYSYMBOL_opt_order_by = 121, /* opt_order_by */ - YYSYMBOL_sort_list = 122, /* sort_list */ - YYSYMBOL_sort_unit = 123, /* sort_unit */ - YYSYMBOL_group_by = 124, /* group_by */ - YYSYMBOL_load_data_stmt = 125, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 126, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 127, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 128 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_ORDER = 11, /* ORDER */ + YYSYMBOL_TABLE = 12, /* TABLE */ + YYSYMBOL_TABLES = 13, /* TABLES */ + YYSYMBOL_INDEX = 14, /* INDEX */ + YYSYMBOL_CALC = 15, /* CALC */ + YYSYMBOL_SELECT = 16, /* SELECT */ + YYSYMBOL_DESC = 17, /* DESC */ + YYSYMBOL_SHOW = 18, /* SHOW */ + YYSYMBOL_SYNC = 19, /* SYNC */ + YYSYMBOL_INSERT = 20, /* INSERT */ + YYSYMBOL_DELETE = 21, /* DELETE */ + YYSYMBOL_UPDATE = 22, /* UPDATE */ + YYSYMBOL_LBRACE = 23, /* LBRACE */ + YYSYMBOL_RBRACE = 24, /* RBRACE */ + YYSYMBOL_COMMA = 25, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 29, /* INT_T */ + YYSYMBOL_IN = 30, /* IN */ + YYSYMBOL_STRING_T = 31, /* STRING_T */ + YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ + YYSYMBOL_DATE_T = 33, /* DATE_T */ + YYSYMBOL_TEXT_T = 34, /* TEXT_T */ + YYSYMBOL_NOT = 35, /* NOT */ + YYSYMBOL_UNIQUE = 36, /* UNIQUE */ + YYSYMBOL_NULL_T = 37, /* NULL_T */ + YYSYMBOL_NULLABLE = 38, /* NULLABLE */ + YYSYMBOL_HELP = 39, /* HELP */ + YYSYMBOL_EXIT = 40, /* EXIT */ + YYSYMBOL_DOT = 41, /* DOT */ + YYSYMBOL_INTO = 42, /* INTO */ + YYSYMBOL_VALUES = 43, /* VALUES */ + YYSYMBOL_FROM = 44, /* FROM */ + YYSYMBOL_WHERE = 45, /* WHERE */ + YYSYMBOL_AND = 46, /* AND */ + YYSYMBOL_OR = 47, /* OR */ + YYSYMBOL_SET = 48, /* SET */ + YYSYMBOL_ON = 49, /* ON */ + YYSYMBOL_LOAD = 50, /* LOAD */ + YYSYMBOL_DATA = 51, /* DATA */ + YYSYMBOL_INFILE = 52, /* INFILE */ + YYSYMBOL_EXPLAIN = 53, /* EXPLAIN */ + YYSYMBOL_STORAGE = 54, /* STORAGE */ + YYSYMBOL_FORMAT = 55, /* FORMAT */ + YYSYMBOL_INNER = 56, /* INNER */ + YYSYMBOL_JOIN = 57, /* JOIN */ + YYSYMBOL_EQ = 58, /* EQ */ + YYSYMBOL_LT = 59, /* LT */ + YYSYMBOL_GT = 60, /* GT */ + YYSYMBOL_LE = 61, /* LE */ + YYSYMBOL_GE = 62, /* GE */ + YYSYMBOL_NE = 63, /* NE */ + YYSYMBOL_LIKE = 64, /* LIKE */ + YYSYMBOL_IS = 65, /* IS */ + YYSYMBOL_NUMBER = 66, /* NUMBER */ + YYSYMBOL_FLOAT = 67, /* FLOAT */ + YYSYMBOL_ID = 68, /* ID */ + YYSYMBOL_SSS = 69, /* SSS */ + YYSYMBOL_70_ = 70, /* '+' */ + YYSYMBOL_71_ = 71, /* '-' */ + YYSYMBOL_72_ = 72, /* '*' */ + YYSYMBOL_73_ = 73, /* '/' */ + YYSYMBOL_UMINUS = 74, /* UMINUS */ + YYSYMBOL_YYACCEPT = 75, /* $accept */ + YYSYMBOL_commands = 76, /* commands */ + YYSYMBOL_command_wrapper = 77, /* command_wrapper */ + YYSYMBOL_exit_stmt = 78, /* exit_stmt */ + YYSYMBOL_help_stmt = 79, /* help_stmt */ + YYSYMBOL_sync_stmt = 80, /* sync_stmt */ + YYSYMBOL_begin_stmt = 81, /* begin_stmt */ + YYSYMBOL_commit_stmt = 82, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 83, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 84, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 85, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 86, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 87, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 88, /* create_index_stmt */ + YYSYMBOL_opt_unique = 89, /* opt_unique */ + YYSYMBOL_attr_list = 90, /* attr_list */ + YYSYMBOL_drop_index_stmt = 91, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 92, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 93, /* attr_def_list */ + YYSYMBOL_attr_def = 94, /* attr_def */ + YYSYMBOL_nullable_constraint = 95, /* nullable_constraint */ + YYSYMBOL_number = 96, /* number */ + YYSYMBOL_type = 97, /* type */ + YYSYMBOL_insert_stmt = 98, /* insert_stmt */ + YYSYMBOL_values_list = 99, /* values_list */ + YYSYMBOL_value_list = 100, /* value_list */ + YYSYMBOL_value = 101, /* value */ + YYSYMBOL_storage_format = 102, /* storage_format */ + YYSYMBOL_delete_stmt = 103, /* delete_stmt */ + YYSYMBOL_update_stmt = 104, /* update_stmt */ + YYSYMBOL_setClauses = 105, /* setClauses */ + YYSYMBOL_setClause = 106, /* setClause */ + YYSYMBOL_select_stmt = 107, /* select_stmt */ + YYSYMBOL_calc_stmt = 108, /* calc_stmt */ + YYSYMBOL_expression_list = 109, /* expression_list */ + YYSYMBOL_expression = 110, /* expression */ + YYSYMBOL_alias = 111, /* alias */ + YYSYMBOL_aggr_func_expr = 112, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 113, /* sub_query_expr */ + YYSYMBOL_rel_attr = 114, /* rel_attr */ + YYSYMBOL_relation = 115, /* relation */ + YYSYMBOL_rel_list = 116, /* rel_list */ + YYSYMBOL_joinClauses = 117, /* joinClauses */ + YYSYMBOL_where = 118, /* where */ + YYSYMBOL_condition = 119, /* condition */ + YYSYMBOL_comp_op = 120, /* comp_op */ + YYSYMBOL_opt_order_by = 121, /* opt_order_by */ + YYSYMBOL_sort_list = 122, /* sort_list */ + YYSYMBOL_sort_unit = 123, /* sort_unit */ + YYSYMBOL_group_by = 124, /* group_by */ + YYSYMBOL_load_data_stmt = 125, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 126, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 127, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 128 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; + + + #ifdef short -#undef short +# undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -280,11 +293,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -#include /* INFRINGES ON USER NAME SPACE */ -#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_STDINT_H -#endif +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -314,15 +327,16 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -#undef UINT_LEAST8_MAX -#undef UINT_LEAST16_MAX -#define UINT_LEAST8_MAX 255 -#define UINT_LEAST16_MAX 65535 +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -332,7 +346,8 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -341,38 +356,42 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -#define YYPTRDIFF_T __PTRDIFF_TYPE__ -#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -#elif defined PTRDIFF_MAX -#ifndef ptrdiff_t -#include /* INFRINGES ON USER NAME SPACE */ -#endif -#define YYPTRDIFF_T ptrdiff_t -#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -#else -#define YYPTRDIFF_T long -#define YYPTRDIFF_MAXIMUM LONG_MAX -#endif +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T -#ifdef __SIZE_TYPE__ -#define YYSIZE_T __SIZE_TYPE__ -#elif defined size_t -#define YYSIZE_T size_t -#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YYSIZE_T size_t -#else -#define YYSIZE_T unsigned -#endif +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -381,2382 +400,586 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -#if defined YYENABLE_NLS && YYENABLE_NLS -#if ENABLE_NLS -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_(Msgid) dgettext("bison-runtime", Msgid) -#endif -#endif -#ifndef YY_ -#define YY_(Msgid) Msgid -#endif +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif #endif + #ifndef YY_ATTRIBUTE_PURE -#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) -#else -#define YY_ATTRIBUTE_PURE -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define YY_ATTRIBUTE_UNUSED -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if !defined lint || defined __GNUC__ -#define YY_USE(E) ((void)(E)) +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) #else -#define YY_USE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") -#else -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -#endif -#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#define YY_INITIAL_VALUE(Value) Value +# define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_END +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -#define YY_INITIAL_VALUE(Value) /* Nothing. */ +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ -#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") -#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_END +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END #endif -#define YY_ASSERT(E) ((void)(0 && (E))) + +#define YY_ASSERT(E) ((void) (0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -#ifdef YYSTACK_USE_ALLOCA -#if YYSTACK_USE_ALLOCA -#ifdef __GNUC__ -#define YYSTACK_ALLOC __builtin_alloca -#elif defined __BUILTIN_VA_ARG_INCR -#include /* INFRINGES ON USER NAME SPACE */ -#elif defined _AIX -#define YYSTACK_ALLOC __alloca -#elif defined _MSC_VER -#include /* INFRINGES ON USER NAME SPACE */ -#define alloca _alloca -#else -#define YYSTACK_ALLOC alloca -#if !defined _ALLOCA_H && !defined EXIT_SUCCESS -#include /* INFRINGES ON USER NAME SPACE */ -/* Use EXIT_SUCCESS as a witness for stdlib.h. */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#endif -#endif -#endif - -#ifdef YYSTACK_ALLOC -/* Pacify GCC's 'empty if-body' warning. */ -#define YYSTACK_FREE(Ptr) \ - do { /* empty */ \ - ; \ - } while (0) -#ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -#endif -#else -#define YYSTACK_ALLOC YYMALLOC -#define YYSTACK_FREE YYFREE -#ifndef YYSTACK_ALLOC_MAXIMUM -#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -#endif -#if (defined __cplusplus && !defined EXIT_SUCCESS && \ - !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) -#include /* INFRINGES ON USER NAME SPACE */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef YYMALLOC -#define YYMALLOC malloc -#if !defined malloc && !defined EXIT_SUCCESS -void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#ifndef YYFREE -#define YYFREE free -#if !defined free && !defined EXIT_SUCCESS -void free(void *); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#endif +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif #endif /* 1 */ -#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ - defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -#define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) -#define YYCOPY_NEEDED 1 +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF(*yyptr); \ - } while (0) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -#ifndef YYCOPY -#if defined __GNUC__ && 1 < __GNUC__ -#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) -#else -#define YYCOPY(Dst, Src, Count) \ - do { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } while (0) -#endif -#endif +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 71 +#define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 218 +#define YYLAST 221 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 75 +#define YYNTOKENS 75 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 54 +#define YYNNTS 54 /* YYNRULES -- Number of rules. */ -#define YYNRULES 130 +#define YYNRULES 131 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 230 +#define YYNSTATES 232 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 325 +#define YYMAXUTOK 325 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = {0, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 72, - 70, - 2, - 71, - 2, - 73, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 74}; +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 72, 70, 2, 71, 2, 73, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 74 +}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = {0, - 227, - 227, - 235, - 236, - 237, - 238, - 239, - 240, - 241, - 242, - 243, - 244, - 245, - 246, - 247, - 248, - 249, - 250, - 251, - 252, - 253, - 254, - 255, - 259, - 265, - 270, - 276, - 282, - 288, - 294, - 301, - 307, - 315, - 325, - 340, - 341, - 345, - 351, - 360, - 370, - 394, - 397, - 410, - 422, - 449, - 453, - 457, - 462, - 468, - 472, - 473, - 474, - 475, - 476, - 480, - 493, - 499, - 506, - 512, - 520, - 524, - 528, - 534, - 541, - 544, - 551, - 563, - 577, - 582, - 589, - 599, - 628, - 661, - 667, - 676, - 679, - 688, - 704, - 707, - 710, - 713, - 716, - 725, - 728, - 733, - 739, - 742, - 745, - 752, - 755, - 758, - 763, - 770, - 777, - 782, - 792, - 798, - 808, - 825, - 832, - 844, - 847, - 853, - 857, - 861, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 884, - 887, - 895, - 900, - 908, - 914, - 920, - 930, - 935, - 948, - 956, - 966, - 967}; +static const yytype_int16 yyrline[] = +{ + 0, 227, 227, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 259, 265, 270, 276, 282, 288, + 294, 301, 307, 315, 325, 340, 341, 345, 351, 360, + 370, 391, 403, 406, 419, 431, 458, 462, 466, 471, + 477, 481, 482, 483, 484, 485, 489, 502, 508, 515, + 521, 529, 533, 537, 543, 550, 553, 560, 572, 586, + 591, 598, 608, 637, 670, 676, 685, 688, 697, 713, + 716, 719, 722, 725, 734, 737, 742, 748, 751, 754, + 761, 764, 767, 772, 779, 786, 791, 801, 807, 817, + 834, 841, 853, 856, 862, 866, 870, 877, 878, 879, + 880, 881, 882, 883, 884, 885, 886, 887, 888, 893, + 896, 904, 909, 917, 923, 929, 939, 944, 957, 965, + 975, 976 +}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = {"\"end of file\"", - "error", - "\"invalid token\"", - "SEMICOLON", - "AS", - "ASC", - "BY", - "CREATE", - "DROP", - "EXISTS", - "GROUP", - "ORDER", - "TABLE", - "TABLES", - "INDEX", - "CALC", - "SELECT", - "DESC", - "SHOW", - "SYNC", - "INSERT", - "DELETE", - "UPDATE", - "LBRACE", - "RBRACE", - "COMMA", - "TRX_BEGIN", - "TRX_COMMIT", - "TRX_ROLLBACK", - "INT_T", - "IN", - "STRING_T", - "FLOAT_T", - "DATE_T", - "TEXT_T", - "NOT", - "UNIQUE", - "NULL_T", - "NULLABLE", - "HELP", - "EXIT", - "DOT", - "INTO", - "VALUES", - "FROM", - "WHERE", - "AND", - "OR", - "SET", - "ON", - "LOAD", - "DATA", - "INFILE", - "EXPLAIN", - "STORAGE", - "FORMAT", - "INNER", - "JOIN", - "EQ", - "LT", - "GT", - "LE", - "GE", - "NE", - "LIKE", - "IS", - "NUMBER", - "FLOAT", - "ID", - "SSS", - "'+'", - "'-'", - "'*'", - "'/'", - "UMINUS", - "$accept", - "commands", - "command_wrapper", - "exit_stmt", - "help_stmt", - "sync_stmt", - "begin_stmt", - "commit_stmt", - "rollback_stmt", - "drop_table_stmt", - "show_tables_stmt", - "desc_table_stmt", - "show_index_stmt", - "create_index_stmt", - "opt_unique", - "attr_list", - "drop_index_stmt", - "create_table_stmt", - "attr_def_list", - "attr_def", - "nullable_constraint", - "number", - "type", - "insert_stmt", - "values_list", - "value_list", - "value", - "storage_format", - "delete_stmt", - "update_stmt", - "setClauses", - "setClause", - "select_stmt", - "calc_stmt", - "expression_list", - "expression", - "alias", - "aggr_func_expr", - "sub_query_expr", - "rel_attr", - "relation", - "rel_list", - "joinClauses", - "where", - "condition", - "comp_op", - "opt_order_by", - "sort_list", - "sort_unit", - "group_by", - "load_data_stmt", - "explain_stmt", - "set_variable_stmt", - "opt_semicolon", - YY_NULLPTR}; - -static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "ORDER", "TABLE", + "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", + "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", + "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", + "DATE_T", "TEXT_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", + "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", + "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", + "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", + "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", + "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", + "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", + "show_tables_stmt", "desc_table_stmt", "show_index_stmt", + "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", + "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", + "number", "type", "insert_stmt", "values_list", "value_list", "value", + "storage_format", "delete_stmt", "update_stmt", "setClauses", + "setClause", "select_stmt", "calc_stmt", "expression_list", "expression", + "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", "relation", + "rel_list", "joinClauses", "where", "condition", "comp_op", + "opt_order_by", "sort_list", "sort_unit", "group_by", "load_data_stmt", + "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -#define YYPACT_NINF (-148) +#define YYPACT_NINF (-158) -#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) 0 +#define yytable_value_is_error(Yyn) \ + 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {102, - 10, - 11, - -18, - -18, - -57, - 14, - -148, - -27, - -26, - -44, - -148, - -148, - -148, - -148, - -148, - -38, - -19, - 102, - 55, - 57, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -5, - -148, - 44, - 48, - 58, - 29, - -148, - -148, - -148, - -10, - -148, - -18, - -148, - -148, - -148, - -1, - -148, - -148, - -148, - 21, - -148, - -148, - 33, - 59, - 63, - 77, - 78, - 85, - -148, - -148, - -148, - -148, - 116, - 72, - -148, - 94, - -18, - 120, - 121, - -18, - 79, - -148, - 80, - -148, - -18, - -18, - -18, - -18, - 124, - 86, - 86, - 113, - 101, - 89, - -29, - 90, - 92, - 109, - 110, - 21, - -148, - -148, - 145, - -148, - -148, - -30, - -30, - -148, - -148, - -18, - -148, - 0, - 101, - -148, - 147, - -18, - -148, - 119, - -16, - -148, - -148, - 129, - 54, - 154, - 112, - -148, - -148, - -148, - 125, - 156, - -148, - -29, - 158, - 103, - 45, - -18, - 89, - -148, - 172, - -148, - -148, - -148, - -148, - -148, - 24, - 92, - 161, - 163, - 86, - 86, - 176, - 82, - -148, - 165, - -148, - -23, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - 155, - -18, - -18, - -18, - 32, - -148, - 123, - 126, - 152, - -148, - -148, - -148, - 154, - 139, - 127, - 148, - 101, - 6, - -148, - 188, - -148, - -148, - -29, - -29, - -148, - -148, - -148, - 32, - -148, - 150, - -148, - -148, - 174, - -148, - -148, - 144, - -148, - 175, - 177, - -18, - -148, - -18, - -148, - 87, - 97, - 146, - 127, - -148, - 43, - -148, - 9, - -148, - 178, - -148, - -148, - 134, - -148, - 149, - -148, - -148, - -18, - -148, - 86, - -148, - -148}; +static const yytype_int16 yypact[] = +{ + 106, -5, 46, 39, 39, -51, 50, -158, -21, -20, + -38, -158, -158, -158, -158, -158, -25, 2, 106, 51, + 43, -158, -158, -158, -158, -158, -158, -158, -158, -158, + -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, + -158, -158, -7, -158, 52, 19, 24, 22, -158, -158, + -158, -4, -158, 39, -158, -158, -158, -1, -158, -158, + -158, 41, -158, -158, 54, 44, 61, 72, 73, 78, + -158, -158, -158, -158, 16, 75, -158, 95, 39, 123, + 124, 39, 81, -158, 82, -158, 39, 39, 39, 39, + 126, 84, 84, 114, 113, 92, -19, 93, 145, 103, + 130, 104, 41, -158, -158, 149, -158, -158, 11, 11, + -158, -158, 39, -158, 0, 113, -158, 157, 39, -158, + 125, -16, -158, -158, 139, -158, 68, 159, 118, -158, + -158, -158, 128, 162, -158, -19, 163, 105, 57, 39, + 92, -158, 170, -158, -158, -158, -158, -158, 17, 103, + 165, 167, 84, 84, 180, 94, -158, 169, -158, -22, + -158, -158, -158, -158, -158, -158, -158, 158, 39, 39, + 39, 66, -158, 127, 131, 161, -158, -158, -158, 159, + 140, 132, 147, 113, 6, -158, 193, -158, -158, -19, + -19, -158, -158, -158, 66, -158, 155, -158, -158, 178, + -158, -158, 148, -158, 179, 181, 39, -158, 39, -158, + 117, -10, 150, 132, -158, -24, -158, 9, -158, 182, + -158, -158, 138, -158, 152, -158, -158, 39, -158, 84, + -158, -158 +}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = {0, - 36, - 0, - 75, - 75, - 0, - 0, - 26, - 0, - 0, - 0, - 27, - 28, - 29, - 25, - 24, - 0, - 0, - 0, - 0, - 129, - 23, - 22, - 15, - 16, - 17, - 18, - 9, - 10, - 11, - 14, - 12, - 13, - 8, - 5, - 7, - 6, - 4, - 3, - 19, - 20, - 21, - 0, - 35, - 0, - 0, - 0, - 75, - 63, - 60, - 61, - 94, - 62, - 0, - 86, - 84, - 73, - 89, - 87, - 88, - 85, - 74, - 32, - 31, - 0, - 0, - 0, - 0, - 0, - 0, - 127, - 1, - 130, - 2, - 0, - 0, - 30, - 0, - 75, - 0, - 0, - 75, - 0, - 83, - 0, - 90, - 0, - 0, - 0, - 0, - 76, - 0, - 0, - 0, - 101, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 93, - 82, - 0, - 95, - 91, - 78, - 79, - 80, - 81, - 75, - 96, - 89, - 101, - 33, - 0, - 0, - 66, - 0, - 101, - 68, - 128, - 0, - 0, - 41, - 0, - 39, - 92, - 77, - 0, - 97, - 125, - 0, - 55, - 0, - 102, - 0, - 0, - 67, - 0, - 50, - 51, - 52, - 53, - 54, - 48, - 0, - 0, - 0, - 0, - 0, - 118, - 0, - 58, - 0, - 116, - 0, - 106, - 107, - 108, - 109, - 110, - 111, - 114, - 112, - 0, - 0, - 0, - 70, - 69, - 0, - 0, - 0, - 47, - 46, - 44, - 41, - 64, - 0, - 0, - 101, - 89, - 98, - 0, - 71, - 56, - 0, - 0, - 117, - 115, - 113, - 103, - 104, - 105, - 126, - 49, - 0, - 45, - 42, - 0, - 40, - 37, - 0, - 0, - 125, - 0, - 59, - 0, - 48, - 0, - 0, - 34, - 99, - 72, - 122, - 119, - 120, - 57, - 43, - 0, - 38, - 0, - 124, - 123, - 0, - 65, - 0, - 121, - 100}; +static const yytype_uint8 yydefact[] = +{ + 0, 36, 0, 76, 76, 0, 0, 26, 0, 0, + 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, + 130, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, + 20, 21, 0, 35, 0, 0, 0, 76, 64, 61, + 62, 95, 63, 0, 87, 85, 74, 90, 88, 89, + 86, 75, 32, 31, 0, 0, 0, 0, 0, 0, + 128, 1, 131, 2, 0, 0, 30, 0, 76, 0, + 0, 76, 0, 84, 0, 91, 0, 0, 0, 0, + 77, 0, 0, 0, 102, 0, 0, 0, 0, 0, + 0, 0, 0, 94, 83, 0, 96, 92, 79, 80, + 81, 82, 76, 97, 90, 102, 33, 0, 0, 67, + 0, 102, 69, 129, 0, 41, 0, 42, 0, 39, + 93, 78, 0, 98, 126, 0, 56, 0, 103, 0, + 0, 68, 0, 51, 52, 53, 54, 55, 49, 0, + 0, 0, 0, 0, 119, 0, 59, 0, 117, 0, + 107, 108, 109, 110, 111, 112, 115, 113, 0, 0, + 0, 71, 70, 0, 0, 0, 48, 47, 45, 42, + 65, 0, 0, 102, 90, 99, 0, 72, 57, 0, + 0, 118, 116, 114, 104, 105, 106, 127, 50, 0, + 46, 43, 0, 40, 37, 0, 0, 126, 0, 60, + 0, 49, 0, 0, 34, 100, 73, 123, 120, 121, + 58, 44, 0, 38, 0, 125, 124, 0, 66, 0, + 122, 101 +}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-148, - -148, - 187, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -148, - -4, - -148, - -148, - 31, - 62, - 1, - -148, - -148, - -148, - -148, - 23, - -94, - -148, - -148, - -148, - -148, - 74, - 166, - -148, - -3, - -53, - 157, - -148, - -148, - -148, - -75, - 64, - -11, - -108, - -147, - -148, - -148, - -8, - -148, - 13, - -148, - -148, - -148, - -148}; +static const yytype_int16 yypgoto[] = +{ + -158, -158, 192, -158, -158, -158, -158, -158, -158, -158, + -158, -158, -158, -158, -158, -2, -158, -158, 33, 64, + 3, -158, -158, -158, -158, 25, -94, -158, -158, -158, + -158, 76, -41, -158, -3, -53, 160, -158, -158, -158, + -76, 65, -9, -110, -157, -158, -158, -8, -158, 14, + -158, -158, -158, -158 +}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = {0, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 44, - 203, - 32, - 33, - 148, - 125, - 176, - 197, - 146, - 34, - 134, - 153, - 55, - 201, - 35, - 36, - 120, - 121, - 37, - 38, - 56, - 57, - 131, - 58, - 59, - 60, - 180, - 114, - 181, - 118, - 136, - 166, - 185, - 216, - 217, - 152, - 39, - 40, - 41, - 73}; +static const yytype_uint8 yydefgoto[] = +{ + 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 44, 205, 32, 33, 150, 127, + 178, 199, 148, 34, 136, 155, 55, 203, 35, 36, + 121, 122, 37, 38, 56, 57, 133, 58, 59, 60, + 182, 115, 183, 119, 138, 168, 187, 218, 219, 154, + 39, 40, 41, 73 +}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = {83, - 61, - 122, - 84, - 84, - 47, - 132, - 189, - 48, - 138, - 84, - 62, - 139, - 81, - 223, - 65, - 113, - 115, - 66, - 48, - 193, - 194, - 42, - 45, - 67, - 46, - 224, - 63, - 64, - 117, - 68, - 82, - 69, - 107, - 108, - 109, - 110, - 49, - 50, - 154, - 52, - 190, - 88, - 89, - 80, - 78, - 43, - 172, - 49, - 50, - 51, - 52, - 47, - 53, - 54, - 71, - 130, - 213, - 75, - 173, - 72, - 174, - 175, - 74, - 135, - 91, - 48, - 85, - 85, - 86, - 87, - 88, - 89, - 205, - 85, - 101, - 182, - 92, - 104, - 86, - 87, - 88, - 89, - 141, - 169, - 142, - 143, - 144, - 145, - 167, - 168, - 167, - 168, - 207, - 154, - 49, - 50, - 51, - 52, - 222, - 53, - 54, - 86, - 87, - 88, - 89, - 186, - 187, - 129, - 1, - 2, - 218, - 187, - 192, - 135, - 135, - 76, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 95, - 77, - 93, - 11, - 12, - 13, - 94, - 173, - 156, - 174, - 175, - 96, - 97, - 157, - 98, - 99, - 14, - 15, - 100, - 102, - 103, - 117, - 105, - 106, - 111, - 16, - 135, - 17, - 215, - 112, - 18, - 116, - 119, - 126, - 123, - 124, - 158, - 159, - 160, - 161, - 162, - 163, - 164, - 165, - 128, - 133, - 140, - 215, - 86, - 87, - 88, - 89, - 137, - 127, - 147, - 149, - 151, - 150, - 155, - 171, - 178, - 179, - 184, - 188, - 198, - 191, - 195, - 196, - 200, - 206, - 202, - 167, - 204, - 209, - 210, - 211, - 212, - 226, - 225, - 220, - 70, - 227, - 221, - 199, - 177, - 219, - 208, - 170, - 79, - 90, - 183, - 229, - 228, - 214}; - -static const yytype_uint8 yycheck[] = {53, - 4, - 96, - 4, - 4, - 23, - 114, - 30, - 37, - 25, - 4, - 68, - 120, - 23, - 5, - 42, - 91, - 92, - 44, - 37, - 167, - 168, - 12, - 12, - 68, - 14, - 17, - 13, - 14, - 45, - 68, - 41, - 51, - 86, - 87, - 88, - 89, - 66, - 67, - 133, - 69, - 64, - 72, - 73, - 47, - 16, - 36, - 23, - 66, - 67, - 68, - 69, - 23, - 71, - 72, - 0, - 56, - 204, - 14, - 35, - 3, - 37, - 38, - 68, - 117, - 44, - 37, - 68, - 68, - 70, - 71, - 72, - 73, - 181, - 68, - 78, - 151, - 44, - 81, - 70, - 71, - 72, - 73, - 29, - 137, - 31, - 32, - 33, - 34, - 46, - 47, - 46, - 47, - 187, - 188, - 66, - 67, - 68, - 69, - 56, - 71, - 72, - 70, - 71, - 72, - 73, - 24, - 25, - 111, - 7, - 8, - 24, - 25, - 166, - 167, - 168, - 68, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 48, - 68, - 68, - 26, - 27, - 28, - 68, - 35, - 30, - 37, - 38, - 58, - 52, - 35, - 23, - 68, - 39, - 40, - 49, - 24, - 24, - 45, - 68, - 68, - 25, - 48, - 204, - 50, - 206, - 68, - 53, - 43, - 68, - 49, - 69, - 68, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 24, - 23, - 42, - 225, - 70, - 71, - 72, - 73, - 58, - 68, - 25, - 68, - 25, - 57, - 25, - 12, - 24, - 23, - 11, - 23, - 37, - 35, - 68, - 66, - 54, - 6, - 68, - 46, - 49, - 24, - 55, - 25, - 24, - 68, - 25, - 58, - 18, - 57, - 211, - 177, - 147, - 209, - 188, - 138, - 47, - 57, - 151, - 227, - 225, - 205}; +static const yytype_uint8 yytable[] = +{ + 83, 61, 123, 84, 84, 134, 79, 42, 191, 140, + 84, 141, 195, 196, 225, 114, 116, 62, 48, 81, + 98, 65, 169, 170, 66, 175, 226, 176, 177, 118, + 67, 43, 224, 108, 109, 110, 111, 82, 78, 99, + 174, 156, 192, 68, 80, 47, 72, 49, 50, 215, + 52, 71, 175, 69, 176, 177, 132, 125, 45, 48, + 46, 74, 47, 63, 64, 137, 75, 85, 85, 86, + 87, 88, 89, 207, 85, 102, 48, 184, 105, 86, + 87, 88, 89, 88, 89, 91, 171, 76, 49, 50, + 51, 52, 77, 53, 54, 209, 156, 143, 92, 144, + 145, 146, 147, 169, 170, 49, 50, 51, 52, 131, + 53, 54, 93, 1, 2, 194, 137, 137, 188, 189, + 95, 3, 4, 5, 6, 7, 8, 9, 10, 94, + 97, 96, 11, 12, 13, 158, 86, 87, 88, 89, + 159, 220, 189, 100, 101, 14, 15, 103, 104, 106, + 107, 112, 113, 137, 16, 217, 17, 117, 118, 18, + 120, 78, 124, 160, 161, 162, 163, 164, 165, 166, + 167, 126, 129, 130, 217, 86, 87, 88, 89, 128, + 135, 142, 173, 139, 149, 152, 151, 153, 157, 180, + 181, 186, 190, 193, 202, 197, 206, 198, 200, 208, + 204, 169, 211, 212, 213, 214, 228, 227, 222, 229, + 70, 223, 201, 179, 221, 210, 172, 90, 185, 230, + 231, 216 +}; + +static const yytype_uint8 yycheck[] = +{ + 53, 4, 96, 4, 4, 115, 47, 12, 30, 25, + 4, 121, 169, 170, 5, 91, 92, 68, 37, 23, + 4, 42, 46, 47, 44, 35, 17, 37, 38, 45, + 68, 36, 56, 86, 87, 88, 89, 41, 16, 23, + 23, 135, 64, 68, 47, 23, 3, 66, 67, 206, + 69, 0, 35, 51, 37, 38, 56, 98, 12, 37, + 14, 68, 23, 13, 14, 118, 14, 68, 68, 70, + 71, 72, 73, 183, 68, 78, 37, 153, 81, 70, + 71, 72, 73, 72, 73, 44, 139, 68, 66, 67, + 68, 69, 68, 71, 72, 189, 190, 29, 44, 31, + 32, 33, 34, 46, 47, 66, 67, 68, 69, 112, + 71, 72, 68, 7, 8, 168, 169, 170, 24, 25, + 48, 15, 16, 17, 18, 19, 20, 21, 22, 68, + 52, 58, 26, 27, 28, 30, 70, 71, 72, 73, + 35, 24, 25, 68, 49, 39, 40, 24, 24, 68, + 68, 25, 68, 206, 48, 208, 50, 43, 45, 53, + 68, 16, 69, 58, 59, 60, 61, 62, 63, 64, + 65, 68, 68, 24, 227, 70, 71, 72, 73, 49, + 23, 42, 12, 58, 25, 57, 68, 25, 25, 24, + 23, 11, 23, 35, 54, 68, 49, 66, 37, 6, + 68, 46, 24, 55, 25, 24, 68, 25, 58, 57, + 18, 213, 179, 149, 211, 190, 140, 57, 153, 227, + 229, 207 +}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = {0, - 7, - 8, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 26, - 27, - 28, - 39, - 40, - 48, - 50, - 53, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 91, - 92, - 98, - 103, - 104, - 107, - 108, - 125, - 126, - 127, - 12, - 36, - 89, - 12, - 14, - 23, - 37, - 66, - 67, - 68, - 69, - 71, - 72, - 101, - 109, - 110, - 112, - 113, - 114, - 109, - 68, - 13, - 14, - 42, - 44, - 68, - 68, - 51, - 77, - 0, - 3, - 128, - 68, - 14, - 68, - 68, - 16, - 107, - 109, - 23, - 41, - 110, - 4, - 68, - 70, - 71, - 72, - 73, - 111, - 44, - 44, - 68, - 68, - 48, - 58, - 52, - 23, - 68, - 49, - 109, - 24, - 24, - 109, - 68, - 68, - 110, - 110, - 110, - 110, - 25, - 68, - 115, - 116, - 115, - 43, - 45, - 118, - 68, - 105, - 106, - 101, - 69, - 68, - 94, - 49, - 68, - 24, - 109, - 56, - 111, - 118, - 23, - 99, - 110, - 119, - 58, - 25, - 118, - 42, - 29, - 31, - 32, - 33, - 34, - 97, - 25, - 93, - 68, - 57, - 25, - 124, - 100, - 101, - 25, - 30, - 35, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 120, - 46, - 47, - 110, - 106, - 12, - 23, - 35, - 37, - 38, - 95, - 94, - 24, - 23, - 115, - 117, - 115, - 116, - 11, - 121, - 24, - 25, - 23, - 30, - 64, - 35, - 110, - 119, - 119, - 68, - 66, - 96, - 37, - 93, - 54, - 102, - 68, - 90, - 49, - 118, - 6, - 101, - 100, - 24, - 55, - 25, - 24, - 119, - 124, - 110, - 122, - 123, - 24, - 95, - 58, - 90, - 56, - 5, - 17, - 25, - 68, - 57, - 122, - 117}; +static const yytype_uint8 yystos[] = +{ + 0, 7, 8, 15, 16, 17, 18, 19, 20, 21, + 22, 26, 27, 28, 39, 40, 48, 50, 53, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 91, 92, 98, 103, 104, 107, 108, 125, + 126, 127, 12, 36, 89, 12, 14, 23, 37, 66, + 67, 68, 69, 71, 72, 101, 109, 110, 112, 113, + 114, 109, 68, 13, 14, 42, 44, 68, 68, 51, + 77, 0, 3, 128, 68, 14, 68, 68, 16, 107, + 109, 23, 41, 110, 4, 68, 70, 71, 72, 73, + 111, 44, 44, 68, 68, 48, 58, 52, 4, 23, + 68, 49, 109, 24, 24, 109, 68, 68, 110, 110, + 110, 110, 25, 68, 115, 116, 115, 43, 45, 118, + 68, 105, 106, 101, 69, 107, 68, 94, 49, 68, + 24, 109, 56, 111, 118, 23, 99, 110, 119, 58, + 25, 118, 42, 29, 31, 32, 33, 34, 97, 25, + 93, 68, 57, 25, 124, 100, 101, 25, 30, 35, + 58, 59, 60, 61, 62, 63, 64, 65, 120, 46, + 47, 110, 106, 12, 23, 35, 37, 38, 95, 94, + 24, 23, 115, 117, 115, 116, 11, 121, 24, 25, + 23, 30, 64, 35, 110, 119, 119, 68, 66, 96, + 37, 93, 54, 102, 68, 90, 49, 118, 6, 101, + 100, 24, 55, 25, 24, 119, 124, 110, 122, 123, + 24, 95, 58, 90, 56, 5, 17, 25, 68, 57, + 122, 117 +}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = {0, - 75, - 76, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 89, - 90, - 90, - 91, - 92, - 93, - 93, - 94, - 94, - 95, - 95, - 95, - 95, - 96, - 97, - 97, - 97, - 97, - 97, - 98, - 99, - 99, - 100, - 100, - 101, - 101, - 101, - 101, - 102, - 102, - 103, - 104, - 105, - 105, - 106, - 107, - 107, - 108, - 108, - 109, - 109, - 109, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 111, - 111, - 111, - 112, - 113, - 114, - 114, - 115, - 116, - 116, - 117, - 117, - 118, - 118, - 119, - 119, - 119, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 121, - 121, - 122, - 122, - 123, - 123, - 123, - 124, - 125, - 126, - 127, - 128, - 128}; +static const yytype_uint8 yyr1[] = +{ + 0, 75, 76, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 89, 90, 90, 91, + 92, 92, 93, 93, 94, 94, 95, 95, 95, 95, + 96, 97, 97, 97, 97, 97, 98, 99, 99, 100, + 100, 101, 101, 101, 101, 102, 102, 103, 104, 105, + 105, 106, 107, 107, 108, 108, 109, 109, 109, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 111, 111, 111, 112, 113, 114, 114, 115, 116, 116, + 117, 117, 118, 118, 119, 119, 119, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 121, + 121, 122, 122, 123, 123, 123, 124, 125, 126, 127, + 128, 128 +}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = {0, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 3, - 2, - 2, - 4, - 9, - 1, - 0, - 1, - 3, - 5, - 8, - 0, - 3, - 6, - 3, - 2, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 5, - 3, - 5, - 1, - 3, - 1, - 1, - 1, - 1, - 0, - 4, - 4, - 5, - 1, - 3, - 3, - 7, - 9, - 2, - 2, - 0, - 2, - 4, - 3, - 3, - 3, - 3, - 3, - 2, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 2, - 4, - 3, - 1, - 3, - 1, - 2, - 4, - 3, - 6, - 0, - 2, - 3, - 3, - 3, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 2, - 1, - 2, - 0, - 3, - 1, - 3, - 1, - 2, - 2, - 0, - 7, - 2, - 4, - 0, - 1}; - -enum +static const yytype_int8 yyr2[] = { - YYENOMEM = -2 + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, + 8, 5, 0, 3, 6, 3, 2, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 5, 3, 5, 1, + 3, 1, 1, 1, 1, 0, 4, 4, 5, 1, + 3, 3, 7, 9, 2, 2, 0, 2, 4, 3, + 3, 3, 3, 3, 2, 1, 1, 1, 1, 1, + 0, 1, 2, 4, 3, 1, 3, 1, 2, 4, + 3, 6, 0, 2, 3, 3, 3, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 2, 1, 2, 0, + 3, 1, 3, 1, 2, 2, 0, 7, 2, 4, + 0, 1 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK(yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } else { \ - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -2768,131 +991,151 @@ enum the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } else { \ - (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ - } \ - while (0) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* Enable debugging if requested. */ #if YYDEBUG -#ifndef YYFPRINTF -#include /* INFRINGES ON USER NAME SPACE */ -#define YYFPRINTF fprintf -#endif +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -#define YYDPRINTF(Args) \ - do { \ - if (yydebug) \ - YYFPRINTF Args; \ - } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YYLOCATION_PRINT +# ifndef YYLOCATION_PRINT -#if defined YY_LOCATION_PRINT +# if defined YY_LOCATION_PRINT -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) { - res += YYFPRINTF(yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF(yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) { - if (yylocp->first_line < yylocp->last_line) { - res += YYFPRINTF(yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF(yyo, ".%d", end_col); - } else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF(yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } return res; } -#define YYLOCATION_PRINT yy_location_print_ +# define YYLOCATION_PRINT yy_location_print_ -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -#else +# else -#define YYLOCATION_PRINT(File, Loc) ((void)0) -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT YYLOCATION_PRINT +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT + +# endif +# endif /* !defined YYLOCATION_PRINT */ -#endif -#endif /* !defined YYLOCATION_PRINT */ -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ - do { \ - if (yydebug) { \ - YYFPRINTF(stderr, "%s ", Title); \ - yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF(stderr, "\n"); \ - } \ - } while (0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { FILE *yyoutput = yyo; - YY_USE(yyoutput); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YYLOCATION_PRINT(yyo, yylocationp); - YYFPRINTF(yyo, ": "); - yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF(yyo, ")"); + YYLOCATION_PRINT (yyo, yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -2900,66 +1143,70 @@ static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *co | TOP (included). | `------------------------------------------------------------------*/ -static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF(stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) { - int yybot = *yybottom; - YYFPRINTF(stderr, " %d", yybot); - } - YYFPRINTF(stderr, "\n"); + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); } -#define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print((Bottom), (Top)); \ - } while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, - ParsedSqlResult *sql_result, void *scanner) +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF(stderr, " $%d = ", yyi + 1); - yy_symbol_print(stderr, - YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), - sql_string, - sql_result, - scanner); - YYFPRINTF(stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); + YYFPRINTF (stderr, "\n"); + } } -#define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ - } while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -#define YYDPRINTF(Args) ((void)0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -#define YY_STACK_PRINT(Bottom, Top) -#define YY_REDUCE_PRINT(Rule) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ + /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -2970,15 +1217,16 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif + /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -2987,59 +1235,69 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default(yyn)) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } + + + #ifndef yystrlen -#if defined __GLIBC__ && defined _STRING_H -#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) -#else +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ -static YYPTRDIFF_T yystrlen(const char *yystr) +static YYPTRDIFF_T +yystrlen (const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -#endif +# endif #endif #ifndef yystpcpy -#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -#define yystpcpy stpcpy -#else +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char *yystpcpy(char *yydest, const char *yysrc) +static char * +yystpcpy (char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -3047,7 +1305,7 @@ static char *yystpcpy(char *yydest, const char *yysrc) return yyd - 1; } -#endif +# endif #endif #ifndef yytnamerr @@ -3058,45 +1316,52 @@ static char *yystpcpy(char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) { - if (*yystr == '"') { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) { - case '\'': - case ',': goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes:; - } + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } if (yyres) - return yystpcpy(yyres, yystr) - yyres; + return yystpcpy (yyres, yystr) - yyres; else - return yystrlen(yystr); + return yystrlen (yystr); } #endif -static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -3123,17 +1388,19 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -3145,12 +1412,11 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) { - enum - { - YYARGS_MAX = 5 - }; + enum { YYARGS_MAX = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -3160,13 +1426,16 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) { -#define YYCASE_(N, S) \ - case N: yyformat = S; break + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -3175,118 +1444,134 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen(yyformat) - 2 * yycount + 1; + yysize = yystrlen (yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) { - YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) { - *yymsg_alloc = 2 * yysize; - if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } else { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } } return 0; } + /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, - const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YY_USE(yyvaluep); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + + + + /*----------. | yyparse. | `----------*/ -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +int +yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - /* Lookahead token kind. */ - int yychar; - - /* The semantic value of the lookahead symbol. */ - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ - YY_INITIAL_VALUE(static YYSTYPE yyval_default;) - YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); - - /* Location data for the lookahead symbol. */ - static YYLTYPE yyloc_default -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = {1, 1, 1, 1} -#endif - ; - YYLTYPE yylloc = yyloc_default; +/* Lookahead token kind. */ +int yychar; + - /* Number of syntax errors so far. */ - int yynerrs = 0; +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Number of syntax errors so far. */ + int yynerrs = 0; - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -3302,23 +1587,24 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF((stderr, "Starting parse\n")); + YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -3327,90 +1613,93 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) have just been pushed. So pushing a state here evens the stacks. */ yyssp++; + /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF((stderr, "Entering state %d\n", yystate)); - YY_ASSERT(0 <= yystate && yystate < YYNSTATES); + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST(yy_state_t, yystate); + *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else - { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -#if defined yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow(YY_("memory exhausted"), - &yyss1, - yysize * YYSIZEOF(*yyssp), - &yyvs1, - yysize * YYSIZEOF(*yyvsp), - &yyls1, - yysize * YYSIZEOF(*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -#else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); - if (!yyptr) + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) YYNOMEM; - YYSTACK_RELOCATE(yyss_alloc, yyss); - YYSTACK_RELOCATE(yyvs_alloc, yyvs); - YYSTACK_RELOCATE(yyls_alloc, yyls); -#undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE(yyss1); - } -#endif + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + YYNOMEM; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ @@ -3420,34 +1709,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default(yyn)) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) { - YYDPRINTF((stderr, "Reading a token\n")); - yychar = yylex(&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF((stderr, "Now at end of input.\n")); - } else if (yychar == YYerror) { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { - yytoken = YYTRANSLATE(yychar); - YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -3455,12 +1750,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) { - if (yytable_value_is_error(yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -3468,7 +1764,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3479,6 +1775,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yychar = YYEMPTY; goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -3488,6 +1785,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) goto yyerrlab; goto yyreduce; + /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -3503,181 +1801,177 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1 - yylen]; + yyval = yyvsp[1-yylen]; /* Default location. */ - YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT(yyn); - switch (yyn) { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 228 "yacc_sql.y" + YY_REDUCE_PRINT (yyn); + switch (yyn) { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } -#line 1814 "yacc_sql.cpp" + case 2: /* commands: command_wrapper opt_semicolon */ +#line 228 "yacc_sql.y" + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } +#line 1819 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ + case 24: /* exit_stmt: EXIT */ #line 259 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1823 "yacc_sql.cpp" +#line 1828 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ + case 25: /* help_stmt: HELP */ #line 265 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1831 "yacc_sql.cpp" +#line 1836 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ + case 26: /* sync_stmt: SYNC */ #line 270 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1839 "yacc_sql.cpp" +#line 1844 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ + case 27: /* begin_stmt: TRX_BEGIN */ #line 276 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1847 "yacc_sql.cpp" +#line 1852 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ + case 28: /* commit_stmt: TRX_COMMIT */ #line 282 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1855 "yacc_sql.cpp" +#line 1860 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ + case 29: /* rollback_stmt: TRX_ROLLBACK */ #line 288 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1863 "yacc_sql.cpp" +#line 1868 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ + case 30: /* drop_table_stmt: DROP TABLE ID */ #line 294 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1873 "yacc_sql.cpp" +#line 1878 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ + case 31: /* show_tables_stmt: SHOW TABLES */ #line 301 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1881 "yacc_sql.cpp" +#line 1886 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ + case 32: /* desc_table_stmt: DESC ID */ #line 307 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1891 "yacc_sql.cpp" +#line 1896 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ #line 316 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1902 "yacc_sql.cpp" +#line 1907 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ + case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ #line 326 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1918 "yacc_sql.cpp" +#line 1923 "yacc_sql.cpp" break; - case 35: /* opt_unique: UNIQUE */ + case 35: /* opt_unique: UNIQUE */ #line 340 "yacc_sql.y" - { - (yyval.unique) = true; - } -#line 1924 "yacc_sql.cpp" + { (yyval.unique) = true; } +#line 1929 "yacc_sql.cpp" break; - case 36: /* opt_unique: %empty */ + case 36: /* opt_unique: %empty */ #line 341 "yacc_sql.y" - { - (yyval.unique) = false; - } -#line 1930 "yacc_sql.cpp" + { (yyval.unique) = false; } +#line 1935 "yacc_sql.cpp" break; - case 37: /* attr_list: ID */ + case 37: /* attr_list: ID */ #line 346 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1940 "yacc_sql.cpp" +#line 1945 "yacc_sql.cpp" break; - case 38: /* attr_list: ID COMMA attr_list */ + case 38: /* attr_list: ID COMMA attr_list */ #line 352 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list) - ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 1950 "yacc_sql.cpp" +#line 1955 "yacc_sql.cpp" break; - case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 361 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1962 "yacc_sql.cpp" +#line 1967 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 371 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-5].string); + create_table.relation_name = (yyvsp[-5].string); free((yyvsp[-5].string)); std::vector *src_attrs = (yyvsp[-2].attr_infos); @@ -3694,19 +1988,32 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); } } -#line 1987 "yacc_sql.cpp" +#line 1992 "yacc_sql.cpp" + break; + + case 41: /* create_table_stmt: CREATE TABLE ID AS select_stmt */ +#line 392 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; + create_table.relation_name = (yyvsp[-2].string); + free((yyvsp[-2].string)); + + create_table.create_table_select = std::move((yyvsp[0].sql_node)->selection); + } +#line 2005 "yacc_sql.cpp" break; - case 41: /* attr_def_list: %empty */ -#line 394 "yacc_sql.y" + case 42: /* attr_def_list: %empty */ +#line 403 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 1995 "yacc_sql.cpp" +#line 2013 "yacc_sql.cpp" break; - case 42: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 398 "yacc_sql.y" + case 43: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 407 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -3716,29 +2023,29 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2009 "yacc_sql.cpp" +#line 2027 "yacc_sql.cpp" break; - case 43: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 411 "yacc_sql.y" + case 44: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ +#line 420 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; } free((yyvsp[-5].string)); } -#line 2025 "yacc_sql.cpp" +#line 2043 "yacc_sql.cpp" break; - case 44: /* attr_def: ID type nullable_constraint */ -#line 423 "yacc_sql.y" + case 45: /* attr_def: ID type nullable_constraint */ +#line 432 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -3760,93 +2067,81 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2053 "yacc_sql.cpp" +#line 2071 "yacc_sql.cpp" break; - case 45: /* nullable_constraint: NOT NULL_T */ -#line 450 "yacc_sql.y" + case 46: /* nullable_constraint: NOT NULL_T */ +#line 459 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2061 "yacc_sql.cpp" +#line 2079 "yacc_sql.cpp" break; - case 46: /* nullable_constraint: NULLABLE */ -#line 454 "yacc_sql.y" + case 47: /* nullable_constraint: NULLABLE */ +#line 463 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2069 "yacc_sql.cpp" +#line 2087 "yacc_sql.cpp" break; - case 47: /* nullable_constraint: NULL_T */ -#line 458 "yacc_sql.y" + case 48: /* nullable_constraint: NULL_T */ +#line 467 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2077 "yacc_sql.cpp" +#line 2095 "yacc_sql.cpp" break; - case 48: /* nullable_constraint: %empty */ -#line 462 "yacc_sql.y" + case 49: /* nullable_constraint: %empty */ +#line 471 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2085 "yacc_sql.cpp" +#line 2103 "yacc_sql.cpp" break; - case 49: /* number: NUMBER */ -#line 468 "yacc_sql.y" - { - (yyval.number) = (yyvsp[0].number); - } -#line 2091 "yacc_sql.cpp" + case 50: /* number: NUMBER */ +#line 477 "yacc_sql.y" + {(yyval.number) = (yyvsp[0].number);} +#line 2109 "yacc_sql.cpp" break; - case 50: /* type: INT_T */ -#line 472 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::INTS); - } -#line 2097 "yacc_sql.cpp" + case 51: /* type: INT_T */ +#line 481 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::INTS); } +#line 2115 "yacc_sql.cpp" break; - case 51: /* type: STRING_T */ -#line 473 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::CHARS); - } -#line 2103 "yacc_sql.cpp" + case 52: /* type: STRING_T */ +#line 482 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::CHARS); } +#line 2121 "yacc_sql.cpp" break; - case 52: /* type: FLOAT_T */ -#line 474 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::FLOATS); - } -#line 2109 "yacc_sql.cpp" + case 53: /* type: FLOAT_T */ +#line 483 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::FLOATS); } +#line 2127 "yacc_sql.cpp" break; - case 53: /* type: DATE_T */ -#line 475 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::DATES); - } -#line 2115 "yacc_sql.cpp" + case 54: /* type: DATE_T */ +#line 484 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 2133 "yacc_sql.cpp" break; - case 54: /* type: TEXT_T */ -#line 476 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::TEXTS); - } -#line 2121 "yacc_sql.cpp" + case 55: /* type: TEXT_T */ +#line 485 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::TEXTS); } +#line 2139 "yacc_sql.cpp" break; - case 55: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 481 "yacc_sql.y" + case 56: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 490 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -3854,117 +2149,117 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2135 "yacc_sql.cpp" +#line 2153 "yacc_sql.cpp" break; - case 56: /* values_list: LBRACE value_list RBRACE */ -#line 494 "yacc_sql.y" + case 57: /* values_list: LBRACE value_list RBRACE */ +#line 503 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2145 "yacc_sql.cpp" +#line 2163 "yacc_sql.cpp" break; - case 57: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 500 "yacc_sql.y" + case 58: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 509 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2154 "yacc_sql.cpp" +#line 2172 "yacc_sql.cpp" break; - case 58: /* value_list: value */ -#line 507 "yacc_sql.y" + case 59: /* value_list: value */ +#line 516 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2164 "yacc_sql.cpp" +#line 2182 "yacc_sql.cpp" break; - case 59: /* value_list: value_list COMMA value */ -#line 513 "yacc_sql.y" + case 60: /* value_list: value_list COMMA value */ +#line 522 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2173 "yacc_sql.cpp" +#line 2191 "yacc_sql.cpp" break; - case 60: /* value: NUMBER */ -#line 520 "yacc_sql.y" - { + case 61: /* value: NUMBER */ +#line 529 "yacc_sql.y" + { (yyval.value) = new Value((int)(yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2182 "yacc_sql.cpp" +#line 2200 "yacc_sql.cpp" break; - case 61: /* value: FLOAT */ -#line 524 "yacc_sql.y" - { + case 62: /* value: FLOAT */ +#line 533 "yacc_sql.y" + { (yyval.value) = new Value((float)(yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2191 "yacc_sql.cpp" +#line 2209 "yacc_sql.cpp" break; - case 62: /* value: SSS */ -#line 528 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); + case 63: /* value: SSS */ +#line 537 "yacc_sql.y" + { + char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2202 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; - case 63: /* value: NULL_T */ -#line 534 "yacc_sql.y" - { + case 64: /* value: NULL_T */ +#line 543 "yacc_sql.y" + { (yyval.value) = new Value(NullValue()); } -#line 2210 "yacc_sql.cpp" +#line 2228 "yacc_sql.cpp" break; - case 64: /* storage_format: %empty */ -#line 541 "yacc_sql.y" + case 65: /* storage_format: %empty */ +#line 550 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2218 "yacc_sql.cpp" +#line 2236 "yacc_sql.cpp" break; - case 65: /* storage_format: STORAGE FORMAT EQ ID */ -#line 545 "yacc_sql.y" + case 66: /* storage_format: STORAGE FORMAT EQ ID */ +#line 554 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2226 "yacc_sql.cpp" +#line 2244 "yacc_sql.cpp" break; - case 66: /* delete_stmt: DELETE FROM ID where */ -#line 552 "yacc_sql.y" + case 67: /* delete_stmt: DELETE FROM ID where */ +#line 561 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); } free((yyvsp[-1].string)); } -#line 2239 "yacc_sql.cpp" +#line 2257 "yacc_sql.cpp" break; - case 67: /* update_stmt: UPDATE ID SET setClauses where */ -#line 564 "yacc_sql.y" + case 68: /* update_stmt: UPDATE ID SET setClauses where */ +#line 573 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -3973,39 +2268,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2254 "yacc_sql.cpp" +#line 2272 "yacc_sql.cpp" break; - case 68: /* setClauses: setClause */ -#line 578 "yacc_sql.y" + case 69: /* setClauses: setClause */ +#line 587 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2263 "yacc_sql.cpp" +#line 2281 "yacc_sql.cpp" break; - case 69: /* setClauses: setClauses COMMA setClause */ -#line 583 "yacc_sql.y" + case 70: /* setClauses: setClauses COMMA setClause */ +#line 592 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2271 "yacc_sql.cpp" +#line 2289 "yacc_sql.cpp" break; - case 70: /* setClause: ID EQ expression */ -#line 590 "yacc_sql.y" + case 71: /* setClause: ID EQ expression */ +#line 599 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2282 "yacc_sql.cpp" +#line 2300 "yacc_sql.cpp" break; - case 71: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 600 "yacc_sql.y" + case 72: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ +#line 609 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-5].expression_list) != nullptr) { @@ -4034,11 +2329,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].orderby_list); } } -#line 2315 "yacc_sql.cpp" +#line 2333 "yacc_sql.cpp" break; - case 72: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 629 "yacc_sql.y" + case 73: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 638 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4052,8 +2347,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); - ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -4061,8 +2355,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -4070,39 +2363,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2349 "yacc_sql.cpp" +#line 2367 "yacc_sql.cpp" break; - case 73: /* calc_stmt: CALC expression_list */ -#line 662 "yacc_sql.y" + case 74: /* calc_stmt: CALC expression_list */ +#line 671 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2359 "yacc_sql.cpp" +#line 2377 "yacc_sql.cpp" break; - case 74: /* calc_stmt: SELECT expression_list */ -#line 668 "yacc_sql.y" + case 75: /* calc_stmt: SELECT expression_list */ +#line 677 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2369 "yacc_sql.cpp" +#line 2387 "yacc_sql.cpp" break; - case 75: /* expression_list: %empty */ -#line 676 "yacc_sql.y" - { + case 76: /* expression_list: %empty */ +#line 685 "yacc_sql.y" + { (yyval.expression_list) = new std::vector>; } -#line 2377 "yacc_sql.cpp" +#line 2395 "yacc_sql.cpp" break; - case 76: /* expression_list: expression alias */ -#line 680 "yacc_sql.y" + case 77: /* expression_list: expression alias */ +#line 689 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4111,11 +2404,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2390 "yacc_sql.cpp" +#line 2408 "yacc_sql.cpp" break; - case 77: /* expression_list: expression alias COMMA expression_list */ -#line 689 "yacc_sql.y" + case 78: /* expression_list: expression alias COMMA expression_list */ +#line 698 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4125,51 +2418,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2407 "yacc_sql.cpp" +#line 2425 "yacc_sql.cpp" break; - case 78: /* expression: expression '+' expression */ -#line 704 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 79: /* expression: expression '+' expression */ +#line 713 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2415 "yacc_sql.cpp" +#line 2433 "yacc_sql.cpp" break; - case 79: /* expression: expression '-' expression */ -#line 707 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 80: /* expression: expression '-' expression */ +#line 716 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2423 "yacc_sql.cpp" +#line 2441 "yacc_sql.cpp" break; - case 80: /* expression: expression '*' expression */ -#line 710 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 81: /* expression: expression '*' expression */ +#line 719 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2431 "yacc_sql.cpp" +#line 2449 "yacc_sql.cpp" break; - case 81: /* expression: expression '/' expression */ -#line 713 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 82: /* expression: expression '/' expression */ +#line 722 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2439 "yacc_sql.cpp" +#line 2457 "yacc_sql.cpp" break; - case 82: /* expression: LBRACE expression_list RBRACE */ -#line 716 "yacc_sql.y" - { + case 83: /* expression: LBRACE expression_list RBRACE */ +#line 725 "yacc_sql.y" + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -4178,442 +2467,414 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2453 "yacc_sql.cpp" +#line 2471 "yacc_sql.cpp" break; - case 83: /* expression: '-' expression */ -#line 725 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + case 84: /* expression: '-' expression */ +#line 734 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2461 "yacc_sql.cpp" +#line 2479 "yacc_sql.cpp" break; - case 84: /* expression: value */ -#line 728 "yacc_sql.y" - { + case 85: /* expression: value */ +#line 737 "yacc_sql.y" + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2471 "yacc_sql.cpp" +#line 2489 "yacc_sql.cpp" break; - case 85: /* expression: rel_attr */ -#line 733 "yacc_sql.y" - { + case 86: /* expression: rel_attr */ +#line 742 "yacc_sql.y" + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2482 "yacc_sql.cpp" +#line 2500 "yacc_sql.cpp" break; - case 86: /* expression: '*' */ -#line 739 "yacc_sql.y" - { + case 87: /* expression: '*' */ +#line 748 "yacc_sql.y" + { (yyval.expression) = new StarExpr(); } -#line 2490 "yacc_sql.cpp" +#line 2508 "yacc_sql.cpp" break; - case 87: /* expression: aggr_func_expr */ -#line 742 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + case 88: /* expression: aggr_func_expr */ +#line 751 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2498 "yacc_sql.cpp" +#line 2516 "yacc_sql.cpp" break; - case 88: /* expression: sub_query_expr */ -#line 745 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + case 89: /* expression: sub_query_expr */ +#line 754 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2506 "yacc_sql.cpp" +#line 2524 "yacc_sql.cpp" break; - case 89: /* alias: %empty */ -#line 752 "yacc_sql.y" - { + case 90: /* alias: %empty */ +#line 761 "yacc_sql.y" + { (yyval.string) = nullptr; } -#line 2514 "yacc_sql.cpp" +#line 2532 "yacc_sql.cpp" break; - case 90: /* alias: ID */ -#line 755 "yacc_sql.y" - { + case 91: /* alias: ID */ +#line 764 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2522 "yacc_sql.cpp" +#line 2540 "yacc_sql.cpp" break; - case 91: /* alias: AS ID */ -#line 758 "yacc_sql.y" - { + case 92: /* alias: AS ID */ +#line 767 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2530 "yacc_sql.cpp" +#line 2548 "yacc_sql.cpp" break; - case 92: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 764 "yacc_sql.y" + case 93: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 773 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2538 "yacc_sql.cpp" +#line 2556 "yacc_sql.cpp" break; - case 93: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 771 "yacc_sql.y" + case 94: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 780 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2546 "yacc_sql.cpp" +#line 2564 "yacc_sql.cpp" break; - case 94: /* rel_attr: ID */ -#line 777 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 95: /* rel_attr: ID */ +#line 786 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2556 "yacc_sql.cpp" +#line 2574 "yacc_sql.cpp" break; - case 95: /* rel_attr: ID DOT ID */ -#line 782 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 96: /* rel_attr: ID DOT ID */ +#line 791 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2568 "yacc_sql.cpp" +#line 2586 "yacc_sql.cpp" break; - case 96: /* relation: ID */ -#line 792 "yacc_sql.y" - { + case 97: /* relation: ID */ +#line 801 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2576 "yacc_sql.cpp" +#line 2594 "yacc_sql.cpp" break; - case 97: /* rel_list: relation alias */ -#line 798 "yacc_sql.y" - { + case 98: /* rel_list: relation alias */ +#line 807 "yacc_sql.y" + { (yyval.relation_list) = new std::vector(); - if (nullptr != (yyvsp[0].string)) { - (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); free((yyvsp[0].string)); - } else { + }else{ (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); } -#line 2591 "yacc_sql.cpp" +#line 2609 "yacc_sql.cpp" break; - case 98: /* rel_list: relation alias COMMA rel_list */ -#line 808 "yacc_sql.y" - { + case 99: /* rel_list: relation alias COMMA rel_list */ +#line 817 "yacc_sql.y" + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if (nullptr != (yyvsp[-2].string)) { - (yyval.relation_list) - ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); free((yyvsp[-2].string)); - } else { + }else{ (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); } -#line 2610 "yacc_sql.cpp" +#line 2628 "yacc_sql.cpp" break; - case 99: /* joinClauses: relation ON condition */ -#line 826 "yacc_sql.y" + case 100: /* joinClauses: relation ON condition */ +#line 835 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2621 "yacc_sql.cpp" +#line 2639 "yacc_sql.cpp" break; - case 100: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 833 "yacc_sql.y" + case 101: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 842 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2633 "yacc_sql.cpp" +#line 2651 "yacc_sql.cpp" break; - case 101: /* where: %empty */ -#line 844 "yacc_sql.y" + case 102: /* where: %empty */ +#line 853 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2641 "yacc_sql.cpp" +#line 2659 "yacc_sql.cpp" break; - case 102: /* where: WHERE condition */ -#line 847 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + case 103: /* where: WHERE condition */ +#line 856 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); } -#line 2649 "yacc_sql.cpp" +#line 2667 "yacc_sql.cpp" break; - case 103: /* condition: expression comp_op expression */ -#line 854 "yacc_sql.y" + case 104: /* condition: expression comp_op expression */ +#line 863 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2657 "yacc_sql.cpp" - break; - - case 104: /* condition: condition AND condition */ -#line 858 "yacc_sql.y" - { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); - } -#line 2665 "yacc_sql.cpp" +#line 2675 "yacc_sql.cpp" break; - case 105: /* condition: condition OR condition */ -#line 862 "yacc_sql.y" + case 105: /* condition: condition AND condition */ +#line 867 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2673 "yacc_sql.cpp" +#line 2683 "yacc_sql.cpp" break; - case 106: /* comp_op: EQ */ -#line 868 "yacc_sql.y" - { - (yyval.comp) = EQUAL_TO; - } -#line 2679 "yacc_sql.cpp" - break; - - case 107: /* comp_op: LT */ -#line 869 "yacc_sql.y" - { - (yyval.comp) = LESS_THAN; - } -#line 2685 "yacc_sql.cpp" - break; - - case 108: /* comp_op: GT */ -#line 870 "yacc_sql.y" + case 106: /* condition: condition OR condition */ +#line 871 "yacc_sql.y" { - (yyval.comp) = GREAT_THAN; + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2691 "yacc_sql.cpp" break; - case 109: /* comp_op: LE */ -#line 871 "yacc_sql.y" - { - (yyval.comp) = LESS_EQUAL; - } + case 107: /* comp_op: EQ */ +#line 877 "yacc_sql.y" + { (yyval.comp) = EQUAL_TO; } #line 2697 "yacc_sql.cpp" break; - case 110: /* comp_op: GE */ -#line 872 "yacc_sql.y" - { - (yyval.comp) = GREAT_EQUAL; - } + case 108: /* comp_op: LT */ +#line 878 "yacc_sql.y" + { (yyval.comp) = LESS_THAN; } #line 2703 "yacc_sql.cpp" break; - case 111: /* comp_op: NE */ -#line 873 "yacc_sql.y" - { - (yyval.comp) = NOT_EQUAL; - } + case 109: /* comp_op: GT */ +#line 879 "yacc_sql.y" + { (yyval.comp) = GREAT_THAN; } #line 2709 "yacc_sql.cpp" break; - case 112: /* comp_op: IS */ -#line 874 "yacc_sql.y" - { - (yyval.comp) = OP_IS; - } + case 110: /* comp_op: LE */ +#line 880 "yacc_sql.y" + { (yyval.comp) = LESS_EQUAL; } #line 2715 "yacc_sql.cpp" break; - case 113: /* comp_op: IS NOT */ -#line 875 "yacc_sql.y" - { - (yyval.comp) = OP_IS_NOT; - } + case 111: /* comp_op: GE */ +#line 881 "yacc_sql.y" + { (yyval.comp) = GREAT_EQUAL; } #line 2721 "yacc_sql.cpp" break; - case 114: /* comp_op: LIKE */ -#line 876 "yacc_sql.y" - { - (yyval.comp) = LIKE_OP; - } + case 112: /* comp_op: NE */ +#line 882 "yacc_sql.y" + { (yyval.comp) = NOT_EQUAL; } #line 2727 "yacc_sql.cpp" break; - case 115: /* comp_op: NOT LIKE */ -#line 877 "yacc_sql.y" - { - (yyval.comp) = NOT_LIKE_OP; - } + case 113: /* comp_op: IS */ +#line 883 "yacc_sql.y" + { (yyval.comp) = OP_IS; } #line 2733 "yacc_sql.cpp" break; - case 116: /* comp_op: IN */ -#line 878 "yacc_sql.y" - { - (yyval.comp) = IN_OP; - } + case 114: /* comp_op: IS NOT */ +#line 884 "yacc_sql.y" + { (yyval.comp) = OP_IS_NOT; } #line 2739 "yacc_sql.cpp" break; - case 117: /* comp_op: NOT IN */ -#line 879 "yacc_sql.y" - { - (yyval.comp) = NOT_IN_OP; - } + case 115: /* comp_op: LIKE */ +#line 885 "yacc_sql.y" + { (yyval.comp) = LIKE_OP;} #line 2745 "yacc_sql.cpp" break; - case 118: /* opt_order_by: %empty */ -#line 884 "yacc_sql.y" + case 116: /* comp_op: NOT LIKE */ +#line 886 "yacc_sql.y" + {(yyval.comp) = NOT_LIKE_OP;} +#line 2751 "yacc_sql.cpp" + break; + + case 117: /* comp_op: IN */ +#line 887 "yacc_sql.y" + { (yyval.comp) = IN_OP; } +#line 2757 "yacc_sql.cpp" + break; + + case 118: /* comp_op: NOT IN */ +#line 888 "yacc_sql.y" + { (yyval.comp) = NOT_IN_OP; } +#line 2763 "yacc_sql.cpp" + break; + + case 119: /* opt_order_by: %empty */ +#line 893 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2753 "yacc_sql.cpp" +#line 2771 "yacc_sql.cpp" break; - case 119: /* opt_order_by: ORDER BY sort_list */ -#line 888 "yacc_sql.y" + case 120: /* opt_order_by: ORDER BY sort_list */ +#line 897 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2762 "yacc_sql.cpp" +#line 2780 "yacc_sql.cpp" break; - case 120: /* sort_list: sort_unit */ -#line 896 "yacc_sql.y" - { + case 121: /* sort_list: sort_unit */ +#line 905 "yacc_sql.y" + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } -#line 2771 "yacc_sql.cpp" + } +#line 2789 "yacc_sql.cpp" break; - case 121: /* sort_list: sort_unit COMMA sort_list */ -#line 901 "yacc_sql.y" - { + case 122: /* sort_list: sort_unit COMMA sort_list */ +#line 910 "yacc_sql.y" + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } -#line 2780 "yacc_sql.cpp" + } +#line 2798 "yacc_sql.cpp" break; - case 122: /* sort_unit: expression */ -#line 909 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + case 123: /* sort_unit: expression */ +#line 918 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2790 "yacc_sql.cpp" + } +#line 2808 "yacc_sql.cpp" break; - case 123: /* sort_unit: expression DESC */ -#line 915 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 124: /* sort_unit: expression DESC */ +#line 924 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } -#line 2800 "yacc_sql.cpp" + } +#line 2818 "yacc_sql.cpp" break; - case 124: /* sort_unit: expression ASC */ -#line 921 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 125: /* sort_unit: expression ASC */ +#line 930 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2810 "yacc_sql.cpp" + } +#line 2828 "yacc_sql.cpp" break; - case 125: /* group_by: %empty */ -#line 930 "yacc_sql.y" + case 126: /* group_by: %empty */ +#line 939 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2818 "yacc_sql.cpp" +#line 2836 "yacc_sql.cpp" break; - case 126: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 936 "yacc_sql.y" + case 127: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 945 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2832 "yacc_sql.cpp" +#line 2850 "yacc_sql.cpp" break; - case 127: /* explain_stmt: EXPLAIN command_wrapper */ -#line 949 "yacc_sql.y" + case 128: /* explain_stmt: EXPLAIN command_wrapper */ +#line 958 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2841 "yacc_sql.cpp" +#line 2859 "yacc_sql.cpp" break; - case 128: /* set_variable_stmt: SET ID EQ value */ -#line 957 "yacc_sql.y" + case 129: /* set_variable_stmt: SET ID EQ value */ +#line 966 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2853 "yacc_sql.cpp" +#line 2871 "yacc_sql.cpp" break; -#line 2857 "yacc_sql.cpp" - default: break; - } +#line 2875 "yacc_sql.cpp" + + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -4625,9 +2886,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; @@ -4638,67 +2899,84 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) { - ++yynerrs; - { - yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) { - if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); - yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); - if (yymsg) { - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } - yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; } - } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } else { - yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; + } } - } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; + /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -4711,40 +2989,45 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) { - yyn = yypact[yystate]; - if (!yypact_value_is_default(yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - yystate = *yyssp; - YY_STACK_PRINT(yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -4752,14 +3035,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; + /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -4767,6 +3051,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 0; goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -4774,48 +3059,53 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 1; goto yyreturnlab; + /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; + /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE(yychar); - yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK(yylen); - YY_STACK_PRINT(yyss, yyssp); - while (yyssp != yyss) { - yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - } + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE(yyss); + YYSTACK_FREE (yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); + YYSTACK_FREE (yymsg); return yyresult; } -#line 969 "yacc_sql.y" +#line 978 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) -{ +int sql_parse(const char *s, ParsedSqlResult *sql_result) { yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index c6c8b3e2..d624214f 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -#define YY_YY_YACC_SQL_HPP_INCLUDED +# define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -#define YYDEBUG 0 +# define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,124 +47,125 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -#define YYTOKENTYPE -enum yytokentype -{ - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - ORDER = 266, /* ORDER */ - TABLE = 267, /* TABLE */ - TABLES = 268, /* TABLES */ - INDEX = 269, /* INDEX */ - CALC = 270, /* CALC */ - SELECT = 271, /* SELECT */ - DESC = 272, /* DESC */ - SHOW = 273, /* SHOW */ - SYNC = 274, /* SYNC */ - INSERT = 275, /* INSERT */ - DELETE = 276, /* DELETE */ - UPDATE = 277, /* UPDATE */ - LBRACE = 278, /* LBRACE */ - RBRACE = 279, /* RBRACE */ - COMMA = 280, /* COMMA */ - TRX_BEGIN = 281, /* TRX_BEGIN */ - TRX_COMMIT = 282, /* TRX_COMMIT */ - TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ - INT_T = 284, /* INT_T */ - IN = 285, /* IN */ - STRING_T = 286, /* STRING_T */ - FLOAT_T = 287, /* FLOAT_T */ - DATE_T = 288, /* DATE_T */ - TEXT_T = 289, /* TEXT_T */ - NOT = 290, /* NOT */ - UNIQUE = 291, /* UNIQUE */ - NULL_T = 292, /* NULL_T */ - NULLABLE = 293, /* NULLABLE */ - HELP = 294, /* HELP */ - EXIT = 295, /* EXIT */ - DOT = 296, /* DOT */ - INTO = 297, /* INTO */ - VALUES = 298, /* VALUES */ - FROM = 299, /* FROM */ - WHERE = 300, /* WHERE */ - AND = 301, /* AND */ - OR = 302, /* OR */ - SET = 303, /* SET */ - ON = 304, /* ON */ - LOAD = 305, /* LOAD */ - DATA = 306, /* DATA */ - INFILE = 307, /* INFILE */ - EXPLAIN = 308, /* EXPLAIN */ - STORAGE = 309, /* STORAGE */ - FORMAT = 310, /* FORMAT */ - INNER = 311, /* INNER */ - JOIN = 312, /* JOIN */ - EQ = 313, /* EQ */ - LT = 314, /* LT */ - GT = 315, /* GT */ - LE = 316, /* LE */ - GE = 317, /* GE */ - NE = 318, /* NE */ - LIKE = 319, /* LIKE */ - IS = 320, /* IS */ - NUMBER = 321, /* NUMBER */ - FLOAT = 322, /* FLOAT */ - ID = 323, /* ID */ - SSS = 324, /* SSS */ - UMINUS = 325 /* UMINUS */ -}; -typedef enum yytokentype yytoken_kind_t; +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + ORDER = 266, /* ORDER */ + TABLE = 267, /* TABLE */ + TABLES = 268, /* TABLES */ + INDEX = 269, /* INDEX */ + CALC = 270, /* CALC */ + SELECT = 271, /* SELECT */ + DESC = 272, /* DESC */ + SHOW = 273, /* SHOW */ + SYNC = 274, /* SYNC */ + INSERT = 275, /* INSERT */ + DELETE = 276, /* DELETE */ + UPDATE = 277, /* UPDATE */ + LBRACE = 278, /* LBRACE */ + RBRACE = 279, /* RBRACE */ + COMMA = 280, /* COMMA */ + TRX_BEGIN = 281, /* TRX_BEGIN */ + TRX_COMMIT = 282, /* TRX_COMMIT */ + TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ + INT_T = 284, /* INT_T */ + IN = 285, /* IN */ + STRING_T = 286, /* STRING_T */ + FLOAT_T = 287, /* FLOAT_T */ + DATE_T = 288, /* DATE_T */ + TEXT_T = 289, /* TEXT_T */ + NOT = 290, /* NOT */ + UNIQUE = 291, /* UNIQUE */ + NULL_T = 292, /* NULL_T */ + NULLABLE = 293, /* NULLABLE */ + HELP = 294, /* HELP */ + EXIT = 295, /* EXIT */ + DOT = 296, /* DOT */ + INTO = 297, /* INTO */ + VALUES = 298, /* VALUES */ + FROM = 299, /* FROM */ + WHERE = 300, /* WHERE */ + AND = 301, /* AND */ + OR = 302, /* OR */ + SET = 303, /* SET */ + ON = 304, /* ON */ + LOAD = 305, /* LOAD */ + DATA = 306, /* DATA */ + INFILE = 307, /* INFILE */ + EXPLAIN = 308, /* EXPLAIN */ + STORAGE = 309, /* STORAGE */ + FORMAT = 310, /* FORMAT */ + INNER = 311, /* INNER */ + JOIN = 312, /* JOIN */ + EQ = 313, /* EQ */ + LT = 314, /* LT */ + GT = 315, /* GT */ + LE = 316, /* LE */ + GE = 317, /* GE */ + NE = 318, /* NE */ + LIKE = 319, /* LIKE */ + IS = 320, /* IS */ + NUMBER = 321, /* NUMBER */ + FLOAT = 322, /* FLOAT */ + ID = 323, /* ID */ + SSS = 324, /* SSS */ + UMINUS = 325 /* UMINUS */ + }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 132 "yacc_sql.y" - ParsedSqlNode *sql_node; - Value *value; - enum CompOp comp; - RelAttrSqlNode *rel_attr; - std::vector *attr_infos; - AttrInfoSqlNode *attr_info; - Expression *expression; - std::vector> *expression_list; - std::vector *value_list; - std::vector> *values_list; - SetClauseSqlNode *set_clause; - std::vector *set_clauses; - JoinSqlNode *join_clauses; - std::vector *rel_attr_list; - std::vector *relation_list; - OrderBySqlNode *orderby_unit; - std::vector *orderby_list; - char *string; - int number; - float floats; - bool nullable_info; - std::vector *index_attr_list; - bool unique; + ParsedSqlNode * sql_node; + Value * value; + enum CompOp comp; + RelAttrSqlNode * rel_attr; + std::vector * attr_infos; + AttrInfoSqlNode * attr_info; + Expression * expression; + std::vector> * expression_list; + std::vector * value_list; + std::vector> * values_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; + JoinSqlNode * join_clauses; + std::vector * rel_attr_list; + std::vector * relation_list; + OrderBySqlNode * orderby_unit; + std::vector * orderby_list; + char * string; + int number; + float floats; + bool nullable_info; + std::vector * index_attr_list; + bool unique; #line 160 "yacc_sql.hpp" + }; typedef union YYSTYPE YYSTYPE; -#define YYSTYPE_IS_TRIVIAL 1 -#define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -173,10 +174,14 @@ struct YYLTYPE int last_line; int last_column; }; -#define YYLTYPE_IS_DECLARED 1 -#define YYLTYPE_IS_TRIVIAL 1 +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 #endif -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); + + + +int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); + #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 8efd56d2..f6eb6cdb 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -388,6 +388,14 @@ create_table_stmt: /*create table 语句的语法解析树*/ free($8); } } + | CREATE TABLE ID AS select_stmt + { + $$ = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = $$->create_table; + create_table.relation_name = $3; + free($3); + create_table.create_table_select = std::move($5->selection); + } ; attr_def_list: /* empty */ From 0dbac92e7f09ad55c877b7bcd6cf503902e82a6c Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 9 Oct 2024 13:04:09 +0800 Subject: [PATCH 176/308] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9OP=5FIS?= =?UTF-8?q?=EF=BC=8C=E4=B8=8E=E5=85=B6=E4=BB=96=E8=BF=90=E7=AE=97=E7=AC=A6?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 4 +- src/observer/sql/parser/parse_defs.h | 4 +- src/observer/sql/parser/yacc_sql.cpp | 383 +++++++++++++-------------- src/observer/sql/parser/yacc_sql.y | 4 +- 4 files changed, 197 insertions(+), 198 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 0e165cab..cfd77c43 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -131,14 +131,14 @@ ComparisonExpr::~ComparisonExpr() = default; RC ComparisonExpr::compare_value(const Value &left, const Value &right, bool &result) const { - if (comp_ == OP_IS) { + if (comp_ == IS_OP) { if (right.attr_type() != AttrType::NULLS) { return RC::NOT_NULL_AFTER_IS; } result = left.is_null(); return RC::SUCCESS; } - if (comp_ == OP_IS_NOT) { + if (comp_ == IS_NOT_OP) { if (right.attr_type() != AttrType::NULLS) { return RC::NOT_NULL_AFTER_IS; } diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 9af3a54e..7544d50f 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -52,8 +52,8 @@ enum CompOp LESS_THAN, ///< "<" GREAT_EQUAL, ///< ">=" GREAT_THAN, ///< ">" - OP_IS, ///< "IS" - OP_IS_NOT, ///< "IS NOT" + IS_OP, ///< "is (null)" + IS_NOT_OP, ///< "is not (null)" LIKE_OP, ///< "like" NOT_LIKE_OP, ///< "not like" IN_OP, ///< "in (sub query)" diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 7103cfa4..77b8714a 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -677,16 +677,16 @@ static const yytype_int16 yyrline[] = 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 259, 265, 270, 276, 282, 288, 294, 301, 307, 315, 325, 340, 341, 345, 351, 360, - 370, 391, 403, 406, 419, 431, 458, 462, 466, 471, - 477, 481, 482, 483, 484, 485, 489, 502, 508, 515, - 521, 529, 533, 537, 543, 550, 553, 560, 572, 586, - 591, 598, 608, 637, 670, 676, 685, 688, 697, 713, - 716, 719, 722, 725, 734, 737, 742, 748, 751, 754, - 761, 764, 767, 772, 779, 786, 791, 801, 807, 817, - 834, 841, 853, 856, 862, 866, 870, 877, 878, 879, - 880, 881, 882, 883, 884, 885, 886, 887, 888, 893, - 896, 904, 909, 917, 923, 929, 939, 944, 957, 965, - 975, 976 + 370, 391, 402, 405, 418, 430, 457, 461, 465, 470, + 476, 480, 481, 482, 483, 484, 488, 501, 507, 514, + 520, 528, 532, 536, 542, 549, 552, 559, 571, 585, + 590, 597, 607, 636, 669, 675, 684, 687, 696, 712, + 715, 718, 721, 724, 733, 736, 741, 747, 750, 753, + 760, 763, 766, 771, 778, 785, 790, 800, 806, 816, + 833, 840, 852, 855, 861, 865, 869, 876, 877, 878, + 879, 880, 881, 882, 883, 884, 885, 886, 887, 892, + 895, 903, 908, 916, 922, 928, 938, 943, 956, 964, + 974, 975 }; #endif @@ -1998,22 +1998,21 @@ YYLTYPE yylloc = yyloc_default; CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; create_table.relation_name = (yyvsp[-2].string); free((yyvsp[-2].string)); - create_table.create_table_select = std::move((yyvsp[0].sql_node)->selection); } -#line 2005 "yacc_sql.cpp" +#line 2004 "yacc_sql.cpp" break; case 42: /* attr_def_list: %empty */ -#line 403 "yacc_sql.y" +#line 402 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2013 "yacc_sql.cpp" +#line 2012 "yacc_sql.cpp" break; case 43: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 407 "yacc_sql.y" +#line 406 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -2023,11 +2022,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2027 "yacc_sql.cpp" +#line 2026 "yacc_sql.cpp" break; case 44: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 420 "yacc_sql.y" +#line 419 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -2039,11 +2038,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2043 "yacc_sql.cpp" +#line 2042 "yacc_sql.cpp" break; case 45: /* attr_def: ID type nullable_constraint */ -#line 432 "yacc_sql.y" +#line 431 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -2067,79 +2066,79 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2071 "yacc_sql.cpp" +#line 2070 "yacc_sql.cpp" break; case 46: /* nullable_constraint: NOT NULL_T */ -#line 459 "yacc_sql.y" +#line 458 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2079 "yacc_sql.cpp" +#line 2078 "yacc_sql.cpp" break; case 47: /* nullable_constraint: NULLABLE */ -#line 463 "yacc_sql.y" +#line 462 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2087 "yacc_sql.cpp" +#line 2086 "yacc_sql.cpp" break; case 48: /* nullable_constraint: NULL_T */ -#line 467 "yacc_sql.y" +#line 466 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2095 "yacc_sql.cpp" +#line 2094 "yacc_sql.cpp" break; case 49: /* nullable_constraint: %empty */ -#line 471 "yacc_sql.y" +#line 470 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2103 "yacc_sql.cpp" +#line 2102 "yacc_sql.cpp" break; case 50: /* number: NUMBER */ -#line 477 "yacc_sql.y" +#line 476 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 2109 "yacc_sql.cpp" +#line 2108 "yacc_sql.cpp" break; case 51: /* type: INT_T */ -#line 481 "yacc_sql.y" +#line 480 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2115 "yacc_sql.cpp" +#line 2114 "yacc_sql.cpp" break; case 52: /* type: STRING_T */ -#line 482 "yacc_sql.y" +#line 481 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2121 "yacc_sql.cpp" +#line 2120 "yacc_sql.cpp" break; case 53: /* type: FLOAT_T */ -#line 483 "yacc_sql.y" +#line 482 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2127 "yacc_sql.cpp" +#line 2126 "yacc_sql.cpp" break; case 54: /* type: DATE_T */ -#line 484 "yacc_sql.y" +#line 483 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2133 "yacc_sql.cpp" +#line 2132 "yacc_sql.cpp" break; case 55: /* type: TEXT_T */ -#line 485 "yacc_sql.y" +#line 484 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2139 "yacc_sql.cpp" +#line 2138 "yacc_sql.cpp" break; case 56: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 490 "yacc_sql.y" +#line 489 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2149,102 +2148,102 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2153 "yacc_sql.cpp" +#line 2152 "yacc_sql.cpp" break; case 57: /* values_list: LBRACE value_list RBRACE */ -#line 503 "yacc_sql.y" +#line 502 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2163 "yacc_sql.cpp" +#line 2162 "yacc_sql.cpp" break; case 58: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 509 "yacc_sql.y" +#line 508 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2172 "yacc_sql.cpp" +#line 2171 "yacc_sql.cpp" break; case 59: /* value_list: value */ -#line 516 "yacc_sql.y" +#line 515 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2182 "yacc_sql.cpp" +#line 2181 "yacc_sql.cpp" break; case 60: /* value_list: value_list COMMA value */ -#line 522 "yacc_sql.y" +#line 521 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2191 "yacc_sql.cpp" +#line 2190 "yacc_sql.cpp" break; case 61: /* value: NUMBER */ -#line 529 "yacc_sql.y" +#line 528 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2200 "yacc_sql.cpp" +#line 2199 "yacc_sql.cpp" break; case 62: /* value: FLOAT */ -#line 533 "yacc_sql.y" +#line 532 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2209 "yacc_sql.cpp" +#line 2208 "yacc_sql.cpp" break; case 63: /* value: SSS */ -#line 537 "yacc_sql.y" +#line 536 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2220 "yacc_sql.cpp" +#line 2219 "yacc_sql.cpp" break; case 64: /* value: NULL_T */ -#line 543 "yacc_sql.y" +#line 542 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2228 "yacc_sql.cpp" +#line 2227 "yacc_sql.cpp" break; case 65: /* storage_format: %empty */ -#line 550 "yacc_sql.y" +#line 549 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2236 "yacc_sql.cpp" +#line 2235 "yacc_sql.cpp" break; case 66: /* storage_format: STORAGE FORMAT EQ ID */ -#line 554 "yacc_sql.y" +#line 553 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2244 "yacc_sql.cpp" +#line 2243 "yacc_sql.cpp" break; case 67: /* delete_stmt: DELETE FROM ID where */ -#line 561 "yacc_sql.y" +#line 560 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2253,11 +2252,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2257 "yacc_sql.cpp" +#line 2256 "yacc_sql.cpp" break; case 68: /* update_stmt: UPDATE ID SET setClauses where */ -#line 573 "yacc_sql.y" +#line 572 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2268,39 +2267,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2272 "yacc_sql.cpp" +#line 2271 "yacc_sql.cpp" break; case 69: /* setClauses: setClause */ -#line 587 "yacc_sql.y" +#line 586 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2281 "yacc_sql.cpp" +#line 2280 "yacc_sql.cpp" break; case 70: /* setClauses: setClauses COMMA setClause */ -#line 592 "yacc_sql.y" +#line 591 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2289 "yacc_sql.cpp" +#line 2288 "yacc_sql.cpp" break; case 71: /* setClause: ID EQ expression */ -#line 599 "yacc_sql.y" +#line 598 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2300 "yacc_sql.cpp" +#line 2299 "yacc_sql.cpp" break; case 72: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 609 "yacc_sql.y" +#line 608 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-5].expression_list) != nullptr) { @@ -2329,11 +2328,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2333 "yacc_sql.cpp" +#line 2332 "yacc_sql.cpp" break; case 73: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 638 "yacc_sql.y" +#line 637 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2363,39 +2362,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2367 "yacc_sql.cpp" +#line 2366 "yacc_sql.cpp" break; case 74: /* calc_stmt: CALC expression_list */ -#line 671 "yacc_sql.y" +#line 670 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2377 "yacc_sql.cpp" +#line 2376 "yacc_sql.cpp" break; case 75: /* calc_stmt: SELECT expression_list */ -#line 677 "yacc_sql.y" +#line 676 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2387 "yacc_sql.cpp" +#line 2386 "yacc_sql.cpp" break; case 76: /* expression_list: %empty */ -#line 685 "yacc_sql.y" +#line 684 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2395 "yacc_sql.cpp" +#line 2394 "yacc_sql.cpp" break; case 77: /* expression_list: expression alias */ -#line 689 "yacc_sql.y" +#line 688 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2404,11 +2403,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2408 "yacc_sql.cpp" +#line 2407 "yacc_sql.cpp" break; case 78: /* expression_list: expression alias COMMA expression_list */ -#line 698 "yacc_sql.y" +#line 697 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2421,43 +2420,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2425 "yacc_sql.cpp" +#line 2424 "yacc_sql.cpp" break; case 79: /* expression: expression '+' expression */ -#line 713 "yacc_sql.y" +#line 712 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2433 "yacc_sql.cpp" +#line 2432 "yacc_sql.cpp" break; case 80: /* expression: expression '-' expression */ -#line 716 "yacc_sql.y" +#line 715 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2441 "yacc_sql.cpp" +#line 2440 "yacc_sql.cpp" break; case 81: /* expression: expression '*' expression */ -#line 719 "yacc_sql.y" +#line 718 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2449 "yacc_sql.cpp" +#line 2448 "yacc_sql.cpp" break; case 82: /* expression: expression '/' expression */ -#line 722 "yacc_sql.y" +#line 721 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2457 "yacc_sql.cpp" +#line 2456 "yacc_sql.cpp" break; case 83: /* expression: LBRACE expression_list RBRACE */ -#line 725 "yacc_sql.y" +#line 724 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2467,114 +2466,114 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2471 "yacc_sql.cpp" +#line 2470 "yacc_sql.cpp" break; case 84: /* expression: '-' expression */ -#line 734 "yacc_sql.y" +#line 733 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2479 "yacc_sql.cpp" +#line 2478 "yacc_sql.cpp" break; case 85: /* expression: value */ -#line 737 "yacc_sql.y" +#line 736 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2489 "yacc_sql.cpp" +#line 2488 "yacc_sql.cpp" break; case 86: /* expression: rel_attr */ -#line 742 "yacc_sql.y" +#line 741 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2500 "yacc_sql.cpp" +#line 2499 "yacc_sql.cpp" break; case 87: /* expression: '*' */ -#line 748 "yacc_sql.y" +#line 747 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2508 "yacc_sql.cpp" +#line 2507 "yacc_sql.cpp" break; case 88: /* expression: aggr_func_expr */ -#line 751 "yacc_sql.y" +#line 750 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2516 "yacc_sql.cpp" +#line 2515 "yacc_sql.cpp" break; case 89: /* expression: sub_query_expr */ -#line 754 "yacc_sql.y" +#line 753 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2524 "yacc_sql.cpp" +#line 2523 "yacc_sql.cpp" break; case 90: /* alias: %empty */ -#line 761 "yacc_sql.y" +#line 760 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2532 "yacc_sql.cpp" +#line 2531 "yacc_sql.cpp" break; case 91: /* alias: ID */ -#line 764 "yacc_sql.y" +#line 763 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2540 "yacc_sql.cpp" +#line 2539 "yacc_sql.cpp" break; case 92: /* alias: AS ID */ -#line 767 "yacc_sql.y" +#line 766 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2548 "yacc_sql.cpp" +#line 2547 "yacc_sql.cpp" break; case 93: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 773 "yacc_sql.y" +#line 772 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2556 "yacc_sql.cpp" +#line 2555 "yacc_sql.cpp" break; case 94: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 780 "yacc_sql.y" +#line 779 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2564 "yacc_sql.cpp" +#line 2563 "yacc_sql.cpp" break; case 95: /* rel_attr: ID */ -#line 786 "yacc_sql.y" +#line 785 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2574 "yacc_sql.cpp" +#line 2573 "yacc_sql.cpp" break; case 96: /* rel_attr: ID DOT ID */ -#line 791 "yacc_sql.y" +#line 790 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2582,19 +2581,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2586 "yacc_sql.cpp" +#line 2585 "yacc_sql.cpp" break; case 97: /* relation: ID */ -#line 801 "yacc_sql.y" +#line 800 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2594 "yacc_sql.cpp" +#line 2593 "yacc_sql.cpp" break; case 98: /* rel_list: relation alias */ -#line 807 "yacc_sql.y" +#line 806 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2605,11 +2604,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2609 "yacc_sql.cpp" +#line 2608 "yacc_sql.cpp" break; case 99: /* rel_list: relation alias COMMA rel_list */ -#line 817 "yacc_sql.y" +#line 816 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2624,22 +2623,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2628 "yacc_sql.cpp" +#line 2627 "yacc_sql.cpp" break; case 100: /* joinClauses: relation ON condition */ -#line 835 "yacc_sql.y" +#line 834 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2639 "yacc_sql.cpp" +#line 2638 "yacc_sql.cpp" break; case 101: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 842 "yacc_sql.y" +#line 841 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2647,196 +2646,196 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2651 "yacc_sql.cpp" +#line 2650 "yacc_sql.cpp" break; case 102: /* where: %empty */ -#line 853 "yacc_sql.y" +#line 852 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2659 "yacc_sql.cpp" +#line 2658 "yacc_sql.cpp" break; case 103: /* where: WHERE condition */ -#line 856 "yacc_sql.y" +#line 855 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2667 "yacc_sql.cpp" +#line 2666 "yacc_sql.cpp" break; case 104: /* condition: expression comp_op expression */ -#line 863 "yacc_sql.y" +#line 862 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2675 "yacc_sql.cpp" +#line 2674 "yacc_sql.cpp" break; case 105: /* condition: condition AND condition */ -#line 867 "yacc_sql.y" +#line 866 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2683 "yacc_sql.cpp" +#line 2682 "yacc_sql.cpp" break; case 106: /* condition: condition OR condition */ -#line 871 "yacc_sql.y" +#line 870 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2691 "yacc_sql.cpp" +#line 2690 "yacc_sql.cpp" break; case 107: /* comp_op: EQ */ -#line 877 "yacc_sql.y" +#line 876 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2697 "yacc_sql.cpp" +#line 2696 "yacc_sql.cpp" break; case 108: /* comp_op: LT */ -#line 878 "yacc_sql.y" +#line 877 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2703 "yacc_sql.cpp" +#line 2702 "yacc_sql.cpp" break; case 109: /* comp_op: GT */ -#line 879 "yacc_sql.y" +#line 878 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2709 "yacc_sql.cpp" +#line 2708 "yacc_sql.cpp" break; case 110: /* comp_op: LE */ -#line 880 "yacc_sql.y" +#line 879 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2715 "yacc_sql.cpp" +#line 2714 "yacc_sql.cpp" break; case 111: /* comp_op: GE */ -#line 881 "yacc_sql.y" +#line 880 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2721 "yacc_sql.cpp" +#line 2720 "yacc_sql.cpp" break; case 112: /* comp_op: NE */ -#line 882 "yacc_sql.y" +#line 881 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2727 "yacc_sql.cpp" +#line 2726 "yacc_sql.cpp" break; case 113: /* comp_op: IS */ -#line 883 "yacc_sql.y" - { (yyval.comp) = OP_IS; } -#line 2733 "yacc_sql.cpp" +#line 882 "yacc_sql.y" + { (yyval.comp) = IS_OP; } +#line 2732 "yacc_sql.cpp" break; case 114: /* comp_op: IS NOT */ -#line 884 "yacc_sql.y" - { (yyval.comp) = OP_IS_NOT; } -#line 2739 "yacc_sql.cpp" +#line 883 "yacc_sql.y" + { (yyval.comp) = IS_NOT_OP; } +#line 2738 "yacc_sql.cpp" break; case 115: /* comp_op: LIKE */ -#line 885 "yacc_sql.y" +#line 884 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2745 "yacc_sql.cpp" +#line 2744 "yacc_sql.cpp" break; case 116: /* comp_op: NOT LIKE */ -#line 886 "yacc_sql.y" +#line 885 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2751 "yacc_sql.cpp" +#line 2750 "yacc_sql.cpp" break; case 117: /* comp_op: IN */ -#line 887 "yacc_sql.y" +#line 886 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2757 "yacc_sql.cpp" +#line 2756 "yacc_sql.cpp" break; case 118: /* comp_op: NOT IN */ -#line 888 "yacc_sql.y" +#line 887 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2763 "yacc_sql.cpp" +#line 2762 "yacc_sql.cpp" break; case 119: /* opt_order_by: %empty */ -#line 893 "yacc_sql.y" +#line 892 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2771 "yacc_sql.cpp" +#line 2770 "yacc_sql.cpp" break; case 120: /* opt_order_by: ORDER BY sort_list */ -#line 897 "yacc_sql.y" +#line 896 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2780 "yacc_sql.cpp" +#line 2779 "yacc_sql.cpp" break; case 121: /* sort_list: sort_unit */ -#line 905 "yacc_sql.y" +#line 904 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2789 "yacc_sql.cpp" +#line 2788 "yacc_sql.cpp" break; case 122: /* sort_list: sort_unit COMMA sort_list */ -#line 910 "yacc_sql.y" +#line 909 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2798 "yacc_sql.cpp" +#line 2797 "yacc_sql.cpp" break; case 123: /* sort_unit: expression */ -#line 918 "yacc_sql.y" +#line 917 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2808 "yacc_sql.cpp" +#line 2807 "yacc_sql.cpp" break; case 124: /* sort_unit: expression DESC */ -#line 924 "yacc_sql.y" +#line 923 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2818 "yacc_sql.cpp" +#line 2817 "yacc_sql.cpp" break; case 125: /* sort_unit: expression ASC */ -#line 930 "yacc_sql.y" +#line 929 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2828 "yacc_sql.cpp" +#line 2827 "yacc_sql.cpp" break; case 126: /* group_by: %empty */ -#line 939 "yacc_sql.y" +#line 938 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2836 "yacc_sql.cpp" +#line 2835 "yacc_sql.cpp" break; case 127: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 945 "yacc_sql.y" +#line 944 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2846,20 +2845,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2850 "yacc_sql.cpp" +#line 2849 "yacc_sql.cpp" break; case 128: /* explain_stmt: EXPLAIN command_wrapper */ -#line 958 "yacc_sql.y" +#line 957 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2859 "yacc_sql.cpp" +#line 2858 "yacc_sql.cpp" break; case 129: /* set_variable_stmt: SET ID EQ value */ -#line 966 "yacc_sql.y" +#line 965 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2867,11 +2866,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2871 "yacc_sql.cpp" +#line 2870 "yacc_sql.cpp" break; -#line 2875 "yacc_sql.cpp" +#line 2874 "yacc_sql.cpp" default: break; } @@ -3100,7 +3099,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 978 "yacc_sql.y" +#line 977 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index f6eb6cdb..164ff834 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -879,8 +879,8 @@ comp_op: | LE { $$ = LESS_EQUAL; } | GE { $$ = GREAT_EQUAL; } | NE { $$ = NOT_EQUAL; } - | IS { $$ = OP_IS; } - | IS NOT { $$ = OP_IS_NOT; } + | IS { $$ = IS_OP; } + | IS NOT { $$ = IS_NOT_OP; } | LIKE { $$ = LIKE_OP;} | NOT LIKE {$$ = NOT_LIKE_OP;} | IN { $$ = IN_OP; } From a9924a662bc493477e700c63a00f757185030219 Mon Sep 17 00:00:00 2001 From: Koschei Date: Wed, 9 Oct 2024 15:09:02 +0800 Subject: [PATCH 177/308] =?UTF-8?q?test:=20=E6=96=B0=E5=A2=9E=20function?= =?UTF-8?q?=20=E7=9A=84=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-function.result | 38 ++++++++++++++++++++++++ test/case/test/primary-function.test | 16 ++++++++++ 2 files changed, 54 insertions(+) create mode 100644 test/case/result/primary-function.result create mode 100644 test/case/test/primary-function.test diff --git a/test/case/result/primary-function.result b/test/case/result/primary-function.result new file mode 100644 index 00000000..7419f9bd --- /dev/null +++ b/test/case/result/primary-function.result @@ -0,0 +1,38 @@ +1. INIT DATA +CREATE TABLE FUNCTION_TABLE(ID INT, NAME CHAR(20), SCORE FLOAT, U_DATE DATE); +SUCCESS +CREATE TABLE FUNCTION_TABLE_2(ID INT, NAME CHAR(30), SCORE FLOAT, U_DATE DATE); +SUCCESS +INSERT INTO FUNCTION_TABLE VALUES (4, 'KI83C4RH0AGX9', 7.61, '2017-02-06'); +SUCCESS +INSERT INTO FUNCTION_TABLE VALUES (4, 'FXMB2DOJ4', 8.35, '2021-10-07'); +SUCCESS +INSERT INTO FUNCTION_TABLE VALUES (8, 'Q3NS46CJ', 8.66, '2023-06-19'); +SUCCESS +INSERT INTO FUNCTION_TABLE VALUES (1, 'Q3NS4', 4.90, '2023-06-19'); +SUCCESS +INSERT INTO FUNCTION_TABLE VALUES (3, 'Q3NS46CJ012311234561', 6.50, '2023-06-19'); +SUCCESS +INSERT INTO FUNCTION_TABLE VALUES (2, 'Q3CJ', 9.00, '2023-06-19'); +SUCCESS + +2. INVALID DATE +SELECT ID, DATE_FORMAT(NAME, '%Y-%M-%D') FROM FUNCTION_TABLE; +FAILURE + +3. ROUND TEST +SELECT ID, LENGTH(NAME), ROUND(SCORE) FROM FUNCTION_TABLE WHERE ID<8; +1 | 5 | 5 +2 | 4 | 9 +3 | 20 | 7 +4 | 13 | 8 +4 | 9 | 8 +ID | LENGTH(NAME) | ROUND(SCORE) +SELECT * FROM FUNCTION_TABLE; +1 | Q3NS4 | 4.9 | 2023-06-19 +2 | Q3CJ | 9 | 2023-06-19 +3 | Q3NS46CJ012311234561 | 6.5 | 2023-06-19 +4 | FXMB2DOJ4 | 8.35 | 2021-10-07 +4 | KI83C4RH0AGX9 | 7.61 | 2017-02-06 +8 | Q3NS46CJ | 8.66 | 2023-06-19 +ID | NAME | SCORE | U_DATE diff --git a/test/case/test/primary-function.test b/test/case/test/primary-function.test new file mode 100644 index 00000000..4df29df0 --- /dev/null +++ b/test/case/test/primary-function.test @@ -0,0 +1,16 @@ +-- echo 1. init data +CREATE TABLE function_table(id int, name char(20), score float, u_date date); +CREATE TABLE function_table_2(id int, name char(30), score float, u_date date); +insert into function_table VALUES (4, 'KI83C4RH0AGX9', 7.61, '2017-02-06'); +insert into function_table VALUES (4, 'FXMB2DOJ4', 8.35, '2021-10-07'); +insert into function_table VALUES (8, 'Q3NS46CJ', 8.66, '2023-06-19'); +insert into function_table VALUES (1, 'Q3NS4', 4.90, '2023-06-19'); +insert into function_table VALUES (3, 'Q3NS46CJ012311234561', 6.50, '2023-06-19'); +insert into function_table VALUES (2, 'Q3CJ', 9.00, '2023-06-19'); + +-- echo 2. invalid date +-- sort select id, date_format(name, '%y-%m-%d') from function_table; + +-- echo 3. round test +-- sort select id, length(name), round(score) from function_table where id<8; +-- sort select * from function_table; From f8a68ab4cb01bae30a33ca13b343666410dd26fe Mon Sep 17 00:00:00 2001 From: Koschei Date: Wed, 9 Oct 2024 19:05:06 +0800 Subject: [PATCH 178/308] =?UTF-8?q?feat:=20=E5=88=9D=E6=AD=A5=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=20update-mvcc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/lex_sql.cpp | 5453 +++++++++++------ src/observer/sql/parser/lex_sql.h | 244 +- src/observer/sql/parser/yacc_sql.cpp | 4694 +++++++++----- src/observer/sql/parser/yacc_sql.hpp | 223 +- .../storage/record/record_manager.cpp | 2 +- src/observer/storage/record/record_manager.h | 2 +- src/observer/storage/table/table.cpp | 4 +- src/observer/storage/table/table.h | 2 +- src/observer/storage/trx/mvcc_trx.cpp | 110 +- src/observer/storage/trx/mvcc_trx.h | 2 +- src/observer/storage/trx/trx.h | 26 +- 11 files changed, 7267 insertions(+), 3495 deletions(-) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index ee7225ed..5777e557 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,23 +8,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -77,62 +75,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -156,12 +154,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -189,7 +187,7 @@ typedef void* yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_NEW_FILE yyrestart(yyin, yyscanner) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -207,7 +205,7 @@ typedef void* yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -222,88 +220,85 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - + +#define YY_LESS_LINENO(n) +#define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } while (0) +#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - - }; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -312,59 +307,55 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) +#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner); +static void yy_load_buffer_state(yyscan_t yyscanner); +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -372,314 +363,2404 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state(yyscan_t yyscanner); +static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); +static int yy_get_next_buffer(yyscan_t yyscanner); +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t)(yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 77 #define YY_END_OF_BUFFER 78 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[222] = - { 0, - 0, 0, 0, 0, 78, 76, 1, 2, 76, 76, - 76, 56, 57, 72, 70, 58, 71, 6, 73, 3, - 5, 63, 59, 65, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 77, 62, 0, 74, 0, 75, - 3, 0, 60, 61, 64, 69, 69, 69, 48, 69, - 47, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 50, 67, 69, 69, 69, 69, - 69, 15, 23, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 4, 22, 49, 69, 69, 69, - - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 33, 69, 69, - 69, 66, 69, 69, 69, 69, 29, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 19, 34, 69, - 69, 42, 36, 69, 9, 11, 69, 7, 69, 69, - 69, 20, 69, 8, 69, 69, 69, 69, 25, 55, - 68, 41, 39, 69, 69, 69, 16, 69, 17, 69, - 37, 69, 69, 69, 69, 30, 69, 69, 69, 69, - 69, 35, 69, 45, 14, 69, 54, 69, 69, 46, - 69, 69, 69, 12, 69, 69, 69, 21, 31, 10, - - 27, 51, 69, 53, 43, 24, 69, 69, 18, 69, - 13, 38, 28, 26, 44, 69, 69, 52, 40, 32, - 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, - 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, - - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[71] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 - } ; - -static const flex_int16_t yy_base[227] = - { 0, - 0, 0, 0, 0, 601, 602, 602, 602, 582, 594, - 592, 602, 602, 602, 602, 602, 582, 602, 602, 58, - 602, 56, 602, 578, 57, 61, 62, 63, 64, 83, - 65, 69, 91, 76, 580, 117, 108, 97, 103, 120, - 134, 146, 137, 112, 602, 602, 589, 602, 587, 602, - 73, 577, 602, 602, 602, 0, 576, 152, 147, 161, - 575, 151, 171, 157, 173, 163, 178, 177, 184, 188, - 181, 191, 195, 183, 241, 567, 205, 206, 211, 185, - 212, 566, 224, 215, 237, 226, 243, 234, 250, 238, - 255, 272, 260, 239, 565, 564, 563, 270, 286, 267, - - 281, 295, 296, 299, 297, 303, 312, 313, 311, 320, - 321, 307, 325, 339, 328, 343, 344, 314, 322, 347, - 346, 562, 357, 351, 365, 368, 560, 369, 350, 376, - 375, 370, 263, 384, 385, 390, 387, 559, 557, 388, - 392, 555, 554, 395, 553, 552, 397, 550, 406, 400, - 408, 549, 414, 548, 402, 425, 404, 418, 547, 545, - 541, 540, 423, 429, 443, 446, 538, 457, 537, 435, - 534, 433, 448, 455, 459, 528, 461, 465, 469, 463, - 476, 524, 471, 516, 480, 473, 432, 481, 487, 393, - 491, 483, 492, 497, 501, 509, 502, 318, 317, 273, - - 269, 246, 499, 219, 217, 189, 514, 506, 179, 523, - 138, 126, 123, 89, 88, 526, 527, 86, 82, 79, - 602, 583, 585, 587, 90, 79 - } ; - -static const flex_int16_t yy_def[227] = - { 0, - 221, 1, 222, 222, 221, 221, 221, 221, 221, 223, - 224, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 221, 221, 223, 221, 224, 221, - 221, 221, 221, 221, 221, 226, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 221, 225, 225, 225, 225, 225, - - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 0, 221, 221, 221, 221, 221 - } ; - -static const flex_int16_t yy_nxt[673] = - { 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, - 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, - 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, - 52, 56, 51, 53, 54, 56, 56, 56, 56, 56, - 56, 62, 66, 56, 60, 52, 67, 51, 63, 58, - 56, 57, 74, 56, 59, 64, 56, 56, 65, 68, - - 56, 73, 56, 56, 61, 56, 69, 62, 66, 77, - 60, 56, 67, 70, 63, 58, 71, 56, 74, 72, - 59, 64, 56, 75, 65, 68, 56, 73, 76, 82, - 61, 56, 69, 83, 56, 77, 84, 56, 94, 70, - 56, 80, 71, 85, 78, 72, 86, 81, 56, 75, - 79, 56, 56, 89, 76, 82, 93, 90, 87, 83, - 56, 56, 84, 88, 94, 56, 56, 80, 97, 85, - 78, 56, 86, 81, 96, 56, 79, 56, 91, 89, - 92, 99, 93, 90, 87, 56, 98, 56, 101, 88, - 100, 56, 56, 56, 97, 56, 102, 56, 56, 56, - - 96, 103, 56, 56, 91, 56, 92, 99, 104, 56, - 106, 107, 98, 113, 101, 105, 100, 110, 108, 56, - 56, 109, 102, 122, 111, 56, 56, 103, 112, 56, - 121, 56, 119, 56, 104, 120, 106, 107, 56, 113, - 56, 105, 123, 110, 108, 125, 124, 109, 56, 122, - 111, 56, 56, 56, 112, 56, 121, 56, 119, 128, - 56, 120, 136, 114, 56, 115, 130, 126, 123, 56, - 131, 125, 124, 116, 56, 127, 129, 56, 117, 118, - 132, 56, 133, 56, 56, 128, 56, 56, 136, 114, - 135, 115, 130, 126, 134, 56, 131, 137, 172, 116, - - 56, 127, 129, 139, 117, 118, 132, 138, 133, 56, - 56, 56, 140, 56, 141, 142, 135, 56, 145, 143, - 134, 56, 144, 137, 172, 56, 56, 56, 56, 139, - 150, 56, 56, 138, 56, 56, 56, 146, 140, 56, - 141, 142, 56, 149, 145, 143, 153, 159, 144, 147, - 148, 151, 152, 56, 160, 156, 150, 56, 56, 154, - 56, 56, 155, 146, 56, 56, 157, 158, 162, 149, - 161, 56, 153, 159, 164, 147, 148, 151, 152, 56, - 160, 156, 56, 56, 56, 154, 168, 163, 155, 56, - 56, 166, 157, 158, 162, 165, 161, 169, 56, 56, - - 164, 56, 56, 173, 56, 170, 56, 56, 171, 56, - 167, 56, 168, 163, 56, 177, 56, 166, 56, 176, - 56, 165, 56, 169, 174, 181, 175, 183, 56, 173, - 178, 170, 56, 179, 171, 180, 167, 56, 182, 56, - 187, 177, 189, 56, 185, 176, 56, 56, 184, 56, - 174, 181, 175, 183, 188, 186, 178, 56, 194, 179, - 56, 180, 56, 191, 182, 190, 187, 192, 189, 56, - 185, 56, 195, 56, 184, 56, 193, 56, 197, 56, - 188, 186, 198, 56, 194, 56, 196, 56, 200, 191, - 56, 190, 201, 192, 56, 56, 205, 56, 195, 199, - - 202, 56, 193, 203, 197, 56, 56, 207, 198, 204, - 208, 56, 196, 56, 200, 56, 56, 210, 201, 206, - 56, 209, 205, 56, 212, 199, 202, 217, 56, 203, - 56, 215, 213, 207, 211, 204, 208, 56, 56, 214, - 56, 56, 56, 210, 216, 206, 218, 209, 56, 219, - 212, 56, 56, 217, 56, 56, 220, 215, 213, 56, - 211, 56, 56, 56, 56, 214, 56, 56, 56, 56, - 216, 56, 218, 56, 56, 219, 56, 56, 56, 95, - 56, 56, 220, 45, 45, 47, 47, 49, 49, 56, - 56, 95, 50, 48, 56, 55, 51, 50, 48, 46, - - 221, 5, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221 - } ; - -static const flex_int16_t yy_chk[673] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, - 226, 27, 28, 32, 26, 51, 28, 51, 27, 25, - 34, 225, 32, 220, 25, 27, 219, 30, 27, 28, - - 218, 31, 215, 214, 26, 33, 29, 27, 28, 34, - 26, 38, 28, 30, 27, 25, 30, 39, 32, 30, - 25, 27, 37, 33, 27, 28, 44, 31, 33, 38, - 26, 36, 29, 38, 40, 34, 39, 213, 44, 30, - 212, 37, 30, 40, 36, 30, 40, 37, 41, 33, - 36, 43, 211, 41, 33, 38, 43, 41, 40, 38, - 42, 59, 39, 40, 44, 62, 58, 37, 59, 40, - 36, 64, 40, 37, 58, 60, 36, 66, 42, 41, - 42, 62, 43, 41, 40, 63, 60, 65, 64, 40, - 63, 68, 67, 209, 59, 71, 65, 74, 69, 80, - - 58, 66, 70, 206, 42, 72, 42, 62, 67, 73, - 68, 69, 60, 74, 64, 67, 63, 71, 69, 77, - 78, 70, 65, 80, 72, 79, 81, 66, 73, 84, - 79, 205, 77, 204, 67, 78, 68, 69, 83, 74, - 86, 67, 81, 71, 69, 84, 83, 70, 88, 80, - 72, 85, 90, 94, 73, 75, 79, 87, 77, 86, - 202, 78, 94, 75, 89, 75, 88, 85, 81, 91, - 89, 84, 83, 75, 93, 85, 87, 133, 75, 75, - 90, 100, 91, 201, 98, 86, 92, 200, 94, 75, - 93, 75, 88, 85, 92, 101, 89, 98, 133, 75, - - 99, 85, 87, 100, 75, 75, 90, 99, 91, 102, - 103, 105, 101, 104, 102, 103, 93, 106, 105, 103, - 92, 112, 104, 98, 133, 109, 107, 108, 118, 100, - 109, 199, 198, 99, 110, 111, 119, 106, 101, 113, - 102, 103, 115, 108, 105, 103, 112, 118, 104, 107, - 107, 110, 111, 114, 119, 115, 109, 116, 117, 113, - 121, 120, 114, 106, 129, 124, 116, 117, 121, 108, - 120, 123, 112, 118, 124, 107, 107, 110, 111, 125, - 119, 115, 126, 128, 132, 113, 129, 123, 114, 131, - 130, 126, 116, 117, 121, 125, 120, 130, 134, 135, - - 124, 137, 140, 134, 136, 131, 141, 190, 132, 144, - 128, 147, 129, 123, 150, 140, 155, 126, 157, 137, - 149, 125, 151, 130, 135, 149, 136, 151, 153, 134, - 141, 131, 158, 144, 132, 147, 128, 163, 150, 156, - 157, 140, 163, 164, 155, 137, 187, 172, 153, 170, - 135, 149, 136, 151, 158, 156, 141, 165, 170, 144, - 166, 147, 173, 165, 150, 164, 157, 166, 163, 174, - 155, 168, 172, 175, 153, 177, 168, 180, 174, 178, - 158, 156, 175, 179, 170, 183, 173, 186, 178, 165, - 181, 164, 179, 166, 185, 188, 186, 192, 172, 177, - - 180, 189, 168, 181, 174, 191, 193, 189, 175, 183, - 191, 194, 173, 203, 178, 195, 197, 193, 179, 188, - 208, 192, 186, 196, 195, 177, 180, 208, 207, 181, - 184, 203, 196, 189, 194, 183, 191, 210, 182, 197, - 216, 217, 176, 193, 207, 188, 210, 192, 171, 216, - 195, 169, 167, 208, 162, 161, 217, 203, 196, 160, - 194, 159, 154, 152, 148, 197, 146, 145, 143, 142, - 207, 139, 210, 138, 127, 216, 122, 97, 96, 95, - 82, 76, 217, 222, 222, 223, 223, 224, 224, 61, - 57, 52, 49, 47, 35, 24, 17, 11, 10, 9, - - 5, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221 - } ; +{ + flex_int32_t yy_verify; + flex_int32_t yy_nxt; +}; +static const flex_int16_t yy_accept[222] = {0, + 0, + 0, + 0, + 0, + 78, + 76, + 1, + 2, + 76, + 76, + 76, + 56, + 57, + 72, + 70, + 58, + 71, + 6, + 73, + 3, + 5, + 63, + 59, + 65, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 77, + 62, + 0, + 74, + 0, + 75, + 3, + 0, + 60, + 61, + 64, + 69, + 69, + 69, + 48, + 69, + 47, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 50, + 67, + 69, + 69, + 69, + 69, + 69, + 15, + 23, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 4, + 22, + 49, + 69, + 69, + 69, + + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 33, + 69, + 69, + 69, + 66, + 69, + 69, + 69, + 69, + 29, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 69, + 19, + 34, + 69, + 69, + 42, + 36, + 69, + 9, + 11, + 69, + 7, + 69, + 69, + 69, + 20, + 69, + 8, + 69, + 69, + 69, + 69, + 25, + 55, + 68, + 41, + 39, + 69, + 69, + 69, + 16, + 69, + 17, + 69, + 37, + 69, + 69, + 69, + 69, + 30, + 69, + 69, + 69, + 69, + 69, + 35, + 69, + 45, + 14, + 69, + 54, + 69, + 69, + 46, + 69, + 69, + 69, + 12, + 69, + 69, + 69, + 21, + 31, + 10, + + 27, + 51, + 69, + 53, + 43, + 24, + 69, + 69, + 18, + 69, + 13, + 38, + 28, + 26, + 44, + 69, + 69, + 52, + 40, + 32, + 0}; + +static const YY_CHAR yy_ec[256] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 3, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 4, + 5, + 1, + 1, + 1, + 1, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 1, + 16, + 17, + 18, + 19, + 1, + 1, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 1, + 1, + 1, + 1, + 45, + 1, + 46, + 47, + 48, + 49, + + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 45, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1}; + +static const YY_CHAR yy_meta[71] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2}; + +static const flex_int16_t yy_base[227] = {0, + 0, + 0, + 0, + 0, + 601, + 602, + 602, + 602, + 582, + 594, + 592, + 602, + 602, + 602, + 602, + 602, + 582, + 602, + 602, + 58, + 602, + 56, + 602, + 578, + 57, + 61, + 62, + 63, + 64, + 83, + 65, + 69, + 91, + 76, + 580, + 117, + 108, + 97, + 103, + 120, + 134, + 146, + 137, + 112, + 602, + 602, + 589, + 602, + 587, + 602, + 73, + 577, + 602, + 602, + 602, + 0, + 576, + 152, + 147, + 161, + 575, + 151, + 171, + 157, + 173, + 163, + 178, + 177, + 184, + 188, + 181, + 191, + 195, + 183, + 241, + 567, + 205, + 206, + 211, + 185, + 212, + 566, + 224, + 215, + 237, + 226, + 243, + 234, + 250, + 238, + 255, + 272, + 260, + 239, + 565, + 564, + 563, + 270, + 286, + 267, + + 281, + 295, + 296, + 299, + 297, + 303, + 312, + 313, + 311, + 320, + 321, + 307, + 325, + 339, + 328, + 343, + 344, + 314, + 322, + 347, + 346, + 562, + 357, + 351, + 365, + 368, + 560, + 369, + 350, + 376, + 375, + 370, + 263, + 384, + 385, + 390, + 387, + 559, + 557, + 388, + 392, + 555, + 554, + 395, + 553, + 552, + 397, + 550, + 406, + 400, + 408, + 549, + 414, + 548, + 402, + 425, + 404, + 418, + 547, + 545, + 541, + 540, + 423, + 429, + 443, + 446, + 538, + 457, + 537, + 435, + 534, + 433, + 448, + 455, + 459, + 528, + 461, + 465, + 469, + 463, + 476, + 524, + 471, + 516, + 480, + 473, + 432, + 481, + 487, + 393, + 491, + 483, + 492, + 497, + 501, + 509, + 502, + 318, + 317, + 273, + + 269, + 246, + 499, + 219, + 217, + 189, + 514, + 506, + 179, + 523, + 138, + 126, + 123, + 89, + 88, + 526, + 527, + 86, + 82, + 79, + 602, + 583, + 585, + 587, + 90, + 79}; + +static const flex_int16_t yy_def[227] = {0, + 221, + 1, + 222, + 222, + 221, + 221, + 221, + 221, + 221, + 223, + 224, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 221, + 221, + 223, + 221, + 224, + 221, + 221, + 221, + 221, + 221, + 221, + 226, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 221, + 225, + 225, + 225, + 225, + 225, + + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 225, + 0, + 221, + 221, + 221, + 221, + 221}; + +static const flex_int16_t yy_nxt[673] = {0, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 35, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 52, + 56, + 51, + 53, + 54, + 56, + 56, + 56, + 56, + 56, + 56, + 62, + 66, + 56, + 60, + 52, + 67, + 51, + 63, + 58, + 56, + 57, + 74, + 56, + 59, + 64, + 56, + 56, + 65, + 68, + + 56, + 73, + 56, + 56, + 61, + 56, + 69, + 62, + 66, + 77, + 60, + 56, + 67, + 70, + 63, + 58, + 71, + 56, + 74, + 72, + 59, + 64, + 56, + 75, + 65, + 68, + 56, + 73, + 76, + 82, + 61, + 56, + 69, + 83, + 56, + 77, + 84, + 56, + 94, + 70, + 56, + 80, + 71, + 85, + 78, + 72, + 86, + 81, + 56, + 75, + 79, + 56, + 56, + 89, + 76, + 82, + 93, + 90, + 87, + 83, + 56, + 56, + 84, + 88, + 94, + 56, + 56, + 80, + 97, + 85, + 78, + 56, + 86, + 81, + 96, + 56, + 79, + 56, + 91, + 89, + 92, + 99, + 93, + 90, + 87, + 56, + 98, + 56, + 101, + 88, + 100, + 56, + 56, + 56, + 97, + 56, + 102, + 56, + 56, + 56, + + 96, + 103, + 56, + 56, + 91, + 56, + 92, + 99, + 104, + 56, + 106, + 107, + 98, + 113, + 101, + 105, + 100, + 110, + 108, + 56, + 56, + 109, + 102, + 122, + 111, + 56, + 56, + 103, + 112, + 56, + 121, + 56, + 119, + 56, + 104, + 120, + 106, + 107, + 56, + 113, + 56, + 105, + 123, + 110, + 108, + 125, + 124, + 109, + 56, + 122, + 111, + 56, + 56, + 56, + 112, + 56, + 121, + 56, + 119, + 128, + 56, + 120, + 136, + 114, + 56, + 115, + 130, + 126, + 123, + 56, + 131, + 125, + 124, + 116, + 56, + 127, + 129, + 56, + 117, + 118, + 132, + 56, + 133, + 56, + 56, + 128, + 56, + 56, + 136, + 114, + 135, + 115, + 130, + 126, + 134, + 56, + 131, + 137, + 172, + 116, + + 56, + 127, + 129, + 139, + 117, + 118, + 132, + 138, + 133, + 56, + 56, + 56, + 140, + 56, + 141, + 142, + 135, + 56, + 145, + 143, + 134, + 56, + 144, + 137, + 172, + 56, + 56, + 56, + 56, + 139, + 150, + 56, + 56, + 138, + 56, + 56, + 56, + 146, + 140, + 56, + 141, + 142, + 56, + 149, + 145, + 143, + 153, + 159, + 144, + 147, + 148, + 151, + 152, + 56, + 160, + 156, + 150, + 56, + 56, + 154, + 56, + 56, + 155, + 146, + 56, + 56, + 157, + 158, + 162, + 149, + 161, + 56, + 153, + 159, + 164, + 147, + 148, + 151, + 152, + 56, + 160, + 156, + 56, + 56, + 56, + 154, + 168, + 163, + 155, + 56, + 56, + 166, + 157, + 158, + 162, + 165, + 161, + 169, + 56, + 56, + + 164, + 56, + 56, + 173, + 56, + 170, + 56, + 56, + 171, + 56, + 167, + 56, + 168, + 163, + 56, + 177, + 56, + 166, + 56, + 176, + 56, + 165, + 56, + 169, + 174, + 181, + 175, + 183, + 56, + 173, + 178, + 170, + 56, + 179, + 171, + 180, + 167, + 56, + 182, + 56, + 187, + 177, + 189, + 56, + 185, + 176, + 56, + 56, + 184, + 56, + 174, + 181, + 175, + 183, + 188, + 186, + 178, + 56, + 194, + 179, + 56, + 180, + 56, + 191, + 182, + 190, + 187, + 192, + 189, + 56, + 185, + 56, + 195, + 56, + 184, + 56, + 193, + 56, + 197, + 56, + 188, + 186, + 198, + 56, + 194, + 56, + 196, + 56, + 200, + 191, + 56, + 190, + 201, + 192, + 56, + 56, + 205, + 56, + 195, + 199, + + 202, + 56, + 193, + 203, + 197, + 56, + 56, + 207, + 198, + 204, + 208, + 56, + 196, + 56, + 200, + 56, + 56, + 210, + 201, + 206, + 56, + 209, + 205, + 56, + 212, + 199, + 202, + 217, + 56, + 203, + 56, + 215, + 213, + 207, + 211, + 204, + 208, + 56, + 56, + 214, + 56, + 56, + 56, + 210, + 216, + 206, + 218, + 209, + 56, + 219, + 212, + 56, + 56, + 217, + 56, + 56, + 220, + 215, + 213, + 56, + 211, + 56, + 56, + 56, + 56, + 214, + 56, + 56, + 56, + 56, + 216, + 56, + 218, + 56, + 56, + 219, + 56, + 56, + 56, + 95, + 56, + 56, + 220, + 45, + 45, + 47, + 47, + 49, + 49, + 56, + 56, + 95, + 50, + 48, + 56, + 55, + 51, + 50, + 48, + 46, + + 221, + 5, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221}; + +static const flex_int16_t yy_chk[673] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 20, + 25, + 20, + 22, + 22, + 26, + 27, + 28, + 29, + 31, + 226, + 27, + 28, + 32, + 26, + 51, + 28, + 51, + 27, + 25, + 34, + 225, + 32, + 220, + 25, + 27, + 219, + 30, + 27, + 28, + + 218, + 31, + 215, + 214, + 26, + 33, + 29, + 27, + 28, + 34, + 26, + 38, + 28, + 30, + 27, + 25, + 30, + 39, + 32, + 30, + 25, + 27, + 37, + 33, + 27, + 28, + 44, + 31, + 33, + 38, + 26, + 36, + 29, + 38, + 40, + 34, + 39, + 213, + 44, + 30, + 212, + 37, + 30, + 40, + 36, + 30, + 40, + 37, + 41, + 33, + 36, + 43, + 211, + 41, + 33, + 38, + 43, + 41, + 40, + 38, + 42, + 59, + 39, + 40, + 44, + 62, + 58, + 37, + 59, + 40, + 36, + 64, + 40, + 37, + 58, + 60, + 36, + 66, + 42, + 41, + 42, + 62, + 43, + 41, + 40, + 63, + 60, + 65, + 64, + 40, + 63, + 68, + 67, + 209, + 59, + 71, + 65, + 74, + 69, + 80, + + 58, + 66, + 70, + 206, + 42, + 72, + 42, + 62, + 67, + 73, + 68, + 69, + 60, + 74, + 64, + 67, + 63, + 71, + 69, + 77, + 78, + 70, + 65, + 80, + 72, + 79, + 81, + 66, + 73, + 84, + 79, + 205, + 77, + 204, + 67, + 78, + 68, + 69, + 83, + 74, + 86, + 67, + 81, + 71, + 69, + 84, + 83, + 70, + 88, + 80, + 72, + 85, + 90, + 94, + 73, + 75, + 79, + 87, + 77, + 86, + 202, + 78, + 94, + 75, + 89, + 75, + 88, + 85, + 81, + 91, + 89, + 84, + 83, + 75, + 93, + 85, + 87, + 133, + 75, + 75, + 90, + 100, + 91, + 201, + 98, + 86, + 92, + 200, + 94, + 75, + 93, + 75, + 88, + 85, + 92, + 101, + 89, + 98, + 133, + 75, + + 99, + 85, + 87, + 100, + 75, + 75, + 90, + 99, + 91, + 102, + 103, + 105, + 101, + 104, + 102, + 103, + 93, + 106, + 105, + 103, + 92, + 112, + 104, + 98, + 133, + 109, + 107, + 108, + 118, + 100, + 109, + 199, + 198, + 99, + 110, + 111, + 119, + 106, + 101, + 113, + 102, + 103, + 115, + 108, + 105, + 103, + 112, + 118, + 104, + 107, + 107, + 110, + 111, + 114, + 119, + 115, + 109, + 116, + 117, + 113, + 121, + 120, + 114, + 106, + 129, + 124, + 116, + 117, + 121, + 108, + 120, + 123, + 112, + 118, + 124, + 107, + 107, + 110, + 111, + 125, + 119, + 115, + 126, + 128, + 132, + 113, + 129, + 123, + 114, + 131, + 130, + 126, + 116, + 117, + 121, + 125, + 120, + 130, + 134, + 135, + + 124, + 137, + 140, + 134, + 136, + 131, + 141, + 190, + 132, + 144, + 128, + 147, + 129, + 123, + 150, + 140, + 155, + 126, + 157, + 137, + 149, + 125, + 151, + 130, + 135, + 149, + 136, + 151, + 153, + 134, + 141, + 131, + 158, + 144, + 132, + 147, + 128, + 163, + 150, + 156, + 157, + 140, + 163, + 164, + 155, + 137, + 187, + 172, + 153, + 170, + 135, + 149, + 136, + 151, + 158, + 156, + 141, + 165, + 170, + 144, + 166, + 147, + 173, + 165, + 150, + 164, + 157, + 166, + 163, + 174, + 155, + 168, + 172, + 175, + 153, + 177, + 168, + 180, + 174, + 178, + 158, + 156, + 175, + 179, + 170, + 183, + 173, + 186, + 178, + 165, + 181, + 164, + 179, + 166, + 185, + 188, + 186, + 192, + 172, + 177, + + 180, + 189, + 168, + 181, + 174, + 191, + 193, + 189, + 175, + 183, + 191, + 194, + 173, + 203, + 178, + 195, + 197, + 193, + 179, + 188, + 208, + 192, + 186, + 196, + 195, + 177, + 180, + 208, + 207, + 181, + 184, + 203, + 196, + 189, + 194, + 183, + 191, + 210, + 182, + 197, + 216, + 217, + 176, + 193, + 207, + 188, + 210, + 192, + 171, + 216, + 195, + 169, + 167, + 208, + 162, + 161, + 217, + 203, + 196, + 160, + 194, + 159, + 154, + 152, + 148, + 197, + 146, + 145, + 143, + 142, + 207, + 139, + 210, + 138, + 127, + 216, + 122, + 97, + 96, + 95, + 82, + 76, + 217, + 222, + 222, + 223, + 223, + 224, + 224, + 61, + 57, + 52, + 49, + 47, + 35, + 24, + 17, + 11, + 10, + 9, + + 5, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221, + 221}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -691,8 +2772,8 @@ static const flex_int16_t yy_chk[673] = #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -706,13 +2787,15 @@ static const flex_int16_t yy_chk[673] = #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#define RETURN_TOKEN(token) \ + LOG_DEBUG("%s", #token); \ + return token #line 716 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -741,124 +2824,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t - { +{ + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char *yy_last_accepting_cpos; - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; + int yylineno_r; + int yy_flex_debug_r; - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; + char *yytext_r; + int yy_more_flag; + int yy_more_len; - int yylineno_r; - int yy_flex_debug_r; + YYSTYPE *yylval_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + YYLTYPE *yylloc_r; - YYSTYPE * yylval_r; +}; /* end struct yyguts_t */ - YYLTYPE * yylloc_r; +static int yy_init_globals(yyscan_t yyscanner); - }; /* end struct yyguts_t */ +/* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ +#define yylval yyg->yylval_r -static int yy_init_globals ( yyscan_t yyscanner ); +#define yylloc yyg->yylloc_r - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); +static int yyinput(yyscan_t yyscanner); #else -static int input ( yyscan_t yyscanner ); +static int input(yyscan_t yyscanner); #endif #endif @@ -878,42 +2961,38 @@ static int input ( yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO \ + do { \ + if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ + } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ +#define YY_INPUT(buf, result, max_size) \ + if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ + int c = '*'; \ + yy_size_t n; \ + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ + buf[n] = (char)c; \ + if (c == '\n') \ + buf[n++] = (char)c; \ + if (c == EOF && ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + result = n; \ + } else { \ + errno = 0; \ + while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ + if (errno != EINTR) { \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + break; \ + } \ + errno = 0; \ + clearerr(yyin); \ + } \ + } #endif @@ -932,7 +3011,7 @@ static int input ( yyscan_t yyscanner ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -943,11 +3022,9 @@ static int input ( yyscan_t yyscanner ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -959,624 +3036,538 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK /*LINTED*/ break; #endif -#define YY_RULE_SETUP \ - YY_USER_ACTION +#define YY_RULE_SETUP YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; + if (!yyg->yy_init) { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ + if (!yyg->yy_start) + yyg->yy_start = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if (!yyin) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if (!yyout) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_load_buffer_state( yyscanner ); - } + yy_load_buffer_state(yyscanner); + } - { + { #line 75 "lex_sql.l" - #line 1011 "lex_sql.cpp" - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 222 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 602 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP + while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_match: + do { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 222) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } while (yy_base[yy_current_state] != 602); + + yy_find_action: + yy_act = yy_accept[yy_current_state]; + if (yy_act == 0) { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + do_action: /* This label is used only to access EOF actions. */ + + switch (yy_act) { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + + case 1: YY_RULE_SETUP #line 77 "lex_sql.l" -// ignore whitespace - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP + // ignore whitespace + YY_BREAK + case 2: + /* rule 2 can match eol */ + YY_RULE_SETUP #line 78 "lex_sql.l" -; - YY_BREAK -case 3: -YY_RULE_SETUP + ; + YY_BREAK + case 3: YY_RULE_SETUP #line 80 "lex_sql.l" -yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); - YY_BREAK -case 4: -YY_RULE_SETUP + yylval->number = atoi(yytext); + RETURN_TOKEN(NUMBER); + YY_BREAK + case 4: YY_RULE_SETUP #line 81 "lex_sql.l" -yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); - YY_BREAK -case 5: -YY_RULE_SETUP + yylval->floats = (float)(atof(yytext)); + RETURN_TOKEN(FLOAT); + YY_BREAK + case 5: YY_RULE_SETUP #line 83 "lex_sql.l" -RETURN_TOKEN(SEMICOLON); - YY_BREAK -case 6: -YY_RULE_SETUP + RETURN_TOKEN(SEMICOLON); + YY_BREAK + case 6: YY_RULE_SETUP #line 84 "lex_sql.l" -RETURN_TOKEN(DOT); - YY_BREAK -case 7: -YY_RULE_SETUP + RETURN_TOKEN(DOT); + YY_BREAK + case 7: YY_RULE_SETUP #line 85 "lex_sql.l" -RETURN_TOKEN(EXIT); - YY_BREAK -case 8: -YY_RULE_SETUP + RETURN_TOKEN(EXIT); + YY_BREAK + case 8: YY_RULE_SETUP #line 86 "lex_sql.l" -RETURN_TOKEN(HELP); - YY_BREAK -case 9: -YY_RULE_SETUP + RETURN_TOKEN(HELP); + YY_BREAK + case 9: YY_RULE_SETUP #line 87 "lex_sql.l" -RETURN_TOKEN(DESC); - YY_BREAK -case 10: -YY_RULE_SETUP + RETURN_TOKEN(DESC); + YY_BREAK + case 10: YY_RULE_SETUP #line 88 "lex_sql.l" -RETURN_TOKEN(CREATE); - YY_BREAK -case 11: -YY_RULE_SETUP + RETURN_TOKEN(CREATE); + YY_BREAK + case 11: YY_RULE_SETUP #line 89 "lex_sql.l" -RETURN_TOKEN(DROP); - YY_BREAK -case 12: -YY_RULE_SETUP + RETURN_TOKEN(DROP); + YY_BREAK + case 12: YY_RULE_SETUP #line 90 "lex_sql.l" -RETURN_TOKEN(TABLE); - YY_BREAK -case 13: -YY_RULE_SETUP + RETURN_TOKEN(TABLE); + YY_BREAK + case 13: YY_RULE_SETUP #line 91 "lex_sql.l" -RETURN_TOKEN(TABLES); - YY_BREAK -case 14: -YY_RULE_SETUP + RETURN_TOKEN(TABLES); + YY_BREAK + case 14: YY_RULE_SETUP #line 92 "lex_sql.l" -RETURN_TOKEN(INDEX); - YY_BREAK -case 15: -YY_RULE_SETUP + RETURN_TOKEN(INDEX); + YY_BREAK + case 15: YY_RULE_SETUP #line 93 "lex_sql.l" -RETURN_TOKEN(ON); - YY_BREAK -case 16: -YY_RULE_SETUP + RETURN_TOKEN(ON); + YY_BREAK + case 16: YY_RULE_SETUP #line 94 "lex_sql.l" -RETURN_TOKEN(SHOW); - YY_BREAK -case 17: -YY_RULE_SETUP + RETURN_TOKEN(SHOW); + YY_BREAK + case 17: YY_RULE_SETUP #line 95 "lex_sql.l" -RETURN_TOKEN(SYNC); - YY_BREAK -case 18: -YY_RULE_SETUP + RETURN_TOKEN(SYNC); + YY_BREAK + case 18: YY_RULE_SETUP #line 96 "lex_sql.l" -RETURN_TOKEN(SELECT); - YY_BREAK -case 19: -YY_RULE_SETUP + RETURN_TOKEN(SELECT); + YY_BREAK + case 19: YY_RULE_SETUP #line 97 "lex_sql.l" -RETURN_TOKEN(CALC); - YY_BREAK -case 20: -YY_RULE_SETUP + RETURN_TOKEN(CALC); + YY_BREAK + case 20: YY_RULE_SETUP #line 98 "lex_sql.l" -RETURN_TOKEN(FROM); - YY_BREAK -case 21: -YY_RULE_SETUP + RETURN_TOKEN(FROM); + YY_BREAK + case 21: YY_RULE_SETUP #line 99 "lex_sql.l" -RETURN_TOKEN(WHERE); - YY_BREAK -case 22: -YY_RULE_SETUP + RETURN_TOKEN(WHERE); + YY_BREAK + case 22: YY_RULE_SETUP #line 100 "lex_sql.l" -RETURN_TOKEN(AND); - YY_BREAK -case 23: -YY_RULE_SETUP + RETURN_TOKEN(AND); + YY_BREAK + case 23: YY_RULE_SETUP #line 101 "lex_sql.l" -RETURN_TOKEN(OR); - YY_BREAK -case 24: -YY_RULE_SETUP + RETURN_TOKEN(OR); + YY_BREAK + case 24: YY_RULE_SETUP #line 102 "lex_sql.l" -RETURN_TOKEN(INSERT); - YY_BREAK -case 25: -YY_RULE_SETUP + RETURN_TOKEN(INSERT); + YY_BREAK + case 25: YY_RULE_SETUP #line 103 "lex_sql.l" -RETURN_TOKEN(INTO); - YY_BREAK -case 26: -YY_RULE_SETUP + RETURN_TOKEN(INTO); + YY_BREAK + case 26: YY_RULE_SETUP #line 104 "lex_sql.l" -RETURN_TOKEN(VALUES); - YY_BREAK -case 27: -YY_RULE_SETUP + RETURN_TOKEN(VALUES); + YY_BREAK + case 27: YY_RULE_SETUP #line 105 "lex_sql.l" -RETURN_TOKEN(DELETE); - YY_BREAK -case 28: -YY_RULE_SETUP + RETURN_TOKEN(DELETE); + YY_BREAK + case 28: YY_RULE_SETUP #line 106 "lex_sql.l" -RETURN_TOKEN(UPDATE); - YY_BREAK -case 29: -YY_RULE_SETUP + RETURN_TOKEN(UPDATE); + YY_BREAK + case 29: YY_RULE_SETUP #line 107 "lex_sql.l" -RETURN_TOKEN(SET); - YY_BREAK -case 30: -YY_RULE_SETUP + RETURN_TOKEN(SET); + YY_BREAK + case 30: YY_RULE_SETUP #line 108 "lex_sql.l" -RETURN_TOKEN(TRX_BEGIN); - YY_BREAK -case 31: -YY_RULE_SETUP + RETURN_TOKEN(TRX_BEGIN); + YY_BREAK + case 31: YY_RULE_SETUP #line 109 "lex_sql.l" -RETURN_TOKEN(TRX_COMMIT); - YY_BREAK -case 32: -YY_RULE_SETUP + RETURN_TOKEN(TRX_COMMIT); + YY_BREAK + case 32: YY_RULE_SETUP #line 110 "lex_sql.l" -RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK -case 33: -YY_RULE_SETUP + RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK + case 33: YY_RULE_SETUP #line 111 "lex_sql.l" -RETURN_TOKEN(INT_T); - YY_BREAK -case 34: -YY_RULE_SETUP + RETURN_TOKEN(INT_T); + YY_BREAK + case 34: YY_RULE_SETUP #line 112 "lex_sql.l" -RETURN_TOKEN(STRING_T); - YY_BREAK -case 35: -YY_RULE_SETUP + RETURN_TOKEN(STRING_T); + YY_BREAK + case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(FLOAT_T); - YY_BREAK -case 36: -YY_RULE_SETUP + RETURN_TOKEN(FLOAT_T); + YY_BREAK + case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK -case 37: -YY_RULE_SETUP + RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK + case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token - YY_BREAK -case 38: -YY_RULE_SETUP + RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + YY_BREAK + case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(UNIQUE); - YY_BREAK -case 39: -YY_RULE_SETUP + RETURN_TOKEN(UNIQUE); + YY_BREAK + case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(NULL_T); - YY_BREAK -case 40: -YY_RULE_SETUP + RETURN_TOKEN(NULL_T); + YY_BREAK + case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(NULLABLE); - YY_BREAK -case 41: -YY_RULE_SETUP + RETURN_TOKEN(NULLABLE); + YY_BREAK + case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(LOAD); - YY_BREAK -case 42: -YY_RULE_SETUP + RETURN_TOKEN(LOAD); + YY_BREAK + case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(DATA); - YY_BREAK -case 43: -YY_RULE_SETUP + RETURN_TOKEN(DATA); + YY_BREAK + case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(INFILE); - YY_BREAK -case 44: -YY_RULE_SETUP + RETURN_TOKEN(INFILE); + YY_BREAK + case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); - YY_BREAK -case 45: -YY_RULE_SETUP + RETURN_TOKEN(EXPLAIN); + YY_BREAK + case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(GROUP); - YY_BREAK -case 46: -YY_RULE_SETUP + RETURN_TOKEN(GROUP); + YY_BREAK + case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(ORDER); - YY_BREAK -case 47: -YY_RULE_SETUP + RETURN_TOKEN(ORDER); + YY_BREAK + case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(BY); - YY_BREAK -case 48: -YY_RULE_SETUP + RETURN_TOKEN(BY); + YY_BREAK + case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(AS); - YY_BREAK -case 49: -YY_RULE_SETUP + RETURN_TOKEN(AS); + YY_BREAK + case 49: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(ASC); - YY_BREAK -case 50: -YY_RULE_SETUP + RETURN_TOKEN(ASC); + YY_BREAK + case 50: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(IN); - YY_BREAK -case 51: -YY_RULE_SETUP + RETURN_TOKEN(IN); + YY_BREAK + case 51: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(EXISTS); - YY_BREAK -case 52: -YY_RULE_SETUP + RETURN_TOKEN(EXISTS); + YY_BREAK + case 52: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(STORAGE); - YY_BREAK -case 53: -YY_RULE_SETUP + RETURN_TOKEN(STORAGE); + YY_BREAK + case 53: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(FORMAT); - YY_BREAK -case 54: -YY_RULE_SETUP + RETURN_TOKEN(FORMAT); + YY_BREAK + case 54: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(INNER); - YY_BREAK -case 55: -YY_RULE_SETUP + RETURN_TOKEN(INNER); + YY_BREAK + case 55: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(JOIN); - YY_BREAK -case 56: -YY_RULE_SETUP + RETURN_TOKEN(JOIN); + YY_BREAK + case 56: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(LBRACE); - YY_BREAK -case 57: -YY_RULE_SETUP + RETURN_TOKEN(LBRACE); + YY_BREAK + case 57: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(RBRACE); - YY_BREAK -case 58: -YY_RULE_SETUP + RETURN_TOKEN(RBRACE); + YY_BREAK + case 58: YY_RULE_SETUP #line 137 "lex_sql.l" -RETURN_TOKEN(COMMA); - YY_BREAK -case 59: -YY_RULE_SETUP + RETURN_TOKEN(COMMA); + YY_BREAK + case 59: YY_RULE_SETUP #line 138 "lex_sql.l" -RETURN_TOKEN(EQ); - YY_BREAK -case 60: -YY_RULE_SETUP + RETURN_TOKEN(EQ); + YY_BREAK + case 60: YY_RULE_SETUP #line 139 "lex_sql.l" -RETURN_TOKEN(LE); - YY_BREAK -case 61: -YY_RULE_SETUP + RETURN_TOKEN(LE); + YY_BREAK + case 61: YY_RULE_SETUP #line 140 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 62: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 62: YY_RULE_SETUP #line 141 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 63: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 63: YY_RULE_SETUP #line 142 "lex_sql.l" -RETURN_TOKEN(LT); - YY_BREAK -case 64: -YY_RULE_SETUP + RETURN_TOKEN(LT); + YY_BREAK + case 64: YY_RULE_SETUP #line 143 "lex_sql.l" -RETURN_TOKEN(GE); - YY_BREAK -case 65: -YY_RULE_SETUP + RETURN_TOKEN(GE); + YY_BREAK + case 65: YY_RULE_SETUP #line 144 "lex_sql.l" -RETURN_TOKEN(GT); - YY_BREAK -case 66: -YY_RULE_SETUP + RETURN_TOKEN(GT); + YY_BREAK + case 66: YY_RULE_SETUP #line 145 "lex_sql.l" -RETURN_TOKEN(NOT); - YY_BREAK -case 67: -YY_RULE_SETUP + RETURN_TOKEN(NOT); + YY_BREAK + case 67: YY_RULE_SETUP #line 146 "lex_sql.l" -RETURN_TOKEN(IS); - YY_BREAK -case 68: -YY_RULE_SETUP + RETURN_TOKEN(IS); + YY_BREAK + case 68: YY_RULE_SETUP #line 147 "lex_sql.l" -RETURN_TOKEN(LIKE); - YY_BREAK -case 69: -YY_RULE_SETUP + RETURN_TOKEN(LIKE); + YY_BREAK + case 69: YY_RULE_SETUP #line 149 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); - YY_BREAK -case 70: + yylval->string = strdup(yytext); + RETURN_TOKEN(ID); + YY_BREAK + case 70: #line 152 "lex_sql.l" -case 71: + case 71: #line 153 "lex_sql.l" -case 72: + case 72: #line 154 "lex_sql.l" -case 73: -YY_RULE_SETUP + case 73: YY_RULE_SETUP #line 154 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK -case 74: -/* rule 74 can match eol */ -YY_RULE_SETUP + { + return yytext[0]; + } + YY_BREAK + case 74: + /* rule 74 can match eol */ + YY_RULE_SETUP #line 155 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 75: -/* rule 75 can match eol */ -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 75: + /* rule 75 can match eol */ + YY_RULE_SETUP #line 156 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 76: -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 76: YY_RULE_SETUP #line 158 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; - YY_BREAK -case 77: -YY_RULE_SETUP + LOG_DEBUG("Unknown character [%c]",yytext[0]); + return yytext[0]; + YY_BREAK + case 77: YY_RULE_SETUP #line 159 "lex_sql.l" -ECHO; - YY_BREAK + ECHO; + YY_BREAK #line 1447 "lex_sql.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STR): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap( yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(STR): yyterminate(); + + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if (yy_next_state) { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_END_OF_FILE: { + yyg->yy_did_buffer_switch_on_eof = 0; + + if (yywrap(yyscanner)) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else { + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1586,171 +3577,149 @@ case YY_STATE_EOF(STR): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (yyscan_t yyscanner) +static int yy_get_next_buffer(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) + YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); + + if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ + if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for (i = 0; i < number_to_move; ++i) + *(dest++) = *(source++); + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else { + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); + + if (b->yy_is_our_buffer) { + yy_size_t new_size = b->yy_buf_size * 2; + + if (new_size <= 0) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); + } else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if (!b->yy_ch_buf) + YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + } + + if (num_to_read > YY_READ_BUF_SIZE) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if (yyg->yy_n_chars == 0) { + if (number_to_move == YY_MORE_ADJ) { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin, yyscanner); + } + + else { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = + (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); + if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +static yy_state_type yy_get_previous_state(yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 222 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + yy_current_state = yyg->yy_start; + + for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 222) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -1758,29 +3727,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 222 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 221); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 222) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 221); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -1789,141 +3756,133 @@ static int yy_get_next_buffer (yyscan_t yyscanner) #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) +static int yyinput(yyscan_t yyscanner) #else - static int input (yyscan_t yyscanner) +static int input(yyscan_t yyscanner) #endif { - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin , yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + int c; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin, yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: { + if (yywrap(yyscanner)) + return 0; + + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; + } + } + } - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) +void yyrestart(FILE *input_file, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); + yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); + yy_load_buffer_state(yyscanner); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack(yyscanner); + if (YY_CURRENT_BUFFER == new_buffer) + return; + + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state(yyscanner); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state (yyscan_t yyscanner) +static void yy_load_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -1932,105 +3891,105 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); + if (!b->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer( b, file , yyscanner); + yy_init_buffer(b, file, yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! b ) - return; + if (!b) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); + if (b->yy_is_our_buffer) + yyfree((void *)b->yy_ch_buf, yyscanner); - yyfree( (void *) b , yyscanner ); + yyfree((void *)b, yyscanner); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + int oerrno = errno; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flush_buffer( b , yyscanner); + yy_flush_buffer(b, yyscanner); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!b) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); + if (b == YY_CURRENT_BUFFER) + yy_load_buffer_state(yyscanner); } /** Pushes the new state onto the stack. The new state becomes @@ -2039,99 +3998,95 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state (yyscan_t yyscanner) +void yypop_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (yyscan_t yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = + (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( + yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -2140,33 +4095,31 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b , yyscanner ); - - return b; + YY_BUFFER_STATE b; + + if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + + b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b, yyscanner); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -2177,10 +4130,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) { - - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + + return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2190,177 +4143,175 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n , yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t)(_yybytes_len + 2); + buf = (char *)yyalloc(n, yyscanner); + if (!buf) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + + for (i = 0; i < _yybytes_len; ++i) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf, n, yyscanner); + if (!b) + YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + fprintf(stderr, "%s\n", msg); + exit(YY_EXIT_FAILURE); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } while (0) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno (yyscan_t yyscanner) +int yyget_lineno(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (!YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column (yyscan_t yyscanner) +int yyget_column(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; + if (!YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in (yyscan_t yyscanner) +FILE *yyget_in(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out (yyscan_t yyscanner) +FILE *yyget_out(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text (yyscan_t yyscanner) +char *yyget_text(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyextra = user_defined; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) +void yyset_lineno(int _line_number, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_lineno called with no buffer"); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int _column_no , yyscan_t yyscanner) +void yyset_column(int _column_no, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_column called with no buffer"); - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); - - yycolumn = _column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -2369,80 +4320,80 @@ void yyset_column (int _column_no , yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) +void yyset_in(FILE *_in_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyin = _in_str; } -void yyset_out (FILE * _out_str , yyscan_t yyscanner) +void yyset_out(FILE *_out_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyout = _out_str; } -int yyget_debug (yyscan_t yyscanner) +int yyget_debug(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yy_flex_debug; } -void yyset_debug (int _bdebug , yyscan_t yyscanner) +void yyset_debug(int _bdebug, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_flex_debug = _bdebug; } /* Accessor methods for yylval and yylloc */ -YYSTYPE * yyget_lval (yyscan_t yyscanner) +YYSTYPE *yyget_lval(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylval; } -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc (yyscan_t yyscanner) +YYLTYPE *yyget_lloc(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylloc; } - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t* ptr_yy_globals) +int yylex_init(yyscan_t *ptr_yy_globals) { - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -2452,94 +4403,94 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra (yy_user_defined, &dummy_yyguts); + yyset_extra(yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - yyset_extra (yy_user_defined, *ptr_yy_globals); + yyset_extra(yy_user_defined, *ptr_yy_globals); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } -static int yy_init_globals (yyscan_t yyscanner) +static int yy_init_globals(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) +int yylex_destroy(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while (YY_CURRENT_BUFFER) { + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack, yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree(yyg->yy_start_stack, yyscanner); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals(yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree(yyscanner, yyscanner); + yyscanner = NULL; + return 0; } /* @@ -2547,63 +4498,59 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + int i; + for (i = 0; i < n; ++i) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +static int yy_flex_strlen(const char *s, yyscan_t yyscanner) { - int n; - for ( n = 0; s[n]; ++n ) - ; + int n; + for (n = 0; s[n]; ++n) + ; - return n; + return n; } #endif -void *yyalloc (yy_size_t size , yyscan_t yyscanner) +void *yyalloc(yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree (void * ptr , yyscan_t yyscanner) +void yyfree(void *ptr, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + free((char *)ptr); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 159 "lex_sql.l" - -void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); -} - +void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index d9d6fa07..48c24424 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,23 +12,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -81,62 +79,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -157,7 +155,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -197,73 +195,72 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -286,69 +283,69 @@ void yyfree ( void * , yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -376,11 +373,9 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -544,7 +539,6 @@ extern int yylex \ #line 159 "lex_sql.l" - #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 77b8714a..6f24dd67 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,13 +63,9 @@ /* Pull parsers. */ #define YYPULL 1 - - - /* First part of user prologue. */ #line 2 "yacc_sql.y" - #include #include #include @@ -92,200 +88,191 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, - Expression *left, - Expression *right, - const char *sql_string, - YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression( + ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression(const char *function_name, - std::vector> child, - const char *sql_string, - YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression( + const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } - #line 125 "yacc_sql.cpp" -# ifndef YY_CAST -# ifdef __cplusplus -# define YY_CAST(Type, Val) static_cast (Val) -# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -# else -# define YY_CAST(Type, Val) ((Type) (Val)) -# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -# endif -# endif -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif +#ifndef YY_CAST +#ifdef __cplusplus +#define YY_CAST(Type, Val) static_cast(Val) +#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) +#else +#define YY_CAST(Type, Val) ((Type)(Val)) +#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) +#endif +#endif +#ifndef YY_NULLPTR +#if defined __cplusplus +#if 201103L <= __cplusplus +#define YY_NULLPTR nullptr +#else +#define YY_NULLPTR 0 +#endif +#else +#define YY_NULLPTR ((void *)0) +#endif +#endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_ORDER = 11, /* ORDER */ - YYSYMBOL_TABLE = 12, /* TABLE */ - YYSYMBOL_TABLES = 13, /* TABLES */ - YYSYMBOL_INDEX = 14, /* INDEX */ - YYSYMBOL_CALC = 15, /* CALC */ - YYSYMBOL_SELECT = 16, /* SELECT */ - YYSYMBOL_DESC = 17, /* DESC */ - YYSYMBOL_SHOW = 18, /* SHOW */ - YYSYMBOL_SYNC = 19, /* SYNC */ - YYSYMBOL_INSERT = 20, /* INSERT */ - YYSYMBOL_DELETE = 21, /* DELETE */ - YYSYMBOL_UPDATE = 22, /* UPDATE */ - YYSYMBOL_LBRACE = 23, /* LBRACE */ - YYSYMBOL_RBRACE = 24, /* RBRACE */ - YYSYMBOL_COMMA = 25, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 29, /* INT_T */ - YYSYMBOL_IN = 30, /* IN */ - YYSYMBOL_STRING_T = 31, /* STRING_T */ - YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ - YYSYMBOL_DATE_T = 33, /* DATE_T */ - YYSYMBOL_TEXT_T = 34, /* TEXT_T */ - YYSYMBOL_NOT = 35, /* NOT */ - YYSYMBOL_UNIQUE = 36, /* UNIQUE */ - YYSYMBOL_NULL_T = 37, /* NULL_T */ - YYSYMBOL_NULLABLE = 38, /* NULLABLE */ - YYSYMBOL_HELP = 39, /* HELP */ - YYSYMBOL_EXIT = 40, /* EXIT */ - YYSYMBOL_DOT = 41, /* DOT */ - YYSYMBOL_INTO = 42, /* INTO */ - YYSYMBOL_VALUES = 43, /* VALUES */ - YYSYMBOL_FROM = 44, /* FROM */ - YYSYMBOL_WHERE = 45, /* WHERE */ - YYSYMBOL_AND = 46, /* AND */ - YYSYMBOL_OR = 47, /* OR */ - YYSYMBOL_SET = 48, /* SET */ - YYSYMBOL_ON = 49, /* ON */ - YYSYMBOL_LOAD = 50, /* LOAD */ - YYSYMBOL_DATA = 51, /* DATA */ - YYSYMBOL_INFILE = 52, /* INFILE */ - YYSYMBOL_EXPLAIN = 53, /* EXPLAIN */ - YYSYMBOL_STORAGE = 54, /* STORAGE */ - YYSYMBOL_FORMAT = 55, /* FORMAT */ - YYSYMBOL_INNER = 56, /* INNER */ - YYSYMBOL_JOIN = 57, /* JOIN */ - YYSYMBOL_EQ = 58, /* EQ */ - YYSYMBOL_LT = 59, /* LT */ - YYSYMBOL_GT = 60, /* GT */ - YYSYMBOL_LE = 61, /* LE */ - YYSYMBOL_GE = 62, /* GE */ - YYSYMBOL_NE = 63, /* NE */ - YYSYMBOL_LIKE = 64, /* LIKE */ - YYSYMBOL_IS = 65, /* IS */ - YYSYMBOL_NUMBER = 66, /* NUMBER */ - YYSYMBOL_FLOAT = 67, /* FLOAT */ - YYSYMBOL_ID = 68, /* ID */ - YYSYMBOL_SSS = 69, /* SSS */ - YYSYMBOL_70_ = 70, /* '+' */ - YYSYMBOL_71_ = 71, /* '-' */ - YYSYMBOL_72_ = 72, /* '*' */ - YYSYMBOL_73_ = 73, /* '/' */ - YYSYMBOL_UMINUS = 74, /* UMINUS */ - YYSYMBOL_YYACCEPT = 75, /* $accept */ - YYSYMBOL_commands = 76, /* commands */ - YYSYMBOL_command_wrapper = 77, /* command_wrapper */ - YYSYMBOL_exit_stmt = 78, /* exit_stmt */ - YYSYMBOL_help_stmt = 79, /* help_stmt */ - YYSYMBOL_sync_stmt = 80, /* sync_stmt */ - YYSYMBOL_begin_stmt = 81, /* begin_stmt */ - YYSYMBOL_commit_stmt = 82, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 83, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 84, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 85, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 86, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 87, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 88, /* create_index_stmt */ - YYSYMBOL_opt_unique = 89, /* opt_unique */ - YYSYMBOL_attr_list = 90, /* attr_list */ - YYSYMBOL_drop_index_stmt = 91, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 92, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 93, /* attr_def_list */ - YYSYMBOL_attr_def = 94, /* attr_def */ - YYSYMBOL_nullable_constraint = 95, /* nullable_constraint */ - YYSYMBOL_number = 96, /* number */ - YYSYMBOL_type = 97, /* type */ - YYSYMBOL_insert_stmt = 98, /* insert_stmt */ - YYSYMBOL_values_list = 99, /* values_list */ - YYSYMBOL_value_list = 100, /* value_list */ - YYSYMBOL_value = 101, /* value */ - YYSYMBOL_storage_format = 102, /* storage_format */ - YYSYMBOL_delete_stmt = 103, /* delete_stmt */ - YYSYMBOL_update_stmt = 104, /* update_stmt */ - YYSYMBOL_setClauses = 105, /* setClauses */ - YYSYMBOL_setClause = 106, /* setClause */ - YYSYMBOL_select_stmt = 107, /* select_stmt */ - YYSYMBOL_calc_stmt = 108, /* calc_stmt */ - YYSYMBOL_expression_list = 109, /* expression_list */ - YYSYMBOL_expression = 110, /* expression */ - YYSYMBOL_alias = 111, /* alias */ - YYSYMBOL_aggr_func_expr = 112, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 113, /* sub_query_expr */ - YYSYMBOL_rel_attr = 114, /* rel_attr */ - YYSYMBOL_relation = 115, /* relation */ - YYSYMBOL_rel_list = 116, /* rel_list */ - YYSYMBOL_joinClauses = 117, /* joinClauses */ - YYSYMBOL_where = 118, /* where */ - YYSYMBOL_condition = 119, /* condition */ - YYSYMBOL_comp_op = 120, /* comp_op */ - YYSYMBOL_opt_order_by = 121, /* opt_order_by */ - YYSYMBOL_sort_list = 122, /* sort_list */ - YYSYMBOL_sort_unit = 123, /* sort_unit */ - YYSYMBOL_group_by = 124, /* group_by */ - YYSYMBOL_load_data_stmt = 125, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 126, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 127, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 128 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_ORDER = 11, /* ORDER */ + YYSYMBOL_TABLE = 12, /* TABLE */ + YYSYMBOL_TABLES = 13, /* TABLES */ + YYSYMBOL_INDEX = 14, /* INDEX */ + YYSYMBOL_CALC = 15, /* CALC */ + YYSYMBOL_SELECT = 16, /* SELECT */ + YYSYMBOL_DESC = 17, /* DESC */ + YYSYMBOL_SHOW = 18, /* SHOW */ + YYSYMBOL_SYNC = 19, /* SYNC */ + YYSYMBOL_INSERT = 20, /* INSERT */ + YYSYMBOL_DELETE = 21, /* DELETE */ + YYSYMBOL_UPDATE = 22, /* UPDATE */ + YYSYMBOL_LBRACE = 23, /* LBRACE */ + YYSYMBOL_RBRACE = 24, /* RBRACE */ + YYSYMBOL_COMMA = 25, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 29, /* INT_T */ + YYSYMBOL_IN = 30, /* IN */ + YYSYMBOL_STRING_T = 31, /* STRING_T */ + YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ + YYSYMBOL_DATE_T = 33, /* DATE_T */ + YYSYMBOL_TEXT_T = 34, /* TEXT_T */ + YYSYMBOL_NOT = 35, /* NOT */ + YYSYMBOL_UNIQUE = 36, /* UNIQUE */ + YYSYMBOL_NULL_T = 37, /* NULL_T */ + YYSYMBOL_NULLABLE = 38, /* NULLABLE */ + YYSYMBOL_HELP = 39, /* HELP */ + YYSYMBOL_EXIT = 40, /* EXIT */ + YYSYMBOL_DOT = 41, /* DOT */ + YYSYMBOL_INTO = 42, /* INTO */ + YYSYMBOL_VALUES = 43, /* VALUES */ + YYSYMBOL_FROM = 44, /* FROM */ + YYSYMBOL_WHERE = 45, /* WHERE */ + YYSYMBOL_AND = 46, /* AND */ + YYSYMBOL_OR = 47, /* OR */ + YYSYMBOL_SET = 48, /* SET */ + YYSYMBOL_ON = 49, /* ON */ + YYSYMBOL_LOAD = 50, /* LOAD */ + YYSYMBOL_DATA = 51, /* DATA */ + YYSYMBOL_INFILE = 52, /* INFILE */ + YYSYMBOL_EXPLAIN = 53, /* EXPLAIN */ + YYSYMBOL_STORAGE = 54, /* STORAGE */ + YYSYMBOL_FORMAT = 55, /* FORMAT */ + YYSYMBOL_INNER = 56, /* INNER */ + YYSYMBOL_JOIN = 57, /* JOIN */ + YYSYMBOL_EQ = 58, /* EQ */ + YYSYMBOL_LT = 59, /* LT */ + YYSYMBOL_GT = 60, /* GT */ + YYSYMBOL_LE = 61, /* LE */ + YYSYMBOL_GE = 62, /* GE */ + YYSYMBOL_NE = 63, /* NE */ + YYSYMBOL_LIKE = 64, /* LIKE */ + YYSYMBOL_IS = 65, /* IS */ + YYSYMBOL_NUMBER = 66, /* NUMBER */ + YYSYMBOL_FLOAT = 67, /* FLOAT */ + YYSYMBOL_ID = 68, /* ID */ + YYSYMBOL_SSS = 69, /* SSS */ + YYSYMBOL_70_ = 70, /* '+' */ + YYSYMBOL_71_ = 71, /* '-' */ + YYSYMBOL_72_ = 72, /* '*' */ + YYSYMBOL_73_ = 73, /* '/' */ + YYSYMBOL_UMINUS = 74, /* UMINUS */ + YYSYMBOL_YYACCEPT = 75, /* $accept */ + YYSYMBOL_commands = 76, /* commands */ + YYSYMBOL_command_wrapper = 77, /* command_wrapper */ + YYSYMBOL_exit_stmt = 78, /* exit_stmt */ + YYSYMBOL_help_stmt = 79, /* help_stmt */ + YYSYMBOL_sync_stmt = 80, /* sync_stmt */ + YYSYMBOL_begin_stmt = 81, /* begin_stmt */ + YYSYMBOL_commit_stmt = 82, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 83, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 84, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 85, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 86, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 87, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 88, /* create_index_stmt */ + YYSYMBOL_opt_unique = 89, /* opt_unique */ + YYSYMBOL_attr_list = 90, /* attr_list */ + YYSYMBOL_drop_index_stmt = 91, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 92, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 93, /* attr_def_list */ + YYSYMBOL_attr_def = 94, /* attr_def */ + YYSYMBOL_nullable_constraint = 95, /* nullable_constraint */ + YYSYMBOL_number = 96, /* number */ + YYSYMBOL_type = 97, /* type */ + YYSYMBOL_insert_stmt = 98, /* insert_stmt */ + YYSYMBOL_values_list = 99, /* values_list */ + YYSYMBOL_value_list = 100, /* value_list */ + YYSYMBOL_value = 101, /* value */ + YYSYMBOL_storage_format = 102, /* storage_format */ + YYSYMBOL_delete_stmt = 103, /* delete_stmt */ + YYSYMBOL_update_stmt = 104, /* update_stmt */ + YYSYMBOL_setClauses = 105, /* setClauses */ + YYSYMBOL_setClause = 106, /* setClause */ + YYSYMBOL_select_stmt = 107, /* select_stmt */ + YYSYMBOL_calc_stmt = 108, /* calc_stmt */ + YYSYMBOL_expression_list = 109, /* expression_list */ + YYSYMBOL_expression = 110, /* expression */ + YYSYMBOL_alias = 111, /* alias */ + YYSYMBOL_aggr_func_expr = 112, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 113, /* sub_query_expr */ + YYSYMBOL_rel_attr = 114, /* rel_attr */ + YYSYMBOL_relation = 115, /* relation */ + YYSYMBOL_rel_list = 116, /* rel_list */ + YYSYMBOL_joinClauses = 117, /* joinClauses */ + YYSYMBOL_where = 118, /* where */ + YYSYMBOL_condition = 119, /* condition */ + YYSYMBOL_comp_op = 120, /* comp_op */ + YYSYMBOL_opt_order_by = 121, /* opt_order_by */ + YYSYMBOL_sort_list = 122, /* sort_list */ + YYSYMBOL_sort_unit = 123, /* sort_unit */ + YYSYMBOL_group_by = 124, /* group_by */ + YYSYMBOL_load_data_stmt = 125, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 126, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 127, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 128 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; - - - #ifdef short -# undef short +#undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -293,11 +280,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -# include /* INFRINGES ON USER NAME SPACE */ -# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_STDINT_H -# endif +#include /* INFRINGES ON USER NAME SPACE */ +#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_STDINT_H +#endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -327,16 +314,15 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 +#undef UINT_LEAST8_MAX +#undef UINT_LEAST16_MAX +#define UINT_LEAST8_MAX 255 +#define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -346,8 +332,7 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -356,42 +341,38 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -# define YYPTRDIFF_T __PTRDIFF_TYPE__ -# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -# elif defined PTRDIFF_MAX -# ifndef ptrdiff_t -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYPTRDIFF_T ptrdiff_t -# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -# else -# define YYPTRDIFF_T long -# define YYPTRDIFF_MAXIMUM LONG_MAX -# endif +#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +#define YYPTRDIFF_T __PTRDIFF_TYPE__ +#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +#elif defined PTRDIFF_MAX +#ifndef ptrdiff_t +#include /* INFRINGES ON USER NAME SPACE */ +#endif +#define YYPTRDIFF_T ptrdiff_t +#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +#else +#define YYPTRDIFF_T long +#define YYPTRDIFF_MAXIMUM LONG_MAX +#endif #endif #ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned -# endif +#ifdef __SIZE_TYPE__ +#define YYSIZE_T __SIZE_TYPE__ +#elif defined size_t +#define YYSIZE_T size_t +#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YYSIZE_T size_t +#else +#define YYSIZE_T unsigned +#endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST (YYPTRDIFF_T, \ - (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ - ? YYPTRDIFF_MAXIMUM \ - : YY_CAST (YYSIZE_T, -1))) - -#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) +#define YYSIZE_MAXIMUM \ + YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -400,586 +381,2397 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif +#if defined YYENABLE_NLS && YYENABLE_NLS +#if ENABLE_NLS +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_(Msgid) dgettext("bison-runtime", Msgid) +#endif +#endif +#ifndef YY_ +#define YY_(Msgid) Msgid +#endif #endif - #ifndef YY_ATTRIBUTE_PURE -# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define YY_ATTRIBUTE_PURE -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) +#else +#define YY_ATTRIBUTE_PURE +#endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -# else -# define YY_ATTRIBUTE_UNUSED -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#else +#define YY_ATTRIBUTE_UNUSED +#endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +#if !defined lint || defined __GNUC__ +#define YY_USE(E) ((void)(E)) #else -# define YY_USE(E) /* empty */ +#define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") +#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") +#else +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +#endif +#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") #else -# define YY_INITIAL_VALUE(Value) Value +#define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +#define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -# define YY_IGNORE_USELESS_CAST_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -# define YY_IGNORE_USELESS_CAST_END \ - _Pragma ("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ +#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") +#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_END +#define YY_IGNORE_USELESS_CAST_BEGIN +#define YY_IGNORE_USELESS_CAST_END #endif - -#define YY_ASSERT(E) ((void) (0 && (E))) +#define YY_ASSERT(E) ((void)(0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif +#ifdef YYSTACK_USE_ALLOCA +#if YYSTACK_USE_ALLOCA +#ifdef __GNUC__ +#define YYSTACK_ALLOC __builtin_alloca +#elif defined __BUILTIN_VA_ARG_INCR +#include /* INFRINGES ON USER NAME SPACE */ +#elif defined _AIX +#define YYSTACK_ALLOC __alloca +#elif defined _MSC_VER +#include /* INFRINGES ON USER NAME SPACE */ +#define alloca _alloca +#else +#define YYSTACK_ALLOC alloca +#if !defined _ALLOCA_H && !defined EXIT_SUCCESS +#include /* INFRINGES ON USER NAME SPACE */ +/* Use EXIT_SUCCESS as a witness for stdlib.h. */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#endif +#endif +#endif + +#ifdef YYSTACK_ALLOC +/* Pacify GCC's 'empty if-body' warning. */ +#define YYSTACK_FREE(Ptr) \ + do { /* empty */ \ + ; \ + } while (0) +#ifndef YYSTACK_ALLOC_MAXIMUM +/* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +#endif +#else +#define YYSTACK_ALLOC YYMALLOC +#define YYSTACK_FREE YYFREE +#ifndef YYSTACK_ALLOC_MAXIMUM +#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +#endif +#if (defined __cplusplus && !defined EXIT_SUCCESS && \ + !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) +#include /* INFRINGES ON USER NAME SPACE */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef YYMALLOC +#define YYMALLOC malloc +#if !defined malloc && !defined EXIT_SUCCESS +void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#ifndef YYFREE +#define YYFREE free +#if !defined free && !defined EXIT_SUCCESS +void free(void *); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#endif #endif /* 1 */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ + defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) +#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ - + YYSIZEOF (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) +#define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +#define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF (*yyptr); \ - } \ - while (0) +#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF(*yyptr); \ + } while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif +#ifndef YYCOPY +#if defined __GNUC__ && 1 < __GNUC__ +#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) +#else +#define YYCOPY(Dst, Src, Count) \ + do { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } while (0) +#endif +#endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 71 +#define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 221 +#define YYLAST 221 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 75 +#define YYNTOKENS 75 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 54 +#define YYNNTS 54 /* YYNRULES -- Number of rules. */ -#define YYNRULES 131 +#define YYNRULES 131 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 232 +#define YYNSTATES 232 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 325 - +#define YYMAXUTOK 325 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 72, 70, 2, 71, 2, 73, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 74 -}; +static const yytype_int8 yytranslate[] = {0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 72, + 70, + 2, + 71, + 2, + 73, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 74}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = -{ - 0, 227, 227, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 252, 253, 254, 255, 259, 265, 270, 276, 282, 288, - 294, 301, 307, 315, 325, 340, 341, 345, 351, 360, - 370, 391, 402, 405, 418, 430, 457, 461, 465, 470, - 476, 480, 481, 482, 483, 484, 488, 501, 507, 514, - 520, 528, 532, 536, 542, 549, 552, 559, 571, 585, - 590, 597, 607, 636, 669, 675, 684, 687, 696, 712, - 715, 718, 721, 724, 733, 736, 741, 747, 750, 753, - 760, 763, 766, 771, 778, 785, 790, 800, 806, 816, - 833, 840, 852, 855, 861, 865, 869, 876, 877, 878, - 879, 880, 881, 882, 883, 884, 885, 886, 887, 892, - 895, 903, 908, 916, 922, 928, 938, 943, 956, 964, - 974, 975 -}; +static const yytype_int16 yyrline[] = {0, + 227, + 227, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255, + 259, + 265, + 270, + 276, + 282, + 288, + 294, + 301, + 307, + 315, + 325, + 340, + 341, + 345, + 351, + 360, + 370, + 391, + 402, + 405, + 418, + 430, + 457, + 461, + 465, + 470, + 476, + 480, + 481, + 482, + 483, + 484, + 488, + 501, + 507, + 514, + 520, + 528, + 532, + 536, + 542, + 549, + 552, + 559, + 571, + 585, + 590, + 597, + 607, + 636, + 669, + 675, + 684, + 687, + 696, + 712, + 715, + 718, + 721, + 724, + 733, + 736, + 741, + 747, + 750, + 753, + 760, + 763, + 766, + 771, + 778, + 785, + 790, + 800, + 806, + 816, + 833, + 840, + 852, + 855, + 861, + 865, + 869, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 892, + 895, + 903, + 908, + 916, + 922, + 928, + 938, + 943, + 956, + 964, + 974, + 975}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", - "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "ORDER", "TABLE", - "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", - "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", - "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", - "DATE_T", "TEXT_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", - "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", - "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", - "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", - "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", - "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", - "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", - "show_tables_stmt", "desc_table_stmt", "show_index_stmt", - "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", - "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", - "number", "type", "insert_stmt", "values_list", "value_list", "value", - "storage_format", "delete_stmt", "update_stmt", "setClauses", - "setClause", "select_stmt", "calc_stmt", "expression_list", "expression", - "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", "relation", - "rel_list", "joinClauses", "where", "condition", "comp_op", - "opt_order_by", "sort_list", "sort_unit", "group_by", "load_data_stmt", - "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR -}; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} +static const char *const yytname[] = {"\"end of file\"", + "error", + "\"invalid token\"", + "SEMICOLON", + "AS", + "ASC", + "BY", + "CREATE", + "DROP", + "EXISTS", + "GROUP", + "ORDER", + "TABLE", + "TABLES", + "INDEX", + "CALC", + "SELECT", + "DESC", + "SHOW", + "SYNC", + "INSERT", + "DELETE", + "UPDATE", + "LBRACE", + "RBRACE", + "COMMA", + "TRX_BEGIN", + "TRX_COMMIT", + "TRX_ROLLBACK", + "INT_T", + "IN", + "STRING_T", + "FLOAT_T", + "DATE_T", + "TEXT_T", + "NOT", + "UNIQUE", + "NULL_T", + "NULLABLE", + "HELP", + "EXIT", + "DOT", + "INTO", + "VALUES", + "FROM", + "WHERE", + "AND", + "OR", + "SET", + "ON", + "LOAD", + "DATA", + "INFILE", + "EXPLAIN", + "STORAGE", + "FORMAT", + "INNER", + "JOIN", + "EQ", + "LT", + "GT", + "LE", + "GE", + "NE", + "LIKE", + "IS", + "NUMBER", + "FLOAT", + "ID", + "SSS", + "'+'", + "'-'", + "'*'", + "'/'", + "UMINUS", + "$accept", + "commands", + "command_wrapper", + "exit_stmt", + "help_stmt", + "sync_stmt", + "begin_stmt", + "commit_stmt", + "rollback_stmt", + "drop_table_stmt", + "show_tables_stmt", + "desc_table_stmt", + "show_index_stmt", + "create_index_stmt", + "opt_unique", + "attr_list", + "drop_index_stmt", + "create_table_stmt", + "attr_def_list", + "attr_def", + "nullable_constraint", + "number", + "type", + "insert_stmt", + "values_list", + "value_list", + "value", + "storage_format", + "delete_stmt", + "update_stmt", + "setClauses", + "setClause", + "select_stmt", + "calc_stmt", + "expression_list", + "expression", + "alias", + "aggr_func_expr", + "sub_query_expr", + "rel_attr", + "relation", + "rel_list", + "joinClauses", + "where", + "condition", + "comp_op", + "opt_order_by", + "sort_list", + "sort_unit", + "group_by", + "load_data_stmt", + "explain_stmt", + "set_variable_stmt", + "opt_semicolon", + YY_NULLPTR}; + +static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif #define YYPACT_NINF (-158) -#define yypact_value_is_default(Yyn) \ - ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) \ - 0 +#define yytable_value_is_error(Yyn) 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 106, -5, 46, 39, 39, -51, 50, -158, -21, -20, - -38, -158, -158, -158, -158, -158, -25, 2, 106, 51, - 43, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -7, -158, 52, 19, 24, 22, -158, -158, - -158, -4, -158, 39, -158, -158, -158, -1, -158, -158, - -158, 41, -158, -158, 54, 44, 61, 72, 73, 78, - -158, -158, -158, -158, 16, 75, -158, 95, 39, 123, - 124, 39, 81, -158, 82, -158, 39, 39, 39, 39, - 126, 84, 84, 114, 113, 92, -19, 93, 145, 103, - 130, 104, 41, -158, -158, 149, -158, -158, 11, 11, - -158, -158, 39, -158, 0, 113, -158, 157, 39, -158, - 125, -16, -158, -158, 139, -158, 68, 159, 118, -158, - -158, -158, 128, 162, -158, -19, 163, 105, 57, 39, - 92, -158, 170, -158, -158, -158, -158, -158, 17, 103, - 165, 167, 84, 84, 180, 94, -158, 169, -158, -22, - -158, -158, -158, -158, -158, -158, -158, 158, 39, 39, - 39, 66, -158, 127, 131, 161, -158, -158, -158, 159, - 140, 132, 147, 113, 6, -158, 193, -158, -158, -19, - -19, -158, -158, -158, 66, -158, 155, -158, -158, 178, - -158, -158, 148, -158, 179, 181, 39, -158, 39, -158, - 117, -10, 150, 132, -158, -24, -158, 9, -158, 182, - -158, -158, 138, -158, 152, -158, -158, 39, -158, 84, - -158, -158 -}; +static const yytype_int16 yypact[] = {106, + -5, + 46, + 39, + 39, + -51, + 50, + -158, + -21, + -20, + -38, + -158, + -158, + -158, + -158, + -158, + -25, + 2, + 106, + 51, + 43, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -7, + -158, + 52, + 19, + 24, + 22, + -158, + -158, + -158, + -4, + -158, + 39, + -158, + -158, + -158, + -1, + -158, + -158, + -158, + 41, + -158, + -158, + 54, + 44, + 61, + 72, + 73, + 78, + -158, + -158, + -158, + -158, + 16, + 75, + -158, + 95, + 39, + 123, + 124, + 39, + 81, + -158, + 82, + -158, + 39, + 39, + 39, + 39, + 126, + 84, + 84, + 114, + 113, + 92, + -19, + 93, + 145, + 103, + 130, + 104, + 41, + -158, + -158, + 149, + -158, + -158, + 11, + 11, + -158, + -158, + 39, + -158, + 0, + 113, + -158, + 157, + 39, + -158, + 125, + -16, + -158, + -158, + 139, + -158, + 68, + 159, + 118, + -158, + -158, + -158, + 128, + 162, + -158, + -19, + 163, + 105, + 57, + 39, + 92, + -158, + 170, + -158, + -158, + -158, + -158, + -158, + 17, + 103, + 165, + 167, + 84, + 84, + 180, + 94, + -158, + 169, + -158, + -22, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + 158, + 39, + 39, + 39, + 66, + -158, + 127, + 131, + 161, + -158, + -158, + -158, + 159, + 140, + 132, + 147, + 113, + 6, + -158, + 193, + -158, + -158, + -19, + -19, + -158, + -158, + -158, + 66, + -158, + 155, + -158, + -158, + 178, + -158, + -158, + 148, + -158, + 179, + 181, + 39, + -158, + 39, + -158, + 117, + -10, + 150, + 132, + -158, + -24, + -158, + 9, + -158, + 182, + -158, + -158, + 138, + -158, + 152, + -158, + -158, + 39, + -158, + 84, + -158, + -158}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 36, 0, 76, 76, 0, 0, 26, 0, 0, - 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 130, 23, 22, 15, 16, 17, 18, 9, 10, 11, - 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 35, 0, 0, 0, 76, 64, 61, - 62, 95, 63, 0, 87, 85, 74, 90, 88, 89, - 86, 75, 32, 31, 0, 0, 0, 0, 0, 0, - 128, 1, 131, 2, 0, 0, 30, 0, 76, 0, - 0, 76, 0, 84, 0, 91, 0, 0, 0, 0, - 77, 0, 0, 0, 102, 0, 0, 0, 0, 0, - 0, 0, 0, 94, 83, 0, 96, 92, 79, 80, - 81, 82, 76, 97, 90, 102, 33, 0, 0, 67, - 0, 102, 69, 129, 0, 41, 0, 42, 0, 39, - 93, 78, 0, 98, 126, 0, 56, 0, 103, 0, - 0, 68, 0, 51, 52, 53, 54, 55, 49, 0, - 0, 0, 0, 0, 119, 0, 59, 0, 117, 0, - 107, 108, 109, 110, 111, 112, 115, 113, 0, 0, - 0, 71, 70, 0, 0, 0, 48, 47, 45, 42, - 65, 0, 0, 102, 90, 99, 0, 72, 57, 0, - 0, 118, 116, 114, 104, 105, 106, 127, 50, 0, - 46, 43, 0, 40, 37, 0, 0, 126, 0, 60, - 0, 49, 0, 0, 34, 100, 73, 123, 120, 121, - 58, 44, 0, 38, 0, 125, 124, 0, 66, 0, - 122, 101 -}; +static const yytype_uint8 yydefact[] = {0, + 36, + 0, + 76, + 76, + 0, + 0, + 26, + 0, + 0, + 0, + 27, + 28, + 29, + 25, + 24, + 0, + 0, + 0, + 0, + 130, + 23, + 22, + 15, + 16, + 17, + 18, + 9, + 10, + 11, + 14, + 12, + 13, + 8, + 5, + 7, + 6, + 4, + 3, + 19, + 20, + 21, + 0, + 35, + 0, + 0, + 0, + 76, + 64, + 61, + 62, + 95, + 63, + 0, + 87, + 85, + 74, + 90, + 88, + 89, + 86, + 75, + 32, + 31, + 0, + 0, + 0, + 0, + 0, + 0, + 128, + 1, + 131, + 2, + 0, + 0, + 30, + 0, + 76, + 0, + 0, + 76, + 0, + 84, + 0, + 91, + 0, + 0, + 0, + 0, + 77, + 0, + 0, + 0, + 102, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 94, + 83, + 0, + 96, + 92, + 79, + 80, + 81, + 82, + 76, + 97, + 90, + 102, + 33, + 0, + 0, + 67, + 0, + 102, + 69, + 129, + 0, + 41, + 0, + 42, + 0, + 39, + 93, + 78, + 0, + 98, + 126, + 0, + 56, + 0, + 103, + 0, + 0, + 68, + 0, + 51, + 52, + 53, + 54, + 55, + 49, + 0, + 0, + 0, + 0, + 0, + 119, + 0, + 59, + 0, + 117, + 0, + 107, + 108, + 109, + 110, + 111, + 112, + 115, + 113, + 0, + 0, + 0, + 71, + 70, + 0, + 0, + 0, + 48, + 47, + 45, + 42, + 65, + 0, + 0, + 102, + 90, + 99, + 0, + 72, + 57, + 0, + 0, + 118, + 116, + 114, + 104, + 105, + 106, + 127, + 50, + 0, + 46, + 43, + 0, + 40, + 37, + 0, + 0, + 126, + 0, + 60, + 0, + 49, + 0, + 0, + 34, + 100, + 73, + 123, + 120, + 121, + 58, + 44, + 0, + 38, + 0, + 125, + 124, + 0, + 66, + 0, + 122, + 101}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -158, -158, 192, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -2, -158, -158, 33, 64, - 3, -158, -158, -158, -158, 25, -94, -158, -158, -158, - -158, 76, -41, -158, -3, -53, 160, -158, -158, -158, - -76, 65, -9, -110, -157, -158, -158, -8, -158, 14, - -158, -158, -158, -158 -}; +static const yytype_int16 yypgoto[] = {-158, + -158, + 192, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -158, + -2, + -158, + -158, + 33, + 64, + 3, + -158, + -158, + -158, + -158, + 25, + -94, + -158, + -158, + -158, + -158, + 76, + -41, + -158, + -3, + -53, + 160, + -158, + -158, + -158, + -76, + 65, + -9, + -110, + -157, + -158, + -158, + -8, + -158, + 14, + -158, + -158, + -158, + -158}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = -{ - 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 205, 32, 33, 150, 127, - 178, 199, 148, 34, 136, 155, 55, 203, 35, 36, - 121, 122, 37, 38, 56, 57, 133, 58, 59, 60, - 182, 115, 183, 119, 138, 168, 187, 218, 219, 154, - 39, 40, 41, 73 -}; +static const yytype_uint8 yydefgoto[] = {0, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 44, + 205, + 32, + 33, + 150, + 127, + 178, + 199, + 148, + 34, + 136, + 155, + 55, + 203, + 35, + 36, + 121, + 122, + 37, + 38, + 56, + 57, + 133, + 58, + 59, + 60, + 182, + 115, + 183, + 119, + 138, + 168, + 187, + 218, + 219, + 154, + 39, + 40, + 41, + 73}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = -{ - 83, 61, 123, 84, 84, 134, 79, 42, 191, 140, - 84, 141, 195, 196, 225, 114, 116, 62, 48, 81, - 98, 65, 169, 170, 66, 175, 226, 176, 177, 118, - 67, 43, 224, 108, 109, 110, 111, 82, 78, 99, - 174, 156, 192, 68, 80, 47, 72, 49, 50, 215, - 52, 71, 175, 69, 176, 177, 132, 125, 45, 48, - 46, 74, 47, 63, 64, 137, 75, 85, 85, 86, - 87, 88, 89, 207, 85, 102, 48, 184, 105, 86, - 87, 88, 89, 88, 89, 91, 171, 76, 49, 50, - 51, 52, 77, 53, 54, 209, 156, 143, 92, 144, - 145, 146, 147, 169, 170, 49, 50, 51, 52, 131, - 53, 54, 93, 1, 2, 194, 137, 137, 188, 189, - 95, 3, 4, 5, 6, 7, 8, 9, 10, 94, - 97, 96, 11, 12, 13, 158, 86, 87, 88, 89, - 159, 220, 189, 100, 101, 14, 15, 103, 104, 106, - 107, 112, 113, 137, 16, 217, 17, 117, 118, 18, - 120, 78, 124, 160, 161, 162, 163, 164, 165, 166, - 167, 126, 129, 130, 217, 86, 87, 88, 89, 128, - 135, 142, 173, 139, 149, 152, 151, 153, 157, 180, - 181, 186, 190, 193, 202, 197, 206, 198, 200, 208, - 204, 169, 211, 212, 213, 214, 228, 227, 222, 229, - 70, 223, 201, 179, 221, 210, 172, 90, 185, 230, - 231, 216 -}; - -static const yytype_uint8 yycheck[] = -{ - 53, 4, 96, 4, 4, 115, 47, 12, 30, 25, - 4, 121, 169, 170, 5, 91, 92, 68, 37, 23, - 4, 42, 46, 47, 44, 35, 17, 37, 38, 45, - 68, 36, 56, 86, 87, 88, 89, 41, 16, 23, - 23, 135, 64, 68, 47, 23, 3, 66, 67, 206, - 69, 0, 35, 51, 37, 38, 56, 98, 12, 37, - 14, 68, 23, 13, 14, 118, 14, 68, 68, 70, - 71, 72, 73, 183, 68, 78, 37, 153, 81, 70, - 71, 72, 73, 72, 73, 44, 139, 68, 66, 67, - 68, 69, 68, 71, 72, 189, 190, 29, 44, 31, - 32, 33, 34, 46, 47, 66, 67, 68, 69, 112, - 71, 72, 68, 7, 8, 168, 169, 170, 24, 25, - 48, 15, 16, 17, 18, 19, 20, 21, 22, 68, - 52, 58, 26, 27, 28, 30, 70, 71, 72, 73, - 35, 24, 25, 68, 49, 39, 40, 24, 24, 68, - 68, 25, 68, 206, 48, 208, 50, 43, 45, 53, - 68, 16, 69, 58, 59, 60, 61, 62, 63, 64, - 65, 68, 68, 24, 227, 70, 71, 72, 73, 49, - 23, 42, 12, 58, 25, 57, 68, 25, 25, 24, - 23, 11, 23, 35, 54, 68, 49, 66, 37, 6, - 68, 46, 24, 55, 25, 24, 68, 25, 58, 57, - 18, 213, 179, 149, 211, 190, 140, 57, 153, 227, - 229, 207 -}; +static const yytype_uint8 yytable[] = {83, + 61, + 123, + 84, + 84, + 134, + 79, + 42, + 191, + 140, + 84, + 141, + 195, + 196, + 225, + 114, + 116, + 62, + 48, + 81, + 98, + 65, + 169, + 170, + 66, + 175, + 226, + 176, + 177, + 118, + 67, + 43, + 224, + 108, + 109, + 110, + 111, + 82, + 78, + 99, + 174, + 156, + 192, + 68, + 80, + 47, + 72, + 49, + 50, + 215, + 52, + 71, + 175, + 69, + 176, + 177, + 132, + 125, + 45, + 48, + 46, + 74, + 47, + 63, + 64, + 137, + 75, + 85, + 85, + 86, + 87, + 88, + 89, + 207, + 85, + 102, + 48, + 184, + 105, + 86, + 87, + 88, + 89, + 88, + 89, + 91, + 171, + 76, + 49, + 50, + 51, + 52, + 77, + 53, + 54, + 209, + 156, + 143, + 92, + 144, + 145, + 146, + 147, + 169, + 170, + 49, + 50, + 51, + 52, + 131, + 53, + 54, + 93, + 1, + 2, + 194, + 137, + 137, + 188, + 189, + 95, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 94, + 97, + 96, + 11, + 12, + 13, + 158, + 86, + 87, + 88, + 89, + 159, + 220, + 189, + 100, + 101, + 14, + 15, + 103, + 104, + 106, + 107, + 112, + 113, + 137, + 16, + 217, + 17, + 117, + 118, + 18, + 120, + 78, + 124, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 126, + 129, + 130, + 217, + 86, + 87, + 88, + 89, + 128, + 135, + 142, + 173, + 139, + 149, + 152, + 151, + 153, + 157, + 180, + 181, + 186, + 190, + 193, + 202, + 197, + 206, + 198, + 200, + 208, + 204, + 169, + 211, + 212, + 213, + 214, + 228, + 227, + 222, + 229, + 70, + 223, + 201, + 179, + 221, + 210, + 172, + 90, + 185, + 230, + 231, + 216}; + +static const yytype_uint8 yycheck[] = {53, + 4, + 96, + 4, + 4, + 115, + 47, + 12, + 30, + 25, + 4, + 121, + 169, + 170, + 5, + 91, + 92, + 68, + 37, + 23, + 4, + 42, + 46, + 47, + 44, + 35, + 17, + 37, + 38, + 45, + 68, + 36, + 56, + 86, + 87, + 88, + 89, + 41, + 16, + 23, + 23, + 135, + 64, + 68, + 47, + 23, + 3, + 66, + 67, + 206, + 69, + 0, + 35, + 51, + 37, + 38, + 56, + 98, + 12, + 37, + 14, + 68, + 23, + 13, + 14, + 118, + 14, + 68, + 68, + 70, + 71, + 72, + 73, + 183, + 68, + 78, + 37, + 153, + 81, + 70, + 71, + 72, + 73, + 72, + 73, + 44, + 139, + 68, + 66, + 67, + 68, + 69, + 68, + 71, + 72, + 189, + 190, + 29, + 44, + 31, + 32, + 33, + 34, + 46, + 47, + 66, + 67, + 68, + 69, + 112, + 71, + 72, + 68, + 7, + 8, + 168, + 169, + 170, + 24, + 25, + 48, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 68, + 52, + 58, + 26, + 27, + 28, + 30, + 70, + 71, + 72, + 73, + 35, + 24, + 25, + 68, + 49, + 39, + 40, + 24, + 24, + 68, + 68, + 25, + 68, + 206, + 48, + 208, + 50, + 43, + 45, + 53, + 68, + 16, + 69, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 68, + 68, + 24, + 227, + 70, + 71, + 72, + 73, + 49, + 23, + 42, + 12, + 58, + 25, + 57, + 68, + 25, + 25, + 24, + 23, + 11, + 23, + 35, + 54, + 68, + 49, + 66, + 37, + 6, + 68, + 46, + 24, + 55, + 25, + 24, + 68, + 25, + 58, + 57, + 18, + 213, + 179, + 149, + 211, + 190, + 140, + 57, + 153, + 227, + 229, + 207}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 7, 8, 15, 16, 17, 18, 19, 20, 21, - 22, 26, 27, 28, 39, 40, 48, 50, 53, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 91, 92, 98, 103, 104, 107, 108, 125, - 126, 127, 12, 36, 89, 12, 14, 23, 37, 66, - 67, 68, 69, 71, 72, 101, 109, 110, 112, 113, - 114, 109, 68, 13, 14, 42, 44, 68, 68, 51, - 77, 0, 3, 128, 68, 14, 68, 68, 16, 107, - 109, 23, 41, 110, 4, 68, 70, 71, 72, 73, - 111, 44, 44, 68, 68, 48, 58, 52, 4, 23, - 68, 49, 109, 24, 24, 109, 68, 68, 110, 110, - 110, 110, 25, 68, 115, 116, 115, 43, 45, 118, - 68, 105, 106, 101, 69, 107, 68, 94, 49, 68, - 24, 109, 56, 111, 118, 23, 99, 110, 119, 58, - 25, 118, 42, 29, 31, 32, 33, 34, 97, 25, - 93, 68, 57, 25, 124, 100, 101, 25, 30, 35, - 58, 59, 60, 61, 62, 63, 64, 65, 120, 46, - 47, 110, 106, 12, 23, 35, 37, 38, 95, 94, - 24, 23, 115, 117, 115, 116, 11, 121, 24, 25, - 23, 30, 64, 35, 110, 119, 119, 68, 66, 96, - 37, 93, 54, 102, 68, 90, 49, 118, 6, 101, - 100, 24, 55, 25, 24, 119, 124, 110, 122, 123, - 24, 95, 58, 90, 56, 5, 17, 25, 68, 57, - 122, 117 -}; +static const yytype_uint8 yystos[] = {0, + 7, + 8, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 26, + 27, + 28, + 39, + 40, + 48, + 50, + 53, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 91, + 92, + 98, + 103, + 104, + 107, + 108, + 125, + 126, + 127, + 12, + 36, + 89, + 12, + 14, + 23, + 37, + 66, + 67, + 68, + 69, + 71, + 72, + 101, + 109, + 110, + 112, + 113, + 114, + 109, + 68, + 13, + 14, + 42, + 44, + 68, + 68, + 51, + 77, + 0, + 3, + 128, + 68, + 14, + 68, + 68, + 16, + 107, + 109, + 23, + 41, + 110, + 4, + 68, + 70, + 71, + 72, + 73, + 111, + 44, + 44, + 68, + 68, + 48, + 58, + 52, + 4, + 23, + 68, + 49, + 109, + 24, + 24, + 109, + 68, + 68, + 110, + 110, + 110, + 110, + 25, + 68, + 115, + 116, + 115, + 43, + 45, + 118, + 68, + 105, + 106, + 101, + 69, + 107, + 68, + 94, + 49, + 68, + 24, + 109, + 56, + 111, + 118, + 23, + 99, + 110, + 119, + 58, + 25, + 118, + 42, + 29, + 31, + 32, + 33, + 34, + 97, + 25, + 93, + 68, + 57, + 25, + 124, + 100, + 101, + 25, + 30, + 35, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 120, + 46, + 47, + 110, + 106, + 12, + 23, + 35, + 37, + 38, + 95, + 94, + 24, + 23, + 115, + 117, + 115, + 116, + 11, + 121, + 24, + 25, + 23, + 30, + 64, + 35, + 110, + 119, + 119, + 68, + 66, + 96, + 37, + 93, + 54, + 102, + 68, + 90, + 49, + 118, + 6, + 101, + 100, + 24, + 55, + 25, + 24, + 119, + 124, + 110, + 122, + 123, + 24, + 95, + 58, + 90, + 56, + 5, + 17, + 25, + 68, + 57, + 122, + 117}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = -{ - 0, 75, 76, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 89, 90, 90, 91, - 92, 92, 93, 93, 94, 94, 95, 95, 95, 95, - 96, 97, 97, 97, 97, 97, 98, 99, 99, 100, - 100, 101, 101, 101, 101, 102, 102, 103, 104, 105, - 105, 106, 107, 107, 108, 108, 109, 109, 109, 110, - 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 111, 111, 111, 112, 113, 114, 114, 115, 116, 116, - 117, 117, 118, 118, 119, 119, 119, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, 120, 121, - 121, 122, 122, 123, 123, 123, 124, 125, 126, 127, - 128, 128 -}; +static const yytype_uint8 yyr1[] = {0, + 75, + 76, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 89, + 90, + 90, + 91, + 92, + 92, + 93, + 93, + 94, + 94, + 95, + 95, + 95, + 95, + 96, + 97, + 97, + 97, + 97, + 97, + 98, + 99, + 99, + 100, + 100, + 101, + 101, + 101, + 101, + 102, + 102, + 103, + 104, + 105, + 105, + 106, + 107, + 107, + 108, + 108, + 109, + 109, + 109, + 110, + 110, + 110, + 110, + 110, + 110, + 110, + 110, + 110, + 110, + 110, + 111, + 111, + 111, + 112, + 113, + 114, + 114, + 115, + 116, + 116, + 117, + 117, + 118, + 118, + 119, + 119, + 119, + 120, + 120, + 120, + 120, + 120, + 120, + 120, + 120, + 120, + 120, + 120, + 120, + 121, + 121, + 122, + 122, + 123, + 123, + 123, + 124, + 125, + 126, + 127, + 128, + 128}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = +static const yytype_int8 yyr2[] = {0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 2, + 2, + 4, + 9, + 1, + 0, + 1, + 3, + 5, + 8, + 5, + 0, + 3, + 6, + 3, + 2, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 5, + 3, + 5, + 1, + 3, + 1, + 1, + 1, + 1, + 0, + 4, + 4, + 5, + 1, + 3, + 3, + 7, + 9, + 2, + 2, + 0, + 2, + 4, + 3, + 3, + 3, + 3, + 3, + 2, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 2, + 4, + 3, + 1, + 3, + 1, + 2, + 4, + 3, + 6, + 0, + 2, + 3, + 3, + 3, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 2, + 1, + 2, + 0, + 3, + 1, + 3, + 1, + 2, + 2, + 0, + 7, + 2, + 4, + 0, + 1}; + +enum { - 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, - 8, 5, 0, 3, 6, 3, 2, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 5, 3, 5, 1, - 3, 1, 1, 1, 1, 0, 4, 4, 5, 1, - 3, 3, 7, 9, 2, 2, 0, 2, 4, 3, - 3, 3, 3, 3, 2, 1, 1, 1, 1, 1, - 0, 1, 2, 4, 3, 1, 3, 1, 2, 4, - 3, 6, 0, 2, 3, 3, 3, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 2, 1, 2, 0, - 3, 1, 3, 1, 2, 2, 0, 7, 2, 4, - 0, 1 + YYENOMEM = -2 }; - -enum { YYENOMEM = -2 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK(yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } else { \ + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -991,151 +2783,131 @@ enum { YYENOMEM = -2 }; the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) +#define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) { \ + (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ + } else { \ + (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) - /* Enable debugging if requested. */ #if YYDEBUG -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +#ifndef YYFPRINTF +#include /* INFRINGES ON USER NAME SPACE */ +#define YYFPRINTF fprintf +#endif +#define YYDPRINTF(Args) \ + do { \ + if (yydebug) \ + YYFPRINTF Args; \ + } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YYLOCATION_PRINT +#ifndef YYLOCATION_PRINT -# if defined YY_LOCATION_PRINT +#if defined YY_LOCATION_PRINT - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) { + res += YYFPRINTF(yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF(yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) { + if (yylocp->first_line < yylocp->last_line) { + res += YYFPRINTF(yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF(yyo, ".%d", end_col); + } else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF(yyo, "-%d", end_col); + } return res; } -# define YYLOCATION_PRINT yy_location_print_ - - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) - -# else +#define YYLOCATION_PRINT yy_location_print_ -# define YYLOCATION_PRINT(File, Loc) ((void) 0) - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT YYLOCATION_PRINT +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -# endif -# endif /* !defined YYLOCATION_PRINT */ +#else +#define YYLOCATION_PRINT(File, Loc) ((void)0) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT YYLOCATION_PRINT -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +#endif +#endif /* !defined YYLOCATION_PRINT */ +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ + do { \ + if (yydebug) { \ + YYFPRINTF(stderr, "%s ", Title); \ + yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF(stderr, "\n"); \ + } \ + } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyoutput); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); - YYLOCATION_PRINT (yyo, yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF (yyo, ")"); + YYLOCATION_PRINT(yyo, yylocationp); + YYFPRINTF(yyo, ": "); + yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF(yyo, ")"); } /*------------------------------------------------------------------. @@ -1143,70 +2915,66 @@ yy_symbol_print (FILE *yyo, | TOP (included). | `------------------------------------------------------------------*/ -static void -yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); + YYFPRINTF(stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) { + int yybot = *yybottom; + YYFPRINTF(stderr, " %d", yybot); + } + YYFPRINTF(stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - +#define YY_STACK_PRINT(Bottom, Top) \ + do { \ + if (yydebug) \ + yy_stack_print((Bottom), (Top)); \ + } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, + ParsedSqlResult *sql_result, void *scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", - yyrule - 1, yylno); + YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); - YYFPRINTF (stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) { + YYFPRINTF(stderr, " $%d = ", yyi + 1); + yy_symbol_print(stderr, + YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), + sql_string, + sql_result, + scanner); + YYFPRINTF(stderr, "\n"); + } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ -} while (0) +#define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug) \ + yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ + } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) +#define YYDPRINTF(Args) ((void)0) +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +#define YY_STACK_PRINT(Bottom, Top) +#define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -1217,16 +2985,15 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 +#define YYMAXDEPTH 10000 #endif - /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -1235,69 +3002,59 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default(yyn)) { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } - - - #ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else +#if defined __GLIBC__ && defined _STRING_H +#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) +#else /* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) +static YYPTRDIFF_T yystrlen(const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -# endif +#endif #endif #ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +#define yystpcpy stpcpy +#else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) +static char *yystpcpy(char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -1305,7 +3062,7 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } -# endif +#endif #endif #ifndef yytnamerr @@ -1316,52 +3073,45 @@ yystpcpy (char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) +static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) { - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': + if (*yystr == '"') { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) { + case '\'': + case ',': goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes:; + } if (yyres) - return yystpcpy (yyres, yystr) - yyres; + return yystpcpy(yyres, yystr) - yyres; else - return yystrlen (yystr); + return yystrlen(yystr); } #endif - -static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -1388,19 +3138,17 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) - { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -1412,11 +3160,12 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) +static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) { - enum { YYARGS_MAX = 5 }; + enum + { + YYARGS_MAX = 5 + }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -1426,16 +3175,13 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) - { -#define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break + switch (yycount) { +#define YYCASE_(N, S) \ + case N: yyformat = S; break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1444,134 +3190,118 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; + yysize = yystrlen(yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) { + YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) { + *yymsg_alloc = 2 * yysize; + if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { + yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } else { + ++yyp; + ++yyformat; + } } return 0; } - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, + const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyvaluep); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - - - - /*----------. | yyparse. | `----------*/ -int -yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { -/* Lookahead token kind. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; + /* Lookahead token kind. */ + int yychar; + + /* The semantic value of the lookahead symbol. */ + /* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ + YY_INITIAL_VALUE(static YYSTYPE yyval_default;) + YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); + + /* Location data for the lookahead symbol. */ + static YYLTYPE yyloc_default +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = {1, 1, 1, 1} +#endif + ; + YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -1587,24 +3317,23 @@ YYLTYPE yylloc = yyloc_default; YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF ((stderr, "Starting parse\n")); + YYDPRINTF((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; - /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -1613,93 +3342,90 @@ YYLTYPE yylloc = yyloc_default; have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YYDPRINTF((stderr, "Entering state %d\n", yystate)); + YY_ASSERT(0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST (yy_state_t, yystate); + *yyssp = YY_CAST(yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else + { + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +#if defined yyoverflow { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -# if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * YYSIZEOF (*yyssp), - &yyvs1, yysize * YYSIZEOF (*yyvsp), - &yyls1, yysize * YYSIZEOF (*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow(YY_("memory exhausted"), + &yyss1, + yysize * YYSIZEOF(*yyssp), + &yyvs1, + yysize * YYSIZEOF(*yyvsp), + &yyls1, + yysize * YYSIZEOF(*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +#else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + YYNOMEM; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); + if (!yyptr) YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = - YY_CAST (union yyalloc *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); - if (! yyptr) - YYNOMEM; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif + YYSTACK_RELOCATE(yyss_alloc, yyss); + YYSTACK_RELOCATE(yyvs_alloc, yyvs); + YYSTACK_RELOCATE(yyls_alloc, yyls); +#undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE(yyss1); + } +#endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF ((stderr, "Stack size increased to %ld\n", - YY_CAST (long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; goto yybackup; - /*-----------. | yybackup. | `-----------*/ @@ -1709,40 +3435,34 @@ YYLTYPE yylloc = yyloc_default; /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yypact_value_is_default(yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token\n")); - yychar = yylex (&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) { + YYDPRINTF((stderr, "Reading a token\n")); + yychar = yylex(&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) - { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else if (yychar == YYerror) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF((stderr, "Now at end of input.\n")); + } else if (yychar == YYerror) { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } else { + yytoken = YYTRANSLATE(yychar); + YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -1750,13 +3470,12 @@ YYLTYPE yylloc = yyloc_default; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) { + if (yytable_value_is_error(yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -1764,7 +3483,7 @@ YYLTYPE yylloc = yyloc_default; yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -1775,7 +3494,6 @@ YYLTYPE yylloc = yyloc_default; yychar = YYEMPTY; goto yynewstate; - /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -1785,7 +3503,6 @@ YYLTYPE yylloc = yyloc_default; goto yyerrlab; goto yyreduce; - /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -1801,164 +3518,168 @@ YYLTYPE yylloc = yyloc_default; users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + yyval = yyvsp[1 - yylen]; /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: /* commands: command_wrapper opt_semicolon */ + YY_REDUCE_PRINT(yyn); + switch (yyn) { + case 2: /* commands: command_wrapper opt_semicolon */ #line 228 "yacc_sql.y" - { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } #line 1819 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ + case 24: /* exit_stmt: EXIT */ #line 259 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } #line 1828 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ + case 25: /* help_stmt: HELP */ #line 265 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } #line 1836 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ + case 26: /* sync_stmt: SYNC */ #line 270 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } #line 1844 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ + case 27: /* begin_stmt: TRX_BEGIN */ #line 276 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } #line 1852 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ + case 28: /* commit_stmt: TRX_COMMIT */ #line 282 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } #line 1860 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ + case 29: /* rollback_stmt: TRX_ROLLBACK */ #line 288 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } #line 1868 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ + case 30: /* drop_table_stmt: DROP TABLE ID */ #line 294 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1878 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ + case 31: /* show_tables_stmt: SHOW TABLES */ #line 301 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } #line 1886 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ + case 32: /* desc_table_stmt: DESC ID */ #line 307 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1896 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ #line 316 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1907 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ + case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ #line 326 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } #line 1923 "yacc_sql.cpp" break; - case 35: /* opt_unique: UNIQUE */ + case 35: /* opt_unique: UNIQUE */ #line 340 "yacc_sql.y" - { (yyval.unique) = true; } + { + (yyval.unique) = true; + } #line 1929 "yacc_sql.cpp" break; - case 36: /* opt_unique: %empty */ + case 36: /* opt_unique: %empty */ #line 341 "yacc_sql.y" - { (yyval.unique) = false; } + { + (yyval.unique) = false; + } #line 1935 "yacc_sql.cpp" break; - case 37: /* attr_list: ID */ + case 37: /* attr_list: ID */ #line 346 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } #line 1945 "yacc_sql.cpp" break; - case 38: /* attr_list: ID COMMA attr_list */ + case 38: /* attr_list: ID COMMA attr_list */ #line 352 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list) + ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } #line 1955 "yacc_sql.cpp" break; - case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 361 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); @@ -1966,12 +3687,12 @@ YYLTYPE yylloc = yyloc_default; #line 1967 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 371 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-5].string); + create_table.relation_name = (yyvsp[-5].string); free((yyvsp[-5].string)); std::vector *src_attrs = (yyvsp[-2].attr_infos); @@ -1991,19 +3712,19 @@ YYLTYPE yylloc = yyloc_default; #line 1992 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID AS select_stmt */ + case 41: /* create_table_stmt: CREATE TABLE ID AS select_stmt */ #line 392 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-2].string); + create_table.relation_name = (yyvsp[-2].string); free((yyvsp[-2].string)); create_table.create_table_select = std::move((yyvsp[0].sql_node)->selection); } #line 2004 "yacc_sql.cpp" break; - case 42: /* attr_def_list: %empty */ + case 42: /* attr_def_list: %empty */ #line 402 "yacc_sql.y" { (yyval.attr_infos) = nullptr; @@ -2011,7 +3732,7 @@ YYLTYPE yylloc = yyloc_default; #line 2012 "yacc_sql.cpp" break; - case 43: /* attr_def_list: COMMA attr_def attr_def_list */ + case 43: /* attr_def_list: COMMA attr_def attr_def_list */ #line 406 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -2025,13 +3746,13 @@ YYLTYPE yylloc = yyloc_default; #line 2026 "yacc_sql.cpp" break; - case 44: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ + case 44: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ #line 419 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; @@ -2041,10 +3762,10 @@ YYLTYPE yylloc = yyloc_default; #line 2042 "yacc_sql.cpp" break; - case 45: /* attr_def: ID type nullable_constraint */ + case 45: /* attr_def: ID type nullable_constraint */ #line 431 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -2069,7 +3790,7 @@ YYLTYPE yylloc = yyloc_default; #line 2070 "yacc_sql.cpp" break; - case 46: /* nullable_constraint: NOT NULL_T */ + case 46: /* nullable_constraint: NOT NULL_T */ #line 458 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false @@ -2077,7 +3798,7 @@ YYLTYPE yylloc = yyloc_default; #line 2078 "yacc_sql.cpp" break; - case 47: /* nullable_constraint: NULLABLE */ + case 47: /* nullable_constraint: NULLABLE */ #line 462 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 @@ -2085,7 +3806,7 @@ YYLTYPE yylloc = yyloc_default; #line 2086 "yacc_sql.cpp" break; - case 48: /* nullable_constraint: NULL_T */ + case 48: /* nullable_constraint: NULL_T */ #line 466 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 @@ -2093,7 +3814,7 @@ YYLTYPE yylloc = yyloc_default; #line 2094 "yacc_sql.cpp" break; - case 49: /* nullable_constraint: %empty */ + case 49: /* nullable_constraint: %empty */ #line 470 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL @@ -2101,46 +3822,58 @@ YYLTYPE yylloc = yyloc_default; #line 2102 "yacc_sql.cpp" break; - case 50: /* number: NUMBER */ + case 50: /* number: NUMBER */ #line 476 "yacc_sql.y" - {(yyval.number) = (yyvsp[0].number);} + { + (yyval.number) = (yyvsp[0].number); + } #line 2108 "yacc_sql.cpp" break; - case 51: /* type: INT_T */ + case 51: /* type: INT_T */ #line 480 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::INTS); } + { + (yyval.number) = static_cast(AttrType::INTS); + } #line 2114 "yacc_sql.cpp" break; - case 52: /* type: STRING_T */ + case 52: /* type: STRING_T */ #line 481 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::CHARS); } + { + (yyval.number) = static_cast(AttrType::CHARS); + } #line 2120 "yacc_sql.cpp" break; - case 53: /* type: FLOAT_T */ + case 53: /* type: FLOAT_T */ #line 482 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::FLOATS); } + { + (yyval.number) = static_cast(AttrType::FLOATS); + } #line 2126 "yacc_sql.cpp" break; - case 54: /* type: DATE_T */ + case 54: /* type: DATE_T */ #line 483 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::DATES); } + { + (yyval.number) = static_cast(AttrType::DATES); + } #line 2132 "yacc_sql.cpp" break; - case 55: /* type: TEXT_T */ + case 55: /* type: TEXT_T */ #line 484 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::TEXTS); } + { + (yyval.number) = static_cast(AttrType::TEXTS); + } #line 2138 "yacc_sql.cpp" break; - case 56: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 56: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 489 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -2151,7 +3884,7 @@ YYLTYPE yylloc = yyloc_default; #line 2152 "yacc_sql.cpp" break; - case 57: /* values_list: LBRACE value_list RBRACE */ + case 57: /* values_list: LBRACE value_list RBRACE */ #line 502 "yacc_sql.y" { (yyval.values_list) = new std::vector>; @@ -2161,7 +3894,7 @@ YYLTYPE yylloc = yyloc_default; #line 2162 "yacc_sql.cpp" break; - case 58: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 58: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 508 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); @@ -2170,7 +3903,7 @@ YYLTYPE yylloc = yyloc_default; #line 2171 "yacc_sql.cpp" break; - case 59: /* value_list: value */ + case 59: /* value_list: value */ #line 515 "yacc_sql.y" { (yyval.value_list) = new std::vector; @@ -2180,7 +3913,7 @@ YYLTYPE yylloc = yyloc_default; #line 2181 "yacc_sql.cpp" break; - case 60: /* value_list: value_list COMMA value */ + case 60: /* value_list: value_list COMMA value */ #line 521 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); @@ -2189,28 +3922,28 @@ YYLTYPE yylloc = yyloc_default; #line 2190 "yacc_sql.cpp" break; - case 61: /* value: NUMBER */ + case 61: /* value: NUMBER */ #line 528 "yacc_sql.y" - { + { (yyval.value) = new Value((int)(yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2199 "yacc_sql.cpp" break; - case 62: /* value: FLOAT */ + case 62: /* value: FLOAT */ #line 532 "yacc_sql.y" - { + { (yyval.value) = new Value((float)(yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2208 "yacc_sql.cpp" break; - case 63: /* value: SSS */ + case 63: /* value: SSS */ #line 536 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); + { + char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); @@ -2218,15 +3951,15 @@ YYLTYPE yylloc = yyloc_default; #line 2219 "yacc_sql.cpp" break; - case 64: /* value: NULL_T */ + case 64: /* value: NULL_T */ #line 542 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } #line 2227 "yacc_sql.cpp" break; - case 65: /* storage_format: %empty */ + case 65: /* storage_format: %empty */ #line 549 "yacc_sql.y" { (yyval.string) = nullptr; @@ -2234,7 +3967,7 @@ YYLTYPE yylloc = yyloc_default; #line 2235 "yacc_sql.cpp" break; - case 66: /* storage_format: STORAGE FORMAT EQ ID */ + case 66: /* storage_format: STORAGE FORMAT EQ ID */ #line 553 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); @@ -2242,10 +3975,10 @@ YYLTYPE yylloc = yyloc_default; #line 2243 "yacc_sql.cpp" break; - case 67: /* delete_stmt: DELETE FROM ID where */ + case 67: /* delete_stmt: DELETE FROM ID where */ #line 560 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); @@ -2255,10 +3988,10 @@ YYLTYPE yylloc = yyloc_default; #line 2256 "yacc_sql.cpp" break; - case 68: /* update_stmt: UPDATE ID SET setClauses where */ + case 68: /* update_stmt: UPDATE ID SET setClauses where */ #line 572 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -2270,7 +4003,7 @@ YYLTYPE yylloc = yyloc_default; #line 2271 "yacc_sql.cpp" break; - case 69: /* setClauses: setClause */ + case 69: /* setClauses: setClause */ #line 586 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; @@ -2279,7 +4012,7 @@ YYLTYPE yylloc = yyloc_default; #line 2280 "yacc_sql.cpp" break; - case 70: /* setClauses: setClauses COMMA setClause */ + case 70: /* setClauses: setClauses COMMA setClause */ #line 591 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); @@ -2287,18 +4020,18 @@ YYLTYPE yylloc = yyloc_default; #line 2288 "yacc_sql.cpp" break; - case 71: /* setClause: ID EQ expression */ + case 71: /* setClause: ID EQ expression */ #line 598 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } #line 2299 "yacc_sql.cpp" break; - case 72: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ + case 72: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ #line 608 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2331,7 +4064,7 @@ YYLTYPE yylloc = yyloc_default; #line 2332 "yacc_sql.cpp" break; - case 73: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ + case 73: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ #line 637 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2346,7 +4079,8 @@ YYLTYPE yylloc = yyloc_default; } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); + ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -2354,7 +4088,8 @@ YYLTYPE yylloc = yyloc_default; if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -2365,7 +4100,7 @@ YYLTYPE yylloc = yyloc_default; #line 2366 "yacc_sql.cpp" break; - case 74: /* calc_stmt: CALC expression_list */ + case 74: /* calc_stmt: CALC expression_list */ #line 670 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -2375,7 +4110,7 @@ YYLTYPE yylloc = yyloc_default; #line 2376 "yacc_sql.cpp" break; - case 75: /* calc_stmt: SELECT expression_list */ + case 75: /* calc_stmt: SELECT expression_list */ #line 676 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -2385,15 +4120,15 @@ YYLTYPE yylloc = yyloc_default; #line 2386 "yacc_sql.cpp" break; - case 76: /* expression_list: %empty */ + case 76: /* expression_list: %empty */ #line 684 "yacc_sql.y" - { + { (yyval.expression_list) = new std::vector>; } #line 2394 "yacc_sql.cpp" break; - case 77: /* expression_list: expression alias */ + case 77: /* expression_list: expression alias */ #line 688 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; @@ -2406,7 +4141,7 @@ YYLTYPE yylloc = yyloc_default; #line 2407 "yacc_sql.cpp" break; - case 78: /* expression_list: expression alias COMMA expression_list */ + case 78: /* expression_list: expression alias COMMA expression_list */ #line 697 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -2417,47 +4152,51 @@ YYLTYPE yylloc = yyloc_default; if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } #line 2424 "yacc_sql.cpp" break; - case 79: /* expression: expression '+' expression */ + case 79: /* expression: expression '+' expression */ #line 712 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2432 "yacc_sql.cpp" break; - case 80: /* expression: expression '-' expression */ + case 80: /* expression: expression '-' expression */ #line 715 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2440 "yacc_sql.cpp" break; - case 81: /* expression: expression '*' expression */ + case 81: /* expression: expression '*' expression */ #line 718 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2448 "yacc_sql.cpp" break; - case 82: /* expression: expression '/' expression */ + case 82: /* expression: expression '/' expression */ #line 721 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2456 "yacc_sql.cpp" break; - case 83: /* expression: LBRACE expression_list RBRACE */ + case 83: /* expression: LBRACE expression_list RBRACE */ #line 724 "yacc_sql.y" - { + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -2469,17 +4208,18 @@ YYLTYPE yylloc = yyloc_default; #line 2470 "yacc_sql.cpp" break; - case 84: /* expression: '-' expression */ + case 84: /* expression: '-' expression */ #line 733 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } #line 2478 "yacc_sql.cpp" break; - case 85: /* expression: value */ + case 85: /* expression: value */ #line 736 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); @@ -2487,74 +4227,74 @@ YYLTYPE yylloc = yyloc_default; #line 2488 "yacc_sql.cpp" break; - case 86: /* expression: rel_attr */ + case 86: /* expression: rel_attr */ #line 741 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } #line 2499 "yacc_sql.cpp" break; - case 87: /* expression: '*' */ + case 87: /* expression: '*' */ #line 747 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } #line 2507 "yacc_sql.cpp" break; - case 88: /* expression: aggr_func_expr */ + case 88: /* expression: aggr_func_expr */ #line 750 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } #line 2515 "yacc_sql.cpp" break; - case 89: /* expression: sub_query_expr */ + case 89: /* expression: sub_query_expr */ #line 753 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } #line 2523 "yacc_sql.cpp" break; - case 90: /* alias: %empty */ + case 90: /* alias: %empty */ #line 760 "yacc_sql.y" - { + { (yyval.string) = nullptr; } #line 2531 "yacc_sql.cpp" break; - case 91: /* alias: ID */ + case 91: /* alias: ID */ #line 763 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2539 "yacc_sql.cpp" break; - case 92: /* alias: AS ID */ + case 92: /* alias: AS ID */ #line 766 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2547 "yacc_sql.cpp" break; - case 93: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 93: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 772 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } #line 2555 "yacc_sql.cpp" break; - case 94: /* sub_query_expr: LBRACE select_stmt RBRACE */ + case 94: /* sub_query_expr: LBRACE select_stmt RBRACE */ #line 779 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); @@ -2562,20 +4302,20 @@ YYLTYPE yylloc = yyloc_default; #line 2563 "yacc_sql.cpp" break; - case 95: /* rel_attr: ID */ + case 95: /* rel_attr: ID */ #line 785 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 2573 "yacc_sql.cpp" break; - case 96: /* rel_attr: ID DOT ID */ + case 96: /* rel_attr: ID DOT ID */ #line 790 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); @@ -2584,22 +4324,22 @@ YYLTYPE yylloc = yyloc_default; #line 2585 "yacc_sql.cpp" break; - case 97: /* relation: ID */ + case 97: /* relation: ID */ #line 800 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2593 "yacc_sql.cpp" break; - case 98: /* rel_list: relation alias */ + case 98: /* rel_list: relation alias */ #line 806 "yacc_sql.y" - { + { (yyval.relation_list) = new std::vector(); - if(nullptr!=(yyvsp[0].string)){ - (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); + if (nullptr != (yyvsp[0].string)) { + (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); free((yyvsp[0].string)); - }else{ + } else { (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); @@ -2607,18 +4347,19 @@ YYLTYPE yylloc = yyloc_default; #line 2608 "yacc_sql.cpp" break; - case 99: /* rel_list: relation alias COMMA rel_list */ + case 99: /* rel_list: relation alias COMMA rel_list */ #line 816 "yacc_sql.y" - { + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if(nullptr!=(yyvsp[-2].string)){ - (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); + if (nullptr != (yyvsp[-2].string)) { + (yyval.relation_list) + ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); free((yyvsp[-2].string)); - }else{ + } else { (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); @@ -2626,7 +4367,7 @@ YYLTYPE yylloc = yyloc_default; #line 2627 "yacc_sql.cpp" break; - case 100: /* joinClauses: relation ON condition */ + case 100: /* joinClauses: relation ON condition */ #line 834 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; @@ -2637,19 +4378,20 @@ YYLTYPE yylloc = yyloc_default; #line 2638 "yacc_sql.cpp" break; - case 101: /* joinClauses: relation ON condition INNER JOIN joinClauses */ + case 101: /* joinClauses: relation ON condition INNER JOIN joinClauses */ #line 841 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } #line 2650 "yacc_sql.cpp" break; - case 102: /* where: %empty */ + case 102: /* where: %empty */ #line 852 "yacc_sql.y" { (yyval.expression) = nullptr; @@ -2657,15 +4399,15 @@ YYLTYPE yylloc = yyloc_default; #line 2658 "yacc_sql.cpp" break; - case 103: /* where: WHERE condition */ + case 103: /* where: WHERE condition */ #line 855 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + { + (yyval.expression) = (yyvsp[0].expression); } #line 2666 "yacc_sql.cpp" break; - case 104: /* condition: expression comp_op expression */ + case 104: /* condition: expression comp_op expression */ #line 862 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); @@ -2673,95 +4415,121 @@ YYLTYPE yylloc = yyloc_default; #line 2674 "yacc_sql.cpp" break; - case 105: /* condition: condition AND condition */ + case 105: /* condition: condition AND condition */ #line 866 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2682 "yacc_sql.cpp" break; - case 106: /* condition: condition OR condition */ + case 106: /* condition: condition OR condition */ #line 870 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2690 "yacc_sql.cpp" break; - case 107: /* comp_op: EQ */ + case 107: /* comp_op: EQ */ #line 876 "yacc_sql.y" - { (yyval.comp) = EQUAL_TO; } + { + (yyval.comp) = EQUAL_TO; + } #line 2696 "yacc_sql.cpp" break; - case 108: /* comp_op: LT */ + case 108: /* comp_op: LT */ #line 877 "yacc_sql.y" - { (yyval.comp) = LESS_THAN; } + { + (yyval.comp) = LESS_THAN; + } #line 2702 "yacc_sql.cpp" break; - case 109: /* comp_op: GT */ + case 109: /* comp_op: GT */ #line 878 "yacc_sql.y" - { (yyval.comp) = GREAT_THAN; } + { + (yyval.comp) = GREAT_THAN; + } #line 2708 "yacc_sql.cpp" break; - case 110: /* comp_op: LE */ + case 110: /* comp_op: LE */ #line 879 "yacc_sql.y" - { (yyval.comp) = LESS_EQUAL; } + { + (yyval.comp) = LESS_EQUAL; + } #line 2714 "yacc_sql.cpp" break; - case 111: /* comp_op: GE */ + case 111: /* comp_op: GE */ #line 880 "yacc_sql.y" - { (yyval.comp) = GREAT_EQUAL; } + { + (yyval.comp) = GREAT_EQUAL; + } #line 2720 "yacc_sql.cpp" break; - case 112: /* comp_op: NE */ + case 112: /* comp_op: NE */ #line 881 "yacc_sql.y" - { (yyval.comp) = NOT_EQUAL; } + { + (yyval.comp) = NOT_EQUAL; + } #line 2726 "yacc_sql.cpp" break; - case 113: /* comp_op: IS */ + case 113: /* comp_op: IS */ #line 882 "yacc_sql.y" - { (yyval.comp) = IS_OP; } + { + (yyval.comp) = IS_OP; + } #line 2732 "yacc_sql.cpp" break; - case 114: /* comp_op: IS NOT */ + case 114: /* comp_op: IS NOT */ #line 883 "yacc_sql.y" - { (yyval.comp) = IS_NOT_OP; } + { + (yyval.comp) = IS_NOT_OP; + } #line 2738 "yacc_sql.cpp" break; - case 115: /* comp_op: LIKE */ + case 115: /* comp_op: LIKE */ #line 884 "yacc_sql.y" - { (yyval.comp) = LIKE_OP;} + { + (yyval.comp) = LIKE_OP; + } #line 2744 "yacc_sql.cpp" break; - case 116: /* comp_op: NOT LIKE */ + case 116: /* comp_op: NOT LIKE */ #line 885 "yacc_sql.y" - {(yyval.comp) = NOT_LIKE_OP;} + { + (yyval.comp) = NOT_LIKE_OP; + } #line 2750 "yacc_sql.cpp" break; - case 117: /* comp_op: IN */ + case 117: /* comp_op: IN */ #line 886 "yacc_sql.y" - { (yyval.comp) = IN_OP; } + { + (yyval.comp) = IN_OP; + } #line 2756 "yacc_sql.cpp" break; - case 118: /* comp_op: NOT IN */ + case 118: /* comp_op: NOT IN */ #line 887 "yacc_sql.y" - { (yyval.comp) = NOT_IN_OP; } + { + (yyval.comp) = NOT_IN_OP; + } #line 2762 "yacc_sql.cpp" break; - case 119: /* opt_order_by: %empty */ + case 119: /* opt_order_by: %empty */ #line 892 "yacc_sql.y" { (yyval.orderby_list) = nullptr; @@ -2769,64 +4537,64 @@ YYLTYPE yylloc = yyloc_default; #line 2770 "yacc_sql.cpp" break; - case 120: /* opt_order_by: ORDER BY sort_list */ + case 120: /* opt_order_by: ORDER BY sort_list */ #line 896 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } #line 2779 "yacc_sql.cpp" break; - case 121: /* sort_list: sort_unit */ + case 121: /* sort_list: sort_unit */ #line 904 "yacc_sql.y" - { + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } + } #line 2788 "yacc_sql.cpp" break; - case 122: /* sort_list: sort_unit COMMA sort_list */ + case 122: /* sort_list: sort_unit COMMA sort_list */ #line 909 "yacc_sql.y" - { + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } + } #line 2797 "yacc_sql.cpp" break; - case 123: /* sort_unit: expression */ + case 123: /* sort_unit: expression */ #line 917 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2807 "yacc_sql.cpp" break; - case 124: /* sort_unit: expression DESC */ + case 124: /* sort_unit: expression DESC */ #line 923 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } + } #line 2817 "yacc_sql.cpp" break; - case 125: /* sort_unit: expression ASC */ + case 125: /* sort_unit: expression ASC */ #line 929 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2827 "yacc_sql.cpp" break; - case 126: /* group_by: %empty */ + case 126: /* group_by: %empty */ #line 938 "yacc_sql.y" { (yyval.expression_list) = nullptr; @@ -2834,33 +4602,33 @@ YYLTYPE yylloc = yyloc_default; #line 2835 "yacc_sql.cpp" break; - case 127: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ + case 127: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ #line 944 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } #line 2849 "yacc_sql.cpp" break; - case 128: /* explain_stmt: EXPLAIN command_wrapper */ + case 128: /* explain_stmt: EXPLAIN command_wrapper */ #line 957 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } #line 2858 "yacc_sql.cpp" break; - case 129: /* set_variable_stmt: SET ID EQ value */ + case 129: /* set_variable_stmt: SET ID EQ value */ #line 965 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); @@ -2869,11 +4637,10 @@ YYLTYPE yylloc = yyloc_default; #line 2870 "yacc_sql.cpp" break; - #line 2874 "yacc_sql.cpp" - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -2885,9 +4652,9 @@ YYLTYPE yylloc = yyloc_default; case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; *++yyvsp = yyval; @@ -2898,84 +4665,67 @@ YYLTYPE yylloc = yyloc_default; number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp - ? yytable[yyi] - : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; - /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) - { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } - } - yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; + if (!yyerrstatus) { + ++yynerrs; + { + yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) { + if (yymsg != yymsgbuf) + YYSTACK_FREE(yymsg); + yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); + if (yymsg) { + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } else { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } } + yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } + } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; - } + if (yychar <= YYEOF) { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else { + yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; } + } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; - /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -2988,45 +4738,40 @@ YYLTYPE yylloc = yyloc_default; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); yystate = *yyssp; goto yyerrlab1; - /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) { + yyn = yypact[yystate]; + if (!yypact_value_is_default(yyn)) { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + yystate = *yyssp; + YY_STACK_PRINT(yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3034,15 +4779,14 @@ YYLTYPE yylloc = yyloc_default; yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; - /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -3050,7 +4794,6 @@ YYLTYPE yylloc = yyloc_default; yyresult = 0; goto yyreturnlab; - /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -3058,44 +4801,38 @@ YYLTYPE yylloc = yyloc_default; yyresult = 1; goto yyreturnlab; - /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; - /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE(yychar); + yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - } + YYPOPSTACK(yylen); + YY_STACK_PRINT(yyss, yyssp); + while (yyssp != yyss) { + yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE (yyss); + YYSTACK_FREE(yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); + YYSTACK_FREE(yymsg); return yyresult; } @@ -3104,7 +4841,8 @@ YYLTYPE yylloc = yyloc_default; //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) { +int sql_parse(const char *s, ParsedSqlResult *sql_result) +{ yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index d624214f..c6c8b3e2 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -# define YY_YY_YACC_SQL_HPP_INCLUDED +#define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -# define YYDEBUG 0 +#define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,125 +47,124 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - ORDER = 266, /* ORDER */ - TABLE = 267, /* TABLE */ - TABLES = 268, /* TABLES */ - INDEX = 269, /* INDEX */ - CALC = 270, /* CALC */ - SELECT = 271, /* SELECT */ - DESC = 272, /* DESC */ - SHOW = 273, /* SHOW */ - SYNC = 274, /* SYNC */ - INSERT = 275, /* INSERT */ - DELETE = 276, /* DELETE */ - UPDATE = 277, /* UPDATE */ - LBRACE = 278, /* LBRACE */ - RBRACE = 279, /* RBRACE */ - COMMA = 280, /* COMMA */ - TRX_BEGIN = 281, /* TRX_BEGIN */ - TRX_COMMIT = 282, /* TRX_COMMIT */ - TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ - INT_T = 284, /* INT_T */ - IN = 285, /* IN */ - STRING_T = 286, /* STRING_T */ - FLOAT_T = 287, /* FLOAT_T */ - DATE_T = 288, /* DATE_T */ - TEXT_T = 289, /* TEXT_T */ - NOT = 290, /* NOT */ - UNIQUE = 291, /* UNIQUE */ - NULL_T = 292, /* NULL_T */ - NULLABLE = 293, /* NULLABLE */ - HELP = 294, /* HELP */ - EXIT = 295, /* EXIT */ - DOT = 296, /* DOT */ - INTO = 297, /* INTO */ - VALUES = 298, /* VALUES */ - FROM = 299, /* FROM */ - WHERE = 300, /* WHERE */ - AND = 301, /* AND */ - OR = 302, /* OR */ - SET = 303, /* SET */ - ON = 304, /* ON */ - LOAD = 305, /* LOAD */ - DATA = 306, /* DATA */ - INFILE = 307, /* INFILE */ - EXPLAIN = 308, /* EXPLAIN */ - STORAGE = 309, /* STORAGE */ - FORMAT = 310, /* FORMAT */ - INNER = 311, /* INNER */ - JOIN = 312, /* JOIN */ - EQ = 313, /* EQ */ - LT = 314, /* LT */ - GT = 315, /* GT */ - LE = 316, /* LE */ - GE = 317, /* GE */ - NE = 318, /* NE */ - LIKE = 319, /* LIKE */ - IS = 320, /* IS */ - NUMBER = 321, /* NUMBER */ - FLOAT = 322, /* FLOAT */ - ID = 323, /* ID */ - SSS = 324, /* SSS */ - UMINUS = 325 /* UMINUS */ - }; - typedef enum yytokentype yytoken_kind_t; +#define YYTOKENTYPE +enum yytokentype +{ + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + ORDER = 266, /* ORDER */ + TABLE = 267, /* TABLE */ + TABLES = 268, /* TABLES */ + INDEX = 269, /* INDEX */ + CALC = 270, /* CALC */ + SELECT = 271, /* SELECT */ + DESC = 272, /* DESC */ + SHOW = 273, /* SHOW */ + SYNC = 274, /* SYNC */ + INSERT = 275, /* INSERT */ + DELETE = 276, /* DELETE */ + UPDATE = 277, /* UPDATE */ + LBRACE = 278, /* LBRACE */ + RBRACE = 279, /* RBRACE */ + COMMA = 280, /* COMMA */ + TRX_BEGIN = 281, /* TRX_BEGIN */ + TRX_COMMIT = 282, /* TRX_COMMIT */ + TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ + INT_T = 284, /* INT_T */ + IN = 285, /* IN */ + STRING_T = 286, /* STRING_T */ + FLOAT_T = 287, /* FLOAT_T */ + DATE_T = 288, /* DATE_T */ + TEXT_T = 289, /* TEXT_T */ + NOT = 290, /* NOT */ + UNIQUE = 291, /* UNIQUE */ + NULL_T = 292, /* NULL_T */ + NULLABLE = 293, /* NULLABLE */ + HELP = 294, /* HELP */ + EXIT = 295, /* EXIT */ + DOT = 296, /* DOT */ + INTO = 297, /* INTO */ + VALUES = 298, /* VALUES */ + FROM = 299, /* FROM */ + WHERE = 300, /* WHERE */ + AND = 301, /* AND */ + OR = 302, /* OR */ + SET = 303, /* SET */ + ON = 304, /* ON */ + LOAD = 305, /* LOAD */ + DATA = 306, /* DATA */ + INFILE = 307, /* INFILE */ + EXPLAIN = 308, /* EXPLAIN */ + STORAGE = 309, /* STORAGE */ + FORMAT = 310, /* FORMAT */ + INNER = 311, /* INNER */ + JOIN = 312, /* JOIN */ + EQ = 313, /* EQ */ + LT = 314, /* LT */ + GT = 315, /* GT */ + LE = 316, /* LE */ + GE = 317, /* GE */ + NE = 318, /* NE */ + LIKE = 319, /* LIKE */ + IS = 320, /* IS */ + NUMBER = 321, /* NUMBER */ + FLOAT = 322, /* FLOAT */ + ID = 323, /* ID */ + SSS = 324, /* SSS */ + UMINUS = 325 /* UMINUS */ +}; +typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 132 "yacc_sql.y" - ParsedSqlNode * sql_node; - Value * value; - enum CompOp comp; - RelAttrSqlNode * rel_attr; - std::vector * attr_infos; - AttrInfoSqlNode * attr_info; - Expression * expression; - std::vector> * expression_list; - std::vector * value_list; - std::vector> * values_list; - SetClauseSqlNode * set_clause; - std::vector * set_clauses; - JoinSqlNode * join_clauses; - std::vector * rel_attr_list; - std::vector * relation_list; - OrderBySqlNode * orderby_unit; - std::vector * orderby_list; - char * string; - int number; - float floats; - bool nullable_info; - std::vector * index_attr_list; - bool unique; + ParsedSqlNode *sql_node; + Value *value; + enum CompOp comp; + RelAttrSqlNode *rel_attr; + std::vector *attr_infos; + AttrInfoSqlNode *attr_info; + Expression *expression; + std::vector> *expression_list; + std::vector *value_list; + std::vector> *values_list; + SetClauseSqlNode *set_clause; + std::vector *set_clauses; + JoinSqlNode *join_clauses; + std::vector *rel_attr_list; + std::vector *relation_list; + OrderBySqlNode *orderby_unit; + std::vector *orderby_list; + char *string; + int number; + float floats; + bool nullable_info; + std::vector *index_attr_list; + bool unique; #line 160 "yacc_sql.hpp" - }; typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 +#define YYSTYPE_IS_TRIVIAL 1 +#define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -174,14 +173,10 @@ struct YYLTYPE int last_line; int last_column; }; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 +#define YYLTYPE_IS_DECLARED 1 +#define YYLTYPE_IS_TRIVIAL 1 #endif - - - -int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); - +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/storage/record/record_manager.cpp b/src/observer/storage/record/record_manager.cpp index 1cfa4ee8..2fb68f6a 100644 --- a/src/observer/storage/record/record_manager.cpp +++ b/src/observer/storage/record/record_manager.cpp @@ -703,7 +703,7 @@ RC RecordFileHandler::get_record(const RID &rid, Record &record) return rc; } -RC RecordFileHandler::visit_record(const RID &rid, function updater) +RC RecordFileHandler::visit_record(const RID &rid, const function &updater) { unique_ptr page_handler(RecordPageHandler::create(storage_format_)); diff --git a/src/observer/storage/record/record_manager.h b/src/observer/storage/record/record_manager.h index 35e78a23..8228464a 100644 --- a/src/observer/storage/record/record_manager.h +++ b/src/observer/storage/record/record_manager.h @@ -412,7 +412,7 @@ class RecordFileHandler RC get_record(const RID &rid, Record &record); - RC visit_record(const RID &rid, function updater); + RC visit_record(const RID &rid, const function &updater); private: /** diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 08630853..af4df841 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -15,6 +15,8 @@ See the Mulan PSL v2 for more details. */ #include #include +#include + #include "common/defs.h" #include "common/lang/string.h" #include "common/lang/span.h" @@ -237,7 +239,7 @@ RC Table::insert_record(Record &record) return rc; } -RC Table::visit_record(const RID &rid, function visitor) +RC Table::visit_record(const RID &rid, const function &visitor) { return record_handler_->visit_record(rid, visitor); } diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index af285967..2ca5a523 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -104,7 +104,7 @@ class Table * @param visitor * @return RC */ - RC visit_record(const RID &rid, function visitor); + RC visit_record(const RID &rid, const function &visitor); public: int32_t table_id() const { return table_meta_.table_id(); } diff --git a/src/observer/storage/trx/mvcc_trx.cpp b/src/observer/storage/trx/mvcc_trx.cpp index 7db72847..9c69b7d0 100644 --- a/src/observer/storage/trx/mvcc_trx.cpp +++ b/src/observer/storage/trx/mvcc_trx.cpp @@ -13,6 +13,8 @@ See the Mulan PSL v2 for more details. */ // #include "storage/trx/mvcc_trx.h" + +#include #include "storage/db/db.h" #include "storage/field/field.h" #include "storage/trx/mvcc_trx_log.h" @@ -154,7 +156,7 @@ RC MvccTrx::insert_record(Table *table, Record &record) ASSERT(rc == RC::SUCCESS, "failed to append insert record log. trx id=%d, table id=%d, rid=%s, record len=%d, rc=%s", trx_id_, table->table_id(), record.rid().to_string().c_str(), record.len(), strrc(rc)); - operations_.push_back(Operation(Operation::Type::INSERT, table, record.rid())); + operations_.emplace_back(Operation::Type::INSERT, table, record.rid()); return rc; } @@ -191,12 +193,36 @@ RC MvccTrx::delete_record(Table *table, Record &record) ASSERT(rc == RC::SUCCESS, "failed to append delete record log. trx id=%d, table id=%d, rid=%s, record len=%d, rc=%s", trx_id_, table->table_id(), record.rid().to_string().c_str(), record.len(), strrc(rc)); - operations_.push_back(Operation(Operation::Type::DELETE, table, record.rid())); + operations_.emplace_back(Operation::Type::DELETE, table, record.rid()); return RC::SUCCESS; } -RC MvccTrx::update_record(Table *table, Record &old_record, Record &new_record) { return RC::SUCCESS; } +RC MvccTrx::update_record(Table *table, Record &old_record, Record &new_record) +{ + Field begin_field; + Field end_field; + trx_fields(table, begin_field, end_field); + + // 更新的处理和插入一样,begin 设置负值,但是 end 保持不变,因为可能遇到一个老事务对旧数据的修改 + begin_field.set_int(new_record, -trx_id_); + end_field.set_int(new_record, trx_kit_.max_trx_id()); + + RC rc = table->update_record(old_record, new_record); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to insert record into table. rc=%s", strrc(rc)); + return rc; + } + + // 不实现故障恢复应该不用日志 + // rc = log_handler_.insert_record(trx_id_, table, record.rid()); + // ASSERT(rc == RC::SUCCESS, "failed to append insert record log. trx id=%d, table id=%d, rid=%s, record len=%d, + // rc=%s", + // trx_id_, table->table_id(), record.rid().to_string().c_str(), record.len(), strrc(rc)); + + operations_.emplace_back(Operation::Type::UPDATE, table, old_record.rid(), old_record, new_record); + return rc; +} RC MvccTrx::visit_record(Table *table, Record &record, ReadWriteMode mode) { @@ -292,15 +318,28 @@ RC MvccTrx::commit() RC MvccTrx::commit_with_trx_id(int32_t commit_xid) { // TODO 原子性提交BUG:这里存在一个很大的问题,不能让其他事务一次性看到当前事务更新到的数据或同时看不到 + + // 当前事务在提交时,会逐个修改之前修改过的行数据,调整版本号。 + // 这造成的问题是,在某个时刻,有些行数据的版本号已经修改了,有些还没有。那可能会存在一个事务,能够看到已经修改完成版本号的行,但是看不到未修改的行。 + // 比如事务A,插入了3条数据,在提交的时候,逐个修改版本号,某个情况下可能会存在下面的场景(假设A的事务ID是90,commit + // id是100): + // + // record begin xid end xid data + // R1 100 +∞ ... + // R2 100 +∞ ... + // R3 -90 +∞ ... + // 此时有一个新的事务,假设事务号是 110,那么它可以看到记录R1和R2,但是看不到R3,因为R3从记录状态来看,还没有提交。 + RC rc = RC::SUCCESS; started_ = false; for (const Operation &operation : operations_) { switch (operation.type()) { case Operation::Type::INSERT: { - RID rid(operation.page_num(), operation.slot_num()); + RID rid = operation.rid(); Table *table = operation.table(); - Field begin_xid_field, end_xid_field; + + Field begin_xid_field, end_xid_field; trx_fields(table, begin_xid_field, end_xid_field); auto record_updater = [this, &begin_xid_field, commit_xid](Record &record) -> bool { @@ -320,8 +359,8 @@ RC MvccTrx::commit_with_trx_id(int32_t commit_xid) } break; case Operation::Type::DELETE: { + RID rid = operation.rid(); Table *table = operation.table(); - RID rid(operation.page_num(), operation.slot_num()); Field begin_xid_field, end_xid_field; trx_fields(table, begin_xid_field, end_xid_field); @@ -341,6 +380,29 @@ RC MvccTrx::commit_with_trx_id(int32_t commit_xid) rid.to_string().c_str(), strrc(rc)); } break; + case Operation::Type::UPDATE: { + RID rid = operation.rid(); + Table *table = operation.table(); + + Field begin_xid_field, end_xid_field; + trx_fields(table, begin_xid_field, end_xid_field); + + auto record_updater = [this, &begin_xid_field, commit_xid](Record &record) -> bool { + LOG_DEBUG("before commit update record. trx id=%d, begin xid=%d, commit xid=%d, lbt=%s", + trx_id_, begin_xid_field.get_int(record), commit_xid, lbt()); + ASSERT(begin_xid_field.get_int(record) == -trx_id_, + "got an invalid record while committing. end xid=%d, this trx id=%d", + begin_xid_field.get_int(record), trx_id_); + + begin_xid_field.set_int(record, commit_xid); + return true; + }; + + rc = operation.table()->visit_record(rid, record_updater); + ASSERT(rc == RC::SUCCESS, "failed to get record while committing. rid=%s, rc=%s", + rid.to_string().c_str(), strrc(rc)); + } break; + default: { ASSERT(false, "unsupported operation. type=%d", static_cast(operation.type())); } @@ -362,11 +424,10 @@ RC MvccTrx::rollback() RC rc = RC::SUCCESS; started_ = false; - for (auto iter = operations_.rbegin(), itend = operations_.rend(); iter != itend; ++iter) { - const Operation &operation = *iter; + for (auto &operation : std::ranges::reverse_view(operations_)) { switch (operation.type()) { case Operation::Type::INSERT: { - RID rid(operation.page_num(), operation.slot_num()); + RID rid = operation.rid(); Table *table = operation.table(); // 这里也可以不删除,仅仅给数据加个标识位,等垃圾回收器来收割也行 @@ -394,8 +455,8 @@ RC MvccTrx::rollback() } break; case Operation::Type::DELETE: { + RID rid = operation.rid(); Table *table = operation.table(); - RID rid(operation.page_num(), operation.slot_num()); ASSERT(rc == RC::SUCCESS, "failed to get record while rollback. rid=%s, rc=%s", rid.to_string().c_str(), strrc(rc)); @@ -420,6 +481,35 @@ RC MvccTrx::rollback() rid.to_string().c_str(), strrc(rc)); } break; + case Operation::Type::UPDATE: { + RID rid = operation.rid(); + Table *table = operation.table(); + + if (recovering_) { + // 恢复的时候,需要额外判断下当前记录是否还是当前事务拥有。是的话才能删除记录 + Record record; + rc = table->get_record(rid, record); + if (OB_SUCC(rc)) { + Field begin_xid_field, end_xid_field; + trx_fields(table, begin_xid_field, end_xid_field); + if (begin_xid_field.get_int(record) != -trx_id_) { + continue; + } + } else if (RC::RECORD_NOT_EXIST == rc) { + continue; + } else { + LOG_WARN("failed to get record while rollback. table=%s, rid=%s, rc=%s", + table->name(), rid.to_string().c_str(), strrc(rc)); + return rc; + } + } + + // 直接用旧的记录的时间戳覆盖 + rc = table->update_record(operation.updated_record(), operation.old_record()); + ASSERT(rc == RC::SUCCESS, "failed to update record while rollback. rid=%s, rc=%s", + rid.to_string().c_str(), strrc(rc)); + } break; + default: { ASSERT(false, "unsupported operation. type=%d", static_cast(operation.type())); } diff --git a/src/observer/storage/trx/mvcc_trx.h b/src/observer/storage/trx/mvcc_trx.h index 77482fac..f2f7aae9 100644 --- a/src/observer/storage/trx/mvcc_trx.h +++ b/src/observer/storage/trx/mvcc_trx.h @@ -74,7 +74,7 @@ class MvccTrx : public Trx */ MvccTrx(MvccTrxKit &trx_kit, LogHandler &log_handler); MvccTrx(MvccTrxKit &trx_kit, LogHandler &log_handler, int32_t trx_id); // used for recover - virtual ~MvccTrx(); + ~MvccTrx() override; RC insert_record(Table *table, Record &record) override; RC delete_record(Table *table, Record &record) override; diff --git a/src/observer/storage/trx/trx.h b/src/observer/storage/trx/trx.h index a1ad65da..750841ce 100644 --- a/src/observer/storage/trx/trx.h +++ b/src/observer/storage/trx/trx.h @@ -57,23 +57,29 @@ class Operation }; public: - Operation(Type type, Table *table, const RID &rid) - : type_(type), table_(table), page_num_(rid.page_num), slot_num_(rid.slot_num) + Operation(Type type, Table *table, const RID &rid) : type_(type), table_(table), rid_(rid) {} + Operation(Type type, Table *table, const RID &rid, Record &old_record, Record &updated_record) + : type_(type), table_(table), rid_(rid), old_record_(old_record), updated_record_(updated_record) {} - Type type() const { return type_; } - int32_t table_id() const { return table_->table_id(); } - Table *table() const { return table_; } - PageNum page_num() const { return page_num_; } - SlotNum slot_num() const { return slot_num_; } + Type type() const { return type_; } + int32_t table_id() const { return table_->table_id(); } + Table *table() const { return table_; } + RID rid() const { return rid_; } + PageNum page_num() const { return rid_.page_num; } + SlotNum slot_num() const { return rid_.slot_num; } + const Record &old_record() const { return old_record_; } + const Record &updated_record() const { return updated_record_; } private: ///< 操作的哪张表。这里直接使用表其实并不准确,因为表中的索引也可能有日志 Type type_; - Table *table_ = nullptr; - PageNum page_num_; // TODO use RID instead of page num and slot num - SlotNum slot_num_; + Table *table_ = nullptr; + RID rid_; + // update + Record old_record_{}; + Record updated_record_{}; }; class OperationHasher From ba60ea43930671aea57ef964282afba1ee8f4d39 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 9 Oct 2024 21:25:29 +0800 Subject: [PATCH 179/308] =?UTF-8?q?feat:=20=E5=9C=A8SelectStmt=E4=B8=AD?= =?UTF-8?q?=E6=96=B0=E5=A2=9Eorder=5Fby=5F,=20order=5Fby=5Fis=5Fasc=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/stmt/select_stmt.cpp | 14 +++++++++++++- src/observer/sql/stmt/select_stmt.h | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 083f3b41..f8c9d8ca 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -94,6 +94,17 @@ RC SelectStmt::create( } } + vector> order_by_expressions; + std::vector order_by_is_asc_; + for (auto &expression : select_sql.order_by) { + RC rc = expression_binder.bind_expression(expression.expr, order_by_expressions); + order_by_is_asc_.push_back(expression.is_asc); + if (OB_FAIL(rc)) { + LOG_INFO("bind expression failed. rc=%s", strrc(rc)); + return rc; + } + } + // create filter statement in `where` statement FilterStmt *filter_stmt = nullptr; RC rc = FilterStmt::create(db, default_table, &table_map, select_sql.conditions, filter_stmt); @@ -109,6 +120,7 @@ RC SelectStmt::create( select_stmt->query_expressions_.swap(bound_expressions); select_stmt->filter_stmt_ = filter_stmt; select_stmt->group_by_.swap(group_by_expressions); - stmt = select_stmt; + select_stmt->order_by_.swap(order_by_expressions); + select_stmt->order_by_is_asc_.swap(order_by_is_asc_); return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/select_stmt.h b/src/observer/sql/stmt/select_stmt.h index 1c794585..379602fe 100644 --- a/src/observer/sql/stmt/select_stmt.h +++ b/src/observer/sql/stmt/select_stmt.h @@ -49,10 +49,14 @@ class SelectStmt : public Stmt std::vector> &query_expressions() { return query_expressions_; } std::vector> &group_by() { return group_by_; } + std::vector> &order_by() { return order_by_; } + std::vector &order_by_is_asc() { return order_by_is_asc_; } private: std::vector> query_expressions_; std::vector
tables_; FilterStmt *filter_stmt_ = nullptr; std::vector> group_by_; + std::vector> order_by_; + std::vector order_by_is_asc_; }; From ae1cc47c7350c96d6f108343d01c44a68fbdde3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 9 Oct 2024 14:24:53 +0000 Subject: [PATCH 180/308] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8Dali?= =?UTF-8?q?as=E4=BC=A0=E9=80=92=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/stmt/select_stmt.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 4d1f6763..ba820b37 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -44,6 +44,7 @@ RC SelectStmt::create( // collect tables in `from` statement vector
tables; unordered_map table_map = parent_table_map; + unordered_map temp_map; for (size_t i = 0; i < select_sql.relations.size(); i++) { const char *table_name = select_sql.relations[i].relation.c_str(); @@ -60,14 +61,17 @@ RC SelectStmt::create( // 建立别名 const string &table_alias = select_sql.relations[i].alias; if (!table_alias.empty()) { - const auto &success=table_map.insert({table_alias, table}); + const auto &success=temp_map.insert({table_alias, table}); if (!success.second) return RC::INVALID_ALIAS; } binder_context.add_table(table); tables.push_back(table); - table_map.insert({table_name, table}); + temp_map.insert({table_name, table}); } + //alias is all avaliable + table_map.insert(temp_map.begin(),temp_map.end()); + Table *default_table = nullptr; if (tables.size() == 1) { default_table = tables[0]; From a6bb713e1e9397e10814c2ef66edc0760bdae952 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 9 Oct 2024 22:58:27 +0800 Subject: [PATCH 181/308] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9SelectStmt?= =?UTF-8?q?=E4=B8=ADorder=5Fby=E5=AD=97=E6=AE=B5=E7=9A=84=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/stmt/select_stmt.cpp | 9 +++++++-- src/observer/sql/stmt/select_stmt.h | 6 ++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index f8c9d8ca..8e9cd470 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -105,6 +105,12 @@ RC SelectStmt::create( } } + std::vector order_by_; + order_by_.reserve(order_by_expressions.size()); + for (size_t i = 0; i < order_by_expressions.size(); i++) { + order_by_.push_back({std::move(order_by_expressions[i]), order_by_is_asc_[i]}); + } + // create filter statement in `where` statement FilterStmt *filter_stmt = nullptr; RC rc = FilterStmt::create(db, default_table, &table_map, select_sql.conditions, filter_stmt); @@ -120,7 +126,6 @@ RC SelectStmt::create( select_stmt->query_expressions_.swap(bound_expressions); select_stmt->filter_stmt_ = filter_stmt; select_stmt->group_by_.swap(group_by_expressions); - select_stmt->order_by_.swap(order_by_expressions); - select_stmt->order_by_is_asc_.swap(order_by_is_asc_); + select_stmt->order_by_.swap(order_by_); return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/select_stmt.h b/src/observer/sql/stmt/select_stmt.h index 379602fe..d1c9e11a 100644 --- a/src/observer/sql/stmt/select_stmt.h +++ b/src/observer/sql/stmt/select_stmt.h @@ -49,14 +49,12 @@ class SelectStmt : public Stmt std::vector> &query_expressions() { return query_expressions_; } std::vector> &group_by() { return group_by_; } - std::vector> &order_by() { return order_by_; } - std::vector &order_by_is_asc() { return order_by_is_asc_; } + std::vector &order_by() { return order_by_; } private: std::vector> query_expressions_; std::vector
tables_; FilterStmt *filter_stmt_ = nullptr; std::vector> group_by_; - std::vector> order_by_; - std::vector order_by_is_asc_; + std::vector order_by_; }; From 68ec2379717d0adc108e69527c643f4cc6699459 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 9 Oct 2024 23:05:06 +0800 Subject: [PATCH 182/308] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9EPhysicalOpera?= =?UTF-8?q?torType::ORDER=5FBY,=20LogicalOperatorType::ORDER=5FBY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/operator/logical_operator.h | 1 + src/observer/sql/operator/physical_operator.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/observer/sql/operator/logical_operator.h b/src/observer/sql/operator/logical_operator.h index b64c6fc6..6a89a647 100644 --- a/src/observer/sql/operator/logical_operator.h +++ b/src/observer/sql/operator/logical_operator.h @@ -42,6 +42,7 @@ enum class LogicalOperatorType UPDATE, ///< 更新,更新可能会有子查询 EXPLAIN, ///< 查看执行计划 GROUP_BY, ///< 分组 + ORDER_BY, ///< 排序 }; /** diff --git a/src/observer/sql/operator/physical_operator.h b/src/observer/sql/operator/physical_operator.h index 6d2c7d6c..36828297 100644 --- a/src/observer/sql/operator/physical_operator.h +++ b/src/observer/sql/operator/physical_operator.h @@ -55,6 +55,7 @@ enum class PhysicalOperatorType HASH_GROUP_BY, GROUP_BY_VEC, AGGREGATE_VEC, + ORDER_BY, EXPR_VEC, }; From 0c3b6cbd424297d5d79c6b76514f6ecce8018418 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 9 Oct 2024 23:12:02 +0800 Subject: [PATCH 183/308] =?UTF-8?q?=E5=88=A0=E9=99=A4order=5Funit=5Fexpr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 609cc943..9b0bf37f 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -614,9 +614,3 @@ class ListExpr : public Expression size_t cur_idx_ = 0; std::vector> exprs_; }; - -class order_unit_expr : public Expression -{ - -private: -}; \ No newline at end of file From ce3cbf0f536570e13c21dbc8ee07ac1d0d3c31ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 9 Oct 2024 15:37:53 +0000 Subject: [PATCH 184/308] =?UTF-8?q?having=E9=80=BB=E8=BE=91=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/optimizer/logical_plan_generator.cpp | 15 + src/observer/sql/parser/lex_sql.cpp | 5491 ++++++----------- src/observer/sql/parser/lex_sql.h | 251 +- src/observer/sql/parser/lex_sql.l | 1 + src/observer/sql/parser/parse_defs.h | 11 +- src/observer/sql/parser/yacc_sql.cpp | 5326 ++++++---------- src/observer/sql/parser/yacc_sql.hpp | 232 +- src/observer/sql/parser/yacc_sql.y | 24 +- src/observer/sql/stmt/select_stmt.cpp | 11 +- src/observer/sql/stmt/select_stmt.h | 2 + 10 files changed, 3833 insertions(+), 7531 deletions(-) diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index fee79b07..8be29e8c 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -147,6 +147,21 @@ RC LogicalPlanGenerator::create_plan(SelectStmt *select_stmt, unique_ptr having_predicate_oper; + + rc = create_plan(select_stmt->having_filter_stmt(), having_predicate_oper); + if (OB_FAIL(rc)) { + LOG_WARN("failed to create predicate logical plan. rc=%s", strrc(rc)); + return rc; + } + + if (having_predicate_oper) { + if (*last_oper) { + having_predicate_oper->add_child(std::move(*last_oper)); + } + last_oper = &having_predicate_oper; + } + auto project_oper = make_unique(std::move(select_stmt->query_expressions())); if (*last_oper) { project_oper->add_child(std::move(*last_oper)); diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 5777e557..9de242c1 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,4 +1,4 @@ -#line 1 "lex_sql.cpp" +#line 2 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -8,21 +8,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); -#line 25 "lex_sql.cpp" +#line 26 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -75,62 +77,61 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -154,12 +155,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -187,7 +188,7 @@ typedef void *yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin, yyscanner) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -205,7 +206,7 @@ typedef void *yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -220,85 +221,88 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -307,55 +311,59 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -static void yyensure_buffer_stack(yyscan_t yyscanner); -static void yy_load_buffer_state(yyscan_t yyscanner); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -363,2404 +371,318 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state(yyscan_t yyscanner); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); -static int yy_get_next_buffer(yyscan_t yyscanner); -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t)(yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 77 -#define YY_END_OF_BUFFER 78 +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; +#define YY_NUM_RULES 78 +#define YY_END_OF_BUFFER 79 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info -{ - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[222] = {0, - 0, - 0, - 0, - 0, - 78, - 76, - 1, - 2, - 76, - 76, - 76, - 56, - 57, - 72, - 70, - 58, - 71, - 6, - 73, - 3, - 5, - 63, - 59, - 65, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 77, - 62, - 0, - 74, - 0, - 75, - 3, - 0, - 60, - 61, - 64, - 69, - 69, - 69, - 48, - 69, - 47, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 50, - 67, - 69, - 69, - 69, - 69, - 69, - 15, - 23, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 4, - 22, - 49, - 69, - 69, - 69, - - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 33, - 69, - 69, - 69, - 66, - 69, - 69, - 69, - 69, - 29, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 69, - 19, - 34, - 69, - 69, - 42, - 36, - 69, - 9, - 11, - 69, - 7, - 69, - 69, - 69, - 20, - 69, - 8, - 69, - 69, - 69, - 69, - 25, - 55, - 68, - 41, - 39, - 69, - 69, - 69, - 16, - 69, - 17, - 69, - 37, - 69, - 69, - 69, - 69, - 30, - 69, - 69, - 69, - 69, - 69, - 35, - 69, - 45, - 14, - 69, - 54, - 69, - 69, - 46, - 69, - 69, - 69, - 12, - 69, - 69, - 69, - 21, - 31, - 10, - - 27, - 51, - 69, - 53, - 43, - 24, - 69, - 69, - 18, - 69, - 13, - 38, - 28, - 26, - 44, - 69, - 69, - 52, - 40, - 32, - 0}; - -static const YY_CHAR yy_ec[256] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 3, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 4, - 5, - 1, - 1, - 1, - 1, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 1, - 16, - 17, - 18, - 19, - 1, - 1, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 1, - 1, - 1, - 1, - 45, - 1, - 46, - 47, - 48, - 49, - - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 45, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1}; - -static const YY_CHAR yy_meta[71] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2}; - -static const flex_int16_t yy_base[227] = {0, - 0, - 0, - 0, - 0, - 601, - 602, - 602, - 602, - 582, - 594, - 592, - 602, - 602, - 602, - 602, - 602, - 582, - 602, - 602, - 58, - 602, - 56, - 602, - 578, - 57, - 61, - 62, - 63, - 64, - 83, - 65, - 69, - 91, - 76, - 580, - 117, - 108, - 97, - 103, - 120, - 134, - 146, - 137, - 112, - 602, - 602, - 589, - 602, - 587, - 602, - 73, - 577, - 602, - 602, - 602, - 0, - 576, - 152, - 147, - 161, - 575, - 151, - 171, - 157, - 173, - 163, - 178, - 177, - 184, - 188, - 181, - 191, - 195, - 183, - 241, - 567, - 205, - 206, - 211, - 185, - 212, - 566, - 224, - 215, - 237, - 226, - 243, - 234, - 250, - 238, - 255, - 272, - 260, - 239, - 565, - 564, - 563, - 270, - 286, - 267, - - 281, - 295, - 296, - 299, - 297, - 303, - 312, - 313, - 311, - 320, - 321, - 307, - 325, - 339, - 328, - 343, - 344, - 314, - 322, - 347, - 346, - 562, - 357, - 351, - 365, - 368, - 560, - 369, - 350, - 376, - 375, - 370, - 263, - 384, - 385, - 390, - 387, - 559, - 557, - 388, - 392, - 555, - 554, - 395, - 553, - 552, - 397, - 550, - 406, - 400, - 408, - 549, - 414, - 548, - 402, - 425, - 404, - 418, - 547, - 545, - 541, - 540, - 423, - 429, - 443, - 446, - 538, - 457, - 537, - 435, - 534, - 433, - 448, - 455, - 459, - 528, - 461, - 465, - 469, - 463, - 476, - 524, - 471, - 516, - 480, - 473, - 432, - 481, - 487, - 393, - 491, - 483, - 492, - 497, - 501, - 509, - 502, - 318, - 317, - 273, - - 269, - 246, - 499, - 219, - 217, - 189, - 514, - 506, - 179, - 523, - 138, - 126, - 123, - 89, - 88, - 526, - 527, - 86, - 82, - 79, - 602, - 583, - 585, - 587, - 90, - 79}; - -static const flex_int16_t yy_def[227] = {0, - 221, - 1, - 222, - 222, - 221, - 221, - 221, - 221, - 221, - 223, - 224, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 221, - 221, - 223, - 221, - 224, - 221, - 221, - 221, - 221, - 221, - 221, - 226, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 221, - 225, - 225, - 225, - 225, - 225, - - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 225, - 0, - 221, - 221, - 221, - 221, - 221}; - -static const flex_int16_t yy_nxt[673] = {0, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 35, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 52, - 56, - 51, - 53, - 54, - 56, - 56, - 56, - 56, - 56, - 56, - 62, - 66, - 56, - 60, - 52, - 67, - 51, - 63, - 58, - 56, - 57, - 74, - 56, - 59, - 64, - 56, - 56, - 65, - 68, - - 56, - 73, - 56, - 56, - 61, - 56, - 69, - 62, - 66, - 77, - 60, - 56, - 67, - 70, - 63, - 58, - 71, - 56, - 74, - 72, - 59, - 64, - 56, - 75, - 65, - 68, - 56, - 73, - 76, - 82, - 61, - 56, - 69, - 83, - 56, - 77, - 84, - 56, - 94, - 70, - 56, - 80, - 71, - 85, - 78, - 72, - 86, - 81, - 56, - 75, - 79, - 56, - 56, - 89, - 76, - 82, - 93, - 90, - 87, - 83, - 56, - 56, - 84, - 88, - 94, - 56, - 56, - 80, - 97, - 85, - 78, - 56, - 86, - 81, - 96, - 56, - 79, - 56, - 91, - 89, - 92, - 99, - 93, - 90, - 87, - 56, - 98, - 56, - 101, - 88, - 100, - 56, - 56, - 56, - 97, - 56, - 102, - 56, - 56, - 56, - - 96, - 103, - 56, - 56, - 91, - 56, - 92, - 99, - 104, - 56, - 106, - 107, - 98, - 113, - 101, - 105, - 100, - 110, - 108, - 56, - 56, - 109, - 102, - 122, - 111, - 56, - 56, - 103, - 112, - 56, - 121, - 56, - 119, - 56, - 104, - 120, - 106, - 107, - 56, - 113, - 56, - 105, - 123, - 110, - 108, - 125, - 124, - 109, - 56, - 122, - 111, - 56, - 56, - 56, - 112, - 56, - 121, - 56, - 119, - 128, - 56, - 120, - 136, - 114, - 56, - 115, - 130, - 126, - 123, - 56, - 131, - 125, - 124, - 116, - 56, - 127, - 129, - 56, - 117, - 118, - 132, - 56, - 133, - 56, - 56, - 128, - 56, - 56, - 136, - 114, - 135, - 115, - 130, - 126, - 134, - 56, - 131, - 137, - 172, - 116, - - 56, - 127, - 129, - 139, - 117, - 118, - 132, - 138, - 133, - 56, - 56, - 56, - 140, - 56, - 141, - 142, - 135, - 56, - 145, - 143, - 134, - 56, - 144, - 137, - 172, - 56, - 56, - 56, - 56, - 139, - 150, - 56, - 56, - 138, - 56, - 56, - 56, - 146, - 140, - 56, - 141, - 142, - 56, - 149, - 145, - 143, - 153, - 159, - 144, - 147, - 148, - 151, - 152, - 56, - 160, - 156, - 150, - 56, - 56, - 154, - 56, - 56, - 155, - 146, - 56, - 56, - 157, - 158, - 162, - 149, - 161, - 56, - 153, - 159, - 164, - 147, - 148, - 151, - 152, - 56, - 160, - 156, - 56, - 56, - 56, - 154, - 168, - 163, - 155, - 56, - 56, - 166, - 157, - 158, - 162, - 165, - 161, - 169, - 56, - 56, - - 164, - 56, - 56, - 173, - 56, - 170, - 56, - 56, - 171, - 56, - 167, - 56, - 168, - 163, - 56, - 177, - 56, - 166, - 56, - 176, - 56, - 165, - 56, - 169, - 174, - 181, - 175, - 183, - 56, - 173, - 178, - 170, - 56, - 179, - 171, - 180, - 167, - 56, - 182, - 56, - 187, - 177, - 189, - 56, - 185, - 176, - 56, - 56, - 184, - 56, - 174, - 181, - 175, - 183, - 188, - 186, - 178, - 56, - 194, - 179, - 56, - 180, - 56, - 191, - 182, - 190, - 187, - 192, - 189, - 56, - 185, - 56, - 195, - 56, - 184, - 56, - 193, - 56, - 197, - 56, - 188, - 186, - 198, - 56, - 194, - 56, - 196, - 56, - 200, - 191, - 56, - 190, - 201, - 192, - 56, - 56, - 205, - 56, - 195, - 199, - - 202, - 56, - 193, - 203, - 197, - 56, - 56, - 207, - 198, - 204, - 208, - 56, - 196, - 56, - 200, - 56, - 56, - 210, - 201, - 206, - 56, - 209, - 205, - 56, - 212, - 199, - 202, - 217, - 56, - 203, - 56, - 215, - 213, - 207, - 211, - 204, - 208, - 56, - 56, - 214, - 56, - 56, - 56, - 210, - 216, - 206, - 218, - 209, - 56, - 219, - 212, - 56, - 56, - 217, - 56, - 56, - 220, - 215, - 213, - 56, - 211, - 56, - 56, - 56, - 56, - 214, - 56, - 56, - 56, - 56, - 216, - 56, - 218, - 56, - 56, - 219, - 56, - 56, - 56, - 95, - 56, - 56, - 220, - 45, - 45, - 47, - 47, - 49, - 49, - 56, - 56, - 95, - 50, - 48, - 56, - 55, - 51, - 50, - 48, - 46, - - 221, - 5, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221}; - -static const flex_int16_t yy_chk[673] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 20, - 25, - 20, - 22, - 22, - 26, - 27, - 28, - 29, - 31, - 226, - 27, - 28, - 32, - 26, - 51, - 28, - 51, - 27, - 25, - 34, - 225, - 32, - 220, - 25, - 27, - 219, - 30, - 27, - 28, - - 218, - 31, - 215, - 214, - 26, - 33, - 29, - 27, - 28, - 34, - 26, - 38, - 28, - 30, - 27, - 25, - 30, - 39, - 32, - 30, - 25, - 27, - 37, - 33, - 27, - 28, - 44, - 31, - 33, - 38, - 26, - 36, - 29, - 38, - 40, - 34, - 39, - 213, - 44, - 30, - 212, - 37, - 30, - 40, - 36, - 30, - 40, - 37, - 41, - 33, - 36, - 43, - 211, - 41, - 33, - 38, - 43, - 41, - 40, - 38, - 42, - 59, - 39, - 40, - 44, - 62, - 58, - 37, - 59, - 40, - 36, - 64, - 40, - 37, - 58, - 60, - 36, - 66, - 42, - 41, - 42, - 62, - 43, - 41, - 40, - 63, - 60, - 65, - 64, - 40, - 63, - 68, - 67, - 209, - 59, - 71, - 65, - 74, - 69, - 80, - - 58, - 66, - 70, - 206, - 42, - 72, - 42, - 62, - 67, - 73, - 68, - 69, - 60, - 74, - 64, - 67, - 63, - 71, - 69, - 77, - 78, - 70, - 65, - 80, - 72, - 79, - 81, - 66, - 73, - 84, - 79, - 205, - 77, - 204, - 67, - 78, - 68, - 69, - 83, - 74, - 86, - 67, - 81, - 71, - 69, - 84, - 83, - 70, - 88, - 80, - 72, - 85, - 90, - 94, - 73, - 75, - 79, - 87, - 77, - 86, - 202, - 78, - 94, - 75, - 89, - 75, - 88, - 85, - 81, - 91, - 89, - 84, - 83, - 75, - 93, - 85, - 87, - 133, - 75, - 75, - 90, - 100, - 91, - 201, - 98, - 86, - 92, - 200, - 94, - 75, - 93, - 75, - 88, - 85, - 92, - 101, - 89, - 98, - 133, - 75, - - 99, - 85, - 87, - 100, - 75, - 75, - 90, - 99, - 91, - 102, - 103, - 105, - 101, - 104, - 102, - 103, - 93, - 106, - 105, - 103, - 92, - 112, - 104, - 98, - 133, - 109, - 107, - 108, - 118, - 100, - 109, - 199, - 198, - 99, - 110, - 111, - 119, - 106, - 101, - 113, - 102, - 103, - 115, - 108, - 105, - 103, - 112, - 118, - 104, - 107, - 107, - 110, - 111, - 114, - 119, - 115, - 109, - 116, - 117, - 113, - 121, - 120, - 114, - 106, - 129, - 124, - 116, - 117, - 121, - 108, - 120, - 123, - 112, - 118, - 124, - 107, - 107, - 110, - 111, - 125, - 119, - 115, - 126, - 128, - 132, - 113, - 129, - 123, - 114, - 131, - 130, - 126, - 116, - 117, - 121, - 125, - 120, - 130, - 134, - 135, - - 124, - 137, - 140, - 134, - 136, - 131, - 141, - 190, - 132, - 144, - 128, - 147, - 129, - 123, - 150, - 140, - 155, - 126, - 157, - 137, - 149, - 125, - 151, - 130, - 135, - 149, - 136, - 151, - 153, - 134, - 141, - 131, - 158, - 144, - 132, - 147, - 128, - 163, - 150, - 156, - 157, - 140, - 163, - 164, - 155, - 137, - 187, - 172, - 153, - 170, - 135, - 149, - 136, - 151, - 158, - 156, - 141, - 165, - 170, - 144, - 166, - 147, - 173, - 165, - 150, - 164, - 157, - 166, - 163, - 174, - 155, - 168, - 172, - 175, - 153, - 177, - 168, - 180, - 174, - 178, - 158, - 156, - 175, - 179, - 170, - 183, - 173, - 186, - 178, - 165, - 181, - 164, - 179, - 166, - 185, - 188, - 186, - 192, - 172, - 177, - - 180, - 189, - 168, - 181, - 174, - 191, - 193, - 189, - 175, - 183, - 191, - 194, - 173, - 203, - 178, - 195, - 197, - 193, - 179, - 188, - 208, - 192, - 186, - 196, - 195, - 177, - 180, - 208, - 207, - 181, - 184, - 203, - 196, - 189, - 194, - 183, - 191, - 210, - 182, - 197, - 216, - 217, - 176, - 193, - 207, - 188, - 210, - 192, - 171, - 216, - 195, - 169, - 167, - 208, - 162, - 161, - 217, - 203, - 196, - 160, - 194, - 159, - 154, - 152, - 148, - 197, - 146, - 145, - 143, - 142, - 207, - 139, - 210, - 138, - 127, - 216, - 122, - 97, - 96, - 95, - 82, - 76, - 217, - 222, - 222, - 223, - 223, - 224, - 224, - 61, - 57, - 52, - 49, - 47, - 35, - 24, - 17, - 11, - 10, - 9, - - 5, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221, - 221}; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[227] = + { 0, + 0, 0, 0, 0, 79, 77, 1, 2, 77, 77, + 77, 57, 58, 73, 71, 59, 72, 6, 74, 3, + 5, 64, 60, 66, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 78, 63, 0, 75, 0, 76, + 3, 0, 61, 62, 65, 70, 70, 70, 49, 70, + 48, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 51, 68, 70, 70, 70, + 70, 70, 15, 23, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 4, 22, 50, 70, 70, + + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 33, + 70, 70, 70, 67, 70, 70, 70, 70, 29, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 19, + 34, 70, 70, 42, 36, 70, 9, 11, 70, 7, + 70, 70, 70, 20, 70, 70, 8, 70, 70, 70, + 70, 25, 56, 69, 41, 39, 70, 70, 70, 16, + 70, 17, 70, 37, 70, 70, 70, 70, 30, 70, + 70, 70, 70, 70, 35, 70, 45, 70, 14, 70, + 55, 70, 70, 47, 70, 70, 70, 12, 70, 70, + + 70, 21, 31, 10, 27, 52, 70, 54, 46, 43, + 24, 70, 70, 18, 70, 13, 38, 28, 26, 44, + 70, 70, 53, 40, 32, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, + 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, + + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[71] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + } ; + +static const flex_int16_t yy_base[232] = + { 0, + 0, 0, 0, 0, 616, 617, 617, 617, 597, 609, + 607, 617, 617, 617, 617, 617, 597, 617, 617, 58, + 617, 56, 617, 593, 57, 61, 62, 63, 64, 83, + 65, 73, 91, 76, 595, 117, 119, 115, 103, 142, + 134, 129, 66, 112, 617, 617, 604, 617, 602, 617, + 79, 592, 617, 617, 617, 0, 591, 145, 160, 141, + 590, 158, 176, 155, 182, 161, 183, 168, 188, 184, + 190, 186, 195, 189, 194, 242, 589, 196, 204, 216, + 220, 230, 588, 243, 233, 237, 239, 248, 255, 222, + 257, 256, 263, 264, 259, 587, 586, 585, 283, 274, + + 282, 288, 298, 308, 300, 312, 290, 301, 302, 315, + 316, 321, 289, 328, 327, 323, 342, 348, 352, 334, + 354, 356, 360, 584, 362, 366, 369, 371, 583, 349, + 370, 377, 374, 388, 382, 395, 389, 386, 397, 582, + 581, 396, 393, 580, 572, 399, 571, 569, 407, 567, + 419, 413, 420, 566, 422, 421, 565, 405, 428, 430, + 432, 564, 561, 560, 557, 448, 436, 455, 460, 556, + 464, 555, 447, 553, 446, 462, 466, 472, 552, 474, + 476, 483, 473, 477, 550, 489, 548, 326, 546, 491, + 541, 499, 488, 531, 503, 504, 506, 502, 505, 510, + + 509, 530, 445, 427, 262, 226, 515, 224, 223, 218, + 202, 521, 529, 157, 535, 146, 132, 127, 126, 123, + 538, 527, 120, 89, 88, 617, 588, 590, 592, 99, + 82 + } ; + +static const flex_int16_t yy_def[232] = + { 0, + 226, 1, 227, 227, 226, 226, 226, 226, 226, 228, + 229, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 226, 226, 228, 226, 229, 226, + 226, 226, 226, 226, 226, 231, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 226, 230, 230, 230, 230, + + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 0, 226, 226, 226, 226, + 226 + } ; + +static const flex_int16_t yy_nxt[688] = + { 0, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, + 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, + 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, + 52, 56, 51, 53, 54, 56, 56, 56, 56, 56, + 56, 62, 66, 56, 60, 94, 67, 56, 63, 58, + 56, 52, 74, 51, 59, 64, 75, 56, 65, 68, + + 57, 73, 56, 56, 61, 56, 69, 62, 66, 78, + 60, 94, 67, 70, 63, 58, 71, 56, 74, 72, + 59, 64, 75, 76, 65, 68, 56, 73, 77, 56, + 61, 56, 69, 56, 56, 78, 85, 56, 95, 70, + 56, 56, 71, 56, 79, 72, 56, 83, 56, 76, + 80, 84, 81, 90, 77, 56, 56, 91, 82, 56, + 56, 92, 85, 93, 95, 86, 99, 97, 87, 56, + 79, 56, 56, 83, 56, 56, 80, 84, 81, 90, + 88, 98, 56, 91, 82, 89, 102, 92, 100, 93, + 56, 86, 99, 97, 87, 101, 56, 56, 56, 104, + + 56, 107, 56, 56, 56, 103, 88, 98, 56, 56, + 56, 89, 102, 105, 100, 108, 56, 110, 56, 112, + 106, 101, 109, 121, 115, 104, 111, 107, 113, 114, + 56, 103, 56, 122, 56, 123, 56, 56, 56, 105, + 56, 108, 133, 110, 56, 112, 106, 56, 109, 121, + 115, 56, 111, 56, 113, 114, 56, 56, 124, 122, + 125, 123, 56, 127, 116, 126, 117, 128, 133, 56, + 56, 56, 130, 56, 118, 129, 56, 56, 56, 119, + 120, 131, 138, 135, 124, 136, 125, 132, 56, 127, + 116, 126, 117, 128, 137, 140, 56, 56, 130, 134, + + 118, 129, 56, 56, 56, 119, 120, 131, 138, 135, + 139, 136, 56, 132, 56, 56, 56, 143, 141, 142, + 137, 140, 56, 146, 148, 134, 56, 144, 155, 56, + 56, 145, 151, 147, 152, 56, 139, 56, 149, 150, + 56, 56, 56, 143, 141, 142, 158, 153, 56, 146, + 148, 209, 154, 144, 155, 156, 56, 145, 151, 147, + 152, 157, 56, 56, 149, 150, 56, 162, 56, 159, + 56, 160, 158, 153, 56, 161, 56, 209, 154, 164, + 56, 156, 165, 56, 56, 56, 163, 157, 56, 167, + 170, 56, 166, 162, 169, 159, 56, 160, 172, 168, + + 56, 161, 56, 56, 173, 164, 171, 56, 165, 56, + 56, 56, 163, 56, 176, 167, 170, 175, 166, 56, + 169, 56, 178, 180, 172, 168, 174, 56, 177, 179, + 173, 181, 171, 56, 56, 56, 56, 182, 184, 186, + 176, 56, 56, 175, 56, 183, 56, 189, 178, 180, + 56, 185, 174, 188, 177, 179, 187, 181, 190, 56, + 56, 56, 56, 182, 184, 186, 191, 193, 192, 56, + 198, 183, 194, 189, 56, 195, 56, 185, 56, 188, + 56, 196, 187, 197, 190, 199, 56, 56, 56, 201, + 56, 56, 191, 193, 192, 202, 198, 56, 194, 204, + + 200, 195, 56, 56, 207, 56, 205, 196, 212, 197, + 206, 199, 203, 56, 210, 201, 56, 56, 56, 56, + 56, 202, 213, 56, 56, 204, 200, 208, 217, 56, + 207, 215, 205, 218, 212, 56, 206, 211, 203, 216, + 210, 56, 214, 56, 56, 56, 219, 220, 213, 56, + 222, 221, 56, 208, 217, 56, 225, 215, 223, 218, + 56, 224, 56, 211, 56, 216, 56, 56, 214, 56, + 56, 56, 219, 220, 56, 56, 222, 221, 56, 56, + 56, 56, 225, 56, 223, 56, 56, 224, 45, 45, + 47, 47, 49, 49, 56, 56, 56, 56, 56, 56, + + 56, 96, 56, 56, 56, 56, 96, 50, 48, 56, + 55, 51, 50, 48, 46, 226, 5, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226 + } ; + +static const flex_int16_t yy_chk[688] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, + 43, 27, 28, 231, 26, 43, 28, 32, 27, 25, + 34, 51, 32, 51, 25, 27, 32, 30, 27, 28, + + 230, 31, 225, 224, 26, 33, 29, 27, 28, 34, + 26, 43, 28, 30, 27, 25, 30, 39, 32, 30, + 25, 27, 32, 33, 27, 28, 44, 31, 33, 38, + 26, 36, 29, 37, 223, 34, 39, 220, 44, 30, + 219, 218, 30, 42, 36, 30, 217, 38, 41, 33, + 36, 38, 37, 41, 33, 60, 40, 41, 37, 58, + 216, 42, 39, 42, 44, 40, 60, 58, 40, 64, + 36, 214, 62, 38, 59, 66, 36, 38, 37, 41, + 40, 59, 68, 41, 37, 40, 64, 42, 62, 42, + 63, 40, 60, 58, 40, 63, 65, 67, 70, 66, + + 72, 68, 69, 74, 71, 65, 40, 59, 75, 73, + 78, 40, 64, 67, 62, 69, 211, 70, 79, 72, + 67, 63, 69, 78, 75, 66, 71, 68, 73, 74, + 80, 65, 210, 79, 81, 80, 90, 209, 208, 67, + 206, 69, 90, 70, 82, 72, 67, 85, 69, 78, + 75, 86, 71, 87, 73, 74, 76, 84, 81, 79, + 82, 80, 88, 85, 76, 84, 76, 86, 90, 89, + 92, 91, 87, 95, 76, 86, 205, 93, 94, 76, + 76, 88, 95, 92, 81, 93, 82, 89, 100, 85, + 76, 84, 76, 86, 94, 100, 101, 99, 87, 91, + + 76, 86, 102, 113, 107, 76, 76, 88, 95, 92, + 99, 93, 103, 89, 105, 108, 109, 103, 101, 102, + 94, 100, 104, 105, 107, 91, 106, 104, 113, 110, + 111, 104, 109, 106, 110, 112, 99, 116, 108, 108, + 188, 115, 114, 103, 101, 102, 116, 111, 120, 105, + 107, 188, 112, 104, 113, 114, 117, 104, 109, 106, + 110, 115, 118, 130, 108, 108, 119, 120, 121, 117, + 122, 118, 116, 111, 123, 119, 125, 188, 112, 122, + 126, 114, 123, 127, 131, 128, 121, 115, 133, 126, + 130, 132, 125, 120, 128, 117, 135, 118, 132, 127, + + 138, 119, 134, 137, 133, 122, 131, 143, 123, 136, + 142, 139, 121, 146, 136, 126, 130, 135, 125, 158, + 128, 149, 138, 142, 132, 127, 134, 152, 137, 139, + 133, 143, 131, 151, 153, 156, 155, 146, 151, 153, + 136, 204, 159, 135, 160, 149, 161, 158, 138, 142, + 167, 152, 134, 156, 137, 139, 155, 143, 159, 203, + 175, 173, 166, 146, 151, 153, 160, 166, 161, 168, + 173, 149, 167, 158, 169, 168, 176, 152, 171, 156, + 177, 169, 155, 171, 159, 175, 178, 183, 180, 177, + 181, 184, 160, 166, 161, 178, 173, 182, 167, 181, + + 176, 168, 193, 186, 184, 190, 182, 169, 193, 171, + 183, 175, 180, 192, 190, 177, 198, 195, 196, 199, + 197, 178, 195, 201, 200, 181, 176, 186, 199, 207, + 184, 197, 182, 200, 193, 212, 183, 192, 180, 198, + 190, 222, 196, 213, 202, 194, 201, 207, 195, 215, + 213, 212, 221, 186, 199, 191, 222, 197, 215, 200, + 189, 221, 187, 192, 185, 198, 179, 174, 196, 172, + 170, 165, 201, 207, 164, 163, 213, 212, 162, 157, + 154, 150, 222, 148, 215, 147, 145, 221, 227, 227, + 228, 228, 229, 229, 144, 141, 140, 129, 124, 98, + + 97, 96, 83, 77, 61, 57, 52, 49, 47, 35, + 24, 17, 11, 10, 9, 5, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226 + } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2772,8 +694,8 @@ static const flex_int16_t yy_chk[673] = {0, #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -2787,16 +709,14 @@ static const flex_int16_t yy_chk[673] = {0, #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) \ - LOG_DEBUG("%s", #token); \ - return token -#line 716 "lex_sql.cpp" +#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#line 720 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -2805,7 +725,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 725 "lex_sql.cpp" +#line 729 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -2824,124 +744,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t -{ - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char *yy_last_accepting_cpos; + { - int yylineno_r; - int yy_flex_debug_r; + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; - YYSTYPE *yylval_r; + int yylineno_r; + int yy_flex_debug_r; - YYLTYPE *yylloc_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; -}; /* end struct yyguts_t */ + YYSTYPE * yylval_r; -static int yy_init_globals(yyscan_t yyscanner); + YYLTYPE * yylloc_r; -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -#define yylval yyg->yylval_r + }; /* end struct yyguts_t */ -#define yylloc yyg->yylloc_r +static int yy_init_globals ( yyscan_t yyscanner ); -int yylex_init(yyscan_t *scanner); + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); - -int yyget_debug(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); + int yyget_leng ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner); +static int yyinput ( yyscan_t yyscanner ); #else -static int input(yyscan_t yyscanner); +static int input ( yyscan_t yyscanner ); #endif #endif @@ -2961,38 +881,42 @@ static int input(yyscan_t yyscanner); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - yy_size_t n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -3011,7 +935,7 @@ static int input(yyscan_t yyscanner); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -3022,9 +946,11 @@ static int input(yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -3036,538 +962,629 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP YY_USER_ACTION +#define YY_RULE_SETUP \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if (!yyg->yy_init) { - yyg->yy_init = 1; + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!yyg->yy_start) - yyg->yy_start = 1; /* first start state */ + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_load_buffer_state(yyscanner); - } + yy_load_buffer_state( yyscanner ); + } - { + { #line 75 "lex_sql.l" -#line 1011 "lex_sql.cpp" - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 222) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_base[yy_current_state] != 602); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - if (yy_act == 0) { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - - case 1: YY_RULE_SETUP +#line 1015 "lex_sql.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 227 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 617 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 77 "lex_sql.l" - // ignore whitespace - YY_BREAK - case 2: - /* rule 2 can match eol */ - YY_RULE_SETUP +// ignore whitespace + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP #line 78 "lex_sql.l" - ; - YY_BREAK - case 3: YY_RULE_SETUP +; + YY_BREAK +case 3: +YY_RULE_SETUP #line 80 "lex_sql.l" - yylval->number = atoi(yytext); - RETURN_TOKEN(NUMBER); - YY_BREAK - case 4: YY_RULE_SETUP +yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); + YY_BREAK +case 4: +YY_RULE_SETUP #line 81 "lex_sql.l" - yylval->floats = (float)(atof(yytext)); - RETURN_TOKEN(FLOAT); - YY_BREAK - case 5: YY_RULE_SETUP +yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); + YY_BREAK +case 5: +YY_RULE_SETUP #line 83 "lex_sql.l" - RETURN_TOKEN(SEMICOLON); - YY_BREAK - case 6: YY_RULE_SETUP +RETURN_TOKEN(SEMICOLON); + YY_BREAK +case 6: +YY_RULE_SETUP #line 84 "lex_sql.l" - RETURN_TOKEN(DOT); - YY_BREAK - case 7: YY_RULE_SETUP +RETURN_TOKEN(DOT); + YY_BREAK +case 7: +YY_RULE_SETUP #line 85 "lex_sql.l" - RETURN_TOKEN(EXIT); - YY_BREAK - case 8: YY_RULE_SETUP +RETURN_TOKEN(EXIT); + YY_BREAK +case 8: +YY_RULE_SETUP #line 86 "lex_sql.l" - RETURN_TOKEN(HELP); - YY_BREAK - case 9: YY_RULE_SETUP +RETURN_TOKEN(HELP); + YY_BREAK +case 9: +YY_RULE_SETUP #line 87 "lex_sql.l" - RETURN_TOKEN(DESC); - YY_BREAK - case 10: YY_RULE_SETUP +RETURN_TOKEN(DESC); + YY_BREAK +case 10: +YY_RULE_SETUP #line 88 "lex_sql.l" - RETURN_TOKEN(CREATE); - YY_BREAK - case 11: YY_RULE_SETUP +RETURN_TOKEN(CREATE); + YY_BREAK +case 11: +YY_RULE_SETUP #line 89 "lex_sql.l" - RETURN_TOKEN(DROP); - YY_BREAK - case 12: YY_RULE_SETUP +RETURN_TOKEN(DROP); + YY_BREAK +case 12: +YY_RULE_SETUP #line 90 "lex_sql.l" - RETURN_TOKEN(TABLE); - YY_BREAK - case 13: YY_RULE_SETUP +RETURN_TOKEN(TABLE); + YY_BREAK +case 13: +YY_RULE_SETUP #line 91 "lex_sql.l" - RETURN_TOKEN(TABLES); - YY_BREAK - case 14: YY_RULE_SETUP +RETURN_TOKEN(TABLES); + YY_BREAK +case 14: +YY_RULE_SETUP #line 92 "lex_sql.l" - RETURN_TOKEN(INDEX); - YY_BREAK - case 15: YY_RULE_SETUP +RETURN_TOKEN(INDEX); + YY_BREAK +case 15: +YY_RULE_SETUP #line 93 "lex_sql.l" - RETURN_TOKEN(ON); - YY_BREAK - case 16: YY_RULE_SETUP +RETURN_TOKEN(ON); + YY_BREAK +case 16: +YY_RULE_SETUP #line 94 "lex_sql.l" - RETURN_TOKEN(SHOW); - YY_BREAK - case 17: YY_RULE_SETUP +RETURN_TOKEN(SHOW); + YY_BREAK +case 17: +YY_RULE_SETUP #line 95 "lex_sql.l" - RETURN_TOKEN(SYNC); - YY_BREAK - case 18: YY_RULE_SETUP +RETURN_TOKEN(SYNC); + YY_BREAK +case 18: +YY_RULE_SETUP #line 96 "lex_sql.l" - RETURN_TOKEN(SELECT); - YY_BREAK - case 19: YY_RULE_SETUP +RETURN_TOKEN(SELECT); + YY_BREAK +case 19: +YY_RULE_SETUP #line 97 "lex_sql.l" - RETURN_TOKEN(CALC); - YY_BREAK - case 20: YY_RULE_SETUP +RETURN_TOKEN(CALC); + YY_BREAK +case 20: +YY_RULE_SETUP #line 98 "lex_sql.l" - RETURN_TOKEN(FROM); - YY_BREAK - case 21: YY_RULE_SETUP +RETURN_TOKEN(FROM); + YY_BREAK +case 21: +YY_RULE_SETUP #line 99 "lex_sql.l" - RETURN_TOKEN(WHERE); - YY_BREAK - case 22: YY_RULE_SETUP +RETURN_TOKEN(WHERE); + YY_BREAK +case 22: +YY_RULE_SETUP #line 100 "lex_sql.l" - RETURN_TOKEN(AND); - YY_BREAK - case 23: YY_RULE_SETUP +RETURN_TOKEN(AND); + YY_BREAK +case 23: +YY_RULE_SETUP #line 101 "lex_sql.l" - RETURN_TOKEN(OR); - YY_BREAK - case 24: YY_RULE_SETUP +RETURN_TOKEN(OR); + YY_BREAK +case 24: +YY_RULE_SETUP #line 102 "lex_sql.l" - RETURN_TOKEN(INSERT); - YY_BREAK - case 25: YY_RULE_SETUP +RETURN_TOKEN(INSERT); + YY_BREAK +case 25: +YY_RULE_SETUP #line 103 "lex_sql.l" - RETURN_TOKEN(INTO); - YY_BREAK - case 26: YY_RULE_SETUP +RETURN_TOKEN(INTO); + YY_BREAK +case 26: +YY_RULE_SETUP #line 104 "lex_sql.l" - RETURN_TOKEN(VALUES); - YY_BREAK - case 27: YY_RULE_SETUP +RETURN_TOKEN(VALUES); + YY_BREAK +case 27: +YY_RULE_SETUP #line 105 "lex_sql.l" - RETURN_TOKEN(DELETE); - YY_BREAK - case 28: YY_RULE_SETUP +RETURN_TOKEN(DELETE); + YY_BREAK +case 28: +YY_RULE_SETUP #line 106 "lex_sql.l" - RETURN_TOKEN(UPDATE); - YY_BREAK - case 29: YY_RULE_SETUP +RETURN_TOKEN(UPDATE); + YY_BREAK +case 29: +YY_RULE_SETUP #line 107 "lex_sql.l" - RETURN_TOKEN(SET); - YY_BREAK - case 30: YY_RULE_SETUP +RETURN_TOKEN(SET); + YY_BREAK +case 30: +YY_RULE_SETUP #line 108 "lex_sql.l" - RETURN_TOKEN(TRX_BEGIN); - YY_BREAK - case 31: YY_RULE_SETUP +RETURN_TOKEN(TRX_BEGIN); + YY_BREAK +case 31: +YY_RULE_SETUP #line 109 "lex_sql.l" - RETURN_TOKEN(TRX_COMMIT); - YY_BREAK - case 32: YY_RULE_SETUP +RETURN_TOKEN(TRX_COMMIT); + YY_BREAK +case 32: +YY_RULE_SETUP #line 110 "lex_sql.l" - RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK - case 33: YY_RULE_SETUP +RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK +case 33: +YY_RULE_SETUP #line 111 "lex_sql.l" - RETURN_TOKEN(INT_T); - YY_BREAK - case 34: YY_RULE_SETUP +RETURN_TOKEN(INT_T); + YY_BREAK +case 34: +YY_RULE_SETUP #line 112 "lex_sql.l" - RETURN_TOKEN(STRING_T); - YY_BREAK - case 35: YY_RULE_SETUP +RETURN_TOKEN(STRING_T); + YY_BREAK +case 35: +YY_RULE_SETUP #line 113 "lex_sql.l" - RETURN_TOKEN(FLOAT_T); - YY_BREAK - case 36: YY_RULE_SETUP +RETURN_TOKEN(FLOAT_T); + YY_BREAK +case 36: +YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK - case 37: YY_RULE_SETUP +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK +case 37: +YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token - YY_BREAK - case 38: YY_RULE_SETUP +RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + YY_BREAK +case 38: +YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(UNIQUE); - YY_BREAK - case 39: YY_RULE_SETUP +RETURN_TOKEN(UNIQUE); + YY_BREAK +case 39: +YY_RULE_SETUP #line 117 "lex_sql.l" - RETURN_TOKEN(NULL_T); - YY_BREAK - case 40: YY_RULE_SETUP +RETURN_TOKEN(NULL_T); + YY_BREAK +case 40: +YY_RULE_SETUP #line 118 "lex_sql.l" - RETURN_TOKEN(NULLABLE); - YY_BREAK - case 41: YY_RULE_SETUP +RETURN_TOKEN(NULLABLE); + YY_BREAK +case 41: +YY_RULE_SETUP #line 119 "lex_sql.l" - RETURN_TOKEN(LOAD); - YY_BREAK - case 42: YY_RULE_SETUP +RETURN_TOKEN(LOAD); + YY_BREAK +case 42: +YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(DATA); - YY_BREAK - case 43: YY_RULE_SETUP +RETURN_TOKEN(DATA); + YY_BREAK +case 43: +YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(INFILE); - YY_BREAK - case 44: YY_RULE_SETUP +RETURN_TOKEN(INFILE); + YY_BREAK +case 44: +YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); - YY_BREAK - case 45: YY_RULE_SETUP +RETURN_TOKEN(EXPLAIN); + YY_BREAK +case 45: +YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(GROUP); - YY_BREAK - case 46: YY_RULE_SETUP +RETURN_TOKEN(GROUP); + YY_BREAK +case 46: +YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(ORDER); - YY_BREAK - case 47: YY_RULE_SETUP +RETURN_TOKEN(HAVING); + YY_BREAK +case 47: +YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(BY); - YY_BREAK - case 48: YY_RULE_SETUP +RETURN_TOKEN(ORDER); + YY_BREAK +case 48: +YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(AS); - YY_BREAK - case 49: YY_RULE_SETUP +RETURN_TOKEN(BY); + YY_BREAK +case 49: +YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(ASC); - YY_BREAK - case 50: YY_RULE_SETUP +RETURN_TOKEN(AS); + YY_BREAK +case 50: +YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(IN); - YY_BREAK - case 51: YY_RULE_SETUP +RETURN_TOKEN(ASC); + YY_BREAK +case 51: +YY_RULE_SETUP #line 129 "lex_sql.l" - RETURN_TOKEN(EXISTS); - YY_BREAK - case 52: YY_RULE_SETUP +RETURN_TOKEN(IN); + YY_BREAK +case 52: +YY_RULE_SETUP #line 130 "lex_sql.l" - RETURN_TOKEN(STORAGE); - YY_BREAK - case 53: YY_RULE_SETUP +RETURN_TOKEN(EXISTS); + YY_BREAK +case 53: +YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(FORMAT); - YY_BREAK - case 54: YY_RULE_SETUP +RETURN_TOKEN(STORAGE); + YY_BREAK +case 54: +YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(INNER); - YY_BREAK - case 55: YY_RULE_SETUP +RETURN_TOKEN(FORMAT); + YY_BREAK +case 55: +YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(JOIN); - YY_BREAK - case 56: YY_RULE_SETUP +RETURN_TOKEN(INNER); + YY_BREAK +case 56: +YY_RULE_SETUP #line 134 "lex_sql.l" - RETURN_TOKEN(LBRACE); - YY_BREAK - case 57: YY_RULE_SETUP +RETURN_TOKEN(JOIN); + YY_BREAK +case 57: +YY_RULE_SETUP #line 135 "lex_sql.l" - RETURN_TOKEN(RBRACE); - YY_BREAK - case 58: YY_RULE_SETUP -#line 137 "lex_sql.l" - RETURN_TOKEN(COMMA); - YY_BREAK - case 59: YY_RULE_SETUP +RETURN_TOKEN(LBRACE); + YY_BREAK +case 58: +YY_RULE_SETUP +#line 136 "lex_sql.l" +RETURN_TOKEN(RBRACE); + YY_BREAK +case 59: +YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(EQ); - YY_BREAK - case 60: YY_RULE_SETUP +RETURN_TOKEN(COMMA); + YY_BREAK +case 60: +YY_RULE_SETUP #line 139 "lex_sql.l" - RETURN_TOKEN(LE); - YY_BREAK - case 61: YY_RULE_SETUP +RETURN_TOKEN(EQ); + YY_BREAK +case 61: +YY_RULE_SETUP #line 140 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 62: YY_RULE_SETUP +RETURN_TOKEN(LE); + YY_BREAK +case 62: +YY_RULE_SETUP #line 141 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 63: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 63: +YY_RULE_SETUP #line 142 "lex_sql.l" - RETURN_TOKEN(LT); - YY_BREAK - case 64: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 64: +YY_RULE_SETUP #line 143 "lex_sql.l" - RETURN_TOKEN(GE); - YY_BREAK - case 65: YY_RULE_SETUP +RETURN_TOKEN(LT); + YY_BREAK +case 65: +YY_RULE_SETUP #line 144 "lex_sql.l" - RETURN_TOKEN(GT); - YY_BREAK - case 66: YY_RULE_SETUP +RETURN_TOKEN(GE); + YY_BREAK +case 66: +YY_RULE_SETUP #line 145 "lex_sql.l" - RETURN_TOKEN(NOT); - YY_BREAK - case 67: YY_RULE_SETUP +RETURN_TOKEN(GT); + YY_BREAK +case 67: +YY_RULE_SETUP #line 146 "lex_sql.l" - RETURN_TOKEN(IS); - YY_BREAK - case 68: YY_RULE_SETUP +RETURN_TOKEN(NOT); + YY_BREAK +case 68: +YY_RULE_SETUP #line 147 "lex_sql.l" - RETURN_TOKEN(LIKE); - YY_BREAK - case 69: YY_RULE_SETUP -#line 149 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(ID); - YY_BREAK - case 70: -#line 152 "lex_sql.l" - case 71: +RETURN_TOKEN(IS); + YY_BREAK +case 69: +YY_RULE_SETUP +#line 148 "lex_sql.l" +RETURN_TOKEN(LIKE); + YY_BREAK +case 70: +YY_RULE_SETUP +#line 150 "lex_sql.l" +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK +case 71: #line 153 "lex_sql.l" - case 72: -#line 154 "lex_sql.l" - case 73: YY_RULE_SETUP +case 72: #line 154 "lex_sql.l" - { - return yytext[0]; - } - YY_BREAK - case 74: - /* rule 74 can match eol */ - YY_RULE_SETUP +case 73: #line 155 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 75: - /* rule 75 can match eol */ - YY_RULE_SETUP +case 74: +YY_RULE_SETUP +#line 155 "lex_sql.l" +{ return yytext[0]; } + YY_BREAK +case 75: +/* rule 75 can match eol */ +YY_RULE_SETUP #line 156 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 76: YY_RULE_SETUP -#line 158 "lex_sql.l" - LOG_DEBUG("Unknown character [%c]",yytext[0]); - return yytext[0]; - YY_BREAK - case 77: YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 76: +/* rule 76 can match eol */ +YY_RULE_SETUP +#line 157 "lex_sql.l" +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 77: +YY_RULE_SETUP #line 159 "lex_sql.l" - ECHO; - YY_BREAK -#line 1447 "lex_sql.cpp" - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(STR): yyterminate(); - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if (yywrap(yyscanner)) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 78: +YY_RULE_SETUP +#line 160 "lex_sql.l" +ECHO; + YY_BREAK +#line 1456 "lex_sql.cpp" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(STR): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3577,149 +1594,171 @@ YY_DECL * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(yyscan_t yyscanner) +static int yy_get_next_buffer (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else { - yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - yy_size_t new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if (yyg->yy_n_chars == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin, yyscanner); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = - (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(yyscan_t yyscanner) + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_current_state = yyg->yy_start; - - for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 222) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 227 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -3727,27 +1766,29 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 222) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 221); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 227 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 226); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -3756,133 +1797,141 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner) + static int yyinput (yyscan_t yyscanner) #else -static int input(yyscan_t yyscanner) + static int input (yyscan_t yyscanner) #endif { - int c; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin, yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap(yyscanner)) - return 0; - - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file, yyscan_t yyscanner) + void yyrestart (FILE * input_file , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); - yy_load_buffer_state(yyscanner); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(yyscanner); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state(yyscan_t yyscanner) +static void yy_load_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -3891,105 +1940,105 @@ static void yy_load_buffer_state(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file, yyscanner); + yy_init_buffer( b, file , yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!b) - return; + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf, yyscanner); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *)b, yyscanner); + yyfree( (void *) b , yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_flush_buffer(b, yyscanner); + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - b->yy_input_file = file; - b->yy_fill_buffer = 1; + yy_flush_buffer( b , yyscanner); - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!b) - return; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(yyscanner); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -3998,95 +2047,99 @@ void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state(yyscan_t yyscanner) +void yypop_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(yyscan_t yyscanner) +static void yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = - (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( - yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -4095,31 +2148,33 @@ static void yyensure_buffer_stack(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b, yyscanner); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -4130,10 +2185,10 @@ YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - - return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -4143,175 +2198,177 @@ YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n, yyscanner); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n, yyscanner); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyextra; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno(yyscan_t yyscanner) +int yyget_lineno (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column(yyscan_t yyscanner) +int yyget_column (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!YY_CURRENT_BUFFER) - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yycolumn; + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in(yyscan_t yyscanner) +FILE *yyget_in (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyin; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out(yyscan_t yyscanner) +FILE *yyget_out (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyout; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng(yyscan_t yyscanner) +int yyget_leng (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyleng; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text(yyscan_t yyscanner) +char *yyget_text (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yytext; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyextra = user_defined; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno(int _line_number, yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_lineno called with no buffer"); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column(int _column_no, yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_column called with no buffer"); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yycolumn = _column_no; + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -4320,80 +2377,80 @@ void yyset_column(int _column_no, yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str, yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyin = _in_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; } -void yyset_out(FILE *_out_str, yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyout = _out_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; } -int yyget_debug(yyscan_t yyscanner) +int yyget_debug (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yy_flex_debug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void yyset_debug(int _bdebug, yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flex_debug = _bdebug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ -YYSTYPE *yyget_lval(yyscan_t yyscanner) +YYSTYPE * yyget_lval (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylval; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc(yyscan_t yyscanner) +YYLTYPE *yyget_lloc (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; } - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylloc = yylloc_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t *ptr_yy_globals) +int yylex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -4403,94 +2460,94 @@ int yylex_init(yyscan_t *ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra(yy_user_defined, &dummy_yyguts); + yyset_extra (yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - yyset_extra(yy_user_defined, *ptr_yy_globals); + yyset_extra (yy_user_defined, *ptr_yy_globals); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } -static int yy_init_globals(yyscan_t yyscanner) +static int yy_init_globals (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(yyscan_t yyscanner) +int yylex_destroy (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack, yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack, yyscanner); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals(yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree(yyscanner, yyscanner); - yyscanner = NULL; - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; } /* @@ -4498,59 +2555,63 @@ int yylex_destroy(yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s, yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - int n; - for (n = 0; s[n]; ++n) - ; + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size, yyscan_t yyscanner) +void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr, yyscan_t yyscanner) +void yyfree (void * ptr , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - free((char *)ptr); /* see yyrealloc() for (char *) cast */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 159 "lex_sql.l" +#line 160 "lex_sql.l" + + +void scan_string(const char *str, yyscan_t scanner) { + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); +} -void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 48c24424..46266a60 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,7 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 5 "lex_sql.h" +#line 6 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -12,21 +12,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); -#line 29 "lex_sql.h" +#line 30 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -79,62 +81,61 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -155,7 +156,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -195,72 +196,73 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -}; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -283,69 +285,69 @@ void yyfree(void *, yyscan_t yyscanner); #define YY_EXTRA_TYPE void * #endif -int yylex_init(yyscan_t *scanner); +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + int yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -373,9 +375,11 @@ static int yy_flex_strlen(const char *, yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -537,7 +541,8 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #undef yyTABLES_NAME #endif -#line 159 "lex_sql.l" +#line 160 "lex_sql.l" + #line 548 "lex_sql.h" #undef yyIN_HEADER diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 34c4491d..4f2d0251 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -121,6 +121,7 @@ DATA RETURN_TOKEN(DATA); INFILE RETURN_TOKEN(INFILE); EXPLAIN RETURN_TOKEN(EXPLAIN); GROUP RETURN_TOKEN(GROUP); +HAVING RETURN_TOKEN(HAVING); ORDER RETURN_TOKEN(ORDER); BY RETURN_TOKEN(BY); AS RETURN_TOKEN(AS); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 7544d50f..5feb45c4 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -116,11 +116,12 @@ struct OrderBySqlNode */ struct SelectSqlNode { - std::vector> expressions; ///< 查询的表达式 - std::vector relations; ///< 查询的表 - std::unique_ptr conditions; ///< 查询条件,使用AND串联起来多个条件 - std::vector> group_by; ///< group by clause - std::vector order_by; ///< attributes in order clause + std::vector> expressions; ///< 查询的表达式 + std::vector relations; ///< 查询的表 + std::unique_ptr conditions; ///< 查询条件,使用AND串联起来多个条件 + std::vector> group_by; ///< group by clause + std::vector order_by; ///< attributes in order clause + std::unique_ptr having_conditions; ///< having }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 763215a7..64306d56 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,9 +63,13 @@ /* Pull parsers. */ #define YYPULL 1 + + + /* First part of user prologue. */ #line 2 "yacc_sql.y" + #include #include #include @@ -88,191 +92,202 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression( - ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, + Expression *left, + Expression *right, + const char *sql_string, + YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression( - const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression(const char *function_name, + std::vector> child, + const char *sql_string, + YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } + #line 125 "yacc_sql.cpp" -#ifndef YY_CAST -#ifdef __cplusplus -#define YY_CAST(Type, Val) static_cast(Val) -#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) -#else -#define YY_CAST(Type, Val) ((Type)(Val)) -#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) -#endif -#endif -#ifndef YY_NULLPTR -#if defined __cplusplus -#if 201103L <= __cplusplus -#define YY_NULLPTR nullptr -#else -#define YY_NULLPTR 0 -#endif -#else -#define YY_NULLPTR ((void *)0) -#endif -#endif +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_ORDER = 11, /* ORDER */ - YYSYMBOL_TABLE = 12, /* TABLE */ - YYSYMBOL_TABLES = 13, /* TABLES */ - YYSYMBOL_INDEX = 14, /* INDEX */ - YYSYMBOL_CALC = 15, /* CALC */ - YYSYMBOL_SELECT = 16, /* SELECT */ - YYSYMBOL_DESC = 17, /* DESC */ - YYSYMBOL_SHOW = 18, /* SHOW */ - YYSYMBOL_SYNC = 19, /* SYNC */ - YYSYMBOL_INSERT = 20, /* INSERT */ - YYSYMBOL_DELETE = 21, /* DELETE */ - YYSYMBOL_UPDATE = 22, /* UPDATE */ - YYSYMBOL_LBRACE = 23, /* LBRACE */ - YYSYMBOL_RBRACE = 24, /* RBRACE */ - YYSYMBOL_COMMA = 25, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 26, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 27, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 28, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 29, /* INT_T */ - YYSYMBOL_IN = 30, /* IN */ - YYSYMBOL_STRING_T = 31, /* STRING_T */ - YYSYMBOL_FLOAT_T = 32, /* FLOAT_T */ - YYSYMBOL_DATE_T = 33, /* DATE_T */ - YYSYMBOL_TEXT_T = 34, /* TEXT_T */ - YYSYMBOL_NOT = 35, /* NOT */ - YYSYMBOL_UNIQUE = 36, /* UNIQUE */ - YYSYMBOL_NULL_T = 37, /* NULL_T */ - YYSYMBOL_NULLABLE = 38, /* NULLABLE */ - YYSYMBOL_HELP = 39, /* HELP */ - YYSYMBOL_EXIT = 40, /* EXIT */ - YYSYMBOL_DOT = 41, /* DOT */ - YYSYMBOL_INTO = 42, /* INTO */ - YYSYMBOL_VALUES = 43, /* VALUES */ - YYSYMBOL_FROM = 44, /* FROM */ - YYSYMBOL_WHERE = 45, /* WHERE */ - YYSYMBOL_AND = 46, /* AND */ - YYSYMBOL_OR = 47, /* OR */ - YYSYMBOL_SET = 48, /* SET */ - YYSYMBOL_ON = 49, /* ON */ - YYSYMBOL_LOAD = 50, /* LOAD */ - YYSYMBOL_DATA = 51, /* DATA */ - YYSYMBOL_INFILE = 52, /* INFILE */ - YYSYMBOL_EXPLAIN = 53, /* EXPLAIN */ - YYSYMBOL_STORAGE = 54, /* STORAGE */ - YYSYMBOL_FORMAT = 55, /* FORMAT */ - YYSYMBOL_INNER = 56, /* INNER */ - YYSYMBOL_JOIN = 57, /* JOIN */ - YYSYMBOL_EQ = 58, /* EQ */ - YYSYMBOL_LT = 59, /* LT */ - YYSYMBOL_GT = 60, /* GT */ - YYSYMBOL_LE = 61, /* LE */ - YYSYMBOL_GE = 62, /* GE */ - YYSYMBOL_NE = 63, /* NE */ - YYSYMBOL_LIKE = 64, /* LIKE */ - YYSYMBOL_IS = 65, /* IS */ - YYSYMBOL_NUMBER = 66, /* NUMBER */ - YYSYMBOL_FLOAT = 67, /* FLOAT */ - YYSYMBOL_ID = 68, /* ID */ - YYSYMBOL_SSS = 69, /* SSS */ - YYSYMBOL_70_ = 70, /* '+' */ - YYSYMBOL_71_ = 71, /* '-' */ - YYSYMBOL_72_ = 72, /* '*' */ - YYSYMBOL_73_ = 73, /* '/' */ - YYSYMBOL_UMINUS = 74, /* UMINUS */ - YYSYMBOL_YYACCEPT = 75, /* $accept */ - YYSYMBOL_commands = 76, /* commands */ - YYSYMBOL_command_wrapper = 77, /* command_wrapper */ - YYSYMBOL_exit_stmt = 78, /* exit_stmt */ - YYSYMBOL_help_stmt = 79, /* help_stmt */ - YYSYMBOL_sync_stmt = 80, /* sync_stmt */ - YYSYMBOL_begin_stmt = 81, /* begin_stmt */ - YYSYMBOL_commit_stmt = 82, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 83, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 84, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 85, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 86, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 87, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 88, /* create_index_stmt */ - YYSYMBOL_opt_unique = 89, /* opt_unique */ - YYSYMBOL_attr_list = 90, /* attr_list */ - YYSYMBOL_drop_index_stmt = 91, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 92, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 93, /* attr_def_list */ - YYSYMBOL_attr_def = 94, /* attr_def */ - YYSYMBOL_nullable_constraint = 95, /* nullable_constraint */ - YYSYMBOL_number = 96, /* number */ - YYSYMBOL_type = 97, /* type */ - YYSYMBOL_insert_stmt = 98, /* insert_stmt */ - YYSYMBOL_values_list = 99, /* values_list */ - YYSYMBOL_value_list = 100, /* value_list */ - YYSYMBOL_value = 101, /* value */ - YYSYMBOL_storage_format = 102, /* storage_format */ - YYSYMBOL_delete_stmt = 103, /* delete_stmt */ - YYSYMBOL_update_stmt = 104, /* update_stmt */ - YYSYMBOL_setClauses = 105, /* setClauses */ - YYSYMBOL_setClause = 106, /* setClause */ - YYSYMBOL_select_stmt = 107, /* select_stmt */ - YYSYMBOL_calc_stmt = 108, /* calc_stmt */ - YYSYMBOL_expression_list = 109, /* expression_list */ - YYSYMBOL_expression = 110, /* expression */ - YYSYMBOL_alias = 111, /* alias */ - YYSYMBOL_aggr_func_expr = 112, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 113, /* sub_query_expr */ - YYSYMBOL_rel_attr = 114, /* rel_attr */ - YYSYMBOL_relation = 115, /* relation */ - YYSYMBOL_rel_list = 116, /* rel_list */ - YYSYMBOL_joinClauses = 117, /* joinClauses */ - YYSYMBOL_where = 118, /* where */ - YYSYMBOL_condition = 119, /* condition */ - YYSYMBOL_comp_op = 120, /* comp_op */ - YYSYMBOL_opt_order_by = 121, /* opt_order_by */ - YYSYMBOL_sort_list = 122, /* sort_list */ - YYSYMBOL_sort_unit = 123, /* sort_unit */ - YYSYMBOL_group_by = 124, /* group_by */ - YYSYMBOL_load_data_stmt = 125, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 126, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 127, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 128 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_HAVING = 11, /* HAVING */ + YYSYMBOL_ORDER = 12, /* ORDER */ + YYSYMBOL_TABLE = 13, /* TABLE */ + YYSYMBOL_TABLES = 14, /* TABLES */ + YYSYMBOL_INDEX = 15, /* INDEX */ + YYSYMBOL_CALC = 16, /* CALC */ + YYSYMBOL_SELECT = 17, /* SELECT */ + YYSYMBOL_DESC = 18, /* DESC */ + YYSYMBOL_SHOW = 19, /* SHOW */ + YYSYMBOL_SYNC = 20, /* SYNC */ + YYSYMBOL_INSERT = 21, /* INSERT */ + YYSYMBOL_DELETE = 22, /* DELETE */ + YYSYMBOL_UPDATE = 23, /* UPDATE */ + YYSYMBOL_LBRACE = 24, /* LBRACE */ + YYSYMBOL_RBRACE = 25, /* RBRACE */ + YYSYMBOL_COMMA = 26, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 30, /* INT_T */ + YYSYMBOL_IN = 31, /* IN */ + YYSYMBOL_STRING_T = 32, /* STRING_T */ + YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ + YYSYMBOL_DATE_T = 34, /* DATE_T */ + YYSYMBOL_TEXT_T = 35, /* TEXT_T */ + YYSYMBOL_NOT = 36, /* NOT */ + YYSYMBOL_UNIQUE = 37, /* UNIQUE */ + YYSYMBOL_NULL_T = 38, /* NULL_T */ + YYSYMBOL_NULLABLE = 39, /* NULLABLE */ + YYSYMBOL_HELP = 40, /* HELP */ + YYSYMBOL_EXIT = 41, /* EXIT */ + YYSYMBOL_DOT = 42, /* DOT */ + YYSYMBOL_INTO = 43, /* INTO */ + YYSYMBOL_VALUES = 44, /* VALUES */ + YYSYMBOL_FROM = 45, /* FROM */ + YYSYMBOL_WHERE = 46, /* WHERE */ + YYSYMBOL_AND = 47, /* AND */ + YYSYMBOL_OR = 48, /* OR */ + YYSYMBOL_SET = 49, /* SET */ + YYSYMBOL_ON = 50, /* ON */ + YYSYMBOL_LOAD = 51, /* LOAD */ + YYSYMBOL_DATA = 52, /* DATA */ + YYSYMBOL_INFILE = 53, /* INFILE */ + YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ + YYSYMBOL_STORAGE = 55, /* STORAGE */ + YYSYMBOL_FORMAT = 56, /* FORMAT */ + YYSYMBOL_INNER = 57, /* INNER */ + YYSYMBOL_JOIN = 58, /* JOIN */ + YYSYMBOL_EQ = 59, /* EQ */ + YYSYMBOL_LT = 60, /* LT */ + YYSYMBOL_GT = 61, /* GT */ + YYSYMBOL_LE = 62, /* LE */ + YYSYMBOL_GE = 63, /* GE */ + YYSYMBOL_NE = 64, /* NE */ + YYSYMBOL_LIKE = 65, /* LIKE */ + YYSYMBOL_IS = 66, /* IS */ + YYSYMBOL_NUMBER = 67, /* NUMBER */ + YYSYMBOL_FLOAT = 68, /* FLOAT */ + YYSYMBOL_ID = 69, /* ID */ + YYSYMBOL_SSS = 70, /* SSS */ + YYSYMBOL_71_ = 71, /* '+' */ + YYSYMBOL_72_ = 72, /* '-' */ + YYSYMBOL_73_ = 73, /* '*' */ + YYSYMBOL_74_ = 74, /* '/' */ + YYSYMBOL_UMINUS = 75, /* UMINUS */ + YYSYMBOL_YYACCEPT = 76, /* $accept */ + YYSYMBOL_commands = 77, /* commands */ + YYSYMBOL_command_wrapper = 78, /* command_wrapper */ + YYSYMBOL_exit_stmt = 79, /* exit_stmt */ + YYSYMBOL_help_stmt = 80, /* help_stmt */ + YYSYMBOL_sync_stmt = 81, /* sync_stmt */ + YYSYMBOL_begin_stmt = 82, /* begin_stmt */ + YYSYMBOL_commit_stmt = 83, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 84, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 85, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 86, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 87, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 88, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 89, /* create_index_stmt */ + YYSYMBOL_opt_unique = 90, /* opt_unique */ + YYSYMBOL_attr_list = 91, /* attr_list */ + YYSYMBOL_drop_index_stmt = 92, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 93, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 94, /* attr_def_list */ + YYSYMBOL_attr_def = 95, /* attr_def */ + YYSYMBOL_nullable_constraint = 96, /* nullable_constraint */ + YYSYMBOL_number = 97, /* number */ + YYSYMBOL_type = 98, /* type */ + YYSYMBOL_insert_stmt = 99, /* insert_stmt */ + YYSYMBOL_values_list = 100, /* values_list */ + YYSYMBOL_value_list = 101, /* value_list */ + YYSYMBOL_value = 102, /* value */ + YYSYMBOL_storage_format = 103, /* storage_format */ + YYSYMBOL_delete_stmt = 104, /* delete_stmt */ + YYSYMBOL_update_stmt = 105, /* update_stmt */ + YYSYMBOL_setClauses = 106, /* setClauses */ + YYSYMBOL_setClause = 107, /* setClause */ + YYSYMBOL_select_stmt = 108, /* select_stmt */ + YYSYMBOL_calc_stmt = 109, /* calc_stmt */ + YYSYMBOL_expression_list = 110, /* expression_list */ + YYSYMBOL_expression = 111, /* expression */ + YYSYMBOL_alias = 112, /* alias */ + YYSYMBOL_aggr_func_expr = 113, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 114, /* sub_query_expr */ + YYSYMBOL_rel_attr = 115, /* rel_attr */ + YYSYMBOL_relation = 116, /* relation */ + YYSYMBOL_rel_list = 117, /* rel_list */ + YYSYMBOL_joinClauses = 118, /* joinClauses */ + YYSYMBOL_where = 119, /* where */ + YYSYMBOL_condition = 120, /* condition */ + YYSYMBOL_comp_op = 121, /* comp_op */ + YYSYMBOL_opt_order_by = 122, /* opt_order_by */ + YYSYMBOL_sort_list = 123, /* sort_list */ + YYSYMBOL_sort_unit = 124, /* sort_unit */ + YYSYMBOL_group_by = 125, /* group_by */ + YYSYMBOL_opt_having = 126, /* opt_having */ + YYSYMBOL_load_data_stmt = 127, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 128, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 129, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 130 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; + + + #ifdef short -#undef short +# undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -280,11 +295,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -#include /* INFRINGES ON USER NAME SPACE */ -#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_STDINT_H -#endif +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -314,15 +329,16 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -#undef UINT_LEAST8_MAX -#undef UINT_LEAST16_MAX -#define UINT_LEAST8_MAX 255 -#define UINT_LEAST16_MAX 65535 +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -332,7 +348,8 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -341,38 +358,42 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -#define YYPTRDIFF_T __PTRDIFF_TYPE__ -#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -#elif defined PTRDIFF_MAX -#ifndef ptrdiff_t -#include /* INFRINGES ON USER NAME SPACE */ -#endif -#define YYPTRDIFF_T ptrdiff_t -#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -#else -#define YYPTRDIFF_T long -#define YYPTRDIFF_MAXIMUM LONG_MAX -#endif +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T -#ifdef __SIZE_TYPE__ -#define YYSIZE_T __SIZE_TYPE__ -#elif defined size_t -#define YYSIZE_T size_t -#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YYSIZE_T size_t -#else -#define YYSIZE_T unsigned -#endif +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -381,2502 +402,595 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -#if defined YYENABLE_NLS && YYENABLE_NLS -#if ENABLE_NLS -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_(Msgid) dgettext("bison-runtime", Msgid) -#endif -#endif -#ifndef YY_ -#define YY_(Msgid) Msgid -#endif +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif #endif + #ifndef YY_ATTRIBUTE_PURE -#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) -#else -#define YY_ATTRIBUTE_PURE -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define YY_ATTRIBUTE_UNUSED -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if !defined lint || defined __GNUC__ -#define YY_USE(E) ((void)(E)) +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) #else -#define YY_USE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -#endif -#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") -#else -#define YY_INITIAL_VALUE(Value) Value +# define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_END +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -#define YY_INITIAL_VALUE(Value) /* Nothing. */ +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ -#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") -#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_END +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END #endif -#define YY_ASSERT(E) ((void)(0 && (E))) + +#define YY_ASSERT(E) ((void) (0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -#ifdef YYSTACK_USE_ALLOCA -#if YYSTACK_USE_ALLOCA -#ifdef __GNUC__ -#define YYSTACK_ALLOC __builtin_alloca -#elif defined __BUILTIN_VA_ARG_INCR -#include /* INFRINGES ON USER NAME SPACE */ -#elif defined _AIX -#define YYSTACK_ALLOC __alloca -#elif defined _MSC_VER -#include /* INFRINGES ON USER NAME SPACE */ -#define alloca _alloca -#else -#define YYSTACK_ALLOC alloca -#if !defined _ALLOCA_H && !defined EXIT_SUCCESS -#include /* INFRINGES ON USER NAME SPACE */ -/* Use EXIT_SUCCESS as a witness for stdlib.h. */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#endif -#endif -#endif - -#ifdef YYSTACK_ALLOC -/* Pacify GCC's 'empty if-body' warning. */ -#define YYSTACK_FREE(Ptr) \ - do { /* empty */ \ - ; \ - } while (0) -#ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -#endif -#else -#define YYSTACK_ALLOC YYMALLOC -#define YYSTACK_FREE YYFREE -#ifndef YYSTACK_ALLOC_MAXIMUM -#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -#endif -#if (defined __cplusplus && !defined EXIT_SUCCESS && \ - !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) -#include /* INFRINGES ON USER NAME SPACE */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef YYMALLOC -#define YYMALLOC malloc -#if !defined malloc && !defined EXIT_SUCCESS -void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#ifndef YYFREE -#define YYFREE free -#if !defined free && !defined EXIT_SUCCESS -void free(void *); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#endif +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif #endif /* 1 */ -#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ - defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -#define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) -#define YYCOPY_NEEDED 1 +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF(*yyptr); \ - } while (0) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -#ifndef YYCOPY -#if defined __GNUC__ && 1 < __GNUC__ -#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) -#else -#define YYCOPY(Dst, Src, Count) \ - do { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } while (0) -#endif -#endif +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 71 +#define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 254 +#define YYLAST 255 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 75 +#define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 54 +#define YYNNTS 55 /* YYNRULES -- Number of rules. */ -#define YYNRULES 136 +#define YYNRULES 138 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 240 +#define YYNSTATES 243 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 325 +#define YYMAXUTOK 326 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = {0, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 72, - 70, - 2, - 71, - 2, - 73, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 74}; +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 73, 71, 2, 72, 2, 74, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 75 +}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = {0, - 227, - 227, - 235, - 236, - 237, - 238, - 239, - 240, - 241, - 242, - 243, - 244, - 245, - 246, - 247, - 248, - 249, - 250, - 251, - 252, - 253, - 254, - 255, - 259, - 265, - 270, - 276, - 282, - 288, - 294, - 301, - 307, - 315, - 325, - 340, - 341, - 345, - 351, - 360, - 370, - 391, - 402, - 405, - 418, - 430, - 457, - 461, - 465, - 470, - 476, - 480, - 481, - 482, - 483, - 484, - 488, - 501, - 507, - 514, - 520, - 528, - 532, - 536, - 542, - 549, - 552, - 559, - 571, - 585, - 590, - 597, - 607, - 636, - 669, - 675, - 684, - 687, - 696, - 712, - 715, - 718, - 721, - 724, - 733, - 736, - 741, - 747, - 750, - 753, - 756, - 763, - 766, - 769, - 774, - 781, - 788, - 793, - 803, - 809, - 819, - 836, - 843, - 855, - 858, - 864, - 868, - 875, - 879, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 904, - 907, - 915, - 920, - 928, - 934, - 940, - 950, - 953, - 959, - 972, - 980, - 990, - 991}; +static const yytype_int16 yyrline[] = +{ + 0, 229, 229, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 261, 267, 272, 278, 284, 290, + 296, 303, 309, 317, 327, 342, 343, 347, 353, 362, + 372, 393, 404, 407, 420, 432, 459, 463, 467, 472, + 478, 482, 483, 484, 485, 486, 490, 503, 509, 516, + 522, 530, 534, 538, 544, 551, 554, 561, 573, 587, + 592, 599, 609, 642, 675, 681, 690, 693, 702, 718, + 721, 724, 727, 730, 739, 742, 747, 753, 756, 759, + 762, 769, 772, 775, 780, 787, 794, 799, 809, 815, + 825, 842, 849, 861, 864, 870, 874, 881, 885, 892, + 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, + 903, 904, 905, 910, 913, 921, 926, 934, 940, 946, + 956, 959, 967, 970, 977, 990, 998, 1008, 1009 +}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = {"\"end of file\"", - "error", - "\"invalid token\"", - "SEMICOLON", - "AS", - "ASC", - "BY", - "CREATE", - "DROP", - "EXISTS", - "GROUP", - "ORDER", - "TABLE", - "TABLES", - "INDEX", - "CALC", - "SELECT", - "DESC", - "SHOW", - "SYNC", - "INSERT", - "DELETE", - "UPDATE", - "LBRACE", - "RBRACE", - "COMMA", - "TRX_BEGIN", - "TRX_COMMIT", - "TRX_ROLLBACK", - "INT_T", - "IN", - "STRING_T", - "FLOAT_T", - "DATE_T", - "TEXT_T", - "NOT", - "UNIQUE", - "NULL_T", - "NULLABLE", - "HELP", - "EXIT", - "DOT", - "INTO", - "VALUES", - "FROM", - "WHERE", - "AND", - "OR", - "SET", - "ON", - "LOAD", - "DATA", - "INFILE", - "EXPLAIN", - "STORAGE", - "FORMAT", - "INNER", - "JOIN", - "EQ", - "LT", - "GT", - "LE", - "GE", - "NE", - "LIKE", - "IS", - "NUMBER", - "FLOAT", - "ID", - "SSS", - "'+'", - "'-'", - "'*'", - "'/'", - "UMINUS", - "$accept", - "commands", - "command_wrapper", - "exit_stmt", - "help_stmt", - "sync_stmt", - "begin_stmt", - "commit_stmt", - "rollback_stmt", - "drop_table_stmt", - "show_tables_stmt", - "desc_table_stmt", - "show_index_stmt", - "create_index_stmt", - "opt_unique", - "attr_list", - "drop_index_stmt", - "create_table_stmt", - "attr_def_list", - "attr_def", - "nullable_constraint", - "number", - "type", - "insert_stmt", - "values_list", - "value_list", - "value", - "storage_format", - "delete_stmt", - "update_stmt", - "setClauses", - "setClause", - "select_stmt", - "calc_stmt", - "expression_list", - "expression", - "alias", - "aggr_func_expr", - "sub_query_expr", - "rel_attr", - "relation", - "rel_list", - "joinClauses", - "where", - "condition", - "comp_op", - "opt_order_by", - "sort_list", - "sort_unit", - "group_by", - "load_data_stmt", - "explain_stmt", - "set_variable_stmt", - "opt_semicolon", - YY_NULLPTR}; - -static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "HAVING", "ORDER", + "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", + "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", + "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", + "DATE_T", "TEXT_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", + "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", + "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", + "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", + "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", + "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", + "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", + "show_tables_stmt", "desc_table_stmt", "show_index_stmt", + "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", + "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", + "number", "type", "insert_stmt", "values_list", "value_list", "value", + "storage_format", "delete_stmt", "update_stmt", "setClauses", + "setClause", "select_stmt", "calc_stmt", "expression_list", "expression", + "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", "relation", + "rel_list", "joinClauses", "where", "condition", "comp_op", + "opt_order_by", "sort_list", "sort_unit", "group_by", "opt_having", + "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -#define YYPACT_NINF (-165) +#define YYPACT_NINF (-166) -#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) 0 +#define yytable_value_is_error(Yyn) \ + 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {177, - 5, - 34, - -15, - -15, - -49, - 46, - -165, - -16, - 18, - -13, - -165, - -165, - -165, - -165, - -165, - 10, - 13, - 177, - 69, - 94, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - 40, - -165, - 97, - 55, - 59, - 91, - -165, - -165, - -165, - 9, - -165, - -15, - -165, - -165, - -165, - 0, - -165, - -165, - -165, - 95, - -165, - -165, - 96, - 61, - 70, - 93, - 87, - 98, - -165, - -165, - -165, - -165, - 16, - 78, - -165, - 99, - -15, - 119, - 123, - -15, - -47, - -165, - 81, - -165, - -15, - -15, - -15, - -15, - 126, - 84, - 84, - 110, - 132, - 88, - -22, - 112, - 138, - 114, - 106, - 118, - 95, - -165, - -165, - 156, - -165, - -165, - -165, - 49, - 49, - -165, - -165, - -15, - -165, - 7, - 132, - -165, - 164, - 107, - -165, - 130, - -7, - -165, - -165, - 147, - -165, - 86, - 165, - 133, - -165, - -165, - -165, - 143, - 181, - 192, - -22, - 182, - -165, - -165, - 1, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - 173, - 31, - 85, - -15, - -15, - 88, - -165, - 197, - -165, - -165, - -165, - -165, - -165, - 75, - 114, - 186, - 188, - 84, - 84, - 206, - 202, - 109, - -165, - 191, - -165, - -165, - -165, - -165, - -15, - 107, - 107, - 15, - 15, - -165, - 150, - 149, - 183, - -165, - -165, - -165, - 165, - 167, - 151, - 174, - 132, - 8, - -165, - -15, - 216, - -165, - -165, - -22, - -22, - 15, - -165, - 178, - -165, - -165, - 204, - -165, - -165, - 171, - -165, - 207, - 205, - 107, - 192, - -165, - -15, - -165, - 111, - -8, - 175, - 151, - -165, - -23, - -165, - 11, - -165, - 209, - -165, - -165, - 163, - -165, - 179, - -165, - -165, - -15, - -165, - 84, - -165, - -165}; +static const yytype_int16 yypact[] = +{ + 179, -5, 32, 84, 84, -55, 10, -166, -22, 9, + -29, -166, -166, -166, -166, -166, -7, 46, 179, 51, + 79, -166, -166, -166, -166, -166, -166, -166, -166, -166, + -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, + -166, -166, 38, -166, 105, 52, 54, 112, -166, -166, + -166, -9, -166, 84, -166, -166, -166, 12, -166, -166, + -166, 85, -166, -166, 86, 58, 63, 88, 74, 81, + -166, -166, -166, -166, 14, 69, -166, 89, 84, 116, + 118, 84, -50, -166, 76, -166, 84, 84, 84, 84, + 120, 78, 78, 111, 102, 80, -18, 90, 141, 93, + 109, 114, 85, -166, -166, 153, -166, -166, -166, 37, + 37, -166, -166, 84, -166, 6, 102, -166, 165, 104, + -166, 131, 0, -166, -166, 149, -166, 82, 167, 125, + -166, -166, -166, 145, 178, 195, -18, 183, -166, -166, + 13, -166, -166, -166, -166, -166, -166, -166, 174, 30, + 71, 84, 84, 80, -166, 198, -166, -166, -166, -166, + -166, 17, 93, 187, 189, 78, 78, 208, 204, 39, + -166, 192, -166, -166, -166, -166, 84, 104, 104, -44, + -44, -166, 148, 151, 184, -166, -166, -166, 167, 166, + 154, 175, 102, 7, -166, 84, 104, 212, -166, -18, + -18, -44, -166, 180, -166, -166, 201, -166, -166, 173, + -166, 205, 207, 104, 195, -166, 71, 228, -166, -166, + 43, 21, 176, 154, -166, 40, -166, 84, -166, -166, + 168, -166, 181, -1, -166, 210, -166, 78, -166, -166, + 84, -166, -166 +}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = {0, - 36, - 0, - 76, - 76, - 0, - 0, - 26, - 0, - 0, - 0, - 27, - 28, - 29, - 25, - 24, - 0, - 0, - 0, - 0, - 135, - 23, - 22, - 15, - 16, - 17, - 18, - 9, - 10, - 11, - 14, - 12, - 13, - 8, - 5, - 7, - 6, - 4, - 3, - 19, - 20, - 21, - 0, - 35, - 0, - 0, - 0, - 76, - 64, - 61, - 62, - 96, - 63, - 0, - 87, - 85, - 74, - 91, - 89, - 90, - 86, - 75, - 32, - 31, - 0, - 0, - 0, - 0, - 0, - 0, - 133, - 1, - 136, - 2, - 0, - 0, - 30, - 0, - 76, - 0, - 0, - 76, - 0, - 84, - 0, - 92, - 0, - 0, - 0, - 0, - 77, - 0, - 0, - 0, - 103, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 95, - 83, - 0, - 97, - 88, - 93, - 79, - 80, - 81, - 82, - 76, - 98, - 91, - 103, - 33, - 0, - 0, - 67, - 0, - 103, - 69, - 134, - 0, - 41, - 0, - 42, - 0, - 39, - 94, - 78, - 0, - 99, - 130, - 0, - 56, - 121, - 119, - 0, - 109, - 110, - 111, - 112, - 113, - 114, - 117, - 115, - 0, - 104, - 0, - 0, - 0, - 68, - 0, - 51, - 52, - 53, - 54, - 55, - 49, - 0, - 0, - 0, - 0, - 0, - 0, - 123, - 0, - 59, - 0, - 122, - 120, - 118, - 116, - 0, - 0, - 0, - 106, - 71, - 70, - 0, - 0, - 0, - 48, - 47, - 45, - 42, - 65, - 0, - 0, - 103, - 91, - 100, - 76, - 0, - 72, - 57, - 0, - 0, - 105, - 107, - 108, - 132, - 50, - 0, - 46, - 43, - 0, - 40, - 37, - 0, - 0, - 130, - 131, - 0, - 60, - 0, - 49, - 0, - 0, - 34, - 101, - 73, - 127, - 124, - 125, - 58, - 44, - 0, - 38, - 0, - 129, - 128, - 0, - 66, - 0, - 126, - 102}; +static const yytype_uint8 yydefact[] = +{ + 0, 36, 0, 76, 76, 0, 0, 26, 0, 0, + 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, + 137, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, + 20, 21, 0, 35, 0, 0, 0, 76, 64, 61, + 62, 96, 63, 0, 87, 85, 74, 91, 89, 90, + 86, 75, 32, 31, 0, 0, 0, 0, 0, 0, + 135, 1, 138, 2, 0, 0, 30, 0, 76, 0, + 0, 76, 0, 84, 0, 92, 0, 0, 0, 0, + 77, 0, 0, 0, 103, 0, 0, 0, 0, 0, + 0, 0, 0, 95, 83, 0, 97, 88, 93, 79, + 80, 81, 82, 76, 98, 91, 103, 33, 0, 0, + 67, 0, 103, 69, 136, 0, 41, 0, 42, 0, + 39, 94, 78, 0, 99, 130, 0, 56, 121, 119, + 0, 109, 110, 111, 112, 113, 114, 117, 115, 0, + 104, 0, 0, 0, 68, 0, 51, 52, 53, 54, + 55, 49, 0, 0, 0, 0, 0, 0, 132, 0, + 59, 0, 122, 120, 118, 116, 0, 0, 0, 106, + 71, 70, 0, 0, 0, 48, 47, 45, 42, 65, + 0, 0, 103, 91, 100, 76, 0, 123, 57, 0, + 0, 105, 107, 108, 134, 50, 0, 46, 43, 0, + 40, 37, 0, 0, 130, 131, 133, 0, 72, 60, + 0, 49, 0, 0, 34, 101, 73, 0, 58, 44, + 0, 38, 0, 127, 124, 125, 66, 0, 129, 128, + 0, 102, 126 +}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-165, - -165, - 217, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - -165, - 17, - -165, - -165, - 51, - 79, - 21, - -165, - -165, - -165, - -165, - 37, - -94, - -165, - -165, - -165, - -165, - 89, - -40, - -165, - -4, - -52, - 187, - -165, - -165, - -165, - -86, - 77, - 12, - -113, - -164, - 101, - -165, - 19, - -165, - 32, - -165, - -165, - -165, - -165}; +static const yytype_int16 yypgoto[] = +{ + -166, -166, 220, -166, -166, -166, -166, -166, -166, -166, + -166, -166, -166, -166, -166, 18, -166, -166, 55, 83, + 19, -166, -166, -166, -166, 42, -94, -166, -166, -166, + -166, 91, -40, -166, -4, -52, 190, -166, -166, -166, + -86, 87, 11, -113, -165, 97, -166, 15, -166, 35, + -166, -166, -166, -166, -166 +}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = {0, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 44, - 212, - 32, - 33, - 163, - 128, - 187, - 206, - 161, - 34, - 137, - 169, - 55, - 210, - 35, - 36, - 122, - 123, - 37, - 38, - 56, - 57, - 134, - 58, - 59, - 60, - 191, - 116, - 192, - 120, - 150, - 151, - 197, - 226, - 227, - 168, - 39, - 40, - 41, - 73}; +static const yytype_uint8 yydefgoto[] = +{ + 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 44, 212, 32, 33, 163, 128, + 187, 206, 161, 34, 137, 169, 55, 210, 35, 36, + 122, 123, 37, 38, 56, 57, 134, 58, 59, 60, + 191, 116, 192, 120, 150, 151, 218, 234, 235, 168, + 197, 39, 40, 41, 73 +}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = {61, - 83, - 124, - 135, - 84, - 115, - 117, - 79, - 47, - 154, - 172, - 84, - 84, - 202, - 203, - 48, - 233, - 42, - 153, - 62, - 98, - 106, - 48, - 177, - 178, - 107, - 65, - 184, - 234, - 185, - 186, - 173, - 81, - 232, - 109, - 110, - 111, - 112, - 119, - 99, - 138, - 43, - 170, - 80, - 49, - 50, - 45, - 52, - 46, - 223, - 82, - 49, - 50, - 51, - 52, - 67, - 53, - 54, - 126, - 63, - 64, - 139, - 66, - 133, - 69, - 174, - 140, - 149, - 85, - 71, - 86, - 87, - 88, - 89, - 102, - 85, - 85, - 105, - 68, - 214, - 193, - 86, - 87, - 88, - 89, - 86, - 87, - 88, - 89, - 141, - 142, - 143, - 144, - 145, - 146, - 147, - 148, - 72, - 183, - 179, - 180, - 86, - 87, - 88, - 89, - 217, - 170, - 78, - 74, - 132, - 184, - 75, - 185, - 186, - 47, - 156, - 138, - 157, - 158, - 159, - 160, - 88, - 89, - 76, - 201, - 149, - 149, - 77, - 48, - 93, - 47, - 177, - 178, - 198, - 199, - 228, - 199, - 139, - 94, - 91, - 92, - 95, - 140, - 103, - 48, - 96, - 100, - 104, - 101, - 108, - 97, - 113, - 114, - 118, - 78, - 129, - 121, - 49, - 50, - 51, - 52, - 149, - 53, - 54, - 225, - 141, - 142, - 143, - 144, - 145, - 146, - 147, - 148, - 49, - 50, - 51, - 52, - 119, - 53, - 54, - 131, - 125, - 127, - 225, - 1, - 2, - 130, - 136, - 152, - 155, - 162, - 215, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 165, - 164, - 167, - 11, - 12, - 13, - 166, - 171, - 175, - 182, - 189, - 190, - 195, - 196, - 200, - 205, - 14, - 15, - 204, - 211, - 207, - 209, - 216, - 213, - 177, - 16, - 220, - 17, - 219, - 222, - 18, - 236, - 221, - 230, - 235, - 70, - 237, - 218, - 231, - 208, - 229, - 188, - 181, - 194, - 90, - 0, - 224, - 0, - 0, - 239, - 176, - 0, - 0, - 0, - 238}; - -static const yytype_int16 yycheck[] = {4, - 53, - 96, - 116, - 4, - 91, - 92, - 47, - 23, - 122, - 9, - 4, - 4, - 177, - 178, - 37, - 5, - 12, - 25, - 68, - 4, - 68, - 37, - 46, - 47, - 72, - 42, - 35, - 17, - 37, - 38, - 30, - 23, - 56, - 86, - 87, - 88, - 89, - 45, - 23, - 9, - 36, - 136, - 47, - 66, - 67, - 12, - 69, - 14, - 213, - 41, - 66, - 67, - 68, - 69, - 68, - 71, - 72, - 98, - 13, - 14, - 30, - 44, - 56, - 51, - 64, - 35, - 119, - 68, - 0, - 70, - 71, - 72, - 73, - 78, - 68, - 68, - 81, - 68, - 192, - 166, - 70, - 71, - 72, - 73, - 70, - 71, - 72, - 73, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 3, - 23, - 151, - 152, - 70, - 71, - 72, - 73, - 199, - 200, - 16, - 68, - 113, - 35, - 14, - 37, - 38, - 23, - 29, - 9, - 31, - 32, - 33, - 34, - 72, - 73, - 68, - 176, - 177, - 178, - 68, - 37, - 68, - 23, - 46, - 47, - 24, - 25, - 24, - 25, - 30, - 68, - 44, - 44, - 48, - 35, - 24, - 37, - 58, - 68, - 24, - 49, - 68, - 52, - 25, - 68, - 43, - 16, - 49, - 68, - 66, - 67, - 68, - 69, - 213, - 71, - 72, - 216, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 45, - 71, - 72, - 24, - 69, - 68, - 235, - 7, - 8, - 68, - 23, - 58, - 42, - 25, - 195, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 57, - 68, - 10, - 26, - 27, - 28, - 25, - 25, - 35, - 12, - 24, - 23, - 6, - 11, - 23, - 66, - 39, - 40, - 68, - 68, - 37, - 54, - 6, - 49, - 46, - 48, - 55, - 50, - 24, - 24, - 53, - 68, - 25, - 58, - 25, - 18, - 57, - 200, - 221, - 188, - 219, - 162, - 153, - 166, - 57, - -1, - 214, - -1, - -1, - 237, - 149, - -1, - -1, - -1, - 235}; +static const yytype_uint8 yytable[] = +{ + 61, 83, 124, 135, 238, 115, 117, 79, 42, 154, + 84, 84, 202, 203, 62, 81, 84, 239, 98, 106, + 48, 65, 172, 107, 63, 64, 153, 86, 87, 88, + 89, 216, 43, 82, 109, 110, 111, 112, 99, 138, + 67, 183, 170, 80, 173, 45, 119, 46, 225, 49, + 50, 71, 52, 184, 66, 185, 186, 184, 126, 185, + 186, 139, 68, 133, 198, 199, 140, 149, 228, 199, + 86, 87, 88, 89, 102, 85, 85, 105, 174, 214, + 193, 85, 72, 86, 87, 88, 89, 177, 178, 141, + 142, 143, 144, 145, 146, 147, 148, 232, 69, 179, + 180, 86, 87, 88, 89, 219, 170, 74, 47, 132, + 88, 89, 156, 138, 157, 158, 159, 160, 177, 178, + 75, 76, 48, 77, 201, 149, 149, 93, 47, 78, + 91, 92, 94, 96, 97, 139, 47, 95, 100, 101, + 140, 103, 48, 104, 149, 108, 113, 114, 119, 121, + 48, 49, 50, 51, 52, 118, 53, 54, 78, 129, + 125, 149, 127, 141, 142, 143, 144, 145, 146, 147, + 148, 49, 50, 51, 52, 233, 53, 54, 131, 49, + 50, 51, 52, 130, 53, 54, 1, 2, 233, 136, + 152, 215, 155, 162, 164, 3, 4, 5, 6, 7, + 8, 9, 10, 165, 166, 167, 11, 12, 13, 171, + 175, 182, 189, 190, 195, 196, 200, 204, 205, 14, + 15, 209, 207, 211, 217, 213, 221, 177, 16, 222, + 17, 223, 224, 18, 227, 230, 240, 236, 70, 237, + 229, 231, 220, 208, 181, 188, 176, 90, 241, 226, + 0, 0, 0, 194, 0, 242 +}; + +static const yytype_int16 yycheck[] = +{ + 4, 53, 96, 116, 5, 91, 92, 47, 13, 122, + 4, 4, 177, 178, 69, 24, 4, 18, 4, 69, + 38, 43, 9, 73, 14, 15, 26, 71, 72, 73, + 74, 196, 37, 42, 86, 87, 88, 89, 24, 9, + 69, 24, 136, 47, 31, 13, 46, 15, 213, 67, + 68, 0, 70, 36, 45, 38, 39, 36, 98, 38, + 39, 31, 69, 57, 25, 26, 36, 119, 25, 26, + 71, 72, 73, 74, 78, 69, 69, 81, 65, 192, + 166, 69, 3, 71, 72, 73, 74, 47, 48, 59, + 60, 61, 62, 63, 64, 65, 66, 57, 52, 151, + 152, 71, 72, 73, 74, 199, 200, 69, 24, 113, + 73, 74, 30, 9, 32, 33, 34, 35, 47, 48, + 15, 69, 38, 69, 176, 177, 178, 69, 24, 17, + 45, 45, 69, 59, 53, 31, 24, 49, 69, 50, + 36, 25, 38, 25, 196, 69, 26, 69, 46, 69, + 38, 67, 68, 69, 70, 44, 72, 73, 17, 50, + 70, 213, 69, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 227, 72, 73, 25, 67, + 68, 69, 70, 69, 72, 73, 7, 8, 240, 24, + 59, 195, 43, 26, 69, 16, 17, 18, 19, 20, + 21, 22, 23, 58, 26, 10, 27, 28, 29, 26, + 36, 13, 25, 24, 6, 11, 24, 69, 67, 40, + 41, 55, 38, 69, 12, 50, 25, 47, 49, 56, + 51, 26, 25, 54, 6, 59, 26, 69, 18, 58, + 221, 223, 200, 188, 153, 162, 149, 57, 237, 214, + -1, -1, -1, 166, -1, 240 +}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = {0, - 7, - 8, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 26, - 27, - 28, - 39, - 40, - 48, - 50, - 53, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 91, - 92, - 98, - 103, - 104, - 107, - 108, - 125, - 126, - 127, - 12, - 36, - 89, - 12, - 14, - 23, - 37, - 66, - 67, - 68, - 69, - 71, - 72, - 101, - 109, - 110, - 112, - 113, - 114, - 109, - 68, - 13, - 14, - 42, - 44, - 68, - 68, - 51, - 77, - 0, - 3, - 128, - 68, - 14, - 68, - 68, - 16, - 107, - 109, - 23, - 41, - 110, - 4, - 68, - 70, - 71, - 72, - 73, - 111, - 44, - 44, - 68, - 68, - 48, - 58, - 52, - 4, - 23, - 68, - 49, - 109, - 24, - 24, - 109, - 68, - 72, - 68, - 110, - 110, - 110, - 110, - 25, - 68, - 115, - 116, - 115, - 43, - 45, - 118, - 68, - 105, - 106, - 101, - 69, - 107, - 68, - 94, - 49, - 68, - 24, - 109, - 56, - 111, - 118, - 23, - 99, - 9, - 30, - 35, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 110, - 119, - 120, - 58, - 25, - 118, - 42, - 29, - 31, - 32, - 33, - 34, - 97, - 25, - 93, - 68, - 57, - 25, - 10, - 124, - 100, - 101, - 25, - 9, - 30, - 64, - 35, - 120, - 46, - 47, - 110, - 110, - 106, - 12, - 23, - 35, - 37, - 38, - 95, - 94, - 24, - 23, - 115, - 117, - 115, - 116, - 6, - 11, - 121, - 24, - 25, - 23, - 110, - 119, - 119, - 68, - 66, - 96, - 37, - 93, - 54, - 102, - 68, - 90, - 49, - 118, - 109, - 6, - 101, - 100, - 24, - 55, - 25, - 24, - 119, - 124, - 110, - 122, - 123, - 24, - 95, - 58, - 90, - 56, - 5, - 17, - 25, - 68, - 57, - 122, - 117}; +static const yytype_uint8 yystos[] = +{ + 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, + 23, 27, 28, 29, 40, 41, 49, 51, 54, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 92, 93, 99, 104, 105, 108, 109, 127, + 128, 129, 13, 37, 90, 13, 15, 24, 38, 67, + 68, 69, 70, 72, 73, 102, 110, 111, 113, 114, + 115, 110, 69, 14, 15, 43, 45, 69, 69, 52, + 78, 0, 3, 130, 69, 15, 69, 69, 17, 108, + 110, 24, 42, 111, 4, 69, 71, 72, 73, 74, + 112, 45, 45, 69, 69, 49, 59, 53, 4, 24, + 69, 50, 110, 25, 25, 110, 69, 73, 69, 111, + 111, 111, 111, 26, 69, 116, 117, 116, 44, 46, + 119, 69, 106, 107, 102, 70, 108, 69, 95, 50, + 69, 25, 110, 57, 112, 119, 24, 100, 9, 31, + 36, 59, 60, 61, 62, 63, 64, 65, 66, 111, + 120, 121, 59, 26, 119, 43, 30, 32, 33, 34, + 35, 98, 26, 94, 69, 58, 26, 10, 125, 101, + 102, 26, 9, 31, 65, 36, 121, 47, 48, 111, + 111, 107, 13, 24, 36, 38, 39, 96, 95, 25, + 24, 116, 118, 116, 117, 6, 11, 126, 25, 26, + 24, 111, 120, 120, 69, 67, 97, 38, 94, 55, + 103, 69, 91, 50, 119, 110, 120, 12, 122, 102, + 101, 25, 56, 26, 25, 120, 125, 6, 25, 96, + 59, 91, 57, 111, 123, 124, 69, 58, 5, 18, + 26, 118, 123 +}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = {0, - 75, - 76, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 89, - 90, - 90, - 91, - 92, - 92, - 93, - 93, - 94, - 94, - 95, - 95, - 95, - 95, - 96, - 97, - 97, - 97, - 97, - 97, - 98, - 99, - 99, - 100, - 100, - 101, - 101, - 101, - 101, - 102, - 102, - 103, - 104, - 105, - 105, - 106, - 107, - 107, - 108, - 108, - 109, - 109, - 109, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 110, - 111, - 111, - 111, - 112, - 113, - 114, - 114, - 115, - 116, - 116, - 117, - 117, - 118, - 118, - 119, - 119, - 119, - 119, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 120, - 121, - 121, - 122, - 122, - 123, - 123, - 123, - 124, - 124, - 125, - 126, - 127, - 128, - 128}; +static const yytype_uint8 yyr1[] = +{ + 0, 76, 77, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 90, 91, 91, 92, + 93, 93, 94, 94, 95, 95, 96, 96, 96, 96, + 97, 98, 98, 98, 98, 98, 99, 100, 100, 101, + 101, 102, 102, 102, 102, 103, 103, 104, 105, 106, + 106, 107, 108, 108, 109, 109, 110, 110, 110, 111, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, + 111, 112, 112, 112, 113, 114, 115, 115, 116, 117, + 117, 118, 118, 119, 119, 120, 120, 120, 120, 121, + 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 122, 122, 123, 123, 124, 124, 124, + 125, 125, 126, 126, 127, 128, 129, 130, 130 +}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = {0, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 3, - 2, - 2, - 4, - 9, - 1, - 0, - 1, - 3, - 5, - 8, - 5, - 0, - 3, - 6, - 3, - 2, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 5, - 3, - 5, - 1, - 3, - 1, - 1, - 1, - 1, - 0, - 4, - 4, - 5, - 1, - 3, - 3, - 7, - 9, - 2, - 2, - 0, - 2, - 4, - 3, - 3, - 3, - 3, - 3, - 2, - 1, - 1, - 1, - 3, - 1, - 1, - 0, - 1, - 2, - 4, - 3, - 1, - 3, - 1, - 2, - 4, - 3, - 6, - 0, - 2, - 3, - 2, - 3, - 3, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 0, - 3, - 1, - 3, - 1, - 2, - 2, - 0, - 3, - 7, - 2, - 4, - 0, - 1}; - -enum +static const yytype_int8 yyr2[] = { - YYENOMEM = -2 + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, + 8, 5, 0, 3, 6, 3, 2, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 5, 3, 5, 1, + 3, 1, 1, 1, 1, 0, 4, 4, 5, 1, + 3, 3, 8, 9, 2, 2, 0, 2, 4, 3, + 3, 3, 3, 3, 2, 1, 1, 1, 3, 1, + 1, 0, 1, 2, 4, 3, 1, 3, 1, 2, + 4, 3, 6, 0, 2, 3, 2, 3, 3, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, + 2, 1, 2, 0, 3, 1, 3, 1, 2, 2, + 0, 3, 0, 2, 7, 2, 4, 0, 1 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK(yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } else { \ - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -2888,131 +1002,151 @@ enum the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } else { \ - (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ - } \ - while (0) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* Enable debugging if requested. */ #if YYDEBUG -#ifndef YYFPRINTF -#include /* INFRINGES ON USER NAME SPACE */ -#define YYFPRINTF fprintf -#endif +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -#define YYDPRINTF(Args) \ - do { \ - if (yydebug) \ - YYFPRINTF Args; \ - } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YYLOCATION_PRINT +# ifndef YYLOCATION_PRINT -#if defined YY_LOCATION_PRINT +# if defined YY_LOCATION_PRINT -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) { - res += YYFPRINTF(yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF(yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) { - if (yylocp->first_line < yylocp->last_line) { - res += YYFPRINTF(yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF(yyo, ".%d", end_col); - } else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF(yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } return res; } -#define YYLOCATION_PRINT yy_location_print_ +# define YYLOCATION_PRINT yy_location_print_ -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -#else +# else -#define YYLOCATION_PRINT(File, Loc) ((void)0) -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT YYLOCATION_PRINT +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT + +# endif +# endif /* !defined YYLOCATION_PRINT */ -#endif -#endif /* !defined YYLOCATION_PRINT */ -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ - do { \ - if (yydebug) { \ - YYFPRINTF(stderr, "%s ", Title); \ - yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF(stderr, "\n"); \ - } \ - } while (0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { FILE *yyoutput = yyo; - YY_USE(yyoutput); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YYLOCATION_PRINT(yyo, yylocationp); - YYFPRINTF(yyo, ": "); - yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF(yyo, ")"); + YYLOCATION_PRINT (yyo, yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -3020,66 +1154,70 @@ static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *co | TOP (included). | `------------------------------------------------------------------*/ -static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF(stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) { - int yybot = *yybottom; - YYFPRINTF(stderr, " %d", yybot); - } - YYFPRINTF(stderr, "\n"); + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); } -#define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print((Bottom), (Top)); \ - } while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, - ParsedSqlResult *sql_result, void *scanner) +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF(stderr, " $%d = ", yyi + 1); - yy_symbol_print(stderr, - YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), - sql_string, - sql_result, - scanner); - YYFPRINTF(stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); + YYFPRINTF (stderr, "\n"); + } } -#define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ - } while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -#define YYDPRINTF(Args) ((void)0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -#define YY_STACK_PRINT(Bottom, Top) -#define YY_REDUCE_PRINT(Rule) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ + /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -3090,15 +1228,16 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif + /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -3107,59 +1246,69 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default(yyn)) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } + + + #ifndef yystrlen -#if defined __GLIBC__ && defined _STRING_H -#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) -#else +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ -static YYPTRDIFF_T yystrlen(const char *yystr) +static YYPTRDIFF_T +yystrlen (const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -#endif +# endif #endif #ifndef yystpcpy -#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -#define yystpcpy stpcpy -#else +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char *yystpcpy(char *yydest, const char *yysrc) +static char * +yystpcpy (char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -3167,7 +1316,7 @@ static char *yystpcpy(char *yydest, const char *yysrc) return yyd - 1; } -#endif +# endif #endif #ifndef yytnamerr @@ -3178,45 +1327,52 @@ static char *yystpcpy(char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) { - if (*yystr == '"') { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) { - case '\'': - case ',': goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes:; - } + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } if (yyres) - return yystpcpy(yyres, yystr) - yyres; + return yystpcpy (yyres, yystr) - yyres; else - return yystrlen(yystr); + return yystrlen (yystr); } #endif -static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -3243,17 +1399,19 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -3265,12 +1423,11 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) { - enum - { - YYARGS_MAX = 5 - }; + enum { YYARGS_MAX = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -3280,13 +1437,16 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) { -#define YYCASE_(N, S) \ - case N: yyformat = S; break + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -3295,118 +1455,134 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen(yyformat) - 2 * yycount + 1; + yysize = yystrlen (yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) { - YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) { - *yymsg_alloc = 2 * yysize; - if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } else { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } } return 0; } + /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, - const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YY_USE(yyvaluep); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + + + + /*----------. | yyparse. | `----------*/ -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +int +yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - /* Lookahead token kind. */ - int yychar; - - /* The semantic value of the lookahead symbol. */ - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ - YY_INITIAL_VALUE(static YYSTYPE yyval_default;) - YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); - - /* Location data for the lookahead symbol. */ - static YYLTYPE yyloc_default -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = {1, 1, 1, 1} -#endif - ; - YYLTYPE yylloc = yyloc_default; +/* Lookahead token kind. */ +int yychar; + - /* Number of syntax errors so far. */ - int yynerrs = 0; +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Number of syntax errors so far. */ + int yynerrs = 0; - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -3422,23 +1598,24 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF((stderr, "Starting parse\n")); + YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -3447,90 +1624,93 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) have just been pushed. So pushing a state here evens the stacks. */ yyssp++; + /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF((stderr, "Entering state %d\n", yystate)); - YY_ASSERT(0 <= yystate && yystate < YYNSTATES); + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST(yy_state_t, yystate); + *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else - { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -#if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow(YY_("memory exhausted"), - &yyss1, - yysize * YYSIZEOF(*yyssp), - &yyvs1, - yysize * YYSIZEOF(*yyvsp), - &yyls1, - yysize * YYSIZEOF(*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -#else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); - if (!yyptr) + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) YYNOMEM; - YYSTACK_RELOCATE(yyss_alloc, yyss); - YYSTACK_RELOCATE(yyvs_alloc, yyvs); - YYSTACK_RELOCATE(yyls_alloc, yyls); -#undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE(yyss1); - } -#endif + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + YYNOMEM; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ @@ -3540,34 +1720,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default(yyn)) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) { - YYDPRINTF((stderr, "Reading a token\n")); - yychar = yylex(&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF((stderr, "Now at end of input.\n")); - } else if (yychar == YYerror) { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { - yytoken = YYTRANSLATE(yychar); - YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -3575,12 +1761,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) { - if (yytable_value_is_error(yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -3588,7 +1775,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3599,6 +1786,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yychar = YYEMPTY; goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -3608,6 +1796,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) goto yyerrlab; goto yyreduce; + /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -3623,181 +1812,177 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1 - yylen]; + yyval = yyvsp[1-yylen]; /* Default location. */ - YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT(yyn); - switch (yyn) { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 228 "yacc_sql.y" + YY_REDUCE_PRINT (yyn); + switch (yyn) { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } -#line 1825 "yacc_sql.cpp" + case 2: /* commands: command_wrapper opt_semicolon */ +#line 230 "yacc_sql.y" + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } +#line 1830 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ -#line 259 "yacc_sql.y" - { + case 24: /* exit_stmt: EXIT */ +#line 261 "yacc_sql.y" + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1834 "yacc_sql.cpp" +#line 1839 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ -#line 265 "yacc_sql.y" - { + case 25: /* help_stmt: HELP */ +#line 267 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1842 "yacc_sql.cpp" +#line 1847 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ -#line 270 "yacc_sql.y" - { + case 26: /* sync_stmt: SYNC */ +#line 272 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1850 "yacc_sql.cpp" +#line 1855 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ -#line 276 "yacc_sql.y" - { + case 27: /* begin_stmt: TRX_BEGIN */ +#line 278 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1858 "yacc_sql.cpp" +#line 1863 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ -#line 282 "yacc_sql.y" - { + case 28: /* commit_stmt: TRX_COMMIT */ +#line 284 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1866 "yacc_sql.cpp" +#line 1871 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ -#line 288 "yacc_sql.y" - { + case 29: /* rollback_stmt: TRX_ROLLBACK */ +#line 290 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1874 "yacc_sql.cpp" +#line 1879 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ -#line 294 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + case 30: /* drop_table_stmt: DROP TABLE ID */ +#line 296 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1884 "yacc_sql.cpp" +#line 1889 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ -#line 301 "yacc_sql.y" - { + case 31: /* show_tables_stmt: SHOW TABLES */ +#line 303 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1892 "yacc_sql.cpp" +#line 1897 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ -#line 307 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + case 32: /* desc_table_stmt: DESC ID */ +#line 309 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1902 "yacc_sql.cpp" +#line 1907 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 316 "yacc_sql.y" + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ +#line 318 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1913 "yacc_sql.cpp" +#line 1918 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 326 "yacc_sql.y" + case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ +#line 328 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1929 "yacc_sql.cpp" +#line 1934 "yacc_sql.cpp" break; - case 35: /* opt_unique: UNIQUE */ -#line 340 "yacc_sql.y" - { - (yyval.unique) = true; - } -#line 1935 "yacc_sql.cpp" + case 35: /* opt_unique: UNIQUE */ +#line 342 "yacc_sql.y" + { (yyval.unique) = true; } +#line 1940 "yacc_sql.cpp" break; - case 36: /* opt_unique: %empty */ -#line 341 "yacc_sql.y" - { - (yyval.unique) = false; - } -#line 1941 "yacc_sql.cpp" + case 36: /* opt_unique: %empty */ +#line 343 "yacc_sql.y" + { (yyval.unique) = false; } +#line 1946 "yacc_sql.cpp" break; - case 37: /* attr_list: ID */ -#line 346 "yacc_sql.y" + case 37: /* attr_list: ID */ +#line 348 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1951 "yacc_sql.cpp" +#line 1956 "yacc_sql.cpp" break; - case 38: /* attr_list: ID COMMA attr_list */ -#line 352 "yacc_sql.y" + case 38: /* attr_list: ID COMMA attr_list */ +#line 354 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list) - ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 1961 "yacc_sql.cpp" +#line 1966 "yacc_sql.cpp" break; - case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 361 "yacc_sql.y" + case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ +#line 363 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1973 "yacc_sql.cpp" +#line 1978 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 371 "yacc_sql.y" + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ +#line 373 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-5].string); + create_table.relation_name = (yyvsp[-5].string); free((yyvsp[-5].string)); std::vector *src_attrs = (yyvsp[-2].attr_infos); @@ -3814,31 +1999,31 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); } } -#line 1998 "yacc_sql.cpp" +#line 2003 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID AS select_stmt */ -#line 392 "yacc_sql.y" + case 41: /* create_table_stmt: CREATE TABLE ID AS select_stmt */ +#line 394 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-2].string); + create_table.relation_name = (yyvsp[-2].string); free((yyvsp[-2].string)); create_table.create_table_select = std::move((yyvsp[0].sql_node)->selection); } -#line 2010 "yacc_sql.cpp" +#line 2015 "yacc_sql.cpp" break; - case 42: /* attr_def_list: %empty */ -#line 402 "yacc_sql.y" + case 42: /* attr_def_list: %empty */ +#line 404 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2018 "yacc_sql.cpp" +#line 2023 "yacc_sql.cpp" break; - case 43: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 406 "yacc_sql.y" + case 43: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 408 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -3848,29 +2033,29 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2032 "yacc_sql.cpp" +#line 2037 "yacc_sql.cpp" break; - case 44: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 419 "yacc_sql.y" + case 44: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ +#line 421 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; } free((yyvsp[-5].string)); } -#line 2048 "yacc_sql.cpp" +#line 2053 "yacc_sql.cpp" break; - case 45: /* attr_def: ID type nullable_constraint */ -#line 431 "yacc_sql.y" + case 45: /* attr_def: ID type nullable_constraint */ +#line 433 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -3892,93 +2077,81 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2076 "yacc_sql.cpp" +#line 2081 "yacc_sql.cpp" break; - case 46: /* nullable_constraint: NOT NULL_T */ -#line 458 "yacc_sql.y" + case 46: /* nullable_constraint: NOT NULL_T */ +#line 460 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2084 "yacc_sql.cpp" +#line 2089 "yacc_sql.cpp" break; - case 47: /* nullable_constraint: NULLABLE */ -#line 462 "yacc_sql.y" + case 47: /* nullable_constraint: NULLABLE */ +#line 464 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2092 "yacc_sql.cpp" +#line 2097 "yacc_sql.cpp" break; - case 48: /* nullable_constraint: NULL_T */ -#line 466 "yacc_sql.y" + case 48: /* nullable_constraint: NULL_T */ +#line 468 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2100 "yacc_sql.cpp" +#line 2105 "yacc_sql.cpp" break; - case 49: /* nullable_constraint: %empty */ -#line 470 "yacc_sql.y" + case 49: /* nullable_constraint: %empty */ +#line 472 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2108 "yacc_sql.cpp" +#line 2113 "yacc_sql.cpp" break; - case 50: /* number: NUMBER */ -#line 476 "yacc_sql.y" - { - (yyval.number) = (yyvsp[0].number); - } -#line 2114 "yacc_sql.cpp" + case 50: /* number: NUMBER */ +#line 478 "yacc_sql.y" + {(yyval.number) = (yyvsp[0].number);} +#line 2119 "yacc_sql.cpp" break; - case 51: /* type: INT_T */ -#line 480 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::INTS); - } -#line 2120 "yacc_sql.cpp" + case 51: /* type: INT_T */ +#line 482 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::INTS); } +#line 2125 "yacc_sql.cpp" break; - case 52: /* type: STRING_T */ -#line 481 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::CHARS); - } -#line 2126 "yacc_sql.cpp" + case 52: /* type: STRING_T */ +#line 483 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::CHARS); } +#line 2131 "yacc_sql.cpp" break; - case 53: /* type: FLOAT_T */ -#line 482 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::FLOATS); - } -#line 2132 "yacc_sql.cpp" + case 53: /* type: FLOAT_T */ +#line 484 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::FLOATS); } +#line 2137 "yacc_sql.cpp" break; - case 54: /* type: DATE_T */ -#line 483 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::DATES); - } -#line 2138 "yacc_sql.cpp" + case 54: /* type: DATE_T */ +#line 485 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 2143 "yacc_sql.cpp" break; - case 55: /* type: TEXT_T */ -#line 484 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::TEXTS); - } -#line 2144 "yacc_sql.cpp" + case 55: /* type: TEXT_T */ +#line 486 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::TEXTS); } +#line 2149 "yacc_sql.cpp" break; - case 56: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 489 "yacc_sql.y" + case 56: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 491 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -3986,117 +2159,117 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2158 "yacc_sql.cpp" +#line 2163 "yacc_sql.cpp" break; - case 57: /* values_list: LBRACE value_list RBRACE */ -#line 502 "yacc_sql.y" + case 57: /* values_list: LBRACE value_list RBRACE */ +#line 504 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2168 "yacc_sql.cpp" +#line 2173 "yacc_sql.cpp" break; - case 58: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 508 "yacc_sql.y" + case 58: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 510 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2177 "yacc_sql.cpp" +#line 2182 "yacc_sql.cpp" break; - case 59: /* value_list: value */ -#line 515 "yacc_sql.y" + case 59: /* value_list: value */ +#line 517 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2187 "yacc_sql.cpp" +#line 2192 "yacc_sql.cpp" break; - case 60: /* value_list: value_list COMMA value */ -#line 521 "yacc_sql.y" + case 60: /* value_list: value_list COMMA value */ +#line 523 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2196 "yacc_sql.cpp" +#line 2201 "yacc_sql.cpp" break; - case 61: /* value: NUMBER */ -#line 528 "yacc_sql.y" - { + case 61: /* value: NUMBER */ +#line 530 "yacc_sql.y" + { (yyval.value) = new Value((int)(yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2205 "yacc_sql.cpp" +#line 2210 "yacc_sql.cpp" break; - case 62: /* value: FLOAT */ -#line 532 "yacc_sql.y" - { + case 62: /* value: FLOAT */ +#line 534 "yacc_sql.y" + { (yyval.value) = new Value((float)(yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2214 "yacc_sql.cpp" +#line 2219 "yacc_sql.cpp" break; - case 63: /* value: SSS */ -#line 536 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); + case 63: /* value: SSS */ +#line 538 "yacc_sql.y" + { + char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2225 "yacc_sql.cpp" +#line 2230 "yacc_sql.cpp" break; - case 64: /* value: NULL_T */ -#line 542 "yacc_sql.y" - { + case 64: /* value: NULL_T */ +#line 544 "yacc_sql.y" + { (yyval.value) = new Value(NullValue()); } -#line 2233 "yacc_sql.cpp" +#line 2238 "yacc_sql.cpp" break; - case 65: /* storage_format: %empty */ -#line 549 "yacc_sql.y" + case 65: /* storage_format: %empty */ +#line 551 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2241 "yacc_sql.cpp" +#line 2246 "yacc_sql.cpp" break; - case 66: /* storage_format: STORAGE FORMAT EQ ID */ -#line 553 "yacc_sql.y" + case 66: /* storage_format: STORAGE FORMAT EQ ID */ +#line 555 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2249 "yacc_sql.cpp" +#line 2254 "yacc_sql.cpp" break; - case 67: /* delete_stmt: DELETE FROM ID where */ -#line 560 "yacc_sql.y" + case 67: /* delete_stmt: DELETE FROM ID where */ +#line 562 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); } free((yyvsp[-1].string)); } -#line 2262 "yacc_sql.cpp" +#line 2267 "yacc_sql.cpp" break; - case 68: /* update_stmt: UPDATE ID SET setClauses where */ -#line 572 "yacc_sql.y" + case 68: /* update_stmt: UPDATE ID SET setClauses where */ +#line 574 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -4105,60 +2278,64 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2277 "yacc_sql.cpp" +#line 2282 "yacc_sql.cpp" break; - case 69: /* setClauses: setClause */ -#line 586 "yacc_sql.y" + case 69: /* setClauses: setClause */ +#line 588 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2286 "yacc_sql.cpp" +#line 2291 "yacc_sql.cpp" break; - case 70: /* setClauses: setClauses COMMA setClause */ -#line 591 "yacc_sql.y" + case 70: /* setClauses: setClauses COMMA setClause */ +#line 593 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2294 "yacc_sql.cpp" +#line 2299 "yacc_sql.cpp" break; - case 71: /* setClause: ID EQ expression */ -#line 598 "yacc_sql.y" + case 71: /* setClause: ID EQ expression */ +#line 600 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2305 "yacc_sql.cpp" +#line 2310 "yacc_sql.cpp" break; - case 72: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_order_by */ -#line 608 "yacc_sql.y" + case 72: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ +#line 610 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); - if ((yyvsp[-5].expression_list) != nullptr) { - (yyval.sql_node)->selection.expressions.swap(*(yyvsp[-5].expression_list)); - delete (yyvsp[-5].expression_list); + if ((yyvsp[-6].expression_list) != nullptr) { + (yyval.sql_node)->selection.expressions.swap(*(yyvsp[-6].expression_list)); + delete (yyvsp[-6].expression_list); } - if ((yyvsp[-3].relation_list) != nullptr) { - (yyval.sql_node)->selection.relations.swap(*(yyvsp[-3].relation_list)); - delete (yyvsp[-3].relation_list); + if ((yyvsp[-4].relation_list) != nullptr) { + (yyval.sql_node)->selection.relations.swap(*(yyvsp[-4].relation_list)); + delete (yyvsp[-4].relation_list); } (yyval.sql_node)->selection.conditions = nullptr; - if ((yyvsp[-2].expression) != nullptr) { - (yyval.sql_node)->selection.conditions = std::unique_ptr((yyvsp[-2].expression)); + if ((yyvsp[-3].expression) != nullptr) { + (yyval.sql_node)->selection.conditions = std::unique_ptr((yyvsp[-3].expression)); } - if ((yyvsp[-1].expression_list) != nullptr) { - (yyval.sql_node)->selection.group_by.swap(*(yyvsp[-1].expression_list)); - delete (yyvsp[-1].expression_list); + if ((yyvsp[-2].expression_list) != nullptr) { + (yyval.sql_node)->selection.group_by.swap(*(yyvsp[-2].expression_list)); + delete (yyvsp[-2].expression_list); + } + + if ((yyvsp[-1].expression) != nullptr) { + (yyval.sql_node)->selection.having_conditions = std::unique_ptr((yyvsp[-1].expression)); } if ((yyvsp[0].orderby_list) != nullptr) { @@ -4166,11 +2343,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].orderby_list); } } -#line 2338 "yacc_sql.cpp" +#line 2347 "yacc_sql.cpp" break; - case 73: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 637 "yacc_sql.y" + case 73: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 643 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4184,8 +2361,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); - ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -4193,8 +2369,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -4202,39 +2377,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2372 "yacc_sql.cpp" +#line 2381 "yacc_sql.cpp" break; - case 74: /* calc_stmt: CALC expression_list */ -#line 670 "yacc_sql.y" + case 74: /* calc_stmt: CALC expression_list */ +#line 676 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2382 "yacc_sql.cpp" +#line 2391 "yacc_sql.cpp" break; - case 75: /* calc_stmt: SELECT expression_list */ -#line 676 "yacc_sql.y" + case 75: /* calc_stmt: SELECT expression_list */ +#line 682 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2392 "yacc_sql.cpp" +#line 2401 "yacc_sql.cpp" break; - case 76: /* expression_list: %empty */ -#line 684 "yacc_sql.y" - { + case 76: /* expression_list: %empty */ +#line 690 "yacc_sql.y" + { (yyval.expression_list) = new std::vector>; } -#line 2400 "yacc_sql.cpp" +#line 2409 "yacc_sql.cpp" break; - case 77: /* expression_list: expression alias */ -#line 688 "yacc_sql.y" + case 77: /* expression_list: expression alias */ +#line 694 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4243,11 +2418,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2413 "yacc_sql.cpp" +#line 2422 "yacc_sql.cpp" break; - case 78: /* expression_list: expression alias COMMA expression_list */ -#line 697 "yacc_sql.y" + case 78: /* expression_list: expression alias COMMA expression_list */ +#line 703 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4257,51 +2432,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2430 "yacc_sql.cpp" +#line 2439 "yacc_sql.cpp" break; - case 79: /* expression: expression '+' expression */ -#line 712 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 79: /* expression: expression '+' expression */ +#line 718 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2438 "yacc_sql.cpp" +#line 2447 "yacc_sql.cpp" break; - case 80: /* expression: expression '-' expression */ -#line 715 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 80: /* expression: expression '-' expression */ +#line 721 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2446 "yacc_sql.cpp" +#line 2455 "yacc_sql.cpp" break; - case 81: /* expression: expression '*' expression */ -#line 718 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 81: /* expression: expression '*' expression */ +#line 724 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2454 "yacc_sql.cpp" +#line 2463 "yacc_sql.cpp" break; - case 82: /* expression: expression '/' expression */ -#line 721 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 82: /* expression: expression '/' expression */ +#line 727 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2462 "yacc_sql.cpp" +#line 2471 "yacc_sql.cpp" break; - case 83: /* expression: LBRACE expression_list RBRACE */ -#line 724 "yacc_sql.y" - { + case 83: /* expression: LBRACE expression_list RBRACE */ +#line 730 "yacc_sql.y" + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -4310,485 +2481,469 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2476 "yacc_sql.cpp" +#line 2485 "yacc_sql.cpp" break; - case 84: /* expression: '-' expression */ -#line 733 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + case 84: /* expression: '-' expression */ +#line 739 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2484 "yacc_sql.cpp" +#line 2493 "yacc_sql.cpp" break; - case 85: /* expression: value */ -#line 736 "yacc_sql.y" - { + case 85: /* expression: value */ +#line 742 "yacc_sql.y" + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2494 "yacc_sql.cpp" +#line 2503 "yacc_sql.cpp" break; - case 86: /* expression: rel_attr */ -#line 741 "yacc_sql.y" - { + case 86: /* expression: rel_attr */ +#line 747 "yacc_sql.y" + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2505 "yacc_sql.cpp" +#line 2514 "yacc_sql.cpp" break; - case 87: /* expression: '*' */ -#line 747 "yacc_sql.y" - { + case 87: /* expression: '*' */ +#line 753 "yacc_sql.y" + { (yyval.expression) = new StarExpr(); } -#line 2513 "yacc_sql.cpp" +#line 2522 "yacc_sql.cpp" break; - case 88: /* expression: ID DOT '*' */ -#line 750 "yacc_sql.y" - { + case 88: /* expression: ID DOT '*' */ +#line 756 "yacc_sql.y" + { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2521 "yacc_sql.cpp" +#line 2530 "yacc_sql.cpp" break; - case 89: /* expression: aggr_func_expr */ -#line 753 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + case 89: /* expression: aggr_func_expr */ +#line 759 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2529 "yacc_sql.cpp" +#line 2538 "yacc_sql.cpp" break; - case 90: /* expression: sub_query_expr */ -#line 756 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + case 90: /* expression: sub_query_expr */ +#line 762 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2537 "yacc_sql.cpp" +#line 2546 "yacc_sql.cpp" break; - case 91: /* alias: %empty */ -#line 763 "yacc_sql.y" - { + case 91: /* alias: %empty */ +#line 769 "yacc_sql.y" + { (yyval.string) = nullptr; } -#line 2545 "yacc_sql.cpp" +#line 2554 "yacc_sql.cpp" break; - case 92: /* alias: ID */ -#line 766 "yacc_sql.y" - { + case 92: /* alias: ID */ +#line 772 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2553 "yacc_sql.cpp" +#line 2562 "yacc_sql.cpp" break; - case 93: /* alias: AS ID */ -#line 769 "yacc_sql.y" - { + case 93: /* alias: AS ID */ +#line 775 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2561 "yacc_sql.cpp" +#line 2570 "yacc_sql.cpp" break; - case 94: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 775 "yacc_sql.y" + case 94: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 781 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2569 "yacc_sql.cpp" +#line 2578 "yacc_sql.cpp" break; - case 95: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 782 "yacc_sql.y" + case 95: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 788 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2577 "yacc_sql.cpp" +#line 2586 "yacc_sql.cpp" break; - case 96: /* rel_attr: ID */ -#line 788 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 96: /* rel_attr: ID */ +#line 794 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2587 "yacc_sql.cpp" +#line 2596 "yacc_sql.cpp" break; - case 97: /* rel_attr: ID DOT ID */ -#line 793 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 97: /* rel_attr: ID DOT ID */ +#line 799 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2599 "yacc_sql.cpp" +#line 2608 "yacc_sql.cpp" break; - case 98: /* relation: ID */ -#line 803 "yacc_sql.y" - { + case 98: /* relation: ID */ +#line 809 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2607 "yacc_sql.cpp" +#line 2616 "yacc_sql.cpp" break; - case 99: /* rel_list: relation alias */ -#line 809 "yacc_sql.y" - { + case 99: /* rel_list: relation alias */ +#line 815 "yacc_sql.y" + { (yyval.relation_list) = new std::vector(); - if (nullptr != (yyvsp[0].string)) { - (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); free((yyvsp[0].string)); - } else { + }else{ (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); } -#line 2622 "yacc_sql.cpp" +#line 2631 "yacc_sql.cpp" break; - case 100: /* rel_list: relation alias COMMA rel_list */ -#line 819 "yacc_sql.y" - { + case 100: /* rel_list: relation alias COMMA rel_list */ +#line 825 "yacc_sql.y" + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if (nullptr != (yyvsp[-2].string)) { - (yyval.relation_list) - ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); free((yyvsp[-2].string)); - } else { + }else{ (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); } -#line 2641 "yacc_sql.cpp" +#line 2650 "yacc_sql.cpp" break; - case 101: /* joinClauses: relation ON condition */ -#line 837 "yacc_sql.y" + case 101: /* joinClauses: relation ON condition */ +#line 843 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2652 "yacc_sql.cpp" +#line 2661 "yacc_sql.cpp" break; - case 102: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 844 "yacc_sql.y" + case 102: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 850 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2664 "yacc_sql.cpp" +#line 2673 "yacc_sql.cpp" break; - case 103: /* where: %empty */ -#line 855 "yacc_sql.y" + case 103: /* where: %empty */ +#line 861 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2672 "yacc_sql.cpp" +#line 2681 "yacc_sql.cpp" break; - case 104: /* where: WHERE condition */ -#line 858 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + case 104: /* where: WHERE condition */ +#line 864 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); } -#line 2680 "yacc_sql.cpp" +#line 2689 "yacc_sql.cpp" break; - case 105: /* condition: expression comp_op expression */ -#line 865 "yacc_sql.y" + case 105: /* condition: expression comp_op expression */ +#line 871 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2688 "yacc_sql.cpp" +#line 2697 "yacc_sql.cpp" break; - case 106: /* condition: comp_op expression */ -#line 869 "yacc_sql.y" + case 106: /* condition: comp_op expression */ +#line 875 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); - (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2699 "yacc_sql.cpp" +#line 2708 "yacc_sql.cpp" break; - case 107: /* condition: condition AND condition */ -#line 876 "yacc_sql.y" + case 107: /* condition: condition AND condition */ +#line 882 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2707 "yacc_sql.cpp" +#line 2716 "yacc_sql.cpp" break; - case 108: /* condition: condition OR condition */ -#line 880 "yacc_sql.y" + case 108: /* condition: condition OR condition */ +#line 886 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2715 "yacc_sql.cpp" +#line 2724 "yacc_sql.cpp" break; - case 109: /* comp_op: EQ */ -#line 886 "yacc_sql.y" - { - (yyval.comp) = EQUAL_TO; - } -#line 2721 "yacc_sql.cpp" + case 109: /* comp_op: EQ */ +#line 892 "yacc_sql.y" + { (yyval.comp) = EQUAL_TO; } +#line 2730 "yacc_sql.cpp" break; - case 110: /* comp_op: LT */ -#line 887 "yacc_sql.y" - { - (yyval.comp) = LESS_THAN; - } -#line 2727 "yacc_sql.cpp" + case 110: /* comp_op: LT */ +#line 893 "yacc_sql.y" + { (yyval.comp) = LESS_THAN; } +#line 2736 "yacc_sql.cpp" break; - case 111: /* comp_op: GT */ -#line 888 "yacc_sql.y" - { - (yyval.comp) = GREAT_THAN; - } -#line 2733 "yacc_sql.cpp" + case 111: /* comp_op: GT */ +#line 894 "yacc_sql.y" + { (yyval.comp) = GREAT_THAN; } +#line 2742 "yacc_sql.cpp" break; - case 112: /* comp_op: LE */ -#line 889 "yacc_sql.y" - { - (yyval.comp) = LESS_EQUAL; - } -#line 2739 "yacc_sql.cpp" + case 112: /* comp_op: LE */ +#line 895 "yacc_sql.y" + { (yyval.comp) = LESS_EQUAL; } +#line 2748 "yacc_sql.cpp" break; - case 113: /* comp_op: GE */ -#line 890 "yacc_sql.y" - { - (yyval.comp) = GREAT_EQUAL; - } -#line 2745 "yacc_sql.cpp" + case 113: /* comp_op: GE */ +#line 896 "yacc_sql.y" + { (yyval.comp) = GREAT_EQUAL; } +#line 2754 "yacc_sql.cpp" break; - case 114: /* comp_op: NE */ -#line 891 "yacc_sql.y" - { - (yyval.comp) = NOT_EQUAL; - } -#line 2751 "yacc_sql.cpp" + case 114: /* comp_op: NE */ +#line 897 "yacc_sql.y" + { (yyval.comp) = NOT_EQUAL; } +#line 2760 "yacc_sql.cpp" break; - case 115: /* comp_op: IS */ -#line 892 "yacc_sql.y" - { - (yyval.comp) = IS_OP; - } -#line 2757 "yacc_sql.cpp" + case 115: /* comp_op: IS */ +#line 898 "yacc_sql.y" + { (yyval.comp) = IS_OP; } +#line 2766 "yacc_sql.cpp" break; - case 116: /* comp_op: IS NOT */ -#line 893 "yacc_sql.y" - { - (yyval.comp) = IS_NOT_OP; - } -#line 2763 "yacc_sql.cpp" + case 116: /* comp_op: IS NOT */ +#line 899 "yacc_sql.y" + { (yyval.comp) = IS_NOT_OP; } +#line 2772 "yacc_sql.cpp" break; - case 117: /* comp_op: LIKE */ -#line 894 "yacc_sql.y" - { - (yyval.comp) = LIKE_OP; - } -#line 2769 "yacc_sql.cpp" + case 117: /* comp_op: LIKE */ +#line 900 "yacc_sql.y" + { (yyval.comp) = LIKE_OP;} +#line 2778 "yacc_sql.cpp" break; - case 118: /* comp_op: NOT LIKE */ -#line 895 "yacc_sql.y" - { - (yyval.comp) = NOT_LIKE_OP; - } -#line 2775 "yacc_sql.cpp" + case 118: /* comp_op: NOT LIKE */ +#line 901 "yacc_sql.y" + {(yyval.comp) = NOT_LIKE_OP;} +#line 2784 "yacc_sql.cpp" break; - case 119: /* comp_op: IN */ -#line 896 "yacc_sql.y" - { - (yyval.comp) = IN_OP; - } -#line 2781 "yacc_sql.cpp" + case 119: /* comp_op: IN */ +#line 902 "yacc_sql.y" + { (yyval.comp) = IN_OP; } +#line 2790 "yacc_sql.cpp" break; - case 120: /* comp_op: NOT IN */ -#line 897 "yacc_sql.y" - { - (yyval.comp) = NOT_IN_OP; - } -#line 2787 "yacc_sql.cpp" + case 120: /* comp_op: NOT IN */ +#line 903 "yacc_sql.y" + { (yyval.comp) = NOT_IN_OP; } +#line 2796 "yacc_sql.cpp" break; - case 121: /* comp_op: EXISTS */ -#line 898 "yacc_sql.y" - { - (yyval.comp) = EXISTS_OP; - } -#line 2793 "yacc_sql.cpp" + case 121: /* comp_op: EXISTS */ +#line 904 "yacc_sql.y" + { (yyval.comp) = EXISTS_OP; } +#line 2802 "yacc_sql.cpp" break; - case 122: /* comp_op: NOT EXISTS */ -#line 899 "yacc_sql.y" - { - (yyval.comp) = NOT_EXISTS_OP; - } -#line 2799 "yacc_sql.cpp" + case 122: /* comp_op: NOT EXISTS */ +#line 905 "yacc_sql.y" + { (yyval.comp) = NOT_EXISTS_OP; } +#line 2808 "yacc_sql.cpp" break; - case 123: /* opt_order_by: %empty */ -#line 904 "yacc_sql.y" + case 123: /* opt_order_by: %empty */ +#line 910 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2807 "yacc_sql.cpp" +#line 2816 "yacc_sql.cpp" break; - case 124: /* opt_order_by: ORDER BY sort_list */ -#line 908 "yacc_sql.y" + case 124: /* opt_order_by: ORDER BY sort_list */ +#line 914 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2816 "yacc_sql.cpp" +#line 2825 "yacc_sql.cpp" break; - case 125: /* sort_list: sort_unit */ -#line 916 "yacc_sql.y" - { + case 125: /* sort_list: sort_unit */ +#line 922 "yacc_sql.y" + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } -#line 2825 "yacc_sql.cpp" + } +#line 2834 "yacc_sql.cpp" break; - case 126: /* sort_list: sort_unit COMMA sort_list */ -#line 921 "yacc_sql.y" - { + case 126: /* sort_list: sort_unit COMMA sort_list */ +#line 927 "yacc_sql.y" + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } -#line 2834 "yacc_sql.cpp" + } +#line 2843 "yacc_sql.cpp" break; - case 127: /* sort_unit: expression */ -#line 929 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + case 127: /* sort_unit: expression */ +#line 935 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2844 "yacc_sql.cpp" + } +#line 2853 "yacc_sql.cpp" break; - case 128: /* sort_unit: expression DESC */ -#line 935 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 128: /* sort_unit: expression DESC */ +#line 941 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } -#line 2854 "yacc_sql.cpp" + } +#line 2863 "yacc_sql.cpp" break; - case 129: /* sort_unit: expression ASC */ -#line 941 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 129: /* sort_unit: expression ASC */ +#line 947 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2864 "yacc_sql.cpp" + } +#line 2873 "yacc_sql.cpp" break; - case 130: /* group_by: %empty */ -#line 950 "yacc_sql.y" + case 130: /* group_by: %empty */ +#line 956 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2872 "yacc_sql.cpp" +#line 2881 "yacc_sql.cpp" break; - case 131: /* group_by: GROUP BY expression_list */ -#line 954 "yacc_sql.y" + case 131: /* group_by: GROUP BY expression_list */ +#line 960 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2880 "yacc_sql.cpp" +#line 2889 "yacc_sql.cpp" break; - case 132: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 960 "yacc_sql.y" + case 132: /* opt_having: %empty */ +#line 967 "yacc_sql.y" { - char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); + (yyval.expression) = nullptr; + } +#line 2897 "yacc_sql.cpp" + break; + + case 133: /* opt_having: HAVING condition */ +#line 971 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); + } +#line 2905 "yacc_sql.cpp" + break; - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + case 134: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 978 "yacc_sql.y" + { + char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2894 "yacc_sql.cpp" +#line 2919 "yacc_sql.cpp" break; - case 133: /* explain_stmt: EXPLAIN command_wrapper */ -#line 973 "yacc_sql.y" + case 135: /* explain_stmt: EXPLAIN command_wrapper */ +#line 991 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2903 "yacc_sql.cpp" +#line 2928 "yacc_sql.cpp" break; - case 134: /* set_variable_stmt: SET ID EQ value */ -#line 981 "yacc_sql.y" + case 136: /* set_variable_stmt: SET ID EQ value */ +#line 999 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2915 "yacc_sql.cpp" +#line 2940 "yacc_sql.cpp" break; -#line 2919 "yacc_sql.cpp" - default: break; - } +#line 2944 "yacc_sql.cpp" + + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -4800,9 +2955,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; @@ -4813,67 +2968,84 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) { - ++yynerrs; - { - yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) { - if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); - yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); - if (yymsg) { - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } - yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; } - } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } else { - yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; + } } - } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; + /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -4886,40 +3058,45 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) { - yyn = yypact[yystate]; - if (!yypact_value_is_default(yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - yystate = *yyssp; - YY_STACK_PRINT(yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -4927,14 +3104,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; + /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -4942,6 +3120,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 0; goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -4949,48 +3128,53 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 1; goto yyreturnlab; + /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; + /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE(yychar); - yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK(yylen); - YY_STACK_PRINT(yyss, yyssp); - while (yyssp != yyss) { - yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - } + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE(yyss); + YYSTACK_FREE (yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); + YYSTACK_FREE (yymsg); return yyresult; } -#line 993 "yacc_sql.y" +#line 1011 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) -{ +int sql_parse(const char *s, ParsedSqlResult *sql_result) { yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index c6c8b3e2..7f9edb38 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -#define YY_YY_YACC_SQL_HPP_INCLUDED +# define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -#define YYDEBUG 0 +# define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,124 +47,126 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -#define YYTOKENTYPE -enum yytokentype -{ - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - ORDER = 266, /* ORDER */ - TABLE = 267, /* TABLE */ - TABLES = 268, /* TABLES */ - INDEX = 269, /* INDEX */ - CALC = 270, /* CALC */ - SELECT = 271, /* SELECT */ - DESC = 272, /* DESC */ - SHOW = 273, /* SHOW */ - SYNC = 274, /* SYNC */ - INSERT = 275, /* INSERT */ - DELETE = 276, /* DELETE */ - UPDATE = 277, /* UPDATE */ - LBRACE = 278, /* LBRACE */ - RBRACE = 279, /* RBRACE */ - COMMA = 280, /* COMMA */ - TRX_BEGIN = 281, /* TRX_BEGIN */ - TRX_COMMIT = 282, /* TRX_COMMIT */ - TRX_ROLLBACK = 283, /* TRX_ROLLBACK */ - INT_T = 284, /* INT_T */ - IN = 285, /* IN */ - STRING_T = 286, /* STRING_T */ - FLOAT_T = 287, /* FLOAT_T */ - DATE_T = 288, /* DATE_T */ - TEXT_T = 289, /* TEXT_T */ - NOT = 290, /* NOT */ - UNIQUE = 291, /* UNIQUE */ - NULL_T = 292, /* NULL_T */ - NULLABLE = 293, /* NULLABLE */ - HELP = 294, /* HELP */ - EXIT = 295, /* EXIT */ - DOT = 296, /* DOT */ - INTO = 297, /* INTO */ - VALUES = 298, /* VALUES */ - FROM = 299, /* FROM */ - WHERE = 300, /* WHERE */ - AND = 301, /* AND */ - OR = 302, /* OR */ - SET = 303, /* SET */ - ON = 304, /* ON */ - LOAD = 305, /* LOAD */ - DATA = 306, /* DATA */ - INFILE = 307, /* INFILE */ - EXPLAIN = 308, /* EXPLAIN */ - STORAGE = 309, /* STORAGE */ - FORMAT = 310, /* FORMAT */ - INNER = 311, /* INNER */ - JOIN = 312, /* JOIN */ - EQ = 313, /* EQ */ - LT = 314, /* LT */ - GT = 315, /* GT */ - LE = 316, /* LE */ - GE = 317, /* GE */ - NE = 318, /* NE */ - LIKE = 319, /* LIKE */ - IS = 320, /* IS */ - NUMBER = 321, /* NUMBER */ - FLOAT = 322, /* FLOAT */ - ID = 323, /* ID */ - SSS = 324, /* SSS */ - UMINUS = 325 /* UMINUS */ -}; -typedef enum yytokentype yytoken_kind_t; +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + HAVING = 266, /* HAVING */ + ORDER = 267, /* ORDER */ + TABLE = 268, /* TABLE */ + TABLES = 269, /* TABLES */ + INDEX = 270, /* INDEX */ + CALC = 271, /* CALC */ + SELECT = 272, /* SELECT */ + DESC = 273, /* DESC */ + SHOW = 274, /* SHOW */ + SYNC = 275, /* SYNC */ + INSERT = 276, /* INSERT */ + DELETE = 277, /* DELETE */ + UPDATE = 278, /* UPDATE */ + LBRACE = 279, /* LBRACE */ + RBRACE = 280, /* RBRACE */ + COMMA = 281, /* COMMA */ + TRX_BEGIN = 282, /* TRX_BEGIN */ + TRX_COMMIT = 283, /* TRX_COMMIT */ + TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ + INT_T = 285, /* INT_T */ + IN = 286, /* IN */ + STRING_T = 287, /* STRING_T */ + FLOAT_T = 288, /* FLOAT_T */ + DATE_T = 289, /* DATE_T */ + TEXT_T = 290, /* TEXT_T */ + NOT = 291, /* NOT */ + UNIQUE = 292, /* UNIQUE */ + NULL_T = 293, /* NULL_T */ + NULLABLE = 294, /* NULLABLE */ + HELP = 295, /* HELP */ + EXIT = 296, /* EXIT */ + DOT = 297, /* DOT */ + INTO = 298, /* INTO */ + VALUES = 299, /* VALUES */ + FROM = 300, /* FROM */ + WHERE = 301, /* WHERE */ + AND = 302, /* AND */ + OR = 303, /* OR */ + SET = 304, /* SET */ + ON = 305, /* ON */ + LOAD = 306, /* LOAD */ + DATA = 307, /* DATA */ + INFILE = 308, /* INFILE */ + EXPLAIN = 309, /* EXPLAIN */ + STORAGE = 310, /* STORAGE */ + FORMAT = 311, /* FORMAT */ + INNER = 312, /* INNER */ + JOIN = 313, /* JOIN */ + EQ = 314, /* EQ */ + LT = 315, /* LT */ + GT = 316, /* GT */ + LE = 317, /* LE */ + GE = 318, /* GE */ + NE = 319, /* NE */ + LIKE = 320, /* LIKE */ + IS = 321, /* IS */ + NUMBER = 322, /* NUMBER */ + FLOAT = 323, /* FLOAT */ + ID = 324, /* ID */ + SSS = 325, /* SSS */ + UMINUS = 326 /* UMINUS */ + }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 132 "yacc_sql.y" - - ParsedSqlNode *sql_node; - Value *value; - enum CompOp comp; - RelAttrSqlNode *rel_attr; - std::vector *attr_infos; - AttrInfoSqlNode *attr_info; - Expression *expression; - std::vector> *expression_list; - std::vector *value_list; - std::vector> *values_list; - SetClauseSqlNode *set_clause; - std::vector *set_clauses; - JoinSqlNode *join_clauses; - std::vector *rel_attr_list; - std::vector *relation_list; - OrderBySqlNode *orderby_unit; - std::vector *orderby_list; - char *string; - int number; - float floats; - bool nullable_info; - std::vector *index_attr_list; - bool unique; - -#line 160 "yacc_sql.hpp" +#line 133 "yacc_sql.y" + + ParsedSqlNode * sql_node; + Value * value; + enum CompOp comp; + RelAttrSqlNode * rel_attr; + std::vector * attr_infos; + AttrInfoSqlNode * attr_info; + Expression * expression; + std::vector> * expression_list; + std::vector * value_list; + std::vector> * values_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; + JoinSqlNode * join_clauses; + std::vector * rel_attr_list; + std::vector * relation_list; + OrderBySqlNode * orderby_unit; + std::vector * orderby_list; + char * string; + int number; + float floats; + bool nullable_info; + std::vector * index_attr_list; + bool unique; + +#line 161 "yacc_sql.hpp" + }; typedef union YYSTYPE YYSTYPE; -#define YYSTYPE_IS_TRIVIAL 1 -#define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -173,10 +175,14 @@ struct YYLTYPE int last_line; int last_column; }; -#define YYLTYPE_IS_DECLARED 1 -#define YYLTYPE_IS_TRIVIAL 1 +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 #endif -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); + + + +int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); + #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 9e452f55..ebf4e90c 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -72,6 +72,7 @@ UnboundFunctionExpr *create_aggregate_expression(const char *function_name, DROP EXISTS GROUP + HAVING ORDER TABLE TABLES @@ -183,6 +184,7 @@ UnboundFunctionExpr *create_aggregate_expression(const char *function_name, %type sub_query_expr %type expression_list %type group_by +%type opt_having %type setClause %type setClauses %type joinClauses @@ -604,7 +606,7 @@ setClause: ; select_stmt: - SELECT expression_list FROM rel_list where group_by opt_order_by + SELECT expression_list FROM rel_list where group_by opt_having opt_order_by { $$ = new ParsedSqlNode(SCF_SELECT); if ($2 != nullptr) { @@ -629,8 +631,12 @@ select_stmt: } if ($7 != nullptr) { - $$->selection.order_by.swap(*$7); - delete $7; + $$->selection.having_conditions = std::unique_ptr($7); + } + + if ($8 != nullptr) { + $$->selection.order_by.swap(*$8); + delete $8; } } | SELECT expression_list FROM relation INNER JOIN joinClauses where group_by @@ -955,6 +961,18 @@ group_by: $$ = $3; } ; + +opt_having: + /* empty */ + { + $$ = nullptr; + } + | HAVING condition + { + $$ = $2; + } + ; + load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID { diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 97acff13..9dfa68af 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -117,6 +117,14 @@ RC SelectStmt::create( return rc; } + // create filter statement in `having` statement + FilterStmt *having_filter_stmt = nullptr; + rc = FilterStmt::create(db, default_table, &table_map, select_sql.having_conditions, having_filter_stmt); + if (rc != RC::SUCCESS) { + LOG_WARN("cannot construct having filter stmt"); + return rc; + } + // everything alright SelectStmt *select_stmt = new SelectStmt(); @@ -124,6 +132,7 @@ RC SelectStmt::create( select_stmt->query_expressions_.swap(bound_expressions); select_stmt->filter_stmt_ = filter_stmt; select_stmt->group_by_.swap(group_by_expressions); - stmt = select_stmt; + select_stmt->having_filter_stmt_ = having_filter_stmt; + stmt = select_stmt; return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/select_stmt.h b/src/observer/sql/stmt/select_stmt.h index 1c794585..a9fbc7a9 100644 --- a/src/observer/sql/stmt/select_stmt.h +++ b/src/observer/sql/stmt/select_stmt.h @@ -46,6 +46,7 @@ class SelectStmt : public Stmt public: const std::vector
&tables() const { return tables_; } FilterStmt *filter_stmt() const { return filter_stmt_; } + FilterStmt *having_filter_stmt() const { return having_filter_stmt_; } std::vector> &query_expressions() { return query_expressions_; } std::vector> &group_by() { return group_by_; } @@ -55,4 +56,5 @@ class SelectStmt : public Stmt std::vector
tables_; FilterStmt *filter_stmt_ = nullptr; std::vector> group_by_; + FilterStmt *having_filter_stmt_ = nullptr; }; From acb92192d1021ed780f2872e3c87002b29c6a178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 9 Oct 2024 17:18:31 +0000 Subject: [PATCH 185/308] =?UTF-8?q?having=E6=94=AF=E6=8C=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 1 + src/observer/sql/expr/expression_iterator.cpp | 55 +++++++++++++++++++ src/observer/sql/expr/expression_iterator.h | 2 + .../sql/optimizer/logical_plan_generator.cpp | 13 +++-- 4 files changed, 67 insertions(+), 4 deletions(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 3af81006..57208e3e 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -23,6 +23,7 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(SUCCESS) \ DEFINE_RC(INVALID_ALIAS) \ DEFINE_RC(INVALID_ARGUMENT) \ + DEFINE_RC(INVALID_HAVING_CONDITION) \ DEFINE_RC(UNIMPLEMENTED) \ DEFINE_RC(SQL_SYNTAX) \ DEFINE_RC(INTERNAL) \ diff --git a/src/observer/sql/expr/expression_iterator.cpp b/src/observer/sql/expr/expression_iterator.cpp index a9354249..3a04847b 100644 --- a/src/observer/sql/expr/expression_iterator.cpp +++ b/src/observer/sql/expr/expression_iterator.cpp @@ -13,6 +13,8 @@ See the Mulan PSL v2 for more details. */ // #include "sql/expr/expression_iterator.h" + +#include #include "sql/expr/expression.h" #include "common/log/log.h" @@ -182,3 +184,56 @@ RC ExpressionIterator::condition_iterate_expr(std::unique_ptr &expr) return rc; } + +RC ExpressionIterator::having_condition_iterate_expr( + std::unique_ptr &expr, vector &bound_expressions) +{ + RC rc = RC::SUCCESS; + + switch (expr->type()) { + case ExprType::COMPARISON: { + auto *comp_expr = dynamic_cast(expr.get()); + auto &left = comp_expr->left(); + auto &right = comp_expr->right(); + rc = having_condition_iterate_expr(left, bound_expressions); + if (OB_FAIL(rc)) { + break; + } + rc = having_condition_iterate_expr(right, bound_expressions); + if (OB_FAIL(rc)) { + break; + } + + } break; + + case ExprType::CONJUNCTION: { + auto conjunction_expr = dynamic_cast(expr.get()); + for (auto &child : conjunction_expr->children()) { + rc = having_condition_iterate_expr(child, bound_expressions); + if (OB_FAIL(rc)) { + break; + } + } + } break; + case ExprType::AGGREGATION: { + bound_expressions.push_back(expr.get()); + } break; + + case ExprType::CAST: + case ExprType::ARITHMETIC: + case ExprType::NORMAL_FUNCTION: + case ExprType::NONE: + case ExprType::STAR: + case ExprType::UNBOUND_FIELD: + case ExprType::FIELD: + case ExprType::VALUE: { + // Do nothing + } break; + + default: { + ASSERT(false, "Unknown expression type"); + } + } + + return rc; +} diff --git a/src/observer/sql/expr/expression_iterator.h b/src/observer/sql/expr/expression_iterator.h index e82af66a..52cee4e6 100644 --- a/src/observer/sql/expr/expression_iterator.h +++ b/src/observer/sql/expr/expression_iterator.h @@ -26,4 +26,6 @@ class ExpressionIterator public: static RC iterate_child_expr(Expression &expr, const std::function &)> &callback); static RC condition_iterate_expr(std::unique_ptr &expr); + static RC having_condition_iterate_expr( + std::unique_ptr &expr, std::vector &bound_expressions); }; \ No newline at end of file diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 8be29e8c..75d179e4 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -275,10 +275,15 @@ RC LogicalPlanGenerator::create_plan(ExplainStmt *explain_stmt, unique_ptr &logical_operator) { - vector> &group_by_expressions = select_stmt->group_by(); - vector aggregate_expressions; - vector> &query_expressions = select_stmt->query_expressions(); - function &)> collector = [&](unique_ptr &expr) -> RC { + vector> &group_by_expressions = select_stmt->group_by(); + vector aggregate_expressions; + vector> &query_expressions = select_stmt->query_expressions(); + + // 还要考虑having里面的 + ExpressionIterator::having_condition_iterate_expr( + select_stmt->having_filter_stmt()->condition(), aggregate_expressions); + + function &)> collector = [&](unique_ptr &expr) -> RC { RC rc = RC::SUCCESS; if (expr->type() == ExprType::AGGREGATION) { expr->set_pos(aggregate_expressions.size() + group_by_expressions.size()); From 62603045996b1a68be0eb9216a36e135e973197f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Wed, 9 Oct 2024 17:32:20 +0000 Subject: [PATCH 186/308] =?UTF-8?q?bug,=E6=9C=89=E7=9A=84=E6=B2=A1?= =?UTF-8?q?=E6=9C=89having=E4=BC=9A=E5=87=BA=E7=8E=B0=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/optimizer/logical_plan_generator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 75d179e4..7f08273c 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -280,8 +280,9 @@ RC LogicalPlanGenerator::create_group_by_plan(SelectStmt *select_stmt, unique_pt vector> &query_expressions = select_stmt->query_expressions(); // 还要考虑having里面的 - ExpressionIterator::having_condition_iterate_expr( - select_stmt->having_filter_stmt()->condition(), aggregate_expressions); + if (select_stmt->having_filter_stmt() != nullptr) + ExpressionIterator::having_condition_iterate_expr( + select_stmt->having_filter_stmt()->condition(), aggregate_expressions); function &)> collector = [&](unique_ptr &expr) -> RC { RC rc = RC::SUCCESS; From 6dfd5af13328c758788a81a17dbd125d720dbfa1 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 01:32:37 +0800 Subject: [PATCH 187/308] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=9F=BA=E7=A1=80ord?= =?UTF-8?q?er=20by?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/tuple.h | 62 +++++++++ .../operator/order_by_logical_operator.cpp | 15 +++ .../sql/operator/order_by_logical_operator.h | 41 ++++++ .../operator/order_by_physical_operator.cpp | 122 ++++++++++++++++++ .../sql/operator/order_by_physical_operator.h | 48 +++++++ .../sql/optimizer/logical_plan_generator.cpp | 29 +++++ .../sql/optimizer/logical_plan_generator.h | 1 + .../sql/optimizer/physical_plan_generator.cpp | 38 ++++++ .../sql/optimizer/physical_plan_generator.h | 3 + 9 files changed, 359 insertions(+) create mode 100644 src/observer/sql/operator/order_by_logical_operator.cpp create mode 100644 src/observer/sql/operator/order_by_logical_operator.h create mode 100644 src/observer/sql/operator/order_by_physical_operator.cpp create mode 100644 src/observer/sql/operator/order_by_physical_operator.h diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index 6d63d36e..c0355b16 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -450,3 +450,65 @@ class JoinedTuple : public Tuple Tuple *left_ = nullptr; Tuple *right_ = nullptr; }; + +/** + * @brief 一些常量值组成的Tuple,用于 orderby 算子中 + * @ingroup Tuple + */ +class SplicedTuple : public Tuple +{ +public: + SplicedTuple() = default; + virtual ~SplicedTuple() = default; + + void set_cells(const std::vector *cells) { cells_ = cells; } + + virtual int cell_num() const override { return static_cast((*cells_).size()); } + + virtual RC cell_at(int index, Value &cell) const override + { + if (index < 0 || index >= cell_num()) { + return RC::NOTFOUND; + } + + cell = (*cells_)[index]; + return RC::SUCCESS; + } + + RC find_cell(const TupleCellSpec &spec, Value &cell) const override + { + for (size_t i = 0; i < exprs_.size(); ++i) { + if (exprs_[i]->type() == ExprType::FIELD) { + const FieldExpr *expr = static_cast(exprs_[i].get()); + if (std::string(expr->field_name()) == std::string(spec.field_name()) && + std::string(expr->table_name()) == std::string(spec.table_name())) { + cell = (*cells_)[i]; + return RC::SUCCESS; + } + } else if (exprs_[i]->type() == ExprType::AGGREGATION) { + if (spec.alias() == exprs_[i]->name()) { + cell = (*cells_)[i]; + return RC::SUCCESS; + } + } else { + return RC::INTERNAL; + } + } + return RC::NOTFOUND; + } + + RC init(std::vector> &&exprs) + { + exprs_ = std::move(exprs); + return RC::SUCCESS; + } + + std::vector> &exprs() { return exprs_; } + + RC spec_at(int index, TupleCellSpec &spec) const override { return RC::INTERNAL; } + +private: + const std::vector *cells_ = nullptr; + + std::vector> exprs_; +}; \ No newline at end of file diff --git a/src/observer/sql/operator/order_by_logical_operator.cpp b/src/observer/sql/operator/order_by_logical_operator.cpp new file mode 100644 index 00000000..0a57089f --- /dev/null +++ b/src/observer/sql/operator/order_by_logical_operator.cpp @@ -0,0 +1,15 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +// +// Created by HuXin on 24-10-9. +// + +#include "order_by_logical_operator.h" diff --git a/src/observer/sql/operator/order_by_logical_operator.h b/src/observer/sql/operator/order_by_logical_operator.h new file mode 100644 index 00000000..8b870262 --- /dev/null +++ b/src/observer/sql/operator/order_by_logical_operator.h @@ -0,0 +1,41 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +// +// Created by HuXin on 24-10-9. +// + +#pragma once + +#include "sql/operator/logical_operator.h" + +/** + * @brief 逻辑算子 + * @ingroup LogicalOperator + */ +class OrderByLogicalOperator : public LogicalOperator +{ +public: + OrderByLogicalOperator(std::vector order_by, std::vector> exprs) + : order_by_(std::move(order_by)), exprs_(std::move(exprs)) + {} + + LogicalOperatorType type() const override { return LogicalOperatorType::ORDER_BY; } + + std::vector &order_by() { return order_by_; } + + std::vector> &exprs() { return exprs_; } + +private: + std::vector order_by_; + + /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr + std::vector> exprs_; +}; \ No newline at end of file diff --git a/src/observer/sql/operator/order_by_physical_operator.cpp b/src/observer/sql/operator/order_by_physical_operator.cpp new file mode 100644 index 00000000..b21e9220 --- /dev/null +++ b/src/observer/sql/operator/order_by_physical_operator.cpp @@ -0,0 +1,122 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +// +// Created by HuXin on 24-10-9. +// + +#include "order_by_physical_operator.h" + +OrderByPhysicalOperator::OrderByPhysicalOperator( + std::vector order_by, std::vector> exprs) + : order_by_(std::move(order_by)), exprs_(std::move(exprs)) +{ + tuple_.init(std::move(exprs)); +} + +RC OrderByPhysicalOperator::fetch_and_sort_tables() +{ + RC rc = RC::SUCCESS; + + vector, vector>> order_and_field_line; + + while (RC::SUCCESS == (rc = children_[0]->next())) { + // 获取 order by 字段的 values + std::vector order_by_line; + for (auto &[expr, asc] : order_by_) { + Value cell; + rc = expr->get_value(*children_[0]->current_tuple(), cell); + if (OB_FAIL(rc)) { + return rc; + } + order_by_line.emplace_back(cell); + } + + // 获取 select 字段的 values + std::vector field_line; + for (auto &expr : tuple_.exprs()) { + Value cell; + rc = expr->get_value(*children_[0]->current_tuple(), cell); + if (OB_FAIL(rc)) { + return rc; + } + field_line.emplace_back(cell); + } + + order_and_field_line.emplace_back(order_by_line, field_line); + } + + // consider null + auto cmp = [this](const pair, vector> &cells_a, + const pair, vector> &cells_b) -> bool { + auto order_size = order_by_.size(); + auto &order_line_a = cells_a.first; + auto &order_line_b = cells_b.first; + assert(order_line_a.size() == order_size); + assert(order_line_b.size() == order_size); + assert(order_by_.size() == order_size); + + for (size_t i = 0; i < order_size; i++) { + auto a = order_line_a[i]; + auto b = order_line_b[i]; + auto result = a.compare(b); + auto is_asc = order_by_[i].is_asc; + if (result < 0) { + // a < b + return is_asc; + } else if (result > 0) { + // a > 0 + return !is_asc; + } + } + + // order_line_a == order_line_b + return false; + }; + + std::sort(order_and_field_line.begin(), order_and_field_line.end(), cmp); + for (auto &[_, value] : order_and_field_line) { + values_.push_back(value); + } + + it_ = values_.begin(); + return rc; +} + +RC OrderByPhysicalOperator::open(Trx *trx) +{ + RC rc = RC::SUCCESS; + if (children_.size() != 1) { + return RC::INTERNAL; + } + rc = children_[0]->open(trx); + if (OB_FAIL(rc)) { + return rc; + } + rc = fetch_and_sort_tables(); + return rc; +} + +RC OrderByPhysicalOperator::next() +{ + RC rc = RC::SUCCESS; + if (it_ == values_.end()) { + return RC::RECORD_EOF; + } + + const std::vector &value = *it_; + tuple_.set_cells(&value); + it_++; + return rc; +} + +RC OrderByPhysicalOperator::close() { return children_[0]->close(); } + +Tuple *OrderByPhysicalOperator::current_tuple() { return &tuple_; } diff --git a/src/observer/sql/operator/order_by_physical_operator.h b/src/observer/sql/operator/order_by_physical_operator.h new file mode 100644 index 00000000..3e8179df --- /dev/null +++ b/src/observer/sql/operator/order_by_physical_operator.h @@ -0,0 +1,48 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +// +// Created by HuXin on 24-10-9. +// + +#include "sql/operator/physical_operator.h" +#include "sql/expr/tuple.h" + +class OrderByPhysicalOperator : public PhysicalOperator +{ +public: + OrderByPhysicalOperator(std::vector order_by, std::vector> exprs); + + virtual ~OrderByPhysicalOperator() = default; + + PhysicalOperatorType type() const override { return PhysicalOperatorType::ORDER_BY; } + + std::vector &order_by() { return order_by_; } + + std::vector> &exprs() { return exprs_; } + + RC fetch_and_sort_tables(); + RC open(Trx *trx) override; + RC next() override; + RC close() override; + + Tuple *current_tuple() override; + +private: + std::vector order_by_; + + /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr + std::vector> exprs_; + + std::vector> values_; + + std::vector>::iterator it_; + SplicedTuple tuple_; +}; \ No newline at end of file diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index fee79b07..fb0f01b7 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -22,6 +22,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/insert_logical_operator.h" #include "sql/operator/join_logical_operator.h" #include "sql/operator/logical_operator.h" +#include "sql/operator/order_by_logical_operator.h" #include "sql/operator/predicate_logical_operator.h" #include "sql/operator/project_logical_operator.h" #include "sql/operator/table_get_logical_operator.h" @@ -147,6 +148,21 @@ RC LogicalPlanGenerator::create_plan(SelectStmt *select_stmt, unique_ptrorder_by().empty()) { + unique_ptr orderby_oper; + rc = create_order_by_plan(select_stmt, orderby_oper); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to create orderby logical plan. rc=%s", strrc(rc)); + return rc; + } + if (orderby_oper) { + if (*last_oper) { + orderby_oper->add_child(std::move(*last_oper)); + } + *last_oper = std::move(orderby_oper); + } + } + auto project_oper = make_unique(std::move(select_stmt->query_expressions())); if (*last_oper) { project_oper->add_child(std::move(*last_oper)); @@ -334,3 +350,16 @@ RC LogicalPlanGenerator::create_group_by_plan(SelectStmt *select_stmt, unique_pt logical_operator = std::move(group_by_oper); return RC::SUCCESS; } + +RC LogicalPlanGenerator::create_order_by_plan(SelectStmt *select_stmt, unique_ptr &logical_operator) +{ + if (select_stmt == nullptr) { + logical_operator = nullptr; + return RC::SUCCESS; + } + + unique_ptr orderby_oper( + new OrderByLogicalOperator(std::move(select_stmt->order_by()), std::move(select_stmt->query_expressions()))); + logical_operator = std::move(orderby_oper); + return RC::SUCCESS; +} diff --git a/src/observer/sql/optimizer/logical_plan_generator.h b/src/observer/sql/optimizer/logical_plan_generator.h index b3eb436e..4edb6657 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.h +++ b/src/observer/sql/optimizer/logical_plan_generator.h @@ -46,4 +46,5 @@ class LogicalPlanGenerator static RC create_plan(UpdateStmt *update_stmt, std::unique_ptr &logical_operator); static RC create_plan(ExplainStmt *explain_stmt, std::unique_ptr &logical_operator); static RC create_group_by_plan(SelectStmt *select_stmt, std::unique_ptr &logical_operator); + static RC create_order_by_plan(SelectStmt *select_stmt, std::unique_ptr &logical_operator); }; diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index 5cc3b410..cb4570c3 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -37,6 +37,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/project_vec_physical_operator.h" #include "sql/operator/table_get_logical_operator.h" #include "sql/operator/table_scan_physical_operator.h" +#include "sql/operator/order_by_physical_operator.h" #include "sql/operator/group_by_logical_operator.h" #include "sql/operator/group_by_physical_operator.h" #include "sql/operator/hash_group_by_physical_operator.h" @@ -93,6 +94,10 @@ RC PhysicalPlanGenerator::create(LogicalOperator &logical_operator, unique_ptr

(logical_operator), oper); } break; + case LogicalOperatorType::ORDER_BY: { + return create_plan(static_cast(logical_operator), oper); + } break; + default: { ASSERT(false, "unknown logical operator type"); return RC::INVALID_ARGUMENT; @@ -118,6 +123,9 @@ RC PhysicalPlanGenerator::create_vec(LogicalOperator &logical_operator, unique_p case LogicalOperatorType::EXPLAIN: { return create_vec_plan(static_cast(logical_operator), oper); } break; + case LogicalOperatorType::ORDER_BY: { + return create_vec_plan(static_cast(logical_operator), oper); + } break; default: { return RC::INVALID_ARGUMENT; } @@ -392,6 +400,31 @@ RC PhysicalPlanGenerator::create_plan(GroupByLogicalOperator &logical_oper, std: return rc; } +RC PhysicalPlanGenerator::create_plan(OrderByLogicalOperator &logical_oper, std::unique_ptr &oper) +{ + vector> &child_opers = logical_oper.children(); + unique_ptr child_phy_oper; + + RC rc = RC::SUCCESS; + if (!child_opers.empty()) { + LogicalOperator *child_oper = child_opers.front().get(); + rc = create(*child_oper, child_phy_oper); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to create orderby logical operator's child physical operator. rc=%s", strrc(rc)); + return rc; + } + } + + OrderByPhysicalOperator *orderby_operator = + new OrderByPhysicalOperator(std::move(logical_oper.order_by()), std::move(logical_oper.exprs())); + if (child_phy_oper) { + orderby_operator->add_child(std::move(child_phy_oper)); + } + + oper = unique_ptr(orderby_operator); + return rc; +} + RC PhysicalPlanGenerator::create_vec_plan(TableGetLogicalOperator &table_get_oper, unique_ptr &oper) { vector> &predicates = table_get_oper.predicates(); @@ -489,3 +522,8 @@ RC PhysicalPlanGenerator::create_vec_plan(ExplainLogicalOperator &explain_oper, oper = std::move(explain_physical_oper); return rc; } + +RC PhysicalPlanGenerator::create_vec_plan(OrderByLogicalOperator &order_by_oper, unique_ptr &oper) +{ + return create_plan(order_by_oper, oper); +} \ No newline at end of file diff --git a/src/observer/sql/optimizer/physical_plan_generator.h b/src/observer/sql/optimizer/physical_plan_generator.h index e13755a5..2e5147c7 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.h +++ b/src/observer/sql/optimizer/physical_plan_generator.h @@ -17,6 +17,7 @@ See the Mulan PSL v2 for more details. */ #include "common/rc.h" #include "sql/operator/logical_operator.h" #include "sql/operator/physical_operator.h" +#include "sql/operator/order_by_logical_operator.h" class TableGetLogicalOperator; class PredicateLogicalOperator; @@ -55,8 +56,10 @@ class PhysicalPlanGenerator static RC create_plan(JoinLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_plan(CalcLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_plan(GroupByLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(OrderByLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_vec_plan(ProjectLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_vec_plan(TableGetLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_vec_plan(GroupByLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_vec_plan(ExplainLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_vec_plan(OrderByLogicalOperator &logical_oper, std::unique_ptr &oper); }; From be3ad16401445389385a3399001a6a1541fcc800 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 01:51:03 +0800 Subject: [PATCH 188/308] fix bug: table_map => temp_map --- src/observer/sql/stmt/select_stmt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 1eecf43c..f69c03b2 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -68,7 +68,7 @@ RC SelectStmt::create( binder_context.add_table(table); tables.push_back(table); - table_map.insert({table_name, table}); + temp_map.insert({table_name, table}); } // alias is all avaliable table_map.insert(temp_map.begin(), temp_map.end()); From f8085038367062a500c3440d0a3e97376e749914 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 10 Oct 2024 02:02:08 +0800 Subject: [PATCH 189/308] =?UTF-8?q?fix:=20=E6=8F=92=E5=85=A5=20null=20?= =?UTF-8?q?=E5=80=BC=E7=9B=B4=E6=8E=A5=E6=9B=B4=E6=96=B0=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E4=BD=8D=EF=BC=8C=E9=81=BF=E5=85=8D=E5=8F=91=E7=94=9F=E5=86=85?= =?UTF-8?q?=E5=AD=98=E8=B6=8A=E7=95=8C=E6=8B=B7=E8=B4=9D=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/table/table.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index af4df841..e796800a 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -302,7 +302,13 @@ RC Table::make_record(int value_num, const Value *values, Record &record) for (int i = 0; i < value_num && OB_SUCC(rc); i++) { const FieldMeta *field = table_meta_.field(i + normal_field_start_index); const Value &value = values[i]; - if (field->type() != value.attr_type()) { + // 判断是否在 NOT NULL 字段设置 NULL 值 + if (value.is_null()) { + if (!field->nullable()) { + return RC::NOT_NULLABLE_VALUE; + } + record_data[field->offset() + field->len() - 1] = '1'; + } else if (field->type() != value.attr_type()) { Value real_value; if (field->type() == AttrType::TEXTS && value.attr_type() == AttrType::CHARS) { // 对于超长文本通过借用的方法减少拷贝 @@ -325,14 +331,6 @@ RC Table::make_record(int value_num, const Value *values, Record &record) } else { rc = set_value_to_record(record_data, value, field); } - - // 判断是否在 NOT NULL 字段设置 NULL 值 - if (value.is_null()) { - if (!field->nullable()) { - return RC::NOT_NULLABLE_VALUE; - } - record_data[field->offset() + field->len() - 1] = '1'; - } } if (OB_FAIL(rc)) { LOG_WARN("failed to make record. table name:%s", table_meta_.name()); From aae41f6d4df33a3d01552882f32f6c8bb41aab28 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 02:04:08 +0800 Subject: [PATCH 190/308] fix bug: stmt = select_stmt; --- src/observer/sql/stmt/select_stmt.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index f69c03b2..17dc373c 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -101,10 +101,8 @@ RC SelectStmt::create( } vector> order_by_expressions; - std::vector order_by_is_asc_; - for (auto &expression : select_sql.order_by) { - RC rc = expression_binder.bind_expression(expression.expr, order_by_expressions); - order_by_is_asc_.push_back(expression.is_asc); + for (OrderBySqlNode &unit : select_sql.order_by) { + RC rc = expression_binder.bind_expression(unit.expr, order_by_expressions); if (OB_FAIL(rc)) { LOG_INFO("bind expression failed. rc=%s", strrc(rc)); return rc; @@ -114,7 +112,7 @@ RC SelectStmt::create( std::vector order_by_; order_by_.reserve(order_by_expressions.size()); for (size_t i = 0; i < order_by_expressions.size(); i++) { - order_by_.push_back({std::move(order_by_expressions[i]), order_by_is_asc_[i]}); + order_by_.push_back({std::move(order_by_expressions[i]), select_sql.order_by[i].is_asc}); } // create filter statement in `where` statement @@ -133,5 +131,6 @@ RC SelectStmt::create( select_stmt->filter_stmt_ = filter_stmt; select_stmt->group_by_.swap(group_by_expressions); select_stmt->order_by_.swap(order_by_); + stmt = select_stmt; return RC::SUCCESS; } From de6b1f217ca970037d4f650420778b649418a4b8 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 10 Oct 2024 11:21:50 +0800 Subject: [PATCH 191/308] =?UTF-8?q?fix:=20=E5=AD=97=E7=AC=A6=E5=9E=8B=20nu?= =?UTF-8?q?ll=20=E5=80=BC=E8=A2=AB=E5=BD=93=E4=BD=9C=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2=E5=88=86=E9=85=8D=E5=86=85=E5=AD=98=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=8B=B7=E8=B4=9D=E6=9E=84=E9=80=A0=E5=87=BA=E7=8E=B0=E5=86=85?= =?UTF-8?q?=E5=AD=98=E8=B6=8A=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/value.cpp | 53 ++++++++++++++++++++--------------- src/observer/sql/expr/tuple.h | 9 ++++-- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 9b5a3be5..9205074e 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -38,14 +38,17 @@ Value::Value(const Value &other) this->length_ = other.length_; this->own_data_ = other.own_data_; this->is_null_ = other.is_null_; - switch (this->attr_type_) { - case AttrType::CHARS: - case AttrType::TEXTS: { - set_string_from_other(other); - } break; - default: { - this->value_ = other.value_; - } break; + // 如果是 null 值没必要拷贝 value,因为此时 value 是垃圾值 + if (!this->is_null_) { + switch (this->attr_type_) { + case AttrType::CHARS: + case AttrType::TEXTS: { + set_string_from_other(other); + } break; + default: { + this->value_ = other.value_; + } break; + } } } @@ -54,10 +57,12 @@ Value::Value(Value &&other) this->attr_type_ = other.attr_type_; this->length_ = other.length_; this->own_data_ = other.own_data_; - this->value_ = other.value_; this->is_null_ = other.is_null_; - other.own_data_ = false; - other.length_ = 0; + if (!this->is_null_) { + this->value_ = other.value_; + } + other.own_data_ = false; + other.length_ = 0; } Value &Value::operator=(const Value &other) @@ -70,14 +75,16 @@ Value &Value::operator=(const Value &other) this->length_ = other.length_; this->own_data_ = other.own_data_; this->is_null_ = other.is_null_; - switch (this->attr_type_) { - case AttrType::CHARS: - case AttrType::TEXTS: { - set_string_from_other(other); - } break; - default: { - this->value_ = other.value_; - } break; + if (!this->is_null_) { + switch (this->attr_type_) { + case AttrType::CHARS: + case AttrType::TEXTS: { + set_string_from_other(other); + } break; + default: { + this->value_ = other.value_; + } break; + } } return *this; } @@ -91,10 +98,12 @@ Value &Value::operator=(Value &&other) this->attr_type_ = other.attr_type_; this->length_ = other.length_; this->own_data_ = other.own_data_; - this->value_ = other.value_; this->is_null_ = other.is_null_; - other.own_data_ = false; - other.length_ = 0; + if (!this->is_null_) { + this->value_ = other.value_; + } + other.own_data_ = false; + other.length_ = 0; return *this; } diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index 6d63d36e..edbec8d2 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -199,8 +199,13 @@ class RowTuple : public Tuple cell.set_type(field_meta->type()); if (field_meta->nullable()) { bool is_null = this->record_->data()[field_meta->offset() + field_meta->len() - 1] == '1'; - cell.set_data(this->record_->data() + field_meta->offset(), field_meta->len() - 1); - cell.set_null(is_null); + if (is_null) { + cell.set_null(is_null); + } else { + // 如果是字符型 null 值,这里虽然安全拷贝了 0 个数据,但因为 own_data,在发生拷贝构造时又由 length 0 + // 而没有初始化指针,导致内存越界 + cell.set_data(this->record_->data() + field_meta->offset(), field_meta->len() - 1); + } } else { cell.set_data(this->record_->data() + field_meta->offset(), field_meta->len()); cell.set_null(false); From 900f1010a85236550f5671910cce3295c85215b3 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 10 Oct 2024 11:22:35 +0800 Subject: [PATCH 192/308] =?UTF-8?q?test:=20=E5=A2=9E=E5=BC=BA=20group-by?= =?UTF-8?q?=20=E7=9A=84=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-group-by.result | 7 ++++++- test/case/test/primary-group-by.test | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/case/result/primary-group-by.result b/test/case/result/primary-group-by.result index cb394af5..2edddda0 100644 --- a/test/case/result/primary-group-by.result +++ b/test/case/result/primary-group-by.result @@ -19,6 +19,8 @@ insert into t_group_by values(3, 3.0, 'd'); SUCCESS insert into t_group_by values(3, 2.0, 'f'); SUCCESS +INSERT INTO T_GROUP_BY VALUES(4, 3.0, NULL); +SUCCESS insert into t_group_by_2 values(1, 10); SUCCESS @@ -43,10 +45,11 @@ ID | AVG(SCORE) select id, sum(score) from t_group_by group by id; 1 | 2 3 | 12 -4 | 3 +4 | 6 ID | SUM(SCORE) select name, min(id), max(score) from t_group_by group by name; +NULL | 4 | 3 A | 3 | 1 B | 1 | 2 C | 3 | 4 @@ -60,6 +63,7 @@ select id, name, avg(score) from t_group_by group by id, name; 3 | C | 3 3 | D | 3 3 | F | 2 +4 | NULL | 3 4 | C | 3 ID | NAME | AVG(SCORE) @@ -83,5 +87,6 @@ select t_group_by.id, t_group_by.name, avg(t_group_by.score), avg(t_group_by_2.a 3 | C | 3 | 23.33 3 | D | 3 | 23.33 3 | F | 2 | 23.33 +4 | NULL | 3 | 20 4 | C | 3 | 20 T_GROUP_BY.ID | T_GROUP_BY.NAME | AVG(T_GROUP_BY.SCORE) | AVG(T_GROUP_BY_2.AGE) diff --git a/test/case/test/primary-group-by.test b/test/case/test/primary-group-by.test index 616eb92a..42be0dc9 100644 --- a/test/case/test/primary-group-by.test +++ b/test/case/test/primary-group-by.test @@ -10,6 +10,7 @@ insert into t_group_by values(3, 2.0, 'c'); insert into t_group_by values(3, 4.0, 'c'); insert into t_group_by values(3, 3.0, 'd'); insert into t_group_by values(3, 2.0, 'f'); +insert into t_group_by values(4, 3.0, null); insert into t_group_by_2 values(1, 10); insert into t_group_by_2 values(2, 20); @@ -33,4 +34,4 @@ insert into t_group_by_2 values(4, 20); -- sort select name, count(id), max(score) from t_group_by where name > 'a' and id>=0 group by name; -- echo 5. multi table --- sort select t_group_by.id, t_group_by.name, avg(t_group_by.score), avg(t_group_by_2.age) from t_group_by, t_group_by_2 where t_group_by.id=t_group_by_2.id group by t_group_by.id, t_group_by.name; \ No newline at end of file +-- sort select t_group_by.id, t_group_by.name, avg(t_group_by.score), avg(t_group_by_2.age) from t_group_by, t_group_by_2 where t_group_by.id=t_group_by_2.id group by t_group_by.id, t_group_by.name; From 3492d1ef45731e1dd3180639c10d47c1e0744f1b Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 10 Oct 2024 12:07:47 +0800 Subject: [PATCH 193/308] =?UTF-8?q?test:=20=E5=A2=9E=E5=BC=BA=20typecast?= =?UTF-8?q?=20=E7=9A=84=E6=B5=8B=E8=AF=95=EF=BC=8C=E8=80=83=E8=99=91?= =?UTF-8?q?=E6=AF=94=E8=BE=83=E8=A1=A8=E8=BE=BE=E5=BC=8F=E7=9A=84=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=8F=90=E5=8D=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-typecast.result | 19 +++++++++++++++++++ test/case/test/primary-typecast.test | 6 ++++++ 2 files changed, 25 insertions(+) diff --git a/test/case/result/primary-typecast.result b/test/case/result/primary-typecast.result index 7f12df7f..36026269 100644 --- a/test/case/result/primary-typecast.result +++ b/test/case/result/primary-typecast.result @@ -149,3 +149,22 @@ SELECT * FROM TYPECAST_TABLE_1 WHERE '2.0-A' = 2.0; 7 | 6.6 | 6.6 7 | 6.6 | 6.6 ID | NAME | AGE + +5. TYPE PROMOTION +SELECT * FROM TYPECAST_TABLE_1 WHERE AGE >= 7.0; +66 | 66 | 66 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE AGE >= 7; +66 | 66 | 66 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE ID >= 6; +6 | 6 | 6 +66 | 66 | 66 +7 | 6.6 | 6.6 +7 | 6.6 | 6.6 +ID | NAME | AGE +SELECT * FROM TYPECAST_TABLE_1 WHERE ID >= 6.25; +66 | 66 | 66 +7 | 6.6 | 6.6 +7 | 6.6 | 6.6 +ID | NAME | AGE diff --git a/test/case/test/primary-typecast.test b/test/case/test/primary-typecast.test index f87e8be7..b4dd2ed9 100644 --- a/test/case/test/primary-typecast.test +++ b/test/case/test/primary-typecast.test @@ -42,3 +42,9 @@ UPDATE Typecast_table_1 SET id = -8.8, name = -8.8, age = '-8.8' where id = 666; -- sort SELECT * FROM Typecast_table_1 WHERE '1.5a' = 2.0; -- sort SELECT * FROM Typecast_table_1 WHERE '2a' = 2.0; -- sort SELECT * FROM Typecast_table_1 WHERE '2.0-a' = 2.0; + +-- echo 5. type promotion +-- sort SELECT * FROM Typecast_table_1 WHERE age >= 7.0; +-- sort SELECT * FROM Typecast_table_1 WHERE age >= 7; +-- sort SELECT * FROM Typecast_table_1 WHERE id >= 6; +-- sort SELECT * FROM Typecast_table_1 WHERE id >= 6.25; From b070da70f8c0ca4628366e7021f8b8f625367288 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 10 Oct 2024 12:09:24 +0800 Subject: [PATCH 194/308] =?UTF-8?q?fix:=20float=20=E8=BD=AC=20int=20?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E7=B2=BE=E5=BA=A6=E7=9A=84=E4=BB=A3=E4=BB=B7?= =?UTF-8?q?=E4=B8=BA=E4=B8=8D=E5=8F=AF=E8=BD=AC=E6=8D=A2=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/float_type.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/observer/common/type/float_type.cpp b/src/observer/common/type/float_type.cpp index 2c475a00..93debb27 100644 --- a/src/observer/common/type/float_type.cpp +++ b/src/observer/common/type/float_type.cpp @@ -90,8 +90,8 @@ int FloatType::cast_cost(AttrType type) { if (type == AttrType::FLOATS) return 0; // FLOAT -> FLOAT - if (type == AttrType::INTS) - return 1; // FLOAT -> INT (可能丢失精度) + // if (type == AttrType::INTS) + // return 1; // FLOAT -> INT (可能丢失精度,也不支持转换) if (type == AttrType::BOOLEANS) return 1; // FLOAT -> BOOL (非严格转换) return INT32_MAX; // 不支持转换 From 9732bb5e0301ef95576d3bcec4f9c4c652c17923 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 10 Oct 2024 12:18:06 +0800 Subject: [PATCH 195/308] =?UTF-8?q?test:=20=E5=A2=9E=E5=BC=BA=20group-by?= =?UTF-8?q?=20=E7=9A=84=E6=B5=8B=E8=AF=95=EF=BC=8C=E8=80=83=E8=99=91=20hav?= =?UTF-8?q?ing=20=E7=9A=84=E7=B1=BB=E5=9E=8B=E6=8F=90=E5=8D=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-group-by.result | 6 ++++++ test/case/test/primary-group-by.test | 3 +++ 2 files changed, 9 insertions(+) diff --git a/test/case/result/primary-group-by.result b/test/case/result/primary-group-by.result index 2edddda0..6ba93d97 100644 --- a/test/case/result/primary-group-by.result +++ b/test/case/result/primary-group-by.result @@ -90,3 +90,9 @@ select t_group_by.id, t_group_by.name, avg(t_group_by.score), avg(t_group_by_2.a 4 | NULL | 3 | 20 4 | C | 3 | 20 T_GROUP_BY.ID | T_GROUP_BY.NAME | AVG(T_GROUP_BY.SCORE) | AVG(T_GROUP_BY_2.AGE) + +6. HAVING TYPECAST +SELECT ID, AVG(SCORE) FROM T_GROUP_BY GROUP BY ID HAVING AVG(SCORE)>2; +3 | 2.4 +4 | 3 +ID | AVG(SCORE) diff --git a/test/case/test/primary-group-by.test b/test/case/test/primary-group-by.test index 42be0dc9..23e82e87 100644 --- a/test/case/test/primary-group-by.test +++ b/test/case/test/primary-group-by.test @@ -35,3 +35,6 @@ insert into t_group_by_2 values(4, 20); -- echo 5. multi table -- sort select t_group_by.id, t_group_by.name, avg(t_group_by.score), avg(t_group_by_2.age) from t_group_by, t_group_by_2 where t_group_by.id=t_group_by_2.id group by t_group_by.id, t_group_by.name; + +-- echo 6. having typecast +-- sort select id, avg(score) from t_group_by group by id having avg(score)>2; From 39664aa130f2dde8d2c09c0e8a44cf1c75968cf5 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 12:49:34 +0800 Subject: [PATCH 196/308] =?UTF-8?q?=E5=AE=8C=E6=88=90order=5Fby?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/tuple.h | 48 ++++++++----------- .../sql/operator/order_by_logical_operator.h | 6 +-- .../operator/order_by_physical_operator.cpp | 22 +++++---- .../sql/operator/order_by_physical_operator.h | 6 +-- .../operator/project_physical_operator.cpp | 3 ++ .../sql/optimizer/logical_plan_generator.cpp | 7 ++- .../sql/optimizer/physical_plan_generator.cpp | 8 ---- .../sql/optimizer/physical_plan_generator.h | 1 - test/case/miniob_test.py | 1 + 9 files changed, 49 insertions(+), 53 deletions(-) diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index c0355b16..34042f83 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -461,54 +461,44 @@ class SplicedTuple : public Tuple SplicedTuple() = default; virtual ~SplicedTuple() = default; - void set_cells(const std::vector *cells) { cells_ = cells; } + void set_cells(const std::vector &cells) { cells_ = cells; } - virtual int cell_num() const override { return static_cast((*cells_).size()); } + int cell_num() const override + { + return cells_.size(); + } - virtual RC cell_at(int index, Value &cell) const override + RC cell_at(int index, Value &cell) const override { if (index < 0 || index >= cell_num()) { return RC::NOTFOUND; } - cell = (*cells_)[index]; + cell = cells_[index]; return RC::SUCCESS; } RC find_cell(const TupleCellSpec &spec, Value &cell) const override { - for (size_t i = 0; i < exprs_.size(); ++i) { - if (exprs_[i]->type() == ExprType::FIELD) { - const FieldExpr *expr = static_cast(exprs_[i].get()); - if (std::string(expr->field_name()) == std::string(spec.field_name()) && - std::string(expr->table_name()) == std::string(spec.table_name())) { - cell = (*cells_)[i]; - return RC::SUCCESS; - } - } else if (exprs_[i]->type() == ExprType::AGGREGATION) { - if (spec.alias() == exprs_[i]->name()) { - cell = (*cells_)[i]; - return RC::SUCCESS; - } - } else { - return RC::INTERNAL; - } - } - return RC::NOTFOUND; + assert(false); + return RC::INTERNAL; } - RC init(std::vector> &&exprs) + RC init(const std::vector &exprs) { - exprs_ = std::move(exprs); + exprs_ = exprs; return RC::SUCCESS; } - std::vector> &exprs() { return exprs_; } + RC spec_at(int index, TupleCellSpec &spec) const override + { + assert(false); + return RC::INTERNAL; + } - RC spec_at(int index, TupleCellSpec &spec) const override { return RC::INTERNAL; } + std::vector &exprs() { return exprs_; } private: - const std::vector *cells_ = nullptr; - - std::vector> exprs_; + std::vector cells_; + std::vector exprs_; }; \ No newline at end of file diff --git a/src/observer/sql/operator/order_by_logical_operator.h b/src/observer/sql/operator/order_by_logical_operator.h index 8b870262..5cced75c 100644 --- a/src/observer/sql/operator/order_by_logical_operator.h +++ b/src/observer/sql/operator/order_by_logical_operator.h @@ -23,7 +23,7 @@ See the Mulan PSL v2 for more details. */ class OrderByLogicalOperator : public LogicalOperator { public: - OrderByLogicalOperator(std::vector order_by, std::vector> exprs) + OrderByLogicalOperator(std::vector order_by, const std::vector exprs) : order_by_(std::move(order_by)), exprs_(std::move(exprs)) {} @@ -31,11 +31,11 @@ class OrderByLogicalOperator : public LogicalOperator std::vector &order_by() { return order_by_; } - std::vector> &exprs() { return exprs_; } + std::vector &exprs() { return exprs_; } private: std::vector order_by_; /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr - std::vector> exprs_; + std::vector exprs_; }; \ No newline at end of file diff --git a/src/observer/sql/operator/order_by_physical_operator.cpp b/src/observer/sql/operator/order_by_physical_operator.cpp index b21e9220..c562334d 100644 --- a/src/observer/sql/operator/order_by_physical_operator.cpp +++ b/src/observer/sql/operator/order_by_physical_operator.cpp @@ -14,11 +14,15 @@ See the Mulan PSL v2 for more details. */ #include "order_by_physical_operator.h" -OrderByPhysicalOperator::OrderByPhysicalOperator( - std::vector order_by, std::vector> exprs) +OrderByPhysicalOperator::OrderByPhysicalOperator(vector order_by, vector exprs) : order_by_(std::move(order_by)), exprs_(std::move(exprs)) { - tuple_.init(std::move(exprs)); + vector expressions; + expressions.reserve(exprs_.size()); + for (auto &expr : exprs_) { + expressions.push_back(expr); + } + tuple_.init(expressions); } RC OrderByPhysicalOperator::fetch_and_sort_tables() @@ -29,7 +33,7 @@ RC OrderByPhysicalOperator::fetch_and_sort_tables() while (RC::SUCCESS == (rc = children_[0]->next())) { // 获取 order by 字段的 values - std::vector order_by_line; + vector order_by_line; for (auto &[expr, asc] : order_by_) { Value cell; rc = expr->get_value(*children_[0]->current_tuple(), cell); @@ -40,7 +44,7 @@ RC OrderByPhysicalOperator::fetch_and_sort_tables() } // 获取 select 字段的 values - std::vector field_line; + vector field_line; for (auto &expr : tuple_.exprs()) { Value cell; rc = expr->get_value(*children_[0]->current_tuple(), cell); @@ -53,6 +57,8 @@ RC OrderByPhysicalOperator::fetch_and_sort_tables() order_and_field_line.emplace_back(order_by_line, field_line); } + rc = RC::SUCCESS; + // consider null auto cmp = [this](const pair, vector> &cells_a, const pair, vector> &cells_b) -> bool { @@ -81,7 +87,7 @@ RC OrderByPhysicalOperator::fetch_and_sort_tables() return false; }; - std::sort(order_and_field_line.begin(), order_and_field_line.end(), cmp); + sort(order_and_field_line.begin(), order_and_field_line.end(), cmp); for (auto &[_, value] : order_and_field_line) { values_.push_back(value); } @@ -111,8 +117,8 @@ RC OrderByPhysicalOperator::next() return RC::RECORD_EOF; } - const std::vector &value = *it_; - tuple_.set_cells(&value); + const vector &value = *it_; + tuple_.set_cells(value); it_++; return rc; } diff --git a/src/observer/sql/operator/order_by_physical_operator.h b/src/observer/sql/operator/order_by_physical_operator.h index 3e8179df..dee6b839 100644 --- a/src/observer/sql/operator/order_by_physical_operator.h +++ b/src/observer/sql/operator/order_by_physical_operator.h @@ -18,7 +18,7 @@ See the Mulan PSL v2 for more details. */ class OrderByPhysicalOperator : public PhysicalOperator { public: - OrderByPhysicalOperator(std::vector order_by, std::vector> exprs); + OrderByPhysicalOperator(std::vector order_by, std::vector exprs); virtual ~OrderByPhysicalOperator() = default; @@ -26,7 +26,7 @@ class OrderByPhysicalOperator : public PhysicalOperator std::vector &order_by() { return order_by_; } - std::vector> &exprs() { return exprs_; } + std::vector &exprs() { return exprs_; } RC fetch_and_sort_tables(); RC open(Trx *trx) override; @@ -39,7 +39,7 @@ class OrderByPhysicalOperator : public PhysicalOperator std::vector order_by_; /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr - std::vector> exprs_; + std::vector exprs_; std::vector> values_; diff --git a/src/observer/sql/operator/project_physical_operator.cpp b/src/observer/sql/operator/project_physical_operator.cpp index b3242de5..c73f5053 100644 --- a/src/observer/sql/operator/project_physical_operator.cpp +++ b/src/observer/sql/operator/project_physical_operator.cpp @@ -57,6 +57,9 @@ RC ProjectPhysicalOperator::close() Tuple *ProjectPhysicalOperator::current_tuple() { + if (children_[0]->type() == PhysicalOperatorType::ORDER_BY) { + return children_[0]->current_tuple(); + } tuple_.set_tuple(children_[0]->current_tuple()); return &tuple_; } diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index fb0f01b7..cd0a9b94 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -358,8 +358,13 @@ RC LogicalPlanGenerator::create_order_by_plan(SelectStmt *select_stmt, unique_pt return RC::SUCCESS; } + std::vector query_expressions; + for (auto &expr : select_stmt->query_expressions()) { + query_expressions.push_back(expr.get()); + } + unique_ptr orderby_oper( - new OrderByLogicalOperator(std::move(select_stmt->order_by()), std::move(select_stmt->query_expressions()))); + new OrderByLogicalOperator(std::move(select_stmt->order_by()), query_expressions)); logical_operator = std::move(orderby_oper); return RC::SUCCESS; } diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index cb4570c3..2802f9ba 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -123,9 +123,6 @@ RC PhysicalPlanGenerator::create_vec(LogicalOperator &logical_operator, unique_p case LogicalOperatorType::EXPLAIN: { return create_vec_plan(static_cast(logical_operator), oper); } break; - case LogicalOperatorType::ORDER_BY: { - return create_vec_plan(static_cast(logical_operator), oper); - } break; default: { return RC::INVALID_ARGUMENT; } @@ -522,8 +519,3 @@ RC PhysicalPlanGenerator::create_vec_plan(ExplainLogicalOperator &explain_oper, oper = std::move(explain_physical_oper); return rc; } - -RC PhysicalPlanGenerator::create_vec_plan(OrderByLogicalOperator &order_by_oper, unique_ptr &oper) -{ - return create_plan(order_by_oper, oper); -} \ No newline at end of file diff --git a/src/observer/sql/optimizer/physical_plan_generator.h b/src/observer/sql/optimizer/physical_plan_generator.h index 2e5147c7..3e0137cb 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.h +++ b/src/observer/sql/optimizer/physical_plan_generator.h @@ -61,5 +61,4 @@ class PhysicalPlanGenerator static RC create_vec_plan(TableGetLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_vec_plan(GroupByLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_vec_plan(ExplainLogicalOperator &logical_oper, std::unique_ptr &oper); - static RC create_vec_plan(OrderByLogicalOperator &logical_oper, std::unique_ptr &oper); }; diff --git a/test/case/miniob_test.py b/test/case/miniob_test.py index a098515f..4b5783a5 100755 --- a/test/case/miniob_test.py +++ b/test/case/miniob_test.py @@ -47,6 +47,7 @@ 运行 basic 测试用例 python3 miniob_test.py --test-cases=basic +python3 miniob_test.py --test-cases=primary-order-by python3 miniob_test.py --test-cases=primary-date python3 miniob_test.py --test-cases=primary-complex-sub-query python3 miniob_test.py --test-cases=primary-simple-sub-query From 3bcc08d36ca8825e95677241f60ae46aca5d6004 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 18:00:09 +0800 Subject: [PATCH 197/308] =?UTF-8?q?=E5=9C=A8CreateTableStmt=E4=B8=AD?= =?UTF-8?q?=E6=96=B0=E5=A2=9ESelectStmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/stmt/create_table_stmt.cpp | 17 +++++++++++++++-- src/observer/sql/stmt/create_table_stmt.h | 14 ++++++++++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/observer/sql/stmt/create_table_stmt.cpp b/src/observer/sql/stmt/create_table_stmt.cpp index 722fb2ef..301215b0 100644 --- a/src/observer/sql/stmt/create_table_stmt.cpp +++ b/src/observer/sql/stmt/create_table_stmt.cpp @@ -17,7 +17,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/stmt/create_table_stmt.h" #include "event/sql_debug.h" -RC CreateTableStmt::create(Db *db, const CreateTableSqlNode &create_table, Stmt *&stmt) +RC CreateTableStmt::create(Db *db, CreateTableSqlNode &create_table, Stmt *&stmt) { StorageFormat storage_format = StorageFormat::UNKNOWN_FORMAT; if (create_table.storage_format.length() == 0) { @@ -28,7 +28,20 @@ RC CreateTableStmt::create(Db *db, const CreateTableSqlNode &create_table, Stmt if (storage_format == StorageFormat::UNKNOWN_FORMAT) { return RC::INVALID_ARGUMENT; } - stmt = new CreateTableStmt(create_table.relation_name, create_table.attr_infos, storage_format); + SelectStmt *select_stmt = nullptr; + if (create_table.attr_infos.empty()) { + Stmt *create_table_select_stmt; + RC rc = SelectStmt::create(db, create_table.create_table_select, create_table_select_stmt); + if (OB_FAIL(rc)) { + return rc; + } + select_stmt = dynamic_cast(create_table_select_stmt); + if (select_stmt == nullptr) { + return RC::INTERNAL; + } + } + + stmt = new CreateTableStmt(create_table.relation_name, create_table.attr_infos, storage_format, select_stmt); sql_debug("create table statement: table name %s", create_table.relation_name.c_str()); return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/create_table_stmt.h b/src/observer/sql/stmt/create_table_stmt.h index a7c0707e..f74dde7d 100644 --- a/src/observer/sql/stmt/create_table_stmt.h +++ b/src/observer/sql/stmt/create_table_stmt.h @@ -18,6 +18,7 @@ See the Mulan PSL v2 for more details. */ #include #include "sql/stmt/stmt.h" +#include "select_stmt.h" class Db; @@ -29,9 +30,12 @@ class Db; class CreateTableStmt : public Stmt { public: - CreateTableStmt( - const std::string &table_name, const std::vector &attr_infos, StorageFormat storage_format) - : table_name_(table_name), attr_infos_(attr_infos), storage_format_(storage_format) + CreateTableStmt(const std::string &table_name, const std::vector &attr_infos, + StorageFormat storage_format, SelectStmt *create_table_select_stmt) + : table_name_(table_name), + attr_infos_(attr_infos), + storage_format_(storage_format), + create_table_select_stmt_(create_table_select_stmt) {} virtual ~CreateTableStmt() = default; @@ -40,12 +44,14 @@ class CreateTableStmt : public Stmt const std::string &table_name() const { return table_name_; } const std::vector &attr_infos() const { return attr_infos_; } const StorageFormat storage_format() const { return storage_format_; } + SelectStmt *create_table_select_stmt() { return create_table_select_stmt_; } - static RC create(Db *db, const CreateTableSqlNode &create_table, Stmt *&stmt); + static RC create(Db *db, CreateTableSqlNode &create_table, Stmt *&stmt); static StorageFormat get_storage_format(const char *format_str); private: std::string table_name_; std::vector attr_infos_; StorageFormat storage_format_; + SelectStmt *create_table_select_stmt_; }; \ No newline at end of file From 4a0d164706879c4b4187766fa7de1b2ca6e4caa8 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 18:15:06 +0800 Subject: [PATCH 198/308] =?UTF-8?q?=E5=AE=8C=E6=88=90attr=5Finfos=E6=8E=A8?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/executor/create_table_executor.cpp | 42 +++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/src/observer/sql/executor/create_table_executor.cpp b/src/observer/sql/executor/create_table_executor.cpp index 3a0ab6e7..6fe5410f 100644 --- a/src/observer/sql/executor/create_table_executor.cpp +++ b/src/observer/sql/executor/create_table_executor.cpp @@ -23,6 +23,7 @@ See the Mulan PSL v2 for more details. */ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) { + RC rc; Stmt *stmt = sql_event->stmt(); Session *session = sql_event->session_event()->session(); ASSERT(stmt->type() == StmtType::CREATE_TABLE, @@ -30,10 +31,45 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) static_cast(stmt->type())); CreateTableStmt *create_table_stmt = static_cast(stmt); + const char *table_name = create_table_stmt->table_name().c_str(); + if (create_table_stmt->create_table_select_stmt()) { + std::vector field_exprs; + std::unordered_set table_names; + for (auto &expr : create_table_stmt->create_table_select_stmt()->query_expressions()) { + auto field_expr = dynamic_cast(expr.get()); + if (field_expr) { + table_names.emplace(field_expr->table_name()); + field_exprs.push_back(field_expr); + } + } - const char *table_name = create_table_stmt->table_name().c_str(); - RC rc = session->get_current_db()->create_table( - table_name, create_table_stmt->attr_infos(), create_table_stmt->storage_format()); + std::vector attr_infos; + for (auto &expr : field_exprs) { + AttrInfoSqlNode attr_info; + if (table_names.size() == 1) { + attr_info.name = expr->field_name(); + } else { + attr_info.name = expr->table_name(); + attr_info.name += "."; + attr_info.name += expr->field_name(); + } + attr_info.length = expr->field().meta()->len(); + attr_info.type = expr->field().meta()->type(); + attr_info.nullable = expr->field().meta()->nullable(); + + attr_infos.push_back(attr_info); + } + + rc = session->get_current_db()->create_table(table_name, attr_infos, create_table_stmt->storage_format()); + if (OB_FAIL(rc)) { + return rc; + } + + // TODO: insert records + } else { + rc = session->get_current_db()->create_table( + table_name, create_table_stmt->attr_infos(), create_table_stmt->storage_format()); + } return rc; } \ No newline at end of file From 20872642d7ec412a0c12f9019e4f2cb155ab61e1 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 19:47:52 +0800 Subject: [PATCH 199/308] =?UTF-8?q?=E5=AE=8C=E6=88=90create=20table=20sele?= =?UTF-8?q?ct?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/executor/create_table_executor.cpp | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/observer/sql/executor/create_table_executor.cpp b/src/observer/sql/executor/create_table_executor.cpp index 6fe5410f..77b97694 100644 --- a/src/observer/sql/executor/create_table_executor.cpp +++ b/src/observer/sql/executor/create_table_executor.cpp @@ -20,6 +20,11 @@ See the Mulan PSL v2 for more details. */ #include "session/session.h" #include "sql/stmt/create_table_stmt.h" #include "storage/db/db.h" +#include "sql/optimizer/logical_plan_generator.h" +#include "sql/operator/logical_operator.h" +#include "sql/operator/project_logical_operator.h" +#include "sql/optimizer/physical_plan_generator.h" +#include "storage/trx/trx.h" RC CreateTableExecutor::execute(SQLStageEvent *sql_event) { @@ -40,6 +45,8 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) if (field_expr) { table_names.emplace(field_expr->table_name()); field_exprs.push_back(field_expr); + } else { + return RC::INTERNAL; } } @@ -66,6 +73,51 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) } // TODO: insert records + unique_ptr logical_oper = nullptr; + LogicalPlanGenerator::create(create_table_stmt->create_table_select_stmt(), logical_oper); + if (!logical_oper) { + return RC::INTERNAL; + } + + unique_ptr physical_oper = nullptr; + PhysicalPlanGenerator::create(*logical_oper, physical_oper); + auto table_ = session->get_current_db()->find_table(table_name); + if (!physical_oper) { + return RC::INTERNAL; + } + + physical_oper->open(session->current_trx()); + while (RC::SUCCESS == (rc = physical_oper->next())) { + auto tuple = physical_oper->current_tuple(); + int num = tuple->cell_num(); + vector values; + for (int i = 0; i < num; i++) { + Value cell; + rc = tuple->cell_at(i, cell); + if (OB_FAIL(rc)) { + return rc; + } + values.push_back(cell); + } + + Record record; + rc = table_->make_record(static_cast(values.size()), values.data(), record); + if (OB_FAIL(rc)) { + return rc; + } + + rc = session->current_trx()->insert_record(table_, record); + if (OB_FAIL(rc)) { + return rc; + } + } + + rc = physical_oper->close(); + if (OB_FAIL(rc)) { + return rc; + } + + rc = RC::SUCCESS; } else { rc = session->get_current_db()->create_table( table_name, create_table_stmt->attr_infos(), create_table_stmt->storage_format()); From 6ea5d70580e8d2027c7c0f8bc78a8cc196fb3971 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 20:02:28 +0800 Subject: [PATCH 200/308] =?UTF-8?q?create=20table=20as=20select=20?= =?UTF-8?q?=E7=9A=84as=E5=8F=AF=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/lex_sql.cpp | 35 +- src/observer/sql/parser/lex_sql.h | 11 +- src/observer/sql/parser/yacc_sql.cpp | 904 ++++++++++++++------------- src/observer/sql/parser/yacc_sql.y | 8 + 4 files changed, 490 insertions(+), 468 deletions(-) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 9de242c1..db299f0f 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,4 +1,4 @@ -#line 2 "lex_sql.cpp" +#line 1 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -22,7 +22,7 @@ do { \ } \ while (0); -#line 26 "lex_sql.cpp" +#line 25 "lex_sql.cpp" #define YY_INT_ALIGNED short int @@ -93,6 +93,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -257,7 +258,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -334,7 +335,7 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -381,7 +382,7 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -755,8 +756,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -813,7 +814,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); @@ -892,7 +893,7 @@ static int input ( yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1641,7 +1642,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1655,7 +1656,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1713,7 +1714,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1820,7 +1821,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -2198,12 +2199,12 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); @@ -2247,7 +2248,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ @@ -2315,7 +2316,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 46266a60..5ec521aa 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,7 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 6 "lex_sql.h" +#line 5 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -26,7 +26,7 @@ do { \ } \ while (0); -#line 30 "lex_sql.h" +#line 29 "lex_sql.h" #define YY_INT_ALIGNED short int @@ -97,6 +97,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -210,7 +211,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -254,7 +255,7 @@ void yypop_buffer_state ( yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -310,7 +311,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 64306d56..4b7cb3d7 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -610,16 +610,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 255 +#define YYLAST 253 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 55 /* YYNRULES -- Number of rules. */ -#define YYNRULES 138 +#define YYNRULES 139 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 243 +#define YYNSTATES 244 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 326 @@ -679,16 +679,16 @@ static const yytype_int16 yyrline[] = 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 261, 267, 272, 278, 284, 290, 296, 303, 309, 317, 327, 342, 343, 347, 353, 362, - 372, 393, 404, 407, 420, 432, 459, 463, 467, 472, - 478, 482, 483, 484, 485, 486, 490, 503, 509, 516, - 522, 530, 534, 538, 544, 551, 554, 561, 573, 587, - 592, 599, 609, 642, 675, 681, 690, 693, 702, 718, - 721, 724, 727, 730, 739, 742, 747, 753, 756, 759, - 762, 769, 772, 775, 780, 787, 794, 799, 809, 815, - 825, 842, 849, 861, 864, 870, 874, 881, 885, 892, - 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, - 903, 904, 905, 910, 913, 921, 926, 934, 940, 946, - 956, 959, 967, 970, 977, 990, 998, 1008, 1009 + 372, 393, 401, 412, 415, 428, 440, 467, 471, 475, + 480, 486, 490, 491, 492, 493, 494, 498, 511, 517, + 524, 530, 538, 542, 546, 552, 559, 562, 569, 581, + 595, 600, 607, 617, 650, 683, 689, 698, 701, 710, + 726, 729, 732, 735, 738, 747, 750, 755, 761, 764, + 767, 770, 777, 780, 783, 788, 795, 802, 807, 817, + 823, 833, 850, 857, 869, 872, 878, 882, 889, 893, + 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, + 910, 911, 912, 913, 918, 921, 929, 934, 942, 948, + 954, 964, 967, 975, 978, 985, 998, 1006, 1016, 1017 }; #endif @@ -735,7 +735,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-166) +#define YYPACT_NINF (-169) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -749,31 +749,31 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 179, -5, 32, 84, 84, -55, 10, -166, -22, 9, - -29, -166, -166, -166, -166, -166, -7, 46, 179, 51, - 79, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, 38, -166, 105, 52, 54, 112, -166, -166, - -166, -9, -166, 84, -166, -166, -166, 12, -166, -166, - -166, 85, -166, -166, 86, 58, 63, 88, 74, 81, - -166, -166, -166, -166, 14, 69, -166, 89, 84, 116, - 118, 84, -50, -166, 76, -166, 84, 84, 84, 84, - 120, 78, 78, 111, 102, 80, -18, 90, 141, 93, - 109, 114, 85, -166, -166, 153, -166, -166, -166, 37, - 37, -166, -166, 84, -166, 6, 102, -166, 165, 104, - -166, 131, 0, -166, -166, 149, -166, 82, 167, 125, - -166, -166, -166, 145, 178, 195, -18, 183, -166, -166, - 13, -166, -166, -166, -166, -166, -166, -166, 174, 30, - 71, 84, 84, 80, -166, 198, -166, -166, -166, -166, - -166, 17, 93, 187, 189, 78, 78, 208, 204, 39, - -166, 192, -166, -166, -166, -166, 84, 104, 104, -44, - -44, -166, 148, 151, 184, -166, -166, -166, 167, 166, - 154, 175, 102, 7, -166, 84, 104, 212, -166, -18, - -18, -44, -166, 180, -166, -166, 201, -166, -166, 173, - -166, 205, 207, 104, 195, -166, 71, 228, -166, -166, - 43, 21, 176, 154, -166, 40, -166, 84, -166, -166, - 168, -166, 181, -1, -166, 210, -166, 78, -166, -166, - 84, -166, -166 + 183, 4, 51, 115, 115, -47, 1, -169, -19, -17, + -31, -169, -169, -169, -169, -169, 20, 46, 183, 113, + 116, -169, -169, -169, -169, -169, -169, -169, -169, -169, + -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, + -169, -169, 54, -169, 109, 59, 61, 82, -169, -169, + -169, 18, -169, 115, -169, -169, -169, 10, -169, -169, + -169, 86, -169, -169, 87, 64, 65, 88, 76, 85, + -169, -169, -169, -169, 9, 71, -169, 94, 115, 117, + 121, 115, -46, -169, 78, -169, 115, 115, 115, 115, + 122, 89, 89, 112, 111, 90, -20, 91, 143, 110, + -169, 130, 124, 86, -169, -169, 138, -169, -169, -169, + 42, 42, -169, -169, 115, -169, 2, 111, -169, 157, + 105, -169, 127, -1, -169, -169, 151, -169, 19, 169, + 128, -169, -169, -169, 140, 170, 197, -20, 182, -169, + -169, 0, -169, -169, -169, -169, -169, -169, -169, 173, + 31, 22, 115, 115, 90, -169, 200, -169, -169, -169, + -169, -169, 37, 110, 189, 191, 89, 89, 210, 206, + 92, -169, 194, -169, -169, -169, -169, 115, 105, 105, + -16, -16, -169, 150, 153, 184, -169, -169, -169, 169, + 166, 156, 176, 111, 3, -169, 115, 105, 215, -169, + -20, -20, -16, -169, 181, -169, -169, 204, -169, -169, + 174, -169, 205, 208, 105, 197, -169, 22, 229, -169, + -169, 96, 73, 177, 156, -169, -27, -169, 115, -169, + -169, 171, -169, 180, 14, -169, 213, -169, 89, -169, + -169, 115, -169, -169 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -781,53 +781,53 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 36, 0, 76, 76, 0, 0, 26, 0, 0, + 0, 36, 0, 77, 77, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 137, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 138, 23, 22, 15, 16, 17, 18, 9, 10, 11, 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 35, 0, 0, 0, 76, 64, 61, - 62, 96, 63, 0, 87, 85, 74, 91, 89, 90, - 86, 75, 32, 31, 0, 0, 0, 0, 0, 0, - 135, 1, 138, 2, 0, 0, 30, 0, 76, 0, - 0, 76, 0, 84, 0, 92, 0, 0, 0, 0, - 77, 0, 0, 0, 103, 0, 0, 0, 0, 0, - 0, 0, 0, 95, 83, 0, 97, 88, 93, 79, - 80, 81, 82, 76, 98, 91, 103, 33, 0, 0, - 67, 0, 103, 69, 136, 0, 41, 0, 42, 0, - 39, 94, 78, 0, 99, 130, 0, 56, 121, 119, - 0, 109, 110, 111, 112, 113, 114, 117, 115, 0, - 104, 0, 0, 0, 68, 0, 51, 52, 53, 54, - 55, 49, 0, 0, 0, 0, 0, 0, 132, 0, - 59, 0, 122, 120, 118, 116, 0, 0, 0, 106, - 71, 70, 0, 0, 0, 48, 47, 45, 42, 65, - 0, 0, 103, 91, 100, 76, 0, 123, 57, 0, - 0, 105, 107, 108, 134, 50, 0, 46, 43, 0, - 40, 37, 0, 0, 130, 131, 133, 0, 72, 60, - 0, 49, 0, 0, 34, 101, 73, 0, 58, 44, - 0, 38, 0, 127, 124, 125, 66, 0, 129, 128, - 0, 102, 126 + 20, 21, 0, 35, 0, 0, 0, 77, 65, 62, + 63, 97, 64, 0, 88, 86, 75, 92, 90, 91, + 87, 76, 32, 31, 0, 0, 0, 0, 0, 0, + 136, 1, 139, 2, 0, 0, 30, 0, 77, 0, + 0, 77, 0, 85, 0, 93, 0, 0, 0, 0, + 78, 0, 0, 0, 104, 0, 0, 0, 0, 0, + 42, 0, 0, 0, 96, 84, 0, 98, 89, 94, + 80, 81, 82, 83, 77, 99, 92, 104, 33, 0, + 0, 68, 0, 104, 70, 137, 0, 41, 0, 43, + 0, 39, 95, 79, 0, 100, 131, 0, 57, 122, + 120, 0, 110, 111, 112, 113, 114, 115, 118, 116, + 0, 105, 0, 0, 0, 69, 0, 52, 53, 54, + 55, 56, 50, 0, 0, 0, 0, 0, 0, 133, + 0, 60, 0, 123, 121, 119, 117, 0, 0, 0, + 107, 72, 71, 0, 0, 0, 49, 48, 46, 43, + 66, 0, 0, 104, 92, 101, 77, 0, 124, 58, + 0, 0, 106, 108, 109, 135, 51, 0, 47, 44, + 0, 40, 37, 0, 0, 131, 132, 134, 0, 73, + 61, 0, 50, 0, 0, 34, 102, 74, 0, 59, + 45, 0, 38, 0, 128, 125, 126, 67, 0, 130, + 129, 0, 103, 127 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -166, -166, 220, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, -166, -166, 18, -166, -166, 55, 83, - 19, -166, -166, -166, -166, 42, -94, -166, -166, -166, - -166, 91, -40, -166, -4, -52, 190, -166, -166, -166, - -86, 87, 11, -113, -165, 97, -166, 15, -166, 35, - -166, -166, -166, -166, -166 + -169, -169, 223, -169, -169, -169, -169, -169, -169, -169, + -169, -169, -169, -169, -169, 21, -169, -169, 53, 80, + 24, -169, -169, -169, -169, 43, -93, -169, -169, -169, + -169, 93, -35, -169, -4, -52, 192, -169, -169, -169, + -87, 81, 12, -115, -168, 101, -169, 11, -169, 38, + -169, -169, -169, -169, -169 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 212, 32, 33, 163, 128, - 187, 206, 161, 34, 137, 169, 55, 210, 35, 36, - 122, 123, 37, 38, 56, 57, 134, 58, 59, 60, - 191, 116, 192, 120, 150, 151, 218, 234, 235, 168, - 197, 39, 40, 41, 73 + 28, 29, 30, 31, 44, 213, 32, 33, 164, 129, + 188, 207, 162, 34, 138, 170, 55, 211, 35, 36, + 123, 124, 37, 38, 56, 57, 135, 58, 59, 60, + 192, 117, 193, 121, 151, 152, 219, 235, 236, 169, + 198, 39, 40, 41, 73 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -835,62 +835,62 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 61, 83, 124, 135, 238, 115, 117, 79, 42, 154, - 84, 84, 202, 203, 62, 81, 84, 239, 98, 106, - 48, 65, 172, 107, 63, 64, 153, 86, 87, 88, - 89, 216, 43, 82, 109, 110, 111, 112, 99, 138, - 67, 183, 170, 80, 173, 45, 119, 46, 225, 49, - 50, 71, 52, 184, 66, 185, 186, 184, 126, 185, - 186, 139, 68, 133, 198, 199, 140, 149, 228, 199, - 86, 87, 88, 89, 102, 85, 85, 105, 174, 214, - 193, 85, 72, 86, 87, 88, 89, 177, 178, 141, - 142, 143, 144, 145, 146, 147, 148, 232, 69, 179, - 180, 86, 87, 88, 89, 219, 170, 74, 47, 132, - 88, 89, 156, 138, 157, 158, 159, 160, 177, 178, - 75, 76, 48, 77, 201, 149, 149, 93, 47, 78, - 91, 92, 94, 96, 97, 139, 47, 95, 100, 101, - 140, 103, 48, 104, 149, 108, 113, 114, 119, 121, - 48, 49, 50, 51, 52, 118, 53, 54, 78, 129, - 125, 149, 127, 141, 142, 143, 144, 145, 146, 147, - 148, 49, 50, 51, 52, 233, 53, 54, 131, 49, - 50, 51, 52, 130, 53, 54, 1, 2, 233, 136, - 152, 215, 155, 162, 164, 3, 4, 5, 6, 7, - 8, 9, 10, 165, 166, 167, 11, 12, 13, 171, - 175, 182, 189, 190, 195, 196, 200, 204, 205, 14, - 15, 209, 207, 211, 217, 213, 221, 177, 16, 222, - 17, 223, 224, 18, 227, 230, 240, 236, 70, 237, - 229, 231, 220, 208, 181, 188, 176, 90, 241, 226, - 0, 0, 0, 194, 0, 242 + 61, 83, 136, 125, 116, 118, 84, 84, 155, 173, + 203, 204, 79, 98, 84, 63, 64, 42, 48, 239, + 178, 179, 62, 107, 65, 154, 78, 108, 66, 217, + 233, 174, 240, 99, 110, 111, 112, 113, 67, 100, + 139, 43, 81, 80, 171, 120, 226, 49, 50, 157, + 52, 158, 159, 160, 161, 86, 87, 88, 89, 134, + 82, 184, 140, 127, 45, 175, 46, 141, 150, 178, + 179, 85, 85, 185, 103, 186, 187, 106, 215, 85, + 194, 86, 87, 88, 89, 86, 87, 88, 89, 68, + 142, 143, 144, 145, 146, 147, 148, 149, 69, 78, + 180, 181, 86, 87, 88, 89, 47, 220, 171, 185, + 133, 186, 187, 71, 139, 88, 89, 199, 200, 72, + 48, 229, 200, 74, 75, 202, 150, 150, 76, 47, + 77, 91, 92, 93, 94, 96, 140, 95, 97, 47, + 101, 141, 104, 48, 102, 150, 105, 109, 114, 49, + 50, 51, 52, 48, 53, 54, 119, 120, 115, 122, + 78, 126, 150, 132, 142, 143, 144, 145, 146, 147, + 148, 149, 49, 50, 51, 52, 234, 53, 54, 128, + 130, 137, 49, 50, 51, 52, 153, 53, 54, 234, + 1, 2, 216, 131, 156, 163, 167, 165, 166, 3, + 4, 5, 6, 7, 8, 9, 10, 168, 172, 176, + 11, 12, 13, 183, 190, 191, 196, 197, 201, 205, + 206, 210, 208, 14, 15, 212, 214, 218, 178, 222, + 223, 224, 16, 225, 17, 228, 231, 18, 238, 241, + 237, 70, 209, 189, 221, 232, 230, 182, 195, 90, + 242, 177, 243, 227 }; -static const yytype_int16 yycheck[] = +static const yytype_uint8 yycheck[] = { - 4, 53, 96, 116, 5, 91, 92, 47, 13, 122, - 4, 4, 177, 178, 69, 24, 4, 18, 4, 69, - 38, 43, 9, 73, 14, 15, 26, 71, 72, 73, - 74, 196, 37, 42, 86, 87, 88, 89, 24, 9, - 69, 24, 136, 47, 31, 13, 46, 15, 213, 67, - 68, 0, 70, 36, 45, 38, 39, 36, 98, 38, - 39, 31, 69, 57, 25, 26, 36, 119, 25, 26, - 71, 72, 73, 74, 78, 69, 69, 81, 65, 192, - 166, 69, 3, 71, 72, 73, 74, 47, 48, 59, - 60, 61, 62, 63, 64, 65, 66, 57, 52, 151, - 152, 71, 72, 73, 74, 199, 200, 69, 24, 113, - 73, 74, 30, 9, 32, 33, 34, 35, 47, 48, - 15, 69, 38, 69, 176, 177, 178, 69, 24, 17, - 45, 45, 69, 59, 53, 31, 24, 49, 69, 50, - 36, 25, 38, 25, 196, 69, 26, 69, 46, 69, - 38, 67, 68, 69, 70, 44, 72, 73, 17, 50, - 70, 213, 69, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 227, 72, 73, 25, 67, - 68, 69, 70, 69, 72, 73, 7, 8, 240, 24, - 59, 195, 43, 26, 69, 16, 17, 18, 19, 20, - 21, 22, 23, 58, 26, 10, 27, 28, 29, 26, - 36, 13, 25, 24, 6, 11, 24, 69, 67, 40, - 41, 55, 38, 69, 12, 50, 25, 47, 49, 56, - 51, 26, 25, 54, 6, 59, 26, 69, 18, 58, - 221, 223, 200, 188, 153, 162, 149, 57, 237, 214, - -1, -1, -1, 166, -1, 240 + 4, 53, 117, 96, 91, 92, 4, 4, 123, 9, + 178, 179, 47, 4, 4, 14, 15, 13, 38, 5, + 47, 48, 69, 69, 43, 26, 17, 73, 45, 197, + 57, 31, 18, 24, 86, 87, 88, 89, 69, 74, + 9, 37, 24, 47, 137, 46, 214, 67, 68, 30, + 70, 32, 33, 34, 35, 71, 72, 73, 74, 57, + 42, 24, 31, 98, 13, 65, 15, 36, 120, 47, + 48, 69, 69, 36, 78, 38, 39, 81, 193, 69, + 167, 71, 72, 73, 74, 71, 72, 73, 74, 69, + 59, 60, 61, 62, 63, 64, 65, 66, 52, 17, + 152, 153, 71, 72, 73, 74, 24, 200, 201, 36, + 114, 38, 39, 0, 9, 73, 74, 25, 26, 3, + 38, 25, 26, 69, 15, 177, 178, 179, 69, 24, + 69, 45, 45, 69, 69, 59, 31, 49, 53, 24, + 69, 36, 25, 38, 50, 197, 25, 69, 26, 67, + 68, 69, 70, 38, 72, 73, 44, 46, 69, 69, + 17, 70, 214, 25, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 228, 72, 73, 69, + 50, 24, 67, 68, 69, 70, 59, 72, 73, 241, + 7, 8, 196, 69, 43, 26, 26, 69, 58, 16, + 17, 18, 19, 20, 21, 22, 23, 10, 26, 36, + 27, 28, 29, 13, 25, 24, 6, 11, 24, 69, + 67, 55, 38, 40, 41, 69, 50, 12, 47, 25, + 56, 26, 49, 25, 51, 6, 59, 54, 58, 26, + 69, 18, 189, 163, 201, 224, 222, 154, 167, 57, + 238, 150, 241, 215 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -907,21 +907,21 @@ static const yytype_uint8 yystos[] = 78, 0, 3, 130, 69, 15, 69, 69, 17, 108, 110, 24, 42, 111, 4, 69, 71, 72, 73, 74, 112, 45, 45, 69, 69, 49, 59, 53, 4, 24, - 69, 50, 110, 25, 25, 110, 69, 73, 69, 111, - 111, 111, 111, 26, 69, 116, 117, 116, 44, 46, - 119, 69, 106, 107, 102, 70, 108, 69, 95, 50, - 69, 25, 110, 57, 112, 119, 24, 100, 9, 31, - 36, 59, 60, 61, 62, 63, 64, 65, 66, 111, - 120, 121, 59, 26, 119, 43, 30, 32, 33, 34, - 35, 98, 26, 94, 69, 58, 26, 10, 125, 101, - 102, 26, 9, 31, 65, 36, 121, 47, 48, 111, - 111, 107, 13, 24, 36, 38, 39, 96, 95, 25, - 24, 116, 118, 116, 117, 6, 11, 126, 25, 26, - 24, 111, 120, 120, 69, 67, 97, 38, 94, 55, - 103, 69, 91, 50, 119, 110, 120, 12, 122, 102, - 101, 25, 56, 26, 25, 120, 125, 6, 25, 96, - 59, 91, 57, 111, 123, 124, 69, 58, 5, 18, - 26, 118, 123 + 108, 69, 50, 110, 25, 25, 110, 69, 73, 69, + 111, 111, 111, 111, 26, 69, 116, 117, 116, 44, + 46, 119, 69, 106, 107, 102, 70, 108, 69, 95, + 50, 69, 25, 110, 57, 112, 119, 24, 100, 9, + 31, 36, 59, 60, 61, 62, 63, 64, 65, 66, + 111, 120, 121, 59, 26, 119, 43, 30, 32, 33, + 34, 35, 98, 26, 94, 69, 58, 26, 10, 125, + 101, 102, 26, 9, 31, 65, 36, 121, 47, 48, + 111, 111, 107, 13, 24, 36, 38, 39, 96, 95, + 25, 24, 116, 118, 116, 117, 6, 11, 126, 25, + 26, 24, 111, 120, 120, 69, 67, 97, 38, 94, + 55, 103, 69, 91, 50, 119, 110, 120, 12, 122, + 102, 101, 25, 56, 26, 25, 120, 125, 6, 25, + 96, 59, 91, 57, 111, 123, 124, 69, 58, 5, + 18, 26, 118, 123 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -931,16 +931,16 @@ static const yytype_uint8 yyr1[] = 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 90, 91, 91, 92, - 93, 93, 94, 94, 95, 95, 96, 96, 96, 96, - 97, 98, 98, 98, 98, 98, 99, 100, 100, 101, - 101, 102, 102, 102, 102, 103, 103, 104, 105, 106, - 106, 107, 108, 108, 109, 109, 110, 110, 110, 111, + 93, 93, 93, 94, 94, 95, 95, 96, 96, 96, + 96, 97, 98, 98, 98, 98, 98, 99, 100, 100, + 101, 101, 102, 102, 102, 102, 103, 103, 104, 105, + 106, 106, 107, 108, 108, 109, 109, 110, 110, 110, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 112, 112, 112, 113, 114, 115, 115, 116, 117, - 117, 118, 118, 119, 119, 120, 120, 120, 120, 121, + 111, 111, 112, 112, 112, 113, 114, 115, 115, 116, + 117, 117, 118, 118, 119, 119, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 122, 122, 123, 123, 124, 124, 124, - 125, 125, 126, 126, 127, 128, 129, 130, 130 + 121, 121, 121, 121, 122, 122, 123, 123, 124, 124, + 124, 125, 125, 126, 126, 127, 128, 129, 130, 130 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -950,16 +950,16 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, - 8, 5, 0, 3, 6, 3, 2, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 5, 3, 5, 1, - 3, 1, 1, 1, 1, 0, 4, 4, 5, 1, - 3, 3, 8, 9, 2, 2, 0, 2, 4, 3, - 3, 3, 3, 3, 2, 1, 1, 1, 3, 1, - 1, 0, 1, 2, 4, 3, 1, 3, 1, 2, - 4, 3, 6, 0, 2, 3, 2, 3, 3, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, - 2, 1, 2, 0, 3, 1, 3, 1, 2, 2, - 0, 3, 0, 2, 7, 2, 4, 0, 1 + 8, 5, 4, 0, 3, 6, 3, 2, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 5, 3, 5, + 1, 3, 1, 1, 1, 1, 0, 4, 4, 5, + 1, 3, 3, 8, 9, 2, 2, 0, 2, 4, + 3, 3, 3, 3, 3, 2, 1, 1, 1, 3, + 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, + 2, 4, 3, 6, 0, 2, 3, 2, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, + 1, 2, 1, 2, 0, 3, 1, 3, 1, 2, + 2, 0, 3, 0, 2, 7, 2, 4, 0, 1 }; @@ -2014,16 +2014,28 @@ YYLTYPE yylloc = yyloc_default; #line 2015 "yacc_sql.cpp" break; - case 42: /* attr_def_list: %empty */ -#line 404 "yacc_sql.y" + case 42: /* create_table_stmt: CREATE TABLE ID select_stmt */ +#line 402 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; + create_table.relation_name = (yyvsp[-1].string); + free((yyvsp[-1].string)); + create_table.create_table_select = std::move((yyvsp[0].sql_node)->selection); + } +#line 2027 "yacc_sql.cpp" + break; + + case 43: /* attr_def_list: %empty */ +#line 412 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2023 "yacc_sql.cpp" +#line 2035 "yacc_sql.cpp" break; - case 43: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 408 "yacc_sql.y" + case 44: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 416 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -2033,11 +2045,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2037 "yacc_sql.cpp" +#line 2049 "yacc_sql.cpp" break; - case 44: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 421 "yacc_sql.y" + case 45: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ +#line 429 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -2049,11 +2061,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2053 "yacc_sql.cpp" +#line 2065 "yacc_sql.cpp" break; - case 45: /* attr_def: ID type nullable_constraint */ -#line 433 "yacc_sql.y" + case 46: /* attr_def: ID type nullable_constraint */ +#line 441 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -2077,79 +2089,79 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2081 "yacc_sql.cpp" +#line 2093 "yacc_sql.cpp" break; - case 46: /* nullable_constraint: NOT NULL_T */ -#line 460 "yacc_sql.y" + case 47: /* nullable_constraint: NOT NULL_T */ +#line 468 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2089 "yacc_sql.cpp" +#line 2101 "yacc_sql.cpp" break; - case 47: /* nullable_constraint: NULLABLE */ -#line 464 "yacc_sql.y" + case 48: /* nullable_constraint: NULLABLE */ +#line 472 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2097 "yacc_sql.cpp" +#line 2109 "yacc_sql.cpp" break; - case 48: /* nullable_constraint: NULL_T */ -#line 468 "yacc_sql.y" + case 49: /* nullable_constraint: NULL_T */ +#line 476 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2105 "yacc_sql.cpp" +#line 2117 "yacc_sql.cpp" break; - case 49: /* nullable_constraint: %empty */ -#line 472 "yacc_sql.y" + case 50: /* nullable_constraint: %empty */ +#line 480 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2113 "yacc_sql.cpp" +#line 2125 "yacc_sql.cpp" break; - case 50: /* number: NUMBER */ -#line 478 "yacc_sql.y" + case 51: /* number: NUMBER */ +#line 486 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 2119 "yacc_sql.cpp" +#line 2131 "yacc_sql.cpp" break; - case 51: /* type: INT_T */ -#line 482 "yacc_sql.y" + case 52: /* type: INT_T */ +#line 490 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2125 "yacc_sql.cpp" +#line 2137 "yacc_sql.cpp" break; - case 52: /* type: STRING_T */ -#line 483 "yacc_sql.y" + case 53: /* type: STRING_T */ +#line 491 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2131 "yacc_sql.cpp" +#line 2143 "yacc_sql.cpp" break; - case 53: /* type: FLOAT_T */ -#line 484 "yacc_sql.y" + case 54: /* type: FLOAT_T */ +#line 492 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2137 "yacc_sql.cpp" +#line 2149 "yacc_sql.cpp" break; - case 54: /* type: DATE_T */ -#line 485 "yacc_sql.y" + case 55: /* type: DATE_T */ +#line 493 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2143 "yacc_sql.cpp" +#line 2155 "yacc_sql.cpp" break; - case 55: /* type: TEXT_T */ -#line 486 "yacc_sql.y" + case 56: /* type: TEXT_T */ +#line 494 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2149 "yacc_sql.cpp" +#line 2161 "yacc_sql.cpp" break; - case 56: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 491 "yacc_sql.y" + case 57: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 499 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2159,102 +2171,102 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2163 "yacc_sql.cpp" +#line 2175 "yacc_sql.cpp" break; - case 57: /* values_list: LBRACE value_list RBRACE */ -#line 504 "yacc_sql.y" + case 58: /* values_list: LBRACE value_list RBRACE */ +#line 512 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2173 "yacc_sql.cpp" +#line 2185 "yacc_sql.cpp" break; - case 58: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 510 "yacc_sql.y" + case 59: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 518 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2182 "yacc_sql.cpp" +#line 2194 "yacc_sql.cpp" break; - case 59: /* value_list: value */ -#line 517 "yacc_sql.y" + case 60: /* value_list: value */ +#line 525 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2192 "yacc_sql.cpp" +#line 2204 "yacc_sql.cpp" break; - case 60: /* value_list: value_list COMMA value */ -#line 523 "yacc_sql.y" + case 61: /* value_list: value_list COMMA value */ +#line 531 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2201 "yacc_sql.cpp" +#line 2213 "yacc_sql.cpp" break; - case 61: /* value: NUMBER */ -#line 530 "yacc_sql.y" + case 62: /* value: NUMBER */ +#line 538 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2210 "yacc_sql.cpp" +#line 2222 "yacc_sql.cpp" break; - case 62: /* value: FLOAT */ -#line 534 "yacc_sql.y" + case 63: /* value: FLOAT */ +#line 542 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2219 "yacc_sql.cpp" +#line 2231 "yacc_sql.cpp" break; - case 63: /* value: SSS */ -#line 538 "yacc_sql.y" + case 64: /* value: SSS */ +#line 546 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2230 "yacc_sql.cpp" +#line 2242 "yacc_sql.cpp" break; - case 64: /* value: NULL_T */ -#line 544 "yacc_sql.y" + case 65: /* value: NULL_T */ +#line 552 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2238 "yacc_sql.cpp" +#line 2250 "yacc_sql.cpp" break; - case 65: /* storage_format: %empty */ -#line 551 "yacc_sql.y" + case 66: /* storage_format: %empty */ +#line 559 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2246 "yacc_sql.cpp" +#line 2258 "yacc_sql.cpp" break; - case 66: /* storage_format: STORAGE FORMAT EQ ID */ -#line 555 "yacc_sql.y" + case 67: /* storage_format: STORAGE FORMAT EQ ID */ +#line 563 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2254 "yacc_sql.cpp" +#line 2266 "yacc_sql.cpp" break; - case 67: /* delete_stmt: DELETE FROM ID where */ -#line 562 "yacc_sql.y" + case 68: /* delete_stmt: DELETE FROM ID where */ +#line 570 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2263,11 +2275,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2267 "yacc_sql.cpp" +#line 2279 "yacc_sql.cpp" break; - case 68: /* update_stmt: UPDATE ID SET setClauses where */ -#line 574 "yacc_sql.y" + case 69: /* update_stmt: UPDATE ID SET setClauses where */ +#line 582 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2278,39 +2290,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2282 "yacc_sql.cpp" +#line 2294 "yacc_sql.cpp" break; - case 69: /* setClauses: setClause */ -#line 588 "yacc_sql.y" + case 70: /* setClauses: setClause */ +#line 596 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2291 "yacc_sql.cpp" +#line 2303 "yacc_sql.cpp" break; - case 70: /* setClauses: setClauses COMMA setClause */ -#line 593 "yacc_sql.y" + case 71: /* setClauses: setClauses COMMA setClause */ +#line 601 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2299 "yacc_sql.cpp" +#line 2311 "yacc_sql.cpp" break; - case 71: /* setClause: ID EQ expression */ -#line 600 "yacc_sql.y" + case 72: /* setClause: ID EQ expression */ +#line 608 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2310 "yacc_sql.cpp" +#line 2322 "yacc_sql.cpp" break; - case 72: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ -#line 610 "yacc_sql.y" + case 73: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ +#line 618 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-6].expression_list) != nullptr) { @@ -2343,11 +2355,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2347 "yacc_sql.cpp" +#line 2359 "yacc_sql.cpp" break; - case 73: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 643 "yacc_sql.y" + case 74: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 651 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2377,39 +2389,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2381 "yacc_sql.cpp" +#line 2393 "yacc_sql.cpp" break; - case 74: /* calc_stmt: CALC expression_list */ -#line 676 "yacc_sql.y" + case 75: /* calc_stmt: CALC expression_list */ +#line 684 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2391 "yacc_sql.cpp" +#line 2403 "yacc_sql.cpp" break; - case 75: /* calc_stmt: SELECT expression_list */ -#line 682 "yacc_sql.y" + case 76: /* calc_stmt: SELECT expression_list */ +#line 690 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2401 "yacc_sql.cpp" +#line 2413 "yacc_sql.cpp" break; - case 76: /* expression_list: %empty */ -#line 690 "yacc_sql.y" + case 77: /* expression_list: %empty */ +#line 698 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2409 "yacc_sql.cpp" +#line 2421 "yacc_sql.cpp" break; - case 77: /* expression_list: expression alias */ -#line 694 "yacc_sql.y" + case 78: /* expression_list: expression alias */ +#line 702 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2418,11 +2430,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2422 "yacc_sql.cpp" +#line 2434 "yacc_sql.cpp" break; - case 78: /* expression_list: expression alias COMMA expression_list */ -#line 703 "yacc_sql.y" + case 79: /* expression_list: expression alias COMMA expression_list */ +#line 711 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2435,43 +2447,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2439 "yacc_sql.cpp" +#line 2451 "yacc_sql.cpp" break; - case 79: /* expression: expression '+' expression */ -#line 718 "yacc_sql.y" + case 80: /* expression: expression '+' expression */ +#line 726 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2447 "yacc_sql.cpp" +#line 2459 "yacc_sql.cpp" break; - case 80: /* expression: expression '-' expression */ -#line 721 "yacc_sql.y" + case 81: /* expression: expression '-' expression */ +#line 729 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2455 "yacc_sql.cpp" +#line 2467 "yacc_sql.cpp" break; - case 81: /* expression: expression '*' expression */ -#line 724 "yacc_sql.y" + case 82: /* expression: expression '*' expression */ +#line 732 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2463 "yacc_sql.cpp" +#line 2475 "yacc_sql.cpp" break; - case 82: /* expression: expression '/' expression */ -#line 727 "yacc_sql.y" + case 83: /* expression: expression '/' expression */ +#line 735 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2471 "yacc_sql.cpp" +#line 2483 "yacc_sql.cpp" break; - case 83: /* expression: LBRACE expression_list RBRACE */ -#line 730 "yacc_sql.y" + case 84: /* expression: LBRACE expression_list RBRACE */ +#line 738 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2481,122 +2493,122 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2485 "yacc_sql.cpp" +#line 2497 "yacc_sql.cpp" break; - case 84: /* expression: '-' expression */ -#line 739 "yacc_sql.y" + case 85: /* expression: '-' expression */ +#line 747 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2493 "yacc_sql.cpp" +#line 2505 "yacc_sql.cpp" break; - case 85: /* expression: value */ -#line 742 "yacc_sql.y" + case 86: /* expression: value */ +#line 750 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2503 "yacc_sql.cpp" +#line 2515 "yacc_sql.cpp" break; - case 86: /* expression: rel_attr */ -#line 747 "yacc_sql.y" + case 87: /* expression: rel_attr */ +#line 755 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2514 "yacc_sql.cpp" +#line 2526 "yacc_sql.cpp" break; - case 87: /* expression: '*' */ -#line 753 "yacc_sql.y" + case 88: /* expression: '*' */ +#line 761 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2522 "yacc_sql.cpp" +#line 2534 "yacc_sql.cpp" break; - case 88: /* expression: ID DOT '*' */ -#line 756 "yacc_sql.y" + case 89: /* expression: ID DOT '*' */ +#line 764 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2530 "yacc_sql.cpp" +#line 2542 "yacc_sql.cpp" break; - case 89: /* expression: aggr_func_expr */ -#line 759 "yacc_sql.y" + case 90: /* expression: aggr_func_expr */ +#line 767 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2538 "yacc_sql.cpp" +#line 2550 "yacc_sql.cpp" break; - case 90: /* expression: sub_query_expr */ -#line 762 "yacc_sql.y" + case 91: /* expression: sub_query_expr */ +#line 770 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2546 "yacc_sql.cpp" +#line 2558 "yacc_sql.cpp" break; - case 91: /* alias: %empty */ -#line 769 "yacc_sql.y" + case 92: /* alias: %empty */ +#line 777 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2554 "yacc_sql.cpp" +#line 2566 "yacc_sql.cpp" break; - case 92: /* alias: ID */ -#line 772 "yacc_sql.y" + case 93: /* alias: ID */ +#line 780 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2562 "yacc_sql.cpp" +#line 2574 "yacc_sql.cpp" break; - case 93: /* alias: AS ID */ -#line 775 "yacc_sql.y" + case 94: /* alias: AS ID */ +#line 783 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2570 "yacc_sql.cpp" +#line 2582 "yacc_sql.cpp" break; - case 94: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 781 "yacc_sql.y" + case 95: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 789 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2578 "yacc_sql.cpp" +#line 2590 "yacc_sql.cpp" break; - case 95: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 788 "yacc_sql.y" + case 96: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 796 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2586 "yacc_sql.cpp" +#line 2598 "yacc_sql.cpp" break; - case 96: /* rel_attr: ID */ -#line 794 "yacc_sql.y" + case 97: /* rel_attr: ID */ +#line 802 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2596 "yacc_sql.cpp" +#line 2608 "yacc_sql.cpp" break; - case 97: /* rel_attr: ID DOT ID */ -#line 799 "yacc_sql.y" + case 98: /* rel_attr: ID DOT ID */ +#line 807 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2604,19 +2616,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2608 "yacc_sql.cpp" +#line 2620 "yacc_sql.cpp" break; - case 98: /* relation: ID */ -#line 809 "yacc_sql.y" + case 99: /* relation: ID */ +#line 817 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2616 "yacc_sql.cpp" +#line 2628 "yacc_sql.cpp" break; - case 99: /* rel_list: relation alias */ -#line 815 "yacc_sql.y" + case 100: /* rel_list: relation alias */ +#line 823 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2627,11 +2639,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2631 "yacc_sql.cpp" +#line 2643 "yacc_sql.cpp" break; - case 100: /* rel_list: relation alias COMMA rel_list */ -#line 825 "yacc_sql.y" + case 101: /* rel_list: relation alias COMMA rel_list */ +#line 833 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2646,22 +2658,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2650 "yacc_sql.cpp" +#line 2662 "yacc_sql.cpp" break; - case 101: /* joinClauses: relation ON condition */ -#line 843 "yacc_sql.y" + case 102: /* joinClauses: relation ON condition */ +#line 851 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2661 "yacc_sql.cpp" +#line 2673 "yacc_sql.cpp" break; - case 102: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 850 "yacc_sql.y" + case 103: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 858 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2669,243 +2681,243 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2673 "yacc_sql.cpp" +#line 2685 "yacc_sql.cpp" break; - case 103: /* where: %empty */ -#line 861 "yacc_sql.y" + case 104: /* where: %empty */ +#line 869 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2681 "yacc_sql.cpp" +#line 2693 "yacc_sql.cpp" break; - case 104: /* where: WHERE condition */ -#line 864 "yacc_sql.y" + case 105: /* where: WHERE condition */ +#line 872 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2689 "yacc_sql.cpp" +#line 2701 "yacc_sql.cpp" break; - case 105: /* condition: expression comp_op expression */ -#line 871 "yacc_sql.y" + case 106: /* condition: expression comp_op expression */ +#line 879 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2697 "yacc_sql.cpp" +#line 2709 "yacc_sql.cpp" break; - case 106: /* condition: comp_op expression */ -#line 875 "yacc_sql.y" + case 107: /* condition: comp_op expression */ +#line 883 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2708 "yacc_sql.cpp" +#line 2720 "yacc_sql.cpp" break; - case 107: /* condition: condition AND condition */ -#line 882 "yacc_sql.y" + case 108: /* condition: condition AND condition */ +#line 890 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2716 "yacc_sql.cpp" +#line 2728 "yacc_sql.cpp" break; - case 108: /* condition: condition OR condition */ -#line 886 "yacc_sql.y" + case 109: /* condition: condition OR condition */ +#line 894 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2724 "yacc_sql.cpp" +#line 2736 "yacc_sql.cpp" break; - case 109: /* comp_op: EQ */ -#line 892 "yacc_sql.y" + case 110: /* comp_op: EQ */ +#line 900 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2730 "yacc_sql.cpp" +#line 2742 "yacc_sql.cpp" break; - case 110: /* comp_op: LT */ -#line 893 "yacc_sql.y" + case 111: /* comp_op: LT */ +#line 901 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2736 "yacc_sql.cpp" +#line 2748 "yacc_sql.cpp" break; - case 111: /* comp_op: GT */ -#line 894 "yacc_sql.y" + case 112: /* comp_op: GT */ +#line 902 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2742 "yacc_sql.cpp" +#line 2754 "yacc_sql.cpp" break; - case 112: /* comp_op: LE */ -#line 895 "yacc_sql.y" + case 113: /* comp_op: LE */ +#line 903 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2748 "yacc_sql.cpp" +#line 2760 "yacc_sql.cpp" break; - case 113: /* comp_op: GE */ -#line 896 "yacc_sql.y" + case 114: /* comp_op: GE */ +#line 904 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2754 "yacc_sql.cpp" +#line 2766 "yacc_sql.cpp" break; - case 114: /* comp_op: NE */ -#line 897 "yacc_sql.y" + case 115: /* comp_op: NE */ +#line 905 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2760 "yacc_sql.cpp" +#line 2772 "yacc_sql.cpp" break; - case 115: /* comp_op: IS */ -#line 898 "yacc_sql.y" + case 116: /* comp_op: IS */ +#line 906 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2766 "yacc_sql.cpp" +#line 2778 "yacc_sql.cpp" break; - case 116: /* comp_op: IS NOT */ -#line 899 "yacc_sql.y" + case 117: /* comp_op: IS NOT */ +#line 907 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2772 "yacc_sql.cpp" +#line 2784 "yacc_sql.cpp" break; - case 117: /* comp_op: LIKE */ -#line 900 "yacc_sql.y" + case 118: /* comp_op: LIKE */ +#line 908 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2778 "yacc_sql.cpp" +#line 2790 "yacc_sql.cpp" break; - case 118: /* comp_op: NOT LIKE */ -#line 901 "yacc_sql.y" + case 119: /* comp_op: NOT LIKE */ +#line 909 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2784 "yacc_sql.cpp" +#line 2796 "yacc_sql.cpp" break; - case 119: /* comp_op: IN */ -#line 902 "yacc_sql.y" + case 120: /* comp_op: IN */ +#line 910 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2790 "yacc_sql.cpp" +#line 2802 "yacc_sql.cpp" break; - case 120: /* comp_op: NOT IN */ -#line 903 "yacc_sql.y" + case 121: /* comp_op: NOT IN */ +#line 911 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2796 "yacc_sql.cpp" +#line 2808 "yacc_sql.cpp" break; - case 121: /* comp_op: EXISTS */ -#line 904 "yacc_sql.y" + case 122: /* comp_op: EXISTS */ +#line 912 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2802 "yacc_sql.cpp" +#line 2814 "yacc_sql.cpp" break; - case 122: /* comp_op: NOT EXISTS */ -#line 905 "yacc_sql.y" + case 123: /* comp_op: NOT EXISTS */ +#line 913 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2808 "yacc_sql.cpp" +#line 2820 "yacc_sql.cpp" break; - case 123: /* opt_order_by: %empty */ -#line 910 "yacc_sql.y" + case 124: /* opt_order_by: %empty */ +#line 918 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2816 "yacc_sql.cpp" +#line 2828 "yacc_sql.cpp" break; - case 124: /* opt_order_by: ORDER BY sort_list */ -#line 914 "yacc_sql.y" + case 125: /* opt_order_by: ORDER BY sort_list */ +#line 922 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2825 "yacc_sql.cpp" +#line 2837 "yacc_sql.cpp" break; - case 125: /* sort_list: sort_unit */ -#line 922 "yacc_sql.y" + case 126: /* sort_list: sort_unit */ +#line 930 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2834 "yacc_sql.cpp" +#line 2846 "yacc_sql.cpp" break; - case 126: /* sort_list: sort_unit COMMA sort_list */ -#line 927 "yacc_sql.y" + case 127: /* sort_list: sort_unit COMMA sort_list */ +#line 935 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2843 "yacc_sql.cpp" +#line 2855 "yacc_sql.cpp" break; - case 127: /* sort_unit: expression */ -#line 935 "yacc_sql.y" + case 128: /* sort_unit: expression */ +#line 943 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2853 "yacc_sql.cpp" +#line 2865 "yacc_sql.cpp" break; - case 128: /* sort_unit: expression DESC */ -#line 941 "yacc_sql.y" + case 129: /* sort_unit: expression DESC */ +#line 949 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2863 "yacc_sql.cpp" +#line 2875 "yacc_sql.cpp" break; - case 129: /* sort_unit: expression ASC */ -#line 947 "yacc_sql.y" + case 130: /* sort_unit: expression ASC */ +#line 955 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2873 "yacc_sql.cpp" +#line 2885 "yacc_sql.cpp" break; - case 130: /* group_by: %empty */ -#line 956 "yacc_sql.y" + case 131: /* group_by: %empty */ +#line 964 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2881 "yacc_sql.cpp" +#line 2893 "yacc_sql.cpp" break; - case 131: /* group_by: GROUP BY expression_list */ -#line 960 "yacc_sql.y" + case 132: /* group_by: GROUP BY expression_list */ +#line 968 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2889 "yacc_sql.cpp" +#line 2901 "yacc_sql.cpp" break; - case 132: /* opt_having: %empty */ -#line 967 "yacc_sql.y" + case 133: /* opt_having: %empty */ +#line 975 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2897 "yacc_sql.cpp" +#line 2909 "yacc_sql.cpp" break; - case 133: /* opt_having: HAVING condition */ -#line 971 "yacc_sql.y" + case 134: /* opt_having: HAVING condition */ +#line 979 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2905 "yacc_sql.cpp" +#line 2917 "yacc_sql.cpp" break; - case 134: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 978 "yacc_sql.y" + case 135: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 986 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2915,20 +2927,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2919 "yacc_sql.cpp" +#line 2931 "yacc_sql.cpp" break; - case 135: /* explain_stmt: EXPLAIN command_wrapper */ -#line 991 "yacc_sql.y" + case 136: /* explain_stmt: EXPLAIN command_wrapper */ +#line 999 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2928 "yacc_sql.cpp" +#line 2940 "yacc_sql.cpp" break; - case 136: /* set_variable_stmt: SET ID EQ value */ -#line 999 "yacc_sql.y" + case 137: /* set_variable_stmt: SET ID EQ value */ +#line 1007 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2936,11 +2948,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2940 "yacc_sql.cpp" +#line 2952 "yacc_sql.cpp" break; -#line 2944 "yacc_sql.cpp" +#line 2956 "yacc_sql.cpp" default: break; } @@ -3169,7 +3181,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1011 "yacc_sql.y" +#line 1019 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index ebf4e90c..785cae03 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -398,6 +398,14 @@ create_table_stmt: /*create table 语句的语法解析树*/ free($3); create_table.create_table_select = std::move($5->selection); } + | CREATE TABLE ID select_stmt + { + $$ = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = $$->create_table; + create_table.relation_name = $3; + free($3); + create_table.create_table_select = std::move($4->selection); + } ; attr_def_list: /* empty */ From ed05b45a7c4cbed9910b694acf548ae11fdf0aa8 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 23:30:10 +0800 Subject: [PATCH 201/308] =?UTF-8?q?=E9=87=8D=E6=9E=84create=20table?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/yacc_sql.cpp | 807 ++++++++++++++------------- src/observer/sql/parser/yacc_sql.hpp | 2 +- src/observer/sql/parser/yacc_sql.y | 65 ++- 3 files changed, 443 insertions(+), 431 deletions(-) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 4b7cb3d7..e37a0a45 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -120,8 +120,38 @@ UnboundFunctionExpr *create_aggregate_expression(const char *function_name, return expr; } +ParsedSqlNode *create_table_sql_node(char *table_name, + AttrInfoSqlNode* attr_def, + std::vector *attrinfos, + char* storage_format, + ParsedSqlNode *create_table_select) +{ + ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = parsed_sql_node->create_table; + create_table.relation_name = table_name; + + if (attrinfos) { + create_table.attr_infos.swap(*attrinfos); + delete attrinfos; + } + if (attr_def) { + create_table.attr_infos.emplace_back(*attr_def); + std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); + delete attr_def; + } + if (storage_format != nullptr) { + create_table.storage_format = storage_format; + free(storage_format); + } + + if (create_table_select) { + create_table.create_table_select = std::move(create_table_select->selection); + } + + return parsed_sql_node; +} -#line 125 "yacc_sql.cpp" +#line 155 "yacc_sql.cpp" # ifndef YY_CAST # ifdef __cplusplus @@ -610,7 +640,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 253 +#define YYLAST 260 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 76 @@ -619,7 +649,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 139 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 244 +#define YYNSTATES 245 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 326 @@ -675,20 +705,20 @@ static const yytype_int8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 229, 229, 237, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 255, 256, 257, 261, 267, 272, 278, 284, 290, - 296, 303, 309, 317, 327, 342, 343, 347, 353, 362, - 372, 393, 401, 412, 415, 428, 440, 467, 471, 475, - 480, 486, 490, 491, 492, 493, 494, 498, 511, 517, - 524, 530, 538, 542, 546, 552, 559, 562, 569, 581, - 595, 600, 607, 617, 650, 683, 689, 698, 701, 710, - 726, 729, 732, 735, 738, 747, 750, 755, 761, 764, - 767, 770, 777, 780, 783, 788, 795, 802, 807, 817, - 823, 833, 850, 857, 869, 872, 878, 882, 889, 893, - 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, - 910, 911, 912, 913, 918, 921, 929, 934, 942, 948, - 954, 964, 967, 975, 978, 985, 998, 1006, 1016, 1017 + 0, 259, 259, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 291, 297, 302, 308, 314, 320, + 326, 333, 339, 347, 357, 372, 373, 377, 383, 392, + 402, 406, 410, 417, 420, 433, 445, 472, 476, 480, + 485, 491, 495, 496, 497, 498, 499, 503, 516, 522, + 529, 535, 543, 547, 551, 557, 564, 567, 574, 586, + 600, 605, 612, 622, 655, 688, 694, 703, 706, 715, + 731, 734, 737, 740, 743, 752, 755, 760, 766, 769, + 772, 775, 782, 785, 788, 793, 800, 807, 812, 822, + 828, 838, 855, 862, 874, 877, 883, 887, 894, 898, + 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, + 915, 916, 917, 918, 923, 926, 934, 939, 947, 953, + 959, 969, 972, 980, 983, 990, 1003, 1011, 1021, 1022 }; #endif @@ -735,7 +765,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-169) +#define YYPACT_NINF (-171) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -749,31 +779,31 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 183, 4, 51, 115, 115, -47, 1, -169, -19, -17, - -31, -169, -169, -169, -169, -169, 20, 46, 183, 113, - 116, -169, -169, -169, -169, -169, -169, -169, -169, -169, - -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, - -169, -169, 54, -169, 109, 59, 61, 82, -169, -169, - -169, 18, -169, 115, -169, -169, -169, 10, -169, -169, - -169, 86, -169, -169, 87, 64, 65, 88, 76, 85, - -169, -169, -169, -169, 9, 71, -169, 94, 115, 117, - 121, 115, -46, -169, 78, -169, 115, 115, 115, 115, - 122, 89, 89, 112, 111, 90, -20, 91, 143, 110, - -169, 130, 124, 86, -169, -169, 138, -169, -169, -169, - 42, 42, -169, -169, 115, -169, 2, 111, -169, 157, - 105, -169, 127, -1, -169, -169, 151, -169, 19, 169, - 128, -169, -169, -169, 140, 170, 197, -20, 182, -169, - -169, 0, -169, -169, -169, -169, -169, -169, -169, 173, - 31, 22, 115, 115, 90, -169, 200, -169, -169, -169, - -169, -169, 37, 110, 189, 191, 89, 89, 210, 206, - 92, -169, 194, -169, -169, -169, -169, 115, 105, 105, - -16, -16, -169, 150, 153, 184, -169, -169, -169, 169, - 166, 156, 176, 111, 3, -169, 115, 105, 215, -169, - -20, -20, -16, -169, 181, -169, -169, 204, -169, -169, - 174, -169, 205, 208, 105, 197, -169, 22, 229, -169, - -169, 96, 73, 177, 156, -169, -27, -169, 115, -169, - -169, 171, -169, 180, 14, -169, 213, -169, 89, -169, - -169, 115, -169, -169 + 206, 5, 9, 28, 28, -50, 40, -171, -16, -12, + -22, -171, -171, -171, -171, -171, -20, 11, 206, 57, + 64, -171, -171, -171, -171, -171, -171, -171, -171, -171, + -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, + -171, -171, 0, -171, 60, 3, 14, -8, -171, -171, + -171, -1, -171, 28, -171, -171, -171, 7, -171, -171, + -171, 69, -171, -171, 74, 52, 59, 100, 92, 99, + -171, -171, -171, -171, -9, 85, -171, 103, 28, 130, + 131, 28, 15, -171, 88, -171, 28, 28, 28, 28, + 132, 90, 90, 116, 118, 93, -17, 91, 96, 111, + 27, 119, 102, 69, -171, -171, 143, -171, -171, -171, + 51, 51, -171, -171, 28, -171, 1, 118, -171, 148, + 139, -171, 114, -6, -171, -171, 133, 83, 152, 121, + 157, -171, 112, -171, -171, -171, 124, 158, 173, -17, + 159, -171, -171, 8, -171, -171, -171, -171, -171, -171, + -171, 150, 73, 79, 28, 28, 93, -171, 174, -171, + -171, -171, -171, -171, -10, 96, 163, 120, -171, 167, + 90, 90, 186, 182, 115, -171, 170, -171, -171, -171, + -171, 28, 139, 139, 34, 34, -171, 126, 129, 172, + -171, -171, -171, 152, 160, -171, 147, 168, 118, 2, + -171, 28, 139, 205, -171, -17, -17, 34, -171, 183, + -171, -171, 194, -171, -171, -171, 195, 207, 139, 173, + -171, 79, 214, -171, -171, 117, 84, 147, -171, 42, + -171, 28, -171, -171, -171, 178, 20, -171, 211, 90, + -171, -171, 28, -171, -171 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -788,46 +818,46 @@ static const yytype_uint8 yydefact[] = 20, 21, 0, 35, 0, 0, 0, 77, 65, 62, 63, 97, 64, 0, 88, 86, 75, 92, 90, 91, 87, 76, 32, 31, 0, 0, 0, 0, 0, 0, - 136, 1, 139, 2, 0, 0, 30, 0, 77, 0, + 136, 1, 139, 2, 66, 0, 30, 0, 77, 0, 0, 77, 0, 85, 0, 93, 0, 0, 0, 0, 78, 0, 0, 0, 104, 0, 0, 0, 0, 0, - 42, 0, 0, 0, 96, 84, 0, 98, 89, 94, + 0, 0, 0, 0, 96, 84, 0, 98, 89, 94, 80, 81, 82, 83, 77, 99, 92, 104, 33, 0, - 0, 68, 0, 104, 70, 137, 0, 41, 0, 43, - 0, 39, 95, 79, 0, 100, 131, 0, 57, 122, - 120, 0, 110, 111, 112, 113, 114, 115, 118, 116, - 0, 105, 0, 0, 0, 69, 0, 52, 53, 54, - 55, 56, 50, 0, 0, 0, 0, 0, 0, 133, - 0, 60, 0, 123, 121, 119, 117, 0, 0, 0, - 107, 72, 71, 0, 0, 0, 49, 48, 46, 43, - 66, 0, 0, 104, 92, 101, 77, 0, 124, 58, - 0, 0, 106, 108, 109, 135, 51, 0, 47, 44, - 0, 40, 37, 0, 0, 131, 132, 134, 0, 73, - 61, 0, 50, 0, 0, 34, 102, 74, 0, 59, - 45, 0, 38, 0, 128, 125, 126, 67, 0, 130, - 129, 0, 103, 127 + 0, 68, 0, 104, 70, 137, 0, 0, 43, 0, + 0, 42, 0, 39, 95, 79, 0, 100, 131, 0, + 57, 122, 120, 0, 110, 111, 112, 113, 114, 115, + 118, 116, 0, 105, 0, 0, 0, 69, 0, 52, + 53, 54, 55, 56, 50, 0, 0, 0, 41, 0, + 0, 0, 0, 133, 0, 60, 0, 123, 121, 119, + 117, 0, 0, 0, 107, 72, 71, 0, 0, 0, + 49, 48, 46, 43, 66, 67, 0, 0, 104, 92, + 101, 77, 0, 124, 58, 0, 0, 106, 108, 109, + 135, 51, 0, 47, 44, 40, 37, 0, 0, 131, + 132, 134, 0, 73, 61, 0, 50, 0, 34, 102, + 74, 0, 59, 45, 38, 0, 128, 125, 126, 0, + 130, 129, 0, 103, 127 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -169, -169, 223, -169, -169, -169, -169, -169, -169, -169, - -169, -169, -169, -169, -169, 21, -169, -169, 53, 80, - 24, -169, -169, -169, -169, 43, -93, -169, -169, -169, - -169, 93, -35, -169, -4, -52, 192, -169, -169, -169, - -87, 81, 12, -115, -168, 101, -169, 11, -169, 38, - -169, -169, -169, -169, -169 + -171, -171, 213, -171, -171, -171, -171, -171, -171, -171, + -171, -171, -171, -171, -171, 12, -171, -171, 45, 75, + 16, -171, -171, -171, -171, 35, -94, 49, -171, -171, + -171, 89, -44, -171, -4, -52, 187, -171, -171, -171, + -84, 77, 10, -113, -170, 98, -171, 17, -171, 32, + -171, -171, -171, -171, -171 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 213, 32, 33, 164, 129, - 188, 207, 162, 34, 138, 170, 55, 211, 35, 36, - 123, 124, 37, 38, 56, 57, 135, 58, 59, 60, - 192, 117, 193, 121, 151, 152, 219, 235, 236, 169, - 198, 39, 40, 41, 73 + 28, 29, 30, 31, 44, 217, 32, 33, 166, 128, + 192, 212, 164, 34, 140, 174, 55, 100, 35, 36, + 123, 124, 37, 38, 56, 57, 137, 58, 59, 60, + 197, 117, 198, 121, 153, 154, 223, 237, 238, 173, + 203, 39, 40, 41, 73 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -835,62 +865,64 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 61, 83, 136, 125, 116, 118, 84, 84, 155, 173, - 203, 204, 79, 98, 84, 63, 64, 42, 48, 239, - 178, 179, 62, 107, 65, 154, 78, 108, 66, 217, - 233, 174, 240, 99, 110, 111, 112, 113, 67, 100, - 139, 43, 81, 80, 171, 120, 226, 49, 50, 157, - 52, 158, 159, 160, 161, 86, 87, 88, 89, 134, - 82, 184, 140, 127, 45, 175, 46, 141, 150, 178, - 179, 85, 85, 185, 103, 186, 187, 106, 215, 85, - 194, 86, 87, 88, 89, 86, 87, 88, 89, 68, - 142, 143, 144, 145, 146, 147, 148, 149, 69, 78, - 180, 181, 86, 87, 88, 89, 47, 220, 171, 185, - 133, 186, 187, 71, 139, 88, 89, 199, 200, 72, - 48, 229, 200, 74, 75, 202, 150, 150, 76, 47, - 77, 91, 92, 93, 94, 96, 140, 95, 97, 47, - 101, 141, 104, 48, 102, 150, 105, 109, 114, 49, - 50, 51, 52, 48, 53, 54, 119, 120, 115, 122, - 78, 126, 150, 132, 142, 143, 144, 145, 146, 147, - 148, 149, 49, 50, 51, 52, 234, 53, 54, 128, - 130, 137, 49, 50, 51, 52, 153, 53, 54, 234, - 1, 2, 216, 131, 156, 163, 167, 165, 166, 3, - 4, 5, 6, 7, 8, 9, 10, 168, 172, 176, - 11, 12, 13, 183, 190, 191, 196, 197, 201, 205, - 206, 210, 208, 14, 15, 212, 214, 218, 178, 222, - 223, 224, 16, 225, 17, 228, 231, 18, 238, 241, - 237, 70, 209, 189, 221, 232, 230, 182, 195, 90, - 242, 177, 243, 227 + 61, 83, 125, 79, 138, 84, 84, 116, 118, 78, + 157, 84, 208, 209, 188, 98, 47, 177, 42, 62, + 156, 48, 45, 81, 46, 240, 189, 65, 190, 191, + 48, 130, 221, 66, 110, 111, 112, 113, 241, 178, + 120, 82, 43, 80, 78, 175, 99, 67, 229, 68, + 49, 50, 47, 52, 63, 64, 131, 71, 136, 49, + 50, 51, 52, 69, 53, 54, 48, 72, 152, 74, + 85, 85, 76, 179, 103, 75, 85, 106, 86, 87, + 88, 89, 141, 77, 107, 219, 168, 199, 108, 182, + 183, 86, 87, 88, 89, 49, 50, 51, 52, 235, + 53, 54, 184, 185, 142, 86, 87, 88, 89, 143, + 135, 224, 175, 159, 91, 160, 161, 162, 163, 92, + 189, 93, 190, 191, 88, 89, 182, 183, 94, 207, + 152, 152, 144, 145, 146, 147, 148, 149, 150, 151, + 204, 205, 232, 205, 86, 87, 88, 89, 141, 95, + 152, 96, 97, 102, 101, 104, 105, 109, 114, 115, + 119, 126, 122, 47, 120, 127, 152, 129, 134, 132, + 142, 133, 139, 155, 78, 143, 158, 48, 165, 236, + 167, 169, 170, 172, 171, 176, 180, 187, 194, 195, + 236, 196, 201, 202, 206, 210, 211, 220, 144, 145, + 146, 147, 148, 149, 150, 151, 49, 50, 51, 52, + 213, 53, 54, 1, 2, 99, 216, 222, 218, 226, + 231, 227, 3, 4, 5, 6, 7, 8, 9, 10, + 182, 70, 228, 11, 12, 13, 239, 242, 214, 234, + 193, 225, 233, 215, 90, 186, 14, 15, 200, 243, + 181, 230, 0, 0, 0, 16, 0, 17, 0, 244, + 18 }; -static const yytype_uint8 yycheck[] = +static const yytype_int16 yycheck[] = { - 4, 53, 117, 96, 91, 92, 4, 4, 123, 9, - 178, 179, 47, 4, 4, 14, 15, 13, 38, 5, - 47, 48, 69, 69, 43, 26, 17, 73, 45, 197, - 57, 31, 18, 24, 86, 87, 88, 89, 69, 74, - 9, 37, 24, 47, 137, 46, 214, 67, 68, 30, - 70, 32, 33, 34, 35, 71, 72, 73, 74, 57, - 42, 24, 31, 98, 13, 65, 15, 36, 120, 47, - 48, 69, 69, 36, 78, 38, 39, 81, 193, 69, - 167, 71, 72, 73, 74, 71, 72, 73, 74, 69, - 59, 60, 61, 62, 63, 64, 65, 66, 52, 17, - 152, 153, 71, 72, 73, 74, 24, 200, 201, 36, - 114, 38, 39, 0, 9, 73, 74, 25, 26, 3, - 38, 25, 26, 69, 15, 177, 178, 179, 69, 24, - 69, 45, 45, 69, 69, 59, 31, 49, 53, 24, - 69, 36, 25, 38, 50, 197, 25, 69, 26, 67, - 68, 69, 70, 38, 72, 73, 44, 46, 69, 69, - 17, 70, 214, 25, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 228, 72, 73, 69, - 50, 24, 67, 68, 69, 70, 59, 72, 73, 241, - 7, 8, 196, 69, 43, 26, 26, 69, 58, 16, - 17, 18, 19, 20, 21, 22, 23, 10, 26, 36, - 27, 28, 29, 13, 25, 24, 6, 11, 24, 69, - 67, 55, 38, 40, 41, 69, 50, 12, 47, 25, - 56, 26, 49, 25, 51, 6, 59, 54, 58, 26, - 69, 18, 189, 163, 201, 224, 222, 154, 167, 57, - 238, 150, 241, 215 + 4, 53, 96, 47, 117, 4, 4, 91, 92, 17, + 123, 4, 182, 183, 24, 24, 24, 9, 13, 69, + 26, 38, 13, 24, 15, 5, 36, 43, 38, 39, + 38, 4, 202, 45, 86, 87, 88, 89, 18, 31, + 46, 42, 37, 47, 17, 139, 55, 69, 218, 69, + 67, 68, 24, 70, 14, 15, 100, 0, 57, 67, + 68, 69, 70, 52, 72, 73, 38, 3, 120, 69, + 69, 69, 69, 65, 78, 15, 69, 81, 71, 72, + 73, 74, 9, 69, 69, 198, 130, 171, 73, 47, + 48, 71, 72, 73, 74, 67, 68, 69, 70, 57, + 72, 73, 154, 155, 31, 71, 72, 73, 74, 36, + 114, 205, 206, 30, 45, 32, 33, 34, 35, 45, + 36, 69, 38, 39, 73, 74, 47, 48, 69, 181, + 182, 183, 59, 60, 61, 62, 63, 64, 65, 66, + 25, 26, 25, 26, 71, 72, 73, 74, 9, 49, + 202, 59, 53, 50, 69, 25, 25, 69, 26, 69, + 44, 70, 69, 24, 46, 69, 218, 56, 25, 50, + 31, 69, 24, 59, 17, 36, 43, 38, 26, 231, + 59, 69, 58, 10, 26, 26, 36, 13, 25, 69, + 242, 24, 6, 11, 24, 69, 67, 201, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 38, 72, 73, 7, 8, 55, 69, 12, 50, 25, + 6, 26, 16, 17, 18, 19, 20, 21, 22, 23, + 47, 18, 25, 27, 28, 29, 58, 26, 193, 227, + 165, 206, 226, 194, 57, 156, 40, 41, 171, 239, + 152, 219, -1, -1, -1, 49, -1, 51, -1, 242, + 54 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -906,22 +938,22 @@ static const yytype_uint8 yystos[] = 115, 110, 69, 14, 15, 43, 45, 69, 69, 52, 78, 0, 3, 130, 69, 15, 69, 69, 17, 108, 110, 24, 42, 111, 4, 69, 71, 72, 73, 74, - 112, 45, 45, 69, 69, 49, 59, 53, 4, 24, - 108, 69, 50, 110, 25, 25, 110, 69, 73, 69, + 112, 45, 45, 69, 69, 49, 59, 53, 24, 55, + 103, 69, 50, 110, 25, 25, 110, 69, 73, 69, 111, 111, 111, 111, 26, 69, 116, 117, 116, 44, - 46, 119, 69, 106, 107, 102, 70, 108, 69, 95, - 50, 69, 25, 110, 57, 112, 119, 24, 100, 9, - 31, 36, 59, 60, 61, 62, 63, 64, 65, 66, - 111, 120, 121, 59, 26, 119, 43, 30, 32, 33, - 34, 35, 98, 26, 94, 69, 58, 26, 10, 125, - 101, 102, 26, 9, 31, 65, 36, 121, 47, 48, - 111, 111, 107, 13, 24, 36, 38, 39, 96, 95, - 25, 24, 116, 118, 116, 117, 6, 11, 126, 25, - 26, 24, 111, 120, 120, 69, 67, 97, 38, 94, - 55, 103, 69, 91, 50, 119, 110, 120, 12, 122, - 102, 101, 25, 56, 26, 25, 120, 125, 6, 25, - 96, 59, 91, 57, 111, 123, 124, 69, 58, 5, - 18, 26, 118, 123 + 46, 119, 69, 106, 107, 102, 70, 69, 95, 56, + 4, 108, 50, 69, 25, 110, 57, 112, 119, 24, + 100, 9, 31, 36, 59, 60, 61, 62, 63, 64, + 65, 66, 111, 120, 121, 59, 26, 119, 43, 30, + 32, 33, 34, 35, 98, 26, 94, 59, 108, 69, + 58, 26, 10, 125, 101, 102, 26, 9, 31, 65, + 36, 121, 47, 48, 111, 111, 107, 13, 24, 36, + 38, 39, 96, 95, 25, 69, 24, 116, 118, 116, + 117, 6, 11, 126, 25, 26, 24, 111, 120, 120, + 69, 67, 97, 38, 94, 103, 69, 91, 50, 119, + 110, 120, 12, 122, 102, 101, 25, 26, 25, 120, + 125, 6, 25, 96, 91, 57, 111, 123, 124, 58, + 5, 18, 26, 118, 123 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -950,7 +982,7 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, - 8, 5, 4, 0, 3, 6, 3, 2, 1, 1, + 8, 6, 5, 0, 3, 6, 3, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 5, 3, 5, 1, 3, 1, 1, 1, 1, 0, 4, 4, 5, 1, 3, 3, 8, 9, 2, 2, 0, 2, 4, @@ -1821,104 +1853,104 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 230 "yacc_sql.y" +#line 260 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1830 "yacc_sql.cpp" +#line 1862 "yacc_sql.cpp" break; case 24: /* exit_stmt: EXIT */ -#line 261 "yacc_sql.y" +#line 291 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1839 "yacc_sql.cpp" +#line 1871 "yacc_sql.cpp" break; case 25: /* help_stmt: HELP */ -#line 267 "yacc_sql.y" +#line 297 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1847 "yacc_sql.cpp" +#line 1879 "yacc_sql.cpp" break; case 26: /* sync_stmt: SYNC */ -#line 272 "yacc_sql.y" +#line 302 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1855 "yacc_sql.cpp" +#line 1887 "yacc_sql.cpp" break; case 27: /* begin_stmt: TRX_BEGIN */ -#line 278 "yacc_sql.y" +#line 308 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1863 "yacc_sql.cpp" +#line 1895 "yacc_sql.cpp" break; case 28: /* commit_stmt: TRX_COMMIT */ -#line 284 "yacc_sql.y" +#line 314 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1871 "yacc_sql.cpp" +#line 1903 "yacc_sql.cpp" break; case 29: /* rollback_stmt: TRX_ROLLBACK */ -#line 290 "yacc_sql.y" +#line 320 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1879 "yacc_sql.cpp" +#line 1911 "yacc_sql.cpp" break; case 30: /* drop_table_stmt: DROP TABLE ID */ -#line 296 "yacc_sql.y" +#line 326 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1889 "yacc_sql.cpp" +#line 1921 "yacc_sql.cpp" break; case 31: /* show_tables_stmt: SHOW TABLES */ -#line 303 "yacc_sql.y" +#line 333 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1897 "yacc_sql.cpp" +#line 1929 "yacc_sql.cpp" break; case 32: /* desc_table_stmt: DESC ID */ -#line 309 "yacc_sql.y" +#line 339 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1907 "yacc_sql.cpp" +#line 1939 "yacc_sql.cpp" break; case 33: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 318 "yacc_sql.y" +#line 348 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1918 "yacc_sql.cpp" +#line 1950 "yacc_sql.cpp" break; case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 328 "yacc_sql.y" +#line 358 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1930,43 +1962,43 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1934 "yacc_sql.cpp" +#line 1966 "yacc_sql.cpp" break; case 35: /* opt_unique: UNIQUE */ -#line 342 "yacc_sql.y" +#line 372 "yacc_sql.y" { (yyval.unique) = true; } -#line 1940 "yacc_sql.cpp" +#line 1972 "yacc_sql.cpp" break; case 36: /* opt_unique: %empty */ -#line 343 "yacc_sql.y" +#line 373 "yacc_sql.y" { (yyval.unique) = false; } -#line 1946 "yacc_sql.cpp" +#line 1978 "yacc_sql.cpp" break; case 37: /* attr_list: ID */ -#line 348 "yacc_sql.y" +#line 378 "yacc_sql.y" { (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1956 "yacc_sql.cpp" +#line 1988 "yacc_sql.cpp" break; case 38: /* attr_list: ID COMMA attr_list */ -#line 354 "yacc_sql.y" +#line 384 "yacc_sql.y" { (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 1966 "yacc_sql.cpp" +#line 1998 "yacc_sql.cpp" break; case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 363 "yacc_sql.y" +#line 393 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -1974,68 +2006,43 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 1978 "yacc_sql.cpp" +#line 2010 "yacc_sql.cpp" break; case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 373 "yacc_sql.y" +#line 403 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-5].string); - free((yyvsp[-5].string)); - - std::vector *src_attrs = (yyvsp[-2].attr_infos); - - if (src_attrs != nullptr) { - create_table.attr_infos.swap(*src_attrs); - delete src_attrs; - } - create_table.attr_infos.emplace_back(*(yyvsp[-3].attr_info)); - std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); - delete (yyvsp[-3].attr_info); - if ((yyvsp[0].string) != nullptr) { - create_table.storage_format = (yyvsp[0].string); - free((yyvsp[0].string)); - } + (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2003 "yacc_sql.cpp" +#line 2018 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID AS select_stmt */ -#line 394 "yacc_sql.y" + case 41: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ +#line 407 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-2].string); - free((yyvsp[-2].string)); - create_table.create_table_select = std::move((yyvsp[0].sql_node)->selection); + (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2015 "yacc_sql.cpp" +#line 2026 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID select_stmt */ -#line 402 "yacc_sql.y" + case 42: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ +#line 411 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = (yyval.sql_node)->create_table; - create_table.relation_name = (yyvsp[-1].string); - free((yyvsp[-1].string)); - create_table.create_table_select = std::move((yyvsp[0].sql_node)->selection); + (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2027 "yacc_sql.cpp" +#line 2034 "yacc_sql.cpp" break; case 43: /* attr_def_list: %empty */ -#line 412 "yacc_sql.y" +#line 417 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2035 "yacc_sql.cpp" +#line 2042 "yacc_sql.cpp" break; case 44: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 416 "yacc_sql.y" +#line 421 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -2045,11 +2052,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2049 "yacc_sql.cpp" +#line 2056 "yacc_sql.cpp" break; case 45: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 429 "yacc_sql.y" +#line 434 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -2061,11 +2068,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2065 "yacc_sql.cpp" +#line 2072 "yacc_sql.cpp" break; case 46: /* attr_def: ID type nullable_constraint */ -#line 441 "yacc_sql.y" +#line 446 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -2089,79 +2096,79 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2093 "yacc_sql.cpp" +#line 2100 "yacc_sql.cpp" break; case 47: /* nullable_constraint: NOT NULL_T */ -#line 468 "yacc_sql.y" +#line 473 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2101 "yacc_sql.cpp" +#line 2108 "yacc_sql.cpp" break; case 48: /* nullable_constraint: NULLABLE */ -#line 472 "yacc_sql.y" +#line 477 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2109 "yacc_sql.cpp" +#line 2116 "yacc_sql.cpp" break; case 49: /* nullable_constraint: NULL_T */ -#line 476 "yacc_sql.y" +#line 481 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2117 "yacc_sql.cpp" +#line 2124 "yacc_sql.cpp" break; case 50: /* nullable_constraint: %empty */ -#line 480 "yacc_sql.y" +#line 485 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2125 "yacc_sql.cpp" +#line 2132 "yacc_sql.cpp" break; case 51: /* number: NUMBER */ -#line 486 "yacc_sql.y" +#line 491 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 2131 "yacc_sql.cpp" +#line 2138 "yacc_sql.cpp" break; case 52: /* type: INT_T */ -#line 490 "yacc_sql.y" +#line 495 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2137 "yacc_sql.cpp" +#line 2144 "yacc_sql.cpp" break; case 53: /* type: STRING_T */ -#line 491 "yacc_sql.y" +#line 496 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2143 "yacc_sql.cpp" +#line 2150 "yacc_sql.cpp" break; case 54: /* type: FLOAT_T */ -#line 492 "yacc_sql.y" +#line 497 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2149 "yacc_sql.cpp" +#line 2156 "yacc_sql.cpp" break; case 55: /* type: DATE_T */ -#line 493 "yacc_sql.y" +#line 498 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2155 "yacc_sql.cpp" +#line 2162 "yacc_sql.cpp" break; case 56: /* type: TEXT_T */ -#line 494 "yacc_sql.y" +#line 499 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2161 "yacc_sql.cpp" +#line 2168 "yacc_sql.cpp" break; case 57: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 499 "yacc_sql.y" +#line 504 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2171,102 +2178,102 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2175 "yacc_sql.cpp" +#line 2182 "yacc_sql.cpp" break; case 58: /* values_list: LBRACE value_list RBRACE */ -#line 512 "yacc_sql.y" +#line 517 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2185 "yacc_sql.cpp" +#line 2192 "yacc_sql.cpp" break; case 59: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 518 "yacc_sql.y" +#line 523 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2194 "yacc_sql.cpp" +#line 2201 "yacc_sql.cpp" break; case 60: /* value_list: value */ -#line 525 "yacc_sql.y" +#line 530 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2204 "yacc_sql.cpp" +#line 2211 "yacc_sql.cpp" break; case 61: /* value_list: value_list COMMA value */ -#line 531 "yacc_sql.y" +#line 536 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2213 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; case 62: /* value: NUMBER */ -#line 538 "yacc_sql.y" +#line 543 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2222 "yacc_sql.cpp" +#line 2229 "yacc_sql.cpp" break; case 63: /* value: FLOAT */ -#line 542 "yacc_sql.y" +#line 547 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2231 "yacc_sql.cpp" +#line 2238 "yacc_sql.cpp" break; case 64: /* value: SSS */ -#line 546 "yacc_sql.y" +#line 551 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2242 "yacc_sql.cpp" +#line 2249 "yacc_sql.cpp" break; case 65: /* value: NULL_T */ -#line 552 "yacc_sql.y" +#line 557 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2250 "yacc_sql.cpp" +#line 2257 "yacc_sql.cpp" break; case 66: /* storage_format: %empty */ -#line 559 "yacc_sql.y" +#line 564 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2258 "yacc_sql.cpp" +#line 2265 "yacc_sql.cpp" break; case 67: /* storage_format: STORAGE FORMAT EQ ID */ -#line 563 "yacc_sql.y" +#line 568 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2266 "yacc_sql.cpp" +#line 2273 "yacc_sql.cpp" break; case 68: /* delete_stmt: DELETE FROM ID where */ -#line 570 "yacc_sql.y" +#line 575 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2275,11 +2282,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2279 "yacc_sql.cpp" +#line 2286 "yacc_sql.cpp" break; case 69: /* update_stmt: UPDATE ID SET setClauses where */ -#line 582 "yacc_sql.y" +#line 587 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2290,39 +2297,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2294 "yacc_sql.cpp" +#line 2301 "yacc_sql.cpp" break; case 70: /* setClauses: setClause */ -#line 596 "yacc_sql.y" +#line 601 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2303 "yacc_sql.cpp" +#line 2310 "yacc_sql.cpp" break; case 71: /* setClauses: setClauses COMMA setClause */ -#line 601 "yacc_sql.y" +#line 606 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2311 "yacc_sql.cpp" +#line 2318 "yacc_sql.cpp" break; case 72: /* setClause: ID EQ expression */ -#line 608 "yacc_sql.y" +#line 613 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2322 "yacc_sql.cpp" +#line 2329 "yacc_sql.cpp" break; case 73: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ -#line 618 "yacc_sql.y" +#line 623 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-6].expression_list) != nullptr) { @@ -2355,11 +2362,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2359 "yacc_sql.cpp" +#line 2366 "yacc_sql.cpp" break; case 74: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 651 "yacc_sql.y" +#line 656 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2389,39 +2396,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2393 "yacc_sql.cpp" +#line 2400 "yacc_sql.cpp" break; case 75: /* calc_stmt: CALC expression_list */ -#line 684 "yacc_sql.y" +#line 689 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2403 "yacc_sql.cpp" +#line 2410 "yacc_sql.cpp" break; case 76: /* calc_stmt: SELECT expression_list */ -#line 690 "yacc_sql.y" +#line 695 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2413 "yacc_sql.cpp" +#line 2420 "yacc_sql.cpp" break; case 77: /* expression_list: %empty */ -#line 698 "yacc_sql.y" +#line 703 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2421 "yacc_sql.cpp" +#line 2428 "yacc_sql.cpp" break; case 78: /* expression_list: expression alias */ -#line 702 "yacc_sql.y" +#line 707 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2430,11 +2437,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2434 "yacc_sql.cpp" +#line 2441 "yacc_sql.cpp" break; case 79: /* expression_list: expression alias COMMA expression_list */ -#line 711 "yacc_sql.y" +#line 716 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2447,43 +2454,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2451 "yacc_sql.cpp" +#line 2458 "yacc_sql.cpp" break; case 80: /* expression: expression '+' expression */ -#line 726 "yacc_sql.y" +#line 731 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2459 "yacc_sql.cpp" +#line 2466 "yacc_sql.cpp" break; case 81: /* expression: expression '-' expression */ -#line 729 "yacc_sql.y" +#line 734 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2467 "yacc_sql.cpp" +#line 2474 "yacc_sql.cpp" break; case 82: /* expression: expression '*' expression */ -#line 732 "yacc_sql.y" +#line 737 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2475 "yacc_sql.cpp" +#line 2482 "yacc_sql.cpp" break; case 83: /* expression: expression '/' expression */ -#line 735 "yacc_sql.y" +#line 740 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2483 "yacc_sql.cpp" +#line 2490 "yacc_sql.cpp" break; case 84: /* expression: LBRACE expression_list RBRACE */ -#line 738 "yacc_sql.y" +#line 743 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2493,122 +2500,122 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2497 "yacc_sql.cpp" +#line 2504 "yacc_sql.cpp" break; case 85: /* expression: '-' expression */ -#line 747 "yacc_sql.y" +#line 752 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2505 "yacc_sql.cpp" +#line 2512 "yacc_sql.cpp" break; case 86: /* expression: value */ -#line 750 "yacc_sql.y" +#line 755 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2515 "yacc_sql.cpp" +#line 2522 "yacc_sql.cpp" break; case 87: /* expression: rel_attr */ -#line 755 "yacc_sql.y" +#line 760 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2526 "yacc_sql.cpp" +#line 2533 "yacc_sql.cpp" break; case 88: /* expression: '*' */ -#line 761 "yacc_sql.y" +#line 766 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2534 "yacc_sql.cpp" +#line 2541 "yacc_sql.cpp" break; case 89: /* expression: ID DOT '*' */ -#line 764 "yacc_sql.y" +#line 769 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2542 "yacc_sql.cpp" +#line 2549 "yacc_sql.cpp" break; case 90: /* expression: aggr_func_expr */ -#line 767 "yacc_sql.y" +#line 772 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2550 "yacc_sql.cpp" +#line 2557 "yacc_sql.cpp" break; case 91: /* expression: sub_query_expr */ -#line 770 "yacc_sql.y" +#line 775 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2558 "yacc_sql.cpp" +#line 2565 "yacc_sql.cpp" break; case 92: /* alias: %empty */ -#line 777 "yacc_sql.y" +#line 782 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2566 "yacc_sql.cpp" +#line 2573 "yacc_sql.cpp" break; case 93: /* alias: ID */ -#line 780 "yacc_sql.y" +#line 785 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2574 "yacc_sql.cpp" +#line 2581 "yacc_sql.cpp" break; case 94: /* alias: AS ID */ -#line 783 "yacc_sql.y" +#line 788 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2582 "yacc_sql.cpp" +#line 2589 "yacc_sql.cpp" break; case 95: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 789 "yacc_sql.y" +#line 794 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2590 "yacc_sql.cpp" +#line 2597 "yacc_sql.cpp" break; case 96: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 796 "yacc_sql.y" +#line 801 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2598 "yacc_sql.cpp" +#line 2605 "yacc_sql.cpp" break; case 97: /* rel_attr: ID */ -#line 802 "yacc_sql.y" +#line 807 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2608 "yacc_sql.cpp" +#line 2615 "yacc_sql.cpp" break; case 98: /* rel_attr: ID DOT ID */ -#line 807 "yacc_sql.y" +#line 812 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2616,19 +2623,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2620 "yacc_sql.cpp" +#line 2627 "yacc_sql.cpp" break; case 99: /* relation: ID */ -#line 817 "yacc_sql.y" +#line 822 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2628 "yacc_sql.cpp" +#line 2635 "yacc_sql.cpp" break; case 100: /* rel_list: relation alias */ -#line 823 "yacc_sql.y" +#line 828 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2639,11 +2646,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2643 "yacc_sql.cpp" +#line 2650 "yacc_sql.cpp" break; case 101: /* rel_list: relation alias COMMA rel_list */ -#line 833 "yacc_sql.y" +#line 838 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2658,22 +2665,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2662 "yacc_sql.cpp" +#line 2669 "yacc_sql.cpp" break; case 102: /* joinClauses: relation ON condition */ -#line 851 "yacc_sql.y" +#line 856 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2673 "yacc_sql.cpp" +#line 2680 "yacc_sql.cpp" break; case 103: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 858 "yacc_sql.y" +#line 863 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2681,243 +2688,243 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2685 "yacc_sql.cpp" +#line 2692 "yacc_sql.cpp" break; case 104: /* where: %empty */ -#line 869 "yacc_sql.y" +#line 874 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2693 "yacc_sql.cpp" +#line 2700 "yacc_sql.cpp" break; case 105: /* where: WHERE condition */ -#line 872 "yacc_sql.y" +#line 877 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2701 "yacc_sql.cpp" +#line 2708 "yacc_sql.cpp" break; case 106: /* condition: expression comp_op expression */ -#line 879 "yacc_sql.y" +#line 884 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2709 "yacc_sql.cpp" +#line 2716 "yacc_sql.cpp" break; case 107: /* condition: comp_op expression */ -#line 883 "yacc_sql.y" +#line 888 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2720 "yacc_sql.cpp" +#line 2727 "yacc_sql.cpp" break; case 108: /* condition: condition AND condition */ -#line 890 "yacc_sql.y" +#line 895 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2728 "yacc_sql.cpp" +#line 2735 "yacc_sql.cpp" break; case 109: /* condition: condition OR condition */ -#line 894 "yacc_sql.y" +#line 899 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2736 "yacc_sql.cpp" +#line 2743 "yacc_sql.cpp" break; case 110: /* comp_op: EQ */ -#line 900 "yacc_sql.y" +#line 905 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2742 "yacc_sql.cpp" +#line 2749 "yacc_sql.cpp" break; case 111: /* comp_op: LT */ -#line 901 "yacc_sql.y" +#line 906 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2748 "yacc_sql.cpp" +#line 2755 "yacc_sql.cpp" break; case 112: /* comp_op: GT */ -#line 902 "yacc_sql.y" +#line 907 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2754 "yacc_sql.cpp" +#line 2761 "yacc_sql.cpp" break; case 113: /* comp_op: LE */ -#line 903 "yacc_sql.y" +#line 908 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2760 "yacc_sql.cpp" +#line 2767 "yacc_sql.cpp" break; case 114: /* comp_op: GE */ -#line 904 "yacc_sql.y" +#line 909 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2766 "yacc_sql.cpp" +#line 2773 "yacc_sql.cpp" break; case 115: /* comp_op: NE */ -#line 905 "yacc_sql.y" +#line 910 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2772 "yacc_sql.cpp" +#line 2779 "yacc_sql.cpp" break; case 116: /* comp_op: IS */ -#line 906 "yacc_sql.y" +#line 911 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2778 "yacc_sql.cpp" +#line 2785 "yacc_sql.cpp" break; case 117: /* comp_op: IS NOT */ -#line 907 "yacc_sql.y" +#line 912 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2784 "yacc_sql.cpp" +#line 2791 "yacc_sql.cpp" break; case 118: /* comp_op: LIKE */ -#line 908 "yacc_sql.y" +#line 913 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2790 "yacc_sql.cpp" +#line 2797 "yacc_sql.cpp" break; case 119: /* comp_op: NOT LIKE */ -#line 909 "yacc_sql.y" +#line 914 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2796 "yacc_sql.cpp" +#line 2803 "yacc_sql.cpp" break; case 120: /* comp_op: IN */ -#line 910 "yacc_sql.y" +#line 915 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2802 "yacc_sql.cpp" +#line 2809 "yacc_sql.cpp" break; case 121: /* comp_op: NOT IN */ -#line 911 "yacc_sql.y" +#line 916 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2808 "yacc_sql.cpp" +#line 2815 "yacc_sql.cpp" break; case 122: /* comp_op: EXISTS */ -#line 912 "yacc_sql.y" +#line 917 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2814 "yacc_sql.cpp" +#line 2821 "yacc_sql.cpp" break; case 123: /* comp_op: NOT EXISTS */ -#line 913 "yacc_sql.y" +#line 918 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2820 "yacc_sql.cpp" +#line 2827 "yacc_sql.cpp" break; case 124: /* opt_order_by: %empty */ -#line 918 "yacc_sql.y" +#line 923 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2828 "yacc_sql.cpp" +#line 2835 "yacc_sql.cpp" break; case 125: /* opt_order_by: ORDER BY sort_list */ -#line 922 "yacc_sql.y" +#line 927 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2837 "yacc_sql.cpp" +#line 2844 "yacc_sql.cpp" break; case 126: /* sort_list: sort_unit */ -#line 930 "yacc_sql.y" +#line 935 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2846 "yacc_sql.cpp" +#line 2853 "yacc_sql.cpp" break; case 127: /* sort_list: sort_unit COMMA sort_list */ -#line 935 "yacc_sql.y" +#line 940 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2855 "yacc_sql.cpp" +#line 2862 "yacc_sql.cpp" break; case 128: /* sort_unit: expression */ -#line 943 "yacc_sql.y" +#line 948 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2865 "yacc_sql.cpp" +#line 2872 "yacc_sql.cpp" break; case 129: /* sort_unit: expression DESC */ -#line 949 "yacc_sql.y" +#line 954 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2875 "yacc_sql.cpp" +#line 2882 "yacc_sql.cpp" break; case 130: /* sort_unit: expression ASC */ -#line 955 "yacc_sql.y" +#line 960 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2885 "yacc_sql.cpp" +#line 2892 "yacc_sql.cpp" break; case 131: /* group_by: %empty */ -#line 964 "yacc_sql.y" +#line 969 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2893 "yacc_sql.cpp" +#line 2900 "yacc_sql.cpp" break; case 132: /* group_by: GROUP BY expression_list */ -#line 968 "yacc_sql.y" +#line 973 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2901 "yacc_sql.cpp" +#line 2908 "yacc_sql.cpp" break; case 133: /* opt_having: %empty */ -#line 975 "yacc_sql.y" +#line 980 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2909 "yacc_sql.cpp" +#line 2916 "yacc_sql.cpp" break; case 134: /* opt_having: HAVING condition */ -#line 979 "yacc_sql.y" +#line 984 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2917 "yacc_sql.cpp" +#line 2924 "yacc_sql.cpp" break; case 135: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 986 "yacc_sql.y" +#line 991 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2927,20 +2934,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2931 "yacc_sql.cpp" +#line 2938 "yacc_sql.cpp" break; case 136: /* explain_stmt: EXPLAIN command_wrapper */ -#line 999 "yacc_sql.y" +#line 1004 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2940 "yacc_sql.cpp" +#line 2947 "yacc_sql.cpp" break; case 137: /* set_variable_stmt: SET ID EQ value */ -#line 1007 "yacc_sql.y" +#line 1012 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2948,11 +2955,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2952 "yacc_sql.cpp" +#line 2959 "yacc_sql.cpp" break; -#line 2956 "yacc_sql.cpp" +#line 2963 "yacc_sql.cpp" default: break; } @@ -3181,7 +3188,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1019 "yacc_sql.y" +#line 1024 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 7f9edb38..8521ddee 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -131,7 +131,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 133 "yacc_sql.y" +#line 163 "yacc_sql.y" ParsedSqlNode * sql_node; Value * value; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 785cae03..798c74ef 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -51,6 +51,36 @@ UnboundFunctionExpr *create_aggregate_expression(const char *function_name, return expr; } +ParsedSqlNode *create_table_sql_node(char *table_name, + AttrInfoSqlNode* attr_def, + std::vector *attrinfos, + char* storage_format, + ParsedSqlNode *create_table_select) +{ + ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = parsed_sql_node->create_table; + create_table.relation_name = table_name; + + if (attrinfos) { + create_table.attr_infos.swap(*attrinfos); + delete attrinfos; + } + if (attr_def) { + create_table.attr_infos.emplace_back(*attr_def); + std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); + delete attr_def; + } + if (storage_format != nullptr) { + create_table.storage_format = storage_format; + free(storage_format); + } + + if (create_table_select) { + create_table.create_table_select = std::move(create_table_select->selection); + } + + return parsed_sql_node; +} %} %define api.pure full @@ -371,40 +401,15 @@ drop_index_stmt: /*drop index 语句的语法解析树*/ create_table_stmt: /*create table 语句的语法解析树*/ CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format { - $$ = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = $$->create_table; - create_table.relation_name = $3; - free($3); - - std::vector *src_attrs = $6; - - if (src_attrs != nullptr) { - create_table.attr_infos.swap(*src_attrs); - delete src_attrs; - } - create_table.attr_infos.emplace_back(*$5); - std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); - delete $5; - if ($8 != nullptr) { - create_table.storage_format = $8; - free($8); - } + $$ = create_table_sql_node($3, $5, $6, $8, nullptr); } - | CREATE TABLE ID AS select_stmt + | CREATE TABLE ID storage_format AS select_stmt { - $$ = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = $$->create_table; - create_table.relation_name = $3; - free($3); - create_table.create_table_select = std::move($5->selection); + $$ = create_table_sql_node($3, nullptr, nullptr, $4, $6); } - | CREATE TABLE ID select_stmt + | CREATE TABLE ID storage_format select_stmt { - $$ = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = $$->create_table; - create_table.relation_name = $3; - free($3); - create_table.create_table_select = std::move($4->selection); + $$ = create_table_sql_node($3, nullptr, nullptr, $4, $5); } ; attr_def_list: From 0f6620dc5d99eecf0329d3339b48f9a29b64561c Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 23:33:31 +0800 Subject: [PATCH 202/308] =?UTF-8?q?=E6=96=B0=E5=A2=9ECREATE=20TABLE=20ID?= =?UTF-8?q?=20LBRACE=20attr=5Fdef=20attr=5Fdef=5Flist=20RBRACE=20storage?= =?UTF-8?q?=5Fformat=20AS=20select=5Fstmt=E8=AF=AD=E6=B3=95=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/executor/create_table_executor.cpp | 30 +- src/observer/sql/parser/yacc_sql.cpp | 935 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 10 +- 3 files changed, 502 insertions(+), 473 deletions(-) diff --git a/src/observer/sql/executor/create_table_executor.cpp b/src/observer/sql/executor/create_table_executor.cpp index 77b97694..0c3f56da 100644 --- a/src/observer/sql/executor/create_table_executor.cpp +++ b/src/observer/sql/executor/create_table_executor.cpp @@ -50,21 +50,23 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) } } - std::vector attr_infos; - for (auto &expr : field_exprs) { - AttrInfoSqlNode attr_info; - if (table_names.size() == 1) { - attr_info.name = expr->field_name(); - } else { - attr_info.name = expr->table_name(); - attr_info.name += "."; - attr_info.name += expr->field_name(); - } - attr_info.length = expr->field().meta()->len(); - attr_info.type = expr->field().meta()->type(); - attr_info.nullable = expr->field().meta()->nullable(); + std::vector attr_infos = create_table_stmt->attr_infos(); + if (attr_infos.empty()) { + for (auto &expr : field_exprs) { + AttrInfoSqlNode attr_info; + if (table_names.size() == 1) { + attr_info.name = expr->field_name(); + } else { + attr_info.name = expr->table_name(); + attr_info.name += "."; + attr_info.name += expr->field_name(); + } + attr_info.length = expr->field().meta()->len(); + attr_info.type = expr->field().meta()->type(); + attr_info.nullable = expr->field().meta()->nullable(); - attr_infos.push_back(attr_info); + attr_infos.push_back(attr_info); + } } rc = session->get_current_db()->create_table(table_name, attr_infos, create_table_stmt->storage_format()); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index e37a0a45..d78ad5bf 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -640,16 +640,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 260 +#define YYLAST 264 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 55 /* YYNRULES -- Number of rules. */ -#define YYNRULES 139 +#define YYNRULES 141 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 245 +#define YYNSTATES 248 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 326 @@ -709,16 +709,17 @@ static const yytype_int16 yyrline[] = 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 291, 297, 302, 308, 314, 320, 326, 333, 339, 347, 357, 372, 373, 377, 383, 392, - 402, 406, 410, 417, 420, 433, 445, 472, 476, 480, - 485, 491, 495, 496, 497, 498, 499, 503, 516, 522, - 529, 535, 543, 547, 551, 557, 564, 567, 574, 586, - 600, 605, 612, 622, 655, 688, 694, 703, 706, 715, - 731, 734, 737, 740, 743, 752, 755, 760, 766, 769, - 772, 775, 782, 785, 788, 793, 800, 807, 812, 822, - 828, 838, 855, 862, 874, 877, 883, 887, 894, 898, - 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, - 915, 916, 917, 918, 923, 926, 934, 939, 947, 953, - 959, 969, 972, 980, 983, 990, 1003, 1011, 1021, 1022 + 402, 406, 410, 414, 418, 425, 428, 441, 453, 480, + 484, 488, 493, 499, 503, 504, 505, 506, 507, 511, + 524, 530, 537, 543, 551, 555, 559, 565, 572, 575, + 582, 594, 608, 613, 620, 630, 663, 696, 702, 711, + 714, 723, 739, 742, 745, 748, 751, 760, 763, 768, + 774, 777, 780, 783, 790, 793, 796, 801, 808, 815, + 820, 830, 836, 846, 863, 870, 882, 885, 891, 895, + 902, 906, 913, 914, 915, 916, 917, 918, 919, 920, + 921, 922, 923, 924, 925, 926, 931, 934, 942, 947, + 955, 961, 967, 977, 980, 988, 991, 998, 1011, 1019, + 1029, 1030 }; #endif @@ -765,7 +766,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-171) +#define YYPACT_NINF (-165) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -779,31 +780,31 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 206, 5, 9, 28, 28, -50, 40, -171, -16, -12, - -22, -171, -171, -171, -171, -171, -20, 11, 206, 57, - 64, -171, -171, -171, -171, -171, -171, -171, -171, -171, - -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, - -171, -171, 0, -171, 60, 3, 14, -8, -171, -171, - -171, -1, -171, 28, -171, -171, -171, 7, -171, -171, - -171, 69, -171, -171, 74, 52, 59, 100, 92, 99, - -171, -171, -171, -171, -9, 85, -171, 103, 28, 130, - 131, 28, 15, -171, 88, -171, 28, 28, 28, 28, - 132, 90, 90, 116, 118, 93, -17, 91, 96, 111, - 27, 119, 102, 69, -171, -171, 143, -171, -171, -171, - 51, 51, -171, -171, 28, -171, 1, 118, -171, 148, - 139, -171, 114, -6, -171, -171, 133, 83, 152, 121, - 157, -171, 112, -171, -171, -171, 124, 158, 173, -17, - 159, -171, -171, 8, -171, -171, -171, -171, -171, -171, - -171, 150, 73, 79, 28, 28, 93, -171, 174, -171, - -171, -171, -171, -171, -10, 96, 163, 120, -171, 167, - 90, 90, 186, 182, 115, -171, 170, -171, -171, -171, - -171, 28, 139, 139, 34, 34, -171, 126, 129, 172, - -171, -171, -171, 152, 160, -171, 147, 168, 118, 2, - -171, 28, 139, 205, -171, -17, -17, 34, -171, 183, - -171, -171, 194, -171, -171, -171, 195, 207, 139, 173, - -171, 79, 214, -171, -171, 117, 84, 147, -171, 42, - -171, 28, -171, -171, -171, 178, 20, -171, 211, 90, - -171, -171, 28, -171, -171 + 207, 11, 26, 117, 117, -39, 8, -165, 14, 22, + -8, -165, -165, -165, -165, -165, 15, 37, 207, 100, + 106, -165, -165, -165, -165, -165, -165, -165, -165, -165, + -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, + -165, -165, 42, -165, 99, 47, 54, 84, -165, -165, + -165, 7, -165, 117, -165, -165, -165, 9, -165, -165, + -165, 76, -165, -165, 83, 65, 66, 87, 78, 86, + -165, -165, -165, -165, -15, 69, -165, 90, 117, 118, + 119, 117, -48, -165, 73, -165, 117, 117, 117, 117, + 120, 79, 79, 101, 112, 91, -23, 77, 92, 103, + 12, 113, 93, 76, -165, -165, 142, -165, -165, -165, + -47, -47, -165, -165, 117, -165, 6, 112, -165, 141, + 140, -165, 109, -14, -165, -165, 126, 85, 146, 114, + 157, -165, 108, -165, -165, -165, 121, 149, 170, -23, + 162, -165, -165, -3, -165, -165, -165, -165, -165, -165, + -165, 147, 33, 5, 117, 117, 91, -165, 178, -165, + -165, -165, -165, -165, 52, 92, 167, 125, -165, 171, + 79, 79, 190, 187, 40, -165, 192, -165, -165, -165, + -165, 117, 140, 140, 53, 53, -165, 148, 144, 180, + -165, -165, -165, 146, 164, -165, 151, 172, 112, 10, + -165, 117, 140, 209, -165, -23, -23, 53, -165, 184, + -165, -165, 208, -165, -165, 16, 206, 212, 140, 170, + -165, 5, 232, -165, -165, 107, 20, 157, -165, 151, + -165, 3, -165, 117, -165, -165, -165, -165, 181, -1, + -165, 214, 79, -165, -165, 117, -165, -165 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -811,42 +812,42 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 36, 0, 77, 77, 0, 0, 26, 0, 0, + 0, 36, 0, 79, 79, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 138, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 140, 23, 22, 15, 16, 17, 18, 9, 10, 11, 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 35, 0, 0, 0, 77, 65, 62, - 63, 97, 64, 0, 88, 86, 75, 92, 90, 91, - 87, 76, 32, 31, 0, 0, 0, 0, 0, 0, - 136, 1, 139, 2, 66, 0, 30, 0, 77, 0, - 0, 77, 0, 85, 0, 93, 0, 0, 0, 0, - 78, 0, 0, 0, 104, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 96, 84, 0, 98, 89, 94, - 80, 81, 82, 83, 77, 99, 92, 104, 33, 0, - 0, 68, 0, 104, 70, 137, 0, 0, 43, 0, - 0, 42, 0, 39, 95, 79, 0, 100, 131, 0, - 57, 122, 120, 0, 110, 111, 112, 113, 114, 115, - 118, 116, 0, 105, 0, 0, 0, 69, 0, 52, - 53, 54, 55, 56, 50, 0, 0, 0, 41, 0, - 0, 0, 0, 133, 0, 60, 0, 123, 121, 119, - 117, 0, 0, 0, 107, 72, 71, 0, 0, 0, - 49, 48, 46, 43, 66, 67, 0, 0, 104, 92, - 101, 77, 0, 124, 58, 0, 0, 106, 108, 109, - 135, 51, 0, 47, 44, 40, 37, 0, 0, 131, - 132, 134, 0, 73, 61, 0, 50, 0, 34, 102, - 74, 0, 59, 45, 38, 0, 128, 125, 126, 0, - 130, 129, 0, 103, 127 + 20, 21, 0, 35, 0, 0, 0, 79, 67, 64, + 65, 99, 66, 0, 90, 88, 77, 94, 92, 93, + 89, 78, 32, 31, 0, 0, 0, 0, 0, 0, + 138, 1, 141, 2, 68, 0, 30, 0, 79, 0, + 0, 79, 0, 87, 0, 95, 0, 0, 0, 0, + 80, 0, 0, 0, 106, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 98, 86, 0, 100, 91, 96, + 82, 83, 84, 85, 79, 101, 94, 106, 33, 0, + 0, 70, 0, 106, 72, 139, 0, 0, 45, 0, + 0, 44, 0, 39, 97, 81, 0, 102, 133, 0, + 59, 124, 122, 0, 112, 113, 114, 115, 116, 117, + 120, 118, 0, 107, 0, 0, 0, 71, 0, 54, + 55, 56, 57, 58, 52, 0, 0, 0, 43, 0, + 0, 0, 0, 135, 0, 62, 0, 125, 123, 121, + 119, 0, 0, 0, 109, 74, 73, 0, 0, 0, + 51, 50, 48, 45, 68, 69, 0, 0, 106, 94, + 103, 79, 0, 126, 60, 0, 0, 108, 110, 111, + 137, 53, 0, 49, 46, 42, 37, 0, 0, 133, + 134, 136, 0, 75, 63, 0, 52, 0, 41, 0, + 34, 104, 76, 0, 61, 47, 40, 38, 0, 130, + 127, 128, 0, 132, 131, 0, 105, 129 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -171, -171, 213, -171, -171, -171, -171, -171, -171, -171, - -171, -171, -171, -171, -171, 12, -171, -171, 45, 75, - 16, -171, -171, -171, -171, 35, -94, 49, -171, -171, - -171, 89, -44, -171, -4, -52, 187, -171, -171, -171, - -84, 77, 10, -113, -170, 98, -171, 17, -171, 32, - -171, -171, -171, -171, -171 + -165, -165, 223, -165, -165, -165, -165, -165, -165, -165, + -165, -165, -165, -165, -165, 13, -165, -165, 50, 80, + 18, -165, -165, -165, -165, 43, -93, 56, -165, -165, + -165, 95, -45, -165, -4, -52, 189, -165, -165, -165, + -84, 81, 17, -112, -164, 102, -165, 19, -165, 34, + -165, -165, -165, -165, -165 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -856,7 +857,7 @@ static const yytype_uint8 yydefgoto[] = 28, 29, 30, 31, 44, 217, 32, 33, 166, 128, 192, 212, 164, 34, 140, 174, 55, 100, 35, 36, 123, 124, 37, 38, 56, 57, 137, 58, 59, 60, - 197, 117, 198, 121, 153, 154, 223, 237, 238, 173, + 197, 117, 198, 121, 153, 154, 223, 240, 241, 173, 203, 39, 40, 41, 73 }; @@ -865,64 +866,64 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 61, 83, 125, 79, 138, 84, 84, 116, 118, 78, - 157, 84, 208, 209, 188, 98, 47, 177, 42, 62, - 156, 48, 45, 81, 46, 240, 189, 65, 190, 191, - 48, 130, 221, 66, 110, 111, 112, 113, 241, 178, - 120, 82, 43, 80, 78, 175, 99, 67, 229, 68, - 49, 50, 47, 52, 63, 64, 131, 71, 136, 49, - 50, 51, 52, 69, 53, 54, 48, 72, 152, 74, - 85, 85, 76, 179, 103, 75, 85, 106, 86, 87, - 88, 89, 141, 77, 107, 219, 168, 199, 108, 182, - 183, 86, 87, 88, 89, 49, 50, 51, 52, 235, - 53, 54, 184, 185, 142, 86, 87, 88, 89, 143, - 135, 224, 175, 159, 91, 160, 161, 162, 163, 92, - 189, 93, 190, 191, 88, 89, 182, 183, 94, 207, - 152, 152, 144, 145, 146, 147, 148, 149, 150, 151, - 204, 205, 232, 205, 86, 87, 88, 89, 141, 95, - 152, 96, 97, 102, 101, 104, 105, 109, 114, 115, - 119, 126, 122, 47, 120, 127, 152, 129, 134, 132, - 142, 133, 139, 155, 78, 143, 158, 48, 165, 236, - 167, 169, 170, 172, 171, 176, 180, 187, 194, 195, - 236, 196, 201, 202, 206, 210, 211, 220, 144, 145, - 146, 147, 148, 149, 150, 151, 49, 50, 51, 52, - 213, 53, 54, 1, 2, 99, 216, 222, 218, 226, - 231, 227, 3, 4, 5, 6, 7, 8, 9, 10, - 182, 70, 228, 11, 12, 13, 239, 242, 214, 234, - 193, 225, 233, 215, 90, 186, 14, 15, 200, 243, - 181, 230, 0, 0, 0, 16, 0, 17, 0, 244, - 18 + 61, 83, 79, 125, 243, 138, 177, 116, 118, 98, + 84, 157, 156, 84, 84, 48, 130, 244, 208, 209, + 227, 107, 63, 64, 42, 108, 88, 89, 178, 78, + 62, 81, 120, 78, 110, 111, 112, 113, 221, 45, + 99, 46, 141, 80, 49, 50, 175, 52, 43, 82, + 182, 183, 182, 183, 231, 131, 189, 65, 190, 191, + 238, 67, 179, 136, 142, 204, 205, 66, 152, 143, + 86, 87, 88, 89, 103, 85, 188, 106, 85, 85, + 86, 87, 88, 89, 68, 168, 219, 199, 189, 69, + 190, 191, 144, 145, 146, 147, 148, 149, 150, 151, + 71, 78, 184, 185, 86, 87, 88, 89, 47, 72, + 135, 74, 224, 175, 75, 159, 76, 160, 161, 162, + 163, 91, 48, 77, 86, 87, 88, 89, 92, 207, + 152, 152, 234, 205, 93, 94, 95, 96, 101, 97, + 102, 47, 109, 104, 105, 119, 114, 126, 115, 141, + 152, 49, 50, 51, 52, 48, 53, 54, 120, 129, + 122, 127, 133, 132, 47, 139, 152, 134, 155, 158, + 228, 142, 165, 167, 78, 171, 143, 169, 48, 170, + 172, 239, 236, 180, 49, 50, 51, 52, 176, 53, + 54, 187, 194, 239, 195, 196, 201, 220, 202, 144, + 145, 146, 147, 148, 149, 150, 151, 49, 50, 51, + 52, 211, 53, 54, 1, 2, 206, 210, 213, 99, + 216, 222, 218, 3, 4, 5, 6, 7, 8, 9, + 10, 182, 229, 226, 11, 12, 13, 230, 233, 242, + 245, 70, 237, 214, 235, 193, 90, 14, 15, 225, + 215, 186, 200, 232, 181, 0, 16, 0, 17, 246, + 0, 18, 0, 0, 247 }; static const yytype_int16 yycheck[] = { - 4, 53, 96, 47, 117, 4, 4, 91, 92, 17, - 123, 4, 182, 183, 24, 24, 24, 9, 13, 69, - 26, 38, 13, 24, 15, 5, 36, 43, 38, 39, - 38, 4, 202, 45, 86, 87, 88, 89, 18, 31, - 46, 42, 37, 47, 17, 139, 55, 69, 218, 69, - 67, 68, 24, 70, 14, 15, 100, 0, 57, 67, - 68, 69, 70, 52, 72, 73, 38, 3, 120, 69, - 69, 69, 69, 65, 78, 15, 69, 81, 71, 72, - 73, 74, 9, 69, 69, 198, 130, 171, 73, 47, - 48, 71, 72, 73, 74, 67, 68, 69, 70, 57, - 72, 73, 154, 155, 31, 71, 72, 73, 74, 36, - 114, 205, 206, 30, 45, 32, 33, 34, 35, 45, - 36, 69, 38, 39, 73, 74, 47, 48, 69, 181, - 182, 183, 59, 60, 61, 62, 63, 64, 65, 66, - 25, 26, 25, 26, 71, 72, 73, 74, 9, 49, - 202, 59, 53, 50, 69, 25, 25, 69, 26, 69, - 44, 70, 69, 24, 46, 69, 218, 56, 25, 50, - 31, 69, 24, 59, 17, 36, 43, 38, 26, 231, - 59, 69, 58, 10, 26, 26, 36, 13, 25, 69, - 242, 24, 6, 11, 24, 69, 67, 201, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 38, 72, 73, 7, 8, 55, 69, 12, 50, 25, - 6, 26, 16, 17, 18, 19, 20, 21, 22, 23, - 47, 18, 25, 27, 28, 29, 58, 26, 193, 227, - 165, 206, 226, 194, 57, 156, 40, 41, 171, 239, - 152, 219, -1, -1, -1, 49, -1, 51, -1, 242, - 54 + 4, 53, 47, 96, 5, 117, 9, 91, 92, 24, + 4, 123, 26, 4, 4, 38, 4, 18, 182, 183, + 4, 69, 14, 15, 13, 73, 73, 74, 31, 17, + 69, 24, 46, 17, 86, 87, 88, 89, 202, 13, + 55, 15, 9, 47, 67, 68, 139, 70, 37, 42, + 47, 48, 47, 48, 218, 100, 36, 43, 38, 39, + 57, 69, 65, 57, 31, 25, 26, 45, 120, 36, + 71, 72, 73, 74, 78, 69, 24, 81, 69, 69, + 71, 72, 73, 74, 69, 130, 198, 171, 36, 52, + 38, 39, 59, 60, 61, 62, 63, 64, 65, 66, + 0, 17, 154, 155, 71, 72, 73, 74, 24, 3, + 114, 69, 205, 206, 15, 30, 69, 32, 33, 34, + 35, 45, 38, 69, 71, 72, 73, 74, 45, 181, + 182, 183, 25, 26, 69, 69, 49, 59, 69, 53, + 50, 24, 69, 25, 25, 44, 26, 70, 69, 9, + 202, 67, 68, 69, 70, 38, 72, 73, 46, 56, + 69, 69, 69, 50, 24, 24, 218, 25, 59, 43, + 215, 31, 26, 59, 17, 26, 36, 69, 38, 58, + 10, 233, 227, 36, 67, 68, 69, 70, 26, 72, + 73, 13, 25, 245, 69, 24, 6, 201, 11, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 67, 72, 73, 7, 8, 24, 69, 38, 55, + 69, 12, 50, 16, 17, 18, 19, 20, 21, 22, + 23, 47, 26, 25, 27, 28, 29, 25, 6, 58, + 26, 18, 229, 193, 226, 165, 57, 40, 41, 206, + 194, 156, 171, 219, 152, -1, 49, -1, 51, 242, + -1, 54, -1, -1, 245 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -951,9 +952,9 @@ static const yytype_uint8 yystos[] = 38, 39, 96, 95, 25, 69, 24, 116, 118, 116, 117, 6, 11, 126, 25, 26, 24, 111, 120, 120, 69, 67, 97, 38, 94, 103, 69, 91, 50, 119, - 110, 120, 12, 122, 102, 101, 25, 26, 25, 120, - 125, 6, 25, 96, 91, 57, 111, 123, 124, 58, - 5, 18, 26, 118, 123 + 110, 120, 12, 122, 102, 101, 25, 4, 108, 26, + 25, 120, 125, 6, 25, 96, 108, 91, 57, 111, + 123, 124, 58, 5, 18, 26, 118, 123 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -963,16 +964,17 @@ static const yytype_uint8 yyr1[] = 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 90, 91, 91, 92, - 93, 93, 93, 94, 94, 95, 95, 96, 96, 96, - 96, 97, 98, 98, 98, 98, 98, 99, 100, 100, - 101, 101, 102, 102, 102, 102, 103, 103, 104, 105, - 106, 106, 107, 108, 108, 109, 109, 110, 110, 110, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 112, 112, 112, 113, 114, 115, 115, 116, - 117, 117, 118, 118, 119, 119, 120, 120, 120, 120, - 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 122, 122, 123, 123, 124, 124, - 124, 125, 125, 126, 126, 127, 128, 129, 130, 130 + 93, 93, 93, 93, 93, 94, 94, 95, 95, 96, + 96, 96, 96, 97, 98, 98, 98, 98, 98, 99, + 100, 100, 101, 101, 102, 102, 102, 102, 103, 103, + 104, 105, 106, 106, 107, 108, 108, 109, 109, 110, + 110, 110, 111, 111, 111, 111, 111, 111, 111, 111, + 111, 111, 111, 111, 112, 112, 112, 113, 114, 115, + 115, 116, 117, 117, 118, 118, 119, 119, 120, 120, + 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 122, 122, 123, 123, + 124, 124, 124, 125, 125, 126, 126, 127, 128, 129, + 130, 130 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -982,16 +984,17 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, - 8, 6, 5, 0, 3, 6, 3, 2, 1, 1, - 0, 1, 1, 1, 1, 1, 1, 5, 3, 5, - 1, 3, 1, 1, 1, 1, 0, 4, 4, 5, - 1, 3, 3, 8, 9, 2, 2, 0, 2, 4, - 3, 3, 3, 3, 3, 2, 1, 1, 1, 3, - 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, - 2, 4, 3, 6, 0, 2, 3, 2, 3, 3, - 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, - 1, 2, 1, 2, 0, 3, 1, 3, 1, 2, - 2, 0, 3, 0, 2, 7, 2, 4, 0, 1 + 10, 9, 8, 6, 5, 0, 3, 6, 3, 2, + 1, 1, 0, 1, 1, 1, 1, 1, 1, 5, + 3, 5, 1, 3, 1, 1, 1, 1, 0, 4, + 4, 5, 1, 3, 3, 8, 9, 2, 2, 0, + 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, + 1, 3, 1, 1, 0, 1, 2, 4, 3, 1, + 3, 1, 2, 4, 3, 6, 0, 2, 3, 2, + 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, + 1, 2, 1, 2, 1, 2, 0, 3, 1, 3, + 1, 2, 2, 0, 3, 0, 2, 7, 2, 4, + 0, 1 }; @@ -1858,7 +1861,7 @@ YYLTYPE yylloc = yyloc_default; std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1862 "yacc_sql.cpp" +#line 1865 "yacc_sql.cpp" break; case 24: /* exit_stmt: EXIT */ @@ -1867,7 +1870,7 @@ YYLTYPE yylloc = yyloc_default; (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1871 "yacc_sql.cpp" +#line 1874 "yacc_sql.cpp" break; case 25: /* help_stmt: HELP */ @@ -1875,7 +1878,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1879 "yacc_sql.cpp" +#line 1882 "yacc_sql.cpp" break; case 26: /* sync_stmt: SYNC */ @@ -1883,7 +1886,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1887 "yacc_sql.cpp" +#line 1890 "yacc_sql.cpp" break; case 27: /* begin_stmt: TRX_BEGIN */ @@ -1891,7 +1894,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1895 "yacc_sql.cpp" +#line 1898 "yacc_sql.cpp" break; case 28: /* commit_stmt: TRX_COMMIT */ @@ -1899,7 +1902,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1903 "yacc_sql.cpp" +#line 1906 "yacc_sql.cpp" break; case 29: /* rollback_stmt: TRX_ROLLBACK */ @@ -1907,7 +1910,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1911 "yacc_sql.cpp" +#line 1914 "yacc_sql.cpp" break; case 30: /* drop_table_stmt: DROP TABLE ID */ @@ -1917,7 +1920,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1921 "yacc_sql.cpp" +#line 1924 "yacc_sql.cpp" break; case 31: /* show_tables_stmt: SHOW TABLES */ @@ -1925,7 +1928,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1929 "yacc_sql.cpp" +#line 1932 "yacc_sql.cpp" break; case 32: /* desc_table_stmt: DESC ID */ @@ -1935,7 +1938,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1939 "yacc_sql.cpp" +#line 1942 "yacc_sql.cpp" break; case 33: /* show_index_stmt: SHOW INDEX FROM relation */ @@ -1946,7 +1949,7 @@ YYLTYPE yylloc = yyloc_default; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1950 "yacc_sql.cpp" +#line 1953 "yacc_sql.cpp" break; case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ @@ -1962,19 +1965,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1966 "yacc_sql.cpp" +#line 1969 "yacc_sql.cpp" break; case 35: /* opt_unique: UNIQUE */ #line 372 "yacc_sql.y" { (yyval.unique) = true; } -#line 1972 "yacc_sql.cpp" +#line 1975 "yacc_sql.cpp" break; case 36: /* opt_unique: %empty */ #line 373 "yacc_sql.y" { (yyval.unique) = false; } -#line 1978 "yacc_sql.cpp" +#line 1981 "yacc_sql.cpp" break; case 37: /* attr_list: ID */ @@ -1984,7 +1987,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1988 "yacc_sql.cpp" +#line 1991 "yacc_sql.cpp" break; case 38: /* attr_list: ID COMMA attr_list */ @@ -1994,7 +1997,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 1998 "yacc_sql.cpp" +#line 2001 "yacc_sql.cpp" break; case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ @@ -2006,43 +2009,59 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2010 "yacc_sql.cpp" +#line 2013 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ #line 403 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); + (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2018 "yacc_sql.cpp" +#line 2021 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ + case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ #line 407 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2026 "yacc_sql.cpp" +#line 2029 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ + case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 411 "yacc_sql.y" + { + (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); + } +#line 2037 "yacc_sql.cpp" + break; + + case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ +#line 415 "yacc_sql.y" + { + (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); + } +#line 2045 "yacc_sql.cpp" + break; + + case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ +#line 419 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2034 "yacc_sql.cpp" +#line 2053 "yacc_sql.cpp" break; - case 43: /* attr_def_list: %empty */ -#line 417 "yacc_sql.y" + case 45: /* attr_def_list: %empty */ +#line 425 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2042 "yacc_sql.cpp" +#line 2061 "yacc_sql.cpp" break; - case 44: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 421 "yacc_sql.y" + case 46: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 429 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -2052,11 +2071,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2056 "yacc_sql.cpp" +#line 2075 "yacc_sql.cpp" break; - case 45: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ -#line 434 "yacc_sql.y" + case 47: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ +#line 442 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -2068,11 +2087,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2072 "yacc_sql.cpp" +#line 2091 "yacc_sql.cpp" break; - case 46: /* attr_def: ID type nullable_constraint */ -#line 446 "yacc_sql.y" + case 48: /* attr_def: ID type nullable_constraint */ +#line 454 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -2096,79 +2115,79 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2100 "yacc_sql.cpp" +#line 2119 "yacc_sql.cpp" break; - case 47: /* nullable_constraint: NOT NULL_T */ -#line 473 "yacc_sql.y" + case 49: /* nullable_constraint: NOT NULL_T */ +#line 481 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2108 "yacc_sql.cpp" +#line 2127 "yacc_sql.cpp" break; - case 48: /* nullable_constraint: NULLABLE */ -#line 477 "yacc_sql.y" + case 50: /* nullable_constraint: NULLABLE */ +#line 485 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2116 "yacc_sql.cpp" +#line 2135 "yacc_sql.cpp" break; - case 49: /* nullable_constraint: NULL_T */ -#line 481 "yacc_sql.y" + case 51: /* nullable_constraint: NULL_T */ +#line 489 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2124 "yacc_sql.cpp" +#line 2143 "yacc_sql.cpp" break; - case 50: /* nullable_constraint: %empty */ -#line 485 "yacc_sql.y" + case 52: /* nullable_constraint: %empty */ +#line 493 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2132 "yacc_sql.cpp" +#line 2151 "yacc_sql.cpp" break; - case 51: /* number: NUMBER */ -#line 491 "yacc_sql.y" + case 53: /* number: NUMBER */ +#line 499 "yacc_sql.y" {(yyval.number) = (yyvsp[0].number);} -#line 2138 "yacc_sql.cpp" +#line 2157 "yacc_sql.cpp" break; - case 52: /* type: INT_T */ -#line 495 "yacc_sql.y" + case 54: /* type: INT_T */ +#line 503 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2144 "yacc_sql.cpp" +#line 2163 "yacc_sql.cpp" break; - case 53: /* type: STRING_T */ -#line 496 "yacc_sql.y" + case 55: /* type: STRING_T */ +#line 504 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2150 "yacc_sql.cpp" +#line 2169 "yacc_sql.cpp" break; - case 54: /* type: FLOAT_T */ -#line 497 "yacc_sql.y" + case 56: /* type: FLOAT_T */ +#line 505 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2156 "yacc_sql.cpp" +#line 2175 "yacc_sql.cpp" break; - case 55: /* type: DATE_T */ -#line 498 "yacc_sql.y" + case 57: /* type: DATE_T */ +#line 506 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2162 "yacc_sql.cpp" +#line 2181 "yacc_sql.cpp" break; - case 56: /* type: TEXT_T */ -#line 499 "yacc_sql.y" + case 58: /* type: TEXT_T */ +#line 507 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2168 "yacc_sql.cpp" +#line 2187 "yacc_sql.cpp" break; - case 57: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 504 "yacc_sql.y" + case 59: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 512 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2178,102 +2197,102 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2182 "yacc_sql.cpp" +#line 2201 "yacc_sql.cpp" break; - case 58: /* values_list: LBRACE value_list RBRACE */ -#line 517 "yacc_sql.y" + case 60: /* values_list: LBRACE value_list RBRACE */ +#line 525 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2192 "yacc_sql.cpp" +#line 2211 "yacc_sql.cpp" break; - case 59: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 523 "yacc_sql.y" + case 61: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 531 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2201 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; - case 60: /* value_list: value */ -#line 530 "yacc_sql.y" + case 62: /* value_list: value */ +#line 538 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2211 "yacc_sql.cpp" +#line 2230 "yacc_sql.cpp" break; - case 61: /* value_list: value_list COMMA value */ -#line 536 "yacc_sql.y" + case 63: /* value_list: value_list COMMA value */ +#line 544 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2220 "yacc_sql.cpp" +#line 2239 "yacc_sql.cpp" break; - case 62: /* value: NUMBER */ -#line 543 "yacc_sql.y" + case 64: /* value: NUMBER */ +#line 551 "yacc_sql.y" { (yyval.value) = new Value((int)(yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2229 "yacc_sql.cpp" +#line 2248 "yacc_sql.cpp" break; - case 63: /* value: FLOAT */ -#line 547 "yacc_sql.y" + case 65: /* value: FLOAT */ +#line 555 "yacc_sql.y" { (yyval.value) = new Value((float)(yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2238 "yacc_sql.cpp" +#line 2257 "yacc_sql.cpp" break; - case 64: /* value: SSS */ -#line 551 "yacc_sql.y" + case 66: /* value: SSS */ +#line 559 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2249 "yacc_sql.cpp" +#line 2268 "yacc_sql.cpp" break; - case 65: /* value: NULL_T */ -#line 557 "yacc_sql.y" + case 67: /* value: NULL_T */ +#line 565 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2257 "yacc_sql.cpp" +#line 2276 "yacc_sql.cpp" break; - case 66: /* storage_format: %empty */ -#line 564 "yacc_sql.y" + case 68: /* storage_format: %empty */ +#line 572 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2265 "yacc_sql.cpp" +#line 2284 "yacc_sql.cpp" break; - case 67: /* storage_format: STORAGE FORMAT EQ ID */ -#line 568 "yacc_sql.y" + case 69: /* storage_format: STORAGE FORMAT EQ ID */ +#line 576 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2273 "yacc_sql.cpp" +#line 2292 "yacc_sql.cpp" break; - case 68: /* delete_stmt: DELETE FROM ID where */ -#line 575 "yacc_sql.y" + case 70: /* delete_stmt: DELETE FROM ID where */ +#line 583 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2282,11 +2301,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2286 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; - case 69: /* update_stmt: UPDATE ID SET setClauses where */ -#line 587 "yacc_sql.y" + case 71: /* update_stmt: UPDATE ID SET setClauses where */ +#line 595 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2297,39 +2316,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2301 "yacc_sql.cpp" +#line 2320 "yacc_sql.cpp" break; - case 70: /* setClauses: setClause */ -#line 601 "yacc_sql.y" + case 72: /* setClauses: setClause */ +#line 609 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2310 "yacc_sql.cpp" +#line 2329 "yacc_sql.cpp" break; - case 71: /* setClauses: setClauses COMMA setClause */ -#line 606 "yacc_sql.y" + case 73: /* setClauses: setClauses COMMA setClause */ +#line 614 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2318 "yacc_sql.cpp" +#line 2337 "yacc_sql.cpp" break; - case 72: /* setClause: ID EQ expression */ -#line 613 "yacc_sql.y" + case 74: /* setClause: ID EQ expression */ +#line 621 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2329 "yacc_sql.cpp" +#line 2348 "yacc_sql.cpp" break; - case 73: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ -#line 623 "yacc_sql.y" + case 75: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ +#line 631 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-6].expression_list) != nullptr) { @@ -2362,11 +2381,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2366 "yacc_sql.cpp" +#line 2385 "yacc_sql.cpp" break; - case 74: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 656 "yacc_sql.y" + case 76: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 664 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2396,39 +2415,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2400 "yacc_sql.cpp" +#line 2419 "yacc_sql.cpp" break; - case 75: /* calc_stmt: CALC expression_list */ -#line 689 "yacc_sql.y" + case 77: /* calc_stmt: CALC expression_list */ +#line 697 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2410 "yacc_sql.cpp" +#line 2429 "yacc_sql.cpp" break; - case 76: /* calc_stmt: SELECT expression_list */ -#line 695 "yacc_sql.y" + case 78: /* calc_stmt: SELECT expression_list */ +#line 703 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2420 "yacc_sql.cpp" +#line 2439 "yacc_sql.cpp" break; - case 77: /* expression_list: %empty */ -#line 703 "yacc_sql.y" + case 79: /* expression_list: %empty */ +#line 711 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2428 "yacc_sql.cpp" +#line 2447 "yacc_sql.cpp" break; - case 78: /* expression_list: expression alias */ -#line 707 "yacc_sql.y" + case 80: /* expression_list: expression alias */ +#line 715 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2437,11 +2456,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2441 "yacc_sql.cpp" +#line 2460 "yacc_sql.cpp" break; - case 79: /* expression_list: expression alias COMMA expression_list */ -#line 716 "yacc_sql.y" + case 81: /* expression_list: expression alias COMMA expression_list */ +#line 724 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2454,43 +2473,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2458 "yacc_sql.cpp" +#line 2477 "yacc_sql.cpp" break; - case 80: /* expression: expression '+' expression */ -#line 731 "yacc_sql.y" + case 82: /* expression: expression '+' expression */ +#line 739 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2466 "yacc_sql.cpp" +#line 2485 "yacc_sql.cpp" break; - case 81: /* expression: expression '-' expression */ -#line 734 "yacc_sql.y" + case 83: /* expression: expression '-' expression */ +#line 742 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2474 "yacc_sql.cpp" +#line 2493 "yacc_sql.cpp" break; - case 82: /* expression: expression '*' expression */ -#line 737 "yacc_sql.y" + case 84: /* expression: expression '*' expression */ +#line 745 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2482 "yacc_sql.cpp" +#line 2501 "yacc_sql.cpp" break; - case 83: /* expression: expression '/' expression */ -#line 740 "yacc_sql.y" + case 85: /* expression: expression '/' expression */ +#line 748 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2490 "yacc_sql.cpp" +#line 2509 "yacc_sql.cpp" break; - case 84: /* expression: LBRACE expression_list RBRACE */ -#line 743 "yacc_sql.y" + case 86: /* expression: LBRACE expression_list RBRACE */ +#line 751 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2500,122 +2519,122 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[-1].expression_list); } -#line 2504 "yacc_sql.cpp" +#line 2523 "yacc_sql.cpp" break; - case 85: /* expression: '-' expression */ -#line 752 "yacc_sql.y" + case 87: /* expression: '-' expression */ +#line 760 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2512 "yacc_sql.cpp" +#line 2531 "yacc_sql.cpp" break; - case 86: /* expression: value */ -#line 755 "yacc_sql.y" + case 88: /* expression: value */ +#line 763 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2522 "yacc_sql.cpp" +#line 2541 "yacc_sql.cpp" break; - case 87: /* expression: rel_attr */ -#line 760 "yacc_sql.y" + case 89: /* expression: rel_attr */ +#line 768 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2533 "yacc_sql.cpp" +#line 2552 "yacc_sql.cpp" break; - case 88: /* expression: '*' */ -#line 766 "yacc_sql.y" + case 90: /* expression: '*' */ +#line 774 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2541 "yacc_sql.cpp" +#line 2560 "yacc_sql.cpp" break; - case 89: /* expression: ID DOT '*' */ -#line 769 "yacc_sql.y" + case 91: /* expression: ID DOT '*' */ +#line 777 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2549 "yacc_sql.cpp" +#line 2568 "yacc_sql.cpp" break; - case 90: /* expression: aggr_func_expr */ -#line 772 "yacc_sql.y" + case 92: /* expression: aggr_func_expr */ +#line 780 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2557 "yacc_sql.cpp" +#line 2576 "yacc_sql.cpp" break; - case 91: /* expression: sub_query_expr */ -#line 775 "yacc_sql.y" + case 93: /* expression: sub_query_expr */ +#line 783 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2565 "yacc_sql.cpp" +#line 2584 "yacc_sql.cpp" break; - case 92: /* alias: %empty */ -#line 782 "yacc_sql.y" + case 94: /* alias: %empty */ +#line 790 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2573 "yacc_sql.cpp" +#line 2592 "yacc_sql.cpp" break; - case 93: /* alias: ID */ -#line 785 "yacc_sql.y" + case 95: /* alias: ID */ +#line 793 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2581 "yacc_sql.cpp" +#line 2600 "yacc_sql.cpp" break; - case 94: /* alias: AS ID */ -#line 788 "yacc_sql.y" + case 96: /* alias: AS ID */ +#line 796 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2589 "yacc_sql.cpp" +#line 2608 "yacc_sql.cpp" break; - case 95: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 794 "yacc_sql.y" + case 97: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 802 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2597 "yacc_sql.cpp" +#line 2616 "yacc_sql.cpp" break; - case 96: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 801 "yacc_sql.y" + case 98: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 809 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2605 "yacc_sql.cpp" +#line 2624 "yacc_sql.cpp" break; - case 97: /* rel_attr: ID */ -#line 807 "yacc_sql.y" + case 99: /* rel_attr: ID */ +#line 815 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2615 "yacc_sql.cpp" +#line 2634 "yacc_sql.cpp" break; - case 98: /* rel_attr: ID DOT ID */ -#line 812 "yacc_sql.y" + case 100: /* rel_attr: ID DOT ID */ +#line 820 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2623,19 +2642,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2627 "yacc_sql.cpp" +#line 2646 "yacc_sql.cpp" break; - case 99: /* relation: ID */ -#line 822 "yacc_sql.y" + case 101: /* relation: ID */ +#line 830 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2635 "yacc_sql.cpp" +#line 2654 "yacc_sql.cpp" break; - case 100: /* rel_list: relation alias */ -#line 828 "yacc_sql.y" + case 102: /* rel_list: relation alias */ +#line 836 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2646,11 +2665,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2650 "yacc_sql.cpp" +#line 2669 "yacc_sql.cpp" break; - case 101: /* rel_list: relation alias COMMA rel_list */ -#line 838 "yacc_sql.y" + case 103: /* rel_list: relation alias COMMA rel_list */ +#line 846 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2665,22 +2684,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2669 "yacc_sql.cpp" +#line 2688 "yacc_sql.cpp" break; - case 102: /* joinClauses: relation ON condition */ -#line 856 "yacc_sql.y" + case 104: /* joinClauses: relation ON condition */ +#line 864 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2680 "yacc_sql.cpp" +#line 2699 "yacc_sql.cpp" break; - case 103: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 863 "yacc_sql.y" + case 105: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 871 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2688,243 +2707,243 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2692 "yacc_sql.cpp" +#line 2711 "yacc_sql.cpp" break; - case 104: /* where: %empty */ -#line 874 "yacc_sql.y" + case 106: /* where: %empty */ +#line 882 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2700 "yacc_sql.cpp" +#line 2719 "yacc_sql.cpp" break; - case 105: /* where: WHERE condition */ -#line 877 "yacc_sql.y" + case 107: /* where: WHERE condition */ +#line 885 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2708 "yacc_sql.cpp" +#line 2727 "yacc_sql.cpp" break; - case 106: /* condition: expression comp_op expression */ -#line 884 "yacc_sql.y" + case 108: /* condition: expression comp_op expression */ +#line 892 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2716 "yacc_sql.cpp" +#line 2735 "yacc_sql.cpp" break; - case 107: /* condition: comp_op expression */ -#line 888 "yacc_sql.y" + case 109: /* condition: comp_op expression */ +#line 896 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2727 "yacc_sql.cpp" +#line 2746 "yacc_sql.cpp" break; - case 108: /* condition: condition AND condition */ -#line 895 "yacc_sql.y" + case 110: /* condition: condition AND condition */ +#line 903 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2735 "yacc_sql.cpp" +#line 2754 "yacc_sql.cpp" break; - case 109: /* condition: condition OR condition */ -#line 899 "yacc_sql.y" + case 111: /* condition: condition OR condition */ +#line 907 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2743 "yacc_sql.cpp" +#line 2762 "yacc_sql.cpp" break; - case 110: /* comp_op: EQ */ -#line 905 "yacc_sql.y" + case 112: /* comp_op: EQ */ +#line 913 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2749 "yacc_sql.cpp" +#line 2768 "yacc_sql.cpp" break; - case 111: /* comp_op: LT */ -#line 906 "yacc_sql.y" + case 113: /* comp_op: LT */ +#line 914 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2755 "yacc_sql.cpp" +#line 2774 "yacc_sql.cpp" break; - case 112: /* comp_op: GT */ -#line 907 "yacc_sql.y" + case 114: /* comp_op: GT */ +#line 915 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2761 "yacc_sql.cpp" +#line 2780 "yacc_sql.cpp" break; - case 113: /* comp_op: LE */ -#line 908 "yacc_sql.y" + case 115: /* comp_op: LE */ +#line 916 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2767 "yacc_sql.cpp" +#line 2786 "yacc_sql.cpp" break; - case 114: /* comp_op: GE */ -#line 909 "yacc_sql.y" + case 116: /* comp_op: GE */ +#line 917 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2773 "yacc_sql.cpp" +#line 2792 "yacc_sql.cpp" break; - case 115: /* comp_op: NE */ -#line 910 "yacc_sql.y" + case 117: /* comp_op: NE */ +#line 918 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2779 "yacc_sql.cpp" +#line 2798 "yacc_sql.cpp" break; - case 116: /* comp_op: IS */ -#line 911 "yacc_sql.y" + case 118: /* comp_op: IS */ +#line 919 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2785 "yacc_sql.cpp" +#line 2804 "yacc_sql.cpp" break; - case 117: /* comp_op: IS NOT */ -#line 912 "yacc_sql.y" + case 119: /* comp_op: IS NOT */ +#line 920 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2791 "yacc_sql.cpp" +#line 2810 "yacc_sql.cpp" break; - case 118: /* comp_op: LIKE */ -#line 913 "yacc_sql.y" + case 120: /* comp_op: LIKE */ +#line 921 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2797 "yacc_sql.cpp" +#line 2816 "yacc_sql.cpp" break; - case 119: /* comp_op: NOT LIKE */ -#line 914 "yacc_sql.y" + case 121: /* comp_op: NOT LIKE */ +#line 922 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2803 "yacc_sql.cpp" +#line 2822 "yacc_sql.cpp" break; - case 120: /* comp_op: IN */ -#line 915 "yacc_sql.y" + case 122: /* comp_op: IN */ +#line 923 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2809 "yacc_sql.cpp" +#line 2828 "yacc_sql.cpp" break; - case 121: /* comp_op: NOT IN */ -#line 916 "yacc_sql.y" + case 123: /* comp_op: NOT IN */ +#line 924 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2815 "yacc_sql.cpp" +#line 2834 "yacc_sql.cpp" break; - case 122: /* comp_op: EXISTS */ -#line 917 "yacc_sql.y" + case 124: /* comp_op: EXISTS */ +#line 925 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2821 "yacc_sql.cpp" +#line 2840 "yacc_sql.cpp" break; - case 123: /* comp_op: NOT EXISTS */ -#line 918 "yacc_sql.y" + case 125: /* comp_op: NOT EXISTS */ +#line 926 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2827 "yacc_sql.cpp" +#line 2846 "yacc_sql.cpp" break; - case 124: /* opt_order_by: %empty */ -#line 923 "yacc_sql.y" + case 126: /* opt_order_by: %empty */ +#line 931 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2835 "yacc_sql.cpp" +#line 2854 "yacc_sql.cpp" break; - case 125: /* opt_order_by: ORDER BY sort_list */ -#line 927 "yacc_sql.y" + case 127: /* opt_order_by: ORDER BY sort_list */ +#line 935 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2844 "yacc_sql.cpp" +#line 2863 "yacc_sql.cpp" break; - case 126: /* sort_list: sort_unit */ -#line 935 "yacc_sql.y" + case 128: /* sort_list: sort_unit */ +#line 943 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2853 "yacc_sql.cpp" +#line 2872 "yacc_sql.cpp" break; - case 127: /* sort_list: sort_unit COMMA sort_list */ -#line 940 "yacc_sql.y" + case 129: /* sort_list: sort_unit COMMA sort_list */ +#line 948 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2862 "yacc_sql.cpp" +#line 2881 "yacc_sql.cpp" break; - case 128: /* sort_unit: expression */ -#line 948 "yacc_sql.y" + case 130: /* sort_unit: expression */ +#line 956 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2872 "yacc_sql.cpp" +#line 2891 "yacc_sql.cpp" break; - case 129: /* sort_unit: expression DESC */ -#line 954 "yacc_sql.y" + case 131: /* sort_unit: expression DESC */ +#line 962 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2882 "yacc_sql.cpp" +#line 2901 "yacc_sql.cpp" break; - case 130: /* sort_unit: expression ASC */ -#line 960 "yacc_sql.y" + case 132: /* sort_unit: expression ASC */ +#line 968 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2892 "yacc_sql.cpp" +#line 2911 "yacc_sql.cpp" break; - case 131: /* group_by: %empty */ -#line 969 "yacc_sql.y" + case 133: /* group_by: %empty */ +#line 977 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2900 "yacc_sql.cpp" +#line 2919 "yacc_sql.cpp" break; - case 132: /* group_by: GROUP BY expression_list */ -#line 973 "yacc_sql.y" + case 134: /* group_by: GROUP BY expression_list */ +#line 981 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2908 "yacc_sql.cpp" +#line 2927 "yacc_sql.cpp" break; - case 133: /* opt_having: %empty */ -#line 980 "yacc_sql.y" + case 135: /* opt_having: %empty */ +#line 988 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2916 "yacc_sql.cpp" +#line 2935 "yacc_sql.cpp" break; - case 134: /* opt_having: HAVING condition */ -#line 984 "yacc_sql.y" + case 136: /* opt_having: HAVING condition */ +#line 992 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2924 "yacc_sql.cpp" +#line 2943 "yacc_sql.cpp" break; - case 135: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 991 "yacc_sql.y" + case 137: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 999 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2934,20 +2953,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2938 "yacc_sql.cpp" +#line 2957 "yacc_sql.cpp" break; - case 136: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1004 "yacc_sql.y" + case 138: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1012 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2947 "yacc_sql.cpp" +#line 2966 "yacc_sql.cpp" break; - case 137: /* set_variable_stmt: SET ID EQ value */ -#line 1012 "yacc_sql.y" + case 139: /* set_variable_stmt: SET ID EQ value */ +#line 1020 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2955,11 +2974,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2959 "yacc_sql.cpp" +#line 2978 "yacc_sql.cpp" break; -#line 2963 "yacc_sql.cpp" +#line 2982 "yacc_sql.cpp" default: break; } @@ -3188,7 +3207,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1024 "yacc_sql.y" +#line 1032 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 798c74ef..5280d17d 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -399,7 +399,15 @@ drop_index_stmt: /*drop index 语句的语法解析树*/ } ; create_table_stmt: /*create table 语句的语法解析树*/ - CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format + CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt + { + $$ = create_table_sql_node($3, $5, $6, $8, $10); + } + | CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt + { + $$ = create_table_sql_node($3, $5, $6, $8, $9); + } + | CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format { $$ = create_table_sql_node($3, $5, $6, $8, nullptr); } From 23fd890659102b26e6043c23151ebba4842563c9 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 23:39:38 +0800 Subject: [PATCH 203/308] delete // TODO: insert records --- src/observer/sql/executor/create_table_executor.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/observer/sql/executor/create_table_executor.cpp b/src/observer/sql/executor/create_table_executor.cpp index 0c3f56da..2ca95e90 100644 --- a/src/observer/sql/executor/create_table_executor.cpp +++ b/src/observer/sql/executor/create_table_executor.cpp @@ -74,7 +74,6 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) return rc; } - // TODO: insert records unique_ptr logical_oper = nullptr; LogicalPlanGenerator::create(create_table_stmt->create_table_select_stmt(), logical_oper); if (!logical_oper) { From fd2548dad32f58bf458c4d66bb9f1bbbe59de2c4 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 10 Oct 2024 23:54:36 +0800 Subject: [PATCH 204/308] =?UTF-8?q?=E5=AE=8C=E6=88=90create=20table=20f(i?= =?UTF-8?q?=20int=20not=20null,=20j=20char(1))=20as=20select=20i,=20j=20fr?= =?UTF-8?q?om=20b;=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/parse_defs.h | 8 ++++---- src/observer/sql/parser/yacc_sql.cpp | 2 +- src/observer/sql/parser/yacc_sql.y | 2 +- src/observer/sql/stmt/create_table_stmt.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 5feb45c4..bca7ef87 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -206,10 +206,10 @@ struct AttrInfoSqlNode */ struct CreateTableSqlNode { - std::string relation_name; ///< Relation name - std::vector attr_infos; ///< attributes - std::string storage_format; ///< storage format - SelectSqlNode create_table_select; ///< create table select + std::string relation_name; ///< Relation name + std::vector attr_infos; ///< attributes + std::string storage_format; ///< storage format + std::unique_ptr create_table_select; ///< create table select }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index d78ad5bf..36c48045 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -145,7 +145,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, } if (create_table_select) { - create_table.create_table_select = std::move(create_table_select->selection); + create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); } return parsed_sql_node; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 5280d17d..b02e71ec 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -76,7 +76,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, } if (create_table_select) { - create_table.create_table_select = std::move(create_table_select->selection); + create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); } return parsed_sql_node; diff --git a/src/observer/sql/stmt/create_table_stmt.cpp b/src/observer/sql/stmt/create_table_stmt.cpp index 301215b0..161f2cba 100644 --- a/src/observer/sql/stmt/create_table_stmt.cpp +++ b/src/observer/sql/stmt/create_table_stmt.cpp @@ -29,9 +29,9 @@ RC CreateTableStmt::create(Db *db, CreateTableSqlNode &create_table, Stmt *&stmt return RC::INVALID_ARGUMENT; } SelectStmt *select_stmt = nullptr; - if (create_table.attr_infos.empty()) { + if (create_table.create_table_select) { Stmt *create_table_select_stmt; - RC rc = SelectStmt::create(db, create_table.create_table_select, create_table_select_stmt); + RC rc = SelectStmt::create(db, *create_table.create_table_select, create_table_select_stmt); if (OB_FAIL(rc)) { return rc; } From 87e50546890b8d2f516f7091a34bd48909a00b93 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 11 Oct 2024 00:11:13 +0800 Subject: [PATCH 205/308] =?UTF-8?q?=E5=AE=8C=E6=88=90create=20table=20e=20?= =?UTF-8?q?as=20select=20id,=20age,=20id+age=20as=20id=5Fage=20from=20a;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/executor/create_table_executor.cpp | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/src/observer/sql/executor/create_table_executor.cpp b/src/observer/sql/executor/create_table_executor.cpp index 2ca95e90..d7971ed9 100644 --- a/src/observer/sql/executor/create_table_executor.cpp +++ b/src/observer/sql/executor/create_table_executor.cpp @@ -38,33 +38,15 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) CreateTableStmt *create_table_stmt = static_cast(stmt); const char *table_name = create_table_stmt->table_name().c_str(); if (create_table_stmt->create_table_select_stmt()) { - std::vector field_exprs; - std::unordered_set table_names; - for (auto &expr : create_table_stmt->create_table_select_stmt()->query_expressions()) { - auto field_expr = dynamic_cast(expr.get()); - if (field_expr) { - table_names.emplace(field_expr->table_name()); - field_exprs.push_back(field_expr); - } else { - return RC::INTERNAL; - } - } + SelectStmt *select_stmt = create_table_stmt->create_table_select_stmt(); std::vector attr_infos = create_table_stmt->attr_infos(); if (attr_infos.empty()) { - for (auto &expr : field_exprs) { + for (auto &expr : select_stmt->query_expressions()) { AttrInfoSqlNode attr_info; - if (table_names.size() == 1) { - attr_info.name = expr->field_name(); - } else { - attr_info.name = expr->table_name(); - attr_info.name += "."; - attr_info.name += expr->field_name(); - } - attr_info.length = expr->field().meta()->len(); - attr_info.type = expr->field().meta()->type(); - attr_info.nullable = expr->field().meta()->nullable(); - + attr_info.name = expr->name(); + attr_info.length = expr->value_length(); + attr_info.type = expr->value_type(); attr_infos.push_back(attr_info); } } From 7e1561a3b8d428fa0ad9f62038a41e8e95c23770 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 11 Oct 2024 00:25:34 +0800 Subject: [PATCH 206/308] =?UTF-8?q?fix:=20create=20table=20hm=20as=20selec?= =?UTF-8?q?t=20t1.id,=20t1.age,=20t2.name=20from=20create=5Ftable=5Fselect?= =?UTF-8?q?=5Ft1=20t1,=20create=5Ftable=5Fselect=5Ft2=20t2=20where=20t1.id?= =?UTF-8?q?=3Dt2.id;=E5=AD=97=E6=AE=B5=E5=90=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/executor/create_table_executor.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/observer/sql/executor/create_table_executor.cpp b/src/observer/sql/executor/create_table_executor.cpp index d7971ed9..3c56131a 100644 --- a/src/observer/sql/executor/create_table_executor.cpp +++ b/src/observer/sql/executor/create_table_executor.cpp @@ -44,9 +44,17 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) if (attr_infos.empty()) { for (auto &expr : select_stmt->query_expressions()) { AttrInfoSqlNode attr_info; - attr_info.name = expr->name(); - attr_info.length = expr->value_length(); - attr_info.type = expr->value_type(); + if (FieldExpr *field_expr = dynamic_cast(expr.get())) { + auto field_meta = field_expr->field().meta(); + attr_info.name = field_meta->name(); + attr_info.type = field_meta->type(); + attr_info.length = field_meta->len(); + attr_info.nullable = field_meta->nullable(); + } else { + attr_info.name = expr->name(); + attr_info.length = expr->value_length(); + attr_info.type = expr->value_type(); + } attr_infos.push_back(attr_info); } } From 8b98ae5ff87ea11ce99ef5a723dcfe57a66cc137 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 11 Oct 2024 01:19:08 +0800 Subject: [PATCH 207/308] =?UTF-8?q?=E5=88=A0=E9=99=A4delete=20$2;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/yacc_sql.y | 1 - 1 file changed, 1 deletion(-) diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index b02e71ec..144c05ac 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -755,7 +755,6 @@ expression: $$ = new ListExpr(std::move(*$2)); } $$->set_name(token_name(sql_string, &@$)); - delete $2; } | '-' expression %prec UMINUS { $$ = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, $2, nullptr, sql_string, &@$); From 9b9ea84823f9f9cd894e5437c879dbe1f7297678 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 12 Oct 2024 12:16:38 +0800 Subject: [PATCH 208/308] =?UTF-8?q?=E9=87=8D=E6=9E=84NUMBER=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/lex_sql.cpp | 36 +- src/observer/sql/parser/lex_sql.l | 4 +- src/observer/sql/parser/yacc_sql.cpp | 972 ++++++++++++++------------- src/observer/sql/parser/yacc_sql.y | 34 +- 4 files changed, 539 insertions(+), 507 deletions(-) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index db299f0f..828d2614 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -402,7 +402,7 @@ static const flex_int16_t yy_accept[227] = 5, 64, 60, 66, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 78, 63, 0, 75, 0, 76, - 3, 0, 61, 62, 65, 70, 70, 70, 49, 70, + 0, 3, 61, 62, 65, 70, 70, 70, 49, 70, 48, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 51, 68, 70, 70, 70, 70, 70, 15, 23, 70, 70, 70, 70, 70, 70, @@ -469,12 +469,12 @@ static const YY_CHAR yy_meta[71] = static const flex_int16_t yy_base[232] = { 0, - 0, 0, 0, 0, 616, 617, 617, 617, 597, 609, - 607, 617, 617, 617, 617, 617, 597, 617, 617, 58, - 617, 56, 617, 593, 57, 61, 62, 63, 64, 83, + 0, 0, 0, 0, 615, 616, 616, 616, 596, 608, + 606, 616, 616, 616, 616, 616, 616, 616, 616, 58, + 616, 56, 616, 593, 57, 61, 62, 63, 64, 83, 65, 73, 91, 76, 595, 117, 119, 115, 103, 142, - 134, 129, 66, 112, 617, 617, 604, 617, 602, 617, - 79, 592, 617, 617, 617, 0, 591, 145, 160, 141, + 134, 129, 66, 112, 616, 616, 604, 616, 602, 616, + 592, 79, 616, 616, 616, 0, 591, 145, 160, 141, 590, 158, 176, 155, 182, 161, 183, 168, 188, 184, 190, 186, 195, 189, 194, 242, 589, 196, 204, 216, 220, 230, 588, 243, 233, 237, 239, 248, 255, 222, @@ -493,7 +493,7 @@ static const flex_int16_t yy_base[232] = 509, 530, 445, 427, 262, 226, 515, 224, 223, 218, 202, 521, 529, 157, 535, 146, 132, 127, 126, 123, - 538, 527, 120, 89, 88, 617, 588, 590, 592, 99, + 538, 527, 120, 89, 88, 616, 588, 590, 592, 99, 82 } ; @@ -527,7 +527,7 @@ static const flex_int16_t yy_def[232] = 226 } ; -static const flex_int16_t yy_nxt[688] = +static const flex_int16_t yy_nxt[687] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -536,9 +536,9 @@ static const flex_int16_t yy_nxt[688] = 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, - 52, 56, 51, 53, 54, 56, 56, 56, 56, 56, + 51, 56, 52, 53, 54, 56, 56, 56, 56, 56, 56, 62, 66, 56, 60, 94, 67, 56, 63, 58, - 56, 52, 74, 51, 59, 64, 75, 56, 65, 68, + 56, 51, 74, 52, 59, 64, 75, 56, 65, 68, 57, 73, 56, 56, 61, 56, 69, 62, 66, 78, 60, 94, 67, 70, 63, 58, 71, 56, 74, 72, @@ -596,17 +596,17 @@ static const flex_int16_t yy_nxt[688] = 47, 47, 49, 49, 56, 56, 56, 56, 56, 56, 56, 96, 56, 56, 56, 56, 96, 50, 48, 56, - 55, 51, 50, 48, 46, 226, 5, 226, 226, 226, + 55, 50, 48, 46, 226, 5, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226 + 226, 226, 226, 226, 226, 226 } ; -static const flex_int16_t yy_chk[688] = +static const flex_int16_t yy_chk[687] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -617,7 +617,7 @@ static const flex_int16_t yy_chk[688] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, 43, 27, 28, 231, 26, 43, 28, 32, 27, 25, - 34, 51, 32, 51, 25, 27, 32, 30, 27, 28, + 34, 52, 32, 52, 25, 27, 32, 30, 27, 28, 230, 31, 225, 224, 26, 33, 29, 27, 28, 34, 26, 43, 28, 30, 27, 25, 30, 39, 32, 30, @@ -674,15 +674,15 @@ static const flex_int16_t yy_chk[688] = 154, 150, 222, 148, 215, 147, 145, 221, 227, 227, 228, 228, 229, 229, 144, 141, 140, 129, 124, 98, - 97, 96, 83, 77, 61, 57, 52, 49, 47, 35, - 24, 17, 11, 10, 9, 5, 226, 226, 226, 226, + 97, 96, 83, 77, 61, 57, 51, 49, 47, 35, + 24, 11, 10, 9, 5, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226 + 226, 226, 226, 226, 226, 226 } ; /* The intent behind this definition is that it'll catch @@ -1045,7 +1045,7 @@ YY_DECL yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 617 ); + while ( yy_base[yy_current_state] != 616 ); yy_find_action: yy_act = yy_accept[yy_current_state]; diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 4f2d0251..2efb6bb7 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -77,8 +77,8 @@ QUOTE [\'\"] {WHITE_SAPCE} // ignore whitespace \n ; -[\-]?{DIGIT}+ yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); -[\-]?{DIGIT}+{DOT}{DIGIT}+ yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); +{DIGIT}+ yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); +{DIGIT}+{DOT}{DIGIT}+ yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); ";" RETURN_TOKEN(SEMICOLON); {DOT} RETURN_TOKEN(DOT); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 36c48045..86e3ccc1 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -276,12 +276,12 @@ enum yysymbol_kind_t YYSYMBOL_attr_def_list = 94, /* attr_def_list */ YYSYMBOL_attr_def = 95, /* attr_def */ YYSYMBOL_nullable_constraint = 96, /* nullable_constraint */ - YYSYMBOL_number = 97, /* number */ - YYSYMBOL_type = 98, /* type */ - YYSYMBOL_insert_stmt = 99, /* insert_stmt */ - YYSYMBOL_values_list = 100, /* values_list */ - YYSYMBOL_value_list = 101, /* value_list */ - YYSYMBOL_value = 102, /* value */ + YYSYMBOL_type = 97, /* type */ + YYSYMBOL_insert_stmt = 98, /* insert_stmt */ + YYSYMBOL_values_list = 99, /* values_list */ + YYSYMBOL_value_list = 100, /* value_list */ + YYSYMBOL_value = 101, /* value */ + YYSYMBOL_nonnegative_value = 102, /* nonnegative_value */ YYSYMBOL_storage_format = 103, /* storage_format */ YYSYMBOL_delete_stmt = 104, /* delete_stmt */ YYSYMBOL_update_stmt = 105, /* update_stmt */ @@ -640,16 +640,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 264 +#define YYLAST 267 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 55 /* YYNRULES -- Number of rules. */ -#define YYNRULES 141 +#define YYNRULES 143 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 248 +#define YYNSTATES 251 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 326 @@ -710,16 +710,16 @@ static const yytype_int16 yyrline[] = 284, 285, 286, 287, 291, 297, 302, 308, 314, 320, 326, 333, 339, 347, 357, 372, 373, 377, 383, 392, 402, 406, 410, 414, 418, 425, 428, 441, 453, 480, - 484, 488, 493, 499, 503, 504, 505, 506, 507, 511, - 524, 530, 537, 543, 551, 555, 559, 565, 572, 575, - 582, 594, 608, 613, 620, 630, 663, 696, 702, 711, - 714, 723, 739, 742, 745, 748, 751, 760, 763, 768, - 774, 777, 780, 783, 790, 793, 796, 801, 808, 815, - 820, 830, 836, 846, 863, 870, 882, 885, 891, 895, - 902, 906, 913, 914, 915, 916, 917, 918, 919, 920, - 921, 922, 923, 924, 925, 926, 931, 934, 942, 947, - 955, 961, 967, 977, 980, 988, 991, 998, 1011, 1019, - 1029, 1030 + 484, 488, 493, 499, 500, 501, 502, 503, 507, 520, + 526, 533, 539, 547, 550, 554, 561, 565, 569, 575, + 582, 585, 592, 604, 618, 623, 630, 640, 673, 706, + 712, 721, 724, 733, 749, 752, 755, 758, 761, 769, + 772, 777, 783, 786, 789, 792, 799, 802, 805, 810, + 817, 824, 829, 839, 845, 855, 872, 879, 891, 894, + 900, 904, 911, 915, 922, 923, 924, 925, 926, 927, + 928, 929, 930, 931, 932, 933, 934, 935, 940, 943, + 951, 956, 964, 970, 976, 986, 989, 997, 1000, 1007, + 1020, 1028, 1038, 1039 }; #endif @@ -750,11 +750,11 @@ static const char *const yytname[] = "show_tables_stmt", "desc_table_stmt", "show_index_stmt", "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", - "number", "type", "insert_stmt", "values_list", "value_list", "value", - "storage_format", "delete_stmt", "update_stmt", "setClauses", - "setClause", "select_stmt", "calc_stmt", "expression_list", "expression", - "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", "relation", - "rel_list", "joinClauses", "where", "condition", "comp_op", + "type", "insert_stmt", "values_list", "value_list", "value", + "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", + "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", + "expression", "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", + "relation", "rel_list", "joinClauses", "where", "condition", "comp_op", "opt_order_by", "sort_list", "sort_unit", "group_by", "opt_having", "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; @@ -766,7 +766,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-165) +#define YYPACT_NINF (-175) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -780,31 +780,32 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 207, 11, 26, 117, 117, -39, 8, -165, 14, 22, - -8, -165, -165, -165, -165, -165, 15, 37, 207, 100, - 106, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, 42, -165, 99, 47, 54, 84, -165, -165, - -165, 7, -165, 117, -165, -165, -165, 9, -165, -165, - -165, 76, -165, -165, 83, 65, 66, 87, 78, 86, - -165, -165, -165, -165, -15, 69, -165, 90, 117, 118, - 119, 117, -48, -165, 73, -165, 117, 117, 117, 117, - 120, 79, 79, 101, 112, 91, -23, 77, 92, 103, - 12, 113, 93, 76, -165, -165, 142, -165, -165, -165, - -47, -47, -165, -165, 117, -165, 6, 112, -165, 141, - 140, -165, 109, -14, -165, -165, 126, 85, 146, 114, - 157, -165, 108, -165, -165, -165, 121, 149, 170, -23, - 162, -165, -165, -3, -165, -165, -165, -165, -165, -165, - -165, 147, 33, 5, 117, 117, 91, -165, 178, -165, - -165, -165, -165, -165, 52, 92, 167, 125, -165, 171, - 79, 79, 190, 187, 40, -165, 192, -165, -165, -165, - -165, 117, 140, 140, 53, 53, -165, 148, 144, 180, - -165, -165, -165, 146, 164, -165, 151, 172, 112, 10, - -165, 117, 140, 209, -165, -23, -23, 53, -165, 184, - -165, -165, 208, -165, -165, 16, 206, 212, 140, 170, - -165, 5, 232, -165, -165, 107, 20, 157, -165, 151, - -165, 3, -165, 117, -165, -165, -165, -165, 181, -1, - -165, 214, 79, -165, -165, 117, -165, -165 + 210, 5, 38, -10, -10, -13, 12, -175, 29, 19, + 6, -175, -175, -175, -175, -175, 24, 36, 210, 124, + 125, -175, -175, -175, -175, -175, -175, -175, -175, -175, + -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, + -175, -175, 70, -175, 126, 71, 73, 119, -175, -175, + -175, -2, -175, -10, -175, -175, -175, 7, -175, -175, + -175, 99, -175, -175, 100, 77, 78, 101, 89, 98, + -175, -175, -175, -175, -9, 80, -175, 103, -10, 130, + 131, -10, -28, -175, 90, -175, -10, -10, -10, -10, + 132, 91, 91, 117, 116, 94, -18, 95, 102, 108, + 13, 118, 106, 99, -175, -175, 141, -175, -175, -175, + 18, 18, -175, -175, -10, -175, 4, 116, -175, 146, + 143, -175, 113, -7, -175, 52, -175, -175, 133, 97, + 151, 121, 161, -175, 114, -175, -175, -175, 135, 156, + 180, -18, 168, -175, -175, 0, -175, -175, -175, -175, + -175, -175, -175, 159, 35, 55, -10, -10, 94, -175, + -175, -175, 184, -175, -175, -175, -175, -175, 87, 102, + 173, 145, -175, 175, 91, 91, 194, 208, 96, -175, + 196, -175, -175, -175, -175, -10, 143, 143, 41, 41, + -175, 152, 155, 185, -175, -175, -175, 151, 169, -175, + 165, 186, 116, 17, -175, -10, 143, 213, -175, -18, + -18, 41, -175, 188, -175, 215, -175, -175, 21, 216, + 218, 143, 180, -175, 55, 235, -175, -175, 112, 31, + 161, -175, 165, -175, -24, -175, -10, -175, -175, -175, + -175, 187, 11, -175, 220, 91, -175, -175, -10, -175, + -175 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -812,53 +813,54 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 36, 0, 79, 79, 0, 0, 26, 0, 0, + 0, 36, 0, 81, 81, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 140, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 142, 23, 22, 15, 16, 17, 18, 9, 10, 11, 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 35, 0, 0, 0, 79, 67, 64, - 65, 99, 66, 0, 90, 88, 77, 94, 92, 93, - 89, 78, 32, 31, 0, 0, 0, 0, 0, 0, - 138, 1, 141, 2, 68, 0, 30, 0, 79, 0, - 0, 79, 0, 87, 0, 95, 0, 0, 0, 0, - 80, 0, 0, 0, 106, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 98, 86, 0, 100, 91, 96, - 82, 83, 84, 85, 79, 101, 94, 106, 33, 0, - 0, 70, 0, 106, 72, 139, 0, 0, 45, 0, - 0, 44, 0, 39, 97, 81, 0, 102, 133, 0, - 59, 124, 122, 0, 112, 113, 114, 115, 116, 117, - 120, 118, 0, 107, 0, 0, 0, 71, 0, 54, - 55, 56, 57, 58, 52, 0, 0, 0, 43, 0, - 0, 0, 0, 135, 0, 62, 0, 125, 123, 121, - 119, 0, 0, 0, 109, 74, 73, 0, 0, 0, - 51, 50, 48, 45, 68, 69, 0, 0, 106, 94, - 103, 79, 0, 126, 60, 0, 0, 108, 110, 111, - 137, 53, 0, 49, 46, 42, 37, 0, 0, 133, - 134, 136, 0, 75, 63, 0, 52, 0, 41, 0, - 34, 104, 76, 0, 61, 47, 40, 38, 0, 130, - 127, 128, 0, 132, 131, 0, 105, 129 + 20, 21, 0, 35, 0, 0, 0, 81, 69, 66, + 67, 101, 68, 0, 92, 90, 79, 96, 94, 95, + 91, 80, 32, 31, 0, 0, 0, 0, 0, 0, + 140, 1, 143, 2, 70, 0, 30, 0, 81, 0, + 0, 81, 0, 89, 0, 97, 0, 0, 0, 0, + 82, 0, 0, 0, 108, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 100, 88, 0, 102, 93, 98, + 84, 85, 86, 87, 81, 103, 96, 108, 33, 0, + 0, 72, 0, 108, 74, 0, 141, 63, 0, 0, + 45, 0, 0, 44, 0, 39, 99, 83, 0, 104, + 135, 0, 58, 126, 124, 0, 114, 115, 116, 117, + 118, 119, 122, 120, 0, 109, 0, 0, 0, 73, + 64, 65, 0, 53, 54, 55, 56, 57, 52, 0, + 0, 0, 43, 0, 0, 0, 0, 137, 0, 61, + 0, 127, 125, 123, 121, 0, 0, 0, 111, 76, + 75, 0, 0, 0, 51, 50, 48, 45, 70, 71, + 0, 0, 108, 96, 105, 81, 0, 128, 59, 0, + 0, 110, 112, 113, 139, 0, 49, 46, 42, 37, + 0, 0, 135, 136, 138, 0, 77, 62, 0, 52, + 0, 41, 0, 34, 106, 78, 0, 60, 47, 40, + 38, 0, 132, 129, 130, 0, 134, 133, 0, 107, + 131 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -165, -165, 223, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, 13, -165, -165, 50, 80, - 18, -165, -165, -165, -165, 43, -93, 56, -165, -165, - -165, 95, -45, -165, -4, -52, 189, -165, -165, -165, - -84, 81, 17, -112, -164, 102, -165, 19, -165, 34, - -165, -165, -165, -165, -165 + -175, -175, 226, -175, -175, -175, -175, -175, -175, -175, + -175, -175, -175, -175, -175, 15, -175, -175, 51, 83, + 20, -175, -175, -175, 43, -91, -93, 56, -175, -175, + -175, 104, -45, -175, -4, -52, 198, -175, -175, -175, + -85, 81, 22, -113, -174, 109, -175, 9, -175, 44, + -175, -175, -175, -175, -175 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 217, 32, 33, 166, 128, - 192, 212, 164, 34, 140, 174, 55, 100, 35, 36, - 123, 124, 37, 38, 56, 57, 137, 58, 59, 60, - 197, 117, 198, 121, 153, 154, 223, 240, 241, 173, - 203, 39, 40, 41, 73 + 28, 29, 30, 31, 44, 220, 32, 33, 170, 130, + 196, 168, 34, 142, 178, 179, 55, 100, 35, 36, + 123, 124, 37, 38, 56, 57, 139, 58, 59, 60, + 201, 117, 202, 121, 155, 156, 226, 243, 244, 177, + 207, 39, 40, 41, 73 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -866,64 +868,64 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 61, 83, 79, 125, 243, 138, 177, 116, 118, 98, - 84, 157, 156, 84, 84, 48, 130, 244, 208, 209, - 227, 107, 63, 64, 42, 108, 88, 89, 178, 78, - 62, 81, 120, 78, 110, 111, 112, 113, 221, 45, - 99, 46, 141, 80, 49, 50, 175, 52, 43, 82, - 182, 183, 182, 183, 231, 131, 189, 65, 190, 191, - 238, 67, 179, 136, 142, 204, 205, 66, 152, 143, - 86, 87, 88, 89, 103, 85, 188, 106, 85, 85, - 86, 87, 88, 89, 68, 168, 219, 199, 189, 69, - 190, 191, 144, 145, 146, 147, 148, 149, 150, 151, - 71, 78, 184, 185, 86, 87, 88, 89, 47, 72, - 135, 74, 224, 175, 75, 159, 76, 160, 161, 162, - 163, 91, 48, 77, 86, 87, 88, 89, 92, 207, - 152, 152, 234, 205, 93, 94, 95, 96, 101, 97, - 102, 47, 109, 104, 105, 119, 114, 126, 115, 141, - 152, 49, 50, 51, 52, 48, 53, 54, 120, 129, - 122, 127, 133, 132, 47, 139, 152, 134, 155, 158, - 228, 142, 165, 167, 78, 171, 143, 169, 48, 170, - 172, 239, 236, 180, 49, 50, 51, 52, 176, 53, - 54, 187, 194, 239, 195, 196, 201, 220, 202, 144, - 145, 146, 147, 148, 149, 150, 151, 49, 50, 51, - 52, 211, 53, 54, 1, 2, 206, 210, 213, 99, - 216, 222, 218, 3, 4, 5, 6, 7, 8, 9, - 10, 182, 229, 226, 11, 12, 13, 230, 233, 242, - 245, 70, 237, 214, 235, 193, 90, 14, 15, 225, - 215, 186, 200, 232, 181, 0, 16, 0, 17, 246, - 0, 18, 0, 0, 247 + 61, 83, 79, 127, 140, 126, 116, 118, 84, 181, + 159, 84, 212, 213, 47, 98, 246, 132, 42, 158, + 48, 84, 81, 186, 187, 230, 63, 64, 48, 247, + 78, 182, 224, 241, 110, 111, 112, 113, 78, 120, + 82, 107, 43, 80, 143, 108, 99, 234, 127, 49, + 50, 45, 52, 46, 125, 133, 62, 49, 50, 51, + 52, 138, 53, 54, 66, 183, 144, 193, 154, 194, + 195, 145, 65, 85, 103, 67, 85, 106, 86, 87, + 88, 89, 86, 87, 88, 89, 85, 172, 69, 222, + 203, 88, 89, 68, 146, 147, 148, 149, 150, 151, + 152, 153, 186, 187, 188, 189, 86, 87, 88, 89, + 137, 192, 86, 87, 88, 89, 127, 127, 227, 160, + 161, 208, 209, 193, 71, 194, 195, 163, 72, 164, + 165, 166, 167, 211, 154, 154, 78, 237, 209, 74, + 76, 75, 77, 47, 91, 92, 93, 94, 96, 101, + 95, 97, 143, 102, 154, 104, 105, 48, 114, 109, + 115, 119, 120, 122, 131, 128, 136, 47, 134, 154, + 141, 129, 157, 231, 144, 135, 162, 169, 78, 145, + 171, 48, 175, 173, 242, 239, 49, 50, 51, 52, + 176, 53, 54, 174, 180, 184, 242, 191, 198, 200, + 205, 223, 146, 147, 148, 149, 150, 151, 152, 153, + 49, 50, 51, 52, 199, 53, 54, 1, 2, 206, + 210, 214, 215, 216, 99, 225, 3, 4, 5, 6, + 7, 8, 9, 10, 219, 186, 221, 11, 12, 13, + 229, 236, 232, 233, 70, 245, 248, 240, 217, 238, + 14, 15, 197, 228, 218, 90, 204, 250, 0, 16, + 0, 17, 190, 185, 18, 0, 235, 249 }; static const yytype_int16 yycheck[] = { - 4, 53, 47, 96, 5, 117, 9, 91, 92, 24, - 4, 123, 26, 4, 4, 38, 4, 18, 182, 183, - 4, 69, 14, 15, 13, 73, 73, 74, 31, 17, - 69, 24, 46, 17, 86, 87, 88, 89, 202, 13, - 55, 15, 9, 47, 67, 68, 139, 70, 37, 42, - 47, 48, 47, 48, 218, 100, 36, 43, 38, 39, - 57, 69, 65, 57, 31, 25, 26, 45, 120, 36, - 71, 72, 73, 74, 78, 69, 24, 81, 69, 69, - 71, 72, 73, 74, 69, 130, 198, 171, 36, 52, - 38, 39, 59, 60, 61, 62, 63, 64, 65, 66, - 0, 17, 154, 155, 71, 72, 73, 74, 24, 3, - 114, 69, 205, 206, 15, 30, 69, 32, 33, 34, - 35, 45, 38, 69, 71, 72, 73, 74, 45, 181, - 182, 183, 25, 26, 69, 69, 49, 59, 69, 53, - 50, 24, 69, 25, 25, 44, 26, 70, 69, 9, - 202, 67, 68, 69, 70, 38, 72, 73, 46, 56, - 69, 69, 69, 50, 24, 24, 218, 25, 59, 43, - 215, 31, 26, 59, 17, 26, 36, 69, 38, 58, - 10, 233, 227, 36, 67, 68, 69, 70, 26, 72, - 73, 13, 25, 245, 69, 24, 6, 201, 11, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 67, 72, 73, 7, 8, 24, 69, 38, 55, - 69, 12, 50, 16, 17, 18, 19, 20, 21, 22, - 23, 47, 26, 25, 27, 28, 29, 25, 6, 58, - 26, 18, 229, 193, 226, 165, 57, 40, 41, 206, - 194, 156, 171, 219, 152, -1, 49, -1, 51, 242, - -1, 54, -1, -1, 245 + 4, 53, 47, 96, 117, 96, 91, 92, 4, 9, + 123, 4, 186, 187, 24, 24, 5, 4, 13, 26, + 38, 4, 24, 47, 48, 4, 14, 15, 38, 18, + 17, 31, 206, 57, 86, 87, 88, 89, 17, 46, + 42, 69, 37, 47, 9, 73, 55, 221, 141, 67, + 68, 13, 70, 15, 72, 100, 69, 67, 68, 69, + 70, 57, 72, 73, 45, 65, 31, 36, 120, 38, + 39, 36, 43, 69, 78, 69, 69, 81, 71, 72, + 73, 74, 71, 72, 73, 74, 69, 132, 52, 202, + 175, 73, 74, 69, 59, 60, 61, 62, 63, 64, + 65, 66, 47, 48, 156, 157, 71, 72, 73, 74, + 114, 24, 71, 72, 73, 74, 209, 210, 209, 67, + 68, 25, 26, 36, 0, 38, 39, 30, 3, 32, + 33, 34, 35, 185, 186, 187, 17, 25, 26, 69, + 69, 15, 69, 24, 45, 45, 69, 69, 59, 69, + 49, 53, 9, 50, 206, 25, 25, 38, 26, 69, + 69, 44, 46, 69, 56, 70, 25, 24, 50, 221, + 24, 69, 59, 218, 31, 69, 43, 26, 17, 36, + 59, 38, 26, 69, 236, 230, 67, 68, 69, 70, + 10, 72, 73, 58, 26, 36, 248, 13, 25, 24, + 6, 205, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 69, 72, 73, 7, 8, 11, + 24, 69, 67, 38, 55, 12, 16, 17, 18, 19, + 20, 21, 22, 23, 69, 47, 50, 27, 28, 29, + 25, 6, 26, 25, 18, 58, 26, 232, 197, 229, + 40, 41, 169, 210, 198, 57, 175, 248, -1, 49, + -1, 51, 158, 154, 54, -1, 222, 245 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -933,7 +935,7 @@ static const yytype_uint8 yystos[] = 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, 23, 27, 28, 29, 40, 41, 49, 51, 54, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 92, 93, 99, 104, 105, 108, 109, 127, + 88, 89, 92, 93, 98, 104, 105, 108, 109, 127, 128, 129, 13, 37, 90, 13, 15, 24, 38, 67, 68, 69, 70, 72, 73, 102, 110, 111, 113, 114, 115, 110, 69, 14, 15, 43, 45, 69, 69, 52, @@ -942,19 +944,20 @@ static const yytype_uint8 yystos[] = 112, 45, 45, 69, 69, 49, 59, 53, 24, 55, 103, 69, 50, 110, 25, 25, 110, 69, 73, 69, 111, 111, 111, 111, 26, 69, 116, 117, 116, 44, - 46, 119, 69, 106, 107, 102, 70, 69, 95, 56, - 4, 108, 50, 69, 25, 110, 57, 112, 119, 24, - 100, 9, 31, 36, 59, 60, 61, 62, 63, 64, - 65, 66, 111, 120, 121, 59, 26, 119, 43, 30, - 32, 33, 34, 35, 98, 26, 94, 59, 108, 69, - 58, 26, 10, 125, 101, 102, 26, 9, 31, 65, - 36, 121, 47, 48, 111, 111, 107, 13, 24, 36, - 38, 39, 96, 95, 25, 69, 24, 116, 118, 116, - 117, 6, 11, 126, 25, 26, 24, 111, 120, 120, - 69, 67, 97, 38, 94, 103, 69, 91, 50, 119, - 110, 120, 12, 122, 102, 101, 25, 4, 108, 26, - 25, 120, 125, 6, 25, 96, 108, 91, 57, 111, - 123, 124, 58, 5, 18, 26, 118, 123 + 46, 119, 69, 106, 107, 72, 101, 102, 70, 69, + 95, 56, 4, 108, 50, 69, 25, 110, 57, 112, + 119, 24, 99, 9, 31, 36, 59, 60, 61, 62, + 63, 64, 65, 66, 111, 120, 121, 59, 26, 119, + 67, 68, 43, 30, 32, 33, 34, 35, 97, 26, + 94, 59, 108, 69, 58, 26, 10, 125, 100, 101, + 26, 9, 31, 65, 36, 121, 47, 48, 111, 111, + 107, 13, 24, 36, 38, 39, 96, 95, 25, 69, + 24, 116, 118, 116, 117, 6, 11, 126, 25, 26, + 24, 111, 120, 120, 69, 67, 38, 94, 103, 69, + 91, 50, 119, 110, 120, 12, 122, 101, 100, 25, + 4, 108, 26, 25, 120, 125, 6, 25, 96, 108, + 91, 57, 111, 123, 124, 58, 5, 18, 26, 118, + 123 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -965,16 +968,16 @@ static const yytype_uint8 yyr1[] = 78, 78, 78, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 90, 91, 91, 92, 93, 93, 93, 93, 93, 94, 94, 95, 95, 96, - 96, 96, 96, 97, 98, 98, 98, 98, 98, 99, - 100, 100, 101, 101, 102, 102, 102, 102, 103, 103, - 104, 105, 106, 106, 107, 108, 108, 109, 109, 110, - 110, 110, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 112, 112, 112, 113, 114, 115, - 115, 116, 117, 117, 118, 118, 119, 119, 120, 120, - 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 122, 122, 123, 123, - 124, 124, 124, 125, 125, 126, 126, 127, 128, 129, - 130, 130 + 96, 96, 96, 97, 97, 97, 97, 97, 98, 99, + 99, 100, 100, 101, 101, 101, 102, 102, 102, 102, + 103, 103, 104, 105, 106, 106, 107, 108, 108, 109, + 109, 110, 110, 110, 111, 111, 111, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 112, 112, 112, 113, + 114, 115, 115, 116, 117, 117, 118, 118, 119, 119, + 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, + 123, 123, 124, 124, 124, 125, 125, 126, 126, 127, + 128, 129, 130, 130 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -985,16 +988,16 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, 10, 9, 8, 6, 5, 0, 3, 6, 3, 2, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 5, - 3, 5, 1, 3, 1, 1, 1, 1, 0, 4, - 4, 5, 1, 3, 3, 8, 9, 2, 2, 0, - 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, - 1, 3, 1, 1, 0, 1, 2, 4, 3, 1, - 3, 1, 2, 4, 3, 6, 0, 2, 3, 2, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 2, 1, 2, 1, 2, 0, 3, 1, 3, - 1, 2, 2, 0, 3, 0, 2, 7, 2, 4, - 0, 1 + 1, 1, 0, 1, 1, 1, 1, 1, 5, 3, + 5, 1, 3, 1, 2, 2, 1, 1, 1, 1, + 0, 4, 4, 5, 1, 3, 3, 8, 9, 2, + 2, 0, 2, 4, 3, 3, 3, 3, 3, 2, + 1, 1, 1, 3, 1, 1, 0, 1, 2, 4, + 3, 1, 3, 1, 2, 4, 3, 6, 0, 2, + 3, 2, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, + 1, 3, 1, 2, 2, 0, 3, 0, 2, 7, + 2, 4, 0, 1 }; @@ -1861,7 +1864,7 @@ YYLTYPE yylloc = yyloc_default; std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1865 "yacc_sql.cpp" +#line 1868 "yacc_sql.cpp" break; case 24: /* exit_stmt: EXIT */ @@ -1870,7 +1873,7 @@ YYLTYPE yylloc = yyloc_default; (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1874 "yacc_sql.cpp" +#line 1877 "yacc_sql.cpp" break; case 25: /* help_stmt: HELP */ @@ -1878,7 +1881,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1882 "yacc_sql.cpp" +#line 1885 "yacc_sql.cpp" break; case 26: /* sync_stmt: SYNC */ @@ -1886,7 +1889,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1890 "yacc_sql.cpp" +#line 1893 "yacc_sql.cpp" break; case 27: /* begin_stmt: TRX_BEGIN */ @@ -1894,7 +1897,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1898 "yacc_sql.cpp" +#line 1901 "yacc_sql.cpp" break; case 28: /* commit_stmt: TRX_COMMIT */ @@ -1902,7 +1905,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1906 "yacc_sql.cpp" +#line 1909 "yacc_sql.cpp" break; case 29: /* rollback_stmt: TRX_ROLLBACK */ @@ -1910,7 +1913,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1914 "yacc_sql.cpp" +#line 1917 "yacc_sql.cpp" break; case 30: /* drop_table_stmt: DROP TABLE ID */ @@ -1920,7 +1923,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1924 "yacc_sql.cpp" +#line 1927 "yacc_sql.cpp" break; case 31: /* show_tables_stmt: SHOW TABLES */ @@ -1928,7 +1931,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1932 "yacc_sql.cpp" +#line 1935 "yacc_sql.cpp" break; case 32: /* desc_table_stmt: DESC ID */ @@ -1938,7 +1941,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1942 "yacc_sql.cpp" +#line 1945 "yacc_sql.cpp" break; case 33: /* show_index_stmt: SHOW INDEX FROM relation */ @@ -1949,7 +1952,7 @@ YYLTYPE yylloc = yyloc_default; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1953 "yacc_sql.cpp" +#line 1956 "yacc_sql.cpp" break; case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ @@ -1965,19 +1968,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1969 "yacc_sql.cpp" +#line 1972 "yacc_sql.cpp" break; case 35: /* opt_unique: UNIQUE */ #line 372 "yacc_sql.y" { (yyval.unique) = true; } -#line 1975 "yacc_sql.cpp" +#line 1978 "yacc_sql.cpp" break; case 36: /* opt_unique: %empty */ #line 373 "yacc_sql.y" { (yyval.unique) = false; } -#line 1981 "yacc_sql.cpp" +#line 1984 "yacc_sql.cpp" break; case 37: /* attr_list: ID */ @@ -1987,7 +1990,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1991 "yacc_sql.cpp" +#line 1994 "yacc_sql.cpp" break; case 38: /* attr_list: ID COMMA attr_list */ @@ -1997,7 +2000,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2001 "yacc_sql.cpp" +#line 2004 "yacc_sql.cpp" break; case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ @@ -2009,7 +2012,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2013 "yacc_sql.cpp" +#line 2016 "yacc_sql.cpp" break; case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ @@ -2017,7 +2020,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2021 "yacc_sql.cpp" +#line 2024 "yacc_sql.cpp" break; case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ @@ -2025,7 +2028,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2029 "yacc_sql.cpp" +#line 2032 "yacc_sql.cpp" break; case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ @@ -2033,7 +2036,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2037 "yacc_sql.cpp" +#line 2040 "yacc_sql.cpp" break; case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ @@ -2041,7 +2044,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2045 "yacc_sql.cpp" +#line 2048 "yacc_sql.cpp" break; case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ @@ -2049,7 +2052,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2053 "yacc_sql.cpp" +#line 2056 "yacc_sql.cpp" break; case 45: /* attr_def_list: %empty */ @@ -2057,7 +2060,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.attr_infos) = nullptr; } -#line 2061 "yacc_sql.cpp" +#line 2064 "yacc_sql.cpp" break; case 46: /* attr_def_list: COMMA attr_def attr_def_list */ @@ -2071,10 +2074,10 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2075 "yacc_sql.cpp" +#line 2078 "yacc_sql.cpp" break; - case 47: /* attr_def: ID type LBRACE number RBRACE nullable_constraint */ + case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ #line 442 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; @@ -2087,7 +2090,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2091 "yacc_sql.cpp" +#line 2094 "yacc_sql.cpp" break; case 48: /* attr_def: ID type nullable_constraint */ @@ -2115,7 +2118,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2119 "yacc_sql.cpp" +#line 2122 "yacc_sql.cpp" break; case 49: /* nullable_constraint: NOT NULL_T */ @@ -2123,7 +2126,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2127 "yacc_sql.cpp" +#line 2130 "yacc_sql.cpp" break; case 50: /* nullable_constraint: NULLABLE */ @@ -2131,7 +2134,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2135 "yacc_sql.cpp" +#line 2138 "yacc_sql.cpp" break; case 51: /* nullable_constraint: NULL_T */ @@ -2139,7 +2142,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2143 "yacc_sql.cpp" +#line 2146 "yacc_sql.cpp" break; case 52: /* nullable_constraint: %empty */ @@ -2147,47 +2150,41 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2151 "yacc_sql.cpp" +#line 2154 "yacc_sql.cpp" break; - case 53: /* number: NUMBER */ + case 53: /* type: INT_T */ #line 499 "yacc_sql.y" - {(yyval.number) = (yyvsp[0].number);} -#line 2157 "yacc_sql.cpp" - break; - - case 54: /* type: INT_T */ -#line 503 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2163 "yacc_sql.cpp" +#line 2160 "yacc_sql.cpp" break; - case 55: /* type: STRING_T */ -#line 504 "yacc_sql.y" + case 54: /* type: STRING_T */ +#line 500 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2169 "yacc_sql.cpp" +#line 2166 "yacc_sql.cpp" break; - case 56: /* type: FLOAT_T */ -#line 505 "yacc_sql.y" + case 55: /* type: FLOAT_T */ +#line 501 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2175 "yacc_sql.cpp" +#line 2172 "yacc_sql.cpp" break; - case 57: /* type: DATE_T */ -#line 506 "yacc_sql.y" + case 56: /* type: DATE_T */ +#line 502 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2181 "yacc_sql.cpp" +#line 2178 "yacc_sql.cpp" break; - case 58: /* type: TEXT_T */ -#line 507 "yacc_sql.y" + case 57: /* type: TEXT_T */ +#line 503 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2187 "yacc_sql.cpp" +#line 2184 "yacc_sql.cpp" break; - case 59: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 512 "yacc_sql.y" + case 58: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 508 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2197,102 +2194,128 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2201 "yacc_sql.cpp" +#line 2198 "yacc_sql.cpp" break; - case 60: /* values_list: LBRACE value_list RBRACE */ -#line 525 "yacc_sql.y" + case 59: /* values_list: LBRACE value_list RBRACE */ +#line 521 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2211 "yacc_sql.cpp" +#line 2208 "yacc_sql.cpp" break; - case 61: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 531 "yacc_sql.y" + case 60: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 527 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2220 "yacc_sql.cpp" +#line 2217 "yacc_sql.cpp" break; - case 62: /* value_list: value */ -#line 538 "yacc_sql.y" + case 61: /* value_list: value */ +#line 534 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2230 "yacc_sql.cpp" +#line 2227 "yacc_sql.cpp" break; - case 63: /* value_list: value_list COMMA value */ -#line 544 "yacc_sql.y" + case 62: /* value_list: value_list COMMA value */ +#line 540 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2239 "yacc_sql.cpp" +#line 2236 "yacc_sql.cpp" + break; + + case 63: /* value: nonnegative_value */ +#line 547 "yacc_sql.y" + { + (yyval.value) = (yyvsp[0].value); + } +#line 2244 "yacc_sql.cpp" break; - case 64: /* value: NUMBER */ -#line 551 "yacc_sql.y" + case 64: /* value: '-' NUMBER */ +#line 550 "yacc_sql.y" + { + (yyval.value) = new Value(-(yyvsp[0].number)); + (yyloc) = (yylsp[-1]); + } +#line 2253 "yacc_sql.cpp" + break; + + case 65: /* value: '-' FLOAT */ +#line 554 "yacc_sql.y" + { + (yyval.value) = new Value(-(yyvsp[0].floats)); + (yyloc) = (yylsp[-1]); + } +#line 2262 "yacc_sql.cpp" + break; + + case 66: /* nonnegative_value: NUMBER */ +#line 561 "yacc_sql.y" { - (yyval.value) = new Value((int)(yyvsp[0].number)); + (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2248 "yacc_sql.cpp" +#line 2271 "yacc_sql.cpp" break; - case 65: /* value: FLOAT */ -#line 555 "yacc_sql.y" - { - (yyval.value) = new Value((float)(yyvsp[0].floats)); + case 67: /* nonnegative_value: FLOAT */ +#line 565 "yacc_sql.y" + { + (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2257 "yacc_sql.cpp" +#line 2280 "yacc_sql.cpp" break; - case 66: /* value: SSS */ -#line 559 "yacc_sql.y" - { + case 68: /* nonnegative_value: SSS */ +#line 569 "yacc_sql.y" + { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2268 "yacc_sql.cpp" +#line 2291 "yacc_sql.cpp" break; - case 67: /* value: NULL_T */ -#line 565 "yacc_sql.y" - { + case 69: /* nonnegative_value: NULL_T */ +#line 575 "yacc_sql.y" + { (yyval.value) = new Value(NullValue()); } -#line 2276 "yacc_sql.cpp" +#line 2299 "yacc_sql.cpp" break; - case 68: /* storage_format: %empty */ -#line 572 "yacc_sql.y" + case 70: /* storage_format: %empty */ +#line 582 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2284 "yacc_sql.cpp" +#line 2307 "yacc_sql.cpp" break; - case 69: /* storage_format: STORAGE FORMAT EQ ID */ -#line 576 "yacc_sql.y" + case 71: /* storage_format: STORAGE FORMAT EQ ID */ +#line 586 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2292 "yacc_sql.cpp" +#line 2315 "yacc_sql.cpp" break; - case 70: /* delete_stmt: DELETE FROM ID where */ -#line 583 "yacc_sql.y" + case 72: /* delete_stmt: DELETE FROM ID where */ +#line 593 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2301,11 +2324,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2305 "yacc_sql.cpp" +#line 2328 "yacc_sql.cpp" break; - case 71: /* update_stmt: UPDATE ID SET setClauses where */ -#line 595 "yacc_sql.y" + case 73: /* update_stmt: UPDATE ID SET setClauses where */ +#line 605 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2316,39 +2339,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2320 "yacc_sql.cpp" +#line 2343 "yacc_sql.cpp" break; - case 72: /* setClauses: setClause */ -#line 609 "yacc_sql.y" + case 74: /* setClauses: setClause */ +#line 619 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2329 "yacc_sql.cpp" +#line 2352 "yacc_sql.cpp" break; - case 73: /* setClauses: setClauses COMMA setClause */ -#line 614 "yacc_sql.y" + case 75: /* setClauses: setClauses COMMA setClause */ +#line 624 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2337 "yacc_sql.cpp" +#line 2360 "yacc_sql.cpp" break; - case 74: /* setClause: ID EQ expression */ -#line 621 "yacc_sql.y" + case 76: /* setClause: ID EQ expression */ +#line 631 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2348 "yacc_sql.cpp" +#line 2371 "yacc_sql.cpp" break; - case 75: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ -#line 631 "yacc_sql.y" + case 77: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ +#line 641 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-6].expression_list) != nullptr) { @@ -2381,11 +2404,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2385 "yacc_sql.cpp" +#line 2408 "yacc_sql.cpp" break; - case 76: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 664 "yacc_sql.y" + case 78: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 674 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2415,39 +2438,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2419 "yacc_sql.cpp" +#line 2442 "yacc_sql.cpp" break; - case 77: /* calc_stmt: CALC expression_list */ -#line 697 "yacc_sql.y" + case 79: /* calc_stmt: CALC expression_list */ +#line 707 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2429 "yacc_sql.cpp" +#line 2452 "yacc_sql.cpp" break; - case 78: /* calc_stmt: SELECT expression_list */ -#line 703 "yacc_sql.y" + case 80: /* calc_stmt: SELECT expression_list */ +#line 713 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2439 "yacc_sql.cpp" +#line 2462 "yacc_sql.cpp" break; - case 79: /* expression_list: %empty */ -#line 711 "yacc_sql.y" + case 81: /* expression_list: %empty */ +#line 721 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2447 "yacc_sql.cpp" +#line 2470 "yacc_sql.cpp" break; - case 80: /* expression_list: expression alias */ -#line 715 "yacc_sql.y" + case 82: /* expression_list: expression alias */ +#line 725 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2456,11 +2479,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2460 "yacc_sql.cpp" +#line 2483 "yacc_sql.cpp" break; - case 81: /* expression_list: expression alias COMMA expression_list */ -#line 724 "yacc_sql.y" + case 83: /* expression_list: expression alias COMMA expression_list */ +#line 734 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2473,43 +2496,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2477 "yacc_sql.cpp" +#line 2500 "yacc_sql.cpp" break; - case 82: /* expression: expression '+' expression */ -#line 739 "yacc_sql.y" + case 84: /* expression: expression '+' expression */ +#line 749 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2485 "yacc_sql.cpp" +#line 2508 "yacc_sql.cpp" break; - case 83: /* expression: expression '-' expression */ -#line 742 "yacc_sql.y" + case 85: /* expression: expression '-' expression */ +#line 752 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2493 "yacc_sql.cpp" +#line 2516 "yacc_sql.cpp" break; - case 84: /* expression: expression '*' expression */ -#line 745 "yacc_sql.y" + case 86: /* expression: expression '*' expression */ +#line 755 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2501 "yacc_sql.cpp" +#line 2524 "yacc_sql.cpp" break; - case 85: /* expression: expression '/' expression */ -#line 748 "yacc_sql.y" + case 87: /* expression: expression '/' expression */ +#line 758 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2509 "yacc_sql.cpp" +#line 2532 "yacc_sql.cpp" break; - case 86: /* expression: LBRACE expression_list RBRACE */ -#line 751 "yacc_sql.y" + case 88: /* expression: LBRACE expression_list RBRACE */ +#line 761 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2517,124 +2540,123 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression) = new ListExpr(std::move(*(yyvsp[-1].expression_list))); } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); - delete (yyvsp[-1].expression_list); } -#line 2523 "yacc_sql.cpp" +#line 2545 "yacc_sql.cpp" break; - case 87: /* expression: '-' expression */ -#line 760 "yacc_sql.y" + case 89: /* expression: '-' expression */ +#line 769 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2531 "yacc_sql.cpp" +#line 2553 "yacc_sql.cpp" break; - case 88: /* expression: value */ -#line 763 "yacc_sql.y" - { + case 90: /* expression: nonnegative_value */ +#line 772 "yacc_sql.y" + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2541 "yacc_sql.cpp" +#line 2563 "yacc_sql.cpp" break; - case 89: /* expression: rel_attr */ -#line 768 "yacc_sql.y" + case 91: /* expression: rel_attr */ +#line 777 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2552 "yacc_sql.cpp" +#line 2574 "yacc_sql.cpp" break; - case 90: /* expression: '*' */ -#line 774 "yacc_sql.y" + case 92: /* expression: '*' */ +#line 783 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2560 "yacc_sql.cpp" +#line 2582 "yacc_sql.cpp" break; - case 91: /* expression: ID DOT '*' */ -#line 777 "yacc_sql.y" + case 93: /* expression: ID DOT '*' */ +#line 786 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2568 "yacc_sql.cpp" +#line 2590 "yacc_sql.cpp" break; - case 92: /* expression: aggr_func_expr */ -#line 780 "yacc_sql.y" + case 94: /* expression: aggr_func_expr */ +#line 789 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2576 "yacc_sql.cpp" +#line 2598 "yacc_sql.cpp" break; - case 93: /* expression: sub_query_expr */ -#line 783 "yacc_sql.y" + case 95: /* expression: sub_query_expr */ +#line 792 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2584 "yacc_sql.cpp" +#line 2606 "yacc_sql.cpp" break; - case 94: /* alias: %empty */ -#line 790 "yacc_sql.y" + case 96: /* alias: %empty */ +#line 799 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2592 "yacc_sql.cpp" +#line 2614 "yacc_sql.cpp" break; - case 95: /* alias: ID */ -#line 793 "yacc_sql.y" + case 97: /* alias: ID */ +#line 802 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2600 "yacc_sql.cpp" +#line 2622 "yacc_sql.cpp" break; - case 96: /* alias: AS ID */ -#line 796 "yacc_sql.y" + case 98: /* alias: AS ID */ +#line 805 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2608 "yacc_sql.cpp" +#line 2630 "yacc_sql.cpp" break; - case 97: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 802 "yacc_sql.y" + case 99: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 811 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2616 "yacc_sql.cpp" +#line 2638 "yacc_sql.cpp" break; - case 98: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 809 "yacc_sql.y" + case 100: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 818 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2624 "yacc_sql.cpp" +#line 2646 "yacc_sql.cpp" break; - case 99: /* rel_attr: ID */ -#line 815 "yacc_sql.y" + case 101: /* rel_attr: ID */ +#line 824 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2634 "yacc_sql.cpp" +#line 2656 "yacc_sql.cpp" break; - case 100: /* rel_attr: ID DOT ID */ -#line 820 "yacc_sql.y" + case 102: /* rel_attr: ID DOT ID */ +#line 829 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2642,19 +2664,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2646 "yacc_sql.cpp" +#line 2668 "yacc_sql.cpp" break; - case 101: /* relation: ID */ -#line 830 "yacc_sql.y" + case 103: /* relation: ID */ +#line 839 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2654 "yacc_sql.cpp" +#line 2676 "yacc_sql.cpp" break; - case 102: /* rel_list: relation alias */ -#line 836 "yacc_sql.y" + case 104: /* rel_list: relation alias */ +#line 845 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2665,11 +2687,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2669 "yacc_sql.cpp" +#line 2691 "yacc_sql.cpp" break; - case 103: /* rel_list: relation alias COMMA rel_list */ -#line 846 "yacc_sql.y" + case 105: /* rel_list: relation alias COMMA rel_list */ +#line 855 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2684,22 +2706,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2688 "yacc_sql.cpp" +#line 2710 "yacc_sql.cpp" break; - case 104: /* joinClauses: relation ON condition */ -#line 864 "yacc_sql.y" + case 106: /* joinClauses: relation ON condition */ +#line 873 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2699 "yacc_sql.cpp" +#line 2721 "yacc_sql.cpp" break; - case 105: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 871 "yacc_sql.y" + case 107: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 880 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2707,243 +2729,243 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2711 "yacc_sql.cpp" +#line 2733 "yacc_sql.cpp" break; - case 106: /* where: %empty */ -#line 882 "yacc_sql.y" + case 108: /* where: %empty */ +#line 891 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2719 "yacc_sql.cpp" +#line 2741 "yacc_sql.cpp" break; - case 107: /* where: WHERE condition */ -#line 885 "yacc_sql.y" + case 109: /* where: WHERE condition */ +#line 894 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2727 "yacc_sql.cpp" +#line 2749 "yacc_sql.cpp" break; - case 108: /* condition: expression comp_op expression */ -#line 892 "yacc_sql.y" + case 110: /* condition: expression comp_op expression */ +#line 901 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2735 "yacc_sql.cpp" +#line 2757 "yacc_sql.cpp" break; - case 109: /* condition: comp_op expression */ -#line 896 "yacc_sql.y" + case 111: /* condition: comp_op expression */ +#line 905 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2746 "yacc_sql.cpp" +#line 2768 "yacc_sql.cpp" break; - case 110: /* condition: condition AND condition */ -#line 903 "yacc_sql.y" + case 112: /* condition: condition AND condition */ +#line 912 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2754 "yacc_sql.cpp" +#line 2776 "yacc_sql.cpp" break; - case 111: /* condition: condition OR condition */ -#line 907 "yacc_sql.y" + case 113: /* condition: condition OR condition */ +#line 916 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2762 "yacc_sql.cpp" +#line 2784 "yacc_sql.cpp" break; - case 112: /* comp_op: EQ */ -#line 913 "yacc_sql.y" + case 114: /* comp_op: EQ */ +#line 922 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2768 "yacc_sql.cpp" +#line 2790 "yacc_sql.cpp" break; - case 113: /* comp_op: LT */ -#line 914 "yacc_sql.y" + case 115: /* comp_op: LT */ +#line 923 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2774 "yacc_sql.cpp" +#line 2796 "yacc_sql.cpp" break; - case 114: /* comp_op: GT */ -#line 915 "yacc_sql.y" + case 116: /* comp_op: GT */ +#line 924 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2780 "yacc_sql.cpp" +#line 2802 "yacc_sql.cpp" break; - case 115: /* comp_op: LE */ -#line 916 "yacc_sql.y" + case 117: /* comp_op: LE */ +#line 925 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2786 "yacc_sql.cpp" +#line 2808 "yacc_sql.cpp" break; - case 116: /* comp_op: GE */ -#line 917 "yacc_sql.y" + case 118: /* comp_op: GE */ +#line 926 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2792 "yacc_sql.cpp" +#line 2814 "yacc_sql.cpp" break; - case 117: /* comp_op: NE */ -#line 918 "yacc_sql.y" + case 119: /* comp_op: NE */ +#line 927 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2798 "yacc_sql.cpp" +#line 2820 "yacc_sql.cpp" break; - case 118: /* comp_op: IS */ -#line 919 "yacc_sql.y" + case 120: /* comp_op: IS */ +#line 928 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2804 "yacc_sql.cpp" +#line 2826 "yacc_sql.cpp" break; - case 119: /* comp_op: IS NOT */ -#line 920 "yacc_sql.y" + case 121: /* comp_op: IS NOT */ +#line 929 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2810 "yacc_sql.cpp" +#line 2832 "yacc_sql.cpp" break; - case 120: /* comp_op: LIKE */ -#line 921 "yacc_sql.y" + case 122: /* comp_op: LIKE */ +#line 930 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2816 "yacc_sql.cpp" +#line 2838 "yacc_sql.cpp" break; - case 121: /* comp_op: NOT LIKE */ -#line 922 "yacc_sql.y" + case 123: /* comp_op: NOT LIKE */ +#line 931 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2822 "yacc_sql.cpp" +#line 2844 "yacc_sql.cpp" break; - case 122: /* comp_op: IN */ -#line 923 "yacc_sql.y" + case 124: /* comp_op: IN */ +#line 932 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2828 "yacc_sql.cpp" +#line 2850 "yacc_sql.cpp" break; - case 123: /* comp_op: NOT IN */ -#line 924 "yacc_sql.y" + case 125: /* comp_op: NOT IN */ +#line 933 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2834 "yacc_sql.cpp" +#line 2856 "yacc_sql.cpp" break; - case 124: /* comp_op: EXISTS */ -#line 925 "yacc_sql.y" + case 126: /* comp_op: EXISTS */ +#line 934 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2840 "yacc_sql.cpp" +#line 2862 "yacc_sql.cpp" break; - case 125: /* comp_op: NOT EXISTS */ -#line 926 "yacc_sql.y" + case 127: /* comp_op: NOT EXISTS */ +#line 935 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2846 "yacc_sql.cpp" +#line 2868 "yacc_sql.cpp" break; - case 126: /* opt_order_by: %empty */ -#line 931 "yacc_sql.y" + case 128: /* opt_order_by: %empty */ +#line 940 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2854 "yacc_sql.cpp" +#line 2876 "yacc_sql.cpp" break; - case 127: /* opt_order_by: ORDER BY sort_list */ -#line 935 "yacc_sql.y" + case 129: /* opt_order_by: ORDER BY sort_list */ +#line 944 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2863 "yacc_sql.cpp" +#line 2885 "yacc_sql.cpp" break; - case 128: /* sort_list: sort_unit */ -#line 943 "yacc_sql.y" + case 130: /* sort_list: sort_unit */ +#line 952 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2872 "yacc_sql.cpp" +#line 2894 "yacc_sql.cpp" break; - case 129: /* sort_list: sort_unit COMMA sort_list */ -#line 948 "yacc_sql.y" + case 131: /* sort_list: sort_unit COMMA sort_list */ +#line 957 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2881 "yacc_sql.cpp" +#line 2903 "yacc_sql.cpp" break; - case 130: /* sort_unit: expression */ -#line 956 "yacc_sql.y" + case 132: /* sort_unit: expression */ +#line 965 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2891 "yacc_sql.cpp" +#line 2913 "yacc_sql.cpp" break; - case 131: /* sort_unit: expression DESC */ -#line 962 "yacc_sql.y" + case 133: /* sort_unit: expression DESC */ +#line 971 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2901 "yacc_sql.cpp" +#line 2923 "yacc_sql.cpp" break; - case 132: /* sort_unit: expression ASC */ -#line 968 "yacc_sql.y" + case 134: /* sort_unit: expression ASC */ +#line 977 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2911 "yacc_sql.cpp" +#line 2933 "yacc_sql.cpp" break; - case 133: /* group_by: %empty */ -#line 977 "yacc_sql.y" + case 135: /* group_by: %empty */ +#line 986 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2919 "yacc_sql.cpp" +#line 2941 "yacc_sql.cpp" break; - case 134: /* group_by: GROUP BY expression_list */ -#line 981 "yacc_sql.y" + case 136: /* group_by: GROUP BY expression_list */ +#line 990 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2927 "yacc_sql.cpp" +#line 2949 "yacc_sql.cpp" break; - case 135: /* opt_having: %empty */ -#line 988 "yacc_sql.y" + case 137: /* opt_having: %empty */ +#line 997 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2935 "yacc_sql.cpp" +#line 2957 "yacc_sql.cpp" break; - case 136: /* opt_having: HAVING condition */ -#line 992 "yacc_sql.y" + case 138: /* opt_having: HAVING condition */ +#line 1001 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2943 "yacc_sql.cpp" +#line 2965 "yacc_sql.cpp" break; - case 137: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 999 "yacc_sql.y" + case 139: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 1008 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2953,20 +2975,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2957 "yacc_sql.cpp" +#line 2979 "yacc_sql.cpp" break; - case 138: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1012 "yacc_sql.y" + case 140: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1021 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2966 "yacc_sql.cpp" +#line 2988 "yacc_sql.cpp" break; - case 139: /* set_variable_stmt: SET ID EQ value */ -#line 1020 "yacc_sql.y" + case 141: /* set_variable_stmt: SET ID EQ value */ +#line 1029 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2974,11 +2996,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 2978 "yacc_sql.cpp" +#line 3000 "yacc_sql.cpp" break; -#line 2982 "yacc_sql.cpp" +#line 3004 "yacc_sql.cpp" default: break; } @@ -3207,7 +3229,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1032 "yacc_sql.y" +#line 1041 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 144c05ac..332ff3ce 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -195,7 +195,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, /** type 定义了各种解析后的结果输出的是什么类型。类型对应了 union 中的定义的成员变量名称 **/ %type type %type value -%type number +%type nonnegative_value %type relation %type alias %type comp_op @@ -438,7 +438,7 @@ attr_def_list: ; attr_def: - ID type LBRACE number RBRACE nullable_constraint + ID type LBRACE NUMBER RBRACE nullable_constraint { $$ = new AttrInfoSqlNode; $$->type = (AttrType)$2; @@ -495,10 +495,6 @@ nullable_constraint: } ; -number: - NUMBER {$$ = $1;} - ; - type: INT_T { $$ = static_cast(AttrType::INTS); } | STRING_T { $$ = static_cast(AttrType::CHARS); } @@ -548,21 +544,35 @@ value_list: ; value: + nonnegative_value { + $$ = $1; + } + | '-' NUMBER { + $$ = new Value(-$2); + @$ = @1; + } + | '-' FLOAT { + $$ = new Value(-$2); + @$ = @1; + } + ; + +nonnegative_value: NUMBER { - $$ = new Value((int)$1); + $$ = new Value($1); @$ = @1; } - |FLOAT { - $$ = new Value((float)$1); + | FLOAT { + $$ = new Value($1); @$ = @1; } - |SSS { + | SSS { char *tmp = common::substr($1,1,strlen($1)-2); $$ = new Value(tmp); free(tmp); free($1); } - |NULL_T { + | NULL_T { $$ = new Value(NullValue()); } ; @@ -759,7 +769,7 @@ expression: | '-' expression %prec UMINUS { $$ = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, $2, nullptr, sql_string, &@$); } - | value { + | nonnegative_value { $$ = new ValueExpr(*$1); $$->set_name(token_name(sql_string, &@$)); delete $1; From 11c1cc544bb5e52748ada816e79bbd7a12048592 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 12 Oct 2024 15:48:27 +0800 Subject: [PATCH 209/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=20create=20v?= =?UTF-8?q?iew=20=E5=92=8C=20drop=20view=20=E7=9A=84=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=B9=B6=20format=20codes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/tuple.h | 5 +- .../sql/operator/order_by_logical_operator.h | 6 +- .../sql/operator/order_by_physical_operator.h | 8 +- src/observer/sql/parser/lex_sql.cpp | 5566 +++++++++++------ src/observer/sql/parser/lex_sql.h | 246 +- src/observer/sql/parser/lex_sql.l | 1 + src/observer/sql/parser/parse_defs.h | 25 + src/observer/sql/parser/yacc_sql.cpp | 5565 ++++++++++------ src/observer/sql/parser/yacc_sql.hpp | 234 +- src/observer/sql/parser/yacc_sql.y | 26 + 10 files changed, 7872 insertions(+), 3810 deletions(-) diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index bf0edc28..d9815e5d 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -468,10 +468,7 @@ class SplicedTuple : public Tuple void set_cells(const std::vector &cells) { cells_ = cells; } - int cell_num() const override - { - return cells_.size(); - } + int cell_num() const override { return cells_.size(); } RC cell_at(int index, Value &cell) const override { diff --git a/src/observer/sql/operator/order_by_logical_operator.h b/src/observer/sql/operator/order_by_logical_operator.h index 5cced75c..142fa540 100644 --- a/src/observer/sql/operator/order_by_logical_operator.h +++ b/src/observer/sql/operator/order_by_logical_operator.h @@ -23,7 +23,7 @@ See the Mulan PSL v2 for more details. */ class OrderByLogicalOperator : public LogicalOperator { public: - OrderByLogicalOperator(std::vector order_by, const std::vector exprs) + OrderByLogicalOperator(std::vector order_by, const std::vector exprs) : order_by_(std::move(order_by)), exprs_(std::move(exprs)) {} @@ -31,11 +31,11 @@ class OrderByLogicalOperator : public LogicalOperator std::vector &order_by() { return order_by_; } - std::vector &exprs() { return exprs_; } + std::vector &exprs() { return exprs_; } private: std::vector order_by_; /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr - std::vector exprs_; + std::vector exprs_; }; \ No newline at end of file diff --git a/src/observer/sql/operator/order_by_physical_operator.h b/src/observer/sql/operator/order_by_physical_operator.h index dee6b839..e9adadb2 100644 --- a/src/observer/sql/operator/order_by_physical_operator.h +++ b/src/observer/sql/operator/order_by_physical_operator.h @@ -18,7 +18,7 @@ See the Mulan PSL v2 for more details. */ class OrderByPhysicalOperator : public PhysicalOperator { public: - OrderByPhysicalOperator(std::vector order_by, std::vector exprs); + OrderByPhysicalOperator(std::vector order_by, std::vector exprs); virtual ~OrderByPhysicalOperator() = default; @@ -26,7 +26,7 @@ class OrderByPhysicalOperator : public PhysicalOperator std::vector &order_by() { return order_by_; } - std::vector &exprs() { return exprs_; } + std::vector &exprs() { return exprs_; } RC fetch_and_sort_tables(); RC open(Trx *trx) override; @@ -39,10 +39,10 @@ class OrderByPhysicalOperator : public PhysicalOperator std::vector order_by_; /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr - std::vector exprs_; + std::vector exprs_; std::vector> values_; std::vector>::iterator it_; - SplicedTuple tuple_; + SplicedTuple tuple_; }; \ No newline at end of file diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 828d2614..3b193bd4 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,23 +8,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -77,62 +75,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -156,12 +154,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -189,7 +187,7 @@ typedef void* yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_NEW_FILE yyrestart(yyin, yyscanner) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -207,7 +205,7 @@ typedef void* yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -222,88 +220,85 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - + +#define YY_LESS_LINENO(n) +#define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } while (0) +#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - - }; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -312,59 +307,55 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) +#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner); +static void yy_load_buffer_state(yyscan_t yyscanner); +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -372,318 +363,2478 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state(yyscan_t yyscanner); +static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); +static int yy_get_next_buffer(yyscan_t yyscanner); +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 78 -#define YY_END_OF_BUFFER 79 +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t)(yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; +#define YY_NUM_RULES 79 +#define YY_END_OF_BUFFER 80 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[227] = - { 0, - 0, 0, 0, 0, 79, 77, 1, 2, 77, 77, - 77, 57, 58, 73, 71, 59, 72, 6, 74, 3, - 5, 64, 60, 66, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 78, 63, 0, 75, 0, 76, - 0, 3, 61, 62, 65, 70, 70, 70, 49, 70, - 48, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 51, 68, 70, 70, 70, - 70, 70, 15, 23, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 4, 22, 50, 70, 70, - - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 33, - 70, 70, 70, 67, 70, 70, 70, 70, 29, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 19, - 34, 70, 70, 42, 36, 70, 9, 11, 70, 7, - 70, 70, 70, 20, 70, 70, 8, 70, 70, 70, - 70, 25, 56, 69, 41, 39, 70, 70, 70, 16, - 70, 17, 70, 37, 70, 70, 70, 70, 30, 70, - 70, 70, 70, 70, 35, 70, 45, 70, 14, 70, - 55, 70, 70, 47, 70, 70, 70, 12, 70, 70, - - 70, 21, 31, 10, 27, 52, 70, 54, 46, 43, - 24, 70, 70, 18, 70, 13, 38, 28, 26, 44, - 70, 70, 53, 40, 32, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, - 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, - - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[71] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 - } ; - -static const flex_int16_t yy_base[232] = - { 0, - 0, 0, 0, 0, 615, 616, 616, 616, 596, 608, - 606, 616, 616, 616, 616, 616, 616, 616, 616, 58, - 616, 56, 616, 593, 57, 61, 62, 63, 64, 83, - 65, 73, 91, 76, 595, 117, 119, 115, 103, 142, - 134, 129, 66, 112, 616, 616, 604, 616, 602, 616, - 592, 79, 616, 616, 616, 0, 591, 145, 160, 141, - 590, 158, 176, 155, 182, 161, 183, 168, 188, 184, - 190, 186, 195, 189, 194, 242, 589, 196, 204, 216, - 220, 230, 588, 243, 233, 237, 239, 248, 255, 222, - 257, 256, 263, 264, 259, 587, 586, 585, 283, 274, - - 282, 288, 298, 308, 300, 312, 290, 301, 302, 315, - 316, 321, 289, 328, 327, 323, 342, 348, 352, 334, - 354, 356, 360, 584, 362, 366, 369, 371, 583, 349, - 370, 377, 374, 388, 382, 395, 389, 386, 397, 582, - 581, 396, 393, 580, 572, 399, 571, 569, 407, 567, - 419, 413, 420, 566, 422, 421, 565, 405, 428, 430, - 432, 564, 561, 560, 557, 448, 436, 455, 460, 556, - 464, 555, 447, 553, 446, 462, 466, 472, 552, 474, - 476, 483, 473, 477, 550, 489, 548, 326, 546, 491, - 541, 499, 488, 531, 503, 504, 506, 502, 505, 510, - - 509, 530, 445, 427, 262, 226, 515, 224, 223, 218, - 202, 521, 529, 157, 535, 146, 132, 127, 126, 123, - 538, 527, 120, 89, 88, 616, 588, 590, 592, 99, - 82 - } ; - -static const flex_int16_t yy_def[232] = - { 0, - 226, 1, 227, 227, 226, 226, 226, 226, 226, 228, - 229, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 226, 226, 228, 226, 229, 226, - 226, 226, 226, 226, 226, 231, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 226, 230, 230, 230, 230, - - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 0, 226, 226, 226, 226, - 226 - } ; - -static const flex_int16_t yy_nxt[687] = - { 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, - 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, - 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, - 51, 56, 52, 53, 54, 56, 56, 56, 56, 56, - 56, 62, 66, 56, 60, 94, 67, 56, 63, 58, - 56, 51, 74, 52, 59, 64, 75, 56, 65, 68, - - 57, 73, 56, 56, 61, 56, 69, 62, 66, 78, - 60, 94, 67, 70, 63, 58, 71, 56, 74, 72, - 59, 64, 75, 76, 65, 68, 56, 73, 77, 56, - 61, 56, 69, 56, 56, 78, 85, 56, 95, 70, - 56, 56, 71, 56, 79, 72, 56, 83, 56, 76, - 80, 84, 81, 90, 77, 56, 56, 91, 82, 56, - 56, 92, 85, 93, 95, 86, 99, 97, 87, 56, - 79, 56, 56, 83, 56, 56, 80, 84, 81, 90, - 88, 98, 56, 91, 82, 89, 102, 92, 100, 93, - 56, 86, 99, 97, 87, 101, 56, 56, 56, 104, - - 56, 107, 56, 56, 56, 103, 88, 98, 56, 56, - 56, 89, 102, 105, 100, 108, 56, 110, 56, 112, - 106, 101, 109, 121, 115, 104, 111, 107, 113, 114, - 56, 103, 56, 122, 56, 123, 56, 56, 56, 105, - 56, 108, 133, 110, 56, 112, 106, 56, 109, 121, - 115, 56, 111, 56, 113, 114, 56, 56, 124, 122, - 125, 123, 56, 127, 116, 126, 117, 128, 133, 56, - 56, 56, 130, 56, 118, 129, 56, 56, 56, 119, - 120, 131, 138, 135, 124, 136, 125, 132, 56, 127, - 116, 126, 117, 128, 137, 140, 56, 56, 130, 134, - - 118, 129, 56, 56, 56, 119, 120, 131, 138, 135, - 139, 136, 56, 132, 56, 56, 56, 143, 141, 142, - 137, 140, 56, 146, 148, 134, 56, 144, 155, 56, - 56, 145, 151, 147, 152, 56, 139, 56, 149, 150, - 56, 56, 56, 143, 141, 142, 158, 153, 56, 146, - 148, 209, 154, 144, 155, 156, 56, 145, 151, 147, - 152, 157, 56, 56, 149, 150, 56, 162, 56, 159, - 56, 160, 158, 153, 56, 161, 56, 209, 154, 164, - 56, 156, 165, 56, 56, 56, 163, 157, 56, 167, - 170, 56, 166, 162, 169, 159, 56, 160, 172, 168, - - 56, 161, 56, 56, 173, 164, 171, 56, 165, 56, - 56, 56, 163, 56, 176, 167, 170, 175, 166, 56, - 169, 56, 178, 180, 172, 168, 174, 56, 177, 179, - 173, 181, 171, 56, 56, 56, 56, 182, 184, 186, - 176, 56, 56, 175, 56, 183, 56, 189, 178, 180, - 56, 185, 174, 188, 177, 179, 187, 181, 190, 56, - 56, 56, 56, 182, 184, 186, 191, 193, 192, 56, - 198, 183, 194, 189, 56, 195, 56, 185, 56, 188, - 56, 196, 187, 197, 190, 199, 56, 56, 56, 201, - 56, 56, 191, 193, 192, 202, 198, 56, 194, 204, - - 200, 195, 56, 56, 207, 56, 205, 196, 212, 197, - 206, 199, 203, 56, 210, 201, 56, 56, 56, 56, - 56, 202, 213, 56, 56, 204, 200, 208, 217, 56, - 207, 215, 205, 218, 212, 56, 206, 211, 203, 216, - 210, 56, 214, 56, 56, 56, 219, 220, 213, 56, - 222, 221, 56, 208, 217, 56, 225, 215, 223, 218, - 56, 224, 56, 211, 56, 216, 56, 56, 214, 56, - 56, 56, 219, 220, 56, 56, 222, 221, 56, 56, - 56, 56, 225, 56, 223, 56, 56, 224, 45, 45, - 47, 47, 49, 49, 56, 56, 56, 56, 56, 56, - - 56, 96, 56, 56, 56, 56, 96, 50, 48, 56, - 55, 50, 48, 46, 226, 5, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226 - } ; - -static const flex_int16_t yy_chk[687] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, - 43, 27, 28, 231, 26, 43, 28, 32, 27, 25, - 34, 52, 32, 52, 25, 27, 32, 30, 27, 28, - - 230, 31, 225, 224, 26, 33, 29, 27, 28, 34, - 26, 43, 28, 30, 27, 25, 30, 39, 32, 30, - 25, 27, 32, 33, 27, 28, 44, 31, 33, 38, - 26, 36, 29, 37, 223, 34, 39, 220, 44, 30, - 219, 218, 30, 42, 36, 30, 217, 38, 41, 33, - 36, 38, 37, 41, 33, 60, 40, 41, 37, 58, - 216, 42, 39, 42, 44, 40, 60, 58, 40, 64, - 36, 214, 62, 38, 59, 66, 36, 38, 37, 41, - 40, 59, 68, 41, 37, 40, 64, 42, 62, 42, - 63, 40, 60, 58, 40, 63, 65, 67, 70, 66, - - 72, 68, 69, 74, 71, 65, 40, 59, 75, 73, - 78, 40, 64, 67, 62, 69, 211, 70, 79, 72, - 67, 63, 69, 78, 75, 66, 71, 68, 73, 74, - 80, 65, 210, 79, 81, 80, 90, 209, 208, 67, - 206, 69, 90, 70, 82, 72, 67, 85, 69, 78, - 75, 86, 71, 87, 73, 74, 76, 84, 81, 79, - 82, 80, 88, 85, 76, 84, 76, 86, 90, 89, - 92, 91, 87, 95, 76, 86, 205, 93, 94, 76, - 76, 88, 95, 92, 81, 93, 82, 89, 100, 85, - 76, 84, 76, 86, 94, 100, 101, 99, 87, 91, - - 76, 86, 102, 113, 107, 76, 76, 88, 95, 92, - 99, 93, 103, 89, 105, 108, 109, 103, 101, 102, - 94, 100, 104, 105, 107, 91, 106, 104, 113, 110, - 111, 104, 109, 106, 110, 112, 99, 116, 108, 108, - 188, 115, 114, 103, 101, 102, 116, 111, 120, 105, - 107, 188, 112, 104, 113, 114, 117, 104, 109, 106, - 110, 115, 118, 130, 108, 108, 119, 120, 121, 117, - 122, 118, 116, 111, 123, 119, 125, 188, 112, 122, - 126, 114, 123, 127, 131, 128, 121, 115, 133, 126, - 130, 132, 125, 120, 128, 117, 135, 118, 132, 127, - - 138, 119, 134, 137, 133, 122, 131, 143, 123, 136, - 142, 139, 121, 146, 136, 126, 130, 135, 125, 158, - 128, 149, 138, 142, 132, 127, 134, 152, 137, 139, - 133, 143, 131, 151, 153, 156, 155, 146, 151, 153, - 136, 204, 159, 135, 160, 149, 161, 158, 138, 142, - 167, 152, 134, 156, 137, 139, 155, 143, 159, 203, - 175, 173, 166, 146, 151, 153, 160, 166, 161, 168, - 173, 149, 167, 158, 169, 168, 176, 152, 171, 156, - 177, 169, 155, 171, 159, 175, 178, 183, 180, 177, - 181, 184, 160, 166, 161, 178, 173, 182, 167, 181, - - 176, 168, 193, 186, 184, 190, 182, 169, 193, 171, - 183, 175, 180, 192, 190, 177, 198, 195, 196, 199, - 197, 178, 195, 201, 200, 181, 176, 186, 199, 207, - 184, 197, 182, 200, 193, 212, 183, 192, 180, 198, - 190, 222, 196, 213, 202, 194, 201, 207, 195, 215, - 213, 212, 221, 186, 199, 191, 222, 197, 215, 200, - 189, 221, 187, 192, 185, 198, 179, 174, 196, 172, - 170, 165, 201, 207, 164, 163, 213, 212, 162, 157, - 154, 150, 222, 148, 215, 147, 145, 221, 227, 227, - 228, 228, 229, 229, 144, 141, 140, 129, 124, 98, - - 97, 96, 83, 77, 61, 57, 51, 49, 47, 35, - 24, 11, 10, 9, 5, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226 - } ; +{ + flex_int32_t yy_verify; + flex_int32_t yy_nxt; +}; +static const flex_int16_t yy_accept[230] = {0, + 0, + 0, + 0, + 0, + 80, + 78, + 1, + 2, + 78, + 78, + 78, + 58, + 59, + 74, + 72, + 60, + 73, + 6, + 75, + 3, + 5, + 65, + 61, + 67, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 79, + 64, + 0, + 76, + 0, + 77, + 0, + 3, + 62, + 63, + 66, + 71, + 71, + 71, + 49, + 71, + 48, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 51, + 69, + 71, + 71, + 71, + 71, + 71, + 15, + 23, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 4, + 22, + 50, + 71, + + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 33, + 71, + 71, + 71, + 68, + 71, + 71, + 71, + 71, + 29, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 19, + 34, + 71, + 71, + 42, + 36, + 71, + 9, + 11, + 71, + 7, + 71, + 71, + 71, + 20, + 71, + 71, + 8, + 71, + 71, + 71, + 71, + 25, + 56, + 70, + 41, + 39, + 71, + 71, + 71, + 16, + 71, + 17, + 71, + 37, + 71, + 71, + 71, + 57, + 71, + 30, + 71, + 71, + 71, + 71, + 71, + 35, + 71, + 45, + 71, + 14, + 71, + 55, + 71, + 71, + 47, + 71, + 71, + 71, + + 12, + 71, + 71, + 71, + 21, + 31, + 10, + 27, + 52, + 71, + 54, + 46, + 43, + 24, + 71, + 71, + 18, + 71, + 13, + 38, + 28, + 26, + 44, + 71, + 71, + 53, + 40, + 32, + 0}; + +static const YY_CHAR yy_ec[256] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 3, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 4, + 5, + 1, + 1, + 1, + 1, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 1, + 16, + 17, + 18, + 19, + 1, + 1, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 1, + 1, + 1, + 1, + 45, + 1, + 46, + 47, + 48, + 49, + + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 45, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1}; + +static const YY_CHAR yy_meta[71] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2}; + +static const flex_int16_t yy_base[235] = {0, + 0, + 0, + 0, + 0, + 624, + 625, + 625, + 625, + 605, + 617, + 615, + 625, + 625, + 625, + 625, + 625, + 625, + 625, + 625, + 58, + 625, + 56, + 625, + 602, + 57, + 61, + 62, + 63, + 64, + 83, + 65, + 73, + 91, + 76, + 604, + 117, + 119, + 115, + 103, + 142, + 134, + 129, + 145, + 141, + 625, + 625, + 613, + 625, + 611, + 625, + 601, + 71, + 625, + 625, + 625, + 0, + 600, + 89, + 79, + 146, + 599, + 152, + 155, + 161, + 172, + 167, + 182, + 174, + 188, + 187, + 189, + 190, + 195, + 196, + 199, + 249, + 598, + 200, + 203, + 216, + 202, + 212, + 597, + 230, + 220, + 229, + 223, + 246, + 225, + 250, + 233, + 263, + 258, + 270, + 275, + 280, + 596, + 595, + 594, + 277, + + 274, + 278, + 288, + 296, + 304, + 294, + 311, + 297, + 314, + 306, + 319, + 308, + 323, + 295, + 321, + 332, + 333, + 328, + 336, + 347, + 330, + 354, + 353, + 357, + 593, + 358, + 361, + 369, + 377, + 592, + 376, + 359, + 373, + 379, + 384, + 383, + 387, + 389, + 390, + 393, + 401, + 591, + 583, + 397, + 399, + 581, + 580, + 402, + 578, + 577, + 409, + 576, + 420, + 413, + 422, + 575, + 424, + 428, + 572, + 432, + 431, + 394, + 435, + 570, + 569, + 568, + 567, + 450, + 439, + 448, + 458, + 566, + 462, + 565, + 466, + 564, + 464, + 468, + 469, + 563, + 476, + 561, + 471, + 479, + 490, + 474, + 494, + 560, + 482, + 559, + 498, + 557, + 496, + 551, + 484, + 510, + 546, + 512, + 500, + 502, + + 503, + 519, + 520, + 522, + 544, + 538, + 477, + 456, + 438, + 530, + 405, + 355, + 260, + 255, + 537, + 540, + 251, + 527, + 210, + 185, + 132, + 127, + 126, + 549, + 541, + 124, + 120, + 88, + 625, + 599, + 601, + 603, + 90, + 79}; + +static const flex_int16_t yy_def[235] = {0, + 229, + 1, + 230, + 230, + 229, + 229, + 229, + 229, + 229, + 231, + 232, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 229, + 229, + 231, + 229, + 232, + 229, + 229, + 229, + 229, + 229, + 229, + 234, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 229, + 233, + 233, + 233, + + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 0, + 229, + 229, + 229, + 229, + 229}; + +static const flex_int16_t yy_nxt[696] = {0, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 35, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 51, + 56, + 52, + 53, + 54, + 56, + 56, + 56, + 56, + 56, + 56, + 62, + 66, + 51, + 60, + 52, + 67, + 56, + 63, + 58, + 56, + 57, + 74, + 56, + 59, + 64, + 75, + 56, + 65, + 68, + + 99, + 73, + 56, + 56, + 61, + 56, + 69, + 62, + 66, + 78, + 60, + 98, + 67, + 70, + 63, + 58, + 71, + 56, + 74, + 72, + 59, + 64, + 75, + 76, + 65, + 68, + 99, + 73, + 77, + 56, + 61, + 56, + 69, + 56, + 56, + 78, + 85, + 98, + 56, + 70, + 56, + 56, + 71, + 56, + 79, + 72, + 56, + 83, + 56, + 76, + 80, + 84, + 81, + 90, + 77, + 56, + 56, + 91, + 82, + 56, + 56, + 92, + 85, + 93, + 94, + 86, + 56, + 96, + 87, + 56, + 79, + 100, + 95, + 83, + 102, + 56, + 80, + 84, + 81, + 90, + 88, + 56, + 101, + 91, + 82, + 89, + 56, + 92, + 56, + 93, + 94, + 86, + 103, + 96, + 87, + 104, + 56, + 100, + 95, + 56, + + 102, + 56, + 56, + 56, + 56, + 105, + 88, + 108, + 101, + 56, + 56, + 89, + 106, + 56, + 56, + 109, + 56, + 56, + 103, + 107, + 111, + 104, + 110, + 113, + 56, + 112, + 56, + 122, + 114, + 116, + 56, + 105, + 123, + 108, + 56, + 124, + 115, + 56, + 106, + 56, + 125, + 109, + 126, + 56, + 56, + 107, + 111, + 56, + 110, + 113, + 128, + 112, + 127, + 122, + 114, + 116, + 131, + 133, + 123, + 129, + 56, + 124, + 115, + 56, + 56, + 56, + 125, + 130, + 126, + 56, + 134, + 117, + 56, + 118, + 56, + 135, + 128, + 56, + 127, + 132, + 137, + 119, + 131, + 133, + 56, + 129, + 120, + 121, + 56, + 56, + 136, + 56, + 56, + 130, + 56, + 142, + 134, + 117, + 139, + 118, + + 138, + 135, + 56, + 140, + 141, + 132, + 137, + 119, + 56, + 56, + 56, + 56, + 120, + 121, + 143, + 145, + 136, + 148, + 56, + 144, + 56, + 142, + 56, + 146, + 139, + 56, + 138, + 147, + 56, + 140, + 141, + 150, + 149, + 56, + 157, + 56, + 153, + 56, + 154, + 155, + 143, + 145, + 56, + 148, + 56, + 144, + 56, + 56, + 158, + 146, + 56, + 151, + 152, + 147, + 156, + 161, + 160, + 150, + 149, + 162, + 157, + 56, + 153, + 164, + 154, + 155, + 159, + 56, + 56, + 56, + 163, + 56, + 56, + 56, + 158, + 56, + 166, + 151, + 152, + 167, + 156, + 161, + 160, + 56, + 169, + 162, + 165, + 56, + 168, + 164, + 56, + 56, + 159, + 56, + 174, + 173, + 163, + 56, + 56, + 170, + + 171, + 56, + 166, + 56, + 56, + 167, + 178, + 56, + 56, + 175, + 169, + 56, + 165, + 56, + 168, + 56, + 56, + 172, + 177, + 56, + 174, + 173, + 176, + 56, + 183, + 170, + 171, + 56, + 179, + 181, + 194, + 180, + 178, + 182, + 56, + 175, + 56, + 184, + 56, + 187, + 185, + 189, + 56, + 172, + 177, + 56, + 56, + 186, + 176, + 56, + 183, + 188, + 56, + 56, + 179, + 181, + 194, + 180, + 190, + 182, + 191, + 193, + 56, + 184, + 56, + 187, + 185, + 189, + 198, + 196, + 56, + 195, + 56, + 186, + 192, + 197, + 56, + 188, + 56, + 199, + 56, + 200, + 56, + 56, + 190, + 56, + 191, + 193, + 56, + 201, + 56, + 56, + 204, + 56, + 198, + 196, + 56, + 195, + 56, + 205, + + 192, + 197, + 207, + 202, + 56, + 199, + 203, + 200, + 56, + 206, + 56, + 209, + 56, + 208, + 56, + 201, + 56, + 56, + 204, + 213, + 211, + 210, + 214, + 212, + 56, + 205, + 56, + 218, + 207, + 202, + 215, + 216, + 203, + 56, + 56, + 206, + 56, + 209, + 217, + 208, + 219, + 56, + 220, + 221, + 56, + 213, + 211, + 210, + 214, + 212, + 226, + 56, + 56, + 218, + 56, + 56, + 215, + 216, + 56, + 222, + 56, + 225, + 223, + 56, + 217, + 56, + 219, + 224, + 220, + 221, + 228, + 56, + 227, + 56, + 56, + 56, + 226, + 56, + 56, + 56, + 56, + 56, + 56, + 56, + 56, + 222, + 56, + 225, + 223, + 56, + 56, + 56, + 56, + 224, + 56, + 56, + 228, + 56, + 227, + 45, + + 45, + 47, + 47, + 49, + 49, + 56, + 56, + 56, + 56, + 56, + 97, + 56, + 56, + 56, + 56, + 97, + 50, + 48, + 56, + 55, + 50, + 48, + 46, + 229, + 5, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229 + +}; + +static const flex_int16_t yy_chk[696] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 20, + 25, + 20, + 22, + 22, + 26, + 27, + 28, + 29, + 31, + 234, + 27, + 28, + 52, + 26, + 52, + 28, + 32, + 27, + 25, + 34, + 233, + 32, + 59, + 25, + 27, + 32, + 30, + 27, + 28, + + 59, + 31, + 228, + 58, + 26, + 33, + 29, + 27, + 28, + 34, + 26, + 58, + 28, + 30, + 27, + 25, + 30, + 39, + 32, + 30, + 25, + 27, + 32, + 33, + 27, + 28, + 59, + 31, + 33, + 38, + 26, + 36, + 29, + 37, + 227, + 34, + 39, + 58, + 226, + 30, + 223, + 222, + 30, + 42, + 36, + 30, + 221, + 38, + 41, + 33, + 36, + 38, + 37, + 41, + 33, + 44, + 40, + 41, + 37, + 43, + 60, + 42, + 39, + 42, + 43, + 40, + 62, + 44, + 40, + 63, + 36, + 60, + 43, + 38, + 63, + 64, + 36, + 38, + 37, + 41, + 40, + 66, + 62, + 41, + 37, + 40, + 65, + 42, + 68, + 42, + 43, + 40, + 64, + 44, + 40, + 65, + 67, + 60, + 43, + 220, + + 63, + 70, + 69, + 71, + 72, + 66, + 40, + 68, + 62, + 73, + 74, + 40, + 67, + 75, + 78, + 69, + 81, + 79, + 64, + 67, + 70, + 65, + 69, + 72, + 219, + 71, + 82, + 78, + 73, + 75, + 80, + 66, + 79, + 68, + 85, + 80, + 74, + 87, + 67, + 89, + 81, + 69, + 82, + 86, + 84, + 67, + 70, + 91, + 69, + 72, + 85, + 71, + 84, + 78, + 73, + 75, + 87, + 89, + 79, + 86, + 88, + 80, + 74, + 76, + 90, + 217, + 81, + 86, + 82, + 214, + 90, + 76, + 93, + 76, + 213, + 91, + 85, + 92, + 84, + 88, + 93, + 76, + 87, + 89, + 94, + 86, + 76, + 76, + 101, + 95, + 92, + 100, + 102, + 86, + 96, + 101, + 90, + 76, + 95, + 76, + + 94, + 91, + 103, + 96, + 100, + 88, + 93, + 76, + 106, + 114, + 104, + 108, + 76, + 76, + 102, + 104, + 92, + 106, + 105, + 103, + 110, + 101, + 112, + 105, + 95, + 107, + 94, + 105, + 109, + 96, + 100, + 108, + 107, + 111, + 114, + 115, + 110, + 113, + 111, + 112, + 102, + 104, + 118, + 106, + 121, + 103, + 116, + 117, + 115, + 105, + 119, + 109, + 109, + 105, + 113, + 118, + 117, + 108, + 107, + 119, + 114, + 120, + 110, + 121, + 111, + 112, + 116, + 123, + 122, + 212, + 120, + 124, + 126, + 132, + 115, + 127, + 123, + 109, + 109, + 124, + 113, + 118, + 117, + 128, + 127, + 119, + 122, + 133, + 126, + 121, + 131, + 129, + 116, + 134, + 133, + 132, + 120, + 136, + 135, + 128, + + 129, + 137, + 123, + 138, + 139, + 124, + 137, + 140, + 162, + 134, + 127, + 144, + 122, + 145, + 126, + 141, + 148, + 131, + 136, + 211, + 133, + 132, + 135, + 151, + 144, + 128, + 129, + 154, + 138, + 140, + 162, + 139, + 137, + 141, + 153, + 134, + 155, + 145, + 157, + 153, + 148, + 155, + 158, + 131, + 136, + 161, + 160, + 151, + 135, + 163, + 144, + 154, + 209, + 169, + 138, + 140, + 162, + 139, + 157, + 141, + 158, + 161, + 170, + 145, + 168, + 153, + 148, + 155, + 170, + 168, + 208, + 163, + 171, + 151, + 160, + 169, + 173, + 154, + 177, + 171, + 175, + 173, + 178, + 179, + 157, + 183, + 158, + 161, + 186, + 175, + 181, + 207, + 179, + 184, + 170, + 168, + 189, + 163, + 195, + 181, + + 160, + 169, + 184, + 177, + 185, + 171, + 178, + 173, + 187, + 183, + 193, + 186, + 191, + 185, + 199, + 175, + 200, + 201, + 179, + 193, + 189, + 187, + 195, + 191, + 196, + 181, + 198, + 200, + 184, + 177, + 196, + 198, + 178, + 202, + 203, + 183, + 204, + 186, + 199, + 185, + 201, + 218, + 202, + 203, + 210, + 193, + 189, + 187, + 195, + 191, + 218, + 215, + 206, + 200, + 216, + 225, + 196, + 198, + 205, + 204, + 197, + 216, + 210, + 224, + 199, + 194, + 201, + 215, + 202, + 203, + 225, + 192, + 224, + 190, + 188, + 182, + 218, + 180, + 176, + 174, + 172, + 167, + 166, + 165, + 164, + 204, + 159, + 216, + 210, + 156, + 152, + 150, + 149, + 215, + 147, + 146, + 225, + 143, + 224, + 230, + + 230, + 231, + 231, + 232, + 232, + 142, + 130, + 125, + 99, + 98, + 97, + 83, + 77, + 61, + 57, + 51, + 49, + 47, + 35, + 24, + 11, + 10, + 9, + 5, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229 + +}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -695,8 +2846,8 @@ static const flex_int16_t yy_chk[687] = #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -710,14 +2861,16 @@ static const flex_int16_t yy_chk[687] = #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 720 "lex_sql.cpp" +#define RETURN_TOKEN(token) \ + LOG_DEBUG("%s", #token); \ + return token +#line 724 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -726,7 +2879,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 729 "lex_sql.cpp" +#line 733 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -745,124 +2898,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t - { +{ + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char *yy_last_accepting_cpos; - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; + int yylineno_r; + int yy_flex_debug_r; - int yylineno_r; - int yy_flex_debug_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + YYSTYPE *yylval_r; - YYSTYPE * yylval_r; + YYLTYPE *yylloc_r; - YYLTYPE * yylloc_r; +}; /* end struct yyguts_t */ - }; /* end struct yyguts_t */ +static int yy_init_globals(yyscan_t yyscanner); -static int yy_init_globals ( yyscan_t yyscanner ); +/* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ +#define yylval yyg->yylval_r - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); +#define yylloc yyg->yylloc_r -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); + +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); + +int yyget_debug(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); +static int yyinput(yyscan_t yyscanner); #else -static int input ( yyscan_t yyscanner ); +static int input(yyscan_t yyscanner); #endif #endif @@ -882,42 +3035,38 @@ static int input ( yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO \ + do { \ + if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ + } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ +#define YY_INPUT(buf, result, max_size) \ + if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ + int c = '*'; \ + yy_size_t n; \ + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ + buf[n] = (char)c; \ + if (c == '\n') \ + buf[n++] = (char)c; \ + if (c == EOF && ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + result = n; \ + } else { \ + errno = 0; \ + while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ + if (errno != EINTR) { \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + break; \ + } \ + errno = 0; \ + clearerr(yyin); \ + } \ + } #endif @@ -936,7 +3085,7 @@ static int input ( yyscan_t yyscanner ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -947,11 +3096,9 @@ static int input ( yyscan_t yyscanner ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -963,629 +3110,546 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK /*LINTED*/ break; #endif -#define YY_RULE_SETUP \ - YY_USER_ACTION +#define YY_RULE_SETUP YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; + if (!yyg->yy_init) { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ + if (!yyg->yy_start) + yyg->yy_start = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if (!yyin) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if (!yyout) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_load_buffer_state( yyscanner ); - } + yy_load_buffer_state(yyscanner); + } - { + { #line 75 "lex_sql.l" +#line 1019 "lex_sql.cpp" -#line 1015 "lex_sql.cpp" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 227 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 616 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP + while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_match: + do { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 230) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } while (yy_base[yy_current_state] != 625); + + yy_find_action: + yy_act = yy_accept[yy_current_state]; + if (yy_act == 0) { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + do_action: /* This label is used only to access EOF actions. */ + + switch (yy_act) { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + + case 1: YY_RULE_SETUP #line 77 "lex_sql.l" -// ignore whitespace - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP + // ignore whitespace + YY_BREAK + case 2: + /* rule 2 can match eol */ + YY_RULE_SETUP #line 78 "lex_sql.l" -; - YY_BREAK -case 3: -YY_RULE_SETUP + ; + YY_BREAK + case 3: YY_RULE_SETUP #line 80 "lex_sql.l" -yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); - YY_BREAK -case 4: -YY_RULE_SETUP + yylval->number = atoi(yytext); + RETURN_TOKEN(NUMBER); + YY_BREAK + case 4: YY_RULE_SETUP #line 81 "lex_sql.l" -yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); - YY_BREAK -case 5: -YY_RULE_SETUP + yylval->floats = (float)(atof(yytext)); + RETURN_TOKEN(FLOAT); + YY_BREAK + case 5: YY_RULE_SETUP #line 83 "lex_sql.l" -RETURN_TOKEN(SEMICOLON); - YY_BREAK -case 6: -YY_RULE_SETUP + RETURN_TOKEN(SEMICOLON); + YY_BREAK + case 6: YY_RULE_SETUP #line 84 "lex_sql.l" -RETURN_TOKEN(DOT); - YY_BREAK -case 7: -YY_RULE_SETUP + RETURN_TOKEN(DOT); + YY_BREAK + case 7: YY_RULE_SETUP #line 85 "lex_sql.l" -RETURN_TOKEN(EXIT); - YY_BREAK -case 8: -YY_RULE_SETUP + RETURN_TOKEN(EXIT); + YY_BREAK + case 8: YY_RULE_SETUP #line 86 "lex_sql.l" -RETURN_TOKEN(HELP); - YY_BREAK -case 9: -YY_RULE_SETUP + RETURN_TOKEN(HELP); + YY_BREAK + case 9: YY_RULE_SETUP #line 87 "lex_sql.l" -RETURN_TOKEN(DESC); - YY_BREAK -case 10: -YY_RULE_SETUP + RETURN_TOKEN(DESC); + YY_BREAK + case 10: YY_RULE_SETUP #line 88 "lex_sql.l" -RETURN_TOKEN(CREATE); - YY_BREAK -case 11: -YY_RULE_SETUP + RETURN_TOKEN(CREATE); + YY_BREAK + case 11: YY_RULE_SETUP #line 89 "lex_sql.l" -RETURN_TOKEN(DROP); - YY_BREAK -case 12: -YY_RULE_SETUP + RETURN_TOKEN(DROP); + YY_BREAK + case 12: YY_RULE_SETUP #line 90 "lex_sql.l" -RETURN_TOKEN(TABLE); - YY_BREAK -case 13: -YY_RULE_SETUP + RETURN_TOKEN(TABLE); + YY_BREAK + case 13: YY_RULE_SETUP #line 91 "lex_sql.l" -RETURN_TOKEN(TABLES); - YY_BREAK -case 14: -YY_RULE_SETUP + RETURN_TOKEN(TABLES); + YY_BREAK + case 14: YY_RULE_SETUP #line 92 "lex_sql.l" -RETURN_TOKEN(INDEX); - YY_BREAK -case 15: -YY_RULE_SETUP + RETURN_TOKEN(INDEX); + YY_BREAK + case 15: YY_RULE_SETUP #line 93 "lex_sql.l" -RETURN_TOKEN(ON); - YY_BREAK -case 16: -YY_RULE_SETUP + RETURN_TOKEN(ON); + YY_BREAK + case 16: YY_RULE_SETUP #line 94 "lex_sql.l" -RETURN_TOKEN(SHOW); - YY_BREAK -case 17: -YY_RULE_SETUP + RETURN_TOKEN(SHOW); + YY_BREAK + case 17: YY_RULE_SETUP #line 95 "lex_sql.l" -RETURN_TOKEN(SYNC); - YY_BREAK -case 18: -YY_RULE_SETUP + RETURN_TOKEN(SYNC); + YY_BREAK + case 18: YY_RULE_SETUP #line 96 "lex_sql.l" -RETURN_TOKEN(SELECT); - YY_BREAK -case 19: -YY_RULE_SETUP + RETURN_TOKEN(SELECT); + YY_BREAK + case 19: YY_RULE_SETUP #line 97 "lex_sql.l" -RETURN_TOKEN(CALC); - YY_BREAK -case 20: -YY_RULE_SETUP + RETURN_TOKEN(CALC); + YY_BREAK + case 20: YY_RULE_SETUP #line 98 "lex_sql.l" -RETURN_TOKEN(FROM); - YY_BREAK -case 21: -YY_RULE_SETUP + RETURN_TOKEN(FROM); + YY_BREAK + case 21: YY_RULE_SETUP #line 99 "lex_sql.l" -RETURN_TOKEN(WHERE); - YY_BREAK -case 22: -YY_RULE_SETUP + RETURN_TOKEN(WHERE); + YY_BREAK + case 22: YY_RULE_SETUP #line 100 "lex_sql.l" -RETURN_TOKEN(AND); - YY_BREAK -case 23: -YY_RULE_SETUP + RETURN_TOKEN(AND); + YY_BREAK + case 23: YY_RULE_SETUP #line 101 "lex_sql.l" -RETURN_TOKEN(OR); - YY_BREAK -case 24: -YY_RULE_SETUP + RETURN_TOKEN(OR); + YY_BREAK + case 24: YY_RULE_SETUP #line 102 "lex_sql.l" -RETURN_TOKEN(INSERT); - YY_BREAK -case 25: -YY_RULE_SETUP + RETURN_TOKEN(INSERT); + YY_BREAK + case 25: YY_RULE_SETUP #line 103 "lex_sql.l" -RETURN_TOKEN(INTO); - YY_BREAK -case 26: -YY_RULE_SETUP + RETURN_TOKEN(INTO); + YY_BREAK + case 26: YY_RULE_SETUP #line 104 "lex_sql.l" -RETURN_TOKEN(VALUES); - YY_BREAK -case 27: -YY_RULE_SETUP + RETURN_TOKEN(VALUES); + YY_BREAK + case 27: YY_RULE_SETUP #line 105 "lex_sql.l" -RETURN_TOKEN(DELETE); - YY_BREAK -case 28: -YY_RULE_SETUP + RETURN_TOKEN(DELETE); + YY_BREAK + case 28: YY_RULE_SETUP #line 106 "lex_sql.l" -RETURN_TOKEN(UPDATE); - YY_BREAK -case 29: -YY_RULE_SETUP + RETURN_TOKEN(UPDATE); + YY_BREAK + case 29: YY_RULE_SETUP #line 107 "lex_sql.l" -RETURN_TOKEN(SET); - YY_BREAK -case 30: -YY_RULE_SETUP + RETURN_TOKEN(SET); + YY_BREAK + case 30: YY_RULE_SETUP #line 108 "lex_sql.l" -RETURN_TOKEN(TRX_BEGIN); - YY_BREAK -case 31: -YY_RULE_SETUP + RETURN_TOKEN(TRX_BEGIN); + YY_BREAK + case 31: YY_RULE_SETUP #line 109 "lex_sql.l" -RETURN_TOKEN(TRX_COMMIT); - YY_BREAK -case 32: -YY_RULE_SETUP + RETURN_TOKEN(TRX_COMMIT); + YY_BREAK + case 32: YY_RULE_SETUP #line 110 "lex_sql.l" -RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK -case 33: -YY_RULE_SETUP + RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK + case 33: YY_RULE_SETUP #line 111 "lex_sql.l" -RETURN_TOKEN(INT_T); - YY_BREAK -case 34: -YY_RULE_SETUP + RETURN_TOKEN(INT_T); + YY_BREAK + case 34: YY_RULE_SETUP #line 112 "lex_sql.l" -RETURN_TOKEN(STRING_T); - YY_BREAK -case 35: -YY_RULE_SETUP + RETURN_TOKEN(STRING_T); + YY_BREAK + case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(FLOAT_T); - YY_BREAK -case 36: -YY_RULE_SETUP + RETURN_TOKEN(FLOAT_T); + YY_BREAK + case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK -case 37: -YY_RULE_SETUP + RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK + case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token - YY_BREAK -case 38: -YY_RULE_SETUP + RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + YY_BREAK + case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(UNIQUE); - YY_BREAK -case 39: -YY_RULE_SETUP + RETURN_TOKEN(UNIQUE); + YY_BREAK + case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(NULL_T); - YY_BREAK -case 40: -YY_RULE_SETUP + RETURN_TOKEN(NULL_T); + YY_BREAK + case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(NULLABLE); - YY_BREAK -case 41: -YY_RULE_SETUP + RETURN_TOKEN(NULLABLE); + YY_BREAK + case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(LOAD); - YY_BREAK -case 42: -YY_RULE_SETUP + RETURN_TOKEN(LOAD); + YY_BREAK + case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(DATA); - YY_BREAK -case 43: -YY_RULE_SETUP + RETURN_TOKEN(DATA); + YY_BREAK + case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(INFILE); - YY_BREAK -case 44: -YY_RULE_SETUP + RETURN_TOKEN(INFILE); + YY_BREAK + case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); - YY_BREAK -case 45: -YY_RULE_SETUP + RETURN_TOKEN(EXPLAIN); + YY_BREAK + case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(GROUP); - YY_BREAK -case 46: -YY_RULE_SETUP + RETURN_TOKEN(GROUP); + YY_BREAK + case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(HAVING); - YY_BREAK -case 47: -YY_RULE_SETUP + RETURN_TOKEN(HAVING); + YY_BREAK + case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(ORDER); - YY_BREAK -case 48: -YY_RULE_SETUP + RETURN_TOKEN(ORDER); + YY_BREAK + case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(BY); - YY_BREAK -case 49: -YY_RULE_SETUP + RETURN_TOKEN(BY); + YY_BREAK + case 49: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(AS); - YY_BREAK -case 50: -YY_RULE_SETUP + RETURN_TOKEN(AS); + YY_BREAK + case 50: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(ASC); - YY_BREAK -case 51: -YY_RULE_SETUP + RETURN_TOKEN(ASC); + YY_BREAK + case 51: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(IN); - YY_BREAK -case 52: -YY_RULE_SETUP + RETURN_TOKEN(IN); + YY_BREAK + case 52: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(EXISTS); - YY_BREAK -case 53: -YY_RULE_SETUP + RETURN_TOKEN(EXISTS); + YY_BREAK + case 53: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(STORAGE); - YY_BREAK -case 54: -YY_RULE_SETUP + RETURN_TOKEN(STORAGE); + YY_BREAK + case 54: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(FORMAT); - YY_BREAK -case 55: -YY_RULE_SETUP + RETURN_TOKEN(FORMAT); + YY_BREAK + case 55: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(INNER); - YY_BREAK -case 56: -YY_RULE_SETUP + RETURN_TOKEN(INNER); + YY_BREAK + case 56: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(JOIN); - YY_BREAK -case 57: -YY_RULE_SETUP + RETURN_TOKEN(JOIN); + YY_BREAK + case 57: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(LBRACE); - YY_BREAK -case 58: -YY_RULE_SETUP + RETURN_TOKEN(VIEW); + YY_BREAK + case 58: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(RBRACE); - YY_BREAK -case 59: -YY_RULE_SETUP -#line 138 "lex_sql.l" -RETURN_TOKEN(COMMA); - YY_BREAK -case 60: -YY_RULE_SETUP + RETURN_TOKEN(LBRACE); + YY_BREAK + case 59: YY_RULE_SETUP +#line 137 "lex_sql.l" + RETURN_TOKEN(RBRACE); + YY_BREAK + case 60: YY_RULE_SETUP #line 139 "lex_sql.l" -RETURN_TOKEN(EQ); - YY_BREAK -case 61: -YY_RULE_SETUP + RETURN_TOKEN(COMMA); + YY_BREAK + case 61: YY_RULE_SETUP #line 140 "lex_sql.l" -RETURN_TOKEN(LE); - YY_BREAK -case 62: -YY_RULE_SETUP + RETURN_TOKEN(EQ); + YY_BREAK + case 62: YY_RULE_SETUP #line 141 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 63: -YY_RULE_SETUP + RETURN_TOKEN(LE); + YY_BREAK + case 63: YY_RULE_SETUP #line 142 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 64: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 64: YY_RULE_SETUP #line 143 "lex_sql.l" -RETURN_TOKEN(LT); - YY_BREAK -case 65: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 65: YY_RULE_SETUP #line 144 "lex_sql.l" -RETURN_TOKEN(GE); - YY_BREAK -case 66: -YY_RULE_SETUP + RETURN_TOKEN(LT); + YY_BREAK + case 66: YY_RULE_SETUP #line 145 "lex_sql.l" -RETURN_TOKEN(GT); - YY_BREAK -case 67: -YY_RULE_SETUP + RETURN_TOKEN(GE); + YY_BREAK + case 67: YY_RULE_SETUP #line 146 "lex_sql.l" -RETURN_TOKEN(NOT); - YY_BREAK -case 68: -YY_RULE_SETUP + RETURN_TOKEN(GT); + YY_BREAK + case 68: YY_RULE_SETUP #line 147 "lex_sql.l" -RETURN_TOKEN(IS); - YY_BREAK -case 69: -YY_RULE_SETUP + RETURN_TOKEN(NOT); + YY_BREAK + case 69: YY_RULE_SETUP #line 148 "lex_sql.l" -RETURN_TOKEN(LIKE); - YY_BREAK -case 70: -YY_RULE_SETUP -#line 150 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); - YY_BREAK -case 71: -#line 153 "lex_sql.l" -case 72: + RETURN_TOKEN(IS); + YY_BREAK + case 70: YY_RULE_SETUP +#line 149 "lex_sql.l" + RETURN_TOKEN(LIKE); + YY_BREAK + case 71: YY_RULE_SETUP +#line 151 "lex_sql.l" + yylval->string = strdup(yytext); + RETURN_TOKEN(ID); + YY_BREAK + case 72: #line 154 "lex_sql.l" -case 73: -#line 155 "lex_sql.l" -case 74: -YY_RULE_SETUP + case 73: #line 155 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK -case 75: -/* rule 75 can match eol */ -YY_RULE_SETUP + case 74: #line 156 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 76: -/* rule 76 can match eol */ -YY_RULE_SETUP + case 75: YY_RULE_SETUP +#line 156 "lex_sql.l" + { + return yytext[0]; + } + YY_BREAK + case 76: + /* rule 76 can match eol */ + YY_RULE_SETUP #line 157 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 77: -YY_RULE_SETUP -#line 159 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; - YY_BREAK -case 78: -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 77: + /* rule 77 can match eol */ + YY_RULE_SETUP +#line 158 "lex_sql.l" + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 78: YY_RULE_SETUP #line 160 "lex_sql.l" -ECHO; - YY_BREAK -#line 1456 "lex_sql.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STR): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap( yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + LOG_DEBUG("Unknown character [%c]",yytext[0]); + return yytext[0]; + YY_BREAK + case 79: YY_RULE_SETUP +#line 161 "lex_sql.l" + ECHO; + YY_BREAK +#line 1465 "lex_sql.cpp" + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(STR): yyterminate(); + + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if (yy_next_state) { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_END_OF_FILE: { + yyg->yy_did_buffer_switch_on_eof = 0; + + if (yywrap(yyscanner)) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else { + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1595,171 +3659,149 @@ case YY_STATE_EOF(STR): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (yyscan_t yyscanner) +static int yy_get_next_buffer(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) + YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); + + if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ + if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for (i = 0; i < number_to_move; ++i) + *(dest++) = *(source++); + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else { + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); + + if (b->yy_is_our_buffer) { + yy_size_t new_size = b->yy_buf_size * 2; + + if (new_size <= 0) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); + } else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if (!b->yy_ch_buf) + YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + } + + if (num_to_read > YY_READ_BUF_SIZE) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if (yyg->yy_n_chars == 0) { + if (number_to_move == YY_MORE_ADJ) { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin, yyscanner); + } + + else { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = + (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); + if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +static yy_state_type yy_get_previous_state(yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 227 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + yy_current_state = yyg->yy_start; + + for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 230) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -1767,29 +3809,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 227 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 226); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 230) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 229); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -1798,141 +3838,133 @@ static int yy_get_next_buffer (yyscan_t yyscanner) #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) +static int yyinput(yyscan_t yyscanner) #else - static int input (yyscan_t yyscanner) +static int input(yyscan_t yyscanner) #endif { - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin , yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + int c; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin, yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: { + if (yywrap(yyscanner)) + return 0; + + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; + } + } + } - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) +void yyrestart(FILE *input_file, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); + yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); + yy_load_buffer_state(yyscanner); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack(yyscanner); + if (YY_CURRENT_BUFFER == new_buffer) + return; + + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state(yyscanner); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state (yyscan_t yyscanner) +static void yy_load_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -1941,105 +3973,105 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); + if (!b->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer( b, file , yyscanner); + yy_init_buffer(b, file, yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! b ) - return; + if (!b) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); + if (b->yy_is_our_buffer) + yyfree((void *)b->yy_ch_buf, yyscanner); - yyfree( (void *) b , yyscanner ); + yyfree((void *)b, yyscanner); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + int oerrno = errno; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flush_buffer( b , yyscanner); + yy_flush_buffer(b, yyscanner); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!b) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); + if (b == YY_CURRENT_BUFFER) + yy_load_buffer_state(yyscanner); } /** Pushes the new state onto the stack. The new state becomes @@ -2048,99 +4080,95 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state (yyscan_t yyscanner) +void yypop_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (yyscan_t yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = + (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( + yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -2149,33 +4177,31 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b , yyscanner ); - - return b; + YY_BUFFER_STATE b; + + if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + + b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b, yyscanner); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -2186,10 +4212,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) { - - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + + return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2199,177 +4225,175 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n , yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t)(_yybytes_len + 2); + buf = (char *)yyalloc(n, yyscanner); + if (!buf) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + + for (i = 0; i < _yybytes_len; ++i) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf, n, yyscanner); + if (!b) + YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + fprintf(stderr, "%s\n", msg); + exit(YY_EXIT_FAILURE); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } while (0) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno (yyscan_t yyscanner) +int yyget_lineno(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (!YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column (yyscan_t yyscanner) +int yyget_column(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; + if (!YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in (yyscan_t yyscanner) +FILE *yyget_in(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out (yyscan_t yyscanner) +FILE *yyget_out(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text (yyscan_t yyscanner) +char *yyget_text(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyextra = user_defined; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) +void yyset_lineno(int _line_number, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_lineno called with no buffer"); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int _column_no , yyscan_t yyscanner) +void yyset_column(int _column_no, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_column called with no buffer"); - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); - - yycolumn = _column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -2378,80 +4402,80 @@ void yyset_column (int _column_no , yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) +void yyset_in(FILE *_in_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyin = _in_str; } -void yyset_out (FILE * _out_str , yyscan_t yyscanner) +void yyset_out(FILE *_out_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyout = _out_str; } -int yyget_debug (yyscan_t yyscanner) +int yyget_debug(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yy_flex_debug; } -void yyset_debug (int _bdebug , yyscan_t yyscanner) +void yyset_debug(int _bdebug, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_flex_debug = _bdebug; } /* Accessor methods for yylval and yylloc */ -YYSTYPE * yyget_lval (yyscan_t yyscanner) +YYSTYPE *yyget_lval(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylval; } -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc (yyscan_t yyscanner) +YYLTYPE *yyget_lloc(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylloc; } - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t* ptr_yy_globals) +int yylex_init(yyscan_t *ptr_yy_globals) { - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -2461,94 +4485,94 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra (yy_user_defined, &dummy_yyguts); + yyset_extra(yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - yyset_extra (yy_user_defined, *ptr_yy_globals); + yyset_extra(yy_user_defined, *ptr_yy_globals); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } -static int yy_init_globals (yyscan_t yyscanner) +static int yy_init_globals(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) +int yylex_destroy(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while (YY_CURRENT_BUFFER) { + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack, yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree(yyg->yy_start_stack, yyscanner); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals(yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree(yyscanner, yyscanner); + yyscanner = NULL; + return 0; } /* @@ -2556,63 +4580,59 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + int i; + for (i = 0; i < n; ++i) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +static int yy_flex_strlen(const char *s, yyscan_t yyscanner) { - int n; - for ( n = 0; s[n]; ++n ) - ; + int n; + for (n = 0; s[n]; ++n) + ; - return n; + return n; } #endif -void *yyalloc (yy_size_t size , yyscan_t yyscanner) +void *yyalloc(yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree (void * ptr , yyscan_t yyscanner) +void yyfree(void *ptr, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + free((char *)ptr); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 160 "lex_sql.l" - - -void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); -} +#line 161 "lex_sql.l" +void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 5ec521aa..356e5455 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,23 +12,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -81,62 +79,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -157,7 +155,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -197,73 +195,72 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -286,69 +283,69 @@ void yyfree ( void * , yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -376,11 +373,9 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -542,8 +537,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 160 "lex_sql.l" - +#line 161 "lex_sql.l" #line 548 "lex_sql.h" #undef yyIN_HEADER diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 2efb6bb7..ade1ae23 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -132,6 +132,7 @@ STORAGE RETURN_TOKEN(STORAGE); FORMAT RETURN_TOKEN(FORMAT); INNER RETURN_TOKEN(INNER); JOIN RETURN_TOKEN(JOIN); +VIEW RETURN_TOKEN(VIEW); "(" RETURN_TOKEN(LBRACE); ")" RETURN_TOKEN(RBRACE); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index bca7ef87..413058b2 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -212,6 +212,27 @@ struct CreateTableSqlNode std::unique_ptr create_table_select; ///< create table select }; +/** + * @brief 描述一个create view语句 + * @ingroup SQLParser + * @details 这里也做了很多简化。 + */ +struct CreateViewSqlNode +{ + std::string relation_name; ///< Relation name + std::unique_ptr create_view_select; ///< create table select +}; + +/** + * @brief 描述一个drop view语句 + * @ingroup SQLParser + * @details 这里也做了很多简化。 + */ +struct DropViewSqlNode +{ + std::string relation_name; ///< Relation name +}; + /** * @brief 描述一个drop table语句 * @ingroup SQLParser @@ -332,6 +353,8 @@ enum SqlCommandFlag SCF_SYNC, SCF_SHOW_TABLES, SCF_DESC_TABLE, + SCF_CREATE_VIEW, + SCF_DROP_VIEW, SCF_BEGIN, ///< 事务开始语句,可以在这里扩展只读事务 SCF_COMMIT, SCF_CLOG_SYNC, @@ -362,6 +385,8 @@ class ParsedSqlNode DropIndexSqlNode drop_index; ShowIndexSqlNode show_index; DescTableSqlNode desc_table; + CreateViewSqlNode create_view; + DropViewSqlNode drop_view; LoadDataSqlNode load_data; ExplainSqlNode explain; SetVariableSqlNode set_variable; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 86e3ccc1..bff4984f 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,13 +63,9 @@ /* Pull parsers. */ #define YYPULL 1 - - - /* First part of user prologue. */ #line 2 "yacc_sql.y" - #include #include #include @@ -92,232 +88,224 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, - Expression *left, - Expression *right, - const char *sql_string, - YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression( + ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression(const char *function_name, - std::vector> child, - const char *sql_string, - YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression( + const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } -ParsedSqlNode *create_table_sql_node(char *table_name, - AttrInfoSqlNode* attr_def, - std::vector *attrinfos, - char* storage_format, - ParsedSqlNode *create_table_select) +ParsedSqlNode *create_table_sql_node(char *table_name, AttrInfoSqlNode *attr_def, + std::vector *attrinfos, char *storage_format, ParsedSqlNode *create_table_select) { - ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = parsed_sql_node->create_table; - create_table.relation_name = table_name; + ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = parsed_sql_node->create_table; + create_table.relation_name = table_name; - if (attrinfos) { - create_table.attr_infos.swap(*attrinfos); - delete attrinfos; - } - if (attr_def) { - create_table.attr_infos.emplace_back(*attr_def); - std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); - delete attr_def; - } - if (storage_format != nullptr) { - create_table.storage_format = storage_format; - free(storage_format); - } + if (attrinfos) { + create_table.attr_infos.swap(*attrinfos); + delete attrinfos; + } + if (attr_def) { + create_table.attr_infos.emplace_back(*attr_def); + std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); + delete attr_def; + } + if (storage_format != nullptr) { + create_table.storage_format = storage_format; + free(storage_format); + } - if (create_table_select) { - create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); - } + if (create_table_select) { + create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); + } - return parsed_sql_node; + return parsed_sql_node; } #line 155 "yacc_sql.cpp" -# ifndef YY_CAST -# ifdef __cplusplus -# define YY_CAST(Type, Val) static_cast (Val) -# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -# else -# define YY_CAST(Type, Val) ((Type) (Val)) -# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -# endif -# endif -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif +#ifndef YY_CAST +#ifdef __cplusplus +#define YY_CAST(Type, Val) static_cast(Val) +#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) +#else +#define YY_CAST(Type, Val) ((Type)(Val)) +#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) +#endif +#endif +#ifndef YY_NULLPTR +#if defined __cplusplus +#if 201103L <= __cplusplus +#define YY_NULLPTR nullptr +#else +#define YY_NULLPTR 0 +#endif +#else +#define YY_NULLPTR ((void *)0) +#endif +#endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_HAVING = 11, /* HAVING */ - YYSYMBOL_ORDER = 12, /* ORDER */ - YYSYMBOL_TABLE = 13, /* TABLE */ - YYSYMBOL_TABLES = 14, /* TABLES */ - YYSYMBOL_INDEX = 15, /* INDEX */ - YYSYMBOL_CALC = 16, /* CALC */ - YYSYMBOL_SELECT = 17, /* SELECT */ - YYSYMBOL_DESC = 18, /* DESC */ - YYSYMBOL_SHOW = 19, /* SHOW */ - YYSYMBOL_SYNC = 20, /* SYNC */ - YYSYMBOL_INSERT = 21, /* INSERT */ - YYSYMBOL_DELETE = 22, /* DELETE */ - YYSYMBOL_UPDATE = 23, /* UPDATE */ - YYSYMBOL_LBRACE = 24, /* LBRACE */ - YYSYMBOL_RBRACE = 25, /* RBRACE */ - YYSYMBOL_COMMA = 26, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 30, /* INT_T */ - YYSYMBOL_IN = 31, /* IN */ - YYSYMBOL_STRING_T = 32, /* STRING_T */ - YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ - YYSYMBOL_DATE_T = 34, /* DATE_T */ - YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_NOT = 36, /* NOT */ - YYSYMBOL_UNIQUE = 37, /* UNIQUE */ - YYSYMBOL_NULL_T = 38, /* NULL_T */ - YYSYMBOL_NULLABLE = 39, /* NULLABLE */ - YYSYMBOL_HELP = 40, /* HELP */ - YYSYMBOL_EXIT = 41, /* EXIT */ - YYSYMBOL_DOT = 42, /* DOT */ - YYSYMBOL_INTO = 43, /* INTO */ - YYSYMBOL_VALUES = 44, /* VALUES */ - YYSYMBOL_FROM = 45, /* FROM */ - YYSYMBOL_WHERE = 46, /* WHERE */ - YYSYMBOL_AND = 47, /* AND */ - YYSYMBOL_OR = 48, /* OR */ - YYSYMBOL_SET = 49, /* SET */ - YYSYMBOL_ON = 50, /* ON */ - YYSYMBOL_LOAD = 51, /* LOAD */ - YYSYMBOL_DATA = 52, /* DATA */ - YYSYMBOL_INFILE = 53, /* INFILE */ - YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ - YYSYMBOL_STORAGE = 55, /* STORAGE */ - YYSYMBOL_FORMAT = 56, /* FORMAT */ - YYSYMBOL_INNER = 57, /* INNER */ - YYSYMBOL_JOIN = 58, /* JOIN */ - YYSYMBOL_EQ = 59, /* EQ */ - YYSYMBOL_LT = 60, /* LT */ - YYSYMBOL_GT = 61, /* GT */ - YYSYMBOL_LE = 62, /* LE */ - YYSYMBOL_GE = 63, /* GE */ - YYSYMBOL_NE = 64, /* NE */ - YYSYMBOL_LIKE = 65, /* LIKE */ - YYSYMBOL_IS = 66, /* IS */ - YYSYMBOL_NUMBER = 67, /* NUMBER */ - YYSYMBOL_FLOAT = 68, /* FLOAT */ - YYSYMBOL_ID = 69, /* ID */ - YYSYMBOL_SSS = 70, /* SSS */ - YYSYMBOL_71_ = 71, /* '+' */ - YYSYMBOL_72_ = 72, /* '-' */ - YYSYMBOL_73_ = 73, /* '*' */ - YYSYMBOL_74_ = 74, /* '/' */ - YYSYMBOL_UMINUS = 75, /* UMINUS */ - YYSYMBOL_YYACCEPT = 76, /* $accept */ - YYSYMBOL_commands = 77, /* commands */ - YYSYMBOL_command_wrapper = 78, /* command_wrapper */ - YYSYMBOL_exit_stmt = 79, /* exit_stmt */ - YYSYMBOL_help_stmt = 80, /* help_stmt */ - YYSYMBOL_sync_stmt = 81, /* sync_stmt */ - YYSYMBOL_begin_stmt = 82, /* begin_stmt */ - YYSYMBOL_commit_stmt = 83, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 84, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 85, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 86, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 87, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 88, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 89, /* create_index_stmt */ - YYSYMBOL_opt_unique = 90, /* opt_unique */ - YYSYMBOL_attr_list = 91, /* attr_list */ - YYSYMBOL_drop_index_stmt = 92, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 93, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 94, /* attr_def_list */ - YYSYMBOL_attr_def = 95, /* attr_def */ - YYSYMBOL_nullable_constraint = 96, /* nullable_constraint */ - YYSYMBOL_type = 97, /* type */ - YYSYMBOL_insert_stmt = 98, /* insert_stmt */ - YYSYMBOL_values_list = 99, /* values_list */ - YYSYMBOL_value_list = 100, /* value_list */ - YYSYMBOL_value = 101, /* value */ - YYSYMBOL_nonnegative_value = 102, /* nonnegative_value */ - YYSYMBOL_storage_format = 103, /* storage_format */ - YYSYMBOL_delete_stmt = 104, /* delete_stmt */ - YYSYMBOL_update_stmt = 105, /* update_stmt */ - YYSYMBOL_setClauses = 106, /* setClauses */ - YYSYMBOL_setClause = 107, /* setClause */ - YYSYMBOL_select_stmt = 108, /* select_stmt */ - YYSYMBOL_calc_stmt = 109, /* calc_stmt */ - YYSYMBOL_expression_list = 110, /* expression_list */ - YYSYMBOL_expression = 111, /* expression */ - YYSYMBOL_alias = 112, /* alias */ - YYSYMBOL_aggr_func_expr = 113, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 114, /* sub_query_expr */ - YYSYMBOL_rel_attr = 115, /* rel_attr */ - YYSYMBOL_relation = 116, /* relation */ - YYSYMBOL_rel_list = 117, /* rel_list */ - YYSYMBOL_joinClauses = 118, /* joinClauses */ - YYSYMBOL_where = 119, /* where */ - YYSYMBOL_condition = 120, /* condition */ - YYSYMBOL_comp_op = 121, /* comp_op */ - YYSYMBOL_opt_order_by = 122, /* opt_order_by */ - YYSYMBOL_sort_list = 123, /* sort_list */ - YYSYMBOL_sort_unit = 124, /* sort_unit */ - YYSYMBOL_group_by = 125, /* group_by */ - YYSYMBOL_opt_having = 126, /* opt_having */ - YYSYMBOL_load_data_stmt = 127, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 128, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 129, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 130 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_HAVING = 11, /* HAVING */ + YYSYMBOL_ORDER = 12, /* ORDER */ + YYSYMBOL_TABLE = 13, /* TABLE */ + YYSYMBOL_TABLES = 14, /* TABLES */ + YYSYMBOL_INDEX = 15, /* INDEX */ + YYSYMBOL_CALC = 16, /* CALC */ + YYSYMBOL_SELECT = 17, /* SELECT */ + YYSYMBOL_DESC = 18, /* DESC */ + YYSYMBOL_SHOW = 19, /* SHOW */ + YYSYMBOL_SYNC = 20, /* SYNC */ + YYSYMBOL_INSERT = 21, /* INSERT */ + YYSYMBOL_DELETE = 22, /* DELETE */ + YYSYMBOL_UPDATE = 23, /* UPDATE */ + YYSYMBOL_LBRACE = 24, /* LBRACE */ + YYSYMBOL_RBRACE = 25, /* RBRACE */ + YYSYMBOL_COMMA = 26, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 30, /* INT_T */ + YYSYMBOL_IN = 31, /* IN */ + YYSYMBOL_STRING_T = 32, /* STRING_T */ + YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ + YYSYMBOL_DATE_T = 34, /* DATE_T */ + YYSYMBOL_TEXT_T = 35, /* TEXT_T */ + YYSYMBOL_NOT = 36, /* NOT */ + YYSYMBOL_UNIQUE = 37, /* UNIQUE */ + YYSYMBOL_NULL_T = 38, /* NULL_T */ + YYSYMBOL_NULLABLE = 39, /* NULLABLE */ + YYSYMBOL_HELP = 40, /* HELP */ + YYSYMBOL_EXIT = 41, /* EXIT */ + YYSYMBOL_DOT = 42, /* DOT */ + YYSYMBOL_INTO = 43, /* INTO */ + YYSYMBOL_VALUES = 44, /* VALUES */ + YYSYMBOL_FROM = 45, /* FROM */ + YYSYMBOL_WHERE = 46, /* WHERE */ + YYSYMBOL_AND = 47, /* AND */ + YYSYMBOL_OR = 48, /* OR */ + YYSYMBOL_SET = 49, /* SET */ + YYSYMBOL_ON = 50, /* ON */ + YYSYMBOL_LOAD = 51, /* LOAD */ + YYSYMBOL_DATA = 52, /* DATA */ + YYSYMBOL_INFILE = 53, /* INFILE */ + YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ + YYSYMBOL_STORAGE = 55, /* STORAGE */ + YYSYMBOL_FORMAT = 56, /* FORMAT */ + YYSYMBOL_INNER = 57, /* INNER */ + YYSYMBOL_JOIN = 58, /* JOIN */ + YYSYMBOL_VIEW = 59, /* VIEW */ + YYSYMBOL_EQ = 60, /* EQ */ + YYSYMBOL_LT = 61, /* LT */ + YYSYMBOL_GT = 62, /* GT */ + YYSYMBOL_LE = 63, /* LE */ + YYSYMBOL_GE = 64, /* GE */ + YYSYMBOL_NE = 65, /* NE */ + YYSYMBOL_LIKE = 66, /* LIKE */ + YYSYMBOL_IS = 67, /* IS */ + YYSYMBOL_NUMBER = 68, /* NUMBER */ + YYSYMBOL_FLOAT = 69, /* FLOAT */ + YYSYMBOL_ID = 70, /* ID */ + YYSYMBOL_SSS = 71, /* SSS */ + YYSYMBOL_72_ = 72, /* '+' */ + YYSYMBOL_73_ = 73, /* '-' */ + YYSYMBOL_74_ = 74, /* '*' */ + YYSYMBOL_75_ = 75, /* '/' */ + YYSYMBOL_UMINUS = 76, /* UMINUS */ + YYSYMBOL_YYACCEPT = 77, /* $accept */ + YYSYMBOL_commands = 78, /* commands */ + YYSYMBOL_command_wrapper = 79, /* command_wrapper */ + YYSYMBOL_exit_stmt = 80, /* exit_stmt */ + YYSYMBOL_help_stmt = 81, /* help_stmt */ + YYSYMBOL_sync_stmt = 82, /* sync_stmt */ + YYSYMBOL_begin_stmt = 83, /* begin_stmt */ + YYSYMBOL_commit_stmt = 84, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 85, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 86, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 87, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 88, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 89, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 90, /* create_index_stmt */ + YYSYMBOL_opt_unique = 91, /* opt_unique */ + YYSYMBOL_attr_list = 92, /* attr_list */ + YYSYMBOL_drop_index_stmt = 93, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 94, /* create_table_stmt */ + YYSYMBOL_create_view_stmt = 95, /* create_view_stmt */ + YYSYMBOL_drop_view_stmt = 96, /* drop_view_stmt */ + YYSYMBOL_attr_def_list = 97, /* attr_def_list */ + YYSYMBOL_attr_def = 98, /* attr_def */ + YYSYMBOL_nullable_constraint = 99, /* nullable_constraint */ + YYSYMBOL_type = 100, /* type */ + YYSYMBOL_insert_stmt = 101, /* insert_stmt */ + YYSYMBOL_values_list = 102, /* values_list */ + YYSYMBOL_value_list = 103, /* value_list */ + YYSYMBOL_value = 104, /* value */ + YYSYMBOL_nonnegative_value = 105, /* nonnegative_value */ + YYSYMBOL_storage_format = 106, /* storage_format */ + YYSYMBOL_delete_stmt = 107, /* delete_stmt */ + YYSYMBOL_update_stmt = 108, /* update_stmt */ + YYSYMBOL_setClauses = 109, /* setClauses */ + YYSYMBOL_setClause = 110, /* setClause */ + YYSYMBOL_select_stmt = 111, /* select_stmt */ + YYSYMBOL_calc_stmt = 112, /* calc_stmt */ + YYSYMBOL_expression_list = 113, /* expression_list */ + YYSYMBOL_expression = 114, /* expression */ + YYSYMBOL_alias = 115, /* alias */ + YYSYMBOL_aggr_func_expr = 116, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 117, /* sub_query_expr */ + YYSYMBOL_rel_attr = 118, /* rel_attr */ + YYSYMBOL_relation = 119, /* relation */ + YYSYMBOL_rel_list = 120, /* rel_list */ + YYSYMBOL_joinClauses = 121, /* joinClauses */ + YYSYMBOL_where = 122, /* where */ + YYSYMBOL_condition = 123, /* condition */ + YYSYMBOL_comp_op = 124, /* comp_op */ + YYSYMBOL_opt_order_by = 125, /* opt_order_by */ + YYSYMBOL_sort_list = 126, /* sort_list */ + YYSYMBOL_sort_unit = 127, /* sort_unit */ + YYSYMBOL_group_by = 128, /* group_by */ + YYSYMBOL_opt_having = 129, /* opt_having */ + YYSYMBOL_load_data_stmt = 130, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 131, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 132, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 133 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; - - - #ifdef short -# undef short +#undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -325,11 +313,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -# include /* INFRINGES ON USER NAME SPACE */ -# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_STDINT_H -# endif +#include /* INFRINGES ON USER NAME SPACE */ +#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_STDINT_H +#endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -359,16 +347,15 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 +#undef UINT_LEAST8_MAX +#undef UINT_LEAST16_MAX +#define UINT_LEAST8_MAX 255 +#define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -378,8 +365,7 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -388,647 +374,2689 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -# define YYPTRDIFF_T __PTRDIFF_TYPE__ -# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -# elif defined PTRDIFF_MAX -# ifndef ptrdiff_t -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYPTRDIFF_T ptrdiff_t -# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -# else -# define YYPTRDIFF_T long -# define YYPTRDIFF_MAXIMUM LONG_MAX -# endif +#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +#define YYPTRDIFF_T __PTRDIFF_TYPE__ +#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +#elif defined PTRDIFF_MAX +#ifndef ptrdiff_t +#include /* INFRINGES ON USER NAME SPACE */ +#endif +#define YYPTRDIFF_T ptrdiff_t +#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +#else +#define YYPTRDIFF_T long +#define YYPTRDIFF_MAXIMUM LONG_MAX +#endif #endif #ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned -# endif +#ifdef __SIZE_TYPE__ +#define YYSIZE_T __SIZE_TYPE__ +#elif defined size_t +#define YYSIZE_T size_t +#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YYSIZE_T size_t +#else +#define YYSIZE_T unsigned +#endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST (YYPTRDIFF_T, \ - (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ - ? YYPTRDIFF_MAXIMUM \ - : YY_CAST (YYSIZE_T, -1))) - -#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) +#define YYSIZE_MAXIMUM \ + YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ -typedef yytype_uint8 yy_state_t; +typedef yytype_int16 yy_state_t; /* State numbers in computations. */ typedef int yy_state_fast_t; #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif +#if defined YYENABLE_NLS && YYENABLE_NLS +#if ENABLE_NLS +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_(Msgid) dgettext("bison-runtime", Msgid) +#endif +#endif +#ifndef YY_ +#define YY_(Msgid) Msgid +#endif #endif - #ifndef YY_ATTRIBUTE_PURE -# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define YY_ATTRIBUTE_PURE -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) +#else +#define YY_ATTRIBUTE_PURE +#endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -# else -# define YY_ATTRIBUTE_UNUSED -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#else +#define YY_ATTRIBUTE_UNUSED +#endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +#if !defined lint || defined __GNUC__ +#define YY_USE(E) ((void)(E)) #else -# define YY_USE(E) /* empty */ +#define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") +#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") +#else +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +#endif +#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") #else -# define YY_INITIAL_VALUE(Value) Value +#define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +#define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -# define YY_IGNORE_USELESS_CAST_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -# define YY_IGNORE_USELESS_CAST_END \ - _Pragma ("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ +#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") +#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_END +#define YY_IGNORE_USELESS_CAST_BEGIN +#define YY_IGNORE_USELESS_CAST_END #endif - -#define YY_ASSERT(E) ((void) (0 && (E))) +#define YY_ASSERT(E) ((void)(0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif +#ifdef YYSTACK_USE_ALLOCA +#if YYSTACK_USE_ALLOCA +#ifdef __GNUC__ +#define YYSTACK_ALLOC __builtin_alloca +#elif defined __BUILTIN_VA_ARG_INCR +#include /* INFRINGES ON USER NAME SPACE */ +#elif defined _AIX +#define YYSTACK_ALLOC __alloca +#elif defined _MSC_VER +#include /* INFRINGES ON USER NAME SPACE */ +#define alloca _alloca +#else +#define YYSTACK_ALLOC alloca +#if !defined _ALLOCA_H && !defined EXIT_SUCCESS +#include /* INFRINGES ON USER NAME SPACE */ +/* Use EXIT_SUCCESS as a witness for stdlib.h. */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#endif +#endif +#endif + +#ifdef YYSTACK_ALLOC +/* Pacify GCC's 'empty if-body' warning. */ +#define YYSTACK_FREE(Ptr) \ + do { /* empty */ \ + ; \ + } while (0) +#ifndef YYSTACK_ALLOC_MAXIMUM +/* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +#endif +#else +#define YYSTACK_ALLOC YYMALLOC +#define YYSTACK_FREE YYFREE +#ifndef YYSTACK_ALLOC_MAXIMUM +#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +#endif +#if (defined __cplusplus && !defined EXIT_SUCCESS && \ + !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) +#include /* INFRINGES ON USER NAME SPACE */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef YYMALLOC +#define YYMALLOC malloc +#if !defined malloc && !defined EXIT_SUCCESS +void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#ifndef YYFREE +#define YYFREE free +#if !defined free && !defined EXIT_SUCCESS +void free(void *); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#endif #endif /* 1 */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ + defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) +#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ - + YYSIZEOF (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) +#define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +#define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF (*yyptr); \ - } \ - while (0) +#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF(*yyptr); \ + } while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif +#ifndef YYCOPY +#if defined __GNUC__ && 1 < __GNUC__ +#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) +#else +#define YYCOPY(Dst, Src, Count) \ + do { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } while (0) +#endif +#endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 71 +#define YYFINAL 75 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 267 +#define YYLAST 276 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 76 +#define YYNTOKENS 77 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 55 +#define YYNNTS 57 /* YYNRULES -- Number of rules. */ -#define YYNRULES 143 +#define YYNRULES 147 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 251 +#define YYNSTATES 259 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 326 - +#define YYMAXUTOK 327 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 73, 71, 2, 72, 2, 74, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 75 -}; +static const yytype_int8 yytranslate[] = {0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 74, + 72, + 2, + 73, + 2, + 75, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 76}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = -{ - 0, 259, 259, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 291, 297, 302, 308, 314, 320, - 326, 333, 339, 347, 357, 372, 373, 377, 383, 392, - 402, 406, 410, 414, 418, 425, 428, 441, 453, 480, - 484, 488, 493, 499, 500, 501, 502, 503, 507, 520, - 526, 533, 539, 547, 550, 554, 561, 565, 569, 575, - 582, 585, 592, 604, 618, 623, 630, 640, 673, 706, - 712, 721, 724, 733, 749, 752, 755, 758, 761, 769, - 772, 777, 783, 786, 789, 792, 799, 802, 805, 810, - 817, 824, 829, 839, 845, 855, 872, 879, 891, 894, - 900, 904, 911, 915, 922, 923, 924, 925, 926, 927, - 928, 929, 930, 931, 932, 933, 934, 935, 940, 943, - 951, 956, 964, 970, 976, 986, 989, 997, 1000, 1007, - 1020, 1028, 1038, 1039 -}; +static const yytype_int16 yyrline[] = {0, + 262, + 262, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289, + 290, + 291, + 292, + 296, + 302, + 307, + 313, + 319, + 325, + 331, + 338, + 344, + 352, + 362, + 377, + 378, + 382, + 388, + 397, + 407, + 411, + 415, + 419, + 423, + 430, + 441, + 451, + 454, + 467, + 479, + 506, + 510, + 514, + 519, + 525, + 526, + 527, + 528, + 529, + 533, + 546, + 552, + 559, + 565, + 573, + 576, + 580, + 587, + 591, + 595, + 601, + 608, + 611, + 618, + 630, + 644, + 649, + 656, + 666, + 699, + 732, + 738, + 747, + 750, + 759, + 775, + 778, + 781, + 784, + 787, + 795, + 798, + 803, + 809, + 812, + 815, + 818, + 825, + 828, + 831, + 836, + 843, + 850, + 855, + 865, + 871, + 881, + 898, + 905, + 917, + 920, + 926, + 930, + 937, + 941, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 966, + 969, + 977, + 982, + 990, + 996, + 1002, + 1012, + 1015, + 1023, + 1026, + 1033, + 1046, + 1054, + 1064, + 1065}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", - "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "HAVING", "ORDER", - "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", - "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", - "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", - "DATE_T", "TEXT_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", - "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", - "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", - "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", - "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", - "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", - "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", - "show_tables_stmt", "desc_table_stmt", "show_index_stmt", - "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", - "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", - "type", "insert_stmt", "values_list", "value_list", "value", - "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", - "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", - "expression", "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", - "relation", "rel_list", "joinClauses", "where", "condition", "comp_op", - "opt_order_by", "sort_list", "sort_unit", "group_by", "opt_having", - "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR -}; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} +static const char *const yytname[] = {"\"end of file\"", + "error", + "\"invalid token\"", + "SEMICOLON", + "AS", + "ASC", + "BY", + "CREATE", + "DROP", + "EXISTS", + "GROUP", + "HAVING", + "ORDER", + "TABLE", + "TABLES", + "INDEX", + "CALC", + "SELECT", + "DESC", + "SHOW", + "SYNC", + "INSERT", + "DELETE", + "UPDATE", + "LBRACE", + "RBRACE", + "COMMA", + "TRX_BEGIN", + "TRX_COMMIT", + "TRX_ROLLBACK", + "INT_T", + "IN", + "STRING_T", + "FLOAT_T", + "DATE_T", + "TEXT_T", + "NOT", + "UNIQUE", + "NULL_T", + "NULLABLE", + "HELP", + "EXIT", + "DOT", + "INTO", + "VALUES", + "FROM", + "WHERE", + "AND", + "OR", + "SET", + "ON", + "LOAD", + "DATA", + "INFILE", + "EXPLAIN", + "STORAGE", + "FORMAT", + "INNER", + "JOIN", + "VIEW", + "EQ", + "LT", + "GT", + "LE", + "GE", + "NE", + "LIKE", + "IS", + "NUMBER", + "FLOAT", + "ID", + "SSS", + "'+'", + "'-'", + "'*'", + "'/'", + "UMINUS", + "$accept", + "commands", + "command_wrapper", + "exit_stmt", + "help_stmt", + "sync_stmt", + "begin_stmt", + "commit_stmt", + "rollback_stmt", + "drop_table_stmt", + "show_tables_stmt", + "desc_table_stmt", + "show_index_stmt", + "create_index_stmt", + "opt_unique", + "attr_list", + "drop_index_stmt", + "create_table_stmt", + "create_view_stmt", + "drop_view_stmt", + "attr_def_list", + "attr_def", + "nullable_constraint", + "type", + "insert_stmt", + "values_list", + "value_list", + "value", + "nonnegative_value", + "storage_format", + "delete_stmt", + "update_stmt", + "setClauses", + "setClause", + "select_stmt", + "calc_stmt", + "expression_list", + "expression", + "alias", + "aggr_func_expr", + "sub_query_expr", + "rel_attr", + "relation", + "rel_list", + "joinClauses", + "where", + "condition", + "comp_op", + "opt_order_by", + "sort_list", + "sort_unit", + "group_by", + "opt_having", + "load_data_stmt", + "explain_stmt", + "set_variable_stmt", + "opt_semicolon", + YY_NULLPTR}; + +static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif #define YYPACT_NINF (-175) -#define yypact_value_is_default(Yyn) \ - ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) \ - 0 +#define yytable_value_is_error(Yyn) 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 210, 5, 38, -10, -10, -13, 12, -175, 29, 19, - 6, -175, -175, -175, -175, -175, 24, 36, 210, 124, - 125, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, 70, -175, 126, 71, 73, 119, -175, -175, - -175, -2, -175, -10, -175, -175, -175, 7, -175, -175, - -175, 99, -175, -175, 100, 77, 78, 101, 89, 98, - -175, -175, -175, -175, -9, 80, -175, 103, -10, 130, - 131, -10, -28, -175, 90, -175, -10, -10, -10, -10, - 132, 91, 91, 117, 116, 94, -18, 95, 102, 108, - 13, 118, 106, 99, -175, -175, 141, -175, -175, -175, - 18, 18, -175, -175, -10, -175, 4, 116, -175, 146, - 143, -175, 113, -7, -175, 52, -175, -175, 133, 97, - 151, 121, 161, -175, 114, -175, -175, -175, 135, 156, - 180, -18, 168, -175, -175, 0, -175, -175, -175, -175, - -175, -175, -175, 159, 35, 55, -10, -10, 94, -175, - -175, -175, 184, -175, -175, -175, -175, -175, 87, 102, - 173, 145, -175, 175, 91, 91, 194, 208, 96, -175, - 196, -175, -175, -175, -175, -10, 143, 143, 41, 41, - -175, 152, 155, 185, -175, -175, -175, 151, 169, -175, - 165, 186, 116, 17, -175, -10, 143, 213, -175, -18, - -18, 41, -175, 188, -175, 215, -175, -175, 21, 216, - 218, 143, 180, -175, 55, 235, -175, -175, 112, 31, - 161, -175, 165, -175, -24, -175, -10, -175, -175, -175, - -175, 187, 11, -175, 220, 91, -175, -175, -10, -175, - -175 -}; +static const yytype_int16 yypact[] = {222, + 47, + 28, + 27, + 27, + -52, + 38, + -175, + -20, + -19, + -41, + -175, + -175, + -175, + -175, + -175, + -35, + 2, + 222, + 56, + 85, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + 23, + -175, + 37, + 44, + 40, + 45, + 79, + -7, + -175, + -175, + -175, + 6, + -175, + 27, + -175, + -175, + -175, + 0, + -175, + -175, + -175, + 54, + -175, + -175, + 78, + 89, + 90, + 113, + 101, + 111, + -175, + -175, + -175, + -175, + -13, + 161, + 96, + -175, + 117, + -175, + 27, + 143, + 144, + 27, + -25, + -175, + 100, + -175, + 27, + 27, + 27, + 27, + 145, + 102, + 102, + 130, + 129, + 106, + 53, + 108, + 114, + 124, + 15, + 164, + 132, + 116, + 54, + -175, + -175, + 158, + -175, + -175, + -175, + 30, + 30, + -175, + -175, + 27, + -175, + 11, + 129, + -175, + 163, + 154, + -175, + 133, + -2, + -175, + 17, + -175, + -175, + 148, + 95, + 168, + 135, + 164, + -175, + -175, + 126, + -175, + -175, + -175, + 139, + 172, + 189, + 53, + 175, + -175, + -175, + 3, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + 166, + 80, + 66, + 27, + 27, + 106, + -175, + -175, + -175, + 190, + -175, + -175, + -175, + -175, + -175, + -11, + 114, + 179, + 136, + -175, + 181, + 102, + 102, + 201, + 197, + 110, + -175, + 186, + -175, + -175, + -175, + -175, + 27, + 154, + 154, + 59, + 59, + -175, + 141, + 165, + 174, + -175, + -175, + -175, + 168, + 171, + -175, + 162, + 184, + 129, + 12, + -175, + 27, + 154, + 219, + -175, + 53, + 53, + 59, + -175, + 188, + -175, + 211, + -175, + -175, + 29, + 187, + 212, + 154, + 189, + -175, + 66, + 240, + -175, + -175, + 131, + 112, + 164, + -175, + 162, + -175, + 55, + -175, + 27, + -175, + -175, + -175, + -175, + 194, + 4, + -175, + 221, + 102, + -175, + -175, + 27, + -175, + -175}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 36, 0, 81, 81, 0, 0, 26, 0, 0, - 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 142, 23, 22, 15, 16, 17, 18, 9, 10, 11, - 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 35, 0, 0, 0, 81, 69, 66, - 67, 101, 68, 0, 92, 90, 79, 96, 94, 95, - 91, 80, 32, 31, 0, 0, 0, 0, 0, 0, - 140, 1, 143, 2, 70, 0, 30, 0, 81, 0, - 0, 81, 0, 89, 0, 97, 0, 0, 0, 0, - 82, 0, 0, 0, 108, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 100, 88, 0, 102, 93, 98, - 84, 85, 86, 87, 81, 103, 96, 108, 33, 0, - 0, 72, 0, 108, 74, 0, 141, 63, 0, 0, - 45, 0, 0, 44, 0, 39, 99, 83, 0, 104, - 135, 0, 58, 126, 124, 0, 114, 115, 116, 117, - 118, 119, 122, 120, 0, 109, 0, 0, 0, 73, - 64, 65, 0, 53, 54, 55, 56, 57, 52, 0, - 0, 0, 43, 0, 0, 0, 0, 137, 0, 61, - 0, 127, 125, 123, 121, 0, 0, 0, 111, 76, - 75, 0, 0, 0, 51, 50, 48, 45, 70, 71, - 0, 0, 108, 96, 105, 81, 0, 128, 59, 0, - 0, 110, 112, 113, 139, 0, 49, 46, 42, 37, - 0, 0, 135, 136, 138, 0, 77, 62, 0, 52, - 0, 41, 0, 34, 106, 78, 0, 60, 47, 40, - 38, 0, 132, 129, 130, 0, 134, 133, 0, 107, - 131 -}; +static const yytype_uint8 yydefact[] = {0, + 38, + 0, + 85, + 85, + 0, + 0, + 28, + 0, + 0, + 0, + 29, + 30, + 31, + 27, + 26, + 0, + 0, + 0, + 0, + 146, + 25, + 24, + 17, + 18, + 19, + 20, + 9, + 10, + 11, + 14, + 12, + 13, + 8, + 15, + 16, + 5, + 7, + 6, + 4, + 3, + 21, + 22, + 23, + 0, + 37, + 0, + 0, + 0, + 0, + 0, + 85, + 73, + 70, + 71, + 105, + 72, + 0, + 96, + 94, + 83, + 100, + 98, + 99, + 95, + 84, + 34, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 144, + 1, + 147, + 2, + 74, + 0, + 0, + 32, + 0, + 48, + 85, + 0, + 0, + 85, + 0, + 93, + 0, + 101, + 0, + 0, + 0, + 0, + 86, + 0, + 0, + 0, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 104, + 92, + 0, + 106, + 97, + 102, + 88, + 89, + 90, + 91, + 85, + 107, + 100, + 112, + 35, + 0, + 0, + 76, + 0, + 112, + 78, + 0, + 145, + 67, + 0, + 0, + 49, + 0, + 0, + 46, + 47, + 0, + 41, + 103, + 87, + 0, + 108, + 139, + 0, + 62, + 130, + 128, + 0, + 118, + 119, + 120, + 121, + 122, + 123, + 126, + 124, + 0, + 113, + 0, + 0, + 0, + 77, + 68, + 69, + 0, + 57, + 58, + 59, + 60, + 61, + 56, + 0, + 0, + 0, + 45, + 0, + 0, + 0, + 0, + 141, + 0, + 65, + 0, + 131, + 129, + 127, + 125, + 0, + 0, + 0, + 115, + 80, + 79, + 0, + 0, + 0, + 55, + 54, + 52, + 49, + 74, + 75, + 0, + 0, + 112, + 100, + 109, + 85, + 0, + 132, + 63, + 0, + 0, + 114, + 116, + 117, + 143, + 0, + 53, + 50, + 44, + 39, + 0, + 0, + 139, + 140, + 142, + 0, + 81, + 66, + 0, + 56, + 0, + 43, + 0, + 36, + 110, + 82, + 0, + 64, + 51, + 42, + 40, + 0, + 136, + 133, + 134, + 0, + 138, + 137, + 0, + 111, + 135}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -175, -175, 226, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, -175, 15, -175, -175, 51, 83, - 20, -175, -175, -175, 43, -91, -93, 56, -175, -175, - -175, 104, -45, -175, -4, -52, 198, -175, -175, -175, - -85, 81, 22, -113, -174, 109, -175, 9, -175, 44, - -175, -175, -175, -175, -175 -}; +static const yytype_int16 yypgoto[] = {-175, + -175, + 230, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + 13, + -175, + -175, + -175, + -175, + 49, + 81, + 18, + -175, + -175, + -175, + 39, + -97, + -99, + 50, + -175, + -175, + -175, + 93, + -49, + -175, + -4, + -56, + 199, + -175, + -175, + -175, + -91, + 82, + 8, + -116, + -174, + 104, + -175, + 14, + -175, + 34, + -175, + -175, + -175, + -175, + -175}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = -{ - 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 220, 32, 33, 170, 130, - 196, 168, 34, 142, 178, 179, 55, 100, 35, 36, - 123, 124, 37, 38, 56, 57, 139, 58, 59, 60, - 201, 117, 202, 121, 155, 156, 226, 243, 244, 177, - 207, 39, 40, 41, 73 -}; +static const yytype_uint8 yydefgoto[] = {0, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 47, + 228, + 32, + 33, + 34, + 35, + 178, + 137, + 204, + 176, + 36, + 150, + 186, + 187, + 59, + 106, + 37, + 38, + 130, + 131, + 39, + 40, + 60, + 61, + 147, + 62, + 63, + 64, + 209, + 124, + 210, + 128, + 163, + 164, + 234, + 251, + 252, + 185, + 215, + 41, + 42, + 43, + 77}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = -{ - 61, 83, 79, 127, 140, 126, 116, 118, 84, 181, - 159, 84, 212, 213, 47, 98, 246, 132, 42, 158, - 48, 84, 81, 186, 187, 230, 63, 64, 48, 247, - 78, 182, 224, 241, 110, 111, 112, 113, 78, 120, - 82, 107, 43, 80, 143, 108, 99, 234, 127, 49, - 50, 45, 52, 46, 125, 133, 62, 49, 50, 51, - 52, 138, 53, 54, 66, 183, 144, 193, 154, 194, - 195, 145, 65, 85, 103, 67, 85, 106, 86, 87, - 88, 89, 86, 87, 88, 89, 85, 172, 69, 222, - 203, 88, 89, 68, 146, 147, 148, 149, 150, 151, - 152, 153, 186, 187, 188, 189, 86, 87, 88, 89, - 137, 192, 86, 87, 88, 89, 127, 127, 227, 160, - 161, 208, 209, 193, 71, 194, 195, 163, 72, 164, - 165, 166, 167, 211, 154, 154, 78, 237, 209, 74, - 76, 75, 77, 47, 91, 92, 93, 94, 96, 101, - 95, 97, 143, 102, 154, 104, 105, 48, 114, 109, - 115, 119, 120, 122, 131, 128, 136, 47, 134, 154, - 141, 129, 157, 231, 144, 135, 162, 169, 78, 145, - 171, 48, 175, 173, 242, 239, 49, 50, 51, 52, - 176, 53, 54, 174, 180, 184, 242, 191, 198, 200, - 205, 223, 146, 147, 148, 149, 150, 151, 152, 153, - 49, 50, 51, 52, 199, 53, 54, 1, 2, 206, - 210, 214, 215, 216, 99, 225, 3, 4, 5, 6, - 7, 8, 9, 10, 219, 186, 221, 11, 12, 13, - 229, 236, 232, 233, 70, 245, 248, 240, 217, 238, - 14, 15, 197, 228, 218, 90, 204, 250, 0, 16, - 0, 17, 190, 185, 18, 0, 235, 249 -}; - -static const yytype_int16 yycheck[] = -{ - 4, 53, 47, 96, 117, 96, 91, 92, 4, 9, - 123, 4, 186, 187, 24, 24, 5, 4, 13, 26, - 38, 4, 24, 47, 48, 4, 14, 15, 38, 18, - 17, 31, 206, 57, 86, 87, 88, 89, 17, 46, - 42, 69, 37, 47, 9, 73, 55, 221, 141, 67, - 68, 13, 70, 15, 72, 100, 69, 67, 68, 69, - 70, 57, 72, 73, 45, 65, 31, 36, 120, 38, - 39, 36, 43, 69, 78, 69, 69, 81, 71, 72, - 73, 74, 71, 72, 73, 74, 69, 132, 52, 202, - 175, 73, 74, 69, 59, 60, 61, 62, 63, 64, - 65, 66, 47, 48, 156, 157, 71, 72, 73, 74, - 114, 24, 71, 72, 73, 74, 209, 210, 209, 67, - 68, 25, 26, 36, 0, 38, 39, 30, 3, 32, - 33, 34, 35, 185, 186, 187, 17, 25, 26, 69, - 69, 15, 69, 24, 45, 45, 69, 69, 59, 69, - 49, 53, 9, 50, 206, 25, 25, 38, 26, 69, - 69, 44, 46, 69, 56, 70, 25, 24, 50, 221, - 24, 69, 59, 218, 31, 69, 43, 26, 17, 36, - 59, 38, 26, 69, 236, 230, 67, 68, 69, 70, - 10, 72, 73, 58, 26, 36, 248, 13, 25, 24, - 6, 205, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 69, 72, 73, 7, 8, 11, - 24, 69, 67, 38, 55, 12, 16, 17, 18, 19, - 20, 21, 22, 23, 69, 47, 50, 27, 28, 29, - 25, 6, 26, 25, 18, 58, 26, 232, 197, 229, - 40, 41, 169, 210, 198, 57, 175, 248, -1, 49, - -1, 51, 158, 154, 54, -1, 222, 245 -}; +static const yytype_int16 yytable[] = {65, + 89, + 85, + 134, + 90, + 133, + 123, + 125, + 148, + 254, + 84, + 104, + 189, + 200, + 167, + 90, + 90, + 51, + 66, + 139, + 220, + 221, + 255, + 69, + 166, + 201, + 70, + 202, + 203, + 71, + 87, + 52, + 84, + 238, + 190, + 72, + 117, + 118, + 119, + 120, + 232, + 48, + 105, + 49, + 127, + 114, + 84, + 86, + 88, + 115, + 134, + 51, + 67, + 68, + 73, + 242, + 75, + 140, + 141, + 80, + 44, + 53, + 54, + 55, + 56, + 52, + 57, + 58, + 146, + 191, + 91, + 162, + 92, + 93, + 94, + 95, + 92, + 93, + 94, + 95, + 110, + 91, + 91, + 113, + 45, + 168, + 169, + 50, + 76, + 151, + 180, + 52, + 211, + 78, + 230, + 53, + 54, + 55, + 56, + 97, + 57, + 58, + 194, + 195, + 94, + 95, + 46, + 79, + 196, + 197, + 81, + 152, + 249, + 194, + 195, + 82, + 153, + 145, + 134, + 134, + 235, + 53, + 54, + 98, + 56, + 171, + 132, + 172, + 173, + 174, + 175, + 92, + 93, + 94, + 95, + 216, + 217, + 219, + 162, + 162, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 201, + 83, + 202, + 203, + 92, + 93, + 94, + 95, + 245, + 217, + 162, + 99, + 100, + 102, + 101, + 151, + 103, + 107, + 108, + 109, + 111, + 112, + 116, + 121, + 122, + 162, + 126, + 127, + 129, + 239, + 51, + 135, + 138, + 84, + 142, + 144, + 136, + 152, + 143, + 149, + 250, + 247, + 153, + 170, + 52, + 165, + 177, + 179, + 181, + 182, + 183, + 184, + 250, + 188, + 192, + 199, + 206, + 208, + 207, + 213, + 214, + 231, + 218, + 222, + 224, + 240, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 53, + 54, + 55, + 56, + 105, + 57, + 58, + 1, + 2, + 233, + 227, + 223, + 229, + 194, + 237, + 241, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 244, + 256, + 74, + 11, + 12, + 13, + 253, + 248, + 225, + 246, + 226, + 236, + 205, + 198, + 96, + 257, + 14, + 15, + 243, + 212, + 193, + 0, + 0, + 0, + 258, + 16, + 0, + 17, + 0, + 0, + 18}; + +static const yytype_int16 yycheck[] = {4, + 57, + 51, + 102, + 4, + 102, + 97, + 98, + 124, + 5, + 17, + 24, + 9, + 24, + 130, + 4, + 4, + 24, + 70, + 4, + 194, + 195, + 18, + 43, + 26, + 36, + 45, + 38, + 39, + 70, + 24, + 38, + 17, + 4, + 31, + 70, + 92, + 93, + 94, + 95, + 214, + 13, + 55, + 15, + 46, + 70, + 17, + 51, + 42, + 74, + 149, + 24, + 14, + 15, + 52, + 229, + 0, + 106, + 107, + 15, + 13, + 68, + 69, + 70, + 71, + 38, + 73, + 74, + 57, + 66, + 70, + 127, + 72, + 73, + 74, + 75, + 72, + 73, + 74, + 75, + 84, + 70, + 70, + 87, + 37, + 68, + 69, + 59, + 3, + 9, + 139, + 38, + 183, + 70, + 210, + 68, + 69, + 70, + 71, + 45, + 73, + 74, + 47, + 48, + 74, + 75, + 59, + 70, + 164, + 165, + 70, + 31, + 57, + 47, + 48, + 70, + 36, + 121, + 217, + 218, + 217, + 68, + 69, + 45, + 71, + 30, + 73, + 32, + 33, + 34, + 35, + 72, + 73, + 74, + 75, + 25, + 26, + 193, + 194, + 195, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 36, + 70, + 38, + 39, + 72, + 73, + 74, + 75, + 25, + 26, + 214, + 70, + 70, + 60, + 49, + 9, + 53, + 4, + 70, + 50, + 25, + 25, + 70, + 26, + 70, + 229, + 44, + 46, + 70, + 226, + 24, + 71, + 56, + 17, + 50, + 25, + 70, + 31, + 70, + 24, + 244, + 238, + 36, + 43, + 38, + 60, + 26, + 60, + 70, + 58, + 26, + 10, + 256, + 26, + 36, + 13, + 25, + 24, + 70, + 6, + 11, + 213, + 24, + 70, + 38, + 26, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 55, + 73, + 74, + 7, + 8, + 12, + 70, + 68, + 50, + 47, + 25, + 25, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 6, + 26, + 18, + 27, + 28, + 29, + 58, + 240, + 205, + 237, + 206, + 218, + 177, + 166, + 61, + 253, + 40, + 41, + 230, + 183, + 162, + -1, + -1, + -1, + 256, + 49, + -1, + 51, + -1, + -1, + 54}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, - 23, 27, 28, 29, 40, 41, 49, 51, 54, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 92, 93, 98, 104, 105, 108, 109, 127, - 128, 129, 13, 37, 90, 13, 15, 24, 38, 67, - 68, 69, 70, 72, 73, 102, 110, 111, 113, 114, - 115, 110, 69, 14, 15, 43, 45, 69, 69, 52, - 78, 0, 3, 130, 69, 15, 69, 69, 17, 108, - 110, 24, 42, 111, 4, 69, 71, 72, 73, 74, - 112, 45, 45, 69, 69, 49, 59, 53, 24, 55, - 103, 69, 50, 110, 25, 25, 110, 69, 73, 69, - 111, 111, 111, 111, 26, 69, 116, 117, 116, 44, - 46, 119, 69, 106, 107, 72, 101, 102, 70, 69, - 95, 56, 4, 108, 50, 69, 25, 110, 57, 112, - 119, 24, 99, 9, 31, 36, 59, 60, 61, 62, - 63, 64, 65, 66, 111, 120, 121, 59, 26, 119, - 67, 68, 43, 30, 32, 33, 34, 35, 97, 26, - 94, 59, 108, 69, 58, 26, 10, 125, 100, 101, - 26, 9, 31, 65, 36, 121, 47, 48, 111, 111, - 107, 13, 24, 36, 38, 39, 96, 95, 25, 69, - 24, 116, 118, 116, 117, 6, 11, 126, 25, 26, - 24, 111, 120, 120, 69, 67, 38, 94, 103, 69, - 91, 50, 119, 110, 120, 12, 122, 101, 100, 25, - 4, 108, 26, 25, 120, 125, 6, 25, 96, 108, - 91, 57, 111, 123, 124, 58, 5, 18, 26, 118, - 123 -}; +static const yytype_uint8 yystos[] = {0, + 7, + 8, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 27, + 28, + 29, + 40, + 41, + 49, + 51, + 54, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 93, + 94, + 95, + 96, + 101, + 107, + 108, + 111, + 112, + 130, + 131, + 132, + 13, + 37, + 59, + 91, + 13, + 15, + 59, + 24, + 38, + 68, + 69, + 70, + 71, + 73, + 74, + 105, + 113, + 114, + 116, + 117, + 118, + 113, + 70, + 14, + 15, + 43, + 45, + 70, + 70, + 52, + 79, + 0, + 3, + 133, + 70, + 70, + 15, + 70, + 70, + 70, + 17, + 111, + 113, + 24, + 42, + 114, + 4, + 70, + 72, + 73, + 74, + 75, + 115, + 45, + 45, + 70, + 70, + 49, + 60, + 53, + 24, + 55, + 106, + 4, + 70, + 50, + 113, + 25, + 25, + 113, + 70, + 74, + 70, + 114, + 114, + 114, + 114, + 26, + 70, + 119, + 120, + 119, + 44, + 46, + 122, + 70, + 109, + 110, + 73, + 104, + 105, + 71, + 70, + 98, + 56, + 4, + 111, + 111, + 50, + 70, + 25, + 113, + 57, + 115, + 122, + 24, + 102, + 9, + 31, + 36, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 114, + 123, + 124, + 60, + 26, + 122, + 68, + 69, + 43, + 30, + 32, + 33, + 34, + 35, + 100, + 26, + 97, + 60, + 111, + 70, + 58, + 26, + 10, + 128, + 103, + 104, + 26, + 9, + 31, + 66, + 36, + 124, + 47, + 48, + 114, + 114, + 110, + 13, + 24, + 36, + 38, + 39, + 99, + 98, + 25, + 70, + 24, + 119, + 121, + 119, + 120, + 6, + 11, + 129, + 25, + 26, + 24, + 114, + 123, + 123, + 70, + 68, + 38, + 97, + 106, + 70, + 92, + 50, + 122, + 113, + 123, + 12, + 125, + 104, + 103, + 25, + 4, + 111, + 26, + 25, + 123, + 128, + 6, + 25, + 99, + 111, + 92, + 57, + 114, + 126, + 127, + 58, + 5, + 18, + 26, + 121, + 126}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = -{ - 0, 76, 77, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 90, 91, 91, 92, - 93, 93, 93, 93, 93, 94, 94, 95, 95, 96, - 96, 96, 96, 97, 97, 97, 97, 97, 98, 99, - 99, 100, 100, 101, 101, 101, 102, 102, 102, 102, - 103, 103, 104, 105, 106, 106, 107, 108, 108, 109, - 109, 110, 110, 110, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 112, 112, 112, 113, - 114, 115, 115, 116, 117, 117, 118, 118, 119, 119, - 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, - 123, 123, 124, 124, 124, 125, 125, 126, 126, 127, - 128, 129, 130, 130 -}; +static const yytype_uint8 yyr1[] = {0, + 77, + 78, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 91, + 92, + 92, + 93, + 94, + 94, + 94, + 94, + 94, + 95, + 96, + 97, + 97, + 98, + 98, + 99, + 99, + 99, + 99, + 100, + 100, + 100, + 100, + 100, + 101, + 102, + 102, + 103, + 103, + 104, + 104, + 104, + 105, + 105, + 105, + 105, + 106, + 106, + 107, + 108, + 109, + 109, + 110, + 111, + 111, + 112, + 112, + 113, + 113, + 113, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 115, + 115, + 115, + 116, + 117, + 118, + 118, + 119, + 120, + 120, + 121, + 121, + 122, + 122, + 123, + 123, + 123, + 123, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 125, + 125, + 126, + 126, + 127, + 127, + 127, + 128, + 128, + 129, + 129, + 130, + 131, + 132, + 133, + 133}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = +static const yytype_int8 yyr2[] = {0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 2, + 2, + 4, + 9, + 1, + 0, + 1, + 3, + 5, + 10, + 9, + 8, + 6, + 5, + 5, + 3, + 0, + 3, + 6, + 3, + 2, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 5, + 3, + 5, + 1, + 3, + 1, + 2, + 2, + 1, + 1, + 1, + 1, + 0, + 4, + 4, + 5, + 1, + 3, + 3, + 8, + 9, + 2, + 2, + 0, + 2, + 4, + 3, + 3, + 3, + 3, + 3, + 2, + 1, + 1, + 1, + 3, + 1, + 1, + 0, + 1, + 2, + 4, + 3, + 1, + 3, + 1, + 2, + 4, + 3, + 6, + 0, + 2, + 3, + 2, + 3, + 3, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 0, + 3, + 1, + 3, + 1, + 2, + 2, + 0, + 3, + 0, + 2, + 7, + 2, + 4, + 0, + 1}; + +enum { - 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, - 10, 9, 8, 6, 5, 0, 3, 6, 3, 2, - 1, 1, 0, 1, 1, 1, 1, 1, 5, 3, - 5, 1, 3, 1, 2, 2, 1, 1, 1, 1, - 0, 4, 4, 5, 1, 3, 3, 8, 9, 2, - 2, 0, 2, 4, 3, 3, 3, 3, 3, 2, - 1, 1, 1, 3, 1, 1, 0, 1, 2, 4, - 3, 1, 3, 1, 2, 4, 3, 6, 0, 2, - 3, 2, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, - 1, 3, 1, 2, 2, 0, 3, 0, 2, 7, - 2, 4, 0, 1 + YYENOMEM = -2 }; - -enum { YYENOMEM = -2 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK(yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } else { \ + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -1040,151 +3068,131 @@ enum { YYENOMEM = -2 }; the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) +#define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) { \ + (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ + } else { \ + (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) - /* Enable debugging if requested. */ #if YYDEBUG -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +#ifndef YYFPRINTF +#include /* INFRINGES ON USER NAME SPACE */ +#define YYFPRINTF fprintf +#endif +#define YYDPRINTF(Args) \ + do { \ + if (yydebug) \ + YYFPRINTF Args; \ + } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YYLOCATION_PRINT +#ifndef YYLOCATION_PRINT -# if defined YY_LOCATION_PRINT +#if defined YY_LOCATION_PRINT - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) { + res += YYFPRINTF(yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF(yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) { + if (yylocp->first_line < yylocp->last_line) { + res += YYFPRINTF(yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF(yyo, ".%d", end_col); + } else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF(yyo, "-%d", end_col); + } return res; } -# define YYLOCATION_PRINT yy_location_print_ - - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) +#define YYLOCATION_PRINT yy_location_print_ -# else +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -# define YYLOCATION_PRINT(File, Loc) ((void) 0) - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT YYLOCATION_PRINT - -# endif -# endif /* !defined YYLOCATION_PRINT */ +#else +#define YYLOCATION_PRINT(File, Loc) ((void)0) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT YYLOCATION_PRINT -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +#endif +#endif /* !defined YYLOCATION_PRINT */ +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ + do { \ + if (yydebug) { \ + YYFPRINTF(stderr, "%s ", Title); \ + yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF(stderr, "\n"); \ + } \ + } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyoutput); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); - YYLOCATION_PRINT (yyo, yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF (yyo, ")"); + YYLOCATION_PRINT(yyo, yylocationp); + YYFPRINTF(yyo, ": "); + yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF(yyo, ")"); } /*------------------------------------------------------------------. @@ -1192,70 +3200,66 @@ yy_symbol_print (FILE *yyo, | TOP (included). | `------------------------------------------------------------------*/ -static void -yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); + YYFPRINTF(stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) { + int yybot = *yybottom; + YYFPRINTF(stderr, " %d", yybot); + } + YYFPRINTF(stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - +#define YY_STACK_PRINT(Bottom, Top) \ + do { \ + if (yydebug) \ + yy_stack_print((Bottom), (Top)); \ + } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, + ParsedSqlResult *sql_result, void *scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", - yyrule - 1, yylno); + YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); - YYFPRINTF (stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) { + YYFPRINTF(stderr, " $%d = ", yyi + 1); + yy_symbol_print(stderr, + YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), + sql_string, + sql_result, + scanner); + YYFPRINTF(stderr, "\n"); + } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ -} while (0) +#define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug) \ + yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ + } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) +#define YYDPRINTF(Args) ((void)0) +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +#define YY_STACK_PRINT(Bottom, Top) +#define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -1266,16 +3270,15 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 +#define YYMAXDEPTH 10000 #endif - /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -1284,69 +3287,59 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default(yyn)) { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } - - - #ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else +#if defined __GLIBC__ && defined _STRING_H +#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) +#else /* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) +static YYPTRDIFF_T yystrlen(const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -# endif +#endif #endif #ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +#define yystpcpy stpcpy +#else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) +static char *yystpcpy(char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -1354,7 +3347,7 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } -# endif +#endif #endif #ifndef yytnamerr @@ -1365,52 +3358,45 @@ yystpcpy (char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) +static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) { - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': + if (*yystr == '"') { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) { + case '\'': + case ',': goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes:; + } if (yyres) - return yystpcpy (yyres, yystr) - yyres; + return yystpcpy(yyres, yystr) - yyres; else - return yystrlen (yystr); + return yystrlen(yystr); } #endif - -static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -1437,19 +3423,17 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) - { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -1461,11 +3445,12 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) +static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) { - enum { YYARGS_MAX = 5 }; + enum + { + YYARGS_MAX = 5 + }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -1475,16 +3460,13 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) - { -#define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break + switch (yycount) { +#define YYCASE_(N, S) \ + case N: yyformat = S; break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1493,134 +3475,118 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; + yysize = yystrlen(yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) { + YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) { + *yymsg_alloc = 2 * yysize; + if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { + yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } else { + ++yyp; + ++yyformat; + } } return 0; } - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, + const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyvaluep); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - - - - /*----------. | yyparse. | `----------*/ -int -yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { -/* Lookahead token kind. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; + /* Lookahead token kind. */ + int yychar; + + /* The semantic value of the lookahead symbol. */ + /* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ + YY_INITIAL_VALUE(static YYSTYPE yyval_default;) + YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); + + /* Location data for the lookahead symbol. */ + static YYLTYPE yyloc_default +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = {1, 1, 1, 1} +#endif + ; + YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -1636,24 +3602,23 @@ YYLTYPE yylloc = yyloc_default; YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF ((stderr, "Starting parse\n")); + YYDPRINTF((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; - /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -1662,93 +3627,90 @@ YYLTYPE yylloc = yyloc_default; have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YYDPRINTF((stderr, "Entering state %d\n", yystate)); + YY_ASSERT(0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST (yy_state_t, yystate); + *yyssp = YY_CAST(yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else + { + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +#if defined yyoverflow { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -# if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * YYSIZEOF (*yyssp), - &yyvs1, yysize * YYSIZEOF (*yyvsp), - &yyls1, yysize * YYSIZEOF (*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow(YY_("memory exhausted"), + &yyss1, + yysize * YYSIZEOF(*yyssp), + &yyvs1, + yysize * YYSIZEOF(*yyvsp), + &yyls1, + yysize * YYSIZEOF(*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +#else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + YYNOMEM; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); + if (!yyptr) YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = - YY_CAST (union yyalloc *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); - if (! yyptr) - YYNOMEM; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif + YYSTACK_RELOCATE(yyss_alloc, yyss); + YYSTACK_RELOCATE(yyvs_alloc, yyvs); + YYSTACK_RELOCATE(yyls_alloc, yyls); +#undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE(yyss1); + } +#endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF ((stderr, "Stack size increased to %ld\n", - YY_CAST (long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; goto yybackup; - /*-----------. | yybackup. | `-----------*/ @@ -1758,40 +3720,34 @@ YYLTYPE yylloc = yyloc_default; /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yypact_value_is_default(yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token\n")); - yychar = yylex (&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) { + YYDPRINTF((stderr, "Reading a token\n")); + yychar = yylex(&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) - { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else if (yychar == YYerror) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF((stderr, "Now at end of input.\n")); + } else if (yychar == YYerror) { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } else { + yytoken = YYTRANSLATE(yychar); + YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -1799,13 +3755,12 @@ YYLTYPE yylloc = yyloc_default; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) { + if (yytable_value_is_error(yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -1813,7 +3768,7 @@ YYLTYPE yylloc = yyloc_default; yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -1824,7 +3779,6 @@ YYLTYPE yylloc = yyloc_default; yychar = YYEMPTY; goto yynewstate; - /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -1834,7 +3788,6 @@ YYLTYPE yylloc = yyloc_default; goto yyerrlab; goto yyreduce; - /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -1850,221 +3803,252 @@ YYLTYPE yylloc = yyloc_default; users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + yyval = yyvsp[1 - yylen]; /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT (yyn); - switch (yyn) + YY_REDUCE_PRINT(yyn); + switch (yyn) { + case 2: /* commands: command_wrapper opt_semicolon */ +#line 263 "yacc_sql.y" { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 260 "yacc_sql.y" - { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } -#line 1868 "yacc_sql.cpp" + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } +#line 1874 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ -#line 291 "yacc_sql.y" - { + case 26: /* exit_stmt: EXIT */ +#line 296 "yacc_sql.y" + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1877 "yacc_sql.cpp" +#line 1883 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ -#line 297 "yacc_sql.y" - { + case 27: /* help_stmt: HELP */ +#line 302 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1885 "yacc_sql.cpp" +#line 1891 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ -#line 302 "yacc_sql.y" - { + case 28: /* sync_stmt: SYNC */ +#line 307 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1893 "yacc_sql.cpp" +#line 1899 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ -#line 308 "yacc_sql.y" - { + case 29: /* begin_stmt: TRX_BEGIN */ +#line 313 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1901 "yacc_sql.cpp" +#line 1907 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ -#line 314 "yacc_sql.y" - { + case 30: /* commit_stmt: TRX_COMMIT */ +#line 319 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1909 "yacc_sql.cpp" +#line 1915 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ -#line 320 "yacc_sql.y" - { + case 31: /* rollback_stmt: TRX_ROLLBACK */ +#line 325 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1917 "yacc_sql.cpp" +#line 1923 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ -#line 326 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + case 32: /* drop_table_stmt: DROP TABLE ID */ +#line 331 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1927 "yacc_sql.cpp" +#line 1933 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ -#line 333 "yacc_sql.y" - { + case 33: /* show_tables_stmt: SHOW TABLES */ +#line 338 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1935 "yacc_sql.cpp" +#line 1941 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ -#line 339 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + case 34: /* desc_table_stmt: DESC ID */ +#line 344 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1945 "yacc_sql.cpp" +#line 1951 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 348 "yacc_sql.y" + case 35: /* show_index_stmt: SHOW INDEX FROM relation */ +#line 353 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1956 "yacc_sql.cpp" +#line 1962 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 358 "yacc_sql.y" + case 36: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ +#line 363 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1972 "yacc_sql.cpp" - break; - - case 35: /* opt_unique: UNIQUE */ -#line 372 "yacc_sql.y" - { (yyval.unique) = true; } #line 1978 "yacc_sql.cpp" break; - case 36: /* opt_unique: %empty */ -#line 373 "yacc_sql.y" - { (yyval.unique) = false; } + case 37: /* opt_unique: UNIQUE */ +#line 377 "yacc_sql.y" + { + (yyval.unique) = true; + } #line 1984 "yacc_sql.cpp" break; - case 37: /* attr_list: ID */ + case 38: /* opt_unique: %empty */ #line 378 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.unique) = false; + } +#line 1990 "yacc_sql.cpp" + break; + + case 39: /* attr_list: ID */ +#line 383 "yacc_sql.y" + { + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1994 "yacc_sql.cpp" +#line 2000 "yacc_sql.cpp" break; - case 38: /* attr_list: ID COMMA attr_list */ -#line 384 "yacc_sql.y" + case 40: /* attr_list: ID COMMA attr_list */ +#line 389 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list) + ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2004 "yacc_sql.cpp" +#line 2010 "yacc_sql.cpp" break; - case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 393 "yacc_sql.y" + case 41: /* drop_index_stmt: DROP INDEX ID ON ID */ +#line 398 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2016 "yacc_sql.cpp" +#line 2022 "yacc_sql.cpp" + break; + + case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ +#line 408 "yacc_sql.y" + { + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); + } +#line 2030 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ -#line 403 "yacc_sql.y" + case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ +#line 412 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2024 "yacc_sql.cpp" +#line 2038 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ -#line 407 "yacc_sql.y" + case 44: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ +#line 416 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2032 "yacc_sql.cpp" +#line 2046 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 411 "yacc_sql.y" + case 45: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ +#line 420 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); + (yyval.sql_node) = + create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2040 "yacc_sql.cpp" +#line 2054 "yacc_sql.cpp" break; - case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ -#line 415 "yacc_sql.y" + case 46: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ +#line 424 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = + create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2048 "yacc_sql.cpp" +#line 2062 "yacc_sql.cpp" break; - case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ -#line 419 "yacc_sql.y" + case 47: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ +#line 431 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); + CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; + create_view.relation_name = (yyvsp[-2].string); + create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); + free((yyvsp[-2].string)); } -#line 2056 "yacc_sql.cpp" +#line 2074 "yacc_sql.cpp" break; - case 45: /* attr_def_list: %empty */ -#line 425 "yacc_sql.y" + case 48: /* drop_view_stmt: DROP VIEW ID */ +#line 442 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); + (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); + free((yyvsp[0].string)); + } +#line 2084 "yacc_sql.cpp" + break; + + case 49: /* attr_def_list: %empty */ +#line 451 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2064 "yacc_sql.cpp" +#line 2092 "yacc_sql.cpp" break; - case 46: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 429 "yacc_sql.y" + case 50: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 455 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -2074,29 +4058,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2078 "yacc_sql.cpp" +#line 2106 "yacc_sql.cpp" break; - case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 442 "yacc_sql.y" + case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ +#line 468 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; } free((yyvsp[-5].string)); } -#line 2094 "yacc_sql.cpp" +#line 2122 "yacc_sql.cpp" break; - case 48: /* attr_def: ID type nullable_constraint */ -#line 454 "yacc_sql.y" + case 52: /* attr_def: ID type nullable_constraint */ +#line 480 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -2118,75 +4102,85 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2122 "yacc_sql.cpp" +#line 2150 "yacc_sql.cpp" break; - case 49: /* nullable_constraint: NOT NULL_T */ -#line 481 "yacc_sql.y" + case 53: /* nullable_constraint: NOT NULL_T */ +#line 507 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2130 "yacc_sql.cpp" +#line 2158 "yacc_sql.cpp" break; - case 50: /* nullable_constraint: NULLABLE */ -#line 485 "yacc_sql.y" + case 54: /* nullable_constraint: NULLABLE */ +#line 511 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2138 "yacc_sql.cpp" +#line 2166 "yacc_sql.cpp" break; - case 51: /* nullable_constraint: NULL_T */ -#line 489 "yacc_sql.y" + case 55: /* nullable_constraint: NULL_T */ +#line 515 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2146 "yacc_sql.cpp" +#line 2174 "yacc_sql.cpp" break; - case 52: /* nullable_constraint: %empty */ -#line 493 "yacc_sql.y" + case 56: /* nullable_constraint: %empty */ +#line 519 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2154 "yacc_sql.cpp" +#line 2182 "yacc_sql.cpp" break; - case 53: /* type: INT_T */ -#line 499 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::INTS); } -#line 2160 "yacc_sql.cpp" + case 57: /* type: INT_T */ +#line 525 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::INTS); + } +#line 2188 "yacc_sql.cpp" break; - case 54: /* type: STRING_T */ -#line 500 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2166 "yacc_sql.cpp" + case 58: /* type: STRING_T */ +#line 526 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::CHARS); + } +#line 2194 "yacc_sql.cpp" break; - case 55: /* type: FLOAT_T */ -#line 501 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2172 "yacc_sql.cpp" + case 59: /* type: FLOAT_T */ +#line 527 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::FLOATS); + } +#line 2200 "yacc_sql.cpp" break; - case 56: /* type: DATE_T */ -#line 502 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::DATES); } -#line 2178 "yacc_sql.cpp" + case 60: /* type: DATE_T */ +#line 528 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::DATES); + } +#line 2206 "yacc_sql.cpp" break; - case 57: /* type: TEXT_T */ -#line 503 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2184 "yacc_sql.cpp" + case 61: /* type: TEXT_T */ +#line 529 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::TEXTS); + } +#line 2212 "yacc_sql.cpp" break; - case 58: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 508 "yacc_sql.y" + case 62: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 534 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -2194,143 +4188,143 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2198 "yacc_sql.cpp" +#line 2226 "yacc_sql.cpp" break; - case 59: /* values_list: LBRACE value_list RBRACE */ -#line 521 "yacc_sql.y" + case 63: /* values_list: LBRACE value_list RBRACE */ +#line 547 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2208 "yacc_sql.cpp" +#line 2236 "yacc_sql.cpp" break; - case 60: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 527 "yacc_sql.y" + case 64: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 553 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2217 "yacc_sql.cpp" +#line 2245 "yacc_sql.cpp" break; - case 61: /* value_list: value */ -#line 534 "yacc_sql.y" + case 65: /* value_list: value */ +#line 560 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2227 "yacc_sql.cpp" +#line 2255 "yacc_sql.cpp" break; - case 62: /* value_list: value_list COMMA value */ -#line 540 "yacc_sql.y" + case 66: /* value_list: value_list COMMA value */ +#line 566 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2236 "yacc_sql.cpp" +#line 2264 "yacc_sql.cpp" break; - case 63: /* value: nonnegative_value */ -#line 547 "yacc_sql.y" - { + case 67: /* value: nonnegative_value */ +#line 573 "yacc_sql.y" + { (yyval.value) = (yyvsp[0].value); } -#line 2244 "yacc_sql.cpp" +#line 2272 "yacc_sql.cpp" break; - case 64: /* value: '-' NUMBER */ -#line 550 "yacc_sql.y" - { + case 68: /* value: '-' NUMBER */ +#line 576 "yacc_sql.y" + { (yyval.value) = new Value(-(yyvsp[0].number)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } -#line 2253 "yacc_sql.cpp" +#line 2281 "yacc_sql.cpp" break; - case 65: /* value: '-' FLOAT */ -#line 554 "yacc_sql.y" - { + case 69: /* value: '-' FLOAT */ +#line 580 "yacc_sql.y" + { (yyval.value) = new Value(-(yyvsp[0].floats)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } -#line 2262 "yacc_sql.cpp" +#line 2290 "yacc_sql.cpp" break; - case 66: /* nonnegative_value: NUMBER */ -#line 561 "yacc_sql.y" - { + case 70: /* nonnegative_value: NUMBER */ +#line 587 "yacc_sql.y" + { (yyval.value) = new Value((yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2271 "yacc_sql.cpp" +#line 2299 "yacc_sql.cpp" break; - case 67: /* nonnegative_value: FLOAT */ -#line 565 "yacc_sql.y" - { + case 71: /* nonnegative_value: FLOAT */ +#line 591 "yacc_sql.y" + { (yyval.value) = new Value((yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2280 "yacc_sql.cpp" +#line 2308 "yacc_sql.cpp" break; - case 68: /* nonnegative_value: SSS */ -#line 569 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); + case 72: /* nonnegative_value: SSS */ +#line 595 "yacc_sql.y" + { + char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2291 "yacc_sql.cpp" +#line 2319 "yacc_sql.cpp" break; - case 69: /* nonnegative_value: NULL_T */ -#line 575 "yacc_sql.y" - { + case 73: /* nonnegative_value: NULL_T */ +#line 601 "yacc_sql.y" + { (yyval.value) = new Value(NullValue()); } -#line 2299 "yacc_sql.cpp" +#line 2327 "yacc_sql.cpp" break; - case 70: /* storage_format: %empty */ -#line 582 "yacc_sql.y" + case 74: /* storage_format: %empty */ +#line 608 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2307 "yacc_sql.cpp" +#line 2335 "yacc_sql.cpp" break; - case 71: /* storage_format: STORAGE FORMAT EQ ID */ -#line 586 "yacc_sql.y" + case 75: /* storage_format: STORAGE FORMAT EQ ID */ +#line 612 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2315 "yacc_sql.cpp" +#line 2343 "yacc_sql.cpp" break; - case 72: /* delete_stmt: DELETE FROM ID where */ -#line 593 "yacc_sql.y" + case 76: /* delete_stmt: DELETE FROM ID where */ +#line 619 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); } free((yyvsp[-1].string)); } -#line 2328 "yacc_sql.cpp" +#line 2356 "yacc_sql.cpp" break; - case 73: /* update_stmt: UPDATE ID SET setClauses where */ -#line 605 "yacc_sql.y" + case 77: /* update_stmt: UPDATE ID SET setClauses where */ +#line 631 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -2339,39 +4333,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2343 "yacc_sql.cpp" +#line 2371 "yacc_sql.cpp" break; - case 74: /* setClauses: setClause */ -#line 619 "yacc_sql.y" + case 78: /* setClauses: setClause */ +#line 645 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2352 "yacc_sql.cpp" +#line 2380 "yacc_sql.cpp" break; - case 75: /* setClauses: setClauses COMMA setClause */ -#line 624 "yacc_sql.y" + case 79: /* setClauses: setClauses COMMA setClause */ +#line 650 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2360 "yacc_sql.cpp" +#line 2388 "yacc_sql.cpp" break; - case 76: /* setClause: ID EQ expression */ -#line 631 "yacc_sql.y" + case 80: /* setClause: ID EQ expression */ +#line 657 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2371 "yacc_sql.cpp" +#line 2399 "yacc_sql.cpp" break; - case 77: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ -#line 641 "yacc_sql.y" + case 81: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ +#line 667 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-6].expression_list) != nullptr) { @@ -2404,11 +4398,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2408 "yacc_sql.cpp" +#line 2436 "yacc_sql.cpp" break; - case 78: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 674 "yacc_sql.y" + case 82: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 700 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2422,7 +4416,8 @@ YYLTYPE yylloc = yyloc_default; } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); + ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -2430,7 +4425,8 @@ YYLTYPE yylloc = yyloc_default; if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -2438,39 +4434,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2442 "yacc_sql.cpp" +#line 2470 "yacc_sql.cpp" break; - case 79: /* calc_stmt: CALC expression_list */ -#line 707 "yacc_sql.y" + case 83: /* calc_stmt: CALC expression_list */ +#line 733 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2452 "yacc_sql.cpp" +#line 2480 "yacc_sql.cpp" break; - case 80: /* calc_stmt: SELECT expression_list */ -#line 713 "yacc_sql.y" + case 84: /* calc_stmt: SELECT expression_list */ +#line 739 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2462 "yacc_sql.cpp" +#line 2490 "yacc_sql.cpp" break; - case 81: /* expression_list: %empty */ -#line 721 "yacc_sql.y" - { + case 85: /* expression_list: %empty */ +#line 747 "yacc_sql.y" + { (yyval.expression_list) = new std::vector>; } -#line 2470 "yacc_sql.cpp" +#line 2498 "yacc_sql.cpp" break; - case 82: /* expression_list: expression alias */ -#line 725 "yacc_sql.y" + case 86: /* expression_list: expression alias */ +#line 751 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2479,11 +4475,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2483 "yacc_sql.cpp" +#line 2511 "yacc_sql.cpp" break; - case 83: /* expression_list: expression alias COMMA expression_list */ -#line 734 "yacc_sql.y" + case 87: /* expression_list: expression alias COMMA expression_list */ +#line 760 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2493,47 +4489,51 @@ YYLTYPE yylloc = yyloc_default; if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2500 "yacc_sql.cpp" +#line 2528 "yacc_sql.cpp" break; - case 84: /* expression: expression '+' expression */ -#line 749 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 88: /* expression: expression '+' expression */ +#line 775 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2508 "yacc_sql.cpp" +#line 2536 "yacc_sql.cpp" break; - case 85: /* expression: expression '-' expression */ -#line 752 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 89: /* expression: expression '-' expression */ +#line 778 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2516 "yacc_sql.cpp" +#line 2544 "yacc_sql.cpp" break; - case 86: /* expression: expression '*' expression */ -#line 755 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 90: /* expression: expression '*' expression */ +#line 781 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2524 "yacc_sql.cpp" +#line 2552 "yacc_sql.cpp" break; - case 87: /* expression: expression '/' expression */ -#line 758 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 91: /* expression: expression '/' expression */ +#line 784 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2532 "yacc_sql.cpp" +#line 2560 "yacc_sql.cpp" break; - case 88: /* expression: LBRACE expression_list RBRACE */ -#line 761 "yacc_sql.y" - { + case 92: /* expression: LBRACE expression_list RBRACE */ +#line 787 "yacc_sql.y" + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -2541,469 +4541,501 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2545 "yacc_sql.cpp" +#line 2573 "yacc_sql.cpp" break; - case 89: /* expression: '-' expression */ -#line 769 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + case 93: /* expression: '-' expression */ +#line 795 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2553 "yacc_sql.cpp" +#line 2581 "yacc_sql.cpp" break; - case 90: /* expression: nonnegative_value */ -#line 772 "yacc_sql.y" - { + case 94: /* expression: nonnegative_value */ +#line 798 "yacc_sql.y" + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2563 "yacc_sql.cpp" +#line 2591 "yacc_sql.cpp" break; - case 91: /* expression: rel_attr */ -#line 777 "yacc_sql.y" - { + case 95: /* expression: rel_attr */ +#line 803 "yacc_sql.y" + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2574 "yacc_sql.cpp" +#line 2602 "yacc_sql.cpp" break; - case 92: /* expression: '*' */ -#line 783 "yacc_sql.y" - { + case 96: /* expression: '*' */ +#line 809 "yacc_sql.y" + { (yyval.expression) = new StarExpr(); } -#line 2582 "yacc_sql.cpp" +#line 2610 "yacc_sql.cpp" break; - case 93: /* expression: ID DOT '*' */ -#line 786 "yacc_sql.y" - { + case 97: /* expression: ID DOT '*' */ +#line 812 "yacc_sql.y" + { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2590 "yacc_sql.cpp" +#line 2618 "yacc_sql.cpp" break; - case 94: /* expression: aggr_func_expr */ -#line 789 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + case 98: /* expression: aggr_func_expr */ +#line 815 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2598 "yacc_sql.cpp" +#line 2626 "yacc_sql.cpp" break; - case 95: /* expression: sub_query_expr */ -#line 792 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + case 99: /* expression: sub_query_expr */ +#line 818 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2606 "yacc_sql.cpp" +#line 2634 "yacc_sql.cpp" break; - case 96: /* alias: %empty */ -#line 799 "yacc_sql.y" - { + case 100: /* alias: %empty */ +#line 825 "yacc_sql.y" + { (yyval.string) = nullptr; } -#line 2614 "yacc_sql.cpp" +#line 2642 "yacc_sql.cpp" break; - case 97: /* alias: ID */ -#line 802 "yacc_sql.y" - { + case 101: /* alias: ID */ +#line 828 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2622 "yacc_sql.cpp" +#line 2650 "yacc_sql.cpp" break; - case 98: /* alias: AS ID */ -#line 805 "yacc_sql.y" - { + case 102: /* alias: AS ID */ +#line 831 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2630 "yacc_sql.cpp" +#line 2658 "yacc_sql.cpp" break; - case 99: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 811 "yacc_sql.y" + case 103: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 837 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2638 "yacc_sql.cpp" +#line 2666 "yacc_sql.cpp" break; - case 100: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 818 "yacc_sql.y" + case 104: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 844 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2646 "yacc_sql.cpp" +#line 2674 "yacc_sql.cpp" break; - case 101: /* rel_attr: ID */ -#line 824 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 105: /* rel_attr: ID */ +#line 850 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2656 "yacc_sql.cpp" +#line 2684 "yacc_sql.cpp" break; - case 102: /* rel_attr: ID DOT ID */ -#line 829 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 106: /* rel_attr: ID DOT ID */ +#line 855 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2668 "yacc_sql.cpp" +#line 2696 "yacc_sql.cpp" break; - case 103: /* relation: ID */ -#line 839 "yacc_sql.y" - { + case 107: /* relation: ID */ +#line 865 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2676 "yacc_sql.cpp" +#line 2704 "yacc_sql.cpp" break; - case 104: /* rel_list: relation alias */ -#line 845 "yacc_sql.y" - { + case 108: /* rel_list: relation alias */ +#line 871 "yacc_sql.y" + { (yyval.relation_list) = new std::vector(); - if(nullptr!=(yyvsp[0].string)){ - (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); + if (nullptr != (yyvsp[0].string)) { + (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); free((yyvsp[0].string)); - }else{ + } else { (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); } -#line 2691 "yacc_sql.cpp" +#line 2719 "yacc_sql.cpp" break; - case 105: /* rel_list: relation alias COMMA rel_list */ -#line 855 "yacc_sql.y" - { + case 109: /* rel_list: relation alias COMMA rel_list */ +#line 881 "yacc_sql.y" + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if(nullptr!=(yyvsp[-2].string)){ - (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); + if (nullptr != (yyvsp[-2].string)) { + (yyval.relation_list) + ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); free((yyvsp[-2].string)); - }else{ + } else { (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); } -#line 2710 "yacc_sql.cpp" +#line 2738 "yacc_sql.cpp" break; - case 106: /* joinClauses: relation ON condition */ -#line 873 "yacc_sql.y" + case 110: /* joinClauses: relation ON condition */ +#line 899 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2721 "yacc_sql.cpp" +#line 2749 "yacc_sql.cpp" break; - case 107: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 880 "yacc_sql.y" + case 111: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 906 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2733 "yacc_sql.cpp" +#line 2761 "yacc_sql.cpp" break; - case 108: /* where: %empty */ -#line 891 "yacc_sql.y" + case 112: /* where: %empty */ +#line 917 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2741 "yacc_sql.cpp" +#line 2769 "yacc_sql.cpp" break; - case 109: /* where: WHERE condition */ -#line 894 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + case 113: /* where: WHERE condition */ +#line 920 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); } -#line 2749 "yacc_sql.cpp" +#line 2777 "yacc_sql.cpp" break; - case 110: /* condition: expression comp_op expression */ -#line 901 "yacc_sql.y" + case 114: /* condition: expression comp_op expression */ +#line 927 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2757 "yacc_sql.cpp" +#line 2785 "yacc_sql.cpp" break; - case 111: /* condition: comp_op expression */ -#line 905 "yacc_sql.y" + case 115: /* condition: comp_op expression */ +#line 931 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); - (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); } -#line 2768 "yacc_sql.cpp" +#line 2796 "yacc_sql.cpp" break; - case 112: /* condition: condition AND condition */ -#line 912 "yacc_sql.y" + case 116: /* condition: condition AND condition */ +#line 938 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2776 "yacc_sql.cpp" +#line 2804 "yacc_sql.cpp" break; - case 113: /* condition: condition OR condition */ -#line 916 "yacc_sql.y" + case 117: /* condition: condition OR condition */ +#line 942 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2784 "yacc_sql.cpp" +#line 2812 "yacc_sql.cpp" break; - case 114: /* comp_op: EQ */ -#line 922 "yacc_sql.y" - { (yyval.comp) = EQUAL_TO; } -#line 2790 "yacc_sql.cpp" + case 118: /* comp_op: EQ */ +#line 948 "yacc_sql.y" + { + (yyval.comp) = EQUAL_TO; + } +#line 2818 "yacc_sql.cpp" break; - case 115: /* comp_op: LT */ -#line 923 "yacc_sql.y" - { (yyval.comp) = LESS_THAN; } -#line 2796 "yacc_sql.cpp" + case 119: /* comp_op: LT */ +#line 949 "yacc_sql.y" + { + (yyval.comp) = LESS_THAN; + } +#line 2824 "yacc_sql.cpp" break; - case 116: /* comp_op: GT */ -#line 924 "yacc_sql.y" - { (yyval.comp) = GREAT_THAN; } -#line 2802 "yacc_sql.cpp" + case 120: /* comp_op: GT */ +#line 950 "yacc_sql.y" + { + (yyval.comp) = GREAT_THAN; + } +#line 2830 "yacc_sql.cpp" break; - case 117: /* comp_op: LE */ -#line 925 "yacc_sql.y" - { (yyval.comp) = LESS_EQUAL; } -#line 2808 "yacc_sql.cpp" + case 121: /* comp_op: LE */ +#line 951 "yacc_sql.y" + { + (yyval.comp) = LESS_EQUAL; + } +#line 2836 "yacc_sql.cpp" break; - case 118: /* comp_op: GE */ -#line 926 "yacc_sql.y" - { (yyval.comp) = GREAT_EQUAL; } -#line 2814 "yacc_sql.cpp" + case 122: /* comp_op: GE */ +#line 952 "yacc_sql.y" + { + (yyval.comp) = GREAT_EQUAL; + } +#line 2842 "yacc_sql.cpp" break; - case 119: /* comp_op: NE */ -#line 927 "yacc_sql.y" - { (yyval.comp) = NOT_EQUAL; } -#line 2820 "yacc_sql.cpp" + case 123: /* comp_op: NE */ +#line 953 "yacc_sql.y" + { + (yyval.comp) = NOT_EQUAL; + } +#line 2848 "yacc_sql.cpp" break; - case 120: /* comp_op: IS */ -#line 928 "yacc_sql.y" - { (yyval.comp) = IS_OP; } -#line 2826 "yacc_sql.cpp" + case 124: /* comp_op: IS */ +#line 954 "yacc_sql.y" + { + (yyval.comp) = IS_OP; + } +#line 2854 "yacc_sql.cpp" break; - case 121: /* comp_op: IS NOT */ -#line 929 "yacc_sql.y" - { (yyval.comp) = IS_NOT_OP; } -#line 2832 "yacc_sql.cpp" + case 125: /* comp_op: IS NOT */ +#line 955 "yacc_sql.y" + { + (yyval.comp) = IS_NOT_OP; + } +#line 2860 "yacc_sql.cpp" break; - case 122: /* comp_op: LIKE */ -#line 930 "yacc_sql.y" - { (yyval.comp) = LIKE_OP;} -#line 2838 "yacc_sql.cpp" + case 126: /* comp_op: LIKE */ +#line 956 "yacc_sql.y" + { + (yyval.comp) = LIKE_OP; + } +#line 2866 "yacc_sql.cpp" break; - case 123: /* comp_op: NOT LIKE */ -#line 931 "yacc_sql.y" - {(yyval.comp) = NOT_LIKE_OP;} -#line 2844 "yacc_sql.cpp" + case 127: /* comp_op: NOT LIKE */ +#line 957 "yacc_sql.y" + { + (yyval.comp) = NOT_LIKE_OP; + } +#line 2872 "yacc_sql.cpp" break; - case 124: /* comp_op: IN */ -#line 932 "yacc_sql.y" - { (yyval.comp) = IN_OP; } -#line 2850 "yacc_sql.cpp" + case 128: /* comp_op: IN */ +#line 958 "yacc_sql.y" + { + (yyval.comp) = IN_OP; + } +#line 2878 "yacc_sql.cpp" break; - case 125: /* comp_op: NOT IN */ -#line 933 "yacc_sql.y" - { (yyval.comp) = NOT_IN_OP; } -#line 2856 "yacc_sql.cpp" + case 129: /* comp_op: NOT IN */ +#line 959 "yacc_sql.y" + { + (yyval.comp) = NOT_IN_OP; + } +#line 2884 "yacc_sql.cpp" break; - case 126: /* comp_op: EXISTS */ -#line 934 "yacc_sql.y" - { (yyval.comp) = EXISTS_OP; } -#line 2862 "yacc_sql.cpp" + case 130: /* comp_op: EXISTS */ +#line 960 "yacc_sql.y" + { + (yyval.comp) = EXISTS_OP; + } +#line 2890 "yacc_sql.cpp" break; - case 127: /* comp_op: NOT EXISTS */ -#line 935 "yacc_sql.y" - { (yyval.comp) = NOT_EXISTS_OP; } -#line 2868 "yacc_sql.cpp" + case 131: /* comp_op: NOT EXISTS */ +#line 961 "yacc_sql.y" + { + (yyval.comp) = NOT_EXISTS_OP; + } +#line 2896 "yacc_sql.cpp" break; - case 128: /* opt_order_by: %empty */ -#line 940 "yacc_sql.y" + case 132: /* opt_order_by: %empty */ +#line 966 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2876 "yacc_sql.cpp" +#line 2904 "yacc_sql.cpp" break; - case 129: /* opt_order_by: ORDER BY sort_list */ -#line 944 "yacc_sql.y" + case 133: /* opt_order_by: ORDER BY sort_list */ +#line 970 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } -#line 2885 "yacc_sql.cpp" +#line 2913 "yacc_sql.cpp" break; - case 130: /* sort_list: sort_unit */ -#line 952 "yacc_sql.y" - { + case 134: /* sort_list: sort_unit */ +#line 978 "yacc_sql.y" + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } -#line 2894 "yacc_sql.cpp" + } +#line 2922 "yacc_sql.cpp" break; - case 131: /* sort_list: sort_unit COMMA sort_list */ -#line 957 "yacc_sql.y" - { + case 135: /* sort_list: sort_unit COMMA sort_list */ +#line 983 "yacc_sql.y" + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } -#line 2903 "yacc_sql.cpp" + } +#line 2931 "yacc_sql.cpp" break; - case 132: /* sort_unit: expression */ -#line 965 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + case 136: /* sort_unit: expression */ +#line 991 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2913 "yacc_sql.cpp" + } +#line 2941 "yacc_sql.cpp" break; - case 133: /* sort_unit: expression DESC */ -#line 971 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 137: /* sort_unit: expression DESC */ +#line 997 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } -#line 2923 "yacc_sql.cpp" + } +#line 2951 "yacc_sql.cpp" break; - case 134: /* sort_unit: expression ASC */ -#line 977 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 138: /* sort_unit: expression ASC */ +#line 1003 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2933 "yacc_sql.cpp" + } +#line 2961 "yacc_sql.cpp" break; - case 135: /* group_by: %empty */ -#line 986 "yacc_sql.y" + case 139: /* group_by: %empty */ +#line 1012 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2941 "yacc_sql.cpp" +#line 2969 "yacc_sql.cpp" break; - case 136: /* group_by: GROUP BY expression_list */ -#line 990 "yacc_sql.y" + case 140: /* group_by: GROUP BY expression_list */ +#line 1016 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2949 "yacc_sql.cpp" +#line 2977 "yacc_sql.cpp" break; - case 137: /* opt_having: %empty */ -#line 997 "yacc_sql.y" + case 141: /* opt_having: %empty */ +#line 1023 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2957 "yacc_sql.cpp" +#line 2985 "yacc_sql.cpp" break; - case 138: /* opt_having: HAVING condition */ -#line 1001 "yacc_sql.y" + case 142: /* opt_having: HAVING condition */ +#line 1027 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2965 "yacc_sql.cpp" +#line 2993 "yacc_sql.cpp" break; - case 139: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 1008 "yacc_sql.y" + case 143: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 1034 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2979 "yacc_sql.cpp" +#line 3007 "yacc_sql.cpp" break; - case 140: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1021 "yacc_sql.y" + case 144: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1047 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2988 "yacc_sql.cpp" +#line 3016 "yacc_sql.cpp" break; - case 141: /* set_variable_stmt: SET ID EQ value */ -#line 1029 "yacc_sql.y" + case 145: /* set_variable_stmt: SET ID EQ value */ +#line 1055 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3000 "yacc_sql.cpp" +#line 3028 "yacc_sql.cpp" break; +#line 3032 "yacc_sql.cpp" -#line 3004 "yacc_sql.cpp" - - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -3015,9 +5047,9 @@ YYLTYPE yylloc = yyloc_default; case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; *++yyvsp = yyval; @@ -3028,84 +5060,67 @@ YYLTYPE yylloc = yyloc_default; number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp - ? yytable[yyi] - : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; - /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) - { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } - } - yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; + if (!yyerrstatus) { + ++yynerrs; + { + yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) { + if (yymsg != yymsgbuf) + YYSTACK_FREE(yymsg); + yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); + if (yymsg) { + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } else { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } } + yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } + } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; - } + if (yychar <= YYEOF) { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else { + yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; } + } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; - /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -3118,45 +5133,40 @@ YYLTYPE yylloc = yyloc_default; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); yystate = *yyssp; goto yyerrlab1; - /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) { + yyn = yypact[yystate]; + if (!yypact_value_is_default(yyn)) { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + yystate = *yyssp; + YY_STACK_PRINT(yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3164,15 +5174,14 @@ YYLTYPE yylloc = yyloc_default; yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; - /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -3180,7 +5189,6 @@ YYLTYPE yylloc = yyloc_default; yyresult = 0; goto yyreturnlab; - /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -3188,53 +5196,48 @@ YYLTYPE yylloc = yyloc_default; yyresult = 1; goto yyreturnlab; - /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; - /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE(yychar); + yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - } + YYPOPSTACK(yylen); + YY_STACK_PRINT(yyss, yyssp); + while (yyssp != yyss) { + yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE (yyss); + YYSTACK_FREE(yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); + YYSTACK_FREE(yymsg); return yyresult; } -#line 1041 "yacc_sql.y" +#line 1067 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) { +int sql_parse(const char *s, ParsedSqlResult *sql_result) +{ yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 8521ddee..b0f45163 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -# define YY_YY_YACC_SQL_HPP_INCLUDED +#define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -# define YYDEBUG 0 +#define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,126 +47,126 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - HAVING = 266, /* HAVING */ - ORDER = 267, /* ORDER */ - TABLE = 268, /* TABLE */ - TABLES = 269, /* TABLES */ - INDEX = 270, /* INDEX */ - CALC = 271, /* CALC */ - SELECT = 272, /* SELECT */ - DESC = 273, /* DESC */ - SHOW = 274, /* SHOW */ - SYNC = 275, /* SYNC */ - INSERT = 276, /* INSERT */ - DELETE = 277, /* DELETE */ - UPDATE = 278, /* UPDATE */ - LBRACE = 279, /* LBRACE */ - RBRACE = 280, /* RBRACE */ - COMMA = 281, /* COMMA */ - TRX_BEGIN = 282, /* TRX_BEGIN */ - TRX_COMMIT = 283, /* TRX_COMMIT */ - TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ - INT_T = 285, /* INT_T */ - IN = 286, /* IN */ - STRING_T = 287, /* STRING_T */ - FLOAT_T = 288, /* FLOAT_T */ - DATE_T = 289, /* DATE_T */ - TEXT_T = 290, /* TEXT_T */ - NOT = 291, /* NOT */ - UNIQUE = 292, /* UNIQUE */ - NULL_T = 293, /* NULL_T */ - NULLABLE = 294, /* NULLABLE */ - HELP = 295, /* HELP */ - EXIT = 296, /* EXIT */ - DOT = 297, /* DOT */ - INTO = 298, /* INTO */ - VALUES = 299, /* VALUES */ - FROM = 300, /* FROM */ - WHERE = 301, /* WHERE */ - AND = 302, /* AND */ - OR = 303, /* OR */ - SET = 304, /* SET */ - ON = 305, /* ON */ - LOAD = 306, /* LOAD */ - DATA = 307, /* DATA */ - INFILE = 308, /* INFILE */ - EXPLAIN = 309, /* EXPLAIN */ - STORAGE = 310, /* STORAGE */ - FORMAT = 311, /* FORMAT */ - INNER = 312, /* INNER */ - JOIN = 313, /* JOIN */ - EQ = 314, /* EQ */ - LT = 315, /* LT */ - GT = 316, /* GT */ - LE = 317, /* LE */ - GE = 318, /* GE */ - NE = 319, /* NE */ - LIKE = 320, /* LIKE */ - IS = 321, /* IS */ - NUMBER = 322, /* NUMBER */ - FLOAT = 323, /* FLOAT */ - ID = 324, /* ID */ - SSS = 325, /* SSS */ - UMINUS = 326 /* UMINUS */ - }; - typedef enum yytokentype yytoken_kind_t; +#define YYTOKENTYPE +enum yytokentype +{ + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + HAVING = 266, /* HAVING */ + ORDER = 267, /* ORDER */ + TABLE = 268, /* TABLE */ + TABLES = 269, /* TABLES */ + INDEX = 270, /* INDEX */ + CALC = 271, /* CALC */ + SELECT = 272, /* SELECT */ + DESC = 273, /* DESC */ + SHOW = 274, /* SHOW */ + SYNC = 275, /* SYNC */ + INSERT = 276, /* INSERT */ + DELETE = 277, /* DELETE */ + UPDATE = 278, /* UPDATE */ + LBRACE = 279, /* LBRACE */ + RBRACE = 280, /* RBRACE */ + COMMA = 281, /* COMMA */ + TRX_BEGIN = 282, /* TRX_BEGIN */ + TRX_COMMIT = 283, /* TRX_COMMIT */ + TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ + INT_T = 285, /* INT_T */ + IN = 286, /* IN */ + STRING_T = 287, /* STRING_T */ + FLOAT_T = 288, /* FLOAT_T */ + DATE_T = 289, /* DATE_T */ + TEXT_T = 290, /* TEXT_T */ + NOT = 291, /* NOT */ + UNIQUE = 292, /* UNIQUE */ + NULL_T = 293, /* NULL_T */ + NULLABLE = 294, /* NULLABLE */ + HELP = 295, /* HELP */ + EXIT = 296, /* EXIT */ + DOT = 297, /* DOT */ + INTO = 298, /* INTO */ + VALUES = 299, /* VALUES */ + FROM = 300, /* FROM */ + WHERE = 301, /* WHERE */ + AND = 302, /* AND */ + OR = 303, /* OR */ + SET = 304, /* SET */ + ON = 305, /* ON */ + LOAD = 306, /* LOAD */ + DATA = 307, /* DATA */ + INFILE = 308, /* INFILE */ + EXPLAIN = 309, /* EXPLAIN */ + STORAGE = 310, /* STORAGE */ + FORMAT = 311, /* FORMAT */ + INNER = 312, /* INNER */ + JOIN = 313, /* JOIN */ + VIEW = 314, /* VIEW */ + EQ = 315, /* EQ */ + LT = 316, /* LT */ + GT = 317, /* GT */ + LE = 318, /* LE */ + GE = 319, /* GE */ + NE = 320, /* NE */ + LIKE = 321, /* LIKE */ + IS = 322, /* IS */ + NUMBER = 323, /* NUMBER */ + FLOAT = 324, /* FLOAT */ + ID = 325, /* ID */ + SSS = 326, /* SSS */ + UMINUS = 327 /* UMINUS */ +}; +typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 163 "yacc_sql.y" - - ParsedSqlNode * sql_node; - Value * value; - enum CompOp comp; - RelAttrSqlNode * rel_attr; - std::vector * attr_infos; - AttrInfoSqlNode * attr_info; - Expression * expression; - std::vector> * expression_list; - std::vector * value_list; - std::vector> * values_list; - SetClauseSqlNode * set_clause; - std::vector * set_clauses; - JoinSqlNode * join_clauses; - std::vector * rel_attr_list; - std::vector * relation_list; - OrderBySqlNode * orderby_unit; - std::vector * orderby_list; - char * string; - int number; - float floats; - bool nullable_info; - std::vector * index_attr_list; - bool unique; - -#line 161 "yacc_sql.hpp" - +#line 164 "yacc_sql.y" + + ParsedSqlNode *sql_node; + Value *value; + enum CompOp comp; + RelAttrSqlNode *rel_attr; + std::vector *attr_infos; + AttrInfoSqlNode *attr_info; + Expression *expression; + std::vector> *expression_list; + std::vector *value_list; + std::vector> *values_list; + SetClauseSqlNode *set_clause; + std::vector *set_clauses; + JoinSqlNode *join_clauses; + std::vector *rel_attr_list; + std::vector *relation_list; + OrderBySqlNode *orderby_unit; + std::vector *orderby_list; + char *string; + int number; + float floats; + bool nullable_info; + std::vector *index_attr_list; + bool unique; + +#line 162 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 +#define YYSTYPE_IS_TRIVIAL 1 +#define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -175,14 +175,10 @@ struct YYLTYPE int last_line; int last_column; }; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 +#define YYLTYPE_IS_DECLARED 1 +#define YYLTYPE_IS_TRIVIAL 1 #endif - - - -int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); - +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 332ff3ce..a47481ce 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -150,6 +150,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, FORMAT INNER JOIN + VIEW EQ LT GT @@ -235,6 +236,8 @@ ParsedSqlNode *create_table_sql_node(char *table_name, %type create_index_stmt %type drop_index_stmt %type show_index_stmt +%type create_view_stmt +%type drop_view_stmt %type sync_stmt %type begin_stmt %type commit_stmt @@ -276,6 +279,8 @@ command_wrapper: | create_index_stmt | drop_index_stmt | show_index_stmt + | create_view_stmt + | drop_view_stmt | sync_stmt | begin_stmt | commit_stmt @@ -420,6 +425,27 @@ create_table_stmt: /*create table 语句的语法解析树*/ $$ = create_table_sql_node($3, nullptr, nullptr, $4, $5); } ; + +create_view_stmt: + CREATE VIEW ID AS select_stmt + { + $$ = new ParsedSqlNode(SCF_CREATE_VIEW); + CreateViewSqlNode &create_view = $$->create_view; + create_view.relation_name = $3; + create_view.create_view_select = std::make_unique(std::move($5->selection)); + free($3); + } + ; + +drop_view_stmt: + DROP VIEW ID + { + $$ = new ParsedSqlNode(SCF_DROP_VIEW); + $$->drop_view.relation_name = $3; + free($3); + } + ; + attr_def_list: /* empty */ { From 134e8b0dd6c1cef03cd9dbc16c74a714751b052b Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 12 Oct 2024 17:33:00 +0800 Subject: [PATCH 210/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=9F=E5=8F=B7?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E7=9A=84=E6=97=B6=E5=80=99right=5F=E8=A2=AB?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 22 +++++++++------- src/observer/sql/parser/expression_binder.cpp | 26 +++++++------------ 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index cfd77c43..ee83d2e3 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -244,7 +244,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) return rc; } DEFER(if (nullptr != left_subquery_expr) left_subquery_expr->close(); - if (nullptr != right_subquery_expr) right_subquery_expr->close();); + if (nullptr != right_subquery_expr) right_subquery_expr->close();); // Get the value of the left expression rc = left_->get_value(tuple, left_value); @@ -560,15 +560,19 @@ RC ArithmeticExpr::get_value(const Tuple &tuple, Value &value) Value left_value; Value right_value; - rc = left_->get_value(tuple, left_value); - if (rc != RC::SUCCESS) { - LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); - return rc; + if (left_) { + rc = left_->get_value(tuple, left_value); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to get value of left expression. rc=%s", strrc(rc)); + return rc; + } } - rc = right_->get_value(tuple, right_value); - if (rc != RC::SUCCESS) { - LOG_WARN("failed to get value of right expression. rc=%s", strrc(rc)); - return rc; + if (right_) { + rc = right_->get_value(tuple, right_value); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to get value of right expression. rc=%s", strrc(rc)); + return rc; + } } return calc_value(left_value, right_value, value); } diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index f07e45c8..08322481 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -300,14 +300,11 @@ RC ExpressionBinder::bind_comparison_expression( return rc; } - if (child_bound_expressions.size() != 1) { - LOG_WARN("invalid right children number of comparison expression: %d", child_bound_expressions.size()); - return RC::INVALID_ARGUMENT; - } - - unique_ptr &right = child_bound_expressions[0]; - if (right.get() != right_expr.get()) { - right_expr = std::move(right); + if (child_bound_expressions.size() == 1) { + unique_ptr &right = child_bound_expressions[0]; + if (right.get() != right_expr.get()) { + right_expr = std::move(right); + } } bound_expressions.emplace_back(std::move(expr)); @@ -384,14 +381,11 @@ RC ExpressionBinder::bind_arithmetic_expression( return rc; } - if (child_bound_expressions.size() != 1) { - LOG_WARN("invalid right children number of comparison expression: %d", child_bound_expressions.size()); - return RC::INVALID_ARGUMENT; - } - - unique_ptr &right = child_bound_expressions[0]; - if (right.get() != right_expr.get()) { - right_expr = std::move(right); + if (child_bound_expressions.size() == 1) { + unique_ptr &right = child_bound_expressions[0]; + if (right.get() != right_expr.get()) { + right_expr = std::move(right); + } } bound_expressions.emplace_back(std::move(expr)); From d96828fcc60f611be4b83a88776b471816986542 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 12 Oct 2024 17:41:45 +0800 Subject: [PATCH 211/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=9F=E5=8F=B7?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E7=9A=84=E6=97=B6=E5=80=99right=5F=E8=A2=AB?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression_iterator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/expr/expression_iterator.cpp b/src/observer/sql/expr/expression_iterator.cpp index 3a04847b..cdbdd1f7 100644 --- a/src/observer/sql/expr/expression_iterator.cpp +++ b/src/observer/sql/expr/expression_iterator.cpp @@ -53,7 +53,7 @@ RC ExpressionIterator::iterate_child_expr(Expression &expr, const function(expr); rc = callback(arithmetic_expr.left()); - if (OB_SUCC(rc)) { + if (OB_SUCC(rc) && arithmetic_expr.right()) { rc = callback(arithmetic_expr.right()); } } break; From a86053be18d416ceaecb5c269a9e7dc522626dee Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 12 Oct 2024 18:37:36 +0800 Subject: [PATCH 212/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D1/0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 1 + src/observer/common/type/float_type.cpp | 4 ++++ src/observer/sql/expr/expression.cpp | 13 ++++++------- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 57208e3e..bdc3f479 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -29,6 +29,7 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(INTERNAL) \ DEFINE_RC(NOMEM) \ DEFINE_RC(NOTFOUND) \ + DEFINE_RC(NUMBER_DIV_ZERO) \ DEFINE_RC(EMPTY) \ DEFINE_RC(ERROR_DATE) \ DEFINE_RC(FULL) \ diff --git a/src/observer/common/type/float_type.cpp b/src/observer/common/type/float_type.cpp index 93debb27..375903f6 100644 --- a/src/observer/common/type/float_type.cpp +++ b/src/observer/common/type/float_type.cpp @@ -45,6 +45,10 @@ RC FloatType::multiply(const Value &left, const Value &right, Value &result) con RC FloatType::divide(const Value &left, const Value &right, Value &result) const { + cout << right.get_float() << endl; + if (right.get_float() < 0.001 && right.get_float() > -0.001) { + return RC::NUMBER_DIV_ZERO; + } if (right.get_float() > -EPSILON && right.get_float() < EPSILON) { // NOTE: // 设置为浮点数最大值是不正确的。通常的做法是设置为NULL,但是当前的miniob没有NULL概念,所以这里设置为浮点数最大值。 diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index ee83d2e3..2dc70ed0 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -458,28 +458,27 @@ RC ArithmeticExpr::calc_value(const Value &left_value, const Value &right_value, switch (arithmetic_type_) { case Type::ADD: { - Value::add(left_value, right_value, value); + return Value::add(left_value, right_value, value); } break; case Type::SUB: { - Value::subtract(left_value, right_value, value); + return Value::subtract(left_value, right_value, value); } break; case Type::MUL: { - Value::multiply(left_value, right_value, value); + return Value::multiply(left_value, right_value, value); } break; case Type::DIV: { - Value::divide(left_value, right_value, value); + return Value::divide(left_value, right_value, value); } break; case Type::NEGATIVE: { - Value::negative(left_value, value); + return Value::negative(left_value, value); } break; default: { - rc = RC::INTERNAL; - LOG_WARN("unsupported arithmetic type. %d", arithmetic_type_); + return RC::INTERNAL; } break; } return rc; From 05d65e5ca6f6bae1967d7e02965f31acdf91457f Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 12 Oct 2024 18:53:57 +0800 Subject: [PATCH 213/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8D1/0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/float_type.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/observer/common/type/float_type.cpp b/src/observer/common/type/float_type.cpp index 375903f6..9be211d0 100644 --- a/src/observer/common/type/float_type.cpp +++ b/src/observer/common/type/float_type.cpp @@ -45,17 +45,16 @@ RC FloatType::multiply(const Value &left, const Value &right, Value &result) con RC FloatType::divide(const Value &left, const Value &right, Value &result) const { - cout << right.get_float() << endl; - if (right.get_float() < 0.001 && right.get_float() > -0.001) { - return RC::NUMBER_DIV_ZERO; + if (right.get_float() < 0.0001 && right.get_float() > -0.0001) { + result.set_null(); + return RC::SUCCESS; } if (right.get_float() > -EPSILON && right.get_float() < EPSILON) { - // NOTE: - // 设置为浮点数最大值是不正确的。通常的做法是设置为NULL,但是当前的miniob没有NULL概念,所以这里设置为浮点数最大值。 - result.set_float(numeric_limits::max()); - } else { - result.set_float(left.get_float() / right.get_float()); + result.set_null(); + return RC::SUCCESS; } + + result.set_float(left.get_float() / right.get_float()); return RC::SUCCESS; } From 709796c837c4c38b78d4e6ed0ca7963ea8ca8a3c Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 12 Oct 2024 19:07:57 +0800 Subject: [PATCH 214/308] =?UTF-8?q?null=20calc=5Fvalue=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 2dc70ed0..4b75bd7e 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -452,6 +452,10 @@ AttrType ArithmeticExpr::value_type() const RC ArithmeticExpr::calc_value(const Value &left_value, const Value &right_value, Value &value) const { RC rc = RC::SUCCESS; + if (left_value.is_null() || right_value.is_null()) { + value.set_null(true); + return RC::SUCCESS; + } const AttrType target_type = value_type(); value.set_type(target_type); From 023a8d258b8a162387d2273f936522c007451b50 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 12 Oct 2024 19:45:12 +0800 Subject: [PATCH 215/308] find . -name "*.cpp" -o -name "*.h" | xargs clang-format -i --- src/observer/common/rc.h | 2 +- src/observer/net/sql_task_handler.h | 4 ++-- src/observer/sql/expr/tuple.h | 5 +---- .../sql/operator/order_by_logical_operator.h | 6 +++--- .../sql/operator/order_by_physical_operator.h | 8 ++++---- .../storage/buffer/double_write_buffer.cpp | 6 +++--- src/observer/storage/clog/log_buffer.h | 2 +- src/observer/storage/record/record_manager.h | 16 ++++++++-------- 8 files changed, 23 insertions(+), 26 deletions(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index bdc3f479..1b83efd5 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -29,7 +29,7 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(INTERNAL) \ DEFINE_RC(NOMEM) \ DEFINE_RC(NOTFOUND) \ - DEFINE_RC(NUMBER_DIV_ZERO) \ + DEFINE_RC(NUMBER_DIV_ZERO) \ DEFINE_RC(EMPTY) \ DEFINE_RC(ERROR_DATE) \ DEFINE_RC(FULL) \ diff --git a/src/observer/net/sql_task_handler.h b/src/observer/net/sql_task_handler.h index b296fe35..e591f4ef 100644 --- a/src/observer/net/sql_task_handler.h +++ b/src/observer/net/sql_task_handler.h @@ -50,6 +50,6 @@ class SqlTaskHandler QueryCacheStage query_cache_stage_; /// 查询缓存阶段 ParseStage parse_stage_; /// 解析阶段。将SQL解析成语法树 ParsedSqlNode ResolveStage resolve_stage_; /// 解析阶段。将语法树解析成Stmt(statement) - OptimizeStage optimize_stage_; /// 优化阶段。将语句优化成执行计划,包含规则优化和物理优化 - ExecuteStage execute_stage_; /// 执行阶段 + OptimizeStage optimize_stage_; /// 优化阶段。将语句优化成执行计划,包含规则优化和物理优化 + ExecuteStage execute_stage_; /// 执行阶段 }; \ No newline at end of file diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index bf0edc28..d9815e5d 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -468,10 +468,7 @@ class SplicedTuple : public Tuple void set_cells(const std::vector &cells) { cells_ = cells; } - int cell_num() const override - { - return cells_.size(); - } + int cell_num() const override { return cells_.size(); } RC cell_at(int index, Value &cell) const override { diff --git a/src/observer/sql/operator/order_by_logical_operator.h b/src/observer/sql/operator/order_by_logical_operator.h index 5cced75c..142fa540 100644 --- a/src/observer/sql/operator/order_by_logical_operator.h +++ b/src/observer/sql/operator/order_by_logical_operator.h @@ -23,7 +23,7 @@ See the Mulan PSL v2 for more details. */ class OrderByLogicalOperator : public LogicalOperator { public: - OrderByLogicalOperator(std::vector order_by, const std::vector exprs) + OrderByLogicalOperator(std::vector order_by, const std::vector exprs) : order_by_(std::move(order_by)), exprs_(std::move(exprs)) {} @@ -31,11 +31,11 @@ class OrderByLogicalOperator : public LogicalOperator std::vector &order_by() { return order_by_; } - std::vector &exprs() { return exprs_; } + std::vector &exprs() { return exprs_; } private: std::vector order_by_; /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr - std::vector exprs_; + std::vector exprs_; }; \ No newline at end of file diff --git a/src/observer/sql/operator/order_by_physical_operator.h b/src/observer/sql/operator/order_by_physical_operator.h index dee6b839..e9adadb2 100644 --- a/src/observer/sql/operator/order_by_physical_operator.h +++ b/src/observer/sql/operator/order_by_physical_operator.h @@ -18,7 +18,7 @@ See the Mulan PSL v2 for more details. */ class OrderByPhysicalOperator : public PhysicalOperator { public: - OrderByPhysicalOperator(std::vector order_by, std::vector exprs); + OrderByPhysicalOperator(std::vector order_by, std::vector exprs); virtual ~OrderByPhysicalOperator() = default; @@ -26,7 +26,7 @@ class OrderByPhysicalOperator : public PhysicalOperator std::vector &order_by() { return order_by_; } - std::vector &exprs() { return exprs_; } + std::vector &exprs() { return exprs_; } RC fetch_and_sort_tables(); RC open(Trx *trx) override; @@ -39,10 +39,10 @@ class OrderByPhysicalOperator : public PhysicalOperator std::vector order_by_; /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr - std::vector exprs_; + std::vector exprs_; std::vector> values_; std::vector>::iterator it_; - SplicedTuple tuple_; + SplicedTuple tuple_; }; \ No newline at end of file diff --git a/src/observer/storage/buffer/double_write_buffer.cpp b/src/observer/storage/buffer/double_write_buffer.cpp index f1120455..73447382 100644 --- a/src/observer/storage/buffer/double_write_buffer.cpp +++ b/src/observer/storage/buffer/double_write_buffer.cpp @@ -32,9 +32,9 @@ struct DoubleWritePage public: DoubleWritePageKey key; - int32_t page_index = -1; /// 页面在double write buffer文件中的页索引 - bool valid = true; /// 表示页面是否有效,在页面被删除时,需要同时标记磁盘上的值。 - Page page; + int32_t page_index = -1; /// 页面在double write buffer文件中的页索引 + bool valid = true; /// 表示页面是否有效,在页面被删除时,需要同时标记磁盘上的值。 + Page page; static const int32_t SIZE; }; diff --git a/src/observer/storage/clog/log_buffer.h b/src/observer/storage/clog/log_buffer.h index 77cfe575..3bda71eb 100644 --- a/src/observer/storage/clog/log_buffer.h +++ b/src/observer/storage/clog/log_buffer.h @@ -68,7 +68,7 @@ class LogEntryBuffer LSN flushed_lsn() const { return flushed_lsn_.load(); } private: - mutex mutex_; /// 当前数据结构一定会在多线程中访问,所以强制使用有效的锁,而不是有条件生效的common::Mutex + mutex mutex_; /// 当前数据结构一定会在多线程中访问,所以强制使用有效的锁,而不是有条件生效的common::Mutex deque entries_; /// 日志缓冲区 atomic bytes_; /// 当前缓冲区中的日志数据大小 diff --git a/src/observer/storage/record/record_manager.h b/src/observer/storage/record/record_manager.h index 8228464a..a7bae40c 100644 --- a/src/observer/storage/record/record_manager.h +++ b/src/observer/storage/record/record_manager.h @@ -262,11 +262,11 @@ class RecordPageHandler protected: DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前操作的buffer pool(文件) RecordLogHandler log_handler_; ///< 当前操作的日志处理器 - Frame *frame_ = nullptr; ///< 当前操作页面关联的frame(frame的更多概念可以参考buffer pool和frame) - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 当前的操作是否都是只读的 - PageHeader *page_header_ = nullptr; ///< 当前页面上页面头 - char *bitmap_ = nullptr; ///< 当前页面上record分配状态信息bitmap内存起始位置 - StorageFormat storage_format_; + Frame *frame_ = nullptr; ///< 当前操作页面关联的frame(frame的更多概念可以参考buffer pool和frame) + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 当前的操作是否都是只读的 + PageHeader *page_header_ = nullptr; ///< 当前页面上页面头 + char *bitmap_ = nullptr; ///< 当前页面上record分配状态信息bitmap内存起始位置 + StorageFormat storage_format_; protected: friend class RecordPageIterator; @@ -424,7 +424,7 @@ class RecordFileHandler DiskBufferPool *disk_buffer_pool_ = nullptr; LogHandler *log_handler_ = nullptr; ///< 记录日志的处理器 unordered_set free_pages_; ///< 没有填充满的页面集合 - common::Mutex lock_; ///< 当编译时增加-DCONCURRENCY=ON 选项时,才会真正的支持并发 + common::Mutex lock_; ///< 当编译时增加-DCONCURRENCY=ON 选项时,才会真正的支持并发 StorageFormat storage_format_; TableMeta *table_meta_; }; @@ -484,7 +484,7 @@ class RecordFileScanner DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前访问的文件 Trx *trx_ = nullptr; ///< 当前是哪个事务在遍历 LogHandler *log_handler_ = nullptr; - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 BufferPoolIterator bp_iterator_; ///< 遍历buffer pool的所有页面 ConditionFilter *condition_filter_ = nullptr; ///< 过滤record @@ -522,7 +522,7 @@ class ChunkFileScanner DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前访问的文件 LogHandler *log_handler_ = nullptr; - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 BufferPoolIterator bp_iterator_; ///< 遍历buffer pool的所有页面 RecordPageHandler *record_page_handler_ = nullptr; ///< 处理文件某页面的记录 From aa73944a3ad89113b5c2f1c7a7859350306223b5 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 12 Oct 2024 19:47:44 +0800 Subject: [PATCH 216/308] remove Value::set_null --- src/observer/common/value.cpp | 3 --- src/observer/common/value.h | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 9205074e..4497601d 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -157,9 +157,6 @@ void Value::set_data(char *data, int length) } } -// 用于其他类型转成 null 值,但不是 null 类型 -void Value::set_null() { is_null_ = true; } - void Value::set_int(int val) { reset(); diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 47d2891e..7856f6b0 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -98,7 +98,7 @@ class Value final void set_data(const char *data, int length) { this->set_data(const_cast(data), length); } void set_value(const Value &value); void set_boolean(bool val); - void set_null(bool is_null) { is_null_ = is_null; } + void set_null(bool is_null = true) { is_null_ = is_null; } string to_string() const; @@ -134,7 +134,6 @@ class Value final } private: - void set_null(); void set_int(int val); void set_float(float val); void set_date(int val); From f9b455c2a8fbaa8eaf78e7a897f99489b1d50699 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 12 Oct 2024 23:01:13 +0800 Subject: [PATCH 217/308] =?UTF-8?q?test:=20=E4=BF=AE=E5=A4=8D=20basic=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=8C=E9=99=A4=200=20=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=20null=20=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/basic.result | 4 ++-- test/case/test/basic.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/case/result/basic.result b/test/case/result/basic.result index 83ef38c0..99a88aa5 100644 --- a/test/case/result/basic.result +++ b/test/case/result/basic.result @@ -128,10 +128,10 @@ calc (1+2) * (2 * (20+-(5*1))); 90 calc 20/0; 20/0 -340282346638528859811704183484516925440 +NULL calc 13.2/0.0; 13.2/0.0 -340282346638528859811704183484516925440 +NULL calc "123" + 4; "123" + 4 127 diff --git a/test/case/test/basic.test b/test/case/test/basic.test index 5d7ddd02..dab4ccd2 100644 --- a/test/case/test/basic.test +++ b/test/case/test/basic.test @@ -48,4 +48,4 @@ calc (1+2) * (2 * (20+-(5*1))); calc 20/0; calc 13.2/0.0; calc "123" + 4; -calc "abc" + 4; \ No newline at end of file +calc "abc" + 4; From 5e1b9b769e506970947ca49f10fbecfb207b9941 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 12 Oct 2024 23:05:52 +0800 Subject: [PATCH 218/308] =?UTF-8?q?test:=20=E4=BF=AE=E5=A4=8D=20update=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=8C=E5=AD=97=E7=AC=A6=E4=B8=B2=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E6=95=B0=E5=AD=97=E5=A4=B1=E8=B4=A5=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E4=B8=BA=200=20=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-update.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/case/result/primary-update.result b/test/case/result/primary-update.result index 86b2069c..c95cb54f 100644 --- a/test/case/result/primary-update.result +++ b/test/case/result/primary-update.result @@ -78,4 +78,4 @@ ID | T_NAME | COL1 | COL2 10. UPDATE WITH INVALID VALUE UPDATE Update_table_1 SET col1='N01' WHERE id=1; -FAILURE +SUCCESS From c1ca28effa3d611b06ba0770b223f4e0debf53ac Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 12 Oct 2024 23:48:55 +0800 Subject: [PATCH 219/308] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=88=96=E6=8F=92=E5=85=A5=E5=AD=97=E6=AE=B5=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E9=95=BF=E5=BA=A6=E6=A0=A1=E9=AA=8C=E6=97=B6=E7=94=B1?= =?UTF-8?q?=E4=BA=8E=E5=8C=85=E5=90=AB=20null=20=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E4=BD=8D=E5=8F=AF=E8=83=BD=E5=AF=BC=E8=87=B4=E7=9A=84=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/net/sql_task_handler.h | 4 +- src/observer/sql/expr/expression.cpp | 2 +- .../sql/operator/update_physical_operator.cpp | 5 +- src/observer/sql/parser/lex_sql.cpp | 5507 +++++++++++------ src/observer/sql/parser/lex_sql.h | 244 +- src/observer/sql/parser/yacc_sql.cpp | 5000 ++++++++++----- src/observer/sql/parser/yacc_sql.hpp | 225 +- .../storage/buffer/double_write_buffer.cpp | 6 +- src/observer/storage/clog/log_buffer.h | 2 +- src/observer/storage/record/record_manager.h | 16 +- src/observer/storage/table/table.cpp | 49 +- 11 files changed, 7482 insertions(+), 3578 deletions(-) diff --git a/src/observer/net/sql_task_handler.h b/src/observer/net/sql_task_handler.h index e591f4ef..b296fe35 100644 --- a/src/observer/net/sql_task_handler.h +++ b/src/observer/net/sql_task_handler.h @@ -50,6 +50,6 @@ class SqlTaskHandler QueryCacheStage query_cache_stage_; /// 查询缓存阶段 ParseStage parse_stage_; /// 解析阶段。将SQL解析成语法树 ParsedSqlNode ResolveStage resolve_stage_; /// 解析阶段。将语法树解析成Stmt(statement) - OptimizeStage optimize_stage_; /// 优化阶段。将语句优化成执行计划,包含规则优化和物理优化 - ExecuteStage execute_stage_; /// 执行阶段 + OptimizeStage optimize_stage_; /// 优化阶段。将语句优化成执行计划,包含规则优化和物理优化 + ExecuteStage execute_stage_; /// 执行阶段 }; \ No newline at end of file diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 4b75bd7e..67341e36 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -244,7 +244,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) return rc; } DEFER(if (nullptr != left_subquery_expr) left_subquery_expr->close(); - if (nullptr != right_subquery_expr) right_subquery_expr->close();); + if (nullptr != right_subquery_expr) right_subquery_expr->close();); // Get the value of the left expression rc = left_->get_value(tuple, left_value); diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index 583cc8f7..d8a6f055 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -97,7 +97,10 @@ RC UpdatePhysicalOperator::open(Trx *trx) } // 转换成功 value = std::move(to_value); - } else if (value.length() > field_meta.len()) { + } + + // 进行长度校验 + if (value.length() > field_meta.len() - field_meta.nullable()) { LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", field_meta.name(), attr_type_to_string(field_meta.type()), diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 828d2614..a0ed0b54 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,23 +8,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -77,62 +75,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -156,12 +154,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -189,7 +187,7 @@ typedef void* yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_NEW_FILE yyrestart(yyin, yyscanner) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -207,7 +205,7 @@ typedef void* yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -222,88 +220,85 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - + +#define YY_LESS_LINENO(n) +#define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } while (0) +#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - - }; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -312,59 +307,55 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) +#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner); +static void yy_load_buffer_state(yyscan_t yyscanner); +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -372,318 +363,2447 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state(yyscan_t yyscanner); +static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); +static int yy_get_next_buffer(yyscan_t yyscanner); +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t)(yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 78 #define YY_END_OF_BUFFER 79 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[227] = - { 0, - 0, 0, 0, 0, 79, 77, 1, 2, 77, 77, - 77, 57, 58, 73, 71, 59, 72, 6, 74, 3, - 5, 64, 60, 66, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 78, 63, 0, 75, 0, 76, - 0, 3, 61, 62, 65, 70, 70, 70, 49, 70, - 48, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 51, 68, 70, 70, 70, - 70, 70, 15, 23, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 4, 22, 50, 70, 70, - - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 33, - 70, 70, 70, 67, 70, 70, 70, 70, 29, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 19, - 34, 70, 70, 42, 36, 70, 9, 11, 70, 7, - 70, 70, 70, 20, 70, 70, 8, 70, 70, 70, - 70, 25, 56, 69, 41, 39, 70, 70, 70, 16, - 70, 17, 70, 37, 70, 70, 70, 70, 30, 70, - 70, 70, 70, 70, 35, 70, 45, 70, 14, 70, - 55, 70, 70, 47, 70, 70, 70, 12, 70, 70, - - 70, 21, 31, 10, 27, 52, 70, 54, 46, 43, - 24, 70, 70, 18, 70, 13, 38, 28, 26, 44, - 70, 70, 53, 40, 32, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, - 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, - - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[71] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 - } ; - -static const flex_int16_t yy_base[232] = - { 0, - 0, 0, 0, 0, 615, 616, 616, 616, 596, 608, - 606, 616, 616, 616, 616, 616, 616, 616, 616, 58, - 616, 56, 616, 593, 57, 61, 62, 63, 64, 83, - 65, 73, 91, 76, 595, 117, 119, 115, 103, 142, - 134, 129, 66, 112, 616, 616, 604, 616, 602, 616, - 592, 79, 616, 616, 616, 0, 591, 145, 160, 141, - 590, 158, 176, 155, 182, 161, 183, 168, 188, 184, - 190, 186, 195, 189, 194, 242, 589, 196, 204, 216, - 220, 230, 588, 243, 233, 237, 239, 248, 255, 222, - 257, 256, 263, 264, 259, 587, 586, 585, 283, 274, - - 282, 288, 298, 308, 300, 312, 290, 301, 302, 315, - 316, 321, 289, 328, 327, 323, 342, 348, 352, 334, - 354, 356, 360, 584, 362, 366, 369, 371, 583, 349, - 370, 377, 374, 388, 382, 395, 389, 386, 397, 582, - 581, 396, 393, 580, 572, 399, 571, 569, 407, 567, - 419, 413, 420, 566, 422, 421, 565, 405, 428, 430, - 432, 564, 561, 560, 557, 448, 436, 455, 460, 556, - 464, 555, 447, 553, 446, 462, 466, 472, 552, 474, - 476, 483, 473, 477, 550, 489, 548, 326, 546, 491, - 541, 499, 488, 531, 503, 504, 506, 502, 505, 510, - - 509, 530, 445, 427, 262, 226, 515, 224, 223, 218, - 202, 521, 529, 157, 535, 146, 132, 127, 126, 123, - 538, 527, 120, 89, 88, 616, 588, 590, 592, 99, - 82 - } ; - -static const flex_int16_t yy_def[232] = - { 0, - 226, 1, 227, 227, 226, 226, 226, 226, 226, 228, - 229, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 226, 226, 228, 226, 229, 226, - 226, 226, 226, 226, 226, 231, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 226, 230, 230, 230, 230, - - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 0, 226, 226, 226, 226, - 226 - } ; - -static const flex_int16_t yy_nxt[687] = - { 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, - 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, - 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, - 51, 56, 52, 53, 54, 56, 56, 56, 56, 56, - 56, 62, 66, 56, 60, 94, 67, 56, 63, 58, - 56, 51, 74, 52, 59, 64, 75, 56, 65, 68, - - 57, 73, 56, 56, 61, 56, 69, 62, 66, 78, - 60, 94, 67, 70, 63, 58, 71, 56, 74, 72, - 59, 64, 75, 76, 65, 68, 56, 73, 77, 56, - 61, 56, 69, 56, 56, 78, 85, 56, 95, 70, - 56, 56, 71, 56, 79, 72, 56, 83, 56, 76, - 80, 84, 81, 90, 77, 56, 56, 91, 82, 56, - 56, 92, 85, 93, 95, 86, 99, 97, 87, 56, - 79, 56, 56, 83, 56, 56, 80, 84, 81, 90, - 88, 98, 56, 91, 82, 89, 102, 92, 100, 93, - 56, 86, 99, 97, 87, 101, 56, 56, 56, 104, - - 56, 107, 56, 56, 56, 103, 88, 98, 56, 56, - 56, 89, 102, 105, 100, 108, 56, 110, 56, 112, - 106, 101, 109, 121, 115, 104, 111, 107, 113, 114, - 56, 103, 56, 122, 56, 123, 56, 56, 56, 105, - 56, 108, 133, 110, 56, 112, 106, 56, 109, 121, - 115, 56, 111, 56, 113, 114, 56, 56, 124, 122, - 125, 123, 56, 127, 116, 126, 117, 128, 133, 56, - 56, 56, 130, 56, 118, 129, 56, 56, 56, 119, - 120, 131, 138, 135, 124, 136, 125, 132, 56, 127, - 116, 126, 117, 128, 137, 140, 56, 56, 130, 134, - - 118, 129, 56, 56, 56, 119, 120, 131, 138, 135, - 139, 136, 56, 132, 56, 56, 56, 143, 141, 142, - 137, 140, 56, 146, 148, 134, 56, 144, 155, 56, - 56, 145, 151, 147, 152, 56, 139, 56, 149, 150, - 56, 56, 56, 143, 141, 142, 158, 153, 56, 146, - 148, 209, 154, 144, 155, 156, 56, 145, 151, 147, - 152, 157, 56, 56, 149, 150, 56, 162, 56, 159, - 56, 160, 158, 153, 56, 161, 56, 209, 154, 164, - 56, 156, 165, 56, 56, 56, 163, 157, 56, 167, - 170, 56, 166, 162, 169, 159, 56, 160, 172, 168, - - 56, 161, 56, 56, 173, 164, 171, 56, 165, 56, - 56, 56, 163, 56, 176, 167, 170, 175, 166, 56, - 169, 56, 178, 180, 172, 168, 174, 56, 177, 179, - 173, 181, 171, 56, 56, 56, 56, 182, 184, 186, - 176, 56, 56, 175, 56, 183, 56, 189, 178, 180, - 56, 185, 174, 188, 177, 179, 187, 181, 190, 56, - 56, 56, 56, 182, 184, 186, 191, 193, 192, 56, - 198, 183, 194, 189, 56, 195, 56, 185, 56, 188, - 56, 196, 187, 197, 190, 199, 56, 56, 56, 201, - 56, 56, 191, 193, 192, 202, 198, 56, 194, 204, - - 200, 195, 56, 56, 207, 56, 205, 196, 212, 197, - 206, 199, 203, 56, 210, 201, 56, 56, 56, 56, - 56, 202, 213, 56, 56, 204, 200, 208, 217, 56, - 207, 215, 205, 218, 212, 56, 206, 211, 203, 216, - 210, 56, 214, 56, 56, 56, 219, 220, 213, 56, - 222, 221, 56, 208, 217, 56, 225, 215, 223, 218, - 56, 224, 56, 211, 56, 216, 56, 56, 214, 56, - 56, 56, 219, 220, 56, 56, 222, 221, 56, 56, - 56, 56, 225, 56, 223, 56, 56, 224, 45, 45, - 47, 47, 49, 49, 56, 56, 56, 56, 56, 56, - - 56, 96, 56, 56, 56, 56, 96, 50, 48, 56, - 55, 50, 48, 46, 226, 5, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226 - } ; - -static const flex_int16_t yy_chk[687] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, - 43, 27, 28, 231, 26, 43, 28, 32, 27, 25, - 34, 52, 32, 52, 25, 27, 32, 30, 27, 28, - - 230, 31, 225, 224, 26, 33, 29, 27, 28, 34, - 26, 43, 28, 30, 27, 25, 30, 39, 32, 30, - 25, 27, 32, 33, 27, 28, 44, 31, 33, 38, - 26, 36, 29, 37, 223, 34, 39, 220, 44, 30, - 219, 218, 30, 42, 36, 30, 217, 38, 41, 33, - 36, 38, 37, 41, 33, 60, 40, 41, 37, 58, - 216, 42, 39, 42, 44, 40, 60, 58, 40, 64, - 36, 214, 62, 38, 59, 66, 36, 38, 37, 41, - 40, 59, 68, 41, 37, 40, 64, 42, 62, 42, - 63, 40, 60, 58, 40, 63, 65, 67, 70, 66, - - 72, 68, 69, 74, 71, 65, 40, 59, 75, 73, - 78, 40, 64, 67, 62, 69, 211, 70, 79, 72, - 67, 63, 69, 78, 75, 66, 71, 68, 73, 74, - 80, 65, 210, 79, 81, 80, 90, 209, 208, 67, - 206, 69, 90, 70, 82, 72, 67, 85, 69, 78, - 75, 86, 71, 87, 73, 74, 76, 84, 81, 79, - 82, 80, 88, 85, 76, 84, 76, 86, 90, 89, - 92, 91, 87, 95, 76, 86, 205, 93, 94, 76, - 76, 88, 95, 92, 81, 93, 82, 89, 100, 85, - 76, 84, 76, 86, 94, 100, 101, 99, 87, 91, - - 76, 86, 102, 113, 107, 76, 76, 88, 95, 92, - 99, 93, 103, 89, 105, 108, 109, 103, 101, 102, - 94, 100, 104, 105, 107, 91, 106, 104, 113, 110, - 111, 104, 109, 106, 110, 112, 99, 116, 108, 108, - 188, 115, 114, 103, 101, 102, 116, 111, 120, 105, - 107, 188, 112, 104, 113, 114, 117, 104, 109, 106, - 110, 115, 118, 130, 108, 108, 119, 120, 121, 117, - 122, 118, 116, 111, 123, 119, 125, 188, 112, 122, - 126, 114, 123, 127, 131, 128, 121, 115, 133, 126, - 130, 132, 125, 120, 128, 117, 135, 118, 132, 127, - - 138, 119, 134, 137, 133, 122, 131, 143, 123, 136, - 142, 139, 121, 146, 136, 126, 130, 135, 125, 158, - 128, 149, 138, 142, 132, 127, 134, 152, 137, 139, - 133, 143, 131, 151, 153, 156, 155, 146, 151, 153, - 136, 204, 159, 135, 160, 149, 161, 158, 138, 142, - 167, 152, 134, 156, 137, 139, 155, 143, 159, 203, - 175, 173, 166, 146, 151, 153, 160, 166, 161, 168, - 173, 149, 167, 158, 169, 168, 176, 152, 171, 156, - 177, 169, 155, 171, 159, 175, 178, 183, 180, 177, - 181, 184, 160, 166, 161, 178, 173, 182, 167, 181, - - 176, 168, 193, 186, 184, 190, 182, 169, 193, 171, - 183, 175, 180, 192, 190, 177, 198, 195, 196, 199, - 197, 178, 195, 201, 200, 181, 176, 186, 199, 207, - 184, 197, 182, 200, 193, 212, 183, 192, 180, 198, - 190, 222, 196, 213, 202, 194, 201, 207, 195, 215, - 213, 212, 221, 186, 199, 191, 222, 197, 215, 200, - 189, 221, 187, 192, 185, 198, 179, 174, 196, 172, - 170, 165, 201, 207, 164, 163, 213, 212, 162, 157, - 154, 150, 222, 148, 215, 147, 145, 221, 227, 227, - 228, 228, 229, 229, 144, 141, 140, 129, 124, 98, - - 97, 96, 83, 77, 61, 57, 51, 49, 47, 35, - 24, 11, 10, 9, 5, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226 - } ; +{ + flex_int32_t yy_verify; + flex_int32_t yy_nxt; +}; +static const flex_int16_t yy_accept[227] = {0, + 0, + 0, + 0, + 0, + 79, + 77, + 1, + 2, + 77, + 77, + 77, + 57, + 58, + 73, + 71, + 59, + 72, + 6, + 74, + 3, + 5, + 64, + 60, + 66, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 78, + 63, + 0, + 75, + 0, + 76, + 0, + 3, + 61, + 62, + 65, + 70, + 70, + 70, + 49, + 70, + 48, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 51, + 68, + 70, + 70, + 70, + 70, + 70, + 15, + 23, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 4, + 22, + 50, + 70, + 70, + + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 33, + 70, + 70, + 70, + 67, + 70, + 70, + 70, + 70, + 29, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 19, + 34, + 70, + 70, + 42, + 36, + 70, + 9, + 11, + 70, + 7, + 70, + 70, + 70, + 20, + 70, + 70, + 8, + 70, + 70, + 70, + 70, + 25, + 56, + 69, + 41, + 39, + 70, + 70, + 70, + 16, + 70, + 17, + 70, + 37, + 70, + 70, + 70, + 70, + 30, + 70, + 70, + 70, + 70, + 70, + 35, + 70, + 45, + 70, + 14, + 70, + 55, + 70, + 70, + 47, + 70, + 70, + 70, + 12, + 70, + 70, + + 70, + 21, + 31, + 10, + 27, + 52, + 70, + 54, + 46, + 43, + 24, + 70, + 70, + 18, + 70, + 13, + 38, + 28, + 26, + 44, + 70, + 70, + 53, + 40, + 32, + 0}; + +static const YY_CHAR yy_ec[256] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 3, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 4, + 5, + 1, + 1, + 1, + 1, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 1, + 16, + 17, + 18, + 19, + 1, + 1, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 1, + 1, + 1, + 1, + 45, + 1, + 46, + 47, + 48, + 49, + + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 45, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1}; + +static const YY_CHAR yy_meta[71] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2}; + +static const flex_int16_t yy_base[232] = {0, + 0, + 0, + 0, + 0, + 615, + 616, + 616, + 616, + 596, + 608, + 606, + 616, + 616, + 616, + 616, + 616, + 616, + 616, + 616, + 58, + 616, + 56, + 616, + 593, + 57, + 61, + 62, + 63, + 64, + 83, + 65, + 73, + 91, + 76, + 595, + 117, + 119, + 115, + 103, + 142, + 134, + 129, + 66, + 112, + 616, + 616, + 604, + 616, + 602, + 616, + 592, + 79, + 616, + 616, + 616, + 0, + 591, + 145, + 160, + 141, + 590, + 158, + 176, + 155, + 182, + 161, + 183, + 168, + 188, + 184, + 190, + 186, + 195, + 189, + 194, + 242, + 589, + 196, + 204, + 216, + 220, + 230, + 588, + 243, + 233, + 237, + 239, + 248, + 255, + 222, + 257, + 256, + 263, + 264, + 259, + 587, + 586, + 585, + 283, + 274, + + 282, + 288, + 298, + 308, + 300, + 312, + 290, + 301, + 302, + 315, + 316, + 321, + 289, + 328, + 327, + 323, + 342, + 348, + 352, + 334, + 354, + 356, + 360, + 584, + 362, + 366, + 369, + 371, + 583, + 349, + 370, + 377, + 374, + 388, + 382, + 395, + 389, + 386, + 397, + 582, + 581, + 396, + 393, + 580, + 572, + 399, + 571, + 569, + 407, + 567, + 419, + 413, + 420, + 566, + 422, + 421, + 565, + 405, + 428, + 430, + 432, + 564, + 561, + 560, + 557, + 448, + 436, + 455, + 460, + 556, + 464, + 555, + 447, + 553, + 446, + 462, + 466, + 472, + 552, + 474, + 476, + 483, + 473, + 477, + 550, + 489, + 548, + 326, + 546, + 491, + 541, + 499, + 488, + 531, + 503, + 504, + 506, + 502, + 505, + 510, + + 509, + 530, + 445, + 427, + 262, + 226, + 515, + 224, + 223, + 218, + 202, + 521, + 529, + 157, + 535, + 146, + 132, + 127, + 126, + 123, + 538, + 527, + 120, + 89, + 88, + 616, + 588, + 590, + 592, + 99, + 82}; + +static const flex_int16_t yy_def[232] = {0, + 226, + 1, + 227, + 227, + 226, + 226, + 226, + 226, + 226, + 228, + 229, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 226, + 226, + 228, + 226, + 229, + 226, + 226, + 226, + 226, + 226, + 226, + 231, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 226, + 230, + 230, + 230, + 230, + + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 230, + 0, + 226, + 226, + 226, + 226, + 226}; + +static const flex_int16_t yy_nxt[687] = {0, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 35, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 51, + 56, + 52, + 53, + 54, + 56, + 56, + 56, + 56, + 56, + 56, + 62, + 66, + 56, + 60, + 94, + 67, + 56, + 63, + 58, + 56, + 51, + 74, + 52, + 59, + 64, + 75, + 56, + 65, + 68, + + 57, + 73, + 56, + 56, + 61, + 56, + 69, + 62, + 66, + 78, + 60, + 94, + 67, + 70, + 63, + 58, + 71, + 56, + 74, + 72, + 59, + 64, + 75, + 76, + 65, + 68, + 56, + 73, + 77, + 56, + 61, + 56, + 69, + 56, + 56, + 78, + 85, + 56, + 95, + 70, + 56, + 56, + 71, + 56, + 79, + 72, + 56, + 83, + 56, + 76, + 80, + 84, + 81, + 90, + 77, + 56, + 56, + 91, + 82, + 56, + 56, + 92, + 85, + 93, + 95, + 86, + 99, + 97, + 87, + 56, + 79, + 56, + 56, + 83, + 56, + 56, + 80, + 84, + 81, + 90, + 88, + 98, + 56, + 91, + 82, + 89, + 102, + 92, + 100, + 93, + 56, + 86, + 99, + 97, + 87, + 101, + 56, + 56, + 56, + 104, + + 56, + 107, + 56, + 56, + 56, + 103, + 88, + 98, + 56, + 56, + 56, + 89, + 102, + 105, + 100, + 108, + 56, + 110, + 56, + 112, + 106, + 101, + 109, + 121, + 115, + 104, + 111, + 107, + 113, + 114, + 56, + 103, + 56, + 122, + 56, + 123, + 56, + 56, + 56, + 105, + 56, + 108, + 133, + 110, + 56, + 112, + 106, + 56, + 109, + 121, + 115, + 56, + 111, + 56, + 113, + 114, + 56, + 56, + 124, + 122, + 125, + 123, + 56, + 127, + 116, + 126, + 117, + 128, + 133, + 56, + 56, + 56, + 130, + 56, + 118, + 129, + 56, + 56, + 56, + 119, + 120, + 131, + 138, + 135, + 124, + 136, + 125, + 132, + 56, + 127, + 116, + 126, + 117, + 128, + 137, + 140, + 56, + 56, + 130, + 134, + + 118, + 129, + 56, + 56, + 56, + 119, + 120, + 131, + 138, + 135, + 139, + 136, + 56, + 132, + 56, + 56, + 56, + 143, + 141, + 142, + 137, + 140, + 56, + 146, + 148, + 134, + 56, + 144, + 155, + 56, + 56, + 145, + 151, + 147, + 152, + 56, + 139, + 56, + 149, + 150, + 56, + 56, + 56, + 143, + 141, + 142, + 158, + 153, + 56, + 146, + 148, + 209, + 154, + 144, + 155, + 156, + 56, + 145, + 151, + 147, + 152, + 157, + 56, + 56, + 149, + 150, + 56, + 162, + 56, + 159, + 56, + 160, + 158, + 153, + 56, + 161, + 56, + 209, + 154, + 164, + 56, + 156, + 165, + 56, + 56, + 56, + 163, + 157, + 56, + 167, + 170, + 56, + 166, + 162, + 169, + 159, + 56, + 160, + 172, + 168, + + 56, + 161, + 56, + 56, + 173, + 164, + 171, + 56, + 165, + 56, + 56, + 56, + 163, + 56, + 176, + 167, + 170, + 175, + 166, + 56, + 169, + 56, + 178, + 180, + 172, + 168, + 174, + 56, + 177, + 179, + 173, + 181, + 171, + 56, + 56, + 56, + 56, + 182, + 184, + 186, + 176, + 56, + 56, + 175, + 56, + 183, + 56, + 189, + 178, + 180, + 56, + 185, + 174, + 188, + 177, + 179, + 187, + 181, + 190, + 56, + 56, + 56, + 56, + 182, + 184, + 186, + 191, + 193, + 192, + 56, + 198, + 183, + 194, + 189, + 56, + 195, + 56, + 185, + 56, + 188, + 56, + 196, + 187, + 197, + 190, + 199, + 56, + 56, + 56, + 201, + 56, + 56, + 191, + 193, + 192, + 202, + 198, + 56, + 194, + 204, + + 200, + 195, + 56, + 56, + 207, + 56, + 205, + 196, + 212, + 197, + 206, + 199, + 203, + 56, + 210, + 201, + 56, + 56, + 56, + 56, + 56, + 202, + 213, + 56, + 56, + 204, + 200, + 208, + 217, + 56, + 207, + 215, + 205, + 218, + 212, + 56, + 206, + 211, + 203, + 216, + 210, + 56, + 214, + 56, + 56, + 56, + 219, + 220, + 213, + 56, + 222, + 221, + 56, + 208, + 217, + 56, + 225, + 215, + 223, + 218, + 56, + 224, + 56, + 211, + 56, + 216, + 56, + 56, + 214, + 56, + 56, + 56, + 219, + 220, + 56, + 56, + 222, + 221, + 56, + 56, + 56, + 56, + 225, + 56, + 223, + 56, + 56, + 224, + 45, + 45, + 47, + 47, + 49, + 49, + 56, + 56, + 56, + 56, + 56, + 56, + + 56, + 96, + 56, + 56, + 56, + 56, + 96, + 50, + 48, + 56, + 55, + 50, + 48, + 46, + 226, + 5, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226}; + +static const flex_int16_t yy_chk[687] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 20, + 25, + 20, + 22, + 22, + 26, + 27, + 28, + 29, + 31, + 43, + 27, + 28, + 231, + 26, + 43, + 28, + 32, + 27, + 25, + 34, + 52, + 32, + 52, + 25, + 27, + 32, + 30, + 27, + 28, + + 230, + 31, + 225, + 224, + 26, + 33, + 29, + 27, + 28, + 34, + 26, + 43, + 28, + 30, + 27, + 25, + 30, + 39, + 32, + 30, + 25, + 27, + 32, + 33, + 27, + 28, + 44, + 31, + 33, + 38, + 26, + 36, + 29, + 37, + 223, + 34, + 39, + 220, + 44, + 30, + 219, + 218, + 30, + 42, + 36, + 30, + 217, + 38, + 41, + 33, + 36, + 38, + 37, + 41, + 33, + 60, + 40, + 41, + 37, + 58, + 216, + 42, + 39, + 42, + 44, + 40, + 60, + 58, + 40, + 64, + 36, + 214, + 62, + 38, + 59, + 66, + 36, + 38, + 37, + 41, + 40, + 59, + 68, + 41, + 37, + 40, + 64, + 42, + 62, + 42, + 63, + 40, + 60, + 58, + 40, + 63, + 65, + 67, + 70, + 66, + + 72, + 68, + 69, + 74, + 71, + 65, + 40, + 59, + 75, + 73, + 78, + 40, + 64, + 67, + 62, + 69, + 211, + 70, + 79, + 72, + 67, + 63, + 69, + 78, + 75, + 66, + 71, + 68, + 73, + 74, + 80, + 65, + 210, + 79, + 81, + 80, + 90, + 209, + 208, + 67, + 206, + 69, + 90, + 70, + 82, + 72, + 67, + 85, + 69, + 78, + 75, + 86, + 71, + 87, + 73, + 74, + 76, + 84, + 81, + 79, + 82, + 80, + 88, + 85, + 76, + 84, + 76, + 86, + 90, + 89, + 92, + 91, + 87, + 95, + 76, + 86, + 205, + 93, + 94, + 76, + 76, + 88, + 95, + 92, + 81, + 93, + 82, + 89, + 100, + 85, + 76, + 84, + 76, + 86, + 94, + 100, + 101, + 99, + 87, + 91, + + 76, + 86, + 102, + 113, + 107, + 76, + 76, + 88, + 95, + 92, + 99, + 93, + 103, + 89, + 105, + 108, + 109, + 103, + 101, + 102, + 94, + 100, + 104, + 105, + 107, + 91, + 106, + 104, + 113, + 110, + 111, + 104, + 109, + 106, + 110, + 112, + 99, + 116, + 108, + 108, + 188, + 115, + 114, + 103, + 101, + 102, + 116, + 111, + 120, + 105, + 107, + 188, + 112, + 104, + 113, + 114, + 117, + 104, + 109, + 106, + 110, + 115, + 118, + 130, + 108, + 108, + 119, + 120, + 121, + 117, + 122, + 118, + 116, + 111, + 123, + 119, + 125, + 188, + 112, + 122, + 126, + 114, + 123, + 127, + 131, + 128, + 121, + 115, + 133, + 126, + 130, + 132, + 125, + 120, + 128, + 117, + 135, + 118, + 132, + 127, + + 138, + 119, + 134, + 137, + 133, + 122, + 131, + 143, + 123, + 136, + 142, + 139, + 121, + 146, + 136, + 126, + 130, + 135, + 125, + 158, + 128, + 149, + 138, + 142, + 132, + 127, + 134, + 152, + 137, + 139, + 133, + 143, + 131, + 151, + 153, + 156, + 155, + 146, + 151, + 153, + 136, + 204, + 159, + 135, + 160, + 149, + 161, + 158, + 138, + 142, + 167, + 152, + 134, + 156, + 137, + 139, + 155, + 143, + 159, + 203, + 175, + 173, + 166, + 146, + 151, + 153, + 160, + 166, + 161, + 168, + 173, + 149, + 167, + 158, + 169, + 168, + 176, + 152, + 171, + 156, + 177, + 169, + 155, + 171, + 159, + 175, + 178, + 183, + 180, + 177, + 181, + 184, + 160, + 166, + 161, + 178, + 173, + 182, + 167, + 181, + + 176, + 168, + 193, + 186, + 184, + 190, + 182, + 169, + 193, + 171, + 183, + 175, + 180, + 192, + 190, + 177, + 198, + 195, + 196, + 199, + 197, + 178, + 195, + 201, + 200, + 181, + 176, + 186, + 199, + 207, + 184, + 197, + 182, + 200, + 193, + 212, + 183, + 192, + 180, + 198, + 190, + 222, + 196, + 213, + 202, + 194, + 201, + 207, + 195, + 215, + 213, + 212, + 221, + 186, + 199, + 191, + 222, + 197, + 215, + 200, + 189, + 221, + 187, + 192, + 185, + 198, + 179, + 174, + 196, + 172, + 170, + 165, + 201, + 207, + 164, + 163, + 213, + 212, + 162, + 157, + 154, + 150, + 222, + 148, + 215, + 147, + 145, + 221, + 227, + 227, + 228, + 228, + 229, + 229, + 144, + 141, + 140, + 129, + 124, + 98, + + 97, + 96, + 83, + 77, + 61, + 57, + 51, + 49, + 47, + 35, + 24, + 11, + 10, + 9, + 5, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226, + 226}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -695,8 +2815,8 @@ static const flex_int16_t yy_chk[687] = #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -710,13 +2830,15 @@ static const flex_int16_t yy_chk[687] = #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#define RETURN_TOKEN(token) \ + LOG_DEBUG("%s", #token); \ + return token #line 720 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -745,124 +2867,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t - { +{ + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char *yy_last_accepting_cpos; - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; + int yylineno_r; + int yy_flex_debug_r; - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; + char *yytext_r; + int yy_more_flag; + int yy_more_len; - int yylineno_r; - int yy_flex_debug_r; + YYSTYPE *yylval_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + YYLTYPE *yylloc_r; - YYSTYPE * yylval_r; +}; /* end struct yyguts_t */ - YYLTYPE * yylloc_r; +static int yy_init_globals(yyscan_t yyscanner); - }; /* end struct yyguts_t */ +/* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ +#define yylval yyg->yylval_r -static int yy_init_globals ( yyscan_t yyscanner ); +#define yylloc yyg->yylloc_r - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); +static int yyinput(yyscan_t yyscanner); #else -static int input ( yyscan_t yyscanner ); +static int input(yyscan_t yyscanner); #endif #endif @@ -882,42 +3004,38 @@ static int input ( yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO \ + do { \ + if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ + } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ +#define YY_INPUT(buf, result, max_size) \ + if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ + int c = '*'; \ + yy_size_t n; \ + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ + buf[n] = (char)c; \ + if (c == '\n') \ + buf[n++] = (char)c; \ + if (c == EOF && ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + result = n; \ + } else { \ + errno = 0; \ + while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ + if (errno != EINTR) { \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + break; \ + } \ + errno = 0; \ + clearerr(yyin); \ + } \ + } #endif @@ -936,7 +3054,7 @@ static int input ( yyscan_t yyscanner ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -947,11 +3065,9 @@ static int input ( yyscan_t yyscanner ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -963,629 +3079,542 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK /*LINTED*/ break; #endif -#define YY_RULE_SETUP \ - YY_USER_ACTION +#define YY_RULE_SETUP YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; + if (!yyg->yy_init) { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ + if (!yyg->yy_start) + yyg->yy_start = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if (!yyin) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if (!yyout) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_load_buffer_state( yyscanner ); - } + yy_load_buffer_state(yyscanner); + } - { + { #line 75 "lex_sql.l" - #line 1015 "lex_sql.cpp" - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 227 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 616 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP + while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_match: + do { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 227) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } while (yy_base[yy_current_state] != 616); + + yy_find_action: + yy_act = yy_accept[yy_current_state]; + if (yy_act == 0) { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + do_action: /* This label is used only to access EOF actions. */ + + switch (yy_act) { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + + case 1: YY_RULE_SETUP #line 77 "lex_sql.l" -// ignore whitespace - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP + // ignore whitespace + YY_BREAK + case 2: + /* rule 2 can match eol */ + YY_RULE_SETUP #line 78 "lex_sql.l" -; - YY_BREAK -case 3: -YY_RULE_SETUP + ; + YY_BREAK + case 3: YY_RULE_SETUP #line 80 "lex_sql.l" -yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); - YY_BREAK -case 4: -YY_RULE_SETUP + yylval->number = atoi(yytext); + RETURN_TOKEN(NUMBER); + YY_BREAK + case 4: YY_RULE_SETUP #line 81 "lex_sql.l" -yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); - YY_BREAK -case 5: -YY_RULE_SETUP + yylval->floats = (float)(atof(yytext)); + RETURN_TOKEN(FLOAT); + YY_BREAK + case 5: YY_RULE_SETUP #line 83 "lex_sql.l" -RETURN_TOKEN(SEMICOLON); - YY_BREAK -case 6: -YY_RULE_SETUP + RETURN_TOKEN(SEMICOLON); + YY_BREAK + case 6: YY_RULE_SETUP #line 84 "lex_sql.l" -RETURN_TOKEN(DOT); - YY_BREAK -case 7: -YY_RULE_SETUP + RETURN_TOKEN(DOT); + YY_BREAK + case 7: YY_RULE_SETUP #line 85 "lex_sql.l" -RETURN_TOKEN(EXIT); - YY_BREAK -case 8: -YY_RULE_SETUP + RETURN_TOKEN(EXIT); + YY_BREAK + case 8: YY_RULE_SETUP #line 86 "lex_sql.l" -RETURN_TOKEN(HELP); - YY_BREAK -case 9: -YY_RULE_SETUP + RETURN_TOKEN(HELP); + YY_BREAK + case 9: YY_RULE_SETUP #line 87 "lex_sql.l" -RETURN_TOKEN(DESC); - YY_BREAK -case 10: -YY_RULE_SETUP + RETURN_TOKEN(DESC); + YY_BREAK + case 10: YY_RULE_SETUP #line 88 "lex_sql.l" -RETURN_TOKEN(CREATE); - YY_BREAK -case 11: -YY_RULE_SETUP + RETURN_TOKEN(CREATE); + YY_BREAK + case 11: YY_RULE_SETUP #line 89 "lex_sql.l" -RETURN_TOKEN(DROP); - YY_BREAK -case 12: -YY_RULE_SETUP + RETURN_TOKEN(DROP); + YY_BREAK + case 12: YY_RULE_SETUP #line 90 "lex_sql.l" -RETURN_TOKEN(TABLE); - YY_BREAK -case 13: -YY_RULE_SETUP + RETURN_TOKEN(TABLE); + YY_BREAK + case 13: YY_RULE_SETUP #line 91 "lex_sql.l" -RETURN_TOKEN(TABLES); - YY_BREAK -case 14: -YY_RULE_SETUP + RETURN_TOKEN(TABLES); + YY_BREAK + case 14: YY_RULE_SETUP #line 92 "lex_sql.l" -RETURN_TOKEN(INDEX); - YY_BREAK -case 15: -YY_RULE_SETUP + RETURN_TOKEN(INDEX); + YY_BREAK + case 15: YY_RULE_SETUP #line 93 "lex_sql.l" -RETURN_TOKEN(ON); - YY_BREAK -case 16: -YY_RULE_SETUP + RETURN_TOKEN(ON); + YY_BREAK + case 16: YY_RULE_SETUP #line 94 "lex_sql.l" -RETURN_TOKEN(SHOW); - YY_BREAK -case 17: -YY_RULE_SETUP + RETURN_TOKEN(SHOW); + YY_BREAK + case 17: YY_RULE_SETUP #line 95 "lex_sql.l" -RETURN_TOKEN(SYNC); - YY_BREAK -case 18: -YY_RULE_SETUP + RETURN_TOKEN(SYNC); + YY_BREAK + case 18: YY_RULE_SETUP #line 96 "lex_sql.l" -RETURN_TOKEN(SELECT); - YY_BREAK -case 19: -YY_RULE_SETUP + RETURN_TOKEN(SELECT); + YY_BREAK + case 19: YY_RULE_SETUP #line 97 "lex_sql.l" -RETURN_TOKEN(CALC); - YY_BREAK -case 20: -YY_RULE_SETUP + RETURN_TOKEN(CALC); + YY_BREAK + case 20: YY_RULE_SETUP #line 98 "lex_sql.l" -RETURN_TOKEN(FROM); - YY_BREAK -case 21: -YY_RULE_SETUP + RETURN_TOKEN(FROM); + YY_BREAK + case 21: YY_RULE_SETUP #line 99 "lex_sql.l" -RETURN_TOKEN(WHERE); - YY_BREAK -case 22: -YY_RULE_SETUP + RETURN_TOKEN(WHERE); + YY_BREAK + case 22: YY_RULE_SETUP #line 100 "lex_sql.l" -RETURN_TOKEN(AND); - YY_BREAK -case 23: -YY_RULE_SETUP + RETURN_TOKEN(AND); + YY_BREAK + case 23: YY_RULE_SETUP #line 101 "lex_sql.l" -RETURN_TOKEN(OR); - YY_BREAK -case 24: -YY_RULE_SETUP + RETURN_TOKEN(OR); + YY_BREAK + case 24: YY_RULE_SETUP #line 102 "lex_sql.l" -RETURN_TOKEN(INSERT); - YY_BREAK -case 25: -YY_RULE_SETUP + RETURN_TOKEN(INSERT); + YY_BREAK + case 25: YY_RULE_SETUP #line 103 "lex_sql.l" -RETURN_TOKEN(INTO); - YY_BREAK -case 26: -YY_RULE_SETUP + RETURN_TOKEN(INTO); + YY_BREAK + case 26: YY_RULE_SETUP #line 104 "lex_sql.l" -RETURN_TOKEN(VALUES); - YY_BREAK -case 27: -YY_RULE_SETUP + RETURN_TOKEN(VALUES); + YY_BREAK + case 27: YY_RULE_SETUP #line 105 "lex_sql.l" -RETURN_TOKEN(DELETE); - YY_BREAK -case 28: -YY_RULE_SETUP + RETURN_TOKEN(DELETE); + YY_BREAK + case 28: YY_RULE_SETUP #line 106 "lex_sql.l" -RETURN_TOKEN(UPDATE); - YY_BREAK -case 29: -YY_RULE_SETUP + RETURN_TOKEN(UPDATE); + YY_BREAK + case 29: YY_RULE_SETUP #line 107 "lex_sql.l" -RETURN_TOKEN(SET); - YY_BREAK -case 30: -YY_RULE_SETUP + RETURN_TOKEN(SET); + YY_BREAK + case 30: YY_RULE_SETUP #line 108 "lex_sql.l" -RETURN_TOKEN(TRX_BEGIN); - YY_BREAK -case 31: -YY_RULE_SETUP + RETURN_TOKEN(TRX_BEGIN); + YY_BREAK + case 31: YY_RULE_SETUP #line 109 "lex_sql.l" -RETURN_TOKEN(TRX_COMMIT); - YY_BREAK -case 32: -YY_RULE_SETUP + RETURN_TOKEN(TRX_COMMIT); + YY_BREAK + case 32: YY_RULE_SETUP #line 110 "lex_sql.l" -RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK -case 33: -YY_RULE_SETUP + RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK + case 33: YY_RULE_SETUP #line 111 "lex_sql.l" -RETURN_TOKEN(INT_T); - YY_BREAK -case 34: -YY_RULE_SETUP + RETURN_TOKEN(INT_T); + YY_BREAK + case 34: YY_RULE_SETUP #line 112 "lex_sql.l" -RETURN_TOKEN(STRING_T); - YY_BREAK -case 35: -YY_RULE_SETUP + RETURN_TOKEN(STRING_T); + YY_BREAK + case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(FLOAT_T); - YY_BREAK -case 36: -YY_RULE_SETUP + RETURN_TOKEN(FLOAT_T); + YY_BREAK + case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK -case 37: -YY_RULE_SETUP + RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK + case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token - YY_BREAK -case 38: -YY_RULE_SETUP + RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + YY_BREAK + case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(UNIQUE); - YY_BREAK -case 39: -YY_RULE_SETUP + RETURN_TOKEN(UNIQUE); + YY_BREAK + case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(NULL_T); - YY_BREAK -case 40: -YY_RULE_SETUP + RETURN_TOKEN(NULL_T); + YY_BREAK + case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(NULLABLE); - YY_BREAK -case 41: -YY_RULE_SETUP + RETURN_TOKEN(NULLABLE); + YY_BREAK + case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(LOAD); - YY_BREAK -case 42: -YY_RULE_SETUP + RETURN_TOKEN(LOAD); + YY_BREAK + case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(DATA); - YY_BREAK -case 43: -YY_RULE_SETUP + RETURN_TOKEN(DATA); + YY_BREAK + case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(INFILE); - YY_BREAK -case 44: -YY_RULE_SETUP + RETURN_TOKEN(INFILE); + YY_BREAK + case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); - YY_BREAK -case 45: -YY_RULE_SETUP + RETURN_TOKEN(EXPLAIN); + YY_BREAK + case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(GROUP); - YY_BREAK -case 46: -YY_RULE_SETUP + RETURN_TOKEN(GROUP); + YY_BREAK + case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(HAVING); - YY_BREAK -case 47: -YY_RULE_SETUP + RETURN_TOKEN(HAVING); + YY_BREAK + case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(ORDER); - YY_BREAK -case 48: -YY_RULE_SETUP + RETURN_TOKEN(ORDER); + YY_BREAK + case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(BY); - YY_BREAK -case 49: -YY_RULE_SETUP + RETURN_TOKEN(BY); + YY_BREAK + case 49: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(AS); - YY_BREAK -case 50: -YY_RULE_SETUP + RETURN_TOKEN(AS); + YY_BREAK + case 50: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(ASC); - YY_BREAK -case 51: -YY_RULE_SETUP + RETURN_TOKEN(ASC); + YY_BREAK + case 51: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(IN); - YY_BREAK -case 52: -YY_RULE_SETUP + RETURN_TOKEN(IN); + YY_BREAK + case 52: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(EXISTS); - YY_BREAK -case 53: -YY_RULE_SETUP + RETURN_TOKEN(EXISTS); + YY_BREAK + case 53: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(STORAGE); - YY_BREAK -case 54: -YY_RULE_SETUP + RETURN_TOKEN(STORAGE); + YY_BREAK + case 54: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(FORMAT); - YY_BREAK -case 55: -YY_RULE_SETUP + RETURN_TOKEN(FORMAT); + YY_BREAK + case 55: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(INNER); - YY_BREAK -case 56: -YY_RULE_SETUP + RETURN_TOKEN(INNER); + YY_BREAK + case 56: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(JOIN); - YY_BREAK -case 57: -YY_RULE_SETUP + RETURN_TOKEN(JOIN); + YY_BREAK + case 57: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(LBRACE); - YY_BREAK -case 58: -YY_RULE_SETUP + RETURN_TOKEN(LBRACE); + YY_BREAK + case 58: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(RBRACE); - YY_BREAK -case 59: -YY_RULE_SETUP + RETURN_TOKEN(RBRACE); + YY_BREAK + case 59: YY_RULE_SETUP #line 138 "lex_sql.l" -RETURN_TOKEN(COMMA); - YY_BREAK -case 60: -YY_RULE_SETUP + RETURN_TOKEN(COMMA); + YY_BREAK + case 60: YY_RULE_SETUP #line 139 "lex_sql.l" -RETURN_TOKEN(EQ); - YY_BREAK -case 61: -YY_RULE_SETUP + RETURN_TOKEN(EQ); + YY_BREAK + case 61: YY_RULE_SETUP #line 140 "lex_sql.l" -RETURN_TOKEN(LE); - YY_BREAK -case 62: -YY_RULE_SETUP + RETURN_TOKEN(LE); + YY_BREAK + case 62: YY_RULE_SETUP #line 141 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 63: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 63: YY_RULE_SETUP #line 142 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 64: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 64: YY_RULE_SETUP #line 143 "lex_sql.l" -RETURN_TOKEN(LT); - YY_BREAK -case 65: -YY_RULE_SETUP + RETURN_TOKEN(LT); + YY_BREAK + case 65: YY_RULE_SETUP #line 144 "lex_sql.l" -RETURN_TOKEN(GE); - YY_BREAK -case 66: -YY_RULE_SETUP + RETURN_TOKEN(GE); + YY_BREAK + case 66: YY_RULE_SETUP #line 145 "lex_sql.l" -RETURN_TOKEN(GT); - YY_BREAK -case 67: -YY_RULE_SETUP + RETURN_TOKEN(GT); + YY_BREAK + case 67: YY_RULE_SETUP #line 146 "lex_sql.l" -RETURN_TOKEN(NOT); - YY_BREAK -case 68: -YY_RULE_SETUP + RETURN_TOKEN(NOT); + YY_BREAK + case 68: YY_RULE_SETUP #line 147 "lex_sql.l" -RETURN_TOKEN(IS); - YY_BREAK -case 69: -YY_RULE_SETUP + RETURN_TOKEN(IS); + YY_BREAK + case 69: YY_RULE_SETUP #line 148 "lex_sql.l" -RETURN_TOKEN(LIKE); - YY_BREAK -case 70: -YY_RULE_SETUP + RETURN_TOKEN(LIKE); + YY_BREAK + case 70: YY_RULE_SETUP #line 150 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); - YY_BREAK -case 71: + yylval->string = strdup(yytext); + RETURN_TOKEN(ID); + YY_BREAK + case 71: #line 153 "lex_sql.l" -case 72: + case 72: #line 154 "lex_sql.l" -case 73: + case 73: #line 155 "lex_sql.l" -case 74: -YY_RULE_SETUP + case 74: YY_RULE_SETUP #line 155 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK -case 75: -/* rule 75 can match eol */ -YY_RULE_SETUP + { + return yytext[0]; + } + YY_BREAK + case 75: + /* rule 75 can match eol */ + YY_RULE_SETUP #line 156 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 76: -/* rule 76 can match eol */ -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 76: + /* rule 76 can match eol */ + YY_RULE_SETUP #line 157 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 77: -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 77: YY_RULE_SETUP #line 159 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; - YY_BREAK -case 78: -YY_RULE_SETUP + LOG_DEBUG("Unknown character [%c]",yytext[0]); + return yytext[0]; + YY_BREAK + case 78: YY_RULE_SETUP #line 160 "lex_sql.l" -ECHO; - YY_BREAK + ECHO; + YY_BREAK #line 1456 "lex_sql.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STR): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap( yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(STR): yyterminate(); + + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if (yy_next_state) { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_END_OF_FILE: { + yyg->yy_did_buffer_switch_on_eof = 0; + + if (yywrap(yyscanner)) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else { + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1595,171 +3624,149 @@ case YY_STATE_EOF(STR): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (yyscan_t yyscanner) +static int yy_get_next_buffer(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) + YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); + + if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ + if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for (i = 0; i < number_to_move; ++i) + *(dest++) = *(source++); + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else { + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); + + if (b->yy_is_our_buffer) { + yy_size_t new_size = b->yy_buf_size * 2; + + if (new_size <= 0) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); + } else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if (!b->yy_ch_buf) + YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + } + + if (num_to_read > YY_READ_BUF_SIZE) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if (yyg->yy_n_chars == 0) { + if (number_to_move == YY_MORE_ADJ) { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin, yyscanner); + } + + else { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = + (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); + if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +static yy_state_type yy_get_previous_state(yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 227 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + yy_current_state = yyg->yy_start; + + for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 227) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -1767,29 +3774,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 227 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 226); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 227) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 226); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -1798,141 +3803,133 @@ static int yy_get_next_buffer (yyscan_t yyscanner) #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) +static int yyinput(yyscan_t yyscanner) #else - static int input (yyscan_t yyscanner) +static int input(yyscan_t yyscanner) #endif { - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin , yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + int c; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin, yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: { + if (yywrap(yyscanner)) + return 0; + + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; + } + } + } - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) +void yyrestart(FILE *input_file, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); + yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); + yy_load_buffer_state(yyscanner); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack(yyscanner); + if (YY_CURRENT_BUFFER == new_buffer) + return; + + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state(yyscanner); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state (yyscan_t yyscanner) +static void yy_load_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -1941,105 +3938,105 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); + if (!b->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer( b, file , yyscanner); + yy_init_buffer(b, file, yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! b ) - return; + if (!b) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); + if (b->yy_is_our_buffer) + yyfree((void *)b->yy_ch_buf, yyscanner); - yyfree( (void *) b , yyscanner ); + yyfree((void *)b, yyscanner); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + int oerrno = errno; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flush_buffer( b , yyscanner); + yy_flush_buffer(b, yyscanner); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!b) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); + if (b == YY_CURRENT_BUFFER) + yy_load_buffer_state(yyscanner); } /** Pushes the new state onto the stack. The new state becomes @@ -2048,99 +4045,95 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state (yyscan_t yyscanner) +void yypop_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (yyscan_t yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = + (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( + yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -2149,33 +4142,31 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b , yyscanner ); - - return b; + YY_BUFFER_STATE b; + + if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + + b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b, yyscanner); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -2186,10 +4177,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) { - - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + + return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2199,177 +4190,175 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n , yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t)(_yybytes_len + 2); + buf = (char *)yyalloc(n, yyscanner); + if (!buf) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + + for (i = 0; i < _yybytes_len; ++i) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf, n, yyscanner); + if (!b) + YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + fprintf(stderr, "%s\n", msg); + exit(YY_EXIT_FAILURE); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } while (0) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno (yyscan_t yyscanner) +int yyget_lineno(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (!YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column (yyscan_t yyscanner) +int yyget_column(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; + if (!YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in (yyscan_t yyscanner) +FILE *yyget_in(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out (yyscan_t yyscanner) +FILE *yyget_out(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text (yyscan_t yyscanner) +char *yyget_text(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyextra = user_defined; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) +void yyset_lineno(int _line_number, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_lineno called with no buffer"); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int _column_no , yyscan_t yyscanner) +void yyset_column(int _column_no, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_column called with no buffer"); - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); - - yycolumn = _column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -2378,80 +4367,80 @@ void yyset_column (int _column_no , yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) +void yyset_in(FILE *_in_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyin = _in_str; } -void yyset_out (FILE * _out_str , yyscan_t yyscanner) +void yyset_out(FILE *_out_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyout = _out_str; } -int yyget_debug (yyscan_t yyscanner) +int yyget_debug(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yy_flex_debug; } -void yyset_debug (int _bdebug , yyscan_t yyscanner) +void yyset_debug(int _bdebug, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_flex_debug = _bdebug; } /* Accessor methods for yylval and yylloc */ -YYSTYPE * yyget_lval (yyscan_t yyscanner) +YYSTYPE *yyget_lval(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylval; } -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc (yyscan_t yyscanner) +YYLTYPE *yyget_lloc(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylloc; } - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t* ptr_yy_globals) +int yylex_init(yyscan_t *ptr_yy_globals) { - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -2461,94 +4450,94 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra (yy_user_defined, &dummy_yyguts); + yyset_extra(yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - yyset_extra (yy_user_defined, *ptr_yy_globals); + yyset_extra(yy_user_defined, *ptr_yy_globals); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } -static int yy_init_globals (yyscan_t yyscanner) +static int yy_init_globals(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) +int yylex_destroy(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while (YY_CURRENT_BUFFER) { + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack, yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree(yyg->yy_start_stack, yyscanner); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals(yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree(yyscanner, yyscanner); + yyscanner = NULL; + return 0; } /* @@ -2556,63 +4545,59 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + int i; + for (i = 0; i < n; ++i) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +static int yy_flex_strlen(const char *s, yyscan_t yyscanner) { - int n; - for ( n = 0; s[n]; ++n ) - ; + int n; + for (n = 0; s[n]; ++n) + ; - return n; + return n; } #endif -void *yyalloc (yy_size_t size , yyscan_t yyscanner) +void *yyalloc(yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree (void * ptr , yyscan_t yyscanner) +void yyfree(void *ptr, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + free((char *)ptr); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 160 "lex_sql.l" - -void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); -} - +void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 5ec521aa..a7ae0d05 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,23 +12,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -81,62 +79,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -157,7 +155,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -197,73 +195,72 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -286,69 +283,69 @@ void yyfree ( void * , yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -376,11 +373,9 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -544,7 +539,6 @@ extern int yylex \ #line 160 "lex_sql.l" - #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 86e3ccc1..d7a64ca9 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,13 +63,9 @@ /* Pull parsers. */ #define YYPULL 1 - - - /* First part of user prologue. */ #line 2 "yacc_sql.y" - #include #include #include @@ -92,232 +88,221 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, - Expression *left, - Expression *right, - const char *sql_string, - YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression( + ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression(const char *function_name, - std::vector> child, - const char *sql_string, - YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression( + const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } -ParsedSqlNode *create_table_sql_node(char *table_name, - AttrInfoSqlNode* attr_def, - std::vector *attrinfos, - char* storage_format, - ParsedSqlNode *create_table_select) +ParsedSqlNode *create_table_sql_node(char *table_name, AttrInfoSqlNode *attr_def, + std::vector *attrinfos, char *storage_format, ParsedSqlNode *create_table_select) { - ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = parsed_sql_node->create_table; - create_table.relation_name = table_name; + ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = parsed_sql_node->create_table; + create_table.relation_name = table_name; - if (attrinfos) { - create_table.attr_infos.swap(*attrinfos); - delete attrinfos; - } - if (attr_def) { - create_table.attr_infos.emplace_back(*attr_def); - std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); - delete attr_def; - } - if (storage_format != nullptr) { - create_table.storage_format = storage_format; - free(storage_format); - } + if (attrinfos) { + create_table.attr_infos.swap(*attrinfos); + delete attrinfos; + } + if (attr_def) { + create_table.attr_infos.emplace_back(*attr_def); + std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); + delete attr_def; + } + if (storage_format != nullptr) { + create_table.storage_format = storage_format; + free(storage_format); + } - if (create_table_select) { - create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); - } + if (create_table_select) { + create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); + } - return parsed_sql_node; + return parsed_sql_node; } #line 155 "yacc_sql.cpp" -# ifndef YY_CAST -# ifdef __cplusplus -# define YY_CAST(Type, Val) static_cast (Val) -# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -# else -# define YY_CAST(Type, Val) ((Type) (Val)) -# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -# endif -# endif -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif +#ifndef YY_CAST +#ifdef __cplusplus +#define YY_CAST(Type, Val) static_cast(Val) +#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) +#else +#define YY_CAST(Type, Val) ((Type)(Val)) +#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) +#endif +#endif +#ifndef YY_NULLPTR +#if defined __cplusplus +#if 201103L <= __cplusplus +#define YY_NULLPTR nullptr +#else +#define YY_NULLPTR 0 +#endif +#else +#define YY_NULLPTR ((void *)0) +#endif +#endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_HAVING = 11, /* HAVING */ - YYSYMBOL_ORDER = 12, /* ORDER */ - YYSYMBOL_TABLE = 13, /* TABLE */ - YYSYMBOL_TABLES = 14, /* TABLES */ - YYSYMBOL_INDEX = 15, /* INDEX */ - YYSYMBOL_CALC = 16, /* CALC */ - YYSYMBOL_SELECT = 17, /* SELECT */ - YYSYMBOL_DESC = 18, /* DESC */ - YYSYMBOL_SHOW = 19, /* SHOW */ - YYSYMBOL_SYNC = 20, /* SYNC */ - YYSYMBOL_INSERT = 21, /* INSERT */ - YYSYMBOL_DELETE = 22, /* DELETE */ - YYSYMBOL_UPDATE = 23, /* UPDATE */ - YYSYMBOL_LBRACE = 24, /* LBRACE */ - YYSYMBOL_RBRACE = 25, /* RBRACE */ - YYSYMBOL_COMMA = 26, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 30, /* INT_T */ - YYSYMBOL_IN = 31, /* IN */ - YYSYMBOL_STRING_T = 32, /* STRING_T */ - YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ - YYSYMBOL_DATE_T = 34, /* DATE_T */ - YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_NOT = 36, /* NOT */ - YYSYMBOL_UNIQUE = 37, /* UNIQUE */ - YYSYMBOL_NULL_T = 38, /* NULL_T */ - YYSYMBOL_NULLABLE = 39, /* NULLABLE */ - YYSYMBOL_HELP = 40, /* HELP */ - YYSYMBOL_EXIT = 41, /* EXIT */ - YYSYMBOL_DOT = 42, /* DOT */ - YYSYMBOL_INTO = 43, /* INTO */ - YYSYMBOL_VALUES = 44, /* VALUES */ - YYSYMBOL_FROM = 45, /* FROM */ - YYSYMBOL_WHERE = 46, /* WHERE */ - YYSYMBOL_AND = 47, /* AND */ - YYSYMBOL_OR = 48, /* OR */ - YYSYMBOL_SET = 49, /* SET */ - YYSYMBOL_ON = 50, /* ON */ - YYSYMBOL_LOAD = 51, /* LOAD */ - YYSYMBOL_DATA = 52, /* DATA */ - YYSYMBOL_INFILE = 53, /* INFILE */ - YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ - YYSYMBOL_STORAGE = 55, /* STORAGE */ - YYSYMBOL_FORMAT = 56, /* FORMAT */ - YYSYMBOL_INNER = 57, /* INNER */ - YYSYMBOL_JOIN = 58, /* JOIN */ - YYSYMBOL_EQ = 59, /* EQ */ - YYSYMBOL_LT = 60, /* LT */ - YYSYMBOL_GT = 61, /* GT */ - YYSYMBOL_LE = 62, /* LE */ - YYSYMBOL_GE = 63, /* GE */ - YYSYMBOL_NE = 64, /* NE */ - YYSYMBOL_LIKE = 65, /* LIKE */ - YYSYMBOL_IS = 66, /* IS */ - YYSYMBOL_NUMBER = 67, /* NUMBER */ - YYSYMBOL_FLOAT = 68, /* FLOAT */ - YYSYMBOL_ID = 69, /* ID */ - YYSYMBOL_SSS = 70, /* SSS */ - YYSYMBOL_71_ = 71, /* '+' */ - YYSYMBOL_72_ = 72, /* '-' */ - YYSYMBOL_73_ = 73, /* '*' */ - YYSYMBOL_74_ = 74, /* '/' */ - YYSYMBOL_UMINUS = 75, /* UMINUS */ - YYSYMBOL_YYACCEPT = 76, /* $accept */ - YYSYMBOL_commands = 77, /* commands */ - YYSYMBOL_command_wrapper = 78, /* command_wrapper */ - YYSYMBOL_exit_stmt = 79, /* exit_stmt */ - YYSYMBOL_help_stmt = 80, /* help_stmt */ - YYSYMBOL_sync_stmt = 81, /* sync_stmt */ - YYSYMBOL_begin_stmt = 82, /* begin_stmt */ - YYSYMBOL_commit_stmt = 83, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 84, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 85, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 86, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 87, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 88, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 89, /* create_index_stmt */ - YYSYMBOL_opt_unique = 90, /* opt_unique */ - YYSYMBOL_attr_list = 91, /* attr_list */ - YYSYMBOL_drop_index_stmt = 92, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 93, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 94, /* attr_def_list */ - YYSYMBOL_attr_def = 95, /* attr_def */ - YYSYMBOL_nullable_constraint = 96, /* nullable_constraint */ - YYSYMBOL_type = 97, /* type */ - YYSYMBOL_insert_stmt = 98, /* insert_stmt */ - YYSYMBOL_values_list = 99, /* values_list */ - YYSYMBOL_value_list = 100, /* value_list */ - YYSYMBOL_value = 101, /* value */ - YYSYMBOL_nonnegative_value = 102, /* nonnegative_value */ - YYSYMBOL_storage_format = 103, /* storage_format */ - YYSYMBOL_delete_stmt = 104, /* delete_stmt */ - YYSYMBOL_update_stmt = 105, /* update_stmt */ - YYSYMBOL_setClauses = 106, /* setClauses */ - YYSYMBOL_setClause = 107, /* setClause */ - YYSYMBOL_select_stmt = 108, /* select_stmt */ - YYSYMBOL_calc_stmt = 109, /* calc_stmt */ - YYSYMBOL_expression_list = 110, /* expression_list */ - YYSYMBOL_expression = 111, /* expression */ - YYSYMBOL_alias = 112, /* alias */ - YYSYMBOL_aggr_func_expr = 113, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 114, /* sub_query_expr */ - YYSYMBOL_rel_attr = 115, /* rel_attr */ - YYSYMBOL_relation = 116, /* relation */ - YYSYMBOL_rel_list = 117, /* rel_list */ - YYSYMBOL_joinClauses = 118, /* joinClauses */ - YYSYMBOL_where = 119, /* where */ - YYSYMBOL_condition = 120, /* condition */ - YYSYMBOL_comp_op = 121, /* comp_op */ - YYSYMBOL_opt_order_by = 122, /* opt_order_by */ - YYSYMBOL_sort_list = 123, /* sort_list */ - YYSYMBOL_sort_unit = 124, /* sort_unit */ - YYSYMBOL_group_by = 125, /* group_by */ - YYSYMBOL_opt_having = 126, /* opt_having */ - YYSYMBOL_load_data_stmt = 127, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 128, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 129, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 130 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_HAVING = 11, /* HAVING */ + YYSYMBOL_ORDER = 12, /* ORDER */ + YYSYMBOL_TABLE = 13, /* TABLE */ + YYSYMBOL_TABLES = 14, /* TABLES */ + YYSYMBOL_INDEX = 15, /* INDEX */ + YYSYMBOL_CALC = 16, /* CALC */ + YYSYMBOL_SELECT = 17, /* SELECT */ + YYSYMBOL_DESC = 18, /* DESC */ + YYSYMBOL_SHOW = 19, /* SHOW */ + YYSYMBOL_SYNC = 20, /* SYNC */ + YYSYMBOL_INSERT = 21, /* INSERT */ + YYSYMBOL_DELETE = 22, /* DELETE */ + YYSYMBOL_UPDATE = 23, /* UPDATE */ + YYSYMBOL_LBRACE = 24, /* LBRACE */ + YYSYMBOL_RBRACE = 25, /* RBRACE */ + YYSYMBOL_COMMA = 26, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 30, /* INT_T */ + YYSYMBOL_IN = 31, /* IN */ + YYSYMBOL_STRING_T = 32, /* STRING_T */ + YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ + YYSYMBOL_DATE_T = 34, /* DATE_T */ + YYSYMBOL_TEXT_T = 35, /* TEXT_T */ + YYSYMBOL_NOT = 36, /* NOT */ + YYSYMBOL_UNIQUE = 37, /* UNIQUE */ + YYSYMBOL_NULL_T = 38, /* NULL_T */ + YYSYMBOL_NULLABLE = 39, /* NULLABLE */ + YYSYMBOL_HELP = 40, /* HELP */ + YYSYMBOL_EXIT = 41, /* EXIT */ + YYSYMBOL_DOT = 42, /* DOT */ + YYSYMBOL_INTO = 43, /* INTO */ + YYSYMBOL_VALUES = 44, /* VALUES */ + YYSYMBOL_FROM = 45, /* FROM */ + YYSYMBOL_WHERE = 46, /* WHERE */ + YYSYMBOL_AND = 47, /* AND */ + YYSYMBOL_OR = 48, /* OR */ + YYSYMBOL_SET = 49, /* SET */ + YYSYMBOL_ON = 50, /* ON */ + YYSYMBOL_LOAD = 51, /* LOAD */ + YYSYMBOL_DATA = 52, /* DATA */ + YYSYMBOL_INFILE = 53, /* INFILE */ + YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ + YYSYMBOL_STORAGE = 55, /* STORAGE */ + YYSYMBOL_FORMAT = 56, /* FORMAT */ + YYSYMBOL_INNER = 57, /* INNER */ + YYSYMBOL_JOIN = 58, /* JOIN */ + YYSYMBOL_EQ = 59, /* EQ */ + YYSYMBOL_LT = 60, /* LT */ + YYSYMBOL_GT = 61, /* GT */ + YYSYMBOL_LE = 62, /* LE */ + YYSYMBOL_GE = 63, /* GE */ + YYSYMBOL_NE = 64, /* NE */ + YYSYMBOL_LIKE = 65, /* LIKE */ + YYSYMBOL_IS = 66, /* IS */ + YYSYMBOL_NUMBER = 67, /* NUMBER */ + YYSYMBOL_FLOAT = 68, /* FLOAT */ + YYSYMBOL_ID = 69, /* ID */ + YYSYMBOL_SSS = 70, /* SSS */ + YYSYMBOL_71_ = 71, /* '+' */ + YYSYMBOL_72_ = 72, /* '-' */ + YYSYMBOL_73_ = 73, /* '*' */ + YYSYMBOL_74_ = 74, /* '/' */ + YYSYMBOL_UMINUS = 75, /* UMINUS */ + YYSYMBOL_YYACCEPT = 76, /* $accept */ + YYSYMBOL_commands = 77, /* commands */ + YYSYMBOL_command_wrapper = 78, /* command_wrapper */ + YYSYMBOL_exit_stmt = 79, /* exit_stmt */ + YYSYMBOL_help_stmt = 80, /* help_stmt */ + YYSYMBOL_sync_stmt = 81, /* sync_stmt */ + YYSYMBOL_begin_stmt = 82, /* begin_stmt */ + YYSYMBOL_commit_stmt = 83, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 84, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 85, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 86, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 87, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 88, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 89, /* create_index_stmt */ + YYSYMBOL_opt_unique = 90, /* opt_unique */ + YYSYMBOL_attr_list = 91, /* attr_list */ + YYSYMBOL_drop_index_stmt = 92, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 93, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 94, /* attr_def_list */ + YYSYMBOL_attr_def = 95, /* attr_def */ + YYSYMBOL_nullable_constraint = 96, /* nullable_constraint */ + YYSYMBOL_type = 97, /* type */ + YYSYMBOL_insert_stmt = 98, /* insert_stmt */ + YYSYMBOL_values_list = 99, /* values_list */ + YYSYMBOL_value_list = 100, /* value_list */ + YYSYMBOL_value = 101, /* value */ + YYSYMBOL_nonnegative_value = 102, /* nonnegative_value */ + YYSYMBOL_storage_format = 103, /* storage_format */ + YYSYMBOL_delete_stmt = 104, /* delete_stmt */ + YYSYMBOL_update_stmt = 105, /* update_stmt */ + YYSYMBOL_setClauses = 106, /* setClauses */ + YYSYMBOL_setClause = 107, /* setClause */ + YYSYMBOL_select_stmt = 108, /* select_stmt */ + YYSYMBOL_calc_stmt = 109, /* calc_stmt */ + YYSYMBOL_expression_list = 110, /* expression_list */ + YYSYMBOL_expression = 111, /* expression */ + YYSYMBOL_alias = 112, /* alias */ + YYSYMBOL_aggr_func_expr = 113, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 114, /* sub_query_expr */ + YYSYMBOL_rel_attr = 115, /* rel_attr */ + YYSYMBOL_relation = 116, /* relation */ + YYSYMBOL_rel_list = 117, /* rel_list */ + YYSYMBOL_joinClauses = 118, /* joinClauses */ + YYSYMBOL_where = 119, /* where */ + YYSYMBOL_condition = 120, /* condition */ + YYSYMBOL_comp_op = 121, /* comp_op */ + YYSYMBOL_opt_order_by = 122, /* opt_order_by */ + YYSYMBOL_sort_list = 123, /* sort_list */ + YYSYMBOL_sort_unit = 124, /* sort_unit */ + YYSYMBOL_group_by = 125, /* group_by */ + YYSYMBOL_opt_having = 126, /* opt_having */ + YYSYMBOL_load_data_stmt = 127, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 128, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 129, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 130 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; - - - #ifdef short -# undef short +#undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -325,11 +310,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -# include /* INFRINGES ON USER NAME SPACE */ -# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_STDINT_H -# endif +#include /* INFRINGES ON USER NAME SPACE */ +#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_STDINT_H +#endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -359,16 +344,15 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 +#undef UINT_LEAST8_MAX +#undef UINT_LEAST16_MAX +#define UINT_LEAST8_MAX 255 +#define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -378,8 +362,7 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -388,42 +371,38 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -# define YYPTRDIFF_T __PTRDIFF_TYPE__ -# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -# elif defined PTRDIFF_MAX -# ifndef ptrdiff_t -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYPTRDIFF_T ptrdiff_t -# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -# else -# define YYPTRDIFF_T long -# define YYPTRDIFF_MAXIMUM LONG_MAX -# endif +#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +#define YYPTRDIFF_T __PTRDIFF_TYPE__ +#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +#elif defined PTRDIFF_MAX +#ifndef ptrdiff_t +#include /* INFRINGES ON USER NAME SPACE */ +#endif +#define YYPTRDIFF_T ptrdiff_t +#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +#else +#define YYPTRDIFF_T long +#define YYPTRDIFF_MAXIMUM LONG_MAX +#endif #endif #ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned -# endif +#ifdef __SIZE_TYPE__ +#define YYSIZE_T __SIZE_TYPE__ +#elif defined size_t +#define YYSIZE_T size_t +#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YYSIZE_T size_t +#else +#define YYSIZE_T unsigned +#endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST (YYPTRDIFF_T, \ - (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ - ? YYPTRDIFF_MAXIMUM \ - : YY_CAST (YYSIZE_T, -1))) - -#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) +#define YYSIZE_MAXIMUM \ + YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -432,603 +411,2587 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif +#if defined YYENABLE_NLS && YYENABLE_NLS +#if ENABLE_NLS +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_(Msgid) dgettext("bison-runtime", Msgid) +#endif +#endif +#ifndef YY_ +#define YY_(Msgid) Msgid +#endif #endif - #ifndef YY_ATTRIBUTE_PURE -# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define YY_ATTRIBUTE_PURE -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) +#else +#define YY_ATTRIBUTE_PURE +#endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -# else -# define YY_ATTRIBUTE_UNUSED -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#else +#define YY_ATTRIBUTE_UNUSED +#endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +#if !defined lint || defined __GNUC__ +#define YY_USE(E) ((void)(E)) #else -# define YY_USE(E) /* empty */ +#define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") +#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") #else -# define YY_INITIAL_VALUE(Value) Value +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +#endif +#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") +#else +#define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +#define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -# define YY_IGNORE_USELESS_CAST_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -# define YY_IGNORE_USELESS_CAST_END \ - _Pragma ("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ +#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") +#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_END +#define YY_IGNORE_USELESS_CAST_BEGIN +#define YY_IGNORE_USELESS_CAST_END #endif - -#define YY_ASSERT(E) ((void) (0 && (E))) +#define YY_ASSERT(E) ((void)(0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif +#ifdef YYSTACK_USE_ALLOCA +#if YYSTACK_USE_ALLOCA +#ifdef __GNUC__ +#define YYSTACK_ALLOC __builtin_alloca +#elif defined __BUILTIN_VA_ARG_INCR +#include /* INFRINGES ON USER NAME SPACE */ +#elif defined _AIX +#define YYSTACK_ALLOC __alloca +#elif defined _MSC_VER +#include /* INFRINGES ON USER NAME SPACE */ +#define alloca _alloca +#else +#define YYSTACK_ALLOC alloca +#if !defined _ALLOCA_H && !defined EXIT_SUCCESS +#include /* INFRINGES ON USER NAME SPACE */ +/* Use EXIT_SUCCESS as a witness for stdlib.h. */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#endif +#endif +#endif + +#ifdef YYSTACK_ALLOC +/* Pacify GCC's 'empty if-body' warning. */ +#define YYSTACK_FREE(Ptr) \ + do { /* empty */ \ + ; \ + } while (0) +#ifndef YYSTACK_ALLOC_MAXIMUM +/* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +#endif +#else +#define YYSTACK_ALLOC YYMALLOC +#define YYSTACK_FREE YYFREE +#ifndef YYSTACK_ALLOC_MAXIMUM +#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +#endif +#if (defined __cplusplus && !defined EXIT_SUCCESS && \ + !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) +#include /* INFRINGES ON USER NAME SPACE */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef YYMALLOC +#define YYMALLOC malloc +#if !defined malloc && !defined EXIT_SUCCESS +void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#ifndef YYFREE +#define YYFREE free +#if !defined free && !defined EXIT_SUCCESS +void free(void *); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#endif #endif /* 1 */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ + defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) +#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ - + YYSIZEOF (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) +#define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +#define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF (*yyptr); \ - } \ - while (0) +#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF(*yyptr); \ + } while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif +#ifndef YYCOPY +#if defined __GNUC__ && 1 < __GNUC__ +#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) +#else +#define YYCOPY(Dst, Src, Count) \ + do { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } while (0) +#endif +#endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 71 +#define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 267 +#define YYLAST 267 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 76 +#define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 55 +#define YYNNTS 55 /* YYNRULES -- Number of rules. */ -#define YYNRULES 143 +#define YYNRULES 143 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 251 +#define YYNSTATES 251 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 326 - +#define YYMAXUTOK 326 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 73, 71, 2, 72, 2, 74, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 75 -}; +static const yytype_int8 yytranslate[] = {0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 73, + 71, + 2, + 72, + 2, + 74, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 75}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = -{ - 0, 259, 259, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 291, 297, 302, 308, 314, 320, - 326, 333, 339, 347, 357, 372, 373, 377, 383, 392, - 402, 406, 410, 414, 418, 425, 428, 441, 453, 480, - 484, 488, 493, 499, 500, 501, 502, 503, 507, 520, - 526, 533, 539, 547, 550, 554, 561, 565, 569, 575, - 582, 585, 592, 604, 618, 623, 630, 640, 673, 706, - 712, 721, 724, 733, 749, 752, 755, 758, 761, 769, - 772, 777, 783, 786, 789, 792, 799, 802, 805, 810, - 817, 824, 829, 839, 845, 855, 872, 879, 891, 894, - 900, 904, 911, 915, 922, 923, 924, 925, 926, 927, - 928, 929, 930, 931, 932, 933, 934, 935, 940, 943, - 951, 956, 964, 970, 976, 986, 989, 997, 1000, 1007, - 1020, 1028, 1038, 1039 -}; +static const yytype_int16 yyrline[] = {0, + 259, + 259, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 291, + 297, + 302, + 308, + 314, + 320, + 326, + 333, + 339, + 347, + 357, + 372, + 373, + 377, + 383, + 392, + 402, + 406, + 410, + 414, + 418, + 425, + 428, + 441, + 453, + 480, + 484, + 488, + 493, + 499, + 500, + 501, + 502, + 503, + 507, + 520, + 526, + 533, + 539, + 547, + 550, + 554, + 561, + 565, + 569, + 575, + 582, + 585, + 592, + 604, + 618, + 623, + 630, + 640, + 673, + 706, + 712, + 721, + 724, + 733, + 749, + 752, + 755, + 758, + 761, + 769, + 772, + 777, + 783, + 786, + 789, + 792, + 799, + 802, + 805, + 810, + 817, + 824, + 829, + 839, + 845, + 855, + 872, + 879, + 891, + 894, + 900, + 904, + 911, + 915, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 940, + 943, + 951, + 956, + 964, + 970, + 976, + 986, + 989, + 997, + 1000, + 1007, + 1020, + 1028, + 1038, + 1039}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", - "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "HAVING", "ORDER", - "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", - "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", - "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", - "DATE_T", "TEXT_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", - "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", - "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", - "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", - "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", - "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", - "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", - "show_tables_stmt", "desc_table_stmt", "show_index_stmt", - "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", - "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", - "type", "insert_stmt", "values_list", "value_list", "value", - "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", - "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", - "expression", "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", - "relation", "rel_list", "joinClauses", "where", "condition", "comp_op", - "opt_order_by", "sort_list", "sort_unit", "group_by", "opt_having", - "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR -}; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} +static const char *const yytname[] = {"\"end of file\"", + "error", + "\"invalid token\"", + "SEMICOLON", + "AS", + "ASC", + "BY", + "CREATE", + "DROP", + "EXISTS", + "GROUP", + "HAVING", + "ORDER", + "TABLE", + "TABLES", + "INDEX", + "CALC", + "SELECT", + "DESC", + "SHOW", + "SYNC", + "INSERT", + "DELETE", + "UPDATE", + "LBRACE", + "RBRACE", + "COMMA", + "TRX_BEGIN", + "TRX_COMMIT", + "TRX_ROLLBACK", + "INT_T", + "IN", + "STRING_T", + "FLOAT_T", + "DATE_T", + "TEXT_T", + "NOT", + "UNIQUE", + "NULL_T", + "NULLABLE", + "HELP", + "EXIT", + "DOT", + "INTO", + "VALUES", + "FROM", + "WHERE", + "AND", + "OR", + "SET", + "ON", + "LOAD", + "DATA", + "INFILE", + "EXPLAIN", + "STORAGE", + "FORMAT", + "INNER", + "JOIN", + "EQ", + "LT", + "GT", + "LE", + "GE", + "NE", + "LIKE", + "IS", + "NUMBER", + "FLOAT", + "ID", + "SSS", + "'+'", + "'-'", + "'*'", + "'/'", + "UMINUS", + "$accept", + "commands", + "command_wrapper", + "exit_stmt", + "help_stmt", + "sync_stmt", + "begin_stmt", + "commit_stmt", + "rollback_stmt", + "drop_table_stmt", + "show_tables_stmt", + "desc_table_stmt", + "show_index_stmt", + "create_index_stmt", + "opt_unique", + "attr_list", + "drop_index_stmt", + "create_table_stmt", + "attr_def_list", + "attr_def", + "nullable_constraint", + "type", + "insert_stmt", + "values_list", + "value_list", + "value", + "nonnegative_value", + "storage_format", + "delete_stmt", + "update_stmt", + "setClauses", + "setClause", + "select_stmt", + "calc_stmt", + "expression_list", + "expression", + "alias", + "aggr_func_expr", + "sub_query_expr", + "rel_attr", + "relation", + "rel_list", + "joinClauses", + "where", + "condition", + "comp_op", + "opt_order_by", + "sort_list", + "sort_unit", + "group_by", + "opt_having", + "load_data_stmt", + "explain_stmt", + "set_variable_stmt", + "opt_semicolon", + YY_NULLPTR}; + +static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif #define YYPACT_NINF (-175) -#define yypact_value_is_default(Yyn) \ - ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) \ - 0 +#define yytable_value_is_error(Yyn) 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 210, 5, 38, -10, -10, -13, 12, -175, 29, 19, - 6, -175, -175, -175, -175, -175, 24, 36, 210, 124, - 125, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, 70, -175, 126, 71, 73, 119, -175, -175, - -175, -2, -175, -10, -175, -175, -175, 7, -175, -175, - -175, 99, -175, -175, 100, 77, 78, 101, 89, 98, - -175, -175, -175, -175, -9, 80, -175, 103, -10, 130, - 131, -10, -28, -175, 90, -175, -10, -10, -10, -10, - 132, 91, 91, 117, 116, 94, -18, 95, 102, 108, - 13, 118, 106, 99, -175, -175, 141, -175, -175, -175, - 18, 18, -175, -175, -10, -175, 4, 116, -175, 146, - 143, -175, 113, -7, -175, 52, -175, -175, 133, 97, - 151, 121, 161, -175, 114, -175, -175, -175, 135, 156, - 180, -18, 168, -175, -175, 0, -175, -175, -175, -175, - -175, -175, -175, 159, 35, 55, -10, -10, 94, -175, - -175, -175, 184, -175, -175, -175, -175, -175, 87, 102, - 173, 145, -175, 175, 91, 91, 194, 208, 96, -175, - 196, -175, -175, -175, -175, -10, 143, 143, 41, 41, - -175, 152, 155, 185, -175, -175, -175, 151, 169, -175, - 165, 186, 116, 17, -175, -10, 143, 213, -175, -18, - -18, 41, -175, 188, -175, 215, -175, -175, 21, 216, - 218, 143, 180, -175, 55, 235, -175, -175, 112, 31, - 161, -175, 165, -175, -24, -175, -10, -175, -175, -175, - -175, 187, 11, -175, 220, 91, -175, -175, -10, -175, - -175 -}; +static const yytype_int16 yypact[] = {210, + 5, + 38, + -10, + -10, + -13, + 12, + -175, + 29, + 19, + 6, + -175, + -175, + -175, + -175, + -175, + 24, + 36, + 210, + 124, + 125, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + 70, + -175, + 126, + 71, + 73, + 119, + -175, + -175, + -175, + -2, + -175, + -10, + -175, + -175, + -175, + 7, + -175, + -175, + -175, + 99, + -175, + -175, + 100, + 77, + 78, + 101, + 89, + 98, + -175, + -175, + -175, + -175, + -9, + 80, + -175, + 103, + -10, + 130, + 131, + -10, + -28, + -175, + 90, + -175, + -10, + -10, + -10, + -10, + 132, + 91, + 91, + 117, + 116, + 94, + -18, + 95, + 102, + 108, + 13, + 118, + 106, + 99, + -175, + -175, + 141, + -175, + -175, + -175, + 18, + 18, + -175, + -175, + -10, + -175, + 4, + 116, + -175, + 146, + 143, + -175, + 113, + -7, + -175, + 52, + -175, + -175, + 133, + 97, + 151, + 121, + 161, + -175, + 114, + -175, + -175, + -175, + 135, + 156, + 180, + -18, + 168, + -175, + -175, + 0, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + 159, + 35, + 55, + -10, + -10, + 94, + -175, + -175, + -175, + 184, + -175, + -175, + -175, + -175, + -175, + 87, + 102, + 173, + 145, + -175, + 175, + 91, + 91, + 194, + 208, + 96, + -175, + 196, + -175, + -175, + -175, + -175, + -10, + 143, + 143, + 41, + 41, + -175, + 152, + 155, + 185, + -175, + -175, + -175, + 151, + 169, + -175, + 165, + 186, + 116, + 17, + -175, + -10, + 143, + 213, + -175, + -18, + -18, + 41, + -175, + 188, + -175, + 215, + -175, + -175, + 21, + 216, + 218, + 143, + 180, + -175, + 55, + 235, + -175, + -175, + 112, + 31, + 161, + -175, + 165, + -175, + -24, + -175, + -10, + -175, + -175, + -175, + -175, + 187, + 11, + -175, + 220, + 91, + -175, + -175, + -10, + -175, + -175}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 36, 0, 81, 81, 0, 0, 26, 0, 0, - 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 142, 23, 22, 15, 16, 17, 18, 9, 10, 11, - 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 35, 0, 0, 0, 81, 69, 66, - 67, 101, 68, 0, 92, 90, 79, 96, 94, 95, - 91, 80, 32, 31, 0, 0, 0, 0, 0, 0, - 140, 1, 143, 2, 70, 0, 30, 0, 81, 0, - 0, 81, 0, 89, 0, 97, 0, 0, 0, 0, - 82, 0, 0, 0, 108, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 100, 88, 0, 102, 93, 98, - 84, 85, 86, 87, 81, 103, 96, 108, 33, 0, - 0, 72, 0, 108, 74, 0, 141, 63, 0, 0, - 45, 0, 0, 44, 0, 39, 99, 83, 0, 104, - 135, 0, 58, 126, 124, 0, 114, 115, 116, 117, - 118, 119, 122, 120, 0, 109, 0, 0, 0, 73, - 64, 65, 0, 53, 54, 55, 56, 57, 52, 0, - 0, 0, 43, 0, 0, 0, 0, 137, 0, 61, - 0, 127, 125, 123, 121, 0, 0, 0, 111, 76, - 75, 0, 0, 0, 51, 50, 48, 45, 70, 71, - 0, 0, 108, 96, 105, 81, 0, 128, 59, 0, - 0, 110, 112, 113, 139, 0, 49, 46, 42, 37, - 0, 0, 135, 136, 138, 0, 77, 62, 0, 52, - 0, 41, 0, 34, 106, 78, 0, 60, 47, 40, - 38, 0, 132, 129, 130, 0, 134, 133, 0, 107, - 131 -}; +static const yytype_uint8 yydefact[] = {0, + 36, + 0, + 81, + 81, + 0, + 0, + 26, + 0, + 0, + 0, + 27, + 28, + 29, + 25, + 24, + 0, + 0, + 0, + 0, + 142, + 23, + 22, + 15, + 16, + 17, + 18, + 9, + 10, + 11, + 14, + 12, + 13, + 8, + 5, + 7, + 6, + 4, + 3, + 19, + 20, + 21, + 0, + 35, + 0, + 0, + 0, + 81, + 69, + 66, + 67, + 101, + 68, + 0, + 92, + 90, + 79, + 96, + 94, + 95, + 91, + 80, + 32, + 31, + 0, + 0, + 0, + 0, + 0, + 0, + 140, + 1, + 143, + 2, + 70, + 0, + 30, + 0, + 81, + 0, + 0, + 81, + 0, + 89, + 0, + 97, + 0, + 0, + 0, + 0, + 82, + 0, + 0, + 0, + 108, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 100, + 88, + 0, + 102, + 93, + 98, + 84, + 85, + 86, + 87, + 81, + 103, + 96, + 108, + 33, + 0, + 0, + 72, + 0, + 108, + 74, + 0, + 141, + 63, + 0, + 0, + 45, + 0, + 0, + 44, + 0, + 39, + 99, + 83, + 0, + 104, + 135, + 0, + 58, + 126, + 124, + 0, + 114, + 115, + 116, + 117, + 118, + 119, + 122, + 120, + 0, + 109, + 0, + 0, + 0, + 73, + 64, + 65, + 0, + 53, + 54, + 55, + 56, + 57, + 52, + 0, + 0, + 0, + 43, + 0, + 0, + 0, + 0, + 137, + 0, + 61, + 0, + 127, + 125, + 123, + 121, + 0, + 0, + 0, + 111, + 76, + 75, + 0, + 0, + 0, + 51, + 50, + 48, + 45, + 70, + 71, + 0, + 0, + 108, + 96, + 105, + 81, + 0, + 128, + 59, + 0, + 0, + 110, + 112, + 113, + 139, + 0, + 49, + 46, + 42, + 37, + 0, + 0, + 135, + 136, + 138, + 0, + 77, + 62, + 0, + 52, + 0, + 41, + 0, + 34, + 106, + 78, + 0, + 60, + 47, + 40, + 38, + 0, + 132, + 129, + 130, + 0, + 134, + 133, + 0, + 107, + 131}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -175, -175, 226, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, -175, 15, -175, -175, 51, 83, - 20, -175, -175, -175, 43, -91, -93, 56, -175, -175, - -175, 104, -45, -175, -4, -52, 198, -175, -175, -175, - -85, 81, 22, -113, -174, 109, -175, 9, -175, 44, - -175, -175, -175, -175, -175 -}; +static const yytype_int16 yypgoto[] = {-175, + -175, + 226, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + 15, + -175, + -175, + 51, + 83, + 20, + -175, + -175, + -175, + 43, + -91, + -93, + 56, + -175, + -175, + -175, + 104, + -45, + -175, + -4, + -52, + 198, + -175, + -175, + -175, + -85, + 81, + 22, + -113, + -174, + 109, + -175, + 9, + -175, + 44, + -175, + -175, + -175, + -175, + -175}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = -{ - 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 220, 32, 33, 170, 130, - 196, 168, 34, 142, 178, 179, 55, 100, 35, 36, - 123, 124, 37, 38, 56, 57, 139, 58, 59, 60, - 201, 117, 202, 121, 155, 156, 226, 243, 244, 177, - 207, 39, 40, 41, 73 -}; +static const yytype_uint8 yydefgoto[] = {0, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 44, + 220, + 32, + 33, + 170, + 130, + 196, + 168, + 34, + 142, + 178, + 179, + 55, + 100, + 35, + 36, + 123, + 124, + 37, + 38, + 56, + 57, + 139, + 58, + 59, + 60, + 201, + 117, + 202, + 121, + 155, + 156, + 226, + 243, + 244, + 177, + 207, + 39, + 40, + 41, + 73}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = -{ - 61, 83, 79, 127, 140, 126, 116, 118, 84, 181, - 159, 84, 212, 213, 47, 98, 246, 132, 42, 158, - 48, 84, 81, 186, 187, 230, 63, 64, 48, 247, - 78, 182, 224, 241, 110, 111, 112, 113, 78, 120, - 82, 107, 43, 80, 143, 108, 99, 234, 127, 49, - 50, 45, 52, 46, 125, 133, 62, 49, 50, 51, - 52, 138, 53, 54, 66, 183, 144, 193, 154, 194, - 195, 145, 65, 85, 103, 67, 85, 106, 86, 87, - 88, 89, 86, 87, 88, 89, 85, 172, 69, 222, - 203, 88, 89, 68, 146, 147, 148, 149, 150, 151, - 152, 153, 186, 187, 188, 189, 86, 87, 88, 89, - 137, 192, 86, 87, 88, 89, 127, 127, 227, 160, - 161, 208, 209, 193, 71, 194, 195, 163, 72, 164, - 165, 166, 167, 211, 154, 154, 78, 237, 209, 74, - 76, 75, 77, 47, 91, 92, 93, 94, 96, 101, - 95, 97, 143, 102, 154, 104, 105, 48, 114, 109, - 115, 119, 120, 122, 131, 128, 136, 47, 134, 154, - 141, 129, 157, 231, 144, 135, 162, 169, 78, 145, - 171, 48, 175, 173, 242, 239, 49, 50, 51, 52, - 176, 53, 54, 174, 180, 184, 242, 191, 198, 200, - 205, 223, 146, 147, 148, 149, 150, 151, 152, 153, - 49, 50, 51, 52, 199, 53, 54, 1, 2, 206, - 210, 214, 215, 216, 99, 225, 3, 4, 5, 6, - 7, 8, 9, 10, 219, 186, 221, 11, 12, 13, - 229, 236, 232, 233, 70, 245, 248, 240, 217, 238, - 14, 15, 197, 228, 218, 90, 204, 250, 0, 16, - 0, 17, 190, 185, 18, 0, 235, 249 -}; - -static const yytype_int16 yycheck[] = -{ - 4, 53, 47, 96, 117, 96, 91, 92, 4, 9, - 123, 4, 186, 187, 24, 24, 5, 4, 13, 26, - 38, 4, 24, 47, 48, 4, 14, 15, 38, 18, - 17, 31, 206, 57, 86, 87, 88, 89, 17, 46, - 42, 69, 37, 47, 9, 73, 55, 221, 141, 67, - 68, 13, 70, 15, 72, 100, 69, 67, 68, 69, - 70, 57, 72, 73, 45, 65, 31, 36, 120, 38, - 39, 36, 43, 69, 78, 69, 69, 81, 71, 72, - 73, 74, 71, 72, 73, 74, 69, 132, 52, 202, - 175, 73, 74, 69, 59, 60, 61, 62, 63, 64, - 65, 66, 47, 48, 156, 157, 71, 72, 73, 74, - 114, 24, 71, 72, 73, 74, 209, 210, 209, 67, - 68, 25, 26, 36, 0, 38, 39, 30, 3, 32, - 33, 34, 35, 185, 186, 187, 17, 25, 26, 69, - 69, 15, 69, 24, 45, 45, 69, 69, 59, 69, - 49, 53, 9, 50, 206, 25, 25, 38, 26, 69, - 69, 44, 46, 69, 56, 70, 25, 24, 50, 221, - 24, 69, 59, 218, 31, 69, 43, 26, 17, 36, - 59, 38, 26, 69, 236, 230, 67, 68, 69, 70, - 10, 72, 73, 58, 26, 36, 248, 13, 25, 24, - 6, 205, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 69, 72, 73, 7, 8, 11, - 24, 69, 67, 38, 55, 12, 16, 17, 18, 19, - 20, 21, 22, 23, 69, 47, 50, 27, 28, 29, - 25, 6, 26, 25, 18, 58, 26, 232, 197, 229, - 40, 41, 169, 210, 198, 57, 175, 248, -1, 49, - -1, 51, 158, 154, 54, -1, 222, 245 -}; +static const yytype_uint8 yytable[] = {61, + 83, + 79, + 127, + 140, + 126, + 116, + 118, + 84, + 181, + 159, + 84, + 212, + 213, + 47, + 98, + 246, + 132, + 42, + 158, + 48, + 84, + 81, + 186, + 187, + 230, + 63, + 64, + 48, + 247, + 78, + 182, + 224, + 241, + 110, + 111, + 112, + 113, + 78, + 120, + 82, + 107, + 43, + 80, + 143, + 108, + 99, + 234, + 127, + 49, + 50, + 45, + 52, + 46, + 125, + 133, + 62, + 49, + 50, + 51, + 52, + 138, + 53, + 54, + 66, + 183, + 144, + 193, + 154, + 194, + 195, + 145, + 65, + 85, + 103, + 67, + 85, + 106, + 86, + 87, + 88, + 89, + 86, + 87, + 88, + 89, + 85, + 172, + 69, + 222, + 203, + 88, + 89, + 68, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 186, + 187, + 188, + 189, + 86, + 87, + 88, + 89, + 137, + 192, + 86, + 87, + 88, + 89, + 127, + 127, + 227, + 160, + 161, + 208, + 209, + 193, + 71, + 194, + 195, + 163, + 72, + 164, + 165, + 166, + 167, + 211, + 154, + 154, + 78, + 237, + 209, + 74, + 76, + 75, + 77, + 47, + 91, + 92, + 93, + 94, + 96, + 101, + 95, + 97, + 143, + 102, + 154, + 104, + 105, + 48, + 114, + 109, + 115, + 119, + 120, + 122, + 131, + 128, + 136, + 47, + 134, + 154, + 141, + 129, + 157, + 231, + 144, + 135, + 162, + 169, + 78, + 145, + 171, + 48, + 175, + 173, + 242, + 239, + 49, + 50, + 51, + 52, + 176, + 53, + 54, + 174, + 180, + 184, + 242, + 191, + 198, + 200, + 205, + 223, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 49, + 50, + 51, + 52, + 199, + 53, + 54, + 1, + 2, + 206, + 210, + 214, + 215, + 216, + 99, + 225, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 219, + 186, + 221, + 11, + 12, + 13, + 229, + 236, + 232, + 233, + 70, + 245, + 248, + 240, + 217, + 238, + 14, + 15, + 197, + 228, + 218, + 90, + 204, + 250, + 0, + 16, + 0, + 17, + 190, + 185, + 18, + 0, + 235, + 249}; + +static const yytype_int16 yycheck[] = {4, + 53, + 47, + 96, + 117, + 96, + 91, + 92, + 4, + 9, + 123, + 4, + 186, + 187, + 24, + 24, + 5, + 4, + 13, + 26, + 38, + 4, + 24, + 47, + 48, + 4, + 14, + 15, + 38, + 18, + 17, + 31, + 206, + 57, + 86, + 87, + 88, + 89, + 17, + 46, + 42, + 69, + 37, + 47, + 9, + 73, + 55, + 221, + 141, + 67, + 68, + 13, + 70, + 15, + 72, + 100, + 69, + 67, + 68, + 69, + 70, + 57, + 72, + 73, + 45, + 65, + 31, + 36, + 120, + 38, + 39, + 36, + 43, + 69, + 78, + 69, + 69, + 81, + 71, + 72, + 73, + 74, + 71, + 72, + 73, + 74, + 69, + 132, + 52, + 202, + 175, + 73, + 74, + 69, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 47, + 48, + 156, + 157, + 71, + 72, + 73, + 74, + 114, + 24, + 71, + 72, + 73, + 74, + 209, + 210, + 209, + 67, + 68, + 25, + 26, + 36, + 0, + 38, + 39, + 30, + 3, + 32, + 33, + 34, + 35, + 185, + 186, + 187, + 17, + 25, + 26, + 69, + 69, + 15, + 69, + 24, + 45, + 45, + 69, + 69, + 59, + 69, + 49, + 53, + 9, + 50, + 206, + 25, + 25, + 38, + 26, + 69, + 69, + 44, + 46, + 69, + 56, + 70, + 25, + 24, + 50, + 221, + 24, + 69, + 59, + 218, + 31, + 69, + 43, + 26, + 17, + 36, + 59, + 38, + 26, + 69, + 236, + 230, + 67, + 68, + 69, + 70, + 10, + 72, + 73, + 58, + 26, + 36, + 248, + 13, + 25, + 24, + 6, + 205, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 69, + 72, + 73, + 7, + 8, + 11, + 24, + 69, + 67, + 38, + 55, + 12, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 69, + 47, + 50, + 27, + 28, + 29, + 25, + 6, + 26, + 25, + 18, + 58, + 26, + 232, + 197, + 229, + 40, + 41, + 169, + 210, + 198, + 57, + 175, + 248, + -1, + 49, + -1, + 51, + 158, + 154, + 54, + -1, + 222, + 245}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, - 23, 27, 28, 29, 40, 41, 49, 51, 54, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 92, 93, 98, 104, 105, 108, 109, 127, - 128, 129, 13, 37, 90, 13, 15, 24, 38, 67, - 68, 69, 70, 72, 73, 102, 110, 111, 113, 114, - 115, 110, 69, 14, 15, 43, 45, 69, 69, 52, - 78, 0, 3, 130, 69, 15, 69, 69, 17, 108, - 110, 24, 42, 111, 4, 69, 71, 72, 73, 74, - 112, 45, 45, 69, 69, 49, 59, 53, 24, 55, - 103, 69, 50, 110, 25, 25, 110, 69, 73, 69, - 111, 111, 111, 111, 26, 69, 116, 117, 116, 44, - 46, 119, 69, 106, 107, 72, 101, 102, 70, 69, - 95, 56, 4, 108, 50, 69, 25, 110, 57, 112, - 119, 24, 99, 9, 31, 36, 59, 60, 61, 62, - 63, 64, 65, 66, 111, 120, 121, 59, 26, 119, - 67, 68, 43, 30, 32, 33, 34, 35, 97, 26, - 94, 59, 108, 69, 58, 26, 10, 125, 100, 101, - 26, 9, 31, 65, 36, 121, 47, 48, 111, 111, - 107, 13, 24, 36, 38, 39, 96, 95, 25, 69, - 24, 116, 118, 116, 117, 6, 11, 126, 25, 26, - 24, 111, 120, 120, 69, 67, 38, 94, 103, 69, - 91, 50, 119, 110, 120, 12, 122, 101, 100, 25, - 4, 108, 26, 25, 120, 125, 6, 25, 96, 108, - 91, 57, 111, 123, 124, 58, 5, 18, 26, 118, - 123 -}; +static const yytype_uint8 yystos[] = {0, + 7, + 8, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 27, + 28, + 29, + 40, + 41, + 49, + 51, + 54, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 92, + 93, + 98, + 104, + 105, + 108, + 109, + 127, + 128, + 129, + 13, + 37, + 90, + 13, + 15, + 24, + 38, + 67, + 68, + 69, + 70, + 72, + 73, + 102, + 110, + 111, + 113, + 114, + 115, + 110, + 69, + 14, + 15, + 43, + 45, + 69, + 69, + 52, + 78, + 0, + 3, + 130, + 69, + 15, + 69, + 69, + 17, + 108, + 110, + 24, + 42, + 111, + 4, + 69, + 71, + 72, + 73, + 74, + 112, + 45, + 45, + 69, + 69, + 49, + 59, + 53, + 24, + 55, + 103, + 69, + 50, + 110, + 25, + 25, + 110, + 69, + 73, + 69, + 111, + 111, + 111, + 111, + 26, + 69, + 116, + 117, + 116, + 44, + 46, + 119, + 69, + 106, + 107, + 72, + 101, + 102, + 70, + 69, + 95, + 56, + 4, + 108, + 50, + 69, + 25, + 110, + 57, + 112, + 119, + 24, + 99, + 9, + 31, + 36, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 111, + 120, + 121, + 59, + 26, + 119, + 67, + 68, + 43, + 30, + 32, + 33, + 34, + 35, + 97, + 26, + 94, + 59, + 108, + 69, + 58, + 26, + 10, + 125, + 100, + 101, + 26, + 9, + 31, + 65, + 36, + 121, + 47, + 48, + 111, + 111, + 107, + 13, + 24, + 36, + 38, + 39, + 96, + 95, + 25, + 69, + 24, + 116, + 118, + 116, + 117, + 6, + 11, + 126, + 25, + 26, + 24, + 111, + 120, + 120, + 69, + 67, + 38, + 94, + 103, + 69, + 91, + 50, + 119, + 110, + 120, + 12, + 122, + 101, + 100, + 25, + 4, + 108, + 26, + 25, + 120, + 125, + 6, + 25, + 96, + 108, + 91, + 57, + 111, + 123, + 124, + 58, + 5, + 18, + 26, + 118, + 123}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = -{ - 0, 76, 77, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 90, 91, 91, 92, - 93, 93, 93, 93, 93, 94, 94, 95, 95, 96, - 96, 96, 96, 97, 97, 97, 97, 97, 98, 99, - 99, 100, 100, 101, 101, 101, 102, 102, 102, 102, - 103, 103, 104, 105, 106, 106, 107, 108, 108, 109, - 109, 110, 110, 110, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 112, 112, 112, 113, - 114, 115, 115, 116, 117, 117, 118, 118, 119, 119, - 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, - 123, 123, 124, 124, 124, 125, 125, 126, 126, 127, - 128, 129, 130, 130 -}; +static const yytype_uint8 yyr1[] = {0, + 76, + 77, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 90, + 91, + 91, + 92, + 93, + 93, + 93, + 93, + 93, + 94, + 94, + 95, + 95, + 96, + 96, + 96, + 96, + 97, + 97, + 97, + 97, + 97, + 98, + 99, + 99, + 100, + 100, + 101, + 101, + 101, + 102, + 102, + 102, + 102, + 103, + 103, + 104, + 105, + 106, + 106, + 107, + 108, + 108, + 109, + 109, + 110, + 110, + 110, + 111, + 111, + 111, + 111, + 111, + 111, + 111, + 111, + 111, + 111, + 111, + 111, + 112, + 112, + 112, + 113, + 114, + 115, + 115, + 116, + 117, + 117, + 118, + 118, + 119, + 119, + 120, + 120, + 120, + 120, + 121, + 121, + 121, + 121, + 121, + 121, + 121, + 121, + 121, + 121, + 121, + 121, + 121, + 121, + 122, + 122, + 123, + 123, + 124, + 124, + 124, + 125, + 125, + 126, + 126, + 127, + 128, + 129, + 130, + 130}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = +static const yytype_int8 yyr2[] = {0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 2, + 2, + 4, + 9, + 1, + 0, + 1, + 3, + 5, + 10, + 9, + 8, + 6, + 5, + 0, + 3, + 6, + 3, + 2, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 5, + 3, + 5, + 1, + 3, + 1, + 2, + 2, + 1, + 1, + 1, + 1, + 0, + 4, + 4, + 5, + 1, + 3, + 3, + 8, + 9, + 2, + 2, + 0, + 2, + 4, + 3, + 3, + 3, + 3, + 3, + 2, + 1, + 1, + 1, + 3, + 1, + 1, + 0, + 1, + 2, + 4, + 3, + 1, + 3, + 1, + 2, + 4, + 3, + 6, + 0, + 2, + 3, + 2, + 3, + 3, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 0, + 3, + 1, + 3, + 1, + 2, + 2, + 0, + 3, + 0, + 2, + 7, + 2, + 4, + 0, + 1}; + +enum { - 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, - 10, 9, 8, 6, 5, 0, 3, 6, 3, 2, - 1, 1, 0, 1, 1, 1, 1, 1, 5, 3, - 5, 1, 3, 1, 2, 2, 1, 1, 1, 1, - 0, 4, 4, 5, 1, 3, 3, 8, 9, 2, - 2, 0, 2, 4, 3, 3, 3, 3, 3, 2, - 1, 1, 1, 3, 1, 1, 0, 1, 2, 4, - 3, 1, 3, 1, 2, 4, 3, 6, 0, 2, - 3, 2, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, - 1, 3, 1, 2, 2, 0, 3, 0, 2, 7, - 2, 4, 0, 1 + YYENOMEM = -2 }; - -enum { YYENOMEM = -2 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK(yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } else { \ + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -1040,151 +3003,131 @@ enum { YYENOMEM = -2 }; the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) +#define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) { \ + (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ + } else { \ + (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) - /* Enable debugging if requested. */ #if YYDEBUG -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +#ifndef YYFPRINTF +#include /* INFRINGES ON USER NAME SPACE */ +#define YYFPRINTF fprintf +#endif +#define YYDPRINTF(Args) \ + do { \ + if (yydebug) \ + YYFPRINTF Args; \ + } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YYLOCATION_PRINT +#ifndef YYLOCATION_PRINT -# if defined YY_LOCATION_PRINT +#if defined YY_LOCATION_PRINT - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) { + res += YYFPRINTF(yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF(yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) { + if (yylocp->first_line < yylocp->last_line) { + res += YYFPRINTF(yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF(yyo, ".%d", end_col); + } else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF(yyo, "-%d", end_col); + } return res; } -# define YYLOCATION_PRINT yy_location_print_ - - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) - -# else +#define YYLOCATION_PRINT yy_location_print_ -# define YYLOCATION_PRINT(File, Loc) ((void) 0) - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT YYLOCATION_PRINT +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -# endif -# endif /* !defined YYLOCATION_PRINT */ +#else +#define YYLOCATION_PRINT(File, Loc) ((void)0) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT YYLOCATION_PRINT -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +#endif +#endif /* !defined YYLOCATION_PRINT */ +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ + do { \ + if (yydebug) { \ + YYFPRINTF(stderr, "%s ", Title); \ + yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF(stderr, "\n"); \ + } \ + } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyoutput); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); - YYLOCATION_PRINT (yyo, yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF (yyo, ")"); + YYLOCATION_PRINT(yyo, yylocationp); + YYFPRINTF(yyo, ": "); + yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF(yyo, ")"); } /*------------------------------------------------------------------. @@ -1192,70 +3135,66 @@ yy_symbol_print (FILE *yyo, | TOP (included). | `------------------------------------------------------------------*/ -static void -yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); + YYFPRINTF(stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) { + int yybot = *yybottom; + YYFPRINTF(stderr, " %d", yybot); + } + YYFPRINTF(stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - +#define YY_STACK_PRINT(Bottom, Top) \ + do { \ + if (yydebug) \ + yy_stack_print((Bottom), (Top)); \ + } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, + ParsedSqlResult *sql_result, void *scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", - yyrule - 1, yylno); + YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); - YYFPRINTF (stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) { + YYFPRINTF(stderr, " $%d = ", yyi + 1); + yy_symbol_print(stderr, + YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), + sql_string, + sql_result, + scanner); + YYFPRINTF(stderr, "\n"); + } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ -} while (0) +#define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug) \ + yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ + } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) +#define YYDPRINTF(Args) ((void)0) +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +#define YY_STACK_PRINT(Bottom, Top) +#define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -1266,16 +3205,15 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 +#define YYMAXDEPTH 10000 #endif - /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -1284,69 +3222,59 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default(yyn)) { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } - - - #ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else +#if defined __GLIBC__ && defined _STRING_H +#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) +#else /* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) +static YYPTRDIFF_T yystrlen(const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -# endif +#endif #endif #ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +#define yystpcpy stpcpy +#else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) +static char *yystpcpy(char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -1354,7 +3282,7 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } -# endif +#endif #endif #ifndef yytnamerr @@ -1365,52 +3293,45 @@ yystpcpy (char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) +static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) { - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': + if (*yystr == '"') { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) { + case '\'': + case ',': goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes:; + } if (yyres) - return yystpcpy (yyres, yystr) - yyres; + return yystpcpy(yyres, yystr) - yyres; else - return yystrlen (yystr); + return yystrlen(yystr); } #endif - -static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -1437,19 +3358,17 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) - { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -1461,11 +3380,12 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) +static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) { - enum { YYARGS_MAX = 5 }; + enum + { + YYARGS_MAX = 5 + }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -1475,16 +3395,13 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) - { -#define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break + switch (yycount) { +#define YYCASE_(N, S) \ + case N: yyformat = S; break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1493,134 +3410,118 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; + yysize = yystrlen(yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) { + YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) { + *yymsg_alloc = 2 * yysize; + if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { + yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } else { + ++yyp; + ++yyformat; + } } return 0; } - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, + const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyvaluep); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - - - - /*----------. | yyparse. | `----------*/ -int -yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { -/* Lookahead token kind. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; + /* Lookahead token kind. */ + int yychar; + + /* The semantic value of the lookahead symbol. */ + /* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ + YY_INITIAL_VALUE(static YYSTYPE yyval_default;) + YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); + + /* Location data for the lookahead symbol. */ + static YYLTYPE yyloc_default +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = {1, 1, 1, 1} +#endif + ; + YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -1636,24 +3537,23 @@ YYLTYPE yylloc = yyloc_default; YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF ((stderr, "Starting parse\n")); + YYDPRINTF((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; - /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -1662,93 +3562,90 @@ YYLTYPE yylloc = yyloc_default; have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YYDPRINTF((stderr, "Entering state %d\n", yystate)); + YY_ASSERT(0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST (yy_state_t, yystate); + *yyssp = YY_CAST(yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else + { + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +#if defined yyoverflow { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -# if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * YYSIZEOF (*yyssp), - &yyvs1, yysize * YYSIZEOF (*yyvsp), - &yyls1, yysize * YYSIZEOF (*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow(YY_("memory exhausted"), + &yyss1, + yysize * YYSIZEOF(*yyssp), + &yyvs1, + yysize * YYSIZEOF(*yyvsp), + &yyls1, + yysize * YYSIZEOF(*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +#else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + YYNOMEM; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); + if (!yyptr) YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = - YY_CAST (union yyalloc *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); - if (! yyptr) - YYNOMEM; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif + YYSTACK_RELOCATE(yyss_alloc, yyss); + YYSTACK_RELOCATE(yyvs_alloc, yyvs); + YYSTACK_RELOCATE(yyls_alloc, yyls); +#undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE(yyss1); + } +#endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF ((stderr, "Stack size increased to %ld\n", - YY_CAST (long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; goto yybackup; - /*-----------. | yybackup. | `-----------*/ @@ -1758,40 +3655,34 @@ YYLTYPE yylloc = yyloc_default; /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yypact_value_is_default(yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token\n")); - yychar = yylex (&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) { + YYDPRINTF((stderr, "Reading a token\n")); + yychar = yylex(&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) - { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else if (yychar == YYerror) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF((stderr, "Now at end of input.\n")); + } else if (yychar == YYerror) { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } else { + yytoken = YYTRANSLATE(yychar); + YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -1799,13 +3690,12 @@ YYLTYPE yylloc = yyloc_default; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) { + if (yytable_value_is_error(yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -1813,7 +3703,7 @@ YYLTYPE yylloc = yyloc_default; yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -1824,7 +3714,6 @@ YYLTYPE yylloc = yyloc_default; yychar = YYEMPTY; goto yynewstate; - /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -1834,7 +3723,6 @@ YYLTYPE yylloc = yyloc_default; goto yyerrlab; goto yyreduce; - /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -1850,164 +3738,168 @@ YYLTYPE yylloc = yyloc_default; users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + yyval = yyvsp[1 - yylen]; /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: /* commands: command_wrapper opt_semicolon */ + YY_REDUCE_PRINT(yyn); + switch (yyn) { + case 2: /* commands: command_wrapper opt_semicolon */ #line 260 "yacc_sql.y" - { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } #line 1868 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ + case 24: /* exit_stmt: EXIT */ #line 291 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } #line 1877 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ + case 25: /* help_stmt: HELP */ #line 297 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } #line 1885 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ + case 26: /* sync_stmt: SYNC */ #line 302 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } #line 1893 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ + case 27: /* begin_stmt: TRX_BEGIN */ #line 308 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } #line 1901 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ + case 28: /* commit_stmt: TRX_COMMIT */ #line 314 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } #line 1909 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ + case 29: /* rollback_stmt: TRX_ROLLBACK */ #line 320 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } #line 1917 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ + case 30: /* drop_table_stmt: DROP TABLE ID */ #line 326 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1927 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ + case 31: /* show_tables_stmt: SHOW TABLES */ #line 333 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } #line 1935 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ + case 32: /* desc_table_stmt: DESC ID */ #line 339 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1945 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ #line 348 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1956 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ + case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ #line 358 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } #line 1972 "yacc_sql.cpp" break; - case 35: /* opt_unique: UNIQUE */ + case 35: /* opt_unique: UNIQUE */ #line 372 "yacc_sql.y" - { (yyval.unique) = true; } + { + (yyval.unique) = true; + } #line 1978 "yacc_sql.cpp" break; - case 36: /* opt_unique: %empty */ + case 36: /* opt_unique: %empty */ #line 373 "yacc_sql.y" - { (yyval.unique) = false; } + { + (yyval.unique) = false; + } #line 1984 "yacc_sql.cpp" break; - case 37: /* attr_list: ID */ + case 37: /* attr_list: ID */ #line 378 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } #line 1994 "yacc_sql.cpp" break; - case 38: /* attr_list: ID COMMA attr_list */ + case 38: /* attr_list: ID COMMA attr_list */ #line 384 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list) + ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } #line 2004 "yacc_sql.cpp" break; - case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 393 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); @@ -2015,47 +3907,52 @@ YYLTYPE yylloc = yyloc_default; #line 2016 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ #line 403 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } #line 2024 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ + case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ #line 407 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } #line 2032 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 411 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } #line 2040 "yacc_sql.cpp" break; - case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ + case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ #line 415 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = + create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } #line 2048 "yacc_sql.cpp" break; - case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ + case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ #line 419 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = + create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } #line 2056 "yacc_sql.cpp" break; - case 45: /* attr_def_list: %empty */ + case 45: /* attr_def_list: %empty */ #line 425 "yacc_sql.y" { (yyval.attr_infos) = nullptr; @@ -2063,7 +3960,7 @@ YYLTYPE yylloc = yyloc_default; #line 2064 "yacc_sql.cpp" break; - case 46: /* attr_def_list: COMMA attr_def attr_def_list */ + case 46: /* attr_def_list: COMMA attr_def attr_def_list */ #line 429 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -2077,13 +3974,13 @@ YYLTYPE yylloc = yyloc_default; #line 2078 "yacc_sql.cpp" break; - case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ + case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ #line 442 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; @@ -2093,10 +3990,10 @@ YYLTYPE yylloc = yyloc_default; #line 2094 "yacc_sql.cpp" break; - case 48: /* attr_def: ID type nullable_constraint */ + case 48: /* attr_def: ID type nullable_constraint */ #line 454 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -2121,7 +4018,7 @@ YYLTYPE yylloc = yyloc_default; #line 2122 "yacc_sql.cpp" break; - case 49: /* nullable_constraint: NOT NULL_T */ + case 49: /* nullable_constraint: NOT NULL_T */ #line 481 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false @@ -2129,7 +4026,7 @@ YYLTYPE yylloc = yyloc_default; #line 2130 "yacc_sql.cpp" break; - case 50: /* nullable_constraint: NULLABLE */ + case 50: /* nullable_constraint: NULLABLE */ #line 485 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 @@ -2137,7 +4034,7 @@ YYLTYPE yylloc = yyloc_default; #line 2138 "yacc_sql.cpp" break; - case 51: /* nullable_constraint: NULL_T */ + case 51: /* nullable_constraint: NULL_T */ #line 489 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 @@ -2145,7 +4042,7 @@ YYLTYPE yylloc = yyloc_default; #line 2146 "yacc_sql.cpp" break; - case 52: /* nullable_constraint: %empty */ + case 52: /* nullable_constraint: %empty */ #line 493 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL @@ -2153,40 +4050,50 @@ YYLTYPE yylloc = yyloc_default; #line 2154 "yacc_sql.cpp" break; - case 53: /* type: INT_T */ + case 53: /* type: INT_T */ #line 499 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::INTS); } + { + (yyval.number) = static_cast(AttrType::INTS); + } #line 2160 "yacc_sql.cpp" break; - case 54: /* type: STRING_T */ + case 54: /* type: STRING_T */ #line 500 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::CHARS); } + { + (yyval.number) = static_cast(AttrType::CHARS); + } #line 2166 "yacc_sql.cpp" break; - case 55: /* type: FLOAT_T */ + case 55: /* type: FLOAT_T */ #line 501 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::FLOATS); } + { + (yyval.number) = static_cast(AttrType::FLOATS); + } #line 2172 "yacc_sql.cpp" break; - case 56: /* type: DATE_T */ + case 56: /* type: DATE_T */ #line 502 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::DATES); } + { + (yyval.number) = static_cast(AttrType::DATES); + } #line 2178 "yacc_sql.cpp" break; - case 57: /* type: TEXT_T */ + case 57: /* type: TEXT_T */ #line 503 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::TEXTS); } + { + (yyval.number) = static_cast(AttrType::TEXTS); + } #line 2184 "yacc_sql.cpp" break; - case 58: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 58: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 508 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -2197,7 +4104,7 @@ YYLTYPE yylloc = yyloc_default; #line 2198 "yacc_sql.cpp" break; - case 59: /* values_list: LBRACE value_list RBRACE */ + case 59: /* values_list: LBRACE value_list RBRACE */ #line 521 "yacc_sql.y" { (yyval.values_list) = new std::vector>; @@ -2207,7 +4114,7 @@ YYLTYPE yylloc = yyloc_default; #line 2208 "yacc_sql.cpp" break; - case 60: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 60: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 527 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); @@ -2216,7 +4123,7 @@ YYLTYPE yylloc = yyloc_default; #line 2217 "yacc_sql.cpp" break; - case 61: /* value_list: value */ + case 61: /* value_list: value */ #line 534 "yacc_sql.y" { (yyval.value_list) = new std::vector; @@ -2226,7 +4133,7 @@ YYLTYPE yylloc = yyloc_default; #line 2227 "yacc_sql.cpp" break; - case 62: /* value_list: value_list COMMA value */ + case 62: /* value_list: value_list COMMA value */ #line 540 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); @@ -2235,54 +4142,54 @@ YYLTYPE yylloc = yyloc_default; #line 2236 "yacc_sql.cpp" break; - case 63: /* value: nonnegative_value */ + case 63: /* value: nonnegative_value */ #line 547 "yacc_sql.y" - { + { (yyval.value) = (yyvsp[0].value); } #line 2244 "yacc_sql.cpp" break; - case 64: /* value: '-' NUMBER */ + case 64: /* value: '-' NUMBER */ #line 550 "yacc_sql.y" - { + { (yyval.value) = new Value(-(yyvsp[0].number)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } #line 2253 "yacc_sql.cpp" break; - case 65: /* value: '-' FLOAT */ + case 65: /* value: '-' FLOAT */ #line 554 "yacc_sql.y" - { + { (yyval.value) = new Value(-(yyvsp[0].floats)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } #line 2262 "yacc_sql.cpp" break; - case 66: /* nonnegative_value: NUMBER */ + case 66: /* nonnegative_value: NUMBER */ #line 561 "yacc_sql.y" - { + { (yyval.value) = new Value((yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2271 "yacc_sql.cpp" break; - case 67: /* nonnegative_value: FLOAT */ + case 67: /* nonnegative_value: FLOAT */ #line 565 "yacc_sql.y" - { + { (yyval.value) = new Value((yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2280 "yacc_sql.cpp" break; - case 68: /* nonnegative_value: SSS */ + case 68: /* nonnegative_value: SSS */ #line 569 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); + { + char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); @@ -2290,15 +4197,15 @@ YYLTYPE yylloc = yyloc_default; #line 2291 "yacc_sql.cpp" break; - case 69: /* nonnegative_value: NULL_T */ + case 69: /* nonnegative_value: NULL_T */ #line 575 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } #line 2299 "yacc_sql.cpp" break; - case 70: /* storage_format: %empty */ + case 70: /* storage_format: %empty */ #line 582 "yacc_sql.y" { (yyval.string) = nullptr; @@ -2306,7 +4213,7 @@ YYLTYPE yylloc = yyloc_default; #line 2307 "yacc_sql.cpp" break; - case 71: /* storage_format: STORAGE FORMAT EQ ID */ + case 71: /* storage_format: STORAGE FORMAT EQ ID */ #line 586 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); @@ -2314,10 +4221,10 @@ YYLTYPE yylloc = yyloc_default; #line 2315 "yacc_sql.cpp" break; - case 72: /* delete_stmt: DELETE FROM ID where */ + case 72: /* delete_stmt: DELETE FROM ID where */ #line 593 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); @@ -2327,10 +4234,10 @@ YYLTYPE yylloc = yyloc_default; #line 2328 "yacc_sql.cpp" break; - case 73: /* update_stmt: UPDATE ID SET setClauses where */ + case 73: /* update_stmt: UPDATE ID SET setClauses where */ #line 605 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -2342,7 +4249,7 @@ YYLTYPE yylloc = yyloc_default; #line 2343 "yacc_sql.cpp" break; - case 74: /* setClauses: setClause */ + case 74: /* setClauses: setClause */ #line 619 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; @@ -2351,7 +4258,7 @@ YYLTYPE yylloc = yyloc_default; #line 2352 "yacc_sql.cpp" break; - case 75: /* setClauses: setClauses COMMA setClause */ + case 75: /* setClauses: setClauses COMMA setClause */ #line 624 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); @@ -2359,18 +4266,18 @@ YYLTYPE yylloc = yyloc_default; #line 2360 "yacc_sql.cpp" break; - case 76: /* setClause: ID EQ expression */ + case 76: /* setClause: ID EQ expression */ #line 631 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } #line 2371 "yacc_sql.cpp" break; - case 77: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ + case 77: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ #line 641 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2407,7 +4314,7 @@ YYLTYPE yylloc = yyloc_default; #line 2408 "yacc_sql.cpp" break; - case 78: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ + case 78: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ #line 674 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2422,7 +4329,8 @@ YYLTYPE yylloc = yyloc_default; } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); + ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -2430,7 +4338,8 @@ YYLTYPE yylloc = yyloc_default; if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -2441,7 +4350,7 @@ YYLTYPE yylloc = yyloc_default; #line 2442 "yacc_sql.cpp" break; - case 79: /* calc_stmt: CALC expression_list */ + case 79: /* calc_stmt: CALC expression_list */ #line 707 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -2451,7 +4360,7 @@ YYLTYPE yylloc = yyloc_default; #line 2452 "yacc_sql.cpp" break; - case 80: /* calc_stmt: SELECT expression_list */ + case 80: /* calc_stmt: SELECT expression_list */ #line 713 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -2461,15 +4370,15 @@ YYLTYPE yylloc = yyloc_default; #line 2462 "yacc_sql.cpp" break; - case 81: /* expression_list: %empty */ + case 81: /* expression_list: %empty */ #line 721 "yacc_sql.y" - { + { (yyval.expression_list) = new std::vector>; } #line 2470 "yacc_sql.cpp" break; - case 82: /* expression_list: expression alias */ + case 82: /* expression_list: expression alias */ #line 725 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; @@ -2482,7 +4391,7 @@ YYLTYPE yylloc = yyloc_default; #line 2483 "yacc_sql.cpp" break; - case 83: /* expression_list: expression alias COMMA expression_list */ + case 83: /* expression_list: expression alias COMMA expression_list */ #line 734 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -2493,47 +4402,51 @@ YYLTYPE yylloc = yyloc_default; if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } #line 2500 "yacc_sql.cpp" break; - case 84: /* expression: expression '+' expression */ + case 84: /* expression: expression '+' expression */ #line 749 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2508 "yacc_sql.cpp" break; - case 85: /* expression: expression '-' expression */ + case 85: /* expression: expression '-' expression */ #line 752 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2516 "yacc_sql.cpp" break; - case 86: /* expression: expression '*' expression */ + case 86: /* expression: expression '*' expression */ #line 755 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2524 "yacc_sql.cpp" break; - case 87: /* expression: expression '/' expression */ + case 87: /* expression: expression '/' expression */ #line 758 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2532 "yacc_sql.cpp" break; - case 88: /* expression: LBRACE expression_list RBRACE */ + case 88: /* expression: LBRACE expression_list RBRACE */ #line 761 "yacc_sql.y" - { + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -2544,17 +4457,18 @@ YYLTYPE yylloc = yyloc_default; #line 2545 "yacc_sql.cpp" break; - case 89: /* expression: '-' expression */ + case 89: /* expression: '-' expression */ #line 769 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } #line 2553 "yacc_sql.cpp" break; - case 90: /* expression: nonnegative_value */ + case 90: /* expression: nonnegative_value */ #line 772 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); @@ -2562,82 +4476,82 @@ YYLTYPE yylloc = yyloc_default; #line 2563 "yacc_sql.cpp" break; - case 91: /* expression: rel_attr */ + case 91: /* expression: rel_attr */ #line 777 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } #line 2574 "yacc_sql.cpp" break; - case 92: /* expression: '*' */ + case 92: /* expression: '*' */ #line 783 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } #line 2582 "yacc_sql.cpp" break; - case 93: /* expression: ID DOT '*' */ + case 93: /* expression: ID DOT '*' */ #line 786 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } #line 2590 "yacc_sql.cpp" break; - case 94: /* expression: aggr_func_expr */ + case 94: /* expression: aggr_func_expr */ #line 789 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } #line 2598 "yacc_sql.cpp" break; - case 95: /* expression: sub_query_expr */ + case 95: /* expression: sub_query_expr */ #line 792 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } #line 2606 "yacc_sql.cpp" break; - case 96: /* alias: %empty */ + case 96: /* alias: %empty */ #line 799 "yacc_sql.y" - { + { (yyval.string) = nullptr; } #line 2614 "yacc_sql.cpp" break; - case 97: /* alias: ID */ + case 97: /* alias: ID */ #line 802 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2622 "yacc_sql.cpp" break; - case 98: /* alias: AS ID */ + case 98: /* alias: AS ID */ #line 805 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2630 "yacc_sql.cpp" break; - case 99: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 99: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 811 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } #line 2638 "yacc_sql.cpp" break; - case 100: /* sub_query_expr: LBRACE select_stmt RBRACE */ + case 100: /* sub_query_expr: LBRACE select_stmt RBRACE */ #line 818 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); @@ -2645,20 +4559,20 @@ YYLTYPE yylloc = yyloc_default; #line 2646 "yacc_sql.cpp" break; - case 101: /* rel_attr: ID */ + case 101: /* rel_attr: ID */ #line 824 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 2656 "yacc_sql.cpp" break; - case 102: /* rel_attr: ID DOT ID */ + case 102: /* rel_attr: ID DOT ID */ #line 829 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); @@ -2667,22 +4581,22 @@ YYLTYPE yylloc = yyloc_default; #line 2668 "yacc_sql.cpp" break; - case 103: /* relation: ID */ + case 103: /* relation: ID */ #line 839 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2676 "yacc_sql.cpp" break; - case 104: /* rel_list: relation alias */ + case 104: /* rel_list: relation alias */ #line 845 "yacc_sql.y" - { + { (yyval.relation_list) = new std::vector(); - if(nullptr!=(yyvsp[0].string)){ - (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); + if (nullptr != (yyvsp[0].string)) { + (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); free((yyvsp[0].string)); - }else{ + } else { (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); @@ -2690,18 +4604,19 @@ YYLTYPE yylloc = yyloc_default; #line 2691 "yacc_sql.cpp" break; - case 105: /* rel_list: relation alias COMMA rel_list */ + case 105: /* rel_list: relation alias COMMA rel_list */ #line 855 "yacc_sql.y" - { + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if(nullptr!=(yyvsp[-2].string)){ - (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); + if (nullptr != (yyvsp[-2].string)) { + (yyval.relation_list) + ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); free((yyvsp[-2].string)); - }else{ + } else { (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); @@ -2709,7 +4624,7 @@ YYLTYPE yylloc = yyloc_default; #line 2710 "yacc_sql.cpp" break; - case 106: /* joinClauses: relation ON condition */ + case 106: /* joinClauses: relation ON condition */ #line 873 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; @@ -2720,19 +4635,20 @@ YYLTYPE yylloc = yyloc_default; #line 2721 "yacc_sql.cpp" break; - case 107: /* joinClauses: relation ON condition INNER JOIN joinClauses */ + case 107: /* joinClauses: relation ON condition INNER JOIN joinClauses */ #line 880 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } #line 2733 "yacc_sql.cpp" break; - case 108: /* where: %empty */ + case 108: /* where: %empty */ #line 891 "yacc_sql.y" { (yyval.expression) = nullptr; @@ -2740,15 +4656,15 @@ YYLTYPE yylloc = yyloc_default; #line 2741 "yacc_sql.cpp" break; - case 109: /* where: WHERE condition */ + case 109: /* where: WHERE condition */ #line 894 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + { + (yyval.expression) = (yyvsp[0].expression); } #line 2749 "yacc_sql.cpp" break; - case 110: /* condition: expression comp_op expression */ + case 110: /* condition: expression comp_op expression */ #line 901 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); @@ -2756,118 +4672,148 @@ YYLTYPE yylloc = yyloc_default; #line 2757 "yacc_sql.cpp" break; - case 111: /* condition: comp_op expression */ + case 111: /* condition: comp_op expression */ #line 905 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); - (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); } #line 2768 "yacc_sql.cpp" break; - case 112: /* condition: condition AND condition */ + case 112: /* condition: condition AND condition */ #line 912 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2776 "yacc_sql.cpp" break; - case 113: /* condition: condition OR condition */ + case 113: /* condition: condition OR condition */ #line 916 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2784 "yacc_sql.cpp" break; - case 114: /* comp_op: EQ */ + case 114: /* comp_op: EQ */ #line 922 "yacc_sql.y" - { (yyval.comp) = EQUAL_TO; } + { + (yyval.comp) = EQUAL_TO; + } #line 2790 "yacc_sql.cpp" break; - case 115: /* comp_op: LT */ + case 115: /* comp_op: LT */ #line 923 "yacc_sql.y" - { (yyval.comp) = LESS_THAN; } + { + (yyval.comp) = LESS_THAN; + } #line 2796 "yacc_sql.cpp" break; - case 116: /* comp_op: GT */ + case 116: /* comp_op: GT */ #line 924 "yacc_sql.y" - { (yyval.comp) = GREAT_THAN; } + { + (yyval.comp) = GREAT_THAN; + } #line 2802 "yacc_sql.cpp" break; - case 117: /* comp_op: LE */ + case 117: /* comp_op: LE */ #line 925 "yacc_sql.y" - { (yyval.comp) = LESS_EQUAL; } + { + (yyval.comp) = LESS_EQUAL; + } #line 2808 "yacc_sql.cpp" break; - case 118: /* comp_op: GE */ + case 118: /* comp_op: GE */ #line 926 "yacc_sql.y" - { (yyval.comp) = GREAT_EQUAL; } + { + (yyval.comp) = GREAT_EQUAL; + } #line 2814 "yacc_sql.cpp" break; - case 119: /* comp_op: NE */ + case 119: /* comp_op: NE */ #line 927 "yacc_sql.y" - { (yyval.comp) = NOT_EQUAL; } + { + (yyval.comp) = NOT_EQUAL; + } #line 2820 "yacc_sql.cpp" break; - case 120: /* comp_op: IS */ + case 120: /* comp_op: IS */ #line 928 "yacc_sql.y" - { (yyval.comp) = IS_OP; } + { + (yyval.comp) = IS_OP; + } #line 2826 "yacc_sql.cpp" break; - case 121: /* comp_op: IS NOT */ + case 121: /* comp_op: IS NOT */ #line 929 "yacc_sql.y" - { (yyval.comp) = IS_NOT_OP; } + { + (yyval.comp) = IS_NOT_OP; + } #line 2832 "yacc_sql.cpp" break; - case 122: /* comp_op: LIKE */ + case 122: /* comp_op: LIKE */ #line 930 "yacc_sql.y" - { (yyval.comp) = LIKE_OP;} + { + (yyval.comp) = LIKE_OP; + } #line 2838 "yacc_sql.cpp" break; - case 123: /* comp_op: NOT LIKE */ + case 123: /* comp_op: NOT LIKE */ #line 931 "yacc_sql.y" - {(yyval.comp) = NOT_LIKE_OP;} + { + (yyval.comp) = NOT_LIKE_OP; + } #line 2844 "yacc_sql.cpp" break; - case 124: /* comp_op: IN */ + case 124: /* comp_op: IN */ #line 932 "yacc_sql.y" - { (yyval.comp) = IN_OP; } + { + (yyval.comp) = IN_OP; + } #line 2850 "yacc_sql.cpp" break; - case 125: /* comp_op: NOT IN */ + case 125: /* comp_op: NOT IN */ #line 933 "yacc_sql.y" - { (yyval.comp) = NOT_IN_OP; } + { + (yyval.comp) = NOT_IN_OP; + } #line 2856 "yacc_sql.cpp" break; - case 126: /* comp_op: EXISTS */ + case 126: /* comp_op: EXISTS */ #line 934 "yacc_sql.y" - { (yyval.comp) = EXISTS_OP; } + { + (yyval.comp) = EXISTS_OP; + } #line 2862 "yacc_sql.cpp" break; - case 127: /* comp_op: NOT EXISTS */ + case 127: /* comp_op: NOT EXISTS */ #line 935 "yacc_sql.y" - { (yyval.comp) = NOT_EXISTS_OP; } + { + (yyval.comp) = NOT_EXISTS_OP; + } #line 2868 "yacc_sql.cpp" break; - case 128: /* opt_order_by: %empty */ + case 128: /* opt_order_by: %empty */ #line 940 "yacc_sql.y" { (yyval.orderby_list) = nullptr; @@ -2875,64 +4821,64 @@ YYLTYPE yylloc = yyloc_default; #line 2876 "yacc_sql.cpp" break; - case 129: /* opt_order_by: ORDER BY sort_list */ + case 129: /* opt_order_by: ORDER BY sort_list */ #line 944 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } #line 2885 "yacc_sql.cpp" break; - case 130: /* sort_list: sort_unit */ + case 130: /* sort_list: sort_unit */ #line 952 "yacc_sql.y" - { + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } + } #line 2894 "yacc_sql.cpp" break; - case 131: /* sort_list: sort_unit COMMA sort_list */ + case 131: /* sort_list: sort_unit COMMA sort_list */ #line 957 "yacc_sql.y" - { + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } + } #line 2903 "yacc_sql.cpp" break; - case 132: /* sort_unit: expression */ + case 132: /* sort_unit: expression */ #line 965 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2913 "yacc_sql.cpp" break; - case 133: /* sort_unit: expression DESC */ + case 133: /* sort_unit: expression DESC */ #line 971 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } + } #line 2923 "yacc_sql.cpp" break; - case 134: /* sort_unit: expression ASC */ + case 134: /* sort_unit: expression ASC */ #line 977 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2933 "yacc_sql.cpp" break; - case 135: /* group_by: %empty */ + case 135: /* group_by: %empty */ #line 986 "yacc_sql.y" { (yyval.expression_list) = nullptr; @@ -2940,7 +4886,7 @@ YYLTYPE yylloc = yyloc_default; #line 2941 "yacc_sql.cpp" break; - case 136: /* group_by: GROUP BY expression_list */ + case 136: /* group_by: GROUP BY expression_list */ #line 990 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2948,7 +4894,7 @@ YYLTYPE yylloc = yyloc_default; #line 2949 "yacc_sql.cpp" break; - case 137: /* opt_having: %empty */ + case 137: /* opt_having: %empty */ #line 997 "yacc_sql.y" { (yyval.expression) = nullptr; @@ -2956,7 +4902,7 @@ YYLTYPE yylloc = yyloc_default; #line 2957 "yacc_sql.cpp" break; - case 138: /* opt_having: HAVING condition */ + case 138: /* opt_having: HAVING condition */ #line 1001 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); @@ -2964,33 +4910,33 @@ YYLTYPE yylloc = yyloc_default; #line 2965 "yacc_sql.cpp" break; - case 139: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ + case 139: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ #line 1008 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } #line 2979 "yacc_sql.cpp" break; - case 140: /* explain_stmt: EXPLAIN command_wrapper */ + case 140: /* explain_stmt: EXPLAIN command_wrapper */ #line 1021 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } #line 2988 "yacc_sql.cpp" break; - case 141: /* set_variable_stmt: SET ID EQ value */ + case 141: /* set_variable_stmt: SET ID EQ value */ #line 1029 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); @@ -2999,11 +4945,10 @@ YYLTYPE yylloc = yyloc_default; #line 3000 "yacc_sql.cpp" break; - #line 3004 "yacc_sql.cpp" - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -3015,9 +4960,9 @@ YYLTYPE yylloc = yyloc_default; case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; *++yyvsp = yyval; @@ -3028,84 +4973,67 @@ YYLTYPE yylloc = yyloc_default; number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp - ? yytable[yyi] - : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; - /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) - { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } - } - yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; + if (!yyerrstatus) { + ++yynerrs; + { + yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) { + if (yymsg != yymsgbuf) + YYSTACK_FREE(yymsg); + yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); + if (yymsg) { + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } else { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } } + yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } + } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; - } + if (yychar <= YYEOF) { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else { + yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; } + } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; - /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -3118,45 +5046,40 @@ YYLTYPE yylloc = yyloc_default; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); yystate = *yyssp; goto yyerrlab1; - /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) { + yyn = yypact[yystate]; + if (!yypact_value_is_default(yyn)) { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + yystate = *yyssp; + YY_STACK_PRINT(yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3164,15 +5087,14 @@ YYLTYPE yylloc = yyloc_default; yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; - /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -3180,7 +5102,6 @@ YYLTYPE yylloc = yyloc_default; yyresult = 0; goto yyreturnlab; - /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -3188,44 +5109,38 @@ YYLTYPE yylloc = yyloc_default; yyresult = 1; goto yyreturnlab; - /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; - /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE(yychar); + yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - } + YYPOPSTACK(yylen); + YY_STACK_PRINT(yyss, yyssp); + while (yyssp != yyss) { + yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE (yyss); + YYSTACK_FREE(yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); + YYSTACK_FREE(yymsg); return yyresult; } @@ -3234,7 +5149,8 @@ YYLTYPE yylloc = yyloc_default; //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) { +int sql_parse(const char *s, ParsedSqlResult *sql_result) +{ yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 8521ddee..2d3d99e8 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -# define YY_YY_YACC_SQL_HPP_INCLUDED +#define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -# define YYDEBUG 0 +#define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,126 +47,125 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - HAVING = 266, /* HAVING */ - ORDER = 267, /* ORDER */ - TABLE = 268, /* TABLE */ - TABLES = 269, /* TABLES */ - INDEX = 270, /* INDEX */ - CALC = 271, /* CALC */ - SELECT = 272, /* SELECT */ - DESC = 273, /* DESC */ - SHOW = 274, /* SHOW */ - SYNC = 275, /* SYNC */ - INSERT = 276, /* INSERT */ - DELETE = 277, /* DELETE */ - UPDATE = 278, /* UPDATE */ - LBRACE = 279, /* LBRACE */ - RBRACE = 280, /* RBRACE */ - COMMA = 281, /* COMMA */ - TRX_BEGIN = 282, /* TRX_BEGIN */ - TRX_COMMIT = 283, /* TRX_COMMIT */ - TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ - INT_T = 285, /* INT_T */ - IN = 286, /* IN */ - STRING_T = 287, /* STRING_T */ - FLOAT_T = 288, /* FLOAT_T */ - DATE_T = 289, /* DATE_T */ - TEXT_T = 290, /* TEXT_T */ - NOT = 291, /* NOT */ - UNIQUE = 292, /* UNIQUE */ - NULL_T = 293, /* NULL_T */ - NULLABLE = 294, /* NULLABLE */ - HELP = 295, /* HELP */ - EXIT = 296, /* EXIT */ - DOT = 297, /* DOT */ - INTO = 298, /* INTO */ - VALUES = 299, /* VALUES */ - FROM = 300, /* FROM */ - WHERE = 301, /* WHERE */ - AND = 302, /* AND */ - OR = 303, /* OR */ - SET = 304, /* SET */ - ON = 305, /* ON */ - LOAD = 306, /* LOAD */ - DATA = 307, /* DATA */ - INFILE = 308, /* INFILE */ - EXPLAIN = 309, /* EXPLAIN */ - STORAGE = 310, /* STORAGE */ - FORMAT = 311, /* FORMAT */ - INNER = 312, /* INNER */ - JOIN = 313, /* JOIN */ - EQ = 314, /* EQ */ - LT = 315, /* LT */ - GT = 316, /* GT */ - LE = 317, /* LE */ - GE = 318, /* GE */ - NE = 319, /* NE */ - LIKE = 320, /* LIKE */ - IS = 321, /* IS */ - NUMBER = 322, /* NUMBER */ - FLOAT = 323, /* FLOAT */ - ID = 324, /* ID */ - SSS = 325, /* SSS */ - UMINUS = 326 /* UMINUS */ - }; - typedef enum yytokentype yytoken_kind_t; +#define YYTOKENTYPE +enum yytokentype +{ + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + HAVING = 266, /* HAVING */ + ORDER = 267, /* ORDER */ + TABLE = 268, /* TABLE */ + TABLES = 269, /* TABLES */ + INDEX = 270, /* INDEX */ + CALC = 271, /* CALC */ + SELECT = 272, /* SELECT */ + DESC = 273, /* DESC */ + SHOW = 274, /* SHOW */ + SYNC = 275, /* SYNC */ + INSERT = 276, /* INSERT */ + DELETE = 277, /* DELETE */ + UPDATE = 278, /* UPDATE */ + LBRACE = 279, /* LBRACE */ + RBRACE = 280, /* RBRACE */ + COMMA = 281, /* COMMA */ + TRX_BEGIN = 282, /* TRX_BEGIN */ + TRX_COMMIT = 283, /* TRX_COMMIT */ + TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ + INT_T = 285, /* INT_T */ + IN = 286, /* IN */ + STRING_T = 287, /* STRING_T */ + FLOAT_T = 288, /* FLOAT_T */ + DATE_T = 289, /* DATE_T */ + TEXT_T = 290, /* TEXT_T */ + NOT = 291, /* NOT */ + UNIQUE = 292, /* UNIQUE */ + NULL_T = 293, /* NULL_T */ + NULLABLE = 294, /* NULLABLE */ + HELP = 295, /* HELP */ + EXIT = 296, /* EXIT */ + DOT = 297, /* DOT */ + INTO = 298, /* INTO */ + VALUES = 299, /* VALUES */ + FROM = 300, /* FROM */ + WHERE = 301, /* WHERE */ + AND = 302, /* AND */ + OR = 303, /* OR */ + SET = 304, /* SET */ + ON = 305, /* ON */ + LOAD = 306, /* LOAD */ + DATA = 307, /* DATA */ + INFILE = 308, /* INFILE */ + EXPLAIN = 309, /* EXPLAIN */ + STORAGE = 310, /* STORAGE */ + FORMAT = 311, /* FORMAT */ + INNER = 312, /* INNER */ + JOIN = 313, /* JOIN */ + EQ = 314, /* EQ */ + LT = 315, /* LT */ + GT = 316, /* GT */ + LE = 317, /* LE */ + GE = 318, /* GE */ + NE = 319, /* NE */ + LIKE = 320, /* LIKE */ + IS = 321, /* IS */ + NUMBER = 322, /* NUMBER */ + FLOAT = 323, /* FLOAT */ + ID = 324, /* ID */ + SSS = 325, /* SSS */ + UMINUS = 326 /* UMINUS */ +}; +typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 163 "yacc_sql.y" - ParsedSqlNode * sql_node; - Value * value; - enum CompOp comp; - RelAttrSqlNode * rel_attr; - std::vector * attr_infos; - AttrInfoSqlNode * attr_info; - Expression * expression; - std::vector> * expression_list; - std::vector * value_list; - std::vector> * values_list; - SetClauseSqlNode * set_clause; - std::vector * set_clauses; - JoinSqlNode * join_clauses; - std::vector * rel_attr_list; - std::vector * relation_list; - OrderBySqlNode * orderby_unit; - std::vector * orderby_list; - char * string; - int number; - float floats; - bool nullable_info; - std::vector * index_attr_list; - bool unique; + ParsedSqlNode *sql_node; + Value *value; + enum CompOp comp; + RelAttrSqlNode *rel_attr; + std::vector *attr_infos; + AttrInfoSqlNode *attr_info; + Expression *expression; + std::vector> *expression_list; + std::vector *value_list; + std::vector> *values_list; + SetClauseSqlNode *set_clause; + std::vector *set_clauses; + JoinSqlNode *join_clauses; + std::vector *rel_attr_list; + std::vector *relation_list; + OrderBySqlNode *orderby_unit; + std::vector *orderby_list; + char *string; + int number; + float floats; + bool nullable_info; + std::vector *index_attr_list; + bool unique; #line 161 "yacc_sql.hpp" - }; typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 +#define YYSTYPE_IS_TRIVIAL 1 +#define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -175,14 +174,10 @@ struct YYLTYPE int last_line; int last_column; }; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 +#define YYLTYPE_IS_DECLARED 1 +#define YYLTYPE_IS_TRIVIAL 1 #endif - - - -int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); - +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/storage/buffer/double_write_buffer.cpp b/src/observer/storage/buffer/double_write_buffer.cpp index 73447382..f1120455 100644 --- a/src/observer/storage/buffer/double_write_buffer.cpp +++ b/src/observer/storage/buffer/double_write_buffer.cpp @@ -32,9 +32,9 @@ struct DoubleWritePage public: DoubleWritePageKey key; - int32_t page_index = -1; /// 页面在double write buffer文件中的页索引 - bool valid = true; /// 表示页面是否有效,在页面被删除时,需要同时标记磁盘上的值。 - Page page; + int32_t page_index = -1; /// 页面在double write buffer文件中的页索引 + bool valid = true; /// 表示页面是否有效,在页面被删除时,需要同时标记磁盘上的值。 + Page page; static const int32_t SIZE; }; diff --git a/src/observer/storage/clog/log_buffer.h b/src/observer/storage/clog/log_buffer.h index 3bda71eb..77cfe575 100644 --- a/src/observer/storage/clog/log_buffer.h +++ b/src/observer/storage/clog/log_buffer.h @@ -68,7 +68,7 @@ class LogEntryBuffer LSN flushed_lsn() const { return flushed_lsn_.load(); } private: - mutex mutex_; /// 当前数据结构一定会在多线程中访问,所以强制使用有效的锁,而不是有条件生效的common::Mutex + mutex mutex_; /// 当前数据结构一定会在多线程中访问,所以强制使用有效的锁,而不是有条件生效的common::Mutex deque entries_; /// 日志缓冲区 atomic bytes_; /// 当前缓冲区中的日志数据大小 diff --git a/src/observer/storage/record/record_manager.h b/src/observer/storage/record/record_manager.h index a7bae40c..8228464a 100644 --- a/src/observer/storage/record/record_manager.h +++ b/src/observer/storage/record/record_manager.h @@ -262,11 +262,11 @@ class RecordPageHandler protected: DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前操作的buffer pool(文件) RecordLogHandler log_handler_; ///< 当前操作的日志处理器 - Frame *frame_ = nullptr; ///< 当前操作页面关联的frame(frame的更多概念可以参考buffer pool和frame) - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 当前的操作是否都是只读的 - PageHeader *page_header_ = nullptr; ///< 当前页面上页面头 - char *bitmap_ = nullptr; ///< 当前页面上record分配状态信息bitmap内存起始位置 - StorageFormat storage_format_; + Frame *frame_ = nullptr; ///< 当前操作页面关联的frame(frame的更多概念可以参考buffer pool和frame) + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 当前的操作是否都是只读的 + PageHeader *page_header_ = nullptr; ///< 当前页面上页面头 + char *bitmap_ = nullptr; ///< 当前页面上record分配状态信息bitmap内存起始位置 + StorageFormat storage_format_; protected: friend class RecordPageIterator; @@ -424,7 +424,7 @@ class RecordFileHandler DiskBufferPool *disk_buffer_pool_ = nullptr; LogHandler *log_handler_ = nullptr; ///< 记录日志的处理器 unordered_set free_pages_; ///< 没有填充满的页面集合 - common::Mutex lock_; ///< 当编译时增加-DCONCURRENCY=ON 选项时,才会真正的支持并发 + common::Mutex lock_; ///< 当编译时增加-DCONCURRENCY=ON 选项时,才会真正的支持并发 StorageFormat storage_format_; TableMeta *table_meta_; }; @@ -484,7 +484,7 @@ class RecordFileScanner DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前访问的文件 Trx *trx_ = nullptr; ///< 当前是哪个事务在遍历 LogHandler *log_handler_ = nullptr; - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 BufferPoolIterator bp_iterator_; ///< 遍历buffer pool的所有页面 ConditionFilter *condition_filter_ = nullptr; ///< 过滤record @@ -522,7 +522,7 @@ class ChunkFileScanner DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前访问的文件 LogHandler *log_handler_ = nullptr; - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 BufferPoolIterator bp_iterator_; ///< 遍历buffer pool的所有页面 RecordPageHandler *record_page_handler_ = nullptr; ///< 处理文件某页面的记录 diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index e796800a..852aaed6 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -308,30 +308,41 @@ RC Table::make_record(int value_num, const Value *values, Record &record) return RC::NOT_NULLABLE_VALUE; } record_data[field->offset() + field->len() - 1] = '1'; - } else if (field->type() != value.attr_type()) { - Value real_value; - if (field->type() == AttrType::TEXTS && value.attr_type() == AttrType::CHARS) { - // 对于超长文本通过借用的方法减少拷贝 - rc = real_value.borrow_text(value); - if (OB_FAIL(rc)) { - LOG_WARN("failed to borrow text value. table name:%s, field name:%s, value length:%d", - table_meta_.name(), field->name(), value.length()); - break; - } - } else { - // 插入不允许非目标类型的类型提升 - rc = Value::cast_to(value, field->type(), real_value, false); - if (OB_FAIL(rc)) { - LOG_WARN("failed to cast value. table name:%s, field name:%s, value:%s", - table_meta_.name(), field->name(), value.to_string().c_str()); - break; + } else { + Value real_value = value; + if (field->type() != value.attr_type()) { + if (field->type() == AttrType::TEXTS && value.attr_type() == AttrType::CHARS) { + // 对于超长文本通过借用的方法减少拷贝 + rc = real_value.borrow_text(value); + if (OB_FAIL(rc)) { + LOG_WARN("failed to borrow text value. table name:%s, field name:%s, value length:%d", + table_meta_.name(), field->name(), value.length()); + break; + } + } else { + // 插入不允许非目标类型的类型提升 + rc = Value::cast_to(value, field->type(), real_value, false); + if (OB_FAIL(rc)) { + LOG_WARN("failed to cast value. table name:%s, field name:%s, value:%s", + table_meta_.name(), field->name(), value.to_string().c_str()); + break; + } } } + // 进行长度校验 + if (real_value.length() > field->len() - field->nullable()) { + LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", + field->name(), + attr_type_to_string(field->type()), + field->offset(), + value.length(), + field->len()); + return RC::VALUE_TOO_LONG; + } rc = set_value_to_record(record_data, real_value, field); - } else { - rc = set_value_to_record(record_data, value, field); } } + if (OB_FAIL(rc)) { LOG_WARN("failed to make record. table name:%s", table_meta_.name()); free(record_data); From 3fb5982bd9f57be3aad57f4e85cc1ee532c4dffc Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 13 Oct 2024 00:19:30 +0800 Subject: [PATCH 220/308] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=A9=BA?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=9B=A0=E4=B8=BA=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E4=B8=BA=200=20=E6=9E=84=E9=80=A0=20value=20=E6=97=B6=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=AD=A3=E7=A1=AE=E5=88=86=E9=85=8D=E5=86=85=E5=AD=98?= =?UTF-8?q?=E7=A9=BA=E9=97=B4=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=9E=90=E6=9E=84?= =?UTF-8?q?=E6=97=B6=E5=86=85=E5=AD=98=E8=B6=8A=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/value.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 4497601d..73bf3261 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -261,7 +261,7 @@ void Value::set_value(const Value &value) void Value::set_string_from_other(const Value &other) { ASSERT(attr_type_ == AttrType::CHARS || attr_type() == AttrType::TEXTS, "attr type is not CHARS or TEXTS"); - if (own_data_ && other.value_.pointer_value_ != nullptr && length_ != 0) { + if (own_data_ && other.value_.pointer_value_ != nullptr) { this->value_.pointer_value_ = new char[this->length_ + 1]; memcpy(this->value_.pointer_value_, other.value_.pointer_value_, this->length_); this->value_.pointer_value_[this->length_] = '\0'; From 670745bf6c28c1ea7dd28a31d0c4515e53385c33 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 13 Oct 2024 00:21:09 +0800 Subject: [PATCH 221/308] =?UTF-8?q?test:=20=E5=8A=A0=E5=BC=BA=20insert=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=8C=E8=80=83=E8=99=91=E7=A9=BA=E6=88=96?= =?UTF-8?q?=E8=BF=87=E9=95=BF=E5=AD=97=E7=AC=A6=E4=B8=B2=E7=9A=84=E6=8F=92?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-insert.result | 48 +++++++++++++++++++++----- test/case/test/primary-insert.test | 20 +++++++++-- 2 files changed, 57 insertions(+), 11 deletions(-) diff --git a/test/case/result/primary-insert.result b/test/case/result/primary-insert.result index d2f7e3ed..4dd00eea 100644 --- a/test/case/result/primary-insert.result +++ b/test/case/result/primary-insert.result @@ -1,22 +1,54 @@ INITIALIZATION -CREATE TABLE insert_table(id int, t_name char, col1 int, col2 int); +CREATE TABLE INSERT_TABLE(ID INT, T_NAME CHAR, COL1 INT, COL2 INT); +SUCCESS +CREATE TABLE INSERT_TABLE2(ID INT, T_NAME CHAR(6), COL1 INT, COL2 INT); SUCCESS 1. INSERT -INSERT INTO insert_table VALUES (1,'N1',1,1); +INSERT INTO INSERT_TABLE VALUES (1,'N1',1,1); +SUCCESS +INSERT INTO INSERT_TABLE VALUES (1,'N123',1,1); +SUCCESS +INSERT INTO INSERT_TABLE VALUES (2,'N123',1,1),(3,'N32',2,1); +SUCCESS + +INSERT INTO INSERT_TABLE2 VALUES (1,'N1',1,1); +SUCCESS +INSERT INTO INSERT_TABLE2 VALUES (1,'N123',1,1); SUCCESS -INSERT INTO insert_table VALUES (2,'N2',1,1),(3,'N3',2,1); +INSERT INTO INSERT_TABLE2 VALUES (2,'N1233',1,1),(3,'N3211',2,1); +SUCCESS +INSERT INTO INSERT_TABLE2 VALUES (4,'','',''); SUCCESS 2. ERROR -INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1); +INSERT INTO INSERT_TABLE VALUES (5,'N4',1,1),(1,1,1); +FAILURE +INSERT INTO INSERT_TABLE VALUES (5,'N4',1,1),(1,1,1,1,1); FAILURE -INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1,1,1); +INSERT INTO INSERT_TABLE VALUES (5,'12345',1,1); +FAILURE + +INSERT INTO INSERT_TABLE2 VALUES (5,'N412',1,1),(1,1,1); +FAILURE +INSERT INTO INSERT_TABLE2 VALUES (5,'N41',1,1),(1,1,1,1,1); +FAILURE +INSERT INTO INSERT_TABLE2 VALUES (5,'1234567',1,1); +FAILURE +INSERT INTO INSERT_TABLE2 VALUES (5,'12345678910',1,1); FAILURE 3. SELECT -SELECT * FROM insert_table; +SELECT * FROM INSERT_TABLE; +1 | N1 | 1 | 1 +1 | N123 | 1 | 1 +2 | N123 | 1 | 1 +3 | N32 | 2 | 1 +ID | T_NAME | COL1 | COL2 +SELECT * FROM INSERT_TABLE2; 1 | N1 | 1 | 1 -2 | N2 | 1 | 1 -3 | N3 | 2 | 1 +1 | N123 | 1 | 1 +2 | N1233 | 1 | 1 +3 | N3211 | 2 | 1 +4 | | 0 | 0 ID | T_NAME | COL1 | COL2 diff --git a/test/case/test/primary-insert.test b/test/case/test/primary-insert.test index 19c214d8..f1d2eabd 100644 --- a/test/case/test/primary-insert.test +++ b/test/case/test/primary-insert.test @@ -1,13 +1,27 @@ -- echo initialization CREATE TABLE insert_table(id int, t_name char, col1 int, col2 int); +CREATE TABLE insert_table2(id int, t_name char(6), col1 int, col2 int); -- echo 1. insert INSERT INTO insert_table VALUES (1,'N1',1,1); -INSERT INTO insert_table VALUES (2,'N2',1,1),(3,'N3',2,1); +INSERT INTO insert_table VALUES (1,'N123',1,1); +INSERT INTO insert_table VALUES (2,'N123',1,1),(3,'N32',2,1); + +INSERT INTO insert_table2 VALUES (1,'N1',1,1); +INSERT INTO insert_table2 VALUES (1,'N123',1,1); +INSERT INTO insert_table2 VALUES (2,'N1233',1,1),(3,'N3211',2,1); +INSERT INTO insert_table2 VALUES (4,'','',''); -- echo 2. error -INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1); -INSERT INTO insert_table VALUES (4,'N4',1,1),(1,1,1,1,1); +INSERT INTO insert_table VALUES (5,'N4',1,1),(1,1,1); +INSERT INTO insert_table VALUES (5,'N4',1,1),(1,1,1,1,1); +INSERT INTO insert_table VALUES (5,'12345',1,1); + +INSERT INTO insert_table2 VALUES (5,'N412',1,1),(1,1,1); +INSERT INTO insert_table2 VALUES (5,'N41',1,1),(1,1,1,1,1); +INSERT INTO insert_table2 VALUES (5,'1234567',1,1); +INSERT INTO insert_table2 VALUES (5,'12345678910',1,1); -- echo 3. select -- sort SELECT * FROM insert_table; +-- sort SELECT * FROM insert_table2; From 82faa6b5a73157680e55f217981bc21076ff767f Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 13 Oct 2024 01:25:14 +0800 Subject: [PATCH 222/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=20create=20v?= =?UTF-8?q?iew=20=E5=92=8C=20drop=20view=20=E5=B9=B6=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=85=83=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 139 +- .../sql/executor/command_executor.cpp | 12 + .../sql/executor/create_view_executor.cpp | 110 + .../sql/executor/create_view_executor.h | 30 + .../sql/executor/desc_table_executor.cpp | 6 +- .../sql/executor/drop_view_executor.cpp | 35 + .../sql/executor/drop_view_executor.h | 30 + .../sql/executor/load_data_executor.cpp | 8 +- .../sql/executor/load_data_executor.h | 4 +- .../sql/executor/show_index_executor.cpp | 4 +- src/observer/sql/expr/expression.cpp | 2 +- src/observer/sql/expr/expression.h | 2 +- .../sql/operator/delete_logical_operator.cpp | 2 +- .../sql/operator/delete_logical_operator.h | 6 +- .../sql/operator/delete_physical_operator.h | 4 +- .../sql/operator/insert_logical_operator.cpp | 2 +- .../sql/operator/insert_logical_operator.h | 6 +- .../sql/operator/insert_physical_operator.cpp | 2 +- .../sql/operator/insert_physical_operator.h | 4 +- .../operator/table_get_logical_operator.cpp | 2 +- .../sql/operator/table_get_logical_operator.h | 6 +- .../sql/operator/update_logical_operator.cpp | 2 +- .../sql/operator/update_logical_operator.h | 6 +- .../sql/operator/update_physical_operator.h | 4 +- .../sql/optimizer/logical_plan_generator.cpp | 7 +- .../sql/optimizer/physical_plan_generator.cpp | 94 +- src/observer/sql/parser/expression_binder.cpp | 14 +- src/observer/sql/parser/expression_binder.h | 20 +- src/observer/sql/parser/lex_sql.cpp | 5549 +++++++++++------ src/observer/sql/parser/lex_sql.h | 244 +- src/observer/sql/parser/yacc_sql.cpp | 5081 ++++++++++----- src/observer/sql/parser/yacc_sql.hpp | 227 +- src/observer/sql/stmt/create_index_stmt.cpp | 11 +- src/observer/sql/stmt/create_view_stmt.cpp | 35 + src/observer/sql/stmt/create_view_stmt.h | 49 + src/observer/sql/stmt/delete_stmt.cpp | 8 +- src/observer/sql/stmt/delete_stmt.h | 8 +- src/observer/sql/stmt/drop_view_stmt.cpp | 21 + src/observer/sql/stmt/drop_view_stmt.h | 41 + src/observer/sql/stmt/filter_stmt.cpp | 2 +- src/observer/sql/stmt/filter_stmt.h | 2 +- src/observer/sql/stmt/insert_stmt.cpp | 4 +- src/observer/sql/stmt/insert_stmt.h | 8 +- src/observer/sql/stmt/load_data_stmt.cpp | 2 +- src/observer/sql/stmt/load_data_stmt.h | 8 +- src/observer/sql/stmt/select_stmt.cpp | 14 +- src/observer/sql/stmt/select_stmt.h | 10 +- src/observer/sql/stmt/stmt.cpp | 11 + src/observer/sql/stmt/stmt.h | 4 +- src/observer/sql/stmt/update_stmt.cpp | 12 +- src/observer/sql/stmt/update_stmt.h | 8 +- src/observer/storage/db/db.cpp | 44 +- src/observer/storage/db/db.h | 23 +- .../storage/default/default_handler.cpp | 2 +- .../storage/default/default_handler.h | 4 +- src/observer/storage/field/field.h | 8 +- src/observer/storage/table/base_table.h | 70 + src/observer/storage/table/table.cpp | 7 +- src/observer/storage/table/table.h | 32 +- src/observer/storage/table/view.cpp | 133 + src/observer/storage/table/view.h | 64 + src/observer/storage/trx/mvcc_trx.cpp | 44 +- src/observer/storage/trx/mvcc_trx.h | 10 +- src/observer/storage/trx/mvcc_trx_log.cpp | 4 +- src/observer/storage/trx/mvcc_trx_log.h | 8 +- src/observer/storage/trx/trx.h | 18 +- src/observer/storage/trx/vacuous_trx.cpp | 8 +- src/observer/storage/trx/vacuous_trx.h | 8 +- test/case/result/primary-create-view.result | 0 test/case/test/primary-create-view.test | 0 ...est.cpp => mvcc_trx_log_test.cpp.disabled} | 0 71 files changed, 8537 insertions(+), 3872 deletions(-) create mode 100644 src/observer/sql/executor/create_view_executor.cpp create mode 100644 src/observer/sql/executor/create_view_executor.h create mode 100644 src/observer/sql/executor/drop_view_executor.cpp create mode 100644 src/observer/sql/executor/drop_view_executor.h create mode 100644 src/observer/sql/stmt/create_view_stmt.cpp create mode 100644 src/observer/sql/stmt/create_view_stmt.h create mode 100644 src/observer/sql/stmt/drop_view_stmt.cpp create mode 100644 src/observer/sql/stmt/drop_view_stmt.h create mode 100644 src/observer/storage/table/base_table.h create mode 100644 src/observer/storage/table/view.cpp create mode 100644 src/observer/storage/table/view.h create mode 100644 test/case/result/primary-create-view.result create mode 100644 test/case/test/primary-create-view.test rename unittest/observer/{mvcc_trx_log_test.cpp => mvcc_trx_log_test.cpp.disabled} (100%) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 1b83efd5..390e031d 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -18,75 +18,76 @@ See the Mulan PSL v2 for more details. */ * @brief 这个文件定义函数返回码/错误码(Return Code) * @enum RC */ - -#define DEFINE_RCS \ - DEFINE_RC(SUCCESS) \ - DEFINE_RC(INVALID_ALIAS) \ - DEFINE_RC(INVALID_ARGUMENT) \ - DEFINE_RC(INVALID_HAVING_CONDITION) \ - DEFINE_RC(UNIMPLEMENTED) \ - DEFINE_RC(SQL_SYNTAX) \ - DEFINE_RC(INTERNAL) \ - DEFINE_RC(NOMEM) \ - DEFINE_RC(NOTFOUND) \ - DEFINE_RC(NUMBER_DIV_ZERO) \ - DEFINE_RC(EMPTY) \ - DEFINE_RC(ERROR_DATE) \ - DEFINE_RC(FULL) \ - DEFINE_RC(EXIST) \ - DEFINE_RC(NOT_EXIST) \ - DEFINE_RC(BUFFERPOOL_OPEN) \ - DEFINE_RC(BUFFERPOOL_NOBUF) \ - DEFINE_RC(BUFFERPOOL_INVALID_PAGE_NUM) \ - DEFINE_RC(RECORD_OPENNED) \ - DEFINE_RC(RECORD_INVALID_RID) \ - DEFINE_RC(RECORD_INVALID_KEY) \ - DEFINE_RC(RECORD_DUPLICATE_KEY) \ - DEFINE_RC(RECORD_NOMEM) \ - DEFINE_RC(RECORD_EOF) \ - DEFINE_RC(RECORD_NOT_EXIST) \ - DEFINE_RC(RECORD_INVISIBLE) \ - DEFINE_RC(SCHEMA_DB_EXIST) \ - DEFINE_RC(SCHEMA_DB_NOT_EXIST) \ - DEFINE_RC(SCHEMA_DB_NOT_OPENED) \ - DEFINE_RC(SCHEMA_TABLE_NOT_EXIST) \ - DEFINE_RC(SCHEMA_TABLE_EXIST) \ - DEFINE_RC(SCHEMA_FIELD_NOT_EXIST) \ - DEFINE_RC(SCHEMA_FIELD_MISSING) \ - DEFINE_RC(SCHEMA_FIELD_TYPE_MISMATCH) \ - DEFINE_RC(SCHEMA_INDEX_NAME_REPEAT) \ - DEFINE_RC(IOERR_READ) \ - DEFINE_RC(IOERR_WRITE) \ - DEFINE_RC(IOERR_ACCESS) \ - DEFINE_RC(IOERR_OPEN) \ - DEFINE_RC(IOERR_CLOSE) \ - DEFINE_RC(IOERR_SEEK) \ - DEFINE_RC(IOERR_TOO_LONG) \ - DEFINE_RC(IOERR_SYNC) \ - DEFINE_RC(LOCKED_UNLOCK) \ - DEFINE_RC(LOCKED_NEED_WAIT) \ - DEFINE_RC(LOCKED_CONCURRENCY_CONFLICT) \ - DEFINE_RC(FILE_EXIST) \ - DEFINE_RC(FILE_NOT_EXIST) \ - DEFINE_RC(FILE_NAME) \ - DEFINE_RC(FILE_BOUND) \ - DEFINE_RC(FILE_CREATE) \ - DEFINE_RC(FILE_OPEN) \ - DEFINE_RC(FILE_NOT_OPENED) \ - DEFINE_RC(FILE_CLOSE) \ - DEFINE_RC(FILE_REMOVE) \ - DEFINE_RC(VARIABLE_NOT_EXISTS) \ - DEFINE_RC(VARIABLE_NOT_VALID) \ - DEFINE_RC(LOGBUF_FULL) \ - DEFINE_RC(LOG_FILE_FULL) \ - DEFINE_RC(LOG_ENTRY_INVALID) \ - DEFINE_RC(UNSUPPORTED) \ - DEFINE_RC(VALUE_TOO_LONG) \ - DEFINE_RC(TO_LONG_SUBQUERY_EXPR) \ - DEFINE_RC(NOT_NULLABLE_VALUE) \ - DEFINE_RC(NOT_NULL_AFTER_IS) \ - DEFINE_RC(UNKNOWN_FUNCTION) \ - DEFINE_RC(SUBQUERY_RETURNED_MULTIPLE_ROWS) +#define DEFINE_RCS \ + DEFINE_RC(SUCCESS) \ + DEFINE_RC(INVALID_ALIAS) \ + DEFINE_RC(INVALID_ARGUMENT) \ + DEFINE_RC(INVALID_HAVING_CONDITION) \ + DEFINE_RC(UNIMPLEMENTED) \ + DEFINE_RC(SQL_SYNTAX) \ + DEFINE_RC(INTERNAL) \ + DEFINE_RC(NOMEM) \ + DEFINE_RC(NOTFOUND) \ + DEFINE_RC(NUMBER_DIV_ZERO) \ + DEFINE_RC(EMPTY) \ + DEFINE_RC(ERROR_DATE) \ + DEFINE_RC(FULL) \ + DEFINE_RC(EXIST) \ + DEFINE_RC(NOT_EXIST) \ + DEFINE_RC(BUFFERPOOL_OPEN) \ + DEFINE_RC(BUFFERPOOL_NOBUF) \ + DEFINE_RC(BUFFERPOOL_INVALID_PAGE_NUM) \ + DEFINE_RC(RECORD_OPENNED) \ + DEFINE_RC(RECORD_INVALID_RID) \ + DEFINE_RC(RECORD_INVALID_KEY) \ + DEFINE_RC(RECORD_DUPLICATE_KEY) \ + DEFINE_RC(RECORD_NOMEM) \ + DEFINE_RC(RECORD_EOF) \ + DEFINE_RC(RECORD_NOT_EXIST) \ + DEFINE_RC(RECORD_INVISIBLE) \ + DEFINE_RC(SCHEMA_DB_EXIST) \ + DEFINE_RC(SCHEMA_DB_NOT_EXIST) \ + DEFINE_RC(SCHEMA_DB_NOT_OPENED) \ + DEFINE_RC(SCHEMA_TABLE_NOT_EXIST) \ + DEFINE_RC(SCHEMA_TABLE_EXIST) \ + DEFINE_RC(SCHEMA_FIELD_NOT_EXIST) \ + DEFINE_RC(SCHEMA_FIELD_MISSING) \ + DEFINE_RC(SCHEMA_FIELD_TYPE_MISMATCH) \ + DEFINE_RC(SCHEMA_INDEX_NAME_REPEAT) \ + DEFINE_RC(IOERR_READ) \ + DEFINE_RC(IOERR_WRITE) \ + DEFINE_RC(IOERR_ACCESS) \ + DEFINE_RC(IOERR_OPEN) \ + DEFINE_RC(IOERR_CLOSE) \ + DEFINE_RC(IOERR_SEEK) \ + DEFINE_RC(IOERR_TOO_LONG) \ + DEFINE_RC(IOERR_SYNC) \ + DEFINE_RC(LOCKED_UNLOCK) \ + DEFINE_RC(LOCKED_NEED_WAIT) \ + DEFINE_RC(LOCKED_CONCURRENCY_CONFLICT) \ + DEFINE_RC(FILE_EXIST) \ + DEFINE_RC(FILE_NOT_EXIST) \ + DEFINE_RC(FILE_NAME) \ + DEFINE_RC(FILE_BOUND) \ + DEFINE_RC(FILE_CREATE) \ + DEFINE_RC(FILE_OPEN) \ + DEFINE_RC(FILE_NOT_OPENED) \ + DEFINE_RC(FILE_CLOSE) \ + DEFINE_RC(FILE_REMOVE) \ + DEFINE_RC(VARIABLE_NOT_EXISTS) \ + DEFINE_RC(VARIABLE_NOT_VALID) \ + DEFINE_RC(LOGBUF_FULL) \ + DEFINE_RC(LOG_FILE_FULL) \ + DEFINE_RC(LOG_ENTRY_INVALID) \ + DEFINE_RC(UNSUPPORTED) \ + DEFINE_RC(VALUE_TOO_LONG) \ + DEFINE_RC(TO_LONG_SUBQUERY_EXPR) \ + DEFINE_RC(NOT_NULLABLE_VALUE) \ + DEFINE_RC(NOT_NULL_AFTER_IS) \ + DEFINE_RC(UNKNOWN_FUNCTION) \ + DEFINE_RC(SUBQUERY_RETURNED_MULTIPLE_ROWS) \ + DEFINE_RC(UNKNOWN_TABLE_TYPE) \ + DEFINE_RC(CREATE_INDEX_ON_NON_TABLE_TYPE) enum class RC { diff --git a/src/observer/sql/executor/command_executor.cpp b/src/observer/sql/executor/command_executor.cpp index 196468aa..35b603c9 100644 --- a/src/observer/sql/executor/command_executor.cpp +++ b/src/observer/sql/executor/command_executor.cpp @@ -13,6 +13,8 @@ See the Mulan PSL v2 for more details. */ // #include "sql/executor/command_executor.h" +#include "sql/executor/create_view_executor.h" +#include "sql/executor/drop_view_executor.h" #include "sql/executor/show_index_executor.h" #include "common/log/log.h" #include "event/sql_event.h" @@ -49,6 +51,16 @@ RC CommandExecutor::execute(SQLStageEvent *sql_event) rc = executor.execute(sql_event); } break; + case StmtType::CREATE_VIEW: { + CreateViewExecutor executor; + rc = executor.execute(sql_event); + } break; + + case StmtType::DROP_VIEW: { + DropViewExecutor executor; + rc = executor.execute(sql_event); + } break; + case StmtType::DESC_TABLE: { DescTableExecutor executor; rc = executor.execute(sql_event); diff --git a/src/observer/sql/executor/create_view_executor.cpp b/src/observer/sql/executor/create_view_executor.cpp new file mode 100644 index 00000000..96745cfc --- /dev/null +++ b/src/observer/sql/executor/create_view_executor.cpp @@ -0,0 +1,110 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : create view executor source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "sql/executor/create_view_executor.h" +#include "common/log/log.h" +#include "event/session_event.h" +#include "event/sql_event.h" +#include "session/session.h" +#include "sql/stmt/create_table_stmt.h" +#include "storage/db/db.h" +#include "sql/optimizer/logical_plan_generator.h" +#include "sql/operator/logical_operator.h" +#include "sql/operator/project_logical_operator.h" +#include "sql/optimizer/physical_plan_generator.h" +#include "storage/trx/trx.h" +#include "sql/stmt/create_view_stmt.h" + +RC CreateViewExecutor::execute(SQLStageEvent *sql_event) +{ + RC rc; + Stmt *stmt = sql_event->stmt(); + Session *session = sql_event->session_event()->session(); + ASSERT(stmt->type() == StmtType::CREATE_VIEW, + "create view executor can not run this command: %d", + static_cast(stmt->type())); + + auto create_view_stmt = static_cast(stmt); + auto table_name = create_view_stmt->table_name().c_str(); + auto select_stmt = create_view_stmt->select_stmt(); + ASSERT(select_stmt != nullptr, + "create view executor can not run this command: %d", + static_cast(stmt->type())); + + std::vector attr_infos; + for (auto &query_expr : select_stmt->query_expressions()) { + AttrInfoSqlNode attr_info; + if (auto field_expr = dynamic_cast(query_expr.get())) { + auto field_meta = field_expr->field().meta(); + attr_info.type = field_meta->type(); + attr_info.name = field_meta->name(); + attr_info.length = field_meta->len(); + attr_info.nullable = field_meta->nullable(); + } else { + attr_info.type = query_expr->value_type(); + attr_info.name = query_expr->name(); + attr_info.length = query_expr->value_length(); + } + attr_infos.emplace_back(std::move(attr_info)); + } + + unique_ptr logical_oper = nullptr; + LogicalPlanGenerator::create(create_view_stmt->select_stmt(), logical_oper); + if (!logical_oper) { + return RC::INTERNAL; + } + + unique_ptr physical_oper = nullptr; + PhysicalPlanGenerator::create(*logical_oper, physical_oper); + if (!physical_oper) { + return RC::INTERNAL; + } + + rc = session->get_current_db()->create_table( + table_name, attr_infos, std::move(physical_oper), StorageFormat::ROW_FORMAT); + if (OB_FAIL(rc)) { + return rc; + } + + // physical_oper->open(session->current_trx()); + // while (RC::SUCCESS == (rc = physical_oper->next())) { + // auto tuple = physical_oper->current_tuple(); + // int num = tuple->cell_num(); + // vector values; + // for (int i = 0; i < num; i++) { + // Value cell; + // rc = tuple->cell_at(i, cell); + // if (OB_FAIL(rc)) { + // return rc; + // } + // values.push_back(cell); + // } + // + // Record record; + // rc = table_->make_record(static_cast(values.size()), values.data(), record); + // if (OB_FAIL(rc)) { + // return rc; + // } + // + // rc = session->current_trx()->insert_record(table_, record); + // if (OB_FAIL(rc)) { + // return rc; + // } + // } + // + // rc = physical_oper->close(); + // if (OB_FAIL(rc)) { + // return rc; + // } + + return rc; +} diff --git a/src/observer/sql/executor/create_view_executor.h b/src/observer/sql/executor/create_view_executor.h new file mode 100644 index 00000000..729a5730 --- /dev/null +++ b/src/observer/sql/executor/create_view_executor.h @@ -0,0 +1,30 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : create view executor header file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "common/rc.h" + +class SQLStageEvent; + +/** + * @brief 创建视图的执行器 + * @ingroup Executor + */ +class CreateViewExecutor +{ +public: + CreateViewExecutor() = default; + virtual ~CreateViewExecutor() = default; + + RC execute(SQLStageEvent *sql_event); +}; diff --git a/src/observer/sql/executor/desc_table_executor.cpp b/src/observer/sql/executor/desc_table_executor.cpp index 3c3ba0cc..ac2001be 100644 --- a/src/observer/sql/executor/desc_table_executor.cpp +++ b/src/observer/sql/executor/desc_table_executor.cpp @@ -41,8 +41,8 @@ RC DescTableExecutor::execute(SQLStageEvent *sql_event) SqlResult *sql_result = session_event->sql_result(); const char *table_name = desc_table_stmt->table_name().c_str(); - Db *db = session->get_current_db(); - Table *table = db->find_table(table_name); + Db *db = session->get_current_db(); + BaseTable *table = db->find_table(table_name); if (table != nullptr) { TupleSchema tuple_schema; tuple_schema.append_cell(TupleCellSpec("", "Field", "Field")); @@ -65,4 +65,4 @@ RC DescTableExecutor::execute(SQLStageEvent *sql_event) sql_result->set_state_string("Table not exists"); } return rc; -} \ No newline at end of file +} diff --git a/src/observer/sql/executor/drop_view_executor.cpp b/src/observer/sql/executor/drop_view_executor.cpp new file mode 100644 index 00000000..0500c2ec --- /dev/null +++ b/src/observer/sql/executor/drop_view_executor.cpp @@ -0,0 +1,35 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "common/log/log.h" +#include "event/session_event.h" +#include "event/sql_event.h" +#include "session/session.h" +#include "storage/db/db.h" +#include "sql/stmt/drop_view_stmt.h" +#include "sql/executor/drop_view_executor.h" + +RC DropViewExecutor::execute(SQLStageEvent *sql_event) +{ + Stmt *stmt = sql_event->stmt(); + Session *session = sql_event->session_event()->session(); + ASSERT(stmt->type() == StmtType::DROP_VIEW, + "drop view executor can not run this command: %d", + static_cast(stmt->type())); + + auto *drop_view_stmt = dynamic_cast(stmt); + + const char *table_name = drop_view_stmt->table_name().c_str(); + RC rc = session->get_current_db()->drop_table(table_name); + + return rc; +} diff --git a/src/observer/sql/executor/drop_view_executor.h b/src/observer/sql/executor/drop_view_executor.h new file mode 100644 index 00000000..21b5fe7c --- /dev/null +++ b/src/observer/sql/executor/drop_view_executor.h @@ -0,0 +1,30 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "common/rc.h" + +class SQLStageEvent; + +/** + * @brief 删除视图的执行器 + * @ingroup Executor + */ +class DropViewExecutor +{ +public: + DropViewExecutor() = default; + virtual ~DropViewExecutor() = default; + + RC execute(SQLStageEvent *sql_event); +}; diff --git a/src/observer/sql/executor/load_data_executor.cpp b/src/observer/sql/executor/load_data_executor.cpp index c3d6fbe6..f2ce8da7 100644 --- a/src/observer/sql/executor/load_data_executor.cpp +++ b/src/observer/sql/executor/load_data_executor.cpp @@ -26,7 +26,7 @@ RC LoadDataExecutor::execute(SQLStageEvent *sql_event) RC rc = RC::SUCCESS; SqlResult *sql_result = sql_event->session_event()->sql_result(); LoadDataStmt *stmt = static_cast(sql_event->stmt()); - Table *table = stmt->table(); + auto table = stmt->table(); const char *file_name = stmt->filename(); load_data(table, file_name, sql_result); return rc; @@ -40,8 +40,8 @@ RC LoadDataExecutor::execute(SQLStageEvent *sql_event) * @param errmsg 如果出现错误,通过这个参数返回错误信息 * @return 成功返回RC::SUCCESS */ -RC insert_record_from_file( - Table *table, std::vector &file_values, std::vector &record_values, std::stringstream &errmsg) +RC insert_record_from_file(BaseTable *table, std::vector &file_values, std::vector &record_values, + std::stringstream &errmsg) { const int field_num = record_values.size(); @@ -76,7 +76,7 @@ RC insert_record_from_file( return rc; } -void LoadDataExecutor::load_data(Table *table, const char *file_name, SqlResult *sql_result) +void LoadDataExecutor::load_data(BaseTable *table, const char *file_name, SqlResult *sql_result) { std::stringstream result_string; diff --git a/src/observer/sql/executor/load_data_executor.h b/src/observer/sql/executor/load_data_executor.h index dc023ba9..8fce1641 100644 --- a/src/observer/sql/executor/load_data_executor.h +++ b/src/observer/sql/executor/load_data_executor.h @@ -16,8 +16,8 @@ See the Mulan PSL v2 for more details. */ #include "common/rc.h" +class BaseTable; class SQLStageEvent; -class Table; class SqlResult; /** @@ -33,5 +33,5 @@ class LoadDataExecutor RC execute(SQLStageEvent *sql_event); private: - void load_data(Table *table, const char *file_name, SqlResult *sql_result); + void load_data(BaseTable *table, const char *file_name, SqlResult *sql_result); }; diff --git a/src/observer/sql/executor/show_index_executor.cpp b/src/observer/sql/executor/show_index_executor.cpp index 427d32e3..9762911e 100644 --- a/src/observer/sql/executor/show_index_executor.cpp +++ b/src/observer/sql/executor/show_index_executor.cpp @@ -36,8 +36,8 @@ RC ShowIndexExecutor::execute(SQLStageEvent *sql_event) SqlResult *sql_result = session_event->sql_result(); const char *table_name = show_index_stmt->table_name().c_str(); - Db *db = session->get_current_db(); - Table *table = db->find_table(table_name); + Db *db = session->get_current_db(); + BaseTable *table = db->find_table(table_name); if (table != nullptr) { TupleSchema tuple_schema; tuple_schema.append_cell(TupleCellSpec("", "Table", "Table")); diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 67341e36..337ed4bd 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -751,7 +751,7 @@ SubQueryExpr::SubQueryExpr(SelectSqlNode &select_node) : sql_node_(select_node) SubQueryExpr::~SubQueryExpr() = default; -RC SubQueryExpr::generate_select_stmt(Db *db, const std::unordered_map &tables) +RC SubQueryExpr::generate_select_stmt(Db *db, const std::unordered_map &tables) { // 仿照普通 select 的执行流程,tables 用来传递别名 Stmt *stmt = nullptr; diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 9b0bf37f..9c28407c 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -563,7 +563,7 @@ class SubQueryExpr : public Expression std::unique_ptr deep_copy() const; - RC generate_select_stmt(Db *db, const std::unordered_map &tables); + RC generate_select_stmt(Db *db, const std::unordered_map &tables); RC generate_logical_oper(); RC generate_physical_oper(); diff --git a/src/observer/sql/operator/delete_logical_operator.cpp b/src/observer/sql/operator/delete_logical_operator.cpp index 5fc03f34..ed1c803c 100644 --- a/src/observer/sql/operator/delete_logical_operator.cpp +++ b/src/observer/sql/operator/delete_logical_operator.cpp @@ -14,4 +14,4 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/delete_logical_operator.h" -DeleteLogicalOperator::DeleteLogicalOperator(Table *table) : table_(table) {} +DeleteLogicalOperator::DeleteLogicalOperator(BaseTable *table) : table_(table) {} diff --git a/src/observer/sql/operator/delete_logical_operator.h b/src/observer/sql/operator/delete_logical_operator.h index c32ce662..73ddd521 100644 --- a/src/observer/sql/operator/delete_logical_operator.h +++ b/src/observer/sql/operator/delete_logical_operator.h @@ -23,12 +23,12 @@ See the Mulan PSL v2 for more details. */ class DeleteLogicalOperator : public LogicalOperator { public: - DeleteLogicalOperator(Table *table); + DeleteLogicalOperator(BaseTable *table); virtual ~DeleteLogicalOperator() = default; LogicalOperatorType type() const override { return LogicalOperatorType::DELETE; } - Table *table() const { return table_; } + BaseTable *table() const { return table_; } private: - Table *table_ = nullptr; + BaseTable *table_ = nullptr; }; diff --git a/src/observer/sql/operator/delete_physical_operator.h b/src/observer/sql/operator/delete_physical_operator.h index d3c00fbb..12e8899f 100644 --- a/src/observer/sql/operator/delete_physical_operator.h +++ b/src/observer/sql/operator/delete_physical_operator.h @@ -26,7 +26,7 @@ class DeleteStmt; class DeletePhysicalOperator : public PhysicalOperator { public: - DeletePhysicalOperator(Table *table) : table_(table) {} + DeletePhysicalOperator(BaseTable *table) : table_(table) {} virtual ~DeletePhysicalOperator() = default; @@ -39,7 +39,7 @@ class DeletePhysicalOperator : public PhysicalOperator Tuple *current_tuple() override { return nullptr; } private: - Table *table_ = nullptr; + BaseTable *table_ = nullptr; Trx *trx_ = nullptr; std::vector records_; }; diff --git a/src/observer/sql/operator/insert_logical_operator.cpp b/src/observer/sql/operator/insert_logical_operator.cpp index 15d3f509..43774c1d 100644 --- a/src/observer/sql/operator/insert_logical_operator.cpp +++ b/src/observer/sql/operator/insert_logical_operator.cpp @@ -14,6 +14,6 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/insert_logical_operator.h" -InsertLogicalOperator::InsertLogicalOperator(Table *table, const std::vector> &values_list) +InsertLogicalOperator::InsertLogicalOperator(BaseTable *table, const std::vector> &values_list) : table_(table), values_list_(values_list) {} diff --git a/src/observer/sql/operator/insert_logical_operator.h b/src/observer/sql/operator/insert_logical_operator.h index 60231f52..ae2314e1 100644 --- a/src/observer/sql/operator/insert_logical_operator.h +++ b/src/observer/sql/operator/insert_logical_operator.h @@ -26,15 +26,15 @@ See the Mulan PSL v2 for more details. */ class InsertLogicalOperator : public LogicalOperator { public: - InsertLogicalOperator(Table *table, const std::vector> &); + InsertLogicalOperator(BaseTable *table, const std::vector> &); ~InsertLogicalOperator() override = default; LogicalOperatorType type() const override { return LogicalOperatorType::INSERT; } - Table *table() const { return table_; } + BaseTable *table() const { return table_; } const std::vector> &values_list() const { return values_list_; }; private: - Table *table_ = nullptr; + BaseTable *table_ = nullptr; const std::vector> &values_list_; }; diff --git a/src/observer/sql/operator/insert_physical_operator.cpp b/src/observer/sql/operator/insert_physical_operator.cpp index d8f6130a..e29777b0 100644 --- a/src/observer/sql/operator/insert_physical_operator.cpp +++ b/src/observer/sql/operator/insert_physical_operator.cpp @@ -17,7 +17,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/table/table.h" #include "storage/trx/trx.h" -InsertPhysicalOperator::InsertPhysicalOperator(Table *table, const std::vector> &values_list) +InsertPhysicalOperator::InsertPhysicalOperator(BaseTable *table, const std::vector> &values_list) : table_(table), values_list_(values_list) {} diff --git a/src/observer/sql/operator/insert_physical_operator.h b/src/observer/sql/operator/insert_physical_operator.h index c5332104..25f8bd9b 100644 --- a/src/observer/sql/operator/insert_physical_operator.h +++ b/src/observer/sql/operator/insert_physical_operator.h @@ -27,7 +27,7 @@ class InsertStmt; class InsertPhysicalOperator : public PhysicalOperator { public: - InsertPhysicalOperator(Table *table, const std::vector> &values_list); + InsertPhysicalOperator(BaseTable *table, const std::vector> &values_list); ~InsertPhysicalOperator() override = default; @@ -40,6 +40,6 @@ class InsertPhysicalOperator : public PhysicalOperator Tuple *current_tuple() override { return nullptr; } private: - Table *table_ = nullptr; + BaseTable *table_ = nullptr; const std::vector> &values_list_; }; diff --git a/src/observer/sql/operator/table_get_logical_operator.cpp b/src/observer/sql/operator/table_get_logical_operator.cpp index c4f331be..705069db 100644 --- a/src/observer/sql/operator/table_get_logical_operator.cpp +++ b/src/observer/sql/operator/table_get_logical_operator.cpp @@ -14,7 +14,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/table_get_logical_operator.h" -TableGetLogicalOperator::TableGetLogicalOperator(Table *table, ReadWriteMode mode) : table_(table), mode_(mode) {} +TableGetLogicalOperator::TableGetLogicalOperator(BaseTable *table, ReadWriteMode mode) : table_(table), mode_(mode) {} void TableGetLogicalOperator::set_predicates(std::vector> &&exprs) { diff --git a/src/observer/sql/operator/table_get_logical_operator.h b/src/observer/sql/operator/table_get_logical_operator.h index 4551a371..2c39071b 100644 --- a/src/observer/sql/operator/table_get_logical_operator.h +++ b/src/observer/sql/operator/table_get_logical_operator.h @@ -25,19 +25,19 @@ See the Mulan PSL v2 for more details. */ class TableGetLogicalOperator : public LogicalOperator { public: - TableGetLogicalOperator(Table *table, ReadWriteMode mode); + TableGetLogicalOperator(BaseTable *table, ReadWriteMode mode); virtual ~TableGetLogicalOperator() = default; LogicalOperatorType type() const override { return LogicalOperatorType::TABLE_GET; } - Table *table() const { return table_; } + BaseTable *table() const { return table_; } ReadWriteMode read_write_mode() const { return mode_; } void set_predicates(std::vector> &&exprs); auto predicates() -> std::vector> & { return predicates_; } private: - Table *table_ = nullptr; + BaseTable *table_ = nullptr; ReadWriteMode mode_ = ReadWriteMode::READ_WRITE; // 与当前表相关的过滤操作,可以尝试在遍历数据时执行 diff --git a/src/observer/sql/operator/update_logical_operator.cpp b/src/observer/sql/operator/update_logical_operator.cpp index b7a387d3..397b810a 100644 --- a/src/observer/sql/operator/update_logical_operator.cpp +++ b/src/observer/sql/operator/update_logical_operator.cpp @@ -13,6 +13,6 @@ #include "update_logical_operator.h" UpdateLogicalOperator::UpdateLogicalOperator( - Table *table, std::vector field_metas, std::vector> values) + BaseTable *table, std::vector field_metas, std::vector> values) : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)) {} diff --git a/src/observer/sql/operator/update_logical_operator.h b/src/observer/sql/operator/update_logical_operator.h index ab18e8f4..f9e4a6dc 100644 --- a/src/observer/sql/operator/update_logical_operator.h +++ b/src/observer/sql/operator/update_logical_operator.h @@ -22,16 +22,16 @@ class UpdateLogicalOperator : public LogicalOperator { public: explicit UpdateLogicalOperator( - Table *table, std::vector field_metas, std::vector> values); + BaseTable *table, std::vector field_metas, std::vector> values); ~UpdateLogicalOperator() override = default; LogicalOperatorType type() const override { return LogicalOperatorType::UPDATE; } - Table *table() const { return table_; } + BaseTable *table() const { return table_; } std::vector &field_metas() { return field_metas_; } std::vector> &values() { return values_; } private: - Table *table_ = nullptr; + BaseTable *table_ = nullptr; std::vector field_metas_; std::vector> values_; }; diff --git a/src/observer/sql/operator/update_physical_operator.h b/src/observer/sql/operator/update_physical_operator.h index db359d46..865b240c 100644 --- a/src/observer/sql/operator/update_physical_operator.h +++ b/src/observer/sql/operator/update_physical_operator.h @@ -25,7 +25,7 @@ class UpdatePhysicalOperator : public PhysicalOperator { public: UpdatePhysicalOperator( - Table *table, std::vector field_metas, std::vector> values) + BaseTable *table, std::vector field_metas, std::vector> values) : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)) {} @@ -43,7 +43,7 @@ class UpdatePhysicalOperator : public PhysicalOperator void rollback(); Trx *trx_ = nullptr; - Table *table_ = nullptr; + BaseTable *table_ = nullptr; std::vector field_metas_; std::vector> values_; std::vector records_; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 3094fc2b..0f1c7e4a 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -103,9 +103,8 @@ RC LogicalPlanGenerator::create_plan(SelectStmt *select_stmt, unique_ptr table_oper(nullptr); last_oper = &table_oper; - const std::vector

&tables = select_stmt->tables(); - for (Table *table : tables) { - + const std::vector &tables = select_stmt->tables(); + for (BaseTable *table : tables) { unique_ptr table_get_oper(new TableGetLogicalOperator(table, ReadWriteMode::READ_ONLY)); if (table_oper == nullptr) { table_oper = std::move(table_get_oper); @@ -219,7 +218,7 @@ RC LogicalPlanGenerator::create_plan(InsertStmt *insert_stmt, unique_ptr &logical_operator) { - Table *table = delete_stmt->table(); + BaseTable *table = delete_stmt->table(); FilterStmt *filter_stmt = delete_stmt->filter_stmt(); unique_ptr table_get_oper(new TableGetLogicalOperator(table, ReadWriteMode::READ_WRITE)); diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index 2802f9ba..9d4c5c8b 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -134,45 +134,49 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u { vector> &predicates = table_get_oper.predicates(); // 看看是否有可以用于索引查找的表达式 - Table *table = table_get_oper.table(); + auto base_table = table_get_oper.table(); Index *index = nullptr; ValueExpr *value_expr = nullptr; - for (auto &expr : predicates) { - if (expr->type() == ExprType::COMPARISON) { - auto comparison_expr = dynamic_cast(expr.get()); - - // 简单处理,就找等值查询 - if (comparison_expr->comp() != EQUAL_TO) { - continue; - } - - unique_ptr &left_expr = comparison_expr->left(); - unique_ptr &right_expr = comparison_expr->right(); - // 左右比较的一边最少是一个值 - if (left_expr->type() != ExprType::VALUE && right_expr->type() != ExprType::VALUE) { - continue; - } - - FieldExpr *field_expr = nullptr; - if (left_expr->type() == ExprType::FIELD) { - ASSERT(right_expr->type() == ExprType::VALUE, "right expr should be a value expr while left is field expr"); - field_expr = dynamic_cast(left_expr.get()); - value_expr = dynamic_cast(right_expr.get()); - } else if (right_expr->type() == ExprType::FIELD) { - ASSERT(left_expr->type() == ExprType::VALUE, "left expr should be a value expr while right is a field expr"); - field_expr = dynamic_cast(right_expr.get()); - value_expr = dynamic_cast(left_expr.get()); - } - - if (field_expr == nullptr) { - continue; - } - - const Field &field = field_expr->field(); - index = table->find_index_by_field(field.field_name()); - if (nullptr != index) { - break; + Table *table = nullptr; + if (base_table->type() == TableType::Table) { + table = static_cast
(base_table); + for (auto &expr : predicates) { + if (expr->type() == ExprType::COMPARISON) { + auto comparison_expr = dynamic_cast(expr.get()); + + // 简单处理,就找等值查询 + if (comparison_expr->comp() != EQUAL_TO) { + continue; + } + + unique_ptr &left_expr = comparison_expr->left(); + unique_ptr &right_expr = comparison_expr->right(); + // 左右比较的一边最少是一个值 + if (left_expr->type() != ExprType::VALUE && right_expr->type() != ExprType::VALUE) { + continue; + } + + FieldExpr *field_expr = nullptr; + if (left_expr->type() == ExprType::FIELD) { + ASSERT(right_expr->type() == ExprType::VALUE, "right expr should be a value expr while left is field expr"); + field_expr = dynamic_cast(left_expr.get()); + value_expr = dynamic_cast(right_expr.get()); + } else if (right_expr->type() == ExprType::FIELD) { + ASSERT(left_expr->type() == ExprType::VALUE, "left expr should be a value expr while right is a field expr"); + field_expr = dynamic_cast(right_expr.get()); + value_expr = dynamic_cast(left_expr.get()); + } + + if (field_expr == nullptr) { + continue; + } + + const Field &field = field_expr->field(); + index = table->find_index_by_field(field.field_name()); + if (nullptr != index) { + break; + } } } } @@ -425,12 +429,16 @@ RC PhysicalPlanGenerator::create_plan(OrderByLogicalOperator &logical_oper, std: RC PhysicalPlanGenerator::create_vec_plan(TableGetLogicalOperator &table_get_oper, unique_ptr &oper) { vector> &predicates = table_get_oper.predicates(); - Table *table = table_get_oper.table(); - TableScanVecPhysicalOperator *table_scan_oper = - new TableScanVecPhysicalOperator(table, table_get_oper.read_write_mode()); - table_scan_oper->set_predicates(std::move(predicates)); - oper = unique_ptr(table_scan_oper); - LOG_TRACE("use vectorized table scan"); + BaseTable *base_table = table_get_oper.table(); + Table *table = nullptr; + if (base_table->type() == TableType::Table) { + table = static_cast
(base_table); + TableScanVecPhysicalOperator *table_scan_oper = + new TableScanVecPhysicalOperator(table, table_get_oper.read_write_mode()); + table_scan_oper->set_predicates(std::move(predicates)); + oper = unique_ptr(table_scan_oper); + LOG_TRACE("use vectorized table scan"); + } return RC::SUCCESS; } @@ -460,8 +468,6 @@ RC PhysicalPlanGenerator::create_vec_plan(GroupByLogicalOperator &logical_oper, oper = std::move(physical_oper); return rc; - - return RC::SUCCESS; } RC PhysicalPlanGenerator::create_vec_plan(ProjectLogicalOperator &project_oper, unique_ptr &oper) diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 08322481..987e2a74 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -22,7 +22,7 @@ See the Mulan PSL v2 for more details. */ using namespace std; using namespace common; -Table *BinderContext::find_table(const char *table_name) const +BaseTable *BinderContext::find_table(const char *table_name) const { auto iter = this->tables_->find(table_name); if (iter == tables_->end()) { @@ -32,7 +32,7 @@ Table *BinderContext::find_table(const char *table_name) const } //////////////////////////////////////////////////////////////////////////////// -static void wildcard_fields(Table *table, vector> &expressions, bool multi_tables = false) +static void wildcard_fields(BaseTable *table, vector> &expressions, bool multi_tables = false) { const TableMeta &table_meta = table->table_meta(); const int field_num = table_meta.field_num(); @@ -132,11 +132,11 @@ RC ExpressionBinder::bind_star_expression( return RC::INVALID_ALIAS; } - vector
tables_to_wildcard; + vector tables_to_wildcard; const char *table_name = star_expr->table_name(); if (!is_blank(table_name) && 0 != strcmp(table_name, "*")) { - Table *table = context_.find_table(table_name); + BaseTable *table = context_.find_table(table_name); if (nullptr == table) { LOG_INFO("no such table in from list: %s", table_name); return RC::SCHEMA_TABLE_NOT_EXIST; @@ -144,11 +144,11 @@ RC ExpressionBinder::bind_star_expression( tables_to_wildcard.push_back(table); } else { - const vector
&all_tables = context_.query_tables(); + const vector &all_tables = context_.query_tables(); tables_to_wildcard.insert(tables_to_wildcard.end(), all_tables.begin(), all_tables.end()); } - for (Table *table : tables_to_wildcard) { + for (BaseTable *table : tables_to_wildcard) { wildcard_fields(table, bound_expressions, multi_tables_); } @@ -167,7 +167,7 @@ RC ExpressionBinder::bind_unbound_field_expression( const char *table_name = unbound_field_expr->table_name(); const char *field_name = unbound_field_expr->field_name(); - Table *table = nullptr; + BaseTable *table = nullptr; if (is_blank(table_name)) { table = context_.default_table(); } else { diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index 962786ff..894669ae 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -24,29 +24,29 @@ class BinderContext BinderContext() = default; virtual ~BinderContext() = default; - void add_table(Table *table) { query_tables_.push_back(table); } + void add_table(BaseTable *table) { query_tables_.emplace_back(table); } void add_db(Db *db) { db_ = db; } - void set_tables(std::unordered_map *tables) { tables_ = tables; } + void set_tables(std::unordered_map *tables) { tables_ = tables; } Db *get_db() const { return db_; } - Table *find_table(const char *table_name) const; + BaseTable *find_table(const char *table_name) const; - const std::vector
&query_tables() const { return query_tables_; } - std::unordered_map &table_map() { return *tables_; } + const std::vector &query_tables() const { return query_tables_; } + std::unordered_map &table_map() { return *tables_; } private: Db *db_; public: - [[nodiscard]] Table *default_table() const { return default_table_; } - void set_default_table(Table *default_table) { default_table_ = default_table; } + [[nodiscard]] BaseTable *default_table() const { return default_table_; } + void set_default_table(BaseTable *default_table) { default_table_ = default_table; } private: - Table *default_table_; - std::vector
query_tables_; - std::unordered_map *tables_; + BaseTable *default_table_; + std::vector query_tables_; + std::unordered_map *tables_; }; /** diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 7f5e6fa0..3b193bd4 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,23 +8,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -77,62 +75,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -156,12 +154,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -189,7 +187,7 @@ typedef void* yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_NEW_FILE yyrestart(yyin, yyscanner) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -207,7 +205,7 @@ typedef void* yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -222,88 +220,85 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - + +#define YY_LESS_LINENO(n) +#define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } while (0) +#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - - }; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -312,59 +307,55 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) +#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner); +static void yy_load_buffer_state(yyscan_t yyscanner); +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -372,322 +363,2478 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state(yyscan_t yyscanner); +static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); +static int yy_get_next_buffer(yyscan_t yyscanner); +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t)(yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 79 #define YY_END_OF_BUFFER 80 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[230] = - { 0, - 0, 0, 0, 0, 80, 78, 1, 2, 78, 78, - 78, 58, 59, 74, 72, 60, 73, 6, 75, 3, - 5, 65, 61, 67, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 79, 64, 0, 76, 0, 77, - 0, 3, 62, 63, 66, 71, 71, 71, 49, 71, - 48, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 51, 69, 71, 71, 71, - 71, 71, 15, 23, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 4, 22, 50, 71, - - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 33, 71, 71, 71, 68, 71, 71, 71, 71, 29, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 19, 34, 71, 71, 42, 36, 71, 9, 11, - 71, 7, 71, 71, 71, 20, 71, 71, 8, 71, - 71, 71, 71, 25, 56, 70, 41, 39, 71, 71, - 71, 16, 71, 17, 71, 37, 71, 71, 71, 57, - 71, 30, 71, 71, 71, 71, 71, 35, 71, 45, - 71, 14, 71, 55, 71, 71, 47, 71, 71, 71, - - 12, 71, 71, 71, 21, 31, 10, 27, 52, 71, - 54, 46, 43, 24, 71, 71, 18, 71, 13, 38, - 28, 26, 44, 71, 71, 53, 40, 32, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, - 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, - - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[71] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 - } ; - -static const flex_int16_t yy_base[235] = - { 0, - 0, 0, 0, 0, 624, 625, 625, 625, 605, 617, - 615, 625, 625, 625, 625, 625, 625, 625, 625, 58, - 625, 56, 625, 602, 57, 61, 62, 63, 64, 83, - 65, 73, 91, 76, 604, 117, 119, 115, 103, 142, - 134, 129, 145, 141, 625, 625, 613, 625, 611, 625, - 601, 71, 625, 625, 625, 0, 600, 89, 79, 146, - 599, 152, 155, 161, 172, 167, 182, 174, 188, 187, - 189, 190, 195, 196, 199, 249, 598, 200, 203, 216, - 202, 212, 597, 230, 220, 229, 223, 246, 225, 250, - 233, 263, 258, 270, 275, 280, 596, 595, 594, 277, - - 274, 278, 288, 296, 304, 294, 311, 297, 314, 306, - 319, 308, 323, 295, 321, 332, 333, 328, 336, 347, - 330, 354, 353, 357, 593, 358, 361, 369, 377, 592, - 376, 359, 373, 379, 384, 383, 387, 389, 390, 393, - 401, 591, 583, 397, 399, 581, 580, 402, 578, 577, - 409, 576, 420, 413, 422, 575, 424, 428, 572, 432, - 431, 394, 435, 570, 569, 568, 567, 450, 439, 448, - 458, 566, 462, 565, 466, 564, 464, 468, 469, 563, - 476, 561, 471, 479, 490, 474, 494, 560, 482, 559, - 498, 557, 496, 551, 484, 510, 546, 512, 500, 502, - - 503, 519, 520, 522, 544, 538, 477, 456, 438, 530, - 405, 355, 260, 255, 537, 540, 251, 527, 210, 185, - 132, 127, 126, 549, 541, 124, 120, 88, 625, 599, - 601, 603, 90, 79 - } ; - -static const flex_int16_t yy_def[235] = - { 0, - 229, 1, 230, 230, 229, 229, 229, 229, 229, 231, - 232, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 229, 229, 231, 229, 232, 229, - 229, 229, 229, 229, 229, 234, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 229, 233, 233, 233, - - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 0, 229, - 229, 229, 229, 229 - } ; - -static const flex_int16_t yy_nxt[696] = - { 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, - 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, - 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, - 51, 56, 52, 53, 54, 56, 56, 56, 56, 56, - 56, 62, 66, 51, 60, 52, 67, 56, 63, 58, - 56, 57, 74, 56, 59, 64, 75, 56, 65, 68, - - 99, 73, 56, 56, 61, 56, 69, 62, 66, 78, - 60, 98, 67, 70, 63, 58, 71, 56, 74, 72, - 59, 64, 75, 76, 65, 68, 99, 73, 77, 56, - 61, 56, 69, 56, 56, 78, 85, 98, 56, 70, - 56, 56, 71, 56, 79, 72, 56, 83, 56, 76, - 80, 84, 81, 90, 77, 56, 56, 91, 82, 56, - 56, 92, 85, 93, 94, 86, 56, 96, 87, 56, - 79, 100, 95, 83, 102, 56, 80, 84, 81, 90, - 88, 56, 101, 91, 82, 89, 56, 92, 56, 93, - 94, 86, 103, 96, 87, 104, 56, 100, 95, 56, - - 102, 56, 56, 56, 56, 105, 88, 108, 101, 56, - 56, 89, 106, 56, 56, 109, 56, 56, 103, 107, - 111, 104, 110, 113, 56, 112, 56, 122, 114, 116, - 56, 105, 123, 108, 56, 124, 115, 56, 106, 56, - 125, 109, 126, 56, 56, 107, 111, 56, 110, 113, - 128, 112, 127, 122, 114, 116, 131, 133, 123, 129, - 56, 124, 115, 56, 56, 56, 125, 130, 126, 56, - 134, 117, 56, 118, 56, 135, 128, 56, 127, 132, - 137, 119, 131, 133, 56, 129, 120, 121, 56, 56, - 136, 56, 56, 130, 56, 142, 134, 117, 139, 118, - - 138, 135, 56, 140, 141, 132, 137, 119, 56, 56, - 56, 56, 120, 121, 143, 145, 136, 148, 56, 144, - 56, 142, 56, 146, 139, 56, 138, 147, 56, 140, - 141, 150, 149, 56, 157, 56, 153, 56, 154, 155, - 143, 145, 56, 148, 56, 144, 56, 56, 158, 146, - 56, 151, 152, 147, 156, 161, 160, 150, 149, 162, - 157, 56, 153, 164, 154, 155, 159, 56, 56, 56, - 163, 56, 56, 56, 158, 56, 166, 151, 152, 167, - 156, 161, 160, 56, 169, 162, 165, 56, 168, 164, - 56, 56, 159, 56, 174, 173, 163, 56, 56, 170, - - 171, 56, 166, 56, 56, 167, 178, 56, 56, 175, - 169, 56, 165, 56, 168, 56, 56, 172, 177, 56, - 174, 173, 176, 56, 183, 170, 171, 56, 179, 181, - 194, 180, 178, 182, 56, 175, 56, 184, 56, 187, - 185, 189, 56, 172, 177, 56, 56, 186, 176, 56, - 183, 188, 56, 56, 179, 181, 194, 180, 190, 182, - 191, 193, 56, 184, 56, 187, 185, 189, 198, 196, - 56, 195, 56, 186, 192, 197, 56, 188, 56, 199, - 56, 200, 56, 56, 190, 56, 191, 193, 56, 201, - 56, 56, 204, 56, 198, 196, 56, 195, 56, 205, - - 192, 197, 207, 202, 56, 199, 203, 200, 56, 206, - 56, 209, 56, 208, 56, 201, 56, 56, 204, 213, - 211, 210, 214, 212, 56, 205, 56, 218, 207, 202, - 215, 216, 203, 56, 56, 206, 56, 209, 217, 208, - 219, 56, 220, 221, 56, 213, 211, 210, 214, 212, - 226, 56, 56, 218, 56, 56, 215, 216, 56, 222, - 56, 225, 223, 56, 217, 56, 219, 224, 220, 221, - 228, 56, 227, 56, 56, 56, 226, 56, 56, 56, - 56, 56, 56, 56, 56, 222, 56, 225, 223, 56, - 56, 56, 56, 224, 56, 56, 228, 56, 227, 45, - - 45, 47, 47, 49, 49, 56, 56, 56, 56, 56, - 97, 56, 56, 56, 56, 97, 50, 48, 56, 55, - 50, 48, 46, 229, 5, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229 - - } ; - -static const flex_int16_t yy_chk[696] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, - 234, 27, 28, 52, 26, 52, 28, 32, 27, 25, - 34, 233, 32, 59, 25, 27, 32, 30, 27, 28, - - 59, 31, 228, 58, 26, 33, 29, 27, 28, 34, - 26, 58, 28, 30, 27, 25, 30, 39, 32, 30, - 25, 27, 32, 33, 27, 28, 59, 31, 33, 38, - 26, 36, 29, 37, 227, 34, 39, 58, 226, 30, - 223, 222, 30, 42, 36, 30, 221, 38, 41, 33, - 36, 38, 37, 41, 33, 44, 40, 41, 37, 43, - 60, 42, 39, 42, 43, 40, 62, 44, 40, 63, - 36, 60, 43, 38, 63, 64, 36, 38, 37, 41, - 40, 66, 62, 41, 37, 40, 65, 42, 68, 42, - 43, 40, 64, 44, 40, 65, 67, 60, 43, 220, - - 63, 70, 69, 71, 72, 66, 40, 68, 62, 73, - 74, 40, 67, 75, 78, 69, 81, 79, 64, 67, - 70, 65, 69, 72, 219, 71, 82, 78, 73, 75, - 80, 66, 79, 68, 85, 80, 74, 87, 67, 89, - 81, 69, 82, 86, 84, 67, 70, 91, 69, 72, - 85, 71, 84, 78, 73, 75, 87, 89, 79, 86, - 88, 80, 74, 76, 90, 217, 81, 86, 82, 214, - 90, 76, 93, 76, 213, 91, 85, 92, 84, 88, - 93, 76, 87, 89, 94, 86, 76, 76, 101, 95, - 92, 100, 102, 86, 96, 101, 90, 76, 95, 76, - - 94, 91, 103, 96, 100, 88, 93, 76, 106, 114, - 104, 108, 76, 76, 102, 104, 92, 106, 105, 103, - 110, 101, 112, 105, 95, 107, 94, 105, 109, 96, - 100, 108, 107, 111, 114, 115, 110, 113, 111, 112, - 102, 104, 118, 106, 121, 103, 116, 117, 115, 105, - 119, 109, 109, 105, 113, 118, 117, 108, 107, 119, - 114, 120, 110, 121, 111, 112, 116, 123, 122, 212, - 120, 124, 126, 132, 115, 127, 123, 109, 109, 124, - 113, 118, 117, 128, 127, 119, 122, 133, 126, 121, - 131, 129, 116, 134, 133, 132, 120, 136, 135, 128, - - 129, 137, 123, 138, 139, 124, 137, 140, 162, 134, - 127, 144, 122, 145, 126, 141, 148, 131, 136, 211, - 133, 132, 135, 151, 144, 128, 129, 154, 138, 140, - 162, 139, 137, 141, 153, 134, 155, 145, 157, 153, - 148, 155, 158, 131, 136, 161, 160, 151, 135, 163, - 144, 154, 209, 169, 138, 140, 162, 139, 157, 141, - 158, 161, 170, 145, 168, 153, 148, 155, 170, 168, - 208, 163, 171, 151, 160, 169, 173, 154, 177, 171, - 175, 173, 178, 179, 157, 183, 158, 161, 186, 175, - 181, 207, 179, 184, 170, 168, 189, 163, 195, 181, - - 160, 169, 184, 177, 185, 171, 178, 173, 187, 183, - 193, 186, 191, 185, 199, 175, 200, 201, 179, 193, - 189, 187, 195, 191, 196, 181, 198, 200, 184, 177, - 196, 198, 178, 202, 203, 183, 204, 186, 199, 185, - 201, 218, 202, 203, 210, 193, 189, 187, 195, 191, - 218, 215, 206, 200, 216, 225, 196, 198, 205, 204, - 197, 216, 210, 224, 199, 194, 201, 215, 202, 203, - 225, 192, 224, 190, 188, 182, 218, 180, 176, 174, - 172, 167, 166, 165, 164, 204, 159, 216, 210, 156, - 152, 150, 149, 215, 147, 146, 225, 143, 224, 230, - - 230, 231, 231, 232, 232, 142, 130, 125, 99, 98, - 97, 83, 77, 61, 57, 51, 49, 47, 35, 24, - 11, 10, 9, 5, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229 - - } ; +{ + flex_int32_t yy_verify; + flex_int32_t yy_nxt; +}; +static const flex_int16_t yy_accept[230] = {0, + 0, + 0, + 0, + 0, + 80, + 78, + 1, + 2, + 78, + 78, + 78, + 58, + 59, + 74, + 72, + 60, + 73, + 6, + 75, + 3, + 5, + 65, + 61, + 67, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 79, + 64, + 0, + 76, + 0, + 77, + 0, + 3, + 62, + 63, + 66, + 71, + 71, + 71, + 49, + 71, + 48, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 51, + 69, + 71, + 71, + 71, + 71, + 71, + 15, + 23, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 4, + 22, + 50, + 71, + + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 33, + 71, + 71, + 71, + 68, + 71, + 71, + 71, + 71, + 29, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 71, + 19, + 34, + 71, + 71, + 42, + 36, + 71, + 9, + 11, + 71, + 7, + 71, + 71, + 71, + 20, + 71, + 71, + 8, + 71, + 71, + 71, + 71, + 25, + 56, + 70, + 41, + 39, + 71, + 71, + 71, + 16, + 71, + 17, + 71, + 37, + 71, + 71, + 71, + 57, + 71, + 30, + 71, + 71, + 71, + 71, + 71, + 35, + 71, + 45, + 71, + 14, + 71, + 55, + 71, + 71, + 47, + 71, + 71, + 71, + + 12, + 71, + 71, + 71, + 21, + 31, + 10, + 27, + 52, + 71, + 54, + 46, + 43, + 24, + 71, + 71, + 18, + 71, + 13, + 38, + 28, + 26, + 44, + 71, + 71, + 53, + 40, + 32, + 0}; + +static const YY_CHAR yy_ec[256] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 3, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 4, + 5, + 1, + 1, + 1, + 1, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 1, + 16, + 17, + 18, + 19, + 1, + 1, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 1, + 1, + 1, + 1, + 45, + 1, + 46, + 47, + 48, + 49, + + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 45, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1}; + +static const YY_CHAR yy_meta[71] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2}; + +static const flex_int16_t yy_base[235] = {0, + 0, + 0, + 0, + 0, + 624, + 625, + 625, + 625, + 605, + 617, + 615, + 625, + 625, + 625, + 625, + 625, + 625, + 625, + 625, + 58, + 625, + 56, + 625, + 602, + 57, + 61, + 62, + 63, + 64, + 83, + 65, + 73, + 91, + 76, + 604, + 117, + 119, + 115, + 103, + 142, + 134, + 129, + 145, + 141, + 625, + 625, + 613, + 625, + 611, + 625, + 601, + 71, + 625, + 625, + 625, + 0, + 600, + 89, + 79, + 146, + 599, + 152, + 155, + 161, + 172, + 167, + 182, + 174, + 188, + 187, + 189, + 190, + 195, + 196, + 199, + 249, + 598, + 200, + 203, + 216, + 202, + 212, + 597, + 230, + 220, + 229, + 223, + 246, + 225, + 250, + 233, + 263, + 258, + 270, + 275, + 280, + 596, + 595, + 594, + 277, + + 274, + 278, + 288, + 296, + 304, + 294, + 311, + 297, + 314, + 306, + 319, + 308, + 323, + 295, + 321, + 332, + 333, + 328, + 336, + 347, + 330, + 354, + 353, + 357, + 593, + 358, + 361, + 369, + 377, + 592, + 376, + 359, + 373, + 379, + 384, + 383, + 387, + 389, + 390, + 393, + 401, + 591, + 583, + 397, + 399, + 581, + 580, + 402, + 578, + 577, + 409, + 576, + 420, + 413, + 422, + 575, + 424, + 428, + 572, + 432, + 431, + 394, + 435, + 570, + 569, + 568, + 567, + 450, + 439, + 448, + 458, + 566, + 462, + 565, + 466, + 564, + 464, + 468, + 469, + 563, + 476, + 561, + 471, + 479, + 490, + 474, + 494, + 560, + 482, + 559, + 498, + 557, + 496, + 551, + 484, + 510, + 546, + 512, + 500, + 502, + + 503, + 519, + 520, + 522, + 544, + 538, + 477, + 456, + 438, + 530, + 405, + 355, + 260, + 255, + 537, + 540, + 251, + 527, + 210, + 185, + 132, + 127, + 126, + 549, + 541, + 124, + 120, + 88, + 625, + 599, + 601, + 603, + 90, + 79}; + +static const flex_int16_t yy_def[235] = {0, + 229, + 1, + 230, + 230, + 229, + 229, + 229, + 229, + 229, + 231, + 232, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 229, + 229, + 231, + 229, + 232, + 229, + 229, + 229, + 229, + 229, + 229, + 234, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 229, + 233, + 233, + 233, + + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 233, + 0, + 229, + 229, + 229, + 229, + 229}; + +static const flex_int16_t yy_nxt[696] = {0, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 35, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 51, + 56, + 52, + 53, + 54, + 56, + 56, + 56, + 56, + 56, + 56, + 62, + 66, + 51, + 60, + 52, + 67, + 56, + 63, + 58, + 56, + 57, + 74, + 56, + 59, + 64, + 75, + 56, + 65, + 68, + + 99, + 73, + 56, + 56, + 61, + 56, + 69, + 62, + 66, + 78, + 60, + 98, + 67, + 70, + 63, + 58, + 71, + 56, + 74, + 72, + 59, + 64, + 75, + 76, + 65, + 68, + 99, + 73, + 77, + 56, + 61, + 56, + 69, + 56, + 56, + 78, + 85, + 98, + 56, + 70, + 56, + 56, + 71, + 56, + 79, + 72, + 56, + 83, + 56, + 76, + 80, + 84, + 81, + 90, + 77, + 56, + 56, + 91, + 82, + 56, + 56, + 92, + 85, + 93, + 94, + 86, + 56, + 96, + 87, + 56, + 79, + 100, + 95, + 83, + 102, + 56, + 80, + 84, + 81, + 90, + 88, + 56, + 101, + 91, + 82, + 89, + 56, + 92, + 56, + 93, + 94, + 86, + 103, + 96, + 87, + 104, + 56, + 100, + 95, + 56, + + 102, + 56, + 56, + 56, + 56, + 105, + 88, + 108, + 101, + 56, + 56, + 89, + 106, + 56, + 56, + 109, + 56, + 56, + 103, + 107, + 111, + 104, + 110, + 113, + 56, + 112, + 56, + 122, + 114, + 116, + 56, + 105, + 123, + 108, + 56, + 124, + 115, + 56, + 106, + 56, + 125, + 109, + 126, + 56, + 56, + 107, + 111, + 56, + 110, + 113, + 128, + 112, + 127, + 122, + 114, + 116, + 131, + 133, + 123, + 129, + 56, + 124, + 115, + 56, + 56, + 56, + 125, + 130, + 126, + 56, + 134, + 117, + 56, + 118, + 56, + 135, + 128, + 56, + 127, + 132, + 137, + 119, + 131, + 133, + 56, + 129, + 120, + 121, + 56, + 56, + 136, + 56, + 56, + 130, + 56, + 142, + 134, + 117, + 139, + 118, + + 138, + 135, + 56, + 140, + 141, + 132, + 137, + 119, + 56, + 56, + 56, + 56, + 120, + 121, + 143, + 145, + 136, + 148, + 56, + 144, + 56, + 142, + 56, + 146, + 139, + 56, + 138, + 147, + 56, + 140, + 141, + 150, + 149, + 56, + 157, + 56, + 153, + 56, + 154, + 155, + 143, + 145, + 56, + 148, + 56, + 144, + 56, + 56, + 158, + 146, + 56, + 151, + 152, + 147, + 156, + 161, + 160, + 150, + 149, + 162, + 157, + 56, + 153, + 164, + 154, + 155, + 159, + 56, + 56, + 56, + 163, + 56, + 56, + 56, + 158, + 56, + 166, + 151, + 152, + 167, + 156, + 161, + 160, + 56, + 169, + 162, + 165, + 56, + 168, + 164, + 56, + 56, + 159, + 56, + 174, + 173, + 163, + 56, + 56, + 170, + + 171, + 56, + 166, + 56, + 56, + 167, + 178, + 56, + 56, + 175, + 169, + 56, + 165, + 56, + 168, + 56, + 56, + 172, + 177, + 56, + 174, + 173, + 176, + 56, + 183, + 170, + 171, + 56, + 179, + 181, + 194, + 180, + 178, + 182, + 56, + 175, + 56, + 184, + 56, + 187, + 185, + 189, + 56, + 172, + 177, + 56, + 56, + 186, + 176, + 56, + 183, + 188, + 56, + 56, + 179, + 181, + 194, + 180, + 190, + 182, + 191, + 193, + 56, + 184, + 56, + 187, + 185, + 189, + 198, + 196, + 56, + 195, + 56, + 186, + 192, + 197, + 56, + 188, + 56, + 199, + 56, + 200, + 56, + 56, + 190, + 56, + 191, + 193, + 56, + 201, + 56, + 56, + 204, + 56, + 198, + 196, + 56, + 195, + 56, + 205, + + 192, + 197, + 207, + 202, + 56, + 199, + 203, + 200, + 56, + 206, + 56, + 209, + 56, + 208, + 56, + 201, + 56, + 56, + 204, + 213, + 211, + 210, + 214, + 212, + 56, + 205, + 56, + 218, + 207, + 202, + 215, + 216, + 203, + 56, + 56, + 206, + 56, + 209, + 217, + 208, + 219, + 56, + 220, + 221, + 56, + 213, + 211, + 210, + 214, + 212, + 226, + 56, + 56, + 218, + 56, + 56, + 215, + 216, + 56, + 222, + 56, + 225, + 223, + 56, + 217, + 56, + 219, + 224, + 220, + 221, + 228, + 56, + 227, + 56, + 56, + 56, + 226, + 56, + 56, + 56, + 56, + 56, + 56, + 56, + 56, + 222, + 56, + 225, + 223, + 56, + 56, + 56, + 56, + 224, + 56, + 56, + 228, + 56, + 227, + 45, + + 45, + 47, + 47, + 49, + 49, + 56, + 56, + 56, + 56, + 56, + 97, + 56, + 56, + 56, + 56, + 97, + 50, + 48, + 56, + 55, + 50, + 48, + 46, + 229, + 5, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229 + +}; + +static const flex_int16_t yy_chk[696] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 20, + 25, + 20, + 22, + 22, + 26, + 27, + 28, + 29, + 31, + 234, + 27, + 28, + 52, + 26, + 52, + 28, + 32, + 27, + 25, + 34, + 233, + 32, + 59, + 25, + 27, + 32, + 30, + 27, + 28, + + 59, + 31, + 228, + 58, + 26, + 33, + 29, + 27, + 28, + 34, + 26, + 58, + 28, + 30, + 27, + 25, + 30, + 39, + 32, + 30, + 25, + 27, + 32, + 33, + 27, + 28, + 59, + 31, + 33, + 38, + 26, + 36, + 29, + 37, + 227, + 34, + 39, + 58, + 226, + 30, + 223, + 222, + 30, + 42, + 36, + 30, + 221, + 38, + 41, + 33, + 36, + 38, + 37, + 41, + 33, + 44, + 40, + 41, + 37, + 43, + 60, + 42, + 39, + 42, + 43, + 40, + 62, + 44, + 40, + 63, + 36, + 60, + 43, + 38, + 63, + 64, + 36, + 38, + 37, + 41, + 40, + 66, + 62, + 41, + 37, + 40, + 65, + 42, + 68, + 42, + 43, + 40, + 64, + 44, + 40, + 65, + 67, + 60, + 43, + 220, + + 63, + 70, + 69, + 71, + 72, + 66, + 40, + 68, + 62, + 73, + 74, + 40, + 67, + 75, + 78, + 69, + 81, + 79, + 64, + 67, + 70, + 65, + 69, + 72, + 219, + 71, + 82, + 78, + 73, + 75, + 80, + 66, + 79, + 68, + 85, + 80, + 74, + 87, + 67, + 89, + 81, + 69, + 82, + 86, + 84, + 67, + 70, + 91, + 69, + 72, + 85, + 71, + 84, + 78, + 73, + 75, + 87, + 89, + 79, + 86, + 88, + 80, + 74, + 76, + 90, + 217, + 81, + 86, + 82, + 214, + 90, + 76, + 93, + 76, + 213, + 91, + 85, + 92, + 84, + 88, + 93, + 76, + 87, + 89, + 94, + 86, + 76, + 76, + 101, + 95, + 92, + 100, + 102, + 86, + 96, + 101, + 90, + 76, + 95, + 76, + + 94, + 91, + 103, + 96, + 100, + 88, + 93, + 76, + 106, + 114, + 104, + 108, + 76, + 76, + 102, + 104, + 92, + 106, + 105, + 103, + 110, + 101, + 112, + 105, + 95, + 107, + 94, + 105, + 109, + 96, + 100, + 108, + 107, + 111, + 114, + 115, + 110, + 113, + 111, + 112, + 102, + 104, + 118, + 106, + 121, + 103, + 116, + 117, + 115, + 105, + 119, + 109, + 109, + 105, + 113, + 118, + 117, + 108, + 107, + 119, + 114, + 120, + 110, + 121, + 111, + 112, + 116, + 123, + 122, + 212, + 120, + 124, + 126, + 132, + 115, + 127, + 123, + 109, + 109, + 124, + 113, + 118, + 117, + 128, + 127, + 119, + 122, + 133, + 126, + 121, + 131, + 129, + 116, + 134, + 133, + 132, + 120, + 136, + 135, + 128, + + 129, + 137, + 123, + 138, + 139, + 124, + 137, + 140, + 162, + 134, + 127, + 144, + 122, + 145, + 126, + 141, + 148, + 131, + 136, + 211, + 133, + 132, + 135, + 151, + 144, + 128, + 129, + 154, + 138, + 140, + 162, + 139, + 137, + 141, + 153, + 134, + 155, + 145, + 157, + 153, + 148, + 155, + 158, + 131, + 136, + 161, + 160, + 151, + 135, + 163, + 144, + 154, + 209, + 169, + 138, + 140, + 162, + 139, + 157, + 141, + 158, + 161, + 170, + 145, + 168, + 153, + 148, + 155, + 170, + 168, + 208, + 163, + 171, + 151, + 160, + 169, + 173, + 154, + 177, + 171, + 175, + 173, + 178, + 179, + 157, + 183, + 158, + 161, + 186, + 175, + 181, + 207, + 179, + 184, + 170, + 168, + 189, + 163, + 195, + 181, + + 160, + 169, + 184, + 177, + 185, + 171, + 178, + 173, + 187, + 183, + 193, + 186, + 191, + 185, + 199, + 175, + 200, + 201, + 179, + 193, + 189, + 187, + 195, + 191, + 196, + 181, + 198, + 200, + 184, + 177, + 196, + 198, + 178, + 202, + 203, + 183, + 204, + 186, + 199, + 185, + 201, + 218, + 202, + 203, + 210, + 193, + 189, + 187, + 195, + 191, + 218, + 215, + 206, + 200, + 216, + 225, + 196, + 198, + 205, + 204, + 197, + 216, + 210, + 224, + 199, + 194, + 201, + 215, + 202, + 203, + 225, + 192, + 224, + 190, + 188, + 182, + 218, + 180, + 176, + 174, + 172, + 167, + 166, + 165, + 164, + 204, + 159, + 216, + 210, + 156, + 152, + 150, + 149, + 215, + 147, + 146, + 225, + 143, + 224, + 230, + + 230, + 231, + 231, + 232, + 232, + 142, + 130, + 125, + 99, + 98, + 97, + 83, + 77, + 61, + 57, + 51, + 49, + 47, + 35, + 24, + 11, + 10, + 9, + 5, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229, + 229 + +}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -699,8 +2846,8 @@ static const flex_int16_t yy_chk[696] = #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -714,13 +2861,15 @@ static const flex_int16_t yy_chk[696] = #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#define RETURN_TOKEN(token) \ + LOG_DEBUG("%s", #token); \ + return token #line 724 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -749,124 +2898,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t - { +{ + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char *yy_last_accepting_cpos; - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; + int yylineno_r; + int yy_flex_debug_r; - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; + char *yytext_r; + int yy_more_flag; + int yy_more_len; - int yylineno_r; - int yy_flex_debug_r; + YYSTYPE *yylval_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + YYLTYPE *yylloc_r; - YYSTYPE * yylval_r; +}; /* end struct yyguts_t */ - YYLTYPE * yylloc_r; +static int yy_init_globals(yyscan_t yyscanner); - }; /* end struct yyguts_t */ +/* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ +#define yylval yyg->yylval_r -static int yy_init_globals ( yyscan_t yyscanner ); +#define yylloc yyg->yylloc_r - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); +static int yyinput(yyscan_t yyscanner); #else -static int input ( yyscan_t yyscanner ); +static int input(yyscan_t yyscanner); #endif #endif @@ -886,42 +3035,38 @@ static int input ( yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO \ + do { \ + if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ + } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ +#define YY_INPUT(buf, result, max_size) \ + if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ + int c = '*'; \ + yy_size_t n; \ + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ + buf[n] = (char)c; \ + if (c == '\n') \ + buf[n++] = (char)c; \ + if (c == EOF && ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + result = n; \ + } else { \ + errno = 0; \ + while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ + if (errno != EINTR) { \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + break; \ + } \ + errno = 0; \ + clearerr(yyin); \ + } \ + } #endif @@ -940,7 +3085,7 @@ static int input ( yyscan_t yyscanner ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -951,11 +3096,9 @@ static int input ( yyscan_t yyscanner ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -967,634 +3110,546 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK /*LINTED*/ break; #endif -#define YY_RULE_SETUP \ - YY_USER_ACTION +#define YY_RULE_SETUP YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; + if (!yyg->yy_init) { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ + if (!yyg->yy_start) + yyg->yy_start = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if (!yyin) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if (!yyout) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_load_buffer_state( yyscanner ); - } + yy_load_buffer_state(yyscanner); + } - { + { #line 75 "lex_sql.l" - #line 1019 "lex_sql.cpp" - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 230 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 625 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP + while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_match: + do { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 230) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } while (yy_base[yy_current_state] != 625); + + yy_find_action: + yy_act = yy_accept[yy_current_state]; + if (yy_act == 0) { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + do_action: /* This label is used only to access EOF actions. */ + + switch (yy_act) { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + + case 1: YY_RULE_SETUP #line 77 "lex_sql.l" -// ignore whitespace - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP + // ignore whitespace + YY_BREAK + case 2: + /* rule 2 can match eol */ + YY_RULE_SETUP #line 78 "lex_sql.l" -; - YY_BREAK -case 3: -YY_RULE_SETUP + ; + YY_BREAK + case 3: YY_RULE_SETUP #line 80 "lex_sql.l" -yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); - YY_BREAK -case 4: -YY_RULE_SETUP + yylval->number = atoi(yytext); + RETURN_TOKEN(NUMBER); + YY_BREAK + case 4: YY_RULE_SETUP #line 81 "lex_sql.l" -yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); - YY_BREAK -case 5: -YY_RULE_SETUP + yylval->floats = (float)(atof(yytext)); + RETURN_TOKEN(FLOAT); + YY_BREAK + case 5: YY_RULE_SETUP #line 83 "lex_sql.l" -RETURN_TOKEN(SEMICOLON); - YY_BREAK -case 6: -YY_RULE_SETUP + RETURN_TOKEN(SEMICOLON); + YY_BREAK + case 6: YY_RULE_SETUP #line 84 "lex_sql.l" -RETURN_TOKEN(DOT); - YY_BREAK -case 7: -YY_RULE_SETUP + RETURN_TOKEN(DOT); + YY_BREAK + case 7: YY_RULE_SETUP #line 85 "lex_sql.l" -RETURN_TOKEN(EXIT); - YY_BREAK -case 8: -YY_RULE_SETUP + RETURN_TOKEN(EXIT); + YY_BREAK + case 8: YY_RULE_SETUP #line 86 "lex_sql.l" -RETURN_TOKEN(HELP); - YY_BREAK -case 9: -YY_RULE_SETUP + RETURN_TOKEN(HELP); + YY_BREAK + case 9: YY_RULE_SETUP #line 87 "lex_sql.l" -RETURN_TOKEN(DESC); - YY_BREAK -case 10: -YY_RULE_SETUP + RETURN_TOKEN(DESC); + YY_BREAK + case 10: YY_RULE_SETUP #line 88 "lex_sql.l" -RETURN_TOKEN(CREATE); - YY_BREAK -case 11: -YY_RULE_SETUP + RETURN_TOKEN(CREATE); + YY_BREAK + case 11: YY_RULE_SETUP #line 89 "lex_sql.l" -RETURN_TOKEN(DROP); - YY_BREAK -case 12: -YY_RULE_SETUP + RETURN_TOKEN(DROP); + YY_BREAK + case 12: YY_RULE_SETUP #line 90 "lex_sql.l" -RETURN_TOKEN(TABLE); - YY_BREAK -case 13: -YY_RULE_SETUP + RETURN_TOKEN(TABLE); + YY_BREAK + case 13: YY_RULE_SETUP #line 91 "lex_sql.l" -RETURN_TOKEN(TABLES); - YY_BREAK -case 14: -YY_RULE_SETUP + RETURN_TOKEN(TABLES); + YY_BREAK + case 14: YY_RULE_SETUP #line 92 "lex_sql.l" -RETURN_TOKEN(INDEX); - YY_BREAK -case 15: -YY_RULE_SETUP + RETURN_TOKEN(INDEX); + YY_BREAK + case 15: YY_RULE_SETUP #line 93 "lex_sql.l" -RETURN_TOKEN(ON); - YY_BREAK -case 16: -YY_RULE_SETUP + RETURN_TOKEN(ON); + YY_BREAK + case 16: YY_RULE_SETUP #line 94 "lex_sql.l" -RETURN_TOKEN(SHOW); - YY_BREAK -case 17: -YY_RULE_SETUP + RETURN_TOKEN(SHOW); + YY_BREAK + case 17: YY_RULE_SETUP #line 95 "lex_sql.l" -RETURN_TOKEN(SYNC); - YY_BREAK -case 18: -YY_RULE_SETUP + RETURN_TOKEN(SYNC); + YY_BREAK + case 18: YY_RULE_SETUP #line 96 "lex_sql.l" -RETURN_TOKEN(SELECT); - YY_BREAK -case 19: -YY_RULE_SETUP + RETURN_TOKEN(SELECT); + YY_BREAK + case 19: YY_RULE_SETUP #line 97 "lex_sql.l" -RETURN_TOKEN(CALC); - YY_BREAK -case 20: -YY_RULE_SETUP + RETURN_TOKEN(CALC); + YY_BREAK + case 20: YY_RULE_SETUP #line 98 "lex_sql.l" -RETURN_TOKEN(FROM); - YY_BREAK -case 21: -YY_RULE_SETUP + RETURN_TOKEN(FROM); + YY_BREAK + case 21: YY_RULE_SETUP #line 99 "lex_sql.l" -RETURN_TOKEN(WHERE); - YY_BREAK -case 22: -YY_RULE_SETUP + RETURN_TOKEN(WHERE); + YY_BREAK + case 22: YY_RULE_SETUP #line 100 "lex_sql.l" -RETURN_TOKEN(AND); - YY_BREAK -case 23: -YY_RULE_SETUP + RETURN_TOKEN(AND); + YY_BREAK + case 23: YY_RULE_SETUP #line 101 "lex_sql.l" -RETURN_TOKEN(OR); - YY_BREAK -case 24: -YY_RULE_SETUP + RETURN_TOKEN(OR); + YY_BREAK + case 24: YY_RULE_SETUP #line 102 "lex_sql.l" -RETURN_TOKEN(INSERT); - YY_BREAK -case 25: -YY_RULE_SETUP + RETURN_TOKEN(INSERT); + YY_BREAK + case 25: YY_RULE_SETUP #line 103 "lex_sql.l" -RETURN_TOKEN(INTO); - YY_BREAK -case 26: -YY_RULE_SETUP + RETURN_TOKEN(INTO); + YY_BREAK + case 26: YY_RULE_SETUP #line 104 "lex_sql.l" -RETURN_TOKEN(VALUES); - YY_BREAK -case 27: -YY_RULE_SETUP + RETURN_TOKEN(VALUES); + YY_BREAK + case 27: YY_RULE_SETUP #line 105 "lex_sql.l" -RETURN_TOKEN(DELETE); - YY_BREAK -case 28: -YY_RULE_SETUP + RETURN_TOKEN(DELETE); + YY_BREAK + case 28: YY_RULE_SETUP #line 106 "lex_sql.l" -RETURN_TOKEN(UPDATE); - YY_BREAK -case 29: -YY_RULE_SETUP + RETURN_TOKEN(UPDATE); + YY_BREAK + case 29: YY_RULE_SETUP #line 107 "lex_sql.l" -RETURN_TOKEN(SET); - YY_BREAK -case 30: -YY_RULE_SETUP + RETURN_TOKEN(SET); + YY_BREAK + case 30: YY_RULE_SETUP #line 108 "lex_sql.l" -RETURN_TOKEN(TRX_BEGIN); - YY_BREAK -case 31: -YY_RULE_SETUP + RETURN_TOKEN(TRX_BEGIN); + YY_BREAK + case 31: YY_RULE_SETUP #line 109 "lex_sql.l" -RETURN_TOKEN(TRX_COMMIT); - YY_BREAK -case 32: -YY_RULE_SETUP + RETURN_TOKEN(TRX_COMMIT); + YY_BREAK + case 32: YY_RULE_SETUP #line 110 "lex_sql.l" -RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK -case 33: -YY_RULE_SETUP + RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK + case 33: YY_RULE_SETUP #line 111 "lex_sql.l" -RETURN_TOKEN(INT_T); - YY_BREAK -case 34: -YY_RULE_SETUP + RETURN_TOKEN(INT_T); + YY_BREAK + case 34: YY_RULE_SETUP #line 112 "lex_sql.l" -RETURN_TOKEN(STRING_T); - YY_BREAK -case 35: -YY_RULE_SETUP + RETURN_TOKEN(STRING_T); + YY_BREAK + case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(FLOAT_T); - YY_BREAK -case 36: -YY_RULE_SETUP + RETURN_TOKEN(FLOAT_T); + YY_BREAK + case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK -case 37: -YY_RULE_SETUP + RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK + case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token - YY_BREAK -case 38: -YY_RULE_SETUP + RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + YY_BREAK + case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(UNIQUE); - YY_BREAK -case 39: -YY_RULE_SETUP + RETURN_TOKEN(UNIQUE); + YY_BREAK + case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(NULL_T); - YY_BREAK -case 40: -YY_RULE_SETUP + RETURN_TOKEN(NULL_T); + YY_BREAK + case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(NULLABLE); - YY_BREAK -case 41: -YY_RULE_SETUP + RETURN_TOKEN(NULLABLE); + YY_BREAK + case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(LOAD); - YY_BREAK -case 42: -YY_RULE_SETUP + RETURN_TOKEN(LOAD); + YY_BREAK + case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(DATA); - YY_BREAK -case 43: -YY_RULE_SETUP + RETURN_TOKEN(DATA); + YY_BREAK + case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(INFILE); - YY_BREAK -case 44: -YY_RULE_SETUP + RETURN_TOKEN(INFILE); + YY_BREAK + case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); - YY_BREAK -case 45: -YY_RULE_SETUP + RETURN_TOKEN(EXPLAIN); + YY_BREAK + case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(GROUP); - YY_BREAK -case 46: -YY_RULE_SETUP + RETURN_TOKEN(GROUP); + YY_BREAK + case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(HAVING); - YY_BREAK -case 47: -YY_RULE_SETUP + RETURN_TOKEN(HAVING); + YY_BREAK + case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(ORDER); - YY_BREAK -case 48: -YY_RULE_SETUP + RETURN_TOKEN(ORDER); + YY_BREAK + case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(BY); - YY_BREAK -case 49: -YY_RULE_SETUP + RETURN_TOKEN(BY); + YY_BREAK + case 49: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(AS); - YY_BREAK -case 50: -YY_RULE_SETUP + RETURN_TOKEN(AS); + YY_BREAK + case 50: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(ASC); - YY_BREAK -case 51: -YY_RULE_SETUP + RETURN_TOKEN(ASC); + YY_BREAK + case 51: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(IN); - YY_BREAK -case 52: -YY_RULE_SETUP + RETURN_TOKEN(IN); + YY_BREAK + case 52: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(EXISTS); - YY_BREAK -case 53: -YY_RULE_SETUP + RETURN_TOKEN(EXISTS); + YY_BREAK + case 53: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(STORAGE); - YY_BREAK -case 54: -YY_RULE_SETUP + RETURN_TOKEN(STORAGE); + YY_BREAK + case 54: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(FORMAT); - YY_BREAK -case 55: -YY_RULE_SETUP + RETURN_TOKEN(FORMAT); + YY_BREAK + case 55: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(INNER); - YY_BREAK -case 56: -YY_RULE_SETUP + RETURN_TOKEN(INNER); + YY_BREAK + case 56: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(JOIN); - YY_BREAK -case 57: -YY_RULE_SETUP + RETURN_TOKEN(JOIN); + YY_BREAK + case 57: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(VIEW); - YY_BREAK -case 58: -YY_RULE_SETUP + RETURN_TOKEN(VIEW); + YY_BREAK + case 58: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(LBRACE); - YY_BREAK -case 59: -YY_RULE_SETUP + RETURN_TOKEN(LBRACE); + YY_BREAK + case 59: YY_RULE_SETUP #line 137 "lex_sql.l" -RETURN_TOKEN(RBRACE); - YY_BREAK -case 60: -YY_RULE_SETUP + RETURN_TOKEN(RBRACE); + YY_BREAK + case 60: YY_RULE_SETUP #line 139 "lex_sql.l" -RETURN_TOKEN(COMMA); - YY_BREAK -case 61: -YY_RULE_SETUP + RETURN_TOKEN(COMMA); + YY_BREAK + case 61: YY_RULE_SETUP #line 140 "lex_sql.l" -RETURN_TOKEN(EQ); - YY_BREAK -case 62: -YY_RULE_SETUP + RETURN_TOKEN(EQ); + YY_BREAK + case 62: YY_RULE_SETUP #line 141 "lex_sql.l" -RETURN_TOKEN(LE); - YY_BREAK -case 63: -YY_RULE_SETUP + RETURN_TOKEN(LE); + YY_BREAK + case 63: YY_RULE_SETUP #line 142 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 64: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 64: YY_RULE_SETUP #line 143 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 65: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 65: YY_RULE_SETUP #line 144 "lex_sql.l" -RETURN_TOKEN(LT); - YY_BREAK -case 66: -YY_RULE_SETUP + RETURN_TOKEN(LT); + YY_BREAK + case 66: YY_RULE_SETUP #line 145 "lex_sql.l" -RETURN_TOKEN(GE); - YY_BREAK -case 67: -YY_RULE_SETUP + RETURN_TOKEN(GE); + YY_BREAK + case 67: YY_RULE_SETUP #line 146 "lex_sql.l" -RETURN_TOKEN(GT); - YY_BREAK -case 68: -YY_RULE_SETUP + RETURN_TOKEN(GT); + YY_BREAK + case 68: YY_RULE_SETUP #line 147 "lex_sql.l" -RETURN_TOKEN(NOT); - YY_BREAK -case 69: -YY_RULE_SETUP + RETURN_TOKEN(NOT); + YY_BREAK + case 69: YY_RULE_SETUP #line 148 "lex_sql.l" -RETURN_TOKEN(IS); - YY_BREAK -case 70: -YY_RULE_SETUP + RETURN_TOKEN(IS); + YY_BREAK + case 70: YY_RULE_SETUP #line 149 "lex_sql.l" -RETURN_TOKEN(LIKE); - YY_BREAK -case 71: -YY_RULE_SETUP + RETURN_TOKEN(LIKE); + YY_BREAK + case 71: YY_RULE_SETUP #line 151 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); - YY_BREAK -case 72: + yylval->string = strdup(yytext); + RETURN_TOKEN(ID); + YY_BREAK + case 72: #line 154 "lex_sql.l" -case 73: + case 73: #line 155 "lex_sql.l" -case 74: + case 74: #line 156 "lex_sql.l" -case 75: -YY_RULE_SETUP + case 75: YY_RULE_SETUP #line 156 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK -case 76: -/* rule 76 can match eol */ -YY_RULE_SETUP + { + return yytext[0]; + } + YY_BREAK + case 76: + /* rule 76 can match eol */ + YY_RULE_SETUP #line 157 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 77: -/* rule 77 can match eol */ -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 77: + /* rule 77 can match eol */ + YY_RULE_SETUP #line 158 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 78: -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 78: YY_RULE_SETUP #line 160 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; - YY_BREAK -case 79: -YY_RULE_SETUP + LOG_DEBUG("Unknown character [%c]",yytext[0]); + return yytext[0]; + YY_BREAK + case 79: YY_RULE_SETUP #line 161 "lex_sql.l" -ECHO; - YY_BREAK + ECHO; + YY_BREAK #line 1465 "lex_sql.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STR): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap( yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(STR): yyterminate(); + + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if (yy_next_state) { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_END_OF_FILE: { + yyg->yy_did_buffer_switch_on_eof = 0; + + if (yywrap(yyscanner)) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else { + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1604,171 +3659,149 @@ case YY_STATE_EOF(STR): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (yyscan_t yyscanner) +static int yy_get_next_buffer(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) + YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); + + if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ + if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for (i = 0; i < number_to_move; ++i) + *(dest++) = *(source++); + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else { + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); + + if (b->yy_is_our_buffer) { + yy_size_t new_size = b->yy_buf_size * 2; + + if (new_size <= 0) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); + } else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if (!b->yy_ch_buf) + YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + } + + if (num_to_read > YY_READ_BUF_SIZE) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if (yyg->yy_n_chars == 0) { + if (number_to_move == YY_MORE_ADJ) { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin, yyscanner); + } + + else { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = + (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); + if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +static yy_state_type yy_get_previous_state(yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 230 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + yy_current_state = yyg->yy_start; + + for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 230) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -1776,29 +3809,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 230 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 229); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 230) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 229); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -1807,141 +3838,133 @@ static int yy_get_next_buffer (yyscan_t yyscanner) #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) +static int yyinput(yyscan_t yyscanner) #else - static int input (yyscan_t yyscanner) +static int input(yyscan_t yyscanner) #endif { - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin , yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + int c; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin, yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: { + if (yywrap(yyscanner)) + return 0; + + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; + } + } + } - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) +void yyrestart(FILE *input_file, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); + yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); + yy_load_buffer_state(yyscanner); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack(yyscanner); + if (YY_CURRENT_BUFFER == new_buffer) + return; + + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state(yyscanner); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state (yyscan_t yyscanner) +static void yy_load_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -1950,105 +3973,105 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); + if (!b->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer( b, file , yyscanner); + yy_init_buffer(b, file, yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! b ) - return; + if (!b) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); + if (b->yy_is_our_buffer) + yyfree((void *)b->yy_ch_buf, yyscanner); - yyfree( (void *) b , yyscanner ); + yyfree((void *)b, yyscanner); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + int oerrno = errno; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flush_buffer( b , yyscanner); + yy_flush_buffer(b, yyscanner); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!b) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); + if (b == YY_CURRENT_BUFFER) + yy_load_buffer_state(yyscanner); } /** Pushes the new state onto the stack. The new state becomes @@ -2057,99 +4080,95 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state (yyscan_t yyscanner) +void yypop_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (yyscan_t yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = + (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( + yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -2158,33 +4177,31 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b , yyscanner ); - - return b; + YY_BUFFER_STATE b; + + if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + + b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b, yyscanner); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -2195,10 +4212,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) { - - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + + return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2208,177 +4225,175 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n , yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t)(_yybytes_len + 2); + buf = (char *)yyalloc(n, yyscanner); + if (!buf) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + + for (i = 0; i < _yybytes_len; ++i) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf, n, yyscanner); + if (!b) + YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + fprintf(stderr, "%s\n", msg); + exit(YY_EXIT_FAILURE); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } while (0) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno (yyscan_t yyscanner) +int yyget_lineno(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (!YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column (yyscan_t yyscanner) +int yyget_column(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; + if (!YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in (yyscan_t yyscanner) +FILE *yyget_in(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out (yyscan_t yyscanner) +FILE *yyget_out(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text (yyscan_t yyscanner) +char *yyget_text(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyextra = user_defined; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) +void yyset_lineno(int _line_number, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_lineno called with no buffer"); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int _column_no , yyscan_t yyscanner) +void yyset_column(int _column_no, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_column called with no buffer"); - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); - - yycolumn = _column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -2387,80 +4402,80 @@ void yyset_column (int _column_no , yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) +void yyset_in(FILE *_in_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyin = _in_str; } -void yyset_out (FILE * _out_str , yyscan_t yyscanner) +void yyset_out(FILE *_out_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyout = _out_str; } -int yyget_debug (yyscan_t yyscanner) +int yyget_debug(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yy_flex_debug; } -void yyset_debug (int _bdebug , yyscan_t yyscanner) +void yyset_debug(int _bdebug, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_flex_debug = _bdebug; } /* Accessor methods for yylval and yylloc */ -YYSTYPE * yyget_lval (yyscan_t yyscanner) +YYSTYPE *yyget_lval(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylval; } -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc (yyscan_t yyscanner) +YYLTYPE *yyget_lloc(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylloc; } - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t* ptr_yy_globals) +int yylex_init(yyscan_t *ptr_yy_globals) { - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -2470,94 +4485,94 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra (yy_user_defined, &dummy_yyguts); + yyset_extra(yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - yyset_extra (yy_user_defined, *ptr_yy_globals); + yyset_extra(yy_user_defined, *ptr_yy_globals); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } -static int yy_init_globals (yyscan_t yyscanner) +static int yy_init_globals(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) +int yylex_destroy(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while (YY_CURRENT_BUFFER) { + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack, yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree(yyg->yy_start_stack, yyscanner); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals(yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree(yyscanner, yyscanner); + yyscanner = NULL; + return 0; } /* @@ -2565,63 +4580,59 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + int i; + for (i = 0; i < n; ++i) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +static int yy_flex_strlen(const char *s, yyscan_t yyscanner) { - int n; - for ( n = 0; s[n]; ++n ) - ; + int n; + for (n = 0; s[n]; ++n) + ; - return n; + return n; } #endif -void *yyalloc (yy_size_t size , yyscan_t yyscanner) +void *yyalloc(yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree (void * ptr , yyscan_t yyscanner) +void yyfree(void *ptr, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + free((char *)ptr); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 161 "lex_sql.l" - -void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); -} - +void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index b49ae624..356e5455 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,23 +12,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -81,62 +79,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -157,7 +155,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -197,73 +195,72 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -286,69 +283,69 @@ void yyfree ( void * , yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -376,11 +373,9 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -544,7 +539,6 @@ extern int yylex \ #line 161 "lex_sql.l" - #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 5114b41a..bff4984f 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,13 +63,9 @@ /* Pull parsers. */ #define YYPULL 1 - - - /* First part of user prologue. */ #line 2 "yacc_sql.y" - #include #include #include @@ -92,235 +88,224 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, - Expression *left, - Expression *right, - const char *sql_string, - YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression( + ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression(const char *function_name, - std::vector> child, - const char *sql_string, - YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression( + const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } -ParsedSqlNode *create_table_sql_node(char *table_name, - AttrInfoSqlNode* attr_def, - std::vector *attrinfos, - char* storage_format, - ParsedSqlNode *create_table_select) +ParsedSqlNode *create_table_sql_node(char *table_name, AttrInfoSqlNode *attr_def, + std::vector *attrinfos, char *storage_format, ParsedSqlNode *create_table_select) { - ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = parsed_sql_node->create_table; - create_table.relation_name = table_name; + ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = parsed_sql_node->create_table; + create_table.relation_name = table_name; - if (attrinfos) { - create_table.attr_infos.swap(*attrinfos); - delete attrinfos; - } - if (attr_def) { - create_table.attr_infos.emplace_back(*attr_def); - std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); - delete attr_def; - } - if (storage_format != nullptr) { - create_table.storage_format = storage_format; - free(storage_format); - } + if (attrinfos) { + create_table.attr_infos.swap(*attrinfos); + delete attrinfos; + } + if (attr_def) { + create_table.attr_infos.emplace_back(*attr_def); + std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); + delete attr_def; + } + if (storage_format != nullptr) { + create_table.storage_format = storage_format; + free(storage_format); + } - if (create_table_select) { - create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); - } + if (create_table_select) { + create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); + } - return parsed_sql_node; + return parsed_sql_node; } #line 155 "yacc_sql.cpp" -# ifndef YY_CAST -# ifdef __cplusplus -# define YY_CAST(Type, Val) static_cast (Val) -# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -# else -# define YY_CAST(Type, Val) ((Type) (Val)) -# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -# endif -# endif -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif +#ifndef YY_CAST +#ifdef __cplusplus +#define YY_CAST(Type, Val) static_cast(Val) +#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) +#else +#define YY_CAST(Type, Val) ((Type)(Val)) +#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) +#endif +#endif +#ifndef YY_NULLPTR +#if defined __cplusplus +#if 201103L <= __cplusplus +#define YY_NULLPTR nullptr +#else +#define YY_NULLPTR 0 +#endif +#else +#define YY_NULLPTR ((void *)0) +#endif +#endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_HAVING = 11, /* HAVING */ - YYSYMBOL_ORDER = 12, /* ORDER */ - YYSYMBOL_TABLE = 13, /* TABLE */ - YYSYMBOL_TABLES = 14, /* TABLES */ - YYSYMBOL_INDEX = 15, /* INDEX */ - YYSYMBOL_CALC = 16, /* CALC */ - YYSYMBOL_SELECT = 17, /* SELECT */ - YYSYMBOL_DESC = 18, /* DESC */ - YYSYMBOL_SHOW = 19, /* SHOW */ - YYSYMBOL_SYNC = 20, /* SYNC */ - YYSYMBOL_INSERT = 21, /* INSERT */ - YYSYMBOL_DELETE = 22, /* DELETE */ - YYSYMBOL_UPDATE = 23, /* UPDATE */ - YYSYMBOL_LBRACE = 24, /* LBRACE */ - YYSYMBOL_RBRACE = 25, /* RBRACE */ - YYSYMBOL_COMMA = 26, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 30, /* INT_T */ - YYSYMBOL_IN = 31, /* IN */ - YYSYMBOL_STRING_T = 32, /* STRING_T */ - YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ - YYSYMBOL_DATE_T = 34, /* DATE_T */ - YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_NOT = 36, /* NOT */ - YYSYMBOL_UNIQUE = 37, /* UNIQUE */ - YYSYMBOL_NULL_T = 38, /* NULL_T */ - YYSYMBOL_NULLABLE = 39, /* NULLABLE */ - YYSYMBOL_HELP = 40, /* HELP */ - YYSYMBOL_EXIT = 41, /* EXIT */ - YYSYMBOL_DOT = 42, /* DOT */ - YYSYMBOL_INTO = 43, /* INTO */ - YYSYMBOL_VALUES = 44, /* VALUES */ - YYSYMBOL_FROM = 45, /* FROM */ - YYSYMBOL_WHERE = 46, /* WHERE */ - YYSYMBOL_AND = 47, /* AND */ - YYSYMBOL_OR = 48, /* OR */ - YYSYMBOL_SET = 49, /* SET */ - YYSYMBOL_ON = 50, /* ON */ - YYSYMBOL_LOAD = 51, /* LOAD */ - YYSYMBOL_DATA = 52, /* DATA */ - YYSYMBOL_INFILE = 53, /* INFILE */ - YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ - YYSYMBOL_STORAGE = 55, /* STORAGE */ - YYSYMBOL_FORMAT = 56, /* FORMAT */ - YYSYMBOL_INNER = 57, /* INNER */ - YYSYMBOL_JOIN = 58, /* JOIN */ - YYSYMBOL_VIEW = 59, /* VIEW */ - YYSYMBOL_EQ = 60, /* EQ */ - YYSYMBOL_LT = 61, /* LT */ - YYSYMBOL_GT = 62, /* GT */ - YYSYMBOL_LE = 63, /* LE */ - YYSYMBOL_GE = 64, /* GE */ - YYSYMBOL_NE = 65, /* NE */ - YYSYMBOL_LIKE = 66, /* LIKE */ - YYSYMBOL_IS = 67, /* IS */ - YYSYMBOL_NUMBER = 68, /* NUMBER */ - YYSYMBOL_FLOAT = 69, /* FLOAT */ - YYSYMBOL_ID = 70, /* ID */ - YYSYMBOL_SSS = 71, /* SSS */ - YYSYMBOL_72_ = 72, /* '+' */ - YYSYMBOL_73_ = 73, /* '-' */ - YYSYMBOL_74_ = 74, /* '*' */ - YYSYMBOL_75_ = 75, /* '/' */ - YYSYMBOL_UMINUS = 76, /* UMINUS */ - YYSYMBOL_YYACCEPT = 77, /* $accept */ - YYSYMBOL_commands = 78, /* commands */ - YYSYMBOL_command_wrapper = 79, /* command_wrapper */ - YYSYMBOL_exit_stmt = 80, /* exit_stmt */ - YYSYMBOL_help_stmt = 81, /* help_stmt */ - YYSYMBOL_sync_stmt = 82, /* sync_stmt */ - YYSYMBOL_begin_stmt = 83, /* begin_stmt */ - YYSYMBOL_commit_stmt = 84, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 85, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 86, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 87, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 88, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 89, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 90, /* create_index_stmt */ - YYSYMBOL_opt_unique = 91, /* opt_unique */ - YYSYMBOL_attr_list = 92, /* attr_list */ - YYSYMBOL_drop_index_stmt = 93, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 94, /* create_table_stmt */ - YYSYMBOL_create_view_stmt = 95, /* create_view_stmt */ - YYSYMBOL_drop_view_stmt = 96, /* drop_view_stmt */ - YYSYMBOL_attr_def_list = 97, /* attr_def_list */ - YYSYMBOL_attr_def = 98, /* attr_def */ - YYSYMBOL_nullable_constraint = 99, /* nullable_constraint */ - YYSYMBOL_type = 100, /* type */ - YYSYMBOL_insert_stmt = 101, /* insert_stmt */ - YYSYMBOL_values_list = 102, /* values_list */ - YYSYMBOL_value_list = 103, /* value_list */ - YYSYMBOL_value = 104, /* value */ - YYSYMBOL_nonnegative_value = 105, /* nonnegative_value */ - YYSYMBOL_storage_format = 106, /* storage_format */ - YYSYMBOL_delete_stmt = 107, /* delete_stmt */ - YYSYMBOL_update_stmt = 108, /* update_stmt */ - YYSYMBOL_setClauses = 109, /* setClauses */ - YYSYMBOL_setClause = 110, /* setClause */ - YYSYMBOL_select_stmt = 111, /* select_stmt */ - YYSYMBOL_calc_stmt = 112, /* calc_stmt */ - YYSYMBOL_expression_list = 113, /* expression_list */ - YYSYMBOL_expression = 114, /* expression */ - YYSYMBOL_alias = 115, /* alias */ - YYSYMBOL_aggr_func_expr = 116, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 117, /* sub_query_expr */ - YYSYMBOL_rel_attr = 118, /* rel_attr */ - YYSYMBOL_relation = 119, /* relation */ - YYSYMBOL_rel_list = 120, /* rel_list */ - YYSYMBOL_joinClauses = 121, /* joinClauses */ - YYSYMBOL_where = 122, /* where */ - YYSYMBOL_condition = 123, /* condition */ - YYSYMBOL_comp_op = 124, /* comp_op */ - YYSYMBOL_opt_order_by = 125, /* opt_order_by */ - YYSYMBOL_sort_list = 126, /* sort_list */ - YYSYMBOL_sort_unit = 127, /* sort_unit */ - YYSYMBOL_group_by = 128, /* group_by */ - YYSYMBOL_opt_having = 129, /* opt_having */ - YYSYMBOL_load_data_stmt = 130, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 131, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 132, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 133 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_HAVING = 11, /* HAVING */ + YYSYMBOL_ORDER = 12, /* ORDER */ + YYSYMBOL_TABLE = 13, /* TABLE */ + YYSYMBOL_TABLES = 14, /* TABLES */ + YYSYMBOL_INDEX = 15, /* INDEX */ + YYSYMBOL_CALC = 16, /* CALC */ + YYSYMBOL_SELECT = 17, /* SELECT */ + YYSYMBOL_DESC = 18, /* DESC */ + YYSYMBOL_SHOW = 19, /* SHOW */ + YYSYMBOL_SYNC = 20, /* SYNC */ + YYSYMBOL_INSERT = 21, /* INSERT */ + YYSYMBOL_DELETE = 22, /* DELETE */ + YYSYMBOL_UPDATE = 23, /* UPDATE */ + YYSYMBOL_LBRACE = 24, /* LBRACE */ + YYSYMBOL_RBRACE = 25, /* RBRACE */ + YYSYMBOL_COMMA = 26, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 30, /* INT_T */ + YYSYMBOL_IN = 31, /* IN */ + YYSYMBOL_STRING_T = 32, /* STRING_T */ + YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ + YYSYMBOL_DATE_T = 34, /* DATE_T */ + YYSYMBOL_TEXT_T = 35, /* TEXT_T */ + YYSYMBOL_NOT = 36, /* NOT */ + YYSYMBOL_UNIQUE = 37, /* UNIQUE */ + YYSYMBOL_NULL_T = 38, /* NULL_T */ + YYSYMBOL_NULLABLE = 39, /* NULLABLE */ + YYSYMBOL_HELP = 40, /* HELP */ + YYSYMBOL_EXIT = 41, /* EXIT */ + YYSYMBOL_DOT = 42, /* DOT */ + YYSYMBOL_INTO = 43, /* INTO */ + YYSYMBOL_VALUES = 44, /* VALUES */ + YYSYMBOL_FROM = 45, /* FROM */ + YYSYMBOL_WHERE = 46, /* WHERE */ + YYSYMBOL_AND = 47, /* AND */ + YYSYMBOL_OR = 48, /* OR */ + YYSYMBOL_SET = 49, /* SET */ + YYSYMBOL_ON = 50, /* ON */ + YYSYMBOL_LOAD = 51, /* LOAD */ + YYSYMBOL_DATA = 52, /* DATA */ + YYSYMBOL_INFILE = 53, /* INFILE */ + YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ + YYSYMBOL_STORAGE = 55, /* STORAGE */ + YYSYMBOL_FORMAT = 56, /* FORMAT */ + YYSYMBOL_INNER = 57, /* INNER */ + YYSYMBOL_JOIN = 58, /* JOIN */ + YYSYMBOL_VIEW = 59, /* VIEW */ + YYSYMBOL_EQ = 60, /* EQ */ + YYSYMBOL_LT = 61, /* LT */ + YYSYMBOL_GT = 62, /* GT */ + YYSYMBOL_LE = 63, /* LE */ + YYSYMBOL_GE = 64, /* GE */ + YYSYMBOL_NE = 65, /* NE */ + YYSYMBOL_LIKE = 66, /* LIKE */ + YYSYMBOL_IS = 67, /* IS */ + YYSYMBOL_NUMBER = 68, /* NUMBER */ + YYSYMBOL_FLOAT = 69, /* FLOAT */ + YYSYMBOL_ID = 70, /* ID */ + YYSYMBOL_SSS = 71, /* SSS */ + YYSYMBOL_72_ = 72, /* '+' */ + YYSYMBOL_73_ = 73, /* '-' */ + YYSYMBOL_74_ = 74, /* '*' */ + YYSYMBOL_75_ = 75, /* '/' */ + YYSYMBOL_UMINUS = 76, /* UMINUS */ + YYSYMBOL_YYACCEPT = 77, /* $accept */ + YYSYMBOL_commands = 78, /* commands */ + YYSYMBOL_command_wrapper = 79, /* command_wrapper */ + YYSYMBOL_exit_stmt = 80, /* exit_stmt */ + YYSYMBOL_help_stmt = 81, /* help_stmt */ + YYSYMBOL_sync_stmt = 82, /* sync_stmt */ + YYSYMBOL_begin_stmt = 83, /* begin_stmt */ + YYSYMBOL_commit_stmt = 84, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 85, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 86, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 87, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 88, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 89, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 90, /* create_index_stmt */ + YYSYMBOL_opt_unique = 91, /* opt_unique */ + YYSYMBOL_attr_list = 92, /* attr_list */ + YYSYMBOL_drop_index_stmt = 93, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 94, /* create_table_stmt */ + YYSYMBOL_create_view_stmt = 95, /* create_view_stmt */ + YYSYMBOL_drop_view_stmt = 96, /* drop_view_stmt */ + YYSYMBOL_attr_def_list = 97, /* attr_def_list */ + YYSYMBOL_attr_def = 98, /* attr_def */ + YYSYMBOL_nullable_constraint = 99, /* nullable_constraint */ + YYSYMBOL_type = 100, /* type */ + YYSYMBOL_insert_stmt = 101, /* insert_stmt */ + YYSYMBOL_values_list = 102, /* values_list */ + YYSYMBOL_value_list = 103, /* value_list */ + YYSYMBOL_value = 104, /* value */ + YYSYMBOL_nonnegative_value = 105, /* nonnegative_value */ + YYSYMBOL_storage_format = 106, /* storage_format */ + YYSYMBOL_delete_stmt = 107, /* delete_stmt */ + YYSYMBOL_update_stmt = 108, /* update_stmt */ + YYSYMBOL_setClauses = 109, /* setClauses */ + YYSYMBOL_setClause = 110, /* setClause */ + YYSYMBOL_select_stmt = 111, /* select_stmt */ + YYSYMBOL_calc_stmt = 112, /* calc_stmt */ + YYSYMBOL_expression_list = 113, /* expression_list */ + YYSYMBOL_expression = 114, /* expression */ + YYSYMBOL_alias = 115, /* alias */ + YYSYMBOL_aggr_func_expr = 116, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 117, /* sub_query_expr */ + YYSYMBOL_rel_attr = 118, /* rel_attr */ + YYSYMBOL_relation = 119, /* relation */ + YYSYMBOL_rel_list = 120, /* rel_list */ + YYSYMBOL_joinClauses = 121, /* joinClauses */ + YYSYMBOL_where = 122, /* where */ + YYSYMBOL_condition = 123, /* condition */ + YYSYMBOL_comp_op = 124, /* comp_op */ + YYSYMBOL_opt_order_by = 125, /* opt_order_by */ + YYSYMBOL_sort_list = 126, /* sort_list */ + YYSYMBOL_sort_unit = 127, /* sort_unit */ + YYSYMBOL_group_by = 128, /* group_by */ + YYSYMBOL_opt_having = 129, /* opt_having */ + YYSYMBOL_load_data_stmt = 130, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 131, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 132, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 133 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; - - - #ifdef short -# undef short +#undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -328,11 +313,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -# include /* INFRINGES ON USER NAME SPACE */ -# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_STDINT_H -# endif +#include /* INFRINGES ON USER NAME SPACE */ +#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_STDINT_H +#endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -362,16 +347,15 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 +#undef UINT_LEAST8_MAX +#undef UINT_LEAST16_MAX +#define UINT_LEAST8_MAX 255 +#define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -381,8 +365,7 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -391,42 +374,38 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -# define YYPTRDIFF_T __PTRDIFF_TYPE__ -# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -# elif defined PTRDIFF_MAX -# ifndef ptrdiff_t -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYPTRDIFF_T ptrdiff_t -# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -# else -# define YYPTRDIFF_T long -# define YYPTRDIFF_MAXIMUM LONG_MAX -# endif +#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +#define YYPTRDIFF_T __PTRDIFF_TYPE__ +#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +#elif defined PTRDIFF_MAX +#ifndef ptrdiff_t +#include /* INFRINGES ON USER NAME SPACE */ +#endif +#define YYPTRDIFF_T ptrdiff_t +#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +#else +#define YYPTRDIFF_T long +#define YYPTRDIFF_MAXIMUM LONG_MAX +#endif #endif #ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned -# endif +#ifdef __SIZE_TYPE__ +#define YYSIZE_T __SIZE_TYPE__ +#elif defined size_t +#define YYSIZE_T size_t +#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YYSIZE_T size_t +#else +#define YYSIZE_T unsigned +#endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST (YYPTRDIFF_T, \ - (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ - ? YYPTRDIFF_MAXIMUM \ - : YY_CAST (YYSIZE_T, -1))) - -#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) +#define YYSIZE_MAXIMUM \ + YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_int16 yy_state_t; @@ -435,606 +414,2649 @@ typedef yytype_int16 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif +#if defined YYENABLE_NLS && YYENABLE_NLS +#if ENABLE_NLS +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_(Msgid) dgettext("bison-runtime", Msgid) +#endif +#endif +#ifndef YY_ +#define YY_(Msgid) Msgid +#endif #endif - #ifndef YY_ATTRIBUTE_PURE -# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define YY_ATTRIBUTE_PURE -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) +#else +#define YY_ATTRIBUTE_PURE +#endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -# else -# define YY_ATTRIBUTE_UNUSED -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#else +#define YY_ATTRIBUTE_UNUSED +#endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +#if !defined lint || defined __GNUC__ +#define YY_USE(E) ((void)(E)) #else -# define YY_USE(E) /* empty */ +#define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") +#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") #else -# define YY_INITIAL_VALUE(Value) Value +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +#endif +#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") +#else +#define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +#define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -# define YY_IGNORE_USELESS_CAST_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -# define YY_IGNORE_USELESS_CAST_END \ - _Pragma ("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ +#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") +#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_END +#define YY_IGNORE_USELESS_CAST_BEGIN +#define YY_IGNORE_USELESS_CAST_END #endif - -#define YY_ASSERT(E) ((void) (0 && (E))) +#define YY_ASSERT(E) ((void)(0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif +#ifdef YYSTACK_USE_ALLOCA +#if YYSTACK_USE_ALLOCA +#ifdef __GNUC__ +#define YYSTACK_ALLOC __builtin_alloca +#elif defined __BUILTIN_VA_ARG_INCR +#include /* INFRINGES ON USER NAME SPACE */ +#elif defined _AIX +#define YYSTACK_ALLOC __alloca +#elif defined _MSC_VER +#include /* INFRINGES ON USER NAME SPACE */ +#define alloca _alloca +#else +#define YYSTACK_ALLOC alloca +#if !defined _ALLOCA_H && !defined EXIT_SUCCESS +#include /* INFRINGES ON USER NAME SPACE */ +/* Use EXIT_SUCCESS as a witness for stdlib.h. */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#endif +#endif +#endif + +#ifdef YYSTACK_ALLOC +/* Pacify GCC's 'empty if-body' warning. */ +#define YYSTACK_FREE(Ptr) \ + do { /* empty */ \ + ; \ + } while (0) +#ifndef YYSTACK_ALLOC_MAXIMUM +/* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +#endif +#else +#define YYSTACK_ALLOC YYMALLOC +#define YYSTACK_FREE YYFREE +#ifndef YYSTACK_ALLOC_MAXIMUM +#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +#endif +#if (defined __cplusplus && !defined EXIT_SUCCESS && \ + !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) +#include /* INFRINGES ON USER NAME SPACE */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef YYMALLOC +#define YYMALLOC malloc +#if !defined malloc && !defined EXIT_SUCCESS +void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#ifndef YYFREE +#define YYFREE free +#if !defined free && !defined EXIT_SUCCESS +void free(void *); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#endif #endif /* 1 */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ + defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) +#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ - + YYSIZEOF (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) +#define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +#define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF (*yyptr); \ - } \ - while (0) +#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF(*yyptr); \ + } while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif +#ifndef YYCOPY +#if defined __GNUC__ && 1 < __GNUC__ +#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) +#else +#define YYCOPY(Dst, Src, Count) \ + do { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } while (0) +#endif +#endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 75 +#define YYFINAL 75 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 276 +#define YYLAST 276 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 77 +#define YYNTOKENS 77 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 57 +#define YYNNTS 57 /* YYNRULES -- Number of rules. */ -#define YYNRULES 147 +#define YYNRULES 147 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 259 +#define YYNSTATES 259 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 327 - +#define YYMAXUTOK 327 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 74, 72, 2, 73, 2, 75, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 76 -}; +static const yytype_int8 yytranslate[] = {0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 74, + 72, + 2, + 73, + 2, + 75, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 76}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = -{ - 0, 262, 262, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 296, 302, 307, 313, - 319, 325, 331, 338, 344, 352, 362, 377, 378, 382, - 388, 397, 407, 411, 415, 419, 423, 430, 441, 451, - 454, 467, 479, 506, 510, 514, 519, 525, 526, 527, - 528, 529, 533, 546, 552, 559, 565, 573, 576, 580, - 587, 591, 595, 601, 608, 611, 618, 630, 644, 649, - 656, 666, 699, 732, 738, 747, 750, 759, 775, 778, - 781, 784, 787, 795, 798, 803, 809, 812, 815, 818, - 825, 828, 831, 836, 843, 850, 855, 865, 871, 881, - 898, 905, 917, 920, 926, 930, 937, 941, 948, 949, - 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, - 960, 961, 966, 969, 977, 982, 990, 996, 1002, 1012, - 1015, 1023, 1026, 1033, 1046, 1054, 1064, 1065 -}; +static const yytype_int16 yyrline[] = {0, + 262, + 262, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289, + 290, + 291, + 292, + 296, + 302, + 307, + 313, + 319, + 325, + 331, + 338, + 344, + 352, + 362, + 377, + 378, + 382, + 388, + 397, + 407, + 411, + 415, + 419, + 423, + 430, + 441, + 451, + 454, + 467, + 479, + 506, + 510, + 514, + 519, + 525, + 526, + 527, + 528, + 529, + 533, + 546, + 552, + 559, + 565, + 573, + 576, + 580, + 587, + 591, + 595, + 601, + 608, + 611, + 618, + 630, + 644, + 649, + 656, + 666, + 699, + 732, + 738, + 747, + 750, + 759, + 775, + 778, + 781, + 784, + 787, + 795, + 798, + 803, + 809, + 812, + 815, + 818, + 825, + 828, + 831, + 836, + 843, + 850, + 855, + 865, + 871, + 881, + 898, + 905, + 917, + 920, + 926, + 930, + 937, + 941, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 966, + 969, + 977, + 982, + 990, + 996, + 1002, + 1012, + 1015, + 1023, + 1026, + 1033, + 1046, + 1054, + 1064, + 1065}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", - "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "HAVING", "ORDER", - "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", - "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", - "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", - "DATE_T", "TEXT_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", - "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", - "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", - "JOIN", "VIEW", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", - "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", - "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", - "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", - "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", - "show_index_stmt", "create_index_stmt", "opt_unique", "attr_list", - "drop_index_stmt", "create_table_stmt", "create_view_stmt", - "drop_view_stmt", "attr_def_list", "attr_def", "nullable_constraint", - "type", "insert_stmt", "values_list", "value_list", "value", - "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", - "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", - "expression", "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", - "relation", "rel_list", "joinClauses", "where", "condition", "comp_op", - "opt_order_by", "sort_list", "sort_unit", "group_by", "opt_having", - "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR -}; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} +static const char *const yytname[] = {"\"end of file\"", + "error", + "\"invalid token\"", + "SEMICOLON", + "AS", + "ASC", + "BY", + "CREATE", + "DROP", + "EXISTS", + "GROUP", + "HAVING", + "ORDER", + "TABLE", + "TABLES", + "INDEX", + "CALC", + "SELECT", + "DESC", + "SHOW", + "SYNC", + "INSERT", + "DELETE", + "UPDATE", + "LBRACE", + "RBRACE", + "COMMA", + "TRX_BEGIN", + "TRX_COMMIT", + "TRX_ROLLBACK", + "INT_T", + "IN", + "STRING_T", + "FLOAT_T", + "DATE_T", + "TEXT_T", + "NOT", + "UNIQUE", + "NULL_T", + "NULLABLE", + "HELP", + "EXIT", + "DOT", + "INTO", + "VALUES", + "FROM", + "WHERE", + "AND", + "OR", + "SET", + "ON", + "LOAD", + "DATA", + "INFILE", + "EXPLAIN", + "STORAGE", + "FORMAT", + "INNER", + "JOIN", + "VIEW", + "EQ", + "LT", + "GT", + "LE", + "GE", + "NE", + "LIKE", + "IS", + "NUMBER", + "FLOAT", + "ID", + "SSS", + "'+'", + "'-'", + "'*'", + "'/'", + "UMINUS", + "$accept", + "commands", + "command_wrapper", + "exit_stmt", + "help_stmt", + "sync_stmt", + "begin_stmt", + "commit_stmt", + "rollback_stmt", + "drop_table_stmt", + "show_tables_stmt", + "desc_table_stmt", + "show_index_stmt", + "create_index_stmt", + "opt_unique", + "attr_list", + "drop_index_stmt", + "create_table_stmt", + "create_view_stmt", + "drop_view_stmt", + "attr_def_list", + "attr_def", + "nullable_constraint", + "type", + "insert_stmt", + "values_list", + "value_list", + "value", + "nonnegative_value", + "storage_format", + "delete_stmt", + "update_stmt", + "setClauses", + "setClause", + "select_stmt", + "calc_stmt", + "expression_list", + "expression", + "alias", + "aggr_func_expr", + "sub_query_expr", + "rel_attr", + "relation", + "rel_list", + "joinClauses", + "where", + "condition", + "comp_op", + "opt_order_by", + "sort_list", + "sort_unit", + "group_by", + "opt_having", + "load_data_stmt", + "explain_stmt", + "set_variable_stmt", + "opt_semicolon", + YY_NULLPTR}; + +static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif #define YYPACT_NINF (-175) -#define yypact_value_is_default(Yyn) \ - ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) \ - 0 +#define yytable_value_is_error(Yyn) 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 222, 47, 28, 27, 27, -52, 38, -175, -20, -19, - -41, -175, -175, -175, -175, -175, -35, 2, 222, 56, - 85, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, 23, -175, 37, 44, 40, 45, - 79, -7, -175, -175, -175, 6, -175, 27, -175, -175, - -175, 0, -175, -175, -175, 54, -175, -175, 78, 89, - 90, 113, 101, 111, -175, -175, -175, -175, -13, 161, - 96, -175, 117, -175, 27, 143, 144, 27, -25, -175, - 100, -175, 27, 27, 27, 27, 145, 102, 102, 130, - 129, 106, 53, 108, 114, 124, 15, 164, 132, 116, - 54, -175, -175, 158, -175, -175, -175, 30, 30, -175, - -175, 27, -175, 11, 129, -175, 163, 154, -175, 133, - -2, -175, 17, -175, -175, 148, 95, 168, 135, 164, - -175, -175, 126, -175, -175, -175, 139, 172, 189, 53, - 175, -175, -175, 3, -175, -175, -175, -175, -175, -175, - -175, 166, 80, 66, 27, 27, 106, -175, -175, -175, - 190, -175, -175, -175, -175, -175, -11, 114, 179, 136, - -175, 181, 102, 102, 201, 197, 110, -175, 186, -175, - -175, -175, -175, 27, 154, 154, 59, 59, -175, 141, - 165, 174, -175, -175, -175, 168, 171, -175, 162, 184, - 129, 12, -175, 27, 154, 219, -175, 53, 53, 59, - -175, 188, -175, 211, -175, -175, 29, 187, 212, 154, - 189, -175, 66, 240, -175, -175, 131, 112, 164, -175, - 162, -175, 55, -175, 27, -175, -175, -175, -175, 194, - 4, -175, 221, 102, -175, -175, 27, -175, -175 -}; +static const yytype_int16 yypact[] = {222, + 47, + 28, + 27, + 27, + -52, + 38, + -175, + -20, + -19, + -41, + -175, + -175, + -175, + -175, + -175, + -35, + 2, + 222, + 56, + 85, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + 23, + -175, + 37, + 44, + 40, + 45, + 79, + -7, + -175, + -175, + -175, + 6, + -175, + 27, + -175, + -175, + -175, + 0, + -175, + -175, + -175, + 54, + -175, + -175, + 78, + 89, + 90, + 113, + 101, + 111, + -175, + -175, + -175, + -175, + -13, + 161, + 96, + -175, + 117, + -175, + 27, + 143, + 144, + 27, + -25, + -175, + 100, + -175, + 27, + 27, + 27, + 27, + 145, + 102, + 102, + 130, + 129, + 106, + 53, + 108, + 114, + 124, + 15, + 164, + 132, + 116, + 54, + -175, + -175, + 158, + -175, + -175, + -175, + 30, + 30, + -175, + -175, + 27, + -175, + 11, + 129, + -175, + 163, + 154, + -175, + 133, + -2, + -175, + 17, + -175, + -175, + 148, + 95, + 168, + 135, + 164, + -175, + -175, + 126, + -175, + -175, + -175, + 139, + 172, + 189, + 53, + 175, + -175, + -175, + 3, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + 166, + 80, + 66, + 27, + 27, + 106, + -175, + -175, + -175, + 190, + -175, + -175, + -175, + -175, + -175, + -11, + 114, + 179, + 136, + -175, + 181, + 102, + 102, + 201, + 197, + 110, + -175, + 186, + -175, + -175, + -175, + -175, + 27, + 154, + 154, + 59, + 59, + -175, + 141, + 165, + 174, + -175, + -175, + -175, + 168, + 171, + -175, + 162, + 184, + 129, + 12, + -175, + 27, + 154, + 219, + -175, + 53, + 53, + 59, + -175, + 188, + -175, + 211, + -175, + -175, + 29, + 187, + 212, + 154, + 189, + -175, + 66, + 240, + -175, + -175, + 131, + 112, + 164, + -175, + 162, + -175, + 55, + -175, + 27, + -175, + -175, + -175, + -175, + 194, + 4, + -175, + 221, + 102, + -175, + -175, + 27, + -175, + -175}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 38, 0, 85, 85, 0, 0, 28, 0, 0, - 0, 29, 30, 31, 27, 26, 0, 0, 0, 0, - 146, 25, 24, 17, 18, 19, 20, 9, 10, 11, - 14, 12, 13, 8, 15, 16, 5, 7, 6, 4, - 3, 21, 22, 23, 0, 37, 0, 0, 0, 0, - 0, 85, 73, 70, 71, 105, 72, 0, 96, 94, - 83, 100, 98, 99, 95, 84, 34, 33, 0, 0, - 0, 0, 0, 0, 144, 1, 147, 2, 74, 0, - 0, 32, 0, 48, 85, 0, 0, 85, 0, 93, - 0, 101, 0, 0, 0, 0, 86, 0, 0, 0, - 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 104, 92, 0, 106, 97, 102, 88, 89, 90, - 91, 85, 107, 100, 112, 35, 0, 0, 76, 0, - 112, 78, 0, 145, 67, 0, 0, 49, 0, 0, - 46, 47, 0, 41, 103, 87, 0, 108, 139, 0, - 62, 130, 128, 0, 118, 119, 120, 121, 122, 123, - 126, 124, 0, 113, 0, 0, 0, 77, 68, 69, - 0, 57, 58, 59, 60, 61, 56, 0, 0, 0, - 45, 0, 0, 0, 0, 141, 0, 65, 0, 131, - 129, 127, 125, 0, 0, 0, 115, 80, 79, 0, - 0, 0, 55, 54, 52, 49, 74, 75, 0, 0, - 112, 100, 109, 85, 0, 132, 63, 0, 0, 114, - 116, 117, 143, 0, 53, 50, 44, 39, 0, 0, - 139, 140, 142, 0, 81, 66, 0, 56, 0, 43, - 0, 36, 110, 82, 0, 64, 51, 42, 40, 0, - 136, 133, 134, 0, 138, 137, 0, 111, 135 -}; +static const yytype_uint8 yydefact[] = {0, + 38, + 0, + 85, + 85, + 0, + 0, + 28, + 0, + 0, + 0, + 29, + 30, + 31, + 27, + 26, + 0, + 0, + 0, + 0, + 146, + 25, + 24, + 17, + 18, + 19, + 20, + 9, + 10, + 11, + 14, + 12, + 13, + 8, + 15, + 16, + 5, + 7, + 6, + 4, + 3, + 21, + 22, + 23, + 0, + 37, + 0, + 0, + 0, + 0, + 0, + 85, + 73, + 70, + 71, + 105, + 72, + 0, + 96, + 94, + 83, + 100, + 98, + 99, + 95, + 84, + 34, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 144, + 1, + 147, + 2, + 74, + 0, + 0, + 32, + 0, + 48, + 85, + 0, + 0, + 85, + 0, + 93, + 0, + 101, + 0, + 0, + 0, + 0, + 86, + 0, + 0, + 0, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 104, + 92, + 0, + 106, + 97, + 102, + 88, + 89, + 90, + 91, + 85, + 107, + 100, + 112, + 35, + 0, + 0, + 76, + 0, + 112, + 78, + 0, + 145, + 67, + 0, + 0, + 49, + 0, + 0, + 46, + 47, + 0, + 41, + 103, + 87, + 0, + 108, + 139, + 0, + 62, + 130, + 128, + 0, + 118, + 119, + 120, + 121, + 122, + 123, + 126, + 124, + 0, + 113, + 0, + 0, + 0, + 77, + 68, + 69, + 0, + 57, + 58, + 59, + 60, + 61, + 56, + 0, + 0, + 0, + 45, + 0, + 0, + 0, + 0, + 141, + 0, + 65, + 0, + 131, + 129, + 127, + 125, + 0, + 0, + 0, + 115, + 80, + 79, + 0, + 0, + 0, + 55, + 54, + 52, + 49, + 74, + 75, + 0, + 0, + 112, + 100, + 109, + 85, + 0, + 132, + 63, + 0, + 0, + 114, + 116, + 117, + 143, + 0, + 53, + 50, + 44, + 39, + 0, + 0, + 139, + 140, + 142, + 0, + 81, + 66, + 0, + 56, + 0, + 43, + 0, + 36, + 110, + 82, + 0, + 64, + 51, + 42, + 40, + 0, + 136, + 133, + 134, + 0, + 138, + 137, + 0, + 111, + 135}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -175, -175, 230, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, -175, 13, -175, -175, -175, -175, - 49, 81, 18, -175, -175, -175, 39, -97, -99, 50, - -175, -175, -175, 93, -49, -175, -4, -56, 199, -175, - -175, -175, -91, 82, 8, -116, -174, 104, -175, 14, - -175, 34, -175, -175, -175, -175, -175 -}; +static const yytype_int16 yypgoto[] = {-175, + -175, + 230, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + -175, + 13, + -175, + -175, + -175, + -175, + 49, + 81, + 18, + -175, + -175, + -175, + 39, + -97, + -99, + 50, + -175, + -175, + -175, + 93, + -49, + -175, + -4, + -56, + 199, + -175, + -175, + -175, + -91, + 82, + 8, + -116, + -174, + 104, + -175, + 14, + -175, + 34, + -175, + -175, + -175, + -175, + -175}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = -{ - 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 47, 228, 32, 33, 34, 35, - 178, 137, 204, 176, 36, 150, 186, 187, 59, 106, - 37, 38, 130, 131, 39, 40, 60, 61, 147, 62, - 63, 64, 209, 124, 210, 128, 163, 164, 234, 251, - 252, 185, 215, 41, 42, 43, 77 -}; +static const yytype_uint8 yydefgoto[] = {0, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 47, + 228, + 32, + 33, + 34, + 35, + 178, + 137, + 204, + 176, + 36, + 150, + 186, + 187, + 59, + 106, + 37, + 38, + 130, + 131, + 39, + 40, + 60, + 61, + 147, + 62, + 63, + 64, + 209, + 124, + 210, + 128, + 163, + 164, + 234, + 251, + 252, + 185, + 215, + 41, + 42, + 43, + 77}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = -{ - 65, 89, 85, 134, 90, 133, 123, 125, 148, 254, - 84, 104, 189, 200, 167, 90, 90, 51, 66, 139, - 220, 221, 255, 69, 166, 201, 70, 202, 203, 71, - 87, 52, 84, 238, 190, 72, 117, 118, 119, 120, - 232, 48, 105, 49, 127, 114, 84, 86, 88, 115, - 134, 51, 67, 68, 73, 242, 75, 140, 141, 80, - 44, 53, 54, 55, 56, 52, 57, 58, 146, 191, - 91, 162, 92, 93, 94, 95, 92, 93, 94, 95, - 110, 91, 91, 113, 45, 168, 169, 50, 76, 151, - 180, 52, 211, 78, 230, 53, 54, 55, 56, 97, - 57, 58, 194, 195, 94, 95, 46, 79, 196, 197, - 81, 152, 249, 194, 195, 82, 153, 145, 134, 134, - 235, 53, 54, 98, 56, 171, 132, 172, 173, 174, - 175, 92, 93, 94, 95, 216, 217, 219, 162, 162, - 154, 155, 156, 157, 158, 159, 160, 161, 201, 83, - 202, 203, 92, 93, 94, 95, 245, 217, 162, 99, - 100, 102, 101, 151, 103, 107, 108, 109, 111, 112, - 116, 121, 122, 162, 126, 127, 129, 239, 51, 135, - 138, 84, 142, 144, 136, 152, 143, 149, 250, 247, - 153, 170, 52, 165, 177, 179, 181, 182, 183, 184, - 250, 188, 192, 199, 206, 208, 207, 213, 214, 231, - 218, 222, 224, 240, 154, 155, 156, 157, 158, 159, - 160, 161, 53, 54, 55, 56, 105, 57, 58, 1, - 2, 233, 227, 223, 229, 194, 237, 241, 3, 4, - 5, 6, 7, 8, 9, 10, 244, 256, 74, 11, - 12, 13, 253, 248, 225, 246, 226, 236, 205, 198, - 96, 257, 14, 15, 243, 212, 193, 0, 0, 0, - 258, 16, 0, 17, 0, 0, 18 -}; - -static const yytype_int16 yycheck[] = -{ - 4, 57, 51, 102, 4, 102, 97, 98, 124, 5, - 17, 24, 9, 24, 130, 4, 4, 24, 70, 4, - 194, 195, 18, 43, 26, 36, 45, 38, 39, 70, - 24, 38, 17, 4, 31, 70, 92, 93, 94, 95, - 214, 13, 55, 15, 46, 70, 17, 51, 42, 74, - 149, 24, 14, 15, 52, 229, 0, 106, 107, 15, - 13, 68, 69, 70, 71, 38, 73, 74, 57, 66, - 70, 127, 72, 73, 74, 75, 72, 73, 74, 75, - 84, 70, 70, 87, 37, 68, 69, 59, 3, 9, - 139, 38, 183, 70, 210, 68, 69, 70, 71, 45, - 73, 74, 47, 48, 74, 75, 59, 70, 164, 165, - 70, 31, 57, 47, 48, 70, 36, 121, 217, 218, - 217, 68, 69, 45, 71, 30, 73, 32, 33, 34, - 35, 72, 73, 74, 75, 25, 26, 193, 194, 195, - 60, 61, 62, 63, 64, 65, 66, 67, 36, 70, - 38, 39, 72, 73, 74, 75, 25, 26, 214, 70, - 70, 60, 49, 9, 53, 4, 70, 50, 25, 25, - 70, 26, 70, 229, 44, 46, 70, 226, 24, 71, - 56, 17, 50, 25, 70, 31, 70, 24, 244, 238, - 36, 43, 38, 60, 26, 60, 70, 58, 26, 10, - 256, 26, 36, 13, 25, 24, 70, 6, 11, 213, - 24, 70, 38, 26, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 55, 73, 74, 7, - 8, 12, 70, 68, 50, 47, 25, 25, 16, 17, - 18, 19, 20, 21, 22, 23, 6, 26, 18, 27, - 28, 29, 58, 240, 205, 237, 206, 218, 177, 166, - 61, 253, 40, 41, 230, 183, 162, -1, -1, -1, - 256, 49, -1, 51, -1, -1, 54 -}; +static const yytype_int16 yytable[] = {65, + 89, + 85, + 134, + 90, + 133, + 123, + 125, + 148, + 254, + 84, + 104, + 189, + 200, + 167, + 90, + 90, + 51, + 66, + 139, + 220, + 221, + 255, + 69, + 166, + 201, + 70, + 202, + 203, + 71, + 87, + 52, + 84, + 238, + 190, + 72, + 117, + 118, + 119, + 120, + 232, + 48, + 105, + 49, + 127, + 114, + 84, + 86, + 88, + 115, + 134, + 51, + 67, + 68, + 73, + 242, + 75, + 140, + 141, + 80, + 44, + 53, + 54, + 55, + 56, + 52, + 57, + 58, + 146, + 191, + 91, + 162, + 92, + 93, + 94, + 95, + 92, + 93, + 94, + 95, + 110, + 91, + 91, + 113, + 45, + 168, + 169, + 50, + 76, + 151, + 180, + 52, + 211, + 78, + 230, + 53, + 54, + 55, + 56, + 97, + 57, + 58, + 194, + 195, + 94, + 95, + 46, + 79, + 196, + 197, + 81, + 152, + 249, + 194, + 195, + 82, + 153, + 145, + 134, + 134, + 235, + 53, + 54, + 98, + 56, + 171, + 132, + 172, + 173, + 174, + 175, + 92, + 93, + 94, + 95, + 216, + 217, + 219, + 162, + 162, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 201, + 83, + 202, + 203, + 92, + 93, + 94, + 95, + 245, + 217, + 162, + 99, + 100, + 102, + 101, + 151, + 103, + 107, + 108, + 109, + 111, + 112, + 116, + 121, + 122, + 162, + 126, + 127, + 129, + 239, + 51, + 135, + 138, + 84, + 142, + 144, + 136, + 152, + 143, + 149, + 250, + 247, + 153, + 170, + 52, + 165, + 177, + 179, + 181, + 182, + 183, + 184, + 250, + 188, + 192, + 199, + 206, + 208, + 207, + 213, + 214, + 231, + 218, + 222, + 224, + 240, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 53, + 54, + 55, + 56, + 105, + 57, + 58, + 1, + 2, + 233, + 227, + 223, + 229, + 194, + 237, + 241, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 244, + 256, + 74, + 11, + 12, + 13, + 253, + 248, + 225, + 246, + 226, + 236, + 205, + 198, + 96, + 257, + 14, + 15, + 243, + 212, + 193, + 0, + 0, + 0, + 258, + 16, + 0, + 17, + 0, + 0, + 18}; + +static const yytype_int16 yycheck[] = {4, + 57, + 51, + 102, + 4, + 102, + 97, + 98, + 124, + 5, + 17, + 24, + 9, + 24, + 130, + 4, + 4, + 24, + 70, + 4, + 194, + 195, + 18, + 43, + 26, + 36, + 45, + 38, + 39, + 70, + 24, + 38, + 17, + 4, + 31, + 70, + 92, + 93, + 94, + 95, + 214, + 13, + 55, + 15, + 46, + 70, + 17, + 51, + 42, + 74, + 149, + 24, + 14, + 15, + 52, + 229, + 0, + 106, + 107, + 15, + 13, + 68, + 69, + 70, + 71, + 38, + 73, + 74, + 57, + 66, + 70, + 127, + 72, + 73, + 74, + 75, + 72, + 73, + 74, + 75, + 84, + 70, + 70, + 87, + 37, + 68, + 69, + 59, + 3, + 9, + 139, + 38, + 183, + 70, + 210, + 68, + 69, + 70, + 71, + 45, + 73, + 74, + 47, + 48, + 74, + 75, + 59, + 70, + 164, + 165, + 70, + 31, + 57, + 47, + 48, + 70, + 36, + 121, + 217, + 218, + 217, + 68, + 69, + 45, + 71, + 30, + 73, + 32, + 33, + 34, + 35, + 72, + 73, + 74, + 75, + 25, + 26, + 193, + 194, + 195, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 36, + 70, + 38, + 39, + 72, + 73, + 74, + 75, + 25, + 26, + 214, + 70, + 70, + 60, + 49, + 9, + 53, + 4, + 70, + 50, + 25, + 25, + 70, + 26, + 70, + 229, + 44, + 46, + 70, + 226, + 24, + 71, + 56, + 17, + 50, + 25, + 70, + 31, + 70, + 24, + 244, + 238, + 36, + 43, + 38, + 60, + 26, + 60, + 70, + 58, + 26, + 10, + 256, + 26, + 36, + 13, + 25, + 24, + 70, + 6, + 11, + 213, + 24, + 70, + 38, + 26, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 55, + 73, + 74, + 7, + 8, + 12, + 70, + 68, + 50, + 47, + 25, + 25, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 6, + 26, + 18, + 27, + 28, + 29, + 58, + 240, + 205, + 237, + 206, + 218, + 177, + 166, + 61, + 253, + 40, + 41, + 230, + 183, + 162, + -1, + -1, + -1, + 256, + 49, + -1, + 51, + -1, + -1, + 54}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, - 23, 27, 28, 29, 40, 41, 49, 51, 54, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 93, 94, 95, 96, 101, 107, 108, 111, - 112, 130, 131, 132, 13, 37, 59, 91, 13, 15, - 59, 24, 38, 68, 69, 70, 71, 73, 74, 105, - 113, 114, 116, 117, 118, 113, 70, 14, 15, 43, - 45, 70, 70, 52, 79, 0, 3, 133, 70, 70, - 15, 70, 70, 70, 17, 111, 113, 24, 42, 114, - 4, 70, 72, 73, 74, 75, 115, 45, 45, 70, - 70, 49, 60, 53, 24, 55, 106, 4, 70, 50, - 113, 25, 25, 113, 70, 74, 70, 114, 114, 114, - 114, 26, 70, 119, 120, 119, 44, 46, 122, 70, - 109, 110, 73, 104, 105, 71, 70, 98, 56, 4, - 111, 111, 50, 70, 25, 113, 57, 115, 122, 24, - 102, 9, 31, 36, 60, 61, 62, 63, 64, 65, - 66, 67, 114, 123, 124, 60, 26, 122, 68, 69, - 43, 30, 32, 33, 34, 35, 100, 26, 97, 60, - 111, 70, 58, 26, 10, 128, 103, 104, 26, 9, - 31, 66, 36, 124, 47, 48, 114, 114, 110, 13, - 24, 36, 38, 39, 99, 98, 25, 70, 24, 119, - 121, 119, 120, 6, 11, 129, 25, 26, 24, 114, - 123, 123, 70, 68, 38, 97, 106, 70, 92, 50, - 122, 113, 123, 12, 125, 104, 103, 25, 4, 111, - 26, 25, 123, 128, 6, 25, 99, 111, 92, 57, - 114, 126, 127, 58, 5, 18, 26, 121, 126 -}; +static const yytype_uint8 yystos[] = {0, + 7, + 8, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 27, + 28, + 29, + 40, + 41, + 49, + 51, + 54, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 93, + 94, + 95, + 96, + 101, + 107, + 108, + 111, + 112, + 130, + 131, + 132, + 13, + 37, + 59, + 91, + 13, + 15, + 59, + 24, + 38, + 68, + 69, + 70, + 71, + 73, + 74, + 105, + 113, + 114, + 116, + 117, + 118, + 113, + 70, + 14, + 15, + 43, + 45, + 70, + 70, + 52, + 79, + 0, + 3, + 133, + 70, + 70, + 15, + 70, + 70, + 70, + 17, + 111, + 113, + 24, + 42, + 114, + 4, + 70, + 72, + 73, + 74, + 75, + 115, + 45, + 45, + 70, + 70, + 49, + 60, + 53, + 24, + 55, + 106, + 4, + 70, + 50, + 113, + 25, + 25, + 113, + 70, + 74, + 70, + 114, + 114, + 114, + 114, + 26, + 70, + 119, + 120, + 119, + 44, + 46, + 122, + 70, + 109, + 110, + 73, + 104, + 105, + 71, + 70, + 98, + 56, + 4, + 111, + 111, + 50, + 70, + 25, + 113, + 57, + 115, + 122, + 24, + 102, + 9, + 31, + 36, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 114, + 123, + 124, + 60, + 26, + 122, + 68, + 69, + 43, + 30, + 32, + 33, + 34, + 35, + 100, + 26, + 97, + 60, + 111, + 70, + 58, + 26, + 10, + 128, + 103, + 104, + 26, + 9, + 31, + 66, + 36, + 124, + 47, + 48, + 114, + 114, + 110, + 13, + 24, + 36, + 38, + 39, + 99, + 98, + 25, + 70, + 24, + 119, + 121, + 119, + 120, + 6, + 11, + 129, + 25, + 26, + 24, + 114, + 123, + 123, + 70, + 68, + 38, + 97, + 106, + 70, + 92, + 50, + 122, + 113, + 123, + 12, + 125, + 104, + 103, + 25, + 4, + 111, + 26, + 25, + 123, + 128, + 6, + 25, + 99, + 111, + 92, + 57, + 114, + 126, + 127, + 58, + 5, + 18, + 26, + 121, + 126}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = -{ - 0, 77, 78, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 91, 92, - 92, 93, 94, 94, 94, 94, 94, 95, 96, 97, - 97, 98, 98, 99, 99, 99, 99, 100, 100, 100, - 100, 100, 101, 102, 102, 103, 103, 104, 104, 104, - 105, 105, 105, 105, 106, 106, 107, 108, 109, 109, - 110, 111, 111, 112, 112, 113, 113, 113, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 115, 115, 115, 116, 117, 118, 118, 119, 120, 120, - 121, 121, 122, 122, 123, 123, 123, 123, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 125, 125, 126, 126, 127, 127, 127, 128, - 128, 129, 129, 130, 131, 132, 133, 133 -}; +static const yytype_uint8 yyr1[] = {0, + 77, + 78, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 91, + 92, + 92, + 93, + 94, + 94, + 94, + 94, + 94, + 95, + 96, + 97, + 97, + 98, + 98, + 99, + 99, + 99, + 99, + 100, + 100, + 100, + 100, + 100, + 101, + 102, + 102, + 103, + 103, + 104, + 104, + 104, + 105, + 105, + 105, + 105, + 106, + 106, + 107, + 108, + 109, + 109, + 110, + 111, + 111, + 112, + 112, + 113, + 113, + 113, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 114, + 115, + 115, + 115, + 116, + 117, + 118, + 118, + 119, + 120, + 120, + 121, + 121, + 122, + 122, + 123, + 123, + 123, + 123, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 124, + 125, + 125, + 126, + 126, + 127, + 127, + 127, + 128, + 128, + 129, + 129, + 130, + 131, + 132, + 133, + 133}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = +static const yytype_int8 yyr2[] = {0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 2, + 2, + 4, + 9, + 1, + 0, + 1, + 3, + 5, + 10, + 9, + 8, + 6, + 5, + 5, + 3, + 0, + 3, + 6, + 3, + 2, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 5, + 3, + 5, + 1, + 3, + 1, + 2, + 2, + 1, + 1, + 1, + 1, + 0, + 4, + 4, + 5, + 1, + 3, + 3, + 8, + 9, + 2, + 2, + 0, + 2, + 4, + 3, + 3, + 3, + 3, + 3, + 2, + 1, + 1, + 1, + 3, + 1, + 1, + 0, + 1, + 2, + 4, + 3, + 1, + 3, + 1, + 2, + 4, + 3, + 6, + 0, + 2, + 3, + 2, + 3, + 3, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 0, + 3, + 1, + 3, + 1, + 2, + 2, + 0, + 3, + 0, + 2, + 7, + 2, + 4, + 0, + 1}; + +enum { - 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 2, 2, 4, 9, 1, 0, 1, - 3, 5, 10, 9, 8, 6, 5, 5, 3, 0, - 3, 6, 3, 2, 1, 1, 0, 1, 1, 1, - 1, 1, 5, 3, 5, 1, 3, 1, 2, 2, - 1, 1, 1, 1, 0, 4, 4, 5, 1, 3, - 3, 8, 9, 2, 2, 0, 2, 4, 3, 3, - 3, 3, 3, 2, 1, 1, 1, 3, 1, 1, - 0, 1, 2, 4, 3, 1, 3, 1, 2, 4, - 3, 6, 0, 2, 3, 2, 3, 3, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, - 1, 2, 0, 3, 1, 3, 1, 2, 2, 0, - 3, 0, 2, 7, 2, 4, 0, 1 + YYENOMEM = -2 }; - -enum { YYENOMEM = -2 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK(yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } else { \ + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -1046,151 +3068,131 @@ enum { YYENOMEM = -2 }; the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) +#define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) { \ + (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ + } else { \ + (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) - /* Enable debugging if requested. */ #if YYDEBUG -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +#ifndef YYFPRINTF +#include /* INFRINGES ON USER NAME SPACE */ +#define YYFPRINTF fprintf +#endif +#define YYDPRINTF(Args) \ + do { \ + if (yydebug) \ + YYFPRINTF Args; \ + } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YYLOCATION_PRINT +#ifndef YYLOCATION_PRINT -# if defined YY_LOCATION_PRINT +#if defined YY_LOCATION_PRINT - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) { + res += YYFPRINTF(yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF(yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) { + if (yylocp->first_line < yylocp->last_line) { + res += YYFPRINTF(yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF(yyo, ".%d", end_col); + } else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF(yyo, "-%d", end_col); + } return res; } -# define YYLOCATION_PRINT yy_location_print_ - - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) - -# else +#define YYLOCATION_PRINT yy_location_print_ -# define YYLOCATION_PRINT(File, Loc) ((void) 0) - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT YYLOCATION_PRINT +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -# endif -# endif /* !defined YYLOCATION_PRINT */ +#else +#define YYLOCATION_PRINT(File, Loc) ((void)0) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT YYLOCATION_PRINT -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +#endif +#endif /* !defined YYLOCATION_PRINT */ +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ + do { \ + if (yydebug) { \ + YYFPRINTF(stderr, "%s ", Title); \ + yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF(stderr, "\n"); \ + } \ + } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyoutput); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); - YYLOCATION_PRINT (yyo, yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF (yyo, ")"); + YYLOCATION_PRINT(yyo, yylocationp); + YYFPRINTF(yyo, ": "); + yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF(yyo, ")"); } /*------------------------------------------------------------------. @@ -1198,70 +3200,66 @@ yy_symbol_print (FILE *yyo, | TOP (included). | `------------------------------------------------------------------*/ -static void -yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); + YYFPRINTF(stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) { + int yybot = *yybottom; + YYFPRINTF(stderr, " %d", yybot); + } + YYFPRINTF(stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - +#define YY_STACK_PRINT(Bottom, Top) \ + do { \ + if (yydebug) \ + yy_stack_print((Bottom), (Top)); \ + } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, + ParsedSqlResult *sql_result, void *scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", - yyrule - 1, yylno); + YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); - YYFPRINTF (stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) { + YYFPRINTF(stderr, " $%d = ", yyi + 1); + yy_symbol_print(stderr, + YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), + sql_string, + sql_result, + scanner); + YYFPRINTF(stderr, "\n"); + } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ -} while (0) +#define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug) \ + yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ + } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) +#define YYDPRINTF(Args) ((void)0) +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +#define YY_STACK_PRINT(Bottom, Top) +#define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -1272,16 +3270,15 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 +#define YYMAXDEPTH 10000 #endif - /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -1290,69 +3287,59 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default(yyn)) { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } - - - #ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else +#if defined __GLIBC__ && defined _STRING_H +#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) +#else /* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) +static YYPTRDIFF_T yystrlen(const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -# endif +#endif #endif #ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +#define yystpcpy stpcpy +#else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) +static char *yystpcpy(char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -1360,7 +3347,7 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } -# endif +#endif #endif #ifndef yytnamerr @@ -1371,52 +3358,45 @@ yystpcpy (char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) +static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) { - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': + if (*yystr == '"') { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) { + case '\'': + case ',': goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes:; + } if (yyres) - return yystpcpy (yyres, yystr) - yyres; + return yystpcpy(yyres, yystr) - yyres; else - return yystrlen (yystr); + return yystrlen(yystr); } #endif - -static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -1443,19 +3423,17 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) - { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -1467,11 +3445,12 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) +static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) { - enum { YYARGS_MAX = 5 }; + enum + { + YYARGS_MAX = 5 + }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -1481,16 +3460,13 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) - { -#define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break + switch (yycount) { +#define YYCASE_(N, S) \ + case N: yyformat = S; break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1499,134 +3475,118 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; + yysize = yystrlen(yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) { + YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) { + *yymsg_alloc = 2 * yysize; + if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { + yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } else { + ++yyp; + ++yyformat; + } } return 0; } - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, + const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyvaluep); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - - - - /*----------. | yyparse. | `----------*/ -int -yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { -/* Lookahead token kind. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; + /* Lookahead token kind. */ + int yychar; + + /* The semantic value of the lookahead symbol. */ + /* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ + YY_INITIAL_VALUE(static YYSTYPE yyval_default;) + YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); + + /* Location data for the lookahead symbol. */ + static YYLTYPE yyloc_default +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = {1, 1, 1, 1} +#endif + ; + YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -1642,24 +3602,23 @@ YYLTYPE yylloc = yyloc_default; YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF ((stderr, "Starting parse\n")); + YYDPRINTF((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; - /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -1668,93 +3627,90 @@ YYLTYPE yylloc = yyloc_default; have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YYDPRINTF((stderr, "Entering state %d\n", yystate)); + YY_ASSERT(0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST (yy_state_t, yystate); + *yyssp = YY_CAST(yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else + { + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +#if defined yyoverflow { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -# if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * YYSIZEOF (*yyssp), - &yyvs1, yysize * YYSIZEOF (*yyvsp), - &yyls1, yysize * YYSIZEOF (*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow(YY_("memory exhausted"), + &yyss1, + yysize * YYSIZEOF(*yyssp), + &yyvs1, + yysize * YYSIZEOF(*yyvsp), + &yyls1, + yysize * YYSIZEOF(*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +#else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + YYNOMEM; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); + if (!yyptr) YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = - YY_CAST (union yyalloc *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); - if (! yyptr) - YYNOMEM; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif + YYSTACK_RELOCATE(yyss_alloc, yyss); + YYSTACK_RELOCATE(yyvs_alloc, yyvs); + YYSTACK_RELOCATE(yyls_alloc, yyls); +#undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE(yyss1); + } +#endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF ((stderr, "Stack size increased to %ld\n", - YY_CAST (long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; goto yybackup; - /*-----------. | yybackup. | `-----------*/ @@ -1764,40 +3720,34 @@ YYLTYPE yylloc = yyloc_default; /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yypact_value_is_default(yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token\n")); - yychar = yylex (&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) { + YYDPRINTF((stderr, "Reading a token\n")); + yychar = yylex(&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) - { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else if (yychar == YYerror) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF((stderr, "Now at end of input.\n")); + } else if (yychar == YYerror) { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } else { + yytoken = YYTRANSLATE(yychar); + YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -1805,13 +3755,12 @@ YYLTYPE yylloc = yyloc_default; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) { + if (yytable_value_is_error(yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -1819,7 +3768,7 @@ YYLTYPE yylloc = yyloc_default; yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -1830,7 +3779,6 @@ YYLTYPE yylloc = yyloc_default; yychar = YYEMPTY; goto yynewstate; - /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -1840,7 +3788,6 @@ YYLTYPE yylloc = yyloc_default; goto yyerrlab; goto yyreduce; - /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -1856,164 +3803,168 @@ YYLTYPE yylloc = yyloc_default; users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + yyval = yyvsp[1 - yylen]; /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: /* commands: command_wrapper opt_semicolon */ + YY_REDUCE_PRINT(yyn); + switch (yyn) { + case 2: /* commands: command_wrapper opt_semicolon */ #line 263 "yacc_sql.y" - { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } #line 1874 "yacc_sql.cpp" break; - case 26: /* exit_stmt: EXIT */ + case 26: /* exit_stmt: EXIT */ #line 296 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } #line 1883 "yacc_sql.cpp" break; - case 27: /* help_stmt: HELP */ + case 27: /* help_stmt: HELP */ #line 302 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } #line 1891 "yacc_sql.cpp" break; - case 28: /* sync_stmt: SYNC */ + case 28: /* sync_stmt: SYNC */ #line 307 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } #line 1899 "yacc_sql.cpp" break; - case 29: /* begin_stmt: TRX_BEGIN */ + case 29: /* begin_stmt: TRX_BEGIN */ #line 313 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } #line 1907 "yacc_sql.cpp" break; - case 30: /* commit_stmt: TRX_COMMIT */ + case 30: /* commit_stmt: TRX_COMMIT */ #line 319 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } #line 1915 "yacc_sql.cpp" break; - case 31: /* rollback_stmt: TRX_ROLLBACK */ + case 31: /* rollback_stmt: TRX_ROLLBACK */ #line 325 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } #line 1923 "yacc_sql.cpp" break; - case 32: /* drop_table_stmt: DROP TABLE ID */ + case 32: /* drop_table_stmt: DROP TABLE ID */ #line 331 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1933 "yacc_sql.cpp" break; - case 33: /* show_tables_stmt: SHOW TABLES */ + case 33: /* show_tables_stmt: SHOW TABLES */ #line 338 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } #line 1941 "yacc_sql.cpp" break; - case 34: /* desc_table_stmt: DESC ID */ + case 34: /* desc_table_stmt: DESC ID */ #line 344 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1951 "yacc_sql.cpp" break; - case 35: /* show_index_stmt: SHOW INDEX FROM relation */ + case 35: /* show_index_stmt: SHOW INDEX FROM relation */ #line 353 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1962 "yacc_sql.cpp" break; - case 36: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ + case 36: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ #line 363 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } #line 1978 "yacc_sql.cpp" break; - case 37: /* opt_unique: UNIQUE */ + case 37: /* opt_unique: UNIQUE */ #line 377 "yacc_sql.y" - { (yyval.unique) = true; } + { + (yyval.unique) = true; + } #line 1984 "yacc_sql.cpp" break; - case 38: /* opt_unique: %empty */ + case 38: /* opt_unique: %empty */ #line 378 "yacc_sql.y" - { (yyval.unique) = false; } + { + (yyval.unique) = false; + } #line 1990 "yacc_sql.cpp" break; - case 39: /* attr_list: ID */ + case 39: /* attr_list: ID */ #line 383 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } #line 2000 "yacc_sql.cpp" break; - case 40: /* attr_list: ID COMMA attr_list */ + case 40: /* attr_list: ID COMMA attr_list */ #line 389 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list) + ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } #line 2010 "yacc_sql.cpp" break; - case 41: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 41: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 398 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); @@ -2021,69 +3972,74 @@ YYLTYPE yylloc = yyloc_default; #line 2022 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ + case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ #line 408 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } #line 2030 "yacc_sql.cpp" break; - case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ + case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ #line 412 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } #line 2038 "yacc_sql.cpp" break; - case 44: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 44: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 416 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } #line 2046 "yacc_sql.cpp" break; - case 45: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ + case 45: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ #line 420 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = + create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } #line 2054 "yacc_sql.cpp" break; - case 46: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ + case 46: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ #line 424 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = + create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } #line 2062 "yacc_sql.cpp" break; - case 47: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ + case 47: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ #line 431 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; - create_view.relation_name = (yyvsp[-2].string); + create_view.relation_name = (yyvsp[-2].string); create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } #line 2074 "yacc_sql.cpp" break; - case 48: /* drop_view_stmt: DROP VIEW ID */ + case 48: /* drop_view_stmt: DROP VIEW ID */ #line 442 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 2084 "yacc_sql.cpp" break; - case 49: /* attr_def_list: %empty */ + case 49: /* attr_def_list: %empty */ #line 451 "yacc_sql.y" { (yyval.attr_infos) = nullptr; @@ -2091,7 +4047,7 @@ YYLTYPE yylloc = yyloc_default; #line 2092 "yacc_sql.cpp" break; - case 50: /* attr_def_list: COMMA attr_def attr_def_list */ + case 50: /* attr_def_list: COMMA attr_def attr_def_list */ #line 455 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -2105,13 +4061,13 @@ YYLTYPE yylloc = yyloc_default; #line 2106 "yacc_sql.cpp" break; - case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ + case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ #line 468 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; @@ -2121,10 +4077,10 @@ YYLTYPE yylloc = yyloc_default; #line 2122 "yacc_sql.cpp" break; - case 52: /* attr_def: ID type nullable_constraint */ + case 52: /* attr_def: ID type nullable_constraint */ #line 480 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -2149,7 +4105,7 @@ YYLTYPE yylloc = yyloc_default; #line 2150 "yacc_sql.cpp" break; - case 53: /* nullable_constraint: NOT NULL_T */ + case 53: /* nullable_constraint: NOT NULL_T */ #line 507 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false @@ -2157,7 +4113,7 @@ YYLTYPE yylloc = yyloc_default; #line 2158 "yacc_sql.cpp" break; - case 54: /* nullable_constraint: NULLABLE */ + case 54: /* nullable_constraint: NULLABLE */ #line 511 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 @@ -2165,7 +4121,7 @@ YYLTYPE yylloc = yyloc_default; #line 2166 "yacc_sql.cpp" break; - case 55: /* nullable_constraint: NULL_T */ + case 55: /* nullable_constraint: NULL_T */ #line 515 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 @@ -2173,7 +4129,7 @@ YYLTYPE yylloc = yyloc_default; #line 2174 "yacc_sql.cpp" break; - case 56: /* nullable_constraint: %empty */ + case 56: /* nullable_constraint: %empty */ #line 519 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL @@ -2181,40 +4137,50 @@ YYLTYPE yylloc = yyloc_default; #line 2182 "yacc_sql.cpp" break; - case 57: /* type: INT_T */ + case 57: /* type: INT_T */ #line 525 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::INTS); } + { + (yyval.number) = static_cast(AttrType::INTS); + } #line 2188 "yacc_sql.cpp" break; - case 58: /* type: STRING_T */ + case 58: /* type: STRING_T */ #line 526 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::CHARS); } + { + (yyval.number) = static_cast(AttrType::CHARS); + } #line 2194 "yacc_sql.cpp" break; - case 59: /* type: FLOAT_T */ + case 59: /* type: FLOAT_T */ #line 527 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::FLOATS); } + { + (yyval.number) = static_cast(AttrType::FLOATS); + } #line 2200 "yacc_sql.cpp" break; - case 60: /* type: DATE_T */ + case 60: /* type: DATE_T */ #line 528 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::DATES); } + { + (yyval.number) = static_cast(AttrType::DATES); + } #line 2206 "yacc_sql.cpp" break; - case 61: /* type: TEXT_T */ + case 61: /* type: TEXT_T */ #line 529 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::TEXTS); } + { + (yyval.number) = static_cast(AttrType::TEXTS); + } #line 2212 "yacc_sql.cpp" break; - case 62: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 62: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 534 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -2225,7 +4191,7 @@ YYLTYPE yylloc = yyloc_default; #line 2226 "yacc_sql.cpp" break; - case 63: /* values_list: LBRACE value_list RBRACE */ + case 63: /* values_list: LBRACE value_list RBRACE */ #line 547 "yacc_sql.y" { (yyval.values_list) = new std::vector>; @@ -2235,7 +4201,7 @@ YYLTYPE yylloc = yyloc_default; #line 2236 "yacc_sql.cpp" break; - case 64: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 64: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 553 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); @@ -2244,7 +4210,7 @@ YYLTYPE yylloc = yyloc_default; #line 2245 "yacc_sql.cpp" break; - case 65: /* value_list: value */ + case 65: /* value_list: value */ #line 560 "yacc_sql.y" { (yyval.value_list) = new std::vector; @@ -2254,7 +4220,7 @@ YYLTYPE yylloc = yyloc_default; #line 2255 "yacc_sql.cpp" break; - case 66: /* value_list: value_list COMMA value */ + case 66: /* value_list: value_list COMMA value */ #line 566 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); @@ -2263,54 +4229,54 @@ YYLTYPE yylloc = yyloc_default; #line 2264 "yacc_sql.cpp" break; - case 67: /* value: nonnegative_value */ + case 67: /* value: nonnegative_value */ #line 573 "yacc_sql.y" - { + { (yyval.value) = (yyvsp[0].value); } #line 2272 "yacc_sql.cpp" break; - case 68: /* value: '-' NUMBER */ + case 68: /* value: '-' NUMBER */ #line 576 "yacc_sql.y" - { + { (yyval.value) = new Value(-(yyvsp[0].number)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } #line 2281 "yacc_sql.cpp" break; - case 69: /* value: '-' FLOAT */ + case 69: /* value: '-' FLOAT */ #line 580 "yacc_sql.y" - { + { (yyval.value) = new Value(-(yyvsp[0].floats)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } #line 2290 "yacc_sql.cpp" break; - case 70: /* nonnegative_value: NUMBER */ + case 70: /* nonnegative_value: NUMBER */ #line 587 "yacc_sql.y" - { + { (yyval.value) = new Value((yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2299 "yacc_sql.cpp" break; - case 71: /* nonnegative_value: FLOAT */ + case 71: /* nonnegative_value: FLOAT */ #line 591 "yacc_sql.y" - { + { (yyval.value) = new Value((yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2308 "yacc_sql.cpp" break; - case 72: /* nonnegative_value: SSS */ + case 72: /* nonnegative_value: SSS */ #line 595 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); + { + char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); @@ -2318,15 +4284,15 @@ YYLTYPE yylloc = yyloc_default; #line 2319 "yacc_sql.cpp" break; - case 73: /* nonnegative_value: NULL_T */ + case 73: /* nonnegative_value: NULL_T */ #line 601 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } #line 2327 "yacc_sql.cpp" break; - case 74: /* storage_format: %empty */ + case 74: /* storage_format: %empty */ #line 608 "yacc_sql.y" { (yyval.string) = nullptr; @@ -2334,7 +4300,7 @@ YYLTYPE yylloc = yyloc_default; #line 2335 "yacc_sql.cpp" break; - case 75: /* storage_format: STORAGE FORMAT EQ ID */ + case 75: /* storage_format: STORAGE FORMAT EQ ID */ #line 612 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); @@ -2342,10 +4308,10 @@ YYLTYPE yylloc = yyloc_default; #line 2343 "yacc_sql.cpp" break; - case 76: /* delete_stmt: DELETE FROM ID where */ + case 76: /* delete_stmt: DELETE FROM ID where */ #line 619 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); @@ -2355,10 +4321,10 @@ YYLTYPE yylloc = yyloc_default; #line 2356 "yacc_sql.cpp" break; - case 77: /* update_stmt: UPDATE ID SET setClauses where */ + case 77: /* update_stmt: UPDATE ID SET setClauses where */ #line 631 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -2370,7 +4336,7 @@ YYLTYPE yylloc = yyloc_default; #line 2371 "yacc_sql.cpp" break; - case 78: /* setClauses: setClause */ + case 78: /* setClauses: setClause */ #line 645 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; @@ -2379,7 +4345,7 @@ YYLTYPE yylloc = yyloc_default; #line 2380 "yacc_sql.cpp" break; - case 79: /* setClauses: setClauses COMMA setClause */ + case 79: /* setClauses: setClauses COMMA setClause */ #line 650 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); @@ -2387,18 +4353,18 @@ YYLTYPE yylloc = yyloc_default; #line 2388 "yacc_sql.cpp" break; - case 80: /* setClause: ID EQ expression */ + case 80: /* setClause: ID EQ expression */ #line 657 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } #line 2399 "yacc_sql.cpp" break; - case 81: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ + case 81: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ #line 667 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2435,7 +4401,7 @@ YYLTYPE yylloc = yyloc_default; #line 2436 "yacc_sql.cpp" break; - case 82: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ + case 82: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ #line 700 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2450,7 +4416,8 @@ YYLTYPE yylloc = yyloc_default; } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); + ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -2458,7 +4425,8 @@ YYLTYPE yylloc = yyloc_default; if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -2469,7 +4437,7 @@ YYLTYPE yylloc = yyloc_default; #line 2470 "yacc_sql.cpp" break; - case 83: /* calc_stmt: CALC expression_list */ + case 83: /* calc_stmt: CALC expression_list */ #line 733 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -2479,7 +4447,7 @@ YYLTYPE yylloc = yyloc_default; #line 2480 "yacc_sql.cpp" break; - case 84: /* calc_stmt: SELECT expression_list */ + case 84: /* calc_stmt: SELECT expression_list */ #line 739 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -2489,15 +4457,15 @@ YYLTYPE yylloc = yyloc_default; #line 2490 "yacc_sql.cpp" break; - case 85: /* expression_list: %empty */ + case 85: /* expression_list: %empty */ #line 747 "yacc_sql.y" - { + { (yyval.expression_list) = new std::vector>; } #line 2498 "yacc_sql.cpp" break; - case 86: /* expression_list: expression alias */ + case 86: /* expression_list: expression alias */ #line 751 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; @@ -2510,7 +4478,7 @@ YYLTYPE yylloc = yyloc_default; #line 2511 "yacc_sql.cpp" break; - case 87: /* expression_list: expression alias COMMA expression_list */ + case 87: /* expression_list: expression alias COMMA expression_list */ #line 760 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -2521,47 +4489,51 @@ YYLTYPE yylloc = yyloc_default; if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } #line 2528 "yacc_sql.cpp" break; - case 88: /* expression: expression '+' expression */ + case 88: /* expression: expression '+' expression */ #line 775 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2536 "yacc_sql.cpp" break; - case 89: /* expression: expression '-' expression */ + case 89: /* expression: expression '-' expression */ #line 778 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2544 "yacc_sql.cpp" break; - case 90: /* expression: expression '*' expression */ + case 90: /* expression: expression '*' expression */ #line 781 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2552 "yacc_sql.cpp" break; - case 91: /* expression: expression '/' expression */ + case 91: /* expression: expression '/' expression */ #line 784 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2560 "yacc_sql.cpp" break; - case 92: /* expression: LBRACE expression_list RBRACE */ + case 92: /* expression: LBRACE expression_list RBRACE */ #line 787 "yacc_sql.y" - { + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -2572,17 +4544,18 @@ YYLTYPE yylloc = yyloc_default; #line 2573 "yacc_sql.cpp" break; - case 93: /* expression: '-' expression */ + case 93: /* expression: '-' expression */ #line 795 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } #line 2581 "yacc_sql.cpp" break; - case 94: /* expression: nonnegative_value */ + case 94: /* expression: nonnegative_value */ #line 798 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); @@ -2590,82 +4563,82 @@ YYLTYPE yylloc = yyloc_default; #line 2591 "yacc_sql.cpp" break; - case 95: /* expression: rel_attr */ + case 95: /* expression: rel_attr */ #line 803 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } #line 2602 "yacc_sql.cpp" break; - case 96: /* expression: '*' */ + case 96: /* expression: '*' */ #line 809 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } #line 2610 "yacc_sql.cpp" break; - case 97: /* expression: ID DOT '*' */ + case 97: /* expression: ID DOT '*' */ #line 812 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } #line 2618 "yacc_sql.cpp" break; - case 98: /* expression: aggr_func_expr */ + case 98: /* expression: aggr_func_expr */ #line 815 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } #line 2626 "yacc_sql.cpp" break; - case 99: /* expression: sub_query_expr */ + case 99: /* expression: sub_query_expr */ #line 818 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } #line 2634 "yacc_sql.cpp" break; - case 100: /* alias: %empty */ + case 100: /* alias: %empty */ #line 825 "yacc_sql.y" - { + { (yyval.string) = nullptr; } #line 2642 "yacc_sql.cpp" break; - case 101: /* alias: ID */ + case 101: /* alias: ID */ #line 828 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2650 "yacc_sql.cpp" break; - case 102: /* alias: AS ID */ + case 102: /* alias: AS ID */ #line 831 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2658 "yacc_sql.cpp" break; - case 103: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 103: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 837 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } #line 2666 "yacc_sql.cpp" break; - case 104: /* sub_query_expr: LBRACE select_stmt RBRACE */ + case 104: /* sub_query_expr: LBRACE select_stmt RBRACE */ #line 844 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); @@ -2673,20 +4646,20 @@ YYLTYPE yylloc = yyloc_default; #line 2674 "yacc_sql.cpp" break; - case 105: /* rel_attr: ID */ + case 105: /* rel_attr: ID */ #line 850 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 2684 "yacc_sql.cpp" break; - case 106: /* rel_attr: ID DOT ID */ + case 106: /* rel_attr: ID DOT ID */ #line 855 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); @@ -2695,22 +4668,22 @@ YYLTYPE yylloc = yyloc_default; #line 2696 "yacc_sql.cpp" break; - case 107: /* relation: ID */ + case 107: /* relation: ID */ #line 865 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2704 "yacc_sql.cpp" break; - case 108: /* rel_list: relation alias */ + case 108: /* rel_list: relation alias */ #line 871 "yacc_sql.y" - { + { (yyval.relation_list) = new std::vector(); - if(nullptr!=(yyvsp[0].string)){ - (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); + if (nullptr != (yyvsp[0].string)) { + (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); free((yyvsp[0].string)); - }else{ + } else { (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); @@ -2718,18 +4691,19 @@ YYLTYPE yylloc = yyloc_default; #line 2719 "yacc_sql.cpp" break; - case 109: /* rel_list: relation alias COMMA rel_list */ + case 109: /* rel_list: relation alias COMMA rel_list */ #line 881 "yacc_sql.y" - { + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if(nullptr!=(yyvsp[-2].string)){ - (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); + if (nullptr != (yyvsp[-2].string)) { + (yyval.relation_list) + ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); free((yyvsp[-2].string)); - }else{ + } else { (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); @@ -2737,7 +4711,7 @@ YYLTYPE yylloc = yyloc_default; #line 2738 "yacc_sql.cpp" break; - case 110: /* joinClauses: relation ON condition */ + case 110: /* joinClauses: relation ON condition */ #line 899 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; @@ -2748,19 +4722,20 @@ YYLTYPE yylloc = yyloc_default; #line 2749 "yacc_sql.cpp" break; - case 111: /* joinClauses: relation ON condition INNER JOIN joinClauses */ + case 111: /* joinClauses: relation ON condition INNER JOIN joinClauses */ #line 906 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } #line 2761 "yacc_sql.cpp" break; - case 112: /* where: %empty */ + case 112: /* where: %empty */ #line 917 "yacc_sql.y" { (yyval.expression) = nullptr; @@ -2768,15 +4743,15 @@ YYLTYPE yylloc = yyloc_default; #line 2769 "yacc_sql.cpp" break; - case 113: /* where: WHERE condition */ + case 113: /* where: WHERE condition */ #line 920 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + { + (yyval.expression) = (yyvsp[0].expression); } #line 2777 "yacc_sql.cpp" break; - case 114: /* condition: expression comp_op expression */ + case 114: /* condition: expression comp_op expression */ #line 927 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); @@ -2784,118 +4759,148 @@ YYLTYPE yylloc = yyloc_default; #line 2785 "yacc_sql.cpp" break; - case 115: /* condition: comp_op expression */ + case 115: /* condition: comp_op expression */ #line 931 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); - (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); } #line 2796 "yacc_sql.cpp" break; - case 116: /* condition: condition AND condition */ + case 116: /* condition: condition AND condition */ #line 938 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2804 "yacc_sql.cpp" break; - case 117: /* condition: condition OR condition */ + case 117: /* condition: condition OR condition */ #line 942 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2812 "yacc_sql.cpp" break; - case 118: /* comp_op: EQ */ + case 118: /* comp_op: EQ */ #line 948 "yacc_sql.y" - { (yyval.comp) = EQUAL_TO; } + { + (yyval.comp) = EQUAL_TO; + } #line 2818 "yacc_sql.cpp" break; - case 119: /* comp_op: LT */ + case 119: /* comp_op: LT */ #line 949 "yacc_sql.y" - { (yyval.comp) = LESS_THAN; } + { + (yyval.comp) = LESS_THAN; + } #line 2824 "yacc_sql.cpp" break; - case 120: /* comp_op: GT */ + case 120: /* comp_op: GT */ #line 950 "yacc_sql.y" - { (yyval.comp) = GREAT_THAN; } + { + (yyval.comp) = GREAT_THAN; + } #line 2830 "yacc_sql.cpp" break; - case 121: /* comp_op: LE */ + case 121: /* comp_op: LE */ #line 951 "yacc_sql.y" - { (yyval.comp) = LESS_EQUAL; } + { + (yyval.comp) = LESS_EQUAL; + } #line 2836 "yacc_sql.cpp" break; - case 122: /* comp_op: GE */ + case 122: /* comp_op: GE */ #line 952 "yacc_sql.y" - { (yyval.comp) = GREAT_EQUAL; } + { + (yyval.comp) = GREAT_EQUAL; + } #line 2842 "yacc_sql.cpp" break; - case 123: /* comp_op: NE */ + case 123: /* comp_op: NE */ #line 953 "yacc_sql.y" - { (yyval.comp) = NOT_EQUAL; } + { + (yyval.comp) = NOT_EQUAL; + } #line 2848 "yacc_sql.cpp" break; - case 124: /* comp_op: IS */ + case 124: /* comp_op: IS */ #line 954 "yacc_sql.y" - { (yyval.comp) = IS_OP; } + { + (yyval.comp) = IS_OP; + } #line 2854 "yacc_sql.cpp" break; - case 125: /* comp_op: IS NOT */ + case 125: /* comp_op: IS NOT */ #line 955 "yacc_sql.y" - { (yyval.comp) = IS_NOT_OP; } + { + (yyval.comp) = IS_NOT_OP; + } #line 2860 "yacc_sql.cpp" break; - case 126: /* comp_op: LIKE */ + case 126: /* comp_op: LIKE */ #line 956 "yacc_sql.y" - { (yyval.comp) = LIKE_OP;} + { + (yyval.comp) = LIKE_OP; + } #line 2866 "yacc_sql.cpp" break; - case 127: /* comp_op: NOT LIKE */ + case 127: /* comp_op: NOT LIKE */ #line 957 "yacc_sql.y" - {(yyval.comp) = NOT_LIKE_OP;} + { + (yyval.comp) = NOT_LIKE_OP; + } #line 2872 "yacc_sql.cpp" break; - case 128: /* comp_op: IN */ + case 128: /* comp_op: IN */ #line 958 "yacc_sql.y" - { (yyval.comp) = IN_OP; } + { + (yyval.comp) = IN_OP; + } #line 2878 "yacc_sql.cpp" break; - case 129: /* comp_op: NOT IN */ + case 129: /* comp_op: NOT IN */ #line 959 "yacc_sql.y" - { (yyval.comp) = NOT_IN_OP; } + { + (yyval.comp) = NOT_IN_OP; + } #line 2884 "yacc_sql.cpp" break; - case 130: /* comp_op: EXISTS */ + case 130: /* comp_op: EXISTS */ #line 960 "yacc_sql.y" - { (yyval.comp) = EXISTS_OP; } + { + (yyval.comp) = EXISTS_OP; + } #line 2890 "yacc_sql.cpp" break; - case 131: /* comp_op: NOT EXISTS */ + case 131: /* comp_op: NOT EXISTS */ #line 961 "yacc_sql.y" - { (yyval.comp) = NOT_EXISTS_OP; } + { + (yyval.comp) = NOT_EXISTS_OP; + } #line 2896 "yacc_sql.cpp" break; - case 132: /* opt_order_by: %empty */ + case 132: /* opt_order_by: %empty */ #line 966 "yacc_sql.y" { (yyval.orderby_list) = nullptr; @@ -2903,64 +4908,64 @@ YYLTYPE yylloc = yyloc_default; #line 2904 "yacc_sql.cpp" break; - case 133: /* opt_order_by: ORDER BY sort_list */ + case 133: /* opt_order_by: ORDER BY sort_list */ #line 970 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } #line 2913 "yacc_sql.cpp" break; - case 134: /* sort_list: sort_unit */ + case 134: /* sort_list: sort_unit */ #line 978 "yacc_sql.y" - { + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } + } #line 2922 "yacc_sql.cpp" break; - case 135: /* sort_list: sort_unit COMMA sort_list */ + case 135: /* sort_list: sort_unit COMMA sort_list */ #line 983 "yacc_sql.y" - { + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } + } #line 2931 "yacc_sql.cpp" break; - case 136: /* sort_unit: expression */ + case 136: /* sort_unit: expression */ #line 991 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2941 "yacc_sql.cpp" break; - case 137: /* sort_unit: expression DESC */ + case 137: /* sort_unit: expression DESC */ #line 997 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } + } #line 2951 "yacc_sql.cpp" break; - case 138: /* sort_unit: expression ASC */ + case 138: /* sort_unit: expression ASC */ #line 1003 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2961 "yacc_sql.cpp" break; - case 139: /* group_by: %empty */ + case 139: /* group_by: %empty */ #line 1012 "yacc_sql.y" { (yyval.expression_list) = nullptr; @@ -2968,7 +4973,7 @@ YYLTYPE yylloc = yyloc_default; #line 2969 "yacc_sql.cpp" break; - case 140: /* group_by: GROUP BY expression_list */ + case 140: /* group_by: GROUP BY expression_list */ #line 1016 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2976,7 +4981,7 @@ YYLTYPE yylloc = yyloc_default; #line 2977 "yacc_sql.cpp" break; - case 141: /* opt_having: %empty */ + case 141: /* opt_having: %empty */ #line 1023 "yacc_sql.y" { (yyval.expression) = nullptr; @@ -2984,7 +4989,7 @@ YYLTYPE yylloc = yyloc_default; #line 2985 "yacc_sql.cpp" break; - case 142: /* opt_having: HAVING condition */ + case 142: /* opt_having: HAVING condition */ #line 1027 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); @@ -2992,33 +4997,33 @@ YYLTYPE yylloc = yyloc_default; #line 2993 "yacc_sql.cpp" break; - case 143: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ + case 143: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ #line 1034 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } #line 3007 "yacc_sql.cpp" break; - case 144: /* explain_stmt: EXPLAIN command_wrapper */ + case 144: /* explain_stmt: EXPLAIN command_wrapper */ #line 1047 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } #line 3016 "yacc_sql.cpp" break; - case 145: /* set_variable_stmt: SET ID EQ value */ + case 145: /* set_variable_stmt: SET ID EQ value */ #line 1055 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); @@ -3027,11 +5032,10 @@ YYLTYPE yylloc = yyloc_default; #line 3028 "yacc_sql.cpp" break; - #line 3032 "yacc_sql.cpp" - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -3043,9 +5047,9 @@ YYLTYPE yylloc = yyloc_default; case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; *++yyvsp = yyval; @@ -3056,84 +5060,67 @@ YYLTYPE yylloc = yyloc_default; number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp - ? yytable[yyi] - : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; - /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) - { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } - } - yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; + if (!yyerrstatus) { + ++yynerrs; + { + yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) { + if (yymsg != yymsgbuf) + YYSTACK_FREE(yymsg); + yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); + if (yymsg) { + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } else { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } } + yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } + } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; - } + if (yychar <= YYEOF) { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else { + yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; } + } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; - /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -3146,45 +5133,40 @@ YYLTYPE yylloc = yyloc_default; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); yystate = *yyssp; goto yyerrlab1; - /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) { + yyn = yypact[yystate]; + if (!yypact_value_is_default(yyn)) { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + yystate = *yyssp; + YY_STACK_PRINT(yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3192,15 +5174,14 @@ YYLTYPE yylloc = yyloc_default; yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; - /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -3208,7 +5189,6 @@ YYLTYPE yylloc = yyloc_default; yyresult = 0; goto yyreturnlab; - /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -3216,44 +5196,38 @@ YYLTYPE yylloc = yyloc_default; yyresult = 1; goto yyreturnlab; - /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; - /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE(yychar); + yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - } + YYPOPSTACK(yylen); + YY_STACK_PRINT(yyss, yyssp); + while (yyssp != yyss) { + yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE (yyss); + YYSTACK_FREE(yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); + YYSTACK_FREE(yymsg); return yyresult; } @@ -3262,7 +5236,8 @@ YYLTYPE yylloc = yyloc_default; //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) { +int sql_parse(const char *s, ParsedSqlResult *sql_result) +{ yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 9b0d0021..b0f45163 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -# define YY_YY_YACC_SQL_HPP_INCLUDED +#define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -# define YYDEBUG 0 +#define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,127 +47,126 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - HAVING = 266, /* HAVING */ - ORDER = 267, /* ORDER */ - TABLE = 268, /* TABLE */ - TABLES = 269, /* TABLES */ - INDEX = 270, /* INDEX */ - CALC = 271, /* CALC */ - SELECT = 272, /* SELECT */ - DESC = 273, /* DESC */ - SHOW = 274, /* SHOW */ - SYNC = 275, /* SYNC */ - INSERT = 276, /* INSERT */ - DELETE = 277, /* DELETE */ - UPDATE = 278, /* UPDATE */ - LBRACE = 279, /* LBRACE */ - RBRACE = 280, /* RBRACE */ - COMMA = 281, /* COMMA */ - TRX_BEGIN = 282, /* TRX_BEGIN */ - TRX_COMMIT = 283, /* TRX_COMMIT */ - TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ - INT_T = 285, /* INT_T */ - IN = 286, /* IN */ - STRING_T = 287, /* STRING_T */ - FLOAT_T = 288, /* FLOAT_T */ - DATE_T = 289, /* DATE_T */ - TEXT_T = 290, /* TEXT_T */ - NOT = 291, /* NOT */ - UNIQUE = 292, /* UNIQUE */ - NULL_T = 293, /* NULL_T */ - NULLABLE = 294, /* NULLABLE */ - HELP = 295, /* HELP */ - EXIT = 296, /* EXIT */ - DOT = 297, /* DOT */ - INTO = 298, /* INTO */ - VALUES = 299, /* VALUES */ - FROM = 300, /* FROM */ - WHERE = 301, /* WHERE */ - AND = 302, /* AND */ - OR = 303, /* OR */ - SET = 304, /* SET */ - ON = 305, /* ON */ - LOAD = 306, /* LOAD */ - DATA = 307, /* DATA */ - INFILE = 308, /* INFILE */ - EXPLAIN = 309, /* EXPLAIN */ - STORAGE = 310, /* STORAGE */ - FORMAT = 311, /* FORMAT */ - INNER = 312, /* INNER */ - JOIN = 313, /* JOIN */ - VIEW = 314, /* VIEW */ - EQ = 315, /* EQ */ - LT = 316, /* LT */ - GT = 317, /* GT */ - LE = 318, /* LE */ - GE = 319, /* GE */ - NE = 320, /* NE */ - LIKE = 321, /* LIKE */ - IS = 322, /* IS */ - NUMBER = 323, /* NUMBER */ - FLOAT = 324, /* FLOAT */ - ID = 325, /* ID */ - SSS = 326, /* SSS */ - UMINUS = 327 /* UMINUS */ - }; - typedef enum yytokentype yytoken_kind_t; +#define YYTOKENTYPE +enum yytokentype +{ + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + HAVING = 266, /* HAVING */ + ORDER = 267, /* ORDER */ + TABLE = 268, /* TABLE */ + TABLES = 269, /* TABLES */ + INDEX = 270, /* INDEX */ + CALC = 271, /* CALC */ + SELECT = 272, /* SELECT */ + DESC = 273, /* DESC */ + SHOW = 274, /* SHOW */ + SYNC = 275, /* SYNC */ + INSERT = 276, /* INSERT */ + DELETE = 277, /* DELETE */ + UPDATE = 278, /* UPDATE */ + LBRACE = 279, /* LBRACE */ + RBRACE = 280, /* RBRACE */ + COMMA = 281, /* COMMA */ + TRX_BEGIN = 282, /* TRX_BEGIN */ + TRX_COMMIT = 283, /* TRX_COMMIT */ + TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ + INT_T = 285, /* INT_T */ + IN = 286, /* IN */ + STRING_T = 287, /* STRING_T */ + FLOAT_T = 288, /* FLOAT_T */ + DATE_T = 289, /* DATE_T */ + TEXT_T = 290, /* TEXT_T */ + NOT = 291, /* NOT */ + UNIQUE = 292, /* UNIQUE */ + NULL_T = 293, /* NULL_T */ + NULLABLE = 294, /* NULLABLE */ + HELP = 295, /* HELP */ + EXIT = 296, /* EXIT */ + DOT = 297, /* DOT */ + INTO = 298, /* INTO */ + VALUES = 299, /* VALUES */ + FROM = 300, /* FROM */ + WHERE = 301, /* WHERE */ + AND = 302, /* AND */ + OR = 303, /* OR */ + SET = 304, /* SET */ + ON = 305, /* ON */ + LOAD = 306, /* LOAD */ + DATA = 307, /* DATA */ + INFILE = 308, /* INFILE */ + EXPLAIN = 309, /* EXPLAIN */ + STORAGE = 310, /* STORAGE */ + FORMAT = 311, /* FORMAT */ + INNER = 312, /* INNER */ + JOIN = 313, /* JOIN */ + VIEW = 314, /* VIEW */ + EQ = 315, /* EQ */ + LT = 316, /* LT */ + GT = 317, /* GT */ + LE = 318, /* LE */ + GE = 319, /* GE */ + NE = 320, /* NE */ + LIKE = 321, /* LIKE */ + IS = 322, /* IS */ + NUMBER = 323, /* NUMBER */ + FLOAT = 324, /* FLOAT */ + ID = 325, /* ID */ + SSS = 326, /* SSS */ + UMINUS = 327 /* UMINUS */ +}; +typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 164 "yacc_sql.y" - ParsedSqlNode * sql_node; - Value * value; - enum CompOp comp; - RelAttrSqlNode * rel_attr; - std::vector * attr_infos; - AttrInfoSqlNode * attr_info; - Expression * expression; - std::vector> * expression_list; - std::vector * value_list; - std::vector> * values_list; - SetClauseSqlNode * set_clause; - std::vector * set_clauses; - JoinSqlNode * join_clauses; - std::vector * rel_attr_list; - std::vector * relation_list; - OrderBySqlNode * orderby_unit; - std::vector * orderby_list; - char * string; - int number; - float floats; - bool nullable_info; - std::vector * index_attr_list; - bool unique; + ParsedSqlNode *sql_node; + Value *value; + enum CompOp comp; + RelAttrSqlNode *rel_attr; + std::vector *attr_infos; + AttrInfoSqlNode *attr_info; + Expression *expression; + std::vector> *expression_list; + std::vector *value_list; + std::vector> *values_list; + SetClauseSqlNode *set_clause; + std::vector *set_clauses; + JoinSqlNode *join_clauses; + std::vector *rel_attr_list; + std::vector *relation_list; + OrderBySqlNode *orderby_unit; + std::vector *orderby_list; + char *string; + int number; + float floats; + bool nullable_info; + std::vector *index_attr_list; + bool unique; #line 162 "yacc_sql.hpp" - }; typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 +#define YYSTYPE_IS_TRIVIAL 1 +#define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -176,14 +175,10 @@ struct YYLTYPE int last_line; int last_column; }; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 +#define YYLTYPE_IS_DECLARED 1 +#define YYLTYPE_IS_TRIVIAL 1 #endif - - - -int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); - +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/stmt/create_index_stmt.cpp b/src/observer/sql/stmt/create_index_stmt.cpp index 35e09c6d..05ad3cb7 100644 --- a/src/observer/sql/stmt/create_index_stmt.cpp +++ b/src/observer/sql/stmt/create_index_stmt.cpp @@ -33,12 +33,19 @@ RC CreateIndexStmt::create(Db *db, const CreateIndexSqlNode &create_index, Stmt } // check whether the table exists - Table *table = db->find_table(table_name); - if (nullptr == table) { + BaseTable *base_table = db->find_table(table_name); + if (nullptr == base_table) { LOG_WARN("no such table. db=%s, table_name=%s", db->name(), table_name); return RC::SCHEMA_TABLE_NOT_EXIST; } + if (base_table->type() != TableType::Table) { + LOG_WARN("table %s is not BASE TABLE. db=%s", + table_name, db->name()); + return RC::CREATE_INDEX_ON_NON_TABLE_TYPE; + } + + Table *table = static_cast
(base_table); vector field_metas; RC rc = table->table_meta().get_field_metas(create_index.attribute_name, field_metas); if (OB_FAIL(rc)) { diff --git a/src/observer/sql/stmt/create_view_stmt.cpp b/src/observer/sql/stmt/create_view_stmt.cpp new file mode 100644 index 00000000..403af4d9 --- /dev/null +++ b/src/observer/sql/stmt/create_view_stmt.cpp @@ -0,0 +1,35 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "create_view_stmt.h" +#include "sql/stmt/create_table_stmt.h" +#include "event/sql_debug.h" + +RC CreateViewStmt::create(Db *db, CreateViewSqlNode &create_view, Stmt *&stmt) +{ + SelectStmt *select_stmt = nullptr; + if (create_view.create_view_select) { + Stmt *create_view_select_stmt; + RC rc = SelectStmt::create(db, *create_view.create_view_select, create_view_select_stmt); + if (OB_FAIL(rc)) { + return rc; + } + select_stmt = dynamic_cast(create_view_select_stmt); + if (select_stmt == nullptr) { + return RC::INTERNAL; + } + } + + stmt = new CreateViewStmt(create_view.relation_name, select_stmt); + sql_debug("create view statement: view name %s", create_view.relation_name.c_str()); + return RC::SUCCESS; +} diff --git a/src/observer/sql/stmt/create_view_stmt.h b/src/observer/sql/stmt/create_view_stmt.h new file mode 100644 index 00000000..d6ece706 --- /dev/null +++ b/src/observer/sql/stmt/create_view_stmt.h @@ -0,0 +1,49 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include +#include +#include + +#include "sql/stmt/stmt.h" +#include "select_stmt.h" + +class Db; + +/** + * @brief 表示创建表的语句 + * @ingroup Statement + * @details 虽然解析成了stmt,但是与原始的SQL解析后的数据也差不多 + */ +class CreateViewStmt : public Stmt +{ +public: + CreateViewStmt(std::string table_name, SelectStmt *select_stmt) + : table_name_(std::move(table_name)), select_stmt_(select_stmt) + {} + ~CreateViewStmt() override = default; + + StmtType type() const override { return StmtType::CREATE_VIEW; } + + const std::string &table_name() const { return table_name_; } + const std::vector &attr_infos() const { return attr_infos_; } + SelectStmt *select_stmt() { return select_stmt_; } + + static RC create(Db *db, CreateViewSqlNode &create_view, Stmt *&stmt); + +private: + std::string table_name_; + std::vector attr_infos_; + SelectStmt *select_stmt_; +}; diff --git a/src/observer/sql/stmt/delete_stmt.cpp b/src/observer/sql/stmt/delete_stmt.cpp index 0daa7135..69617a0c 100644 --- a/src/observer/sql/stmt/delete_stmt.cpp +++ b/src/observer/sql/stmt/delete_stmt.cpp @@ -18,7 +18,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/db/db.h" #include "storage/table/table.h" -DeleteStmt::DeleteStmt(Table *table, FilterStmt *filter_stmt) : table_(table), filter_stmt_(filter_stmt) {} +DeleteStmt::DeleteStmt(BaseTable *table, FilterStmt *filter_stmt) : table_(table), filter_stmt_(filter_stmt) {} DeleteStmt::~DeleteStmt() { @@ -37,14 +37,14 @@ RC DeleteStmt::create(Db *db, DeleteSqlNode &delete_sql, Stmt *&stmt) } // check whether the table exists - Table *table = db->find_table(table_name); + BaseTable *table = db->find_table(table_name); if (nullptr == table) { LOG_WARN("no such table. db=%s, table_name=%s", db->name(), table_name); return RC::SCHEMA_TABLE_NOT_EXIST; } - std::unordered_map table_map; - table_map.insert(std::pair(std::string(table_name), table)); + std::unordered_map table_map; + table_map.insert(std::pair(std::string(table_name), table)); FilterStmt *filter_stmt = nullptr; RC rc = FilterStmt::create(db, table, &table_map, delete_sql.condition, filter_stmt); diff --git a/src/observer/sql/stmt/delete_stmt.h b/src/observer/sql/stmt/delete_stmt.h index b9f39ceb..0d3a6300 100644 --- a/src/observer/sql/stmt/delete_stmt.h +++ b/src/observer/sql/stmt/delete_stmt.h @@ -17,7 +17,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/parser/parse_defs.h" #include "sql/stmt/stmt.h" -class Table; +class BaseTable; class FilterStmt; /** @@ -27,10 +27,10 @@ class FilterStmt; class DeleteStmt : public Stmt { public: - DeleteStmt(Table *table, FilterStmt *filter_stmt); + DeleteStmt(BaseTable *table, FilterStmt *filter_stmt); ~DeleteStmt() override; - Table *table() const { return table_; } + BaseTable *table() const { return table_; } FilterStmt *filter_stmt() const { return filter_stmt_; } StmtType type() const override { return StmtType::DELETE; } @@ -39,6 +39,6 @@ class DeleteStmt : public Stmt static RC create(Db *db, DeleteSqlNode &delete_sql, Stmt *&stmt); private: - Table *table_ = nullptr; + BaseTable *table_ = nullptr; FilterStmt *filter_stmt_ = nullptr; }; diff --git a/src/observer/sql/stmt/drop_view_stmt.cpp b/src/observer/sql/stmt/drop_view_stmt.cpp new file mode 100644 index 00000000..607e6038 --- /dev/null +++ b/src/observer/sql/stmt/drop_view_stmt.cpp @@ -0,0 +1,21 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "drop_view_stmt.h" +#include "event/sql_debug.h" + +RC DropViewStmt::create(Db *db, const DropViewSqlNode &drop_view, Stmt *&stmt) +{ + stmt = new DropViewStmt(drop_view.relation_name); + sql_debug("drop view statement: view name %s", drop_view.relation_name.c_str()); + return RC::SUCCESS; +} diff --git a/src/observer/sql/stmt/drop_view_stmt.h b/src/observer/sql/stmt/drop_view_stmt.h new file mode 100644 index 00000000..5bc018fb --- /dev/null +++ b/src/observer/sql/stmt/drop_view_stmt.h @@ -0,0 +1,41 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include +#include + +#include "sql/stmt/stmt.h" + +class Db; + +/** + * @brief 表示删除视图的语句 + * @ingroup Statement + * @details 虽然解析成了stmt,但是与原始的SQL解析后的数据也差不多 + */ +class DropViewStmt : public Stmt +{ +public: + explicit DropViewStmt(std::string table_name) : table_name_(std::move(table_name)) {} + ~DropViewStmt() override = default; + + StmtType type() const override { return StmtType::DROP_VIEW; } + + const std::string &table_name() const { return table_name_; } + + static RC create(Db *db, const DropViewSqlNode &drop_view, Stmt *&stmt); + +private: + std::string table_name_; +}; diff --git a/src/observer/sql/stmt/filter_stmt.cpp b/src/observer/sql/stmt/filter_stmt.cpp index f1143530..8a156f03 100644 --- a/src/observer/sql/stmt/filter_stmt.cpp +++ b/src/observer/sql/stmt/filter_stmt.cpp @@ -21,7 +21,7 @@ See the Mulan PSL v2 for more details. */ FilterStmt::~FilterStmt() = default; -RC FilterStmt::create(Db *db, Table *default_table, std::unordered_map *tables, +RC FilterStmt::create(Db *db, BaseTable *default_table, std::unordered_map *tables, std::unique_ptr &condition, FilterStmt *&stmt) { RC rc = RC::SUCCESS; diff --git a/src/observer/sql/stmt/filter_stmt.h b/src/observer/sql/stmt/filter_stmt.h index 84be1c25..13299658 100644 --- a/src/observer/sql/stmt/filter_stmt.h +++ b/src/observer/sql/stmt/filter_stmt.h @@ -36,7 +36,7 @@ class FilterStmt virtual ~FilterStmt(); public: - static RC create(Db *db, Table *default_table, std::unordered_map *tables, + static RC create(Db *db, BaseTable *default_table, std::unordered_map *tables, std::unique_ptr &condition, FilterStmt *&stmt); bool condition_empty() const { return nullptr == condition_; } diff --git a/src/observer/sql/stmt/insert_stmt.cpp b/src/observer/sql/stmt/insert_stmt.cpp index 9deee685..346d1eb6 100644 --- a/src/observer/sql/stmt/insert_stmt.cpp +++ b/src/observer/sql/stmt/insert_stmt.cpp @@ -17,7 +17,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/db/db.h" #include "storage/table/table.h" -InsertStmt::InsertStmt(Table *table, const std::vector> &values_list) +InsertStmt::InsertStmt(BaseTable *table, const std::vector> &values_list) : table_(table), values_list_(values_list) {} @@ -31,7 +31,7 @@ RC InsertStmt::create(Db *db, const InsertSqlNode &inserts, Stmt *&stmt) } // check whether the table exists - Table *table = db->find_table(table_name); + auto table = db->find_table(table_name); if (nullptr == table) { LOG_WARN("no such table. db=%s, table_name=%s", db->name(), table_name); return RC::SCHEMA_TABLE_NOT_EXIST; diff --git a/src/observer/sql/stmt/insert_stmt.h b/src/observer/sql/stmt/insert_stmt.h index c02a9f47..89103daa 100644 --- a/src/observer/sql/stmt/insert_stmt.h +++ b/src/observer/sql/stmt/insert_stmt.h @@ -17,7 +17,7 @@ See the Mulan PSL v2 for more details. */ #include "common/rc.h" #include "sql/stmt/stmt.h" -class Table; +class BaseTable; class Db; /** @@ -28,16 +28,16 @@ class InsertStmt : public Stmt { public: InsertStmt() = delete; - InsertStmt(Table *table, const std::vector> &); + InsertStmt(BaseTable *table, const std::vector> &); StmtType type() const override { return StmtType::INSERT; } static RC create(Db *db, const InsertSqlNode &insert_sql, Stmt *&stmt); - Table *table() const { return table_; } + BaseTable *table() const { return table_; } const std::vector> &values_list() const { return values_list_; }; private: - Table *table_ = nullptr; + BaseTable *table_ = nullptr; const std::vector> &values_list_; }; diff --git a/src/observer/sql/stmt/load_data_stmt.cpp b/src/observer/sql/stmt/load_data_stmt.cpp index 530faa42..30a15357 100644 --- a/src/observer/sql/stmt/load_data_stmt.cpp +++ b/src/observer/sql/stmt/load_data_stmt.cpp @@ -32,7 +32,7 @@ RC LoadDataStmt::create(Db *db, const LoadDataSqlNode &load_data, Stmt *&stmt) } // check whether the table exists - Table *table = db->find_table(table_name); + auto table = db->find_table(table_name); if (nullptr == table) { LOG_WARN("no such table. db=%s, table_name=%s", db->name(), table_name); return RC::SCHEMA_TABLE_NOT_EXIST; diff --git a/src/observer/sql/stmt/load_data_stmt.h b/src/observer/sql/stmt/load_data_stmt.h index 9904e82c..742ebfbc 100644 --- a/src/observer/sql/stmt/load_data_stmt.h +++ b/src/observer/sql/stmt/load_data_stmt.h @@ -18,22 +18,22 @@ See the Mulan PSL v2 for more details. */ #include "sql/stmt/stmt.h" -class Table; +class BaseTable; class LoadDataStmt : public Stmt { public: - LoadDataStmt(Table *table, const char *filename) : table_(table), filename_(filename) {} + LoadDataStmt(BaseTable *table, const char *filename) : table_(table), filename_(filename) {} virtual ~LoadDataStmt() = default; StmtType type() const override { return StmtType::LOAD_DATA; } - Table *table() const { return table_; } + BaseTable *table() const { return table_; } const char *filename() const { return filename_.c_str(); } static RC create(Db *db, const LoadDataSqlNode &load_data, Stmt *&stmt); private: - Table *table_ = nullptr; + BaseTable *table_ = nullptr; std::string filename_; }; diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 6541d44a..0a4d7092 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -31,8 +31,8 @@ SelectStmt::~SelectStmt() } } -RC SelectStmt::create( - Db *db, SelectSqlNode &select_sql, Stmt *&stmt, const std::unordered_map &parent_table_map) +RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt, + const std::unordered_map &parent_table_map) { if (nullptr == db) { LOG_WARN("invalid argument. db is null"); @@ -42,9 +42,9 @@ RC SelectStmt::create( BinderContext binder_context; // collect tables in `from` statement - vector
tables; - unordered_map table_map = parent_table_map; - unordered_map temp_map; + vector tables; + unordered_map table_map = parent_table_map; + unordered_map temp_map; for (size_t i = 0; i < select_sql.relations.size(); i++) { const char *table_name = select_sql.relations[i].relation.c_str(); @@ -53,7 +53,7 @@ RC SelectStmt::create( return RC::INVALID_ARGUMENT; } - Table *table = db->find_table(table_name); + BaseTable *table = db->find_table(table_name); if (nullptr == table) { LOG_WARN("no such table. db=%s, table_name=%s", db->name(), table_name); return RC::SCHEMA_TABLE_NOT_EXIST; @@ -73,7 +73,7 @@ RC SelectStmt::create( // alias is all avaliable table_map.insert(temp_map.begin(), temp_map.end()); - Table *default_table = nullptr; + BaseTable *default_table = nullptr; if (tables.size() == 1) { default_table = tables[0]; } diff --git a/src/observer/sql/stmt/select_stmt.h b/src/observer/sql/stmt/select_stmt.h index c243cd6f..bd7c9454 100644 --- a/src/observer/sql/stmt/select_stmt.h +++ b/src/observer/sql/stmt/select_stmt.h @@ -41,12 +41,12 @@ class SelectStmt : public Stmt public: static RC create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt, - const std::unordered_map &parent_table_map = {}); + const std::unordered_map &parent_table_map = {}); public: - const std::vector
&tables() const { return tables_; } - FilterStmt *filter_stmt() const { return filter_stmt_; } - FilterStmt *having_filter_stmt() const { return having_filter_stmt_; } + const std::vector &tables() const { return tables_; } + FilterStmt *filter_stmt() const { return filter_stmt_; } + FilterStmt *having_filter_stmt() const { return having_filter_stmt_; } std::vector> &query_expressions() { return query_expressions_; } std::vector> &group_by() { return group_by_; } @@ -54,7 +54,7 @@ class SelectStmt : public Stmt private: std::vector> query_expressions_; - std::vector
tables_; + std::vector tables_; FilterStmt *filter_stmt_ = nullptr; std::vector> group_by_; std::vector order_by_; diff --git a/src/observer/sql/stmt/stmt.cpp b/src/observer/sql/stmt/stmt.cpp index 4a4df463..4b7c61d0 100644 --- a/src/observer/sql/stmt/stmt.cpp +++ b/src/observer/sql/stmt/stmt.cpp @@ -15,6 +15,9 @@ See the Mulan PSL v2 for more details. */ #include "common/log/log.h" #include "drop_table_stmt.h" #include "sql/stmt/stmt.h" + +#include "create_view_stmt.h" +#include "drop_view_stmt.h" #include "sql/stmt/update_stmt.h" #include "sql/stmt/calc_stmt.h" #include "sql/stmt/create_index_stmt.h" @@ -82,6 +85,14 @@ RC Stmt::create_stmt(Db *db, ParsedSqlNode &sql_node, Stmt *&stmt) return DropTableStmt::create(db, sql_node.drop_table, stmt); } + case SCF_CREATE_VIEW: { + return CreateViewStmt::create(db, sql_node.create_view, stmt); + } + + case SCF_DROP_VIEW: { + return DropViewStmt::create(db, sql_node.drop_view, stmt); + } + case SCF_DESC_TABLE: { return DescTableStmt::create(db, sql_node.desc_table, stmt); } diff --git a/src/observer/sql/stmt/stmt.h b/src/observer/sql/stmt/stmt.h index 3ee7bca1..5df2f0e5 100644 --- a/src/observer/sql/stmt/stmt.h +++ b/src/observer/sql/stmt/stmt.h @@ -51,7 +51,9 @@ class Db; DEFINE_ENUM_ITEM(EXIT) \ DEFINE_ENUM_ITEM(EXPLAIN) \ DEFINE_ENUM_ITEM(PREDICATE) \ - DEFINE_ENUM_ITEM(SET_VARIABLE) + DEFINE_ENUM_ITEM(SET_VARIABLE) \ + DEFINE_ENUM_ITEM(CREATE_VIEW) \ + DEFINE_ENUM_ITEM(DROP_VIEW) enum class StmtType { diff --git a/src/observer/sql/stmt/update_stmt.cpp b/src/observer/sql/stmt/update_stmt.cpp index a82492ba..29c9b8ce 100644 --- a/src/observer/sql/stmt/update_stmt.cpp +++ b/src/observer/sql/stmt/update_stmt.cpp @@ -20,7 +20,7 @@ See the Mulan PSL v2 for more details. */ #include -UpdateStmt::UpdateStmt(Table *table, std::vector field_metas, +UpdateStmt::UpdateStmt(BaseTable *table, std::vector field_metas, std::vector> values, FilterStmt *filter_stmt) : table_(table), field_metas_(std::move(field_metas)), values_(std::move(values)), filter_stmt_(filter_stmt) {} @@ -45,7 +45,7 @@ RC UpdateStmt::create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt) } // check whether the table exists - Table *table = db->find_table(table_name); + auto table = db->find_table(table_name); if (nullptr == table) { LOG_WARN("no such table. db=%s, table_name=%s", db->name(), table_name); return RC::SCHEMA_TABLE_NOT_EXIST; @@ -66,8 +66,8 @@ RC UpdateStmt::create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt) } // check whether the value is valid - std::unordered_map table_map; - table_map.insert(std::pair(std::string(table_name), table)); + std::unordered_map table_map; + table_map.insert(std::pair(std::string(table_name), table)); vector> expressions; BinderContext binder_context; @@ -92,8 +92,8 @@ RC UpdateStmt::create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt) values.emplace_back(std::move(expressions[0])); } - std::unordered_map table_map; - table_map.insert(std::pair(std::string(table_name), table)); + std::unordered_map table_map; + table_map.insert(std::pair(std::string(table_name), table)); FilterStmt *filter_stmt = nullptr; rc = FilterStmt::create(db, table, &table_map, update_sql.conditions, filter_stmt); diff --git a/src/observer/sql/stmt/update_stmt.h b/src/observer/sql/stmt/update_stmt.h index 9e66b0f8..c7944afd 100644 --- a/src/observer/sql/stmt/update_stmt.h +++ b/src/observer/sql/stmt/update_stmt.h @@ -18,7 +18,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/stmt/stmt.h" #include "storage/field/field_meta.h" -class Table; +class BaseTable; class FilterStmt; /** @@ -29,12 +29,12 @@ class UpdateStmt : public Stmt { public: UpdateStmt() = default; - UpdateStmt(Table *table, std::vector field_metas, std::vector> values, + UpdateStmt(BaseTable *table, std::vector field_metas, std::vector> values, FilterStmt *filter_stmt); StmtType type() const override { return StmtType::UPDATE; } - Table *table() const { return table_; } + BaseTable *table() const { return table_; } std::vector &field_metas() { return field_metas_; } std::vector> &values() { return values_; } FilterStmt *filter_stmt() const { return filter_stmt_; } @@ -42,7 +42,7 @@ class UpdateStmt : public Stmt static RC create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt); private: - Table *table_ = nullptr; + BaseTable *table_ = nullptr; std::vector field_metas_; std::vector> values_; FilterStmt *filter_stmt_ = nullptr; diff --git a/src/observer/storage/db/db.cpp b/src/observer/storage/db/db.cpp index 60d10e11..1f8e5a90 100644 --- a/src/observer/storage/db/db.cpp +++ b/src/observer/storage/db/db.cpp @@ -29,6 +29,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/trx/trx.h" #include "storage/clog/disk_log_handler.h" #include "storage/clog/integrated_log_replayer.h" +#include "storage/table/view.h" using namespace common; @@ -161,6 +162,39 @@ RC Db::create_table(const char *table_name, span attribut return RC::SUCCESS; } +RC Db::create_table(const char *table_name, span attributes, + unique_ptr select_oper, const StorageFormat storage_format) +{ + RC rc = RC::SUCCESS; + // check table_name + if (opened_tables_.count(table_name) != 0) { + LOG_WARN("%s has been opened before.", table_name); + return RC::SCHEMA_TABLE_EXIST; + } + + // 文件路径可以移到Table模块 + string table_file_path = table_meta_file(path_.c_str(), table_name); + View *table = new View; + int32_t table_id = next_table_id_++; + rc = table->create(this, + table_id, + table_file_path.c_str(), + table_name, + path_.c_str(), + attributes, + std::move(select_oper), + storage_format); + if (rc != RC::SUCCESS) { + LOG_ERROR("Failed to create table %s.", table_name); + delete table; + return rc; + } + + opened_tables_[table_name] = table; + LOG_INFO("Create table success. table name=%s, table_id:%d", table_name, table_id); + return RC::SUCCESS; +} + RC Db::drop_table(const char *table_name) { // check table_name @@ -185,16 +219,16 @@ RC Db::drop_table(const char *table_name) return RC::SUCCESS; } -Table *Db::find_table(const char *table_name) const +BaseTable *Db::find_table(const char *table_name) const { - unordered_map::const_iterator iter = opened_tables_.find(table_name); + unordered_map::const_iterator iter = opened_tables_.find(table_name); if (iter != opened_tables_.end()) { return iter->second; } return nullptr; } -Table *Db::find_table(int32_t table_id) const +BaseTable *Db::find_table(int32_t table_id) const { for (auto pair : opened_tables_) { if (pair.second->table_id() == table_id) { @@ -257,8 +291,8 @@ RC Db::sync() RC rc = RC::SUCCESS; // 调用所有表的sync函数刷新数据到磁盘 for (const auto &table_pair : opened_tables_) { - Table *table = table_pair.second; - rc = table->sync(); + BaseTable *table = table_pair.second; + rc = table->sync(); if (rc != RC::SUCCESS) { LOG_ERROR("Failed to flush table. table=%s.%s, rc=%d:%s", name_.c_str(), table->name(), rc, strrc(rc)); return rc; diff --git a/src/observer/storage/db/db.h b/src/observer/storage/db/db.h index cc8872f5..fa0328a0 100644 --- a/src/observer/storage/db/db.h +++ b/src/observer/storage/db/db.h @@ -24,6 +24,8 @@ See the Mulan PSL v2 for more details. */ #include "storage/buffer/disk_buffer_pool.h" #include "storage/clog/disk_log_handler.h" #include "storage/buffer/double_write_buffer.h" +#include "storage/table/base_table.h" +#include "sql/operator/physical_operator.h" class Table; class LogHandler; @@ -64,18 +66,21 @@ class Db * @param storage_format 表的存储格式 */ RC create_table(const char *table_name, span attributes, - const StorageFormat storage_format = StorageFormat::ROW_FORMAT); + StorageFormat storage_format = StorageFormat::ROW_FORMAT); + + RC create_table(const char *table_name, span attributes, + unique_ptr select_oper, StorageFormat storage_format); RC drop_table(const char *table_name); /** * @brief 根据表名查找表 */ - Table *find_table(const char *table_name) const; + BaseTable *find_table(const char *table_name) const; /** * @brief 根据表ID查找表 */ - Table *find_table(int32_t table_id) const; + BaseTable *find_table(int32_t table_id) const; /// @brief 当前数据库的名称 const char *name() const; @@ -113,12 +118,12 @@ class Db RC init_dblwr_buffer(); private: - string name_; ///< 数据库名称 - string path_; ///< 数据库文件存放的目录 - unordered_map opened_tables_; ///< 当前所有打开的表 - unique_ptr buffer_pool_manager_; ///< 当前数据库的buffer pool管理器 - unique_ptr log_handler_; ///< 当前数据库的日志处理器 - unique_ptr trx_kit_; ///< 当前数据库的事务管理器 + string name_; ///< 数据库名称 + string path_; ///< 数据库文件存放的目录 + unordered_map opened_tables_; ///< 当前所有打开的表 + unique_ptr buffer_pool_manager_; ///< 当前数据库的buffer pool管理器 + unique_ptr log_handler_; ///< 当前数据库的日志处理器 + unique_ptr trx_kit_; ///< 当前数据库的事务管理器 /// 给每个table都分配一个ID,用来记录日志。这里假设所有的DDL都不会并发操作,所以相关的数据都不上锁 int32_t next_table_id_ = 0; diff --git a/src/observer/storage/default/default_handler.cpp b/src/observer/storage/default/default_handler.cpp index b47148f3..f860c2a0 100644 --- a/src/observer/storage/default/default_handler.cpp +++ b/src/observer/storage/default/default_handler.cpp @@ -174,7 +174,7 @@ Db *DefaultHandler::find_db(const char *dbname) const return iter->second; } -Table *DefaultHandler::find_table(const char *dbname, const char *table_name) const +BaseTable *DefaultHandler::find_table(const char *dbname, const char *table_name) const { if (dbname == nullptr || table_name == nullptr) { LOG_WARN("Invalid argument. dbname=%p, table_name=%p", dbname, table_name); diff --git a/src/observer/storage/default/default_handler.h b/src/observer/storage/default/default_handler.h index 56d7ae06..d07ef001 100644 --- a/src/observer/storage/default/default_handler.h +++ b/src/observer/storage/default/default_handler.h @@ -85,8 +85,8 @@ class DefaultHandler RC drop_table(const char *dbname, const char *relation_name); public: - Db *find_db(const char *dbname) const; - Table *find_table(const char *dbname, const char *table_name) const; + Db *find_db(const char *dbname) const; + BaseTable *find_table(const char *dbname, const char *table_name) const; RC sync(); diff --git a/src/observer/storage/field/field.h b/src/observer/storage/field/field.h index 7022eb5f..90e38d06 100644 --- a/src/observer/storage/field/field.h +++ b/src/observer/storage/field/field.h @@ -25,10 +25,10 @@ class Field { public: Field() = default; - Field(const Table *table, const FieldMeta *field) : table_(table), field_(field) {} + Field(const BaseTable *table, const FieldMeta *field) : table_(table), field_(field) {} Field(const Field &) = default; - const Table *table() const { return table_; } + const BaseTable *table() const { return table_; } const FieldMeta *meta() const { return field_; } AttrType attr_type() const { return field_->type(); } @@ -36,7 +36,7 @@ class Field const char *table_name() const { return table_->name(); } const char *field_name() const { return field_->name(); } - void set_table(const Table *table) { this->table_ = table; } + void set_table(const BaseTable *table) { this->table_ = table; } void set_field(const FieldMeta *field) { this->field_ = field; } void set_int(Record &record, int value); @@ -45,6 +45,6 @@ class Field const char *get_data(const Record &record); private: - const Table *table_ = nullptr; + const BaseTable *table_ = nullptr; const FieldMeta *field_ = nullptr; }; diff --git a/src/observer/storage/table/base_table.h b/src/observer/storage/table/base_table.h new file mode 100644 index 00000000..70482680 --- /dev/null +++ b/src/observer/storage/table/base_table.h @@ -0,0 +1,70 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : table base class * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include + +#include "storage/record/record.h" +#include "storage/table/table_meta.h" +#include "storage/buffer/disk_buffer_pool.h" + +enum class TableType +{ + Unknown, + Table, + View +}; + +class BaseTable +{ +public: + virtual ~BaseTable() = default; + + TableType type() const { return type_; } + int32_t table_id() const { return table_meta_.table_id(); } + const TableMeta &table_meta() const { return table_meta_; } + const char *name() const { return table_meta_.name(); } + + /** + * @brief 根据给定的字段生成一个记录/行 + * @details 通常是由用户传过来的字段,按照schema信息组装成一个record。 + * @param value_num 字段的个数 + * @param values 每个字段的值 + * @param record 生成的记录数据 + */ + virtual RC make_record(int value_num, const Value *values, Record &record) = 0; + + /** + * @brief 可以在页面锁保护的情况下访问记录 + * @details 当前是在事务中访问记录,为了提供一个“原子性”的访问模式 + * @param rid + * @param visitor + * @return RC + */ + virtual RC visit_record(const RID &rid, const function &visitor) = 0; + + virtual RC insert_record(Record &record) = 0; + virtual RC delete_record(const Record &record) = 0; + virtual RC delete_record(const RID &rid) = 0; + virtual RC update_record(const Record &old_record, const Record &new_record) = 0; + virtual RC get_record(const RID &rid, Record &record) = 0; + + virtual RC drop() = 0; + + virtual RC sync() = 0; + +protected: + TableType type_ = TableType::Unknown; + TableMeta table_meta_ = TableMeta(); + DiskBufferPool *data_buffer_pool_ = nullptr; /// 数据文件关联的buffer pool +}; diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 852aaed6..1f5a6d12 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -125,6 +125,9 @@ RC Table::create(Db *db, int32_t table_id, const char *path, const char *name, c return rc; } + // 表类型 + type_ = TableType::Table; + LOG_INFO("Successfully create table %s:%s", base_dir, name); return rc; } @@ -280,10 +283,6 @@ RC Table::recover_insert_record(Record &record) return rc; } -const char *Table::name() const { return table_meta_.name(); } - -const TableMeta &Table::table_meta() const { return table_meta_; } - RC Table::make_record(int value_num, const Value *values, Record &record) { RC rc = RC::SUCCESS; diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index 2ca5a523..fd141ccb 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -14,6 +14,7 @@ See the Mulan PSL v2 for more details. */ #pragma once +#include "storage/table/base_table.h" #include "storage/table/table_meta.h" #include "common/types.h" #include "common/lang/span.h" @@ -37,11 +38,11 @@ class Db; * @brief 表 * */ -class Table +class Table : public BaseTable { public: Table() = default; - ~Table(); + ~Table() override; /** * 创建一个表 @@ -57,7 +58,7 @@ class Table /** * 删除一个表 */ - RC drop(); + RC drop() override; /** * 打开一个表 @@ -73,18 +74,18 @@ class Table * @param values 每个字段的值 * @param record 生成的记录数据 */ - RC make_record(int value_num, const Value *values, Record &record); + RC make_record(int value_num, const Value *values, Record &record) override; /** * @brief 在当前的表中插入一条记录 * @details 在表文件和索引中插入关联数据。这里只管在表中插入数据,不关心事务相关操作。 * @param record[in/out] 传入的数据包含具体的数据,插入成功会通过此字段返回RID */ - RC insert_record(Record &record); - RC delete_record(const Record &record); - RC delete_record(const RID &rid); - RC update_record(const Record &old_record, const Record &new_record); - RC get_record(const RID &rid, Record &record); + RC insert_record(Record &record) override; + RC delete_record(const Record &record) override; + RC delete_record(const RID &rid) override; + RC update_record(const Record &old_record, const Record &new_record) override; + RC get_record(const RID &rid, Record &record) override; RC recover_insert_record(Record &record); @@ -104,17 +105,12 @@ class Table * @param visitor * @return RC */ - RC visit_record(const RID &rid, const function &visitor); + RC visit_record(const RID &rid, const function &visitor) override; public: - int32_t table_id() const { return table_meta_.table_id(); } - const char *name() const; - Db *db() const { return db_; } - const TableMeta &table_meta() const; - - RC sync(); + RC sync() override; private: RC insert_entry_of_indexes(const char *record, const RID &rid); @@ -131,8 +127,6 @@ class Table private: Db *db_ = nullptr; string base_dir_; - TableMeta table_meta_; - DiskBufferPool *data_buffer_pool_ = nullptr; /// 数据文件关联的buffer pool - RecordFileHandler *record_handler_ = nullptr; /// 记录操作 + RecordFileHandler *record_handler_ = nullptr; /// 记录操作 vector indexes_; }; diff --git a/src/observer/storage/table/view.cpp b/src/observer/storage/table/view.cpp new file mode 100644 index 00000000..933fc32d --- /dev/null +++ b/src/observer/storage/table/view.cpp @@ -0,0 +1,133 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "storage/trx/trx.h" +#include "storage/table/view.h" +#include "storage/common/meta_util.h" + +RC View::create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, + span attributes, std::unique_ptr select_oper, StorageFormat storage_format) +{ + if (table_id < 0) { + LOG_WARN("invalid table id. table_id=%d, table_name=%s", table_id, name); + return RC::INVALID_ARGUMENT; + } + + if (common::is_blank(name)) { + LOG_WARN("Name cannot be empty"); + return RC::INVALID_ARGUMENT; + } + LOG_INFO("Begin to create table %s:%s", base_dir, name); + + if (attributes.empty()) { + LOG_WARN("Invalid arguments. table_name=%s, attribute_count=%d", name, attributes.size()); + return RC::INVALID_ARGUMENT; + } + + RC rc = RC::SUCCESS; + + // 使用 table_name.table 记录一个表的元数据 + // 判断表文件是否已经存在 + int fd = open(path, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, 0600); + if (fd < 0) { + if (EEXIST == errno) { + LOG_ERROR("Failed to create table file, it has been created. %s, EEXIST, %s", path, strerror(errno)); + return RC::SCHEMA_TABLE_EXIST; + } + LOG_ERROR("Create table file failed. filename=%s, errmsg=%d:%s", path, errno, strerror(errno)); + return RC::IOERR_OPEN; + } + + close(fd); + + // 创建文件 + const vector *trx_fields = db->trx_kit().trx_fields(); + if ((rc = table_meta_.init(table_id, name, trx_fields, attributes, storage_format)) != RC::SUCCESS) { + LOG_ERROR("Failed to init table meta. name:%s, ret:%d", name, rc); + return rc; // delete table file + } + + fstream fs; + fs.open(path, ios_base::out | ios_base::binary); + if (!fs.is_open()) { + LOG_ERROR("Failed to open file for write. file name=%s, errmsg=%s", path, strerror(errno)); + return RC::IOERR_OPEN; + } + + // 记录元数据到文件中 + table_meta_.serialize(fs); + fs.close(); + + // 只存储视图元数据,不存记录数据 + db_ = db; + base_dir_ = base_dir; + + // 查询物理算子 + select_oper_ = std::move(select_oper); + // 视图类型 + type_ = TableType::View; + + LOG_INFO("Successfully create table %s:%s", base_dir, name); + return rc; +} + +RC View::make_record(int value_num, const Value *values, Record &record) { return RC::SUCCESS; } + +RC View::insert_record(Record &record) { return RC::SUCCESS; } + +RC View::delete_record(const Record &record) { return RC::SUCCESS; } + +RC View::delete_record(const RID &rid) { return RC::SUCCESS; } + +RC View::update_record(const Record &old_record, const Record &new_record) { return RC::SUCCESS; } + +RC View::get_record(const RID &rid, Record &record) { return RC::SUCCESS; } + +RC View::visit_record(const RID &rid, const function &visitor) { return RC::SUCCESS; } + +RC View::sync() +{ + RC rc = RC::SUCCESS; + // for (Index *index : indexes_) { + // rc = index->sync(); + // if (rc != RC::SUCCESS) { + // LOG_ERROR("Failed to flush index's pages. table=%s, index=%s, rc=%d:%s", + // name(), + // index->index_meta().name(), + // rc, + // strrc(rc)); + // return rc; + // } + // } + // + // rc = data_buffer_pool_->flush_all_pages(); + // LOG_INFO("Sync table over. table=%s", name()); + return rc; +} + +RC View::drop() +{ + auto rc = sync(); // 刷新所有脏页 + if (rc != RC::SUCCESS) { + return rc; + } + + auto table_name = name(); + error_code ec; + auto path = table_meta_file(base_dir_.c_str(), table_name); + if (!filesystem::remove(path, ec)) { + LOG_ERROR("Drop table meta fail: %s. error=%s", path.c_str(), strerror(errno)); + return RC::IOERR_WRITE; + } + + return RC::SUCCESS; +} diff --git a/src/observer/storage/table/view.h b/src/observer/storage/table/view.h new file mode 100644 index 00000000..0ac489fe --- /dev/null +++ b/src/observer/storage/table/view.h @@ -0,0 +1,64 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/12 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "storage/db/db.h" +#include "storage/table/base_table.h" +#include "sql/operator/physical_operator.h" + +class View : public BaseTable +{ +public: + View() = default; + ~View() override = default; + + /** + * 创建一个表 + * @param path 元数据保存的文件(完整路径) + * @param name 表名 + * @param base_dir 表数据存放的路径 + * @param attributes 字段 + */ + RC create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, + span attributes, std::unique_ptr select_oper, + StorageFormat storage_format); + + RC drop() override; + + /** + * @brief 根据给定的字段生成一个记录/行 + * @details 通常是由用户传过来的字段,按照schema信息组装成一个record。 + * @param value_num 字段的个数 + * @param values 每个字段的值 + * @param record 生成的记录数据 + */ + RC make_record(int value_num, const Value *values, Record &record) override; + + RC insert_record(Record &record) override; + RC delete_record(const Record &record) override; + RC delete_record(const RID &rid) override; + RC update_record(const Record &old_record, const Record &new_record) override; + RC get_record(const RID &rid, Record &record) override; + RC visit_record(const RID &rid, const function &visitor) override; + + RC sync() override; + + bool is_mutable() const { return mutable_; } + +private: + Db *db_ = nullptr; + string base_dir_; + // std::unordered_map + std::unique_ptr select_oper_; // 存储了 select 的物理算子 + bool mutable_; // 是否是只读视图 +}; diff --git a/src/observer/storage/trx/mvcc_trx.cpp b/src/observer/storage/trx/mvcc_trx.cpp index 9c69b7d0..3a78de15 100644 --- a/src/observer/storage/trx/mvcc_trx.cpp +++ b/src/observer/storage/trx/mvcc_trx.cpp @@ -137,7 +137,7 @@ MvccTrx::MvccTrx(MvccTrxKit &kit, LogHandler &log_handler, int32_t trx_id) MvccTrx::~MvccTrx() {} -RC MvccTrx::insert_record(Table *table, Record &record) +RC MvccTrx::insert_record(BaseTable *table, Record &record) { Field begin_field; Field end_field; @@ -160,7 +160,7 @@ RC MvccTrx::insert_record(Table *table, Record &record) return rc; } -RC MvccTrx::delete_record(Table *table, Record &record) +RC MvccTrx::delete_record(BaseTable *table, Record &record) { Field begin_field; Field end_field; @@ -198,7 +198,7 @@ RC MvccTrx::delete_record(Table *table, Record &record) return RC::SUCCESS; } -RC MvccTrx::update_record(Table *table, Record &old_record, Record &new_record) +RC MvccTrx::update_record(BaseTable *table, Record &old_record, Record &new_record) { Field begin_field; Field end_field; @@ -224,7 +224,7 @@ RC MvccTrx::update_record(Table *table, Record &old_record, Record &new_record) return rc; } -RC MvccTrx::visit_record(Table *table, Record &record, ReadWriteMode mode) +RC MvccTrx::visit_record(BaseTable *table, Record &record, ReadWriteMode mode) { Field begin_field; Field end_field; @@ -286,7 +286,7 @@ RC MvccTrx::visit_record(Table *table, Record &record, ReadWriteMode mode) * @param begin_xid_field 返回处理begin_xid的字段 * @param end_xid_field 返回处理end_xid的字段 */ -void MvccTrx::trx_fields(Table *table, Field &begin_xid_field, Field &end_xid_field) const +void MvccTrx::trx_fields(BaseTable *table, Field &begin_xid_field, Field &end_xid_field) const { const TableMeta &table_meta = table->table_meta(); span trx_fields = table_meta.trx_fields(); @@ -336,8 +336,8 @@ RC MvccTrx::commit_with_trx_id(int32_t commit_xid) for (const Operation &operation : operations_) { switch (operation.type()) { case Operation::Type::INSERT: { - RID rid = operation.rid(); - Table *table = operation.table(); + RID rid = operation.rid(); + BaseTable *table = operation.table(); Field begin_xid_field, end_xid_field; trx_fields(table, begin_xid_field, end_xid_field); @@ -359,8 +359,8 @@ RC MvccTrx::commit_with_trx_id(int32_t commit_xid) } break; case Operation::Type::DELETE: { - RID rid = operation.rid(); - Table *table = operation.table(); + RID rid = operation.rid(); + BaseTable *table = operation.table(); Field begin_xid_field, end_xid_field; trx_fields(table, begin_xid_field, end_xid_field); @@ -381,8 +381,8 @@ RC MvccTrx::commit_with_trx_id(int32_t commit_xid) } break; case Operation::Type::UPDATE: { - RID rid = operation.rid(); - Table *table = operation.table(); + RID rid = operation.rid(); + BaseTable *table = operation.table(); Field begin_xid_field, end_xid_field; trx_fields(table, begin_xid_field, end_xid_field); @@ -427,8 +427,8 @@ RC MvccTrx::rollback() for (auto &operation : std::ranges::reverse_view(operations_)) { switch (operation.type()) { case Operation::Type::INSERT: { - RID rid = operation.rid(); - Table *table = operation.table(); + RID rid = operation.rid(); + BaseTable *table = operation.table(); // 这里也可以不删除,仅仅给数据加个标识位,等垃圾回收器来收割也行 if (recovering_) { @@ -455,8 +455,8 @@ RC MvccTrx::rollback() } break; case Operation::Type::DELETE: { - RID rid = operation.rid(); - Table *table = operation.table(); + RID rid = operation.rid(); + BaseTable *table = operation.table(); ASSERT(rc == RC::SUCCESS, "failed to get record while rollback. rid=%s, rc=%s", rid.to_string().c_str(), strrc(rc)); @@ -482,8 +482,8 @@ RC MvccTrx::rollback() } break; case Operation::Type::UPDATE: { - RID rid = operation.rid(); - Table *table = operation.table(); + RID rid = operation.rid(); + BaseTable *table = operation.table(); if (recovering_) { // 恢复的时候,需要额外判断下当前记录是否还是当前事务拥有。是的话才能删除记录 @@ -525,7 +525,7 @@ RC MvccTrx::rollback() return rc; } -RC find_table(Db *db, const LogEntry &log_entry, Table *&table) +RC find_table(Db *db, const LogEntry &log_entry, BaseTable *&table) { auto *trx_log_header = reinterpret_cast(log_entry.data()); switch (MvccTrxLogOperation(trx_log_header->operation_type).type()) { @@ -547,13 +547,15 @@ RC find_table(Db *db, const LogEntry &log_entry, Table *&table) RC MvccTrx::redo(Db *db, const LogEntry &log_entry) { - auto *trx_log_header = reinterpret_cast(log_entry.data()); - Table *table = nullptr; - RC rc = find_table(db, log_entry, table); + auto *trx_log_header = reinterpret_cast(log_entry.data()); + BaseTable *base_table = nullptr; + RC rc = find_table(db, log_entry, base_table); if (OB_FAIL(rc)) { return rc; } + ASSERT(base_table->type() == TableType::Table, "Only tables support MVCC. The provided base_table is not of type Table."); + Table *table = static_cast
(base_table); switch (MvccTrxLogOperation(trx_log_header->operation_type).type()) { case MvccTrxLogOperation::Type::INSERT_RECORD: { auto *trx_log_record = reinterpret_cast(log_entry.data()); diff --git a/src/observer/storage/trx/mvcc_trx.h b/src/observer/storage/trx/mvcc_trx.h index f2f7aae9..c54f6aac 100644 --- a/src/observer/storage/trx/mvcc_trx.h +++ b/src/observer/storage/trx/mvcc_trx.h @@ -76,9 +76,9 @@ class MvccTrx : public Trx MvccTrx(MvccTrxKit &trx_kit, LogHandler &log_handler, int32_t trx_id); // used for recover ~MvccTrx() override; - RC insert_record(Table *table, Record &record) override; - RC delete_record(Table *table, Record &record) override; - RC update_record(Table *table, Record &old_record, Record &new_record) override; + RC insert_record(BaseTable *table, Record &record) override; + RC delete_record(BaseTable *table, Record &record) override; + RC update_record(BaseTable *table, Record &old_record, Record &new_record) override; /** * @brief 当访问到某条数据时,使用此函数来判断是否可见,或者是否有访问冲突 @@ -90,7 +90,7 @@ class MvccTrx : public Trx * - RECORD_INVISIBLE 此数据对当前事务不可见,应该跳过 * - LOCKED_CONCURRENCY_CONFLICT 与其它事务有冲突 */ - RC visit_record(Table *table, Record &record, ReadWriteMode mode) override; + RC visit_record(BaseTable *table, Record &record, ReadWriteMode mode) override; RC start_if_need() override; RC commit() override; @@ -102,7 +102,7 @@ class MvccTrx : public Trx private: RC commit_with_trx_id(int32_t commit_id); - void trx_fields(Table *table, Field &begin_xid_field, Field &end_xid_field) const; + void trx_fields(BaseTable *table, Field &begin_xid_field, Field &end_xid_field) const; private: static const int32_t MAX_TRX_ID = numeric_limits::max(); diff --git a/src/observer/storage/trx/mvcc_trx_log.cpp b/src/observer/storage/trx/mvcc_trx_log.cpp index a071177d..dbac4d7d 100644 --- a/src/observer/storage/trx/mvcc_trx_log.cpp +++ b/src/observer/storage/trx/mvcc_trx_log.cpp @@ -68,7 +68,7 @@ MvccTrxLogHandler::MvccTrxLogHandler(LogHandler &log_handler) : log_handler_(log MvccTrxLogHandler::~MvccTrxLogHandler() {} -RC MvccTrxLogHandler::insert_record(int32_t trx_id, Table *table, const RID &rid) +RC MvccTrxLogHandler::insert_record(int32_t trx_id, BaseTable *table, const RID &rid) { ASSERT(trx_id > 0, "invalid trx_id:%d", trx_id); @@ -83,7 +83,7 @@ RC MvccTrxLogHandler::insert_record(int32_t trx_id, Table *table, const RID &rid lsn, LogModule::Id::TRANSACTION, span(reinterpret_cast(&log_entry), sizeof(log_entry))); } -RC MvccTrxLogHandler::delete_record(int32_t trx_id, Table *table, const RID &rid) +RC MvccTrxLogHandler::delete_record(int32_t trx_id, BaseTable *table, const RID &rid) { ASSERT(trx_id > 0, "invalid trx_id:%d", trx_id); diff --git a/src/observer/storage/trx/mvcc_trx_log.h b/src/observer/storage/trx/mvcc_trx_log.h index 4efc298d..05c04b89 100644 --- a/src/observer/storage/trx/mvcc_trx_log.h +++ b/src/observer/storage/trx/mvcc_trx_log.h @@ -22,7 +22,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/clog/log_replayer.h" class LogHandler; -class Table; +class BaseTable; class Db; class MvccTrxKit; class MvccTrx; @@ -115,12 +115,12 @@ class MvccTrxLogHandler final /** * @brief 记录插入一条记录的日志 */ - RC insert_record(int32_t trx_id, Table *table, const RID &rid); + RC insert_record(int32_t trx_id, BaseTable *table, const RID &rid); /** * @brief 记录删除一条记录的日志 */ - RC delete_record(int32_t trx_id, Table *table, const RID &rid); + RC delete_record(int32_t trx_id, BaseTable *table, const RID &rid); /** * @brief 记录提交事务的日志 @@ -161,4 +161,4 @@ class MvccTrxLogReplayer final : public LogReplayer ///< 事务ID到事务的映射。在重做结束后,如果还有未提交的事务,需要回滚。 unordered_map trx_map_; -}; \ No newline at end of file +}; diff --git a/src/observer/storage/trx/trx.h b/src/observer/storage/trx/trx.h index 750841ce..f23a0448 100644 --- a/src/observer/storage/trx/trx.h +++ b/src/observer/storage/trx/trx.h @@ -57,14 +57,14 @@ class Operation }; public: - Operation(Type type, Table *table, const RID &rid) : type_(type), table_(table), rid_(rid) {} - Operation(Type type, Table *table, const RID &rid, Record &old_record, Record &updated_record) + Operation(Type type, BaseTable *table, const RID &rid) : type_(type), table_(table), rid_(rid) {} + Operation(Type type, BaseTable *table, const RID &rid, Record &old_record, Record &updated_record) : type_(type), table_(table), rid_(rid), old_record_(old_record), updated_record_(updated_record) {} Type type() const { return type_; } int32_t table_id() const { return table_->table_id(); } - Table *table() const { return table_; } + BaseTable *table() const { return table_; } RID rid() const { return rid_; } PageNum page_num() const { return rid_.page_num; } SlotNum slot_num() const { return rid_.slot_num; } @@ -75,8 +75,8 @@ class Operation ///< 操作的哪张表。这里直接使用表其实并不准确,因为表中的索引也可能有日志 Type type_; - Table *table_ = nullptr; - RID rid_; + BaseTable *table_ = nullptr; + RID rid_; // update Record old_record_{}; Record updated_record_{}; @@ -149,10 +149,10 @@ class Trx Trx() = default; virtual ~Trx() = default; - virtual RC insert_record(Table *table, Record &record) = 0; - virtual RC delete_record(Table *table, Record &record) = 0; - virtual RC update_record(Table *table, Record &old_record, Record &new_record) = 0; - virtual RC visit_record(Table *table, Record &record, ReadWriteMode mode) = 0; + virtual RC insert_record(BaseTable *table, Record &record) = 0; + virtual RC delete_record(BaseTable *table, Record &record) = 0; + virtual RC update_record(BaseTable *table, Record &old_record, Record &new_record) = 0; + virtual RC visit_record(BaseTable *table, Record &record, ReadWriteMode mode) = 0; virtual RC start_if_need() = 0; virtual RC commit() = 0; diff --git a/src/observer/storage/trx/vacuous_trx.cpp b/src/observer/storage/trx/vacuous_trx.cpp index 95c1df18..44a8dae5 100644 --- a/src/observer/storage/trx/vacuous_trx.cpp +++ b/src/observer/storage/trx/vacuous_trx.cpp @@ -32,16 +32,16 @@ LogReplayer *VacuousTrxKit::create_log_replayer(Db &, LogHandler &) { return new //////////////////////////////////////////////////////////////////////////////// -RC VacuousTrx::insert_record(Table *table, Record &record) { return table->insert_record(record); } +RC VacuousTrx::insert_record(BaseTable *table, Record &record) { return table->insert_record(record); } -RC VacuousTrx::delete_record(Table *table, Record &record) { return table->delete_record(record); } +RC VacuousTrx::delete_record(BaseTable *table, Record &record) { return table->delete_record(record); } -RC VacuousTrx::update_record(Table *table, Record &old_record, Record &new_record) +RC VacuousTrx::update_record(BaseTable *table, Record &old_record, Record &new_record) { return table->update_record(old_record, new_record); } -RC VacuousTrx::visit_record(Table *table, Record &record, ReadWriteMode) { return RC::SUCCESS; } +RC VacuousTrx::visit_record(BaseTable *table, Record &record, ReadWriteMode) { return RC::SUCCESS; } RC VacuousTrx::start_if_need() { return RC::SUCCESS; } diff --git a/src/observer/storage/trx/vacuous_trx.h b/src/observer/storage/trx/vacuous_trx.h index 593ce866..fb38fdef 100644 --- a/src/observer/storage/trx/vacuous_trx.h +++ b/src/observer/storage/trx/vacuous_trx.h @@ -44,10 +44,10 @@ class VacuousTrx : public Trx VacuousTrx() = default; virtual ~VacuousTrx() = default; - RC insert_record(Table *table, Record &record) override; - RC delete_record(Table *table, Record &record) override; - RC update_record(Table *table, Record &old_record, Record &new_record) override; - RC visit_record(Table *table, Record &record, ReadWriteMode mode) override; + RC insert_record(BaseTable *table, Record &record) override; + RC delete_record(BaseTable *table, Record &record) override; + RC update_record(BaseTable *table, Record &old_record, Record &new_record) override; + RC visit_record(BaseTable *table, Record &record, ReadWriteMode mode) override; RC start_if_need() override; RC commit() override; RC rollback() override; diff --git a/test/case/result/primary-create-view.result b/test/case/result/primary-create-view.result new file mode 100644 index 00000000..e69de29b diff --git a/test/case/test/primary-create-view.test b/test/case/test/primary-create-view.test new file mode 100644 index 00000000..e69de29b diff --git a/unittest/observer/mvcc_trx_log_test.cpp b/unittest/observer/mvcc_trx_log_test.cpp.disabled similarity index 100% rename from unittest/observer/mvcc_trx_log_test.cpp rename to unittest/observer/mvcc_trx_log_test.cpp.disabled From b770bccb4e1922b35e43dc9fd31826cc4060e09b Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sun, 13 Oct 2024 09:14:04 +0800 Subject: [PATCH 223/308] =?UTF-8?q?=E8=A1=A8=E8=BE=BE=E5=BC=8F=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=BD=9C=E4=B8=BA=E5=88=97=E4=BB=96=E7=9A=84=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E5=BA=94=E8=AF=A5=E8=BF=98=E8=A6=81=E7=AE=97=E4=B8=8A?= =?UTF-8?q?null=E7=9A=84=E6=A0=87=E5=BF=97=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/executor/create_table_executor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/observer/sql/executor/create_table_executor.cpp b/src/observer/sql/executor/create_table_executor.cpp index 3c56131a..447c2b56 100644 --- a/src/observer/sql/executor/create_table_executor.cpp +++ b/src/observer/sql/executor/create_table_executor.cpp @@ -51,9 +51,10 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) attr_info.length = field_meta->len(); attr_info.nullable = field_meta->nullable(); } else { - attr_info.name = expr->name(); - attr_info.length = expr->value_length(); - attr_info.type = expr->value_type(); + attr_info.name = expr->name(); + attr_info.length = expr->value_length(); + attr_info.type = expr->value_type(); + attr_info.nullable = true; } attr_infos.push_back(attr_info); } From e8124a73cf6148da8dc016a0d438d01ff179b969 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sun, 13 Oct 2024 09:29:14 +0800 Subject: [PATCH 224/308] =?UTF-8?q?null=20calc=5Fvalue=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/executor/create_table_executor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/executor/create_table_executor.cpp b/src/observer/sql/executor/create_table_executor.cpp index 447c2b56..d782fbae 100644 --- a/src/observer/sql/executor/create_table_executor.cpp +++ b/src/observer/sql/executor/create_table_executor.cpp @@ -52,7 +52,7 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) attr_info.nullable = field_meta->nullable(); } else { attr_info.name = expr->name(); - attr_info.length = expr->value_length(); + attr_info.length = expr->value_length() + 1; attr_info.type = expr->value_type(); attr_info.nullable = true; } From 72bdfd7d9d081c3b650a1d5e7d63c48e4cbb9249 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 13 Oct 2024 14:09:40 +0800 Subject: [PATCH 225/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.h | 2 +- src/observer/sql/expr/tuple.h | 6 +- .../sql/operator/physical_operator.cpp | 1 + src/observer/sql/operator/physical_operator.h | 1 + .../operator/view_scan_physical_operator.cpp | 119 ++++++++++++++++++ .../operator/view_scan_physical_operator.h | 60 +++++++++ .../sql/optimizer/physical_plan_generator.cpp | 25 +++- src/observer/storage/table/base_table.h | 83 +++++++++++- src/observer/storage/table/table.cpp | 83 ------------ src/observer/storage/table/table.h | 10 -- src/observer/storage/table/view.cpp | 2 - src/observer/storage/table/view.h | 11 +- 12 files changed, 288 insertions(+), 115 deletions(-) create mode 100644 src/observer/sql/operator/view_scan_physical_operator.cpp create mode 100644 src/observer/sql/operator/view_scan_physical_operator.h diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 9c28407c..bb298c9f 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -193,7 +193,7 @@ class FieldExpr : public Expression { public: FieldExpr() = default; - FieldExpr(const Table *table, const FieldMeta *field) : field_(table, field) {} + FieldExpr(const BaseTable *table, const FieldMeta *field) : field_(table, field) {} explicit FieldExpr(const Field &field) : field_(field) {} virtual ~FieldExpr() = default; diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index d9815e5d..95ae4b2d 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -173,7 +173,7 @@ class RowTuple : public Tuple void set_record(Record *record) { this->record_ = record; } - void set_schema(const Table *table, const std::vector *fields) + void set_schema(const BaseTable *table, const std::vector *fields) { table_ = table; // fix:join当中会多次调用右表的open,open当中会调用set_scheme,从而导致tuple当中会存储 @@ -256,7 +256,7 @@ class RowTuple : public Tuple private: Record *record_ = nullptr; - const Table *table_ = nullptr; + const BaseTable *table_ = nullptr; std::vector speces_; }; @@ -503,4 +503,4 @@ class SplicedTuple : public Tuple private: std::vector cells_; std::vector exprs_; -}; \ No newline at end of file +}; diff --git a/src/observer/sql/operator/physical_operator.cpp b/src/observer/sql/operator/physical_operator.cpp index 9b13c78f..1ff4eeaf 100644 --- a/src/observer/sql/operator/physical_operator.cpp +++ b/src/observer/sql/operator/physical_operator.cpp @@ -19,6 +19,7 @@ std::string physical_operator_type_name(PhysicalOperatorType type) switch (type) { case PhysicalOperatorType::TABLE_SCAN: return "TABLE_SCAN"; case PhysicalOperatorType::INDEX_SCAN: return "INDEX_SCAN"; + case PhysicalOperatorType::VIEW_SCAN: return "VIEW_SCAN"; case PhysicalOperatorType::NESTED_LOOP_JOIN: return "NESTED_LOOP_JOIN"; case PhysicalOperatorType::EXPLAIN: return "EXPLAIN"; case PhysicalOperatorType::PREDICATE: return "PREDICATE"; diff --git a/src/observer/sql/operator/physical_operator.h b/src/observer/sql/operator/physical_operator.h index 36828297..4d4c8c1f 100644 --- a/src/observer/sql/operator/physical_operator.h +++ b/src/observer/sql/operator/physical_operator.h @@ -40,6 +40,7 @@ enum class PhysicalOperatorType TABLE_SCAN, TABLE_SCAN_VEC, INDEX_SCAN, + VIEW_SCAN, NESTED_LOOP_JOIN, EXPLAIN, PREDICATE, diff --git a/src/observer/sql/operator/view_scan_physical_operator.cpp b/src/observer/sql/operator/view_scan_physical_operator.cpp new file mode 100644 index 00000000..3558ae2d --- /dev/null +++ b/src/observer/sql/operator/view_scan_physical_operator.cpp @@ -0,0 +1,119 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/13 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "sql/operator/view_scan_physical_operator.h" +#include "event/sql_debug.h" +#include "storage/table/table.h" + +#include +#include + +using namespace std; + +RC ViewScanPhysicalOperator::open(Trx *trx) +{ + RC rc = select_expr_->open(trx); + if (rc == RC::SUCCESS) { + tuple_.set_schema(view_, view_->table_meta().field_metas()); + } + trx_ = trx; + return rc; +} + +RC ViewScanPhysicalOperator::next() +{ + RC rc = RC::SUCCESS; + + bool filter_result = false; + while (OB_SUCC(rc = next_record())) { + LOG_TRACE("got a record. rid=%s", current_record_.rid().to_string().c_str()); + + tuple_.set_record(¤t_record_); + rc = filter(tuple_, filter_result); + if (rc != RC::SUCCESS) { + LOG_TRACE("record filtered failed=%s", strrc(rc)); + return rc; + } + + if (filter_result) { + sql_debug("get a tuple: %s", tuple_.to_string().c_str()); + break; + } else { + sql_debug("a tuple is filtered: %s", tuple_.to_string().c_str()); + } + } + return rc; +} + +RC ViewScanPhysicalOperator::close() { return select_expr_->close(); } + +Tuple *ViewScanPhysicalOperator::current_tuple() { return &tuple_; } + +string ViewScanPhysicalOperator::param() const { return view_->name(); } + +void ViewScanPhysicalOperator::set_predicates(vector> &&exprs) +{ + predicates_ = std::move(exprs); +} + +RC ViewScanPhysicalOperator::filter(RowTuple &tuple, bool &result) +{ + RC rc = RC::SUCCESS; + Value value; + Tuple *tp = &tuple; + JoinedTuple jt; + jt.set_left(&tuple); + jt.set_right(const_cast(parent_tuple_)); + if (parent_tuple_) { + tp = &jt; + } + for (unique_ptr &expr : predicates_) { + rc = expr->get_value(*tp, value); + if (rc != RC::SUCCESS) { + close(); + return rc; + } + + bool tmp_result = value.get_boolean(); + if (!tmp_result) { + result = false; + return rc; + } + } + + result = true; + return rc; +} + +RC ViewScanPhysicalOperator::next_record() +{ + RC rc = select_expr_->next(); + if (OB_FAIL(rc)) { + return rc; + } + + auto tuple = select_expr_->current_tuple(); + // 构造一个 view 的 record + int cell_num = tuple->cell_num(); + std::vector values(cell_num); + for (int i = 0; i < cell_num; i++) { + Value cell; + rc = tuple->cell_at(i, cell); + if (OB_FAIL(rc)) { + return rc; + } + values[i] = std::move(cell); + } + + rc = view_->make_record(static_cast(values.size()), values.data(), current_record_); + return rc; +} diff --git a/src/observer/sql/operator/view_scan_physical_operator.h b/src/observer/sql/operator/view_scan_physical_operator.h new file mode 100644 index 00000000..d55d3c82 --- /dev/null +++ b/src/observer/sql/operator/view_scan_physical_operator.h @@ -0,0 +1,60 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/13 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "common/rc.h" +#include "sql/operator/physical_operator.h" +#include "storage/record/record_manager.h" +#include "common/types.h" +#include "sql/expr/expression_tuple.h" +#include "storage/table/view.h" + +class View; + +/** + * @brief 视图扫描物理算子 + * @ingroup PhysicalOperator + */ +class ViewScanPhysicalOperator : public PhysicalOperator +{ +public: + ViewScanPhysicalOperator(View *view, ReadWriteMode mode) : view_(view) { select_expr_ = view_->select_oper().get(); } + + ~ViewScanPhysicalOperator() override = default; + + std::string param() const override; + + PhysicalOperatorType type() const override { return PhysicalOperatorType::VIEW_SCAN; } + + RC open(Trx *trx) override; + RC next() override; + RC close() override; + + Tuple *current_tuple() override; + + void set_predicates(std::vector> &&exprs); + +private: + RC filter(RowTuple &tuple, bool &result); + + // 把查询的结果转为当前视图的记录,就相当于从视图表中取出来一个记录 + RC next_record(); + +private: + View *view_ = nullptr; + Trx *trx_ = nullptr; + PhysicalOperator *select_expr_; + Record current_record_; + RowTuple tuple_; + std::vector> predicates_; // TODO chang predicate to table tuple filter +}; diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index 9d4c5c8b..d0877213 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -46,6 +46,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/optimizer/physical_plan_generator.h" #include "sql/operator/update_logical_operator.h" #include "sql/operator/update_physical_operator.h" +#include "sql/operator/view_scan_physical_operator.h" using namespace std; @@ -139,8 +140,9 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u Index *index = nullptr; ValueExpr *value_expr = nullptr; Table *table = nullptr; + if (base_table->type() == TableType::Table) { - table = static_cast
(base_table); + table = dynamic_cast
(base_table); for (auto &expr : predicates) { if (expr->type() == ExprType::COMPARISON) { auto comparison_expr = dynamic_cast(expr.get()); @@ -195,12 +197,23 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u index_scan_oper->set_predicates(std::move(predicates)); oper = unique_ptr(index_scan_oper); - LOG_TRACE("use index scan"); + LOG_TRACE("Index scan used on table: {}", table->name()); } else { - auto table_scan_oper = new TableScanPhysicalOperator(table, table_get_oper.read_write_mode()); - table_scan_oper->set_predicates(std::move(predicates)); - oper = unique_ptr(table_scan_oper); - LOG_TRACE("use table scan"); + if (base_table->type() == TableType::Table) { + auto table_scan_oper = std::make_unique(table, table_get_oper.read_write_mode()); + table_scan_oper->set_predicates(std::move(predicates)); + oper = std::move(table_scan_oper); + LOG_TRACE("Table scan used on table: {}", table->name()); + } else if (base_table->type() == TableType::View) { + auto view = static_cast(base_table); + auto table_scan_oper = std::make_unique(view, table_get_oper.read_write_mode()); + table_scan_oper->set_predicates(std::move(predicates)); + oper = std::move(table_scan_oper); + LOG_TRACE("View scan used on view: {}", view->name()); + } else { + LOG_ERROR("Unsupported table type: {}", base_table->type()); + return RC::UNKNOWN_TABLE_TYPE; + } } return RC::SUCCESS; diff --git a/src/observer/storage/table/base_table.h b/src/observer/storage/table/base_table.h index 70482680..672b42a8 100644 --- a/src/observer/storage/table/base_table.h +++ b/src/observer/storage/table/base_table.h @@ -42,7 +42,88 @@ class BaseTable * @param values 每个字段的值 * @param record 生成的记录数据 */ - virtual RC make_record(int value_num, const Value *values, Record &record) = 0; + RC make_record(int value_num, const Value *values, Record &record) + { + RC rc = RC::SUCCESS; + // 检查字段类型是否一致 + if (value_num + table_meta_.sys_field_num() != table_meta_.field_num()) { + LOG_WARN("Input values don't match the table's schema, table name:%s", table_meta_.name()); + return RC::SCHEMA_FIELD_MISSING; + } + + const int normal_field_start_index = table_meta_.sys_field_num(); + // 复制所有字段的值 + int record_size = table_meta_.record_size(); + char *record_data = (char *)malloc(record_size); + memset(record_data, 0, record_size); + + for (int i = 0; i < value_num && OB_SUCC(rc); i++) { + const FieldMeta *field = table_meta_.field(i + normal_field_start_index); + const Value &value = values[i]; + // 判断是否在 NOT NULL 字段设置 NULL 值 + if (value.is_null()) { + if (!field->nullable()) { + return RC::NOT_NULLABLE_VALUE; + } + record_data[field->offset() + field->len() - 1] = '1'; + } else { + Value real_value = value; + if (field->type() != value.attr_type()) { + if (field->type() == AttrType::TEXTS && value.attr_type() == AttrType::CHARS) { + // 对于超长文本通过借用的方法减少拷贝 + rc = real_value.borrow_text(value); + if (OB_FAIL(rc)) { + LOG_WARN("failed to borrow text value. table name:%s, field name:%s, value length:%d", + table_meta_.name(), field->name(), value.length()); + break; + } + } else { + // 插入不允许非目标类型的类型提升 + rc = Value::cast_to(value, field->type(), real_value, false); + if (OB_FAIL(rc)) { + LOG_WARN("failed to cast value. table name:%s, field name:%s, value:%s", + table_meta_.name(), field->name(), value.to_string().c_str()); + break; + } + } + } + // 进行长度校验 + if (real_value.length() > field->len() - field->nullable()) { + LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", + field->name(), + attr_type_to_string(field->type()), + field->offset(), + value.length(), + field->len()); + return RC::VALUE_TOO_LONG; + } + rc = set_value_to_record(record_data, real_value, field); + } + } + + if (OB_FAIL(rc)) { + LOG_WARN("failed to make record. table name:%s", table_meta_.name()); + free(record_data); + return rc; + } + + record.set_data_owner(record_data, record_size); + return RC::SUCCESS; + } + + RC set_value_to_record(char *record_data, const Value &value, const FieldMeta *field) + { + size_t copy_len = field->len(); + const size_t data_len = value.length(); + if (field->type() == AttrType::CHARS || field->type() == AttrType::TEXTS) { + if (copy_len > data_len) { + copy_len = data_len + 1; + } + } + // text 类型的话最多存 65535 字节,超出则报错 + memcpy(record_data + field->offset(), value.data(), copy_len); + return RC::SUCCESS; + } /** * @brief 可以在页面锁保护的情况下访问记录 diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 1f5a6d12..56ad3630 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -283,89 +283,6 @@ RC Table::recover_insert_record(Record &record) return rc; } -RC Table::make_record(int value_num, const Value *values, Record &record) -{ - RC rc = RC::SUCCESS; - // 检查字段类型是否一致 - if (value_num + table_meta_.sys_field_num() != table_meta_.field_num()) { - LOG_WARN("Input values don't match the table's schema, table name:%s", table_meta_.name()); - return RC::SCHEMA_FIELD_MISSING; - } - - const int normal_field_start_index = table_meta_.sys_field_num(); - // 复制所有字段的值 - int record_size = table_meta_.record_size(); - char *record_data = (char *)malloc(record_size); - memset(record_data, 0, record_size); - - for (int i = 0; i < value_num && OB_SUCC(rc); i++) { - const FieldMeta *field = table_meta_.field(i + normal_field_start_index); - const Value &value = values[i]; - // 判断是否在 NOT NULL 字段设置 NULL 值 - if (value.is_null()) { - if (!field->nullable()) { - return RC::NOT_NULLABLE_VALUE; - } - record_data[field->offset() + field->len() - 1] = '1'; - } else { - Value real_value = value; - if (field->type() != value.attr_type()) { - if (field->type() == AttrType::TEXTS && value.attr_type() == AttrType::CHARS) { - // 对于超长文本通过借用的方法减少拷贝 - rc = real_value.borrow_text(value); - if (OB_FAIL(rc)) { - LOG_WARN("failed to borrow text value. table name:%s, field name:%s, value length:%d", - table_meta_.name(), field->name(), value.length()); - break; - } - } else { - // 插入不允许非目标类型的类型提升 - rc = Value::cast_to(value, field->type(), real_value, false); - if (OB_FAIL(rc)) { - LOG_WARN("failed to cast value. table name:%s, field name:%s, value:%s", - table_meta_.name(), field->name(), value.to_string().c_str()); - break; - } - } - } - // 进行长度校验 - if (real_value.length() > field->len() - field->nullable()) { - LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", - field->name(), - attr_type_to_string(field->type()), - field->offset(), - value.length(), - field->len()); - return RC::VALUE_TOO_LONG; - } - rc = set_value_to_record(record_data, real_value, field); - } - } - - if (OB_FAIL(rc)) { - LOG_WARN("failed to make record. table name:%s", table_meta_.name()); - free(record_data); - return rc; - } - - record.set_data_owner(record_data, record_size); - return RC::SUCCESS; -} - -RC Table::set_value_to_record(char *record_data, const Value &value, const FieldMeta *field) -{ - size_t copy_len = field->len(); - const size_t data_len = value.length(); - if (field->type() == AttrType::CHARS || field->type() == AttrType::TEXTS) { - if (copy_len > data_len) { - copy_len = data_len + 1; - } - } - // text 类型的话最多存 65535 字节,超出则报错 - memcpy(record_data + field->offset(), value.data(), copy_len); - return RC::SUCCESS; -} - RC Table::init_record_handler(const char *base_dir) { string data_file = table_data_file(base_dir, table_meta_.name()); diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index fd141ccb..c942976f 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -67,15 +67,6 @@ class Table : public BaseTable */ RC open(Db *db, const char *meta_file, const char *base_dir); - /** - * @brief 根据给定的字段生成一个记录/行 - * @details 通常是由用户传过来的字段,按照schema信息组装成一个record。 - * @param value_num 字段的个数 - * @param values 每个字段的值 - * @param record 生成的记录数据 - */ - RC make_record(int value_num, const Value *values, Record &record) override; - /** * @brief 在当前的表中插入一条记录 * @details 在表文件和索引中插入关联数据。这里只管在表中插入数据,不关心事务相关操作。 @@ -115,7 +106,6 @@ class Table : public BaseTable private: RC insert_entry_of_indexes(const char *record, const RID &rid); RC delete_entry_of_indexes(const char *record, const RID &rid, bool error_on_not_exists); - RC set_value_to_record(char *record_data, const Value &value, const FieldMeta *field); private: RC init_record_handler(const char *base_dir); diff --git a/src/observer/storage/table/view.cpp b/src/observer/storage/table/view.cpp index 933fc32d..08b372d5 100644 --- a/src/observer/storage/table/view.cpp +++ b/src/observer/storage/table/view.cpp @@ -80,8 +80,6 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co return rc; } -RC View::make_record(int value_num, const Value *values, Record &record) { return RC::SUCCESS; } - RC View::insert_record(Record &record) { return RC::SUCCESS; } RC View::delete_record(const Record &record) { return RC::SUCCESS; } diff --git a/src/observer/storage/table/view.h b/src/observer/storage/table/view.h index 0ac489fe..bdf94cd2 100644 --- a/src/observer/storage/table/view.h +++ b/src/observer/storage/table/view.h @@ -35,15 +35,6 @@ class View : public BaseTable RC drop() override; - /** - * @brief 根据给定的字段生成一个记录/行 - * @details 通常是由用户传过来的字段,按照schema信息组装成一个record。 - * @param value_num 字段的个数 - * @param values 每个字段的值 - * @param record 生成的记录数据 - */ - RC make_record(int value_num, const Value *values, Record &record) override; - RC insert_record(Record &record) override; RC delete_record(const Record &record) override; RC delete_record(const RID &rid) override; @@ -55,6 +46,8 @@ class View : public BaseTable bool is_mutable() const { return mutable_; } + std::unique_ptr &select_oper() { return select_oper_; } + private: Db *db_ = nullptr; string base_dir_; From 8e4d8dbd98a07ffab35b1190573d503e53e4d1f3 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sun, 13 Oct 2024 21:06:17 +0800 Subject: [PATCH 226/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E5=8D=95=E8=A1=A8=E5=92=8C=E5=A4=9A=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/executor/create_view_executor.cpp | 38 ++-------- src/observer/storage/db/db.cpp | 4 +- src/observer/storage/db/db.h | 2 +- src/observer/storage/field/field.h | 6 ++ src/observer/storage/record/record.h | 29 ++++++++ src/observer/storage/table/view.cpp | 72 ++++++++++++++++++- src/observer/storage/table/view.h | 12 ++-- 7 files changed, 120 insertions(+), 43 deletions(-) diff --git a/src/observer/sql/executor/create_view_executor.cpp b/src/observer/sql/executor/create_view_executor.cpp index 96745cfc..db895d5e 100644 --- a/src/observer/sql/executor/create_view_executor.cpp +++ b/src/observer/sql/executor/create_view_executor.cpp @@ -58,7 +58,7 @@ RC CreateViewExecutor::execute(SQLStageEvent *sql_event) } unique_ptr logical_oper = nullptr; - LogicalPlanGenerator::create(create_view_stmt->select_stmt(), logical_oper); + LogicalPlanGenerator::create(select_stmt, logical_oper); if (!logical_oper) { return RC::INTERNAL; } @@ -69,42 +69,12 @@ RC CreateViewExecutor::execute(SQLStageEvent *sql_event) return RC::INTERNAL; } - rc = session->get_current_db()->create_table( - table_name, attr_infos, std::move(physical_oper), StorageFormat::ROW_FORMAT); + auto tables = select_stmt->tables(); + rc = session->get_current_db()->create_table( + table_name, attr_infos, tables, std::move(physical_oper), StorageFormat::ROW_FORMAT); if (OB_FAIL(rc)) { return rc; } - // physical_oper->open(session->current_trx()); - // while (RC::SUCCESS == (rc = physical_oper->next())) { - // auto tuple = physical_oper->current_tuple(); - // int num = tuple->cell_num(); - // vector values; - // for (int i = 0; i < num; i++) { - // Value cell; - // rc = tuple->cell_at(i, cell); - // if (OB_FAIL(rc)) { - // return rc; - // } - // values.push_back(cell); - // } - // - // Record record; - // rc = table_->make_record(static_cast(values.size()), values.data(), record); - // if (OB_FAIL(rc)) { - // return rc; - // } - // - // rc = session->current_trx()->insert_record(table_, record); - // if (OB_FAIL(rc)) { - // return rc; - // } - // } - // - // rc = physical_oper->close(); - // if (OB_FAIL(rc)) { - // return rc; - // } - return rc; } diff --git a/src/observer/storage/db/db.cpp b/src/observer/storage/db/db.cpp index 1f8e5a90..83d00f82 100644 --- a/src/observer/storage/db/db.cpp +++ b/src/observer/storage/db/db.cpp @@ -16,6 +16,7 @@ See the Mulan PSL v2 for more details. */ #include #include +#include #include #include @@ -162,7 +163,7 @@ RC Db::create_table(const char *table_name, span attribut return RC::SUCCESS; } -RC Db::create_table(const char *table_name, span attributes, +RC Db::create_table(const char *table_name, span attributes, std::vector tables, unique_ptr select_oper, const StorageFormat storage_format) { RC rc = RC::SUCCESS; @@ -182,6 +183,7 @@ RC Db::create_table(const char *table_name, span attribut table_name, path_.c_str(), attributes, + std::move(tables), std::move(select_oper), storage_format); if (rc != RC::SUCCESS) { diff --git a/src/observer/storage/db/db.h b/src/observer/storage/db/db.h index fa0328a0..30970a87 100644 --- a/src/observer/storage/db/db.h +++ b/src/observer/storage/db/db.h @@ -68,7 +68,7 @@ class Db RC create_table(const char *table_name, span attributes, StorageFormat storage_format = StorageFormat::ROW_FORMAT); - RC create_table(const char *table_name, span attributes, + RC create_table(const char *table_name, span attributes, std::vector tables, unique_ptr select_oper, StorageFormat storage_format); RC drop_table(const char *table_name); diff --git a/src/observer/storage/field/field.h b/src/observer/storage/field/field.h index 90e38d06..d031c7e2 100644 --- a/src/observer/storage/field/field.h +++ b/src/observer/storage/field/field.h @@ -44,6 +44,12 @@ class Field const char *get_data(const Record &record); + bool operator==(const Field &other) const + { + return std::string(table_name()) == std::string(other.table_name()) && + std::string(field_name()) == std::string(other.field_name()); + } + private: const BaseTable *table_ = nullptr; const FieldMeta *field_ = nullptr; diff --git a/src/observer/storage/record/record.h b/src/observer/storage/record/record.h index 51cf64e7..d7eb610b 100644 --- a/src/observer/storage/record/record.h +++ b/src/observer/storage/record/record.h @@ -248,6 +248,35 @@ class Record return RC::SUCCESS; } + RC get_field(const FieldMeta &field_meta, Value &value) + { + int field_offset = field_meta.offset(); + int data_len = field_meta.len() - field_meta.nullable(); + + if (field_offset + field_meta.len() > len_) { + LOG_ERROR("invalid offset or length. offset=%d, length=%d, total length=%d", field_offset, field_meta.len(), len_); + return RC::INVALID_ARGUMENT; + } + + value.set_type(field_meta.type()); + + if (field_meta.nullable()) { + // 只有字段是可为空的,取标记位才有意义 + bool is_null = data_[field_offset + field_meta.len() - 1] == '1'; + if (is_null) { + value.set_null(); + return RC::SUCCESS; + } + } + + char *data = new char[data_len]; + memcpy(data, data_ + field_offset, data_len); + value.set_data(data, data_len); + delete[] data; + + return RC::SUCCESS; + } + char *data() { return this->data_; } const char *data() const { return this->data_; } int len() const { return this->len_; } diff --git a/src/observer/storage/table/view.cpp b/src/observer/storage/table/view.cpp index 08b372d5..a7a71bba 100644 --- a/src/observer/storage/table/view.cpp +++ b/src/observer/storage/table/view.cpp @@ -15,7 +15,8 @@ #include "storage/common/meta_util.h" RC View::create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, - span attributes, std::unique_ptr select_oper, StorageFormat storage_format) + span attributes, std::vector tables, + std::unique_ptr select_oper, StorageFormat storage_format) { if (table_id < 0) { LOG_WARN("invalid table id. table_id=%d, table_name=%s", table_id, name); @@ -71,16 +72,83 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co db_ = db; base_dir_ = base_dir; + tables_ = std::move(tables); + // 查询物理算子 select_oper_ = std::move(select_oper); // 视图类型 type_ = TableType::View; + auto field_metas = *table_meta_.field_metas(); + field_index_.resize(field_metas.size()); + for (int i = 0; i < field_metas.size(); ++i) { + auto &view_field_meta = field_metas[i]; + bool find = false; + for (auto &table : tables_) { + auto table_field_meta = table->table_meta().field(view_field_meta.name()); + // 当前视图字段在这个表 + if (table_field_meta != nullptr) { + field_index_[i] = {table, table_field_meta->field_id()}; + find = true; + break; + } + } + if (!find) { + return RC::SCHEMA_FIELD_MISSING; + } + } + LOG_INFO("Successfully create table %s:%s", base_dir, name); return rc; } -RC View::insert_record(Record &record) { return RC::SUCCESS; } +RC View::insert_record(Record &record) +{ + RC rc = RC::SUCCESS; + + for (auto &table : tables_) { + auto value_num = table->table_meta().field_num(); + std::vector values(value_num); + + // 不涉及的字段默认为 null + for (auto &value : values) { + value.set_null(); + } + + auto field_metas = *table_meta_.field_metas(); + // 遍历视图的字段找到基表的字段 + for (int i = 0; i < field_metas.size(); ++i) { + // 基表字段所在索引 + auto [base_table, idx] = field_index_[i]; + // 是一个表则写入 value + if (strcmp(base_table->name(), table->name()) == 0) { + // 插入值 + Value value; + rc = record.get_field(field_metas[i], value); + if (OB_FAIL(rc)) { + return rc; + } + values[idx] = std::move(value); + } + } + + // 生成真正的 record 并插入基表 + Record real_record; + rc = table->make_record(value_num, values.data(), real_record); + if (OB_FAIL(rc)) { + LOG_WARN("failed to make record. rc=%s", strrc(rc)); + return rc; + } + + rc = table->insert_record(real_record); + if (OB_FAIL(rc)) { + LOG_WARN("failed to insert record into table. rc=%s", strrc(rc)); + return rc; + } + } + + return RC::SUCCESS; +} RC View::delete_record(const Record &record) { return RC::SUCCESS; } diff --git a/src/observer/storage/table/view.h b/src/observer/storage/table/view.h index bdf94cd2..da364b90 100644 --- a/src/observer/storage/table/view.h +++ b/src/observer/storage/table/view.h @@ -30,8 +30,8 @@ class View : public BaseTable * @param attributes 字段 */ RC create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, - span attributes, std::unique_ptr select_oper, - StorageFormat storage_format); + span attributes, std::vector tables, + std::unique_ptr select_oper, StorageFormat storage_format); RC drop() override; @@ -51,7 +51,9 @@ class View : public BaseTable private: Db *db_ = nullptr; string base_dir_; - // std::unordered_map - std::unique_ptr select_oper_; // 存储了 select 的物理算子 - bool mutable_; // 是否是只读视图 + // 视图的 field 对应 哪个物理表和对应的 field idx + std::vector> field_index_; + std::vector tables_; + std::unique_ptr select_oper_; // 存储了 select 的物理算子 + bool mutable_; // 是否是只读视图 }; From 082df049bfdbe5605d8119e1c9a63384ac3b5003 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 14 Oct 2024 01:58:39 +0800 Subject: [PATCH 227/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E5=8D=95=E8=A1=A8=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression_tuple.h | 4 +- src/observer/sql/expr/tuple.h | 13 ++++- .../sql/operator/delete_physical_operator.cpp | 1 + .../operator/project_physical_operator.cpp | 4 +- .../operator/table_scan_physical_operator.cpp | 3 ++ .../operator/view_scan_physical_operator.cpp | 1 + src/observer/storage/record/record.h | 51 +++++++++++++------ src/observer/storage/table/view.cpp | 12 ++++- 8 files changed, 69 insertions(+), 20 deletions(-) diff --git a/src/observer/sql/expr/expression_tuple.h b/src/observer/sql/expr/expression_tuple.h index 21f34fdb..e84a4fb6 100644 --- a/src/observer/sql/expr/expression_tuple.h +++ b/src/observer/sql/expr/expression_tuple.h @@ -29,6 +29,8 @@ class ExpressionTuple : public Tuple void set_tuple(const Tuple *tuple) { child_tuple_ = tuple; } + const Tuple *child_tuple() { return child_tuple_; } + int cell_num() const override { return static_cast(expressions_.size()); } RC cell_at(int index, Value &cell) const override @@ -88,4 +90,4 @@ class ExpressionTuple : public Tuple private: const std::vector &expressions_; const Tuple *child_tuple_ = nullptr; -}; \ No newline at end of file +}; diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index 95ae4b2d..da0f8a1e 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -152,6 +152,17 @@ class Tuple result = 0; return rc; } + + void reset() { base_rids_.clear(); } + + void set_base_rids(std::vector> &base_rids) { base_rids_ = std::move(base_rids); } + + std::vector> &base_rids() { return base_rids_; } + + void append_base_rids(BaseTable *base_table, RID rid) { base_rids_.emplace_back(base_table, rid); } + +private: + std::vector> base_rids_; }; /** @@ -163,7 +174,7 @@ class RowTuple : public Tuple { public: RowTuple() = default; - virtual ~RowTuple() + ~RowTuple() override { for (FieldExpr *spec : speces_) { delete spec; diff --git a/src/observer/sql/operator/delete_physical_operator.cpp b/src/observer/sql/operator/delete_physical_operator.cpp index 944586da..016d08b4 100644 --- a/src/observer/sql/operator/delete_physical_operator.cpp +++ b/src/observer/sql/operator/delete_physical_operator.cpp @@ -42,6 +42,7 @@ RC DeletePhysicalOperator::open(Trx *trx) RowTuple *row_tuple = static_cast(tuple); Record &record = row_tuple->record(); + record.set_base_rids(tuple->base_rids()); records_.emplace_back(std::move(record)); } diff --git a/src/observer/sql/operator/project_physical_operator.cpp b/src/observer/sql/operator/project_physical_operator.cpp index c73f5053..0d51bfad 100644 --- a/src/observer/sql/operator/project_physical_operator.cpp +++ b/src/observer/sql/operator/project_physical_operator.cpp @@ -60,7 +60,9 @@ Tuple *ProjectPhysicalOperator::current_tuple() if (children_[0]->type() == PhysicalOperatorType::ORDER_BY) { return children_[0]->current_tuple(); } - tuple_.set_tuple(children_[0]->current_tuple()); + auto tuple = children_[0]->current_tuple(); + tuple_.set_base_rids(tuple->base_rids()); + tuple_.set_tuple(tuple); return &tuple_; } diff --git a/src/observer/sql/operator/table_scan_physical_operator.cpp b/src/observer/sql/operator/table_scan_physical_operator.cpp index a992852b..1c4179a3 100644 --- a/src/observer/sql/operator/table_scan_physical_operator.cpp +++ b/src/observer/sql/operator/table_scan_physical_operator.cpp @@ -36,6 +36,9 @@ RC TableScanPhysicalOperator::next() while (OB_SUCC(rc = record_scanner_.next(current_record_))) { LOG_TRACE("got a record. rid=%s", current_record_.rid().to_string().c_str()); + // 存储记录来自哪个表和 rid + tuple_.reset(); + tuple_.append_base_rids(table_, current_record_.rid()); tuple_.set_record(¤t_record_); rc = filter(tuple_, filter_result); if (rc != RC::SUCCESS) { diff --git a/src/observer/sql/operator/view_scan_physical_operator.cpp b/src/observer/sql/operator/view_scan_physical_operator.cpp index 3558ae2d..5aa710cc 100644 --- a/src/observer/sql/operator/view_scan_physical_operator.cpp +++ b/src/observer/sql/operator/view_scan_physical_operator.cpp @@ -102,6 +102,7 @@ RC ViewScanPhysicalOperator::next_record() } auto tuple = select_expr_->current_tuple(); + tuple_.set_base_rids(tuple->base_rids()); // 构造一个 view 的 record int cell_num = tuple->cell_num(); std::vector values(cell_num); diff --git a/src/observer/storage/record/record.h b/src/observer/storage/record/record.h index d7eb610b..461f6534 100644 --- a/src/observer/storage/record/record.h +++ b/src/observer/storage/record/record.h @@ -28,6 +28,7 @@ See the Mulan PSL v2 for more details. */ #include class Field; +class BaseTable; /** * @brief 标识一个记录的位置 @@ -103,20 +104,24 @@ class Record { public: Record() = default; - ~Record() + ~Record() { reset(); } + + void reset() { if (owner_ && data_ != nullptr) { free(data_); - data_ = nullptr; + owner_ = false; + data_ = nullptr; } } Record(const Record &other) { - rid_ = other.rid_; - data_ = other.data_; - len_ = other.len_; - owner_ = other.owner_; + rid_ = other.rid_; + base_rids_ = other.base_rids_; + data_ = other.data_; + len_ = other.len_; + owner_ = other.owner_; if (other.owner_) { char *tmp = (char *)malloc(other.len_); @@ -133,11 +138,12 @@ class Record } if (!owner_ || len_ != other.len_) { - this->~Record(); + reset(); new (this) Record(other); return *this; } - this->rid_ = other.rid_; + this->rid_ = other.rid_; + this->base_rids_ = other.base_rids_; memcpy(data_, other.data_, other.len_); return *this; } @@ -145,16 +151,19 @@ class Record Record clone() { Record new_record; - new_record.rid_ = this->rid_; - new_record.len_ = this->len_; - new_record.data_ = (char *)malloc(this->len_); + new_record.rid_ = this->rid_; + new_record.base_rids_ = this->base_rids_; + new_record.len_ = this->len_; + new_record.data_ = (char *)malloc(this->len_); memcpy(new_record.data_, this->data_, this->len_); + new_record.owner_ = true; return new_record; } Record(Record &&other) { - rid_ = other.rid_; + rid_ = other.rid_; + base_rids_ = std::move(other.base_rids_); if (!other.owner_) { data_ = other.data_; @@ -177,7 +186,7 @@ class Record return *this; } - this->~Record(); + reset(); new (this) Record(std::move(other)); return *this; } @@ -191,7 +200,7 @@ class Record void set_data_owner(char *data, int len) { ASSERT(len != 0, "the len of data should not be 0"); - this->~Record(); + reset(); this->data_ = data; this->len_ = len; @@ -287,13 +296,23 @@ class Record this->rid_.page_num = page_num; this->rid_.slot_num = slot_num; } + RID &rid() { return rid_; } const RID &rid() const { return rid_; } + void append_base_rid(BaseTable *table, RID rid) { base_rids_.emplace_back(table, rid); } + + void set_base_rids(std::vector> &base_rids) { base_rids_ = std::move(base_rids); } + + std::vector> &base_rids() { return base_rids_; } + + const std::vector> &base_rids() const { return base_rids_; } + private: - RID rid_; + RID rid_; // 存储基表的记录位置 + std::vector> base_rids_; // 用于视图存储当前记录由哪些基表的哪些记录组成 char *data_ = nullptr; int len_ = 0; /// 如果不是record自己来管理内存,这个字段可能是无效的 - bool owner_ = false; /// 表示当前是否由record来管理内存 + bool owner_ = false; /// 表示当前是否由record来管理内 }; diff --git a/src/observer/storage/table/view.cpp b/src/observer/storage/table/view.cpp index a7a71bba..2f1d0f43 100644 --- a/src/observer/storage/table/view.cpp +++ b/src/observer/storage/table/view.cpp @@ -150,7 +150,17 @@ RC View::insert_record(Record &record) return RC::SUCCESS; } -RC View::delete_record(const Record &record) { return RC::SUCCESS; } +RC View::delete_record(const Record &record) +{ + RC rc = RC::SUCCESS; + for (auto &[table, rid] : record.base_rids()) { + rc = table->delete_record(rid); + if (OB_FAIL(rc)) { + return rc; + } + } + return rc; +} RC View::delete_record(const RID &rid) { return RC::SUCCESS; } From 01fb458f0d3aed468ffbcdaeea4ec3f8105f0ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=9E=E7=BF=94?= <503194395@qq.com> Date: Mon, 14 Oct 2024 04:27:35 +0000 Subject: [PATCH 228/308] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dalias=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.h | 1 + src/observer/common/type/vector_type.cpp | 5 + src/observer/common/type/vector_type.h | 20 +- src/observer/sql/expr/expression.h | 3 + src/observer/sql/parser/expression_binder.cpp | 6 +- src/observer/sql/parser/lex_sql.cpp | 5512 ++++++----------- src/observer/sql/parser/lex_sql.h | 249 +- src/observer/sql/parser/yacc_sql.cpp | 5004 +++++---------- src/observer/sql/parser/yacc_sql.hpp | 225 +- src/observer/sql/parser/yacc_sql.y | 4 +- test/case/miniob_test.py | 2 + 11 files changed, 3585 insertions(+), 7446 deletions(-) create mode 100644 src/observer/common/type/vector_type.cpp diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index c1e97bb1..c77202c1 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -25,6 +25,7 @@ enum class AttrType NULLS, ///< 空字段 TEXTS, ///< text 超长字段(4096字节) LIST, ///< 列表 + VECTOR, ///< 向量 MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp new file mode 100644 index 00000000..96ed32d8 --- /dev/null +++ b/src/observer/common/type/vector_type.cpp @@ -0,0 +1,5 @@ +// +// Created by root on 24-10-14. +// +#pragma once +#include "common/type/vector_type.h" \ No newline at end of file diff --git a/src/observer/common/type/vector_type.h b/src/observer/common/type/vector_type.h index e06d8057..fb341a02 100644 --- a/src/observer/common/type/vector_type.h +++ b/src/observer/common/type/vector_type.h @@ -10,4 +10,22 @@ See the Mulan PSL v2 for more details. */ #pragma once -#include "common/type/data_type.h" \ No newline at end of file +#include "common/type/data_type.h" + +class VectorType : public DataType +{ +public: + VectorType() : DataType(AttrType::VECTOR) {} + + virtual ~VectorType() = default; + + int compare(const Value &left, const Value &right) const override; + + RC cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion = true) const override; + + RC set_value_from_str(Value &val, const string &data) const override; + + int cast_cost(AttrType type) override; + + RC to_string(const Value &val, string &result) const override; +}; \ No newline at end of file diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 9b0bf37f..5d6ead3a 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -116,7 +116,9 @@ class Expression * @brief 表达式的名字,比如是字段名称,或者用户在执行SQL语句时输入的内容 */ virtual const char *name() const { return name_.c_str(); } + virtual const char *alias() const { return alias_.c_str(); } virtual void set_name(std::string name) { name_ = std::move(name); } + virtual void set_alias(std::string alias) { alias_ = std::move(alias); } virtual bool name_empty() { return name_.empty(); } /** @@ -143,6 +145,7 @@ class Expression private: std::string name_; + std::string alias_; }; class StarExpr : public Expression diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 08322481..91af08e9 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -128,7 +128,7 @@ RC ExpressionBinder::bind_star_expression( auto star_expr = static_cast(expr.get()); - if (!is_blank(star_expr->name())) { + if (!is_blank(star_expr->name()) || !is_blank(star_expr->alias())) { return RC::INVALID_ALIAS; } @@ -190,7 +190,9 @@ RC ExpressionBinder::bind_unbound_field_expression( Field field(table, field_meta); FieldExpr *field_expr = new FieldExpr(field); // 这里设置了基类的 name 属性 - if (multi_tables_) { + if (!is_blank(unbound_field_expr->alias())) { + field_expr->set_name(unbound_field_expr->alias()); + } else if (multi_tables_) { // 创建一个字符数组来存储合并后的字符串 char result[256]; // 使用 snprintf 合并字符串 diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index a0ed0b54..6d19fb7a 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,4 +1,4 @@ -#line 1 "lex_sql.cpp" +#line 2 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -8,21 +8,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); -#line 25 "lex_sql.cpp" +#line 26 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -75,62 +77,61 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -154,12 +155,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -187,7 +188,7 @@ typedef void *yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin, yyscanner) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -205,7 +206,7 @@ typedef void *yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -220,85 +221,88 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -307,55 +311,59 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -static void yyensure_buffer_stack(yyscan_t yyscanner); -static void yy_load_buffer_state(yyscan_t yyscanner); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -363,2447 +371,318 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state(yyscan_t yyscanner); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); -static int yy_get_next_buffer(yyscan_t yyscanner); -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t)(yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 78 #define YY_END_OF_BUFFER 79 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info -{ - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[227] = {0, - 0, - 0, - 0, - 0, - 79, - 77, - 1, - 2, - 77, - 77, - 77, - 57, - 58, - 73, - 71, - 59, - 72, - 6, - 74, - 3, - 5, - 64, - 60, - 66, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 78, - 63, - 0, - 75, - 0, - 76, - 0, - 3, - 61, - 62, - 65, - 70, - 70, - 70, - 49, - 70, - 48, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 51, - 68, - 70, - 70, - 70, - 70, - 70, - 15, - 23, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 4, - 22, - 50, - 70, - 70, - - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 33, - 70, - 70, - 70, - 67, - 70, - 70, - 70, - 70, - 29, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 70, - 19, - 34, - 70, - 70, - 42, - 36, - 70, - 9, - 11, - 70, - 7, - 70, - 70, - 70, - 20, - 70, - 70, - 8, - 70, - 70, - 70, - 70, - 25, - 56, - 69, - 41, - 39, - 70, - 70, - 70, - 16, - 70, - 17, - 70, - 37, - 70, - 70, - 70, - 70, - 30, - 70, - 70, - 70, - 70, - 70, - 35, - 70, - 45, - 70, - 14, - 70, - 55, - 70, - 70, - 47, - 70, - 70, - 70, - 12, - 70, - 70, - - 70, - 21, - 31, - 10, - 27, - 52, - 70, - 54, - 46, - 43, - 24, - 70, - 70, - 18, - 70, - 13, - 38, - 28, - 26, - 44, - 70, - 70, - 53, - 40, - 32, - 0}; - -static const YY_CHAR yy_ec[256] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 3, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 4, - 5, - 1, - 1, - 1, - 1, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 1, - 16, - 17, - 18, - 19, - 1, - 1, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 1, - 1, - 1, - 1, - 45, - 1, - 46, - 47, - 48, - 49, - - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 45, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1}; - -static const YY_CHAR yy_meta[71] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2}; - -static const flex_int16_t yy_base[232] = {0, - 0, - 0, - 0, - 0, - 615, - 616, - 616, - 616, - 596, - 608, - 606, - 616, - 616, - 616, - 616, - 616, - 616, - 616, - 616, - 58, - 616, - 56, - 616, - 593, - 57, - 61, - 62, - 63, - 64, - 83, - 65, - 73, - 91, - 76, - 595, - 117, - 119, - 115, - 103, - 142, - 134, - 129, - 66, - 112, - 616, - 616, - 604, - 616, - 602, - 616, - 592, - 79, - 616, - 616, - 616, - 0, - 591, - 145, - 160, - 141, - 590, - 158, - 176, - 155, - 182, - 161, - 183, - 168, - 188, - 184, - 190, - 186, - 195, - 189, - 194, - 242, - 589, - 196, - 204, - 216, - 220, - 230, - 588, - 243, - 233, - 237, - 239, - 248, - 255, - 222, - 257, - 256, - 263, - 264, - 259, - 587, - 586, - 585, - 283, - 274, - - 282, - 288, - 298, - 308, - 300, - 312, - 290, - 301, - 302, - 315, - 316, - 321, - 289, - 328, - 327, - 323, - 342, - 348, - 352, - 334, - 354, - 356, - 360, - 584, - 362, - 366, - 369, - 371, - 583, - 349, - 370, - 377, - 374, - 388, - 382, - 395, - 389, - 386, - 397, - 582, - 581, - 396, - 393, - 580, - 572, - 399, - 571, - 569, - 407, - 567, - 419, - 413, - 420, - 566, - 422, - 421, - 565, - 405, - 428, - 430, - 432, - 564, - 561, - 560, - 557, - 448, - 436, - 455, - 460, - 556, - 464, - 555, - 447, - 553, - 446, - 462, - 466, - 472, - 552, - 474, - 476, - 483, - 473, - 477, - 550, - 489, - 548, - 326, - 546, - 491, - 541, - 499, - 488, - 531, - 503, - 504, - 506, - 502, - 505, - 510, - - 509, - 530, - 445, - 427, - 262, - 226, - 515, - 224, - 223, - 218, - 202, - 521, - 529, - 157, - 535, - 146, - 132, - 127, - 126, - 123, - 538, - 527, - 120, - 89, - 88, - 616, - 588, - 590, - 592, - 99, - 82}; - -static const flex_int16_t yy_def[232] = {0, - 226, - 1, - 227, - 227, - 226, - 226, - 226, - 226, - 226, - 228, - 229, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 226, - 226, - 228, - 226, - 229, - 226, - 226, - 226, - 226, - 226, - 226, - 231, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 226, - 230, - 230, - 230, - 230, - - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 230, - 0, - 226, - 226, - 226, - 226, - 226}; - -static const flex_int16_t yy_nxt[687] = {0, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 35, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 51, - 56, - 52, - 53, - 54, - 56, - 56, - 56, - 56, - 56, - 56, - 62, - 66, - 56, - 60, - 94, - 67, - 56, - 63, - 58, - 56, - 51, - 74, - 52, - 59, - 64, - 75, - 56, - 65, - 68, - - 57, - 73, - 56, - 56, - 61, - 56, - 69, - 62, - 66, - 78, - 60, - 94, - 67, - 70, - 63, - 58, - 71, - 56, - 74, - 72, - 59, - 64, - 75, - 76, - 65, - 68, - 56, - 73, - 77, - 56, - 61, - 56, - 69, - 56, - 56, - 78, - 85, - 56, - 95, - 70, - 56, - 56, - 71, - 56, - 79, - 72, - 56, - 83, - 56, - 76, - 80, - 84, - 81, - 90, - 77, - 56, - 56, - 91, - 82, - 56, - 56, - 92, - 85, - 93, - 95, - 86, - 99, - 97, - 87, - 56, - 79, - 56, - 56, - 83, - 56, - 56, - 80, - 84, - 81, - 90, - 88, - 98, - 56, - 91, - 82, - 89, - 102, - 92, - 100, - 93, - 56, - 86, - 99, - 97, - 87, - 101, - 56, - 56, - 56, - 104, - - 56, - 107, - 56, - 56, - 56, - 103, - 88, - 98, - 56, - 56, - 56, - 89, - 102, - 105, - 100, - 108, - 56, - 110, - 56, - 112, - 106, - 101, - 109, - 121, - 115, - 104, - 111, - 107, - 113, - 114, - 56, - 103, - 56, - 122, - 56, - 123, - 56, - 56, - 56, - 105, - 56, - 108, - 133, - 110, - 56, - 112, - 106, - 56, - 109, - 121, - 115, - 56, - 111, - 56, - 113, - 114, - 56, - 56, - 124, - 122, - 125, - 123, - 56, - 127, - 116, - 126, - 117, - 128, - 133, - 56, - 56, - 56, - 130, - 56, - 118, - 129, - 56, - 56, - 56, - 119, - 120, - 131, - 138, - 135, - 124, - 136, - 125, - 132, - 56, - 127, - 116, - 126, - 117, - 128, - 137, - 140, - 56, - 56, - 130, - 134, - - 118, - 129, - 56, - 56, - 56, - 119, - 120, - 131, - 138, - 135, - 139, - 136, - 56, - 132, - 56, - 56, - 56, - 143, - 141, - 142, - 137, - 140, - 56, - 146, - 148, - 134, - 56, - 144, - 155, - 56, - 56, - 145, - 151, - 147, - 152, - 56, - 139, - 56, - 149, - 150, - 56, - 56, - 56, - 143, - 141, - 142, - 158, - 153, - 56, - 146, - 148, - 209, - 154, - 144, - 155, - 156, - 56, - 145, - 151, - 147, - 152, - 157, - 56, - 56, - 149, - 150, - 56, - 162, - 56, - 159, - 56, - 160, - 158, - 153, - 56, - 161, - 56, - 209, - 154, - 164, - 56, - 156, - 165, - 56, - 56, - 56, - 163, - 157, - 56, - 167, - 170, - 56, - 166, - 162, - 169, - 159, - 56, - 160, - 172, - 168, - - 56, - 161, - 56, - 56, - 173, - 164, - 171, - 56, - 165, - 56, - 56, - 56, - 163, - 56, - 176, - 167, - 170, - 175, - 166, - 56, - 169, - 56, - 178, - 180, - 172, - 168, - 174, - 56, - 177, - 179, - 173, - 181, - 171, - 56, - 56, - 56, - 56, - 182, - 184, - 186, - 176, - 56, - 56, - 175, - 56, - 183, - 56, - 189, - 178, - 180, - 56, - 185, - 174, - 188, - 177, - 179, - 187, - 181, - 190, - 56, - 56, - 56, - 56, - 182, - 184, - 186, - 191, - 193, - 192, - 56, - 198, - 183, - 194, - 189, - 56, - 195, - 56, - 185, - 56, - 188, - 56, - 196, - 187, - 197, - 190, - 199, - 56, - 56, - 56, - 201, - 56, - 56, - 191, - 193, - 192, - 202, - 198, - 56, - 194, - 204, - - 200, - 195, - 56, - 56, - 207, - 56, - 205, - 196, - 212, - 197, - 206, - 199, - 203, - 56, - 210, - 201, - 56, - 56, - 56, - 56, - 56, - 202, - 213, - 56, - 56, - 204, - 200, - 208, - 217, - 56, - 207, - 215, - 205, - 218, - 212, - 56, - 206, - 211, - 203, - 216, - 210, - 56, - 214, - 56, - 56, - 56, - 219, - 220, - 213, - 56, - 222, - 221, - 56, - 208, - 217, - 56, - 225, - 215, - 223, - 218, - 56, - 224, - 56, - 211, - 56, - 216, - 56, - 56, - 214, - 56, - 56, - 56, - 219, - 220, - 56, - 56, - 222, - 221, - 56, - 56, - 56, - 56, - 225, - 56, - 223, - 56, - 56, - 224, - 45, - 45, - 47, - 47, - 49, - 49, - 56, - 56, - 56, - 56, - 56, - 56, - - 56, - 96, - 56, - 56, - 56, - 56, - 96, - 50, - 48, - 56, - 55, - 50, - 48, - 46, - 226, - 5, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226}; - -static const flex_int16_t yy_chk[687] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 20, - 25, - 20, - 22, - 22, - 26, - 27, - 28, - 29, - 31, - 43, - 27, - 28, - 231, - 26, - 43, - 28, - 32, - 27, - 25, - 34, - 52, - 32, - 52, - 25, - 27, - 32, - 30, - 27, - 28, - - 230, - 31, - 225, - 224, - 26, - 33, - 29, - 27, - 28, - 34, - 26, - 43, - 28, - 30, - 27, - 25, - 30, - 39, - 32, - 30, - 25, - 27, - 32, - 33, - 27, - 28, - 44, - 31, - 33, - 38, - 26, - 36, - 29, - 37, - 223, - 34, - 39, - 220, - 44, - 30, - 219, - 218, - 30, - 42, - 36, - 30, - 217, - 38, - 41, - 33, - 36, - 38, - 37, - 41, - 33, - 60, - 40, - 41, - 37, - 58, - 216, - 42, - 39, - 42, - 44, - 40, - 60, - 58, - 40, - 64, - 36, - 214, - 62, - 38, - 59, - 66, - 36, - 38, - 37, - 41, - 40, - 59, - 68, - 41, - 37, - 40, - 64, - 42, - 62, - 42, - 63, - 40, - 60, - 58, - 40, - 63, - 65, - 67, - 70, - 66, - - 72, - 68, - 69, - 74, - 71, - 65, - 40, - 59, - 75, - 73, - 78, - 40, - 64, - 67, - 62, - 69, - 211, - 70, - 79, - 72, - 67, - 63, - 69, - 78, - 75, - 66, - 71, - 68, - 73, - 74, - 80, - 65, - 210, - 79, - 81, - 80, - 90, - 209, - 208, - 67, - 206, - 69, - 90, - 70, - 82, - 72, - 67, - 85, - 69, - 78, - 75, - 86, - 71, - 87, - 73, - 74, - 76, - 84, - 81, - 79, - 82, - 80, - 88, - 85, - 76, - 84, - 76, - 86, - 90, - 89, - 92, - 91, - 87, - 95, - 76, - 86, - 205, - 93, - 94, - 76, - 76, - 88, - 95, - 92, - 81, - 93, - 82, - 89, - 100, - 85, - 76, - 84, - 76, - 86, - 94, - 100, - 101, - 99, - 87, - 91, - - 76, - 86, - 102, - 113, - 107, - 76, - 76, - 88, - 95, - 92, - 99, - 93, - 103, - 89, - 105, - 108, - 109, - 103, - 101, - 102, - 94, - 100, - 104, - 105, - 107, - 91, - 106, - 104, - 113, - 110, - 111, - 104, - 109, - 106, - 110, - 112, - 99, - 116, - 108, - 108, - 188, - 115, - 114, - 103, - 101, - 102, - 116, - 111, - 120, - 105, - 107, - 188, - 112, - 104, - 113, - 114, - 117, - 104, - 109, - 106, - 110, - 115, - 118, - 130, - 108, - 108, - 119, - 120, - 121, - 117, - 122, - 118, - 116, - 111, - 123, - 119, - 125, - 188, - 112, - 122, - 126, - 114, - 123, - 127, - 131, - 128, - 121, - 115, - 133, - 126, - 130, - 132, - 125, - 120, - 128, - 117, - 135, - 118, - 132, - 127, - - 138, - 119, - 134, - 137, - 133, - 122, - 131, - 143, - 123, - 136, - 142, - 139, - 121, - 146, - 136, - 126, - 130, - 135, - 125, - 158, - 128, - 149, - 138, - 142, - 132, - 127, - 134, - 152, - 137, - 139, - 133, - 143, - 131, - 151, - 153, - 156, - 155, - 146, - 151, - 153, - 136, - 204, - 159, - 135, - 160, - 149, - 161, - 158, - 138, - 142, - 167, - 152, - 134, - 156, - 137, - 139, - 155, - 143, - 159, - 203, - 175, - 173, - 166, - 146, - 151, - 153, - 160, - 166, - 161, - 168, - 173, - 149, - 167, - 158, - 169, - 168, - 176, - 152, - 171, - 156, - 177, - 169, - 155, - 171, - 159, - 175, - 178, - 183, - 180, - 177, - 181, - 184, - 160, - 166, - 161, - 178, - 173, - 182, - 167, - 181, - - 176, - 168, - 193, - 186, - 184, - 190, - 182, - 169, - 193, - 171, - 183, - 175, - 180, - 192, - 190, - 177, - 198, - 195, - 196, - 199, - 197, - 178, - 195, - 201, - 200, - 181, - 176, - 186, - 199, - 207, - 184, - 197, - 182, - 200, - 193, - 212, - 183, - 192, - 180, - 198, - 190, - 222, - 196, - 213, - 202, - 194, - 201, - 207, - 195, - 215, - 213, - 212, - 221, - 186, - 199, - 191, - 222, - 197, - 215, - 200, - 189, - 221, - 187, - 192, - 185, - 198, - 179, - 174, - 196, - 172, - 170, - 165, - 201, - 207, - 164, - 163, - 213, - 212, - 162, - 157, - 154, - 150, - 222, - 148, - 215, - 147, - 145, - 221, - 227, - 227, - 228, - 228, - 229, - 229, - 144, - 141, - 140, - 129, - 124, - 98, - - 97, - 96, - 83, - 77, - 61, - 57, - 51, - 49, - 47, - 35, - 24, - 11, - 10, - 9, - 5, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226, - 226}; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[227] = + { 0, + 0, 0, 0, 0, 79, 77, 1, 2, 77, 77, + 77, 57, 58, 73, 71, 59, 72, 6, 74, 3, + 5, 64, 60, 66, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 78, 63, 0, 75, 0, 76, + 0, 3, 61, 62, 65, 70, 70, 70, 49, 70, + 48, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 51, 68, 70, 70, 70, + 70, 70, 15, 23, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 4, 22, 50, 70, 70, + + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 33, + 70, 70, 70, 67, 70, 70, 70, 70, 29, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 19, + 34, 70, 70, 42, 36, 70, 9, 11, 70, 7, + 70, 70, 70, 20, 70, 70, 8, 70, 70, 70, + 70, 25, 56, 69, 41, 39, 70, 70, 70, 16, + 70, 17, 70, 37, 70, 70, 70, 70, 30, 70, + 70, 70, 70, 70, 35, 70, 45, 70, 14, 70, + 55, 70, 70, 47, 70, 70, 70, 12, 70, 70, + + 70, 21, 31, 10, 27, 52, 70, 54, 46, 43, + 24, 70, 70, 18, 70, 13, 38, 28, 26, 44, + 70, 70, 53, 40, 32, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, + 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, + + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[71] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + } ; + +static const flex_int16_t yy_base[232] = + { 0, + 0, 0, 0, 0, 615, 616, 616, 616, 596, 608, + 606, 616, 616, 616, 616, 616, 616, 616, 616, 58, + 616, 56, 616, 593, 57, 61, 62, 63, 64, 83, + 65, 73, 91, 76, 595, 117, 119, 115, 103, 142, + 134, 129, 66, 112, 616, 616, 604, 616, 602, 616, + 592, 79, 616, 616, 616, 0, 591, 145, 160, 141, + 590, 158, 176, 155, 182, 161, 183, 168, 188, 184, + 190, 186, 195, 189, 194, 242, 589, 196, 204, 216, + 220, 230, 588, 243, 233, 237, 239, 248, 255, 222, + 257, 256, 263, 264, 259, 587, 586, 585, 283, 274, + + 282, 288, 298, 308, 300, 312, 290, 301, 302, 315, + 316, 321, 289, 328, 327, 323, 342, 348, 352, 334, + 354, 356, 360, 584, 362, 366, 369, 371, 583, 349, + 370, 377, 374, 388, 382, 395, 389, 386, 397, 582, + 581, 396, 393, 580, 572, 399, 571, 569, 407, 567, + 419, 413, 420, 566, 422, 421, 565, 405, 428, 430, + 432, 564, 561, 560, 557, 448, 436, 455, 460, 556, + 464, 555, 447, 553, 446, 462, 466, 472, 552, 474, + 476, 483, 473, 477, 550, 489, 548, 326, 546, 491, + 541, 499, 488, 531, 503, 504, 506, 502, 505, 510, + + 509, 530, 445, 427, 262, 226, 515, 224, 223, 218, + 202, 521, 529, 157, 535, 146, 132, 127, 126, 123, + 538, 527, 120, 89, 88, 616, 588, 590, 592, 99, + 82 + } ; + +static const flex_int16_t yy_def[232] = + { 0, + 226, 1, 227, 227, 226, 226, 226, 226, 226, 228, + 229, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 226, 226, 228, 226, 229, 226, + 226, 226, 226, 226, 226, 231, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 226, 230, 230, 230, 230, + + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 0, 226, 226, 226, 226, + 226 + } ; + +static const flex_int16_t yy_nxt[687] = + { 0, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, + 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, + 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, + 51, 56, 52, 53, 54, 56, 56, 56, 56, 56, + 56, 62, 66, 56, 60, 94, 67, 56, 63, 58, + 56, 51, 74, 52, 59, 64, 75, 56, 65, 68, + + 57, 73, 56, 56, 61, 56, 69, 62, 66, 78, + 60, 94, 67, 70, 63, 58, 71, 56, 74, 72, + 59, 64, 75, 76, 65, 68, 56, 73, 77, 56, + 61, 56, 69, 56, 56, 78, 85, 56, 95, 70, + 56, 56, 71, 56, 79, 72, 56, 83, 56, 76, + 80, 84, 81, 90, 77, 56, 56, 91, 82, 56, + 56, 92, 85, 93, 95, 86, 99, 97, 87, 56, + 79, 56, 56, 83, 56, 56, 80, 84, 81, 90, + 88, 98, 56, 91, 82, 89, 102, 92, 100, 93, + 56, 86, 99, 97, 87, 101, 56, 56, 56, 104, + + 56, 107, 56, 56, 56, 103, 88, 98, 56, 56, + 56, 89, 102, 105, 100, 108, 56, 110, 56, 112, + 106, 101, 109, 121, 115, 104, 111, 107, 113, 114, + 56, 103, 56, 122, 56, 123, 56, 56, 56, 105, + 56, 108, 133, 110, 56, 112, 106, 56, 109, 121, + 115, 56, 111, 56, 113, 114, 56, 56, 124, 122, + 125, 123, 56, 127, 116, 126, 117, 128, 133, 56, + 56, 56, 130, 56, 118, 129, 56, 56, 56, 119, + 120, 131, 138, 135, 124, 136, 125, 132, 56, 127, + 116, 126, 117, 128, 137, 140, 56, 56, 130, 134, + + 118, 129, 56, 56, 56, 119, 120, 131, 138, 135, + 139, 136, 56, 132, 56, 56, 56, 143, 141, 142, + 137, 140, 56, 146, 148, 134, 56, 144, 155, 56, + 56, 145, 151, 147, 152, 56, 139, 56, 149, 150, + 56, 56, 56, 143, 141, 142, 158, 153, 56, 146, + 148, 209, 154, 144, 155, 156, 56, 145, 151, 147, + 152, 157, 56, 56, 149, 150, 56, 162, 56, 159, + 56, 160, 158, 153, 56, 161, 56, 209, 154, 164, + 56, 156, 165, 56, 56, 56, 163, 157, 56, 167, + 170, 56, 166, 162, 169, 159, 56, 160, 172, 168, + + 56, 161, 56, 56, 173, 164, 171, 56, 165, 56, + 56, 56, 163, 56, 176, 167, 170, 175, 166, 56, + 169, 56, 178, 180, 172, 168, 174, 56, 177, 179, + 173, 181, 171, 56, 56, 56, 56, 182, 184, 186, + 176, 56, 56, 175, 56, 183, 56, 189, 178, 180, + 56, 185, 174, 188, 177, 179, 187, 181, 190, 56, + 56, 56, 56, 182, 184, 186, 191, 193, 192, 56, + 198, 183, 194, 189, 56, 195, 56, 185, 56, 188, + 56, 196, 187, 197, 190, 199, 56, 56, 56, 201, + 56, 56, 191, 193, 192, 202, 198, 56, 194, 204, + + 200, 195, 56, 56, 207, 56, 205, 196, 212, 197, + 206, 199, 203, 56, 210, 201, 56, 56, 56, 56, + 56, 202, 213, 56, 56, 204, 200, 208, 217, 56, + 207, 215, 205, 218, 212, 56, 206, 211, 203, 216, + 210, 56, 214, 56, 56, 56, 219, 220, 213, 56, + 222, 221, 56, 208, 217, 56, 225, 215, 223, 218, + 56, 224, 56, 211, 56, 216, 56, 56, 214, 56, + 56, 56, 219, 220, 56, 56, 222, 221, 56, 56, + 56, 56, 225, 56, 223, 56, 56, 224, 45, 45, + 47, 47, 49, 49, 56, 56, 56, 56, 56, 56, + + 56, 96, 56, 56, 56, 56, 96, 50, 48, 56, + 55, 50, 48, 46, 226, 5, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226 + } ; + +static const flex_int16_t yy_chk[687] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, + 43, 27, 28, 231, 26, 43, 28, 32, 27, 25, + 34, 52, 32, 52, 25, 27, 32, 30, 27, 28, + + 230, 31, 225, 224, 26, 33, 29, 27, 28, 34, + 26, 43, 28, 30, 27, 25, 30, 39, 32, 30, + 25, 27, 32, 33, 27, 28, 44, 31, 33, 38, + 26, 36, 29, 37, 223, 34, 39, 220, 44, 30, + 219, 218, 30, 42, 36, 30, 217, 38, 41, 33, + 36, 38, 37, 41, 33, 60, 40, 41, 37, 58, + 216, 42, 39, 42, 44, 40, 60, 58, 40, 64, + 36, 214, 62, 38, 59, 66, 36, 38, 37, 41, + 40, 59, 68, 41, 37, 40, 64, 42, 62, 42, + 63, 40, 60, 58, 40, 63, 65, 67, 70, 66, + + 72, 68, 69, 74, 71, 65, 40, 59, 75, 73, + 78, 40, 64, 67, 62, 69, 211, 70, 79, 72, + 67, 63, 69, 78, 75, 66, 71, 68, 73, 74, + 80, 65, 210, 79, 81, 80, 90, 209, 208, 67, + 206, 69, 90, 70, 82, 72, 67, 85, 69, 78, + 75, 86, 71, 87, 73, 74, 76, 84, 81, 79, + 82, 80, 88, 85, 76, 84, 76, 86, 90, 89, + 92, 91, 87, 95, 76, 86, 205, 93, 94, 76, + 76, 88, 95, 92, 81, 93, 82, 89, 100, 85, + 76, 84, 76, 86, 94, 100, 101, 99, 87, 91, + + 76, 86, 102, 113, 107, 76, 76, 88, 95, 92, + 99, 93, 103, 89, 105, 108, 109, 103, 101, 102, + 94, 100, 104, 105, 107, 91, 106, 104, 113, 110, + 111, 104, 109, 106, 110, 112, 99, 116, 108, 108, + 188, 115, 114, 103, 101, 102, 116, 111, 120, 105, + 107, 188, 112, 104, 113, 114, 117, 104, 109, 106, + 110, 115, 118, 130, 108, 108, 119, 120, 121, 117, + 122, 118, 116, 111, 123, 119, 125, 188, 112, 122, + 126, 114, 123, 127, 131, 128, 121, 115, 133, 126, + 130, 132, 125, 120, 128, 117, 135, 118, 132, 127, + + 138, 119, 134, 137, 133, 122, 131, 143, 123, 136, + 142, 139, 121, 146, 136, 126, 130, 135, 125, 158, + 128, 149, 138, 142, 132, 127, 134, 152, 137, 139, + 133, 143, 131, 151, 153, 156, 155, 146, 151, 153, + 136, 204, 159, 135, 160, 149, 161, 158, 138, 142, + 167, 152, 134, 156, 137, 139, 155, 143, 159, 203, + 175, 173, 166, 146, 151, 153, 160, 166, 161, 168, + 173, 149, 167, 158, 169, 168, 176, 152, 171, 156, + 177, 169, 155, 171, 159, 175, 178, 183, 180, 177, + 181, 184, 160, 166, 161, 178, 173, 182, 167, 181, + + 176, 168, 193, 186, 184, 190, 182, 169, 193, 171, + 183, 175, 180, 192, 190, 177, 198, 195, 196, 199, + 197, 178, 195, 201, 200, 181, 176, 186, 199, 207, + 184, 197, 182, 200, 193, 212, 183, 192, 180, 198, + 190, 222, 196, 213, 202, 194, 201, 207, 195, 215, + 213, 212, 221, 186, 199, 191, 222, 197, 215, 200, + 189, 221, 187, 192, 185, 198, 179, 174, 196, 172, + 170, 165, 201, 207, 164, 163, 213, 212, 162, 157, + 154, 150, 222, 148, 215, 147, 145, 221, 227, 227, + 228, 228, 229, 229, 144, 141, 140, 129, 124, 98, + + 97, 96, 83, 77, 61, 57, 51, 49, 47, 35, + 24, 11, 10, 9, 5, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226 + } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2815,8 +694,8 @@ static const flex_int16_t yy_chk[687] = {0, #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -2830,15 +709,13 @@ static const flex_int16_t yy_chk[687] = {0, #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) \ - LOG_DEBUG("%s", #token); \ - return token +#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token #line 720 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -2867,124 +744,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t -{ - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char *yy_last_accepting_cpos; + { - int yylineno_r; - int yy_flex_debug_r; + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; - YYSTYPE *yylval_r; + int yylineno_r; + int yy_flex_debug_r; - YYLTYPE *yylloc_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; -}; /* end struct yyguts_t */ + YYSTYPE * yylval_r; -static int yy_init_globals(yyscan_t yyscanner); + YYLTYPE * yylloc_r; -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -#define yylval yyg->yylval_r + }; /* end struct yyguts_t */ -#define yylloc yyg->yylloc_r +static int yy_init_globals ( yyscan_t yyscanner ); -int yylex_init(yyscan_t *scanner); + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + int yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner); +static int yyinput ( yyscan_t yyscanner ); #else -static int input(yyscan_t yyscanner); +static int input ( yyscan_t yyscanner ); #endif #endif @@ -3004,38 +881,42 @@ static int input(yyscan_t yyscanner); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - yy_size_t n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -3054,7 +935,7 @@ static int input(yyscan_t yyscanner); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -3065,9 +946,11 @@ static int input(yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -3079,542 +962,629 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP YY_USER_ACTION +#define YY_RULE_SETUP \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if (!yyg->yy_init) { - yyg->yy_init = 1; + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!yyg->yy_start) - yyg->yy_start = 1; /* first start state */ + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_load_buffer_state(yyscanner); - } + yy_load_buffer_state( yyscanner ); + } - { + { #line 75 "lex_sql.l" + #line 1015 "lex_sql.cpp" - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 227) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_base[yy_current_state] != 616); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - if (yy_act == 0) { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - - case 1: YY_RULE_SETUP + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 227 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 616 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 77 "lex_sql.l" - // ignore whitespace - YY_BREAK - case 2: - /* rule 2 can match eol */ - YY_RULE_SETUP +// ignore whitespace + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP #line 78 "lex_sql.l" - ; - YY_BREAK - case 3: YY_RULE_SETUP +; + YY_BREAK +case 3: +YY_RULE_SETUP #line 80 "lex_sql.l" - yylval->number = atoi(yytext); - RETURN_TOKEN(NUMBER); - YY_BREAK - case 4: YY_RULE_SETUP +yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); + YY_BREAK +case 4: +YY_RULE_SETUP #line 81 "lex_sql.l" - yylval->floats = (float)(atof(yytext)); - RETURN_TOKEN(FLOAT); - YY_BREAK - case 5: YY_RULE_SETUP +yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); + YY_BREAK +case 5: +YY_RULE_SETUP #line 83 "lex_sql.l" - RETURN_TOKEN(SEMICOLON); - YY_BREAK - case 6: YY_RULE_SETUP +RETURN_TOKEN(SEMICOLON); + YY_BREAK +case 6: +YY_RULE_SETUP #line 84 "lex_sql.l" - RETURN_TOKEN(DOT); - YY_BREAK - case 7: YY_RULE_SETUP +RETURN_TOKEN(DOT); + YY_BREAK +case 7: +YY_RULE_SETUP #line 85 "lex_sql.l" - RETURN_TOKEN(EXIT); - YY_BREAK - case 8: YY_RULE_SETUP +RETURN_TOKEN(EXIT); + YY_BREAK +case 8: +YY_RULE_SETUP #line 86 "lex_sql.l" - RETURN_TOKEN(HELP); - YY_BREAK - case 9: YY_RULE_SETUP +RETURN_TOKEN(HELP); + YY_BREAK +case 9: +YY_RULE_SETUP #line 87 "lex_sql.l" - RETURN_TOKEN(DESC); - YY_BREAK - case 10: YY_RULE_SETUP +RETURN_TOKEN(DESC); + YY_BREAK +case 10: +YY_RULE_SETUP #line 88 "lex_sql.l" - RETURN_TOKEN(CREATE); - YY_BREAK - case 11: YY_RULE_SETUP +RETURN_TOKEN(CREATE); + YY_BREAK +case 11: +YY_RULE_SETUP #line 89 "lex_sql.l" - RETURN_TOKEN(DROP); - YY_BREAK - case 12: YY_RULE_SETUP +RETURN_TOKEN(DROP); + YY_BREAK +case 12: +YY_RULE_SETUP #line 90 "lex_sql.l" - RETURN_TOKEN(TABLE); - YY_BREAK - case 13: YY_RULE_SETUP +RETURN_TOKEN(TABLE); + YY_BREAK +case 13: +YY_RULE_SETUP #line 91 "lex_sql.l" - RETURN_TOKEN(TABLES); - YY_BREAK - case 14: YY_RULE_SETUP +RETURN_TOKEN(TABLES); + YY_BREAK +case 14: +YY_RULE_SETUP #line 92 "lex_sql.l" - RETURN_TOKEN(INDEX); - YY_BREAK - case 15: YY_RULE_SETUP +RETURN_TOKEN(INDEX); + YY_BREAK +case 15: +YY_RULE_SETUP #line 93 "lex_sql.l" - RETURN_TOKEN(ON); - YY_BREAK - case 16: YY_RULE_SETUP +RETURN_TOKEN(ON); + YY_BREAK +case 16: +YY_RULE_SETUP #line 94 "lex_sql.l" - RETURN_TOKEN(SHOW); - YY_BREAK - case 17: YY_RULE_SETUP +RETURN_TOKEN(SHOW); + YY_BREAK +case 17: +YY_RULE_SETUP #line 95 "lex_sql.l" - RETURN_TOKEN(SYNC); - YY_BREAK - case 18: YY_RULE_SETUP +RETURN_TOKEN(SYNC); + YY_BREAK +case 18: +YY_RULE_SETUP #line 96 "lex_sql.l" - RETURN_TOKEN(SELECT); - YY_BREAK - case 19: YY_RULE_SETUP +RETURN_TOKEN(SELECT); + YY_BREAK +case 19: +YY_RULE_SETUP #line 97 "lex_sql.l" - RETURN_TOKEN(CALC); - YY_BREAK - case 20: YY_RULE_SETUP +RETURN_TOKEN(CALC); + YY_BREAK +case 20: +YY_RULE_SETUP #line 98 "lex_sql.l" - RETURN_TOKEN(FROM); - YY_BREAK - case 21: YY_RULE_SETUP +RETURN_TOKEN(FROM); + YY_BREAK +case 21: +YY_RULE_SETUP #line 99 "lex_sql.l" - RETURN_TOKEN(WHERE); - YY_BREAK - case 22: YY_RULE_SETUP +RETURN_TOKEN(WHERE); + YY_BREAK +case 22: +YY_RULE_SETUP #line 100 "lex_sql.l" - RETURN_TOKEN(AND); - YY_BREAK - case 23: YY_RULE_SETUP +RETURN_TOKEN(AND); + YY_BREAK +case 23: +YY_RULE_SETUP #line 101 "lex_sql.l" - RETURN_TOKEN(OR); - YY_BREAK - case 24: YY_RULE_SETUP +RETURN_TOKEN(OR); + YY_BREAK +case 24: +YY_RULE_SETUP #line 102 "lex_sql.l" - RETURN_TOKEN(INSERT); - YY_BREAK - case 25: YY_RULE_SETUP +RETURN_TOKEN(INSERT); + YY_BREAK +case 25: +YY_RULE_SETUP #line 103 "lex_sql.l" - RETURN_TOKEN(INTO); - YY_BREAK - case 26: YY_RULE_SETUP +RETURN_TOKEN(INTO); + YY_BREAK +case 26: +YY_RULE_SETUP #line 104 "lex_sql.l" - RETURN_TOKEN(VALUES); - YY_BREAK - case 27: YY_RULE_SETUP +RETURN_TOKEN(VALUES); + YY_BREAK +case 27: +YY_RULE_SETUP #line 105 "lex_sql.l" - RETURN_TOKEN(DELETE); - YY_BREAK - case 28: YY_RULE_SETUP +RETURN_TOKEN(DELETE); + YY_BREAK +case 28: +YY_RULE_SETUP #line 106 "lex_sql.l" - RETURN_TOKEN(UPDATE); - YY_BREAK - case 29: YY_RULE_SETUP +RETURN_TOKEN(UPDATE); + YY_BREAK +case 29: +YY_RULE_SETUP #line 107 "lex_sql.l" - RETURN_TOKEN(SET); - YY_BREAK - case 30: YY_RULE_SETUP +RETURN_TOKEN(SET); + YY_BREAK +case 30: +YY_RULE_SETUP #line 108 "lex_sql.l" - RETURN_TOKEN(TRX_BEGIN); - YY_BREAK - case 31: YY_RULE_SETUP +RETURN_TOKEN(TRX_BEGIN); + YY_BREAK +case 31: +YY_RULE_SETUP #line 109 "lex_sql.l" - RETURN_TOKEN(TRX_COMMIT); - YY_BREAK - case 32: YY_RULE_SETUP +RETURN_TOKEN(TRX_COMMIT); + YY_BREAK +case 32: +YY_RULE_SETUP #line 110 "lex_sql.l" - RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK - case 33: YY_RULE_SETUP +RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK +case 33: +YY_RULE_SETUP #line 111 "lex_sql.l" - RETURN_TOKEN(INT_T); - YY_BREAK - case 34: YY_RULE_SETUP +RETURN_TOKEN(INT_T); + YY_BREAK +case 34: +YY_RULE_SETUP #line 112 "lex_sql.l" - RETURN_TOKEN(STRING_T); - YY_BREAK - case 35: YY_RULE_SETUP +RETURN_TOKEN(STRING_T); + YY_BREAK +case 35: +YY_RULE_SETUP #line 113 "lex_sql.l" - RETURN_TOKEN(FLOAT_T); - YY_BREAK - case 36: YY_RULE_SETUP +RETURN_TOKEN(FLOAT_T); + YY_BREAK +case 36: +YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK - case 37: YY_RULE_SETUP +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK +case 37: +YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token - YY_BREAK - case 38: YY_RULE_SETUP +RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + YY_BREAK +case 38: +YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(UNIQUE); - YY_BREAK - case 39: YY_RULE_SETUP +RETURN_TOKEN(UNIQUE); + YY_BREAK +case 39: +YY_RULE_SETUP #line 117 "lex_sql.l" - RETURN_TOKEN(NULL_T); - YY_BREAK - case 40: YY_RULE_SETUP +RETURN_TOKEN(NULL_T); + YY_BREAK +case 40: +YY_RULE_SETUP #line 118 "lex_sql.l" - RETURN_TOKEN(NULLABLE); - YY_BREAK - case 41: YY_RULE_SETUP +RETURN_TOKEN(NULLABLE); + YY_BREAK +case 41: +YY_RULE_SETUP #line 119 "lex_sql.l" - RETURN_TOKEN(LOAD); - YY_BREAK - case 42: YY_RULE_SETUP +RETURN_TOKEN(LOAD); + YY_BREAK +case 42: +YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(DATA); - YY_BREAK - case 43: YY_RULE_SETUP +RETURN_TOKEN(DATA); + YY_BREAK +case 43: +YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(INFILE); - YY_BREAK - case 44: YY_RULE_SETUP +RETURN_TOKEN(INFILE); + YY_BREAK +case 44: +YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); - YY_BREAK - case 45: YY_RULE_SETUP +RETURN_TOKEN(EXPLAIN); + YY_BREAK +case 45: +YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(GROUP); - YY_BREAK - case 46: YY_RULE_SETUP +RETURN_TOKEN(GROUP); + YY_BREAK +case 46: +YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(HAVING); - YY_BREAK - case 47: YY_RULE_SETUP +RETURN_TOKEN(HAVING); + YY_BREAK +case 47: +YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(ORDER); - YY_BREAK - case 48: YY_RULE_SETUP +RETURN_TOKEN(ORDER); + YY_BREAK +case 48: +YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(BY); - YY_BREAK - case 49: YY_RULE_SETUP +RETURN_TOKEN(BY); + YY_BREAK +case 49: +YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(AS); - YY_BREAK - case 50: YY_RULE_SETUP +RETURN_TOKEN(AS); + YY_BREAK +case 50: +YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(ASC); - YY_BREAK - case 51: YY_RULE_SETUP +RETURN_TOKEN(ASC); + YY_BREAK +case 51: +YY_RULE_SETUP #line 129 "lex_sql.l" - RETURN_TOKEN(IN); - YY_BREAK - case 52: YY_RULE_SETUP +RETURN_TOKEN(IN); + YY_BREAK +case 52: +YY_RULE_SETUP #line 130 "lex_sql.l" - RETURN_TOKEN(EXISTS); - YY_BREAK - case 53: YY_RULE_SETUP +RETURN_TOKEN(EXISTS); + YY_BREAK +case 53: +YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(STORAGE); - YY_BREAK - case 54: YY_RULE_SETUP +RETURN_TOKEN(STORAGE); + YY_BREAK +case 54: +YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(FORMAT); - YY_BREAK - case 55: YY_RULE_SETUP +RETURN_TOKEN(FORMAT); + YY_BREAK +case 55: +YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(INNER); - YY_BREAK - case 56: YY_RULE_SETUP +RETURN_TOKEN(INNER); + YY_BREAK +case 56: +YY_RULE_SETUP #line 134 "lex_sql.l" - RETURN_TOKEN(JOIN); - YY_BREAK - case 57: YY_RULE_SETUP +RETURN_TOKEN(JOIN); + YY_BREAK +case 57: +YY_RULE_SETUP #line 135 "lex_sql.l" - RETURN_TOKEN(LBRACE); - YY_BREAK - case 58: YY_RULE_SETUP +RETURN_TOKEN(LBRACE); + YY_BREAK +case 58: +YY_RULE_SETUP #line 136 "lex_sql.l" - RETURN_TOKEN(RBRACE); - YY_BREAK - case 59: YY_RULE_SETUP +RETURN_TOKEN(RBRACE); + YY_BREAK +case 59: +YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(COMMA); - YY_BREAK - case 60: YY_RULE_SETUP +RETURN_TOKEN(COMMA); + YY_BREAK +case 60: +YY_RULE_SETUP #line 139 "lex_sql.l" - RETURN_TOKEN(EQ); - YY_BREAK - case 61: YY_RULE_SETUP +RETURN_TOKEN(EQ); + YY_BREAK +case 61: +YY_RULE_SETUP #line 140 "lex_sql.l" - RETURN_TOKEN(LE); - YY_BREAK - case 62: YY_RULE_SETUP +RETURN_TOKEN(LE); + YY_BREAK +case 62: +YY_RULE_SETUP #line 141 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 63: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 63: +YY_RULE_SETUP #line 142 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 64: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 64: +YY_RULE_SETUP #line 143 "lex_sql.l" - RETURN_TOKEN(LT); - YY_BREAK - case 65: YY_RULE_SETUP +RETURN_TOKEN(LT); + YY_BREAK +case 65: +YY_RULE_SETUP #line 144 "lex_sql.l" - RETURN_TOKEN(GE); - YY_BREAK - case 66: YY_RULE_SETUP +RETURN_TOKEN(GE); + YY_BREAK +case 66: +YY_RULE_SETUP #line 145 "lex_sql.l" - RETURN_TOKEN(GT); - YY_BREAK - case 67: YY_RULE_SETUP +RETURN_TOKEN(GT); + YY_BREAK +case 67: +YY_RULE_SETUP #line 146 "lex_sql.l" - RETURN_TOKEN(NOT); - YY_BREAK - case 68: YY_RULE_SETUP +RETURN_TOKEN(NOT); + YY_BREAK +case 68: +YY_RULE_SETUP #line 147 "lex_sql.l" - RETURN_TOKEN(IS); - YY_BREAK - case 69: YY_RULE_SETUP +RETURN_TOKEN(IS); + YY_BREAK +case 69: +YY_RULE_SETUP #line 148 "lex_sql.l" - RETURN_TOKEN(LIKE); - YY_BREAK - case 70: YY_RULE_SETUP +RETURN_TOKEN(LIKE); + YY_BREAK +case 70: +YY_RULE_SETUP #line 150 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(ID); - YY_BREAK - case 71: +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK +case 71: #line 153 "lex_sql.l" - case 72: +case 72: #line 154 "lex_sql.l" - case 73: +case 73: #line 155 "lex_sql.l" - case 74: YY_RULE_SETUP +case 74: +YY_RULE_SETUP #line 155 "lex_sql.l" - { - return yytext[0]; - } - YY_BREAK - case 75: - /* rule 75 can match eol */ - YY_RULE_SETUP +{ return yytext[0]; } + YY_BREAK +case 75: +/* rule 75 can match eol */ +YY_RULE_SETUP #line 156 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 76: - /* rule 76 can match eol */ - YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 76: +/* rule 76 can match eol */ +YY_RULE_SETUP #line 157 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 77: YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 77: +YY_RULE_SETUP #line 159 "lex_sql.l" - LOG_DEBUG("Unknown character [%c]",yytext[0]); - return yytext[0]; - YY_BREAK - case 78: YY_RULE_SETUP +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 78: +YY_RULE_SETUP #line 160 "lex_sql.l" - ECHO; - YY_BREAK +ECHO; + YY_BREAK #line 1456 "lex_sql.cpp" - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(STR): yyterminate(); - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if (yywrap(yyscanner)) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(STR): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3624,149 +1594,171 @@ YY_DECL * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(yyscan_t yyscanner) +static int yy_get_next_buffer (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else { - yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - yy_size_t new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if (yyg->yy_n_chars == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin, yyscanner); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = - (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(yyscan_t yyscanner) + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_current_state = yyg->yy_start; - - for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 227) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 227 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -3774,27 +1766,29 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 227) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 226); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 227 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 226); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -3803,133 +1797,141 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner) + static int yyinput (yyscan_t yyscanner) #else -static int input(yyscan_t yyscanner) + static int input (yyscan_t yyscanner) #endif { - int c; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin, yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap(yyscanner)) - return 0; - - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file, yyscan_t yyscanner) + void yyrestart (FILE * input_file , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); - yy_load_buffer_state(yyscanner); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(yyscanner); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state(yyscan_t yyscanner) +static void yy_load_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -3938,105 +1940,105 @@ static void yy_load_buffer_state(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file, yyscanner); + yy_init_buffer( b, file , yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!b) - return; + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf, yyscanner); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *)b, yyscanner); + yyfree( (void *) b , yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_flush_buffer(b, yyscanner); + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - b->yy_input_file = file; - b->yy_fill_buffer = 1; + yy_flush_buffer( b , yyscanner); - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!b) - return; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(yyscanner); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -4045,95 +2047,99 @@ void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state(yyscan_t yyscanner) +void yypop_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(yyscan_t yyscanner) +static void yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = - (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( - yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -4142,31 +2148,33 @@ static void yyensure_buffer_stack(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b, yyscanner); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -4177,10 +2185,10 @@ YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - - return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -4190,175 +2198,177 @@ YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n, yyscanner); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n, yyscanner); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyextra; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno(yyscan_t yyscanner) +int yyget_lineno (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column(yyscan_t yyscanner) +int yyget_column (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!YY_CURRENT_BUFFER) - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yycolumn; + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in(yyscan_t yyscanner) +FILE *yyget_in (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyin; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out(yyscan_t yyscanner) +FILE *yyget_out (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyout; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng(yyscan_t yyscanner) +int yyget_leng (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyleng; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text(yyscan_t yyscanner) +char *yyget_text (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yytext; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyextra = user_defined; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno(int _line_number, yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_lineno called with no buffer"); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column(int _column_no, yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_column called with no buffer"); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yycolumn = _column_no; + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -4367,80 +2377,80 @@ void yyset_column(int _column_no, yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str, yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyin = _in_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; } -void yyset_out(FILE *_out_str, yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyout = _out_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; } -int yyget_debug(yyscan_t yyscanner) +int yyget_debug (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yy_flex_debug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void yyset_debug(int _bdebug, yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flex_debug = _bdebug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ -YYSTYPE *yyget_lval(yyscan_t yyscanner) +YYSTYPE * yyget_lval (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylval; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc(yyscan_t yyscanner) +YYLTYPE *yyget_lloc (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; } - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylloc = yylloc_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t *ptr_yy_globals) +int yylex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -4450,94 +2460,94 @@ int yylex_init(yyscan_t *ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra(yy_user_defined, &dummy_yyguts); + yyset_extra (yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - yyset_extra(yy_user_defined, *ptr_yy_globals); + yyset_extra (yy_user_defined, *ptr_yy_globals); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } -static int yy_init_globals(yyscan_t yyscanner) +static int yy_init_globals (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(yyscan_t yyscanner) +int yylex_destroy (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack, yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack, yyscanner); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals(yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree(yyscanner, yyscanner); - yyscanner = NULL; - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; } /* @@ -4545,59 +2555,63 @@ int yylex_destroy(yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s, yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - int n; - for (n = 0; s[n]; ++n) - ; + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size, yyscan_t yyscanner) +void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr, yyscan_t yyscanner) +void yyfree (void * ptr , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - free((char *)ptr); /* see yyrealloc() for (char *) cast */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 160 "lex_sql.l" -void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } + +void scan_string(const char *str, yyscan_t scanner) { + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); +} + diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index a7ae0d05..46266a60 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,7 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 5 "lex_sql.h" +#line 6 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -12,21 +12,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); -#line 29 "lex_sql.h" +#line 30 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -79,62 +81,61 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -155,7 +156,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -195,72 +196,73 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -}; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -283,69 +285,69 @@ void yyfree(void *, yyscan_t yyscanner); #define YY_EXTRA_TYPE void * #endif -int yylex_init(yyscan_t *scanner); +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + int yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -373,9 +375,11 @@ static int yy_flex_strlen(const char *, yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -539,6 +543,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #line 160 "lex_sql.l" + #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index d7a64ca9..1c000d96 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,9 +63,13 @@ /* Pull parsers. */ #define YYPULL 1 + + + /* First part of user prologue. */ #line 2 "yacc_sql.y" + #include #include #include @@ -88,221 +92,232 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression( - ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, + Expression *left, + Expression *right, + const char *sql_string, + YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression( - const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression(const char *function_name, + std::vector> child, + const char *sql_string, + YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } -ParsedSqlNode *create_table_sql_node(char *table_name, AttrInfoSqlNode *attr_def, - std::vector *attrinfos, char *storage_format, ParsedSqlNode *create_table_select) +ParsedSqlNode *create_table_sql_node(char *table_name, + AttrInfoSqlNode* attr_def, + std::vector *attrinfos, + char* storage_format, + ParsedSqlNode *create_table_select) { - ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = parsed_sql_node->create_table; - create_table.relation_name = table_name; + ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = parsed_sql_node->create_table; + create_table.relation_name = table_name; - if (attrinfos) { - create_table.attr_infos.swap(*attrinfos); - delete attrinfos; - } - if (attr_def) { - create_table.attr_infos.emplace_back(*attr_def); - std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); - delete attr_def; - } - if (storage_format != nullptr) { - create_table.storage_format = storage_format; - free(storage_format); - } + if (attrinfos) { + create_table.attr_infos.swap(*attrinfos); + delete attrinfos; + } + if (attr_def) { + create_table.attr_infos.emplace_back(*attr_def); + std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); + delete attr_def; + } + if (storage_format != nullptr) { + create_table.storage_format = storage_format; + free(storage_format); + } - if (create_table_select) { - create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); - } + if (create_table_select) { + create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); + } - return parsed_sql_node; + return parsed_sql_node; } #line 155 "yacc_sql.cpp" -#ifndef YY_CAST -#ifdef __cplusplus -#define YY_CAST(Type, Val) static_cast(Val) -#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) -#else -#define YY_CAST(Type, Val) ((Type)(Val)) -#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) -#endif -#endif -#ifndef YY_NULLPTR -#if defined __cplusplus -#if 201103L <= __cplusplus -#define YY_NULLPTR nullptr -#else -#define YY_NULLPTR 0 -#endif -#else -#define YY_NULLPTR ((void *)0) -#endif -#endif +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_HAVING = 11, /* HAVING */ - YYSYMBOL_ORDER = 12, /* ORDER */ - YYSYMBOL_TABLE = 13, /* TABLE */ - YYSYMBOL_TABLES = 14, /* TABLES */ - YYSYMBOL_INDEX = 15, /* INDEX */ - YYSYMBOL_CALC = 16, /* CALC */ - YYSYMBOL_SELECT = 17, /* SELECT */ - YYSYMBOL_DESC = 18, /* DESC */ - YYSYMBOL_SHOW = 19, /* SHOW */ - YYSYMBOL_SYNC = 20, /* SYNC */ - YYSYMBOL_INSERT = 21, /* INSERT */ - YYSYMBOL_DELETE = 22, /* DELETE */ - YYSYMBOL_UPDATE = 23, /* UPDATE */ - YYSYMBOL_LBRACE = 24, /* LBRACE */ - YYSYMBOL_RBRACE = 25, /* RBRACE */ - YYSYMBOL_COMMA = 26, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 30, /* INT_T */ - YYSYMBOL_IN = 31, /* IN */ - YYSYMBOL_STRING_T = 32, /* STRING_T */ - YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ - YYSYMBOL_DATE_T = 34, /* DATE_T */ - YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_NOT = 36, /* NOT */ - YYSYMBOL_UNIQUE = 37, /* UNIQUE */ - YYSYMBOL_NULL_T = 38, /* NULL_T */ - YYSYMBOL_NULLABLE = 39, /* NULLABLE */ - YYSYMBOL_HELP = 40, /* HELP */ - YYSYMBOL_EXIT = 41, /* EXIT */ - YYSYMBOL_DOT = 42, /* DOT */ - YYSYMBOL_INTO = 43, /* INTO */ - YYSYMBOL_VALUES = 44, /* VALUES */ - YYSYMBOL_FROM = 45, /* FROM */ - YYSYMBOL_WHERE = 46, /* WHERE */ - YYSYMBOL_AND = 47, /* AND */ - YYSYMBOL_OR = 48, /* OR */ - YYSYMBOL_SET = 49, /* SET */ - YYSYMBOL_ON = 50, /* ON */ - YYSYMBOL_LOAD = 51, /* LOAD */ - YYSYMBOL_DATA = 52, /* DATA */ - YYSYMBOL_INFILE = 53, /* INFILE */ - YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ - YYSYMBOL_STORAGE = 55, /* STORAGE */ - YYSYMBOL_FORMAT = 56, /* FORMAT */ - YYSYMBOL_INNER = 57, /* INNER */ - YYSYMBOL_JOIN = 58, /* JOIN */ - YYSYMBOL_EQ = 59, /* EQ */ - YYSYMBOL_LT = 60, /* LT */ - YYSYMBOL_GT = 61, /* GT */ - YYSYMBOL_LE = 62, /* LE */ - YYSYMBOL_GE = 63, /* GE */ - YYSYMBOL_NE = 64, /* NE */ - YYSYMBOL_LIKE = 65, /* LIKE */ - YYSYMBOL_IS = 66, /* IS */ - YYSYMBOL_NUMBER = 67, /* NUMBER */ - YYSYMBOL_FLOAT = 68, /* FLOAT */ - YYSYMBOL_ID = 69, /* ID */ - YYSYMBOL_SSS = 70, /* SSS */ - YYSYMBOL_71_ = 71, /* '+' */ - YYSYMBOL_72_ = 72, /* '-' */ - YYSYMBOL_73_ = 73, /* '*' */ - YYSYMBOL_74_ = 74, /* '/' */ - YYSYMBOL_UMINUS = 75, /* UMINUS */ - YYSYMBOL_YYACCEPT = 76, /* $accept */ - YYSYMBOL_commands = 77, /* commands */ - YYSYMBOL_command_wrapper = 78, /* command_wrapper */ - YYSYMBOL_exit_stmt = 79, /* exit_stmt */ - YYSYMBOL_help_stmt = 80, /* help_stmt */ - YYSYMBOL_sync_stmt = 81, /* sync_stmt */ - YYSYMBOL_begin_stmt = 82, /* begin_stmt */ - YYSYMBOL_commit_stmt = 83, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 84, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 85, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 86, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 87, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 88, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 89, /* create_index_stmt */ - YYSYMBOL_opt_unique = 90, /* opt_unique */ - YYSYMBOL_attr_list = 91, /* attr_list */ - YYSYMBOL_drop_index_stmt = 92, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 93, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 94, /* attr_def_list */ - YYSYMBOL_attr_def = 95, /* attr_def */ - YYSYMBOL_nullable_constraint = 96, /* nullable_constraint */ - YYSYMBOL_type = 97, /* type */ - YYSYMBOL_insert_stmt = 98, /* insert_stmt */ - YYSYMBOL_values_list = 99, /* values_list */ - YYSYMBOL_value_list = 100, /* value_list */ - YYSYMBOL_value = 101, /* value */ - YYSYMBOL_nonnegative_value = 102, /* nonnegative_value */ - YYSYMBOL_storage_format = 103, /* storage_format */ - YYSYMBOL_delete_stmt = 104, /* delete_stmt */ - YYSYMBOL_update_stmt = 105, /* update_stmt */ - YYSYMBOL_setClauses = 106, /* setClauses */ - YYSYMBOL_setClause = 107, /* setClause */ - YYSYMBOL_select_stmt = 108, /* select_stmt */ - YYSYMBOL_calc_stmt = 109, /* calc_stmt */ - YYSYMBOL_expression_list = 110, /* expression_list */ - YYSYMBOL_expression = 111, /* expression */ - YYSYMBOL_alias = 112, /* alias */ - YYSYMBOL_aggr_func_expr = 113, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 114, /* sub_query_expr */ - YYSYMBOL_rel_attr = 115, /* rel_attr */ - YYSYMBOL_relation = 116, /* relation */ - YYSYMBOL_rel_list = 117, /* rel_list */ - YYSYMBOL_joinClauses = 118, /* joinClauses */ - YYSYMBOL_where = 119, /* where */ - YYSYMBOL_condition = 120, /* condition */ - YYSYMBOL_comp_op = 121, /* comp_op */ - YYSYMBOL_opt_order_by = 122, /* opt_order_by */ - YYSYMBOL_sort_list = 123, /* sort_list */ - YYSYMBOL_sort_unit = 124, /* sort_unit */ - YYSYMBOL_group_by = 125, /* group_by */ - YYSYMBOL_opt_having = 126, /* opt_having */ - YYSYMBOL_load_data_stmt = 127, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 128, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 129, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 130 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_HAVING = 11, /* HAVING */ + YYSYMBOL_ORDER = 12, /* ORDER */ + YYSYMBOL_TABLE = 13, /* TABLE */ + YYSYMBOL_TABLES = 14, /* TABLES */ + YYSYMBOL_INDEX = 15, /* INDEX */ + YYSYMBOL_CALC = 16, /* CALC */ + YYSYMBOL_SELECT = 17, /* SELECT */ + YYSYMBOL_DESC = 18, /* DESC */ + YYSYMBOL_SHOW = 19, /* SHOW */ + YYSYMBOL_SYNC = 20, /* SYNC */ + YYSYMBOL_INSERT = 21, /* INSERT */ + YYSYMBOL_DELETE = 22, /* DELETE */ + YYSYMBOL_UPDATE = 23, /* UPDATE */ + YYSYMBOL_LBRACE = 24, /* LBRACE */ + YYSYMBOL_RBRACE = 25, /* RBRACE */ + YYSYMBOL_COMMA = 26, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 30, /* INT_T */ + YYSYMBOL_IN = 31, /* IN */ + YYSYMBOL_STRING_T = 32, /* STRING_T */ + YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ + YYSYMBOL_DATE_T = 34, /* DATE_T */ + YYSYMBOL_TEXT_T = 35, /* TEXT_T */ + YYSYMBOL_NOT = 36, /* NOT */ + YYSYMBOL_UNIQUE = 37, /* UNIQUE */ + YYSYMBOL_NULL_T = 38, /* NULL_T */ + YYSYMBOL_NULLABLE = 39, /* NULLABLE */ + YYSYMBOL_HELP = 40, /* HELP */ + YYSYMBOL_EXIT = 41, /* EXIT */ + YYSYMBOL_DOT = 42, /* DOT */ + YYSYMBOL_INTO = 43, /* INTO */ + YYSYMBOL_VALUES = 44, /* VALUES */ + YYSYMBOL_FROM = 45, /* FROM */ + YYSYMBOL_WHERE = 46, /* WHERE */ + YYSYMBOL_AND = 47, /* AND */ + YYSYMBOL_OR = 48, /* OR */ + YYSYMBOL_SET = 49, /* SET */ + YYSYMBOL_ON = 50, /* ON */ + YYSYMBOL_LOAD = 51, /* LOAD */ + YYSYMBOL_DATA = 52, /* DATA */ + YYSYMBOL_INFILE = 53, /* INFILE */ + YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ + YYSYMBOL_STORAGE = 55, /* STORAGE */ + YYSYMBOL_FORMAT = 56, /* FORMAT */ + YYSYMBOL_INNER = 57, /* INNER */ + YYSYMBOL_JOIN = 58, /* JOIN */ + YYSYMBOL_EQ = 59, /* EQ */ + YYSYMBOL_LT = 60, /* LT */ + YYSYMBOL_GT = 61, /* GT */ + YYSYMBOL_LE = 62, /* LE */ + YYSYMBOL_GE = 63, /* GE */ + YYSYMBOL_NE = 64, /* NE */ + YYSYMBOL_LIKE = 65, /* LIKE */ + YYSYMBOL_IS = 66, /* IS */ + YYSYMBOL_NUMBER = 67, /* NUMBER */ + YYSYMBOL_FLOAT = 68, /* FLOAT */ + YYSYMBOL_ID = 69, /* ID */ + YYSYMBOL_SSS = 70, /* SSS */ + YYSYMBOL_71_ = 71, /* '+' */ + YYSYMBOL_72_ = 72, /* '-' */ + YYSYMBOL_73_ = 73, /* '*' */ + YYSYMBOL_74_ = 74, /* '/' */ + YYSYMBOL_UMINUS = 75, /* UMINUS */ + YYSYMBOL_YYACCEPT = 76, /* $accept */ + YYSYMBOL_commands = 77, /* commands */ + YYSYMBOL_command_wrapper = 78, /* command_wrapper */ + YYSYMBOL_exit_stmt = 79, /* exit_stmt */ + YYSYMBOL_help_stmt = 80, /* help_stmt */ + YYSYMBOL_sync_stmt = 81, /* sync_stmt */ + YYSYMBOL_begin_stmt = 82, /* begin_stmt */ + YYSYMBOL_commit_stmt = 83, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 84, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 85, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 86, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 87, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 88, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 89, /* create_index_stmt */ + YYSYMBOL_opt_unique = 90, /* opt_unique */ + YYSYMBOL_attr_list = 91, /* attr_list */ + YYSYMBOL_drop_index_stmt = 92, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 93, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 94, /* attr_def_list */ + YYSYMBOL_attr_def = 95, /* attr_def */ + YYSYMBOL_nullable_constraint = 96, /* nullable_constraint */ + YYSYMBOL_type = 97, /* type */ + YYSYMBOL_insert_stmt = 98, /* insert_stmt */ + YYSYMBOL_values_list = 99, /* values_list */ + YYSYMBOL_value_list = 100, /* value_list */ + YYSYMBOL_value = 101, /* value */ + YYSYMBOL_nonnegative_value = 102, /* nonnegative_value */ + YYSYMBOL_storage_format = 103, /* storage_format */ + YYSYMBOL_delete_stmt = 104, /* delete_stmt */ + YYSYMBOL_update_stmt = 105, /* update_stmt */ + YYSYMBOL_setClauses = 106, /* setClauses */ + YYSYMBOL_setClause = 107, /* setClause */ + YYSYMBOL_select_stmt = 108, /* select_stmt */ + YYSYMBOL_calc_stmt = 109, /* calc_stmt */ + YYSYMBOL_expression_list = 110, /* expression_list */ + YYSYMBOL_expression = 111, /* expression */ + YYSYMBOL_alias = 112, /* alias */ + YYSYMBOL_aggr_func_expr = 113, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 114, /* sub_query_expr */ + YYSYMBOL_rel_attr = 115, /* rel_attr */ + YYSYMBOL_relation = 116, /* relation */ + YYSYMBOL_rel_list = 117, /* rel_list */ + YYSYMBOL_joinClauses = 118, /* joinClauses */ + YYSYMBOL_where = 119, /* where */ + YYSYMBOL_condition = 120, /* condition */ + YYSYMBOL_comp_op = 121, /* comp_op */ + YYSYMBOL_opt_order_by = 122, /* opt_order_by */ + YYSYMBOL_sort_list = 123, /* sort_list */ + YYSYMBOL_sort_unit = 124, /* sort_unit */ + YYSYMBOL_group_by = 125, /* group_by */ + YYSYMBOL_opt_having = 126, /* opt_having */ + YYSYMBOL_load_data_stmt = 127, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 128, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 129, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 130 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; + + + #ifdef short -#undef short +# undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -310,11 +325,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -#include /* INFRINGES ON USER NAME SPACE */ -#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_STDINT_H -#endif +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -344,15 +359,16 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -#undef UINT_LEAST8_MAX -#undef UINT_LEAST16_MAX -#define UINT_LEAST8_MAX 255 -#define UINT_LEAST16_MAX 65535 +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -362,7 +378,8 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -371,38 +388,42 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -#define YYPTRDIFF_T __PTRDIFF_TYPE__ -#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -#elif defined PTRDIFF_MAX -#ifndef ptrdiff_t -#include /* INFRINGES ON USER NAME SPACE */ -#endif -#define YYPTRDIFF_T ptrdiff_t -#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -#else -#define YYPTRDIFF_T long -#define YYPTRDIFF_MAXIMUM LONG_MAX -#endif +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T -#ifdef __SIZE_TYPE__ -#define YYSIZE_T __SIZE_TYPE__ -#elif defined size_t -#define YYSIZE_T size_t -#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YYSIZE_T size_t -#else -#define YYSIZE_T unsigned -#endif +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -411,2587 +432,603 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -#if defined YYENABLE_NLS && YYENABLE_NLS -#if ENABLE_NLS -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_(Msgid) dgettext("bison-runtime", Msgid) -#endif -#endif -#ifndef YY_ -#define YY_(Msgid) Msgid -#endif +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif #endif + #ifndef YY_ATTRIBUTE_PURE -#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) -#else -#define YY_ATTRIBUTE_PURE -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define YY_ATTRIBUTE_UNUSED -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if !defined lint || defined __GNUC__ -#define YY_USE(E) ((void)(E)) +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) #else -#define YY_USE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -#endif -#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") -#else -#define YY_INITIAL_VALUE(Value) Value +# define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_END +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -#define YY_INITIAL_VALUE(Value) /* Nothing. */ +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ -#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") -#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_END +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END #endif -#define YY_ASSERT(E) ((void)(0 && (E))) + +#define YY_ASSERT(E) ((void) (0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -#ifdef YYSTACK_USE_ALLOCA -#if YYSTACK_USE_ALLOCA -#ifdef __GNUC__ -#define YYSTACK_ALLOC __builtin_alloca -#elif defined __BUILTIN_VA_ARG_INCR -#include /* INFRINGES ON USER NAME SPACE */ -#elif defined _AIX -#define YYSTACK_ALLOC __alloca -#elif defined _MSC_VER -#include /* INFRINGES ON USER NAME SPACE */ -#define alloca _alloca -#else -#define YYSTACK_ALLOC alloca -#if !defined _ALLOCA_H && !defined EXIT_SUCCESS -#include /* INFRINGES ON USER NAME SPACE */ -/* Use EXIT_SUCCESS as a witness for stdlib.h. */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#endif -#endif -#endif - -#ifdef YYSTACK_ALLOC -/* Pacify GCC's 'empty if-body' warning. */ -#define YYSTACK_FREE(Ptr) \ - do { /* empty */ \ - ; \ - } while (0) -#ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -#endif -#else -#define YYSTACK_ALLOC YYMALLOC -#define YYSTACK_FREE YYFREE -#ifndef YYSTACK_ALLOC_MAXIMUM -#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -#endif -#if (defined __cplusplus && !defined EXIT_SUCCESS && \ - !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) -#include /* INFRINGES ON USER NAME SPACE */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef YYMALLOC -#define YYMALLOC malloc -#if !defined malloc && !defined EXIT_SUCCESS -void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#ifndef YYFREE -#define YYFREE free -#if !defined free && !defined EXIT_SUCCESS -void free(void *); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#endif +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif #endif /* 1 */ -#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ - defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -#define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) -#define YYCOPY_NEEDED 1 +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF(*yyptr); \ - } while (0) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -#ifndef YYCOPY -#if defined __GNUC__ && 1 < __GNUC__ -#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) -#else -#define YYCOPY(Dst, Src, Count) \ - do { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } while (0) -#endif -#endif +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 71 +#define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 267 +#define YYLAST 267 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 76 +#define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 55 +#define YYNNTS 55 /* YYNRULES -- Number of rules. */ -#define YYNRULES 143 +#define YYNRULES 143 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 251 +#define YYNSTATES 251 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 326 +#define YYMAXUTOK 326 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = {0, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 73, - 71, - 2, - 72, - 2, - 74, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 75}; +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 73, 71, 2, 72, 2, 74, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 75 +}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = {0, - 259, - 259, - 267, - 268, - 269, - 270, - 271, - 272, - 273, - 274, - 275, - 276, - 277, - 278, - 279, - 280, - 281, - 282, - 283, - 284, - 285, - 286, - 287, - 291, - 297, - 302, - 308, - 314, - 320, - 326, - 333, - 339, - 347, - 357, - 372, - 373, - 377, - 383, - 392, - 402, - 406, - 410, - 414, - 418, - 425, - 428, - 441, - 453, - 480, - 484, - 488, - 493, - 499, - 500, - 501, - 502, - 503, - 507, - 520, - 526, - 533, - 539, - 547, - 550, - 554, - 561, - 565, - 569, - 575, - 582, - 585, - 592, - 604, - 618, - 623, - 630, - 640, - 673, - 706, - 712, - 721, - 724, - 733, - 749, - 752, - 755, - 758, - 761, - 769, - 772, - 777, - 783, - 786, - 789, - 792, - 799, - 802, - 805, - 810, - 817, - 824, - 829, - 839, - 845, - 855, - 872, - 879, - 891, - 894, - 900, - 904, - 911, - 915, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 940, - 943, - 951, - 956, - 964, - 970, - 976, - 986, - 989, - 997, - 1000, - 1007, - 1020, - 1028, - 1038, - 1039}; +static const yytype_int16 yyrline[] = +{ + 0, 259, 259, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 291, 297, 302, 308, 314, 320, + 326, 333, 339, 347, 357, 372, 373, 377, 383, 392, + 402, 406, 410, 414, 418, 425, 428, 441, 453, 480, + 484, 488, 493, 499, 500, 501, 502, 503, 507, 520, + 526, 533, 539, 547, 550, 554, 561, 565, 569, 575, + 582, 585, 592, 604, 618, 623, 630, 640, 673, 706, + 712, 721, 724, 733, 749, 752, 755, 758, 761, 769, + 772, 777, 783, 786, 789, 792, 799, 802, 805, 810, + 817, 824, 829, 839, 845, 855, 872, 879, 891, 894, + 900, 904, 911, 915, 922, 923, 924, 925, 926, 927, + 928, 929, 930, 931, 932, 933, 934, 935, 940, 943, + 951, 956, 964, 970, 976, 986, 989, 997, 1000, 1007, + 1020, 1028, 1038, 1039 +}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = {"\"end of file\"", - "error", - "\"invalid token\"", - "SEMICOLON", - "AS", - "ASC", - "BY", - "CREATE", - "DROP", - "EXISTS", - "GROUP", - "HAVING", - "ORDER", - "TABLE", - "TABLES", - "INDEX", - "CALC", - "SELECT", - "DESC", - "SHOW", - "SYNC", - "INSERT", - "DELETE", - "UPDATE", - "LBRACE", - "RBRACE", - "COMMA", - "TRX_BEGIN", - "TRX_COMMIT", - "TRX_ROLLBACK", - "INT_T", - "IN", - "STRING_T", - "FLOAT_T", - "DATE_T", - "TEXT_T", - "NOT", - "UNIQUE", - "NULL_T", - "NULLABLE", - "HELP", - "EXIT", - "DOT", - "INTO", - "VALUES", - "FROM", - "WHERE", - "AND", - "OR", - "SET", - "ON", - "LOAD", - "DATA", - "INFILE", - "EXPLAIN", - "STORAGE", - "FORMAT", - "INNER", - "JOIN", - "EQ", - "LT", - "GT", - "LE", - "GE", - "NE", - "LIKE", - "IS", - "NUMBER", - "FLOAT", - "ID", - "SSS", - "'+'", - "'-'", - "'*'", - "'/'", - "UMINUS", - "$accept", - "commands", - "command_wrapper", - "exit_stmt", - "help_stmt", - "sync_stmt", - "begin_stmt", - "commit_stmt", - "rollback_stmt", - "drop_table_stmt", - "show_tables_stmt", - "desc_table_stmt", - "show_index_stmt", - "create_index_stmt", - "opt_unique", - "attr_list", - "drop_index_stmt", - "create_table_stmt", - "attr_def_list", - "attr_def", - "nullable_constraint", - "type", - "insert_stmt", - "values_list", - "value_list", - "value", - "nonnegative_value", - "storage_format", - "delete_stmt", - "update_stmt", - "setClauses", - "setClause", - "select_stmt", - "calc_stmt", - "expression_list", - "expression", - "alias", - "aggr_func_expr", - "sub_query_expr", - "rel_attr", - "relation", - "rel_list", - "joinClauses", - "where", - "condition", - "comp_op", - "opt_order_by", - "sort_list", - "sort_unit", - "group_by", - "opt_having", - "load_data_stmt", - "explain_stmt", - "set_variable_stmt", - "opt_semicolon", - YY_NULLPTR}; - -static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "HAVING", "ORDER", + "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", + "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", + "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", + "DATE_T", "TEXT_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", + "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", + "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", + "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", + "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", + "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", + "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", + "show_tables_stmt", "desc_table_stmt", "show_index_stmt", + "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", + "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", + "type", "insert_stmt", "values_list", "value_list", "value", + "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", + "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", + "expression", "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", + "relation", "rel_list", "joinClauses", "where", "condition", "comp_op", + "opt_order_by", "sort_list", "sort_unit", "group_by", "opt_having", + "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif #define YYPACT_NINF (-175) -#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) 0 +#define yytable_value_is_error(Yyn) \ + 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {210, - 5, - 38, - -10, - -10, - -13, - 12, - -175, - 29, - 19, - 6, - -175, - -175, - -175, - -175, - -175, - 24, - 36, - 210, - 124, - 125, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - 70, - -175, - 126, - 71, - 73, - 119, - -175, - -175, - -175, - -2, - -175, - -10, - -175, - -175, - -175, - 7, - -175, - -175, - -175, - 99, - -175, - -175, - 100, - 77, - 78, - 101, - 89, - 98, - -175, - -175, - -175, - -175, - -9, - 80, - -175, - 103, - -10, - 130, - 131, - -10, - -28, - -175, - 90, - -175, - -10, - -10, - -10, - -10, - 132, - 91, - 91, - 117, - 116, - 94, - -18, - 95, - 102, - 108, - 13, - 118, - 106, - 99, - -175, - -175, - 141, - -175, - -175, - -175, - 18, - 18, - -175, - -175, - -10, - -175, - 4, - 116, - -175, - 146, - 143, - -175, - 113, - -7, - -175, - 52, - -175, - -175, - 133, - 97, - 151, - 121, - 161, - -175, - 114, - -175, - -175, - -175, - 135, - 156, - 180, - -18, - 168, - -175, - -175, - 0, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - 159, - 35, - 55, - -10, - -10, - 94, - -175, - -175, - -175, - 184, - -175, - -175, - -175, - -175, - -175, - 87, - 102, - 173, - 145, - -175, - 175, - 91, - 91, - 194, - 208, - 96, - -175, - 196, - -175, - -175, - -175, - -175, - -10, - 143, - 143, - 41, - 41, - -175, - 152, - 155, - 185, - -175, - -175, - -175, - 151, - 169, - -175, - 165, - 186, - 116, - 17, - -175, - -10, - 143, - 213, - -175, - -18, - -18, - 41, - -175, - 188, - -175, - 215, - -175, - -175, - 21, - 216, - 218, - 143, - 180, - -175, - 55, - 235, - -175, - -175, - 112, - 31, - 161, - -175, - 165, - -175, - -24, - -175, - -10, - -175, - -175, - -175, - -175, - 187, - 11, - -175, - 220, - 91, - -175, - -175, - -10, - -175, - -175}; +static const yytype_int16 yypact[] = +{ + 210, 5, 38, -10, -10, -13, 12, -175, 29, 19, + 6, -175, -175, -175, -175, -175, 24, 36, 210, 124, + 125, -175, -175, -175, -175, -175, -175, -175, -175, -175, + -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, + -175, -175, 70, -175, 126, 71, 73, 119, -175, -175, + -175, -2, -175, -10, -175, -175, -175, 7, -175, -175, + -175, 99, -175, -175, 100, 77, 78, 101, 89, 98, + -175, -175, -175, -175, -9, 80, -175, 103, -10, 130, + 131, -10, -28, -175, 90, -175, -10, -10, -10, -10, + 132, 91, 91, 117, 116, 94, -18, 95, 102, 108, + 13, 118, 106, 99, -175, -175, 141, -175, -175, -175, + 18, 18, -175, -175, -10, -175, 4, 116, -175, 146, + 143, -175, 113, -7, -175, 52, -175, -175, 133, 97, + 151, 121, 161, -175, 114, -175, -175, -175, 135, 156, + 180, -18, 168, -175, -175, 0, -175, -175, -175, -175, + -175, -175, -175, 159, 35, 55, -10, -10, 94, -175, + -175, -175, 184, -175, -175, -175, -175, -175, 87, 102, + 173, 145, -175, 175, 91, 91, 194, 208, 96, -175, + 196, -175, -175, -175, -175, -10, 143, 143, 41, 41, + -175, 152, 155, 185, -175, -175, -175, 151, 169, -175, + 165, 186, 116, 17, -175, -10, 143, 213, -175, -18, + -18, 41, -175, 188, -175, 215, -175, -175, 21, 216, + 218, 143, 180, -175, 55, 235, -175, -175, 112, 31, + 161, -175, 165, -175, -24, -175, -10, -175, -175, -175, + -175, 187, 11, -175, 220, 91, -175, -175, -10, -175, + -175 +}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = {0, - 36, - 0, - 81, - 81, - 0, - 0, - 26, - 0, - 0, - 0, - 27, - 28, - 29, - 25, - 24, - 0, - 0, - 0, - 0, - 142, - 23, - 22, - 15, - 16, - 17, - 18, - 9, - 10, - 11, - 14, - 12, - 13, - 8, - 5, - 7, - 6, - 4, - 3, - 19, - 20, - 21, - 0, - 35, - 0, - 0, - 0, - 81, - 69, - 66, - 67, - 101, - 68, - 0, - 92, - 90, - 79, - 96, - 94, - 95, - 91, - 80, - 32, - 31, - 0, - 0, - 0, - 0, - 0, - 0, - 140, - 1, - 143, - 2, - 70, - 0, - 30, - 0, - 81, - 0, - 0, - 81, - 0, - 89, - 0, - 97, - 0, - 0, - 0, - 0, - 82, - 0, - 0, - 0, - 108, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 100, - 88, - 0, - 102, - 93, - 98, - 84, - 85, - 86, - 87, - 81, - 103, - 96, - 108, - 33, - 0, - 0, - 72, - 0, - 108, - 74, - 0, - 141, - 63, - 0, - 0, - 45, - 0, - 0, - 44, - 0, - 39, - 99, - 83, - 0, - 104, - 135, - 0, - 58, - 126, - 124, - 0, - 114, - 115, - 116, - 117, - 118, - 119, - 122, - 120, - 0, - 109, - 0, - 0, - 0, - 73, - 64, - 65, - 0, - 53, - 54, - 55, - 56, - 57, - 52, - 0, - 0, - 0, - 43, - 0, - 0, - 0, - 0, - 137, - 0, - 61, - 0, - 127, - 125, - 123, - 121, - 0, - 0, - 0, - 111, - 76, - 75, - 0, - 0, - 0, - 51, - 50, - 48, - 45, - 70, - 71, - 0, - 0, - 108, - 96, - 105, - 81, - 0, - 128, - 59, - 0, - 0, - 110, - 112, - 113, - 139, - 0, - 49, - 46, - 42, - 37, - 0, - 0, - 135, - 136, - 138, - 0, - 77, - 62, - 0, - 52, - 0, - 41, - 0, - 34, - 106, - 78, - 0, - 60, - 47, - 40, - 38, - 0, - 132, - 129, - 130, - 0, - 134, - 133, - 0, - 107, - 131}; +static const yytype_uint8 yydefact[] = +{ + 0, 36, 0, 81, 81, 0, 0, 26, 0, 0, + 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, + 142, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, + 20, 21, 0, 35, 0, 0, 0, 81, 69, 66, + 67, 101, 68, 0, 92, 90, 79, 96, 94, 95, + 91, 80, 32, 31, 0, 0, 0, 0, 0, 0, + 140, 1, 143, 2, 70, 0, 30, 0, 81, 0, + 0, 81, 0, 89, 0, 97, 0, 0, 0, 0, + 82, 0, 0, 0, 108, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 100, 88, 0, 102, 93, 98, + 84, 85, 86, 87, 81, 103, 96, 108, 33, 0, + 0, 72, 0, 108, 74, 0, 141, 63, 0, 0, + 45, 0, 0, 44, 0, 39, 99, 83, 0, 104, + 135, 0, 58, 126, 124, 0, 114, 115, 116, 117, + 118, 119, 122, 120, 0, 109, 0, 0, 0, 73, + 64, 65, 0, 53, 54, 55, 56, 57, 52, 0, + 0, 0, 43, 0, 0, 0, 0, 137, 0, 61, + 0, 127, 125, 123, 121, 0, 0, 0, 111, 76, + 75, 0, 0, 0, 51, 50, 48, 45, 70, 71, + 0, 0, 108, 96, 105, 81, 0, 128, 59, 0, + 0, 110, 112, 113, 139, 0, 49, 46, 42, 37, + 0, 0, 135, 136, 138, 0, 77, 62, 0, 52, + 0, 41, 0, 34, 106, 78, 0, 60, 47, 40, + 38, 0, 132, 129, 130, 0, 134, 133, 0, 107, + 131 +}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-175, - -175, - 226, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - 15, - -175, - -175, - 51, - 83, - 20, - -175, - -175, - -175, - 43, - -91, - -93, - 56, - -175, - -175, - -175, - 104, - -45, - -175, - -4, - -52, - 198, - -175, - -175, - -175, - -85, - 81, - 22, - -113, - -174, - 109, - -175, - 9, - -175, - 44, - -175, - -175, - -175, - -175, - -175}; +static const yytype_int16 yypgoto[] = +{ + -175, -175, 226, -175, -175, -175, -175, -175, -175, -175, + -175, -175, -175, -175, -175, 15, -175, -175, 51, 83, + 20, -175, -175, -175, 43, -91, -93, 56, -175, -175, + -175, 104, -45, -175, -4, -52, 198, -175, -175, -175, + -85, 81, 22, -113, -174, 109, -175, 9, -175, 44, + -175, -175, -175, -175, -175 +}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = {0, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 44, - 220, - 32, - 33, - 170, - 130, - 196, - 168, - 34, - 142, - 178, - 179, - 55, - 100, - 35, - 36, - 123, - 124, - 37, - 38, - 56, - 57, - 139, - 58, - 59, - 60, - 201, - 117, - 202, - 121, - 155, - 156, - 226, - 243, - 244, - 177, - 207, - 39, - 40, - 41, - 73}; +static const yytype_uint8 yydefgoto[] = +{ + 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 44, 220, 32, 33, 170, 130, + 196, 168, 34, 142, 178, 179, 55, 100, 35, 36, + 123, 124, 37, 38, 56, 57, 139, 58, 59, 60, + 201, 117, 202, 121, 155, 156, 226, 243, 244, 177, + 207, 39, 40, 41, 73 +}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = {61, - 83, - 79, - 127, - 140, - 126, - 116, - 118, - 84, - 181, - 159, - 84, - 212, - 213, - 47, - 98, - 246, - 132, - 42, - 158, - 48, - 84, - 81, - 186, - 187, - 230, - 63, - 64, - 48, - 247, - 78, - 182, - 224, - 241, - 110, - 111, - 112, - 113, - 78, - 120, - 82, - 107, - 43, - 80, - 143, - 108, - 99, - 234, - 127, - 49, - 50, - 45, - 52, - 46, - 125, - 133, - 62, - 49, - 50, - 51, - 52, - 138, - 53, - 54, - 66, - 183, - 144, - 193, - 154, - 194, - 195, - 145, - 65, - 85, - 103, - 67, - 85, - 106, - 86, - 87, - 88, - 89, - 86, - 87, - 88, - 89, - 85, - 172, - 69, - 222, - 203, - 88, - 89, - 68, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 186, - 187, - 188, - 189, - 86, - 87, - 88, - 89, - 137, - 192, - 86, - 87, - 88, - 89, - 127, - 127, - 227, - 160, - 161, - 208, - 209, - 193, - 71, - 194, - 195, - 163, - 72, - 164, - 165, - 166, - 167, - 211, - 154, - 154, - 78, - 237, - 209, - 74, - 76, - 75, - 77, - 47, - 91, - 92, - 93, - 94, - 96, - 101, - 95, - 97, - 143, - 102, - 154, - 104, - 105, - 48, - 114, - 109, - 115, - 119, - 120, - 122, - 131, - 128, - 136, - 47, - 134, - 154, - 141, - 129, - 157, - 231, - 144, - 135, - 162, - 169, - 78, - 145, - 171, - 48, - 175, - 173, - 242, - 239, - 49, - 50, - 51, - 52, - 176, - 53, - 54, - 174, - 180, - 184, - 242, - 191, - 198, - 200, - 205, - 223, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 49, - 50, - 51, - 52, - 199, - 53, - 54, - 1, - 2, - 206, - 210, - 214, - 215, - 216, - 99, - 225, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 219, - 186, - 221, - 11, - 12, - 13, - 229, - 236, - 232, - 233, - 70, - 245, - 248, - 240, - 217, - 238, - 14, - 15, - 197, - 228, - 218, - 90, - 204, - 250, - 0, - 16, - 0, - 17, - 190, - 185, - 18, - 0, - 235, - 249}; - -static const yytype_int16 yycheck[] = {4, - 53, - 47, - 96, - 117, - 96, - 91, - 92, - 4, - 9, - 123, - 4, - 186, - 187, - 24, - 24, - 5, - 4, - 13, - 26, - 38, - 4, - 24, - 47, - 48, - 4, - 14, - 15, - 38, - 18, - 17, - 31, - 206, - 57, - 86, - 87, - 88, - 89, - 17, - 46, - 42, - 69, - 37, - 47, - 9, - 73, - 55, - 221, - 141, - 67, - 68, - 13, - 70, - 15, - 72, - 100, - 69, - 67, - 68, - 69, - 70, - 57, - 72, - 73, - 45, - 65, - 31, - 36, - 120, - 38, - 39, - 36, - 43, - 69, - 78, - 69, - 69, - 81, - 71, - 72, - 73, - 74, - 71, - 72, - 73, - 74, - 69, - 132, - 52, - 202, - 175, - 73, - 74, - 69, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 47, - 48, - 156, - 157, - 71, - 72, - 73, - 74, - 114, - 24, - 71, - 72, - 73, - 74, - 209, - 210, - 209, - 67, - 68, - 25, - 26, - 36, - 0, - 38, - 39, - 30, - 3, - 32, - 33, - 34, - 35, - 185, - 186, - 187, - 17, - 25, - 26, - 69, - 69, - 15, - 69, - 24, - 45, - 45, - 69, - 69, - 59, - 69, - 49, - 53, - 9, - 50, - 206, - 25, - 25, - 38, - 26, - 69, - 69, - 44, - 46, - 69, - 56, - 70, - 25, - 24, - 50, - 221, - 24, - 69, - 59, - 218, - 31, - 69, - 43, - 26, - 17, - 36, - 59, - 38, - 26, - 69, - 236, - 230, - 67, - 68, - 69, - 70, - 10, - 72, - 73, - 58, - 26, - 36, - 248, - 13, - 25, - 24, - 6, - 205, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 69, - 72, - 73, - 7, - 8, - 11, - 24, - 69, - 67, - 38, - 55, - 12, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 69, - 47, - 50, - 27, - 28, - 29, - 25, - 6, - 26, - 25, - 18, - 58, - 26, - 232, - 197, - 229, - 40, - 41, - 169, - 210, - 198, - 57, - 175, - 248, - -1, - 49, - -1, - 51, - 158, - 154, - 54, - -1, - 222, - 245}; +static const yytype_uint8 yytable[] = +{ + 61, 83, 79, 127, 140, 126, 116, 118, 84, 181, + 159, 84, 212, 213, 47, 98, 246, 132, 42, 158, + 48, 84, 81, 186, 187, 230, 63, 64, 48, 247, + 78, 182, 224, 241, 110, 111, 112, 113, 78, 120, + 82, 107, 43, 80, 143, 108, 99, 234, 127, 49, + 50, 45, 52, 46, 125, 133, 62, 49, 50, 51, + 52, 138, 53, 54, 66, 183, 144, 193, 154, 194, + 195, 145, 65, 85, 103, 67, 85, 106, 86, 87, + 88, 89, 86, 87, 88, 89, 85, 172, 69, 222, + 203, 88, 89, 68, 146, 147, 148, 149, 150, 151, + 152, 153, 186, 187, 188, 189, 86, 87, 88, 89, + 137, 192, 86, 87, 88, 89, 127, 127, 227, 160, + 161, 208, 209, 193, 71, 194, 195, 163, 72, 164, + 165, 166, 167, 211, 154, 154, 78, 237, 209, 74, + 76, 75, 77, 47, 91, 92, 93, 94, 96, 101, + 95, 97, 143, 102, 154, 104, 105, 48, 114, 109, + 115, 119, 120, 122, 131, 128, 136, 47, 134, 154, + 141, 129, 157, 231, 144, 135, 162, 169, 78, 145, + 171, 48, 175, 173, 242, 239, 49, 50, 51, 52, + 176, 53, 54, 174, 180, 184, 242, 191, 198, 200, + 205, 223, 146, 147, 148, 149, 150, 151, 152, 153, + 49, 50, 51, 52, 199, 53, 54, 1, 2, 206, + 210, 214, 215, 216, 99, 225, 3, 4, 5, 6, + 7, 8, 9, 10, 219, 186, 221, 11, 12, 13, + 229, 236, 232, 233, 70, 245, 248, 240, 217, 238, + 14, 15, 197, 228, 218, 90, 204, 250, 0, 16, + 0, 17, 190, 185, 18, 0, 235, 249 +}; + +static const yytype_int16 yycheck[] = +{ + 4, 53, 47, 96, 117, 96, 91, 92, 4, 9, + 123, 4, 186, 187, 24, 24, 5, 4, 13, 26, + 38, 4, 24, 47, 48, 4, 14, 15, 38, 18, + 17, 31, 206, 57, 86, 87, 88, 89, 17, 46, + 42, 69, 37, 47, 9, 73, 55, 221, 141, 67, + 68, 13, 70, 15, 72, 100, 69, 67, 68, 69, + 70, 57, 72, 73, 45, 65, 31, 36, 120, 38, + 39, 36, 43, 69, 78, 69, 69, 81, 71, 72, + 73, 74, 71, 72, 73, 74, 69, 132, 52, 202, + 175, 73, 74, 69, 59, 60, 61, 62, 63, 64, + 65, 66, 47, 48, 156, 157, 71, 72, 73, 74, + 114, 24, 71, 72, 73, 74, 209, 210, 209, 67, + 68, 25, 26, 36, 0, 38, 39, 30, 3, 32, + 33, 34, 35, 185, 186, 187, 17, 25, 26, 69, + 69, 15, 69, 24, 45, 45, 69, 69, 59, 69, + 49, 53, 9, 50, 206, 25, 25, 38, 26, 69, + 69, 44, 46, 69, 56, 70, 25, 24, 50, 221, + 24, 69, 59, 218, 31, 69, 43, 26, 17, 36, + 59, 38, 26, 69, 236, 230, 67, 68, 69, 70, + 10, 72, 73, 58, 26, 36, 248, 13, 25, 24, + 6, 205, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 69, 72, 73, 7, 8, 11, + 24, 69, 67, 38, 55, 12, 16, 17, 18, 19, + 20, 21, 22, 23, 69, 47, 50, 27, 28, 29, + 25, 6, 26, 25, 18, 58, 26, 232, 197, 229, + 40, 41, 169, 210, 198, 57, 175, 248, -1, 49, + -1, 51, 158, 154, 54, -1, 222, 245 +}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = {0, - 7, - 8, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 27, - 28, - 29, - 40, - 41, - 49, - 51, - 54, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 92, - 93, - 98, - 104, - 105, - 108, - 109, - 127, - 128, - 129, - 13, - 37, - 90, - 13, - 15, - 24, - 38, - 67, - 68, - 69, - 70, - 72, - 73, - 102, - 110, - 111, - 113, - 114, - 115, - 110, - 69, - 14, - 15, - 43, - 45, - 69, - 69, - 52, - 78, - 0, - 3, - 130, - 69, - 15, - 69, - 69, - 17, - 108, - 110, - 24, - 42, - 111, - 4, - 69, - 71, - 72, - 73, - 74, - 112, - 45, - 45, - 69, - 69, - 49, - 59, - 53, - 24, - 55, - 103, - 69, - 50, - 110, - 25, - 25, - 110, - 69, - 73, - 69, - 111, - 111, - 111, - 111, - 26, - 69, - 116, - 117, - 116, - 44, - 46, - 119, - 69, - 106, - 107, - 72, - 101, - 102, - 70, - 69, - 95, - 56, - 4, - 108, - 50, - 69, - 25, - 110, - 57, - 112, - 119, - 24, - 99, - 9, - 31, - 36, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 111, - 120, - 121, - 59, - 26, - 119, - 67, - 68, - 43, - 30, - 32, - 33, - 34, - 35, - 97, - 26, - 94, - 59, - 108, - 69, - 58, - 26, - 10, - 125, - 100, - 101, - 26, - 9, - 31, - 65, - 36, - 121, - 47, - 48, - 111, - 111, - 107, - 13, - 24, - 36, - 38, - 39, - 96, - 95, - 25, - 69, - 24, - 116, - 118, - 116, - 117, - 6, - 11, - 126, - 25, - 26, - 24, - 111, - 120, - 120, - 69, - 67, - 38, - 94, - 103, - 69, - 91, - 50, - 119, - 110, - 120, - 12, - 122, - 101, - 100, - 25, - 4, - 108, - 26, - 25, - 120, - 125, - 6, - 25, - 96, - 108, - 91, - 57, - 111, - 123, - 124, - 58, - 5, - 18, - 26, - 118, - 123}; +static const yytype_uint8 yystos[] = +{ + 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, + 23, 27, 28, 29, 40, 41, 49, 51, 54, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 92, 93, 98, 104, 105, 108, 109, 127, + 128, 129, 13, 37, 90, 13, 15, 24, 38, 67, + 68, 69, 70, 72, 73, 102, 110, 111, 113, 114, + 115, 110, 69, 14, 15, 43, 45, 69, 69, 52, + 78, 0, 3, 130, 69, 15, 69, 69, 17, 108, + 110, 24, 42, 111, 4, 69, 71, 72, 73, 74, + 112, 45, 45, 69, 69, 49, 59, 53, 24, 55, + 103, 69, 50, 110, 25, 25, 110, 69, 73, 69, + 111, 111, 111, 111, 26, 69, 116, 117, 116, 44, + 46, 119, 69, 106, 107, 72, 101, 102, 70, 69, + 95, 56, 4, 108, 50, 69, 25, 110, 57, 112, + 119, 24, 99, 9, 31, 36, 59, 60, 61, 62, + 63, 64, 65, 66, 111, 120, 121, 59, 26, 119, + 67, 68, 43, 30, 32, 33, 34, 35, 97, 26, + 94, 59, 108, 69, 58, 26, 10, 125, 100, 101, + 26, 9, 31, 65, 36, 121, 47, 48, 111, 111, + 107, 13, 24, 36, 38, 39, 96, 95, 25, 69, + 24, 116, 118, 116, 117, 6, 11, 126, 25, 26, + 24, 111, 120, 120, 69, 67, 38, 94, 103, 69, + 91, 50, 119, 110, 120, 12, 122, 101, 100, 25, + 4, 108, 26, 25, 120, 125, 6, 25, 96, 108, + 91, 57, 111, 123, 124, 58, 5, 18, 26, 118, + 123 +}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = {0, - 76, - 77, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 90, - 91, - 91, - 92, - 93, - 93, - 93, - 93, - 93, - 94, - 94, - 95, - 95, - 96, - 96, - 96, - 96, - 97, - 97, - 97, - 97, - 97, - 98, - 99, - 99, - 100, - 100, - 101, - 101, - 101, - 102, - 102, - 102, - 102, - 103, - 103, - 104, - 105, - 106, - 106, - 107, - 108, - 108, - 109, - 109, - 110, - 110, - 110, - 111, - 111, - 111, - 111, - 111, - 111, - 111, - 111, - 111, - 111, - 111, - 111, - 112, - 112, - 112, - 113, - 114, - 115, - 115, - 116, - 117, - 117, - 118, - 118, - 119, - 119, - 120, - 120, - 120, - 120, - 121, - 121, - 121, - 121, - 121, - 121, - 121, - 121, - 121, - 121, - 121, - 121, - 121, - 121, - 122, - 122, - 123, - 123, - 124, - 124, - 124, - 125, - 125, - 126, - 126, - 127, - 128, - 129, - 130, - 130}; +static const yytype_uint8 yyr1[] = +{ + 0, 76, 77, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 90, 91, 91, 92, + 93, 93, 93, 93, 93, 94, 94, 95, 95, 96, + 96, 96, 96, 97, 97, 97, 97, 97, 98, 99, + 99, 100, 100, 101, 101, 101, 102, 102, 102, 102, + 103, 103, 104, 105, 106, 106, 107, 108, 108, 109, + 109, 110, 110, 110, 111, 111, 111, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 112, 112, 112, 113, + 114, 115, 115, 116, 117, 117, 118, 118, 119, 119, + 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, + 123, 123, 124, 124, 124, 125, 125, 126, 126, 127, + 128, 129, 130, 130 +}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = {0, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 3, - 2, - 2, - 4, - 9, - 1, - 0, - 1, - 3, - 5, - 10, - 9, - 8, - 6, - 5, - 0, - 3, - 6, - 3, - 2, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 5, - 3, - 5, - 1, - 3, - 1, - 2, - 2, - 1, - 1, - 1, - 1, - 0, - 4, - 4, - 5, - 1, - 3, - 3, - 8, - 9, - 2, - 2, - 0, - 2, - 4, - 3, - 3, - 3, - 3, - 3, - 2, - 1, - 1, - 1, - 3, - 1, - 1, - 0, - 1, - 2, - 4, - 3, - 1, - 3, - 1, - 2, - 4, - 3, - 6, - 0, - 2, - 3, - 2, - 3, - 3, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 0, - 3, - 1, - 3, - 1, - 2, - 2, - 0, - 3, - 0, - 2, - 7, - 2, - 4, - 0, - 1}; - -enum +static const yytype_int8 yyr2[] = { - YYENOMEM = -2 + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, + 10, 9, 8, 6, 5, 0, 3, 6, 3, 2, + 1, 1, 0, 1, 1, 1, 1, 1, 5, 3, + 5, 1, 3, 1, 2, 2, 1, 1, 1, 1, + 0, 4, 4, 5, 1, 3, 3, 8, 9, 2, + 2, 0, 2, 4, 3, 3, 3, 3, 3, 2, + 1, 1, 1, 3, 1, 1, 0, 1, 2, 4, + 3, 1, 3, 1, 2, 4, 3, 6, 0, 2, + 3, 2, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, + 1, 3, 1, 2, 2, 0, 3, 0, 2, 7, + 2, 4, 0, 1 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK(yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } else { \ - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -3003,131 +1040,151 @@ enum the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } else { \ - (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ - } \ - while (0) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* Enable debugging if requested. */ #if YYDEBUG -#ifndef YYFPRINTF -#include /* INFRINGES ON USER NAME SPACE */ -#define YYFPRINTF fprintf -#endif +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -#define YYDPRINTF(Args) \ - do { \ - if (yydebug) \ - YYFPRINTF Args; \ - } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YYLOCATION_PRINT +# ifndef YYLOCATION_PRINT -#if defined YY_LOCATION_PRINT +# if defined YY_LOCATION_PRINT -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) { - res += YYFPRINTF(yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF(yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) { - if (yylocp->first_line < yylocp->last_line) { - res += YYFPRINTF(yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF(yyo, ".%d", end_col); - } else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF(yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } return res; } -#define YYLOCATION_PRINT yy_location_print_ +# define YYLOCATION_PRINT yy_location_print_ -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -#else +# else -#define YYLOCATION_PRINT(File, Loc) ((void)0) -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT YYLOCATION_PRINT +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT -#endif -#endif /* !defined YYLOCATION_PRINT */ +# endif +# endif /* !defined YYLOCATION_PRINT */ + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ - do { \ - if (yydebug) { \ - YYFPRINTF(stderr, "%s ", Title); \ - yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF(stderr, "\n"); \ - } \ - } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { FILE *yyoutput = yyo; - YY_USE(yyoutput); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YYLOCATION_PRINT(yyo, yylocationp); - YYFPRINTF(yyo, ": "); - yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF(yyo, ")"); + YYLOCATION_PRINT (yyo, yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -3135,66 +1192,70 @@ static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *co | TOP (included). | `------------------------------------------------------------------*/ -static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF(stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) { - int yybot = *yybottom; - YYFPRINTF(stderr, " %d", yybot); - } - YYFPRINTF(stderr, "\n"); + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); } -#define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print((Bottom), (Top)); \ - } while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, - ParsedSqlResult *sql_result, void *scanner) +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF(stderr, " $%d = ", yyi + 1); - yy_symbol_print(stderr, - YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), - sql_string, - sql_result, - scanner); - YYFPRINTF(stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); + YYFPRINTF (stderr, "\n"); + } } -#define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ - } while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -#define YYDPRINTF(Args) ((void)0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -#define YY_STACK_PRINT(Bottom, Top) -#define YY_REDUCE_PRINT(Rule) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ + /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -3205,15 +1266,16 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif + /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -3222,59 +1284,69 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default(yyn)) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } + + + #ifndef yystrlen -#if defined __GLIBC__ && defined _STRING_H -#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) -#else +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ -static YYPTRDIFF_T yystrlen(const char *yystr) +static YYPTRDIFF_T +yystrlen (const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -#endif +# endif #endif #ifndef yystpcpy -#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -#define yystpcpy stpcpy -#else +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char *yystpcpy(char *yydest, const char *yysrc) +static char * +yystpcpy (char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -3282,7 +1354,7 @@ static char *yystpcpy(char *yydest, const char *yysrc) return yyd - 1; } -#endif +# endif #endif #ifndef yytnamerr @@ -3293,45 +1365,52 @@ static char *yystpcpy(char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) { - if (*yystr == '"') { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) { - case '\'': - case ',': goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes:; - } + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } if (yyres) - return yystpcpy(yyres, yystr) - yyres; + return yystpcpy (yyres, yystr) - yyres; else - return yystrlen(yystr); + return yystrlen (yystr); } #endif -static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -3358,17 +1437,19 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -3380,12 +1461,11 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) { - enum - { - YYARGS_MAX = 5 - }; + enum { YYARGS_MAX = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -3395,13 +1475,16 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) { -#define YYCASE_(N, S) \ - case N: yyformat = S; break + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -3410,118 +1493,134 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen(yyformat) - 2 * yycount + 1; + yysize = yystrlen (yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) { - YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) { - *yymsg_alloc = 2 * yysize; - if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } else { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } } return 0; } + /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, - const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YY_USE(yyvaluep); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + + + + /*----------. | yyparse. | `----------*/ -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +int +yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - /* Lookahead token kind. */ - int yychar; - - /* The semantic value of the lookahead symbol. */ - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ - YY_INITIAL_VALUE(static YYSTYPE yyval_default;) - YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); - - /* Location data for the lookahead symbol. */ - static YYLTYPE yyloc_default -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = {1, 1, 1, 1} -#endif - ; - YYLTYPE yylloc = yyloc_default; +/* Lookahead token kind. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - /* Number of syntax errors so far. */ - int yynerrs = 0; +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -3537,23 +1636,24 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF((stderr, "Starting parse\n")); + YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -3562,90 +1662,93 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) have just been pushed. So pushing a state here evens the stacks. */ yyssp++; + /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF((stderr, "Entering state %d\n", yystate)); - YY_ASSERT(0 <= yystate && yystate < YYNSTATES); + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST(yy_state_t, yystate); + *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else - { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -#if defined yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow(YY_("memory exhausted"), - &yyss1, - yysize * YYSIZEOF(*yyssp), - &yyvs1, - yysize * YYSIZEOF(*yyvsp), - &yyls1, - yysize * YYSIZEOF(*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -#else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); - if (!yyptr) + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) YYNOMEM; - YYSTACK_RELOCATE(yyss_alloc, yyss); - YYSTACK_RELOCATE(yyvs_alloc, yyvs); - YYSTACK_RELOCATE(yyls_alloc, yyls); -#undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE(yyss1); - } -#endif + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + YYNOMEM; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ @@ -3655,34 +1758,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default(yyn)) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) { - YYDPRINTF((stderr, "Reading a token\n")); - yychar = yylex(&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF((stderr, "Now at end of input.\n")); - } else if (yychar == YYerror) { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { - yytoken = YYTRANSLATE(yychar); - YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -3690,12 +1799,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) { - if (yytable_value_is_error(yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -3703,7 +1813,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3714,6 +1824,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yychar = YYEMPTY; goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -3723,6 +1834,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) goto yyerrlab; goto yyreduce; + /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -3738,168 +1850,164 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1 - yylen]; + yyval = yyvsp[1-yylen]; /* Default location. */ - YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT(yyn); - switch (yyn) { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 260 "yacc_sql.y" + YY_REDUCE_PRINT (yyn); + switch (yyn) { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } + case 2: /* commands: command_wrapper opt_semicolon */ +#line 260 "yacc_sql.y" + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } #line 1868 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ + case 24: /* exit_stmt: EXIT */ #line 291 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } #line 1877 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ + case 25: /* help_stmt: HELP */ #line 297 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } #line 1885 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ + case 26: /* sync_stmt: SYNC */ #line 302 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } #line 1893 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ + case 27: /* begin_stmt: TRX_BEGIN */ #line 308 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } #line 1901 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ + case 28: /* commit_stmt: TRX_COMMIT */ #line 314 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } #line 1909 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ + case 29: /* rollback_stmt: TRX_ROLLBACK */ #line 320 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } #line 1917 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ + case 30: /* drop_table_stmt: DROP TABLE ID */ #line 326 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1927 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ + case 31: /* show_tables_stmt: SHOW TABLES */ #line 333 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } #line 1935 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ + case 32: /* desc_table_stmt: DESC ID */ #line 339 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1945 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ #line 348 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1956 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ + case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ #line 358 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } #line 1972 "yacc_sql.cpp" break; - case 35: /* opt_unique: UNIQUE */ + case 35: /* opt_unique: UNIQUE */ #line 372 "yacc_sql.y" - { - (yyval.unique) = true; - } + { (yyval.unique) = true; } #line 1978 "yacc_sql.cpp" break; - case 36: /* opt_unique: %empty */ + case 36: /* opt_unique: %empty */ #line 373 "yacc_sql.y" - { - (yyval.unique) = false; - } + { (yyval.unique) = false; } #line 1984 "yacc_sql.cpp" break; - case 37: /* attr_list: ID */ + case 37: /* attr_list: ID */ #line 378 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } #line 1994 "yacc_sql.cpp" break; - case 38: /* attr_list: ID COMMA attr_list */ + case 38: /* attr_list: ID COMMA attr_list */ #line 384 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list) - ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } #line 2004 "yacc_sql.cpp" break; - case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 393 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); @@ -3907,52 +2015,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2016 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ #line 403 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node( - (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } #line 2024 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ + case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ #line 407 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node( - (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } #line 2032 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 411 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node( - (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); + (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } #line 2040 "yacc_sql.cpp" break; - case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ + case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ #line 415 "yacc_sql.y" { - (yyval.sql_node) = - create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } #line 2048 "yacc_sql.cpp" break; - case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ + case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ #line 419 "yacc_sql.y" { - (yyval.sql_node) = - create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } #line 2056 "yacc_sql.cpp" break; - case 45: /* attr_def_list: %empty */ + case 45: /* attr_def_list: %empty */ #line 425 "yacc_sql.y" { (yyval.attr_infos) = nullptr; @@ -3960,7 +2063,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2064 "yacc_sql.cpp" break; - case 46: /* attr_def_list: COMMA attr_def attr_def_list */ + case 46: /* attr_def_list: COMMA attr_def attr_def_list */ #line 429 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -3974,13 +2077,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2078 "yacc_sql.cpp" break; - case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ + case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ #line 442 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; @@ -3990,10 +2093,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2094 "yacc_sql.cpp" break; - case 48: /* attr_def: ID type nullable_constraint */ + case 48: /* attr_def: ID type nullable_constraint */ #line 454 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -4018,7 +2121,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2122 "yacc_sql.cpp" break; - case 49: /* nullable_constraint: NOT NULL_T */ + case 49: /* nullable_constraint: NOT NULL_T */ #line 481 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false @@ -4026,7 +2129,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2130 "yacc_sql.cpp" break; - case 50: /* nullable_constraint: NULLABLE */ + case 50: /* nullable_constraint: NULLABLE */ #line 485 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 @@ -4034,7 +2137,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2138 "yacc_sql.cpp" break; - case 51: /* nullable_constraint: NULL_T */ + case 51: /* nullable_constraint: NULL_T */ #line 489 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 @@ -4042,7 +2145,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2146 "yacc_sql.cpp" break; - case 52: /* nullable_constraint: %empty */ + case 52: /* nullable_constraint: %empty */ #line 493 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL @@ -4050,50 +2153,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2154 "yacc_sql.cpp" break; - case 53: /* type: INT_T */ + case 53: /* type: INT_T */ #line 499 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::INTS); - } + { (yyval.number) = static_cast(AttrType::INTS); } #line 2160 "yacc_sql.cpp" break; - case 54: /* type: STRING_T */ + case 54: /* type: STRING_T */ #line 500 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::CHARS); - } + { (yyval.number) = static_cast(AttrType::CHARS); } #line 2166 "yacc_sql.cpp" break; - case 55: /* type: FLOAT_T */ + case 55: /* type: FLOAT_T */ #line 501 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::FLOATS); - } + { (yyval.number) = static_cast(AttrType::FLOATS); } #line 2172 "yacc_sql.cpp" break; - case 56: /* type: DATE_T */ + case 56: /* type: DATE_T */ #line 502 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::DATES); - } + { (yyval.number) = static_cast(AttrType::DATES); } #line 2178 "yacc_sql.cpp" break; - case 57: /* type: TEXT_T */ + case 57: /* type: TEXT_T */ #line 503 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::TEXTS); - } + { (yyval.number) = static_cast(AttrType::TEXTS); } #line 2184 "yacc_sql.cpp" break; - case 58: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 58: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 508 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -4104,7 +2197,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2198 "yacc_sql.cpp" break; - case 59: /* values_list: LBRACE value_list RBRACE */ + case 59: /* values_list: LBRACE value_list RBRACE */ #line 521 "yacc_sql.y" { (yyval.values_list) = new std::vector>; @@ -4114,7 +2207,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2208 "yacc_sql.cpp" break; - case 60: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 60: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 527 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); @@ -4123,7 +2216,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2217 "yacc_sql.cpp" break; - case 61: /* value_list: value */ + case 61: /* value_list: value */ #line 534 "yacc_sql.y" { (yyval.value_list) = new std::vector; @@ -4133,7 +2226,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2227 "yacc_sql.cpp" break; - case 62: /* value_list: value_list COMMA value */ + case 62: /* value_list: value_list COMMA value */ #line 540 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); @@ -4142,54 +2235,54 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2236 "yacc_sql.cpp" break; - case 63: /* value: nonnegative_value */ + case 63: /* value: nonnegative_value */ #line 547 "yacc_sql.y" - { + { (yyval.value) = (yyvsp[0].value); } #line 2244 "yacc_sql.cpp" break; - case 64: /* value: '-' NUMBER */ + case 64: /* value: '-' NUMBER */ #line 550 "yacc_sql.y" - { + { (yyval.value) = new Value(-(yyvsp[0].number)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } #line 2253 "yacc_sql.cpp" break; - case 65: /* value: '-' FLOAT */ + case 65: /* value: '-' FLOAT */ #line 554 "yacc_sql.y" - { + { (yyval.value) = new Value(-(yyvsp[0].floats)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } #line 2262 "yacc_sql.cpp" break; - case 66: /* nonnegative_value: NUMBER */ + case 66: /* nonnegative_value: NUMBER */ #line 561 "yacc_sql.y" - { + { (yyval.value) = new Value((yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2271 "yacc_sql.cpp" break; - case 67: /* nonnegative_value: FLOAT */ + case 67: /* nonnegative_value: FLOAT */ #line 565 "yacc_sql.y" - { + { (yyval.value) = new Value((yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2280 "yacc_sql.cpp" break; - case 68: /* nonnegative_value: SSS */ + case 68: /* nonnegative_value: SSS */ #line 569 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); + { + char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); @@ -4197,15 +2290,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2291 "yacc_sql.cpp" break; - case 69: /* nonnegative_value: NULL_T */ + case 69: /* nonnegative_value: NULL_T */ #line 575 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } #line 2299 "yacc_sql.cpp" break; - case 70: /* storage_format: %empty */ + case 70: /* storage_format: %empty */ #line 582 "yacc_sql.y" { (yyval.string) = nullptr; @@ -4213,7 +2306,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2307 "yacc_sql.cpp" break; - case 71: /* storage_format: STORAGE FORMAT EQ ID */ + case 71: /* storage_format: STORAGE FORMAT EQ ID */ #line 586 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); @@ -4221,10 +2314,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2315 "yacc_sql.cpp" break; - case 72: /* delete_stmt: DELETE FROM ID where */ + case 72: /* delete_stmt: DELETE FROM ID where */ #line 593 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); @@ -4234,10 +2327,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2328 "yacc_sql.cpp" break; - case 73: /* update_stmt: UPDATE ID SET setClauses where */ + case 73: /* update_stmt: UPDATE ID SET setClauses where */ #line 605 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -4249,7 +2342,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2343 "yacc_sql.cpp" break; - case 74: /* setClauses: setClause */ + case 74: /* setClauses: setClause */ #line 619 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; @@ -4258,7 +2351,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2352 "yacc_sql.cpp" break; - case 75: /* setClauses: setClauses COMMA setClause */ + case 75: /* setClauses: setClauses COMMA setClause */ #line 624 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); @@ -4266,18 +2359,18 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2360 "yacc_sql.cpp" break; - case 76: /* setClause: ID EQ expression */ + case 76: /* setClause: ID EQ expression */ #line 631 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } #line 2371 "yacc_sql.cpp" break; - case 77: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ + case 77: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ #line 641 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -4314,7 +2407,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2408 "yacc_sql.cpp" break; - case 78: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ + case 78: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ #line 674 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -4329,8 +2422,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); - ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -4338,8 +2430,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -4350,7 +2441,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2442 "yacc_sql.cpp" break; - case 79: /* calc_stmt: CALC expression_list */ + case 79: /* calc_stmt: CALC expression_list */ #line 707 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -4360,7 +2451,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2452 "yacc_sql.cpp" break; - case 80: /* calc_stmt: SELECT expression_list */ + case 80: /* calc_stmt: SELECT expression_list */ #line 713 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -4370,20 +2461,20 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2462 "yacc_sql.cpp" break; - case 81: /* expression_list: %empty */ + case 81: /* expression_list: %empty */ #line 721 "yacc_sql.y" - { + { (yyval.expression_list) = new std::vector>; } #line 2470 "yacc_sql.cpp" break; - case 82: /* expression_list: expression alias */ + case 82: /* expression_list: expression alias */ #line 725 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { - (yyvsp[-1].expression)->set_name((yyvsp[0].string)); + (yyvsp[-1].expression)->set_alias((yyvsp[0].string)); } (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); @@ -4391,7 +2482,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2483 "yacc_sql.cpp" break; - case 83: /* expression_list: expression alias COMMA expression_list */ + case 83: /* expression_list: expression alias COMMA expression_list */ #line 734 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -4400,53 +2491,49 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list) = new std::vector>; } if (nullptr != (yyvsp[-2].string)) { - (yyvsp[-3].expression)->set_name((yyvsp[-2].string)); + (yyvsp[-3].expression)->set_alias((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } #line 2500 "yacc_sql.cpp" break; - case 84: /* expression: expression '+' expression */ + case 84: /* expression: expression '+' expression */ #line 749 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2508 "yacc_sql.cpp" break; - case 85: /* expression: expression '-' expression */ + case 85: /* expression: expression '-' expression */ #line 752 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2516 "yacc_sql.cpp" break; - case 86: /* expression: expression '*' expression */ + case 86: /* expression: expression '*' expression */ #line 755 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2524 "yacc_sql.cpp" break; - case 87: /* expression: expression '/' expression */ + case 87: /* expression: expression '/' expression */ #line 758 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2532 "yacc_sql.cpp" break; - case 88: /* expression: LBRACE expression_list RBRACE */ + case 88: /* expression: LBRACE expression_list RBRACE */ #line 761 "yacc_sql.y" - { + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -4457,18 +2544,17 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2545 "yacc_sql.cpp" break; - case 89: /* expression: '-' expression */ + case 89: /* expression: '-' expression */ #line 769 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } #line 2553 "yacc_sql.cpp" break; - case 90: /* expression: nonnegative_value */ + case 90: /* expression: nonnegative_value */ #line 772 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); @@ -4476,82 +2562,82 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2563 "yacc_sql.cpp" break; - case 91: /* expression: rel_attr */ + case 91: /* expression: rel_attr */ #line 777 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } #line 2574 "yacc_sql.cpp" break; - case 92: /* expression: '*' */ + case 92: /* expression: '*' */ #line 783 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } #line 2582 "yacc_sql.cpp" break; - case 93: /* expression: ID DOT '*' */ + case 93: /* expression: ID DOT '*' */ #line 786 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } #line 2590 "yacc_sql.cpp" break; - case 94: /* expression: aggr_func_expr */ + case 94: /* expression: aggr_func_expr */ #line 789 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } #line 2598 "yacc_sql.cpp" break; - case 95: /* expression: sub_query_expr */ + case 95: /* expression: sub_query_expr */ #line 792 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } #line 2606 "yacc_sql.cpp" break; - case 96: /* alias: %empty */ + case 96: /* alias: %empty */ #line 799 "yacc_sql.y" - { + { (yyval.string) = nullptr; } #line 2614 "yacc_sql.cpp" break; - case 97: /* alias: ID */ + case 97: /* alias: ID */ #line 802 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2622 "yacc_sql.cpp" break; - case 98: /* alias: AS ID */ + case 98: /* alias: AS ID */ #line 805 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2630 "yacc_sql.cpp" break; - case 99: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 99: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 811 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } #line 2638 "yacc_sql.cpp" break; - case 100: /* sub_query_expr: LBRACE select_stmt RBRACE */ + case 100: /* sub_query_expr: LBRACE select_stmt RBRACE */ #line 818 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); @@ -4559,20 +2645,20 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2646 "yacc_sql.cpp" break; - case 101: /* rel_attr: ID */ + case 101: /* rel_attr: ID */ #line 824 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 2656 "yacc_sql.cpp" break; - case 102: /* rel_attr: ID DOT ID */ + case 102: /* rel_attr: ID DOT ID */ #line 829 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); @@ -4581,22 +2667,22 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2668 "yacc_sql.cpp" break; - case 103: /* relation: ID */ + case 103: /* relation: ID */ #line 839 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2676 "yacc_sql.cpp" break; - case 104: /* rel_list: relation alias */ + case 104: /* rel_list: relation alias */ #line 845 "yacc_sql.y" - { + { (yyval.relation_list) = new std::vector(); - if (nullptr != (yyvsp[0].string)) { - (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); free((yyvsp[0].string)); - } else { + }else{ (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); @@ -4604,19 +2690,18 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2691 "yacc_sql.cpp" break; - case 105: /* rel_list: relation alias COMMA rel_list */ + case 105: /* rel_list: relation alias COMMA rel_list */ #line 855 "yacc_sql.y" - { + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if (nullptr != (yyvsp[-2].string)) { - (yyval.relation_list) - ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); free((yyvsp[-2].string)); - } else { + }else{ (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); @@ -4624,7 +2709,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2710 "yacc_sql.cpp" break; - case 106: /* joinClauses: relation ON condition */ + case 106: /* joinClauses: relation ON condition */ #line 873 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; @@ -4635,20 +2720,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2721 "yacc_sql.cpp" break; - case 107: /* joinClauses: relation ON condition INNER JOIN joinClauses */ + case 107: /* joinClauses: relation ON condition INNER JOIN joinClauses */ #line 880 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } #line 2733 "yacc_sql.cpp" break; - case 108: /* where: %empty */ + case 108: /* where: %empty */ #line 891 "yacc_sql.y" { (yyval.expression) = nullptr; @@ -4656,15 +2740,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2741 "yacc_sql.cpp" break; - case 109: /* where: WHERE condition */ + case 109: /* where: WHERE condition */ #line 894 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + { + (yyval.expression) = (yyvsp[0].expression); } #line 2749 "yacc_sql.cpp" break; - case 110: /* condition: expression comp_op expression */ + case 110: /* condition: expression comp_op expression */ #line 901 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); @@ -4672,148 +2756,118 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2757 "yacc_sql.cpp" break; - case 111: /* condition: comp_op expression */ + case 111: /* condition: comp_op expression */ #line 905 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); - (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } #line 2768 "yacc_sql.cpp" break; - case 112: /* condition: condition AND condition */ + case 112: /* condition: condition AND condition */ #line 912 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2776 "yacc_sql.cpp" break; - case 113: /* condition: condition OR condition */ + case 113: /* condition: condition OR condition */ #line 916 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2784 "yacc_sql.cpp" break; - case 114: /* comp_op: EQ */ + case 114: /* comp_op: EQ */ #line 922 "yacc_sql.y" - { - (yyval.comp) = EQUAL_TO; - } + { (yyval.comp) = EQUAL_TO; } #line 2790 "yacc_sql.cpp" break; - case 115: /* comp_op: LT */ + case 115: /* comp_op: LT */ #line 923 "yacc_sql.y" - { - (yyval.comp) = LESS_THAN; - } + { (yyval.comp) = LESS_THAN; } #line 2796 "yacc_sql.cpp" break; - case 116: /* comp_op: GT */ + case 116: /* comp_op: GT */ #line 924 "yacc_sql.y" - { - (yyval.comp) = GREAT_THAN; - } + { (yyval.comp) = GREAT_THAN; } #line 2802 "yacc_sql.cpp" break; - case 117: /* comp_op: LE */ + case 117: /* comp_op: LE */ #line 925 "yacc_sql.y" - { - (yyval.comp) = LESS_EQUAL; - } + { (yyval.comp) = LESS_EQUAL; } #line 2808 "yacc_sql.cpp" break; - case 118: /* comp_op: GE */ + case 118: /* comp_op: GE */ #line 926 "yacc_sql.y" - { - (yyval.comp) = GREAT_EQUAL; - } + { (yyval.comp) = GREAT_EQUAL; } #line 2814 "yacc_sql.cpp" break; - case 119: /* comp_op: NE */ + case 119: /* comp_op: NE */ #line 927 "yacc_sql.y" - { - (yyval.comp) = NOT_EQUAL; - } + { (yyval.comp) = NOT_EQUAL; } #line 2820 "yacc_sql.cpp" break; - case 120: /* comp_op: IS */ + case 120: /* comp_op: IS */ #line 928 "yacc_sql.y" - { - (yyval.comp) = IS_OP; - } + { (yyval.comp) = IS_OP; } #line 2826 "yacc_sql.cpp" break; - case 121: /* comp_op: IS NOT */ + case 121: /* comp_op: IS NOT */ #line 929 "yacc_sql.y" - { - (yyval.comp) = IS_NOT_OP; - } + { (yyval.comp) = IS_NOT_OP; } #line 2832 "yacc_sql.cpp" break; - case 122: /* comp_op: LIKE */ + case 122: /* comp_op: LIKE */ #line 930 "yacc_sql.y" - { - (yyval.comp) = LIKE_OP; - } + { (yyval.comp) = LIKE_OP;} #line 2838 "yacc_sql.cpp" break; - case 123: /* comp_op: NOT LIKE */ + case 123: /* comp_op: NOT LIKE */ #line 931 "yacc_sql.y" - { - (yyval.comp) = NOT_LIKE_OP; - } + {(yyval.comp) = NOT_LIKE_OP;} #line 2844 "yacc_sql.cpp" break; - case 124: /* comp_op: IN */ + case 124: /* comp_op: IN */ #line 932 "yacc_sql.y" - { - (yyval.comp) = IN_OP; - } + { (yyval.comp) = IN_OP; } #line 2850 "yacc_sql.cpp" break; - case 125: /* comp_op: NOT IN */ + case 125: /* comp_op: NOT IN */ #line 933 "yacc_sql.y" - { - (yyval.comp) = NOT_IN_OP; - } + { (yyval.comp) = NOT_IN_OP; } #line 2856 "yacc_sql.cpp" break; - case 126: /* comp_op: EXISTS */ + case 126: /* comp_op: EXISTS */ #line 934 "yacc_sql.y" - { - (yyval.comp) = EXISTS_OP; - } + { (yyval.comp) = EXISTS_OP; } #line 2862 "yacc_sql.cpp" break; - case 127: /* comp_op: NOT EXISTS */ + case 127: /* comp_op: NOT EXISTS */ #line 935 "yacc_sql.y" - { - (yyval.comp) = NOT_EXISTS_OP; - } + { (yyval.comp) = NOT_EXISTS_OP; } #line 2868 "yacc_sql.cpp" break; - case 128: /* opt_order_by: %empty */ + case 128: /* opt_order_by: %empty */ #line 940 "yacc_sql.y" { (yyval.orderby_list) = nullptr; @@ -4821,64 +2875,64 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2876 "yacc_sql.cpp" break; - case 129: /* opt_order_by: ORDER BY sort_list */ + case 129: /* opt_order_by: ORDER BY sort_list */ #line 944 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } #line 2885 "yacc_sql.cpp" break; - case 130: /* sort_list: sort_unit */ + case 130: /* sort_list: sort_unit */ #line 952 "yacc_sql.y" - { + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } + } #line 2894 "yacc_sql.cpp" break; - case 131: /* sort_list: sort_unit COMMA sort_list */ + case 131: /* sort_list: sort_unit COMMA sort_list */ #line 957 "yacc_sql.y" - { + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } + } #line 2903 "yacc_sql.cpp" break; - case 132: /* sort_unit: expression */ + case 132: /* sort_unit: expression */ #line 965 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2913 "yacc_sql.cpp" break; - case 133: /* sort_unit: expression DESC */ + case 133: /* sort_unit: expression DESC */ #line 971 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } + } #line 2923 "yacc_sql.cpp" break; - case 134: /* sort_unit: expression ASC */ + case 134: /* sort_unit: expression ASC */ #line 977 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2933 "yacc_sql.cpp" break; - case 135: /* group_by: %empty */ + case 135: /* group_by: %empty */ #line 986 "yacc_sql.y" { (yyval.expression_list) = nullptr; @@ -4886,7 +2940,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2941 "yacc_sql.cpp" break; - case 136: /* group_by: GROUP BY expression_list */ + case 136: /* group_by: GROUP BY expression_list */ #line 990 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4894,7 +2948,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2949 "yacc_sql.cpp" break; - case 137: /* opt_having: %empty */ + case 137: /* opt_having: %empty */ #line 997 "yacc_sql.y" { (yyval.expression) = nullptr; @@ -4902,7 +2956,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2957 "yacc_sql.cpp" break; - case 138: /* opt_having: HAVING condition */ + case 138: /* opt_having: HAVING condition */ #line 1001 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); @@ -4910,33 +2964,33 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2965 "yacc_sql.cpp" break; - case 139: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ + case 139: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ #line 1008 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } #line 2979 "yacc_sql.cpp" break; - case 140: /* explain_stmt: EXPLAIN command_wrapper */ + case 140: /* explain_stmt: EXPLAIN command_wrapper */ #line 1021 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } #line 2988 "yacc_sql.cpp" break; - case 141: /* set_variable_stmt: SET ID EQ value */ + case 141: /* set_variable_stmt: SET ID EQ value */ #line 1029 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); @@ -4945,10 +2999,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 3000 "yacc_sql.cpp" break; + #line 3004 "yacc_sql.cpp" - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -4960,9 +3015,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; @@ -4973,67 +3028,84 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) { - ++yynerrs; - { - yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) { - if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); - yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); - if (yymsg) { - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } - yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; } - } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } else { - yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; + } } - } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; + /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -5046,40 +3118,45 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) { - yyn = yypact[yystate]; - if (!yypact_value_is_default(yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - yystate = *yyssp; - YY_STACK_PRINT(yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -5087,14 +3164,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; + /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -5102,6 +3180,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 0; goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -5109,38 +3188,44 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 1; goto yyreturnlab; + /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; + /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE(yychar); - yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK(yylen); - YY_STACK_PRINT(yyss, yyssp); - while (yyssp != yyss) { - yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - } + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE(yyss); + YYSTACK_FREE (yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); + YYSTACK_FREE (yymsg); return yyresult; } @@ -5149,8 +3234,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) -{ +int sql_parse(const char *s, ParsedSqlResult *sql_result) { yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 2d3d99e8..8521ddee 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -#define YY_YY_YACC_SQL_HPP_INCLUDED +# define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -#define YYDEBUG 0 +# define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,125 +47,126 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -#define YYTOKENTYPE -enum yytokentype -{ - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - HAVING = 266, /* HAVING */ - ORDER = 267, /* ORDER */ - TABLE = 268, /* TABLE */ - TABLES = 269, /* TABLES */ - INDEX = 270, /* INDEX */ - CALC = 271, /* CALC */ - SELECT = 272, /* SELECT */ - DESC = 273, /* DESC */ - SHOW = 274, /* SHOW */ - SYNC = 275, /* SYNC */ - INSERT = 276, /* INSERT */ - DELETE = 277, /* DELETE */ - UPDATE = 278, /* UPDATE */ - LBRACE = 279, /* LBRACE */ - RBRACE = 280, /* RBRACE */ - COMMA = 281, /* COMMA */ - TRX_BEGIN = 282, /* TRX_BEGIN */ - TRX_COMMIT = 283, /* TRX_COMMIT */ - TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ - INT_T = 285, /* INT_T */ - IN = 286, /* IN */ - STRING_T = 287, /* STRING_T */ - FLOAT_T = 288, /* FLOAT_T */ - DATE_T = 289, /* DATE_T */ - TEXT_T = 290, /* TEXT_T */ - NOT = 291, /* NOT */ - UNIQUE = 292, /* UNIQUE */ - NULL_T = 293, /* NULL_T */ - NULLABLE = 294, /* NULLABLE */ - HELP = 295, /* HELP */ - EXIT = 296, /* EXIT */ - DOT = 297, /* DOT */ - INTO = 298, /* INTO */ - VALUES = 299, /* VALUES */ - FROM = 300, /* FROM */ - WHERE = 301, /* WHERE */ - AND = 302, /* AND */ - OR = 303, /* OR */ - SET = 304, /* SET */ - ON = 305, /* ON */ - LOAD = 306, /* LOAD */ - DATA = 307, /* DATA */ - INFILE = 308, /* INFILE */ - EXPLAIN = 309, /* EXPLAIN */ - STORAGE = 310, /* STORAGE */ - FORMAT = 311, /* FORMAT */ - INNER = 312, /* INNER */ - JOIN = 313, /* JOIN */ - EQ = 314, /* EQ */ - LT = 315, /* LT */ - GT = 316, /* GT */ - LE = 317, /* LE */ - GE = 318, /* GE */ - NE = 319, /* NE */ - LIKE = 320, /* LIKE */ - IS = 321, /* IS */ - NUMBER = 322, /* NUMBER */ - FLOAT = 323, /* FLOAT */ - ID = 324, /* ID */ - SSS = 325, /* SSS */ - UMINUS = 326 /* UMINUS */ -}; -typedef enum yytokentype yytoken_kind_t; +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + HAVING = 266, /* HAVING */ + ORDER = 267, /* ORDER */ + TABLE = 268, /* TABLE */ + TABLES = 269, /* TABLES */ + INDEX = 270, /* INDEX */ + CALC = 271, /* CALC */ + SELECT = 272, /* SELECT */ + DESC = 273, /* DESC */ + SHOW = 274, /* SHOW */ + SYNC = 275, /* SYNC */ + INSERT = 276, /* INSERT */ + DELETE = 277, /* DELETE */ + UPDATE = 278, /* UPDATE */ + LBRACE = 279, /* LBRACE */ + RBRACE = 280, /* RBRACE */ + COMMA = 281, /* COMMA */ + TRX_BEGIN = 282, /* TRX_BEGIN */ + TRX_COMMIT = 283, /* TRX_COMMIT */ + TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ + INT_T = 285, /* INT_T */ + IN = 286, /* IN */ + STRING_T = 287, /* STRING_T */ + FLOAT_T = 288, /* FLOAT_T */ + DATE_T = 289, /* DATE_T */ + TEXT_T = 290, /* TEXT_T */ + NOT = 291, /* NOT */ + UNIQUE = 292, /* UNIQUE */ + NULL_T = 293, /* NULL_T */ + NULLABLE = 294, /* NULLABLE */ + HELP = 295, /* HELP */ + EXIT = 296, /* EXIT */ + DOT = 297, /* DOT */ + INTO = 298, /* INTO */ + VALUES = 299, /* VALUES */ + FROM = 300, /* FROM */ + WHERE = 301, /* WHERE */ + AND = 302, /* AND */ + OR = 303, /* OR */ + SET = 304, /* SET */ + ON = 305, /* ON */ + LOAD = 306, /* LOAD */ + DATA = 307, /* DATA */ + INFILE = 308, /* INFILE */ + EXPLAIN = 309, /* EXPLAIN */ + STORAGE = 310, /* STORAGE */ + FORMAT = 311, /* FORMAT */ + INNER = 312, /* INNER */ + JOIN = 313, /* JOIN */ + EQ = 314, /* EQ */ + LT = 315, /* LT */ + GT = 316, /* GT */ + LE = 317, /* LE */ + GE = 318, /* GE */ + NE = 319, /* NE */ + LIKE = 320, /* LIKE */ + IS = 321, /* IS */ + NUMBER = 322, /* NUMBER */ + FLOAT = 323, /* FLOAT */ + ID = 324, /* ID */ + SSS = 325, /* SSS */ + UMINUS = 326 /* UMINUS */ + }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 163 "yacc_sql.y" - ParsedSqlNode *sql_node; - Value *value; - enum CompOp comp; - RelAttrSqlNode *rel_attr; - std::vector *attr_infos; - AttrInfoSqlNode *attr_info; - Expression *expression; - std::vector> *expression_list; - std::vector *value_list; - std::vector> *values_list; - SetClauseSqlNode *set_clause; - std::vector *set_clauses; - JoinSqlNode *join_clauses; - std::vector *rel_attr_list; - std::vector *relation_list; - OrderBySqlNode *orderby_unit; - std::vector *orderby_list; - char *string; - int number; - float floats; - bool nullable_info; - std::vector *index_attr_list; - bool unique; + ParsedSqlNode * sql_node; + Value * value; + enum CompOp comp; + RelAttrSqlNode * rel_attr; + std::vector * attr_infos; + AttrInfoSqlNode * attr_info; + Expression * expression; + std::vector> * expression_list; + std::vector * value_list; + std::vector> * values_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; + JoinSqlNode * join_clauses; + std::vector * rel_attr_list; + std::vector * relation_list; + OrderBySqlNode * orderby_unit; + std::vector * orderby_list; + char * string; + int number; + float floats; + bool nullable_info; + std::vector * index_attr_list; + bool unique; #line 161 "yacc_sql.hpp" + }; typedef union YYSTYPE YYSTYPE; -#define YYSTYPE_IS_TRIVIAL 1 -#define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -174,10 +175,14 @@ struct YYLTYPE int last_line; int last_column; }; -#define YYLTYPE_IS_DECLARED 1 -#define YYLTYPE_IS_TRIVIAL 1 +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 #endif -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); + + + +int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); + #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 332ff3ce..5085563c 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -725,7 +725,7 @@ expression_list: { $$ = new std::vector>; if (nullptr != $2) { - $1->set_name($2); + $1->set_alias($2); } $$->emplace_back($1); free($2); @@ -738,7 +738,7 @@ expression_list: $$ = new std::vector>; } if (nullptr != $2) { - $1->set_name($2); + $1->set_alias($2); } $$->emplace($$->begin(),std::move($1)); free($2); diff --git a/test/case/miniob_test.py b/test/case/miniob_test.py index 4b5783a5..95655754 100755 --- a/test/case/miniob_test.py +++ b/test/case/miniob_test.py @@ -51,6 +51,8 @@ python3 miniob_test.py --test-cases=primary-date python3 miniob_test.py --test-cases=primary-complex-sub-query python3 miniob_test.py --test-cases=primary-simple-sub-query +python3 miniob_test.py --test-cases=primary-group-by +python3 miniob_test.py --test-cases=primary-expression 如果要运行多个测试用例,则在 --test-cases 参数中使用 ',' 分隔写多个即可 """ From c1c649eced0f05f85787bd6d2cc70bae7b1a58e8 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 14 Oct 2024 18:30:13 +0800 Subject: [PATCH 229/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E6=9B=B4=E6=96=B0=EF=BC=8C=E5=B9=B6=E5=AF=B9=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=83=85=E5=86=B5=E8=BF=9B=E8=A1=8C=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 9 +- .../sql/executor/create_table_executor.cpp | 3 +- .../sql/executor/create_view_executor.cpp | 33 +---- src/observer/sql/expr/tuple.h | 4 + .../sql/operator/join_physical_operator.cpp | 11 +- .../sql/operator/update_physical_operator.cpp | 1 + src/observer/sql/parser/parse_defs.h | 9 +- src/observer/sql/stmt/delete_stmt.cpp | 13 ++ src/observer/sql/stmt/insert_stmt.cpp | 27 +++- src/observer/sql/stmt/update_stmt.cpp | 17 ++- src/observer/storage/db/db.cpp | 13 +- src/observer/storage/db/db.h | 5 +- src/observer/storage/field/field_meta.cpp | 39 ++++-- src/observer/storage/field/field_meta.h | 8 +- src/observer/storage/record/record.h | 2 +- src/observer/storage/table/base_table.h | 7 ++ src/observer/storage/table/table.cpp | 1 + src/observer/storage/table/table.h | 5 - src/observer/storage/table/table_meta.cpp | 6 +- src/observer/storage/table/view.cpp | 118 ++++++++++++++++-- src/observer/storage/table/view.h | 13 +- 21 files changed, 241 insertions(+), 103 deletions(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 390e031d..83a17560 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -87,7 +87,14 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(UNKNOWN_FUNCTION) \ DEFINE_RC(SUBQUERY_RETURNED_MULTIPLE_ROWS) \ DEFINE_RC(UNKNOWN_TABLE_TYPE) \ - DEFINE_RC(CREATE_INDEX_ON_NON_TABLE_TYPE) + DEFINE_RC(CREATE_INDEX_ON_NON_TABLE_TYPE) \ + DEFINE_RC(JOIN_VIEW_INSERT_ERROR) \ + DEFINE_RC(JOIN_VIEW_DELETE_ERROR) \ + DEFINE_RC(READ_ONLY_VIEW_INSERT_ERROR) \ + DEFINE_RC(READ_ONLY_VIEW_DELETE_ERROR) \ + DEFINE_RC(READ_ONLY_VIEW_UPDATE_ERROR) \ + DEFINE_RC(EXPRESSION_FIELD_NOT_INSERTABLE) \ + DEFINE_RC(EXPRESSION_FIELD_NOT_UPDATEABLE) enum class RC { diff --git a/src/observer/sql/executor/create_table_executor.cpp b/src/observer/sql/executor/create_table_executor.cpp index 3c56131a..2b6b17f0 100644 --- a/src/observer/sql/executor/create_table_executor.cpp +++ b/src/observer/sql/executor/create_table_executor.cpp @@ -55,6 +55,7 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) attr_info.length = expr->value_length(); attr_info.type = expr->value_type(); } + attr_info.mutable_ = true; attr_infos.push_back(attr_info); } } @@ -115,4 +116,4 @@ RC CreateTableExecutor::execute(SQLStageEvent *sql_event) } return rc; -} \ No newline at end of file +} diff --git a/src/observer/sql/executor/create_view_executor.cpp b/src/observer/sql/executor/create_view_executor.cpp index db895d5e..321bb421 100644 --- a/src/observer/sql/executor/create_view_executor.cpp +++ b/src/observer/sql/executor/create_view_executor.cpp @@ -40,38 +40,7 @@ RC CreateViewExecutor::execute(SQLStageEvent *sql_event) "create view executor can not run this command: %d", static_cast(stmt->type())); - std::vector attr_infos; - for (auto &query_expr : select_stmt->query_expressions()) { - AttrInfoSqlNode attr_info; - if (auto field_expr = dynamic_cast(query_expr.get())) { - auto field_meta = field_expr->field().meta(); - attr_info.type = field_meta->type(); - attr_info.name = field_meta->name(); - attr_info.length = field_meta->len(); - attr_info.nullable = field_meta->nullable(); - } else { - attr_info.type = query_expr->value_type(); - attr_info.name = query_expr->name(); - attr_info.length = query_expr->value_length(); - } - attr_infos.emplace_back(std::move(attr_info)); - } - - unique_ptr logical_oper = nullptr; - LogicalPlanGenerator::create(select_stmt, logical_oper); - if (!logical_oper) { - return RC::INTERNAL; - } - - unique_ptr physical_oper = nullptr; - PhysicalPlanGenerator::create(*logical_oper, physical_oper); - if (!physical_oper) { - return RC::INTERNAL; - } - - auto tables = select_stmt->tables(); - rc = session->get_current_db()->create_table( - table_name, attr_infos, tables, std::move(physical_oper), StorageFormat::ROW_FORMAT); + rc = session->get_current_db()->create_table(table_name, select_stmt, StorageFormat::ROW_FORMAT); if (OB_FAIL(rc)) { return rc; } diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index da0f8a1e..2988c83d 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -422,6 +422,10 @@ class JoinedTuple : public Tuple void set_left(Tuple *left) { left_ = left; } void set_right(Tuple *right) { right_ = right; } + std::vector> &left_base_rids() { return left_->base_rids(); } + + std::vector> &right_base_rids() { return right_->base_rids(); } + int cell_num() const override { return left_->cell_num() + right_->cell_num(); } RC cell_at(int index, Value &value) const override diff --git a/src/observer/sql/operator/join_physical_operator.cpp b/src/observer/sql/operator/join_physical_operator.cpp index 0de38730..bd5c90c8 100644 --- a/src/observer/sql/operator/join_physical_operator.cpp +++ b/src/observer/sql/operator/join_physical_operator.cpp @@ -82,7 +82,16 @@ RC NestedLoopJoinPhysicalOperator::close() return rc; } -Tuple *NestedLoopJoinPhysicalOperator::current_tuple() { return &joined_tuple_; } +Tuple *NestedLoopJoinPhysicalOperator::current_tuple() +{ + // 拷贝 + auto left_base_rids = joined_tuple_.left_base_rids(); + auto right_base_rids = joined_tuple_.right_base_rids(); + left_base_rids.insert(left_base_rids.end(), right_base_rids.begin(), right_base_rids.end()); + joined_tuple_.set_base_rids(left_base_rids); + + return &joined_tuple_; +} RC NestedLoopJoinPhysicalOperator::left_next() { diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index d8a6f055..75bc0ccd 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -38,6 +38,7 @@ RC UpdatePhysicalOperator::open(Trx *trx) RowTuple *row_tuple = static_cast(tuple); Record &record = row_tuple->record(); + record.set_base_rids(tuple->base_rids()); records_.emplace_back(std::move(record)); } diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 413058b2..faa3ad56 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -193,10 +193,11 @@ struct UpdateSqlNode */ struct AttrInfoSqlNode { - AttrType type; ///< Type of attribute - std::string name; ///< Attribute name - size_t length; ///< Length of attribute - bool nullable; ///< 字段是否可以为空 + AttrType type; ///< Type of attribute + std::string name; ///< Attribute name + size_t length; ///< Length of attribute + bool nullable; ///< 字段是否可以为空 + bool mutable_ = true; ///< 视图字段是否是可插入修改的 }; /** diff --git a/src/observer/sql/stmt/delete_stmt.cpp b/src/observer/sql/stmt/delete_stmt.cpp index 69617a0c..120c3b50 100644 --- a/src/observer/sql/stmt/delete_stmt.cpp +++ b/src/observer/sql/stmt/delete_stmt.cpp @@ -17,6 +17,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/stmt/filter_stmt.h" #include "storage/db/db.h" #include "storage/table/table.h" +#include "storage/table/view.h" DeleteStmt::DeleteStmt(BaseTable *table, FilterStmt *filter_stmt) : table_(table), filter_stmt_(filter_stmt) {} @@ -43,6 +44,18 @@ RC DeleteStmt::create(Db *db, DeleteSqlNode &delete_sql, Stmt *&stmt) return RC::SCHEMA_TABLE_NOT_EXIST; } + if (table->type() == TableType::View) { + if (!table->is_mutable()) { + LOG_ERROR("The target table %s of the DELETE is not updatable", table->name()); + return RC::READ_ONLY_VIEW_DELETE_ERROR; + } + auto view = dynamic_cast(table); + if (view->has_join()) { + LOG_ERROR("Can not delete from join view '%s.%s' without fields list", db->name(), table->name()); + return RC::JOIN_VIEW_DELETE_ERROR; + } + } + std::unordered_map table_map; table_map.insert(std::pair(std::string(table_name), table)); diff --git a/src/observer/sql/stmt/insert_stmt.cpp b/src/observer/sql/stmt/insert_stmt.cpp index 346d1eb6..69d23b13 100644 --- a/src/observer/sql/stmt/insert_stmt.cpp +++ b/src/observer/sql/stmt/insert_stmt.cpp @@ -16,6 +16,7 @@ See the Mulan PSL v2 for more details. */ #include "common/log/log.h" #include "storage/db/db.h" #include "storage/table/table.h" +#include "storage/table/view.h" InsertStmt::InsertStmt(BaseTable *table, const std::vector> &values_list) : table_(table), values_list_(values_list) @@ -37,9 +38,31 @@ RC InsertStmt::create(Db *db, const InsertSqlNode &inserts, Stmt *&stmt) return RC::SCHEMA_TABLE_NOT_EXIST; } + if (table->type() == TableType::View) { + if (!table->is_mutable()) { + LOG_ERROR("The target table %s of the INSERT is not insertable-into", table->name()); + return RC::READ_ONLY_VIEW_INSERT_ERROR; + } + auto view = dynamic_cast(table); + if (view->has_join()) { + LOG_ERROR("Can not insert into join view '%s.%s' without fields list", db->name(), table->name()); + return RC::JOIN_VIEW_INSERT_ERROR; + } + } + + // check the fields are mutable + // 有表达式的列整个表都不能插入,但是可以删除更新非表达式列 + const TableMeta &table_meta = table->table_meta(); + auto field_metas = table_meta.field_metas(); + for (auto &field_meta : *field_metas) { + if (!field_meta.is_mutable()) { + LOG_ERROR("Column '%s' is not insertable", field_meta.name()); + return RC::EXPRESSION_FIELD_NOT_INSERTABLE; + } + } + // check the fields number - const TableMeta &table_meta = table->table_meta(); - const int field_num = table_meta.field_num() - table_meta.sys_field_num(); + const int field_num = table_meta.field_num() - table_meta.sys_field_num(); for (auto &value_list : inserts.values_list) { const int value_num = static_cast(value_list.size()); if (field_num != value_num) { diff --git a/src/observer/sql/stmt/update_stmt.cpp b/src/observer/sql/stmt/update_stmt.cpp index 29c9b8ce..ed0a2319 100644 --- a/src/observer/sql/stmt/update_stmt.cpp +++ b/src/observer/sql/stmt/update_stmt.cpp @@ -12,13 +12,12 @@ See the Mulan PSL v2 for more details. */ // Created by Wangyunlai on 2022/5/22. // -#include "sql/stmt/update_stmt.h" -#include "sql/stmt/filter_stmt.h" - #include #include -#include +#include "sql/stmt/update_stmt.h" +#include "sql/stmt/filter_stmt.h" +#include "storage/table/view.h" UpdateStmt::UpdateStmt(BaseTable *table, std::vector field_metas, std::vector> values, FilterStmt *filter_stmt) @@ -51,6 +50,11 @@ RC UpdateStmt::create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt) return RC::SCHEMA_TABLE_NOT_EXIST; } + if (table->type() == TableType::View && !table->is_mutable()) { + LOG_ERROR("The target table %s of the UPDATE is not updatable", table->name()); + return RC::READ_ONLY_VIEW_UPDATE_ERROR; + } + auto table_meta = table->table_meta(); std::vector field_metas; std::vector> values; @@ -65,6 +69,11 @@ RC UpdateStmt::create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt) return RC::SCHEMA_FIELD_NOT_EXIST; } + if (!field_meta->is_mutable()) { + LOG_ERROR("Column '%s' is not updateable", field_meta->name()); + return RC::EXPRESSION_FIELD_NOT_UPDATEABLE; + } + // check whether the value is valid std::unordered_map table_map; table_map.insert(std::pair(std::string(table_name), table)); diff --git a/src/observer/storage/db/db.cpp b/src/observer/storage/db/db.cpp index 83d00f82..4f15748c 100644 --- a/src/observer/storage/db/db.cpp +++ b/src/observer/storage/db/db.cpp @@ -163,8 +163,7 @@ RC Db::create_table(const char *table_name, span attribut return RC::SUCCESS; } -RC Db::create_table(const char *table_name, span attributes, std::vector tables, - unique_ptr select_oper, const StorageFormat storage_format) +RC Db::create_table(const char *table_name, SelectStmt *select_stmt, const StorageFormat storage_format) { RC rc = RC::SUCCESS; // check table_name @@ -177,15 +176,7 @@ RC Db::create_table(const char *table_name, span attribut string table_file_path = table_meta_file(path_.c_str(), table_name); View *table = new View; int32_t table_id = next_table_id_++; - rc = table->create(this, - table_id, - table_file_path.c_str(), - table_name, - path_.c_str(), - attributes, - std::move(tables), - std::move(select_oper), - storage_format); + rc = table->create(this, table_id, table_file_path.c_str(), table_name, path_.c_str(), select_stmt, storage_format); if (rc != RC::SUCCESS) { LOG_ERROR("Failed to create table %s.", table_name); delete table; diff --git a/src/observer/storage/db/db.h b/src/observer/storage/db/db.h index 30970a87..a318f1f3 100644 --- a/src/observer/storage/db/db.h +++ b/src/observer/storage/db/db.h @@ -25,12 +25,12 @@ See the Mulan PSL v2 for more details. */ #include "storage/clog/disk_log_handler.h" #include "storage/buffer/double_write_buffer.h" #include "storage/table/base_table.h" -#include "sql/operator/physical_operator.h" class Table; class LogHandler; class BufferPoolManager; class TrxKit; +class SelectStmt; /** * @brief 一个DB实例负责管理一批表 @@ -68,8 +68,7 @@ class Db RC create_table(const char *table_name, span attributes, StorageFormat storage_format = StorageFormat::ROW_FORMAT); - RC create_table(const char *table_name, span attributes, std::vector tables, - unique_ptr select_oper, StorageFormat storage_format); + RC create_table(const char *table_name, SelectStmt *select_stmt, StorageFormat storage_format); RC drop_table(const char *table_name); diff --git a/src/observer/storage/field/field_meta.cpp b/src/observer/storage/field/field_meta.cpp index 59a52a5d..0f85b62d 100644 --- a/src/observer/storage/field/field_meta.cpp +++ b/src/observer/storage/field/field_meta.cpp @@ -26,19 +26,20 @@ const static Json::StaticString FIELD_LEN("len"); const static Json::StaticString FIELD_VISIBLE("visible"); const static Json::StaticString FIELD_FIELD_ID("FIELD_id"); const static Json::StaticString FIELD_NULLABLE("nullable"); +const static Json::StaticString FIELD_MUTABLE("mutable"); FieldMeta::FieldMeta() : attr_type_(AttrType::UNDEFINED), attr_offset_(-1), attr_len_(0), visible_(false), field_id_(0) {} -FieldMeta::FieldMeta( - const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable) +FieldMeta::FieldMeta(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, + bool nullable, bool is_mutable) { - [[maybe_unused]] RC rc = this->init(name, attr_type, attr_offset, attr_len, visible, field_id, nullable); + [[maybe_unused]] RC rc = this->init(name, attr_type, attr_offset, attr_len, visible, field_id, nullable, is_mutable); ASSERT(rc == RC::SUCCESS, "failed to init field meta. rc=%s", strrc(rc)); } -RC FieldMeta::init( - const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, bool nullable) +RC FieldMeta::init(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, + bool nullable, bool is_mutable) { if (common::is_blank(name)) { LOG_WARN("Name cannot be empty"); @@ -58,6 +59,7 @@ RC FieldMeta::init( visible_ = visible; field_id_ = field_id; nullable_ = nullable; + mutable_ = is_mutable; LOG_INFO("Init a field with name=%s", name); return RC::SUCCESS; @@ -77,10 +79,13 @@ int FieldMeta::field_id() const { return field_id_; } bool FieldMeta::nullable() const { return nullable_; } +bool FieldMeta::is_mutable() const { return mutable_; } + void FieldMeta::desc(std::ostream &os) const { os << "field name=" << name_ << ", type=" << attr_type_to_string(attr_type_) << ", len=" << attr_len_ - << ", visible=" << (visible_ ? "yes" : "no") << ", nullable=" << (nullable_ ? "yes" : "no"); + << ", visible=" << (visible_ ? "yes" : "no") << ", nullable=" << (nullable_ ? "yes" : "no") + << ", mutable=" << (mutable_ ? "yes" : "no"); } void FieldMeta::to_json(Json::Value &json_value) const @@ -92,6 +97,7 @@ void FieldMeta::to_json(Json::Value &json_value) const json_value[FIELD_VISIBLE] = visible_; json_value[FIELD_FIELD_ID] = field_id_; json_value[FIELD_NULLABLE] = nullable_; + json_value[FIELD_MUTABLE] = mutable_; } RC FieldMeta::from_json(const Json::Value &json_value, FieldMeta &field) @@ -108,6 +114,7 @@ RC FieldMeta::from_json(const Json::Value &json_value, FieldMeta &field) const Json::Value &visible_value = json_value[FIELD_VISIBLE]; const Json::Value &field_id_value = json_value[FIELD_FIELD_ID]; const Json::Value &nullable_value = json_value[FIELD_NULLABLE]; + const Json::Value &mutable_value = json_value[FIELD_MUTABLE]; if (!name_value.isString()) { LOG_ERROR("Field name is not a string. json value=%s", name_value.toStyledString().c_str()); @@ -140,17 +147,23 @@ RC FieldMeta::from_json(const Json::Value &json_value, FieldMeta &field) return RC::INTERNAL; } + if (!mutable_value.isBool()) { + LOG_ERROR("Mutable id is not a bool value. json value=%s", mutable_value.toStyledString().c_str()); + return RC::INTERNAL; + } + AttrType type = attr_type_from_string(type_value.asCString()); if (AttrType::UNDEFINED == type) { LOG_ERROR("Got invalid field type. type=%d", type); return RC::INTERNAL; } - const char *name = name_value.asCString(); - int offset = offset_value.asInt(); - int len = len_value.asInt(); - bool visible = visible_value.asBool(); - int field_id = field_id_value.asInt(); - int nullable = nullable_value.asBool(); - return field.init(name, type, offset, len, visible, field_id, nullable); + const char *name = name_value.asCString(); + int offset = offset_value.asInt(); + int len = len_value.asInt(); + bool visible = visible_value.asBool(); + int field_id = field_id_value.asInt(); + bool nullable = nullable_value.asBool(); + bool is_mutable = mutable_value.asBool(); + return field.init(name, type, offset, len, visible, field_id, nullable, is_mutable); } diff --git a/src/observer/storage/field/field_meta.h b/src/observer/storage/field/field_meta.h index 155f1bcb..8ccb6a74 100644 --- a/src/observer/storage/field/field_meta.h +++ b/src/observer/storage/field/field_meta.h @@ -33,12 +33,12 @@ class FieldMeta // 除非字段定义为 not null,否则默认是 nullable 的 FieldMeta(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, - bool nullable = true); + bool nullable = true, bool mutable_ = true); ~FieldMeta() = default; RC init(const char *name, AttrType attr_type, int attr_offset, int attr_len, bool visible, int field_id, - bool nullable = true); + bool nullable = true, bool mutable_ = true); public: const char *name() const; @@ -48,6 +48,7 @@ class FieldMeta bool visible() const; int field_id() const; bool nullable() const; + bool is_mutable() const; public: void desc(ostream &os) const; @@ -63,5 +64,6 @@ class FieldMeta int attr_len_; bool visible_; int field_id_; - bool nullable_; + bool nullable_ = true; + bool mutable_ = true; // 如果是视图的表达式字段,实际上是不可插入或更新的 }; diff --git a/src/observer/storage/record/record.h b/src/observer/storage/record/record.h index 461f6534..705bfeef 100644 --- a/src/observer/storage/record/record.h +++ b/src/observer/storage/record/record.h @@ -257,7 +257,7 @@ class Record return RC::SUCCESS; } - RC get_field(const FieldMeta &field_meta, Value &value) + RC get_field(const FieldMeta &field_meta, Value &value) const { int field_offset = field_meta.offset(); int data_len = field_meta.len() - field_meta.nullable(); diff --git a/src/observer/storage/table/base_table.h b/src/observer/storage/table/base_table.h index 672b42a8..17e40cb6 100644 --- a/src/observer/storage/table/base_table.h +++ b/src/observer/storage/table/base_table.h @@ -18,6 +18,8 @@ #include "storage/table/table_meta.h" #include "storage/buffer/disk_buffer_pool.h" +class Db; + enum class TableType { Unknown, @@ -144,7 +146,12 @@ class BaseTable virtual RC sync() = 0; + bool is_mutable() const { return mutable_; } + protected: + Db *db_ = nullptr; + string base_dir_; + bool mutable_ = true; // 当前仅对视图可用,是否是只读视图,即包括聚合函数或 groupby having 语句 TableType type_ = TableType::Unknown; TableMeta table_meta_ = TableMeta(); DiskBufferPool *data_buffer_pool_ = nullptr; /// 数据文件关联的buffer pool diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 56ad3630..b5bb0d19 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -32,6 +32,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/record/record_manager.h" #include "storage/table/table.h" #include "storage/trx/trx.h" +#include "storage/db/db.h" Table::~Table() { diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index c942976f..63cec481 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -15,10 +15,8 @@ See the Mulan PSL v2 for more details. */ #pragma once #include "storage/table/base_table.h" -#include "storage/table/table_meta.h" #include "common/types.h" #include "common/lang/span.h" -#include "common/lang/functional.h" struct RID; class Record; @@ -32,7 +30,6 @@ class Index; class IndexScanner; class RecordDeleter; class Trx; -class Db; /** * @brief 表 @@ -115,8 +112,6 @@ class Table : public BaseTable Index *find_index_by_field(const char *field_name) const; private: - Db *db_ = nullptr; - string base_dir_; RecordFileHandler *record_handler_ = nullptr; /// 记录操作 vector indexes_; }; diff --git a/src/observer/storage/table/table_meta.cpp b/src/observer/storage/table/table_meta.cpp index a7fad473..cf653e2d 100644 --- a/src/observer/storage/table/table_meta.cpp +++ b/src/observer/storage/table/table_meta.cpp @@ -73,7 +73,8 @@ RC TableMeta::init(int32_t table_id, const char *name, const std::vector attributes, std::vector tables, - std::unique_ptr select_oper, StorageFormat storage_format) + SelectStmt *select_stmt, StorageFormat storage_format) { if (table_id < 0) { LOG_WARN("invalid table id. table_id=%d, table_name=%s", table_id, name); @@ -29,12 +32,59 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co } LOG_INFO("Begin to create table %s:%s", base_dir, name); - if (attributes.empty()) { - LOG_WARN("Invalid arguments. table_name=%s, attribute_count=%d", name, attributes.size()); + RC rc = RC::SUCCESS; + + auto &query_exprs = select_stmt->query_expressions(); + std::vector attr_infos(query_exprs.size()); + for (int i = 0; i < select_stmt->query_expressions_size(); ++i) { + auto &query_expr = query_exprs[i]; + AttrInfoSqlNode attr_info; + if (query_expr->type() == ExprType::FIELD) { + auto field_expr = dynamic_cast(query_expr.get()); + auto field_meta = field_expr->field().meta(); + attr_info.type = field_meta->type(); + attr_info.name = field_meta->name(); + attr_info.length = field_meta->len(); + attr_info.nullable = field_meta->nullable(); + attr_info.mutable_ = field_meta->is_mutable(); + } else { + if (query_expr->type() == ExprType::AGGREGATION) { + mutable_ = false; // 包含聚合函数的是只读视图 + } + attr_info.type = query_expr->value_type(); + attr_info.name = query_expr->name(); + // 简单处理,非 field 表达式都是可为空的 + attr_info.length = query_expr->value_length() + 1; + attr_info.nullable = true; + attr_info.mutable_ = false; + } + attr_infos[i] = std::move(attr_info); + } + + if (attr_infos.empty()) { + LOG_WARN("Invalid arguments. table_name=%s, attribute_count=%d", name, attr_infos.size()); return RC::INVALID_ARGUMENT; } - RC rc = RC::SUCCESS; + // 包含 groupby 和 having 的是只读视图 + if (!select_stmt->group_by().empty() || select_stmt->having_filter_stmt()) { + mutable_ = false; + } + + unique_ptr logical_oper = nullptr; + LogicalPlanGenerator::create(select_stmt, logical_oper); + if (!logical_oper) { + return RC::INTERNAL; + } + + unique_ptr physical_oper = nullptr; + PhysicalPlanGenerator::create(*logical_oper, physical_oper); + if (!physical_oper) { + return RC::INTERNAL; + } + + // 查询物理算子 + select_oper_ = std::move(physical_oper); // 使用 table_name.table 记录一个表的元数据 // 判断表文件是否已经存在 @@ -52,7 +102,7 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co // 创建文件 const vector *trx_fields = db->trx_kit().trx_fields(); - if ((rc = table_meta_.init(table_id, name, trx_fields, attributes, storage_format)) != RC::SUCCESS) { + if ((rc = table_meta_.init(table_id, name, trx_fields, attr_infos, storage_format)) != RC::SUCCESS) { LOG_ERROR("Failed to init table meta. name:%s, ret:%d", name, rc); return rc; // delete table file } @@ -72,16 +122,21 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co db_ = db; base_dir_ = base_dir; - tables_ = std::move(tables); + auto tables = select_stmt->tables(); + tables_ = std::move(tables); - // 查询物理算子 - select_oper_ = std::move(select_oper); // 视图类型 type_ = TableType::View; + // 建立视图字段到基表字段的索引 auto field_metas = *table_meta_.field_metas(); field_index_.resize(field_metas.size()); for (int i = 0; i < field_metas.size(); ++i) { + // 表达式列不能映射到基表字段 + if (!field_metas[i].is_mutable()) { + field_index_[i] = {nullptr, -1}; + continue; + } auto &view_field_meta = field_metas[i]; bool find = false; for (auto &table : tables_) { @@ -162,9 +217,50 @@ RC View::delete_record(const Record &record) return rc; } -RC View::delete_record(const RID &rid) { return RC::SUCCESS; } +RC View::delete_record(const RID &rid) { return RC::UNIMPLEMENTED; } -RC View::update_record(const Record &old_record, const Record &new_record) { return RC::SUCCESS; } +RC View::update_record(const Record &old_record, const Record &new_record) +{ + // join 视图支持 update 可能会更新多个表 + RC rc = RC::SUCCESS; + + for (auto &[table, rid] : old_record.base_rids()) { + // 得到基表的记录 + Record base_old_record; + rc = table->get_record(rid, base_old_record); + if (OB_FAIL(rc)) { + return rc; + } + + // 将视图的修改记录映射到基表的记录 + Record base_new_record = base_old_record; + auto &field_metas = *table_meta_.field_metas(); + for (int i = 0; i < field_metas.size(); ++i) { + auto &field_meta = field_metas[i]; + if (field_meta.is_mutable()) { + auto &[base_table, idx] = field_index_[i]; + // 是当前表的字段 + if (strcmp(base_table->name(), table->name()) == 0) { + // 取出视图中的值存入待更新的基表记录 + Value value; + rc = new_record.get_field(field_meta, value); + if (OB_FAIL(rc)) { + return rc; + } + auto base_field_meta = base_table->table_meta().field(idx); + rc = base_new_record.set_field(base_field_meta->offset(), base_field_meta->len(), value); + if (OB_FAIL(rc)) { + return rc; + } + } + } + } + + table->update_record(base_old_record, base_new_record); + } + + return rc; +} RC View::get_record(const RID &rid, Record &record) { return RC::SUCCESS; } diff --git a/src/observer/storage/table/view.h b/src/observer/storage/table/view.h index da364b90..49b069d7 100644 --- a/src/observer/storage/table/view.h +++ b/src/observer/storage/table/view.h @@ -12,7 +12,6 @@ #pragma once -#include "storage/db/db.h" #include "storage/table/base_table.h" #include "sql/operator/physical_operator.h" @@ -29,9 +28,8 @@ class View : public BaseTable * @param base_dir 表数据存放的路径 * @param attributes 字段 */ - RC create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, - span attributes, std::vector tables, - std::unique_ptr select_oper, StorageFormat storage_format); + RC create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, SelectStmt *select_stmt, + StorageFormat storage_format); RC drop() override; @@ -44,16 +42,13 @@ class View : public BaseTable RC sync() override; - bool is_mutable() const { return mutable_; } - std::unique_ptr &select_oper() { return select_oper_; } + bool has_join() { return tables_.size() > 1; } + private: - Db *db_ = nullptr; - string base_dir_; // 视图的 field 对应 哪个物理表和对应的 field idx std::vector> field_index_; std::vector tables_; std::unique_ptr select_oper_; // 存储了 select 的物理算子 - bool mutable_; // 是否是只读视图 }; From 25292819d0ab0dca5bda8cc28fa9c6b71e77f9e2 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 14 Oct 2024 19:20:46 +0800 Subject: [PATCH 230/308] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20#pragma=20o?= =?UTF-8?q?nce=20in=20vector=5Ftype.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/vector_type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index 96ed32d8..29783bb4 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -1,5 +1,5 @@ // // Created by root on 24-10-14. // -#pragma once + #include "common/type/vector_type.h" \ No newline at end of file From 32837c72dbf77ae892f6646abe1d31553d7b72da Mon Sep 17 00:00:00 2001 From: root <503194395@qq.com> Date: Mon, 14 Oct 2024 12:33:11 +0000 Subject: [PATCH 231/308] =?UTF-8?q?vector=E7=9A=84=E5=BB=BA=E8=A1=A8?= =?UTF-8?q?=E5=92=8Calias=E5=A4=9A=E9=A1=B9=E8=A1=A8=E8=BE=BE=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.cpp | 2 +- src/observer/common/type/attr_type.h | 2 +- src/observer/common/type/char_type.cpp | 3 + src/observer/common/type/vector_type.cpp | 15 +- src/observer/common/utils.cpp | 27 + src/observer/sql/parser/expression_binder.cpp | 4 +- src/observer/sql/parser/lex_sql.cpp | 556 ++++---- src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/lex_sql.l | 5 +- src/observer/sql/parser/yacc_sql.cpp | 1270 +++++++++-------- src/observer/sql/parser/yacc_sql.hpp | 77 +- src/observer/sql/parser/yacc_sql.y | 26 +- 12 files changed, 1032 insertions(+), 957 deletions(-) diff --git a/src/observer/common/type/attr_type.cpp b/src/observer/common/type/attr_type.cpp index 2dd8c94d..d5f53988 100644 --- a/src/observer/common/type/attr_type.cpp +++ b/src/observer/common/type/attr_type.cpp @@ -11,7 +11,7 @@ See the Mulan PSL v2 for more details. */ #include "common/lang/string.h" #include "common/type/attr_type.h" -const char *ATTR_TYPE_NAME[] = {"undefined", "chars", "ints", "floats", "booleans", "dates", "nulls", "texts"}; +const char *ATTR_TYPE_NAME[] = {"undefined", "chars", "ints", "floats", "booleans", "dates", "nulls", "texts","vector"}; const char *attr_type_to_string(AttrType type) { diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index c77202c1..de26253f 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -24,8 +24,8 @@ enum class AttrType DATES, ///< 日期类型(4字节) NULLS, ///< 空字段 TEXTS, ///< text 超长字段(4096字节) - LIST, ///< 列表 VECTOR, ///< 向量 + LIST, ///< 列表 MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index fb39d0c0..cc96f7bb 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -78,6 +78,9 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ } result.set_float(float_val); } break; + case AttrType::VECTOR: { + std::vector vectorData; + }break; default: return RC::UNIMPLEMENTED; } return RC::SUCCESS; diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index 96ed32d8..1af658ea 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -1,5 +1,16 @@ // // Created by root on 24-10-14. // -#pragma once -#include "common/type/vector_type.h" \ No newline at end of file + +#include "common/type/vector_type.h" +int VectorType::compare(const Value &left, const Value &right) const { return DataType::compare(left, right); } +RC VectorType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const +{ + return DataType::cast_to(val, type, result, allow_type_promotion); +} +RC VectorType::set_value_from_str(Value &val, const string &data) const +{ + return DataType::set_value_from_str(val, data); +} +int VectorType::cast_cost(AttrType type) { return DataType::cast_cost(type); } +RC VectorType::to_string(const Value &val, string &result) const { return DataType::to_string(val, result); } \ No newline at end of file diff --git a/src/observer/common/utils.cpp b/src/observer/common/utils.cpp index 85b81ea0..f63d03cf 100644 --- a/src/observer/common/utils.cpp +++ b/src/observer/common/utils.cpp @@ -52,3 +52,30 @@ RC parse_float_prefix(const char *str, float &result) result = static_cast(float_val); return RC::SUCCESS; } + +// RC parse_vector_from_string(const char *str, std::vector &vectorData) { +// if (!str || *str != '[') { +// return RC::INVALID_ARGUMENT; +// } +// +// std::string s = str; +// // 去掉开头和结尾的方括号 +// if (s.back() != ']') { +// return RC::INVALID_ARGUMENT; +// } +// s = s.substr(1, s.size() - 2); +// +// std::stringstream ss(s); +// std::string token; +// float value; +// +// while (std::getline(ss, token, ',')) { +// std::stringstream valueStream(token); +// if (!(valueStream >> value)) { +// return RC::PARSE_ERROR; +// } +// vectorData.push_back(value); +// } +// +// return RC::SUCCESS; +// } \ No newline at end of file diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 91af08e9..3f6800cb 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -371,7 +371,9 @@ RC ExpressionBinder::bind_arithmetic_expression( LOG_WARN("invalid left children number of comparison expression: %d", child_bound_expressions.size()); return RC::INVALID_ARGUMENT; } - + if (!is_blank(expr->alias())) { + expr->set_name(expr->alias()); + } unique_ptr &left = child_bound_expressions[0]; if (left.get() != left_expr.get()) { left_expr = std::move(left); diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 6d19fb7a..9264be7c 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -385,8 +385,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 78 -#define YY_END_OF_BUFFER 79 +#define YY_NUM_RULES 79 +#define YY_END_OF_BUFFER 80 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -394,33 +394,34 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[227] = +static const flex_int16_t yy_accept[232] = { 0, - 0, 0, 0, 0, 79, 77, 1, 2, 77, 77, - 77, 57, 58, 73, 71, 59, 72, 6, 74, 3, - 5, 64, 60, 66, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 78, 63, 0, 75, 0, 76, - 0, 3, 61, 62, 65, 70, 70, 70, 49, 70, - 48, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 51, 68, 70, 70, 70, - 70, 70, 15, 23, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 4, 22, 50, 70, 70, - - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 33, - 70, 70, 70, 67, 70, 70, 70, 70, 29, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 19, - 34, 70, 70, 42, 36, 70, 9, 11, 70, 7, - 70, 70, 70, 20, 70, 70, 8, 70, 70, 70, - 70, 25, 56, 69, 41, 39, 70, 70, 70, 16, - 70, 17, 70, 37, 70, 70, 70, 70, 30, 70, - 70, 70, 70, 70, 35, 70, 45, 70, 14, 70, - 55, 70, 70, 47, 70, 70, 70, 12, 70, 70, - - 70, 21, 31, 10, 27, 52, 70, 54, 46, 43, - 24, 70, 70, 18, 70, 13, 38, 28, 26, 44, - 70, 70, 53, 40, 32, 0 + 0, 0, 0, 0, 80, 78, 1, 2, 78, 78, + 78, 58, 59, 74, 72, 60, 73, 6, 75, 3, + 5, 65, 61, 67, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 79, 64, 0, 76, 0, 77, + 0, 3, 62, 63, 66, 71, 71, 71, 50, 71, + 49, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 52, 69, 71, 71, 71, + 71, 71, 15, 23, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 4, 22, 51, 71, + + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 33, 71, 71, 71, 68, 71, 71, 71, 71, 29, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 19, 34, 71, 71, 43, 36, 71, 9, 11, + 71, 7, 71, 71, 71, 20, 71, 71, 8, 71, + 71, 71, 71, 25, 57, 70, 42, 40, 71, 71, + 71, 16, 71, 17, 71, 37, 71, 71, 71, 71, + 71, 30, 71, 71, 71, 71, 71, 35, 71, 46, + 71, 14, 71, 56, 71, 71, 48, 71, 71, 71, + + 12, 71, 71, 71, 71, 21, 31, 10, 27, 53, + 71, 55, 47, 44, 24, 71, 71, 18, 71, 13, + 39, 28, 26, 38, 45, 71, 71, 54, 41, 32, + 0 } ; static const YY_CHAR yy_ec[256] = @@ -466,67 +467,67 @@ static const YY_CHAR yy_meta[71] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } ; -static const flex_int16_t yy_base[232] = +static const flex_int16_t yy_base[237] = { 0, - 0, 0, 0, 0, 615, 616, 616, 616, 596, 608, - 606, 616, 616, 616, 616, 616, 616, 616, 616, 58, - 616, 56, 616, 593, 57, 61, 62, 63, 64, 83, - 65, 73, 91, 76, 595, 117, 119, 115, 103, 142, - 134, 129, 66, 112, 616, 616, 604, 616, 602, 616, - 592, 79, 616, 616, 616, 0, 591, 145, 160, 141, - 590, 158, 176, 155, 182, 161, 183, 168, 188, 184, - 190, 186, 195, 189, 194, 242, 589, 196, 204, 216, - 220, 230, 588, 243, 233, 237, 239, 248, 255, 222, - 257, 256, 263, 264, 259, 587, 586, 585, 283, 274, - - 282, 288, 298, 308, 300, 312, 290, 301, 302, 315, - 316, 321, 289, 328, 327, 323, 342, 348, 352, 334, - 354, 356, 360, 584, 362, 366, 369, 371, 583, 349, - 370, 377, 374, 388, 382, 395, 389, 386, 397, 582, - 581, 396, 393, 580, 572, 399, 571, 569, 407, 567, - 419, 413, 420, 566, 422, 421, 565, 405, 428, 430, - 432, 564, 561, 560, 557, 448, 436, 455, 460, 556, - 464, 555, 447, 553, 446, 462, 466, 472, 552, 474, - 476, 483, 473, 477, 550, 489, 548, 326, 546, 491, - 541, 499, 488, 531, 503, 504, 506, 502, 505, 510, - - 509, 530, 445, 427, 262, 226, 515, 224, 223, 218, - 202, 521, 529, 157, 535, 146, 132, 127, 126, 123, - 538, 527, 120, 89, 88, 616, 588, 590, 592, 99, - 82 + 0, 0, 0, 0, 630, 631, 631, 631, 611, 623, + 621, 631, 631, 631, 631, 631, 631, 631, 631, 58, + 631, 56, 631, 608, 57, 61, 62, 63, 64, 83, + 65, 73, 91, 76, 610, 117, 119, 115, 103, 142, + 134, 129, 141, 120, 631, 631, 619, 631, 617, 631, + 607, 71, 631, 631, 631, 0, 606, 89, 79, 157, + 605, 145, 155, 167, 174, 178, 182, 181, 188, 185, + 189, 193, 195, 127, 190, 241, 604, 203, 207, 213, + 196, 219, 603, 191, 229, 236, 239, 243, 250, 215, + 253, 254, 255, 256, 266, 270, 602, 601, 600, 269, + + 276, 274, 280, 287, 295, 301, 306, 311, 314, 303, + 312, 315, 316, 302, 321, 320, 335, 328, 342, 346, + 329, 347, 352, 354, 599, 356, 369, 368, 371, 598, + 349, 373, 375, 383, 379, 386, 385, 389, 393, 396, + 394, 589, 588, 392, 400, 587, 585, 411, 584, 583, + 413, 582, 415, 423, 422, 581, 419, 430, 579, 426, + 436, 434, 442, 578, 577, 576, 575, 455, 445, 451, + 459, 573, 470, 567, 449, 563, 462, 471, 468, 469, + 472, 562, 476, 485, 489, 479, 491, 558, 499, 557, + 497, 556, 496, 552, 509, 506, 539, 510, 511, 516, + + 517, 536, 537, 519, 522, 529, 518, 441, 432, 428, + 525, 409, 401, 397, 350, 532, 547, 325, 551, 324, + 257, 233, 223, 217, 152, 555, 550, 126, 124, 88, + 631, 606, 608, 610, 90, 79 } ; -static const flex_int16_t yy_def[232] = +static const flex_int16_t yy_def[237] = { 0, - 226, 1, 227, 227, 226, 226, 226, 226, 226, 228, - 229, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 226, 226, 228, 226, 229, 226, - 226, 226, 226, 226, 226, 231, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 226, 230, 230, 230, 230, - - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 0, 226, 226, 226, 226, - 226 + 231, 1, 232, 232, 231, 231, 231, 231, 231, 233, + 234, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 231, 231, 233, 231, 234, 231, + 231, 231, 231, 231, 231, 236, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 231, 235, 235, 235, + + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 0, 231, 231, 231, 231, 231 } ; -static const flex_int16_t yy_nxt[687] = +static const flex_int16_t yy_nxt[702] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -536,76 +537,79 @@ static const flex_int16_t yy_nxt[687] = 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, 51, 56, 52, 53, 54, 56, 56, 56, 56, 56, - 56, 62, 66, 56, 60, 94, 67, 56, 63, 58, - 56, 51, 74, 52, 59, 64, 75, 56, 65, 68, - - 57, 73, 56, 56, 61, 56, 69, 62, 66, 78, - 60, 94, 67, 70, 63, 58, 71, 56, 74, 72, - 59, 64, 75, 76, 65, 68, 56, 73, 77, 56, - 61, 56, 69, 56, 56, 78, 85, 56, 95, 70, - 56, 56, 71, 56, 79, 72, 56, 83, 56, 76, + 56, 62, 66, 51, 60, 52, 67, 56, 63, 58, + 56, 57, 74, 56, 59, 64, 75, 56, 65, 68, + + 99, 73, 56, 56, 61, 56, 69, 62, 66, 78, + 60, 98, 67, 70, 63, 58, 71, 56, 74, 72, + 59, 64, 75, 76, 65, 68, 99, 73, 77, 56, + 61, 56, 69, 56, 56, 78, 85, 98, 56, 70, + 56, 56, 71, 56, 79, 72, 96, 83, 56, 76, 80, 84, 81, 90, 77, 56, 56, 91, 82, 56, - 56, 92, 85, 93, 95, 86, 99, 97, 87, 56, - 79, 56, 56, 83, 56, 56, 80, 84, 81, 90, - 88, 98, 56, 91, 82, 89, 102, 92, 100, 93, - 56, 86, 99, 97, 87, 101, 56, 56, 56, 104, - - 56, 107, 56, 56, 56, 103, 88, 98, 56, 56, - 56, 89, 102, 105, 100, 108, 56, 110, 56, 112, - 106, 101, 109, 121, 115, 104, 111, 107, 113, 114, - 56, 103, 56, 122, 56, 123, 56, 56, 56, 105, - 56, 108, 133, 110, 56, 112, 106, 56, 109, 121, - 115, 56, 111, 56, 113, 114, 56, 56, 124, 122, - 125, 123, 56, 127, 116, 126, 117, 128, 133, 56, - 56, 56, 130, 56, 118, 129, 56, 56, 56, 119, - 120, 131, 138, 135, 124, 136, 125, 132, 56, 127, - 116, 126, 117, 128, 137, 140, 56, 56, 130, 134, - - 118, 129, 56, 56, 56, 119, 120, 131, 138, 135, - 139, 136, 56, 132, 56, 56, 56, 143, 141, 142, - 137, 140, 56, 146, 148, 134, 56, 144, 155, 56, - 56, 145, 151, 147, 152, 56, 139, 56, 149, 150, - 56, 56, 56, 143, 141, 142, 158, 153, 56, 146, - 148, 209, 154, 144, 155, 156, 56, 145, 151, 147, - 152, 157, 56, 56, 149, 150, 56, 162, 56, 159, - 56, 160, 158, 153, 56, 161, 56, 209, 154, 164, - 56, 156, 165, 56, 56, 56, 163, 157, 56, 167, - 170, 56, 166, 162, 169, 159, 56, 160, 172, 168, - - 56, 161, 56, 56, 173, 164, 171, 56, 165, 56, - 56, 56, 163, 56, 176, 167, 170, 175, 166, 56, - 169, 56, 178, 180, 172, 168, 174, 56, 177, 179, - 173, 181, 171, 56, 56, 56, 56, 182, 184, 186, - 176, 56, 56, 175, 56, 183, 56, 189, 178, 180, - 56, 185, 174, 188, 177, 179, 187, 181, 190, 56, - 56, 56, 56, 182, 184, 186, 191, 193, 192, 56, - 198, 183, 194, 189, 56, 195, 56, 185, 56, 188, - 56, 196, 187, 197, 190, 199, 56, 56, 56, 201, - 56, 56, 191, 193, 192, 202, 198, 56, 194, 204, - - 200, 195, 56, 56, 207, 56, 205, 196, 212, 197, - 206, 199, 203, 56, 210, 201, 56, 56, 56, 56, - 56, 202, 213, 56, 56, 204, 200, 208, 217, 56, - 207, 215, 205, 218, 212, 56, 206, 211, 203, 216, - 210, 56, 214, 56, 56, 56, 219, 220, 213, 56, - 222, 221, 56, 208, 217, 56, 225, 215, 223, 218, - 56, 224, 56, 211, 56, 216, 56, 56, 214, 56, - 56, 56, 219, 220, 56, 56, 222, 221, 56, 56, - 56, 56, 225, 56, 223, 56, 56, 224, 45, 45, - 47, 47, 49, 49, 56, 56, 56, 56, 56, 56, - - 56, 96, 56, 56, 56, 56, 96, 50, 48, 56, - 55, 50, 48, 46, 226, 5, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226 + 94, 92, 85, 93, 95, 86, 56, 115, 87, 56, + 79, 56, 96, 83, 102, 101, 80, 84, 81, 90, + 88, 56, 100, 91, 82, 89, 94, 92, 56, 93, + 95, 86, 56, 115, 87, 56, 56, 104, 103, 56, + + 102, 101, 56, 56, 56, 56, 88, 56, 100, 56, + 56, 89, 106, 127, 108, 109, 105, 56, 111, 107, + 116, 56, 110, 104, 103, 112, 113, 56, 114, 56, + 122, 56, 124, 56, 125, 134, 123, 56, 106, 127, + 108, 109, 105, 56, 111, 107, 116, 56, 110, 126, + 56, 112, 113, 56, 114, 56, 122, 56, 124, 128, + 125, 134, 123, 117, 56, 118, 129, 56, 56, 56, + 56, 56, 131, 119, 130, 126, 132, 137, 120, 121, + 56, 136, 133, 56, 56, 128, 138, 139, 56, 117, + 56, 118, 129, 140, 56, 135, 141, 142, 131, 119, + + 130, 56, 132, 137, 120, 121, 145, 136, 133, 56, + 143, 144, 138, 139, 146, 56, 56, 56, 147, 140, + 56, 135, 141, 142, 148, 56, 56, 149, 56, 56, + 56, 154, 145, 153, 56, 56, 143, 144, 56, 56, + 146, 157, 56, 56, 147, 150, 155, 156, 158, 56, + 148, 151, 152, 149, 159, 161, 56, 154, 160, 153, + 56, 56, 164, 56, 56, 162, 56, 157, 56, 163, + 56, 150, 155, 156, 158, 166, 167, 151, 152, 165, + 159, 161, 56, 56, 160, 56, 168, 56, 164, 56, + 172, 162, 169, 56, 171, 163, 174, 56, 170, 56, + + 56, 166, 167, 56, 178, 165, 56, 56, 56, 173, + 56, 56, 168, 175, 56, 56, 172, 176, 169, 183, + 171, 177, 174, 56, 170, 56, 182, 56, 179, 56, + 178, 180, 181, 56, 187, 173, 56, 56, 184, 175, + 56, 189, 56, 176, 56, 183, 56, 177, 56, 185, + 56, 186, 182, 190, 179, 56, 56, 180, 181, 56, + 187, 188, 191, 56, 184, 56, 193, 189, 192, 56, + 194, 198, 201, 56, 196, 185, 56, 186, 195, 190, + 199, 197, 56, 56, 56, 56, 56, 188, 191, 200, + 56, 204, 193, 56, 192, 206, 194, 198, 201, 56, + + 196, 202, 205, 56, 195, 56, 199, 197, 208, 203, + 56, 56, 209, 56, 207, 200, 210, 204, 211, 214, + 56, 206, 213, 56, 56, 56, 216, 202, 205, 217, + 56, 56, 56, 56, 208, 203, 56, 212, 209, 56, + 207, 219, 210, 56, 211, 214, 56, 215, 213, 218, + 56, 56, 216, 56, 220, 217, 223, 225, 224, 221, + 222, 56, 226, 212, 56, 56, 56, 219, 227, 56, + 56, 56, 56, 215, 228, 218, 56, 56, 229, 230, + 220, 56, 223, 225, 224, 221, 222, 56, 226, 56, + 56, 56, 56, 56, 227, 56, 56, 56, 56, 56, + + 228, 56, 56, 56, 229, 230, 45, 45, 47, 47, + 49, 49, 56, 56, 56, 56, 97, 56, 56, 56, + 56, 97, 50, 48, 56, 55, 50, 48, 46, 231, + 5, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + + 231 } ; -static const flex_int16_t yy_chk[687] = +static const flex_int16_t yy_chk[702] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -615,73 +619,76 @@ static const flex_int16_t yy_chk[687] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, - 43, 27, 28, 231, 26, 43, 28, 32, 27, 25, - 34, 52, 32, 52, 25, 27, 32, 30, 27, 28, - - 230, 31, 225, 224, 26, 33, 29, 27, 28, 34, - 26, 43, 28, 30, 27, 25, 30, 39, 32, 30, - 25, 27, 32, 33, 27, 28, 44, 31, 33, 38, - 26, 36, 29, 37, 223, 34, 39, 220, 44, 30, - 219, 218, 30, 42, 36, 30, 217, 38, 41, 33, - 36, 38, 37, 41, 33, 60, 40, 41, 37, 58, - 216, 42, 39, 42, 44, 40, 60, 58, 40, 64, - 36, 214, 62, 38, 59, 66, 36, 38, 37, 41, - 40, 59, 68, 41, 37, 40, 64, 42, 62, 42, - 63, 40, 60, 58, 40, 63, 65, 67, 70, 66, - - 72, 68, 69, 74, 71, 65, 40, 59, 75, 73, - 78, 40, 64, 67, 62, 69, 211, 70, 79, 72, - 67, 63, 69, 78, 75, 66, 71, 68, 73, 74, - 80, 65, 210, 79, 81, 80, 90, 209, 208, 67, - 206, 69, 90, 70, 82, 72, 67, 85, 69, 78, - 75, 86, 71, 87, 73, 74, 76, 84, 81, 79, - 82, 80, 88, 85, 76, 84, 76, 86, 90, 89, - 92, 91, 87, 95, 76, 86, 205, 93, 94, 76, - 76, 88, 95, 92, 81, 93, 82, 89, 100, 85, - 76, 84, 76, 86, 94, 100, 101, 99, 87, 91, - - 76, 86, 102, 113, 107, 76, 76, 88, 95, 92, - 99, 93, 103, 89, 105, 108, 109, 103, 101, 102, - 94, 100, 104, 105, 107, 91, 106, 104, 113, 110, - 111, 104, 109, 106, 110, 112, 99, 116, 108, 108, - 188, 115, 114, 103, 101, 102, 116, 111, 120, 105, - 107, 188, 112, 104, 113, 114, 117, 104, 109, 106, - 110, 115, 118, 130, 108, 108, 119, 120, 121, 117, - 122, 118, 116, 111, 123, 119, 125, 188, 112, 122, - 126, 114, 123, 127, 131, 128, 121, 115, 133, 126, - 130, 132, 125, 120, 128, 117, 135, 118, 132, 127, - - 138, 119, 134, 137, 133, 122, 131, 143, 123, 136, - 142, 139, 121, 146, 136, 126, 130, 135, 125, 158, - 128, 149, 138, 142, 132, 127, 134, 152, 137, 139, - 133, 143, 131, 151, 153, 156, 155, 146, 151, 153, - 136, 204, 159, 135, 160, 149, 161, 158, 138, 142, - 167, 152, 134, 156, 137, 139, 155, 143, 159, 203, - 175, 173, 166, 146, 151, 153, 160, 166, 161, 168, - 173, 149, 167, 158, 169, 168, 176, 152, 171, 156, - 177, 169, 155, 171, 159, 175, 178, 183, 180, 177, - 181, 184, 160, 166, 161, 178, 173, 182, 167, 181, - - 176, 168, 193, 186, 184, 190, 182, 169, 193, 171, - 183, 175, 180, 192, 190, 177, 198, 195, 196, 199, - 197, 178, 195, 201, 200, 181, 176, 186, 199, 207, - 184, 197, 182, 200, 193, 212, 183, 192, 180, 198, - 190, 222, 196, 213, 202, 194, 201, 207, 195, 215, - 213, 212, 221, 186, 199, 191, 222, 197, 215, 200, - 189, 221, 187, 192, 185, 198, 179, 174, 196, 172, - 170, 165, 201, 207, 164, 163, 213, 212, 162, 157, - 154, 150, 222, 148, 215, 147, 145, 221, 227, 227, - 228, 228, 229, 229, 144, 141, 140, 129, 124, 98, - - 97, 96, 83, 77, 61, 57, 51, 49, 47, 35, - 24, 11, 10, 9, 5, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226 + 236, 27, 28, 52, 26, 52, 28, 32, 27, 25, + 34, 235, 32, 59, 25, 27, 32, 30, 27, 28, + + 59, 31, 230, 58, 26, 33, 29, 27, 28, 34, + 26, 58, 28, 30, 27, 25, 30, 39, 32, 30, + 25, 27, 32, 33, 27, 28, 59, 31, 33, 38, + 26, 36, 29, 37, 44, 34, 39, 58, 229, 30, + 228, 74, 30, 42, 36, 30, 44, 38, 41, 33, + 36, 38, 37, 41, 33, 43, 40, 41, 37, 62, + 43, 42, 39, 42, 43, 40, 225, 74, 40, 63, + 36, 60, 44, 38, 63, 62, 36, 38, 37, 41, + 40, 64, 60, 41, 37, 40, 43, 42, 65, 42, + 43, 40, 66, 74, 40, 68, 67, 65, 64, 70, + + 63, 62, 69, 71, 75, 84, 40, 72, 60, 73, + 81, 40, 67, 84, 68, 69, 66, 78, 70, 67, + 75, 79, 69, 65, 64, 71, 72, 80, 73, 90, + 78, 224, 80, 82, 81, 90, 79, 223, 67, 84, + 68, 69, 66, 85, 70, 67, 75, 222, 69, 82, + 86, 71, 72, 87, 73, 76, 78, 88, 80, 85, + 81, 90, 79, 76, 89, 76, 86, 91, 92, 93, + 94, 221, 87, 76, 86, 82, 88, 93, 76, 76, + 95, 92, 89, 100, 96, 85, 94, 95, 102, 76, + 101, 76, 86, 96, 103, 91, 100, 101, 87, 76, + + 86, 104, 88, 93, 76, 76, 104, 92, 89, 105, + 102, 103, 94, 95, 105, 106, 114, 110, 105, 96, + 107, 91, 100, 101, 106, 108, 111, 107, 109, 112, + 113, 111, 104, 110, 116, 115, 102, 103, 220, 218, + 105, 114, 118, 121, 105, 108, 112, 113, 115, 117, + 106, 109, 109, 107, 116, 118, 119, 111, 117, 110, + 120, 122, 121, 131, 215, 119, 123, 114, 124, 120, + 126, 108, 112, 113, 115, 123, 124, 109, 109, 122, + 116, 118, 128, 127, 117, 129, 126, 132, 121, 133, + 131, 119, 127, 135, 129, 120, 133, 134, 128, 137, + + 136, 123, 124, 138, 137, 122, 144, 139, 141, 132, + 140, 214, 126, 134, 145, 213, 131, 135, 127, 144, + 129, 136, 133, 212, 128, 148, 141, 151, 138, 153, + 137, 139, 140, 157, 153, 132, 155, 154, 145, 134, + 160, 155, 210, 135, 158, 144, 209, 136, 162, 148, + 161, 151, 141, 157, 138, 208, 163, 139, 140, 169, + 153, 154, 158, 175, 145, 170, 161, 155, 160, 168, + 162, 170, 175, 171, 168, 148, 177, 151, 163, 157, + 171, 169, 179, 180, 173, 178, 181, 154, 158, 173, + 183, 179, 161, 186, 160, 181, 162, 170, 175, 184, + + 168, 177, 180, 185, 163, 187, 171, 169, 184, 178, + 193, 191, 185, 189, 183, 173, 186, 179, 187, 193, + 196, 181, 191, 195, 198, 199, 196, 177, 180, 198, + 200, 201, 207, 204, 184, 178, 205, 189, 185, 211, + 183, 200, 186, 206, 187, 193, 216, 195, 191, 199, + 202, 203, 196, 197, 201, 198, 204, 211, 205, 202, + 203, 217, 216, 189, 227, 219, 194, 200, 217, 226, + 192, 190, 188, 195, 219, 199, 182, 176, 226, 227, + 201, 174, 204, 211, 205, 202, 203, 172, 216, 167, + 166, 165, 164, 159, 217, 156, 152, 150, 149, 147, + + 219, 146, 143, 142, 226, 227, 232, 232, 233, 233, + 234, 234, 130, 125, 99, 98, 97, 83, 77, 61, + 57, 51, 49, 47, 35, 24, 11, 10, 9, 5, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + + 231 } ; /* The intent behind this definition is that it'll catch @@ -716,7 +723,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 720 "lex_sql.cpp" +#line 727 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -725,7 +732,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 729 "lex_sql.cpp" +#line 736 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -1011,7 +1018,7 @@ YY_DECL #line 75 "lex_sql.l" -#line 1015 "lex_sql.cpp" +#line 1022 "lex_sql.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1038,13 +1045,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 227 ) + if ( yy_current_state >= 232 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 616 ); + while ( yy_base[yy_current_state] != 631 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1247,137 +1254,137 @@ RETURN_TOKEN(FLOAT_T); case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATE_T); // 增加 DATE 的 token +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token YY_BREAK case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token +RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token YY_BREAK case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(UNIQUE); +RETURN_TOKEN(VECTOR_T); // 增加 VECTOR 的 token YY_BREAK case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(NULL_T); +RETURN_TOKEN(UNIQUE); YY_BREAK case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(NULLABLE); +RETURN_TOKEN(NULL_T); YY_BREAK case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(LOAD); +RETURN_TOKEN(NULLABLE); YY_BREAK case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(DATA); +RETURN_TOKEN(LOAD); YY_BREAK case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(INFILE); +RETURN_TOKEN(DATA); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); +RETURN_TOKEN(INFILE); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(GROUP); +RETURN_TOKEN(EXPLAIN); YY_BREAK case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(HAVING); +RETURN_TOKEN(GROUP); YY_BREAK case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(ORDER); +RETURN_TOKEN(HAVING); YY_BREAK case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(BY); +RETURN_TOKEN(ORDER); YY_BREAK case 49: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(AS); +RETURN_TOKEN(BY); YY_BREAK case 50: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(ASC); +RETURN_TOKEN(AS); YY_BREAK case 51: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(IN); +RETURN_TOKEN(ASC); YY_BREAK case 52: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(EXISTS); +RETURN_TOKEN(IN); YY_BREAK case 53: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(STORAGE); +RETURN_TOKEN(EXISTS); YY_BREAK case 54: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(FORMAT); +RETURN_TOKEN(STORAGE); YY_BREAK case 55: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(INNER); +RETURN_TOKEN(FORMAT); YY_BREAK case 56: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(JOIN); +RETURN_TOKEN(INNER); YY_BREAK case 57: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(LBRACE); +RETURN_TOKEN(JOIN); YY_BREAK case 58: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(RBRACE); +RETURN_TOKEN(LBRACE); YY_BREAK case 59: YY_RULE_SETUP -#line 138 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 137 "lex_sql.l" +RETURN_TOKEN(RBRACE); YY_BREAK case 60: YY_RULE_SETUP #line 139 "lex_sql.l" -RETURN_TOKEN(EQ); +RETURN_TOKEN(COMMA); YY_BREAK case 61: YY_RULE_SETUP #line 140 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(EQ); YY_BREAK case 62: YY_RULE_SETUP #line 141 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LE); YY_BREAK case 63: YY_RULE_SETUP @@ -1387,54 +1394,53 @@ RETURN_TOKEN(NE); case 64: YY_RULE_SETUP #line 143 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(NE); YY_BREAK case 65: YY_RULE_SETUP #line 144 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(LT); YY_BREAK case 66: YY_RULE_SETUP #line 145 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(GE); YY_BREAK case 67: YY_RULE_SETUP #line 146 "lex_sql.l" -RETURN_TOKEN(NOT); +RETURN_TOKEN(GT); YY_BREAK case 68: YY_RULE_SETUP #line 147 "lex_sql.l" -RETURN_TOKEN(IS); +RETURN_TOKEN(NOT); YY_BREAK case 69: YY_RULE_SETUP #line 148 "lex_sql.l" -RETURN_TOKEN(LIKE); +RETURN_TOKEN(IS); YY_BREAK case 70: YY_RULE_SETUP -#line 150 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +#line 149 "lex_sql.l" +RETURN_TOKEN(LIKE); YY_BREAK case 71: -#line 153 "lex_sql.l" +YY_RULE_SETUP +#line 151 "lex_sql.l" +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK case 72: #line 154 "lex_sql.l" case 73: #line 155 "lex_sql.l" case 74: -YY_RULE_SETUP -#line 155 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK +#line 156 "lex_sql.l" case 75: -/* rule 75 can match eol */ YY_RULE_SETUP #line 156 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); +{ return yytext[0]; } YY_BREAK case 76: /* rule 76 can match eol */ @@ -1443,16 +1449,22 @@ YY_RULE_SETUP yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 77: +/* rule 77 can match eol */ YY_RULE_SETUP -#line 159 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; +#line 158 "lex_sql.l" +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK case 78: YY_RULE_SETUP #line 160 "lex_sql.l" +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 79: +YY_RULE_SETUP +#line 161 "lex_sql.l" ECHO; YY_BREAK -#line 1456 "lex_sql.cpp" +#line 1468 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1752,7 +1764,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 227 ) + if ( yy_current_state >= 232 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1781,11 +1793,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 227 ) + if ( yy_current_state >= 232 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 226); + yy_is_jam = (yy_current_state == 231); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2608,7 +2620,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 160 "lex_sql.l" +#line 161 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 46266a60..fafd461b 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -541,7 +541,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 160 "lex_sql.l" +#line 161 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 2efb6bb7..ba0b20d2 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -111,8 +111,9 @@ ROLLBACK RETURN_TOKEN(TRX_ROLLBACK); INT RETURN_TOKEN(INT_T); CHAR RETURN_TOKEN(STRING_T); FLOAT RETURN_TOKEN(FLOAT_T); -DATE RETURN_TOKEN(DATE_T); // 增加 DATE 的 token -TEXT RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token +DATE RETURN_TOKEN(DATE_T); // 增加 DATE 的 token +TEXT RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token +VECTOR RETURN_TOKEN(VECTOR_T); // 增加 VECTOR 的 token UNIQUE RETURN_TOKEN(UNIQUE); NULL RETURN_TOKEN(NULL_T); NULLABLE RETURN_TOKEN(NULLABLE); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 1c000d96..6b2652ff 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -215,101 +215,102 @@ enum yysymbol_kind_t YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ YYSYMBOL_DATE_T = 34, /* DATE_T */ YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_NOT = 36, /* NOT */ - YYSYMBOL_UNIQUE = 37, /* UNIQUE */ - YYSYMBOL_NULL_T = 38, /* NULL_T */ - YYSYMBOL_NULLABLE = 39, /* NULLABLE */ - YYSYMBOL_HELP = 40, /* HELP */ - YYSYMBOL_EXIT = 41, /* EXIT */ - YYSYMBOL_DOT = 42, /* DOT */ - YYSYMBOL_INTO = 43, /* INTO */ - YYSYMBOL_VALUES = 44, /* VALUES */ - YYSYMBOL_FROM = 45, /* FROM */ - YYSYMBOL_WHERE = 46, /* WHERE */ - YYSYMBOL_AND = 47, /* AND */ - YYSYMBOL_OR = 48, /* OR */ - YYSYMBOL_SET = 49, /* SET */ - YYSYMBOL_ON = 50, /* ON */ - YYSYMBOL_LOAD = 51, /* LOAD */ - YYSYMBOL_DATA = 52, /* DATA */ - YYSYMBOL_INFILE = 53, /* INFILE */ - YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ - YYSYMBOL_STORAGE = 55, /* STORAGE */ - YYSYMBOL_FORMAT = 56, /* FORMAT */ - YYSYMBOL_INNER = 57, /* INNER */ - YYSYMBOL_JOIN = 58, /* JOIN */ - YYSYMBOL_EQ = 59, /* EQ */ - YYSYMBOL_LT = 60, /* LT */ - YYSYMBOL_GT = 61, /* GT */ - YYSYMBOL_LE = 62, /* LE */ - YYSYMBOL_GE = 63, /* GE */ - YYSYMBOL_NE = 64, /* NE */ - YYSYMBOL_LIKE = 65, /* LIKE */ - YYSYMBOL_IS = 66, /* IS */ - YYSYMBOL_NUMBER = 67, /* NUMBER */ - YYSYMBOL_FLOAT = 68, /* FLOAT */ - YYSYMBOL_ID = 69, /* ID */ - YYSYMBOL_SSS = 70, /* SSS */ - YYSYMBOL_71_ = 71, /* '+' */ - YYSYMBOL_72_ = 72, /* '-' */ - YYSYMBOL_73_ = 73, /* '*' */ - YYSYMBOL_74_ = 74, /* '/' */ - YYSYMBOL_UMINUS = 75, /* UMINUS */ - YYSYMBOL_YYACCEPT = 76, /* $accept */ - YYSYMBOL_commands = 77, /* commands */ - YYSYMBOL_command_wrapper = 78, /* command_wrapper */ - YYSYMBOL_exit_stmt = 79, /* exit_stmt */ - YYSYMBOL_help_stmt = 80, /* help_stmt */ - YYSYMBOL_sync_stmt = 81, /* sync_stmt */ - YYSYMBOL_begin_stmt = 82, /* begin_stmt */ - YYSYMBOL_commit_stmt = 83, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 84, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 85, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 86, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 87, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 88, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 89, /* create_index_stmt */ - YYSYMBOL_opt_unique = 90, /* opt_unique */ - YYSYMBOL_attr_list = 91, /* attr_list */ - YYSYMBOL_drop_index_stmt = 92, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 93, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 94, /* attr_def_list */ - YYSYMBOL_attr_def = 95, /* attr_def */ - YYSYMBOL_nullable_constraint = 96, /* nullable_constraint */ - YYSYMBOL_type = 97, /* type */ - YYSYMBOL_insert_stmt = 98, /* insert_stmt */ - YYSYMBOL_values_list = 99, /* values_list */ - YYSYMBOL_value_list = 100, /* value_list */ - YYSYMBOL_value = 101, /* value */ - YYSYMBOL_nonnegative_value = 102, /* nonnegative_value */ - YYSYMBOL_storage_format = 103, /* storage_format */ - YYSYMBOL_delete_stmt = 104, /* delete_stmt */ - YYSYMBOL_update_stmt = 105, /* update_stmt */ - YYSYMBOL_setClauses = 106, /* setClauses */ - YYSYMBOL_setClause = 107, /* setClause */ - YYSYMBOL_select_stmt = 108, /* select_stmt */ - YYSYMBOL_calc_stmt = 109, /* calc_stmt */ - YYSYMBOL_expression_list = 110, /* expression_list */ - YYSYMBOL_expression = 111, /* expression */ - YYSYMBOL_alias = 112, /* alias */ - YYSYMBOL_aggr_func_expr = 113, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 114, /* sub_query_expr */ - YYSYMBOL_rel_attr = 115, /* rel_attr */ - YYSYMBOL_relation = 116, /* relation */ - YYSYMBOL_rel_list = 117, /* rel_list */ - YYSYMBOL_joinClauses = 118, /* joinClauses */ - YYSYMBOL_where = 119, /* where */ - YYSYMBOL_condition = 120, /* condition */ - YYSYMBOL_comp_op = 121, /* comp_op */ - YYSYMBOL_opt_order_by = 122, /* opt_order_by */ - YYSYMBOL_sort_list = 123, /* sort_list */ - YYSYMBOL_sort_unit = 124, /* sort_unit */ - YYSYMBOL_group_by = 125, /* group_by */ - YYSYMBOL_opt_having = 126, /* opt_having */ - YYSYMBOL_load_data_stmt = 127, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 128, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 129, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 130 /* opt_semicolon */ + YYSYMBOL_VECTOR_T = 36, /* VECTOR_T */ + YYSYMBOL_NOT = 37, /* NOT */ + YYSYMBOL_UNIQUE = 38, /* UNIQUE */ + YYSYMBOL_NULL_T = 39, /* NULL_T */ + YYSYMBOL_NULLABLE = 40, /* NULLABLE */ + YYSYMBOL_HELP = 41, /* HELP */ + YYSYMBOL_EXIT = 42, /* EXIT */ + YYSYMBOL_DOT = 43, /* DOT */ + YYSYMBOL_INTO = 44, /* INTO */ + YYSYMBOL_VALUES = 45, /* VALUES */ + YYSYMBOL_FROM = 46, /* FROM */ + YYSYMBOL_WHERE = 47, /* WHERE */ + YYSYMBOL_AND = 48, /* AND */ + YYSYMBOL_OR = 49, /* OR */ + YYSYMBOL_SET = 50, /* SET */ + YYSYMBOL_ON = 51, /* ON */ + YYSYMBOL_LOAD = 52, /* LOAD */ + YYSYMBOL_DATA = 53, /* DATA */ + YYSYMBOL_INFILE = 54, /* INFILE */ + YYSYMBOL_EXPLAIN = 55, /* EXPLAIN */ + YYSYMBOL_STORAGE = 56, /* STORAGE */ + YYSYMBOL_FORMAT = 57, /* FORMAT */ + YYSYMBOL_INNER = 58, /* INNER */ + YYSYMBOL_JOIN = 59, /* JOIN */ + YYSYMBOL_EQ = 60, /* EQ */ + YYSYMBOL_LT = 61, /* LT */ + YYSYMBOL_GT = 62, /* GT */ + YYSYMBOL_LE = 63, /* LE */ + YYSYMBOL_GE = 64, /* GE */ + YYSYMBOL_NE = 65, /* NE */ + YYSYMBOL_LIKE = 66, /* LIKE */ + YYSYMBOL_IS = 67, /* IS */ + YYSYMBOL_NUMBER = 68, /* NUMBER */ + YYSYMBOL_FLOAT = 69, /* FLOAT */ + YYSYMBOL_ID = 70, /* ID */ + YYSYMBOL_SSS = 71, /* SSS */ + YYSYMBOL_72_ = 72, /* '+' */ + YYSYMBOL_73_ = 73, /* '-' */ + YYSYMBOL_74_ = 74, /* '*' */ + YYSYMBOL_75_ = 75, /* '/' */ + YYSYMBOL_UMINUS = 76, /* UMINUS */ + YYSYMBOL_YYACCEPT = 77, /* $accept */ + YYSYMBOL_commands = 78, /* commands */ + YYSYMBOL_command_wrapper = 79, /* command_wrapper */ + YYSYMBOL_exit_stmt = 80, /* exit_stmt */ + YYSYMBOL_help_stmt = 81, /* help_stmt */ + YYSYMBOL_sync_stmt = 82, /* sync_stmt */ + YYSYMBOL_begin_stmt = 83, /* begin_stmt */ + YYSYMBOL_commit_stmt = 84, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 85, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 86, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 87, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 88, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 89, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 90, /* create_index_stmt */ + YYSYMBOL_opt_unique = 91, /* opt_unique */ + YYSYMBOL_attr_list = 92, /* attr_list */ + YYSYMBOL_drop_index_stmt = 93, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 94, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 95, /* attr_def_list */ + YYSYMBOL_attr_def = 96, /* attr_def */ + YYSYMBOL_nullable_constraint = 97, /* nullable_constraint */ + YYSYMBOL_type = 98, /* type */ + YYSYMBOL_insert_stmt = 99, /* insert_stmt */ + YYSYMBOL_values_list = 100, /* values_list */ + YYSYMBOL_value_list = 101, /* value_list */ + YYSYMBOL_value = 102, /* value */ + YYSYMBOL_nonnegative_value = 103, /* nonnegative_value */ + YYSYMBOL_storage_format = 104, /* storage_format */ + YYSYMBOL_delete_stmt = 105, /* delete_stmt */ + YYSYMBOL_update_stmt = 106, /* update_stmt */ + YYSYMBOL_setClauses = 107, /* setClauses */ + YYSYMBOL_setClause = 108, /* setClause */ + YYSYMBOL_select_stmt = 109, /* select_stmt */ + YYSYMBOL_calc_stmt = 110, /* calc_stmt */ + YYSYMBOL_expression_list = 111, /* expression_list */ + YYSYMBOL_expression = 112, /* expression */ + YYSYMBOL_alias = 113, /* alias */ + YYSYMBOL_aggr_func_expr = 114, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 115, /* sub_query_expr */ + YYSYMBOL_rel_attr = 116, /* rel_attr */ + YYSYMBOL_relation = 117, /* relation */ + YYSYMBOL_rel_list = 118, /* rel_list */ + YYSYMBOL_joinClauses = 119, /* joinClauses */ + YYSYMBOL_where = 120, /* where */ + YYSYMBOL_condition = 121, /* condition */ + YYSYMBOL_comp_op = 122, /* comp_op */ + YYSYMBOL_opt_order_by = 123, /* opt_order_by */ + YYSYMBOL_sort_list = 124, /* sort_list */ + YYSYMBOL_sort_unit = 125, /* sort_unit */ + YYSYMBOL_group_by = 126, /* group_by */ + YYSYMBOL_opt_having = 127, /* opt_having */ + YYSYMBOL_load_data_stmt = 128, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 129, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 130, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 131 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -643,16 +644,16 @@ union yyalloc #define YYLAST 267 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 76 +#define YYNTOKENS 77 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 55 /* YYNRULES -- Number of rules. */ #define YYNRULES 143 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 251 +#define YYNSTATES 252 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 326 +#define YYMAXUTOK 327 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -670,7 +671,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 73, 71, 2, 72, 2, 74, 2, 2, + 2, 2, 74, 72, 2, 73, 2, 75, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -698,28 +699,28 @@ static const yytype_int8 yytranslate[] = 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 75 + 65, 66, 67, 68, 69, 70, 71, 76 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 259, 259, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 291, 297, 302, 308, 314, 320, - 326, 333, 339, 347, 357, 372, 373, 377, 383, 392, - 402, 406, 410, 414, 418, 425, 428, 441, 453, 480, - 484, 488, 493, 499, 500, 501, 502, 503, 507, 520, - 526, 533, 539, 547, 550, 554, 561, 565, 569, 575, - 582, 585, 592, 604, 618, 623, 630, 640, 673, 706, - 712, 721, 724, 733, 749, 752, 755, 758, 761, 769, - 772, 777, 783, 786, 789, 792, 799, 802, 805, 810, - 817, 824, 829, 839, 845, 855, 872, 879, 891, 894, - 900, 904, 911, 915, 922, 923, 924, 925, 926, 927, - 928, 929, 930, 931, 932, 933, 934, 935, 940, 943, - 951, 956, 964, 970, 976, 986, 989, 997, 1000, 1007, - 1020, 1028, 1038, 1039 + 0, 260, 260, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 292, 298, 303, 309, 315, 321, + 327, 334, 340, 348, 358, 373, 374, 378, 384, 393, + 403, 407, 411, 415, 419, 426, 429, 442, 458, 485, + 489, 493, 498, 504, 505, 506, 507, 508, 509, 513, + 526, 532, 539, 545, 553, 556, 560, 567, 571, 575, + 581, 588, 591, 598, 610, 624, 629, 636, 646, 679, + 712, 718, 727, 730, 739, 755, 758, 761, 764, 767, + 775, 778, 783, 789, 792, 795, 798, 805, 808, 811, + 816, 823, 830, 835, 845, 851, 861, 878, 885, 897, + 900, 906, 910, 917, 921, 928, 929, 930, 931, 932, + 933, 934, 935, 936, 937, 938, 939, 940, 941, 946, + 949, 957, 962, 970, 976, 982, 992, 995, 1003, 1006, + 1013, 1026, 1034, 1045 }; #endif @@ -740,23 +741,24 @@ static const char *const yytname[] = "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", - "DATE_T", "TEXT_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", - "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", - "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", - "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", - "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", - "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", - "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", - "show_tables_stmt", "desc_table_stmt", "show_index_stmt", - "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", - "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", - "type", "insert_stmt", "values_list", "value_list", "value", - "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", - "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", - "expression", "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", - "relation", "rel_list", "joinClauses", "where", "condition", "comp_op", - "opt_order_by", "sort_list", "sort_unit", "group_by", "opt_having", - "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR + "DATE_T", "TEXT_T", "VECTOR_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", + "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", + "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", + "INNER", "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", + "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", + "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", + "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", + "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", + "show_index_stmt", "create_index_stmt", "opt_unique", "attr_list", + "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", + "nullable_constraint", "type", "insert_stmt", "values_list", + "value_list", "value", "nonnegative_value", "storage_format", + "delete_stmt", "update_stmt", "setClauses", "setClause", "select_stmt", + "calc_stmt", "expression_list", "expression", "alias", "aggr_func_expr", + "sub_query_expr", "rel_attr", "relation", "rel_list", "joinClauses", + "where", "condition", "comp_op", "opt_order_by", "sort_list", + "sort_unit", "group_by", "opt_having", "load_data_stmt", "explain_stmt", + "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; static const char * @@ -766,7 +768,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-175) +#define YYPACT_NINF (-169) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -780,32 +782,32 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 210, 5, 38, -10, -10, -13, 12, -175, 29, 19, - 6, -175, -175, -175, -175, -175, 24, 36, 210, 124, - 125, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, 70, -175, 126, 71, 73, 119, -175, -175, - -175, -2, -175, -10, -175, -175, -175, 7, -175, -175, - -175, 99, -175, -175, 100, 77, 78, 101, 89, 98, - -175, -175, -175, -175, -9, 80, -175, 103, -10, 130, - 131, -10, -28, -175, 90, -175, -10, -10, -10, -10, - 132, 91, 91, 117, 116, 94, -18, 95, 102, 108, - 13, 118, 106, 99, -175, -175, 141, -175, -175, -175, - 18, 18, -175, -175, -10, -175, 4, 116, -175, 146, - 143, -175, 113, -7, -175, 52, -175, -175, 133, 97, - 151, 121, 161, -175, 114, -175, -175, -175, 135, 156, - 180, -18, 168, -175, -175, 0, -175, -175, -175, -175, - -175, -175, -175, 159, 35, 55, -10, -10, 94, -175, - -175, -175, 184, -175, -175, -175, -175, -175, 87, 102, - 173, 145, -175, 175, 91, 91, 194, 208, 96, -175, - 196, -175, -175, -175, -175, -10, 143, 143, 41, 41, - -175, 152, 155, 185, -175, -175, -175, 151, 169, -175, - 165, 186, 116, 17, -175, -10, 143, 213, -175, -18, - -18, 41, -175, 188, -175, 215, -175, -175, 21, 216, - 218, 143, 180, -175, 55, 235, -175, -175, 112, 31, - 161, -175, 165, -175, -24, -175, -10, -175, -175, -175, - -175, 187, 11, -175, 220, 91, -175, -175, -10, -175, - -175 + 212, 3, 43, 74, 74, -42, 87, -169, 13, 6, + -1, -169, -169, -169, -169, -169, 15, 55, 212, 76, + 93, -169, -169, -169, -169, -169, -169, -169, -169, -169, + -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, + -169, -169, 52, -169, 101, 53, 54, -9, -169, -169, + -169, -10, -169, 74, -169, -169, -169, 8, -169, -169, + -169, 79, -169, -169, 91, 80, 81, 96, 92, 107, + -169, -169, -169, -169, -3, 94, -169, 98, 74, 137, + 138, 74, -48, -169, 97, -169, 74, 74, 74, 74, + 139, 99, 99, 121, 125, 103, -22, 100, 106, 120, + 23, 127, 109, 79, -169, -169, 155, -169, -169, -169, + -51, -51, -169, -169, 74, -169, 9, 125, -169, 158, + 144, -169, 128, -15, -169, 38, -169, -169, 140, 124, + 161, 129, 173, -169, 122, -169, -169, -169, 132, 167, + 184, -22, 169, -169, -169, 0, -169, -169, -169, -169, + -169, -169, -169, 159, 66, 63, 74, 74, 103, -169, + -169, -169, 185, -169, -169, -169, -169, -169, -169, 5, + 106, 174, 130, -169, 177, 99, 99, 197, 205, 89, + -169, 198, -169, -169, -169, -169, 74, 144, 144, -2, + -2, -169, 151, 156, 186, -169, -169, -169, 161, 170, + -169, 153, 176, 125, 14, -169, 74, 144, 224, -169, + -22, -22, -2, -169, 189, -169, 213, -169, -169, 46, + 216, 218, 144, 184, -169, 63, 238, -169, -169, 95, + 49, 173, -169, 153, -169, 51, -169, 74, -169, -169, + -169, -169, 187, 20, -169, 219, 99, -169, -169, 74, + -169, -169 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -813,54 +815,54 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 36, 0, 81, 81, 0, 0, 26, 0, 0, + 0, 36, 0, 82, 82, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 142, 23, 22, 15, 16, 17, 18, 9, 10, 11, - 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 35, 0, 0, 0, 81, 69, 66, - 67, 101, 68, 0, 92, 90, 79, 96, 94, 95, - 91, 80, 32, 31, 0, 0, 0, 0, 0, 0, - 140, 1, 143, 2, 70, 0, 30, 0, 81, 0, - 0, 81, 0, 89, 0, 97, 0, 0, 0, 0, - 82, 0, 0, 0, 108, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 100, 88, 0, 102, 93, 98, - 84, 85, 86, 87, 81, 103, 96, 108, 33, 0, - 0, 72, 0, 108, 74, 0, 141, 63, 0, 0, - 45, 0, 0, 44, 0, 39, 99, 83, 0, 104, - 135, 0, 58, 126, 124, 0, 114, 115, 116, 117, - 118, 119, 122, 120, 0, 109, 0, 0, 0, 73, - 64, 65, 0, 53, 54, 55, 56, 57, 52, 0, - 0, 0, 43, 0, 0, 0, 0, 137, 0, 61, - 0, 127, 125, 123, 121, 0, 0, 0, 111, 76, - 75, 0, 0, 0, 51, 50, 48, 45, 70, 71, - 0, 0, 108, 96, 105, 81, 0, 128, 59, 0, - 0, 110, 112, 113, 139, 0, 49, 46, 42, 37, - 0, 0, 135, 136, 138, 0, 77, 62, 0, 52, - 0, 41, 0, 34, 106, 78, 0, 60, 47, 40, - 38, 0, 132, 129, 130, 0, 134, 133, 0, 107, - 131 + 0, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 14, 12, 13, 8, 5, 7, 6, 3, 4, 19, + 20, 21, 0, 35, 0, 0, 0, 82, 70, 67, + 68, 102, 69, 0, 93, 91, 80, 97, 95, 96, + 92, 81, 32, 31, 0, 0, 0, 0, 0, 0, + 141, 1, 143, 2, 71, 0, 30, 0, 82, 0, + 0, 82, 0, 90, 0, 98, 0, 0, 0, 0, + 83, 0, 0, 0, 109, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 101, 89, 0, 103, 94, 99, + 85, 86, 87, 88, 82, 104, 97, 109, 33, 0, + 0, 73, 0, 109, 75, 0, 142, 64, 0, 0, + 45, 0, 0, 44, 0, 39, 100, 84, 0, 105, + 136, 0, 59, 127, 125, 0, 115, 116, 117, 118, + 119, 120, 123, 121, 0, 110, 0, 0, 0, 74, + 65, 66, 0, 53, 54, 55, 56, 57, 58, 52, + 0, 0, 0, 43, 0, 0, 0, 0, 138, 0, + 62, 0, 128, 126, 124, 122, 0, 0, 0, 112, + 77, 76, 0, 0, 0, 51, 50, 48, 45, 71, + 72, 0, 0, 109, 97, 106, 82, 0, 129, 60, + 0, 0, 111, 113, 114, 140, 0, 49, 46, 42, + 37, 0, 0, 136, 137, 139, 0, 78, 63, 0, + 52, 0, 41, 0, 34, 107, 79, 0, 61, 47, + 40, 38, 0, 133, 130, 131, 0, 135, 134, 0, + 108, 132 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -175, -175, 226, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, -175, 15, -175, -175, 51, 83, - 20, -175, -175, -175, 43, -91, -93, 56, -175, -175, - -175, 104, -45, -175, -4, -52, 198, -175, -175, -175, - -85, 81, 22, -113, -174, 109, -175, 9, -175, 44, - -175, -175, -175, -175, -175 + -169, -169, 229, -169, -169, -169, -169, -169, -169, -169, + -169, -169, -169, -169, -169, 16, -169, -169, 50, 82, + 21, -169, -169, -169, 39, -91, -93, 56, -169, -169, + -169, 102, -45, -169, -4, -52, 199, -169, -169, -169, + -85, 83, 11, -113, -168, 104, -169, 12, -169, 40, + -169, -169, -169, -169, -169 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 220, 32, 33, 170, 130, - 196, 168, 34, 142, 178, 179, 55, 100, 35, 36, + 28, 29, 30, 31, 44, 221, 32, 33, 171, 130, + 197, 169, 34, 142, 179, 180, 55, 100, 35, 36, 123, 124, 37, 38, 56, 57, 139, 58, 59, 60, - 201, 117, 202, 121, 155, 156, 226, 243, 244, 177, - 207, 39, 40, 41, 73 + 202, 117, 203, 121, 155, 156, 227, 244, 245, 178, + 208, 39, 40, 41, 73 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -868,64 +870,64 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 61, 83, 79, 127, 140, 126, 116, 118, 84, 181, - 159, 84, 212, 213, 47, 98, 246, 132, 42, 158, - 48, 84, 81, 186, 187, 230, 63, 64, 48, 247, - 78, 182, 224, 241, 110, 111, 112, 113, 78, 120, - 82, 107, 43, 80, 143, 108, 99, 234, 127, 49, - 50, 45, 52, 46, 125, 133, 62, 49, 50, 51, - 52, 138, 53, 54, 66, 183, 144, 193, 154, 194, - 195, 145, 65, 85, 103, 67, 85, 106, 86, 87, - 88, 89, 86, 87, 88, 89, 85, 172, 69, 222, - 203, 88, 89, 68, 146, 147, 148, 149, 150, 151, - 152, 153, 186, 187, 188, 189, 86, 87, 88, 89, - 137, 192, 86, 87, 88, 89, 127, 127, 227, 160, - 161, 208, 209, 193, 71, 194, 195, 163, 72, 164, - 165, 166, 167, 211, 154, 154, 78, 237, 209, 74, - 76, 75, 77, 47, 91, 92, 93, 94, 96, 101, - 95, 97, 143, 102, 154, 104, 105, 48, 114, 109, - 115, 119, 120, 122, 131, 128, 136, 47, 134, 154, - 141, 129, 157, 231, 144, 135, 162, 169, 78, 145, - 171, 48, 175, 173, 242, 239, 49, 50, 51, 52, - 176, 53, 54, 174, 180, 184, 242, 191, 198, 200, - 205, 223, 146, 147, 148, 149, 150, 151, 152, 153, - 49, 50, 51, 52, 199, 53, 54, 1, 2, 206, - 210, 214, 215, 216, 99, 225, 3, 4, 5, 6, - 7, 8, 9, 10, 219, 186, 221, 11, 12, 13, - 229, 236, 232, 233, 70, 245, 248, 240, 217, 238, - 14, 15, 197, 228, 218, 90, 204, 250, 0, 16, - 0, 17, 190, 185, 18, 0, 235, 249 + 61, 83, 79, 127, 140, 126, 116, 118, 78, 182, + 159, 158, 84, 84, 81, 47, 42, 48, 84, 213, + 214, 98, 107, 88, 89, 247, 108, 132, 62, 193, + 48, 183, 120, 82, 110, 111, 112, 113, 248, 225, + 78, 43, 194, 80, 195, 196, 49, 50, 127, 52, + 231, 125, 66, 99, 235, 133, 45, 65, 46, 49, + 50, 51, 52, 78, 53, 54, 184, 138, 154, 67, + 86, 87, 88, 89, 103, 143, 71, 106, 85, 85, + 86, 87, 88, 89, 85, 68, 194, 173, 195, 196, + 223, 204, 86, 87, 88, 89, 72, 144, 47, 187, + 188, 63, 64, 145, 189, 190, 160, 161, 69, 242, + 137, 187, 188, 48, 209, 210, 75, 127, 127, 228, + 238, 210, 74, 76, 77, 91, 146, 147, 148, 149, + 150, 151, 152, 153, 212, 154, 154, 92, 86, 87, + 88, 89, 49, 50, 51, 52, 95, 53, 54, 102, + 93, 94, 96, 143, 163, 154, 164, 165, 166, 167, + 168, 97, 104, 105, 101, 114, 119, 109, 47, 115, + 154, 128, 120, 122, 232, 144, 129, 131, 134, 135, + 136, 145, 141, 48, 162, 243, 240, 170, 157, 172, + 78, 175, 174, 176, 177, 181, 185, 243, 192, 199, + 200, 201, 224, 206, 146, 147, 148, 149, 150, 151, + 152, 153, 49, 50, 51, 52, 207, 53, 54, 1, + 2, 215, 211, 220, 216, 217, 99, 222, 3, 4, + 5, 6, 7, 8, 9, 10, 226, 187, 230, 11, + 12, 13, 233, 234, 237, 249, 246, 70, 218, 241, + 229, 239, 198, 14, 15, 219, 90, 250, 186, 205, + 191, 251, 16, 236, 17, 0, 0, 18 }; static const yytype_int16 yycheck[] = { - 4, 53, 47, 96, 117, 96, 91, 92, 4, 9, - 123, 4, 186, 187, 24, 24, 5, 4, 13, 26, - 38, 4, 24, 47, 48, 4, 14, 15, 38, 18, - 17, 31, 206, 57, 86, 87, 88, 89, 17, 46, - 42, 69, 37, 47, 9, 73, 55, 221, 141, 67, - 68, 13, 70, 15, 72, 100, 69, 67, 68, 69, - 70, 57, 72, 73, 45, 65, 31, 36, 120, 38, - 39, 36, 43, 69, 78, 69, 69, 81, 71, 72, - 73, 74, 71, 72, 73, 74, 69, 132, 52, 202, - 175, 73, 74, 69, 59, 60, 61, 62, 63, 64, - 65, 66, 47, 48, 156, 157, 71, 72, 73, 74, - 114, 24, 71, 72, 73, 74, 209, 210, 209, 67, - 68, 25, 26, 36, 0, 38, 39, 30, 3, 32, - 33, 34, 35, 185, 186, 187, 17, 25, 26, 69, - 69, 15, 69, 24, 45, 45, 69, 69, 59, 69, - 49, 53, 9, 50, 206, 25, 25, 38, 26, 69, - 69, 44, 46, 69, 56, 70, 25, 24, 50, 221, - 24, 69, 59, 218, 31, 69, 43, 26, 17, 36, - 59, 38, 26, 69, 236, 230, 67, 68, 69, 70, - 10, 72, 73, 58, 26, 36, 248, 13, 25, 24, - 6, 205, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 69, 72, 73, 7, 8, 11, - 24, 69, 67, 38, 55, 12, 16, 17, 18, 19, - 20, 21, 22, 23, 69, 47, 50, 27, 28, 29, - 25, 6, 26, 25, 18, 58, 26, 232, 197, 229, - 40, 41, 169, 210, 198, 57, 175, 248, -1, 49, - -1, 51, 158, 154, 54, -1, 222, 245 + 4, 53, 47, 96, 117, 96, 91, 92, 17, 9, + 123, 26, 4, 4, 24, 24, 13, 39, 4, 187, + 188, 24, 70, 74, 75, 5, 74, 4, 70, 24, + 39, 31, 47, 43, 86, 87, 88, 89, 18, 207, + 17, 38, 37, 47, 39, 40, 68, 69, 141, 71, + 4, 73, 46, 56, 222, 100, 13, 44, 15, 68, + 69, 70, 71, 17, 73, 74, 66, 58, 120, 70, + 72, 73, 74, 75, 78, 9, 0, 81, 70, 70, + 72, 73, 74, 75, 70, 70, 37, 132, 39, 40, + 203, 176, 72, 73, 74, 75, 3, 31, 24, 48, + 49, 14, 15, 37, 156, 157, 68, 69, 53, 58, + 114, 48, 49, 39, 25, 26, 15, 210, 211, 210, + 25, 26, 70, 70, 70, 46, 60, 61, 62, 63, + 64, 65, 66, 67, 186, 187, 188, 46, 72, 73, + 74, 75, 68, 69, 70, 71, 50, 73, 74, 51, + 70, 70, 60, 9, 30, 207, 32, 33, 34, 35, + 36, 54, 25, 25, 70, 26, 45, 70, 24, 70, + 222, 71, 47, 70, 219, 31, 70, 57, 51, 70, + 25, 37, 24, 39, 44, 237, 231, 26, 60, 60, + 17, 59, 70, 26, 10, 26, 37, 249, 13, 25, + 70, 24, 206, 6, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 11, 73, 74, 7, + 8, 70, 24, 70, 68, 39, 56, 51, 16, 17, + 18, 19, 20, 21, 22, 23, 12, 48, 25, 27, + 28, 29, 26, 25, 6, 26, 59, 18, 198, 233, + 211, 230, 170, 41, 42, 199, 57, 246, 154, 176, + 158, 249, 50, 223, 52, -1, -1, 55 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -933,51 +935,51 @@ static const yytype_int16 yycheck[] = static const yytype_uint8 yystos[] = { 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, - 23, 27, 28, 29, 40, 41, 49, 51, 54, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 92, 93, 98, 104, 105, 108, 109, 127, - 128, 129, 13, 37, 90, 13, 15, 24, 38, 67, - 68, 69, 70, 72, 73, 102, 110, 111, 113, 114, - 115, 110, 69, 14, 15, 43, 45, 69, 69, 52, - 78, 0, 3, 130, 69, 15, 69, 69, 17, 108, - 110, 24, 42, 111, 4, 69, 71, 72, 73, 74, - 112, 45, 45, 69, 69, 49, 59, 53, 24, 55, - 103, 69, 50, 110, 25, 25, 110, 69, 73, 69, - 111, 111, 111, 111, 26, 69, 116, 117, 116, 44, - 46, 119, 69, 106, 107, 72, 101, 102, 70, 69, - 95, 56, 4, 108, 50, 69, 25, 110, 57, 112, - 119, 24, 99, 9, 31, 36, 59, 60, 61, 62, - 63, 64, 65, 66, 111, 120, 121, 59, 26, 119, - 67, 68, 43, 30, 32, 33, 34, 35, 97, 26, - 94, 59, 108, 69, 58, 26, 10, 125, 100, 101, - 26, 9, 31, 65, 36, 121, 47, 48, 111, 111, - 107, 13, 24, 36, 38, 39, 96, 95, 25, 69, - 24, 116, 118, 116, 117, 6, 11, 126, 25, 26, - 24, 111, 120, 120, 69, 67, 38, 94, 103, 69, - 91, 50, 119, 110, 120, 12, 122, 101, 100, 25, - 4, 108, 26, 25, 120, 125, 6, 25, 96, 108, - 91, 57, 111, 123, 124, 58, 5, 18, 26, 118, - 123 + 23, 27, 28, 29, 41, 42, 50, 52, 55, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 93, 94, 99, 105, 106, 109, 110, 128, + 129, 130, 13, 38, 91, 13, 15, 24, 39, 68, + 69, 70, 71, 73, 74, 103, 111, 112, 114, 115, + 116, 111, 70, 14, 15, 44, 46, 70, 70, 53, + 79, 0, 3, 131, 70, 15, 70, 70, 17, 109, + 111, 24, 43, 112, 4, 70, 72, 73, 74, 75, + 113, 46, 46, 70, 70, 50, 60, 54, 24, 56, + 104, 70, 51, 111, 25, 25, 111, 70, 74, 70, + 112, 112, 112, 112, 26, 70, 117, 118, 117, 45, + 47, 120, 70, 107, 108, 73, 102, 103, 71, 70, + 96, 57, 4, 109, 51, 70, 25, 111, 58, 113, + 120, 24, 100, 9, 31, 37, 60, 61, 62, 63, + 64, 65, 66, 67, 112, 121, 122, 60, 26, 120, + 68, 69, 44, 30, 32, 33, 34, 35, 36, 98, + 26, 95, 60, 109, 70, 59, 26, 10, 126, 101, + 102, 26, 9, 31, 66, 37, 122, 48, 49, 112, + 112, 108, 13, 24, 37, 39, 40, 97, 96, 25, + 70, 24, 117, 119, 117, 118, 6, 11, 127, 25, + 26, 24, 112, 121, 121, 70, 68, 39, 95, 104, + 70, 92, 51, 120, 111, 121, 12, 123, 102, 101, + 25, 4, 109, 26, 25, 121, 126, 6, 25, 97, + 109, 92, 58, 112, 124, 125, 59, 5, 18, 26, + 119, 124 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_uint8 yyr1[] = { - 0, 76, 77, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 90, 91, 91, 92, - 93, 93, 93, 93, 93, 94, 94, 95, 95, 96, - 96, 96, 96, 97, 97, 97, 97, 97, 98, 99, - 99, 100, 100, 101, 101, 101, 102, 102, 102, 102, - 103, 103, 104, 105, 106, 106, 107, 108, 108, 109, - 109, 110, 110, 110, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 112, 112, 112, 113, - 114, 115, 115, 116, 117, 117, 118, 118, 119, 119, - 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, - 123, 123, 124, 124, 124, 125, 125, 126, 126, 127, - 128, 129, 130, 130 + 0, 77, 78, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 91, 92, 92, 93, + 94, 94, 94, 94, 94, 95, 95, 96, 96, 97, + 97, 97, 97, 98, 98, 98, 98, 98, 98, 99, + 100, 100, 101, 101, 102, 102, 102, 103, 103, 103, + 103, 104, 104, 105, 106, 107, 107, 108, 109, 109, + 110, 110, 111, 111, 111, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 113, 113, 113, + 114, 115, 116, 116, 117, 118, 118, 119, 119, 120, + 120, 121, 121, 121, 121, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 123, + 123, 124, 124, 125, 125, 125, 126, 126, 127, 127, + 128, 129, 130, 131 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -988,16 +990,16 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, 10, 9, 8, 6, 5, 0, 3, 6, 3, 2, - 1, 1, 0, 1, 1, 1, 1, 1, 5, 3, - 5, 1, 3, 1, 2, 2, 1, 1, 1, 1, - 0, 4, 4, 5, 1, 3, 3, 8, 9, 2, - 2, 0, 2, 4, 3, 3, 3, 3, 3, 2, - 1, 1, 1, 3, 1, 1, 0, 1, 2, 4, - 3, 1, 3, 1, 2, 4, 3, 6, 0, 2, - 3, 2, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, - 1, 3, 1, 2, 2, 0, 3, 0, 2, 7, - 2, 4, 0, 1 + 1, 1, 0, 1, 1, 1, 1, 1, 1, 5, + 3, 5, 1, 3, 1, 2, 2, 1, 1, 1, + 1, 0, 4, 4, 5, 1, 3, 3, 8, 9, + 2, 2, 0, 2, 4, 3, 3, 3, 3, 3, + 2, 1, 1, 1, 3, 1, 1, 0, 1, 2, + 4, 3, 1, 3, 1, 2, 4, 3, 6, 0, + 2, 3, 2, 3, 3, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 2, 1, 2, 1, 2, 0, + 3, 1, 3, 1, 2, 2, 0, 3, 0, 2, + 7, 2, 4, 1 }; @@ -1859,104 +1861,104 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 260 "yacc_sql.y" +#line 261 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1868 "yacc_sql.cpp" +#line 1870 "yacc_sql.cpp" break; case 24: /* exit_stmt: EXIT */ -#line 291 "yacc_sql.y" +#line 292 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1877 "yacc_sql.cpp" +#line 1879 "yacc_sql.cpp" break; case 25: /* help_stmt: HELP */ -#line 297 "yacc_sql.y" +#line 298 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1885 "yacc_sql.cpp" +#line 1887 "yacc_sql.cpp" break; case 26: /* sync_stmt: SYNC */ -#line 302 "yacc_sql.y" +#line 303 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1893 "yacc_sql.cpp" +#line 1895 "yacc_sql.cpp" break; case 27: /* begin_stmt: TRX_BEGIN */ -#line 308 "yacc_sql.y" +#line 309 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1901 "yacc_sql.cpp" +#line 1903 "yacc_sql.cpp" break; case 28: /* commit_stmt: TRX_COMMIT */ -#line 314 "yacc_sql.y" +#line 315 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1909 "yacc_sql.cpp" +#line 1911 "yacc_sql.cpp" break; case 29: /* rollback_stmt: TRX_ROLLBACK */ -#line 320 "yacc_sql.y" +#line 321 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1917 "yacc_sql.cpp" +#line 1919 "yacc_sql.cpp" break; case 30: /* drop_table_stmt: DROP TABLE ID */ -#line 326 "yacc_sql.y" +#line 327 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1927 "yacc_sql.cpp" +#line 1929 "yacc_sql.cpp" break; case 31: /* show_tables_stmt: SHOW TABLES */ -#line 333 "yacc_sql.y" +#line 334 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1935 "yacc_sql.cpp" +#line 1937 "yacc_sql.cpp" break; case 32: /* desc_table_stmt: DESC ID */ -#line 339 "yacc_sql.y" +#line 340 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1945 "yacc_sql.cpp" +#line 1947 "yacc_sql.cpp" break; case 33: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 348 "yacc_sql.y" +#line 349 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1956 "yacc_sql.cpp" +#line 1958 "yacc_sql.cpp" break; case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 358 "yacc_sql.y" +#line 359 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1968,43 +1970,43 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1972 "yacc_sql.cpp" +#line 1974 "yacc_sql.cpp" break; case 35: /* opt_unique: UNIQUE */ -#line 372 "yacc_sql.y" +#line 373 "yacc_sql.y" { (yyval.unique) = true; } -#line 1978 "yacc_sql.cpp" +#line 1980 "yacc_sql.cpp" break; case 36: /* opt_unique: %empty */ -#line 373 "yacc_sql.y" +#line 374 "yacc_sql.y" { (yyval.unique) = false; } -#line 1984 "yacc_sql.cpp" +#line 1986 "yacc_sql.cpp" break; case 37: /* attr_list: ID */ -#line 378 "yacc_sql.y" +#line 379 "yacc_sql.y" { (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1994 "yacc_sql.cpp" +#line 1996 "yacc_sql.cpp" break; case 38: /* attr_list: ID COMMA attr_list */ -#line 384 "yacc_sql.y" +#line 385 "yacc_sql.y" { (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2004 "yacc_sql.cpp" +#line 2006 "yacc_sql.cpp" break; case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 393 "yacc_sql.y" +#line 394 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -2012,59 +2014,59 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2016 "yacc_sql.cpp" +#line 2018 "yacc_sql.cpp" break; case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ -#line 403 "yacc_sql.y" +#line 404 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2024 "yacc_sql.cpp" +#line 2026 "yacc_sql.cpp" break; case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ -#line 407 "yacc_sql.y" +#line 408 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2032 "yacc_sql.cpp" +#line 2034 "yacc_sql.cpp" break; case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 411 "yacc_sql.y" +#line 412 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2040 "yacc_sql.cpp" +#line 2042 "yacc_sql.cpp" break; case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ -#line 415 "yacc_sql.y" +#line 416 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2048 "yacc_sql.cpp" +#line 2050 "yacc_sql.cpp" break; case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ -#line 419 "yacc_sql.y" +#line 420 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2056 "yacc_sql.cpp" +#line 2058 "yacc_sql.cpp" break; case 45: /* attr_def_list: %empty */ -#line 425 "yacc_sql.y" +#line 426 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2064 "yacc_sql.cpp" +#line 2066 "yacc_sql.cpp" break; case 46: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 429 "yacc_sql.y" +#line 430 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -2074,27 +2076,31 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2078 "yacc_sql.cpp" +#line 2080 "yacc_sql.cpp" break; case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 442 "yacc_sql.y" +#line 443 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + if ((yyval.attr_info)->type == AttrType::CHARS) { + (yyval.attr_info)->length = (yyvsp[-2].number); + } else { //vector + (yyval.attr_info)->length = 4*(yyvsp[-2].number); + } (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; } free((yyvsp[-5].string)); } -#line 2094 "yacc_sql.cpp" +#line 2100 "yacc_sql.cpp" break; case 48: /* attr_def: ID type nullable_constraint */ -#line 454 "yacc_sql.y" +#line 459 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -2118,73 +2124,79 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2122 "yacc_sql.cpp" +#line 2128 "yacc_sql.cpp" break; case 49: /* nullable_constraint: NOT NULL_T */ -#line 481 "yacc_sql.y" +#line 486 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2130 "yacc_sql.cpp" +#line 2136 "yacc_sql.cpp" break; case 50: /* nullable_constraint: NULLABLE */ -#line 485 "yacc_sql.y" +#line 490 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2138 "yacc_sql.cpp" +#line 2144 "yacc_sql.cpp" break; case 51: /* nullable_constraint: NULL_T */ -#line 489 "yacc_sql.y" +#line 494 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2146 "yacc_sql.cpp" +#line 2152 "yacc_sql.cpp" break; case 52: /* nullable_constraint: %empty */ -#line 493 "yacc_sql.y" +#line 498 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2154 "yacc_sql.cpp" +#line 2160 "yacc_sql.cpp" break; case 53: /* type: INT_T */ -#line 499 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::INTS); } -#line 2160 "yacc_sql.cpp" +#line 504 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::INTS); } +#line 2166 "yacc_sql.cpp" break; case 54: /* type: STRING_T */ -#line 500 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2166 "yacc_sql.cpp" +#line 505 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::CHARS); } +#line 2172 "yacc_sql.cpp" break; case 55: /* type: FLOAT_T */ -#line 501 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2172 "yacc_sql.cpp" +#line 506 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::FLOATS); } +#line 2178 "yacc_sql.cpp" break; case 56: /* type: DATE_T */ -#line 502 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::DATES); } -#line 2178 "yacc_sql.cpp" +#line 507 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 2184 "yacc_sql.cpp" break; case 57: /* type: TEXT_T */ -#line 503 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2184 "yacc_sql.cpp" +#line 508 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::TEXTS); } +#line 2190 "yacc_sql.cpp" break; - case 58: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 508 "yacc_sql.y" + case 58: /* type: VECTOR_T */ +#line 509 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::VECTOR); } +#line 2196 "yacc_sql.cpp" + break; + + case 59: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 514 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2194,128 +2206,128 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2198 "yacc_sql.cpp" +#line 2210 "yacc_sql.cpp" break; - case 59: /* values_list: LBRACE value_list RBRACE */ -#line 521 "yacc_sql.y" + case 60: /* values_list: LBRACE value_list RBRACE */ +#line 527 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2208 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; - case 60: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 527 "yacc_sql.y" + case 61: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 533 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2217 "yacc_sql.cpp" +#line 2229 "yacc_sql.cpp" break; - case 61: /* value_list: value */ -#line 534 "yacc_sql.y" + case 62: /* value_list: value */ +#line 540 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2227 "yacc_sql.cpp" +#line 2239 "yacc_sql.cpp" break; - case 62: /* value_list: value_list COMMA value */ -#line 540 "yacc_sql.y" + case 63: /* value_list: value_list COMMA value */ +#line 546 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2236 "yacc_sql.cpp" +#line 2248 "yacc_sql.cpp" break; - case 63: /* value: nonnegative_value */ -#line 547 "yacc_sql.y" + case 64: /* value: nonnegative_value */ +#line 553 "yacc_sql.y" { (yyval.value) = (yyvsp[0].value); } -#line 2244 "yacc_sql.cpp" +#line 2256 "yacc_sql.cpp" break; - case 64: /* value: '-' NUMBER */ -#line 550 "yacc_sql.y" + case 65: /* value: '-' NUMBER */ +#line 556 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2253 "yacc_sql.cpp" +#line 2265 "yacc_sql.cpp" break; - case 65: /* value: '-' FLOAT */ -#line 554 "yacc_sql.y" + case 66: /* value: '-' FLOAT */ +#line 560 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2262 "yacc_sql.cpp" +#line 2274 "yacc_sql.cpp" break; - case 66: /* nonnegative_value: NUMBER */ -#line 561 "yacc_sql.y" + case 67: /* nonnegative_value: NUMBER */ +#line 567 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2271 "yacc_sql.cpp" +#line 2283 "yacc_sql.cpp" break; - case 67: /* nonnegative_value: FLOAT */ -#line 565 "yacc_sql.y" + case 68: /* nonnegative_value: FLOAT */ +#line 571 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2280 "yacc_sql.cpp" +#line 2292 "yacc_sql.cpp" break; - case 68: /* nonnegative_value: SSS */ -#line 569 "yacc_sql.y" + case 69: /* nonnegative_value: SSS */ +#line 575 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2291 "yacc_sql.cpp" +#line 2303 "yacc_sql.cpp" break; - case 69: /* nonnegative_value: NULL_T */ -#line 575 "yacc_sql.y" + case 70: /* nonnegative_value: NULL_T */ +#line 581 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2299 "yacc_sql.cpp" +#line 2311 "yacc_sql.cpp" break; - case 70: /* storage_format: %empty */ -#line 582 "yacc_sql.y" + case 71: /* storage_format: %empty */ +#line 588 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2307 "yacc_sql.cpp" +#line 2319 "yacc_sql.cpp" break; - case 71: /* storage_format: STORAGE FORMAT EQ ID */ -#line 586 "yacc_sql.y" + case 72: /* storage_format: STORAGE FORMAT EQ ID */ +#line 592 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2315 "yacc_sql.cpp" +#line 2327 "yacc_sql.cpp" break; - case 72: /* delete_stmt: DELETE FROM ID where */ -#line 593 "yacc_sql.y" + case 73: /* delete_stmt: DELETE FROM ID where */ +#line 599 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2324,11 +2336,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2328 "yacc_sql.cpp" +#line 2340 "yacc_sql.cpp" break; - case 73: /* update_stmt: UPDATE ID SET setClauses where */ -#line 605 "yacc_sql.y" + case 74: /* update_stmt: UPDATE ID SET setClauses where */ +#line 611 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2339,39 +2351,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2343 "yacc_sql.cpp" +#line 2355 "yacc_sql.cpp" break; - case 74: /* setClauses: setClause */ -#line 619 "yacc_sql.y" + case 75: /* setClauses: setClause */ +#line 625 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2352 "yacc_sql.cpp" +#line 2364 "yacc_sql.cpp" break; - case 75: /* setClauses: setClauses COMMA setClause */ -#line 624 "yacc_sql.y" + case 76: /* setClauses: setClauses COMMA setClause */ +#line 630 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2360 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; - case 76: /* setClause: ID EQ expression */ -#line 631 "yacc_sql.y" + case 77: /* setClause: ID EQ expression */ +#line 637 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2371 "yacc_sql.cpp" +#line 2383 "yacc_sql.cpp" break; - case 77: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ -#line 641 "yacc_sql.y" + case 78: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ +#line 647 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-6].expression_list) != nullptr) { @@ -2404,11 +2416,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2408 "yacc_sql.cpp" +#line 2420 "yacc_sql.cpp" break; - case 78: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 674 "yacc_sql.y" + case 79: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 680 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2438,39 +2450,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2442 "yacc_sql.cpp" +#line 2454 "yacc_sql.cpp" break; - case 79: /* calc_stmt: CALC expression_list */ -#line 707 "yacc_sql.y" + case 80: /* calc_stmt: CALC expression_list */ +#line 713 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2452 "yacc_sql.cpp" +#line 2464 "yacc_sql.cpp" break; - case 80: /* calc_stmt: SELECT expression_list */ -#line 713 "yacc_sql.y" + case 81: /* calc_stmt: SELECT expression_list */ +#line 719 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2462 "yacc_sql.cpp" +#line 2474 "yacc_sql.cpp" break; - case 81: /* expression_list: %empty */ -#line 721 "yacc_sql.y" + case 82: /* expression_list: %empty */ +#line 727 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2470 "yacc_sql.cpp" +#line 2482 "yacc_sql.cpp" break; - case 82: /* expression_list: expression alias */ -#line 725 "yacc_sql.y" + case 83: /* expression_list: expression alias */ +#line 731 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2479,11 +2491,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2483 "yacc_sql.cpp" +#line 2495 "yacc_sql.cpp" break; - case 83: /* expression_list: expression alias COMMA expression_list */ -#line 734 "yacc_sql.y" + case 84: /* expression_list: expression alias COMMA expression_list */ +#line 740 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2496,43 +2508,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2500 "yacc_sql.cpp" +#line 2512 "yacc_sql.cpp" break; - case 84: /* expression: expression '+' expression */ -#line 749 "yacc_sql.y" + case 85: /* expression: expression '+' expression */ +#line 755 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2508 "yacc_sql.cpp" +#line 2520 "yacc_sql.cpp" break; - case 85: /* expression: expression '-' expression */ -#line 752 "yacc_sql.y" + case 86: /* expression: expression '-' expression */ +#line 758 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2516 "yacc_sql.cpp" +#line 2528 "yacc_sql.cpp" break; - case 86: /* expression: expression '*' expression */ -#line 755 "yacc_sql.y" + case 87: /* expression: expression '*' expression */ +#line 761 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2524 "yacc_sql.cpp" +#line 2536 "yacc_sql.cpp" break; - case 87: /* expression: expression '/' expression */ -#line 758 "yacc_sql.y" + case 88: /* expression: expression '/' expression */ +#line 764 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2532 "yacc_sql.cpp" +#line 2544 "yacc_sql.cpp" break; - case 88: /* expression: LBRACE expression_list RBRACE */ -#line 761 "yacc_sql.y" + case 89: /* expression: LBRACE expression_list RBRACE */ +#line 767 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2541,122 +2553,122 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2545 "yacc_sql.cpp" +#line 2557 "yacc_sql.cpp" break; - case 89: /* expression: '-' expression */ -#line 769 "yacc_sql.y" + case 90: /* expression: '-' expression */ +#line 775 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2553 "yacc_sql.cpp" +#line 2565 "yacc_sql.cpp" break; - case 90: /* expression: nonnegative_value */ -#line 772 "yacc_sql.y" + case 91: /* expression: nonnegative_value */ +#line 778 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2563 "yacc_sql.cpp" +#line 2575 "yacc_sql.cpp" break; - case 91: /* expression: rel_attr */ -#line 777 "yacc_sql.y" + case 92: /* expression: rel_attr */ +#line 783 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2574 "yacc_sql.cpp" +#line 2586 "yacc_sql.cpp" break; - case 92: /* expression: '*' */ -#line 783 "yacc_sql.y" + case 93: /* expression: '*' */ +#line 789 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2582 "yacc_sql.cpp" +#line 2594 "yacc_sql.cpp" break; - case 93: /* expression: ID DOT '*' */ -#line 786 "yacc_sql.y" + case 94: /* expression: ID DOT '*' */ +#line 792 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2590 "yacc_sql.cpp" +#line 2602 "yacc_sql.cpp" break; - case 94: /* expression: aggr_func_expr */ -#line 789 "yacc_sql.y" + case 95: /* expression: aggr_func_expr */ +#line 795 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2598 "yacc_sql.cpp" +#line 2610 "yacc_sql.cpp" break; - case 95: /* expression: sub_query_expr */ -#line 792 "yacc_sql.y" + case 96: /* expression: sub_query_expr */ +#line 798 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2606 "yacc_sql.cpp" +#line 2618 "yacc_sql.cpp" break; - case 96: /* alias: %empty */ -#line 799 "yacc_sql.y" + case 97: /* alias: %empty */ +#line 805 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2614 "yacc_sql.cpp" +#line 2626 "yacc_sql.cpp" break; - case 97: /* alias: ID */ -#line 802 "yacc_sql.y" + case 98: /* alias: ID */ +#line 808 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2622 "yacc_sql.cpp" +#line 2634 "yacc_sql.cpp" break; - case 98: /* alias: AS ID */ -#line 805 "yacc_sql.y" + case 99: /* alias: AS ID */ +#line 811 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2630 "yacc_sql.cpp" +#line 2642 "yacc_sql.cpp" break; - case 99: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 811 "yacc_sql.y" + case 100: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 817 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2638 "yacc_sql.cpp" +#line 2650 "yacc_sql.cpp" break; - case 100: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 818 "yacc_sql.y" + case 101: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 824 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2646 "yacc_sql.cpp" +#line 2658 "yacc_sql.cpp" break; - case 101: /* rel_attr: ID */ -#line 824 "yacc_sql.y" + case 102: /* rel_attr: ID */ +#line 830 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2656 "yacc_sql.cpp" +#line 2668 "yacc_sql.cpp" break; - case 102: /* rel_attr: ID DOT ID */ -#line 829 "yacc_sql.y" + case 103: /* rel_attr: ID DOT ID */ +#line 835 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2664,19 +2676,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2668 "yacc_sql.cpp" +#line 2680 "yacc_sql.cpp" break; - case 103: /* relation: ID */ -#line 839 "yacc_sql.y" + case 104: /* relation: ID */ +#line 845 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2676 "yacc_sql.cpp" +#line 2688 "yacc_sql.cpp" break; - case 104: /* rel_list: relation alias */ -#line 845 "yacc_sql.y" + case 105: /* rel_list: relation alias */ +#line 851 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2687,11 +2699,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2691 "yacc_sql.cpp" +#line 2703 "yacc_sql.cpp" break; - case 105: /* rel_list: relation alias COMMA rel_list */ -#line 855 "yacc_sql.y" + case 106: /* rel_list: relation alias COMMA rel_list */ +#line 861 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2706,22 +2718,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2710 "yacc_sql.cpp" +#line 2722 "yacc_sql.cpp" break; - case 106: /* joinClauses: relation ON condition */ -#line 873 "yacc_sql.y" + case 107: /* joinClauses: relation ON condition */ +#line 879 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2721 "yacc_sql.cpp" +#line 2733 "yacc_sql.cpp" break; - case 107: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 880 "yacc_sql.y" + case 108: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 886 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2729,243 +2741,243 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2733 "yacc_sql.cpp" +#line 2745 "yacc_sql.cpp" break; - case 108: /* where: %empty */ -#line 891 "yacc_sql.y" + case 109: /* where: %empty */ +#line 897 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2741 "yacc_sql.cpp" +#line 2753 "yacc_sql.cpp" break; - case 109: /* where: WHERE condition */ -#line 894 "yacc_sql.y" + case 110: /* where: WHERE condition */ +#line 900 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2749 "yacc_sql.cpp" +#line 2761 "yacc_sql.cpp" break; - case 110: /* condition: expression comp_op expression */ -#line 901 "yacc_sql.y" + case 111: /* condition: expression comp_op expression */ +#line 907 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2757 "yacc_sql.cpp" +#line 2769 "yacc_sql.cpp" break; - case 111: /* condition: comp_op expression */ -#line 905 "yacc_sql.y" + case 112: /* condition: comp_op expression */ +#line 911 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2768 "yacc_sql.cpp" +#line 2780 "yacc_sql.cpp" break; - case 112: /* condition: condition AND condition */ -#line 912 "yacc_sql.y" + case 113: /* condition: condition AND condition */ +#line 918 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2776 "yacc_sql.cpp" +#line 2788 "yacc_sql.cpp" break; - case 113: /* condition: condition OR condition */ -#line 916 "yacc_sql.y" + case 114: /* condition: condition OR condition */ +#line 922 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2784 "yacc_sql.cpp" +#line 2796 "yacc_sql.cpp" break; - case 114: /* comp_op: EQ */ -#line 922 "yacc_sql.y" + case 115: /* comp_op: EQ */ +#line 928 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2790 "yacc_sql.cpp" +#line 2802 "yacc_sql.cpp" break; - case 115: /* comp_op: LT */ -#line 923 "yacc_sql.y" + case 116: /* comp_op: LT */ +#line 929 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2796 "yacc_sql.cpp" +#line 2808 "yacc_sql.cpp" break; - case 116: /* comp_op: GT */ -#line 924 "yacc_sql.y" + case 117: /* comp_op: GT */ +#line 930 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2802 "yacc_sql.cpp" +#line 2814 "yacc_sql.cpp" break; - case 117: /* comp_op: LE */ -#line 925 "yacc_sql.y" + case 118: /* comp_op: LE */ +#line 931 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2808 "yacc_sql.cpp" +#line 2820 "yacc_sql.cpp" break; - case 118: /* comp_op: GE */ -#line 926 "yacc_sql.y" + case 119: /* comp_op: GE */ +#line 932 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2814 "yacc_sql.cpp" +#line 2826 "yacc_sql.cpp" break; - case 119: /* comp_op: NE */ -#line 927 "yacc_sql.y" + case 120: /* comp_op: NE */ +#line 933 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2820 "yacc_sql.cpp" +#line 2832 "yacc_sql.cpp" break; - case 120: /* comp_op: IS */ -#line 928 "yacc_sql.y" + case 121: /* comp_op: IS */ +#line 934 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2826 "yacc_sql.cpp" +#line 2838 "yacc_sql.cpp" break; - case 121: /* comp_op: IS NOT */ -#line 929 "yacc_sql.y" + case 122: /* comp_op: IS NOT */ +#line 935 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2832 "yacc_sql.cpp" +#line 2844 "yacc_sql.cpp" break; - case 122: /* comp_op: LIKE */ -#line 930 "yacc_sql.y" + case 123: /* comp_op: LIKE */ +#line 936 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2838 "yacc_sql.cpp" +#line 2850 "yacc_sql.cpp" break; - case 123: /* comp_op: NOT LIKE */ -#line 931 "yacc_sql.y" + case 124: /* comp_op: NOT LIKE */ +#line 937 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2844 "yacc_sql.cpp" +#line 2856 "yacc_sql.cpp" break; - case 124: /* comp_op: IN */ -#line 932 "yacc_sql.y" + case 125: /* comp_op: IN */ +#line 938 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2850 "yacc_sql.cpp" +#line 2862 "yacc_sql.cpp" break; - case 125: /* comp_op: NOT IN */ -#line 933 "yacc_sql.y" + case 126: /* comp_op: NOT IN */ +#line 939 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2856 "yacc_sql.cpp" +#line 2868 "yacc_sql.cpp" break; - case 126: /* comp_op: EXISTS */ -#line 934 "yacc_sql.y" + case 127: /* comp_op: EXISTS */ +#line 940 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2862 "yacc_sql.cpp" +#line 2874 "yacc_sql.cpp" break; - case 127: /* comp_op: NOT EXISTS */ -#line 935 "yacc_sql.y" + case 128: /* comp_op: NOT EXISTS */ +#line 941 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2868 "yacc_sql.cpp" +#line 2880 "yacc_sql.cpp" break; - case 128: /* opt_order_by: %empty */ -#line 940 "yacc_sql.y" + case 129: /* opt_order_by: %empty */ +#line 946 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2876 "yacc_sql.cpp" +#line 2888 "yacc_sql.cpp" break; - case 129: /* opt_order_by: ORDER BY sort_list */ -#line 944 "yacc_sql.y" + case 130: /* opt_order_by: ORDER BY sort_list */ +#line 950 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2885 "yacc_sql.cpp" +#line 2897 "yacc_sql.cpp" break; - case 130: /* sort_list: sort_unit */ -#line 952 "yacc_sql.y" + case 131: /* sort_list: sort_unit */ +#line 958 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2894 "yacc_sql.cpp" +#line 2906 "yacc_sql.cpp" break; - case 131: /* sort_list: sort_unit COMMA sort_list */ -#line 957 "yacc_sql.y" + case 132: /* sort_list: sort_unit COMMA sort_list */ +#line 963 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2903 "yacc_sql.cpp" +#line 2915 "yacc_sql.cpp" break; - case 132: /* sort_unit: expression */ -#line 965 "yacc_sql.y" + case 133: /* sort_unit: expression */ +#line 971 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2913 "yacc_sql.cpp" +#line 2925 "yacc_sql.cpp" break; - case 133: /* sort_unit: expression DESC */ -#line 971 "yacc_sql.y" + case 134: /* sort_unit: expression DESC */ +#line 977 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2923 "yacc_sql.cpp" +#line 2935 "yacc_sql.cpp" break; - case 134: /* sort_unit: expression ASC */ -#line 977 "yacc_sql.y" + case 135: /* sort_unit: expression ASC */ +#line 983 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2933 "yacc_sql.cpp" +#line 2945 "yacc_sql.cpp" break; - case 135: /* group_by: %empty */ -#line 986 "yacc_sql.y" + case 136: /* group_by: %empty */ +#line 992 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2941 "yacc_sql.cpp" +#line 2953 "yacc_sql.cpp" break; - case 136: /* group_by: GROUP BY expression_list */ -#line 990 "yacc_sql.y" + case 137: /* group_by: GROUP BY expression_list */ +#line 996 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2949 "yacc_sql.cpp" +#line 2961 "yacc_sql.cpp" break; - case 137: /* opt_having: %empty */ -#line 997 "yacc_sql.y" + case 138: /* opt_having: %empty */ +#line 1003 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2957 "yacc_sql.cpp" +#line 2969 "yacc_sql.cpp" break; - case 138: /* opt_having: HAVING condition */ -#line 1001 "yacc_sql.y" + case 139: /* opt_having: HAVING condition */ +#line 1007 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2965 "yacc_sql.cpp" +#line 2977 "yacc_sql.cpp" break; - case 139: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 1008 "yacc_sql.y" + case 140: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 1014 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2975,20 +2987,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2979 "yacc_sql.cpp" +#line 2991 "yacc_sql.cpp" break; - case 140: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1021 "yacc_sql.y" + case 141: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1027 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2988 "yacc_sql.cpp" +#line 3000 "yacc_sql.cpp" break; - case 141: /* set_variable_stmt: SET ID EQ value */ -#line 1029 "yacc_sql.y" + case 142: /* set_variable_stmt: SET ID EQ value */ +#line 1035 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2996,11 +3008,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3000 "yacc_sql.cpp" +#line 3012 "yacc_sql.cpp" break; -#line 3004 "yacc_sql.cpp" +#line 3016 "yacc_sql.cpp" default: break; } @@ -3229,7 +3241,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1041 "yacc_sql.y" +#line 1047 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 8521ddee..fdc48932 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -87,42 +87,43 @@ extern int yydebug; FLOAT_T = 288, /* FLOAT_T */ DATE_T = 289, /* DATE_T */ TEXT_T = 290, /* TEXT_T */ - NOT = 291, /* NOT */ - UNIQUE = 292, /* UNIQUE */ - NULL_T = 293, /* NULL_T */ - NULLABLE = 294, /* NULLABLE */ - HELP = 295, /* HELP */ - EXIT = 296, /* EXIT */ - DOT = 297, /* DOT */ - INTO = 298, /* INTO */ - VALUES = 299, /* VALUES */ - FROM = 300, /* FROM */ - WHERE = 301, /* WHERE */ - AND = 302, /* AND */ - OR = 303, /* OR */ - SET = 304, /* SET */ - ON = 305, /* ON */ - LOAD = 306, /* LOAD */ - DATA = 307, /* DATA */ - INFILE = 308, /* INFILE */ - EXPLAIN = 309, /* EXPLAIN */ - STORAGE = 310, /* STORAGE */ - FORMAT = 311, /* FORMAT */ - INNER = 312, /* INNER */ - JOIN = 313, /* JOIN */ - EQ = 314, /* EQ */ - LT = 315, /* LT */ - GT = 316, /* GT */ - LE = 317, /* LE */ - GE = 318, /* GE */ - NE = 319, /* NE */ - LIKE = 320, /* LIKE */ - IS = 321, /* IS */ - NUMBER = 322, /* NUMBER */ - FLOAT = 323, /* FLOAT */ - ID = 324, /* ID */ - SSS = 325, /* SSS */ - UMINUS = 326 /* UMINUS */ + VECTOR_T = 291, /* VECTOR_T */ + NOT = 292, /* NOT */ + UNIQUE = 293, /* UNIQUE */ + NULL_T = 294, /* NULL_T */ + NULLABLE = 295, /* NULLABLE */ + HELP = 296, /* HELP */ + EXIT = 297, /* EXIT */ + DOT = 298, /* DOT */ + INTO = 299, /* INTO */ + VALUES = 300, /* VALUES */ + FROM = 301, /* FROM */ + WHERE = 302, /* WHERE */ + AND = 303, /* AND */ + OR = 304, /* OR */ + SET = 305, /* SET */ + ON = 306, /* ON */ + LOAD = 307, /* LOAD */ + DATA = 308, /* DATA */ + INFILE = 309, /* INFILE */ + EXPLAIN = 310, /* EXPLAIN */ + STORAGE = 311, /* STORAGE */ + FORMAT = 312, /* FORMAT */ + INNER = 313, /* INNER */ + JOIN = 314, /* JOIN */ + EQ = 315, /* EQ */ + LT = 316, /* LT */ + GT = 317, /* GT */ + LE = 318, /* LE */ + GE = 319, /* GE */ + NE = 320, /* NE */ + LIKE = 321, /* LIKE */ + IS = 322, /* IS */ + NUMBER = 323, /* NUMBER */ + FLOAT = 324, /* FLOAT */ + ID = 325, /* ID */ + SSS = 326, /* SSS */ + UMINUS = 327 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -131,7 +132,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 163 "yacc_sql.y" +#line 164 "yacc_sql.y" ParsedSqlNode * sql_node; Value * value; @@ -157,7 +158,7 @@ union YYSTYPE std::vector * index_attr_list; bool unique; -#line 161 "yacc_sql.hpp" +#line 162 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 5085563c..e7c9c2c0 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -127,6 +127,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, FLOAT_T DATE_T TEXT_T + VECTOR_T NOT UNIQUE NULL_T @@ -264,8 +265,8 @@ commands: command_wrapper opt_semicolon //commands or sqls. parser starts here. ; command_wrapper: - calc_stmt - | select_stmt + select_stmt + | calc_stmt | insert_stmt | update_stmt | delete_stmt @@ -441,9 +442,13 @@ attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint { $$ = new AttrInfoSqlNode; - $$->type = (AttrType)$2; $$->name = $1; - $$->length = $4; + $$->type = (AttrType)$2; + if ($$->type == AttrType::CHARS) { + $$->length = $4; + } else { //vector + $$->length = 4*$4; + } $$->nullable = $6; if ($$->nullable) { $$->length++; @@ -496,11 +501,12 @@ nullable_constraint: ; type: - INT_T { $$ = static_cast(AttrType::INTS); } - | STRING_T { $$ = static_cast(AttrType::CHARS); } - | FLOAT_T { $$ = static_cast(AttrType::FLOATS); } - | DATE_T { $$ = static_cast(AttrType::DATES); } - | TEXT_T { $$ = static_cast(AttrType::TEXTS); } + INT_T { $$ = static_cast(AttrType::INTS); } + | STRING_T { $$ = static_cast(AttrType::CHARS); } + | FLOAT_T { $$ = static_cast(AttrType::FLOATS); } + | DATE_T { $$ = static_cast(AttrType::DATES); } + | TEXT_T { $$ = static_cast(AttrType::TEXTS); } + | VECTOR_T { $$ = static_cast(AttrType::VECTOR); } ; insert_stmt: /*insert 语句的语法解析树*/ @@ -1036,7 +1042,7 @@ set_variable_stmt: ; opt_semicolon: /*empty*/ - | SEMICOLON + SEMICOLON ; %% //_____________________________________________________________________ From 863728d9aaa4957612035d3fc66af5ccc17c95d0 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 14 Oct 2024 21:13:26 +0800 Subject: [PATCH 232/308] =?UTF-8?q?sql=E5=BF=85=E9=A1=BB=E4=BB=A5';'?= =?UTF-8?q?=E7=BB=93=E5=B0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/lex_sql.cpp | 35 ++++++++++++++-------------- src/observer/sql/parser/lex_sql.h | 11 +++++---- src/observer/sql/parser/yacc_sql.cpp | 12 +++++----- src/observer/sql/parser/yacc_sql.y | 4 ++-- 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 6d19fb7a..828d2614 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,4 +1,4 @@ -#line 2 "lex_sql.cpp" +#line 1 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -22,7 +22,7 @@ do { \ } \ while (0); -#line 26 "lex_sql.cpp" +#line 25 "lex_sql.cpp" #define YY_INT_ALIGNED short int @@ -93,6 +93,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -257,7 +258,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -334,7 +335,7 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -381,7 +382,7 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -755,8 +756,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -813,7 +814,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); @@ -892,7 +893,7 @@ static int input ( yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1641,7 +1642,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1655,7 +1656,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1713,7 +1714,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1820,7 +1821,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -2198,12 +2199,12 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); @@ -2247,7 +2248,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ @@ -2315,7 +2316,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 46266a60..5ec521aa 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,7 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 6 "lex_sql.h" +#line 5 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -26,7 +26,7 @@ do { \ } \ while (0); -#line 30 "lex_sql.h" +#line 29 "lex_sql.h" #define YY_INT_ALIGNED short int @@ -97,6 +97,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -210,7 +211,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -254,7 +255,7 @@ void yypop_buffer_state ( yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -310,7 +311,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 1c000d96..e3843f44 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -647,7 +647,7 @@ union yyalloc /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 55 /* YYNRULES -- Number of rules. */ -#define YYNRULES 143 +#define YYNRULES 142 /* YYNSTATES -- Number of states. */ #define YYNSTATES 251 @@ -719,7 +719,7 @@ static const yytype_int16 yyrline[] = 900, 904, 911, 915, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 940, 943, 951, 956, 964, 970, 976, 986, 989, 997, 1000, 1007, - 1020, 1028, 1038, 1039 + 1020, 1028, 1039 }; #endif @@ -815,12 +815,12 @@ static const yytype_uint8 yydefact[] = { 0, 36, 0, 81, 81, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 142, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 0, 23, 22, 15, 16, 17, 18, 9, 10, 11, 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, 20, 21, 0, 35, 0, 0, 0, 81, 69, 66, 67, 101, 68, 0, 92, 90, 79, 96, 94, 95, 91, 80, 32, 31, 0, 0, 0, 0, 0, 0, - 140, 1, 143, 2, 70, 0, 30, 0, 81, 0, + 140, 1, 142, 2, 70, 0, 30, 0, 81, 0, 0, 81, 0, 89, 0, 97, 0, 0, 0, 0, 82, 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 88, 0, 102, 93, 98, @@ -977,7 +977,7 @@ static const yytype_uint8 yyr1[] = 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, 123, 123, 124, 124, 124, 125, 125, 126, 126, 127, - 128, 129, 130, 130 + 128, 129, 130 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -997,7 +997,7 @@ static const yytype_int8 yyr2[] = 3, 2, 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, 1, 3, 1, 2, 2, 0, 3, 0, 2, 7, - 2, 4, 0, 1 + 2, 4, 1 }; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 5085563c..61901ac8 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -1035,8 +1035,8 @@ set_variable_stmt: } ; -opt_semicolon: /*empty*/ - | SEMICOLON +opt_semicolon: + SEMICOLON ; %% //_____________________________________________________________________ From dfc91495004e91ac9f2edb3fc83cf8e10914769d Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Mon, 14 Oct 2024 21:23:27 +0800 Subject: [PATCH 233/308] =?UTF-8?q?Clauses=20=E4=B8=8B=E5=88=92=E7=BA=BF?= =?UTF-8?q?=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/yacc_sql.cpp | 267 ++++++++++++++------------- src/observer/sql/parser/yacc_sql.y | 16 +- 2 files changed, 142 insertions(+), 141 deletions(-) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index e3843f44..fa50e937 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -285,7 +285,7 @@ enum yysymbol_kind_t YYSYMBOL_storage_format = 103, /* storage_format */ YYSYMBOL_delete_stmt = 104, /* delete_stmt */ YYSYMBOL_update_stmt = 105, /* update_stmt */ - YYSYMBOL_setClauses = 106, /* setClauses */ + YYSYMBOL_set_clauses = 106, /* set_clauses */ YYSYMBOL_setClause = 107, /* setClause */ YYSYMBOL_select_stmt = 108, /* select_stmt */ YYSYMBOL_calc_stmt = 109, /* calc_stmt */ @@ -297,7 +297,7 @@ enum yysymbol_kind_t YYSYMBOL_rel_attr = 115, /* rel_attr */ YYSYMBOL_relation = 116, /* relation */ YYSYMBOL_rel_list = 117, /* rel_list */ - YYSYMBOL_joinClauses = 118, /* joinClauses */ + YYSYMBOL_join_clauses = 118, /* join_clauses */ YYSYMBOL_where = 119, /* where */ YYSYMBOL_condition = 120, /* condition */ YYSYMBOL_comp_op = 121, /* comp_op */ @@ -752,11 +752,12 @@ static const char *const yytname[] = "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", "type", "insert_stmt", "values_list", "value_list", "value", "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", - "setClauses", "setClause", "select_stmt", "calc_stmt", "expression_list", - "expression", "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", - "relation", "rel_list", "joinClauses", "where", "condition", "comp_op", - "opt_order_by", "sort_list", "sort_unit", "group_by", "opt_having", - "load_data_stmt", "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR + "set_clauses", "setClause", "select_stmt", "calc_stmt", + "expression_list", "expression", "alias", "aggr_func_expr", + "sub_query_expr", "rel_attr", "relation", "rel_list", "join_clauses", + "where", "condition", "comp_op", "opt_order_by", "sort_list", + "sort_unit", "group_by", "opt_having", "load_data_stmt", "explain_stmt", + "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; static const char * @@ -1864,7 +1865,7 @@ YYLTYPE yylloc = yyloc_default; std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1868 "yacc_sql.cpp" +#line 1869 "yacc_sql.cpp" break; case 24: /* exit_stmt: EXIT */ @@ -1873,7 +1874,7 @@ YYLTYPE yylloc = yyloc_default; (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1877 "yacc_sql.cpp" +#line 1878 "yacc_sql.cpp" break; case 25: /* help_stmt: HELP */ @@ -1881,7 +1882,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1885 "yacc_sql.cpp" +#line 1886 "yacc_sql.cpp" break; case 26: /* sync_stmt: SYNC */ @@ -1889,7 +1890,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1893 "yacc_sql.cpp" +#line 1894 "yacc_sql.cpp" break; case 27: /* begin_stmt: TRX_BEGIN */ @@ -1897,7 +1898,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1901 "yacc_sql.cpp" +#line 1902 "yacc_sql.cpp" break; case 28: /* commit_stmt: TRX_COMMIT */ @@ -1905,7 +1906,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1909 "yacc_sql.cpp" +#line 1910 "yacc_sql.cpp" break; case 29: /* rollback_stmt: TRX_ROLLBACK */ @@ -1913,7 +1914,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1917 "yacc_sql.cpp" +#line 1918 "yacc_sql.cpp" break; case 30: /* drop_table_stmt: DROP TABLE ID */ @@ -1923,7 +1924,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1927 "yacc_sql.cpp" +#line 1928 "yacc_sql.cpp" break; case 31: /* show_tables_stmt: SHOW TABLES */ @@ -1931,7 +1932,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1935 "yacc_sql.cpp" +#line 1936 "yacc_sql.cpp" break; case 32: /* desc_table_stmt: DESC ID */ @@ -1941,7 +1942,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1945 "yacc_sql.cpp" +#line 1946 "yacc_sql.cpp" break; case 33: /* show_index_stmt: SHOW INDEX FROM relation */ @@ -1952,7 +1953,7 @@ YYLTYPE yylloc = yyloc_default; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1956 "yacc_sql.cpp" +#line 1957 "yacc_sql.cpp" break; case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ @@ -1968,19 +1969,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1972 "yacc_sql.cpp" +#line 1973 "yacc_sql.cpp" break; case 35: /* opt_unique: UNIQUE */ #line 372 "yacc_sql.y" { (yyval.unique) = true; } -#line 1978 "yacc_sql.cpp" +#line 1979 "yacc_sql.cpp" break; case 36: /* opt_unique: %empty */ #line 373 "yacc_sql.y" { (yyval.unique) = false; } -#line 1984 "yacc_sql.cpp" +#line 1985 "yacc_sql.cpp" break; case 37: /* attr_list: ID */ @@ -1990,7 +1991,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1994 "yacc_sql.cpp" +#line 1995 "yacc_sql.cpp" break; case 38: /* attr_list: ID COMMA attr_list */ @@ -2000,7 +2001,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2004 "yacc_sql.cpp" +#line 2005 "yacc_sql.cpp" break; case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ @@ -2012,7 +2013,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2016 "yacc_sql.cpp" +#line 2017 "yacc_sql.cpp" break; case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ @@ -2020,7 +2021,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2024 "yacc_sql.cpp" +#line 2025 "yacc_sql.cpp" break; case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ @@ -2028,7 +2029,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2032 "yacc_sql.cpp" +#line 2033 "yacc_sql.cpp" break; case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ @@ -2036,7 +2037,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2040 "yacc_sql.cpp" +#line 2041 "yacc_sql.cpp" break; case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ @@ -2044,7 +2045,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2048 "yacc_sql.cpp" +#line 2049 "yacc_sql.cpp" break; case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ @@ -2052,7 +2053,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2056 "yacc_sql.cpp" +#line 2057 "yacc_sql.cpp" break; case 45: /* attr_def_list: %empty */ @@ -2060,7 +2061,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.attr_infos) = nullptr; } -#line 2064 "yacc_sql.cpp" +#line 2065 "yacc_sql.cpp" break; case 46: /* attr_def_list: COMMA attr_def attr_def_list */ @@ -2074,7 +2075,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2078 "yacc_sql.cpp" +#line 2079 "yacc_sql.cpp" break; case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ @@ -2090,7 +2091,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2094 "yacc_sql.cpp" +#line 2095 "yacc_sql.cpp" break; case 48: /* attr_def: ID type nullable_constraint */ @@ -2118,7 +2119,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2122 "yacc_sql.cpp" +#line 2123 "yacc_sql.cpp" break; case 49: /* nullable_constraint: NOT NULL_T */ @@ -2126,7 +2127,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2130 "yacc_sql.cpp" +#line 2131 "yacc_sql.cpp" break; case 50: /* nullable_constraint: NULLABLE */ @@ -2134,7 +2135,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2138 "yacc_sql.cpp" +#line 2139 "yacc_sql.cpp" break; case 51: /* nullable_constraint: NULL_T */ @@ -2142,7 +2143,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2146 "yacc_sql.cpp" +#line 2147 "yacc_sql.cpp" break; case 52: /* nullable_constraint: %empty */ @@ -2150,37 +2151,37 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2154 "yacc_sql.cpp" +#line 2155 "yacc_sql.cpp" break; case 53: /* type: INT_T */ #line 499 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2160 "yacc_sql.cpp" +#line 2161 "yacc_sql.cpp" break; case 54: /* type: STRING_T */ #line 500 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2166 "yacc_sql.cpp" +#line 2167 "yacc_sql.cpp" break; case 55: /* type: FLOAT_T */ #line 501 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2172 "yacc_sql.cpp" +#line 2173 "yacc_sql.cpp" break; case 56: /* type: DATE_T */ #line 502 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2178 "yacc_sql.cpp" +#line 2179 "yacc_sql.cpp" break; case 57: /* type: TEXT_T */ #line 503 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2184 "yacc_sql.cpp" +#line 2185 "yacc_sql.cpp" break; case 58: /* insert_stmt: INSERT INTO ID VALUES values_list */ @@ -2194,7 +2195,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2198 "yacc_sql.cpp" +#line 2199 "yacc_sql.cpp" break; case 59: /* values_list: LBRACE value_list RBRACE */ @@ -2204,7 +2205,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2208 "yacc_sql.cpp" +#line 2209 "yacc_sql.cpp" break; case 60: /* values_list: values_list COMMA LBRACE value_list RBRACE */ @@ -2213,7 +2214,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2217 "yacc_sql.cpp" +#line 2218 "yacc_sql.cpp" break; case 61: /* value_list: value */ @@ -2223,7 +2224,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2227 "yacc_sql.cpp" +#line 2228 "yacc_sql.cpp" break; case 62: /* value_list: value_list COMMA value */ @@ -2232,7 +2233,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2236 "yacc_sql.cpp" +#line 2237 "yacc_sql.cpp" break; case 63: /* value: nonnegative_value */ @@ -2240,7 +2241,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.value) = (yyvsp[0].value); } -#line 2244 "yacc_sql.cpp" +#line 2245 "yacc_sql.cpp" break; case 64: /* value: '-' NUMBER */ @@ -2249,7 +2250,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2253 "yacc_sql.cpp" +#line 2254 "yacc_sql.cpp" break; case 65: /* value: '-' FLOAT */ @@ -2258,7 +2259,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2262 "yacc_sql.cpp" +#line 2263 "yacc_sql.cpp" break; case 66: /* nonnegative_value: NUMBER */ @@ -2267,7 +2268,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2271 "yacc_sql.cpp" +#line 2272 "yacc_sql.cpp" break; case 67: /* nonnegative_value: FLOAT */ @@ -2276,7 +2277,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2280 "yacc_sql.cpp" +#line 2281 "yacc_sql.cpp" break; case 68: /* nonnegative_value: SSS */ @@ -2287,7 +2288,7 @@ YYLTYPE yylloc = yyloc_default; free(tmp); free((yyvsp[0].string)); } -#line 2291 "yacc_sql.cpp" +#line 2292 "yacc_sql.cpp" break; case 69: /* nonnegative_value: NULL_T */ @@ -2295,7 +2296,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.value) = new Value(NullValue()); } -#line 2299 "yacc_sql.cpp" +#line 2300 "yacc_sql.cpp" break; case 70: /* storage_format: %empty */ @@ -2303,7 +2304,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = nullptr; } -#line 2307 "yacc_sql.cpp" +#line 2308 "yacc_sql.cpp" break; case 71: /* storage_format: STORAGE FORMAT EQ ID */ @@ -2311,7 +2312,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = (yyvsp[0].string); } -#line 2315 "yacc_sql.cpp" +#line 2316 "yacc_sql.cpp" break; case 72: /* delete_stmt: DELETE FROM ID where */ @@ -2324,10 +2325,10 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2328 "yacc_sql.cpp" +#line 2329 "yacc_sql.cpp" break; - case 73: /* update_stmt: UPDATE ID SET setClauses where */ + case 73: /* update_stmt: UPDATE ID SET set_clauses where */ #line 605 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); @@ -2339,24 +2340,24 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2343 "yacc_sql.cpp" +#line 2344 "yacc_sql.cpp" break; - case 74: /* setClauses: setClause */ + case 74: /* set_clauses: setClause */ #line 619 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2352 "yacc_sql.cpp" +#line 2353 "yacc_sql.cpp" break; - case 75: /* setClauses: setClauses COMMA setClause */ + case 75: /* set_clauses: set_clauses COMMA setClause */ #line 624 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2360 "yacc_sql.cpp" +#line 2361 "yacc_sql.cpp" break; case 76: /* setClause: ID EQ expression */ @@ -2367,7 +2368,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2371 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; case 77: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ @@ -2404,10 +2405,10 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2408 "yacc_sql.cpp" +#line 2409 "yacc_sql.cpp" break; - case 78: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ + case 78: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ #line 674 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2438,7 +2439,7 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2442 "yacc_sql.cpp" +#line 2443 "yacc_sql.cpp" break; case 79: /* calc_stmt: CALC expression_list */ @@ -2448,7 +2449,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2452 "yacc_sql.cpp" +#line 2453 "yacc_sql.cpp" break; case 80: /* calc_stmt: SELECT expression_list */ @@ -2458,7 +2459,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2462 "yacc_sql.cpp" +#line 2463 "yacc_sql.cpp" break; case 81: /* expression_list: %empty */ @@ -2466,7 +2467,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression_list) = new std::vector>; } -#line 2470 "yacc_sql.cpp" +#line 2471 "yacc_sql.cpp" break; case 82: /* expression_list: expression alias */ @@ -2479,7 +2480,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2483 "yacc_sql.cpp" +#line 2484 "yacc_sql.cpp" break; case 83: /* expression_list: expression alias COMMA expression_list */ @@ -2496,7 +2497,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2500 "yacc_sql.cpp" +#line 2501 "yacc_sql.cpp" break; case 84: /* expression: expression '+' expression */ @@ -2504,7 +2505,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2508 "yacc_sql.cpp" +#line 2509 "yacc_sql.cpp" break; case 85: /* expression: expression '-' expression */ @@ -2512,7 +2513,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2516 "yacc_sql.cpp" +#line 2517 "yacc_sql.cpp" break; case 86: /* expression: expression '*' expression */ @@ -2520,7 +2521,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2524 "yacc_sql.cpp" +#line 2525 "yacc_sql.cpp" break; case 87: /* expression: expression '/' expression */ @@ -2528,7 +2529,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2532 "yacc_sql.cpp" +#line 2533 "yacc_sql.cpp" break; case 88: /* expression: LBRACE expression_list RBRACE */ @@ -2541,7 +2542,7 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2545 "yacc_sql.cpp" +#line 2546 "yacc_sql.cpp" break; case 89: /* expression: '-' expression */ @@ -2549,7 +2550,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2553 "yacc_sql.cpp" +#line 2554 "yacc_sql.cpp" break; case 90: /* expression: nonnegative_value */ @@ -2559,7 +2560,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2563 "yacc_sql.cpp" +#line 2564 "yacc_sql.cpp" break; case 91: /* expression: rel_attr */ @@ -2570,7 +2571,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2574 "yacc_sql.cpp" +#line 2575 "yacc_sql.cpp" break; case 92: /* expression: '*' */ @@ -2578,7 +2579,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = new StarExpr(); } -#line 2582 "yacc_sql.cpp" +#line 2583 "yacc_sql.cpp" break; case 93: /* expression: ID DOT '*' */ @@ -2586,7 +2587,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2590 "yacc_sql.cpp" +#line 2591 "yacc_sql.cpp" break; case 94: /* expression: aggr_func_expr */ @@ -2594,7 +2595,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2598 "yacc_sql.cpp" +#line 2599 "yacc_sql.cpp" break; case 95: /* expression: sub_query_expr */ @@ -2602,7 +2603,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2606 "yacc_sql.cpp" +#line 2607 "yacc_sql.cpp" break; case 96: /* alias: %empty */ @@ -2610,7 +2611,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = nullptr; } -#line 2614 "yacc_sql.cpp" +#line 2615 "yacc_sql.cpp" break; case 97: /* alias: ID */ @@ -2618,7 +2619,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = (yyvsp[0].string); } -#line 2622 "yacc_sql.cpp" +#line 2623 "yacc_sql.cpp" break; case 98: /* alias: AS ID */ @@ -2626,7 +2627,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = (yyvsp[0].string); } -#line 2630 "yacc_sql.cpp" +#line 2631 "yacc_sql.cpp" break; case 99: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ @@ -2634,7 +2635,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2638 "yacc_sql.cpp" +#line 2639 "yacc_sql.cpp" break; case 100: /* sub_query_expr: LBRACE select_stmt RBRACE */ @@ -2642,7 +2643,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2646 "yacc_sql.cpp" +#line 2647 "yacc_sql.cpp" break; case 101: /* rel_attr: ID */ @@ -2652,7 +2653,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2656 "yacc_sql.cpp" +#line 2657 "yacc_sql.cpp" break; case 102: /* rel_attr: ID DOT ID */ @@ -2664,7 +2665,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2668 "yacc_sql.cpp" +#line 2669 "yacc_sql.cpp" break; case 103: /* relation: ID */ @@ -2672,7 +2673,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.string) = (yyvsp[0].string); } -#line 2676 "yacc_sql.cpp" +#line 2677 "yacc_sql.cpp" break; case 104: /* rel_list: relation alias */ @@ -2687,7 +2688,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2691 "yacc_sql.cpp" +#line 2692 "yacc_sql.cpp" break; case 105: /* rel_list: relation alias COMMA rel_list */ @@ -2706,10 +2707,10 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2710 "yacc_sql.cpp" +#line 2711 "yacc_sql.cpp" break; - case 106: /* joinClauses: relation ON condition */ + case 106: /* join_clauses: relation ON condition */ #line 873 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; @@ -2717,10 +2718,10 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2721 "yacc_sql.cpp" +#line 2722 "yacc_sql.cpp" break; - case 107: /* joinClauses: relation ON condition INNER JOIN joinClauses */ + case 107: /* join_clauses: relation ON condition INNER JOIN join_clauses */ #line 880 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); @@ -2729,7 +2730,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2733 "yacc_sql.cpp" +#line 2734 "yacc_sql.cpp" break; case 108: /* where: %empty */ @@ -2737,7 +2738,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = nullptr; } -#line 2741 "yacc_sql.cpp" +#line 2742 "yacc_sql.cpp" break; case 109: /* where: WHERE condition */ @@ -2745,7 +2746,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = (yyvsp[0].expression); } -#line 2749 "yacc_sql.cpp" +#line 2750 "yacc_sql.cpp" break; case 110: /* condition: expression comp_op expression */ @@ -2753,7 +2754,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2757 "yacc_sql.cpp" +#line 2758 "yacc_sql.cpp" break; case 111: /* condition: comp_op expression */ @@ -2764,7 +2765,7 @@ YYLTYPE yylloc = yyloc_default; ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2768 "yacc_sql.cpp" +#line 2769 "yacc_sql.cpp" break; case 112: /* condition: condition AND condition */ @@ -2772,7 +2773,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2776 "yacc_sql.cpp" +#line 2777 "yacc_sql.cpp" break; case 113: /* condition: condition OR condition */ @@ -2780,91 +2781,91 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2784 "yacc_sql.cpp" +#line 2785 "yacc_sql.cpp" break; case 114: /* comp_op: EQ */ #line 922 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2790 "yacc_sql.cpp" +#line 2791 "yacc_sql.cpp" break; case 115: /* comp_op: LT */ #line 923 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2796 "yacc_sql.cpp" +#line 2797 "yacc_sql.cpp" break; case 116: /* comp_op: GT */ #line 924 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2802 "yacc_sql.cpp" +#line 2803 "yacc_sql.cpp" break; case 117: /* comp_op: LE */ #line 925 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2808 "yacc_sql.cpp" +#line 2809 "yacc_sql.cpp" break; case 118: /* comp_op: GE */ #line 926 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2814 "yacc_sql.cpp" +#line 2815 "yacc_sql.cpp" break; case 119: /* comp_op: NE */ #line 927 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2820 "yacc_sql.cpp" +#line 2821 "yacc_sql.cpp" break; case 120: /* comp_op: IS */ #line 928 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2826 "yacc_sql.cpp" +#line 2827 "yacc_sql.cpp" break; case 121: /* comp_op: IS NOT */ #line 929 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2832 "yacc_sql.cpp" +#line 2833 "yacc_sql.cpp" break; case 122: /* comp_op: LIKE */ #line 930 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2838 "yacc_sql.cpp" +#line 2839 "yacc_sql.cpp" break; case 123: /* comp_op: NOT LIKE */ #line 931 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2844 "yacc_sql.cpp" +#line 2845 "yacc_sql.cpp" break; case 124: /* comp_op: IN */ #line 932 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2850 "yacc_sql.cpp" +#line 2851 "yacc_sql.cpp" break; case 125: /* comp_op: NOT IN */ #line 933 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2856 "yacc_sql.cpp" +#line 2857 "yacc_sql.cpp" break; case 126: /* comp_op: EXISTS */ #line 934 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2862 "yacc_sql.cpp" +#line 2863 "yacc_sql.cpp" break; case 127: /* comp_op: NOT EXISTS */ #line 935 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2868 "yacc_sql.cpp" +#line 2869 "yacc_sql.cpp" break; case 128: /* opt_order_by: %empty */ @@ -2872,7 +2873,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.orderby_list) = nullptr; } -#line 2876 "yacc_sql.cpp" +#line 2877 "yacc_sql.cpp" break; case 129: /* opt_order_by: ORDER BY sort_list */ @@ -2881,7 +2882,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2885 "yacc_sql.cpp" +#line 2886 "yacc_sql.cpp" break; case 130: /* sort_list: sort_unit */ @@ -2890,7 +2891,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2894 "yacc_sql.cpp" +#line 2895 "yacc_sql.cpp" break; case 131: /* sort_list: sort_unit COMMA sort_list */ @@ -2899,7 +2900,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2903 "yacc_sql.cpp" +#line 2904 "yacc_sql.cpp" break; case 132: /* sort_unit: expression */ @@ -2909,7 +2910,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2913 "yacc_sql.cpp" +#line 2914 "yacc_sql.cpp" break; case 133: /* sort_unit: expression DESC */ @@ -2919,7 +2920,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2923 "yacc_sql.cpp" +#line 2924 "yacc_sql.cpp" break; case 134: /* sort_unit: expression ASC */ @@ -2929,7 +2930,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2933 "yacc_sql.cpp" +#line 2934 "yacc_sql.cpp" break; case 135: /* group_by: %empty */ @@ -2937,7 +2938,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression_list) = nullptr; } -#line 2941 "yacc_sql.cpp" +#line 2942 "yacc_sql.cpp" break; case 136: /* group_by: GROUP BY expression_list */ @@ -2945,7 +2946,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2949 "yacc_sql.cpp" +#line 2950 "yacc_sql.cpp" break; case 137: /* opt_having: %empty */ @@ -2953,7 +2954,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = nullptr; } -#line 2957 "yacc_sql.cpp" +#line 2958 "yacc_sql.cpp" break; case 138: /* opt_having: HAVING condition */ @@ -2961,7 +2962,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.expression) = (yyvsp[0].expression); } -#line 2965 "yacc_sql.cpp" +#line 2966 "yacc_sql.cpp" break; case 139: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ @@ -2975,7 +2976,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2979 "yacc_sql.cpp" +#line 2980 "yacc_sql.cpp" break; case 140: /* explain_stmt: EXPLAIN command_wrapper */ @@ -2984,7 +2985,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2988 "yacc_sql.cpp" +#line 2989 "yacc_sql.cpp" break; case 141: /* set_variable_stmt: SET ID EQ value */ @@ -2996,11 +2997,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3000 "yacc_sql.cpp" +#line 3001 "yacc_sql.cpp" break; -#line 3004 "yacc_sql.cpp" +#line 3005 "yacc_sql.cpp" default: break; } diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 61901ac8..aa196de5 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -216,8 +216,8 @@ ParsedSqlNode *create_table_sql_node(char *table_name, %type group_by %type opt_having %type setClause -%type setClauses -%type joinClauses +%type set_clauses +%type join_clauses %type sort_unit %type sort_list %type opt_order_by @@ -601,7 +601,7 @@ delete_stmt: /* delete 语句的语法解析树*/ ; update_stmt: /* update 语句的语法解析树*/ - UPDATE ID SET setClauses where + UPDATE ID SET set_clauses where { $$ = new ParsedSqlNode(SCF_UPDATE); $$->update.relation_name = $2; @@ -614,13 +614,13 @@ update_stmt: /* update 语句的语法解析树*/ } ; -setClauses: +set_clauses: setClause { $$ = new std::vector; $$->emplace_back(std::move(*$1)); } - | setClauses COMMA setClause + | set_clauses COMMA setClause { $$->emplace_back(std::move(*$3)); } @@ -670,7 +670,7 @@ select_stmt: delete $8; } } - | SELECT expression_list FROM relation INNER JOIN joinClauses where group_by + | SELECT expression_list FROM relation INNER JOIN join_clauses where group_by { $$ = new ParsedSqlNode(SCF_SELECT); if ($2 != nullptr) { @@ -868,7 +868,7 @@ rel_list: } ; -joinClauses: +join_clauses: relation ON condition { $$ = new JoinSqlNode; @@ -876,7 +876,7 @@ joinClauses: $$->conditions = std::unique_ptr($3); free($1); } - | relation ON condition INNER JOIN joinClauses + | relation ON condition INNER JOIN join_clauses { $$ = $6; $$->relations.emplace_back($1); From 535e3bbf41c26ef36fe62c1f7e65d922d1884e9f Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 14 Oct 2024 22:08:28 +0800 Subject: [PATCH 234/308] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E5=BB=BA?= =?UTF-8?q?=E7=AB=8B=E8=A7=86=E5=9B=BE=E6=97=B6=E6=8C=87=E5=AE=9A=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/executor/create_view_executor.cpp | 3 +- src/observer/sql/parser/parse_defs.h | 1 + src/observer/sql/parser/yacc_sql.cpp | 2283 +++++++++-------- src/observer/sql/parser/yacc_sql.y | 9 + src/observer/sql/stmt/create_view_stmt.cpp | 10 +- src/observer/sql/stmt/create_view_stmt.h | 16 +- src/observer/storage/db/db.cpp | 12 +- src/observer/storage/db/db.h | 3 +- src/observer/storage/table/view.cpp | 57 +- src/observer/storage/table/view.h | 4 +- 10 files changed, 1232 insertions(+), 1166 deletions(-) diff --git a/src/observer/sql/executor/create_view_executor.cpp b/src/observer/sql/executor/create_view_executor.cpp index 321bb421..7b47839e 100644 --- a/src/observer/sql/executor/create_view_executor.cpp +++ b/src/observer/sql/executor/create_view_executor.cpp @@ -40,7 +40,8 @@ RC CreateViewExecutor::execute(SQLStageEvent *sql_event) "create view executor can not run this command: %d", static_cast(stmt->type())); - rc = session->get_current_db()->create_table(table_name, select_stmt, StorageFormat::ROW_FORMAT); + rc = session->get_current_db()->create_table( + table_name, std::move(create_view_stmt->attr_names()), select_stmt, StorageFormat::ROW_FORMAT); if (OB_FAIL(rc)) { return rc; } diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index faa3ad56..9b7a2203 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -221,6 +221,7 @@ struct CreateTableSqlNode struct CreateViewSqlNode { std::string relation_name; ///< Relation name + std::vector attribute_names; ///< attribute names std::unique_ptr create_view_select; ///< create table select }; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index bff4984f..c77d7d78 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -607,16 +607,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 75 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 276 +#define YYLAST 282 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 77 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 57 /* YYNRULES -- Number of rules. */ -#define YYNRULES 147 +#define YYNRULES 148 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 259 +#define YYNSTATES 264 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 327 @@ -1007,106 +1007,107 @@ static const yytype_int16 yyrline[] = {0, 419, 423, 430, - 441, - 451, - 454, - 467, - 479, - 506, - 510, - 514, + 438, + 450, + 460, + 463, + 476, + 488, + 515, 519, - 525, - 526, - 527, + 523, 528, - 529, - 533, - 546, - 552, - 559, - 565, - 573, - 576, - 580, - 587, - 591, - 595, - 601, - 608, - 611, - 618, - 630, - 644, - 649, - 656, - 666, - 699, - 732, - 738, + 534, + 535, + 536, + 537, + 538, + 542, + 555, + 561, + 568, + 574, + 582, + 585, + 589, + 596, + 600, + 604, + 610, + 617, + 620, + 627, + 639, + 653, + 658, + 665, + 675, + 708, + 741, 747, - 750, + 756, 759, - 775, - 778, - 781, + 768, 784, 787, - 795, - 798, - 803, - 809, + 790, + 793, + 796, + 804, + 807, 812, - 815, 818, - 825, - 828, - 831, - 836, - 843, - 850, - 855, - 865, - 871, - 881, - 898, - 905, - 917, - 920, + 821, + 824, + 827, + 834, + 837, + 840, + 845, + 852, + 859, + 864, + 874, + 880, + 890, + 907, + 914, 926, - 930, - 937, - 941, - 948, - 949, + 929, + 935, + 939, + 946, 950, - 951, - 952, - 953, - 954, - 955, - 956, 957, 958, 959, 960, 961, + 962, + 963, + 964, + 965, 966, + 967, + 968, 969, - 977, - 982, - 990, - 996, - 1002, - 1012, - 1015, - 1023, - 1026, - 1033, - 1046, - 1054, - 1064, - 1065}; + 970, + 975, + 978, + 986, + 991, + 999, + 1005, + 1011, + 1021, + 1024, + 1032, + 1035, + 1042, + 1055, + 1063, + 1073, + 1074}; #endif /** Accessing symbol of state STATE. */ @@ -1258,7 +1259,7 @@ static const char *const yytname[] = {"\"end of file\"", static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif -#define YYPACT_NINF (-175) +#define YYPACT_NINF (-170) #define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) @@ -1268,265 +1269,270 @@ static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysy /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {222, - 47, - 28, - 27, - 27, - -52, - 38, - -175, - -20, - -19, - -41, - -175, - -175, - -175, - -175, - -175, - -35, - 2, - 222, - 56, - 85, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - 23, - -175, - 37, +static const yytype_int16 yypact[] = {228, 44, - 40, - 45, - 79, - -7, - -175, - -175, - -175, - 6, - -175, - 27, - -175, - -175, - -175, + 30, + 31, + 31, + -44, + 108, + -170, + 7, + -12, + -16, + -170, + -170, + -170, + -170, + -170, 0, - -175, - -175, - -175, - 54, - -175, - -175, - 78, - 89, - 90, + 16, + 228, + 60, + 93, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + 38, + -170, + 45, 113, - 101, - 111, - -175, - -175, - -175, - -175, - -13, - 161, + 86, + 91, + 92, + -7, + -170, + -170, + -170, + -10, + -170, + 31, + -170, + -170, + -170, + 12, + -170, + -170, + -170, 96, - -175, - 117, - -175, - 27, - 143, - 144, - 27, - -25, - -175, + -170, + -170, + 118, + 94, + 97, + 87, + 95, + 115, + -170, + -170, + -170, + -170, + -15, + 17, 100, - -175, - 27, - 27, - 27, - 27, - 145, - 102, - 102, - 130, - 129, + -170, + 121, + -170, + 31, + 147, + 148, + 31, + 43, + -170, + 104, + -170, + 31, + 31, + 31, + 31, + 149, 106, - 53, - 108, - 114, - 124, - 15, - 164, + 106, + 133, 132, + 109, + -20, + 111, 116, - 54, - -175, - -175, - 158, - -175, - -175, - -175, - 30, - 30, - -175, - -175, - 27, - -175, - 11, - 129, - -175, - 163, - 154, - -175, - 133, - -2, - -175, - 17, - -175, - -175, - 148, - 95, + 125, + 89, + 166, + 117, + 138, + 119, + 96, + -170, + -170, + 165, + -170, + -170, + -170, + -52, + -52, + -170, + -170, + 31, + -170, + 8, + 132, + -170, 168, + 160, + -170, 135, - 164, - -175, - -175, - 126, - -175, - -175, - -175, - 139, - 172, - 189, - 53, - 175, - -175, - -175, - 3, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - 166, - 80, + -2, + -170, 66, - 27, - 27, - 106, - -175, - -175, - -175, - 190, - -175, - -175, - -175, - -175, - -175, - -11, - 114, - 179, - 136, - -175, - 181, - 102, - 102, - 201, + -170, + -170, + 150, + -5, + 173, + 140, + 166, + -170, + -170, + 175, + 177, + 134, + -170, + -170, + -170, + 145, + 180, 197, - 110, - -175, - 186, - -175, - -175, - -175, - -175, - 27, - 154, - 154, - 59, - 59, - -175, - 141, - 165, + -20, + 182, + -170, + -170, + 11, + -170, + -170, + -170, + -170, + -170, + -170, + -170, 174, - -175, - -175, - -175, - 168, - 171, - -175, - 162, - 184, - 129, - 12, - -175, - 27, - 154, - 219, - -175, - 53, - 53, - 59, - -175, - 188, - -175, + 85, + 90, + 31, + 31, + 109, + -170, + -170, + -170, + 196, + -170, + -170, + -170, + -170, + -170, + 71, + 116, + 186, + 142, + -170, + 117, + 209, + 190, + 106, + 106, 211, - -175, - -175, - 29, - 187, - 212, - 154, - 189, - -175, - 66, - 240, - -175, - -175, - 131, - 112, - 164, - -175, - 162, - -175, - 55, - -175, - 27, - -175, - -175, - -175, - -175, + 204, + 114, + -170, 194, - 4, - -175, - 221, - 102, - -175, - -175, - 27, - -175, - -175}; + -170, + -170, + -170, + -170, + 31, + 160, + 160, + 58, + 58, + -170, + 162, + 151, + 199, + -170, + -170, + -170, + 173, + 183, + -170, + -170, + 166, + 117, + 189, + 132, + 9, + -170, + 31, + 160, + 229, + -170, + -20, + -20, + 58, + -170, + 193, + -170, + 217, + -170, + -170, + 110, + -170, + 218, + 160, + 197, + -170, + 90, + 246, + -170, + -170, + 128, + 52, + 166, + -170, + -170, + 72, + -170, + 31, + -170, + -170, + -170, + 195, + 1, + -170, + 232, + 106, + -170, + -170, + 31, + -170, + -170}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero @@ -1534,8 +1540,8 @@ static const yytype_int16 yypact[] = {222, static const yytype_uint8 yydefact[] = {0, 38, 0, - 85, - 85, + 86, + 86, 0, 0, 28, @@ -1551,7 +1557,7 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 146, + 147, 25, 24, 17, @@ -1582,21 +1588,21 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 85, - 73, - 70, + 86, + 74, 71, - 105, 72, + 106, + 73, 0, - 96, - 94, - 83, - 100, - 98, - 99, + 97, 95, 84, + 101, + 99, + 100, + 96, + 85, 34, 33, 0, @@ -1605,33 +1611,33 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 144, + 145, 1, - 147, + 148, 2, - 74, + 75, 0, 0, 32, 0, - 48, - 85, + 49, + 86, 0, 0, - 85, + 86, 0, - 93, + 94, 0, - 101, + 102, 0, 0, 0, 0, - 86, + 87, 0, 0, 0, - 112, + 113, 0, 0, 0, @@ -1642,72 +1648,75 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 104, - 92, 0, - 106, - 97, - 102, - 88, + 105, + 93, + 0, + 107, + 98, + 103, 89, 90, 91, - 85, - 107, - 100, - 112, + 92, + 86, + 108, + 101, + 113, 35, 0, 0, - 76, + 77, 0, - 112, - 78, + 113, + 79, 0, - 145, - 67, + 146, + 68, 0, 0, - 49, + 50, 0, 0, 46, 47, + 39, + 0, 0, 41, - 103, - 87, + 104, + 88, 0, - 108, - 139, + 109, + 140, 0, - 62, - 130, - 128, + 63, + 131, + 129, 0, - 118, 119, 120, 121, 122, 123, - 126, 124, + 127, + 125, 0, - 113, + 114, 0, 0, 0, - 77, - 68, + 78, 69, + 70, 0, - 57, 58, 59, 60, 61, - 56, + 62, + 57, 0, 0, 0, @@ -1716,142 +1725,144 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 141, 0, - 65, 0, - 131, - 129, - 127, - 125, + 142, 0, + 66, 0, + 132, + 130, + 128, + 126, 0, - 115, + 0, + 0, + 116, + 81, 80, - 79, 0, 0, 0, + 56, 55, - 54, - 52, - 49, - 74, + 53, + 50, 75, + 76, + 40, 0, 0, - 112, - 100, - 109, - 85, 0, - 132, - 63, + 113, + 101, + 110, + 86, 0, + 133, + 64, 0, - 114, - 116, + 0, + 115, 117, - 143, + 118, + 144, 0, - 53, - 50, + 54, + 51, 44, - 39, + 48, 0, 0, - 139, 140, - 142, + 141, + 143, 0, - 81, - 66, + 82, + 67, 0, - 56, + 57, 0, 43, - 0, 36, - 110, - 82, + 111, + 83, 0, - 64, - 51, + 65, + 52, 42, - 40, 0, - 136, - 133, + 137, 134, + 135, 0, + 139, 138, - 137, 0, - 111, - 135}; + 112, + 136}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-175, - -175, - 230, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - -175, - 13, - -175, - -175, - -175, - -175, +static const yytype_int16 yypgoto[] = {-170, + -170, + 236, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -170, + -169, + -170, + -170, + -170, + -170, 49, - 81, + 80, 18, - -175, - -175, - -175, - 39, - -97, - -99, - 50, - -175, - -175, - -175, - 93, - -49, - -175, + -170, + -170, + -170, + 36, + -98, + -100, + 53, + -170, + -170, + -170, + 98, + -48, + -170, -4, -56, - 199, - -175, - -175, - -175, - -91, - 82, - 8, - -116, - -174, - 104, - -175, + 202, + -170, + -170, + -170, + -90, + 77, + 13, + -120, + -165, + 101, + -170, 14, - -175, - 34, - -175, - -175, - -175, - -175, - -175}; + -170, + 33, + -170, + -170, + -170, + -170, + -170}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = {0, +static const yytype_int16 yydefgoto[] = {0, 19, 20, 21, @@ -1866,44 +1877,44 @@ static const yytype_uint8 yydefgoto[] = {0, 30, 31, 47, - 228, + 144, 32, 33, 34, 35, - 178, - 137, - 204, - 176, + 181, + 138, + 209, + 179, 36, - 150, - 186, - 187, + 153, + 191, + 192, 59, 106, 37, 38, - 130, 131, + 132, 39, 40, 60, 61, - 147, + 150, 62, 63, 64, - 209, - 124, - 210, - 128, - 163, - 164, - 234, - 251, - 252, - 185, - 215, + 216, + 125, + 217, + 129, + 166, + 167, + 241, + 256, + 257, + 190, + 222, 41, 42, 43, @@ -1914,242 +1925,248 @@ static const yytype_uint8 yydefgoto[] = {0, number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = {65, 89, + 135, 85, 134, - 90, - 133, - 123, - 125, - 148, - 254, - 84, + 151, + 259, + 124, + 126, 104, - 189, - 200, - 167, + 84, + 170, + 90, 90, + 87, + 213, 90, 51, + 52, + 260, + 194, + 107, + 94, + 95, + 169, + 174, 66, - 139, - 220, - 221, - 255, - 69, - 166, - 201, - 70, - 202, - 203, - 71, - 87, + 175, + 176, + 177, + 178, 52, - 84, - 238, - 190, - 72, - 117, + 88, + 70, + 227, + 228, 118, 119, 120, - 232, - 48, + 121, 105, + 108, + 195, + 48, + 128, 49, - 127, - 114, - 84, + 235, 86, - 88, - 115, - 134, + 53, + 54, + 69, + 56, + 135, + 133, + 71, 51, - 67, - 68, - 73, - 242, - 75, - 140, - 141, - 80, + 239, 44, + 141, + 142, + 75, 53, 54, 55, 56, - 52, + 149, 57, 58, - 146, - 191, - 91, - 162, + 73, + 52, + 72, + 248, + 165, 92, 93, 94, 95, + 196, + 91, + 91, + 111, + 45, + 91, + 114, 92, 93, 94, 95, - 110, - 91, - 91, - 113, - 45, - 168, - 169, + 206, 50, + 207, + 208, + 183, + 140, + 154, + 205, 76, - 151, - 180, - 52, - 211, - 78, - 230, + 237, + 218, 53, 54, 55, 56, - 97, + 46, 57, 58, - 194, - 195, - 94, - 95, - 46, + 84, + 206, + 78, + 207, + 208, + 201, + 202, + 115, + 245, 79, - 196, - 197, - 81, - 152, - 249, - 194, - 195, - 82, - 153, - 145, - 134, - 134, - 235, - 53, - 54, - 98, - 56, - 171, - 132, - 172, - 173, - 174, - 175, + 155, + 116, + 148, + 199, + 200, + 156, + 67, + 68, + 135, + 135, + 242, + 84, + 80, + 254, 92, 93, 94, 95, - 216, - 217, - 219, - 162, - 162, - 154, - 155, - 156, + 171, + 172, + 101, + 199, + 200, + 223, + 224, + 97, + 226, + 165, + 165, 157, 158, 159, 160, - 161, - 201, - 83, - 202, - 203, + 161, + 162, + 163, + 164, + 251, + 224, + 102, + 81, 92, 93, 94, 95, - 245, - 217, - 162, + 82, + 83, + 98, 99, + 165, + 234, 100, - 102, - 101, - 151, 103, - 107, - 108, + 154, 109, - 111, + 110, 112, - 116, - 121, + 113, + 117, 122, - 162, - 126, + 123, 127, - 129, - 239, - 51, - 135, - 138, - 84, - 142, - 144, + 128, + 130, + 165, + 139, 136, - 152, + 84, + 51, + 246, + 137, 143, - 149, - 250, - 247, - 153, - 170, + 145, + 146, + 147, + 155, + 152, + 173, + 255, + 168, + 156, + 253, 52, - 165, - 177, - 179, - 181, + 180, 182, - 183, 184, - 250, + 185, + 187, + 186, + 255, 188, - 192, - 199, - 206, - 208, - 207, - 213, + 189, + 193, + 204, + 197, + 211, + 212, 214, - 231, - 218, - 222, - 224, - 240, - 154, - 155, - 156, + 215, + 221, + 238, + 220, + 225, + 230, 157, 158, 159, 160, 161, + 162, + 163, + 164, 53, 54, 55, 56, - 105, + 229, 57, 58, 1, 2, - 233, - 227, - 223, - 229, - 194, - 237, - 241, + 231, + 105, + 236, + 199, + 240, + 244, + 247, 3, 4, 5, @@ -2158,31 +2175,31 @@ static const yytype_int16 yytable[] = {65, 8, 9, 10, - 244, - 256, + 250, + 258, 74, 11, 12, 13, - 253, - 248, - 225, - 246, - 226, - 236, - 205, - 198, + 261, + 232, + 210, + 243, + 252, 96, - 257, + 233, + 219, + 198, + 203, 14, 15, - 243, - 212, - 193, + 249, + 262, 0, 0, 0, - 258, + 263, + 0, 16, 0, 17, @@ -2192,144 +2209,149 @@ static const yytype_int16 yytable[] = {65, static const yytype_int16 yycheck[] = {4, 57, - 51, 102, - 4, + 51, 102, + 125, + 5, 97, 98, - 124, - 5, - 17, - 24, - 9, 24, - 130, + 17, + 131, 4, 4, 24, - 70, + 184, 4, - 194, - 195, - 18, - 43, - 26, - 36, - 45, - 38, - 39, - 70, 24, 38, - 17, + 18, + 9, 4, - 31, + 74, + 75, + 26, + 30, 70, + 32, + 33, + 34, + 35, + 38, + 42, + 45, + 199, + 200, 92, 93, 94, 95, - 214, - 13, 55, - 15, + 24, + 31, + 13, 46, - 70, - 17, + 15, + 215, 51, - 42, - 74, - 149, + 68, + 69, + 43, + 71, + 152, + 73, + 70, 24, - 14, - 15, - 52, - 229, - 0, + 221, + 13, 106, 107, - 15, - 13, + 0, 68, 69, 70, 71, - 38, + 57, 73, 74, - 57, - 66, + 52, + 38, 70, - 127, + 236, + 128, 72, 73, 74, 75, + 66, + 70, + 70, + 84, + 37, + 70, + 87, 72, 73, 74, 75, - 84, - 70, - 70, - 87, - 37, - 68, - 69, + 36, 59, - 3, - 9, - 139, 38, - 183, - 70, - 210, + 39, + 140, + 4, + 9, + 24, + 3, + 217, + 188, 68, 69, 70, 71, - 45, + 59, 73, 74, - 47, - 48, - 74, - 75, - 59, + 17, + 36, 70, - 164, - 165, + 38, + 39, + 167, + 168, + 70, + 4, 70, 31, - 57, + 74, + 122, 47, 48, - 70, 36, - 121, - 217, - 218, - 217, - 68, - 69, - 45, - 71, - 30, - 73, - 32, - 33, - 34, - 35, + 14, + 15, + 224, + 225, + 224, + 17, + 15, + 57, 72, 73, 74, 75, + 68, + 69, + 49, + 47, + 48, 25, 26, - 193, - 194, - 195, + 45, + 198, + 199, + 200, 60, 61, 62, @@ -2338,24 +2360,23 @@ static const yytype_int16 yycheck[] = {4, 65, 66, 67, - 36, + 25, + 26, + 60, 70, - 38, - 39, 72, 73, 74, 75, - 25, - 26, - 214, 70, 70, - 60, - 49, - 9, + 45, + 70, + 221, + 214, + 70, 53, - 4, + 9, 70, 50, 25, @@ -2363,47 +2384,49 @@ static const yytype_int16 yycheck[] = {4, 70, 26, 70, - 229, 44, 46, 70, - 226, - 24, - 71, + 236, 56, + 71, 17, + 24, + 233, + 70, + 70, 50, - 25, 70, + 25, 31, - 70, 24, - 244, - 238, - 36, 43, - 38, + 250, 60, + 36, + 245, + 38, 26, 60, - 70, + 26, + 25, 58, + 70, + 261, 26, 10, - 256, 26, - 36, 13, + 36, 25, - 24, 70, - 6, + 4, + 24, 11, - 213, + 220, + 6, 24, - 70, - 38, - 26, + 68, 60, 61, 62, @@ -2416,16 +2439,16 @@ static const yytype_int16 yycheck[] = {4, 69, 70, 71, - 55, + 70, 73, 74, 7, 8, - 12, - 70, - 68, + 38, + 55, 50, 47, + 12, 25, 25, 16, @@ -2437,30 +2460,30 @@ static const yytype_int16 yycheck[] = {4, 22, 23, 6, - 26, + 58, 18, 27, 28, 29, - 58, - 240, - 205, - 237, - 206, - 218, - 177, - 166, + 26, + 210, + 180, + 225, + 244, 61, - 253, + 211, + 188, + 165, + 169, 40, 41, - 230, - 183, - 162, + 237, + 258, -1, -1, -1, - 256, + 261, + -1, 49, -1, 51, @@ -2578,6 +2601,7 @@ static const yytype_uint8 yystos[] = {0, 55, 106, 4, + 24, 70, 50, 113, @@ -2612,6 +2636,8 @@ static const yytype_uint8 yystos[] = {0, 4, 111, 111, + 70, + 92, 50, 70, 25, @@ -2651,6 +2677,8 @@ static const yytype_uint8 yystos[] = {0, 97, 60, 111, + 26, + 25, 70, 58, 26, @@ -2678,6 +2706,8 @@ static const yytype_uint8 yystos[] = {0, 98, 25, 70, + 92, + 4, 24, 119, 121, @@ -2697,7 +2727,7 @@ static const yytype_uint8 yystos[] = {0, 38, 97, 106, - 70, + 111, 92, 50, 122, @@ -2710,7 +2740,6 @@ static const yytype_uint8 yystos[] = {0, 25, 4, 111, - 26, 25, 123, 128, @@ -2718,7 +2747,6 @@ static const yytype_uint8 yystos[] = {0, 25, 99, 111, - 92, 57, 114, 126, @@ -2779,6 +2807,7 @@ static const yytype_uint8 yyr1[] = {0, 94, 94, 95, + 95, 96, 97, 97, @@ -2929,6 +2958,7 @@ static const yytype_int8 yyr2[] = {0, 6, 5, 5, + 8, 3, 0, 3, @@ -3816,7 +3846,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1874 "yacc_sql.cpp" +#line 1879 "yacc_sql.cpp" break; case 26: /* exit_stmt: EXIT */ @@ -3825,7 +3855,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1883 "yacc_sql.cpp" +#line 1888 "yacc_sql.cpp" break; case 27: /* help_stmt: HELP */ @@ -3833,7 +3863,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1891 "yacc_sql.cpp" +#line 1896 "yacc_sql.cpp" break; case 28: /* sync_stmt: SYNC */ @@ -3841,7 +3871,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1899 "yacc_sql.cpp" +#line 1904 "yacc_sql.cpp" break; case 29: /* begin_stmt: TRX_BEGIN */ @@ -3849,7 +3879,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1907 "yacc_sql.cpp" +#line 1912 "yacc_sql.cpp" break; case 30: /* commit_stmt: TRX_COMMIT */ @@ -3857,7 +3887,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1915 "yacc_sql.cpp" +#line 1920 "yacc_sql.cpp" break; case 31: /* rollback_stmt: TRX_ROLLBACK */ @@ -3865,7 +3895,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1923 "yacc_sql.cpp" +#line 1928 "yacc_sql.cpp" break; case 32: /* drop_table_stmt: DROP TABLE ID */ @@ -3875,7 +3905,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1933 "yacc_sql.cpp" +#line 1938 "yacc_sql.cpp" break; case 33: /* show_tables_stmt: SHOW TABLES */ @@ -3883,7 +3913,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1941 "yacc_sql.cpp" +#line 1946 "yacc_sql.cpp" break; case 34: /* desc_table_stmt: DESC ID */ @@ -3893,7 +3923,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1951 "yacc_sql.cpp" +#line 1956 "yacc_sql.cpp" break; case 35: /* show_index_stmt: SHOW INDEX FROM relation */ @@ -3904,7 +3934,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1962 "yacc_sql.cpp" +#line 1967 "yacc_sql.cpp" break; case 36: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ @@ -3920,7 +3950,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1978 "yacc_sql.cpp" +#line 1983 "yacc_sql.cpp" break; case 37: /* opt_unique: UNIQUE */ @@ -3928,7 +3958,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.unique) = true; } -#line 1984 "yacc_sql.cpp" +#line 1989 "yacc_sql.cpp" break; case 38: /* opt_unique: %empty */ @@ -3936,7 +3966,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.unique) = false; } -#line 1990 "yacc_sql.cpp" +#line 1995 "yacc_sql.cpp" break; case 39: /* attr_list: ID */ @@ -3946,7 +3976,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 2000 "yacc_sql.cpp" +#line 2005 "yacc_sql.cpp" break; case 40: /* attr_list: ID COMMA attr_list */ @@ -3957,7 +3987,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2010 "yacc_sql.cpp" +#line 2015 "yacc_sql.cpp" break; case 41: /* drop_index_stmt: DROP INDEX ID ON ID */ @@ -3969,7 +3999,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2022 "yacc_sql.cpp" +#line 2027 "yacc_sql.cpp" break; case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ @@ -3978,7 +4008,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node) = create_table_sql_node( (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2030 "yacc_sql.cpp" +#line 2035 "yacc_sql.cpp" break; case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ @@ -3987,7 +4017,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node) = create_table_sql_node( (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2038 "yacc_sql.cpp" +#line 2043 "yacc_sql.cpp" break; case 44: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ @@ -3996,7 +4026,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node) = create_table_sql_node( (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2046 "yacc_sql.cpp" +#line 2051 "yacc_sql.cpp" break; case 45: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ @@ -4005,7 +4035,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2054 "yacc_sql.cpp" +#line 2059 "yacc_sql.cpp" break; case 46: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ @@ -4014,7 +4044,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2062 "yacc_sql.cpp" +#line 2067 "yacc_sql.cpp" break; case 47: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ @@ -4026,29 +4056,42 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } -#line 2074 "yacc_sql.cpp" +#line 2079 "yacc_sql.cpp" + break; + + case 48: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ +#line 439 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); + CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; + create_view.relation_name = (yyvsp[-5].string); + create_view.attribute_names = std::move(*(yyvsp[-3].index_attr_list)); + create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); + free((yyvsp[-5].string)); + } +#line 2092 "yacc_sql.cpp" break; - case 48: /* drop_view_stmt: DROP VIEW ID */ -#line 442 "yacc_sql.y" + case 49: /* drop_view_stmt: DROP VIEW ID */ +#line 451 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2084 "yacc_sql.cpp" +#line 2102 "yacc_sql.cpp" break; - case 49: /* attr_def_list: %empty */ -#line 451 "yacc_sql.y" + case 50: /* attr_def_list: %empty */ +#line 460 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2092 "yacc_sql.cpp" +#line 2110 "yacc_sql.cpp" break; - case 50: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 455 "yacc_sql.y" + case 51: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 464 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -4058,11 +4101,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2106 "yacc_sql.cpp" +#line 2124 "yacc_sql.cpp" break; - case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 468 "yacc_sql.y" + case 52: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ +#line 477 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); @@ -4074,11 +4117,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 2122 "yacc_sql.cpp" +#line 2140 "yacc_sql.cpp" break; - case 52: /* attr_def: ID type nullable_constraint */ -#line 480 "yacc_sql.y" + case 53: /* attr_def: ID type nullable_constraint */ +#line 489 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -4102,83 +4145,83 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2150 "yacc_sql.cpp" +#line 2168 "yacc_sql.cpp" break; - case 53: /* nullable_constraint: NOT NULL_T */ -#line 507 "yacc_sql.y" + case 54: /* nullable_constraint: NOT NULL_T */ +#line 516 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2158 "yacc_sql.cpp" +#line 2176 "yacc_sql.cpp" break; - case 54: /* nullable_constraint: NULLABLE */ -#line 511 "yacc_sql.y" + case 55: /* nullable_constraint: NULLABLE */ +#line 520 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2166 "yacc_sql.cpp" +#line 2184 "yacc_sql.cpp" break; - case 55: /* nullable_constraint: NULL_T */ -#line 515 "yacc_sql.y" + case 56: /* nullable_constraint: NULL_T */ +#line 524 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2174 "yacc_sql.cpp" +#line 2192 "yacc_sql.cpp" break; - case 56: /* nullable_constraint: %empty */ -#line 519 "yacc_sql.y" + case 57: /* nullable_constraint: %empty */ +#line 528 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2182 "yacc_sql.cpp" +#line 2200 "yacc_sql.cpp" break; - case 57: /* type: INT_T */ -#line 525 "yacc_sql.y" + case 58: /* type: INT_T */ +#line 534 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2188 "yacc_sql.cpp" +#line 2206 "yacc_sql.cpp" break; - case 58: /* type: STRING_T */ -#line 526 "yacc_sql.y" + case 59: /* type: STRING_T */ +#line 535 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2194 "yacc_sql.cpp" +#line 2212 "yacc_sql.cpp" break; - case 59: /* type: FLOAT_T */ -#line 527 "yacc_sql.y" + case 60: /* type: FLOAT_T */ +#line 536 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2200 "yacc_sql.cpp" +#line 2218 "yacc_sql.cpp" break; - case 60: /* type: DATE_T */ -#line 528 "yacc_sql.y" + case 61: /* type: DATE_T */ +#line 537 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2206 "yacc_sql.cpp" +#line 2224 "yacc_sql.cpp" break; - case 61: /* type: TEXT_T */ -#line 529 "yacc_sql.y" + case 62: /* type: TEXT_T */ +#line 538 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2212 "yacc_sql.cpp" +#line 2230 "yacc_sql.cpp" break; - case 62: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 534 "yacc_sql.y" + case 63: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 543 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -4188,128 +4231,128 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2226 "yacc_sql.cpp" +#line 2244 "yacc_sql.cpp" break; - case 63: /* values_list: LBRACE value_list RBRACE */ -#line 547 "yacc_sql.y" + case 64: /* values_list: LBRACE value_list RBRACE */ +#line 556 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2236 "yacc_sql.cpp" +#line 2254 "yacc_sql.cpp" break; - case 64: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 553 "yacc_sql.y" + case 65: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 562 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2245 "yacc_sql.cpp" +#line 2263 "yacc_sql.cpp" break; - case 65: /* value_list: value */ -#line 560 "yacc_sql.y" + case 66: /* value_list: value */ +#line 569 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2255 "yacc_sql.cpp" +#line 2273 "yacc_sql.cpp" break; - case 66: /* value_list: value_list COMMA value */ -#line 566 "yacc_sql.y" + case 67: /* value_list: value_list COMMA value */ +#line 575 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2264 "yacc_sql.cpp" +#line 2282 "yacc_sql.cpp" break; - case 67: /* value: nonnegative_value */ -#line 573 "yacc_sql.y" + case 68: /* value: nonnegative_value */ +#line 582 "yacc_sql.y" { (yyval.value) = (yyvsp[0].value); } -#line 2272 "yacc_sql.cpp" +#line 2290 "yacc_sql.cpp" break; - case 68: /* value: '-' NUMBER */ -#line 576 "yacc_sql.y" + case 69: /* value: '-' NUMBER */ +#line 585 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2281 "yacc_sql.cpp" +#line 2299 "yacc_sql.cpp" break; - case 69: /* value: '-' FLOAT */ -#line 580 "yacc_sql.y" + case 70: /* value: '-' FLOAT */ +#line 589 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2290 "yacc_sql.cpp" +#line 2308 "yacc_sql.cpp" break; - case 70: /* nonnegative_value: NUMBER */ -#line 587 "yacc_sql.y" + case 71: /* nonnegative_value: NUMBER */ +#line 596 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2299 "yacc_sql.cpp" +#line 2317 "yacc_sql.cpp" break; - case 71: /* nonnegative_value: FLOAT */ -#line 591 "yacc_sql.y" + case 72: /* nonnegative_value: FLOAT */ +#line 600 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2308 "yacc_sql.cpp" +#line 2326 "yacc_sql.cpp" break; - case 72: /* nonnegative_value: SSS */ -#line 595 "yacc_sql.y" + case 73: /* nonnegative_value: SSS */ +#line 604 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2319 "yacc_sql.cpp" +#line 2337 "yacc_sql.cpp" break; - case 73: /* nonnegative_value: NULL_T */ -#line 601 "yacc_sql.y" + case 74: /* nonnegative_value: NULL_T */ +#line 610 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2327 "yacc_sql.cpp" +#line 2345 "yacc_sql.cpp" break; - case 74: /* storage_format: %empty */ -#line 608 "yacc_sql.y" + case 75: /* storage_format: %empty */ +#line 617 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2335 "yacc_sql.cpp" +#line 2353 "yacc_sql.cpp" break; - case 75: /* storage_format: STORAGE FORMAT EQ ID */ -#line 612 "yacc_sql.y" + case 76: /* storage_format: STORAGE FORMAT EQ ID */ +#line 621 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2343 "yacc_sql.cpp" +#line 2361 "yacc_sql.cpp" break; - case 76: /* delete_stmt: DELETE FROM ID where */ -#line 619 "yacc_sql.y" + case 77: /* delete_stmt: DELETE FROM ID where */ +#line 628 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -4318,11 +4361,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2356 "yacc_sql.cpp" +#line 2374 "yacc_sql.cpp" break; - case 77: /* update_stmt: UPDATE ID SET setClauses where */ -#line 631 "yacc_sql.y" + case 78: /* update_stmt: UPDATE ID SET setClauses where */ +#line 640 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -4333,39 +4376,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2371 "yacc_sql.cpp" +#line 2389 "yacc_sql.cpp" break; - case 78: /* setClauses: setClause */ -#line 645 "yacc_sql.y" + case 79: /* setClauses: setClause */ +#line 654 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2380 "yacc_sql.cpp" +#line 2398 "yacc_sql.cpp" break; - case 79: /* setClauses: setClauses COMMA setClause */ -#line 650 "yacc_sql.y" + case 80: /* setClauses: setClauses COMMA setClause */ +#line 659 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2388 "yacc_sql.cpp" +#line 2406 "yacc_sql.cpp" break; - case 80: /* setClause: ID EQ expression */ -#line 657 "yacc_sql.y" + case 81: /* setClause: ID EQ expression */ +#line 666 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2399 "yacc_sql.cpp" +#line 2417 "yacc_sql.cpp" break; - case 81: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ -#line 667 "yacc_sql.y" + case 82: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ +#line 676 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-6].expression_list) != nullptr) { @@ -4398,11 +4441,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].orderby_list); } } -#line 2436 "yacc_sql.cpp" +#line 2454 "yacc_sql.cpp" break; - case 82: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ -#line 700 "yacc_sql.y" + case 83: /* select_stmt: SELECT expression_list FROM relation INNER JOIN joinClauses where group_by */ +#line 709 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4434,39 +4477,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2470 "yacc_sql.cpp" +#line 2488 "yacc_sql.cpp" break; - case 83: /* calc_stmt: CALC expression_list */ -#line 733 "yacc_sql.y" + case 84: /* calc_stmt: CALC expression_list */ +#line 742 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2480 "yacc_sql.cpp" +#line 2498 "yacc_sql.cpp" break; - case 84: /* calc_stmt: SELECT expression_list */ -#line 739 "yacc_sql.y" + case 85: /* calc_stmt: SELECT expression_list */ +#line 748 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2490 "yacc_sql.cpp" +#line 2508 "yacc_sql.cpp" break; - case 85: /* expression_list: %empty */ -#line 747 "yacc_sql.y" + case 86: /* expression_list: %empty */ +#line 756 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2498 "yacc_sql.cpp" +#line 2516 "yacc_sql.cpp" break; - case 86: /* expression_list: expression alias */ -#line 751 "yacc_sql.y" + case 87: /* expression_list: expression alias */ +#line 760 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4475,11 +4518,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2511 "yacc_sql.cpp" +#line 2529 "yacc_sql.cpp" break; - case 87: /* expression_list: expression alias COMMA expression_list */ -#line 760 "yacc_sql.y" + case 88: /* expression_list: expression alias COMMA expression_list */ +#line 769 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4492,47 +4535,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2528 "yacc_sql.cpp" +#line 2546 "yacc_sql.cpp" break; - case 88: /* expression: expression '+' expression */ -#line 775 "yacc_sql.y" + case 89: /* expression: expression '+' expression */ +#line 784 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2536 "yacc_sql.cpp" +#line 2554 "yacc_sql.cpp" break; - case 89: /* expression: expression '-' expression */ -#line 778 "yacc_sql.y" + case 90: /* expression: expression '-' expression */ +#line 787 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2544 "yacc_sql.cpp" +#line 2562 "yacc_sql.cpp" break; - case 90: /* expression: expression '*' expression */ -#line 781 "yacc_sql.y" + case 91: /* expression: expression '*' expression */ +#line 790 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2552 "yacc_sql.cpp" +#line 2570 "yacc_sql.cpp" break; - case 91: /* expression: expression '/' expression */ -#line 784 "yacc_sql.y" + case 92: /* expression: expression '/' expression */ +#line 793 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2560 "yacc_sql.cpp" +#line 2578 "yacc_sql.cpp" break; - case 92: /* expression: LBRACE expression_list RBRACE */ -#line 787 "yacc_sql.y" + case 93: /* expression: LBRACE expression_list RBRACE */ +#line 796 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -4541,123 +4584,123 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2573 "yacc_sql.cpp" +#line 2591 "yacc_sql.cpp" break; - case 93: /* expression: '-' expression */ -#line 795 "yacc_sql.y" + case 94: /* expression: '-' expression */ +#line 804 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2581 "yacc_sql.cpp" +#line 2599 "yacc_sql.cpp" break; - case 94: /* expression: nonnegative_value */ -#line 798 "yacc_sql.y" + case 95: /* expression: nonnegative_value */ +#line 807 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2591 "yacc_sql.cpp" +#line 2609 "yacc_sql.cpp" break; - case 95: /* expression: rel_attr */ -#line 803 "yacc_sql.y" + case 96: /* expression: rel_attr */ +#line 812 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2602 "yacc_sql.cpp" +#line 2620 "yacc_sql.cpp" break; - case 96: /* expression: '*' */ -#line 809 "yacc_sql.y" + case 97: /* expression: '*' */ +#line 818 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2610 "yacc_sql.cpp" +#line 2628 "yacc_sql.cpp" break; - case 97: /* expression: ID DOT '*' */ -#line 812 "yacc_sql.y" + case 98: /* expression: ID DOT '*' */ +#line 821 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2618 "yacc_sql.cpp" +#line 2636 "yacc_sql.cpp" break; - case 98: /* expression: aggr_func_expr */ -#line 815 "yacc_sql.y" + case 99: /* expression: aggr_func_expr */ +#line 824 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2626 "yacc_sql.cpp" +#line 2644 "yacc_sql.cpp" break; - case 99: /* expression: sub_query_expr */ -#line 818 "yacc_sql.y" + case 100: /* expression: sub_query_expr */ +#line 827 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2634 "yacc_sql.cpp" +#line 2652 "yacc_sql.cpp" break; - case 100: /* alias: %empty */ -#line 825 "yacc_sql.y" + case 101: /* alias: %empty */ +#line 834 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2642 "yacc_sql.cpp" +#line 2660 "yacc_sql.cpp" break; - case 101: /* alias: ID */ -#line 828 "yacc_sql.y" + case 102: /* alias: ID */ +#line 837 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2650 "yacc_sql.cpp" +#line 2668 "yacc_sql.cpp" break; - case 102: /* alias: AS ID */ -#line 831 "yacc_sql.y" + case 103: /* alias: AS ID */ +#line 840 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2658 "yacc_sql.cpp" +#line 2676 "yacc_sql.cpp" break; - case 103: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 837 "yacc_sql.y" + case 104: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 846 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2666 "yacc_sql.cpp" +#line 2684 "yacc_sql.cpp" break; - case 104: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 844 "yacc_sql.y" + case 105: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 853 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2674 "yacc_sql.cpp" +#line 2692 "yacc_sql.cpp" break; - case 105: /* rel_attr: ID */ -#line 850 "yacc_sql.y" + case 106: /* rel_attr: ID */ +#line 859 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2684 "yacc_sql.cpp" +#line 2702 "yacc_sql.cpp" break; - case 106: /* rel_attr: ID DOT ID */ -#line 855 "yacc_sql.y" + case 107: /* rel_attr: ID DOT ID */ +#line 864 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -4665,19 +4708,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2696 "yacc_sql.cpp" +#line 2714 "yacc_sql.cpp" break; - case 107: /* relation: ID */ -#line 865 "yacc_sql.y" + case 108: /* relation: ID */ +#line 874 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2704 "yacc_sql.cpp" +#line 2722 "yacc_sql.cpp" break; - case 108: /* rel_list: relation alias */ -#line 871 "yacc_sql.y" + case 109: /* rel_list: relation alias */ +#line 880 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if (nullptr != (yyvsp[0].string)) { @@ -4688,11 +4731,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2719 "yacc_sql.cpp" +#line 2737 "yacc_sql.cpp" break; - case 109: /* rel_list: relation alias COMMA rel_list */ -#line 881 "yacc_sql.y" + case 110: /* rel_list: relation alias COMMA rel_list */ +#line 890 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -4708,22 +4751,22 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-3].string)); } -#line 2738 "yacc_sql.cpp" +#line 2756 "yacc_sql.cpp" break; - case 110: /* joinClauses: relation ON condition */ -#line 899 "yacc_sql.y" + case 111: /* joinClauses: relation ON condition */ +#line 908 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2749 "yacc_sql.cpp" +#line 2767 "yacc_sql.cpp" break; - case 111: /* joinClauses: relation ON condition INNER JOIN joinClauses */ -#line 906 "yacc_sql.y" + case 112: /* joinClauses: relation ON condition INNER JOIN joinClauses */ +#line 915 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -4732,273 +4775,273 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2761 "yacc_sql.cpp" +#line 2779 "yacc_sql.cpp" break; - case 112: /* where: %empty */ -#line 917 "yacc_sql.y" + case 113: /* where: %empty */ +#line 926 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2769 "yacc_sql.cpp" +#line 2787 "yacc_sql.cpp" break; - case 113: /* where: WHERE condition */ -#line 920 "yacc_sql.y" + case 114: /* where: WHERE condition */ +#line 929 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2777 "yacc_sql.cpp" +#line 2795 "yacc_sql.cpp" break; - case 114: /* condition: expression comp_op expression */ -#line 927 "yacc_sql.y" + case 115: /* condition: expression comp_op expression */ +#line 936 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2785 "yacc_sql.cpp" +#line 2803 "yacc_sql.cpp" break; - case 115: /* condition: comp_op expression */ -#line 931 "yacc_sql.y" + case 116: /* condition: comp_op expression */ +#line 940 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); } -#line 2796 "yacc_sql.cpp" +#line 2814 "yacc_sql.cpp" break; - case 116: /* condition: condition AND condition */ -#line 938 "yacc_sql.y" + case 117: /* condition: condition AND condition */ +#line 947 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2804 "yacc_sql.cpp" +#line 2822 "yacc_sql.cpp" break; - case 117: /* condition: condition OR condition */ -#line 942 "yacc_sql.y" + case 118: /* condition: condition OR condition */ +#line 951 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2812 "yacc_sql.cpp" +#line 2830 "yacc_sql.cpp" break; - case 118: /* comp_op: EQ */ -#line 948 "yacc_sql.y" + case 119: /* comp_op: EQ */ +#line 957 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2818 "yacc_sql.cpp" +#line 2836 "yacc_sql.cpp" break; - case 119: /* comp_op: LT */ -#line 949 "yacc_sql.y" + case 120: /* comp_op: LT */ +#line 958 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2824 "yacc_sql.cpp" +#line 2842 "yacc_sql.cpp" break; - case 120: /* comp_op: GT */ -#line 950 "yacc_sql.y" + case 121: /* comp_op: GT */ +#line 959 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2830 "yacc_sql.cpp" +#line 2848 "yacc_sql.cpp" break; - case 121: /* comp_op: LE */ -#line 951 "yacc_sql.y" + case 122: /* comp_op: LE */ +#line 960 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2836 "yacc_sql.cpp" +#line 2854 "yacc_sql.cpp" break; - case 122: /* comp_op: GE */ -#line 952 "yacc_sql.y" + case 123: /* comp_op: GE */ +#line 961 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2842 "yacc_sql.cpp" +#line 2860 "yacc_sql.cpp" break; - case 123: /* comp_op: NE */ -#line 953 "yacc_sql.y" + case 124: /* comp_op: NE */ +#line 962 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2848 "yacc_sql.cpp" +#line 2866 "yacc_sql.cpp" break; - case 124: /* comp_op: IS */ -#line 954 "yacc_sql.y" + case 125: /* comp_op: IS */ +#line 963 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2854 "yacc_sql.cpp" +#line 2872 "yacc_sql.cpp" break; - case 125: /* comp_op: IS NOT */ -#line 955 "yacc_sql.y" + case 126: /* comp_op: IS NOT */ +#line 964 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2860 "yacc_sql.cpp" +#line 2878 "yacc_sql.cpp" break; - case 126: /* comp_op: LIKE */ -#line 956 "yacc_sql.y" + case 127: /* comp_op: LIKE */ +#line 965 "yacc_sql.y" { (yyval.comp) = LIKE_OP; } -#line 2866 "yacc_sql.cpp" +#line 2884 "yacc_sql.cpp" break; - case 127: /* comp_op: NOT LIKE */ -#line 957 "yacc_sql.y" + case 128: /* comp_op: NOT LIKE */ +#line 966 "yacc_sql.y" { (yyval.comp) = NOT_LIKE_OP; } -#line 2872 "yacc_sql.cpp" +#line 2890 "yacc_sql.cpp" break; - case 128: /* comp_op: IN */ -#line 958 "yacc_sql.y" + case 129: /* comp_op: IN */ +#line 967 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2878 "yacc_sql.cpp" +#line 2896 "yacc_sql.cpp" break; - case 129: /* comp_op: NOT IN */ -#line 959 "yacc_sql.y" + case 130: /* comp_op: NOT IN */ +#line 968 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2884 "yacc_sql.cpp" +#line 2902 "yacc_sql.cpp" break; - case 130: /* comp_op: EXISTS */ -#line 960 "yacc_sql.y" + case 131: /* comp_op: EXISTS */ +#line 969 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2890 "yacc_sql.cpp" +#line 2908 "yacc_sql.cpp" break; - case 131: /* comp_op: NOT EXISTS */ -#line 961 "yacc_sql.y" + case 132: /* comp_op: NOT EXISTS */ +#line 970 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2896 "yacc_sql.cpp" +#line 2914 "yacc_sql.cpp" break; - case 132: /* opt_order_by: %empty */ -#line 966 "yacc_sql.y" + case 133: /* opt_order_by: %empty */ +#line 975 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2904 "yacc_sql.cpp" +#line 2922 "yacc_sql.cpp" break; - case 133: /* opt_order_by: ORDER BY sort_list */ -#line 970 "yacc_sql.y" + case 134: /* opt_order_by: ORDER BY sort_list */ +#line 979 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } -#line 2913 "yacc_sql.cpp" +#line 2931 "yacc_sql.cpp" break; - case 134: /* sort_list: sort_unit */ -#line 978 "yacc_sql.y" + case 135: /* sort_list: sort_unit */ +#line 987 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2922 "yacc_sql.cpp" +#line 2940 "yacc_sql.cpp" break; - case 135: /* sort_list: sort_unit COMMA sort_list */ -#line 983 "yacc_sql.y" + case 136: /* sort_list: sort_unit COMMA sort_list */ +#line 992 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2931 "yacc_sql.cpp" +#line 2949 "yacc_sql.cpp" break; - case 136: /* sort_unit: expression */ -#line 991 "yacc_sql.y" + case 137: /* sort_unit: expression */ +#line 1000 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2941 "yacc_sql.cpp" +#line 2959 "yacc_sql.cpp" break; - case 137: /* sort_unit: expression DESC */ -#line 997 "yacc_sql.y" + case 138: /* sort_unit: expression DESC */ +#line 1006 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2951 "yacc_sql.cpp" +#line 2969 "yacc_sql.cpp" break; - case 138: /* sort_unit: expression ASC */ -#line 1003 "yacc_sql.y" + case 139: /* sort_unit: expression ASC */ +#line 1012 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2961 "yacc_sql.cpp" +#line 2979 "yacc_sql.cpp" break; - case 139: /* group_by: %empty */ -#line 1012 "yacc_sql.y" + case 140: /* group_by: %empty */ +#line 1021 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2969 "yacc_sql.cpp" +#line 2987 "yacc_sql.cpp" break; - case 140: /* group_by: GROUP BY expression_list */ -#line 1016 "yacc_sql.y" + case 141: /* group_by: GROUP BY expression_list */ +#line 1025 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2977 "yacc_sql.cpp" +#line 2995 "yacc_sql.cpp" break; - case 141: /* opt_having: %empty */ -#line 1023 "yacc_sql.y" + case 142: /* opt_having: %empty */ +#line 1032 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2985 "yacc_sql.cpp" +#line 3003 "yacc_sql.cpp" break; - case 142: /* opt_having: HAVING condition */ -#line 1027 "yacc_sql.y" + case 143: /* opt_having: HAVING condition */ +#line 1036 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2993 "yacc_sql.cpp" +#line 3011 "yacc_sql.cpp" break; - case 143: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 1034 "yacc_sql.y" + case 144: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 1043 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -5008,20 +5051,20 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[0].string)); free(tmp_file_name); } -#line 3007 "yacc_sql.cpp" +#line 3025 "yacc_sql.cpp" break; - case 144: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1047 "yacc_sql.y" + case 145: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1056 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3016 "yacc_sql.cpp" +#line 3034 "yacc_sql.cpp" break; - case 145: /* set_variable_stmt: SET ID EQ value */ -#line 1055 "yacc_sql.y" + case 146: /* set_variable_stmt: SET ID EQ value */ +#line 1064 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -5029,10 +5072,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3028 "yacc_sql.cpp" +#line 3046 "yacc_sql.cpp" break; -#line 3032 "yacc_sql.cpp" +#line 3050 "yacc_sql.cpp" default: break; } @@ -5231,7 +5274,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) return yyresult; } -#line 1067 "yacc_sql.y" +#line 1076 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index a47481ce..2e2f043e 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -435,6 +435,15 @@ create_view_stmt: create_view.create_view_select = std::make_unique(std::move($5->selection)); free($3); } + | CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt + { + $$ = new ParsedSqlNode(SCF_CREATE_VIEW); + CreateViewSqlNode &create_view = $$->create_view; + create_view.relation_name = $3; + create_view.attribute_names = std::move(*$5); + create_view.create_view_select = std::make_unique(std::move($8->selection)); + free($3); + } ; drop_view_stmt: diff --git a/src/observer/sql/stmt/create_view_stmt.cpp b/src/observer/sql/stmt/create_view_stmt.cpp index 403af4d9..a3b7b46a 100644 --- a/src/observer/sql/stmt/create_view_stmt.cpp +++ b/src/observer/sql/stmt/create_view_stmt.cpp @@ -27,9 +27,17 @@ RC CreateViewStmt::create(Db *db, CreateViewSqlNode &create_view, Stmt *&stmt) if (select_stmt == nullptr) { return RC::INTERNAL; } + } else { + return RC::INTERNAL; } - stmt = new CreateViewStmt(create_view.relation_name, select_stmt); + if (!create_view.attribute_names.empty() && + create_view.attribute_names.size() != select_stmt->query_expressions_size()) { + LOG_ERROR("In definition of view, derived table or common table expression, SELECT list and column names list have different column counts"); + return RC::INVALID_ARGUMENT; + } + + stmt = new CreateViewStmt(create_view.relation_name, create_view.attribute_names, select_stmt); sql_debug("create view statement: view name %s", create_view.relation_name.c_str()); return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/create_view_stmt.h b/src/observer/sql/stmt/create_view_stmt.h index d6ece706..ae2cee9c 100644 --- a/src/observer/sql/stmt/create_view_stmt.h +++ b/src/observer/sql/stmt/create_view_stmt.h @@ -29,21 +29,21 @@ class Db; class CreateViewStmt : public Stmt { public: - CreateViewStmt(std::string table_name, SelectStmt *select_stmt) - : table_name_(std::move(table_name)), select_stmt_(select_stmt) + CreateViewStmt(std::string &table_name, std::vector &attr_names, SelectStmt *select_stmt) + : table_name_(std::move(table_name)), attr_names_(std::move(attr_names)), select_stmt_(select_stmt) {} ~CreateViewStmt() override = default; StmtType type() const override { return StmtType::CREATE_VIEW; } - const std::string &table_name() const { return table_name_; } - const std::vector &attr_infos() const { return attr_infos_; } - SelectStmt *select_stmt() { return select_stmt_; } + std::string &table_name() { return table_name_; } + std::vector &attr_names() { return attr_names_; } + SelectStmt *select_stmt() { return select_stmt_; } static RC create(Db *db, CreateViewSqlNode &create_view, Stmt *&stmt); private: - std::string table_name_; - std::vector attr_infos_; - SelectStmt *select_stmt_; + std::string table_name_; + std::vector attr_names_; // 是否指定了属性名 + SelectStmt *select_stmt_; }; diff --git a/src/observer/storage/db/db.cpp b/src/observer/storage/db/db.cpp index 4f15748c..0dd98f4e 100644 --- a/src/observer/storage/db/db.cpp +++ b/src/observer/storage/db/db.cpp @@ -163,7 +163,8 @@ RC Db::create_table(const char *table_name, span attribut return RC::SUCCESS; } -RC Db::create_table(const char *table_name, SelectStmt *select_stmt, const StorageFormat storage_format) +RC Db::create_table(const char *table_name, std::vector attr_names, SelectStmt *select_stmt, + const StorageFormat storage_format) { RC rc = RC::SUCCESS; // check table_name @@ -176,7 +177,14 @@ RC Db::create_table(const char *table_name, SelectStmt *select_stmt, const Stora string table_file_path = table_meta_file(path_.c_str(), table_name); View *table = new View; int32_t table_id = next_table_id_++; - rc = table->create(this, table_id, table_file_path.c_str(), table_name, path_.c_str(), select_stmt, storage_format); + rc = table->create(this, + table_id, + table_file_path.c_str(), + table_name, + path_.c_str(), + std::move(attr_names), + select_stmt, + storage_format); if (rc != RC::SUCCESS) { LOG_ERROR("Failed to create table %s.", table_name); delete table; diff --git a/src/observer/storage/db/db.h b/src/observer/storage/db/db.h index a318f1f3..ebae230d 100644 --- a/src/observer/storage/db/db.h +++ b/src/observer/storage/db/db.h @@ -68,7 +68,8 @@ class Db RC create_table(const char *table_name, span attributes, StorageFormat storage_format = StorageFormat::ROW_FORMAT); - RC create_table(const char *table_name, SelectStmt *select_stmt, StorageFormat storage_format); + RC create_table(const char *table_name, std::vector attr_names, SelectStmt *select_stmt, + StorageFormat storage_format); RC drop_table(const char *table_name); diff --git a/src/observer/storage/table/view.cpp b/src/observer/storage/table/view.cpp index de938cef..ebc98766 100644 --- a/src/observer/storage/table/view.cpp +++ b/src/observer/storage/table/view.cpp @@ -19,7 +19,7 @@ #include "sql/optimizer/physical_plan_generator.h" RC View::create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, - SelectStmt *select_stmt, StorageFormat storage_format) + std::vector attr_names, SelectStmt *select_stmt, StorageFormat storage_format) { if (table_id < 0) { LOG_WARN("invalid table id. table_id=%d, table_name=%s", table_id, name); @@ -34,20 +34,43 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co RC rc = RC::SUCCESS; + auto tables = select_stmt->tables(); + tables_ = std::move(tables); + auto &query_exprs = select_stmt->query_expressions(); std::vector attr_infos(query_exprs.size()); + field_index_.resize(query_exprs.size()); for (int i = 0; i < select_stmt->query_expressions_size(); ++i) { auto &query_expr = query_exprs[i]; AttrInfoSqlNode attr_info; if (query_expr->type() == ExprType::FIELD) { - auto field_expr = dynamic_cast(query_expr.get()); + auto field_expr = dynamic_cast(query_expr.get()); + + // 建立视图字段到基表字段的索引 + bool find = false; + for (auto &table : tables_) { + auto table_field_meta = table->table_meta().field(field_expr->name()); + // 当前视图字段在这个表 + if (table_field_meta != nullptr) { + field_index_[i] = {table, table_field_meta->field_id()}; + find = true; + break; + } + } + if (!find) { + return RC::SCHEMA_FIELD_MISSING; + } + auto field_meta = field_expr->field().meta(); attr_info.type = field_meta->type(); - attr_info.name = field_meta->name(); + attr_info.name = attr_names.empty() ? field_meta->name() : std::move(attr_names[i]); attr_info.length = field_meta->len(); attr_info.nullable = field_meta->nullable(); attr_info.mutable_ = field_meta->is_mutable(); } else { + // 表达式字段为无效索引 + field_index_[i] = {nullptr, -1}; + if (query_expr->type() == ExprType::AGGREGATION) { mutable_ = false; // 包含聚合函数的是只读视图 } @@ -122,37 +145,9 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co db_ = db; base_dir_ = base_dir; - auto tables = select_stmt->tables(); - tables_ = std::move(tables); - // 视图类型 type_ = TableType::View; - // 建立视图字段到基表字段的索引 - auto field_metas = *table_meta_.field_metas(); - field_index_.resize(field_metas.size()); - for (int i = 0; i < field_metas.size(); ++i) { - // 表达式列不能映射到基表字段 - if (!field_metas[i].is_mutable()) { - field_index_[i] = {nullptr, -1}; - continue; - } - auto &view_field_meta = field_metas[i]; - bool find = false; - for (auto &table : tables_) { - auto table_field_meta = table->table_meta().field(view_field_meta.name()); - // 当前视图字段在这个表 - if (table_field_meta != nullptr) { - field_index_[i] = {table, table_field_meta->field_id()}; - find = true; - break; - } - } - if (!find) { - return RC::SCHEMA_FIELD_MISSING; - } - } - LOG_INFO("Successfully create table %s:%s", base_dir, name); return rc; } diff --git a/src/observer/storage/table/view.h b/src/observer/storage/table/view.h index 49b069d7..eb6cbaf8 100644 --- a/src/observer/storage/table/view.h +++ b/src/observer/storage/table/view.h @@ -28,8 +28,8 @@ class View : public BaseTable * @param base_dir 表数据存放的路径 * @param attributes 字段 */ - RC create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, SelectStmt *select_stmt, - StorageFormat storage_format); + RC create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, + std::vector attr_names, SelectStmt *select_stmt, StorageFormat storage_format); RC drop() override; From e84503c664d1270e66259ad57160a785a6013bc8 Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 14 Oct 2024 22:43:39 +0800 Subject: [PATCH 235/308] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=20token=20?= =?UTF-8?q?=E6=9D=A5=E8=A7=A3=E5=86=B3=20'data'=20=E7=9A=84=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/lex_sql.cpp | 5556 +++++++++++++++++--------- src/observer/sql/parser/lex_sql.h | 246 +- src/observer/sql/parser/lex_sql.l | 1 - src/observer/sql/parser/yacc_sql.cpp | 5323 ++++++++++++++++-------- src/observer/sql/parser/yacc_sql.hpp | 230 +- src/observer/sql/parser/yacc_sql.y | 10 +- 6 files changed, 7640 insertions(+), 3726 deletions(-) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 7f5e6fa0..72e46835 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,23 +8,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -77,62 +75,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -156,12 +154,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -189,7 +187,7 @@ typedef void* yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_NEW_FILE yyrestart(yyin, yyscanner) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -207,7 +205,7 @@ typedef void* yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -222,88 +220,85 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - + +#define YY_LESS_LINENO(n) +#define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } while (0) +#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - - }; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -312,59 +307,55 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) +#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner); +static void yy_load_buffer_state(yyscan_t yyscanner); +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -372,322 +363,2469 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state(yyscan_t yyscanner); +static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); +static int yy_get_next_buffer(yyscan_t yyscanner); +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 79 -#define YY_END_OF_BUFFER 80 +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t)(yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; +#define YY_NUM_RULES 78 +#define YY_END_OF_BUFFER 79 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[230] = - { 0, - 0, 0, 0, 0, 80, 78, 1, 2, 78, 78, - 78, 58, 59, 74, 72, 60, 73, 6, 75, 3, - 5, 65, 61, 67, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 79, 64, 0, 76, 0, 77, - 0, 3, 62, 63, 66, 71, 71, 71, 49, 71, - 48, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 51, 69, 71, 71, 71, - 71, 71, 15, 23, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 4, 22, 50, 71, - - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 33, 71, 71, 71, 68, 71, 71, 71, 71, 29, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 19, 34, 71, 71, 42, 36, 71, 9, 11, - 71, 7, 71, 71, 71, 20, 71, 71, 8, 71, - 71, 71, 71, 25, 56, 70, 41, 39, 71, 71, - 71, 16, 71, 17, 71, 37, 71, 71, 71, 57, - 71, 30, 71, 71, 71, 71, 71, 35, 71, 45, - 71, 14, 71, 55, 71, 71, 47, 71, 71, 71, - - 12, 71, 71, 71, 21, 31, 10, 27, 52, 71, - 54, 46, 43, 24, 71, 71, 18, 71, 13, 38, - 28, 26, 44, 71, 71, 53, 40, 32, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, - 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, - - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[71] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 - } ; - -static const flex_int16_t yy_base[235] = - { 0, - 0, 0, 0, 0, 624, 625, 625, 625, 605, 617, - 615, 625, 625, 625, 625, 625, 625, 625, 625, 58, - 625, 56, 625, 602, 57, 61, 62, 63, 64, 83, - 65, 73, 91, 76, 604, 117, 119, 115, 103, 142, - 134, 129, 145, 141, 625, 625, 613, 625, 611, 625, - 601, 71, 625, 625, 625, 0, 600, 89, 79, 146, - 599, 152, 155, 161, 172, 167, 182, 174, 188, 187, - 189, 190, 195, 196, 199, 249, 598, 200, 203, 216, - 202, 212, 597, 230, 220, 229, 223, 246, 225, 250, - 233, 263, 258, 270, 275, 280, 596, 595, 594, 277, - - 274, 278, 288, 296, 304, 294, 311, 297, 314, 306, - 319, 308, 323, 295, 321, 332, 333, 328, 336, 347, - 330, 354, 353, 357, 593, 358, 361, 369, 377, 592, - 376, 359, 373, 379, 384, 383, 387, 389, 390, 393, - 401, 591, 583, 397, 399, 581, 580, 402, 578, 577, - 409, 576, 420, 413, 422, 575, 424, 428, 572, 432, - 431, 394, 435, 570, 569, 568, 567, 450, 439, 448, - 458, 566, 462, 565, 466, 564, 464, 468, 469, 563, - 476, 561, 471, 479, 490, 474, 494, 560, 482, 559, - 498, 557, 496, 551, 484, 510, 546, 512, 500, 502, - - 503, 519, 520, 522, 544, 538, 477, 456, 438, 530, - 405, 355, 260, 255, 537, 540, 251, 527, 210, 185, - 132, 127, 126, 549, 541, 124, 120, 88, 625, 599, - 601, 603, 90, 79 - } ; - -static const flex_int16_t yy_def[235] = - { 0, - 229, 1, 230, 230, 229, 229, 229, 229, 229, 231, - 232, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 229, 229, 231, 229, 232, 229, - 229, 229, 229, 229, 229, 234, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 229, 233, 233, 233, - - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 0, 229, - 229, 229, 229, 229 - } ; - -static const flex_int16_t yy_nxt[696] = - { 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, - 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, - 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, - 51, 56, 52, 53, 54, 56, 56, 56, 56, 56, - 56, 62, 66, 51, 60, 52, 67, 56, 63, 58, - 56, 57, 74, 56, 59, 64, 75, 56, 65, 68, - - 99, 73, 56, 56, 61, 56, 69, 62, 66, 78, - 60, 98, 67, 70, 63, 58, 71, 56, 74, 72, - 59, 64, 75, 76, 65, 68, 99, 73, 77, 56, - 61, 56, 69, 56, 56, 78, 85, 98, 56, 70, - 56, 56, 71, 56, 79, 72, 56, 83, 56, 76, - 80, 84, 81, 90, 77, 56, 56, 91, 82, 56, - 56, 92, 85, 93, 94, 86, 56, 96, 87, 56, - 79, 100, 95, 83, 102, 56, 80, 84, 81, 90, - 88, 56, 101, 91, 82, 89, 56, 92, 56, 93, - 94, 86, 103, 96, 87, 104, 56, 100, 95, 56, - - 102, 56, 56, 56, 56, 105, 88, 108, 101, 56, - 56, 89, 106, 56, 56, 109, 56, 56, 103, 107, - 111, 104, 110, 113, 56, 112, 56, 122, 114, 116, - 56, 105, 123, 108, 56, 124, 115, 56, 106, 56, - 125, 109, 126, 56, 56, 107, 111, 56, 110, 113, - 128, 112, 127, 122, 114, 116, 131, 133, 123, 129, - 56, 124, 115, 56, 56, 56, 125, 130, 126, 56, - 134, 117, 56, 118, 56, 135, 128, 56, 127, 132, - 137, 119, 131, 133, 56, 129, 120, 121, 56, 56, - 136, 56, 56, 130, 56, 142, 134, 117, 139, 118, - - 138, 135, 56, 140, 141, 132, 137, 119, 56, 56, - 56, 56, 120, 121, 143, 145, 136, 148, 56, 144, - 56, 142, 56, 146, 139, 56, 138, 147, 56, 140, - 141, 150, 149, 56, 157, 56, 153, 56, 154, 155, - 143, 145, 56, 148, 56, 144, 56, 56, 158, 146, - 56, 151, 152, 147, 156, 161, 160, 150, 149, 162, - 157, 56, 153, 164, 154, 155, 159, 56, 56, 56, - 163, 56, 56, 56, 158, 56, 166, 151, 152, 167, - 156, 161, 160, 56, 169, 162, 165, 56, 168, 164, - 56, 56, 159, 56, 174, 173, 163, 56, 56, 170, - - 171, 56, 166, 56, 56, 167, 178, 56, 56, 175, - 169, 56, 165, 56, 168, 56, 56, 172, 177, 56, - 174, 173, 176, 56, 183, 170, 171, 56, 179, 181, - 194, 180, 178, 182, 56, 175, 56, 184, 56, 187, - 185, 189, 56, 172, 177, 56, 56, 186, 176, 56, - 183, 188, 56, 56, 179, 181, 194, 180, 190, 182, - 191, 193, 56, 184, 56, 187, 185, 189, 198, 196, - 56, 195, 56, 186, 192, 197, 56, 188, 56, 199, - 56, 200, 56, 56, 190, 56, 191, 193, 56, 201, - 56, 56, 204, 56, 198, 196, 56, 195, 56, 205, - - 192, 197, 207, 202, 56, 199, 203, 200, 56, 206, - 56, 209, 56, 208, 56, 201, 56, 56, 204, 213, - 211, 210, 214, 212, 56, 205, 56, 218, 207, 202, - 215, 216, 203, 56, 56, 206, 56, 209, 217, 208, - 219, 56, 220, 221, 56, 213, 211, 210, 214, 212, - 226, 56, 56, 218, 56, 56, 215, 216, 56, 222, - 56, 225, 223, 56, 217, 56, 219, 224, 220, 221, - 228, 56, 227, 56, 56, 56, 226, 56, 56, 56, - 56, 56, 56, 56, 56, 222, 56, 225, 223, 56, - 56, 56, 56, 224, 56, 56, 228, 56, 227, 45, - - 45, 47, 47, 49, 49, 56, 56, 56, 56, 56, - 97, 56, 56, 56, 56, 97, 50, 48, 56, 55, - 50, 48, 46, 229, 5, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229 - - } ; - -static const flex_int16_t yy_chk[696] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, - 234, 27, 28, 52, 26, 52, 28, 32, 27, 25, - 34, 233, 32, 59, 25, 27, 32, 30, 27, 28, - - 59, 31, 228, 58, 26, 33, 29, 27, 28, 34, - 26, 58, 28, 30, 27, 25, 30, 39, 32, 30, - 25, 27, 32, 33, 27, 28, 59, 31, 33, 38, - 26, 36, 29, 37, 227, 34, 39, 58, 226, 30, - 223, 222, 30, 42, 36, 30, 221, 38, 41, 33, - 36, 38, 37, 41, 33, 44, 40, 41, 37, 43, - 60, 42, 39, 42, 43, 40, 62, 44, 40, 63, - 36, 60, 43, 38, 63, 64, 36, 38, 37, 41, - 40, 66, 62, 41, 37, 40, 65, 42, 68, 42, - 43, 40, 64, 44, 40, 65, 67, 60, 43, 220, - - 63, 70, 69, 71, 72, 66, 40, 68, 62, 73, - 74, 40, 67, 75, 78, 69, 81, 79, 64, 67, - 70, 65, 69, 72, 219, 71, 82, 78, 73, 75, - 80, 66, 79, 68, 85, 80, 74, 87, 67, 89, - 81, 69, 82, 86, 84, 67, 70, 91, 69, 72, - 85, 71, 84, 78, 73, 75, 87, 89, 79, 86, - 88, 80, 74, 76, 90, 217, 81, 86, 82, 214, - 90, 76, 93, 76, 213, 91, 85, 92, 84, 88, - 93, 76, 87, 89, 94, 86, 76, 76, 101, 95, - 92, 100, 102, 86, 96, 101, 90, 76, 95, 76, - - 94, 91, 103, 96, 100, 88, 93, 76, 106, 114, - 104, 108, 76, 76, 102, 104, 92, 106, 105, 103, - 110, 101, 112, 105, 95, 107, 94, 105, 109, 96, - 100, 108, 107, 111, 114, 115, 110, 113, 111, 112, - 102, 104, 118, 106, 121, 103, 116, 117, 115, 105, - 119, 109, 109, 105, 113, 118, 117, 108, 107, 119, - 114, 120, 110, 121, 111, 112, 116, 123, 122, 212, - 120, 124, 126, 132, 115, 127, 123, 109, 109, 124, - 113, 118, 117, 128, 127, 119, 122, 133, 126, 121, - 131, 129, 116, 134, 133, 132, 120, 136, 135, 128, - - 129, 137, 123, 138, 139, 124, 137, 140, 162, 134, - 127, 144, 122, 145, 126, 141, 148, 131, 136, 211, - 133, 132, 135, 151, 144, 128, 129, 154, 138, 140, - 162, 139, 137, 141, 153, 134, 155, 145, 157, 153, - 148, 155, 158, 131, 136, 161, 160, 151, 135, 163, - 144, 154, 209, 169, 138, 140, 162, 139, 157, 141, - 158, 161, 170, 145, 168, 153, 148, 155, 170, 168, - 208, 163, 171, 151, 160, 169, 173, 154, 177, 171, - 175, 173, 178, 179, 157, 183, 158, 161, 186, 175, - 181, 207, 179, 184, 170, 168, 189, 163, 195, 181, - - 160, 169, 184, 177, 185, 171, 178, 173, 187, 183, - 193, 186, 191, 185, 199, 175, 200, 201, 179, 193, - 189, 187, 195, 191, 196, 181, 198, 200, 184, 177, - 196, 198, 178, 202, 203, 183, 204, 186, 199, 185, - 201, 218, 202, 203, 210, 193, 189, 187, 195, 191, - 218, 215, 206, 200, 216, 225, 196, 198, 205, 204, - 197, 216, 210, 224, 199, 194, 201, 215, 202, 203, - 225, 192, 224, 190, 188, 182, 218, 180, 176, 174, - 172, 167, 166, 165, 164, 204, 159, 216, 210, 156, - 152, 150, 149, 215, 147, 146, 225, 143, 224, 230, - - 230, 231, 231, 232, 232, 142, 130, 125, 99, 98, - 97, 83, 77, 61, 57, 51, 49, 47, 35, 24, - 11, 10, 9, 5, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229 - - } ; +{ + flex_int32_t yy_verify; + flex_int32_t yy_nxt; +}; +static const flex_int16_t yy_accept[229] = {0, + 0, + 0, + 0, + 0, + 79, + 77, + 1, + 2, + 77, + 77, + 77, + 57, + 58, + 73, + 71, + 59, + 72, + 6, + 74, + 3, + 5, + 64, + 60, + 66, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 78, + 63, + 0, + 75, + 0, + 76, + 0, + 3, + 61, + 62, + 65, + 70, + 70, + 70, + 48, + 70, + 47, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 50, + 68, + 70, + 70, + 70, + 70, + 70, + 15, + 23, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 4, + 22, + 49, + 70, + + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 33, + 70, + 70, + 70, + 67, + 70, + 70, + 70, + 70, + 29, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 70, + 19, + 34, + 70, + 70, + 36, + 70, + 9, + 11, + 70, + 7, + 70, + 70, + 70, + 20, + 70, + 70, + 8, + 70, + 70, + 70, + 70, + 25, + 55, + 69, + 41, + 39, + 70, + 70, + 70, + 16, + 70, + 17, + 70, + 37, + 70, + 70, + 70, + 56, + 70, + 30, + 70, + 70, + 70, + 70, + 70, + 35, + 70, + 44, + 70, + 14, + 70, + 54, + 70, + 70, + 46, + 70, + 70, + 70, + 12, + + 70, + 70, + 70, + 21, + 31, + 10, + 27, + 51, + 70, + 53, + 45, + 42, + 24, + 70, + 70, + 18, + 70, + 13, + 38, + 28, + 26, + 43, + 70, + 70, + 52, + 40, + 32, + 0}; + +static const YY_CHAR yy_ec[256] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 3, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 4, + 5, + 1, + 1, + 1, + 1, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 1, + 16, + 17, + 18, + 19, + 1, + 1, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 1, + 1, + 1, + 1, + 45, + 1, + 46, + 47, + 48, + 49, + + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 45, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1}; + +static const YY_CHAR yy_meta[71] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2}; + +static const flex_int16_t yy_base[234] = {0, + 0, + 0, + 0, + 0, + 621, + 622, + 622, + 622, + 602, + 614, + 612, + 622, + 622, + 622, + 622, + 622, + 622, + 622, + 622, + 58, + 622, + 56, + 622, + 599, + 57, + 61, + 62, + 63, + 64, + 83, + 65, + 73, + 91, + 76, + 601, + 117, + 119, + 115, + 103, + 142, + 134, + 129, + 145, + 141, + 622, + 622, + 610, + 622, + 608, + 622, + 598, + 71, + 622, + 622, + 622, + 0, + 597, + 89, + 79, + 146, + 596, + 152, + 155, + 161, + 172, + 167, + 182, + 174, + 188, + 187, + 189, + 190, + 195, + 196, + 199, + 249, + 595, + 200, + 203, + 216, + 202, + 212, + 594, + 230, + 220, + 229, + 223, + 246, + 225, + 250, + 233, + 263, + 258, + 270, + 275, + 280, + 593, + 592, + 591, + 277, + + 274, + 278, + 288, + 296, + 294, + 295, + 306, + 297, + 309, + 308, + 314, + 311, + 318, + 321, + 323, + 320, + 325, + 338, + 344, + 347, + 322, + 337, + 348, + 363, + 590, + 349, + 364, + 352, + 369, + 582, + 374, + 370, + 380, + 384, + 385, + 375, + 388, + 386, + 376, + 390, + 389, + 581, + 580, + 395, + 406, + 579, + 415, + 577, + 576, + 416, + 575, + 405, + 417, + 420, + 572, + 423, + 414, + 571, + 421, + 428, + 402, + 431, + 570, + 569, + 568, + 567, + 442, + 446, + 448, + 445, + 566, + 455, + 565, + 462, + 564, + 457, + 459, + 463, + 558, + 476, + 556, + 464, + 481, + 484, + 477, + 474, + 555, + 491, + 554, + 492, + 553, + 495, + 550, + 496, + 499, + 549, + 501, + 510, + 507, + 489, + + 524, + 527, + 502, + 545, + 528, + 523, + 522, + 461, + 517, + 398, + 342, + 260, + 255, + 521, + 540, + 251, + 539, + 210, + 185, + 132, + 127, + 126, + 543, + 542, + 124, + 120, + 88, + 622, + 598, + 600, + 602, + 90, + 79}; + +static const flex_int16_t yy_def[234] = {0, + 228, + 1, + 229, + 229, + 228, + 228, + 228, + 228, + 228, + 230, + 231, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 228, + 228, + 230, + 228, + 231, + 228, + 228, + 228, + 228, + 228, + 228, + 233, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 228, + 232, + 232, + 232, + + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 232, + 0, + 228, + 228, + 228, + 228, + 228}; + +static const flex_int16_t yy_nxt[693] = {0, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 35, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 51, + 56, + 52, + 53, + 54, + 56, + 56, + 56, + 56, + 56, + 56, + 62, + 66, + 51, + 60, + 52, + 67, + 56, + 63, + 58, + 56, + 57, + 74, + 56, + 59, + 64, + 75, + 56, + 65, + 68, + + 99, + 73, + 56, + 56, + 61, + 56, + 69, + 62, + 66, + 78, + 60, + 98, + 67, + 70, + 63, + 58, + 71, + 56, + 74, + 72, + 59, + 64, + 75, + 76, + 65, + 68, + 99, + 73, + 77, + 56, + 61, + 56, + 69, + 56, + 56, + 78, + 85, + 98, + 56, + 70, + 56, + 56, + 71, + 56, + 79, + 72, + 56, + 83, + 56, + 76, + 80, + 84, + 81, + 90, + 77, + 56, + 56, + 91, + 82, + 56, + 56, + 92, + 85, + 93, + 94, + 86, + 56, + 96, + 87, + 56, + 79, + 100, + 95, + 83, + 102, + 56, + 80, + 84, + 81, + 90, + 88, + 56, + 101, + 91, + 82, + 89, + 56, + 92, + 56, + 93, + 94, + 86, + 103, + 96, + 87, + 104, + 56, + 100, + 95, + 56, + + 102, + 56, + 56, + 56, + 56, + 105, + 88, + 108, + 101, + 56, + 56, + 89, + 106, + 56, + 56, + 109, + 56, + 56, + 103, + 107, + 111, + 104, + 110, + 113, + 56, + 112, + 56, + 122, + 114, + 116, + 56, + 105, + 123, + 108, + 56, + 124, + 115, + 56, + 106, + 56, + 125, + 109, + 126, + 56, + 56, + 107, + 111, + 56, + 110, + 113, + 128, + 112, + 127, + 122, + 114, + 116, + 131, + 133, + 123, + 129, + 56, + 124, + 115, + 56, + 56, + 56, + 125, + 130, + 126, + 56, + 134, + 117, + 56, + 118, + 56, + 135, + 128, + 56, + 127, + 132, + 137, + 119, + 131, + 133, + 56, + 129, + 120, + 121, + 56, + 56, + 136, + 56, + 56, + 130, + 56, + 142, + 134, + 117, + 139, + 118, + + 138, + 135, + 56, + 140, + 141, + 132, + 137, + 119, + 56, + 56, + 56, + 56, + 120, + 121, + 143, + 145, + 136, + 146, + 147, + 144, + 56, + 142, + 56, + 56, + 139, + 56, + 138, + 148, + 56, + 140, + 141, + 149, + 56, + 153, + 56, + 56, + 56, + 56, + 152, + 56, + 143, + 145, + 154, + 146, + 147, + 144, + 150, + 151, + 159, + 155, + 157, + 56, + 56, + 148, + 158, + 163, + 56, + 149, + 56, + 153, + 156, + 56, + 56, + 56, + 152, + 160, + 56, + 161, + 154, + 164, + 162, + 165, + 150, + 151, + 159, + 155, + 157, + 56, + 56, + 167, + 158, + 163, + 169, + 56, + 56, + 166, + 156, + 168, + 56, + 56, + 56, + 160, + 170, + 161, + 56, + 164, + 162, + 165, + 56, + 56, + + 56, + 173, + 56, + 56, + 56, + 167, + 172, + 177, + 169, + 56, + 176, + 166, + 56, + 168, + 174, + 171, + 56, + 179, + 170, + 56, + 56, + 181, + 182, + 175, + 186, + 178, + 180, + 173, + 56, + 56, + 56, + 56, + 172, + 177, + 56, + 56, + 176, + 56, + 193, + 188, + 174, + 171, + 56, + 179, + 183, + 56, + 190, + 181, + 182, + 175, + 186, + 178, + 180, + 184, + 185, + 187, + 56, + 189, + 192, + 56, + 56, + 195, + 56, + 191, + 193, + 188, + 198, + 194, + 197, + 56, + 183, + 56, + 190, + 56, + 199, + 56, + 56, + 56, + 56, + 184, + 185, + 187, + 196, + 189, + 192, + 200, + 203, + 195, + 56, + 191, + 56, + 56, + 198, + 194, + 197, + 56, + 201, + 202, + 56, + 204, + + 199, + 209, + 205, + 56, + 206, + 56, + 56, + 207, + 196, + 56, + 56, + 200, + 203, + 56, + 208, + 56, + 56, + 211, + 212, + 214, + 215, + 56, + 201, + 202, + 56, + 204, + 218, + 209, + 205, + 210, + 206, + 56, + 217, + 207, + 213, + 56, + 56, + 56, + 56, + 221, + 208, + 56, + 56, + 211, + 212, + 214, + 215, + 219, + 216, + 222, + 220, + 223, + 218, + 56, + 56, + 210, + 56, + 56, + 217, + 56, + 213, + 224, + 225, + 56, + 56, + 221, + 226, + 56, + 56, + 56, + 56, + 227, + 56, + 219, + 216, + 222, + 220, + 223, + 56, + 56, + 56, + 56, + 56, + 56, + 56, + 56, + 56, + 224, + 225, + 56, + 56, + 56, + 226, + 56, + 56, + 56, + 56, + 227, + 45, + 45, + + 47, + 47, + 49, + 49, + 56, + 56, + 56, + 97, + 56, + 56, + 56, + 56, + 97, + 50, + 48, + 56, + 55, + 50, + 48, + 46, + 228, + 5, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228 + +}; + +static const flex_int16_t yy_chk[693] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 20, + 25, + 20, + 22, + 22, + 26, + 27, + 28, + 29, + 31, + 233, + 27, + 28, + 52, + 26, + 52, + 28, + 32, + 27, + 25, + 34, + 232, + 32, + 59, + 25, + 27, + 32, + 30, + 27, + 28, + + 59, + 31, + 227, + 58, + 26, + 33, + 29, + 27, + 28, + 34, + 26, + 58, + 28, + 30, + 27, + 25, + 30, + 39, + 32, + 30, + 25, + 27, + 32, + 33, + 27, + 28, + 59, + 31, + 33, + 38, + 26, + 36, + 29, + 37, + 226, + 34, + 39, + 58, + 225, + 30, + 222, + 221, + 30, + 42, + 36, + 30, + 220, + 38, + 41, + 33, + 36, + 38, + 37, + 41, + 33, + 44, + 40, + 41, + 37, + 43, + 60, + 42, + 39, + 42, + 43, + 40, + 62, + 44, + 40, + 63, + 36, + 60, + 43, + 38, + 63, + 64, + 36, + 38, + 37, + 41, + 40, + 66, + 62, + 41, + 37, + 40, + 65, + 42, + 68, + 42, + 43, + 40, + 64, + 44, + 40, + 65, + 67, + 60, + 43, + 219, + + 63, + 70, + 69, + 71, + 72, + 66, + 40, + 68, + 62, + 73, + 74, + 40, + 67, + 75, + 78, + 69, + 81, + 79, + 64, + 67, + 70, + 65, + 69, + 72, + 218, + 71, + 82, + 78, + 73, + 75, + 80, + 66, + 79, + 68, + 85, + 80, + 74, + 87, + 67, + 89, + 81, + 69, + 82, + 86, + 84, + 67, + 70, + 91, + 69, + 72, + 85, + 71, + 84, + 78, + 73, + 75, + 87, + 89, + 79, + 86, + 88, + 80, + 74, + 76, + 90, + 216, + 81, + 86, + 82, + 213, + 90, + 76, + 93, + 76, + 212, + 91, + 85, + 92, + 84, + 88, + 93, + 76, + 87, + 89, + 94, + 86, + 76, + 76, + 101, + 95, + 92, + 100, + 102, + 86, + 96, + 101, + 90, + 76, + 95, + 76, + + 94, + 91, + 103, + 96, + 100, + 88, + 93, + 76, + 105, + 106, + 104, + 108, + 76, + 76, + 102, + 104, + 92, + 105, + 106, + 103, + 107, + 101, + 110, + 109, + 95, + 112, + 94, + 107, + 111, + 96, + 100, + 108, + 113, + 111, + 116, + 114, + 121, + 115, + 110, + 117, + 102, + 104, + 112, + 105, + 106, + 103, + 109, + 109, + 117, + 113, + 115, + 122, + 118, + 107, + 116, + 121, + 211, + 108, + 119, + 111, + 114, + 120, + 123, + 126, + 110, + 118, + 128, + 119, + 112, + 122, + 120, + 123, + 109, + 109, + 117, + 113, + 115, + 124, + 127, + 126, + 116, + 121, + 128, + 129, + 132, + 124, + 114, + 127, + 131, + 136, + 139, + 118, + 129, + 119, + 133, + 122, + 120, + 123, + 134, + 135, + + 138, + 133, + 137, + 141, + 140, + 126, + 132, + 137, + 128, + 144, + 136, + 124, + 210, + 127, + 134, + 131, + 161, + 139, + 129, + 152, + 145, + 141, + 144, + 135, + 152, + 138, + 140, + 133, + 157, + 147, + 150, + 153, + 132, + 137, + 154, + 159, + 136, + 156, + 161, + 154, + 134, + 131, + 160, + 139, + 145, + 162, + 157, + 141, + 144, + 135, + 152, + 138, + 140, + 147, + 150, + 153, + 167, + 156, + 160, + 170, + 168, + 167, + 169, + 159, + 161, + 154, + 170, + 162, + 169, + 172, + 145, + 176, + 157, + 177, + 172, + 208, + 174, + 178, + 182, + 147, + 150, + 153, + 168, + 156, + 160, + 174, + 178, + 167, + 186, + 159, + 180, + 185, + 170, + 162, + 169, + 183, + 176, + 177, + 184, + 180, + + 172, + 186, + 182, + 200, + 183, + 188, + 190, + 184, + 168, + 192, + 194, + 174, + 178, + 195, + 185, + 197, + 203, + 190, + 192, + 195, + 197, + 199, + 176, + 177, + 198, + 180, + 200, + 186, + 182, + 188, + 183, + 209, + 199, + 184, + 194, + 214, + 207, + 206, + 201, + 203, + 185, + 202, + 205, + 190, + 192, + 195, + 197, + 201, + 198, + 209, + 202, + 214, + 200, + 217, + 215, + 188, + 224, + 223, + 199, + 204, + 194, + 215, + 217, + 196, + 193, + 203, + 223, + 191, + 189, + 187, + 181, + 224, + 179, + 201, + 198, + 209, + 202, + 214, + 175, + 173, + 171, + 166, + 165, + 164, + 163, + 158, + 155, + 215, + 217, + 151, + 149, + 148, + 223, + 146, + 143, + 142, + 130, + 224, + 229, + 229, + + 230, + 230, + 231, + 231, + 125, + 99, + 98, + 97, + 83, + 77, + 61, + 57, + 51, + 49, + 47, + 35, + 24, + 11, + 10, + 9, + 5, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228, + 228 + +}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -699,8 +2837,8 @@ static const flex_int16_t yy_chk[696] = #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -714,13 +2852,15 @@ static const flex_int16_t yy_chk[696] = #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#define RETURN_TOKEN(token) \ + LOG_DEBUG("%s", #token); \ + return token #line 724 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -749,124 +2889,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t - { +{ + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char *yy_last_accepting_cpos; - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; + int yylineno_r; + int yy_flex_debug_r; - int yylineno_r; - int yy_flex_debug_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + YYSTYPE *yylval_r; - YYSTYPE * yylval_r; + YYLTYPE *yylloc_r; - YYLTYPE * yylloc_r; +}; /* end struct yyguts_t */ - }; /* end struct yyguts_t */ +static int yy_init_globals(yyscan_t yyscanner); -static int yy_init_globals ( yyscan_t yyscanner ); +/* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ +#define yylval yyg->yylval_r - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); +#define yylloc yyg->yylloc_r -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); + +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); + +int yyget_debug(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); +static int yyinput(yyscan_t yyscanner); #else -static int input ( yyscan_t yyscanner ); +static int input(yyscan_t yyscanner); #endif #endif @@ -886,42 +3026,38 @@ static int input ( yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO \ + do { \ + if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ + } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ +#define YY_INPUT(buf, result, max_size) \ + if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ + int c = '*'; \ + yy_size_t n; \ + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ + buf[n] = (char)c; \ + if (c == '\n') \ + buf[n++] = (char)c; \ + if (c == EOF && ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + result = n; \ + } else { \ + errno = 0; \ + while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ + if (errno != EINTR) { \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + break; \ + } \ + errno = 0; \ + clearerr(yyin); \ + } \ + } #endif @@ -940,7 +3076,7 @@ static int input ( yyscan_t yyscanner ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -951,11 +3087,9 @@ static int input ( yyscan_t yyscanner ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -967,634 +3101,542 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK /*LINTED*/ break; #endif -#define YY_RULE_SETUP \ - YY_USER_ACTION +#define YY_RULE_SETUP YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; + if (!yyg->yy_init) { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ + if (!yyg->yy_start) + yyg->yy_start = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if (!yyin) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if (!yyout) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_load_buffer_state( yyscanner ); - } + yy_load_buffer_state(yyscanner); + } - { + { #line 75 "lex_sql.l" - #line 1019 "lex_sql.cpp" - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 230 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 625 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP + while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_match: + do { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 229) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } while (yy_base[yy_current_state] != 622); + + yy_find_action: + yy_act = yy_accept[yy_current_state]; + if (yy_act == 0) { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + do_action: /* This label is used only to access EOF actions. */ + + switch (yy_act) { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + + case 1: YY_RULE_SETUP #line 77 "lex_sql.l" -// ignore whitespace - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP + // ignore whitespace + YY_BREAK + case 2: + /* rule 2 can match eol */ + YY_RULE_SETUP #line 78 "lex_sql.l" -; - YY_BREAK -case 3: -YY_RULE_SETUP + ; + YY_BREAK + case 3: YY_RULE_SETUP #line 80 "lex_sql.l" -yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); - YY_BREAK -case 4: -YY_RULE_SETUP + yylval->number = atoi(yytext); + RETURN_TOKEN(NUMBER); + YY_BREAK + case 4: YY_RULE_SETUP #line 81 "lex_sql.l" -yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); - YY_BREAK -case 5: -YY_RULE_SETUP + yylval->floats = (float)(atof(yytext)); + RETURN_TOKEN(FLOAT); + YY_BREAK + case 5: YY_RULE_SETUP #line 83 "lex_sql.l" -RETURN_TOKEN(SEMICOLON); - YY_BREAK -case 6: -YY_RULE_SETUP + RETURN_TOKEN(SEMICOLON); + YY_BREAK + case 6: YY_RULE_SETUP #line 84 "lex_sql.l" -RETURN_TOKEN(DOT); - YY_BREAK -case 7: -YY_RULE_SETUP + RETURN_TOKEN(DOT); + YY_BREAK + case 7: YY_RULE_SETUP #line 85 "lex_sql.l" -RETURN_TOKEN(EXIT); - YY_BREAK -case 8: -YY_RULE_SETUP + RETURN_TOKEN(EXIT); + YY_BREAK + case 8: YY_RULE_SETUP #line 86 "lex_sql.l" -RETURN_TOKEN(HELP); - YY_BREAK -case 9: -YY_RULE_SETUP + RETURN_TOKEN(HELP); + YY_BREAK + case 9: YY_RULE_SETUP #line 87 "lex_sql.l" -RETURN_TOKEN(DESC); - YY_BREAK -case 10: -YY_RULE_SETUP + RETURN_TOKEN(DESC); + YY_BREAK + case 10: YY_RULE_SETUP #line 88 "lex_sql.l" -RETURN_TOKEN(CREATE); - YY_BREAK -case 11: -YY_RULE_SETUP + RETURN_TOKEN(CREATE); + YY_BREAK + case 11: YY_RULE_SETUP #line 89 "lex_sql.l" -RETURN_TOKEN(DROP); - YY_BREAK -case 12: -YY_RULE_SETUP + RETURN_TOKEN(DROP); + YY_BREAK + case 12: YY_RULE_SETUP #line 90 "lex_sql.l" -RETURN_TOKEN(TABLE); - YY_BREAK -case 13: -YY_RULE_SETUP + RETURN_TOKEN(TABLE); + YY_BREAK + case 13: YY_RULE_SETUP #line 91 "lex_sql.l" -RETURN_TOKEN(TABLES); - YY_BREAK -case 14: -YY_RULE_SETUP + RETURN_TOKEN(TABLES); + YY_BREAK + case 14: YY_RULE_SETUP #line 92 "lex_sql.l" -RETURN_TOKEN(INDEX); - YY_BREAK -case 15: -YY_RULE_SETUP + RETURN_TOKEN(INDEX); + YY_BREAK + case 15: YY_RULE_SETUP #line 93 "lex_sql.l" -RETURN_TOKEN(ON); - YY_BREAK -case 16: -YY_RULE_SETUP + RETURN_TOKEN(ON); + YY_BREAK + case 16: YY_RULE_SETUP #line 94 "lex_sql.l" -RETURN_TOKEN(SHOW); - YY_BREAK -case 17: -YY_RULE_SETUP + RETURN_TOKEN(SHOW); + YY_BREAK + case 17: YY_RULE_SETUP #line 95 "lex_sql.l" -RETURN_TOKEN(SYNC); - YY_BREAK -case 18: -YY_RULE_SETUP + RETURN_TOKEN(SYNC); + YY_BREAK + case 18: YY_RULE_SETUP #line 96 "lex_sql.l" -RETURN_TOKEN(SELECT); - YY_BREAK -case 19: -YY_RULE_SETUP + RETURN_TOKEN(SELECT); + YY_BREAK + case 19: YY_RULE_SETUP #line 97 "lex_sql.l" -RETURN_TOKEN(CALC); - YY_BREAK -case 20: -YY_RULE_SETUP + RETURN_TOKEN(CALC); + YY_BREAK + case 20: YY_RULE_SETUP #line 98 "lex_sql.l" -RETURN_TOKEN(FROM); - YY_BREAK -case 21: -YY_RULE_SETUP + RETURN_TOKEN(FROM); + YY_BREAK + case 21: YY_RULE_SETUP #line 99 "lex_sql.l" -RETURN_TOKEN(WHERE); - YY_BREAK -case 22: -YY_RULE_SETUP + RETURN_TOKEN(WHERE); + YY_BREAK + case 22: YY_RULE_SETUP #line 100 "lex_sql.l" -RETURN_TOKEN(AND); - YY_BREAK -case 23: -YY_RULE_SETUP + RETURN_TOKEN(AND); + YY_BREAK + case 23: YY_RULE_SETUP #line 101 "lex_sql.l" -RETURN_TOKEN(OR); - YY_BREAK -case 24: -YY_RULE_SETUP + RETURN_TOKEN(OR); + YY_BREAK + case 24: YY_RULE_SETUP #line 102 "lex_sql.l" -RETURN_TOKEN(INSERT); - YY_BREAK -case 25: -YY_RULE_SETUP + RETURN_TOKEN(INSERT); + YY_BREAK + case 25: YY_RULE_SETUP #line 103 "lex_sql.l" -RETURN_TOKEN(INTO); - YY_BREAK -case 26: -YY_RULE_SETUP + RETURN_TOKEN(INTO); + YY_BREAK + case 26: YY_RULE_SETUP #line 104 "lex_sql.l" -RETURN_TOKEN(VALUES); - YY_BREAK -case 27: -YY_RULE_SETUP + RETURN_TOKEN(VALUES); + YY_BREAK + case 27: YY_RULE_SETUP #line 105 "lex_sql.l" -RETURN_TOKEN(DELETE); - YY_BREAK -case 28: -YY_RULE_SETUP + RETURN_TOKEN(DELETE); + YY_BREAK + case 28: YY_RULE_SETUP #line 106 "lex_sql.l" -RETURN_TOKEN(UPDATE); - YY_BREAK -case 29: -YY_RULE_SETUP + RETURN_TOKEN(UPDATE); + YY_BREAK + case 29: YY_RULE_SETUP #line 107 "lex_sql.l" -RETURN_TOKEN(SET); - YY_BREAK -case 30: -YY_RULE_SETUP + RETURN_TOKEN(SET); + YY_BREAK + case 30: YY_RULE_SETUP #line 108 "lex_sql.l" -RETURN_TOKEN(TRX_BEGIN); - YY_BREAK -case 31: -YY_RULE_SETUP + RETURN_TOKEN(TRX_BEGIN); + YY_BREAK + case 31: YY_RULE_SETUP #line 109 "lex_sql.l" -RETURN_TOKEN(TRX_COMMIT); - YY_BREAK -case 32: -YY_RULE_SETUP + RETURN_TOKEN(TRX_COMMIT); + YY_BREAK + case 32: YY_RULE_SETUP #line 110 "lex_sql.l" -RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK -case 33: -YY_RULE_SETUP + RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK + case 33: YY_RULE_SETUP #line 111 "lex_sql.l" -RETURN_TOKEN(INT_T); - YY_BREAK -case 34: -YY_RULE_SETUP + RETURN_TOKEN(INT_T); + YY_BREAK + case 34: YY_RULE_SETUP #line 112 "lex_sql.l" -RETURN_TOKEN(STRING_T); - YY_BREAK -case 35: -YY_RULE_SETUP + RETURN_TOKEN(STRING_T); + YY_BREAK + case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(FLOAT_T); - YY_BREAK -case 36: -YY_RULE_SETUP + RETURN_TOKEN(FLOAT_T); + YY_BREAK + case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK -case 37: -YY_RULE_SETUP + RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK + case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token - YY_BREAK -case 38: -YY_RULE_SETUP + RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + YY_BREAK + case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(UNIQUE); - YY_BREAK -case 39: -YY_RULE_SETUP + RETURN_TOKEN(UNIQUE); + YY_BREAK + case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(NULL_T); - YY_BREAK -case 40: -YY_RULE_SETUP + RETURN_TOKEN(NULL_T); + YY_BREAK + case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(NULLABLE); - YY_BREAK -case 41: -YY_RULE_SETUP + RETURN_TOKEN(NULLABLE); + YY_BREAK + case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(LOAD); - YY_BREAK -case 42: -YY_RULE_SETUP + RETURN_TOKEN(LOAD); + YY_BREAK + case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(DATA); - YY_BREAK -case 43: -YY_RULE_SETUP + RETURN_TOKEN(INFILE); + YY_BREAK + case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(INFILE); - YY_BREAK -case 44: -YY_RULE_SETUP + RETURN_TOKEN(EXPLAIN); + YY_BREAK + case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); - YY_BREAK -case 45: -YY_RULE_SETUP + RETURN_TOKEN(GROUP); + YY_BREAK + case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(GROUP); - YY_BREAK -case 46: -YY_RULE_SETUP + RETURN_TOKEN(HAVING); + YY_BREAK + case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(HAVING); - YY_BREAK -case 47: -YY_RULE_SETUP + RETURN_TOKEN(ORDER); + YY_BREAK + case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(ORDER); - YY_BREAK -case 48: -YY_RULE_SETUP + RETURN_TOKEN(BY); + YY_BREAK + case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(BY); - YY_BREAK -case 49: -YY_RULE_SETUP + RETURN_TOKEN(AS); + YY_BREAK + case 49: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(AS); - YY_BREAK -case 50: -YY_RULE_SETUP + RETURN_TOKEN(ASC); + YY_BREAK + case 50: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(ASC); - YY_BREAK -case 51: -YY_RULE_SETUP + RETURN_TOKEN(IN); + YY_BREAK + case 51: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(IN); - YY_BREAK -case 52: -YY_RULE_SETUP + RETURN_TOKEN(EXISTS); + YY_BREAK + case 52: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(EXISTS); - YY_BREAK -case 53: -YY_RULE_SETUP + RETURN_TOKEN(STORAGE); + YY_BREAK + case 53: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(STORAGE); - YY_BREAK -case 54: -YY_RULE_SETUP + RETURN_TOKEN(FORMAT); + YY_BREAK + case 54: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(FORMAT); - YY_BREAK -case 55: -YY_RULE_SETUP + RETURN_TOKEN(INNER); + YY_BREAK + case 55: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(INNER); - YY_BREAK -case 56: -YY_RULE_SETUP + RETURN_TOKEN(JOIN); + YY_BREAK + case 56: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(JOIN); - YY_BREAK -case 57: -YY_RULE_SETUP + RETURN_TOKEN(VIEW); + YY_BREAK + case 57: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(VIEW); - YY_BREAK -case 58: -YY_RULE_SETUP + RETURN_TOKEN(LBRACE); + YY_BREAK + case 58: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(LBRACE); - YY_BREAK -case 59: -YY_RULE_SETUP -#line 137 "lex_sql.l" -RETURN_TOKEN(RBRACE); - YY_BREAK -case 60: -YY_RULE_SETUP + RETURN_TOKEN(RBRACE); + YY_BREAK + case 59: YY_RULE_SETUP +#line 138 "lex_sql.l" + RETURN_TOKEN(COMMA); + YY_BREAK + case 60: YY_RULE_SETUP #line 139 "lex_sql.l" -RETURN_TOKEN(COMMA); - YY_BREAK -case 61: -YY_RULE_SETUP + RETURN_TOKEN(EQ); + YY_BREAK + case 61: YY_RULE_SETUP #line 140 "lex_sql.l" -RETURN_TOKEN(EQ); - YY_BREAK -case 62: -YY_RULE_SETUP + RETURN_TOKEN(LE); + YY_BREAK + case 62: YY_RULE_SETUP #line 141 "lex_sql.l" -RETURN_TOKEN(LE); - YY_BREAK -case 63: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 63: YY_RULE_SETUP #line 142 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 64: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 64: YY_RULE_SETUP #line 143 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 65: -YY_RULE_SETUP + RETURN_TOKEN(LT); + YY_BREAK + case 65: YY_RULE_SETUP #line 144 "lex_sql.l" -RETURN_TOKEN(LT); - YY_BREAK -case 66: -YY_RULE_SETUP + RETURN_TOKEN(GE); + YY_BREAK + case 66: YY_RULE_SETUP #line 145 "lex_sql.l" -RETURN_TOKEN(GE); - YY_BREAK -case 67: -YY_RULE_SETUP + RETURN_TOKEN(GT); + YY_BREAK + case 67: YY_RULE_SETUP #line 146 "lex_sql.l" -RETURN_TOKEN(GT); - YY_BREAK -case 68: -YY_RULE_SETUP + RETURN_TOKEN(NOT); + YY_BREAK + case 68: YY_RULE_SETUP #line 147 "lex_sql.l" -RETURN_TOKEN(NOT); - YY_BREAK -case 69: -YY_RULE_SETUP + RETURN_TOKEN(IS); + YY_BREAK + case 69: YY_RULE_SETUP #line 148 "lex_sql.l" -RETURN_TOKEN(IS); - YY_BREAK -case 70: -YY_RULE_SETUP -#line 149 "lex_sql.l" -RETURN_TOKEN(LIKE); - YY_BREAK -case 71: -YY_RULE_SETUP -#line 151 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); - YY_BREAK -case 72: + RETURN_TOKEN(LIKE); + YY_BREAK + case 70: YY_RULE_SETUP +#line 150 "lex_sql.l" + yylval->string = strdup(yytext); + RETURN_TOKEN(ID); + YY_BREAK + case 71: +#line 153 "lex_sql.l" + case 72: #line 154 "lex_sql.l" -case 73: + case 73: #line 155 "lex_sql.l" -case 74: -#line 156 "lex_sql.l" -case 75: -YY_RULE_SETUP + case 74: YY_RULE_SETUP +#line 155 "lex_sql.l" + { + return yytext[0]; + } + YY_BREAK + case 75: + /* rule 75 can match eol */ + YY_RULE_SETUP #line 156 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK -case 76: -/* rule 76 can match eol */ -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 76: + /* rule 76 can match eol */ + YY_RULE_SETUP #line 157 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 77: -/* rule 77 can match eol */ -YY_RULE_SETUP -#line 158 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 78: -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 77: YY_RULE_SETUP +#line 159 "lex_sql.l" + LOG_DEBUG("Unknown character [%c]",yytext[0]); + return yytext[0]; + YY_BREAK + case 78: YY_RULE_SETUP #line 160 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; - YY_BREAK -case 79: -YY_RULE_SETUP -#line 161 "lex_sql.l" -ECHO; - YY_BREAK -#line 1465 "lex_sql.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STR): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap( yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + ECHO; + YY_BREAK +#line 1460 "lex_sql.cpp" + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(STR): yyterminate(); + + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if (yy_next_state) { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_END_OF_FILE: { + yyg->yy_did_buffer_switch_on_eof = 0; + + if (yywrap(yyscanner)) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else { + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1604,171 +3646,149 @@ case YY_STATE_EOF(STR): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (yyscan_t yyscanner) +static int yy_get_next_buffer(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) + YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); + + if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ + if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for (i = 0; i < number_to_move; ++i) + *(dest++) = *(source++); + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else { + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); + + if (b->yy_is_our_buffer) { + yy_size_t new_size = b->yy_buf_size * 2; + + if (new_size <= 0) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); + } else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if (!b->yy_ch_buf) + YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + } + + if (num_to_read > YY_READ_BUF_SIZE) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if (yyg->yy_n_chars == 0) { + if (number_to_move == YY_MORE_ADJ) { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin, yyscanner); + } + + else { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = + (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); + if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +static yy_state_type yy_get_previous_state(yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 230 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + yy_current_state = yyg->yy_start; + + for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 229) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -1776,29 +3796,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 230 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 229); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 229) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 228); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -1807,141 +3825,133 @@ static int yy_get_next_buffer (yyscan_t yyscanner) #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) +static int yyinput(yyscan_t yyscanner) #else - static int input (yyscan_t yyscanner) +static int input(yyscan_t yyscanner) #endif { - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin , yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + int c; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin, yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: { + if (yywrap(yyscanner)) + return 0; + + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; + } + } + } - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) +void yyrestart(FILE *input_file, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); + yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); + yy_load_buffer_state(yyscanner); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack(yyscanner); + if (YY_CURRENT_BUFFER == new_buffer) + return; + + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state(yyscanner); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state (yyscan_t yyscanner) +static void yy_load_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -1950,105 +3960,105 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_BUFFER_STATE b; - b->yy_buf_size = size; + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + b->yy_buf_size = size; - b->yy_is_our_buffer = 1; + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); + if (!b->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - yy_init_buffer( b, file , yyscanner); + b->yy_is_our_buffer = 1; - return b; + yy_init_buffer(b, file, yyscanner); + + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! b ) - return; + if (!b) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); + if (b->yy_is_our_buffer) + yyfree((void *)b->yy_ch_buf, yyscanner); - yyfree( (void *) b , yyscanner ); + yyfree((void *)b, yyscanner); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + int oerrno = errno; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flush_buffer( b , yyscanner); + yy_flush_buffer(b, yyscanner); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!b) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); + if (b == YY_CURRENT_BUFFER) + yy_load_buffer_state(yyscanner); } /** Pushes the new state onto the stack. The new state becomes @@ -2057,99 +4067,95 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state (yyscan_t yyscanner) +void yypop_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (yyscan_t yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = + (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( + yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -2158,33 +4164,31 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b , yyscanner ); - - return b; + YY_BUFFER_STATE b; + + if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + + b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b, yyscanner); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -2195,10 +4199,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) { - - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + + return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2208,177 +4212,175 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n , yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t)(_yybytes_len + 2); + buf = (char *)yyalloc(n, yyscanner); + if (!buf) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + + for (i = 0; i < _yybytes_len; ++i) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf, n, yyscanner); + if (!b) + YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + fprintf(stderr, "%s\n", msg); + exit(YY_EXIT_FAILURE); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } while (0) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno (yyscan_t yyscanner) +int yyget_lineno(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (!YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column (yyscan_t yyscanner) +int yyget_column(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; + if (!YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in (yyscan_t yyscanner) +FILE *yyget_in(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out (yyscan_t yyscanner) +FILE *yyget_out(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text (yyscan_t yyscanner) +char *yyget_text(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyextra = user_defined; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) +void yyset_lineno(int _line_number, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_lineno called with no buffer"); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int _column_no , yyscan_t yyscanner) +void yyset_column(int _column_no, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_column called with no buffer"); - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); - - yycolumn = _column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -2387,80 +4389,80 @@ void yyset_column (int _column_no , yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) +void yyset_in(FILE *_in_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyin = _in_str; } -void yyset_out (FILE * _out_str , yyscan_t yyscanner) +void yyset_out(FILE *_out_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyout = _out_str; } -int yyget_debug (yyscan_t yyscanner) +int yyget_debug(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yy_flex_debug; } -void yyset_debug (int _bdebug , yyscan_t yyscanner) +void yyset_debug(int _bdebug, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_flex_debug = _bdebug; } /* Accessor methods for yylval and yylloc */ -YYSTYPE * yyget_lval (yyscan_t yyscanner) +YYSTYPE *yyget_lval(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylval; } -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc (yyscan_t yyscanner) +YYLTYPE *yyget_lloc(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylloc; } - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t* ptr_yy_globals) +int yylex_init(yyscan_t *ptr_yy_globals) { - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -2470,94 +4472,94 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra (yy_user_defined, &dummy_yyguts); + yyset_extra(yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - yyset_extra (yy_user_defined, *ptr_yy_globals); + yyset_extra(yy_user_defined, *ptr_yy_globals); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } -static int yy_init_globals (yyscan_t yyscanner) +static int yy_init_globals(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) +int yylex_destroy(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while (YY_CURRENT_BUFFER) { + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack, yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree(yyg->yy_start_stack, yyscanner); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals(yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree(yyscanner, yyscanner); + yyscanner = NULL; + return 0; } /* @@ -2565,63 +4567,59 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + int i; + for (i = 0; i < n; ++i) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +static int yy_flex_strlen(const char *s, yyscan_t yyscanner) { - int n; - for ( n = 0; s[n]; ++n ) - ; + int n; + for (n = 0; s[n]; ++n) + ; - return n; + return n; } #endif -void *yyalloc (yy_size_t size , yyscan_t yyscanner) +void *yyalloc(yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree (void * ptr , yyscan_t yyscanner) +void yyfree(void *ptr, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + free((char *)ptr); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 161 "lex_sql.l" - - -void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); -} +#line 160 "lex_sql.l" +void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index b49ae624..a7ae0d05 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,23 +12,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -81,62 +79,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -157,7 +155,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -197,73 +195,72 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -286,69 +283,69 @@ void yyfree ( void * , yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -376,11 +373,9 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -542,8 +537,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 161 "lex_sql.l" - +#line 160 "lex_sql.l" #line 548 "lex_sql.h" #undef yyIN_HEADER diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index ade1ae23..8bc5416d 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -117,7 +117,6 @@ UNIQUE RETURN_TOKEN(UNIQUE); NULL RETURN_TOKEN(NULL_T); NULLABLE RETURN_TOKEN(NULLABLE); LOAD RETURN_TOKEN(LOAD); -DATA RETURN_TOKEN(DATA); INFILE RETURN_TOKEN(INFILE); EXPLAIN RETURN_TOKEN(EXPLAIN); GROUP RETURN_TOKEN(GROUP); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index d5067906..4efa89c1 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,13 +63,9 @@ /* Pull parsers. */ #define YYPULL 1 - - - /* First part of user prologue. */ #line 2 "yacc_sql.y" - #include #include #include @@ -92,235 +88,222 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, - Expression *left, - Expression *right, - const char *sql_string, - YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression( + ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression(const char *function_name, - std::vector> child, - const char *sql_string, - YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression( + const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } -ParsedSqlNode *create_table_sql_node(char *table_name, - AttrInfoSqlNode* attr_def, - std::vector *attrinfos, - char* storage_format, - ParsedSqlNode *create_table_select) +ParsedSqlNode *create_table_sql_node(char *table_name, AttrInfoSqlNode *attr_def, + std::vector *attrinfos, char *storage_format, ParsedSqlNode *create_table_select) { - ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = parsed_sql_node->create_table; - create_table.relation_name = table_name; + ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = parsed_sql_node->create_table; + create_table.relation_name = table_name; - if (attrinfos) { - create_table.attr_infos.swap(*attrinfos); - delete attrinfos; - } - if (attr_def) { - create_table.attr_infos.emplace_back(*attr_def); - std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); - delete attr_def; - } - if (storage_format != nullptr) { - create_table.storage_format = storage_format; - free(storage_format); - } + if (attrinfos) { + create_table.attr_infos.swap(*attrinfos); + delete attrinfos; + } + if (attr_def) { + create_table.attr_infos.emplace_back(*attr_def); + std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); + delete attr_def; + } + if (storage_format != nullptr) { + create_table.storage_format = storage_format; + free(storage_format); + } - if (create_table_select) { - create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); - } + if (create_table_select) { + create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); + } - return parsed_sql_node; + return parsed_sql_node; } #line 155 "yacc_sql.cpp" -# ifndef YY_CAST -# ifdef __cplusplus -# define YY_CAST(Type, Val) static_cast (Val) -# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -# else -# define YY_CAST(Type, Val) ((Type) (Val)) -# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -# endif -# endif -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif +#ifndef YY_CAST +#ifdef __cplusplus +#define YY_CAST(Type, Val) static_cast(Val) +#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) +#else +#define YY_CAST(Type, Val) ((Type)(Val)) +#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) +#endif +#endif +#ifndef YY_NULLPTR +#if defined __cplusplus +#if 201103L <= __cplusplus +#define YY_NULLPTR nullptr +#else +#define YY_NULLPTR 0 +#endif +#else +#define YY_NULLPTR ((void *)0) +#endif +#endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_HAVING = 11, /* HAVING */ - YYSYMBOL_ORDER = 12, /* ORDER */ - YYSYMBOL_TABLE = 13, /* TABLE */ - YYSYMBOL_TABLES = 14, /* TABLES */ - YYSYMBOL_INDEX = 15, /* INDEX */ - YYSYMBOL_CALC = 16, /* CALC */ - YYSYMBOL_SELECT = 17, /* SELECT */ - YYSYMBOL_DESC = 18, /* DESC */ - YYSYMBOL_SHOW = 19, /* SHOW */ - YYSYMBOL_SYNC = 20, /* SYNC */ - YYSYMBOL_INSERT = 21, /* INSERT */ - YYSYMBOL_DELETE = 22, /* DELETE */ - YYSYMBOL_UPDATE = 23, /* UPDATE */ - YYSYMBOL_LBRACE = 24, /* LBRACE */ - YYSYMBOL_RBRACE = 25, /* RBRACE */ - YYSYMBOL_COMMA = 26, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 30, /* INT_T */ - YYSYMBOL_IN = 31, /* IN */ - YYSYMBOL_STRING_T = 32, /* STRING_T */ - YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ - YYSYMBOL_DATE_T = 34, /* DATE_T */ - YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_NOT = 36, /* NOT */ - YYSYMBOL_UNIQUE = 37, /* UNIQUE */ - YYSYMBOL_NULL_T = 38, /* NULL_T */ - YYSYMBOL_NULLABLE = 39, /* NULLABLE */ - YYSYMBOL_HELP = 40, /* HELP */ - YYSYMBOL_EXIT = 41, /* EXIT */ - YYSYMBOL_DOT = 42, /* DOT */ - YYSYMBOL_INTO = 43, /* INTO */ - YYSYMBOL_VALUES = 44, /* VALUES */ - YYSYMBOL_FROM = 45, /* FROM */ - YYSYMBOL_WHERE = 46, /* WHERE */ - YYSYMBOL_AND = 47, /* AND */ - YYSYMBOL_OR = 48, /* OR */ - YYSYMBOL_SET = 49, /* SET */ - YYSYMBOL_ON = 50, /* ON */ - YYSYMBOL_LOAD = 51, /* LOAD */ - YYSYMBOL_DATA = 52, /* DATA */ - YYSYMBOL_INFILE = 53, /* INFILE */ - YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ - YYSYMBOL_STORAGE = 55, /* STORAGE */ - YYSYMBOL_FORMAT = 56, /* FORMAT */ - YYSYMBOL_INNER = 57, /* INNER */ - YYSYMBOL_JOIN = 58, /* JOIN */ - YYSYMBOL_VIEW = 59, /* VIEW */ - YYSYMBOL_EQ = 60, /* EQ */ - YYSYMBOL_LT = 61, /* LT */ - YYSYMBOL_GT = 62, /* GT */ - YYSYMBOL_LE = 63, /* LE */ - YYSYMBOL_GE = 64, /* GE */ - YYSYMBOL_NE = 65, /* NE */ - YYSYMBOL_LIKE = 66, /* LIKE */ - YYSYMBOL_IS = 67, /* IS */ - YYSYMBOL_NUMBER = 68, /* NUMBER */ - YYSYMBOL_FLOAT = 69, /* FLOAT */ - YYSYMBOL_ID = 70, /* ID */ - YYSYMBOL_SSS = 71, /* SSS */ - YYSYMBOL_72_ = 72, /* '+' */ - YYSYMBOL_73_ = 73, /* '-' */ - YYSYMBOL_74_ = 74, /* '*' */ - YYSYMBOL_75_ = 75, /* '/' */ - YYSYMBOL_UMINUS = 76, /* UMINUS */ - YYSYMBOL_YYACCEPT = 77, /* $accept */ - YYSYMBOL_commands = 78, /* commands */ - YYSYMBOL_command_wrapper = 79, /* command_wrapper */ - YYSYMBOL_exit_stmt = 80, /* exit_stmt */ - YYSYMBOL_help_stmt = 81, /* help_stmt */ - YYSYMBOL_sync_stmt = 82, /* sync_stmt */ - YYSYMBOL_begin_stmt = 83, /* begin_stmt */ - YYSYMBOL_commit_stmt = 84, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 85, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 86, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 87, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 88, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 89, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 90, /* create_index_stmt */ - YYSYMBOL_opt_unique = 91, /* opt_unique */ - YYSYMBOL_attr_list = 92, /* attr_list */ - YYSYMBOL_drop_index_stmt = 93, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 94, /* create_table_stmt */ - YYSYMBOL_create_view_stmt = 95, /* create_view_stmt */ - YYSYMBOL_drop_view_stmt = 96, /* drop_view_stmt */ - YYSYMBOL_attr_def_list = 97, /* attr_def_list */ - YYSYMBOL_attr_def = 98, /* attr_def */ - YYSYMBOL_nullable_constraint = 99, /* nullable_constraint */ - YYSYMBOL_type = 100, /* type */ - YYSYMBOL_insert_stmt = 101, /* insert_stmt */ - YYSYMBOL_values_list = 102, /* values_list */ - YYSYMBOL_value_list = 103, /* value_list */ - YYSYMBOL_value = 104, /* value */ - YYSYMBOL_nonnegative_value = 105, /* nonnegative_value */ - YYSYMBOL_storage_format = 106, /* storage_format */ - YYSYMBOL_delete_stmt = 107, /* delete_stmt */ - YYSYMBOL_update_stmt = 108, /* update_stmt */ - YYSYMBOL_set_clauses = 109, /* set_clauses */ - YYSYMBOL_setClause = 110, /* setClause */ - YYSYMBOL_select_stmt = 111, /* select_stmt */ - YYSYMBOL_calc_stmt = 112, /* calc_stmt */ - YYSYMBOL_expression_list = 113, /* expression_list */ - YYSYMBOL_expression = 114, /* expression */ - YYSYMBOL_alias = 115, /* alias */ - YYSYMBOL_aggr_func_expr = 116, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 117, /* sub_query_expr */ - YYSYMBOL_rel_attr = 118, /* rel_attr */ - YYSYMBOL_relation = 119, /* relation */ - YYSYMBOL_rel_list = 120, /* rel_list */ - YYSYMBOL_join_clauses = 121, /* join_clauses */ - YYSYMBOL_where = 122, /* where */ - YYSYMBOL_condition = 123, /* condition */ - YYSYMBOL_comp_op = 124, /* comp_op */ - YYSYMBOL_opt_order_by = 125, /* opt_order_by */ - YYSYMBOL_sort_list = 126, /* sort_list */ - YYSYMBOL_sort_unit = 127, /* sort_unit */ - YYSYMBOL_group_by = 128, /* group_by */ - YYSYMBOL_opt_having = 129, /* opt_having */ - YYSYMBOL_load_data_stmt = 130, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 131, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 132, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 133 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_HAVING = 11, /* HAVING */ + YYSYMBOL_ORDER = 12, /* ORDER */ + YYSYMBOL_TABLE = 13, /* TABLE */ + YYSYMBOL_TABLES = 14, /* TABLES */ + YYSYMBOL_INDEX = 15, /* INDEX */ + YYSYMBOL_CALC = 16, /* CALC */ + YYSYMBOL_SELECT = 17, /* SELECT */ + YYSYMBOL_DESC = 18, /* DESC */ + YYSYMBOL_SHOW = 19, /* SHOW */ + YYSYMBOL_SYNC = 20, /* SYNC */ + YYSYMBOL_INSERT = 21, /* INSERT */ + YYSYMBOL_DELETE = 22, /* DELETE */ + YYSYMBOL_UPDATE = 23, /* UPDATE */ + YYSYMBOL_LBRACE = 24, /* LBRACE */ + YYSYMBOL_RBRACE = 25, /* RBRACE */ + YYSYMBOL_COMMA = 26, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 30, /* INT_T */ + YYSYMBOL_IN = 31, /* IN */ + YYSYMBOL_STRING_T = 32, /* STRING_T */ + YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ + YYSYMBOL_DATE_T = 34, /* DATE_T */ + YYSYMBOL_TEXT_T = 35, /* TEXT_T */ + YYSYMBOL_NOT = 36, /* NOT */ + YYSYMBOL_UNIQUE = 37, /* UNIQUE */ + YYSYMBOL_NULL_T = 38, /* NULL_T */ + YYSYMBOL_NULLABLE = 39, /* NULLABLE */ + YYSYMBOL_HELP = 40, /* HELP */ + YYSYMBOL_EXIT = 41, /* EXIT */ + YYSYMBOL_DOT = 42, /* DOT */ + YYSYMBOL_INTO = 43, /* INTO */ + YYSYMBOL_VALUES = 44, /* VALUES */ + YYSYMBOL_FROM = 45, /* FROM */ + YYSYMBOL_WHERE = 46, /* WHERE */ + YYSYMBOL_AND = 47, /* AND */ + YYSYMBOL_OR = 48, /* OR */ + YYSYMBOL_SET = 49, /* SET */ + YYSYMBOL_ON = 50, /* ON */ + YYSYMBOL_LOAD = 51, /* LOAD */ + YYSYMBOL_INFILE = 52, /* INFILE */ + YYSYMBOL_EXPLAIN = 53, /* EXPLAIN */ + YYSYMBOL_STORAGE = 54, /* STORAGE */ + YYSYMBOL_FORMAT = 55, /* FORMAT */ + YYSYMBOL_INNER = 56, /* INNER */ + YYSYMBOL_JOIN = 57, /* JOIN */ + YYSYMBOL_VIEW = 58, /* VIEW */ + YYSYMBOL_EQ = 59, /* EQ */ + YYSYMBOL_LT = 60, /* LT */ + YYSYMBOL_GT = 61, /* GT */ + YYSYMBOL_LE = 62, /* LE */ + YYSYMBOL_GE = 63, /* GE */ + YYSYMBOL_NE = 64, /* NE */ + YYSYMBOL_LIKE = 65, /* LIKE */ + YYSYMBOL_IS = 66, /* IS */ + YYSYMBOL_NUMBER = 67, /* NUMBER */ + YYSYMBOL_FLOAT = 68, /* FLOAT */ + YYSYMBOL_ID = 69, /* ID */ + YYSYMBOL_SSS = 70, /* SSS */ + YYSYMBOL_71_ = 71, /* '+' */ + YYSYMBOL_72_ = 72, /* '-' */ + YYSYMBOL_73_ = 73, /* '*' */ + YYSYMBOL_74_ = 74, /* '/' */ + YYSYMBOL_UMINUS = 75, /* UMINUS */ + YYSYMBOL_YYACCEPT = 76, /* $accept */ + YYSYMBOL_commands = 77, /* commands */ + YYSYMBOL_command_wrapper = 78, /* command_wrapper */ + YYSYMBOL_exit_stmt = 79, /* exit_stmt */ + YYSYMBOL_help_stmt = 80, /* help_stmt */ + YYSYMBOL_sync_stmt = 81, /* sync_stmt */ + YYSYMBOL_begin_stmt = 82, /* begin_stmt */ + YYSYMBOL_commit_stmt = 83, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 84, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 85, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 86, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 87, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 88, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 89, /* create_index_stmt */ + YYSYMBOL_opt_unique = 90, /* opt_unique */ + YYSYMBOL_attr_list = 91, /* attr_list */ + YYSYMBOL_drop_index_stmt = 92, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 93, /* create_table_stmt */ + YYSYMBOL_create_view_stmt = 94, /* create_view_stmt */ + YYSYMBOL_drop_view_stmt = 95, /* drop_view_stmt */ + YYSYMBOL_attr_def_list = 96, /* attr_def_list */ + YYSYMBOL_attr_def = 97, /* attr_def */ + YYSYMBOL_nullable_constraint = 98, /* nullable_constraint */ + YYSYMBOL_type = 99, /* type */ + YYSYMBOL_insert_stmt = 100, /* insert_stmt */ + YYSYMBOL_values_list = 101, /* values_list */ + YYSYMBOL_value_list = 102, /* value_list */ + YYSYMBOL_value = 103, /* value */ + YYSYMBOL_nonnegative_value = 104, /* nonnegative_value */ + YYSYMBOL_storage_format = 105, /* storage_format */ + YYSYMBOL_delete_stmt = 106, /* delete_stmt */ + YYSYMBOL_update_stmt = 107, /* update_stmt */ + YYSYMBOL_set_clauses = 108, /* set_clauses */ + YYSYMBOL_setClause = 109, /* setClause */ + YYSYMBOL_select_stmt = 110, /* select_stmt */ + YYSYMBOL_calc_stmt = 111, /* calc_stmt */ + YYSYMBOL_expression_list = 112, /* expression_list */ + YYSYMBOL_expression = 113, /* expression */ + YYSYMBOL_alias = 114, /* alias */ + YYSYMBOL_aggr_func_expr = 115, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 116, /* sub_query_expr */ + YYSYMBOL_rel_attr = 117, /* rel_attr */ + YYSYMBOL_relation = 118, /* relation */ + YYSYMBOL_rel_list = 119, /* rel_list */ + YYSYMBOL_join_clauses = 120, /* join_clauses */ + YYSYMBOL_where = 121, /* where */ + YYSYMBOL_condition = 122, /* condition */ + YYSYMBOL_comp_op = 123, /* comp_op */ + YYSYMBOL_opt_order_by = 124, /* opt_order_by */ + YYSYMBOL_sort_list = 125, /* sort_list */ + YYSYMBOL_sort_unit = 126, /* sort_unit */ + YYSYMBOL_group_by = 127, /* group_by */ + YYSYMBOL_opt_having = 128, /* opt_having */ + YYSYMBOL_explain_stmt = 129, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 130, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 131 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; - - - #ifdef short -# undef short +#undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -328,11 +311,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -# include /* INFRINGES ON USER NAME SPACE */ -# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_STDINT_H -# endif +#include /* INFRINGES ON USER NAME SPACE */ +#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_STDINT_H +#endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -362,16 +345,15 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 +#undef UINT_LEAST8_MAX +#undef UINT_LEAST16_MAX +#define UINT_LEAST8_MAX 255 +#define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -381,8 +363,7 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -391,656 +372,2665 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -# define YYPTRDIFF_T __PTRDIFF_TYPE__ -# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -# elif defined PTRDIFF_MAX -# ifndef ptrdiff_t -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYPTRDIFF_T ptrdiff_t -# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -# else -# define YYPTRDIFF_T long -# define YYPTRDIFF_MAXIMUM LONG_MAX -# endif +#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +#define YYPTRDIFF_T __PTRDIFF_TYPE__ +#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +#elif defined PTRDIFF_MAX +#ifndef ptrdiff_t +#include /* INFRINGES ON USER NAME SPACE */ +#endif +#define YYPTRDIFF_T ptrdiff_t +#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +#else +#define YYPTRDIFF_T long +#define YYPTRDIFF_MAXIMUM LONG_MAX +#endif #endif #ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned -# endif +#ifdef __SIZE_TYPE__ +#define YYSIZE_T __SIZE_TYPE__ +#elif defined size_t +#define YYSIZE_T size_t +#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YYSIZE_T size_t +#else +#define YYSIZE_T unsigned +#endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST (YYPTRDIFF_T, \ - (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ - ? YYPTRDIFF_MAXIMUM \ - : YY_CAST (YYSIZE_T, -1))) - -#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) +#define YYSIZE_MAXIMUM \ + YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ -typedef yytype_int16 yy_state_t; +typedef yytype_uint8 yy_state_t; /* State numbers in computations. */ typedef int yy_state_fast_t; #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif +#if defined YYENABLE_NLS && YYENABLE_NLS +#if ENABLE_NLS +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_(Msgid) dgettext("bison-runtime", Msgid) +#endif +#endif +#ifndef YY_ +#define YY_(Msgid) Msgid +#endif #endif - #ifndef YY_ATTRIBUTE_PURE -# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define YY_ATTRIBUTE_PURE -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) +#else +#define YY_ATTRIBUTE_PURE +#endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -# else -# define YY_ATTRIBUTE_UNUSED -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#else +#define YY_ATTRIBUTE_UNUSED +#endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +#if !defined lint || defined __GNUC__ +#define YY_USE(E) ((void)(E)) #else -# define YY_USE(E) /* empty */ +#define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") +#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") #else -# define YY_INITIAL_VALUE(Value) Value +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +#endif +#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") +#else +#define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +#define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -# define YY_IGNORE_USELESS_CAST_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -# define YY_IGNORE_USELESS_CAST_END \ - _Pragma ("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ +#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") +#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_END +#define YY_IGNORE_USELESS_CAST_BEGIN +#define YY_IGNORE_USELESS_CAST_END #endif - -#define YY_ASSERT(E) ((void) (0 && (E))) +#define YY_ASSERT(E) ((void)(0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif +#ifdef YYSTACK_USE_ALLOCA +#if YYSTACK_USE_ALLOCA +#ifdef __GNUC__ +#define YYSTACK_ALLOC __builtin_alloca +#elif defined __BUILTIN_VA_ARG_INCR +#include /* INFRINGES ON USER NAME SPACE */ +#elif defined _AIX +#define YYSTACK_ALLOC __alloca +#elif defined _MSC_VER +#include /* INFRINGES ON USER NAME SPACE */ +#define alloca _alloca +#else +#define YYSTACK_ALLOC alloca +#if !defined _ALLOCA_H && !defined EXIT_SUCCESS +#include /* INFRINGES ON USER NAME SPACE */ +/* Use EXIT_SUCCESS as a witness for stdlib.h. */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#endif +#endif +#endif + +#ifdef YYSTACK_ALLOC +/* Pacify GCC's 'empty if-body' warning. */ +#define YYSTACK_FREE(Ptr) \ + do { /* empty */ \ + ; \ + } while (0) +#ifndef YYSTACK_ALLOC_MAXIMUM +/* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +#endif +#else +#define YYSTACK_ALLOC YYMALLOC +#define YYSTACK_FREE YYFREE +#ifndef YYSTACK_ALLOC_MAXIMUM +#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +#endif +#if (defined __cplusplus && !defined EXIT_SUCCESS && \ + !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) +#include /* INFRINGES ON USER NAME SPACE */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef YYMALLOC +#define YYMALLOC malloc +#if !defined malloc && !defined EXIT_SUCCESS +void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#ifndef YYFREE +#define YYFREE free +#if !defined free && !defined EXIT_SUCCESS +void free(void *); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#endif #endif /* 1 */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ + defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) +#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ - + YYSIZEOF (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) +#define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +#define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF (*yyptr); \ - } \ - while (0) +#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF(*yyptr); \ + } while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif +#ifndef YYCOPY +#if defined __GNUC__ && 1 < __GNUC__ +#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) +#else +#define YYCOPY(Dst, Src, Count) \ + do { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } while (0) +#endif +#endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 75 +#define YYFINAL 72 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 282 +#define YYLAST 274 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 77 +#define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 57 +#define YYNNTS 56 /* YYNRULES -- Number of rules. */ -#define YYNRULES 147 +#define YYNRULES 145 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 264 +#define YYNSTATES 256 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 327 - +#define YYMAXUTOK 326 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 74, 72, 2, 73, 2, 75, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 76 -}; +static const yytype_int8 yytranslate[] = {0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 73, + 71, + 2, + 72, + 2, + 74, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 75}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = -{ - 0, 262, 262, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 296, 302, 307, 313, - 319, 325, 331, 338, 344, 352, 362, 377, 378, 382, - 388, 397, 407, 411, 415, 419, 423, 430, 438, 450, - 460, 463, 476, 488, 515, 519, 523, 528, 534, 535, - 536, 537, 538, 542, 555, 561, 568, 574, 582, 585, - 589, 596, 600, 604, 610, 617, 620, 627, 639, 653, - 658, 665, 675, 708, 741, 747, 756, 759, 768, 784, - 787, 790, 793, 796, 804, 807, 812, 818, 821, 824, - 827, 834, 837, 840, 845, 852, 859, 864, 874, 880, - 890, 907, 914, 926, 929, 935, 939, 946, 950, 957, - 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, - 968, 969, 970, 975, 978, 986, 991, 999, 1005, 1011, - 1021, 1024, 1032, 1035, 1042, 1055, 1063, 1074 -}; +static const yytype_int16 yyrline[] = {0, + 262, + 262, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 289, + 290, + 291, + 292, + 296, + 302, + 307, + 313, + 319, + 325, + 331, + 338, + 344, + 352, + 362, + 377, + 378, + 382, + 388, + 397, + 407, + 411, + 415, + 419, + 423, + 430, + 438, + 450, + 460, + 463, + 476, + 488, + 515, + 519, + 523, + 528, + 534, + 535, + 536, + 537, + 538, + 542, + 555, + 561, + 568, + 574, + 582, + 585, + 589, + 596, + 600, + 604, + 610, + 617, + 620, + 627, + 639, + 653, + 658, + 665, + 675, + 708, + 741, + 747, + 756, + 759, + 768, + 784, + 787, + 790, + 793, + 796, + 804, + 807, + 812, + 818, + 821, + 824, + 827, + 834, + 837, + 840, + 845, + 852, + 859, + 864, + 874, + 880, + 890, + 907, + 914, + 926, + 929, + 935, + 939, + 946, + 950, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 975, + 978, + 986, + 991, + 999, + 1005, + 1011, + 1021, + 1024, + 1032, + 1035, + 1055, + 1063, + 1074}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", - "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "HAVING", "ORDER", - "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", - "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", - "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", - "DATE_T", "TEXT_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", - "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", - "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", - "JOIN", "VIEW", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", - "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", - "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", - "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", - "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", - "show_index_stmt", "create_index_stmt", "opt_unique", "attr_list", - "drop_index_stmt", "create_table_stmt", "create_view_stmt", - "drop_view_stmt", "attr_def_list", "attr_def", "nullable_constraint", - "type", "insert_stmt", "values_list", "value_list", "value", - "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", - "set_clauses", "setClause", "select_stmt", "calc_stmt", - "expression_list", "expression", "alias", "aggr_func_expr", - "sub_query_expr", "rel_attr", "relation", "rel_list", "join_clauses", - "where", "condition", "comp_op", "opt_order_by", "sort_list", - "sort_unit", "group_by", "opt_having", "load_data_stmt", "explain_stmt", - "set_variable_stmt", "opt_semicolon", YY_NULLPTR -}; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} +static const char *const yytname[] = {"\"end of file\"", + "error", + "\"invalid token\"", + "SEMICOLON", + "AS", + "ASC", + "BY", + "CREATE", + "DROP", + "EXISTS", + "GROUP", + "HAVING", + "ORDER", + "TABLE", + "TABLES", + "INDEX", + "CALC", + "SELECT", + "DESC", + "SHOW", + "SYNC", + "INSERT", + "DELETE", + "UPDATE", + "LBRACE", + "RBRACE", + "COMMA", + "TRX_BEGIN", + "TRX_COMMIT", + "TRX_ROLLBACK", + "INT_T", + "IN", + "STRING_T", + "FLOAT_T", + "DATE_T", + "TEXT_T", + "NOT", + "UNIQUE", + "NULL_T", + "NULLABLE", + "HELP", + "EXIT", + "DOT", + "INTO", + "VALUES", + "FROM", + "WHERE", + "AND", + "OR", + "SET", + "ON", + "LOAD", + "INFILE", + "EXPLAIN", + "STORAGE", + "FORMAT", + "INNER", + "JOIN", + "VIEW", + "EQ", + "LT", + "GT", + "LE", + "GE", + "NE", + "LIKE", + "IS", + "NUMBER", + "FLOAT", + "ID", + "SSS", + "'+'", + "'-'", + "'*'", + "'/'", + "UMINUS", + "$accept", + "commands", + "command_wrapper", + "exit_stmt", + "help_stmt", + "sync_stmt", + "begin_stmt", + "commit_stmt", + "rollback_stmt", + "drop_table_stmt", + "show_tables_stmt", + "desc_table_stmt", + "show_index_stmt", + "create_index_stmt", + "opt_unique", + "attr_list", + "drop_index_stmt", + "create_table_stmt", + "create_view_stmt", + "drop_view_stmt", + "attr_def_list", + "attr_def", + "nullable_constraint", + "type", + "insert_stmt", + "values_list", + "value_list", + "value", + "nonnegative_value", + "storage_format", + "delete_stmt", + "update_stmt", + "set_clauses", + "setClause", + "select_stmt", + "calc_stmt", + "expression_list", + "expression", + "alias", + "aggr_func_expr", + "sub_query_expr", + "rel_attr", + "relation", + "rel_list", + "join_clauses", + "where", + "condition", + "comp_op", + "opt_order_by", + "sort_list", + "sort_unit", + "group_by", + "opt_having", + "explain_stmt", + "set_variable_stmt", + "opt_semicolon", + YY_NULLPTR}; + +static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif -#define YYPACT_NINF (-170) +#define YYPACT_NINF (-171) -#define yypact_value_is_default(Yyn) \ - ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) \ - 0 +#define yytable_value_is_error(Yyn) 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 228, 44, 30, 31, 31, -44, 108, -170, 7, -12, - -16, -170, -170, -170, -170, -170, 0, 16, 228, 60, - 93, -170, -170, -170, -170, -170, -170, -170, -170, -170, - -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, - -170, -170, -170, -170, 38, -170, 45, 113, 86, 91, - 92, -7, -170, -170, -170, -10, -170, 31, -170, -170, - -170, 12, -170, -170, -170, 96, -170, -170, 118, 94, - 97, 87, 95, 115, -170, -170, -170, -170, -15, 17, - 100, -170, 121, -170, 31, 147, 148, 31, 43, -170, - 104, -170, 31, 31, 31, 31, 149, 106, 106, 133, - 132, 109, -20, 111, 116, 125, 89, 166, 117, 138, - 119, 96, -170, -170, 165, -170, -170, -170, -52, -52, - -170, -170, 31, -170, 8, 132, -170, 168, 160, -170, - 135, -2, -170, 66, -170, -170, 150, -5, 173, 140, - 166, -170, -170, 175, 177, 134, -170, -170, -170, 145, - 180, 197, -20, 182, -170, -170, 11, -170, -170, -170, - -170, -170, -170, -170, 174, 85, 90, 31, 31, 109, - -170, -170, -170, 196, -170, -170, -170, -170, -170, 71, - 116, 186, 142, -170, 117, 209, 190, 106, 106, 211, - 204, 114, -170, 194, -170, -170, -170, -170, 31, 160, - 160, 58, 58, -170, 162, 151, 199, -170, -170, -170, - 173, 183, -170, -170, 166, 117, 189, 132, 9, -170, - 31, 160, 229, -170, -20, -20, 58, -170, 193, -170, - 217, -170, -170, 110, -170, 218, 160, 197, -170, 90, - 246, -170, -170, 128, 52, 166, -170, -170, 72, -170, - 31, -170, -170, -170, 195, 1, -170, 232, 106, -170, - -170, 31, -170, -170 -}; +static const yytype_int16 yypact[] = {221, + 3, + 4, + 80, + 80, + -44, + 45, + -171, + -16, + -2, + -40, + -171, + -171, + -171, + -171, + -171, + -14, + 221, + 53, + 64, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + 0, + -171, + 36, + 57, + 38, + 44, + 48, + 30, + -171, + -171, + -171, + 6, + -171, + 80, + -171, + -171, + -171, + 2, + -171, + -171, + -171, + 41, + -171, + -171, + 74, + 54, + 59, + 102, + 78, + -171, + -171, + -171, + -171, + -15, + 17, + 89, + -171, + 106, + -171, + 80, + 145, + 146, + 80, + -47, + -171, + 103, + -171, + 80, + 80, + 80, + 80, + 147, + 107, + 107, + 131, + 134, + 108, + 87, + 112, + 127, + 14, + 166, + 115, + 136, + 118, + 41, + -171, + -171, + 164, + -171, + -171, + -171, + -10, + -10, + -171, + -171, + 80, + -171, + 9, + 134, + -171, + 169, + 154, + -171, + 135, + -12, + -171, + 43, + -171, + -171, + 132, + 170, + 138, + 166, + -171, + -171, + 172, + 175, + 126, + -171, + -171, + -171, + 144, + 176, + 193, + 87, + 178, + -171, + -171, + 1, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + 171, + 70, + 68, + 80, + 80, + 108, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + 88, + 112, + 180, + 137, + -171, + 115, + 204, + 186, + 107, + 107, + 205, + 201, + 120, + -171, + 206, + -171, + -171, + -171, + -171, + 80, + 154, + 154, + 19, + 19, + -171, + 158, + 194, + -171, + -171, + -171, + 170, + 177, + -171, + -171, + 166, + 115, + 183, + 134, + 16, + -171, + 80, + 154, + 222, + -171, + 87, + 87, + 19, + -171, + 188, + 211, + -171, + -171, + 29, + -171, + 220, + 154, + 193, + -171, + 68, + 240, + -171, + -171, + 143, + 13, + 166, + -171, + -171, + 40, + -171, + 80, + -171, + -171, + -171, + 190, + 10, + -171, + 225, + 107, + -171, + -171, + 80, + -171, + -171}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 38, 0, 86, 86, 0, 0, 28, 0, 0, - 0, 29, 30, 31, 27, 26, 0, 0, 0, 0, - 0, 25, 24, 17, 18, 19, 20, 9, 10, 11, - 14, 12, 13, 8, 15, 16, 5, 7, 6, 4, - 3, 21, 22, 23, 0, 37, 0, 0, 0, 0, - 0, 86, 74, 71, 72, 106, 73, 0, 97, 95, - 84, 101, 99, 100, 96, 85, 34, 33, 0, 0, - 0, 0, 0, 0, 145, 1, 147, 2, 75, 0, - 0, 32, 0, 49, 86, 0, 0, 86, 0, 94, - 0, 102, 0, 0, 0, 0, 87, 0, 0, 0, - 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 105, 93, 0, 107, 98, 103, 89, 90, - 91, 92, 86, 108, 101, 113, 35, 0, 0, 77, - 0, 113, 79, 0, 146, 68, 0, 0, 50, 0, - 0, 46, 47, 39, 0, 0, 41, 104, 88, 0, - 109, 140, 0, 63, 131, 129, 0, 119, 120, 121, - 122, 123, 124, 127, 125, 0, 114, 0, 0, 0, - 78, 69, 70, 0, 58, 59, 60, 61, 62, 57, - 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, - 142, 0, 66, 0, 132, 130, 128, 126, 0, 0, - 0, 116, 81, 80, 0, 0, 0, 56, 55, 53, - 50, 75, 76, 40, 0, 0, 0, 113, 101, 110, - 86, 0, 133, 64, 0, 0, 115, 117, 118, 144, - 0, 54, 51, 44, 48, 0, 0, 140, 141, 143, - 0, 82, 67, 0, 57, 0, 43, 36, 111, 83, - 0, 65, 52, 42, 0, 137, 134, 135, 0, 139, - 138, 0, 112, 136 -}; +static const yytype_uint8 yydefact[] = {0, + 37, + 0, + 85, + 85, + 0, + 0, + 27, + 0, + 0, + 0, + 28, + 29, + 30, + 26, + 25, + 0, + 0, + 0, + 0, + 24, + 23, + 17, + 18, + 19, + 20, + 9, + 10, + 11, + 14, + 12, + 13, + 8, + 15, + 16, + 5, + 7, + 6, + 4, + 3, + 21, + 22, + 0, + 36, + 0, + 0, + 0, + 0, + 0, + 85, + 73, + 70, + 71, + 105, + 72, + 0, + 96, + 94, + 83, + 100, + 98, + 99, + 95, + 84, + 33, + 32, + 0, + 0, + 0, + 0, + 0, + 143, + 1, + 145, + 2, + 74, + 0, + 0, + 31, + 0, + 48, + 85, + 0, + 0, + 85, + 0, + 93, + 0, + 101, + 0, + 0, + 0, + 0, + 86, + 0, + 0, + 0, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 104, + 92, + 0, + 106, + 97, + 102, + 88, + 89, + 90, + 91, + 85, + 107, + 100, + 112, + 34, + 0, + 0, + 76, + 0, + 112, + 78, + 0, + 144, + 67, + 0, + 49, + 0, + 0, + 45, + 46, + 38, + 0, + 0, + 40, + 103, + 87, + 0, + 108, + 139, + 0, + 62, + 130, + 128, + 0, + 118, + 119, + 120, + 121, + 122, + 123, + 126, + 124, + 0, + 113, + 0, + 0, + 0, + 77, + 68, + 69, + 57, + 58, + 59, + 60, + 61, + 56, + 0, + 0, + 0, + 44, + 0, + 0, + 0, + 0, + 0, + 0, + 141, + 0, + 65, + 0, + 131, + 129, + 127, + 125, + 0, + 0, + 0, + 115, + 80, + 79, + 0, + 0, + 55, + 54, + 52, + 49, + 74, + 75, + 39, + 0, + 0, + 0, + 112, + 100, + 109, + 85, + 0, + 132, + 63, + 0, + 0, + 114, + 116, + 117, + 0, + 53, + 50, + 43, + 47, + 0, + 0, + 139, + 140, + 142, + 0, + 81, + 66, + 0, + 56, + 0, + 42, + 35, + 110, + 82, + 0, + 64, + 51, + 41, + 0, + 136, + 133, + 134, + 0, + 138, + 137, + 0, + 111, + 135}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -170, -170, 236, -170, -170, -170, -170, -170, -170, -170, - -170, -170, -170, -170, -170, -169, -170, -170, -170, -170, - 49, 80, 18, -170, -170, -170, 36, -98, -100, 53, - -170, -170, -170, 98, -48, -170, -4, -56, 202, -170, - -170, -170, -90, 77, 13, -120, -165, 101, -170, 14, - -170, 33, -170, -170, -170, -170, -170 -}; +static const yytype_int16 yypgoto[] = {-171, + -171, + 235, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -171, + -166, + -171, + -171, + -171, + -171, + 50, + 81, + 18, + -171, + -171, + -171, + 39, + -95, + -97, + 52, + -171, + -171, + -171, + 94, + -46, + -171, + -4, + -54, + 200, + -171, + -171, + -171, + -87, + 82, + 15, + -116, + -170, + 100, + -171, + 20, + -171, + 34, + -171, + -171, + -171, + -171}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 47, 144, 32, 33, 34, 35, - 181, 138, 209, 179, 36, 153, 191, 192, 59, 106, - 37, 38, 131, 132, 39, 40, 60, 61, 150, 62, - 63, 64, 216, 125, 217, 129, 166, 167, 241, 256, - 257, 190, 222, 41, 42, 43, 77 -}; +static const yytype_uint8 yydefgoto[] = {0, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 45, + 139, + 31, + 32, + 33, + 34, + 175, + 133, + 202, + 173, + 35, + 148, + 185, + 186, + 57, + 102, + 36, + 37, + 127, + 128, + 38, + 39, + 58, + 59, + 145, + 60, + 61, + 62, + 209, + 121, + 210, + 125, + 161, + 162, + 233, + 248, + 249, + 184, + 215, + 40, + 41, + 74}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = -{ - 65, 89, 135, 85, 134, 151, 259, 124, 126, 104, - 84, 170, 90, 90, 87, 213, 90, 51, 52, 260, - 194, 107, 94, 95, 169, 174, 66, 175, 176, 177, - 178, 52, 88, 70, 227, 228, 118, 119, 120, 121, - 105, 108, 195, 48, 128, 49, 235, 86, 53, 54, - 69, 56, 135, 133, 71, 51, 239, 44, 141, 142, - 75, 53, 54, 55, 56, 149, 57, 58, 73, 52, - 72, 248, 165, 92, 93, 94, 95, 196, 91, 91, - 111, 45, 91, 114, 92, 93, 94, 95, 206, 50, - 207, 208, 183, 140, 154, 205, 76, 237, 218, 53, - 54, 55, 56, 46, 57, 58, 84, 206, 78, 207, - 208, 201, 202, 115, 245, 79, 155, 116, 148, 199, - 200, 156, 67, 68, 135, 135, 242, 84, 80, 254, - 92, 93, 94, 95, 171, 172, 101, 199, 200, 223, - 224, 97, 226, 165, 165, 157, 158, 159, 160, 161, - 162, 163, 164, 251, 224, 102, 81, 92, 93, 94, - 95, 82, 83, 98, 99, 165, 234, 100, 103, 154, - 109, 110, 112, 113, 117, 122, 123, 127, 128, 130, - 165, 139, 136, 84, 51, 246, 137, 143, 145, 146, - 147, 155, 152, 173, 255, 168, 156, 253, 52, 180, - 182, 184, 185, 187, 186, 255, 188, 189, 193, 204, - 197, 211, 212, 214, 215, 221, 238, 220, 225, 230, - 157, 158, 159, 160, 161, 162, 163, 164, 53, 54, - 55, 56, 229, 57, 58, 1, 2, 231, 105, 236, - 199, 240, 244, 247, 3, 4, 5, 6, 7, 8, - 9, 10, 250, 258, 74, 11, 12, 13, 261, 232, - 210, 243, 252, 96, 233, 219, 198, 203, 14, 15, - 249, 262, 0, 0, 0, 263, 0, 16, 0, 17, - 0, 0, 18 -}; - -static const yytype_int16 yycheck[] = -{ - 4, 57, 102, 51, 102, 125, 5, 97, 98, 24, - 17, 131, 4, 4, 24, 184, 4, 24, 38, 18, - 9, 4, 74, 75, 26, 30, 70, 32, 33, 34, - 35, 38, 42, 45, 199, 200, 92, 93, 94, 95, - 55, 24, 31, 13, 46, 15, 215, 51, 68, 69, - 43, 71, 152, 73, 70, 24, 221, 13, 106, 107, - 0, 68, 69, 70, 71, 57, 73, 74, 52, 38, - 70, 236, 128, 72, 73, 74, 75, 66, 70, 70, - 84, 37, 70, 87, 72, 73, 74, 75, 36, 59, - 38, 39, 140, 4, 9, 24, 3, 217, 188, 68, - 69, 70, 71, 59, 73, 74, 17, 36, 70, 38, - 39, 167, 168, 70, 4, 70, 31, 74, 122, 47, - 48, 36, 14, 15, 224, 225, 224, 17, 15, 57, - 72, 73, 74, 75, 68, 69, 49, 47, 48, 25, - 26, 45, 198, 199, 200, 60, 61, 62, 63, 64, - 65, 66, 67, 25, 26, 60, 70, 72, 73, 74, - 75, 70, 70, 45, 70, 221, 214, 70, 53, 9, - 70, 50, 25, 25, 70, 26, 70, 44, 46, 70, - 236, 56, 71, 17, 24, 233, 70, 70, 50, 70, - 25, 31, 24, 43, 250, 60, 36, 245, 38, 26, - 60, 26, 25, 58, 70, 261, 26, 10, 26, 13, - 36, 25, 70, 4, 24, 11, 220, 6, 24, 68, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 70, 73, 74, 7, 8, 38, 55, 50, - 47, 12, 25, 25, 16, 17, 18, 19, 20, 21, - 22, 23, 6, 58, 18, 27, 28, 29, 26, 210, - 180, 225, 244, 61, 211, 188, 165, 169, 40, 41, - 237, 258, -1, -1, -1, 261, -1, 49, -1, 51, - -1, -1, 54 -}; +static const yytype_uint8 yytable[] = {63, + 86, + 131, + 82, + 130, + 146, + 87, + 120, + 122, + 100, + 188, + 165, + 206, + 87, + 164, + 251, + 42, + 46, + 135, + 47, + 87, + 103, + 111, + 220, + 221, + 64, + 112, + 67, + 252, + 69, + 84, + 81, + 189, + 237, + 124, + 114, + 115, + 116, + 117, + 101, + 43, + 104, + 227, + 68, + 231, + 83, + 81, + 81, + 85, + 199, + 131, + 200, + 201, + 72, + 49, + 70, + 136, + 137, + 240, + 65, + 66, + 44, + 48, + 91, + 92, + 144, + 190, + 73, + 50, + 75, + 160, + 88, + 77, + 89, + 90, + 91, + 92, + 107, + 88, + 149, + 110, + 89, + 90, + 91, + 92, + 88, + 94, + 193, + 194, + 177, + 89, + 90, + 91, + 92, + 229, + 211, + 246, + 51, + 52, + 53, + 54, + 150, + 55, + 56, + 49, + 76, + 151, + 78, + 195, + 196, + 166, + 167, + 198, + 79, + 143, + 193, + 194, + 80, + 50, + 95, + 131, + 131, + 234, + 96, + 199, + 50, + 200, + 201, + 97, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 99, + 219, + 160, + 160, + 89, + 90, + 91, + 92, + 216, + 217, + 51, + 52, + 53, + 54, + 98, + 55, + 56, + 51, + 52, + 106, + 54, + 105, + 129, + 160, + 226, + 168, + 149, + 169, + 170, + 171, + 172, + 243, + 217, + 108, + 109, + 113, + 118, + 160, + 123, + 119, + 126, + 49, + 238, + 124, + 132, + 134, + 81, + 138, + 150, + 140, + 141, + 247, + 142, + 151, + 245, + 50, + 147, + 163, + 180, + 174, + 176, + 178, + 247, + 179, + 181, + 182, + 183, + 187, + 204, + 205, + 191, + 207, + 230, + 208, + 213, + 214, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 51, + 52, + 53, + 54, + 222, + 55, + 56, + 1, + 2, + 218, + 101, + 223, + 228, + 232, + 193, + 236, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 239, + 242, + 250, + 11, + 12, + 13, + 253, + 71, + 224, + 244, + 203, + 225, + 235, + 197, + 93, + 192, + 14, + 15, + 241, + 212, + 254, + 0, + 0, + 0, + 0, + 16, + 0, + 0, + 255, + 17}; + +static const yytype_int16 yycheck[] = {4, + 55, + 99, + 49, + 99, + 121, + 4, + 94, + 95, + 24, + 9, + 127, + 178, + 4, + 26, + 5, + 13, + 13, + 4, + 15, + 4, + 4, + 69, + 193, + 194, + 69, + 73, + 43, + 18, + 69, + 24, + 17, + 31, + 4, + 46, + 89, + 90, + 91, + 92, + 54, + 37, + 24, + 208, + 45, + 214, + 49, + 17, + 17, + 42, + 36, + 147, + 38, + 39, + 0, + 24, + 69, + 102, + 103, + 228, + 14, + 15, + 58, + 58, + 73, + 74, + 56, + 65, + 3, + 38, + 69, + 124, + 69, + 15, + 71, + 72, + 73, + 74, + 81, + 69, + 9, + 84, + 71, + 72, + 73, + 74, + 69, + 45, + 47, + 48, + 135, + 71, + 72, + 73, + 74, + 210, + 182, + 56, + 67, + 68, + 69, + 70, + 31, + 72, + 73, + 24, + 69, + 36, + 69, + 162, + 163, + 67, + 68, + 24, + 69, + 118, + 47, + 48, + 69, + 38, + 45, + 217, + 218, + 217, + 69, + 36, + 38, + 38, + 39, + 69, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 59, + 192, + 193, + 194, + 71, + 72, + 73, + 74, + 25, + 26, + 67, + 68, + 69, + 70, + 49, + 72, + 73, + 67, + 68, + 50, + 70, + 69, + 72, + 214, + 207, + 30, + 9, + 32, + 33, + 34, + 35, + 25, + 26, + 25, + 25, + 69, + 26, + 228, + 44, + 69, + 69, + 24, + 225, + 46, + 69, + 55, + 17, + 69, + 31, + 50, + 69, + 242, + 25, + 36, + 237, + 38, + 24, + 59, + 69, + 26, + 59, + 26, + 253, + 25, + 57, + 26, + 10, + 26, + 25, + 69, + 36, + 4, + 213, + 24, + 6, + 11, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 67, + 72, + 73, + 7, + 8, + 24, + 54, + 38, + 50, + 12, + 47, + 25, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 25, + 6, + 57, + 27, + 28, + 29, + 26, + 17, + 203, + 236, + 174, + 204, + 218, + 164, + 59, + 160, + 40, + 41, + 229, + 182, + 250, + -1, + -1, + -1, + -1, + 49, + -1, + -1, + 253, + 53}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, - 23, 27, 28, 29, 40, 41, 49, 51, 54, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 93, 94, 95, 96, 101, 107, 108, 111, - 112, 130, 131, 132, 13, 37, 59, 91, 13, 15, - 59, 24, 38, 68, 69, 70, 71, 73, 74, 105, - 113, 114, 116, 117, 118, 113, 70, 14, 15, 43, - 45, 70, 70, 52, 79, 0, 3, 133, 70, 70, - 15, 70, 70, 70, 17, 111, 113, 24, 42, 114, - 4, 70, 72, 73, 74, 75, 115, 45, 45, 70, - 70, 49, 60, 53, 24, 55, 106, 4, 24, 70, - 50, 113, 25, 25, 113, 70, 74, 70, 114, 114, - 114, 114, 26, 70, 119, 120, 119, 44, 46, 122, - 70, 109, 110, 73, 104, 105, 71, 70, 98, 56, - 4, 111, 111, 70, 92, 50, 70, 25, 113, 57, - 115, 122, 24, 102, 9, 31, 36, 60, 61, 62, - 63, 64, 65, 66, 67, 114, 123, 124, 60, 26, - 122, 68, 69, 43, 30, 32, 33, 34, 35, 100, - 26, 97, 60, 111, 26, 25, 70, 58, 26, 10, - 128, 103, 104, 26, 9, 31, 66, 36, 124, 47, - 48, 114, 114, 110, 13, 24, 36, 38, 39, 99, - 98, 25, 70, 92, 4, 24, 119, 121, 119, 120, - 6, 11, 129, 25, 26, 24, 114, 123, 123, 70, - 68, 38, 97, 106, 111, 92, 50, 122, 113, 123, - 12, 125, 104, 103, 25, 4, 111, 25, 123, 128, - 6, 25, 99, 111, 57, 114, 126, 127, 58, 5, - 18, 26, 121, 126 -}; +static const yytype_uint8 yystos[] = {0, + 7, + 8, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 27, + 28, + 29, + 40, + 41, + 49, + 53, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 92, + 93, + 94, + 95, + 100, + 106, + 107, + 110, + 111, + 129, + 130, + 13, + 37, + 58, + 90, + 13, + 15, + 58, + 24, + 38, + 67, + 68, + 69, + 70, + 72, + 73, + 104, + 112, + 113, + 115, + 116, + 117, + 112, + 69, + 14, + 15, + 43, + 45, + 69, + 69, + 78, + 0, + 3, + 131, + 69, + 69, + 15, + 69, + 69, + 69, + 17, + 110, + 112, + 24, + 42, + 113, + 4, + 69, + 71, + 72, + 73, + 74, + 114, + 45, + 45, + 69, + 69, + 49, + 59, + 24, + 54, + 105, + 4, + 24, + 69, + 50, + 112, + 25, + 25, + 112, + 69, + 73, + 69, + 113, + 113, + 113, + 113, + 26, + 69, + 118, + 119, + 118, + 44, + 46, + 121, + 69, + 108, + 109, + 72, + 103, + 104, + 69, + 97, + 55, + 4, + 110, + 110, + 69, + 91, + 50, + 69, + 25, + 112, + 56, + 114, + 121, + 24, + 101, + 9, + 31, + 36, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 113, + 122, + 123, + 59, + 26, + 121, + 67, + 68, + 30, + 32, + 33, + 34, + 35, + 99, + 26, + 96, + 59, + 110, + 26, + 25, + 69, + 57, + 26, + 10, + 127, + 102, + 103, + 26, + 9, + 31, + 65, + 36, + 123, + 47, + 48, + 113, + 113, + 109, + 24, + 36, + 38, + 39, + 98, + 97, + 25, + 69, + 91, + 4, + 24, + 118, + 120, + 118, + 119, + 6, + 11, + 128, + 25, + 26, + 24, + 113, + 122, + 122, + 67, + 38, + 96, + 105, + 110, + 91, + 50, + 121, + 112, + 122, + 12, + 124, + 103, + 102, + 25, + 4, + 110, + 25, + 122, + 127, + 6, + 25, + 98, + 110, + 56, + 113, + 125, + 126, + 57, + 5, + 18, + 26, + 120, + 125}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = -{ - 0, 77, 78, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 91, 92, - 92, 93, 94, 94, 94, 94, 94, 95, 95, 96, - 97, 97, 98, 98, 99, 99, 99, 99, 100, 100, - 100, 100, 100, 101, 102, 102, 103, 103, 104, 104, - 104, 105, 105, 105, 105, 106, 106, 107, 108, 109, - 109, 110, 111, 111, 112, 112, 113, 113, 113, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 115, 115, 115, 116, 117, 118, 118, 119, 120, - 120, 121, 121, 122, 122, 123, 123, 123, 123, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 125, 125, 126, 126, 127, 127, 127, - 128, 128, 129, 129, 130, 131, 132, 133 -}; +static const yytype_uint8 yyr1[] = {0, + 76, + 77, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 90, + 91, + 91, + 92, + 93, + 93, + 93, + 93, + 93, + 94, + 94, + 95, + 96, + 96, + 97, + 97, + 98, + 98, + 98, + 98, + 99, + 99, + 99, + 99, + 99, + 100, + 101, + 101, + 102, + 102, + 103, + 103, + 103, + 104, + 104, + 104, + 104, + 105, + 105, + 106, + 107, + 108, + 108, + 109, + 110, + 110, + 111, + 111, + 112, + 112, + 112, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 114, + 114, + 114, + 115, + 116, + 117, + 117, + 118, + 119, + 119, + 120, + 120, + 121, + 121, + 122, + 122, + 122, + 122, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 124, + 124, + 125, + 125, + 126, + 126, + 126, + 127, + 127, + 128, + 128, + 129, + 130, + 131}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = +static const yytype_int8 yyr2[] = {0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 2, + 2, + 4, + 9, + 1, + 0, + 1, + 3, + 5, + 10, + 9, + 8, + 6, + 5, + 5, + 8, + 3, + 0, + 3, + 6, + 3, + 2, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 5, + 3, + 5, + 1, + 3, + 1, + 2, + 2, + 1, + 1, + 1, + 1, + 0, + 4, + 4, + 5, + 1, + 3, + 3, + 8, + 9, + 2, + 2, + 0, + 2, + 4, + 3, + 3, + 3, + 3, + 3, + 2, + 1, + 1, + 1, + 3, + 1, + 1, + 0, + 1, + 2, + 4, + 3, + 1, + 3, + 1, + 2, + 4, + 3, + 6, + 0, + 2, + 3, + 2, + 3, + 3, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 0, + 3, + 1, + 3, + 1, + 2, + 2, + 0, + 3, + 0, + 2, + 2, + 4, + 1}; + +enum { - 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 2, 2, 4, 9, 1, 0, 1, - 3, 5, 10, 9, 8, 6, 5, 5, 8, 3, - 0, 3, 6, 3, 2, 1, 1, 0, 1, 1, - 1, 1, 1, 5, 3, 5, 1, 3, 1, 2, - 2, 1, 1, 1, 1, 0, 4, 4, 5, 1, - 3, 3, 8, 9, 2, 2, 0, 2, 4, 3, - 3, 3, 3, 3, 2, 1, 1, 1, 3, 1, - 1, 0, 1, 2, 4, 3, 1, 3, 1, 2, - 4, 3, 6, 0, 2, 3, 2, 3, 3, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, - 2, 1, 2, 0, 3, 1, 3, 1, 2, 2, - 0, 3, 0, 2, 7, 2, 4, 1 + YYENOMEM = -2 }; - -enum { YYENOMEM = -2 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK(yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } else { \ + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -1052,151 +3042,131 @@ enum { YYENOMEM = -2 }; the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) +#define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) { \ + (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ + } else { \ + (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) - /* Enable debugging if requested. */ #if YYDEBUG -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +#ifndef YYFPRINTF +#include /* INFRINGES ON USER NAME SPACE */ +#define YYFPRINTF fprintf +#endif +#define YYDPRINTF(Args) \ + do { \ + if (yydebug) \ + YYFPRINTF Args; \ + } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YYLOCATION_PRINT +#ifndef YYLOCATION_PRINT -# if defined YY_LOCATION_PRINT +#if defined YY_LOCATION_PRINT - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) { + res += YYFPRINTF(yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF(yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) { + if (yylocp->first_line < yylocp->last_line) { + res += YYFPRINTF(yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF(yyo, ".%d", end_col); + } else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF(yyo, "-%d", end_col); + } return res; } -# define YYLOCATION_PRINT yy_location_print_ +#define YYLOCATION_PRINT yy_location_print_ - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -# else - -# define YYLOCATION_PRINT(File, Loc) ((void) 0) - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT YYLOCATION_PRINT - -# endif -# endif /* !defined YYLOCATION_PRINT */ +#else +#define YYLOCATION_PRINT(File, Loc) ((void)0) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT YYLOCATION_PRINT -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +#endif +#endif /* !defined YYLOCATION_PRINT */ +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ + do { \ + if (yydebug) { \ + YYFPRINTF(stderr, "%s ", Title); \ + yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF(stderr, "\n"); \ + } \ + } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyoutput); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); - YYLOCATION_PRINT (yyo, yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF (yyo, ")"); + YYLOCATION_PRINT(yyo, yylocationp); + YYFPRINTF(yyo, ": "); + yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF(yyo, ")"); } /*------------------------------------------------------------------. @@ -1204,70 +3174,66 @@ yy_symbol_print (FILE *yyo, | TOP (included). | `------------------------------------------------------------------*/ -static void -yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); + YYFPRINTF(stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) { + int yybot = *yybottom; + YYFPRINTF(stderr, " %d", yybot); + } + YYFPRINTF(stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - +#define YY_STACK_PRINT(Bottom, Top) \ + do { \ + if (yydebug) \ + yy_stack_print((Bottom), (Top)); \ + } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, + ParsedSqlResult *sql_result, void *scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", - yyrule - 1, yylno); + YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); - YYFPRINTF (stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) { + YYFPRINTF(stderr, " $%d = ", yyi + 1); + yy_symbol_print(stderr, + YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), + sql_string, + sql_result, + scanner); + YYFPRINTF(stderr, "\n"); + } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ -} while (0) +#define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug) \ + yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ + } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) +#define YYDPRINTF(Args) ((void)0) +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +#define YY_STACK_PRINT(Bottom, Top) +#define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -1278,16 +3244,15 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 +#define YYMAXDEPTH 10000 #endif - /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -1296,69 +3261,59 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default(yyn)) { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } - - - #ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else +#if defined __GLIBC__ && defined _STRING_H +#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) +#else /* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) +static YYPTRDIFF_T yystrlen(const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -# endif +#endif #endif #ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +#define yystpcpy stpcpy +#else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) +static char *yystpcpy(char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -1366,7 +3321,7 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } -# endif +#endif #endif #ifndef yytnamerr @@ -1377,52 +3332,45 @@ yystpcpy (char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) +static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) { - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': + if (*yystr == '"') { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) { + case '\'': + case ',': goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes:; + } if (yyres) - return yystpcpy (yyres, yystr) - yyres; + return yystpcpy(yyres, yystr) - yyres; else - return yystrlen (yystr); + return yystrlen(yystr); } #endif - -static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -1449,19 +3397,17 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) - { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -1473,11 +3419,12 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) +static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) { - enum { YYARGS_MAX = 5 }; + enum + { + YYARGS_MAX = 5 + }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -1487,16 +3434,13 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) - { -#define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break + switch (yycount) { +#define YYCASE_(N, S) \ + case N: yyformat = S; break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1505,134 +3449,118 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; + yysize = yystrlen(yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) { + YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) { + *yymsg_alloc = 2 * yysize; + if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { + yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } else { + ++yyp; + ++yyformat; + } } return 0; } - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, + const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyvaluep); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - - - - /*----------. | yyparse. | `----------*/ -int -yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { -/* Lookahead token kind. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; + /* Lookahead token kind. */ + int yychar; + + /* The semantic value of the lookahead symbol. */ + /* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ + YY_INITIAL_VALUE(static YYSTYPE yyval_default;) + YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); + + /* Location data for the lookahead symbol. */ + static YYLTYPE yyloc_default +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = {1, 1, 1, 1} +#endif + ; + YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -1648,24 +3576,23 @@ YYLTYPE yylloc = yyloc_default; YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF ((stderr, "Starting parse\n")); + YYDPRINTF((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; - /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -1674,93 +3601,90 @@ YYLTYPE yylloc = yyloc_default; have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YYDPRINTF((stderr, "Entering state %d\n", yystate)); + YY_ASSERT(0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST (yy_state_t, yystate); + *yyssp = YY_CAST(yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else + { + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +#if defined yyoverflow { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -# if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * YYSIZEOF (*yyssp), - &yyvs1, yysize * YYSIZEOF (*yyvsp), - &yyls1, yysize * YYSIZEOF (*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow(YY_("memory exhausted"), + &yyss1, + yysize * YYSIZEOF(*yyssp), + &yyvs1, + yysize * YYSIZEOF(*yyvsp), + &yyls1, + yysize * YYSIZEOF(*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +#else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + YYNOMEM; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); + if (!yyptr) YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = - YY_CAST (union yyalloc *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); - if (! yyptr) - YYNOMEM; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif + YYSTACK_RELOCATE(yyss_alloc, yyss); + YYSTACK_RELOCATE(yyvs_alloc, yyvs); + YYSTACK_RELOCATE(yyls_alloc, yyls); +#undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE(yyss1); + } +#endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF ((stderr, "Stack size increased to %ld\n", - YY_CAST (long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; goto yybackup; - /*-----------. | yybackup. | `-----------*/ @@ -1770,40 +3694,34 @@ YYLTYPE yylloc = yyloc_default; /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yypact_value_is_default(yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token\n")); - yychar = yylex (&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) { + YYDPRINTF((stderr, "Reading a token\n")); + yychar = yylex(&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) - { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else if (yychar == YYerror) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF((stderr, "Now at end of input.\n")); + } else if (yychar == YYerror) { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } else { + yytoken = YYTRANSLATE(yychar); + YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -1811,13 +3729,12 @@ YYLTYPE yylloc = yyloc_default; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) { + if (yytable_value_is_error(yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -1825,7 +3742,7 @@ YYLTYPE yylloc = yyloc_default; yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -1836,7 +3753,6 @@ YYLTYPE yylloc = yyloc_default; yychar = YYEMPTY; goto yynewstate; - /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -1846,7 +3762,6 @@ YYLTYPE yylloc = yyloc_default; goto yyerrlab; goto yyreduce; - /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -1862,255 +3777,264 @@ YYLTYPE yylloc = yyloc_default; users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + yyval = yyvsp[1 - yylen]; /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: /* commands: command_wrapper opt_semicolon */ + YY_REDUCE_PRINT(yyn); + switch (yyn) { + case 2: /* commands: command_wrapper opt_semicolon */ #line 263 "yacc_sql.y" - { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } -#line 1880 "yacc_sql.cpp" + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } +#line 1872 "yacc_sql.cpp" break; - case 26: /* exit_stmt: EXIT */ + case 25: /* exit_stmt: EXIT */ #line 296 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1889 "yacc_sql.cpp" +#line 1881 "yacc_sql.cpp" break; - case 27: /* help_stmt: HELP */ + case 26: /* help_stmt: HELP */ #line 302 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1897 "yacc_sql.cpp" +#line 1889 "yacc_sql.cpp" break; - case 28: /* sync_stmt: SYNC */ + case 27: /* sync_stmt: SYNC */ #line 307 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1905 "yacc_sql.cpp" +#line 1897 "yacc_sql.cpp" break; - case 29: /* begin_stmt: TRX_BEGIN */ + case 28: /* begin_stmt: TRX_BEGIN */ #line 313 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1913 "yacc_sql.cpp" +#line 1905 "yacc_sql.cpp" break; - case 30: /* commit_stmt: TRX_COMMIT */ + case 29: /* commit_stmt: TRX_COMMIT */ #line 319 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1921 "yacc_sql.cpp" +#line 1913 "yacc_sql.cpp" break; - case 31: /* rollback_stmt: TRX_ROLLBACK */ + case 30: /* rollback_stmt: TRX_ROLLBACK */ #line 325 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1929 "yacc_sql.cpp" +#line 1921 "yacc_sql.cpp" break; - case 32: /* drop_table_stmt: DROP TABLE ID */ + case 31: /* drop_table_stmt: DROP TABLE ID */ #line 331 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1939 "yacc_sql.cpp" +#line 1931 "yacc_sql.cpp" break; - case 33: /* show_tables_stmt: SHOW TABLES */ + case 32: /* show_tables_stmt: SHOW TABLES */ #line 338 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1947 "yacc_sql.cpp" +#line 1939 "yacc_sql.cpp" break; - case 34: /* desc_table_stmt: DESC ID */ + case 33: /* desc_table_stmt: DESC ID */ #line 344 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1957 "yacc_sql.cpp" +#line 1949 "yacc_sql.cpp" break; - case 35: /* show_index_stmt: SHOW INDEX FROM relation */ + case 34: /* show_index_stmt: SHOW INDEX FROM relation */ #line 353 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1968 "yacc_sql.cpp" +#line 1960 "yacc_sql.cpp" break; - case 36: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ + case 35: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ #line 363 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1984 "yacc_sql.cpp" +#line 1976 "yacc_sql.cpp" break; - case 37: /* opt_unique: UNIQUE */ + case 36: /* opt_unique: UNIQUE */ #line 377 "yacc_sql.y" - { (yyval.unique) = true; } -#line 1990 "yacc_sql.cpp" + { + (yyval.unique) = true; + } +#line 1982 "yacc_sql.cpp" break; - case 38: /* opt_unique: %empty */ + case 37: /* opt_unique: %empty */ #line 378 "yacc_sql.y" - { (yyval.unique) = false; } -#line 1996 "yacc_sql.cpp" + { + (yyval.unique) = false; + } +#line 1988 "yacc_sql.cpp" break; - case 39: /* attr_list: ID */ + case 38: /* attr_list: ID */ #line 383 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 2006 "yacc_sql.cpp" +#line 1998 "yacc_sql.cpp" break; - case 40: /* attr_list: ID COMMA attr_list */ + case 39: /* attr_list: ID COMMA attr_list */ #line 389 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list) + ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2016 "yacc_sql.cpp" +#line 2008 "yacc_sql.cpp" break; - case 41: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 40: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 398 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2028 "yacc_sql.cpp" +#line 2020 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ + case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ #line 408 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2036 "yacc_sql.cpp" +#line 2028 "yacc_sql.cpp" break; - case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ + case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ #line 412 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2044 "yacc_sql.cpp" +#line 2036 "yacc_sql.cpp" break; - case 44: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 416 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2052 "yacc_sql.cpp" +#line 2044 "yacc_sql.cpp" break; - case 45: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ + case 44: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ #line 420 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = + create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2060 "yacc_sql.cpp" +#line 2052 "yacc_sql.cpp" break; - case 46: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ + case 45: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ #line 424 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = + create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2068 "yacc_sql.cpp" +#line 2060 "yacc_sql.cpp" break; - case 47: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ + case 46: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ #line 431 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; - create_view.relation_name = (yyvsp[-2].string); + create_view.relation_name = (yyvsp[-2].string); create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } -#line 2080 "yacc_sql.cpp" +#line 2072 "yacc_sql.cpp" break; - case 48: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ + case 47: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ #line 439 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; - create_view.relation_name = (yyvsp[-5].string); - create_view.attribute_names = std::move(*(yyvsp[-3].index_attr_list)); + create_view.relation_name = (yyvsp[-5].string); + create_view.attribute_names = std::move(*(yyvsp[-3].index_attr_list)); create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-5].string)); } -#line 2093 "yacc_sql.cpp" +#line 2085 "yacc_sql.cpp" break; - case 49: /* drop_view_stmt: DROP VIEW ID */ + case 48: /* drop_view_stmt: DROP VIEW ID */ #line 451 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2103 "yacc_sql.cpp" +#line 2095 "yacc_sql.cpp" break; - case 50: /* attr_def_list: %empty */ + case 49: /* attr_def_list: %empty */ #line 460 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2111 "yacc_sql.cpp" +#line 2103 "yacc_sql.cpp" break; - case 51: /* attr_def_list: COMMA attr_def attr_def_list */ + case 50: /* attr_def_list: COMMA attr_def attr_def_list */ #line 464 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -2121,29 +4045,29 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2125 "yacc_sql.cpp" +#line 2117 "yacc_sql.cpp" break; - case 52: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ + case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ #line 477 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); - (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + (yyval.attr_info)->name = (yyvsp[-5].string); + (yyval.attr_info)->length = (yyvsp[-2].number); (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; } free((yyvsp[-5].string)); } -#line 2141 "yacc_sql.cpp" +#line 2133 "yacc_sql.cpp" break; - case 53: /* attr_def: ID type nullable_constraint */ + case 52: /* attr_def: ID type nullable_constraint */ #line 489 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -2165,75 +4089,85 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2169 "yacc_sql.cpp" +#line 2161 "yacc_sql.cpp" break; - case 54: /* nullable_constraint: NOT NULL_T */ + case 53: /* nullable_constraint: NOT NULL_T */ #line 516 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2177 "yacc_sql.cpp" +#line 2169 "yacc_sql.cpp" break; - case 55: /* nullable_constraint: NULLABLE */ + case 54: /* nullable_constraint: NULLABLE */ #line 520 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2185 "yacc_sql.cpp" +#line 2177 "yacc_sql.cpp" break; - case 56: /* nullable_constraint: NULL_T */ + case 55: /* nullable_constraint: NULL_T */ #line 524 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2193 "yacc_sql.cpp" +#line 2185 "yacc_sql.cpp" break; - case 57: /* nullable_constraint: %empty */ + case 56: /* nullable_constraint: %empty */ #line 528 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2201 "yacc_sql.cpp" +#line 2193 "yacc_sql.cpp" break; - case 58: /* type: INT_T */ + case 57: /* type: INT_T */ #line 534 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::INTS); } -#line 2207 "yacc_sql.cpp" + { + (yyval.number) = static_cast(AttrType::INTS); + } +#line 2199 "yacc_sql.cpp" break; - case 59: /* type: STRING_T */ + case 58: /* type: STRING_T */ #line 535 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2213 "yacc_sql.cpp" + { + (yyval.number) = static_cast(AttrType::CHARS); + } +#line 2205 "yacc_sql.cpp" break; - case 60: /* type: FLOAT_T */ + case 59: /* type: FLOAT_T */ #line 536 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2219 "yacc_sql.cpp" + { + (yyval.number) = static_cast(AttrType::FLOATS); + } +#line 2211 "yacc_sql.cpp" break; - case 61: /* type: DATE_T */ + case 60: /* type: DATE_T */ #line 537 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::DATES); } -#line 2225 "yacc_sql.cpp" + { + (yyval.number) = static_cast(AttrType::DATES); + } +#line 2217 "yacc_sql.cpp" break; - case 62: /* type: TEXT_T */ + case 61: /* type: TEXT_T */ #line 538 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2231 "yacc_sql.cpp" + { + (yyval.number) = static_cast(AttrType::TEXTS); + } +#line 2223 "yacc_sql.cpp" break; - case 63: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 62: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 543 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -2241,143 +4175,143 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2245 "yacc_sql.cpp" +#line 2237 "yacc_sql.cpp" break; - case 64: /* values_list: LBRACE value_list RBRACE */ + case 63: /* values_list: LBRACE value_list RBRACE */ #line 556 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2255 "yacc_sql.cpp" +#line 2247 "yacc_sql.cpp" break; - case 65: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 64: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 562 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2264 "yacc_sql.cpp" +#line 2256 "yacc_sql.cpp" break; - case 66: /* value_list: value */ + case 65: /* value_list: value */ #line 569 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2274 "yacc_sql.cpp" +#line 2266 "yacc_sql.cpp" break; - case 67: /* value_list: value_list COMMA value */ + case 66: /* value_list: value_list COMMA value */ #line 575 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2283 "yacc_sql.cpp" +#line 2275 "yacc_sql.cpp" break; - case 68: /* value: nonnegative_value */ + case 67: /* value: nonnegative_value */ #line 582 "yacc_sql.y" - { + { (yyval.value) = (yyvsp[0].value); } -#line 2291 "yacc_sql.cpp" +#line 2283 "yacc_sql.cpp" break; - case 69: /* value: '-' NUMBER */ + case 68: /* value: '-' NUMBER */ #line 585 "yacc_sql.y" - { + { (yyval.value) = new Value(-(yyvsp[0].number)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } -#line 2300 "yacc_sql.cpp" +#line 2292 "yacc_sql.cpp" break; - case 70: /* value: '-' FLOAT */ + case 69: /* value: '-' FLOAT */ #line 589 "yacc_sql.y" - { + { (yyval.value) = new Value(-(yyvsp[0].floats)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } -#line 2309 "yacc_sql.cpp" +#line 2301 "yacc_sql.cpp" break; - case 71: /* nonnegative_value: NUMBER */ + case 70: /* nonnegative_value: NUMBER */ #line 596 "yacc_sql.y" - { + { (yyval.value) = new Value((yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2318 "yacc_sql.cpp" +#line 2310 "yacc_sql.cpp" break; - case 72: /* nonnegative_value: FLOAT */ + case 71: /* nonnegative_value: FLOAT */ #line 600 "yacc_sql.y" - { + { (yyval.value) = new Value((yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2327 "yacc_sql.cpp" +#line 2319 "yacc_sql.cpp" break; - case 73: /* nonnegative_value: SSS */ + case 72: /* nonnegative_value: SSS */ #line 604 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); + { + char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2338 "yacc_sql.cpp" +#line 2330 "yacc_sql.cpp" break; - case 74: /* nonnegative_value: NULL_T */ + case 73: /* nonnegative_value: NULL_T */ #line 610 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } -#line 2346 "yacc_sql.cpp" +#line 2338 "yacc_sql.cpp" break; - case 75: /* storage_format: %empty */ + case 74: /* storage_format: %empty */ #line 617 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2354 "yacc_sql.cpp" +#line 2346 "yacc_sql.cpp" break; - case 76: /* storage_format: STORAGE FORMAT EQ ID */ + case 75: /* storage_format: STORAGE FORMAT EQ ID */ #line 621 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2362 "yacc_sql.cpp" +#line 2354 "yacc_sql.cpp" break; - case 77: /* delete_stmt: DELETE FROM ID where */ + case 76: /* delete_stmt: DELETE FROM ID where */ #line 628 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); } free((yyvsp[-1].string)); } -#line 2375 "yacc_sql.cpp" +#line 2367 "yacc_sql.cpp" break; - case 78: /* update_stmt: UPDATE ID SET set_clauses where */ + case 77: /* update_stmt: UPDATE ID SET set_clauses where */ #line 640 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -2386,38 +4320,38 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2390 "yacc_sql.cpp" +#line 2382 "yacc_sql.cpp" break; - case 79: /* set_clauses: setClause */ + case 78: /* set_clauses: setClause */ #line 654 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2399 "yacc_sql.cpp" +#line 2391 "yacc_sql.cpp" break; - case 80: /* set_clauses: set_clauses COMMA setClause */ + case 79: /* set_clauses: set_clauses COMMA setClause */ #line 659 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2407 "yacc_sql.cpp" +#line 2399 "yacc_sql.cpp" break; - case 81: /* setClause: ID EQ expression */ + case 80: /* setClause: ID EQ expression */ #line 666 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2418 "yacc_sql.cpp" +#line 2410 "yacc_sql.cpp" break; - case 82: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ + case 81: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ #line 676 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2451,10 +4385,10 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2455 "yacc_sql.cpp" +#line 2447 "yacc_sql.cpp" break; - case 83: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ + case 82: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ #line 709 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -2469,7 +4403,8 @@ YYLTYPE yylloc = yyloc_default; } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); + ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -2477,7 +4412,8 @@ YYLTYPE yylloc = yyloc_default; if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -2485,38 +4421,38 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2489 "yacc_sql.cpp" +#line 2481 "yacc_sql.cpp" break; - case 84: /* calc_stmt: CALC expression_list */ + case 83: /* calc_stmt: CALC expression_list */ #line 742 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2499 "yacc_sql.cpp" +#line 2491 "yacc_sql.cpp" break; - case 85: /* calc_stmt: SELECT expression_list */ + case 84: /* calc_stmt: SELECT expression_list */ #line 748 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2509 "yacc_sql.cpp" +#line 2501 "yacc_sql.cpp" break; - case 86: /* expression_list: %empty */ + case 85: /* expression_list: %empty */ #line 756 "yacc_sql.y" - { + { (yyval.expression_list) = new std::vector>; } -#line 2517 "yacc_sql.cpp" +#line 2509 "yacc_sql.cpp" break; - case 87: /* expression_list: expression alias */ + case 86: /* expression_list: expression alias */ #line 760 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; @@ -2526,10 +4462,10 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2530 "yacc_sql.cpp" +#line 2522 "yacc_sql.cpp" break; - case 88: /* expression_list: expression alias COMMA expression_list */ + case 87: /* expression_list: expression alias COMMA expression_list */ #line 769 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -2540,47 +4476,51 @@ YYLTYPE yylloc = yyloc_default; if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_alias((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2547 "yacc_sql.cpp" +#line 2539 "yacc_sql.cpp" break; - case 89: /* expression: expression '+' expression */ + case 88: /* expression: expression '+' expression */ #line 784 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2555 "yacc_sql.cpp" +#line 2547 "yacc_sql.cpp" break; - case 90: /* expression: expression '-' expression */ + case 89: /* expression: expression '-' expression */ #line 787 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2563 "yacc_sql.cpp" +#line 2555 "yacc_sql.cpp" break; - case 91: /* expression: expression '*' expression */ + case 90: /* expression: expression '*' expression */ #line 790 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2571 "yacc_sql.cpp" +#line 2563 "yacc_sql.cpp" break; - case 92: /* expression: expression '/' expression */ + case 91: /* expression: expression '/' expression */ #line 793 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2579 "yacc_sql.cpp" +#line 2571 "yacc_sql.cpp" break; - case 93: /* expression: LBRACE expression_list RBRACE */ + case 92: /* expression: LBRACE expression_list RBRACE */ #line 796 "yacc_sql.y" - { + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -2588,175 +4528,177 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2592 "yacc_sql.cpp" +#line 2584 "yacc_sql.cpp" break; - case 94: /* expression: '-' expression */ + case 93: /* expression: '-' expression */ #line 804 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2600 "yacc_sql.cpp" +#line 2592 "yacc_sql.cpp" break; - case 95: /* expression: nonnegative_value */ + case 94: /* expression: nonnegative_value */ #line 807 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2610 "yacc_sql.cpp" +#line 2602 "yacc_sql.cpp" break; - case 96: /* expression: rel_attr */ + case 95: /* expression: rel_attr */ #line 812 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2621 "yacc_sql.cpp" +#line 2613 "yacc_sql.cpp" break; - case 97: /* expression: '*' */ + case 96: /* expression: '*' */ #line 818 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } -#line 2629 "yacc_sql.cpp" +#line 2621 "yacc_sql.cpp" break; - case 98: /* expression: ID DOT '*' */ + case 97: /* expression: ID DOT '*' */ #line 821 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2637 "yacc_sql.cpp" +#line 2629 "yacc_sql.cpp" break; - case 99: /* expression: aggr_func_expr */ + case 98: /* expression: aggr_func_expr */ #line 824 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2645 "yacc_sql.cpp" +#line 2637 "yacc_sql.cpp" break; - case 100: /* expression: sub_query_expr */ + case 99: /* expression: sub_query_expr */ #line 827 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2653 "yacc_sql.cpp" +#line 2645 "yacc_sql.cpp" break; - case 101: /* alias: %empty */ + case 100: /* alias: %empty */ #line 834 "yacc_sql.y" - { + { (yyval.string) = nullptr; } -#line 2661 "yacc_sql.cpp" +#line 2653 "yacc_sql.cpp" break; - case 102: /* alias: ID */ + case 101: /* alias: ID */ #line 837 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } -#line 2669 "yacc_sql.cpp" +#line 2661 "yacc_sql.cpp" break; - case 103: /* alias: AS ID */ + case 102: /* alias: AS ID */ #line 840 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } -#line 2677 "yacc_sql.cpp" +#line 2669 "yacc_sql.cpp" break; - case 104: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 103: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 846 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2685 "yacc_sql.cpp" +#line 2677 "yacc_sql.cpp" break; - case 105: /* sub_query_expr: LBRACE select_stmt RBRACE */ + case 104: /* sub_query_expr: LBRACE select_stmt RBRACE */ #line 853 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2693 "yacc_sql.cpp" +#line 2685 "yacc_sql.cpp" break; - case 106: /* rel_attr: ID */ + case 105: /* rel_attr: ID */ #line 859 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2703 "yacc_sql.cpp" +#line 2695 "yacc_sql.cpp" break; - case 107: /* rel_attr: ID DOT ID */ + case 106: /* rel_attr: ID DOT ID */ #line 864 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2715 "yacc_sql.cpp" +#line 2707 "yacc_sql.cpp" break; - case 108: /* relation: ID */ + case 107: /* relation: ID */ #line 874 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } -#line 2723 "yacc_sql.cpp" +#line 2715 "yacc_sql.cpp" break; - case 109: /* rel_list: relation alias */ + case 108: /* rel_list: relation alias */ #line 880 "yacc_sql.y" - { + { (yyval.relation_list) = new std::vector(); - if(nullptr!=(yyvsp[0].string)){ - (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); + if (nullptr != (yyvsp[0].string)) { + (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); free((yyvsp[0].string)); - }else{ + } else { (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); } -#line 2738 "yacc_sql.cpp" +#line 2730 "yacc_sql.cpp" break; - case 110: /* rel_list: relation alias COMMA rel_list */ + case 109: /* rel_list: relation alias COMMA rel_list */ #line 890 "yacc_sql.y" - { + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if(nullptr!=(yyvsp[-2].string)){ - (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); + if (nullptr != (yyvsp[-2].string)) { + (yyval.relation_list) + ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); free((yyvsp[-2].string)); - }else{ + } else { (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); } -#line 2757 "yacc_sql.cpp" +#line 2749 "yacc_sql.cpp" break; - case 111: /* join_clauses: relation ON condition */ + case 110: /* join_clauses: relation ON condition */ #line 908 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; @@ -2764,293 +4706,309 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2768 "yacc_sql.cpp" +#line 2760 "yacc_sql.cpp" break; - case 112: /* join_clauses: relation ON condition INNER JOIN join_clauses */ + case 111: /* join_clauses: relation ON condition INNER JOIN join_clauses */ #line 915 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2780 "yacc_sql.cpp" +#line 2772 "yacc_sql.cpp" break; - case 113: /* where: %empty */ + case 112: /* where: %empty */ #line 926 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2788 "yacc_sql.cpp" +#line 2780 "yacc_sql.cpp" break; - case 114: /* where: WHERE condition */ + case 113: /* where: WHERE condition */ #line 929 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + { + (yyval.expression) = (yyvsp[0].expression); } -#line 2796 "yacc_sql.cpp" +#line 2788 "yacc_sql.cpp" break; - case 115: /* condition: expression comp_op expression */ + case 114: /* condition: expression comp_op expression */ #line 936 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2804 "yacc_sql.cpp" +#line 2796 "yacc_sql.cpp" break; - case 116: /* condition: comp_op expression */ + case 115: /* condition: comp_op expression */ #line 940 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); - (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); } -#line 2815 "yacc_sql.cpp" +#line 2807 "yacc_sql.cpp" break; - case 117: /* condition: condition AND condition */ + case 116: /* condition: condition AND condition */ #line 947 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2823 "yacc_sql.cpp" +#line 2815 "yacc_sql.cpp" break; - case 118: /* condition: condition OR condition */ + case 117: /* condition: condition OR condition */ #line 951 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2831 "yacc_sql.cpp" +#line 2823 "yacc_sql.cpp" break; - case 119: /* comp_op: EQ */ + case 118: /* comp_op: EQ */ #line 957 "yacc_sql.y" - { (yyval.comp) = EQUAL_TO; } -#line 2837 "yacc_sql.cpp" + { + (yyval.comp) = EQUAL_TO; + } +#line 2829 "yacc_sql.cpp" break; - case 120: /* comp_op: LT */ + case 119: /* comp_op: LT */ #line 958 "yacc_sql.y" - { (yyval.comp) = LESS_THAN; } -#line 2843 "yacc_sql.cpp" + { + (yyval.comp) = LESS_THAN; + } +#line 2835 "yacc_sql.cpp" break; - case 121: /* comp_op: GT */ + case 120: /* comp_op: GT */ #line 959 "yacc_sql.y" - { (yyval.comp) = GREAT_THAN; } -#line 2849 "yacc_sql.cpp" + { + (yyval.comp) = GREAT_THAN; + } +#line 2841 "yacc_sql.cpp" break; - case 122: /* comp_op: LE */ + case 121: /* comp_op: LE */ #line 960 "yacc_sql.y" - { (yyval.comp) = LESS_EQUAL; } -#line 2855 "yacc_sql.cpp" + { + (yyval.comp) = LESS_EQUAL; + } +#line 2847 "yacc_sql.cpp" break; - case 123: /* comp_op: GE */ + case 122: /* comp_op: GE */ #line 961 "yacc_sql.y" - { (yyval.comp) = GREAT_EQUAL; } -#line 2861 "yacc_sql.cpp" + { + (yyval.comp) = GREAT_EQUAL; + } +#line 2853 "yacc_sql.cpp" break; - case 124: /* comp_op: NE */ + case 123: /* comp_op: NE */ #line 962 "yacc_sql.y" - { (yyval.comp) = NOT_EQUAL; } -#line 2867 "yacc_sql.cpp" + { + (yyval.comp) = NOT_EQUAL; + } +#line 2859 "yacc_sql.cpp" break; - case 125: /* comp_op: IS */ + case 124: /* comp_op: IS */ #line 963 "yacc_sql.y" - { (yyval.comp) = IS_OP; } -#line 2873 "yacc_sql.cpp" + { + (yyval.comp) = IS_OP; + } +#line 2865 "yacc_sql.cpp" break; - case 126: /* comp_op: IS NOT */ + case 125: /* comp_op: IS NOT */ #line 964 "yacc_sql.y" - { (yyval.comp) = IS_NOT_OP; } -#line 2879 "yacc_sql.cpp" + { + (yyval.comp) = IS_NOT_OP; + } +#line 2871 "yacc_sql.cpp" break; - case 127: /* comp_op: LIKE */ + case 126: /* comp_op: LIKE */ #line 965 "yacc_sql.y" - { (yyval.comp) = LIKE_OP;} -#line 2885 "yacc_sql.cpp" + { + (yyval.comp) = LIKE_OP; + } +#line 2877 "yacc_sql.cpp" break; - case 128: /* comp_op: NOT LIKE */ + case 127: /* comp_op: NOT LIKE */ #line 966 "yacc_sql.y" - {(yyval.comp) = NOT_LIKE_OP;} -#line 2891 "yacc_sql.cpp" + { + (yyval.comp) = NOT_LIKE_OP; + } +#line 2883 "yacc_sql.cpp" break; - case 129: /* comp_op: IN */ + case 128: /* comp_op: IN */ #line 967 "yacc_sql.y" - { (yyval.comp) = IN_OP; } -#line 2897 "yacc_sql.cpp" + { + (yyval.comp) = IN_OP; + } +#line 2889 "yacc_sql.cpp" break; - case 130: /* comp_op: NOT IN */ + case 129: /* comp_op: NOT IN */ #line 968 "yacc_sql.y" - { (yyval.comp) = NOT_IN_OP; } -#line 2903 "yacc_sql.cpp" + { + (yyval.comp) = NOT_IN_OP; + } +#line 2895 "yacc_sql.cpp" break; - case 131: /* comp_op: EXISTS */ + case 130: /* comp_op: EXISTS */ #line 969 "yacc_sql.y" - { (yyval.comp) = EXISTS_OP; } -#line 2909 "yacc_sql.cpp" + { + (yyval.comp) = EXISTS_OP; + } +#line 2901 "yacc_sql.cpp" break; - case 132: /* comp_op: NOT EXISTS */ + case 131: /* comp_op: NOT EXISTS */ #line 970 "yacc_sql.y" - { (yyval.comp) = NOT_EXISTS_OP; } -#line 2915 "yacc_sql.cpp" + { + (yyval.comp) = NOT_EXISTS_OP; + } +#line 2907 "yacc_sql.cpp" break; - case 133: /* opt_order_by: %empty */ + case 132: /* opt_order_by: %empty */ #line 975 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2923 "yacc_sql.cpp" +#line 2915 "yacc_sql.cpp" break; - case 134: /* opt_order_by: ORDER BY sort_list */ + case 133: /* opt_order_by: ORDER BY sort_list */ #line 979 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } -#line 2932 "yacc_sql.cpp" +#line 2924 "yacc_sql.cpp" break; - case 135: /* sort_list: sort_unit */ + case 134: /* sort_list: sort_unit */ #line 987 "yacc_sql.y" - { + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } -#line 2941 "yacc_sql.cpp" + } +#line 2933 "yacc_sql.cpp" break; - case 136: /* sort_list: sort_unit COMMA sort_list */ + case 135: /* sort_list: sort_unit COMMA sort_list */ #line 992 "yacc_sql.y" - { + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } -#line 2950 "yacc_sql.cpp" + } +#line 2942 "yacc_sql.cpp" break; - case 137: /* sort_unit: expression */ + case 136: /* sort_unit: expression */ #line 1000 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2960 "yacc_sql.cpp" + } +#line 2952 "yacc_sql.cpp" break; - case 138: /* sort_unit: expression DESC */ + case 137: /* sort_unit: expression DESC */ #line 1006 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } -#line 2970 "yacc_sql.cpp" + } +#line 2962 "yacc_sql.cpp" break; - case 139: /* sort_unit: expression ASC */ + case 138: /* sort_unit: expression ASC */ #line 1012 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2980 "yacc_sql.cpp" + } +#line 2972 "yacc_sql.cpp" break; - case 140: /* group_by: %empty */ + case 139: /* group_by: %empty */ #line 1021 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2988 "yacc_sql.cpp" +#line 2980 "yacc_sql.cpp" break; - case 141: /* group_by: GROUP BY expression_list */ + case 140: /* group_by: GROUP BY expression_list */ #line 1025 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2996 "yacc_sql.cpp" +#line 2988 "yacc_sql.cpp" break; - case 142: /* opt_having: %empty */ + case 141: /* opt_having: %empty */ #line 1032 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 3004 "yacc_sql.cpp" +#line 2996 "yacc_sql.cpp" break; - case 143: /* opt_having: HAVING condition */ + case 142: /* opt_having: HAVING condition */ #line 1036 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3012 "yacc_sql.cpp" - break; - - case 144: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 1043 "yacc_sql.y" - { - char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); - (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; - free((yyvsp[0].string)); - free(tmp_file_name); - } -#line 3026 "yacc_sql.cpp" +#line 3004 "yacc_sql.cpp" break; - case 145: /* explain_stmt: EXPLAIN command_wrapper */ + case 143: /* explain_stmt: EXPLAIN command_wrapper */ #line 1056 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3035 "yacc_sql.cpp" +#line 3013 "yacc_sql.cpp" break; - case 146: /* set_variable_stmt: SET ID EQ value */ + case 144: /* set_variable_stmt: SET ID EQ value */ #line 1064 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3047 "yacc_sql.cpp" +#line 3025 "yacc_sql.cpp" break; +#line 3029 "yacc_sql.cpp" -#line 3051 "yacc_sql.cpp" - - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -3062,9 +5020,9 @@ YYLTYPE yylloc = yyloc_default; case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; *++yyvsp = yyval; @@ -3075,84 +5033,67 @@ YYLTYPE yylloc = yyloc_default; number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp - ? yytable[yyi] - : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; - /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) - { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } - } - yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; + if (!yyerrstatus) { + ++yynerrs; + { + yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) { + if (yymsg != yymsgbuf) + YYSTACK_FREE(yymsg); + yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); + if (yymsg) { + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } else { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } } + yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } + } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; - } + if (yychar <= YYEOF) { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else { + yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; } + } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; - /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -3165,45 +5106,40 @@ YYLTYPE yylloc = yyloc_default; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); yystate = *yyssp; goto yyerrlab1; - /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) { + yyn = yypact[yystate]; + if (!yypact_value_is_default(yyn)) { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + yystate = *yyssp; + YY_STACK_PRINT(yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3211,15 +5147,14 @@ YYLTYPE yylloc = yyloc_default; yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; - /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -3227,7 +5162,6 @@ YYLTYPE yylloc = yyloc_default; yyresult = 0; goto yyreturnlab; - /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -3235,44 +5169,38 @@ YYLTYPE yylloc = yyloc_default; yyresult = 1; goto yyreturnlab; - /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; - /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE(yychar); + yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - } + YYPOPSTACK(yylen); + YY_STACK_PRINT(yyss, yyssp); + while (yyssp != yyss) { + yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE (yyss); + YYSTACK_FREE(yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); + YYSTACK_FREE(yymsg); return yyresult; } @@ -3281,7 +5209,8 @@ YYLTYPE yylloc = yyloc_default; //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) { +int sql_parse(const char *s, ParsedSqlResult *sql_result) +{ yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 9b0d0021..48d13f9e 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -# define YY_YY_YACC_SQL_HPP_INCLUDED +#define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -# define YYDEBUG 0 +#define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,127 +47,125 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - HAVING = 266, /* HAVING */ - ORDER = 267, /* ORDER */ - TABLE = 268, /* TABLE */ - TABLES = 269, /* TABLES */ - INDEX = 270, /* INDEX */ - CALC = 271, /* CALC */ - SELECT = 272, /* SELECT */ - DESC = 273, /* DESC */ - SHOW = 274, /* SHOW */ - SYNC = 275, /* SYNC */ - INSERT = 276, /* INSERT */ - DELETE = 277, /* DELETE */ - UPDATE = 278, /* UPDATE */ - LBRACE = 279, /* LBRACE */ - RBRACE = 280, /* RBRACE */ - COMMA = 281, /* COMMA */ - TRX_BEGIN = 282, /* TRX_BEGIN */ - TRX_COMMIT = 283, /* TRX_COMMIT */ - TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ - INT_T = 285, /* INT_T */ - IN = 286, /* IN */ - STRING_T = 287, /* STRING_T */ - FLOAT_T = 288, /* FLOAT_T */ - DATE_T = 289, /* DATE_T */ - TEXT_T = 290, /* TEXT_T */ - NOT = 291, /* NOT */ - UNIQUE = 292, /* UNIQUE */ - NULL_T = 293, /* NULL_T */ - NULLABLE = 294, /* NULLABLE */ - HELP = 295, /* HELP */ - EXIT = 296, /* EXIT */ - DOT = 297, /* DOT */ - INTO = 298, /* INTO */ - VALUES = 299, /* VALUES */ - FROM = 300, /* FROM */ - WHERE = 301, /* WHERE */ - AND = 302, /* AND */ - OR = 303, /* OR */ - SET = 304, /* SET */ - ON = 305, /* ON */ - LOAD = 306, /* LOAD */ - DATA = 307, /* DATA */ - INFILE = 308, /* INFILE */ - EXPLAIN = 309, /* EXPLAIN */ - STORAGE = 310, /* STORAGE */ - FORMAT = 311, /* FORMAT */ - INNER = 312, /* INNER */ - JOIN = 313, /* JOIN */ - VIEW = 314, /* VIEW */ - EQ = 315, /* EQ */ - LT = 316, /* LT */ - GT = 317, /* GT */ - LE = 318, /* LE */ - GE = 319, /* GE */ - NE = 320, /* NE */ - LIKE = 321, /* LIKE */ - IS = 322, /* IS */ - NUMBER = 323, /* NUMBER */ - FLOAT = 324, /* FLOAT */ - ID = 325, /* ID */ - SSS = 326, /* SSS */ - UMINUS = 327 /* UMINUS */ - }; - typedef enum yytokentype yytoken_kind_t; +#define YYTOKENTYPE +enum yytokentype +{ + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + HAVING = 266, /* HAVING */ + ORDER = 267, /* ORDER */ + TABLE = 268, /* TABLE */ + TABLES = 269, /* TABLES */ + INDEX = 270, /* INDEX */ + CALC = 271, /* CALC */ + SELECT = 272, /* SELECT */ + DESC = 273, /* DESC */ + SHOW = 274, /* SHOW */ + SYNC = 275, /* SYNC */ + INSERT = 276, /* INSERT */ + DELETE = 277, /* DELETE */ + UPDATE = 278, /* UPDATE */ + LBRACE = 279, /* LBRACE */ + RBRACE = 280, /* RBRACE */ + COMMA = 281, /* COMMA */ + TRX_BEGIN = 282, /* TRX_BEGIN */ + TRX_COMMIT = 283, /* TRX_COMMIT */ + TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ + INT_T = 285, /* INT_T */ + IN = 286, /* IN */ + STRING_T = 287, /* STRING_T */ + FLOAT_T = 288, /* FLOAT_T */ + DATE_T = 289, /* DATE_T */ + TEXT_T = 290, /* TEXT_T */ + NOT = 291, /* NOT */ + UNIQUE = 292, /* UNIQUE */ + NULL_T = 293, /* NULL_T */ + NULLABLE = 294, /* NULLABLE */ + HELP = 295, /* HELP */ + EXIT = 296, /* EXIT */ + DOT = 297, /* DOT */ + INTO = 298, /* INTO */ + VALUES = 299, /* VALUES */ + FROM = 300, /* FROM */ + WHERE = 301, /* WHERE */ + AND = 302, /* AND */ + OR = 303, /* OR */ + SET = 304, /* SET */ + ON = 305, /* ON */ + LOAD = 306, /* LOAD */ + INFILE = 307, /* INFILE */ + EXPLAIN = 308, /* EXPLAIN */ + STORAGE = 309, /* STORAGE */ + FORMAT = 310, /* FORMAT */ + INNER = 311, /* INNER */ + JOIN = 312, /* JOIN */ + VIEW = 313, /* VIEW */ + EQ = 314, /* EQ */ + LT = 315, /* LT */ + GT = 316, /* GT */ + LE = 317, /* LE */ + GE = 318, /* GE */ + NE = 319, /* NE */ + LIKE = 320, /* LIKE */ + IS = 321, /* IS */ + NUMBER = 322, /* NUMBER */ + FLOAT = 323, /* FLOAT */ + ID = 324, /* ID */ + SSS = 325, /* SSS */ + UMINUS = 326 /* UMINUS */ +}; +typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 164 "yacc_sql.y" - ParsedSqlNode * sql_node; - Value * value; - enum CompOp comp; - RelAttrSqlNode * rel_attr; - std::vector * attr_infos; - AttrInfoSqlNode * attr_info; - Expression * expression; - std::vector> * expression_list; - std::vector * value_list; - std::vector> * values_list; - SetClauseSqlNode * set_clause; - std::vector * set_clauses; - JoinSqlNode * join_clauses; - std::vector * rel_attr_list; - std::vector * relation_list; - OrderBySqlNode * orderby_unit; - std::vector * orderby_list; - char * string; - int number; - float floats; - bool nullable_info; - std::vector * index_attr_list; - bool unique; - -#line 162 "yacc_sql.hpp" - + ParsedSqlNode *sql_node; + Value *value; + enum CompOp comp; + RelAttrSqlNode *rel_attr; + std::vector *attr_infos; + AttrInfoSqlNode *attr_info; + Expression *expression; + std::vector> *expression_list; + std::vector *value_list; + std::vector> *values_list; + SetClauseSqlNode *set_clause; + std::vector *set_clauses; + JoinSqlNode *join_clauses; + std::vector *rel_attr_list; + std::vector *relation_list; + OrderBySqlNode *orderby_unit; + std::vector *orderby_list; + char *string; + int number; + float floats; + bool nullable_info; + std::vector *index_attr_list; + bool unique; + +#line 161 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 +#define YYSTYPE_IS_TRIVIAL 1 +#define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -176,14 +174,10 @@ struct YYLTYPE int last_line; int last_column; }; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 +#define YYLTYPE_IS_DECLARED 1 +#define YYLTYPE_IS_TRIVIAL 1 #endif - - - -int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); - +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index b7de3502..224de1da 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -143,7 +143,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, SET ON LOAD - DATA + // DATA INFILE EXPLAIN STORAGE @@ -242,7 +242,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, %type begin_stmt %type commit_stmt %type rollback_stmt -%type load_data_stmt +// %type load_data_stmt %type explain_stmt %type set_variable_stmt %type help_stmt @@ -285,7 +285,7 @@ command_wrapper: | begin_stmt | commit_stmt | rollback_stmt - | load_data_stmt +// | load_data_stmt | explain_stmt | set_variable_stmt | help_stmt @@ -1038,7 +1038,7 @@ opt_having: } ; -load_data_stmt: +/* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID { char *tmp_file_name = common::substr($4, 1, strlen($4) - 2); @@ -1049,7 +1049,7 @@ load_data_stmt: free($7); free(tmp_file_name); } - ; + ;*/ explain_stmt: EXPLAIN command_wrapper From f4ebf347acb12fae80c999f4be7a57c8bdf2a9df Mon Sep 17 00:00:00 2001 From: Koschei Date: Mon, 14 Oct 2024 23:47:17 +0800 Subject: [PATCH 236/308] =?UTF-8?q?fix:=20=E8=A7=86=E5=9B=BE=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=9F=A5=E8=AF=A2=E5=88=97=E7=9A=84=E5=88=AB=E5=90=8D?= =?UTF-8?q?=E4=BD=9C=E4=B8=BA=E6=96=B0=E5=88=97=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.h | 1 + src/observer/sql/parser/expression_binder.cpp | 1 + src/observer/storage/table/view.cpp | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index da6ff512..b76d5ce2 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -117,6 +117,7 @@ class Expression */ virtual const char *name() const { return name_.c_str(); } virtual const char *alias() const { return alias_.c_str(); } + bool has_alias() const { return !alias_.empty(); } virtual void set_name(std::string name) { name_ = std::move(name); } virtual void set_alias(std::string alias) { alias_ = std::move(alias); } virtual bool name_empty() { return name_.empty(); } diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 515983ed..a9d0fb33 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -484,6 +484,7 @@ RC ExpressionBinder::bind_function_expression( // set name 阶段 aggregate_expr->set_name(unbound_function_expr->name()); + aggregate_expr->set_alias(unbound_function_expr->alias()); rc = check_aggregate_expression(*aggregate_expr); if (OB_FAIL(rc)) { return rc; diff --git a/src/observer/storage/table/view.cpp b/src/observer/storage/table/view.cpp index ebc98766..1193741e 100644 --- a/src/observer/storage/table/view.cpp +++ b/src/observer/storage/table/view.cpp @@ -63,7 +63,8 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co auto field_meta = field_expr->field().meta(); attr_info.type = field_meta->type(); - attr_info.name = attr_names.empty() ? field_meta->name() : std::move(attr_names[i]); + attr_info.name = attr_names.empty() ? (field_expr->has_alias() ? field_expr->alias() : field_meta->name()) + : std::move(attr_names[i]); attr_info.length = field_meta->len(); attr_info.nullable = field_meta->nullable(); attr_info.mutable_ = field_meta->is_mutable(); @@ -75,7 +76,8 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co mutable_ = false; // 包含聚合函数的是只读视图 } attr_info.type = query_expr->value_type(); - attr_info.name = query_expr->name(); + attr_info.name = attr_names.empty() ? (query_expr->has_alias() ? query_expr->alias() : query_expr->name()) + : std::move(attr_names[i]); // 简单处理,非 field 表达式都是可为空的 attr_info.length = query_expr->value_length() + 1; attr_info.nullable = true; From f8a5e1e1f23b5921333e59d84c68a56414dedd48 Mon Sep 17 00:00:00 2001 From: Koschei Date: Tue, 15 Oct 2024 01:13:29 +0800 Subject: [PATCH 237/308] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E5=AD=97=E6=AE=B5=E6=8F=92=E5=85=A5=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/parse_defs.h | 1 + src/observer/sql/parser/yacc_sql.cpp | 1819 +++++++++++++------------ src/observer/sql/parser/yacc_sql.y | 11 + src/observer/sql/stmt/insert_stmt.cpp | 61 +- src/observer/sql/stmt/insert_stmt.h | 6 +- 5 files changed, 995 insertions(+), 903 deletions(-) diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 9b7a2203..94d286c5 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -152,6 +152,7 @@ struct CalcSqlNode struct InsertSqlNode { std::string relation_name; ///< Relation to insert into + std::vector attr_names; ///< attribute names std::vector> values_list; ///< 要插入的值列表 }; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 4efa89c1..f7d3ee45 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -406,7 +406,7 @@ typedef int yytype_uint16; #define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ -typedef yytype_uint8 yy_state_t; +typedef yytype_int16 yy_state_t; /* State numbers in computations. */ typedef int yy_state_fast_t; @@ -605,16 +605,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 72 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 274 +#define YYLAST 276 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 56 /* YYNRULES -- Number of rules. */ -#define YYNRULES 145 +#define YYNRULES 146 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 256 +#define YYNSTATES 261 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 326 @@ -1019,89 +1019,90 @@ static const yytype_int16 yyrline[] = {0, 537, 538, 542, - 555, - 561, - 568, - 574, - 582, + 552, + 566, + 572, + 579, 585, - 589, + 593, 596, 600, - 604, - 610, - 617, - 620, - 627, - 639, - 653, - 658, - 665, - 675, - 708, - 741, - 747, - 756, - 759, - 768, - 784, - 787, - 790, - 793, - 796, + 607, + 611, + 615, + 621, + 628, + 631, + 638, + 650, + 664, + 669, + 676, + 686, + 719, + 752, + 758, + 767, + 770, + 779, + 795, + 798, + 801, 804, 807, - 812, + 815, 818, - 821, - 824, - 827, - 834, - 837, - 840, + 823, + 829, + 832, + 835, + 838, 845, - 852, - 859, - 864, - 874, - 880, - 890, - 907, - 914, - 926, - 929, - 935, - 939, + 848, + 851, + 856, + 863, + 870, + 875, + 885, + 891, + 901, + 918, + 925, + 937, + 940, 946, 950, 957, - 958, - 959, - 960, 961, - 962, - 963, - 964, - 965, - 966, - 967, 968, 969, 970, + 971, + 972, + 973, + 974, 975, + 976, + 977, 978, + 979, + 980, + 981, 986, - 991, - 999, - 1005, - 1011, - 1021, - 1024, + 989, + 997, + 1002, + 1010, + 1016, + 1022, 1032, 1035, - 1055, - 1063, - 1074}; + 1043, + 1046, + 1066, + 1074, + 1085}; #endif /** Accessing symbol of state STATE. */ @@ -1261,26 +1262,26 @@ static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysy /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {221, +static const yytype_int16 yypact[] = {223, 3, - 4, - 80, - 80, - -44, - 45, - -171, - -16, - -2, + 8, + 67, + 67, -40, + 35, -171, + -28, + -14, + -35, -171, -171, -171, -171, - -14, - 221, + -171, + -30, + 223, 53, - 64, + 72, -171, -171, -171, @@ -1303,130 +1304,131 @@ static const yytype_int16 yypact[] = {221, -171, -171, -171, - 0, + 20, -171, - 36, - 57, - 38, - 44, - 48, - 30, + 26, + 55, + 31, + 40, + 50, + 34, -171, -171, -171, - 6, + 1, -171, - 80, + 67, -171, -171, -171, - 2, + 10, -171, -171, -171, - 41, + 33, -171, -171, - 74, - 54, - 59, - 102, - 78, + 82, + 63, + 69, + 113, + 71, -171, -171, -171, -171, - -15, - 17, - 89, + -13, + 9, + 98, -171, - 106, + 122, -171, - 80, - 145, - 146, - 80, - -47, + 67, + 148, + 149, + 67, + -51, -171, - 103, + 106, -171, - 80, - 80, - 80, - 80, - 147, - 107, - 107, - 131, - 134, + 67, + 67, + 67, + 67, + 150, 108, - 87, + 108, + 0, + 133, 112, - 127, - 14, - 166, + 61, 115, - 136, - 118, - 41, + 127, + 13, + 168, + 117, + 138, + 120, + 33, -171, -171, - 164, + 165, -171, -171, -171, - -10, - -10, + -9, + -9, -171, -171, - 80, + 67, -171, - 9, - 134, + 4, + 133, -171, - 169, - 154, + 117, + 167, + 156, -171, - 135, - -12, + 139, + 2, -171, - 43, + 25, -171, -171, - 132, - 170, - 138, - 166, + 136, + 169, + 140, + 168, -171, -171, - 172, + 171, 175, - 126, - -171, + 132, -171, -171, - 144, - 176, - 193, - 87, - 178, -171, + 145, + 177, + 195, + 181, + 61, + 182, -171, - 1, -171, + 11, -171, -171, -171, -171, -171, -171, - 171, - 70, - 68, - 80, - 80, - 108, -171, + 173, + 85, + 21, + 67, + 67, + 112, -171, -171, -171, @@ -1434,87 +1436,91 @@ static const yytype_int16 yypact[] = {221, -171, -171, -171, - 88, - 112, - 180, - 137, -171, + 84, 115, - 204, - 186, - 107, - 107, - 205, - 201, - 120, + 185, + 142, -171, - 206, + 117, + 203, + 189, + 108, + 108, + 208, + 216, + 188, + 87, -171, + 209, -171, -171, -171, - 80, - 154, - 154, - 19, - 19, -171, - 158, - 194, + 67, + 156, + 156, + 81, + 81, -171, + 170, + 196, -171, -171, - 170, - 177, -171, + 169, + 184, -171, - 166, - 115, - 183, - 134, - 16, -171, - 80, - 154, - 222, + 168, + 117, + 186, + 133, + 5, -171, - 87, - 87, - 19, + 67, + 156, + 235, + 167, -171, - 188, - 211, + 61, + 61, + 81, -171, + 201, + 210, -171, - 29, -171, - 220, - 154, - 193, + 42, -171, - 68, - 240, + 224, + 156, + 195, -171, + 21, + 247, -171, - 143, - 13, - 166, + 182, + -171, + 135, + 79, + 168, -171, -171, - 40, + 7, -171, - 80, + 67, -171, -171, -171, - 190, - 10, + 197, + 14, -171, - 225, - 107, + 229, + 108, -171, -171, - 80, + 67, -171, -171}; @@ -1524,8 +1530,8 @@ static const yytype_int16 yypact[] = {221, static const yytype_uint8 yydefact[] = {0, 37, 0, - 85, - 85, + 86, + 86, 0, 0, 27, @@ -1570,21 +1576,21 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 85, - 73, - 70, + 86, + 74, 71, - 105, 72, + 106, + 73, 0, - 96, - 94, - 83, - 100, - 98, - 99, + 97, 95, 84, + 101, + 99, + 100, + 96, + 85, 33, 32, 0, @@ -1592,33 +1598,33 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 143, + 144, 1, - 145, + 146, 2, - 74, + 75, 0, 0, 31, 0, 48, - 85, + 86, 0, 0, - 85, + 86, 0, - 93, + 94, 0, - 101, + 102, 0, 0, 0, 0, - 86, + 87, 0, 0, 0, - 112, + 113, 0, 0, 0, @@ -1629,30 +1635,31 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 104, - 92, + 105, + 93, 0, - 106, - 97, - 102, - 88, + 107, + 98, + 103, 89, 90, 91, - 85, - 107, - 100, - 112, + 92, + 86, + 108, + 101, + 113, 34, 0, 0, - 76, 0, - 112, - 78, + 77, 0, - 144, - 67, + 113, + 79, + 0, + 145, + 68, 0, 49, 0, @@ -1663,32 +1670,33 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 40, - 103, - 87, + 104, + 88, + 0, + 109, + 140, 0, - 108, - 139, 0, 62, - 130, - 128, + 131, + 129, 0, - 118, 119, 120, 121, 122, 123, - 126, 124, + 127, + 125, 0, - 113, + 114, 0, 0, 0, - 77, - 68, + 78, 69, + 70, 57, 58, 59, @@ -1705,44 +1713,46 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 141, + 142, 0, - 65, 0, - 131, - 129, - 127, - 125, + 66, 0, + 132, + 130, + 128, + 126, 0, 0, - 115, + 0, + 116, + 81, 80, - 79, 0, 0, 55, 54, 52, 49, - 74, 75, + 76, 39, 0, 0, 0, - 112, - 100, - 109, - 85, + 113, + 101, + 110, + 86, 0, - 132, - 63, + 133, 0, + 64, 0, - 114, - 116, + 0, + 115, 117, + 118, 0, 53, 50, @@ -1750,39 +1760,39 @@ static const yytype_uint8 yydefact[] = {0, 47, 0, 0, - 139, 140, - 142, + 141, + 143, 0, - 81, - 66, + 82, + 63, + 67, 0, 56, 0, 42, 35, - 110, - 82, + 111, + 83, 0, - 64, + 65, 51, 41, 0, - 136, - 133, + 137, 134, + 135, 0, + 139, 138, - 137, 0, - 111, - 135}; + 112, + 136}; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = {-171, -171, - 235, - -171, + 239, -171, -171, -171, @@ -1794,43 +1804,44 @@ static const yytype_int16 yypgoto[] = {-171, -171, -171, -171, - -166, -171, + -113, -171, -171, -171, - 50, - 81, - 18, -171, + 51, + 83, + 17, -171, -171, + 41, 39, -95, -97, - 52, + 58, -171, -171, -171, - 94, + 96, -46, -171, -4, -54, - 200, + 207, -171, -171, -171, - -87, - 82, - 15, + -88, + 86, + 12, -116, -170, - 100, + 107, -171, - 20, + 15, -171, - 34, + 38, -171, -171, -171, @@ -1852,44 +1863,44 @@ static const yytype_uint8 yydefgoto[] = {0, 29, 30, 45, - 139, + 140, 31, 32, 33, 34, + 177, + 134, + 205, 175, - 133, - 202, - 173, 35, - 148, - 185, - 186, + 150, + 188, + 189, 57, 102, 36, 37, - 127, 128, + 129, 38, 39, 58, 59, - 145, + 146, 60, 61, 62, - 209, + 212, 121, - 210, - 125, - 161, - 162, - 233, - 248, - 249, - 184, - 215, + 213, + 126, + 163, + 164, + 237, + 253, + 254, + 186, + 218, 40, 41, 74}; @@ -1897,243 +1908,245 @@ static const yytype_uint8 yydefgoto[] = {0, /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = {63, +static const yytype_int16 yytable[] = {63, 86, - 131, + 132, 82, - 130, - 146, - 87, + 131, + 147, 120, 122, - 100, - 188, - 165, - 206, 87, - 164, - 251, - 42, - 46, - 135, - 47, 87, + 148, + 100, + 167, 103, + 87, + 67, + 42, + 136, 111, - 220, - 221, - 64, + 256, + 191, + 46, 112, - 67, - 252, - 69, + 47, + 123, 84, - 81, - 189, - 237, - 124, + 224, + 225, + 166, + 64, + 81, + 68, + 257, + 104, + 69, 114, 115, 116, 117, - 101, + 70, 43, - 104, - 227, - 68, - 231, + 101, + 192, + 85, + 124, 83, + 242, + 235, + 125, + 65, + 66, 81, - 81, - 85, - 199, - 131, - 200, - 201, + 132, 72, - 49, - 70, - 136, + 196, + 197, 137, - 240, - 65, - 66, + 138, + 49, + 81, + 145, 44, - 48, + 245, + 251, 91, 92, - 144, - 190, - 73, + 48, + 209, + 196, + 197, + 77, + 162, 50, - 75, - 160, 88, - 77, - 89, - 90, - 91, - 92, + 88, + 73, + 193, 107, + 94, 88, - 149, 110, 89, 90, 91, 92, - 88, - 94, - 193, - 194, - 177, 89, 90, 91, 92, - 229, - 211, - 246, + 75, + 179, + 49, + 168, + 169, + 151, + 76, + 214, + 233, + 231, + 50, + 78, 51, 52, 53, 54, - 150, + 50, 55, 56, - 49, - 76, - 151, - 78, - 195, - 196, - 166, - 167, - 198, + 201, 79, - 143, - 193, - 194, + 198, + 199, + 220, + 221, + 144, + 202, + 152, + 203, + 204, 80, - 50, + 202, + 153, + 203, + 204, + 132, + 132, + 239, 95, - 131, - 131, - 234, + 51, + 52, + 99, + 54, 96, - 199, - 50, - 200, - 201, + 130, + 51, + 52, + 53, + 54, 97, - 152, - 153, + 55, + 56, + 223, + 162, + 162, 154, 155, 156, 157, 158, 159, - 99, - 219, - 160, 160, + 161, 89, 90, 91, 92, - 216, - 217, - 51, - 52, - 53, - 54, + 89, + 90, + 91, + 92, + 248, + 221, 98, - 55, - 56, - 51, - 52, - 106, - 54, - 105, - 129, - 160, - 226, - 168, - 149, - 169, + 162, + 230, + 151, 170, + 105, 171, 172, - 243, - 217, + 173, + 174, + 106, 108, 109, 113, 118, - 160, - 123, 119, - 126, + 162, + 125, 49, - 238, - 124, - 132, - 134, + 127, + 135, + 243, + 133, 81, - 138, - 150, - 140, + 139, + 152, 141, - 247, 142, - 151, - 245, + 143, + 149, + 153, + 252, 50, - 147, - 163, - 180, - 174, 176, + 250, + 180, + 165, 178, - 247, - 179, 181, 182, 183, + 184, + 252, + 185, 187, - 204, - 205, - 191, + 210, + 190, + 194, 207, - 230, 208, - 213, - 214, - 152, - 153, + 234, + 211, + 216, 154, 155, 156, 157, 158, 159, + 160, + 161, 51, 52, 53, 54, - 222, + 217, 55, 56, 1, 2, - 218, - 101, - 223, - 228, + 219, + 222, + 227, + 241, 232, - 193, - 236, + 226, + 101, 3, 4, 5, @@ -2142,35 +2155,35 @@ static const yytype_uint8 yytable[] = {63, 8, 9, 10, - 239, - 242, - 250, + 236, + 196, + 244, 11, 12, 13, - 253, + 247, + 255, + 258, 71, - 224, - 244, - 203, - 225, - 235, - 197, - 93, - 192, + 228, + 249, + 206, + 238, + 240, + 200, 14, 15, - 241, - 212, - 254, - 0, - 0, - 0, + 229, + 93, + 259, 0, + 195, + 215, + 246, 16, + 260, 0, 0, - 255, 17}; static const yytype_int16 yycheck[] = {4, @@ -2179,129 +2192,144 @@ static const yytype_int16 yycheck[] = {4, 49, 99, 121, - 4, 94, 95, - 24, - 9, - 127, - 178, 4, - 26, - 5, - 13, - 13, 4, - 15, + 123, + 24, + 128, 4, 4, - 69, - 193, - 194, - 69, - 73, 43, - 18, + 13, + 4, 69, + 5, + 9, + 13, + 73, + 15, + 24, 24, + 196, + 197, + 26, + 69, 17, - 31, - 4, - 46, + 45, + 18, + 24, + 69, 89, 90, 91, 92, - 54, + 69, 37, - 24, - 208, - 45, - 214, + 54, + 31, + 42, + 44, 49, + 4, + 217, + 46, + 14, + 15, 17, - 17, - 42, - 36, - 147, - 38, - 39, + 149, 0, - 24, - 69, + 47, + 48, 102, 103, - 228, - 14, - 15, - 58, + 24, + 17, + 56, 58, + 232, + 56, 73, 74, - 56, - 65, - 3, + 58, + 180, + 47, + 48, + 15, + 125, 38, 69, - 124, 69, - 15, - 71, - 72, - 73, - 74, + 3, + 65, 81, + 45, 69, - 9, 84, 71, 72, 73, 74, - 69, - 45, - 47, - 48, - 135, 71, 72, 73, 74, - 210, - 182, - 56, + 69, + 136, + 24, + 67, + 68, + 9, + 69, + 184, + 213, + 211, + 38, + 69, 67, 68, 69, 70, - 31, + 38, 72, 73, 24, 69, - 36, - 69, - 162, - 163, - 67, - 68, - 24, - 69, + 164, + 165, + 25, + 26, 118, - 47, - 48, - 69, + 36, + 31, 38, - 45, - 217, - 218, - 217, + 39, 69, 36, - 38, + 36, 38, 39, + 221, + 222, + 221, + 45, + 67, + 68, + 59, + 70, + 69, + 72, + 67, + 68, + 69, + 70, 69, + 72, + 73, + 195, + 196, + 197, 59, 60, 61, @@ -2310,82 +2338,69 @@ static const yytype_int16 yycheck[] = {4, 64, 65, 66, - 59, - 192, - 193, - 194, + 71, + 72, + 73, + 74, 71, 72, 73, 74, 25, 26, - 67, - 68, - 69, - 70, 49, - 72, - 73, - 67, - 68, - 50, - 70, - 69, - 72, - 214, - 207, - 30, + 217, + 210, 9, + 30, + 69, 32, 33, 34, 35, - 25, - 26, + 50, 25, 25, 69, 26, - 228, - 44, 69, - 69, - 24, - 225, + 232, 46, + 24, 69, 55, + 229, + 69, 17, 69, 31, 50, 69, - 242, 25, + 24, 36, - 237, + 247, 38, - 24, - 59, - 69, 26, - 59, + 242, 26, - 253, + 59, + 59, 25, + 69, 57, 26, + 258, 10, + 25, + 4, 26, + 36, 25, 69, - 36, - 4, - 213, + 216, 24, 6, - 11, 59, 60, 61, @@ -2398,18 +2413,18 @@ static const yytype_int16 yycheck[] = {4, 68, 69, 70, - 67, + 11, 72, 73, 7, 8, + 44, 24, - 54, 38, - 50, - 12, - 47, 25, + 50, + 67, + 54, 16, 17, 18, @@ -2418,35 +2433,35 @@ static const yytype_int16 yycheck[] = {4, 21, 22, 23, + 12, + 47, 25, - 6, - 57, 27, 28, 29, + 6, + 57, 26, 17, - 203, - 236, - 174, - 204, - 218, - 164, - 59, - 160, + 206, + 241, + 176, + 219, + 222, + 166, 40, 41, - 229, - 182, - 250, - -1, - -1, - -1, + 207, + 59, + 255, -1, + 162, + 184, + 233, 49, + 258, -1, -1, - 253, 53}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -2574,6 +2589,7 @@ static const yytype_uint8 yystos[] = {0, 118, 119, 118, + 24, 44, 46, 121, @@ -2598,6 +2614,7 @@ static const yytype_uint8 yystos[] = {0, 56, 114, 121, + 91, 24, 101, 9, @@ -2636,6 +2653,7 @@ static const yytype_uint8 yystos[] = {0, 26, 10, 127, + 25, 102, 103, 26, @@ -2667,6 +2685,7 @@ static const yytype_uint8 yystos[] = {0, 6, 11, 128, + 44, 25, 26, 24, @@ -2685,6 +2704,7 @@ static const yytype_uint8 yystos[] = {0, 122, 12, 124, + 101, 103, 102, 25, @@ -2772,6 +2792,7 @@ static const yytype_uint8 yyr1[] = {0, 99, 99, 100, + 100, 101, 101, 102, @@ -2920,6 +2941,7 @@ static const yytype_int8 yyr2[] = {0, 1, 1, 5, + 8, 3, 5, 1, @@ -3790,7 +3812,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1872 "yacc_sql.cpp" +#line 1875 "yacc_sql.cpp" break; case 25: /* exit_stmt: EXIT */ @@ -3799,7 +3821,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1881 "yacc_sql.cpp" +#line 1884 "yacc_sql.cpp" break; case 26: /* help_stmt: HELP */ @@ -3807,7 +3829,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1889 "yacc_sql.cpp" +#line 1892 "yacc_sql.cpp" break; case 27: /* sync_stmt: SYNC */ @@ -3815,7 +3837,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1897 "yacc_sql.cpp" +#line 1900 "yacc_sql.cpp" break; case 28: /* begin_stmt: TRX_BEGIN */ @@ -3823,7 +3845,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1905 "yacc_sql.cpp" +#line 1908 "yacc_sql.cpp" break; case 29: /* commit_stmt: TRX_COMMIT */ @@ -3831,7 +3853,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1913 "yacc_sql.cpp" +#line 1916 "yacc_sql.cpp" break; case 30: /* rollback_stmt: TRX_ROLLBACK */ @@ -3839,7 +3861,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1921 "yacc_sql.cpp" +#line 1924 "yacc_sql.cpp" break; case 31: /* drop_table_stmt: DROP TABLE ID */ @@ -3849,7 +3871,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1931 "yacc_sql.cpp" +#line 1934 "yacc_sql.cpp" break; case 32: /* show_tables_stmt: SHOW TABLES */ @@ -3857,7 +3879,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1939 "yacc_sql.cpp" +#line 1942 "yacc_sql.cpp" break; case 33: /* desc_table_stmt: DESC ID */ @@ -3867,7 +3889,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1949 "yacc_sql.cpp" +#line 1952 "yacc_sql.cpp" break; case 34: /* show_index_stmt: SHOW INDEX FROM relation */ @@ -3878,7 +3900,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1960 "yacc_sql.cpp" +#line 1963 "yacc_sql.cpp" break; case 35: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ @@ -3894,7 +3916,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1976 "yacc_sql.cpp" +#line 1979 "yacc_sql.cpp" break; case 36: /* opt_unique: UNIQUE */ @@ -3902,7 +3924,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.unique) = true; } -#line 1982 "yacc_sql.cpp" +#line 1985 "yacc_sql.cpp" break; case 37: /* opt_unique: %empty */ @@ -3910,7 +3932,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.unique) = false; } -#line 1988 "yacc_sql.cpp" +#line 1991 "yacc_sql.cpp" break; case 38: /* attr_list: ID */ @@ -3920,7 +3942,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1998 "yacc_sql.cpp" +#line 2001 "yacc_sql.cpp" break; case 39: /* attr_list: ID COMMA attr_list */ @@ -3931,7 +3953,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2008 "yacc_sql.cpp" +#line 2011 "yacc_sql.cpp" break; case 40: /* drop_index_stmt: DROP INDEX ID ON ID */ @@ -3943,7 +3965,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2020 "yacc_sql.cpp" +#line 2023 "yacc_sql.cpp" break; case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ @@ -3952,7 +3974,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node) = create_table_sql_node( (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2028 "yacc_sql.cpp" +#line 2031 "yacc_sql.cpp" break; case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ @@ -3961,7 +3983,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node) = create_table_sql_node( (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2036 "yacc_sql.cpp" +#line 2039 "yacc_sql.cpp" break; case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ @@ -3970,7 +3992,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node) = create_table_sql_node( (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2044 "yacc_sql.cpp" +#line 2047 "yacc_sql.cpp" break; case 44: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ @@ -3979,7 +4001,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2052 "yacc_sql.cpp" +#line 2055 "yacc_sql.cpp" break; case 45: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ @@ -3988,7 +4010,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2060 "yacc_sql.cpp" +#line 2063 "yacc_sql.cpp" break; case 46: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ @@ -4000,7 +4022,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } -#line 2072 "yacc_sql.cpp" +#line 2075 "yacc_sql.cpp" break; case 47: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ @@ -4013,7 +4035,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-5].string)); } -#line 2085 "yacc_sql.cpp" +#line 2088 "yacc_sql.cpp" break; case 48: /* drop_view_stmt: DROP VIEW ID */ @@ -4023,7 +4045,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2095 "yacc_sql.cpp" +#line 2098 "yacc_sql.cpp" break; case 49: /* attr_def_list: %empty */ @@ -4031,7 +4053,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.attr_infos) = nullptr; } -#line 2103 "yacc_sql.cpp" +#line 2106 "yacc_sql.cpp" break; case 50: /* attr_def_list: COMMA attr_def attr_def_list */ @@ -4045,7 +4067,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2117 "yacc_sql.cpp" +#line 2120 "yacc_sql.cpp" break; case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ @@ -4061,7 +4083,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 2133 "yacc_sql.cpp" +#line 2136 "yacc_sql.cpp" break; case 52: /* attr_def: ID type nullable_constraint */ @@ -4089,7 +4111,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2161 "yacc_sql.cpp" +#line 2164 "yacc_sql.cpp" break; case 53: /* nullable_constraint: NOT NULL_T */ @@ -4097,7 +4119,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2169 "yacc_sql.cpp" +#line 2172 "yacc_sql.cpp" break; case 54: /* nullable_constraint: NULLABLE */ @@ -4105,7 +4127,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2177 "yacc_sql.cpp" +#line 2180 "yacc_sql.cpp" break; case 55: /* nullable_constraint: NULL_T */ @@ -4113,7 +4135,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2185 "yacc_sql.cpp" +#line 2188 "yacc_sql.cpp" break; case 56: /* nullable_constraint: %empty */ @@ -4121,7 +4143,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2193 "yacc_sql.cpp" +#line 2196 "yacc_sql.cpp" break; case 57: /* type: INT_T */ @@ -4129,7 +4151,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.number) = static_cast(AttrType::INTS); } -#line 2199 "yacc_sql.cpp" +#line 2202 "yacc_sql.cpp" break; case 58: /* type: STRING_T */ @@ -4137,7 +4159,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2205 "yacc_sql.cpp" +#line 2208 "yacc_sql.cpp" break; case 59: /* type: FLOAT_T */ @@ -4145,7 +4167,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2211 "yacc_sql.cpp" +#line 2214 "yacc_sql.cpp" break; case 60: /* type: DATE_T */ @@ -4153,7 +4175,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.number) = static_cast(AttrType::DATES); } -#line 2217 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; case 61: /* type: TEXT_T */ @@ -4161,7 +4183,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2223 "yacc_sql.cpp" +#line 2226 "yacc_sql.cpp" break; case 62: /* insert_stmt: INSERT INTO ID VALUES values_list */ @@ -4175,128 +4197,143 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2237 "yacc_sql.cpp" +#line 2240 "yacc_sql.cpp" + break; + + case 63: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ +#line 553 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); + (yyval.sql_node)->insertion.attr_names = std::move(*(yyvsp[-3].index_attr_list)); + if ((yyvsp[0].values_list) != nullptr) { + (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); + delete (yyvsp[0].values_list); + } + free((yyvsp[-5].string)); + } +#line 2255 "yacc_sql.cpp" break; - case 63: /* values_list: LBRACE value_list RBRACE */ -#line 556 "yacc_sql.y" + case 64: /* values_list: LBRACE value_list RBRACE */ +#line 567 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2247 "yacc_sql.cpp" +#line 2265 "yacc_sql.cpp" break; - case 64: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 562 "yacc_sql.y" + case 65: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 573 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2256 "yacc_sql.cpp" +#line 2274 "yacc_sql.cpp" break; - case 65: /* value_list: value */ -#line 569 "yacc_sql.y" + case 66: /* value_list: value */ +#line 580 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2266 "yacc_sql.cpp" +#line 2284 "yacc_sql.cpp" break; - case 66: /* value_list: value_list COMMA value */ -#line 575 "yacc_sql.y" + case 67: /* value_list: value_list COMMA value */ +#line 586 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2275 "yacc_sql.cpp" +#line 2293 "yacc_sql.cpp" break; - case 67: /* value: nonnegative_value */ -#line 582 "yacc_sql.y" + case 68: /* value: nonnegative_value */ +#line 593 "yacc_sql.y" { (yyval.value) = (yyvsp[0].value); } -#line 2283 "yacc_sql.cpp" +#line 2301 "yacc_sql.cpp" break; - case 68: /* value: '-' NUMBER */ -#line 585 "yacc_sql.y" + case 69: /* value: '-' NUMBER */ +#line 596 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2292 "yacc_sql.cpp" +#line 2310 "yacc_sql.cpp" break; - case 69: /* value: '-' FLOAT */ -#line 589 "yacc_sql.y" + case 70: /* value: '-' FLOAT */ +#line 600 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2301 "yacc_sql.cpp" +#line 2319 "yacc_sql.cpp" break; - case 70: /* nonnegative_value: NUMBER */ -#line 596 "yacc_sql.y" + case 71: /* nonnegative_value: NUMBER */ +#line 607 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2310 "yacc_sql.cpp" +#line 2328 "yacc_sql.cpp" break; - case 71: /* nonnegative_value: FLOAT */ -#line 600 "yacc_sql.y" + case 72: /* nonnegative_value: FLOAT */ +#line 611 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2319 "yacc_sql.cpp" +#line 2337 "yacc_sql.cpp" break; - case 72: /* nonnegative_value: SSS */ -#line 604 "yacc_sql.y" + case 73: /* nonnegative_value: SSS */ +#line 615 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2330 "yacc_sql.cpp" +#line 2348 "yacc_sql.cpp" break; - case 73: /* nonnegative_value: NULL_T */ -#line 610 "yacc_sql.y" + case 74: /* nonnegative_value: NULL_T */ +#line 621 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2338 "yacc_sql.cpp" +#line 2356 "yacc_sql.cpp" break; - case 74: /* storage_format: %empty */ -#line 617 "yacc_sql.y" + case 75: /* storage_format: %empty */ +#line 628 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2346 "yacc_sql.cpp" +#line 2364 "yacc_sql.cpp" break; - case 75: /* storage_format: STORAGE FORMAT EQ ID */ -#line 621 "yacc_sql.y" + case 76: /* storage_format: STORAGE FORMAT EQ ID */ +#line 632 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2354 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; - case 76: /* delete_stmt: DELETE FROM ID where */ -#line 628 "yacc_sql.y" + case 77: /* delete_stmt: DELETE FROM ID where */ +#line 639 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -4305,11 +4342,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2367 "yacc_sql.cpp" +#line 2385 "yacc_sql.cpp" break; - case 77: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 640 "yacc_sql.y" + case 78: /* update_stmt: UPDATE ID SET set_clauses where */ +#line 651 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -4320,39 +4357,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2382 "yacc_sql.cpp" +#line 2400 "yacc_sql.cpp" break; - case 78: /* set_clauses: setClause */ -#line 654 "yacc_sql.y" + case 79: /* set_clauses: setClause */ +#line 665 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2391 "yacc_sql.cpp" +#line 2409 "yacc_sql.cpp" break; - case 79: /* set_clauses: set_clauses COMMA setClause */ -#line 659 "yacc_sql.y" + case 80: /* set_clauses: set_clauses COMMA setClause */ +#line 670 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2399 "yacc_sql.cpp" +#line 2417 "yacc_sql.cpp" break; - case 80: /* setClause: ID EQ expression */ -#line 666 "yacc_sql.y" + case 81: /* setClause: ID EQ expression */ +#line 677 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2410 "yacc_sql.cpp" +#line 2428 "yacc_sql.cpp" break; - case 81: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ -#line 676 "yacc_sql.y" + case 82: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ +#line 687 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-6].expression_list) != nullptr) { @@ -4385,11 +4422,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].orderby_list); } } -#line 2447 "yacc_sql.cpp" +#line 2465 "yacc_sql.cpp" break; - case 82: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 709 "yacc_sql.y" + case 83: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ +#line 720 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4421,39 +4458,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2481 "yacc_sql.cpp" +#line 2499 "yacc_sql.cpp" break; - case 83: /* calc_stmt: CALC expression_list */ -#line 742 "yacc_sql.y" + case 84: /* calc_stmt: CALC expression_list */ +#line 753 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2491 "yacc_sql.cpp" +#line 2509 "yacc_sql.cpp" break; - case 84: /* calc_stmt: SELECT expression_list */ -#line 748 "yacc_sql.y" + case 85: /* calc_stmt: SELECT expression_list */ +#line 759 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2501 "yacc_sql.cpp" +#line 2519 "yacc_sql.cpp" break; - case 85: /* expression_list: %empty */ -#line 756 "yacc_sql.y" + case 86: /* expression_list: %empty */ +#line 767 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2509 "yacc_sql.cpp" +#line 2527 "yacc_sql.cpp" break; - case 86: /* expression_list: expression alias */ -#line 760 "yacc_sql.y" + case 87: /* expression_list: expression alias */ +#line 771 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4462,11 +4499,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2522 "yacc_sql.cpp" +#line 2540 "yacc_sql.cpp" break; - case 87: /* expression_list: expression alias COMMA expression_list */ -#line 769 "yacc_sql.y" + case 88: /* expression_list: expression alias COMMA expression_list */ +#line 780 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4479,47 +4516,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2539 "yacc_sql.cpp" +#line 2557 "yacc_sql.cpp" break; - case 88: /* expression: expression '+' expression */ -#line 784 "yacc_sql.y" + case 89: /* expression: expression '+' expression */ +#line 795 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2547 "yacc_sql.cpp" +#line 2565 "yacc_sql.cpp" break; - case 89: /* expression: expression '-' expression */ -#line 787 "yacc_sql.y" + case 90: /* expression: expression '-' expression */ +#line 798 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2555 "yacc_sql.cpp" +#line 2573 "yacc_sql.cpp" break; - case 90: /* expression: expression '*' expression */ -#line 790 "yacc_sql.y" + case 91: /* expression: expression '*' expression */ +#line 801 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2563 "yacc_sql.cpp" +#line 2581 "yacc_sql.cpp" break; - case 91: /* expression: expression '/' expression */ -#line 793 "yacc_sql.y" + case 92: /* expression: expression '/' expression */ +#line 804 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2571 "yacc_sql.cpp" +#line 2589 "yacc_sql.cpp" break; - case 92: /* expression: LBRACE expression_list RBRACE */ -#line 796 "yacc_sql.y" + case 93: /* expression: LBRACE expression_list RBRACE */ +#line 807 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -4528,123 +4565,123 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2584 "yacc_sql.cpp" +#line 2602 "yacc_sql.cpp" break; - case 93: /* expression: '-' expression */ -#line 804 "yacc_sql.y" + case 94: /* expression: '-' expression */ +#line 815 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2592 "yacc_sql.cpp" +#line 2610 "yacc_sql.cpp" break; - case 94: /* expression: nonnegative_value */ -#line 807 "yacc_sql.y" + case 95: /* expression: nonnegative_value */ +#line 818 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2602 "yacc_sql.cpp" +#line 2620 "yacc_sql.cpp" break; - case 95: /* expression: rel_attr */ -#line 812 "yacc_sql.y" + case 96: /* expression: rel_attr */ +#line 823 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2613 "yacc_sql.cpp" +#line 2631 "yacc_sql.cpp" break; - case 96: /* expression: '*' */ -#line 818 "yacc_sql.y" + case 97: /* expression: '*' */ +#line 829 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2621 "yacc_sql.cpp" +#line 2639 "yacc_sql.cpp" break; - case 97: /* expression: ID DOT '*' */ -#line 821 "yacc_sql.y" + case 98: /* expression: ID DOT '*' */ +#line 832 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2629 "yacc_sql.cpp" +#line 2647 "yacc_sql.cpp" break; - case 98: /* expression: aggr_func_expr */ -#line 824 "yacc_sql.y" + case 99: /* expression: aggr_func_expr */ +#line 835 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2637 "yacc_sql.cpp" +#line 2655 "yacc_sql.cpp" break; - case 99: /* expression: sub_query_expr */ -#line 827 "yacc_sql.y" + case 100: /* expression: sub_query_expr */ +#line 838 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2645 "yacc_sql.cpp" +#line 2663 "yacc_sql.cpp" break; - case 100: /* alias: %empty */ -#line 834 "yacc_sql.y" + case 101: /* alias: %empty */ +#line 845 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2653 "yacc_sql.cpp" +#line 2671 "yacc_sql.cpp" break; - case 101: /* alias: ID */ -#line 837 "yacc_sql.y" + case 102: /* alias: ID */ +#line 848 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2661 "yacc_sql.cpp" +#line 2679 "yacc_sql.cpp" break; - case 102: /* alias: AS ID */ -#line 840 "yacc_sql.y" + case 103: /* alias: AS ID */ +#line 851 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2669 "yacc_sql.cpp" +#line 2687 "yacc_sql.cpp" break; - case 103: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 846 "yacc_sql.y" + case 104: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 857 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2677 "yacc_sql.cpp" +#line 2695 "yacc_sql.cpp" break; - case 104: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 853 "yacc_sql.y" + case 105: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 864 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2685 "yacc_sql.cpp" +#line 2703 "yacc_sql.cpp" break; - case 105: /* rel_attr: ID */ -#line 859 "yacc_sql.y" + case 106: /* rel_attr: ID */ +#line 870 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2695 "yacc_sql.cpp" +#line 2713 "yacc_sql.cpp" break; - case 106: /* rel_attr: ID DOT ID */ -#line 864 "yacc_sql.y" + case 107: /* rel_attr: ID DOT ID */ +#line 875 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -4652,19 +4689,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2707 "yacc_sql.cpp" +#line 2725 "yacc_sql.cpp" break; - case 107: /* relation: ID */ -#line 874 "yacc_sql.y" + case 108: /* relation: ID */ +#line 885 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2715 "yacc_sql.cpp" +#line 2733 "yacc_sql.cpp" break; - case 108: /* rel_list: relation alias */ -#line 880 "yacc_sql.y" + case 109: /* rel_list: relation alias */ +#line 891 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if (nullptr != (yyvsp[0].string)) { @@ -4675,11 +4712,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2730 "yacc_sql.cpp" +#line 2748 "yacc_sql.cpp" break; - case 109: /* rel_list: relation alias COMMA rel_list */ -#line 890 "yacc_sql.y" + case 110: /* rel_list: relation alias COMMA rel_list */ +#line 901 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -4695,22 +4732,22 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-3].string)); } -#line 2749 "yacc_sql.cpp" +#line 2767 "yacc_sql.cpp" break; - case 110: /* join_clauses: relation ON condition */ -#line 908 "yacc_sql.y" + case 111: /* join_clauses: relation ON condition */ +#line 919 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2760 "yacc_sql.cpp" +#line 2778 "yacc_sql.cpp" break; - case 111: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 915 "yacc_sql.y" + case 112: /* join_clauses: relation ON condition INNER JOIN join_clauses */ +#line 926 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -4719,282 +4756,282 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2772 "yacc_sql.cpp" +#line 2790 "yacc_sql.cpp" break; - case 112: /* where: %empty */ -#line 926 "yacc_sql.y" + case 113: /* where: %empty */ +#line 937 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2780 "yacc_sql.cpp" +#line 2798 "yacc_sql.cpp" break; - case 113: /* where: WHERE condition */ -#line 929 "yacc_sql.y" + case 114: /* where: WHERE condition */ +#line 940 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2788 "yacc_sql.cpp" +#line 2806 "yacc_sql.cpp" break; - case 114: /* condition: expression comp_op expression */ -#line 936 "yacc_sql.y" + case 115: /* condition: expression comp_op expression */ +#line 947 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2796 "yacc_sql.cpp" +#line 2814 "yacc_sql.cpp" break; - case 115: /* condition: comp_op expression */ -#line 940 "yacc_sql.y" + case 116: /* condition: comp_op expression */ +#line 951 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); } -#line 2807 "yacc_sql.cpp" +#line 2825 "yacc_sql.cpp" break; - case 116: /* condition: condition AND condition */ -#line 947 "yacc_sql.y" + case 117: /* condition: condition AND condition */ +#line 958 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2815 "yacc_sql.cpp" +#line 2833 "yacc_sql.cpp" break; - case 117: /* condition: condition OR condition */ -#line 951 "yacc_sql.y" + case 118: /* condition: condition OR condition */ +#line 962 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2823 "yacc_sql.cpp" +#line 2841 "yacc_sql.cpp" break; - case 118: /* comp_op: EQ */ -#line 957 "yacc_sql.y" + case 119: /* comp_op: EQ */ +#line 968 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2829 "yacc_sql.cpp" +#line 2847 "yacc_sql.cpp" break; - case 119: /* comp_op: LT */ -#line 958 "yacc_sql.y" + case 120: /* comp_op: LT */ +#line 969 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2835 "yacc_sql.cpp" +#line 2853 "yacc_sql.cpp" break; - case 120: /* comp_op: GT */ -#line 959 "yacc_sql.y" + case 121: /* comp_op: GT */ +#line 970 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2841 "yacc_sql.cpp" +#line 2859 "yacc_sql.cpp" break; - case 121: /* comp_op: LE */ -#line 960 "yacc_sql.y" + case 122: /* comp_op: LE */ +#line 971 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2847 "yacc_sql.cpp" +#line 2865 "yacc_sql.cpp" break; - case 122: /* comp_op: GE */ -#line 961 "yacc_sql.y" + case 123: /* comp_op: GE */ +#line 972 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2853 "yacc_sql.cpp" +#line 2871 "yacc_sql.cpp" break; - case 123: /* comp_op: NE */ -#line 962 "yacc_sql.y" + case 124: /* comp_op: NE */ +#line 973 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2859 "yacc_sql.cpp" +#line 2877 "yacc_sql.cpp" break; - case 124: /* comp_op: IS */ -#line 963 "yacc_sql.y" + case 125: /* comp_op: IS */ +#line 974 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2865 "yacc_sql.cpp" +#line 2883 "yacc_sql.cpp" break; - case 125: /* comp_op: IS NOT */ -#line 964 "yacc_sql.y" + case 126: /* comp_op: IS NOT */ +#line 975 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2871 "yacc_sql.cpp" +#line 2889 "yacc_sql.cpp" break; - case 126: /* comp_op: LIKE */ -#line 965 "yacc_sql.y" + case 127: /* comp_op: LIKE */ +#line 976 "yacc_sql.y" { (yyval.comp) = LIKE_OP; } -#line 2877 "yacc_sql.cpp" +#line 2895 "yacc_sql.cpp" break; - case 127: /* comp_op: NOT LIKE */ -#line 966 "yacc_sql.y" + case 128: /* comp_op: NOT LIKE */ +#line 977 "yacc_sql.y" { (yyval.comp) = NOT_LIKE_OP; } -#line 2883 "yacc_sql.cpp" +#line 2901 "yacc_sql.cpp" break; - case 128: /* comp_op: IN */ -#line 967 "yacc_sql.y" + case 129: /* comp_op: IN */ +#line 978 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2889 "yacc_sql.cpp" +#line 2907 "yacc_sql.cpp" break; - case 129: /* comp_op: NOT IN */ -#line 968 "yacc_sql.y" + case 130: /* comp_op: NOT IN */ +#line 979 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2895 "yacc_sql.cpp" +#line 2913 "yacc_sql.cpp" break; - case 130: /* comp_op: EXISTS */ -#line 969 "yacc_sql.y" + case 131: /* comp_op: EXISTS */ +#line 980 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2901 "yacc_sql.cpp" +#line 2919 "yacc_sql.cpp" break; - case 131: /* comp_op: NOT EXISTS */ -#line 970 "yacc_sql.y" + case 132: /* comp_op: NOT EXISTS */ +#line 981 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2907 "yacc_sql.cpp" +#line 2925 "yacc_sql.cpp" break; - case 132: /* opt_order_by: %empty */ -#line 975 "yacc_sql.y" + case 133: /* opt_order_by: %empty */ +#line 986 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2915 "yacc_sql.cpp" +#line 2933 "yacc_sql.cpp" break; - case 133: /* opt_order_by: ORDER BY sort_list */ -#line 979 "yacc_sql.y" + case 134: /* opt_order_by: ORDER BY sort_list */ +#line 990 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } -#line 2924 "yacc_sql.cpp" +#line 2942 "yacc_sql.cpp" break; - case 134: /* sort_list: sort_unit */ -#line 987 "yacc_sql.y" + case 135: /* sort_list: sort_unit */ +#line 998 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2933 "yacc_sql.cpp" +#line 2951 "yacc_sql.cpp" break; - case 135: /* sort_list: sort_unit COMMA sort_list */ -#line 992 "yacc_sql.y" + case 136: /* sort_list: sort_unit COMMA sort_list */ +#line 1003 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2942 "yacc_sql.cpp" +#line 2960 "yacc_sql.cpp" break; - case 136: /* sort_unit: expression */ -#line 1000 "yacc_sql.y" + case 137: /* sort_unit: expression */ +#line 1011 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2952 "yacc_sql.cpp" +#line 2970 "yacc_sql.cpp" break; - case 137: /* sort_unit: expression DESC */ -#line 1006 "yacc_sql.y" + case 138: /* sort_unit: expression DESC */ +#line 1017 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2962 "yacc_sql.cpp" +#line 2980 "yacc_sql.cpp" break; - case 138: /* sort_unit: expression ASC */ -#line 1012 "yacc_sql.y" + case 139: /* sort_unit: expression ASC */ +#line 1023 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2972 "yacc_sql.cpp" +#line 2990 "yacc_sql.cpp" break; - case 139: /* group_by: %empty */ -#line 1021 "yacc_sql.y" + case 140: /* group_by: %empty */ +#line 1032 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2980 "yacc_sql.cpp" +#line 2998 "yacc_sql.cpp" break; - case 140: /* group_by: GROUP BY expression_list */ -#line 1025 "yacc_sql.y" + case 141: /* group_by: GROUP BY expression_list */ +#line 1036 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2988 "yacc_sql.cpp" +#line 3006 "yacc_sql.cpp" break; - case 141: /* opt_having: %empty */ -#line 1032 "yacc_sql.y" + case 142: /* opt_having: %empty */ +#line 1043 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2996 "yacc_sql.cpp" +#line 3014 "yacc_sql.cpp" break; - case 142: /* opt_having: HAVING condition */ -#line 1036 "yacc_sql.y" + case 143: /* opt_having: HAVING condition */ +#line 1047 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3004 "yacc_sql.cpp" +#line 3022 "yacc_sql.cpp" break; - case 143: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1056 "yacc_sql.y" + case 144: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1067 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3013 "yacc_sql.cpp" +#line 3031 "yacc_sql.cpp" break; - case 144: /* set_variable_stmt: SET ID EQ value */ -#line 1064 "yacc_sql.y" + case 145: /* set_variable_stmt: SET ID EQ value */ +#line 1075 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -5002,10 +5039,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3025 "yacc_sql.cpp" +#line 3043 "yacc_sql.cpp" break; -#line 3029 "yacc_sql.cpp" +#line 3047 "yacc_sql.cpp" default: break; } @@ -5204,7 +5241,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) return yyresult; } -#line 1076 "yacc_sql.y" +#line 1087 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 224de1da..cbf1f64d 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -549,6 +549,17 @@ insert_stmt: /*insert 语句的语法解析树*/ } free($3); } + | INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list + { + $$ = new ParsedSqlNode(SCF_INSERT); + $$->insertion.relation_name = $3; + $$->insertion.attr_names = std::move(*$5); + if ($8 != nullptr) { + $$->insertion.values_list.swap(*$8); + delete $8; + } + free($3); + } ; values_list: diff --git a/src/observer/sql/stmt/insert_stmt.cpp b/src/observer/sql/stmt/insert_stmt.cpp index 69d23b13..2e0f8933 100644 --- a/src/observer/sql/stmt/insert_stmt.cpp +++ b/src/observer/sql/stmt/insert_stmt.cpp @@ -12,14 +12,16 @@ See the Mulan PSL v2 for more details. */ // Created by Wangyunlai on 2022/5/22. // -#include "sql/stmt/insert_stmt.h" +#include + #include "common/log/log.h" #include "storage/db/db.h" #include "storage/table/table.h" #include "storage/table/view.h" +#include "sql/stmt/insert_stmt.h" -InsertStmt::InsertStmt(BaseTable *table, const std::vector> &values_list) - : table_(table), values_list_(values_list) +InsertStmt::InsertStmt(BaseTable *table, std::vector> values_list) + : table_(table), values_list_(std::move(values_list)) {} RC InsertStmt::create(Db *db, const InsertSqlNode &inserts, Stmt *&stmt) @@ -61,18 +63,59 @@ RC InsertStmt::create(Db *db, const InsertSqlNode &inserts, Stmt *&stmt) } } + std::vector> values_list = inserts.values_list; + const int field_num = table_meta.field_num() - table_meta.sys_field_num(); + // check the fields number - const int field_num = table_meta.field_num() - table_meta.sys_field_num(); for (auto &value_list : inserts.values_list) { const int value_num = static_cast(value_list.size()); - if (field_num != value_num) { - LOG_WARN("schema mismatch. value num=%d, field num in schema=%d", value_num, field_num); - return RC::SCHEMA_FIELD_MISSING; + if (inserts.attr_names.empty()) { + if (field_num != value_num) { + LOG_WARN("schema mismatch. value num=%d, field num in schema=%d", value_num, field_num); + return RC::SCHEMA_FIELD_MISSING; + } + } else if (field_num < value_num || inserts.attr_names.size() != value_num) { + LOG_WARN("schema mismatch. attr num=%d, value num=%d, field num in schema=%d", inserts.attr_names.size(), value_num, field_num); + return RC::INVALID_ARGUMENT; + } + } + + if (!inserts.attr_names.empty()) { + // 在物理算子执行阶段检查值的可为空性 + // 预处理索引 + std::unordered_set field_ids; + std::vector index(inserts.attr_names.size(), -1); + for (int i = 0; i < inserts.attr_names.size(); ++i) { + auto &attr_name = inserts.attr_names[i]; + auto field_meta = table_meta.field(attr_name.c_str()); + if (field_meta != nullptr) { + // 出现两次同名列 + if (field_ids.count(field_meta->field_id())) { + LOG_ERROR("Column '%s' specified twice", attr_name.c_str()); + return RC::INVALID_ARGUMENT; + } + index[i] = field_meta->field_id(); + field_ids.emplace(index[i]); + } else { + LOG_WARN("Field does not exist. db=%s, table_name=%s, field_name=%s", + db->name(), table_name, attr_name.c_str()); + return RC::SCHEMA_FIELD_NOT_EXIST; + } + } + + for (auto &value_list : values_list) { + std::vector values(field_num); + for (auto &value : values) { + value.set_null(); + } + for (int k = 0; k < value_list.size(); ++k) { + values[index[k]] = value_list[k]; + } + value_list = std::move(values); } } // everything alright - // values_list 存在 event,可以直接引用过来 - stmt = new InsertStmt(table, inserts.values_list); + stmt = new InsertStmt(table, std::move(values_list)); return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/insert_stmt.h b/src/observer/sql/stmt/insert_stmt.h index 89103daa..29b87e65 100644 --- a/src/observer/sql/stmt/insert_stmt.h +++ b/src/observer/sql/stmt/insert_stmt.h @@ -28,7 +28,7 @@ class InsertStmt : public Stmt { public: InsertStmt() = delete; - InsertStmt(BaseTable *table, const std::vector> &); + InsertStmt(BaseTable *table, std::vector> values_list); StmtType type() const override { return StmtType::INSERT; } @@ -38,6 +38,6 @@ class InsertStmt : public Stmt const std::vector> &values_list() const { return values_list_; }; private: - BaseTable *table_ = nullptr; - const std::vector> &values_list_; + BaseTable *table_ = nullptr; + std::vector> values_list_; }; From d78dec25f084dbcc3ffe6fefbabb49aeba8e6e86 Mon Sep 17 00:00:00 2001 From: root <503194395@qq.com> Date: Tue, 15 Oct 2024 06:04:03 +0000 Subject: [PATCH 238/308] =?UTF-8?q?vector=E5=AD=98=E5=9C=A8=E5=AF=B9null?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 1 + src/observer/common/type/char_type.cpp | 11 +++- src/observer/common/type/data_type.cpp | 2 + src/observer/common/type/vector_type.cpp | 30 +++++++++- src/observer/common/utils.cpp | 74 +++++++++++++++--------- src/observer/common/utils.h | 3 + src/observer/common/value.cpp | 13 +++++ src/observer/common/value.h | 1 + 8 files changed, 107 insertions(+), 28 deletions(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 1b83efd5..8f775456 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -63,6 +63,7 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(IOERR_SEEK) \ DEFINE_RC(IOERR_TOO_LONG) \ DEFINE_RC(IOERR_SYNC) \ + DEFINE_RC(VECTOR_PARSE_ERROR) \ DEFINE_RC(LOCKED_UNLOCK) \ DEFINE_RC(LOCKED_NEED_WAIT) \ DEFINE_RC(LOCKED_CONCURRENCY_CONFLICT) \ diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index cc96f7bb..f1ddc369 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -79,7 +79,16 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ result.set_float(float_val); } break; case AttrType::VECTOR: { - std::vector vectorData; + float *array = nullptr; + size_t length = 0; + + // 解析字符串为 float 数组 + RC rc = parse_vector_from_string(val.value_.pointer_value_, array, length); + if (rc != RC::SUCCESS) { + return rc; + } + + result.set_vector(array,length); }break; default: return RC::UNIMPLEMENTED; } diff --git a/src/observer/common/type/data_type.cpp b/src/observer/common/type/data_type.cpp index 17fe527d..5e832793 100644 --- a/src/observer/common/type/data_type.cpp +++ b/src/observer/common/type/data_type.cpp @@ -14,6 +14,7 @@ See the Mulan PSL v2 for more details. */ #include "common/type/data_type.h" #include "common/type/date_type.h" #include "common/type/null_type.h" +#include "common/type/vector_type.h" array, static_cast(AttrType::MAXTYPE)> DataType::type_instances_ = { make_unique(AttrType::UNDEFINED), @@ -24,4 +25,5 @@ array, static_cast(AttrType::MAXTYPE)> DataType::type_ make_unique(), make_unique(), make_unique(), + make_unique(), }; diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index 1af658ea..3fae3a3f 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -3,6 +3,8 @@ // #include "common/type/vector_type.h" + +#include int VectorType::compare(const Value &left, const Value &right) const { return DataType::compare(left, right); } RC VectorType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const { @@ -13,4 +15,30 @@ RC VectorType::set_value_from_str(Value &val, const string &data) const return DataType::set_value_from_str(val, data); } int VectorType::cast_cost(AttrType type) { return DataType::cast_cost(type); } -RC VectorType::to_string(const Value &val, string &result) const { return DataType::to_string(val, result); } \ No newline at end of file +RC VectorType::to_string(const Value &val, std::string &result) const +{ + // 获取 float 数组指针 + const auto *data = reinterpret_cast(val.data()); + + // 计算数组中元素的数量 + int count = val.length() / sizeof(float); + + // 使用字符串流来构建输出字符串 + std::ostringstream oss; + oss << "["; + + // 遍历数组元素并拼接成字符串 + for (int i = 0; i < count; ++i) { + if (i != 0) { + oss << ", "; // 在每个元素之间加逗号和空格 + } + oss << data[i]; // 将浮点数输出到字符串流 + } + + oss << "]"; // 关闭数组的方括号 + + // 将结果存储到 result 中 + result = oss.str(); + + return RC::SUCCESS; +} diff --git a/src/observer/common/utils.cpp b/src/observer/common/utils.cpp index f63d03cf..37573a9d 100644 --- a/src/observer/common/utils.cpp +++ b/src/observer/common/utils.cpp @@ -14,6 +14,8 @@ #include #include +#include +#include bool check_date(int y, int m, int d) { @@ -53,29 +55,49 @@ RC parse_float_prefix(const char *str, float &result) return RC::SUCCESS; } -// RC parse_vector_from_string(const char *str, std::vector &vectorData) { -// if (!str || *str != '[') { -// return RC::INVALID_ARGUMENT; -// } -// -// std::string s = str; -// // 去掉开头和结尾的方括号 -// if (s.back() != ']') { -// return RC::INVALID_ARGUMENT; -// } -// s = s.substr(1, s.size() - 2); -// -// std::stringstream ss(s); -// std::string token; -// float value; -// -// while (std::getline(ss, token, ',')) { -// std::stringstream valueStream(token); -// if (!(valueStream >> value)) { -// return RC::PARSE_ERROR; -// } -// vectorData.push_back(value); -// } -// -// return RC::SUCCESS; -// } \ No newline at end of file +RC parse_vector_from_string(const char *str, float *&array, size_t &length) +{ + if (!str || *str != '[') { + return RC::INVALID_ARGUMENT; + } + + std::string s = str; + if (s.back() != ']') { + return RC::INVALID_ARGUMENT; + } + + s = s.substr(1, s.size() - 2); // 去掉开头和结尾的方括号 + std::stringstream ss(s); + std::string token; + size_t count = 0; + + // 先统计有多少个浮点数 + while (std::getline(ss, token, ',')) { + count++; + } + + if (count == 0) { + return RC::INVALID_ARGUMENT; // 空数组 + } + + // 分配数组内存 + //f + array = new float[count]; + length = count * sizeof(float); + + // 重置流并解析浮点数 + ss.clear(); + ss.str(s); + size_t index = 0; + + while (std::getline(ss, token, ',')) { + std::stringstream valueStream(token); + if (!(valueStream >> array[index])) { + delete[] array; // 清理已分配内存 + return RC::VECTOR_PARSE_ERROR; + } + index++; + } + + return RC::SUCCESS; +} diff --git a/src/observer/common/utils.h b/src/observer/common/utils.h index 9578ef17..9157ae7a 100644 --- a/src/observer/common/utils.h +++ b/src/observer/common/utils.h @@ -13,9 +13,12 @@ #pragma once #include "rc.h" +#include bool check_date(int y, int m, int d); RC parse_date(const char *str, int &result); RC parse_float_prefix(const char *str, float &result); + +RC parse_vector_from_string(const char *str, float* &array, size_t &length); diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 73bf3261..0c419d29 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -151,6 +151,10 @@ void Value::set_data(char *data, int length) value_.int_value_ = *(int *)data; length_ = length; } break; + case AttrType::VECTOR: { + value_.pointer_value_ = data; + length_ = length; + } break; default: { LOG_WARN("unknown data type: %d", attr_type_); } break; @@ -230,6 +234,14 @@ void Value::set_text(const char *s, int len /*= 65535*/) value_.pointer_value_[len] = '\0'; } } +void Value::set_vector(float *&array, size_t &length) +{ + attr_type_ = AttrType::VECTOR; + length_ = length; + value_.pointer_value_ = reinterpret_cast(array); + + own_data_ = true; +} void Value::set_value(const Value &value) { @@ -271,6 +283,7 @@ void Value::set_string_from_other(const Value &other) const char *Value::data() const { switch (attr_type_) { + case AttrType::VECTOR: case AttrType::CHARS: case AttrType::TEXTS: { return value_.pointer_value_; diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 7856f6b0..db50ca47 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -139,6 +139,7 @@ class Value final void set_date(int val); void set_string(const char *s, int len = 0); void set_text(const char *s, int len = 65535); + void set_vector(float *&array, size_t &length); void set_string_from_other(const Value &other); private: From e7f1aa1434d5ebdc826bf0275279b6f98a60e2f3 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 15 Oct 2024 14:23:48 +0800 Subject: [PATCH 239/308] =?UTF-8?q?=E5=AE=8C=E6=88=90vector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/3rd/benchmark | 2 +- deps/3rd/jsoncpp | 2 +- deps/3rd/libevent | 2 +- src/observer/sql/parser/lex_sql.cpp | 35 ++++++++++++++-------------- src/observer/sql/parser/lex_sql.h | 11 +++++---- src/observer/storage/table/table.cpp | 5 ++++ test.sql | 9 +++++++ 7 files changed, 41 insertions(+), 25 deletions(-) create mode 100644 test.sql diff --git a/deps/3rd/benchmark b/deps/3rd/benchmark index 24e0bd82..761305ec 160000 --- a/deps/3rd/benchmark +++ b/deps/3rd/benchmark @@ -1 +1 @@ -Subproject commit 24e0bd827a8bec8121b128b0634cb34402fb3259 +Subproject commit 761305ec3b33abf30e08d50eb829e19a802581cc diff --git a/deps/3rd/jsoncpp b/deps/3rd/jsoncpp index 8190e061..bd25fc5e 160000 --- a/deps/3rd/jsoncpp +++ b/deps/3rd/jsoncpp @@ -1 +1 @@ -Subproject commit 8190e061bc2d95da37479a638aa2c9e483e58ec6 +Subproject commit bd25fc5ea0e14d19e1451632205c8b99ec0b1c09 diff --git a/deps/3rd/libevent b/deps/3rd/libevent index 5df3037d..f6e426c2 160000 --- a/deps/3rd/libevent +++ b/deps/3rd/libevent @@ -1 +1 @@ -Subproject commit 5df3037d10556bfcb675bc73e516978b75fc7bc7 +Subproject commit f6e426c299acd80e85fef24c426fea45d36ace8d diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 9264be7c..18fded69 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,4 +1,4 @@ -#line 2 "lex_sql.cpp" +#line 1 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -22,7 +22,7 @@ do { \ } \ while (0); -#line 26 "lex_sql.cpp" +#line 25 "lex_sql.cpp" #define YY_INT_ALIGNED short int @@ -93,6 +93,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -257,7 +258,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -334,7 +335,7 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -381,7 +382,7 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -762,8 +763,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -820,7 +821,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); @@ -899,7 +900,7 @@ static int input ( yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1653,7 +1654,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1667,7 +1668,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1725,7 +1726,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1832,7 +1833,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -2210,12 +2211,12 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); @@ -2259,7 +2260,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ @@ -2327,7 +2328,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index fafd461b..b49ae624 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,7 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 6 "lex_sql.h" +#line 5 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -26,7 +26,7 @@ do { \ } \ while (0); -#line 30 "lex_sql.h" +#line 29 "lex_sql.h" #define YY_INT_ALIGNED short int @@ -97,6 +97,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -210,7 +211,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -254,7 +255,7 @@ void yypop_buffer_state ( yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -310,7 +311,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 852aaed6..54cc88a2 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -362,6 +362,11 @@ RC Table::set_value_to_record(char *record_data, const Value &value, const Field copy_len = data_len + 1; } } + if (field->type() == AttrType::VECTOR) { + if (copy_len > data_len) { + copy_len = data_len; + } + } // text 类型的话最多存 65535 字节,超出则报错 memcpy(record_data + field->offset(), value.data(), copy_len); return RC::SUCCESS; diff --git a/test.sql b/test.sql new file mode 100644 index 00000000..5c311117 --- /dev/null +++ b/test.sql @@ -0,0 +1,9 @@ +create table a (v vector(3) nullable); + +insert into a values ('[1]'); +insert into a values ('[1, 2]'); +insert into a values ('[1, 2, 3]'); +insert into a values ('[1, 2, 3, 4]'); +insert into a values (null); + +select * from a; \ No newline at end of file From 50c7f2ca718432d3d5aa45944f9e0aa84119f075 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 15 Oct 2024 14:24:16 +0800 Subject: [PATCH 240/308] =?UTF-8?q?=E5=AE=8C=E6=88=90vector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.sql | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 test.sql diff --git a/test.sql b/test.sql deleted file mode 100644 index 5c311117..00000000 --- a/test.sql +++ /dev/null @@ -1,9 +0,0 @@ -create table a (v vector(3) nullable); - -insert into a values ('[1]'); -insert into a values ('[1, 2]'); -insert into a values ('[1, 2, 3]'); -insert into a values ('[1, 2, 3, 4]'); -insert into a values (null); - -select * from a; \ No newline at end of file From d6e18870c2e4474228ca5da7ed6883c8db9bcd5e Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 15 Oct 2024 14:52:15 +0800 Subject: [PATCH 241/308] =?UTF-8?q?=E7=BB=9F=E4=B8=80VECTOR=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.h | 2 +- src/observer/common/type/char_type.cpp | 2 +- src/observer/common/type/vector_type.cpp | 41 +- src/observer/common/type/vector_type.h | 2 +- src/observer/common/value.cpp | 6 +- src/observer/sql/parser/yacc_sql.cpp | 1273 +++++++++++----------- src/observer/sql/parser/yacc_sql.y | 16 +- src/observer/storage/table/table.cpp | 2 +- 8 files changed, 699 insertions(+), 645 deletions(-) diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index de26253f..d5429887 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -24,7 +24,7 @@ enum class AttrType DATES, ///< 日期类型(4字节) NULLS, ///< 空字段 TEXTS, ///< text 超长字段(4096字节) - VECTOR, ///< 向量 + VECTORS, ///< 向量 LIST, ///< 列表 MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index f1ddc369..5b7d1319 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -78,7 +78,7 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ } result.set_float(float_val); } break; - case AttrType::VECTOR: { + case AttrType::VECTORS: { float *array = nullptr; size_t length = 0; diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index 29783bb4..3fae3a3f 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -2,4 +2,43 @@ // Created by root on 24-10-14. // -#include "common/type/vector_type.h" \ No newline at end of file +#include "common/type/vector_type.h" + +#include +int VectorType::compare(const Value &left, const Value &right) const { return DataType::compare(left, right); } +RC VectorType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const +{ + return DataType::cast_to(val, type, result, allow_type_promotion); +} +RC VectorType::set_value_from_str(Value &val, const string &data) const +{ + return DataType::set_value_from_str(val, data); +} +int VectorType::cast_cost(AttrType type) { return DataType::cast_cost(type); } +RC VectorType::to_string(const Value &val, std::string &result) const +{ + // 获取 float 数组指针 + const auto *data = reinterpret_cast(val.data()); + + // 计算数组中元素的数量 + int count = val.length() / sizeof(float); + + // 使用字符串流来构建输出字符串 + std::ostringstream oss; + oss << "["; + + // 遍历数组元素并拼接成字符串 + for (int i = 0; i < count; ++i) { + if (i != 0) { + oss << ", "; // 在每个元素之间加逗号和空格 + } + oss << data[i]; // 将浮点数输出到字符串流 + } + + oss << "]"; // 关闭数组的方括号 + + // 将结果存储到 result 中 + result = oss.str(); + + return RC::SUCCESS; +} diff --git a/src/observer/common/type/vector_type.h b/src/observer/common/type/vector_type.h index fb341a02..094e445f 100644 --- a/src/observer/common/type/vector_type.h +++ b/src/observer/common/type/vector_type.h @@ -15,7 +15,7 @@ See the Mulan PSL v2 for more details. */ class VectorType : public DataType { public: - VectorType() : DataType(AttrType::VECTOR) {} + VectorType() : DataType(AttrType::VECTORS) {} virtual ~VectorType() = default; diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 0c419d29..cbcd7240 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -151,7 +151,7 @@ void Value::set_data(char *data, int length) value_.int_value_ = *(int *)data; length_ = length; } break; - case AttrType::VECTOR: { + case AttrType::VECTORS: { value_.pointer_value_ = data; length_ = length; } break; @@ -236,7 +236,7 @@ void Value::set_text(const char *s, int len /*= 65535*/) } void Value::set_vector(float *&array, size_t &length) { - attr_type_ = AttrType::VECTOR; + attr_type_ = AttrType::VECTORS; length_ = length; value_.pointer_value_ = reinterpret_cast(array); @@ -283,7 +283,7 @@ void Value::set_string_from_other(const Value &other) const char *Value::data() const { switch (attr_type_) { - case AttrType::VECTOR: + case AttrType::VECTORS: case AttrType::CHARS: case AttrType::TEXTS: { return value_.pointer_value_; diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index fa50e937..f32675b9 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -215,101 +215,102 @@ enum yysymbol_kind_t YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ YYSYMBOL_DATE_T = 34, /* DATE_T */ YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_NOT = 36, /* NOT */ - YYSYMBOL_UNIQUE = 37, /* UNIQUE */ - YYSYMBOL_NULL_T = 38, /* NULL_T */ - YYSYMBOL_NULLABLE = 39, /* NULLABLE */ - YYSYMBOL_HELP = 40, /* HELP */ - YYSYMBOL_EXIT = 41, /* EXIT */ - YYSYMBOL_DOT = 42, /* DOT */ - YYSYMBOL_INTO = 43, /* INTO */ - YYSYMBOL_VALUES = 44, /* VALUES */ - YYSYMBOL_FROM = 45, /* FROM */ - YYSYMBOL_WHERE = 46, /* WHERE */ - YYSYMBOL_AND = 47, /* AND */ - YYSYMBOL_OR = 48, /* OR */ - YYSYMBOL_SET = 49, /* SET */ - YYSYMBOL_ON = 50, /* ON */ - YYSYMBOL_LOAD = 51, /* LOAD */ - YYSYMBOL_DATA = 52, /* DATA */ - YYSYMBOL_INFILE = 53, /* INFILE */ - YYSYMBOL_EXPLAIN = 54, /* EXPLAIN */ - YYSYMBOL_STORAGE = 55, /* STORAGE */ - YYSYMBOL_FORMAT = 56, /* FORMAT */ - YYSYMBOL_INNER = 57, /* INNER */ - YYSYMBOL_JOIN = 58, /* JOIN */ - YYSYMBOL_EQ = 59, /* EQ */ - YYSYMBOL_LT = 60, /* LT */ - YYSYMBOL_GT = 61, /* GT */ - YYSYMBOL_LE = 62, /* LE */ - YYSYMBOL_GE = 63, /* GE */ - YYSYMBOL_NE = 64, /* NE */ - YYSYMBOL_LIKE = 65, /* LIKE */ - YYSYMBOL_IS = 66, /* IS */ - YYSYMBOL_NUMBER = 67, /* NUMBER */ - YYSYMBOL_FLOAT = 68, /* FLOAT */ - YYSYMBOL_ID = 69, /* ID */ - YYSYMBOL_SSS = 70, /* SSS */ - YYSYMBOL_71_ = 71, /* '+' */ - YYSYMBOL_72_ = 72, /* '-' */ - YYSYMBOL_73_ = 73, /* '*' */ - YYSYMBOL_74_ = 74, /* '/' */ - YYSYMBOL_UMINUS = 75, /* UMINUS */ - YYSYMBOL_YYACCEPT = 76, /* $accept */ - YYSYMBOL_commands = 77, /* commands */ - YYSYMBOL_command_wrapper = 78, /* command_wrapper */ - YYSYMBOL_exit_stmt = 79, /* exit_stmt */ - YYSYMBOL_help_stmt = 80, /* help_stmt */ - YYSYMBOL_sync_stmt = 81, /* sync_stmt */ - YYSYMBOL_begin_stmt = 82, /* begin_stmt */ - YYSYMBOL_commit_stmt = 83, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 84, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 85, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 86, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 87, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 88, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 89, /* create_index_stmt */ - YYSYMBOL_opt_unique = 90, /* opt_unique */ - YYSYMBOL_attr_list = 91, /* attr_list */ - YYSYMBOL_drop_index_stmt = 92, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 93, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 94, /* attr_def_list */ - YYSYMBOL_attr_def = 95, /* attr_def */ - YYSYMBOL_nullable_constraint = 96, /* nullable_constraint */ - YYSYMBOL_type = 97, /* type */ - YYSYMBOL_insert_stmt = 98, /* insert_stmt */ - YYSYMBOL_values_list = 99, /* values_list */ - YYSYMBOL_value_list = 100, /* value_list */ - YYSYMBOL_value = 101, /* value */ - YYSYMBOL_nonnegative_value = 102, /* nonnegative_value */ - YYSYMBOL_storage_format = 103, /* storage_format */ - YYSYMBOL_delete_stmt = 104, /* delete_stmt */ - YYSYMBOL_update_stmt = 105, /* update_stmt */ - YYSYMBOL_set_clauses = 106, /* set_clauses */ - YYSYMBOL_setClause = 107, /* setClause */ - YYSYMBOL_select_stmt = 108, /* select_stmt */ - YYSYMBOL_calc_stmt = 109, /* calc_stmt */ - YYSYMBOL_expression_list = 110, /* expression_list */ - YYSYMBOL_expression = 111, /* expression */ - YYSYMBOL_alias = 112, /* alias */ - YYSYMBOL_aggr_func_expr = 113, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 114, /* sub_query_expr */ - YYSYMBOL_rel_attr = 115, /* rel_attr */ - YYSYMBOL_relation = 116, /* relation */ - YYSYMBOL_rel_list = 117, /* rel_list */ - YYSYMBOL_join_clauses = 118, /* join_clauses */ - YYSYMBOL_where = 119, /* where */ - YYSYMBOL_condition = 120, /* condition */ - YYSYMBOL_comp_op = 121, /* comp_op */ - YYSYMBOL_opt_order_by = 122, /* opt_order_by */ - YYSYMBOL_sort_list = 123, /* sort_list */ - YYSYMBOL_sort_unit = 124, /* sort_unit */ - YYSYMBOL_group_by = 125, /* group_by */ - YYSYMBOL_opt_having = 126, /* opt_having */ - YYSYMBOL_load_data_stmt = 127, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 128, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 129, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 130 /* opt_semicolon */ + YYSYMBOL_VECTOR_T = 36, /* VECTOR_T */ + YYSYMBOL_NOT = 37, /* NOT */ + YYSYMBOL_UNIQUE = 38, /* UNIQUE */ + YYSYMBOL_NULL_T = 39, /* NULL_T */ + YYSYMBOL_NULLABLE = 40, /* NULLABLE */ + YYSYMBOL_HELP = 41, /* HELP */ + YYSYMBOL_EXIT = 42, /* EXIT */ + YYSYMBOL_DOT = 43, /* DOT */ + YYSYMBOL_INTO = 44, /* INTO */ + YYSYMBOL_VALUES = 45, /* VALUES */ + YYSYMBOL_FROM = 46, /* FROM */ + YYSYMBOL_WHERE = 47, /* WHERE */ + YYSYMBOL_AND = 48, /* AND */ + YYSYMBOL_OR = 49, /* OR */ + YYSYMBOL_SET = 50, /* SET */ + YYSYMBOL_ON = 51, /* ON */ + YYSYMBOL_LOAD = 52, /* LOAD */ + YYSYMBOL_DATA = 53, /* DATA */ + YYSYMBOL_INFILE = 54, /* INFILE */ + YYSYMBOL_EXPLAIN = 55, /* EXPLAIN */ + YYSYMBOL_STORAGE = 56, /* STORAGE */ + YYSYMBOL_FORMAT = 57, /* FORMAT */ + YYSYMBOL_INNER = 58, /* INNER */ + YYSYMBOL_JOIN = 59, /* JOIN */ + YYSYMBOL_EQ = 60, /* EQ */ + YYSYMBOL_LT = 61, /* LT */ + YYSYMBOL_GT = 62, /* GT */ + YYSYMBOL_LE = 63, /* LE */ + YYSYMBOL_GE = 64, /* GE */ + YYSYMBOL_NE = 65, /* NE */ + YYSYMBOL_LIKE = 66, /* LIKE */ + YYSYMBOL_IS = 67, /* IS */ + YYSYMBOL_NUMBER = 68, /* NUMBER */ + YYSYMBOL_FLOAT = 69, /* FLOAT */ + YYSYMBOL_ID = 70, /* ID */ + YYSYMBOL_SSS = 71, /* SSS */ + YYSYMBOL_72_ = 72, /* '+' */ + YYSYMBOL_73_ = 73, /* '-' */ + YYSYMBOL_74_ = 74, /* '*' */ + YYSYMBOL_75_ = 75, /* '/' */ + YYSYMBOL_UMINUS = 76, /* UMINUS */ + YYSYMBOL_YYACCEPT = 77, /* $accept */ + YYSYMBOL_commands = 78, /* commands */ + YYSYMBOL_command_wrapper = 79, /* command_wrapper */ + YYSYMBOL_exit_stmt = 80, /* exit_stmt */ + YYSYMBOL_help_stmt = 81, /* help_stmt */ + YYSYMBOL_sync_stmt = 82, /* sync_stmt */ + YYSYMBOL_begin_stmt = 83, /* begin_stmt */ + YYSYMBOL_commit_stmt = 84, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 85, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 86, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 87, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 88, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 89, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 90, /* create_index_stmt */ + YYSYMBOL_opt_unique = 91, /* opt_unique */ + YYSYMBOL_attr_list = 92, /* attr_list */ + YYSYMBOL_drop_index_stmt = 93, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 94, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 95, /* attr_def_list */ + YYSYMBOL_attr_def = 96, /* attr_def */ + YYSYMBOL_nullable_constraint = 97, /* nullable_constraint */ + YYSYMBOL_type = 98, /* type */ + YYSYMBOL_insert_stmt = 99, /* insert_stmt */ + YYSYMBOL_values_list = 100, /* values_list */ + YYSYMBOL_value_list = 101, /* value_list */ + YYSYMBOL_value = 102, /* value */ + YYSYMBOL_nonnegative_value = 103, /* nonnegative_value */ + YYSYMBOL_storage_format = 104, /* storage_format */ + YYSYMBOL_delete_stmt = 105, /* delete_stmt */ + YYSYMBOL_update_stmt = 106, /* update_stmt */ + YYSYMBOL_set_clauses = 107, /* set_clauses */ + YYSYMBOL_setClause = 108, /* setClause */ + YYSYMBOL_select_stmt = 109, /* select_stmt */ + YYSYMBOL_calc_stmt = 110, /* calc_stmt */ + YYSYMBOL_expression_list = 111, /* expression_list */ + YYSYMBOL_expression = 112, /* expression */ + YYSYMBOL_alias = 113, /* alias */ + YYSYMBOL_aggr_func_expr = 114, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 115, /* sub_query_expr */ + YYSYMBOL_rel_attr = 116, /* rel_attr */ + YYSYMBOL_relation = 117, /* relation */ + YYSYMBOL_rel_list = 118, /* rel_list */ + YYSYMBOL_join_clauses = 119, /* join_clauses */ + YYSYMBOL_where = 120, /* where */ + YYSYMBOL_condition = 121, /* condition */ + YYSYMBOL_comp_op = 122, /* comp_op */ + YYSYMBOL_opt_order_by = 123, /* opt_order_by */ + YYSYMBOL_sort_list = 124, /* sort_list */ + YYSYMBOL_sort_unit = 125, /* sort_unit */ + YYSYMBOL_group_by = 126, /* group_by */ + YYSYMBOL_opt_having = 127, /* opt_having */ + YYSYMBOL_load_data_stmt = 128, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 129, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 130, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 131 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -643,16 +644,16 @@ union yyalloc #define YYLAST 267 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 76 +#define YYNTOKENS 77 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 55 /* YYNRULES -- Number of rules. */ -#define YYNRULES 142 +#define YYNRULES 143 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 251 +#define YYNSTATES 252 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 326 +#define YYMAXUTOK 327 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -670,7 +671,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 73, 71, 2, 72, 2, 74, 2, 2, + 2, 2, 74, 72, 2, 73, 2, 75, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -698,28 +699,28 @@ static const yytype_int8 yytranslate[] = 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 75 + 65, 66, 67, 68, 69, 70, 71, 76 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 259, 259, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 291, 297, 302, 308, 314, 320, - 326, 333, 339, 347, 357, 372, 373, 377, 383, 392, - 402, 406, 410, 414, 418, 425, 428, 441, 453, 480, - 484, 488, 493, 499, 500, 501, 502, 503, 507, 520, - 526, 533, 539, 547, 550, 554, 561, 565, 569, 575, - 582, 585, 592, 604, 618, 623, 630, 640, 673, 706, - 712, 721, 724, 733, 749, 752, 755, 758, 761, 769, - 772, 777, 783, 786, 789, 792, 799, 802, 805, 810, - 817, 824, 829, 839, 845, 855, 872, 879, 891, 894, - 900, 904, 911, 915, 922, 923, 924, 925, 926, 927, - 928, 929, 930, 931, 932, 933, 934, 935, 940, 943, - 951, 956, 964, 970, 976, 986, 989, 997, 1000, 1007, - 1020, 1028, 1039 + 0, 260, 260, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 292, 298, 303, 309, 315, 321, + 327, 334, 340, 348, 358, 373, 374, 378, 384, 393, + 403, 407, 411, 415, 419, 426, 429, 442, 460, 487, + 491, 495, 500, 506, 507, 508, 509, 510, 511, 515, + 528, 534, 541, 547, 555, 558, 562, 569, 573, 577, + 583, 590, 593, 600, 612, 626, 631, 638, 648, 681, + 714, 720, 729, 732, 741, 757, 760, 763, 766, 769, + 777, 780, 785, 791, 794, 797, 800, 807, 810, 813, + 818, 825, 832, 837, 847, 853, 863, 880, 887, 899, + 902, 908, 912, 919, 923, 930, 931, 932, 933, 934, + 935, 936, 937, 938, 939, 940, 941, 942, 943, 948, + 951, 959, 964, 972, 978, 984, 994, 997, 1005, 1008, + 1015, 1028, 1036, 1047 }; #endif @@ -740,20 +741,20 @@ static const char *const yytname[] = "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", - "DATE_T", "TEXT_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", "HELP", - "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", - "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", - "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", - "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", - "commands", "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", - "begin_stmt", "commit_stmt", "rollback_stmt", "drop_table_stmt", - "show_tables_stmt", "desc_table_stmt", "show_index_stmt", - "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", - "create_table_stmt", "attr_def_list", "attr_def", "nullable_constraint", - "type", "insert_stmt", "values_list", "value_list", "value", - "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", - "set_clauses", "setClause", "select_stmt", "calc_stmt", - "expression_list", "expression", "alias", "aggr_func_expr", + "DATE_T", "TEXT_T", "VECTOR_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", + "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", + "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", + "INNER", "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", + "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", + "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", + "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", + "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", + "show_index_stmt", "create_index_stmt", "opt_unique", "attr_list", + "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", + "nullable_constraint", "type", "insert_stmt", "values_list", + "value_list", "value", "nonnegative_value", "storage_format", + "delete_stmt", "update_stmt", "set_clauses", "setClause", "select_stmt", + "calc_stmt", "expression_list", "expression", "alias", "aggr_func_expr", "sub_query_expr", "rel_attr", "relation", "rel_list", "join_clauses", "where", "condition", "comp_op", "opt_order_by", "sort_list", "sort_unit", "group_by", "opt_having", "load_data_stmt", "explain_stmt", @@ -767,7 +768,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-175) +#define YYPACT_NINF (-169) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -781,32 +782,32 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 210, 5, 38, -10, -10, -13, 12, -175, 29, 19, - 6, -175, -175, -175, -175, -175, 24, 36, 210, 124, - 125, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, - -175, -175, 70, -175, 126, 71, 73, 119, -175, -175, - -175, -2, -175, -10, -175, -175, -175, 7, -175, -175, - -175, 99, -175, -175, 100, 77, 78, 101, 89, 98, - -175, -175, -175, -175, -9, 80, -175, 103, -10, 130, - 131, -10, -28, -175, 90, -175, -10, -10, -10, -10, - 132, 91, 91, 117, 116, 94, -18, 95, 102, 108, - 13, 118, 106, 99, -175, -175, 141, -175, -175, -175, - 18, 18, -175, -175, -10, -175, 4, 116, -175, 146, - 143, -175, 113, -7, -175, 52, -175, -175, 133, 97, - 151, 121, 161, -175, 114, -175, -175, -175, 135, 156, - 180, -18, 168, -175, -175, 0, -175, -175, -175, -175, - -175, -175, -175, 159, 35, 55, -10, -10, 94, -175, - -175, -175, 184, -175, -175, -175, -175, -175, 87, 102, - 173, 145, -175, 175, 91, 91, 194, 208, 96, -175, - 196, -175, -175, -175, -175, -10, 143, 143, 41, 41, - -175, 152, 155, 185, -175, -175, -175, 151, 169, -175, - 165, 186, 116, 17, -175, -10, 143, 213, -175, -18, - -18, 41, -175, 188, -175, 215, -175, -175, 21, 216, - 218, 143, 180, -175, 55, 235, -175, -175, 112, 31, - 161, -175, 165, -175, -24, -175, -10, -175, -175, -175, - -175, 187, 11, -175, 220, 91, -175, -175, -10, -175, - -175 + 212, 3, 43, 74, 74, -42, 87, -169, 13, 6, + -1, -169, -169, -169, -169, -169, 15, 55, 212, 76, + 93, -169, -169, -169, -169, -169, -169, -169, -169, -169, + -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, + -169, -169, 52, -169, 101, 53, 54, -9, -169, -169, + -169, -10, -169, 74, -169, -169, -169, 8, -169, -169, + -169, 79, -169, -169, 91, 80, 81, 96, 92, 107, + -169, -169, -169, -169, -3, 94, -169, 98, 74, 137, + 138, 74, -48, -169, 97, -169, 74, 74, 74, 74, + 139, 99, 99, 121, 125, 103, -22, 100, 106, 120, + 23, 127, 109, 79, -169, -169, 155, -169, -169, -169, + -51, -51, -169, -169, 74, -169, 9, 125, -169, 158, + 144, -169, 128, -15, -169, 38, -169, -169, 140, 124, + 161, 129, 173, -169, 122, -169, -169, -169, 132, 167, + 184, -22, 169, -169, -169, 0, -169, -169, -169, -169, + -169, -169, -169, 159, 66, 63, 74, 74, 103, -169, + -169, -169, 185, -169, -169, -169, -169, -169, -169, 5, + 106, 174, 130, -169, 177, 99, 99, 197, 205, 89, + -169, 198, -169, -169, -169, -169, 74, 144, 144, -2, + -2, -169, 151, 156, 186, -169, -169, -169, 161, 170, + -169, 153, 176, 125, 14, -169, 74, 144, 224, -169, + -22, -22, -2, -169, 189, -169, 213, -169, -169, 46, + 216, 218, 144, 184, -169, 63, 238, -169, -169, 95, + 49, 173, -169, 153, -169, 51, -169, 74, -169, -169, + -169, -169, 187, 20, -169, 219, 99, -169, -169, 74, + -169, -169 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -814,54 +815,54 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 36, 0, 81, 81, 0, 0, 26, 0, 0, + 0, 36, 0, 82, 82, 0, 0, 26, 0, 0, 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, 0, 23, 22, 15, 16, 17, 18, 9, 10, 11, - 14, 12, 13, 8, 5, 7, 6, 4, 3, 19, - 20, 21, 0, 35, 0, 0, 0, 81, 69, 66, - 67, 101, 68, 0, 92, 90, 79, 96, 94, 95, - 91, 80, 32, 31, 0, 0, 0, 0, 0, 0, - 140, 1, 142, 2, 70, 0, 30, 0, 81, 0, - 0, 81, 0, 89, 0, 97, 0, 0, 0, 0, - 82, 0, 0, 0, 108, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 100, 88, 0, 102, 93, 98, - 84, 85, 86, 87, 81, 103, 96, 108, 33, 0, - 0, 72, 0, 108, 74, 0, 141, 63, 0, 0, - 45, 0, 0, 44, 0, 39, 99, 83, 0, 104, - 135, 0, 58, 126, 124, 0, 114, 115, 116, 117, - 118, 119, 122, 120, 0, 109, 0, 0, 0, 73, - 64, 65, 0, 53, 54, 55, 56, 57, 52, 0, - 0, 0, 43, 0, 0, 0, 0, 137, 0, 61, - 0, 127, 125, 123, 121, 0, 0, 0, 111, 76, - 75, 0, 0, 0, 51, 50, 48, 45, 70, 71, - 0, 0, 108, 96, 105, 81, 0, 128, 59, 0, - 0, 110, 112, 113, 139, 0, 49, 46, 42, 37, - 0, 0, 135, 136, 138, 0, 77, 62, 0, 52, - 0, 41, 0, 34, 106, 78, 0, 60, 47, 40, - 38, 0, 132, 129, 130, 0, 134, 133, 0, 107, - 131 + 14, 12, 13, 8, 5, 7, 6, 3, 4, 19, + 20, 21, 0, 35, 0, 0, 0, 82, 70, 67, + 68, 102, 69, 0, 93, 91, 80, 97, 95, 96, + 92, 81, 32, 31, 0, 0, 0, 0, 0, 0, + 141, 1, 143, 2, 71, 0, 30, 0, 82, 0, + 0, 82, 0, 90, 0, 98, 0, 0, 0, 0, + 83, 0, 0, 0, 109, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 101, 89, 0, 103, 94, 99, + 85, 86, 87, 88, 82, 104, 97, 109, 33, 0, + 0, 73, 0, 109, 75, 0, 142, 64, 0, 0, + 45, 0, 0, 44, 0, 39, 100, 84, 0, 105, + 136, 0, 59, 127, 125, 0, 115, 116, 117, 118, + 119, 120, 123, 121, 0, 110, 0, 0, 0, 74, + 65, 66, 0, 53, 54, 55, 56, 57, 58, 52, + 0, 0, 0, 43, 0, 0, 0, 0, 138, 0, + 62, 0, 128, 126, 124, 122, 0, 0, 0, 112, + 77, 76, 0, 0, 0, 51, 50, 48, 45, 71, + 72, 0, 0, 109, 97, 106, 82, 0, 129, 60, + 0, 0, 111, 113, 114, 140, 0, 49, 46, 42, + 37, 0, 0, 136, 137, 139, 0, 78, 63, 0, + 52, 0, 41, 0, 34, 107, 79, 0, 61, 47, + 40, 38, 0, 133, 130, 131, 0, 135, 134, 0, + 108, 132 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -175, -175, 226, -175, -175, -175, -175, -175, -175, -175, - -175, -175, -175, -175, -175, 15, -175, -175, 51, 83, - 20, -175, -175, -175, 43, -91, -93, 56, -175, -175, - -175, 104, -45, -175, -4, -52, 198, -175, -175, -175, - -85, 81, 22, -113, -174, 109, -175, 9, -175, 44, - -175, -175, -175, -175, -175 + -169, -169, 229, -169, -169, -169, -169, -169, -169, -169, + -169, -169, -169, -169, -169, 16, -169, -169, 50, 82, + 21, -169, -169, -169, 39, -91, -93, 56, -169, -169, + -169, 102, -45, -169, -4, -52, 199, -169, -169, -169, + -85, 83, 11, -113, -168, 104, -169, 12, -169, 40, + -169, -169, -169, -169, -169 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 220, 32, 33, 170, 130, - 196, 168, 34, 142, 178, 179, 55, 100, 35, 36, + 28, 29, 30, 31, 44, 221, 32, 33, 171, 130, + 197, 169, 34, 142, 179, 180, 55, 100, 35, 36, 123, 124, 37, 38, 56, 57, 139, 58, 59, 60, - 201, 117, 202, 121, 155, 156, 226, 243, 244, 177, - 207, 39, 40, 41, 73 + 202, 117, 203, 121, 155, 156, 227, 244, 245, 178, + 208, 39, 40, 41, 73 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -869,64 +870,64 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 61, 83, 79, 127, 140, 126, 116, 118, 84, 181, - 159, 84, 212, 213, 47, 98, 246, 132, 42, 158, - 48, 84, 81, 186, 187, 230, 63, 64, 48, 247, - 78, 182, 224, 241, 110, 111, 112, 113, 78, 120, - 82, 107, 43, 80, 143, 108, 99, 234, 127, 49, - 50, 45, 52, 46, 125, 133, 62, 49, 50, 51, - 52, 138, 53, 54, 66, 183, 144, 193, 154, 194, - 195, 145, 65, 85, 103, 67, 85, 106, 86, 87, - 88, 89, 86, 87, 88, 89, 85, 172, 69, 222, - 203, 88, 89, 68, 146, 147, 148, 149, 150, 151, - 152, 153, 186, 187, 188, 189, 86, 87, 88, 89, - 137, 192, 86, 87, 88, 89, 127, 127, 227, 160, - 161, 208, 209, 193, 71, 194, 195, 163, 72, 164, - 165, 166, 167, 211, 154, 154, 78, 237, 209, 74, - 76, 75, 77, 47, 91, 92, 93, 94, 96, 101, - 95, 97, 143, 102, 154, 104, 105, 48, 114, 109, - 115, 119, 120, 122, 131, 128, 136, 47, 134, 154, - 141, 129, 157, 231, 144, 135, 162, 169, 78, 145, - 171, 48, 175, 173, 242, 239, 49, 50, 51, 52, - 176, 53, 54, 174, 180, 184, 242, 191, 198, 200, - 205, 223, 146, 147, 148, 149, 150, 151, 152, 153, - 49, 50, 51, 52, 199, 53, 54, 1, 2, 206, - 210, 214, 215, 216, 99, 225, 3, 4, 5, 6, - 7, 8, 9, 10, 219, 186, 221, 11, 12, 13, - 229, 236, 232, 233, 70, 245, 248, 240, 217, 238, - 14, 15, 197, 228, 218, 90, 204, 250, 0, 16, - 0, 17, 190, 185, 18, 0, 235, 249 + 61, 83, 79, 127, 140, 126, 116, 118, 78, 182, + 159, 158, 84, 84, 81, 47, 42, 48, 84, 213, + 214, 98, 107, 88, 89, 247, 108, 132, 62, 193, + 48, 183, 120, 82, 110, 111, 112, 113, 248, 225, + 78, 43, 194, 80, 195, 196, 49, 50, 127, 52, + 231, 125, 66, 99, 235, 133, 45, 65, 46, 49, + 50, 51, 52, 78, 53, 54, 184, 138, 154, 67, + 86, 87, 88, 89, 103, 143, 71, 106, 85, 85, + 86, 87, 88, 89, 85, 68, 194, 173, 195, 196, + 223, 204, 86, 87, 88, 89, 72, 144, 47, 187, + 188, 63, 64, 145, 189, 190, 160, 161, 69, 242, + 137, 187, 188, 48, 209, 210, 75, 127, 127, 228, + 238, 210, 74, 76, 77, 91, 146, 147, 148, 149, + 150, 151, 152, 153, 212, 154, 154, 92, 86, 87, + 88, 89, 49, 50, 51, 52, 95, 53, 54, 102, + 93, 94, 96, 143, 163, 154, 164, 165, 166, 167, + 168, 97, 104, 105, 101, 114, 119, 109, 47, 115, + 154, 128, 120, 122, 232, 144, 129, 131, 134, 135, + 136, 145, 141, 48, 162, 243, 240, 170, 157, 172, + 78, 175, 174, 176, 177, 181, 185, 243, 192, 199, + 200, 201, 224, 206, 146, 147, 148, 149, 150, 151, + 152, 153, 49, 50, 51, 52, 207, 53, 54, 1, + 2, 215, 211, 220, 216, 217, 99, 222, 3, 4, + 5, 6, 7, 8, 9, 10, 226, 187, 230, 11, + 12, 13, 233, 234, 237, 249, 246, 70, 218, 241, + 229, 239, 198, 14, 15, 219, 90, 250, 186, 205, + 191, 251, 16, 236, 17, 0, 0, 18 }; static const yytype_int16 yycheck[] = { - 4, 53, 47, 96, 117, 96, 91, 92, 4, 9, - 123, 4, 186, 187, 24, 24, 5, 4, 13, 26, - 38, 4, 24, 47, 48, 4, 14, 15, 38, 18, - 17, 31, 206, 57, 86, 87, 88, 89, 17, 46, - 42, 69, 37, 47, 9, 73, 55, 221, 141, 67, - 68, 13, 70, 15, 72, 100, 69, 67, 68, 69, - 70, 57, 72, 73, 45, 65, 31, 36, 120, 38, - 39, 36, 43, 69, 78, 69, 69, 81, 71, 72, - 73, 74, 71, 72, 73, 74, 69, 132, 52, 202, - 175, 73, 74, 69, 59, 60, 61, 62, 63, 64, - 65, 66, 47, 48, 156, 157, 71, 72, 73, 74, - 114, 24, 71, 72, 73, 74, 209, 210, 209, 67, - 68, 25, 26, 36, 0, 38, 39, 30, 3, 32, - 33, 34, 35, 185, 186, 187, 17, 25, 26, 69, - 69, 15, 69, 24, 45, 45, 69, 69, 59, 69, - 49, 53, 9, 50, 206, 25, 25, 38, 26, 69, - 69, 44, 46, 69, 56, 70, 25, 24, 50, 221, - 24, 69, 59, 218, 31, 69, 43, 26, 17, 36, - 59, 38, 26, 69, 236, 230, 67, 68, 69, 70, - 10, 72, 73, 58, 26, 36, 248, 13, 25, 24, - 6, 205, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 69, 72, 73, 7, 8, 11, - 24, 69, 67, 38, 55, 12, 16, 17, 18, 19, - 20, 21, 22, 23, 69, 47, 50, 27, 28, 29, - 25, 6, 26, 25, 18, 58, 26, 232, 197, 229, - 40, 41, 169, 210, 198, 57, 175, 248, -1, 49, - -1, 51, 158, 154, 54, -1, 222, 245 + 4, 53, 47, 96, 117, 96, 91, 92, 17, 9, + 123, 26, 4, 4, 24, 24, 13, 39, 4, 187, + 188, 24, 70, 74, 75, 5, 74, 4, 70, 24, + 39, 31, 47, 43, 86, 87, 88, 89, 18, 207, + 17, 38, 37, 47, 39, 40, 68, 69, 141, 71, + 4, 73, 46, 56, 222, 100, 13, 44, 15, 68, + 69, 70, 71, 17, 73, 74, 66, 58, 120, 70, + 72, 73, 74, 75, 78, 9, 0, 81, 70, 70, + 72, 73, 74, 75, 70, 70, 37, 132, 39, 40, + 203, 176, 72, 73, 74, 75, 3, 31, 24, 48, + 49, 14, 15, 37, 156, 157, 68, 69, 53, 58, + 114, 48, 49, 39, 25, 26, 15, 210, 211, 210, + 25, 26, 70, 70, 70, 46, 60, 61, 62, 63, + 64, 65, 66, 67, 186, 187, 188, 46, 72, 73, + 74, 75, 68, 69, 70, 71, 50, 73, 74, 51, + 70, 70, 60, 9, 30, 207, 32, 33, 34, 35, + 36, 54, 25, 25, 70, 26, 45, 70, 24, 70, + 222, 71, 47, 70, 219, 31, 70, 57, 51, 70, + 25, 37, 24, 39, 44, 237, 231, 26, 60, 60, + 17, 59, 70, 26, 10, 26, 37, 249, 13, 25, + 70, 24, 206, 6, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 11, 73, 74, 7, + 8, 70, 24, 70, 68, 39, 56, 51, 16, 17, + 18, 19, 20, 21, 22, 23, 12, 48, 25, 27, + 28, 29, 26, 25, 6, 26, 59, 18, 198, 233, + 211, 230, 170, 41, 42, 199, 57, 246, 154, 176, + 158, 249, 50, 223, 52, -1, -1, 55 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -934,51 +935,51 @@ static const yytype_int16 yycheck[] = static const yytype_uint8 yystos[] = { 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, - 23, 27, 28, 29, 40, 41, 49, 51, 54, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 92, 93, 98, 104, 105, 108, 109, 127, - 128, 129, 13, 37, 90, 13, 15, 24, 38, 67, - 68, 69, 70, 72, 73, 102, 110, 111, 113, 114, - 115, 110, 69, 14, 15, 43, 45, 69, 69, 52, - 78, 0, 3, 130, 69, 15, 69, 69, 17, 108, - 110, 24, 42, 111, 4, 69, 71, 72, 73, 74, - 112, 45, 45, 69, 69, 49, 59, 53, 24, 55, - 103, 69, 50, 110, 25, 25, 110, 69, 73, 69, - 111, 111, 111, 111, 26, 69, 116, 117, 116, 44, - 46, 119, 69, 106, 107, 72, 101, 102, 70, 69, - 95, 56, 4, 108, 50, 69, 25, 110, 57, 112, - 119, 24, 99, 9, 31, 36, 59, 60, 61, 62, - 63, 64, 65, 66, 111, 120, 121, 59, 26, 119, - 67, 68, 43, 30, 32, 33, 34, 35, 97, 26, - 94, 59, 108, 69, 58, 26, 10, 125, 100, 101, - 26, 9, 31, 65, 36, 121, 47, 48, 111, 111, - 107, 13, 24, 36, 38, 39, 96, 95, 25, 69, - 24, 116, 118, 116, 117, 6, 11, 126, 25, 26, - 24, 111, 120, 120, 69, 67, 38, 94, 103, 69, - 91, 50, 119, 110, 120, 12, 122, 101, 100, 25, - 4, 108, 26, 25, 120, 125, 6, 25, 96, 108, - 91, 57, 111, 123, 124, 58, 5, 18, 26, 118, - 123 + 23, 27, 28, 29, 41, 42, 50, 52, 55, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 93, 94, 99, 105, 106, 109, 110, 128, + 129, 130, 13, 38, 91, 13, 15, 24, 39, 68, + 69, 70, 71, 73, 74, 103, 111, 112, 114, 115, + 116, 111, 70, 14, 15, 44, 46, 70, 70, 53, + 79, 0, 3, 131, 70, 15, 70, 70, 17, 109, + 111, 24, 43, 112, 4, 70, 72, 73, 74, 75, + 113, 46, 46, 70, 70, 50, 60, 54, 24, 56, + 104, 70, 51, 111, 25, 25, 111, 70, 74, 70, + 112, 112, 112, 112, 26, 70, 117, 118, 117, 45, + 47, 120, 70, 107, 108, 73, 102, 103, 71, 70, + 96, 57, 4, 109, 51, 70, 25, 111, 58, 113, + 120, 24, 100, 9, 31, 37, 60, 61, 62, 63, + 64, 65, 66, 67, 112, 121, 122, 60, 26, 120, + 68, 69, 44, 30, 32, 33, 34, 35, 36, 98, + 26, 95, 60, 109, 70, 59, 26, 10, 126, 101, + 102, 26, 9, 31, 66, 37, 122, 48, 49, 112, + 112, 108, 13, 24, 37, 39, 40, 97, 96, 25, + 70, 24, 117, 119, 117, 118, 6, 11, 127, 25, + 26, 24, 112, 121, 121, 70, 68, 39, 95, 104, + 70, 92, 51, 120, 111, 121, 12, 123, 102, 101, + 25, 4, 109, 26, 25, 121, 126, 6, 25, 97, + 109, 92, 58, 112, 124, 125, 59, 5, 18, 26, + 119, 124 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_uint8 yyr1[] = { - 0, 76, 77, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 90, 91, 91, 92, - 93, 93, 93, 93, 93, 94, 94, 95, 95, 96, - 96, 96, 96, 97, 97, 97, 97, 97, 98, 99, - 99, 100, 100, 101, 101, 101, 102, 102, 102, 102, - 103, 103, 104, 105, 106, 106, 107, 108, 108, 109, - 109, 110, 110, 110, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 112, 112, 112, 113, - 114, 115, 115, 116, 117, 117, 118, 118, 119, 119, - 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, - 123, 123, 124, 124, 124, 125, 125, 126, 126, 127, - 128, 129, 130 + 0, 77, 78, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 91, 92, 92, 93, + 94, 94, 94, 94, 94, 95, 95, 96, 96, 97, + 97, 97, 97, 98, 98, 98, 98, 98, 98, 99, + 100, 100, 101, 101, 102, 102, 102, 103, 103, 103, + 103, 104, 104, 105, 106, 107, 107, 108, 109, 109, + 110, 110, 111, 111, 111, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 113, 113, 113, + 114, 115, 116, 116, 117, 118, 118, 119, 119, 120, + 120, 121, 121, 121, 121, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 123, + 123, 124, 124, 125, 125, 125, 126, 126, 127, 127, + 128, 129, 130, 131 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -989,16 +990,16 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, 10, 9, 8, 6, 5, 0, 3, 6, 3, 2, - 1, 1, 0, 1, 1, 1, 1, 1, 5, 3, - 5, 1, 3, 1, 2, 2, 1, 1, 1, 1, - 0, 4, 4, 5, 1, 3, 3, 8, 9, 2, - 2, 0, 2, 4, 3, 3, 3, 3, 3, 2, - 1, 1, 1, 3, 1, 1, 0, 1, 2, 4, - 3, 1, 3, 1, 2, 4, 3, 6, 0, 2, - 3, 2, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, - 1, 3, 1, 2, 2, 0, 3, 0, 2, 7, - 2, 4, 1 + 1, 1, 0, 1, 1, 1, 1, 1, 1, 5, + 3, 5, 1, 3, 1, 2, 2, 1, 1, 1, + 1, 0, 4, 4, 5, 1, 3, 3, 8, 9, + 2, 2, 0, 2, 4, 3, 3, 3, 3, 3, + 2, 1, 1, 1, 3, 1, 1, 0, 1, 2, + 4, 3, 1, 3, 1, 2, 4, 3, 6, 0, + 2, 3, 2, 3, 3, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 2, 1, 2, 1, 2, 0, + 3, 1, 3, 1, 2, 2, 0, 3, 0, 2, + 7, 2, 4, 1 }; @@ -1860,104 +1861,104 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 260 "yacc_sql.y" +#line 261 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1869 "yacc_sql.cpp" +#line 1870 "yacc_sql.cpp" break; case 24: /* exit_stmt: EXIT */ -#line 291 "yacc_sql.y" +#line 292 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1878 "yacc_sql.cpp" +#line 1879 "yacc_sql.cpp" break; case 25: /* help_stmt: HELP */ -#line 297 "yacc_sql.y" +#line 298 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1886 "yacc_sql.cpp" +#line 1887 "yacc_sql.cpp" break; case 26: /* sync_stmt: SYNC */ -#line 302 "yacc_sql.y" +#line 303 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1894 "yacc_sql.cpp" +#line 1895 "yacc_sql.cpp" break; case 27: /* begin_stmt: TRX_BEGIN */ -#line 308 "yacc_sql.y" +#line 309 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1902 "yacc_sql.cpp" +#line 1903 "yacc_sql.cpp" break; case 28: /* commit_stmt: TRX_COMMIT */ -#line 314 "yacc_sql.y" +#line 315 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1910 "yacc_sql.cpp" +#line 1911 "yacc_sql.cpp" break; case 29: /* rollback_stmt: TRX_ROLLBACK */ -#line 320 "yacc_sql.y" +#line 321 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1918 "yacc_sql.cpp" +#line 1919 "yacc_sql.cpp" break; case 30: /* drop_table_stmt: DROP TABLE ID */ -#line 326 "yacc_sql.y" +#line 327 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1928 "yacc_sql.cpp" +#line 1929 "yacc_sql.cpp" break; case 31: /* show_tables_stmt: SHOW TABLES */ -#line 333 "yacc_sql.y" +#line 334 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1936 "yacc_sql.cpp" +#line 1937 "yacc_sql.cpp" break; case 32: /* desc_table_stmt: DESC ID */ -#line 339 "yacc_sql.y" +#line 340 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1946 "yacc_sql.cpp" +#line 1947 "yacc_sql.cpp" break; case 33: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 348 "yacc_sql.y" +#line 349 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1957 "yacc_sql.cpp" +#line 1958 "yacc_sql.cpp" break; case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 358 "yacc_sql.y" +#line 359 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1969,43 +1970,43 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1973 "yacc_sql.cpp" +#line 1974 "yacc_sql.cpp" break; case 35: /* opt_unique: UNIQUE */ -#line 372 "yacc_sql.y" +#line 373 "yacc_sql.y" { (yyval.unique) = true; } -#line 1979 "yacc_sql.cpp" +#line 1980 "yacc_sql.cpp" break; case 36: /* opt_unique: %empty */ -#line 373 "yacc_sql.y" +#line 374 "yacc_sql.y" { (yyval.unique) = false; } -#line 1985 "yacc_sql.cpp" +#line 1986 "yacc_sql.cpp" break; case 37: /* attr_list: ID */ -#line 378 "yacc_sql.y" +#line 379 "yacc_sql.y" { (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1995 "yacc_sql.cpp" +#line 1996 "yacc_sql.cpp" break; case 38: /* attr_list: ID COMMA attr_list */ -#line 384 "yacc_sql.y" +#line 385 "yacc_sql.y" { (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2005 "yacc_sql.cpp" +#line 2006 "yacc_sql.cpp" break; case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 393 "yacc_sql.y" +#line 394 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -2013,59 +2014,59 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2017 "yacc_sql.cpp" +#line 2018 "yacc_sql.cpp" break; case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ -#line 403 "yacc_sql.y" +#line 404 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2025 "yacc_sql.cpp" +#line 2026 "yacc_sql.cpp" break; case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ -#line 407 "yacc_sql.y" +#line 408 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2033 "yacc_sql.cpp" +#line 2034 "yacc_sql.cpp" break; case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 411 "yacc_sql.y" +#line 412 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2041 "yacc_sql.cpp" +#line 2042 "yacc_sql.cpp" break; case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ -#line 415 "yacc_sql.y" +#line 416 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2049 "yacc_sql.cpp" +#line 2050 "yacc_sql.cpp" break; case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ -#line 419 "yacc_sql.y" +#line 420 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2057 "yacc_sql.cpp" +#line 2058 "yacc_sql.cpp" break; case 45: /* attr_def_list: %empty */ -#line 425 "yacc_sql.y" +#line 426 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2065 "yacc_sql.cpp" +#line 2066 "yacc_sql.cpp" break; case 46: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 429 "yacc_sql.y" +#line 430 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -2075,39 +2076,45 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2079 "yacc_sql.cpp" +#line 2080 "yacc_sql.cpp" break; case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 442 "yacc_sql.y" +#line 443 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; - (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); (yyval.attr_info)->name = (yyvsp[-5].string); - (yyval.attr_info)->length = (yyvsp[-2].number); + (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); + if ((yyval.attr_info)->type == AttrType::CHARS) { + (yyval.attr_info)->length = (yyvsp[-2].number); + } else if ((yyval.attr_info)->type == AttrType::VECTORS) { + (yyval.attr_info)->length = sizeof(float) * (yyvsp[-2].number); + } else { + ASSERT(false, "$$->type is invalid."); + } (yyval.attr_info)->nullable = (yyvsp[0].nullable_info); if ((yyval.attr_info)->nullable) { (yyval.attr_info)->length++; } free((yyvsp[-5].string)); } -#line 2095 "yacc_sql.cpp" +#line 2102 "yacc_sql.cpp" break; case 48: /* attr_def: ID type nullable_constraint */ -#line 454 "yacc_sql.y" +#line 461 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { - (yyval.attr_info)->length = 4; + (yyval.attr_info)->length = sizeof(int); } else if ((yyval.attr_info)->type == AttrType::FLOATS) { - (yyval.attr_info)->length = 4; + (yyval.attr_info)->length = sizeof(float); } else if ((yyval.attr_info)->type == AttrType::DATES) { - (yyval.attr_info)->length = 4; + (yyval.attr_info)->length = sizeof(int); } else if ((yyval.attr_info)->type == AttrType::CHARS) { - (yyval.attr_info)->length = 4; + (yyval.attr_info)->length = 4; // miniob🀄AttrType::CHARS默认长度为4 } else if ((yyval.attr_info)->type == AttrType::TEXTS) { (yyval.attr_info)->length = 65535; } else { @@ -2119,73 +2126,79 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2123 "yacc_sql.cpp" +#line 2130 "yacc_sql.cpp" break; case 49: /* nullable_constraint: NOT NULL_T */ -#line 481 "yacc_sql.y" +#line 488 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2131 "yacc_sql.cpp" +#line 2138 "yacc_sql.cpp" break; case 50: /* nullable_constraint: NULLABLE */ -#line 485 "yacc_sql.y" +#line 492 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2139 "yacc_sql.cpp" +#line 2146 "yacc_sql.cpp" break; case 51: /* nullable_constraint: NULL_T */ -#line 489 "yacc_sql.y" +#line 496 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2147 "yacc_sql.cpp" +#line 2154 "yacc_sql.cpp" break; case 52: /* nullable_constraint: %empty */ -#line 493 "yacc_sql.y" +#line 500 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2155 "yacc_sql.cpp" +#line 2162 "yacc_sql.cpp" break; case 53: /* type: INT_T */ -#line 499 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::INTS); } -#line 2161 "yacc_sql.cpp" +#line 506 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::INTS); } +#line 2168 "yacc_sql.cpp" break; case 54: /* type: STRING_T */ -#line 500 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2167 "yacc_sql.cpp" +#line 507 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::CHARS); } +#line 2174 "yacc_sql.cpp" break; case 55: /* type: FLOAT_T */ -#line 501 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2173 "yacc_sql.cpp" +#line 508 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::FLOATS); } +#line 2180 "yacc_sql.cpp" break; case 56: /* type: DATE_T */ -#line 502 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::DATES); } -#line 2179 "yacc_sql.cpp" +#line 509 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 2186 "yacc_sql.cpp" break; case 57: /* type: TEXT_T */ -#line 503 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2185 "yacc_sql.cpp" +#line 510 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::TEXTS); } +#line 2192 "yacc_sql.cpp" break; - case 58: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 508 "yacc_sql.y" + case 58: /* type: VECTOR_T */ +#line 511 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::VECTORS); } +#line 2198 "yacc_sql.cpp" + break; + + case 59: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 516 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2195,128 +2208,128 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2199 "yacc_sql.cpp" +#line 2212 "yacc_sql.cpp" break; - case 59: /* values_list: LBRACE value_list RBRACE */ -#line 521 "yacc_sql.y" + case 60: /* values_list: LBRACE value_list RBRACE */ +#line 529 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2209 "yacc_sql.cpp" +#line 2222 "yacc_sql.cpp" break; - case 60: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 527 "yacc_sql.y" + case 61: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 535 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2218 "yacc_sql.cpp" +#line 2231 "yacc_sql.cpp" break; - case 61: /* value_list: value */ -#line 534 "yacc_sql.y" + case 62: /* value_list: value */ +#line 542 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2228 "yacc_sql.cpp" +#line 2241 "yacc_sql.cpp" break; - case 62: /* value_list: value_list COMMA value */ -#line 540 "yacc_sql.y" + case 63: /* value_list: value_list COMMA value */ +#line 548 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2237 "yacc_sql.cpp" +#line 2250 "yacc_sql.cpp" break; - case 63: /* value: nonnegative_value */ -#line 547 "yacc_sql.y" + case 64: /* value: nonnegative_value */ +#line 555 "yacc_sql.y" { (yyval.value) = (yyvsp[0].value); } -#line 2245 "yacc_sql.cpp" +#line 2258 "yacc_sql.cpp" break; - case 64: /* value: '-' NUMBER */ -#line 550 "yacc_sql.y" + case 65: /* value: '-' NUMBER */ +#line 558 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2254 "yacc_sql.cpp" +#line 2267 "yacc_sql.cpp" break; - case 65: /* value: '-' FLOAT */ -#line 554 "yacc_sql.y" + case 66: /* value: '-' FLOAT */ +#line 562 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2263 "yacc_sql.cpp" +#line 2276 "yacc_sql.cpp" break; - case 66: /* nonnegative_value: NUMBER */ -#line 561 "yacc_sql.y" + case 67: /* nonnegative_value: NUMBER */ +#line 569 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2272 "yacc_sql.cpp" +#line 2285 "yacc_sql.cpp" break; - case 67: /* nonnegative_value: FLOAT */ -#line 565 "yacc_sql.y" + case 68: /* nonnegative_value: FLOAT */ +#line 573 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2281 "yacc_sql.cpp" +#line 2294 "yacc_sql.cpp" break; - case 68: /* nonnegative_value: SSS */ -#line 569 "yacc_sql.y" + case 69: /* nonnegative_value: SSS */ +#line 577 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2292 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; - case 69: /* nonnegative_value: NULL_T */ -#line 575 "yacc_sql.y" + case 70: /* nonnegative_value: NULL_T */ +#line 583 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2300 "yacc_sql.cpp" +#line 2313 "yacc_sql.cpp" break; - case 70: /* storage_format: %empty */ -#line 582 "yacc_sql.y" + case 71: /* storage_format: %empty */ +#line 590 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2308 "yacc_sql.cpp" +#line 2321 "yacc_sql.cpp" break; - case 71: /* storage_format: STORAGE FORMAT EQ ID */ -#line 586 "yacc_sql.y" + case 72: /* storage_format: STORAGE FORMAT EQ ID */ +#line 594 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2316 "yacc_sql.cpp" +#line 2329 "yacc_sql.cpp" break; - case 72: /* delete_stmt: DELETE FROM ID where */ -#line 593 "yacc_sql.y" + case 73: /* delete_stmt: DELETE FROM ID where */ +#line 601 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2325,11 +2338,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2329 "yacc_sql.cpp" +#line 2342 "yacc_sql.cpp" break; - case 73: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 605 "yacc_sql.y" + case 74: /* update_stmt: UPDATE ID SET set_clauses where */ +#line 613 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2340,39 +2353,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2344 "yacc_sql.cpp" +#line 2357 "yacc_sql.cpp" break; - case 74: /* set_clauses: setClause */ -#line 619 "yacc_sql.y" + case 75: /* set_clauses: setClause */ +#line 627 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2353 "yacc_sql.cpp" +#line 2366 "yacc_sql.cpp" break; - case 75: /* set_clauses: set_clauses COMMA setClause */ -#line 624 "yacc_sql.y" + case 76: /* set_clauses: set_clauses COMMA setClause */ +#line 632 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2361 "yacc_sql.cpp" +#line 2374 "yacc_sql.cpp" break; - case 76: /* setClause: ID EQ expression */ -#line 631 "yacc_sql.y" + case 77: /* setClause: ID EQ expression */ +#line 639 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2372 "yacc_sql.cpp" +#line 2385 "yacc_sql.cpp" break; - case 77: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ -#line 641 "yacc_sql.y" + case 78: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ +#line 649 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-6].expression_list) != nullptr) { @@ -2405,11 +2418,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].orderby_list); } } -#line 2409 "yacc_sql.cpp" +#line 2422 "yacc_sql.cpp" break; - case 78: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 674 "yacc_sql.y" + case 79: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ +#line 682 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2439,39 +2452,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2443 "yacc_sql.cpp" +#line 2456 "yacc_sql.cpp" break; - case 79: /* calc_stmt: CALC expression_list */ -#line 707 "yacc_sql.y" + case 80: /* calc_stmt: CALC expression_list */ +#line 715 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2453 "yacc_sql.cpp" +#line 2466 "yacc_sql.cpp" break; - case 80: /* calc_stmt: SELECT expression_list */ -#line 713 "yacc_sql.y" + case 81: /* calc_stmt: SELECT expression_list */ +#line 721 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2463 "yacc_sql.cpp" +#line 2476 "yacc_sql.cpp" break; - case 81: /* expression_list: %empty */ -#line 721 "yacc_sql.y" + case 82: /* expression_list: %empty */ +#line 729 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2471 "yacc_sql.cpp" +#line 2484 "yacc_sql.cpp" break; - case 82: /* expression_list: expression alias */ -#line 725 "yacc_sql.y" + case 83: /* expression_list: expression alias */ +#line 733 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2480,11 +2493,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2484 "yacc_sql.cpp" +#line 2497 "yacc_sql.cpp" break; - case 83: /* expression_list: expression alias COMMA expression_list */ -#line 734 "yacc_sql.y" + case 84: /* expression_list: expression alias COMMA expression_list */ +#line 742 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2497,43 +2510,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2501 "yacc_sql.cpp" +#line 2514 "yacc_sql.cpp" break; - case 84: /* expression: expression '+' expression */ -#line 749 "yacc_sql.y" + case 85: /* expression: expression '+' expression */ +#line 757 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2509 "yacc_sql.cpp" +#line 2522 "yacc_sql.cpp" break; - case 85: /* expression: expression '-' expression */ -#line 752 "yacc_sql.y" + case 86: /* expression: expression '-' expression */ +#line 760 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2517 "yacc_sql.cpp" +#line 2530 "yacc_sql.cpp" break; - case 86: /* expression: expression '*' expression */ -#line 755 "yacc_sql.y" + case 87: /* expression: expression '*' expression */ +#line 763 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2525 "yacc_sql.cpp" +#line 2538 "yacc_sql.cpp" break; - case 87: /* expression: expression '/' expression */ -#line 758 "yacc_sql.y" + case 88: /* expression: expression '/' expression */ +#line 766 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2533 "yacc_sql.cpp" +#line 2546 "yacc_sql.cpp" break; - case 88: /* expression: LBRACE expression_list RBRACE */ -#line 761 "yacc_sql.y" + case 89: /* expression: LBRACE expression_list RBRACE */ +#line 769 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2542,122 +2555,122 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2546 "yacc_sql.cpp" +#line 2559 "yacc_sql.cpp" break; - case 89: /* expression: '-' expression */ -#line 769 "yacc_sql.y" + case 90: /* expression: '-' expression */ +#line 777 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2554 "yacc_sql.cpp" +#line 2567 "yacc_sql.cpp" break; - case 90: /* expression: nonnegative_value */ -#line 772 "yacc_sql.y" + case 91: /* expression: nonnegative_value */ +#line 780 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2564 "yacc_sql.cpp" +#line 2577 "yacc_sql.cpp" break; - case 91: /* expression: rel_attr */ -#line 777 "yacc_sql.y" + case 92: /* expression: rel_attr */ +#line 785 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2575 "yacc_sql.cpp" +#line 2588 "yacc_sql.cpp" break; - case 92: /* expression: '*' */ -#line 783 "yacc_sql.y" + case 93: /* expression: '*' */ +#line 791 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2583 "yacc_sql.cpp" +#line 2596 "yacc_sql.cpp" break; - case 93: /* expression: ID DOT '*' */ -#line 786 "yacc_sql.y" + case 94: /* expression: ID DOT '*' */ +#line 794 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2591 "yacc_sql.cpp" +#line 2604 "yacc_sql.cpp" break; - case 94: /* expression: aggr_func_expr */ -#line 789 "yacc_sql.y" + case 95: /* expression: aggr_func_expr */ +#line 797 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2599 "yacc_sql.cpp" +#line 2612 "yacc_sql.cpp" break; - case 95: /* expression: sub_query_expr */ -#line 792 "yacc_sql.y" + case 96: /* expression: sub_query_expr */ +#line 800 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2607 "yacc_sql.cpp" +#line 2620 "yacc_sql.cpp" break; - case 96: /* alias: %empty */ -#line 799 "yacc_sql.y" + case 97: /* alias: %empty */ +#line 807 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2615 "yacc_sql.cpp" +#line 2628 "yacc_sql.cpp" break; - case 97: /* alias: ID */ -#line 802 "yacc_sql.y" + case 98: /* alias: ID */ +#line 810 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2623 "yacc_sql.cpp" +#line 2636 "yacc_sql.cpp" break; - case 98: /* alias: AS ID */ -#line 805 "yacc_sql.y" + case 99: /* alias: AS ID */ +#line 813 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2631 "yacc_sql.cpp" +#line 2644 "yacc_sql.cpp" break; - case 99: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 811 "yacc_sql.y" + case 100: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 819 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2639 "yacc_sql.cpp" +#line 2652 "yacc_sql.cpp" break; - case 100: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 818 "yacc_sql.y" + case 101: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 826 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2647 "yacc_sql.cpp" +#line 2660 "yacc_sql.cpp" break; - case 101: /* rel_attr: ID */ -#line 824 "yacc_sql.y" + case 102: /* rel_attr: ID */ +#line 832 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2657 "yacc_sql.cpp" +#line 2670 "yacc_sql.cpp" break; - case 102: /* rel_attr: ID DOT ID */ -#line 829 "yacc_sql.y" + case 103: /* rel_attr: ID DOT ID */ +#line 837 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2665,19 +2678,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2669 "yacc_sql.cpp" +#line 2682 "yacc_sql.cpp" break; - case 103: /* relation: ID */ -#line 839 "yacc_sql.y" + case 104: /* relation: ID */ +#line 847 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2677 "yacc_sql.cpp" +#line 2690 "yacc_sql.cpp" break; - case 104: /* rel_list: relation alias */ -#line 845 "yacc_sql.y" + case 105: /* rel_list: relation alias */ +#line 853 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2688,11 +2701,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2692 "yacc_sql.cpp" +#line 2705 "yacc_sql.cpp" break; - case 105: /* rel_list: relation alias COMMA rel_list */ -#line 855 "yacc_sql.y" + case 106: /* rel_list: relation alias COMMA rel_list */ +#line 863 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2707,22 +2720,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2711 "yacc_sql.cpp" +#line 2724 "yacc_sql.cpp" break; - case 106: /* join_clauses: relation ON condition */ -#line 873 "yacc_sql.y" + case 107: /* join_clauses: relation ON condition */ +#line 881 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2722 "yacc_sql.cpp" +#line 2735 "yacc_sql.cpp" break; - case 107: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 880 "yacc_sql.y" + case 108: /* join_clauses: relation ON condition INNER JOIN join_clauses */ +#line 888 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2730,243 +2743,243 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2734 "yacc_sql.cpp" +#line 2747 "yacc_sql.cpp" break; - case 108: /* where: %empty */ -#line 891 "yacc_sql.y" + case 109: /* where: %empty */ +#line 899 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2742 "yacc_sql.cpp" +#line 2755 "yacc_sql.cpp" break; - case 109: /* where: WHERE condition */ -#line 894 "yacc_sql.y" + case 110: /* where: WHERE condition */ +#line 902 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2750 "yacc_sql.cpp" +#line 2763 "yacc_sql.cpp" break; - case 110: /* condition: expression comp_op expression */ -#line 901 "yacc_sql.y" + case 111: /* condition: expression comp_op expression */ +#line 909 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2758 "yacc_sql.cpp" +#line 2771 "yacc_sql.cpp" break; - case 111: /* condition: comp_op expression */ -#line 905 "yacc_sql.y" + case 112: /* condition: comp_op expression */ +#line 913 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2769 "yacc_sql.cpp" +#line 2782 "yacc_sql.cpp" break; - case 112: /* condition: condition AND condition */ -#line 912 "yacc_sql.y" + case 113: /* condition: condition AND condition */ +#line 920 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2777 "yacc_sql.cpp" +#line 2790 "yacc_sql.cpp" break; - case 113: /* condition: condition OR condition */ -#line 916 "yacc_sql.y" + case 114: /* condition: condition OR condition */ +#line 924 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2785 "yacc_sql.cpp" +#line 2798 "yacc_sql.cpp" break; - case 114: /* comp_op: EQ */ -#line 922 "yacc_sql.y" + case 115: /* comp_op: EQ */ +#line 930 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2791 "yacc_sql.cpp" +#line 2804 "yacc_sql.cpp" break; - case 115: /* comp_op: LT */ -#line 923 "yacc_sql.y" + case 116: /* comp_op: LT */ +#line 931 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2797 "yacc_sql.cpp" +#line 2810 "yacc_sql.cpp" break; - case 116: /* comp_op: GT */ -#line 924 "yacc_sql.y" + case 117: /* comp_op: GT */ +#line 932 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2803 "yacc_sql.cpp" +#line 2816 "yacc_sql.cpp" break; - case 117: /* comp_op: LE */ -#line 925 "yacc_sql.y" + case 118: /* comp_op: LE */ +#line 933 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2809 "yacc_sql.cpp" +#line 2822 "yacc_sql.cpp" break; - case 118: /* comp_op: GE */ -#line 926 "yacc_sql.y" + case 119: /* comp_op: GE */ +#line 934 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2815 "yacc_sql.cpp" +#line 2828 "yacc_sql.cpp" break; - case 119: /* comp_op: NE */ -#line 927 "yacc_sql.y" + case 120: /* comp_op: NE */ +#line 935 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2821 "yacc_sql.cpp" +#line 2834 "yacc_sql.cpp" break; - case 120: /* comp_op: IS */ -#line 928 "yacc_sql.y" + case 121: /* comp_op: IS */ +#line 936 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2827 "yacc_sql.cpp" +#line 2840 "yacc_sql.cpp" break; - case 121: /* comp_op: IS NOT */ -#line 929 "yacc_sql.y" + case 122: /* comp_op: IS NOT */ +#line 937 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2833 "yacc_sql.cpp" +#line 2846 "yacc_sql.cpp" break; - case 122: /* comp_op: LIKE */ -#line 930 "yacc_sql.y" + case 123: /* comp_op: LIKE */ +#line 938 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2839 "yacc_sql.cpp" +#line 2852 "yacc_sql.cpp" break; - case 123: /* comp_op: NOT LIKE */ -#line 931 "yacc_sql.y" + case 124: /* comp_op: NOT LIKE */ +#line 939 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2845 "yacc_sql.cpp" +#line 2858 "yacc_sql.cpp" break; - case 124: /* comp_op: IN */ -#line 932 "yacc_sql.y" + case 125: /* comp_op: IN */ +#line 940 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2851 "yacc_sql.cpp" +#line 2864 "yacc_sql.cpp" break; - case 125: /* comp_op: NOT IN */ -#line 933 "yacc_sql.y" + case 126: /* comp_op: NOT IN */ +#line 941 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2857 "yacc_sql.cpp" +#line 2870 "yacc_sql.cpp" break; - case 126: /* comp_op: EXISTS */ -#line 934 "yacc_sql.y" + case 127: /* comp_op: EXISTS */ +#line 942 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2863 "yacc_sql.cpp" +#line 2876 "yacc_sql.cpp" break; - case 127: /* comp_op: NOT EXISTS */ -#line 935 "yacc_sql.y" + case 128: /* comp_op: NOT EXISTS */ +#line 943 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2869 "yacc_sql.cpp" +#line 2882 "yacc_sql.cpp" break; - case 128: /* opt_order_by: %empty */ -#line 940 "yacc_sql.y" + case 129: /* opt_order_by: %empty */ +#line 948 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2877 "yacc_sql.cpp" +#line 2890 "yacc_sql.cpp" break; - case 129: /* opt_order_by: ORDER BY sort_list */ -#line 944 "yacc_sql.y" + case 130: /* opt_order_by: ORDER BY sort_list */ +#line 952 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2886 "yacc_sql.cpp" +#line 2899 "yacc_sql.cpp" break; - case 130: /* sort_list: sort_unit */ -#line 952 "yacc_sql.y" + case 131: /* sort_list: sort_unit */ +#line 960 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2895 "yacc_sql.cpp" +#line 2908 "yacc_sql.cpp" break; - case 131: /* sort_list: sort_unit COMMA sort_list */ -#line 957 "yacc_sql.y" + case 132: /* sort_list: sort_unit COMMA sort_list */ +#line 965 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2904 "yacc_sql.cpp" +#line 2917 "yacc_sql.cpp" break; - case 132: /* sort_unit: expression */ -#line 965 "yacc_sql.y" + case 133: /* sort_unit: expression */ +#line 973 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2914 "yacc_sql.cpp" +#line 2927 "yacc_sql.cpp" break; - case 133: /* sort_unit: expression DESC */ -#line 971 "yacc_sql.y" + case 134: /* sort_unit: expression DESC */ +#line 979 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2924 "yacc_sql.cpp" +#line 2937 "yacc_sql.cpp" break; - case 134: /* sort_unit: expression ASC */ -#line 977 "yacc_sql.y" + case 135: /* sort_unit: expression ASC */ +#line 985 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2934 "yacc_sql.cpp" +#line 2947 "yacc_sql.cpp" break; - case 135: /* group_by: %empty */ -#line 986 "yacc_sql.y" + case 136: /* group_by: %empty */ +#line 994 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2942 "yacc_sql.cpp" +#line 2955 "yacc_sql.cpp" break; - case 136: /* group_by: GROUP BY expression_list */ -#line 990 "yacc_sql.y" + case 137: /* group_by: GROUP BY expression_list */ +#line 998 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2950 "yacc_sql.cpp" +#line 2963 "yacc_sql.cpp" break; - case 137: /* opt_having: %empty */ -#line 997 "yacc_sql.y" + case 138: /* opt_having: %empty */ +#line 1005 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2958 "yacc_sql.cpp" +#line 2971 "yacc_sql.cpp" break; - case 138: /* opt_having: HAVING condition */ -#line 1001 "yacc_sql.y" + case 139: /* opt_having: HAVING condition */ +#line 1009 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2966 "yacc_sql.cpp" +#line 2979 "yacc_sql.cpp" break; - case 139: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 1008 "yacc_sql.y" + case 140: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 1016 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -2976,20 +2989,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2980 "yacc_sql.cpp" +#line 2993 "yacc_sql.cpp" break; - case 140: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1021 "yacc_sql.y" + case 141: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1029 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 2989 "yacc_sql.cpp" +#line 3002 "yacc_sql.cpp" break; - case 141: /* set_variable_stmt: SET ID EQ value */ -#line 1029 "yacc_sql.y" + case 142: /* set_variable_stmt: SET ID EQ value */ +#line 1037 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -2997,11 +3010,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3001 "yacc_sql.cpp" +#line 3014 "yacc_sql.cpp" break; -#line 3005 "yacc_sql.cpp" +#line 3018 "yacc_sql.cpp" default: break; } @@ -3230,7 +3243,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1041 "yacc_sql.y" +#line 1049 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index ab5432eb..0ccfcb18 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -446,8 +446,10 @@ attr_def: $$->type = (AttrType)$2; if ($$->type == AttrType::CHARS) { $$->length = $4; - } else { //vector - $$->length = 4*$4; + } else if ($$->type == AttrType::VECTORS) { + $$->length = sizeof(float) * $4; + } else { + ASSERT(false, "$$->type is invalid."); } $$->nullable = $6; if ($$->nullable) { @@ -461,13 +463,13 @@ attr_def: $$->type = (AttrType)$2; $$->name = $1; if ($$->type == AttrType::INTS) { - $$->length = 4; + $$->length = sizeof(int); } else if ($$->type == AttrType::FLOATS) { - $$->length = 4; + $$->length = sizeof(float); } else if ($$->type == AttrType::DATES) { - $$->length = 4; + $$->length = sizeof(int); } else if ($$->type == AttrType::CHARS) { - $$->length = 4; + $$->length = 4; // miniob🀄AttrType::CHARS默认长度为4 } else if ($$->type == AttrType::TEXTS) { $$->length = 65535; } else { @@ -506,7 +508,7 @@ type: | FLOAT_T { $$ = static_cast(AttrType::FLOATS); } | DATE_T { $$ = static_cast(AttrType::DATES); } | TEXT_T { $$ = static_cast(AttrType::TEXTS); } - | VECTOR_T { $$ = static_cast(AttrType::VECTOR); } + | VECTOR_T { $$ = static_cast(AttrType::VECTORS); } ; insert_stmt: /*insert 语句的语法解析树*/ diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 54cc88a2..28f703b9 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -362,7 +362,7 @@ RC Table::set_value_to_record(char *record_data, const Value &value, const Field copy_len = data_len + 1; } } - if (field->type() == AttrType::VECTOR) { + if (field->type() == AttrType::VECTORS) { if (copy_len > data_len) { copy_len = data_len; } From cb18d5c4e68c8f42f72d44bee7ad8cdff683cb57 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 15 Oct 2024 15:16:21 +0800 Subject: [PATCH 242/308] =?UTF-8?q?TupleCellSpec=20=E6=96=B0=E5=A2=9Ehash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/tuple.h | 2 +- src/observer/sql/expr/tuple_cell.cpp | 4 +++- src/observer/sql/expr/tuple_cell.h | 21 +++++++++++++++++++-- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index 0589f627..1aa2a850 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -364,7 +364,7 @@ class ValueListTuple : public Tuple const int size = static_cast(specs_.size()); for (int i = 0; i < size; i++) { - if (specs_[i].equals(spec)) { + if (specs_[i] == spec) { cell = cells_[i]; return RC::SUCCESS; } diff --git a/src/observer/sql/expr/tuple_cell.cpp b/src/observer/sql/expr/tuple_cell.cpp index c0f111d5..94f4a7c3 100644 --- a/src/observer/sql/expr/tuple_cell.cpp +++ b/src/observer/sql/expr/tuple_cell.cpp @@ -34,6 +34,7 @@ TupleCellSpec::TupleCellSpec(const char *table_name, const char *field_name, con alias_ = table_name_ + "." + field_name_; } } + init_hash(); } TupleCellSpec::TupleCellSpec(const char *alias) @@ -41,6 +42,7 @@ TupleCellSpec::TupleCellSpec(const char *alias) if (alias) { alias_ = alias; } + init_hash(); } -TupleCellSpec::TupleCellSpec(const string &alias) : alias_(alias) {} +TupleCellSpec::TupleCellSpec(const string &alias) : alias_(alias) { init_hash(); } diff --git a/src/observer/sql/expr/tuple_cell.h b/src/observer/sql/expr/tuple_cell.h index b9ba210e..58bacdd7 100644 --- a/src/observer/sql/expr/tuple_cell.h +++ b/src/observer/sql/expr/tuple_cell.h @@ -29,13 +29,30 @@ class TupleCellSpec final const char *field_name() const { return field_name_.c_str(); } const char *alias() const { return alias_.c_str(); } - bool equals(const TupleCellSpec &other) const + bool alias_empty() const { return alias_.size() == 0; } + bool table_field_empty() const { return table_name_.size() + field_name_.size() == 0; } + + bool operator==(const TupleCellSpec &other) const { - return table_name_ == other.table_name_ && field_name_ == other.field_name_ && alias_ == other.alias_; + return (!alias_empty() && !other.alias_empty() && alias_hash_ == other.alias_hash_ && alias_ == other.alias_) || + (!table_field_empty() && !other.table_field_empty() && table_name_hash_ == other.table_name_hash_ && + field_name_hash_ == other.field_name_hash_ && table_name_ == other.table_name_ && + field_name_ == other.field_name_); } private: std::string table_name_; std::string field_name_; std::string alias_; + + std::size_t table_name_hash_; + std::size_t field_name_hash_; + std::size_t alias_hash_; + + void init_hash() + { + table_name_hash_ = std::hash()(table_name_); + field_name_hash_ = std::hash()(field_name_); + alias_hash_ = std::hash()(alias_); + } }; From 7a30277af95ba4bd9061b4c903374ad1874bb070 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 15 Oct 2024 15:35:07 +0800 Subject: [PATCH 243/308] =?UTF-8?q?OceanBase=20=E5=AE=8C=E5=85=A8=E8=87=AA?= =?UTF-8?q?=E4=B8=BB=E7=A0=94=E5=8F=91=EF=BC=8C=E5=B7=B2=E8=BF=9E=E7=BB=AD?= =?UTF-8?q?=2011=20=E5=B9=B4=E7=A8=B3=E5=AE=9A=E6=94=AF=E6=92=91=E5=8F=8C?= =?UTF-8?q?=2011=20=EF=BC=8C=E5=88=9B=E6=96=B0=E6=8E=A8=E5=87=BA=E2=80=9C?= =?UTF-8?q?=E4=B8=89=E5=9C=B0=E4=BA=94=E4=B8=AD=E5=BF=83=E2=80=9D=E5=9F=8E?= =?UTF-8?q?=E5=B8=82=E7=BA=A7=E5=AE=B9=E7=81=BE=E6=96=B0=E6=A0=87=E5=87=86?= =?UTF-8?q?=EF=BC=8C=E6=98=AF=E5=85=A8=E7=90=83=E5=94=AF=E4=B8=80=E5=9C=A8?= =?UTF-8?q?=20TPC-C=20=E5=92=8C=20TPC-H=20=E6=B5=8B=E8=AF=95=E4=B8=8A?= =?UTF-8?q?=E9=83=BD=E5=88=B7=E6=96=B0=E4=BA=86=E4=B8=96=E7=95=8C=E7=BA=AA?= =?UTF-8?q?=E5=BD=95=E7=9A=84=E5=8E=9F=E7=94=9F=E5=88=86=E5=B8=83=E5=BC=8F?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E3=80=82=E4=BA=A7=E5=93=81=E9=87=87?= =?UTF-8?q?=E7=94=A8=E8=87=AA=E7=A0=94=E7=9A=84=E4=B8=80=E4=BD=93=E5=8C=96?= =?UTF-8?q?=E6=9E=B6=E6=9E=84=EF=BC=8C=E5=85=BC=E9=A1=BE=E5=88=86=E5=B8=83?= =?UTF-8?q?=E5=BC=8F=E6=9E=B6=E6=9E=84=E7=9A=84=E6=89=A9=E5=B1=95=E6=80=A7?= =?UTF-8?q?=E4=B8=8E=E9=9B=86=E4=B8=AD=E5=BC=8F=E6=9E=B6=E6=9E=84=E7=9A=84?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E4=BC=98=E5=8A=BF=EF=BC=8C=E7=94=A8=E4=B8=80?= =?UTF-8?q?=E5=A5=97=E5=BC=95=E6=93=8E=E5=90=8C=E6=97=B6=E6=94=AF=E6=8C=81?= =?UTF-8?q?=20TP=20=E5=92=8C=20AP=20=E7=9A=84=E6=B7=B7=E5=90=88=E8=B4=9F?= =?UTF-8?q?=E8=BD=BD=EF=BC=8C=E5=85=B7=E6=9C=89=E6=95=B0=E6=8D=AE=E5=BC=BA?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E3=80=81=E9=AB=98=E5=8F=AF=E7=94=A8=E3=80=81?= =?UTF-8?q?=E9=AB=98=E6=80=A7=E8=83=BD=E3=80=81=E5=9C=A8=E7=BA=BF=E6=89=A9?= =?UTF-8?q?=E5=B1=95=E3=80=81=E9=AB=98=E5=BA=A6=E5=85=BC=E5=AE=B9=20Oracle?= =?UTF-8?q?/MySQL=E3=80=81=E5=AF=B9=E5=BA=94=E7=94=A8=E9=80=8F=E6=98=8E?= =?UTF-8?q?=E3=80=81=E9=AB=98=E6=80=A7=E4=BB=B7=E6=AF=94=E7=AD=89=E7=89=B9?= =?UTF-8?q?=E7=82=B9=E3=80=8214=20=E5=B9=B4=E6=8C=81=E7=BB=AD=E6=B7=B1?= =?UTF-8?q?=E8=80=95=E6=B5=B7=E9=87=8F=E6=A0=B8=E5=BF=83=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=EF=BC=8C=E5=B7=B2=E5=8A=A9=E5=8A=9B=E9=87=91=E8=9E=8D=E3=80=81?= =?UTF-8?q?=E6=94=BF=E5=8A=A1=E3=80=81=E8=BF=90=E8=90=A5=E5=95=86=E3=80=81?= =?UTF-8?q?=E9=9B=B6=E5=94=AE=E3=80=81=E4=BA=92=E8=81=94=E7=BD=91=E7=AD=89?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E8=A1=8C=E4=B8=9A=E7=9A=84=201000+=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AE=9E=E7=8E=B0=E5=85=B3=E9=94=AE=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E7=B3=BB=E7=BB=9F=E5=8D=87=E7=BA=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/utils.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/observer/common/utils.cpp b/src/observer/common/utils.cpp index 37573a9d..c2013537 100644 --- a/src/observer/common/utils.cpp +++ b/src/observer/common/utils.cpp @@ -81,7 +81,6 @@ RC parse_vector_from_string(const char *str, float *&array, size_t &length) } // 分配数组内存 - //f array = new float[count]; length = count * sizeof(float); From 8e5e2c555eb1e12dbdbf88ee29579a1b62cf8b30 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 15 Oct 2024 15:52:20 +0800 Subject: [PATCH 244/308] use string::empty() --- src/observer/sql/expr/tuple_cell.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/expr/tuple_cell.h b/src/observer/sql/expr/tuple_cell.h index 58bacdd7..78632aaf 100644 --- a/src/observer/sql/expr/tuple_cell.h +++ b/src/observer/sql/expr/tuple_cell.h @@ -29,8 +29,8 @@ class TupleCellSpec final const char *field_name() const { return field_name_.c_str(); } const char *alias() const { return alias_.c_str(); } - bool alias_empty() const { return alias_.size() == 0; } - bool table_field_empty() const { return table_name_.size() + field_name_.size() == 0; } + bool alias_empty() const { return alias_.empty(); } + bool table_field_empty() const { return table_name_.empty() && field_name_.empty(); } bool operator==(const TupleCellSpec &other) const { From c1ce3934b7ce16fe5d4921eb2da9b5686e33e09c Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 15 Oct 2024 19:48:32 +0800 Subject: [PATCH 245/308] =?UTF-8?q?=E6=96=B0=E5=A2=9Eorder=5Fby=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/obclient/client_order_by.cpp | 261 +++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 src/obclient/client_order_by.cpp diff --git a/src/obclient/client_order_by.cpp b/src/obclient/client_order_by.cpp new file mode 100644 index 00000000..b6248aed --- /dev/null +++ b/src/obclient/client_order_by.cpp @@ -0,0 +1,261 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common/defs.h" +#include "common/lang/string.h" + +#ifdef USE_READLINE +#include "readline/history.h" +#include "readline/readline.h" +#endif + +#define MAX_MEM_BUFFER_SIZE 131072 +#define PORT_DEFAULT 6789 + +using namespace std; +using namespace common; + +#ifdef USE_READLINE +const string HISTORY_FILE = string(getenv("HOME")) + "/.miniob.history"; +time_t last_history_write_time = 0; + +char *my_readline(const char *prompt) +{ + int size = history_length; + if (size == 0) { + read_history(HISTORY_FILE.c_str()); + + FILE *fp = fopen(HISTORY_FILE.c_str(), "a"); + if (fp != nullptr) { + fclose(fp); + } + } + + char *line = readline(prompt); + if (line != nullptr && line[0] != 0) { + add_history(line); + if (time(NULL) - last_history_write_time > 5) { + write_history(HISTORY_FILE.c_str()); + } + } + return line; +} +#else // USE_READLINE +char *my_readline(const char *prompt) +{ + char *buffer = (char *)malloc(MAX_MEM_BUFFER_SIZE); + if (nullptr == buffer) { + fprintf(stderr, "failed to alloc line buffer"); + return nullptr; + } + fprintf(stdout, "%s", prompt); + char *s = fgets(buffer, MAX_MEM_BUFFER_SIZE, stdin); + if (nullptr == s) { + fprintf(stderr, "failed to read message from console"); + free(buffer); + return nullptr; + } + return buffer; +} +#endif // USE_READLINE + +bool is_exit_command(const char *cmd) +{ + return 0 == strncasecmp("exit", cmd, 4) || 0 == strncasecmp("bye", cmd, 3) || 0 == strncasecmp("\\q", cmd, 2); +} + +int init_unix_sock(const char *unix_sock_path) +{ + int sockfd = socket(PF_UNIX, SOCK_STREAM, 0); + if (sockfd < 0) { + fprintf(stderr, "failed to create unix socket. %s", strerror(errno)); + return -1; + } + + struct sockaddr_un sockaddr; + memset(&sockaddr, 0, sizeof(sockaddr)); + sockaddr.sun_family = PF_UNIX; + snprintf(sockaddr.sun_path, sizeof(sockaddr.sun_path), "%s", unix_sock_path); + + if (connect(sockfd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { + fprintf(stderr, "failed to connect to server. unix socket path '%s'. error %s", sockaddr.sun_path, strerror(errno)); + close(sockfd); + return -1; + } + return sockfd; +} + +int init_tcp_sock(const char *server_host, int server_port) +{ + struct hostent *host; + struct sockaddr_in serv_addr; + + if ((host = gethostbyname(server_host)) == NULL) { + fprintf(stderr, "gethostbyname failed. errmsg=%d:%s\n", errno, strerror(errno)); + return -1; + } + + int sockfd; + if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) { + fprintf(stderr, "create socket error. errmsg=%d:%s\n", errno, strerror(errno)); + return -1; + } + + serv_addr.sin_family = AF_INET; + serv_addr.sin_port = htons(server_port); + serv_addr.sin_addr = *((struct in_addr *)host->h_addr); + bzero(&(serv_addr.sin_zero), 8); + + if (connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(struct sockaddr)) == -1) { + fprintf(stderr, "Failed to connect. errmsg=%d:%s\n", errno, strerror(errno)); + close(sockfd); + return -1; + } + return sockfd; +} + +const char *startup_tips = R"( +Welcome to the OceanBase database implementation course. + +Copyright (c) 2021 OceanBase and/or its affiliates. + +Learn more about OceanBase at https://github.com/oceanbase/oceanbase +Learn more about MiniOB at https://github.com/oceanbase/miniob + +)"; + +// Function to send SQL query and receive response +void send_sql(int sockfd, const char *sql) +{ + char send_buf[MAX_MEM_BUFFER_SIZE]; + printf("Sending SQL: %s\n", sql); + + if (write(sockfd, sql, strlen(sql) + 1) == -1) { + fprintf(stderr, "send error: %d:%s \n", errno, strerror(errno)); + exit(1); + } + + memset(send_buf, 0, sizeof(send_buf)); + int len = 0; + while ((len = recv(sockfd, send_buf, MAX_MEM_BUFFER_SIZE, 0)) > 0) { + bool msg_end = false; + for (int i = 0; i < len; i++) { + if (0 == send_buf[i]) { + msg_end = true; + break; + } + printf("%c", send_buf[i]); + } + if (msg_end) { + break; + } + memset(send_buf, 0, MAX_MEM_BUFFER_SIZE); + } + + if (len < 0) { + fprintf(stderr, "Connection was broken: %s\n", strerror(errno)); + exit(1); + } else if (len == 0) { + printf("Connection closed by server.\n"); + exit(1); + } +} + +int main(int argc, char *argv[]) +{ + printf("%s", startup_tips); + + const char *unix_socket_path = nullptr; + const char *server_host = "127.0.0.1"; + int server_port = PORT_DEFAULT; + int opt; + extern char *optarg; + while ((opt = getopt(argc, argv, "s:h:p:")) > 0) { + switch (opt) { + case 's': unix_socket_path = optarg; break; + case 'p': server_port = atoi(optarg); break; + case 'h': server_host = optarg; break; + } + } + + int sockfd; + + if (unix_socket_path != nullptr) { + sockfd = init_unix_sock(unix_socket_path); + } else { + sockfd = init_tcp_sock(server_host, server_port); + } + if (sockfd < 0) { + return 1; + } + + // Send CREATE TABLE statements + send_sql(sockfd, "CREATE TABLE big_order_by_0 (id INT, addr CHAR(100), num INT, price FLOAT, birthday DATE);"); + send_sql(sockfd, "CREATE TABLE big_order_by_1 (id INT, addr CHAR(100), num INT, price FLOAT, birthday DATE);"); + send_sql(sockfd, "CREATE TABLE big_order_by_2 (id INT, addr CHAR(100), num INT, price FLOAT, birthday DATE);"); + send_sql(sockfd, "CREATE TABLE big_order_by_3 (id INT, addr CHAR(100), num INT, price FLOAT, birthday DATE);"); + + // Insert data (for simplicity, inserting a small amount of random data) + for (int i = 1; i <= 20; i++) { + char insert_sql[512]; + snprintf(insert_sql, + sizeof(insert_sql), + "INSERT INTO big_order_by_0 VALUES (%d, 'addr%d', %d, %.2f, '2022-01-01');", + i, + i, + rand() % 1000, + (float)(rand() % 10000) / 100); + send_sql(sockfd, insert_sql); + + snprintf(insert_sql, + sizeof(insert_sql), + "INSERT INTO big_order_by_1 VALUES (%d, 'addr%d', %d, %.2f, '2022-01-01');", + i, + i, + rand() % 1000, + (float)(rand() % 10000) / 100); + send_sql(sockfd, insert_sql); + + snprintf(insert_sql, + sizeof(insert_sql), + "INSERT INTO big_order_by_2 VALUES (%d, 'addr%d', %d, %.2f, '2022-01-01');", + i, + i, + rand() % 1000, + (float)(rand() % 10000) / 100); + send_sql(sockfd, insert_sql); + + snprintf(insert_sql, + sizeof(insert_sql), + "INSERT INTO big_order_by_3 VALUES (%d, 'addr%d', %d, %.2f, '2022-01-01');", + i, + i, + rand() % 1000, + (float)(rand() % 10000) / 100); + send_sql(sockfd, insert_sql); + } + + // Send the ORDER BY query + const char *order_by_sql = "SELECT * FROM big_order_by_0, big_order_by_1, big_order_by_2, big_order_by_3 " + "ORDER BY big_order_by_0.addr, big_order_by_2.num, big_order_by_0.price, " + "big_order_by_3.id, big_order_by_1.id, big_order_by_1.num, big_order_by_0.id, " + "big_order_by_0.birthday;"; + send_sql(sockfd, order_by_sql); + + // Close the socket + close(sockfd); + + return 0; +} \ No newline at end of file From 22c406fde343265135b1a32890d187111a1ea464 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 15 Oct 2024 20:52:08 +0800 Subject: [PATCH 246/308] =?UTF-8?q?=E6=94=B9=E7=94=A8=E5=A0=86=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- observer_2024-10-15-162851.collapsed | 2049 +++++++++++++++++ .../operator/order_by_physical_operator.cpp | 74 +- .../sql/operator/order_by_physical_operator.h | 11 +- 3 files changed, 2087 insertions(+), 47 deletions(-) create mode 100644 observer_2024-10-15-162851.collapsed diff --git a/observer_2024-10-15-162851.collapsed b/observer_2024-10-15-162851.collapsed new file mode 100644 index 00000000..ce742b38 --- /dev/null +++ b/observer_2024-10-15-162851.collapsed @@ -0,0 +1,2049 @@ +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup 12 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 2 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 3 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 74 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 8 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 2 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::LargeMmapAllocator::GetBlockBegin 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 9 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 3 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`madvise 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libsystem_platform.dylib`_platform_memset 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 5 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::UnmapOrDie;libsystem_kernel.dylib`__munmap 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 3 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 2 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 3 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`DiskDoubleWriteBuffer::~DiskDoubleWriteBuffer;libsystem_kernel.dylib`sync 27 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;libsystem_kernel.dylib`sync 36 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;observer`Table::sync;observer`DiskBufferPool::flush_all_pages;observer`DiskBufferPool::flush_page_internal 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;observer`Table::sync;observer`DiskBufferPool::flush_all_pages;observer`DiskBufferPool::flush_page_internal;observer`crc32 5 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;observer`Table::sync;observer`DiskBufferPool::flush_all_pages;observer`DiskBufferPool::flush_page_internal;observer`DiskDoubleWriteBuffer::add_page;libsystem_platform.dylib`_platform_memmove 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;observer`Table::sync;observer`DiskBufferPool::flush_all_pages;observer`DiskBufferPool::flush_page_internal;observer`DiskDoubleWriteBuffer::add_page;observer`DiskDoubleWriteBuffer::write_page_internal;observer`common::writen;libsystem_kernel.dylib`write 1 +id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;observer`DiskDoubleWriteBuffer::flush_page;observer`DiskDoubleWriteBuffer::write_page;observer`DiskBufferPool::write_page;observer`common::writen;libsystem_kernel.dylib`write 1 +id 为 171833 的线程;dyld`start;observer`main;observer`init;observer`init_global_objects;observer`DefaultHandler::init;observer`DefaultHandler::open_db;observer`Db::init;observer`Db::init_dblwr_buffer;libsystem_kernel.dylib`sync 27 +id 为 171833 的线程;dyld`start;observer`main;observer`init;observer`init_global_objects;observer`DefaultHandler::init;observer`DefaultHandler::open_db;observer`Db::init;observer`BufferPoolManager::BufferPoolManager;observer`common::MemPoolSimple::init;observer`common::MemPoolSimple::extend 4 +id 为 171833 的线程;dyld`start;observer`main;observer`init;observer`init_global_objects;observer`DefaultHandler::init;observer`DefaultHandler::open_db;observer`Db::init;observer`BufferPoolManager::BufferPoolManager;observer`common::MemPoolSimple::init;observer`common::MemPoolSimple::extend;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171833 的线程;dyld`start;observer`main;observer`init;observer`init_global_objects;observer`DefaultHandler::init;observer`DefaultHandler::open_db;observer`Db::init;observer`BufferPoolManager::BufferPoolManager;observer`common::MemPoolSimple::init;observer`common::MemPoolSimple::extend;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171833 的线程;dyld`start;observer`main;observer`init;observer`init_global_objects;observer`DefaultHandler::init;observer`DefaultHandler::open_db;observer`Db::init;observer`Db::open_all_tables;observer`common::list_file;libclang_rt.asan_osx_dynamic.dylib`wrap_opendir;libsystem_c.dylib`__opendir2;libclang_rt.asan_osx_dynamic.dylib`wrap_fstatfs 1 +id 为 171833 的线程;dyld`start;observer`main;observer`init;libclang_rt.asan_osx_dynamic.dylib`wrap_localtime_r;libsystem_c.dylib`localtime_r;libsystem_c.dylib`tzsetwall_basic;libsystem_c.dylib`notify_register_tz;libsystem_notify.dylib`notify_register_check;libsystem_notify.dylib`0x000000018980d344;libsystem_notify.dylib`0x000000018980ecc0;libdispatch.dylib`_dispatch_once_callout;libdispatch.dylib`_dispatch_client_callout;libsystem_notify.dylib`0x000000018980f53c;libxpc.dylib`bootstrap_look_up2;libxpc.dylib`bootstrap_look_up3;libxpc.dylib`_xpc_interface_routine;libxpc.dylib`_xpc_pipe_routine;libxpc.dylib`_xpc_pipe_pack_message;libxpc.dylib`_xpc_serializer_pack;libdispatch.dylib`dispatch_mach_msg_create;libdispatch.dylib`_os_object_alloc_realized;libobjc.A.dylib`class_createInstance;libsystem_malloc.dylib`_malloc_type_calloc_outlined;libclang_rt.asan_osx_dynamic.dylib`wrap_calloc;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_calloc;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171833 的线程;dyld`start;observer`main;observer`NetServer::serve;libsystem_kernel.dylib`poll 2 +id 为 171833 的线程;dyld`start;observer`main;observer`NetServer::serve;observer`OneThreadPerConnectionThreadHandler::~OneThreadPerConnectionThreadHandler;observer`OneThreadPerConnectionThreadHandler::~OneThreadPerConnectionThreadHandler;observer`OneThreadPerConnectionThreadHandler::await_stop;observer`common::Log::output;libc++.1.dylib`std::__1::basic_ostream::flush;libc++.1.dylib`std::__1::basic_filebuf::sync;libclang_rt.asan_osx_dynamic.dylib`wrap_fflush;libsystem_c.dylib`fflush;libsystem_pthread.dylib`pthread_mutex_lock 1 +id 为 171833 的线程;dyld`start;dyld`dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator();dyld`dyld4::prepare;dyld`dyld4::APIs::runAllInitializersForMain;dyld`dyld4::Loader::runInitializersBottomUpPlusUpwardLinks;dyld`dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator();dyld`dyld4::Loader::runInitializersBottomUp;dyld`dyld4::JustInTimeLoader::runInitializers;dyld`dyld4::Loader::findAndRunAllInitializers;dyld`dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void ;dyld`dyld3::MachOFile::forEachSection(void ;dyld`dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void ;dyld`invocation function for block in dyld3::MachOFile::forEachSection(void ;dyld`invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void ;observer`asan.module_ctor 2 +id 为 171833 的线程;libsystem_kernel.dylib`__exit 33 +id 为 171833 的线程;libsystem_kernel.dylib`poll 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables 24 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`common::compare_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$operator delete[](void*) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator() 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`DYLD-STUB$$__asan_set_shadow_f8 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$__asan_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 11 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::EnsureFreeArraySpace 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare;observer`common::compare_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IsRssLimitExceeded 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 11 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`common::compare_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_free_hook 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunFreeHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 14 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`DYLD-STUB$$__asan_set_shadow_00 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`common::compare_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector::__vdeallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`bool std::__1::__insertion_sort_incomplete[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IsRssLimitExceeded 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 19 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare;observer`common::compare_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`common::compare_float 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`DYLD-STUB$$__asan_set_shadow_f8 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator() 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__sort5_maybe_branchless[abi:ne180100]>, std::__1::vector>>*, 0>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__sort5_maybe_branchless[abi:ne180100]>, std::__1::vector>>*, 0>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$operator new[](unsigned long) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`common::compare_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::CanPoisonMemory 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`DYLD-STUB$$__asan_set_shadow_f8 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_malloc_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 17 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 27 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IsRssLimitExceeded 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::CanPoisonMemory 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 30 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 43 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator() 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_malloc_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IsRssLimitExceeded 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$operator new[](unsigned long) 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value 20 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec 29 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external 18 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 41 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 29 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 17 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external;libsystem_platform.dylib`_platform_strlen 14 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$strlen 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`DYLD-STUB$$operator new 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`DYLD-STUB$$memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`TupleCellSpec::init_hash 17 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`TupleCellSpec::init_hash;observer`std::__1::__murmur2_or_cityhash::operator()[abi:ne180100](void const*, unsigned long) const 44 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 24 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memset;libclang_rt.asan_osx_dynamic.dylib`__asan_region_is_poisoned;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::mem_is_zero 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memset;libclang_rt.asan_osx_dynamic.dylib`__asan_region_is_poisoned;libclang_rt.asan_osx_dynamic.dylib`__asan::MemToShadow 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::mem_is_zero 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libsystem_platform.dylib`_platform_memmove 42 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 37 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libsystem_platform.dylib`_platform_memset 31 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 30 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 25 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::__murmur2_or_cityhash::operator()[abi:ne180100](void const*, unsigned long) const 14 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_region_is_poisoned 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`DYLD-STUB$$__asan_memmove 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`DYLD-STUB$$strlen 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`DYLD-STUB$$memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 72 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strcmp 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`TableMeta::name 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`FieldMeta::name 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_weak_hook_strcmp 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;libsystem_platform.dylib`_platform_strnlen 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`DYLD-STUB$$strnlen 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`DYLD-STUB$$__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::offset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;libsystem_platform.dylib`_platform_memset 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`DYLD-STUB$$strcmp 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`DYLD-STUB$$__asan_set_shadow_00 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`FieldMeta::len 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`Value::set_data 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 52 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strcmp 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`TableMeta::name 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`FieldMeta::name 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_weak_hook_strcmp 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::type 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::offset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::nullable 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::len 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;libsystem_platform.dylib`_platform_memset 11 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`DYLD-STUB$$strcmp 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`DYLD-STUB$$__asan_set_shadow_f8 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`Value::set_data 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`FieldMeta::name 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 38 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strcmp 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`TableMeta::name 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`FieldMeta::name 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::offset 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::nullable 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;libsystem_platform.dylib`_platform_memset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`DYLD-STUB$$__asan_set_shadow_f8 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`Value::set_data 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`FieldMeta::len 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`FieldMeta::name 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IsRssLimitExceeded 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;libsystem_platform.dylib`_platform_memset 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`FieldMeta::nullable 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`FieldMeta::type 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`FieldMeta::len 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`DYLD-STUB$$__asan_set_shadow_00 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`FieldMeta::offset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::find_cell 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 27 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strcmp 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::find_cell;observer`FieldMeta::name 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 16 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libc++.1.dylib`std::__1::basic_string::append 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::init_hash 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`DYLD-STUB$$__asan_memmove 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`std::__1::basic_string::__assign_external 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`FieldMeta::name 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`DYLD-STUB$$__asan_memset 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TableMeta::name 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`DYLD-STUB$$__asan_memcpy 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`DYLD-STUB$$strcmp 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`DYLD-STUB$$__asan_set_shadow_f8 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 74 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`mach_absolute_time 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 43 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`DYLD-STUB$$os_unfair_lock_lock 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`DYLD-STUB$$free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strlen 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`printf_common 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`common::Log::check_output 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__ultoa 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`DYLD-STUB$$os_unfair_lock_unlock 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`localeconv_l 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__sfvwrite 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__ultoa 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::append 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::push_back 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`DYLD-STUB$$memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int;libc++.1.dylib`std::__1::locale::id::__get 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::basic_streambuf::xsputn 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`_vsnprintf 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ctype::do_widen 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::use_facet;libc++.1.dylib`std::__1::locale::id::__get 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_ostream::sentry::sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::locale::locale 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libsystem_platform.dylib`_platform_memmove 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`DYLD-STUB$$free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`localeconv_l 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__Bfree_D2A 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`printf_common;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libsystem_platform.dylib`_platform_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libsystem_platform.dylib`_platform_strlen 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::locale::use_facet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_streambuf::xsputn 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]() 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`DYLD-STUB$$__asan_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::ios_base::getloc 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`DYLD-STUB$$memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_streambuf::xsputn 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::locale::id::__get 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`DYLD-STUB$$free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::~sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;libc++.1.dylib`std::__1::__itoa::__base_10_u32[abi:ne180100](char*, unsigned int) 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;observer`Value::get_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;observer`DYLD-STUB$$__asan_set_shadow_f8 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libsystem_platform.dylib`_platform_memset 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libsystem_platform.dylib`_platform_memmove 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libc++.1.dylib`std::__1::locale::~locale 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libc++.1.dylib`std::__1::basic_ostream::~basic_ostream 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DYLD-STUB$$std::__1::basic_ios::~basic_ios 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DYLD-STUB$$std::__1::locale::~locale 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libc++.1.dylib`std::__1::locale::use_facet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`FieldMeta::offset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`FieldMeta::len 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`DYLD-STUB$$__asan_set_shadow_00 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`DYLD-STUB$$operator new 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`DYLD-STUB$$__asan_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_num 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`DYLD-STUB$$__asan_set_shadow_00 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;observer`RecordFileScanner::fetch_next_record_in_page;observer`RowRecordPageHandler::get_record 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;observer`RecordFileScanner::fetch_next_record_in_page;observer`RowRecordPageHandler::get_record;observer`common::Bitmap::get_bit 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;observer`RecordPageHandler::init;observer`DiskBufferPool::get_this_page;observer`BPFrameManager::get;observer`FrameId::FrameId 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;observer`RecordPageHandler::init;observer`DiskBufferPool::get_this_page;observer`BPFrameManager::get;observer`std::__1::__hash_iterator std::__1::__hash_table::find 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`common::Log::check_output 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libc++.1.dylib`std::__1::basic_string::append 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RowTuple::cell_at 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`DYLD-STUB$$__asan_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Value::to_string 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`TableScanPhysicalOperator::filter 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::open;observer`RowTuple::set_schema;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::open;observer`RowTuple::set_schema;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::open;observer`RowTuple::set_schema;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`DYLD-STUB$$operator delete 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`RecordFileScanner::close_scan;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value 26 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IncreaseTotalMmap 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::CanPoisonMemory 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 20 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libsystem_platform.dylib`_platform_memset 11 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`mach_absolute_time 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::UnmapOrDie;libsystem_kernel.dylib`__munmap 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunFreeHooks 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_free_hook 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&) 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value 20 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_malloc_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::CanPoisonMemory 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`DYLD-STUB$$__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 11 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`Value::Value 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`DYLD-STUB$$__sanitizer_annotate_contiguous_container 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);libclang_rt.asan_osx_dynamic.dylib`__asan_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector::__construct_at_end 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&) 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value 46 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`Value::Value 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]() 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset 24 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 26 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 14 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 11 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunFreeHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 20 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 11 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 14 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libsystem_pthread.dylib`pthread_getspecific 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunFreeHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&) 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_malloc_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);libsystem_platform.dylib`_platform_memset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]() 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset 14 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunFreeHooks 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::pair* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::pair* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::pair* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::pair* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]() 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`JoinedTuple::find_cell 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`TableMeta::name 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`TupleCellSpec::TupleCellSpec 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`RowTuple::find_cell 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`RowTuple::cell_at 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`DYLD-STUB$$__sanitizer_annotate_contiguous_container 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`Value* std::__1::vector::__emplace_back_slow_path 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OB_FAIL 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`FieldExpr::get_value 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`Value::reset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`Value::Value 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`NestedLoopJoinPhysicalOperator::current_tuple 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string 17 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<< 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 30 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_platform.dylib`os_unfair_lock_lock 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__ultoa 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`localeconv_l 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`DYLD-STUB$$os_unfair_lock_unlock 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__v2printf 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__sfvwrite 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`localeconv_l 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`DYLD-STUB$$free 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__ultoa 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`__v2printf 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libsystem_platform.dylib`_platform_memset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memset 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_string, std::__1::allocator>::basic_string[abi:ne180100](unsigned long, char) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_string, std::__1::allocator>::basic_string[abi:ne180100](unsigned long, char);libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_string, std::__1::allocator>::basic_string[abi:ne180100](unsigned long, char);libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_string, std::__1::allocator>::basic_string[abi:ne180100](unsigned long, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_stringbuf::overflow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int;libc++.1.dylib`std::__1::locale::use_facet 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int;libc++.1.dylib`std::__1::locale::use_facet;libc++.1.dylib`std::__1::locale::id::__get 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int;libc++.1.dylib`std::__1::locale::id::__get 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::locale::use_facet 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::basic_streambuf::xsputn 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`_vsnprintf 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ctype::do_widen 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::numpunct::do_grouping 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::basic_string, std::__1::allocator>::basic_string[abi:ne180100](unsigned long, char) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::use_facet 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::use_facet;libc++.1.dylib`std::__1::locale::id::__get 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::__num_put_base::__format_int 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::~locale 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`DYLD-STUB$$snprintf_l 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::locale 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::id::__get 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_streambuf::xsputn 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_ostream::sentry::sentry 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::locale::use_facet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libc++.1.dylib`std::__1::locale::~locale 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::locale::locale 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`DYLD-STUB$$free 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::sentry 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::locale::~locale 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa;libsystem_c.dylib`__lo0bits_D2A 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa;libsystem_c.dylib`__rv_alloc_D2A;libsystem_c.dylib`__Balloc_D2A 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa;libsystem_c.dylib`__rv_alloc_D2A;libsystem_c.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa;libsystem_c.dylib`__d2b_D2A 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa;libsystem_c.dylib`__Balloc_D2A 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__rv_alloc_D2A 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`DYLD-STUB$$mkdtempat_np 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`localeconv_l 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`DYLD-STUB$$os_unfair_lock_unlock 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__d2b_D2A 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`localeconv_l 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__sfvwrite 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__Bfree_D2A 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__dtoa 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__v2printf 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`printf_common 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`printf_common;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`printf_common;libclang_rt.asan_osx_dynamic.dylib`format_get_value_size 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 12 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memset 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`__v2printf 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_atoll 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::append 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::push_back 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_stringbuf::overflow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]() 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__asan_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libc++.1.dylib`std::__1::locale::locale;libc++.1.dylib`std::__1::locale::__global 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libc++.1.dylib`std::__1::locale::__global 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libc++.1.dylib`std::__1::basic_streambuf::basic_streambuf;libc++.1.dylib`std::__1::locale::__global 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libsystem_platform.dylib`_platform_memmove 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libclang_rt.asan_osx_dynamic.dylib`wrap_free 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libc++.1.dylib`std::__1::locale::~locale 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`DYLD-STUB$$std::__1::locale::~locale 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::locale::use_facet 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::locale::~locale 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::basic_streambuf::~basic_streambuf;libc++.1.dylib`std::__1::locale::~locale 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::ios_base::init 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libsystem_platform.dylib`_platform_memset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::append 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::resize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_stringbuf::overflow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_streambuf::xsputn 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::locale::~locale 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::locale::id::__get 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]() 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__asan_memset 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libc++.1.dylib`std::__1::locale::locale;libc++.1.dylib`std::__1::locale::__global 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libsystem_platform.dylib`_platform_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`DYLD-STUB$$free 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::locale::~locale 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::ctype::do_widen 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::ios_base::getloc 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::sentry 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::locale::use_facet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libc++.1.dylib`std::__1::__itoa::__base_10_u32[abi:ne180100](char*, unsigned int) 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;observer`Value::get_int 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libsystem_platform.dylib`_platform_memset 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libsystem_platform.dylib`_platform_memmove 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libc++.1.dylib`void std::__1::basic_string, std::__1::allocator>::__init_with_size[abi:ne180100](char*, char*, unsigned long) 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libc++.1.dylib`std::__1::to_string 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libc++.1.dylib`std::__1::to_string;libc++.1.dylib`void std::__1::basic_string, std::__1::allocator>::__init_with_size[abi:ne180100](char*, char*, unsigned long) 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;observer`DYLD-STUB$$__asan_set_shadow_f8 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;observer`DYLD-STUB$$__asan_set_shadow_00 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libsystem_platform.dylib`_platform_memset 25 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 24 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 17 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libsystem_platform.dylib`_platform_memmove 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$std::__1::basic_ios::~basic_ios 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<< 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::locale::~locale 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::basic_iostream::~basic_iostream 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]() 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::basic_ios::~basic_ios 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::ctype::do_widen 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$__asan_memmove 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$__asan_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$std::__1::ios_base::init 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$std::__1::basic_ostream::operator<< 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$std::__1::locale::use_facet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$std::__1::basic_streambuf::~basic_streambuf 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::locale::locale 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`Value::get_int 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 23 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 25 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 28 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libclang_rt.asan_osx_dynamic.dylib`void __sanitizer::SizeClassAllocator64::ReleaseFreeMemoryToOS 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`mach_absolute_time 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libsystem_platform.dylib`__bzero 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 16 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 15 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_ostream::sentry::sentry 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_streambuf::xsputn 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long) 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator= 31 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_malloc_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libsystem_platform.dylib`_platform_memmove 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`Value::operator= 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator= 11 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::CanPoisonMemory 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libsystem_platform.dylib`_platform_memmove 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`SplicedTuple::cell_num 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`IntegerType::to_string 9 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libsystem_platform.dylib`_platform_memset 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`FloatType::to_string 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::~sentry 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::operator= 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::sentry 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`DateType::to_string 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libc++.1.dylib`std::__1::basic_ostream::sentry::sentry 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`DYLD-STUB$$__asan_memcpy 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`OrderByPhysicalOperator::next 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`DYLD-STUB$$__asan_set_shadow_f8 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`CharType::to_string 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libsystem_kernel.dylib`write 532 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libclang_rt.asan_osx_dynamic.dylib`wrap_write 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libclang_rt.asan_osx_dynamic.dylib`wrap_write;libsystem_kernel.dylib`write 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libclang_rt.asan_osx_dynamic.dylib`wrap_write;libsystem_kernel.dylib`write;libsystem_kernel.dylib`cerror 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libclang_rt.asan_osx_dynamic.dylib`wrap_write;libsystem_kernel.dylib`write;libsystem_kernel.dylib`cerror_nocancel 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libclang_rt.asan_osx_dynamic.dylib`wrap_write;libsystem_kernel.dylib`cerror 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`RingBuffer::write;libsystem_platform.dylib`_platform_memmove 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;libclang_rt.asan_osx_dynamic.dylib`wrap_write 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`DYLD-STUB$$write 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`DYLD-STUB$$__error 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;libsystem_kernel.dylib`__error 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 54 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libclang_rt.asan_osx_dynamic.dylib`void __sanitizer::SizeClassAllocator64::ReleaseFreeMemoryToOS 13 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`madvise 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]() 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 10 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libsystem_pthread.dylib`pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 11 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`DYLD-STUB$$operator delete[](void*) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`DYLD-STUB$$__sanitizer_annotate_contiguous_container 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 18 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 6 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 7 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`Value::to_string 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`InsertPhysicalOperator::open;observer`Table::insert_record;observer`RecordFileHandler::insert_record;observer`DiskBufferPool::allocate_page;observer`DiskBufferPool::flush_page_internal;observer`crc32 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`InsertPhysicalOperator::open;observer`Table::insert_record;observer`RecordFileHandler::insert_record;observer`RowRecordPageHandler::insert_record;observer`RecordLogHandler::insert_record;observer`std::__1::vector::vector;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`InsertPhysicalOperator::open;observer`Value::data 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SplicedTuple::cell_at 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`Db::sync;libsystem_kernel.dylib`sync 96 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`Db::sync;observer`Table::sync;observer`DiskBufferPool::flush_all_pages;observer`DiskBufferPool::flush_page_internal;observer`crc32 3 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`Db::sync;observer`Table::sync;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`Db::sync;observer`DiskDoubleWriteBuffer::flush_page;observer`DiskDoubleWriteBuffer::write_page;observer`DiskBufferPool::write_page;observer`common::writen;libsystem_kernel.dylib`write 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`CreateTableExecutor::execute;observer`Db::create_table;observer`Table::create;libsystem_kernel.dylib`close 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`CreateTableExecutor::execute;observer`Db::create_table;observer`Table::create;observer`Table::init_record_handler;observer`BufferPoolManager::open_file;observer`DiskBufferPool::open_file;observer`common::Log::output;libc++.1.dylib`std::__1::basic_ostream::put;libc++.1.dylib`std::__1::ostreambuf_iterator>::operator=[abi:ne180100](char);libc++.1.dylib`std::__1::__stdoutbuf::overflow;libclang_rt.asan_osx_dynamic.dylib`wrap_fwrite;libsystem_c.dylib`fwrite;libsystem_c.dylib`__sfvwrite;libsystem_c.dylib`__sflush;libsystem_c.dylib`_swrite;libsystem_kernel.dylib`__write_nocancel 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`CreateTableExecutor::execute;observer`Db::create_table;observer`Table::create;observer`TableMeta::serialize;libc++.1.dylib`std::__1::basic_filebuf::seekoff;libsystem_c.dylib`fseeko;libsystem_c.dylib`_ftello 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`CreateTableExecutor::execute;observer`Db::create_table;observer`Table::create;observer`BufferPoolManager::create_file;libsystem_platform.dylib`__bzero 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`CreateTableExecutor::execute;observer`Db::create_table;observer`Table::create;observer`TableMeta::init;observer`common::Log::output;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ParseStage::handle_request;observer`parse;observer`sql_parse;observer`yyparse;libsystem_platform.dylib`_platform_memset 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent 8 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 5 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 4 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`DYLD-STUB$$operator delete 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::read_event;observer`std::__1::vector::vector;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::read_event;observer`std::__1::vector::vector;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libsystem_platform.dylib`_platform_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::read_event;observer`std::__1::vector::vector;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::LargeMmapAllocator::Allocate 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::read_event;observer`std::__1::vector::vector;libsystem_platform.dylib`__bzero 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::read_event;libsystem_kernel.dylib`read 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memset 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libsystem_pthread.dylib`_pthread_exit;libsystem_pthread.dylib`_pthread_tsd_cleanup;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::Destroy;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThreadLocalMallocStorage::CommitBack;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::CommitBack;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libclang_rt.asan_osx_dynamic.dylib`void __sanitizer::SizeClassAllocator64::ReleaseFreeMemoryToOS 1 +id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libsystem_pthread.dylib`_pthread_exit;libsystem_pthread.dylib`_pthread_tsd_cleanup;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::Destroy;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThreadLocalMallocStorage::CommitBack;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::CommitBack;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`madvise 1 +id 为 171986 的线程;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 1 diff --git a/src/observer/sql/operator/order_by_physical_operator.cpp b/src/observer/sql/operator/order_by_physical_operator.cpp index c562334d..1af2fc71 100644 --- a/src/observer/sql/operator/order_by_physical_operator.cpp +++ b/src/observer/sql/operator/order_by_physical_operator.cpp @@ -23,14 +23,38 @@ OrderByPhysicalOperator::OrderByPhysicalOperator(vector order_by expressions.push_back(expr); } tuple_.init(expressions); + + order_and_field_line = order_list([this](const order_line &cells_a, const order_line &cells_b) -> bool { + auto order_size = order_by_.size(); + auto &order_line_a = cells_a.first; + auto &order_line_b = cells_b.first; + assert(order_line_a.size() == order_size); + assert(order_line_b.size() == order_size); + assert(order_by_.size() == order_size); + + for (size_t i = 0; i < order_size; i++) { + auto &a = order_line_a[i]; + auto &b = order_line_b[i]; + auto result = a.compare(b); + auto is_asc = order_by_[i].is_asc; + if (result < 0) { + // a < b + return !is_asc; + } else if (result > 0) { + // a > 0 + return is_asc; + } + } + + // order_line_a == order_line_b + return true; + }); } RC OrderByPhysicalOperator::fetch_and_sort_tables() { RC rc = RC::SUCCESS; - vector, vector>> order_and_field_line; - while (RC::SUCCESS == (rc = children_[0]->next())) { // 获取 order by 字段的 values vector order_by_line; @@ -54,46 +78,10 @@ RC OrderByPhysicalOperator::fetch_and_sort_tables() field_line.emplace_back(cell); } - order_and_field_line.emplace_back(order_by_line, field_line); + order_and_field_line.emplace(order_by_line, field_line); } - rc = RC::SUCCESS; - - // consider null - auto cmp = [this](const pair, vector> &cells_a, - const pair, vector> &cells_b) -> bool { - auto order_size = order_by_.size(); - auto &order_line_a = cells_a.first; - auto &order_line_b = cells_b.first; - assert(order_line_a.size() == order_size); - assert(order_line_b.size() == order_size); - assert(order_by_.size() == order_size); - - for (size_t i = 0; i < order_size; i++) { - auto a = order_line_a[i]; - auto b = order_line_b[i]; - auto result = a.compare(b); - auto is_asc = order_by_[i].is_asc; - if (result < 0) { - // a < b - return is_asc; - } else if (result > 0) { - // a > 0 - return !is_asc; - } - } - - // order_line_a == order_line_b - return false; - }; - - sort(order_and_field_line.begin(), order_and_field_line.end(), cmp); - for (auto &[_, value] : order_and_field_line) { - values_.push_back(value); - } - - it_ = values_.begin(); - return rc; + return RC::SUCCESS; } RC OrderByPhysicalOperator::open(Trx *trx) @@ -113,13 +101,13 @@ RC OrderByPhysicalOperator::open(Trx *trx) RC OrderByPhysicalOperator::next() { RC rc = RC::SUCCESS; - if (it_ == values_.end()) { + if (order_and_field_line.empty()) { return RC::RECORD_EOF; } - const vector &value = *it_; + vector value = order_and_field_line.top().second; + order_and_field_line.pop(); tuple_.set_cells(value); - it_++; return rc; } diff --git a/src/observer/sql/operator/order_by_physical_operator.h b/src/observer/sql/operator/order_by_physical_operator.h index e9adadb2..2d3ad3c2 100644 --- a/src/observer/sql/operator/order_by_physical_operator.h +++ b/src/observer/sql/operator/order_by_physical_operator.h @@ -14,6 +14,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/physical_operator.h" #include "sql/expr/tuple.h" +#include class OrderByPhysicalOperator : public PhysicalOperator { @@ -41,8 +42,10 @@ class OrderByPhysicalOperator : public PhysicalOperator /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr std::vector exprs_; - std::vector> values_; + SplicedTuple tuple_; - std::vector>::iterator it_; - SplicedTuple tuple_; -}; \ No newline at end of file + using order_line = pair, vector>; + using order_func = std::function; + using order_list = std::priority_queue, order_func>; + order_list order_and_field_line; +}; From 68903e93b12d67f6a53ab206f011cbcb80f1b3ef Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 15 Oct 2024 20:52:27 +0800 Subject: [PATCH 247/308] =?UTF-8?q?=E6=94=B9=E7=94=A8=E5=A0=86=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- observer_2024-10-15-162851.collapsed | 2049 -------------------------- 1 file changed, 2049 deletions(-) delete mode 100644 observer_2024-10-15-162851.collapsed diff --git a/observer_2024-10-15-162851.collapsed b/observer_2024-10-15-162851.collapsed deleted file mode 100644 index ce742b38..00000000 --- a/observer_2024-10-15-162851.collapsed +++ /dev/null @@ -1,2049 +0,0 @@ -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup 12 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 2 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 3 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 74 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 8 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 2 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::LargeMmapAllocator::GetBlockBegin 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 9 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 3 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`madvise 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libsystem_platform.dylib`_platform_memset 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 5 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::UnmapOrDie;libsystem_kernel.dylib`__munmap 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 3 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 2 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`common::MemPoolSimple::~MemPoolSimple;observer`common::MemPoolSimple::cleanup;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 3 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`Db::~Db;observer`BufferPoolManager::~BufferPoolManager;observer`DiskDoubleWriteBuffer::~DiskDoubleWriteBuffer;libsystem_kernel.dylib`sync 27 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;libsystem_kernel.dylib`sync 36 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;observer`Table::sync;observer`DiskBufferPool::flush_all_pages;observer`DiskBufferPool::flush_page_internal 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;observer`Table::sync;observer`DiskBufferPool::flush_all_pages;observer`DiskBufferPool::flush_page_internal;observer`crc32 5 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;observer`Table::sync;observer`DiskBufferPool::flush_all_pages;observer`DiskBufferPool::flush_page_internal;observer`DiskDoubleWriteBuffer::add_page;libsystem_platform.dylib`_platform_memmove 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;observer`Table::sync;observer`DiskBufferPool::flush_all_pages;observer`DiskBufferPool::flush_page_internal;observer`DiskDoubleWriteBuffer::add_page;observer`DiskDoubleWriteBuffer::write_page_internal;observer`common::writen;libsystem_kernel.dylib`write 1 -id 为 171833 的线程;dyld`start;observer`main;observer`cleanup_util;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::~DefaultHandler;observer`DefaultHandler::sync;observer`Db::sync;observer`DiskDoubleWriteBuffer::flush_page;observer`DiskDoubleWriteBuffer::write_page;observer`DiskBufferPool::write_page;observer`common::writen;libsystem_kernel.dylib`write 1 -id 为 171833 的线程;dyld`start;observer`main;observer`init;observer`init_global_objects;observer`DefaultHandler::init;observer`DefaultHandler::open_db;observer`Db::init;observer`Db::init_dblwr_buffer;libsystem_kernel.dylib`sync 27 -id 为 171833 的线程;dyld`start;observer`main;observer`init;observer`init_global_objects;observer`DefaultHandler::init;observer`DefaultHandler::open_db;observer`Db::init;observer`BufferPoolManager::BufferPoolManager;observer`common::MemPoolSimple::init;observer`common::MemPoolSimple::extend 4 -id 为 171833 的线程;dyld`start;observer`main;observer`init;observer`init_global_objects;observer`DefaultHandler::init;observer`DefaultHandler::open_db;observer`Db::init;observer`BufferPoolManager::BufferPoolManager;observer`common::MemPoolSimple::init;observer`common::MemPoolSimple::extend;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171833 的线程;dyld`start;observer`main;observer`init;observer`init_global_objects;observer`DefaultHandler::init;observer`DefaultHandler::open_db;observer`Db::init;observer`BufferPoolManager::BufferPoolManager;observer`common::MemPoolSimple::init;observer`common::MemPoolSimple::extend;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171833 的线程;dyld`start;observer`main;observer`init;observer`init_global_objects;observer`DefaultHandler::init;observer`DefaultHandler::open_db;observer`Db::init;observer`Db::open_all_tables;observer`common::list_file;libclang_rt.asan_osx_dynamic.dylib`wrap_opendir;libsystem_c.dylib`__opendir2;libclang_rt.asan_osx_dynamic.dylib`wrap_fstatfs 1 -id 为 171833 的线程;dyld`start;observer`main;observer`init;libclang_rt.asan_osx_dynamic.dylib`wrap_localtime_r;libsystem_c.dylib`localtime_r;libsystem_c.dylib`tzsetwall_basic;libsystem_c.dylib`notify_register_tz;libsystem_notify.dylib`notify_register_check;libsystem_notify.dylib`0x000000018980d344;libsystem_notify.dylib`0x000000018980ecc0;libdispatch.dylib`_dispatch_once_callout;libdispatch.dylib`_dispatch_client_callout;libsystem_notify.dylib`0x000000018980f53c;libxpc.dylib`bootstrap_look_up2;libxpc.dylib`bootstrap_look_up3;libxpc.dylib`_xpc_interface_routine;libxpc.dylib`_xpc_pipe_routine;libxpc.dylib`_xpc_pipe_pack_message;libxpc.dylib`_xpc_serializer_pack;libdispatch.dylib`dispatch_mach_msg_create;libdispatch.dylib`_os_object_alloc_realized;libobjc.A.dylib`class_createInstance;libsystem_malloc.dylib`_malloc_type_calloc_outlined;libclang_rt.asan_osx_dynamic.dylib`wrap_calloc;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_calloc;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171833 的线程;dyld`start;observer`main;observer`NetServer::serve;libsystem_kernel.dylib`poll 2 -id 为 171833 的线程;dyld`start;observer`main;observer`NetServer::serve;observer`OneThreadPerConnectionThreadHandler::~OneThreadPerConnectionThreadHandler;observer`OneThreadPerConnectionThreadHandler::~OneThreadPerConnectionThreadHandler;observer`OneThreadPerConnectionThreadHandler::await_stop;observer`common::Log::output;libc++.1.dylib`std::__1::basic_ostream::flush;libc++.1.dylib`std::__1::basic_filebuf::sync;libclang_rt.asan_osx_dynamic.dylib`wrap_fflush;libsystem_c.dylib`fflush;libsystem_pthread.dylib`pthread_mutex_lock 1 -id 为 171833 的线程;dyld`start;dyld`dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator();dyld`dyld4::prepare;dyld`dyld4::APIs::runAllInitializersForMain;dyld`dyld4::Loader::runInitializersBottomUpPlusUpwardLinks;dyld`dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator();dyld`dyld4::Loader::runInitializersBottomUp;dyld`dyld4::JustInTimeLoader::runInitializers;dyld`dyld4::Loader::findAndRunAllInitializers;dyld`dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void ;dyld`dyld3::MachOFile::forEachSection(void ;dyld`dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void ;dyld`invocation function for block in dyld3::MachOFile::forEachSection(void ;dyld`invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void ;observer`asan.module_ctor 2 -id 为 171833 的线程;libsystem_kernel.dylib`__exit 33 -id 为 171833 的线程;libsystem_kernel.dylib`poll 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables 24 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`common::compare_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$operator delete[](void*) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator() 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`DYLD-STUB$$__asan_set_shadow_f8 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$__asan_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 11 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::EnsureFreeArraySpace 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare;observer`common::compare_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IsRssLimitExceeded 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 11 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`common::compare_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_free_hook 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunFreeHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 14 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`DYLD-STUB$$__asan_set_shadow_00 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`common::compare_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector::__vdeallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`bool std::__1::__insertion_sort_incomplete[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IsRssLimitExceeded 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 19 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare;observer`common::compare_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`common::compare_float 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`DYLD-STUB$$__asan_set_shadow_f8 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator() 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__sort5_maybe_branchless[abi:ne180100]>, std::__1::vector>>*, 0>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__sort5_maybe_branchless[abi:ne180100]>, std::__1::vector>>*, 0>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$operator new[](unsigned long) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`common::compare_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::CanPoisonMemory 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`DYLD-STUB$$__asan_set_shadow_f8 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`IntegerType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_malloc_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 17 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare;observer`common::compare_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`unsigned int std::__1::__sort3[abi:ne180100]>, std::__1::vector>>*>(std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, std::__1::pair>, std::__1::vector>>*, OrderByPhysicalOperator::fetch_and_sort_tables()::$_0&);observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 27 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IsRssLimitExceeded 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::CanPoisonMemory 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 30 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`IntegerType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`FloatType::compare;observer`Value::get_float 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 43 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator() 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_malloc_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IsRssLimitExceeded 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::Value;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`OrderByPhysicalOperator::fetch_and_sort_tables()::$_0::operator();observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`common::compare_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strncmp 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`CharType::compare 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`DYLD-STUB$$operator new[](unsigned long) 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::__introsort(std::__1::pair*, std::__1::pair*, OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::compare 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value 20 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec 29 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external 18 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 41 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 29 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 17 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external;libsystem_platform.dylib`_platform_strlen 14 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::basic_string::__assign_external;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$strlen 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`DYLD-STUB$$operator new 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`DYLD-STUB$$memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`TupleCellSpec::init_hash 17 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`TupleCellSpec::init_hash;observer`std::__1::__murmur2_or_cityhash::operator()[abi:ne180100](void const*, unsigned long) const 44 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 24 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memset;libclang_rt.asan_osx_dynamic.dylib`__asan_region_is_poisoned;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::mem_is_zero 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memset;libclang_rt.asan_osx_dynamic.dylib`__asan_region_is_poisoned;libclang_rt.asan_osx_dynamic.dylib`__asan::MemToShadow 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::mem_is_zero 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libsystem_platform.dylib`_platform_memmove 42 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 37 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libsystem_platform.dylib`_platform_memset 31 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 30 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 25 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`std::__1::__murmur2_or_cityhash::operator()[abi:ne180100](void const*, unsigned long) const 14 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`__asan_region_is_poisoned 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`DYLD-STUB$$__asan_memmove 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;observer`DYLD-STUB$$strlen 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::TupleCellSpec;libc++.1.dylib`DYLD-STUB$$memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 72 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strcmp 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`TableMeta::name 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`FieldMeta::name 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_weak_hook_strcmp 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;libsystem_platform.dylib`_platform_strnlen 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`DYLD-STUB$$strnlen 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`DYLD-STUB$$__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::offset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;libsystem_platform.dylib`_platform_memset 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`DYLD-STUB$$strcmp 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`DYLD-STUB$$__asan_set_shadow_00 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`FieldMeta::len 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`Value::set_data 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 52 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strcmp 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`TableMeta::name 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`FieldMeta::name 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_weak_hook_strcmp 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::type 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::offset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::nullable 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::len 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;libsystem_platform.dylib`_platform_memset 11 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`DYLD-STUB$$strcmp 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`DYLD-STUB$$__asan_set_shadow_f8 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`Value::set_data 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`JoinedTuple::find_cell;observer`FieldMeta::name 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 38 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strcmp 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`TableMeta::name 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::find_cell;observer`FieldMeta::name 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`Value::set_data;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::offset 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;observer`FieldMeta::nullable 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`RowTuple::cell_at;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;libsystem_platform.dylib`_platform_memset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`DYLD-STUB$$__asan_set_shadow_f8 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`Value::set_data 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`FieldMeta::len 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`JoinedTuple::find_cell;observer`FieldMeta::name 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IsRssLimitExceeded 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;libsystem_platform.dylib`_platform_memset 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`FieldMeta::nullable 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`FieldMeta::type 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`FieldMeta::len 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`DYLD-STUB$$__asan_set_shadow_00 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::cell_at;observer`FieldMeta::offset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::find_cell 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`wrap_strcmp 27 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::find_cell;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_weak_hook_strcmp 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`RowTuple::find_cell;observer`FieldMeta::name 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 16 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libc++.1.dylib`std::__1::basic_string::append 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TupleCellSpec::init_hash 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`DYLD-STUB$$__asan_memmove 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`std::__1::basic_string::__assign_external 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`FieldMeta::name 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`DYLD-STUB$$__asan_memset 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`TableMeta::name 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`DYLD-STUB$$__asan_memcpy 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`DYLD-STUB$$strcmp 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`FieldExpr::get_value;observer`DYLD-STUB$$__asan_set_shadow_f8 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 74 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`mach_absolute_time 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 43 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`DYLD-STUB$$os_unfair_lock_lock 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`DYLD-STUB$$free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strlen 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`printf_common 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`common::Log::check_output 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__ultoa 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`DYLD-STUB$$os_unfair_lock_unlock 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`localeconv_l 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__sfvwrite 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__ultoa 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::append 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::push_back 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`DYLD-STUB$$memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int;libc++.1.dylib`std::__1::locale::id::__get 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::basic_streambuf::xsputn 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`_vsnprintf 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ctype::do_widen 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::use_facet;libc++.1.dylib`std::__1::locale::id::__get 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_ostream::sentry::sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::locale::locale 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libsystem_platform.dylib`_platform_memmove 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`DYLD-STUB$$free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`localeconv_l 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__Bfree_D2A 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`printf_common;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libsystem_platform.dylib`_platform_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libsystem_platform.dylib`_platform_strlen 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::locale::use_facet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_streambuf::xsputn 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]() 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`DYLD-STUB$$__asan_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::ios_base::getloc 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`DYLD-STUB$$memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_streambuf::xsputn 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::locale::id::__get 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`DYLD-STUB$$free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::~sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;libc++.1.dylib`std::__1::__itoa::__base_10_u32[abi:ne180100](char*, unsigned int) 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;observer`Value::get_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;observer`DYLD-STUB$$__asan_set_shadow_f8 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`IntegerType::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libsystem_platform.dylib`_platform_memset 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libsystem_platform.dylib`_platform_memmove 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libc++.1.dylib`std::__1::locale::~locale 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libc++.1.dylib`std::__1::basic_ostream::~basic_ostream 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DYLD-STUB$$std::__1::basic_ios::~basic_ios 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DYLD-STUB$$std::__1::locale::~locale 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;libc++.1.dylib`std::__1::locale::use_facet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`FieldMeta::offset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`FieldMeta::len 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`DYLD-STUB$$__asan_set_shadow_00 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`std::__1::basic_string::__grow_by_and_replace;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libc++.1.dylib`std::__1::basic_string::append;libc++.1.dylib`DYLD-STUB$$operator new 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`DYLD-STUB$$__asan_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_num 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`DYLD-STUB$$__asan_set_shadow_00 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;observer`RecordFileScanner::fetch_next_record_in_page;observer`RowRecordPageHandler::get_record 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;observer`RecordFileScanner::fetch_next_record_in_page;observer`RowRecordPageHandler::get_record;observer`common::Bitmap::get_bit 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;observer`RecordPageHandler::init;observer`DiskBufferPool::get_this_page;observer`BPFrameManager::get;observer`FrameId::FrameId 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;observer`RecordPageHandler::init;observer`DiskBufferPool::get_this_page;observer`BPFrameManager::get;observer`std::__1::__hash_iterator std::__1::__hash_table::find 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;observer`RecordFileScanner::fetch_next_record;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RecordFileScanner::next;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`common::Log::check_output 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libc++.1.dylib`std::__1::basic_string::append 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`RowTuple::cell_at 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`DYLD-STUB$$__asan_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Value::to_string 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`Tuple::to_string;observer`RowTuple::cell_at;observer`Value::set_data;observer`Value::set_string;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`sql_debug;observer`std::__1::basic_string::__init_copy_ctor_external;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;observer`TableScanPhysicalOperator::filter 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::next;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::open;observer`RowTuple::set_schema;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::open;observer`RowTuple::set_schema;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`TableScanPhysicalOperator::open;observer`RowTuple::set_schema;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`DYLD-STUB$$operator delete 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`NestedLoopJoinPhysicalOperator::next;observer`RecordFileScanner::close_scan;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value 26 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::IncreaseTotalMmap 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::CanPoisonMemory 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 20 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libsystem_platform.dylib`_platform_memset 11 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`mach_absolute_time 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::UnmapOrDie;libsystem_kernel.dylib`__munmap 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunFreeHooks 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_free_hook 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&) 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value 20 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_malloc_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::CanPoisonMemory 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`DYLD-STUB$$__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 11 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunMallocHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`Value::Value 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`DYLD-STUB$$__sanitizer_annotate_contiguous_container 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);libclang_rt.asan_osx_dynamic.dylib`__asan_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__construct_one_at_end[abi:ne180100]>&, std::__1::vector>&>(std::__1::vector>&, std::__1::vector>&);observer`void std::__1::vector::__construct_at_end 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&) 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value 46 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`void std::__1::vector::__construct_at_end;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);observer`Value::Value 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);observer`void std::__1::vector>::__init_with_size[abi:ne180100](Value*, Value*, unsigned long);libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&);libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]() 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset 24 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 26 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>, std::__1::vector>>, std::__1::allocator>, std::__1::vector>>>>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset 14 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 11 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunFreeHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value 20 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 11 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libsystem_platform.dylib`_platform_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 14 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libsystem_pthread.dylib`pthread_getspecific 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunFreeHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&) 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::PopulateFreeArray;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl;libsystem_kernel.dylib`__mmap 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_malloc_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);observer`Value::Value;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`void std::__1::vector>::__construct_one_at_end[abi:ne180100](Value&);libsystem_platform.dylib`_platform_memset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]() 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset 14 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::RunFreeHooks 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Refill;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::GetFromAllocator;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::pair* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::pair* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::pair* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::pair* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]() 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector* std::__1::vector::__emplace_back_slow_path;observer`std::__1::vector::__swap_out_circular_buffer;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`std::__1::vector* std::__1::vector::__emplace_back_slow_path;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`JoinedTuple::find_cell 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`TableMeta::name 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`TupleCellSpec::TupleCellSpec 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`RowTuple::find_cell 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OrderByPhysicalOperator::fetch_and_sort_tables;observer`RowTuple::cell_at 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`DYLD-STUB$$__sanitizer_annotate_contiguous_container 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`Value* std::__1::vector::__emplace_back_slow_path 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_annotate_contiguous_container 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`OB_FAIL 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`FieldExpr::get_value 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`Value::reset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`Value::Value 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`void std::__1::vector>, std::__1::allocator>>>::__construct_one_at_end[abi:ne180100]>&>(std::__1::vector>&) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`ProjectPhysicalOperator::open;observer`NestedLoopJoinPhysicalOperator::current_tuple 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string 17 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<< 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 30 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_platform.dylib`os_unfair_lock_lock 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__ultoa 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`localeconv_l 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`DYLD-STUB$$os_unfair_lock_unlock 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__v2printf 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__sfvwrite 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`localeconv_l 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`DYLD-STUB$$free 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__ultoa 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`snprintf_l;libsystem_c.dylib`__v2printf 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libsystem_platform.dylib`_platform_memset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memset 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_string, std::__1::allocator>::basic_string[abi:ne180100](unsigned long, char) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_string, std::__1::allocator>::basic_string[abi:ne180100](unsigned long, char);libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_string, std::__1::allocator>::basic_string[abi:ne180100](unsigned long, char);libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_string, std::__1::allocator>::basic_string[abi:ne180100](unsigned long, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_stringbuf::overflow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int;libc++.1.dylib`std::__1::locale::use_facet 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int;libc++.1.dylib`std::__1::locale::use_facet;libc++.1.dylib`std::__1::locale::id::__get 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int;libc++.1.dylib`std::__1::locale::id::__get 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::locale::use_facet 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::basic_streambuf::xsputn 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libsystem_c.dylib`_vsnprintf 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::ctype::do_widen 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::numpunct::do_grouping 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const;libc++.1.dylib`std::__1::basic_string, std::__1::allocator>::basic_string[abi:ne180100](unsigned long, char) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::use_facet 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::use_facet;libc++.1.dylib`std::__1::locale::id::__get 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::__num_put_base::__format_int 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::~locale 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`DYLD-STUB$$snprintf_l 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::__num_put::__widen_and_group_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::locale 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<<;libc++.1.dylib`std::__1::locale::id::__get 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_streambuf::xsputn 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_ostream::sentry::sentry 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::locale::use_facet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libc++.1.dylib`std::__1::locale::~locale 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::locale::locale 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`DYLD-STUB$$free 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::sentry 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::ostreambuf_iterator> std::__1::num_put>>::__do_put_integral[abi:ne180100](std::__1::ostreambuf_iterator>, std::__1::ios_base&, char, long, char const*) const 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;libc++.1.dylib`std::__1::locale::~locale 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DateType::to_string;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa;libsystem_c.dylib`__lo0bits_D2A 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa;libsystem_c.dylib`__rv_alloc_D2A;libsystem_c.dylib`__Balloc_D2A 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa;libsystem_c.dylib`__rv_alloc_D2A;libsystem_c.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa;libsystem_c.dylib`__d2b_D2A 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__dtoa;libsystem_c.dylib`__Balloc_D2A 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__rv_alloc_D2A 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`DYLD-STUB$$mkdtempat_np 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`localeconv_l 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`DYLD-STUB$$os_unfair_lock_unlock 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__d2b_D2A 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`localeconv_l 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__sfvwrite 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__Bfree_D2A 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__dtoa 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__v2printf 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`printf_common 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`printf_common;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`printf_common;libclang_rt.asan_osx_dynamic.dylib`format_get_value_size 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 12 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memset 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`__v2printf 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_atoll 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`common::double_to_str;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::append 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::push_back 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_stringbuf::overflow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]() 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__asan_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libc++.1.dylib`std::__1::locale::locale;libc++.1.dylib`std::__1::locale::__global 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libc++.1.dylib`std::__1::locale::__global 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libc++.1.dylib`std::__1::basic_streambuf::basic_streambuf;libc++.1.dylib`std::__1::locale::__global 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libsystem_platform.dylib`_platform_memmove 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libclang_rt.asan_osx_dynamic.dylib`wrap_free 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libc++.1.dylib`std::__1::locale::~locale 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`DYLD-STUB$$std::__1::locale::~locale 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::locale::use_facet 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::locale::~locale 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::basic_streambuf::~basic_streambuf;libc++.1.dylib`std::__1::locale::~locale 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libc++.1.dylib`std::__1::ios_base::init 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`FloatType::to_string;observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libsystem_platform.dylib`_platform_memset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libclang_rt.asan_osx_dynamic.dylib`wrap_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::append 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_string::resize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_stringbuf::overflow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_streambuf::xsputn 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::locale::~locale 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::locale::id::__get 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]() 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libclang_rt.asan_osx_dynamic.dylib`__asan_memset 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]();libc++.1.dylib`std::__1::locale::locale;libc++.1.dylib`std::__1::locale::__global 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base;libclang_rt.asan_osx_dynamic.dylib`wrap_free 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_free 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libsystem_platform.dylib`_platform_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`DYLD-STUB$$free 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::locale::~locale 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`wrap_strlen 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::ctype::do_widen 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::ios_base::getloc 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::sentry 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`CharType::to_string;libc++.1.dylib`std::__1::locale::use_facet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libc++.1.dylib`std::__1::__itoa::__base_10_u32[abi:ne180100](char*, unsigned int) 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;observer`Value::get_int 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libsystem_platform.dylib`_platform_memset 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libsystem_platform.dylib`_platform_memmove 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libc++.1.dylib`void std::__1::basic_string, std::__1::allocator>::__init_with_size[abi:ne180100](char*, char*, unsigned long) 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libc++.1.dylib`std::__1::to_string 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libc++.1.dylib`std::__1::to_string;libc++.1.dylib`void std::__1::basic_string, std::__1::allocator>::__init_with_size[abi:ne180100](char*, char*, unsigned long) 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;observer`DYLD-STUB$$__asan_set_shadow_f8 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;observer`DYLD-STUB$$__asan_set_shadow_00 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`IntegerType::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libsystem_platform.dylib`_platform_memset 25 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 24 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 17 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libsystem_platform.dylib`_platform_memmove 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$std::__1::basic_ios::~basic_ios 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::basic_ostream::operator<< 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::locale::~locale 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::basic_iostream::~basic_iostream 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`std::__1::basic_stringstream, std::__1::allocator>::basic_stringstream[abi:ne180100]() 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`__asan_memmove 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::ios_base::~ios_base 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::basic_ios::~basic_ios 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::ctype::do_widen 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$__asan_memmove 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$__asan_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$std::__1::ios_base::init 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$std::__1::basic_ostream::operator<< 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$std::__1::locale::use_facet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$std::__1::basic_streambuf::~basic_streambuf 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;libc++.1.dylib`std::__1::locale::locale 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`Value::get_int 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::to_string;observer`DYLD-STUB$$__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 23 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 25 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 28 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libclang_rt.asan_osx_dynamic.dylib`void __sanitizer::SizeClassAllocator64::ReleaseFreeMemoryToOS 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`mach_absolute_time 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::push_back;libc++.1.dylib`std::__1::basic_string::__grow_by;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libc++.1.dylib`std::__1::basic_stringbuf::overflow;libc++.1.dylib`std::__1::basic_string::append;libsystem_platform.dylib`__bzero 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 16 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libc++.1.dylib`std::__1::basic_streambuf::xsputn;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char);libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 15 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_ostream::sentry::sentry 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long);libc++.1.dylib`std::__1::basic_streambuf::xsputn 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long) 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator= 31 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$__sanitizer_malloc_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_malloc_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libsystem_platform.dylib`_platform_memmove 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackTrace::GetCurrentPc 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`void std::__1::vector>::__assign_with_size[abi:ne180100](Value*, Value*, long);libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SqlResult::next_tuple;observer`OrderByPhysicalOperator::next;observer`Value::operator= 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator= 11 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__lsan::DisabledInThisThread;libsystem_pthread.dylib`pthread_once 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__asan::RZSize2Log 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libsystem_pthread.dylib`pthread_once 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::CanPoisonMemory 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`wrap__Znam;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`Value::operator=;libsystem_platform.dylib`_platform_memmove 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;observer`SplicedTuple::cell_num 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`SplicedTuple::cell_at;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`IntegerType::to_string 9 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libsystem_platform.dylib`_platform_memset 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libc++.1.dylib`std::__1::basic_ostream::sentry::~sentry 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`FloatType::to_string 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libclang_rt.asan_osx_dynamic.dylib`__asan_memset 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`std::__1::ostreambuf_iterator> std::__1::__pad_and_output[abi:ne180100]>(std::__1::ostreambuf_iterator>, char const*, char const*, char const*, std::__1::ios_base&, char) 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::~sentry 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`Value::operator= 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`DYLD-STUB$$std::__1::basic_ostream::sentry::sentry 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`DateType::to_string 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libclang_rt.asan_osx_dynamic.dylib`__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;libc++.1.dylib`std::__1::basic_ostream::sentry::sentry 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`DYLD-STUB$$__asan_memcpy 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`OrderByPhysicalOperator::next 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`DYLD-STUB$$__asan_set_shadow_f8 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`PlainCommunicator::write_tuple_result;observer`CharType::to_string 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libsystem_kernel.dylib`write 532 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libclang_rt.asan_osx_dynamic.dylib`wrap_write 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libclang_rt.asan_osx_dynamic.dylib`wrap_write;libsystem_kernel.dylib`write 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libclang_rt.asan_osx_dynamic.dylib`wrap_write;libsystem_kernel.dylib`write;libsystem_kernel.dylib`cerror 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libclang_rt.asan_osx_dynamic.dylib`wrap_write;libsystem_kernel.dylib`write;libsystem_kernel.dylib`cerror_nocancel 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`BufferedWriter::flush_internal;libclang_rt.asan_osx_dynamic.dylib`wrap_write;libsystem_kernel.dylib`cerror 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`RingBuffer::write;libsystem_platform.dylib`_platform_memmove 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;libclang_rt.asan_osx_dynamic.dylib`wrap_write 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`DYLD-STUB$$write 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;observer`DYLD-STUB$$__error 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`BufferedWriter::writen;libsystem_kernel.dylib`__error 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 54 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libclang_rt.asan_osx_dynamic.dylib`void __sanitizer::SizeClassAllocator64::ReleaseFreeMemoryToOS 13 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::DrainHalfMax;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`madvise 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_top 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::stack_bottom 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]() 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 10 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libsystem_pthread.dylib`pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 11 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`DYLD-STUB$$pthread_getspecific 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_free_hook 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::QuarantineCache::Enqueue 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::Unwind 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`Value::reset;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdaPv;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`std::__1::vector>::__destroy_vector::operator()[abi:ne180100]();observer`DYLD-STUB$$operator delete[](void*) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`DYLD-STUB$$__sanitizer_annotate_contiguous_container 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`__asan::GetMallocContextSize 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SqlResult::close;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`ProjectPhysicalOperator::~ProjectPhysicalOperator;observer`OrderByPhysicalOperator::~OrderByPhysicalOperator;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 18 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 6 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libsystem_platform.dylib`_platform_memset 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 7 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache::Deallocate 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`Value::to_string 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`InsertPhysicalOperator::open;observer`Table::insert_record;observer`RecordFileHandler::insert_record;observer`DiskBufferPool::allocate_page;observer`DiskBufferPool::flush_page_internal;observer`crc32 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`InsertPhysicalOperator::open;observer`Table::insert_record;observer`RecordFileHandler::insert_record;observer`RowRecordPageHandler::insert_record;observer`RecordLogHandler::insert_record;observer`std::__1::vector::vector;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`InsertPhysicalOperator::open;observer`Value::data 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memmove 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`SplicedTuple::cell_at 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::write_result;observer`PlainCommunicator::write_result_internal;observer`std::__1::basic_ostream>& std::__1::__put_character_sequence[abi:ne180100]>(std::__1::basic_ostream>&, char const*, unsigned long) 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`Db::sync;libsystem_kernel.dylib`sync 96 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`Db::sync;observer`Table::sync;observer`DiskBufferPool::flush_all_pages;observer`DiskBufferPool::flush_page_internal;observer`crc32 3 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`Db::sync;observer`Table::sync;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_strchr 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`Db::sync;observer`DiskDoubleWriteBuffer::flush_page;observer`DiskDoubleWriteBuffer::write_page;observer`DiskBufferPool::write_page;observer`common::writen;libsystem_kernel.dylib`write 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`CreateTableExecutor::execute;observer`Db::create_table;observer`Table::create;libsystem_kernel.dylib`close 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`CreateTableExecutor::execute;observer`Db::create_table;observer`Table::create;observer`Table::init_record_handler;observer`BufferPoolManager::open_file;observer`DiskBufferPool::open_file;observer`common::Log::output;libc++.1.dylib`std::__1::basic_ostream::put;libc++.1.dylib`std::__1::ostreambuf_iterator>::operator=[abi:ne180100](char);libc++.1.dylib`std::__1::__stdoutbuf::overflow;libclang_rt.asan_osx_dynamic.dylib`wrap_fwrite;libsystem_c.dylib`fwrite;libsystem_c.dylib`__sfvwrite;libsystem_c.dylib`__sflush;libsystem_c.dylib`_swrite;libsystem_kernel.dylib`__write_nocancel 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`CreateTableExecutor::execute;observer`Db::create_table;observer`Table::create;observer`TableMeta::serialize;libc++.1.dylib`std::__1::basic_filebuf::seekoff;libsystem_c.dylib`fseeko;libsystem_c.dylib`_ftello 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`CreateTableExecutor::execute;observer`Db::create_table;observer`Table::create;observer`BufferPoolManager::create_file;libsystem_platform.dylib`__bzero 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ExecuteStage::handle_request;observer`CommandExecutor::execute;observer`CreateTableExecutor::execute;observer`Db::create_table;observer`Table::create;observer`TableMeta::init;observer`common::Log::output;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libsystem_c.dylib`_vsnprintf;libsystem_c.dylib`__vfprintf;libsystem_c.dylib`__sfvwrite;libclang_rt.asan_osx_dynamic.dylib`wrap_memcpy 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SqlTaskHandler::handle_sql;observer`ParseStage::handle_request;observer`parse;observer`sql_parse;observer`yyparse;libsystem_platform.dylib`_platform_memset 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent 8 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::DoRecycle;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Recycle;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Quarantine::Put;libclang_rt.asan_osx_dynamic.dylib`__asan::PoisonShadow 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 2 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThreadStats;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanTSDGet 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libsystem_platform.dylib`_platform_memset 5 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindImpl;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::BufferedStackTrace::UnwindFast 4 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::StackDepotBase::Put 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`wrap__ZdlPv;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::QuarantineChunk;libclang_rt.asan_osx_dynamic.dylib`__asan::GetCurrentThread 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`SessionEvent::~SessionEvent;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Deallocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`SessionEvent::~SessionEvent;observer`DYLD-STUB$$operator delete 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::read_event;observer`std::__1::vector::vector;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::read_event;observer`std::__1::vector::vector;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libsystem_platform.dylib`_platform_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::read_event;observer`std::__1::vector::vector;libclang_rt.asan_osx_dynamic.dylib`wrap__Znwm;libclang_rt.asan_osx_dynamic.dylib`__asan::asan_memalign;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator::Allocate;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::LargeMmapAllocator::Allocate 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::read_event;observer`std::__1::vector::vector;libsystem_platform.dylib`__bzero 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;observer`PlainCommunicator::read_event;libsystem_kernel.dylib`read 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libclang_rt.asan_osx_dynamic.dylib`asan_thread_start;observer`void* std::__1::__thread_proxy[abi:ne180100]>, std::__1::reference_wrapper>>(void*);observer`Worker::operator();observer`SqlTaskHandler::handle_event;libclang_rt.asan_osx_dynamic.dylib`wrap_snprintf;libclang_rt.asan_osx_dynamic.dylib`wrap_vsnprintf;libclang_rt.asan_osx_dynamic.dylib`__sanitizer_internal_memset 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libsystem_pthread.dylib`_pthread_exit;libsystem_pthread.dylib`_pthread_tsd_cleanup;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::Destroy;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThreadLocalMallocStorage::CommitBack;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::CommitBack;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libclang_rt.asan_osx_dynamic.dylib`void __sanitizer::SizeClassAllocator64::ReleaseFreeMemoryToOS 1 -id 为 171986 的线程;libsystem_pthread.dylib`thread_start;libsystem_pthread.dylib`_pthread_start;libsystem_pthread.dylib`_pthread_exit;libsystem_pthread.dylib`_pthread_tsd_cleanup;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::Destroy;libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThreadLocalMallocStorage::CommitBack;libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::CommitBack;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::ReturnToAllocator;libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64::MaybeReleaseToOS;libsystem_kernel.dylib`madvise 1 -id 为 171986 的线程;libclang_rt.asan_osx_dynamic.dylib`__asan::QuarantineCallback::Recycle 1 From 1eeee9e2d67b0d4bae1267d9eea35468dc1b35c1 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Tue, 15 Oct 2024 20:57:24 +0800 Subject: [PATCH 248/308] #include --- src/observer/sql/operator/order_by_physical_operator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/observer/sql/operator/order_by_physical_operator.h b/src/observer/sql/operator/order_by_physical_operator.h index 2d3ad3c2..3d133a9d 100644 --- a/src/observer/sql/operator/order_by_physical_operator.h +++ b/src/observer/sql/operator/order_by_physical_operator.h @@ -15,6 +15,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/physical_operator.h" #include "sql/expr/tuple.h" #include +#include class OrderByPhysicalOperator : public PhysicalOperator { From bb37d252cb17d4d8071586b090ff278e8beeeaae Mon Sep 17 00:00:00 2001 From: root <503194395@qq.com> Date: Tue, 15 Oct 2024 17:12:31 +0000 Subject: [PATCH 249/308] =?UTF-8?q?count(*)=3D0=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scalar_group_by_physical_operator.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/observer/sql/operator/scalar_group_by_physical_operator.cpp b/src/observer/sql/operator/scalar_group_by_physical_operator.cpp index 5f3c6fbb..d027ff8c 100644 --- a/src/observer/sql/operator/scalar_group_by_physical_operator.cpp +++ b/src/observer/sql/operator/scalar_group_by_physical_operator.cpp @@ -93,7 +93,26 @@ RC ScalarGroupByPhysicalOperator::open(Trx *trx) RC ScalarGroupByPhysicalOperator::next() { + if (emitted_) { + return RC::RECORD_EOF; + } if (group_value_ == nullptr || emitted_) { + auto *aggregate_expr = static_cast(aggregate_expressions_[0]); + if (aggregate_expr->aggregate_type() == AggregateFunctionExpr::Type::COUNT) { + Value val(0); + auto Vlist = make_unique(); + Vlist->set_cells(std::vector{val}); + TupleCellSpec spec(aggregate_expr->name()); + Vlist->set_names(std::vector{spec}); + CompositeTuple composite_tuple; + composite_tuple.add_tuple(std::move(Vlist)); + + AggregatorList aggregator_list; + group_value_ = make_unique(std::move(aggregator_list), std::move(composite_tuple)); + emitted_ = true; + + return RC::SUCCESS; + } return RC::RECORD_EOF; } From d409b6fffc43e5e721d6e2728f048b7626eb7fdb Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 01:13:27 +0800 Subject: [PATCH 250/308] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=9F=BA=E4=BA=8Eord?= =?UTF-8?q?er=20by=E7=9A=84limit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/obclient/client_order_by.cpp | 6 +- src/observer/common/type/attr_type.cpp | 3 +- src/observer/common/type/attr_type.h | 2 +- src/observer/common/type/char_type.cpp | 6 +- src/observer/common/utils.h | 2 +- src/observer/net/sql_task_handler.h | 4 +- src/observer/sql/expr/expression.cpp | 2 +- .../sql/operator/order_by_logical_operator.h | 8 +- .../operator/order_by_physical_operator.cpp | 9 +- .../sql/operator/order_by_physical_operator.h | 5 +- .../sql/optimizer/logical_plan_generator.cpp | 2 +- .../sql/optimizer/physical_plan_generator.cpp | 4 +- src/observer/sql/parser/lex_sql.cpp | 5617 +++++++++++------ src/observer/sql/parser/lex_sql.h | 246 +- src/observer/sql/parser/lex_sql.l | 1 + src/observer/sql/parser/parse_defs.h | 6 + src/observer/sql/parser/yacc_sql.cpp | 5578 ++++++++++------ src/observer/sql/parser/yacc_sql.hpp | 72 +- src/observer/sql/parser/yacc_sql.y | 22 +- src/observer/sql/stmt/select_stmt.cpp | 6 + src/observer/sql/stmt/select_stmt.h | 2 + .../storage/buffer/double_write_buffer.cpp | 6 +- src/observer/storage/clog/log_buffer.h | 2 +- src/observer/storage/record/record_manager.h | 16 +- 24 files changed, 7852 insertions(+), 3775 deletions(-) diff --git a/src/obclient/client_order_by.cpp b/src/obclient/client_order_by.cpp index b6248aed..43bb0fa5 100644 --- a/src/obclient/client_order_by.cpp +++ b/src/obclient/client_order_by.cpp @@ -1,3 +1,5 @@ +#if 0 + #include #include #include @@ -258,4 +260,6 @@ int main(int argc, char *argv[]) close(sockfd); return 0; -} \ No newline at end of file +} + +#endif // #if 0 \ No newline at end of file diff --git a/src/observer/common/type/attr_type.cpp b/src/observer/common/type/attr_type.cpp index d5f53988..2904297e 100644 --- a/src/observer/common/type/attr_type.cpp +++ b/src/observer/common/type/attr_type.cpp @@ -11,7 +11,8 @@ See the Mulan PSL v2 for more details. */ #include "common/lang/string.h" #include "common/type/attr_type.h" -const char *ATTR_TYPE_NAME[] = {"undefined", "chars", "ints", "floats", "booleans", "dates", "nulls", "texts","vector"}; +const char *ATTR_TYPE_NAME[] = { + "undefined", "chars", "ints", "floats", "booleans", "dates", "nulls", "texts", "vector"}; const char *attr_type_to_string(AttrType type) { diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index d5429887..1c18834f 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -24,7 +24,7 @@ enum class AttrType DATES, ///< 日期类型(4字节) NULLS, ///< 空字段 TEXTS, ///< text 超长字段(4096字节) - VECTORS, ///< 向量 + VECTORS, ///< 向量 LIST, ///< 列表 MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index 5b7d1319..96c71482 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -79,7 +79,7 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ result.set_float(float_val); } break; case AttrType::VECTORS: { - float *array = nullptr; + float *array = nullptr; size_t length = 0; // 解析字符串为 float 数组 @@ -88,8 +88,8 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ return rc; } - result.set_vector(array,length); - }break; + result.set_vector(array, length); + } break; default: return RC::UNIMPLEMENTED; } return RC::SUCCESS; diff --git a/src/observer/common/utils.h b/src/observer/common/utils.h index 9157ae7a..119deb2d 100644 --- a/src/observer/common/utils.h +++ b/src/observer/common/utils.h @@ -21,4 +21,4 @@ RC parse_date(const char *str, int &result); RC parse_float_prefix(const char *str, float &result); -RC parse_vector_from_string(const char *str, float* &array, size_t &length); +RC parse_vector_from_string(const char *str, float *&array, size_t &length); diff --git a/src/observer/net/sql_task_handler.h b/src/observer/net/sql_task_handler.h index b296fe35..e591f4ef 100644 --- a/src/observer/net/sql_task_handler.h +++ b/src/observer/net/sql_task_handler.h @@ -50,6 +50,6 @@ class SqlTaskHandler QueryCacheStage query_cache_stage_; /// 查询缓存阶段 ParseStage parse_stage_; /// 解析阶段。将SQL解析成语法树 ParsedSqlNode ResolveStage resolve_stage_; /// 解析阶段。将语法树解析成Stmt(statement) - OptimizeStage optimize_stage_; /// 优化阶段。将语句优化成执行计划,包含规则优化和物理优化 - ExecuteStage execute_stage_; /// 执行阶段 + OptimizeStage optimize_stage_; /// 优化阶段。将语句优化成执行计划,包含规则优化和物理优化 + ExecuteStage execute_stage_; /// 执行阶段 }; \ No newline at end of file diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 67341e36..4b75bd7e 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -244,7 +244,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) return rc; } DEFER(if (nullptr != left_subquery_expr) left_subquery_expr->close(); - if (nullptr != right_subquery_expr) right_subquery_expr->close();); + if (nullptr != right_subquery_expr) right_subquery_expr->close();); // Get the value of the left expression rc = left_->get_value(tuple, left_value); diff --git a/src/observer/sql/operator/order_by_logical_operator.h b/src/observer/sql/operator/order_by_logical_operator.h index 142fa540..6b5a25cf 100644 --- a/src/observer/sql/operator/order_by_logical_operator.h +++ b/src/observer/sql/operator/order_by_logical_operator.h @@ -23,8 +23,8 @@ See the Mulan PSL v2 for more details. */ class OrderByLogicalOperator : public LogicalOperator { public: - OrderByLogicalOperator(std::vector order_by, const std::vector exprs) - : order_by_(std::move(order_by)), exprs_(std::move(exprs)) + OrderByLogicalOperator(std::vector order_by, const std::vector exprs, int limit) + : order_by_(std::move(order_by)), exprs_(std::move(exprs)), limit_(limit) {} LogicalOperatorType type() const override { return LogicalOperatorType::ORDER_BY; } @@ -33,9 +33,13 @@ class OrderByLogicalOperator : public LogicalOperator std::vector &exprs() { return exprs_; } + int limit() const { return limit_; } + private: std::vector order_by_; /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr std::vector exprs_; + + int limit_ = -1; }; \ No newline at end of file diff --git a/src/observer/sql/operator/order_by_physical_operator.cpp b/src/observer/sql/operator/order_by_physical_operator.cpp index 1af2fc71..f72fa06a 100644 --- a/src/observer/sql/operator/order_by_physical_operator.cpp +++ b/src/observer/sql/operator/order_by_physical_operator.cpp @@ -14,8 +14,8 @@ See the Mulan PSL v2 for more details. */ #include "order_by_physical_operator.h" -OrderByPhysicalOperator::OrderByPhysicalOperator(vector order_by, vector exprs) - : order_by_(std::move(order_by)), exprs_(std::move(exprs)) +OrderByPhysicalOperator::OrderByPhysicalOperator(vector order_by, vector exprs, int limit) + : order_by_(std::move(order_by)), exprs_(std::move(exprs)), limit_(limit) { vector expressions; expressions.reserve(exprs_.size()); @@ -105,8 +105,13 @@ RC OrderByPhysicalOperator::next() return RC::RECORD_EOF; } + if (pop_count_ == limit_) { + return RC::RECORD_EOF; + } + vector value = order_and_field_line.top().second; order_and_field_line.pop(); + pop_count_++; tuple_.set_cells(value); return rc; } diff --git a/src/observer/sql/operator/order_by_physical_operator.h b/src/observer/sql/operator/order_by_physical_operator.h index 3d133a9d..8bc73dea 100644 --- a/src/observer/sql/operator/order_by_physical_operator.h +++ b/src/observer/sql/operator/order_by_physical_operator.h @@ -20,7 +20,7 @@ See the Mulan PSL v2 for more details. */ class OrderByPhysicalOperator : public PhysicalOperator { public: - OrderByPhysicalOperator(std::vector order_by, std::vector exprs); + OrderByPhysicalOperator(std::vector order_by, std::vector exprs, int limit); virtual ~OrderByPhysicalOperator() = default; @@ -49,4 +49,7 @@ class OrderByPhysicalOperator : public PhysicalOperator using order_func = std::function; using order_list = std::priority_queue, order_func>; order_list order_and_field_line; + + int pop_count_ = 0; + int limit_ = -1; }; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 3094fc2b..37e32fb4 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -385,7 +385,7 @@ RC LogicalPlanGenerator::create_order_by_plan(SelectStmt *select_stmt, unique_pt } unique_ptr orderby_oper( - new OrderByLogicalOperator(std::move(select_stmt->order_by()), query_expressions)); + new OrderByLogicalOperator(std::move(select_stmt->order_by()), query_expressions, select_stmt->limit())); logical_operator = std::move(orderby_oper); return RC::SUCCESS; } diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index 2802f9ba..87ac746f 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -412,8 +412,8 @@ RC PhysicalPlanGenerator::create_plan(OrderByLogicalOperator &logical_oper, std: } } - OrderByPhysicalOperator *orderby_operator = - new OrderByPhysicalOperator(std::move(logical_oper.order_by()), std::move(logical_oper.exprs())); + OrderByPhysicalOperator *orderby_operator = new OrderByPhysicalOperator( + std::move(logical_oper.order_by()), std::move(logical_oper.exprs()), logical_oper.limit()); if (child_phy_oper) { orderby_operator->add_child(std::move(child_phy_oper)); } diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 18fded69..9f8f2525 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,23 +8,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -77,62 +75,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -156,12 +154,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -189,7 +187,7 @@ typedef void* yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_NEW_FILE yyrestart(yyin, yyscanner) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -207,7 +205,7 @@ typedef void* yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -222,88 +220,85 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - + +#define YY_LESS_LINENO(n) +#define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } while (0) +#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - - }; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -312,59 +307,55 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) +#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner); +static void yy_load_buffer_state(yyscan_t yyscanner); +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -372,325 +363,2521 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state(yyscan_t yyscanner); +static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); +static int yy_get_next_buffer(yyscan_t yyscanner); +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 79 -#define YY_END_OF_BUFFER 80 +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t)(yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; +#define YY_NUM_RULES 80 +#define YY_END_OF_BUFFER 81 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[232] = - { 0, - 0, 0, 0, 0, 80, 78, 1, 2, 78, 78, - 78, 58, 59, 74, 72, 60, 73, 6, 75, 3, - 5, 65, 61, 67, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 79, 64, 0, 76, 0, 77, - 0, 3, 62, 63, 66, 71, 71, 71, 50, 71, - 49, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 52, 69, 71, 71, 71, - 71, 71, 15, 23, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 4, 22, 51, 71, - - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 33, 71, 71, 71, 68, 71, 71, 71, 71, 29, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 19, 34, 71, 71, 43, 36, 71, 9, 11, - 71, 7, 71, 71, 71, 20, 71, 71, 8, 71, - 71, 71, 71, 25, 57, 70, 42, 40, 71, 71, - 71, 16, 71, 17, 71, 37, 71, 71, 71, 71, - 71, 30, 71, 71, 71, 71, 71, 35, 71, 46, - 71, 14, 71, 56, 71, 71, 48, 71, 71, 71, - - 12, 71, 71, 71, 71, 21, 31, 10, 27, 53, - 71, 55, 47, 44, 24, 71, 71, 18, 71, 13, - 39, 28, 26, 38, 45, 71, 71, 54, 41, 32, - 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, - 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, - - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[71] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 - } ; - -static const flex_int16_t yy_base[237] = - { 0, - 0, 0, 0, 0, 630, 631, 631, 631, 611, 623, - 621, 631, 631, 631, 631, 631, 631, 631, 631, 58, - 631, 56, 631, 608, 57, 61, 62, 63, 64, 83, - 65, 73, 91, 76, 610, 117, 119, 115, 103, 142, - 134, 129, 141, 120, 631, 631, 619, 631, 617, 631, - 607, 71, 631, 631, 631, 0, 606, 89, 79, 157, - 605, 145, 155, 167, 174, 178, 182, 181, 188, 185, - 189, 193, 195, 127, 190, 241, 604, 203, 207, 213, - 196, 219, 603, 191, 229, 236, 239, 243, 250, 215, - 253, 254, 255, 256, 266, 270, 602, 601, 600, 269, - - 276, 274, 280, 287, 295, 301, 306, 311, 314, 303, - 312, 315, 316, 302, 321, 320, 335, 328, 342, 346, - 329, 347, 352, 354, 599, 356, 369, 368, 371, 598, - 349, 373, 375, 383, 379, 386, 385, 389, 393, 396, - 394, 589, 588, 392, 400, 587, 585, 411, 584, 583, - 413, 582, 415, 423, 422, 581, 419, 430, 579, 426, - 436, 434, 442, 578, 577, 576, 575, 455, 445, 451, - 459, 573, 470, 567, 449, 563, 462, 471, 468, 469, - 472, 562, 476, 485, 489, 479, 491, 558, 499, 557, - 497, 556, 496, 552, 509, 506, 539, 510, 511, 516, - - 517, 536, 537, 519, 522, 529, 518, 441, 432, 428, - 525, 409, 401, 397, 350, 532, 547, 325, 551, 324, - 257, 233, 223, 217, 152, 555, 550, 126, 124, 88, - 631, 606, 608, 610, 90, 79 - } ; - -static const flex_int16_t yy_def[237] = - { 0, - 231, 1, 232, 232, 231, 231, 231, 231, 231, 233, - 234, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 231, 231, 233, 231, 234, 231, - 231, 231, 231, 231, 231, 236, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 231, 235, 235, 235, - - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 0, 231, 231, 231, 231, 231 - } ; - -static const flex_int16_t yy_nxt[702] = - { 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, - 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, - 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, - 51, 56, 52, 53, 54, 56, 56, 56, 56, 56, - 56, 62, 66, 51, 60, 52, 67, 56, 63, 58, - 56, 57, 74, 56, 59, 64, 75, 56, 65, 68, - - 99, 73, 56, 56, 61, 56, 69, 62, 66, 78, - 60, 98, 67, 70, 63, 58, 71, 56, 74, 72, - 59, 64, 75, 76, 65, 68, 99, 73, 77, 56, - 61, 56, 69, 56, 56, 78, 85, 98, 56, 70, - 56, 56, 71, 56, 79, 72, 96, 83, 56, 76, - 80, 84, 81, 90, 77, 56, 56, 91, 82, 56, - 94, 92, 85, 93, 95, 86, 56, 115, 87, 56, - 79, 56, 96, 83, 102, 101, 80, 84, 81, 90, - 88, 56, 100, 91, 82, 89, 94, 92, 56, 93, - 95, 86, 56, 115, 87, 56, 56, 104, 103, 56, - - 102, 101, 56, 56, 56, 56, 88, 56, 100, 56, - 56, 89, 106, 127, 108, 109, 105, 56, 111, 107, - 116, 56, 110, 104, 103, 112, 113, 56, 114, 56, - 122, 56, 124, 56, 125, 134, 123, 56, 106, 127, - 108, 109, 105, 56, 111, 107, 116, 56, 110, 126, - 56, 112, 113, 56, 114, 56, 122, 56, 124, 128, - 125, 134, 123, 117, 56, 118, 129, 56, 56, 56, - 56, 56, 131, 119, 130, 126, 132, 137, 120, 121, - 56, 136, 133, 56, 56, 128, 138, 139, 56, 117, - 56, 118, 129, 140, 56, 135, 141, 142, 131, 119, - - 130, 56, 132, 137, 120, 121, 145, 136, 133, 56, - 143, 144, 138, 139, 146, 56, 56, 56, 147, 140, - 56, 135, 141, 142, 148, 56, 56, 149, 56, 56, - 56, 154, 145, 153, 56, 56, 143, 144, 56, 56, - 146, 157, 56, 56, 147, 150, 155, 156, 158, 56, - 148, 151, 152, 149, 159, 161, 56, 154, 160, 153, - 56, 56, 164, 56, 56, 162, 56, 157, 56, 163, - 56, 150, 155, 156, 158, 166, 167, 151, 152, 165, - 159, 161, 56, 56, 160, 56, 168, 56, 164, 56, - 172, 162, 169, 56, 171, 163, 174, 56, 170, 56, - - 56, 166, 167, 56, 178, 165, 56, 56, 56, 173, - 56, 56, 168, 175, 56, 56, 172, 176, 169, 183, - 171, 177, 174, 56, 170, 56, 182, 56, 179, 56, - 178, 180, 181, 56, 187, 173, 56, 56, 184, 175, - 56, 189, 56, 176, 56, 183, 56, 177, 56, 185, - 56, 186, 182, 190, 179, 56, 56, 180, 181, 56, - 187, 188, 191, 56, 184, 56, 193, 189, 192, 56, - 194, 198, 201, 56, 196, 185, 56, 186, 195, 190, - 199, 197, 56, 56, 56, 56, 56, 188, 191, 200, - 56, 204, 193, 56, 192, 206, 194, 198, 201, 56, - - 196, 202, 205, 56, 195, 56, 199, 197, 208, 203, - 56, 56, 209, 56, 207, 200, 210, 204, 211, 214, - 56, 206, 213, 56, 56, 56, 216, 202, 205, 217, - 56, 56, 56, 56, 208, 203, 56, 212, 209, 56, - 207, 219, 210, 56, 211, 214, 56, 215, 213, 218, - 56, 56, 216, 56, 220, 217, 223, 225, 224, 221, - 222, 56, 226, 212, 56, 56, 56, 219, 227, 56, - 56, 56, 56, 215, 228, 218, 56, 56, 229, 230, - 220, 56, 223, 225, 224, 221, 222, 56, 226, 56, - 56, 56, 56, 56, 227, 56, 56, 56, 56, 56, - - 228, 56, 56, 56, 229, 230, 45, 45, 47, 47, - 49, 49, 56, 56, 56, 56, 97, 56, 56, 56, - 56, 97, 50, 48, 56, 55, 50, 48, 46, 231, - 5, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - - 231 - } ; - -static const flex_int16_t yy_chk[702] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, - 236, 27, 28, 52, 26, 52, 28, 32, 27, 25, - 34, 235, 32, 59, 25, 27, 32, 30, 27, 28, - - 59, 31, 230, 58, 26, 33, 29, 27, 28, 34, - 26, 58, 28, 30, 27, 25, 30, 39, 32, 30, - 25, 27, 32, 33, 27, 28, 59, 31, 33, 38, - 26, 36, 29, 37, 44, 34, 39, 58, 229, 30, - 228, 74, 30, 42, 36, 30, 44, 38, 41, 33, - 36, 38, 37, 41, 33, 43, 40, 41, 37, 62, - 43, 42, 39, 42, 43, 40, 225, 74, 40, 63, - 36, 60, 44, 38, 63, 62, 36, 38, 37, 41, - 40, 64, 60, 41, 37, 40, 43, 42, 65, 42, - 43, 40, 66, 74, 40, 68, 67, 65, 64, 70, - - 63, 62, 69, 71, 75, 84, 40, 72, 60, 73, - 81, 40, 67, 84, 68, 69, 66, 78, 70, 67, - 75, 79, 69, 65, 64, 71, 72, 80, 73, 90, - 78, 224, 80, 82, 81, 90, 79, 223, 67, 84, - 68, 69, 66, 85, 70, 67, 75, 222, 69, 82, - 86, 71, 72, 87, 73, 76, 78, 88, 80, 85, - 81, 90, 79, 76, 89, 76, 86, 91, 92, 93, - 94, 221, 87, 76, 86, 82, 88, 93, 76, 76, - 95, 92, 89, 100, 96, 85, 94, 95, 102, 76, - 101, 76, 86, 96, 103, 91, 100, 101, 87, 76, - - 86, 104, 88, 93, 76, 76, 104, 92, 89, 105, - 102, 103, 94, 95, 105, 106, 114, 110, 105, 96, - 107, 91, 100, 101, 106, 108, 111, 107, 109, 112, - 113, 111, 104, 110, 116, 115, 102, 103, 220, 218, - 105, 114, 118, 121, 105, 108, 112, 113, 115, 117, - 106, 109, 109, 107, 116, 118, 119, 111, 117, 110, - 120, 122, 121, 131, 215, 119, 123, 114, 124, 120, - 126, 108, 112, 113, 115, 123, 124, 109, 109, 122, - 116, 118, 128, 127, 117, 129, 126, 132, 121, 133, - 131, 119, 127, 135, 129, 120, 133, 134, 128, 137, - - 136, 123, 124, 138, 137, 122, 144, 139, 141, 132, - 140, 214, 126, 134, 145, 213, 131, 135, 127, 144, - 129, 136, 133, 212, 128, 148, 141, 151, 138, 153, - 137, 139, 140, 157, 153, 132, 155, 154, 145, 134, - 160, 155, 210, 135, 158, 144, 209, 136, 162, 148, - 161, 151, 141, 157, 138, 208, 163, 139, 140, 169, - 153, 154, 158, 175, 145, 170, 161, 155, 160, 168, - 162, 170, 175, 171, 168, 148, 177, 151, 163, 157, - 171, 169, 179, 180, 173, 178, 181, 154, 158, 173, - 183, 179, 161, 186, 160, 181, 162, 170, 175, 184, - - 168, 177, 180, 185, 163, 187, 171, 169, 184, 178, - 193, 191, 185, 189, 183, 173, 186, 179, 187, 193, - 196, 181, 191, 195, 198, 199, 196, 177, 180, 198, - 200, 201, 207, 204, 184, 178, 205, 189, 185, 211, - 183, 200, 186, 206, 187, 193, 216, 195, 191, 199, - 202, 203, 196, 197, 201, 198, 204, 211, 205, 202, - 203, 217, 216, 189, 227, 219, 194, 200, 217, 226, - 192, 190, 188, 195, 219, 199, 182, 176, 226, 227, - 201, 174, 204, 211, 205, 202, 203, 172, 216, 167, - 166, 165, 164, 159, 217, 156, 152, 150, 149, 147, - - 219, 146, 143, 142, 226, 227, 232, 232, 233, 233, - 234, 234, 130, 125, 99, 98, 97, 83, 77, 61, - 57, 51, 49, 47, 35, 24, 11, 10, 9, 5, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - - 231 - } ; +{ + flex_int32_t yy_verify; + flex_int32_t yy_nxt; +}; +static const flex_int16_t yy_accept[235] = {0, + 0, + 0, + 0, + 0, + 81, + 79, + 1, + 2, + 79, + 79, + 79, + 59, + 60, + 75, + 73, + 61, + 74, + 6, + 76, + 3, + 5, + 66, + 62, + 68, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 80, + 65, + 0, + 77, + 0, + 78, + 0, + 3, + 63, + 64, + 67, + 72, + 72, + 72, + 51, + 72, + 50, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 53, + 70, + 72, + 72, + 72, + 72, + 72, + 15, + 23, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 4, + 22, + 52, + 72, + + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 33, + 72, + 72, + 72, + 72, + 69, + 72, + 72, + 72, + 72, + 29, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 72, + 19, + 34, + 72, + 72, + 43, + 36, + 72, + 9, + 11, + 72, + 7, + 72, + 72, + 72, + 20, + 72, + 72, + 8, + 72, + 72, + 72, + 72, + 25, + 58, + 71, + 72, + 42, + 40, + 72, + 72, + 72, + 16, + 72, + 17, + 72, + 37, + 72, + 72, + 72, + 72, + 72, + 30, + 72, + 72, + 72, + 72, + 72, + 35, + 72, + 46, + 72, + 14, + 72, + 57, + 72, + 47, + 72, + 49, + + 72, + 72, + 72, + 12, + 72, + 72, + 72, + 72, + 21, + 31, + 10, + 27, + 54, + 72, + 56, + 48, + 44, + 24, + 72, + 72, + 18, + 72, + 13, + 39, + 28, + 26, + 38, + 45, + 72, + 72, + 55, + 41, + 32, + 0}; + +static const YY_CHAR yy_ec[256] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 3, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 4, + 5, + 1, + 1, + 1, + 1, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 15, + 1, + 16, + 17, + 18, + 19, + 1, + 1, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 1, + 1, + 1, + 1, + 45, + 1, + 46, + 47, + 48, + 49, + + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 45, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1}; + +static const YY_CHAR yy_meta[71] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2}; + +static const flex_int16_t yy_base[240] = {0, + 0, + 0, + 0, + 0, + 639, + 640, + 640, + 640, + 620, + 632, + 630, + 640, + 640, + 640, + 640, + 640, + 640, + 640, + 640, + 58, + 640, + 56, + 640, + 617, + 57, + 61, + 62, + 63, + 64, + 83, + 65, + 73, + 91, + 76, + 619, + 117, + 119, + 115, + 103, + 142, + 134, + 129, + 141, + 120, + 640, + 640, + 628, + 640, + 626, + 640, + 616, + 71, + 640, + 640, + 640, + 0, + 615, + 89, + 79, + 157, + 614, + 145, + 155, + 167, + 174, + 178, + 182, + 181, + 188, + 185, + 189, + 193, + 195, + 127, + 190, + 241, + 613, + 203, + 229, + 191, + 219, + 220, + 612, + 199, + 239, + 247, + 235, + 248, + 250, + 252, + 225, + 260, + 266, + 245, + 276, + 286, + 611, + 610, + 609, + 288, + + 296, + 256, + 298, + 302, + 305, + 308, + 306, + 292, + 311, + 316, + 318, + 320, + 325, + 319, + 346, + 328, + 322, + 351, + 345, + 347, + 350, + 353, + 366, + 352, + 373, + 608, + 362, + 367, + 372, + 377, + 607, + 379, + 383, + 387, + 384, + 389, + 396, + 393, + 403, + 392, + 399, + 409, + 599, + 598, + 410, + 411, + 596, + 595, + 422, + 594, + 593, + 433, + 592, + 425, + 434, + 436, + 591, + 418, + 419, + 589, + 440, + 429, + 444, + 448, + 588, + 585, + 584, + 450, + 583, + 455, + 451, + 459, + 462, + 578, + 475, + 577, + 476, + 576, + 452, + 478, + 479, + 482, + 481, + 575, + 489, + 498, + 508, + 487, + 505, + 573, + 497, + 570, + 493, + 569, + 515, + 566, + 522, + 563, + 519, + 559, + + 526, + 529, + 512, + 509, + 545, + 552, + 537, + 520, + 535, + 415, + 408, + 355, + 330, + 538, + 326, + 324, + 282, + 257, + 548, + 534, + 223, + 562, + 221, + 218, + 217, + 215, + 213, + 152, + 565, + 540, + 126, + 124, + 88, + 640, + 615, + 617, + 619, + 90, + 79}; + +static const flex_int16_t yy_def[240] = {0, + 234, + 1, + 235, + 235, + 234, + 234, + 234, + 234, + 234, + 236, + 237, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 234, + 234, + 236, + 234, + 237, + 234, + 234, + 234, + 234, + 234, + 234, + 239, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 234, + 238, + 238, + 238, + + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 238, + 0, + 234, + 234, + 234, + 234, + 234}; + +static const flex_int16_t yy_nxt[711] = {0, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 35, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 35, + 37, + 38, + 35, + 35, + 39, + 40, + 41, + 42, + 43, + 44, + 35, + 35, + 51, + 56, + 52, + 53, + 54, + 56, + 56, + 56, + 56, + 56, + 56, + 62, + 66, + 51, + 60, + 52, + 67, + 56, + 63, + 58, + 56, + 57, + 74, + 56, + 59, + 64, + 75, + 56, + 65, + 68, + + 99, + 73, + 56, + 56, + 61, + 56, + 69, + 62, + 66, + 78, + 60, + 98, + 67, + 70, + 63, + 58, + 71, + 56, + 74, + 72, + 59, + 64, + 75, + 76, + 65, + 68, + 99, + 73, + 77, + 56, + 61, + 56, + 69, + 56, + 56, + 78, + 85, + 98, + 56, + 70, + 56, + 56, + 71, + 56, + 79, + 72, + 96, + 83, + 56, + 76, + 80, + 84, + 81, + 90, + 77, + 56, + 56, + 91, + 82, + 56, + 94, + 92, + 85, + 93, + 95, + 86, + 56, + 115, + 87, + 56, + 79, + 56, + 96, + 83, + 102, + 101, + 80, + 84, + 81, + 90, + 88, + 56, + 100, + 91, + 82, + 89, + 94, + 92, + 56, + 93, + 95, + 86, + 56, + 115, + 87, + 56, + 56, + 104, + 103, + 56, + + 102, + 101, + 56, + 56, + 56, + 56, + 88, + 56, + 100, + 56, + 125, + 89, + 106, + 56, + 108, + 109, + 105, + 56, + 111, + 107, + 116, + 128, + 110, + 104, + 103, + 112, + 113, + 56, + 114, + 56, + 122, + 56, + 56, + 56, + 56, + 56, + 125, + 56, + 106, + 56, + 108, + 109, + 105, + 56, + 111, + 107, + 116, + 128, + 110, + 56, + 127, + 112, + 113, + 56, + 114, + 56, + 122, + 126, + 123, + 56, + 124, + 56, + 56, + 117, + 56, + 118, + 56, + 136, + 132, + 129, + 56, + 56, + 135, + 119, + 56, + 139, + 127, + 130, + 120, + 121, + 56, + 133, + 134, + 126, + 123, + 131, + 124, + 137, + 138, + 117, + 56, + 118, + 144, + 136, + 132, + 129, + 56, + 140, + 135, + 119, + + 56, + 139, + 56, + 130, + 120, + 121, + 56, + 133, + 134, + 141, + 56, + 131, + 56, + 137, + 138, + 142, + 56, + 143, + 144, + 56, + 56, + 146, + 56, + 140, + 147, + 56, + 151, + 150, + 148, + 145, + 56, + 149, + 56, + 56, + 56, + 141, + 56, + 155, + 56, + 56, + 56, + 142, + 56, + 143, + 56, + 161, + 154, + 146, + 152, + 153, + 147, + 156, + 151, + 150, + 148, + 145, + 157, + 149, + 158, + 56, + 56, + 56, + 160, + 155, + 56, + 56, + 56, + 56, + 163, + 56, + 164, + 161, + 154, + 159, + 152, + 153, + 56, + 156, + 162, + 168, + 56, + 56, + 157, + 165, + 158, + 166, + 56, + 56, + 160, + 167, + 171, + 56, + 170, + 56, + 163, + 169, + 164, + 56, + 56, + 159, + + 173, + 56, + 172, + 56, + 162, + 168, + 56, + 56, + 176, + 165, + 56, + 166, + 180, + 56, + 177, + 167, + 171, + 56, + 170, + 175, + 174, + 169, + 56, + 56, + 56, + 56, + 173, + 178, + 172, + 56, + 182, + 179, + 56, + 56, + 176, + 183, + 56, + 185, + 180, + 56, + 177, + 184, + 181, + 56, + 189, + 175, + 174, + 56, + 56, + 186, + 56, + 193, + 192, + 178, + 56, + 191, + 182, + 179, + 56, + 195, + 187, + 183, + 56, + 185, + 56, + 56, + 56, + 184, + 181, + 56, + 189, + 188, + 190, + 56, + 199, + 186, + 56, + 193, + 192, + 201, + 196, + 191, + 194, + 202, + 197, + 195, + 187, + 200, + 198, + 56, + 56, + 205, + 56, + 56, + 203, + 56, + 56, + 188, + 190, + 204, + + 199, + 56, + 207, + 56, + 209, + 201, + 196, + 56, + 194, + 202, + 197, + 56, + 56, + 200, + 198, + 208, + 206, + 205, + 216, + 56, + 203, + 211, + 56, + 56, + 213, + 204, + 56, + 210, + 207, + 56, + 209, + 212, + 214, + 56, + 56, + 215, + 56, + 222, + 217, + 219, + 56, + 208, + 206, + 56, + 216, + 220, + 223, + 211, + 56, + 56, + 213, + 56, + 56, + 210, + 56, + 230, + 227, + 212, + 214, + 56, + 218, + 215, + 56, + 222, + 217, + 219, + 56, + 221, + 224, + 233, + 228, + 220, + 223, + 56, + 226, + 225, + 56, + 56, + 229, + 56, + 56, + 230, + 227, + 56, + 56, + 231, + 218, + 56, + 232, + 56, + 56, + 56, + 56, + 221, + 224, + 233, + 228, + 56, + 56, + 56, + + 226, + 225, + 56, + 56, + 229, + 56, + 56, + 56, + 56, + 56, + 56, + 231, + 56, + 56, + 232, + 45, + 45, + 47, + 47, + 49, + 49, + 56, + 56, + 56, + 56, + 97, + 56, + 56, + 56, + 56, + 97, + 50, + 48, + 56, + 55, + 50, + 48, + 46, + 234, + 5, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234}; + +static const flex_int16_t yy_chk[711] = {0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 20, + 25, + 20, + 22, + 22, + 26, + 27, + 28, + 29, + 31, + 239, + 27, + 28, + 52, + 26, + 52, + 28, + 32, + 27, + 25, + 34, + 238, + 32, + 59, + 25, + 27, + 32, + 30, + 27, + 28, + + 59, + 31, + 233, + 58, + 26, + 33, + 29, + 27, + 28, + 34, + 26, + 58, + 28, + 30, + 27, + 25, + 30, + 39, + 32, + 30, + 25, + 27, + 32, + 33, + 27, + 28, + 59, + 31, + 33, + 38, + 26, + 36, + 29, + 37, + 44, + 34, + 39, + 58, + 232, + 30, + 231, + 74, + 30, + 42, + 36, + 30, + 44, + 38, + 41, + 33, + 36, + 38, + 37, + 41, + 33, + 43, + 40, + 41, + 37, + 62, + 43, + 42, + 39, + 42, + 43, + 40, + 228, + 74, + 40, + 63, + 36, + 60, + 44, + 38, + 63, + 62, + 36, + 38, + 37, + 41, + 40, + 64, + 60, + 41, + 37, + 40, + 43, + 42, + 65, + 42, + 43, + 40, + 66, + 74, + 40, + 68, + 67, + 65, + 64, + 70, + + 63, + 62, + 69, + 71, + 75, + 80, + 40, + 72, + 60, + 73, + 80, + 40, + 67, + 84, + 68, + 69, + 66, + 78, + 70, + 67, + 75, + 84, + 69, + 65, + 64, + 71, + 72, + 227, + 73, + 226, + 78, + 225, + 224, + 81, + 82, + 223, + 80, + 221, + 67, + 91, + 68, + 69, + 66, + 79, + 70, + 67, + 75, + 84, + 69, + 87, + 82, + 71, + 72, + 85, + 73, + 76, + 78, + 81, + 79, + 94, + 79, + 86, + 88, + 76, + 89, + 76, + 90, + 91, + 87, + 85, + 102, + 218, + 90, + 76, + 92, + 94, + 82, + 86, + 76, + 76, + 93, + 88, + 89, + 81, + 79, + 86, + 79, + 92, + 93, + 76, + 95, + 76, + 102, + 91, + 87, + 85, + 217, + 95, + 90, + 76, + + 96, + 94, + 100, + 86, + 76, + 76, + 108, + 88, + 89, + 96, + 101, + 86, + 103, + 92, + 93, + 100, + 104, + 101, + 102, + 105, + 107, + 104, + 106, + 95, + 105, + 109, + 108, + 107, + 105, + 103, + 110, + 106, + 111, + 114, + 112, + 96, + 117, + 111, + 216, + 113, + 215, + 100, + 116, + 101, + 213, + 117, + 110, + 104, + 109, + 109, + 105, + 112, + 108, + 107, + 105, + 103, + 113, + 106, + 114, + 119, + 115, + 120, + 116, + 111, + 121, + 118, + 124, + 122, + 119, + 212, + 120, + 117, + 110, + 115, + 109, + 109, + 127, + 112, + 118, + 124, + 123, + 128, + 113, + 121, + 114, + 122, + 129, + 125, + 116, + 123, + 128, + 130, + 127, + 132, + 119, + 125, + 120, + 133, + 135, + 115, + + 130, + 134, + 129, + 136, + 118, + 124, + 140, + 138, + 134, + 121, + 137, + 122, + 138, + 141, + 135, + 123, + 128, + 139, + 127, + 133, + 132, + 125, + 211, + 142, + 145, + 146, + 130, + 136, + 129, + 210, + 140, + 137, + 158, + 159, + 134, + 141, + 149, + 145, + 138, + 154, + 135, + 142, + 139, + 162, + 154, + 133, + 132, + 152, + 155, + 146, + 156, + 159, + 158, + 136, + 161, + 156, + 140, + 137, + 163, + 162, + 149, + 141, + 164, + 145, + 168, + 171, + 179, + 142, + 139, + 170, + 154, + 152, + 155, + 172, + 170, + 146, + 173, + 159, + 158, + 172, + 163, + 156, + 161, + 173, + 164, + 162, + 149, + 171, + 168, + 175, + 177, + 179, + 180, + 181, + 175, + 183, + 182, + 152, + 155, + 177, + + 170, + 188, + 181, + 185, + 183, + 172, + 163, + 193, + 161, + 173, + 164, + 191, + 186, + 171, + 168, + 182, + 180, + 179, + 193, + 189, + 175, + 186, + 187, + 204, + 188, + 177, + 203, + 185, + 181, + 195, + 183, + 187, + 189, + 199, + 208, + 191, + 197, + 203, + 195, + 199, + 201, + 182, + 180, + 202, + 193, + 201, + 204, + 186, + 220, + 209, + 188, + 207, + 214, + 185, + 230, + 220, + 208, + 187, + 189, + 205, + 197, + 191, + 219, + 203, + 195, + 199, + 206, + 202, + 205, + 230, + 214, + 201, + 204, + 200, + 207, + 206, + 222, + 198, + 219, + 229, + 196, + 220, + 208, + 194, + 192, + 222, + 197, + 190, + 229, + 184, + 178, + 176, + 174, + 202, + 205, + 230, + 214, + 169, + 167, + 166, + + 207, + 206, + 165, + 160, + 219, + 157, + 153, + 151, + 150, + 148, + 147, + 222, + 144, + 143, + 229, + 235, + 235, + 236, + 236, + 237, + 237, + 131, + 126, + 99, + 98, + 97, + 83, + 77, + 61, + 57, + 51, + 49, + 47, + 35, + 24, + 11, + 10, + 9, + 5, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234, + 234}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -702,8 +2889,8 @@ static const flex_int16_t yy_chk[702] = #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -717,13 +2904,15 @@ static const flex_int16_t yy_chk[702] = #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token +#define RETURN_TOKEN(token) \ + LOG_DEBUG("%s", #token); \ + return token #line 727 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -752,124 +2941,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t - { +{ + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char *yy_last_accepting_cpos; - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; + int yylineno_r; + int yy_flex_debug_r; - int yylineno_r; - int yy_flex_debug_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + YYSTYPE *yylval_r; - YYSTYPE * yylval_r; + YYLTYPE *yylloc_r; - YYLTYPE * yylloc_r; +}; /* end struct yyguts_t */ - }; /* end struct yyguts_t */ +static int yy_init_globals(yyscan_t yyscanner); -static int yy_init_globals ( yyscan_t yyscanner ); +/* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ +#define yylval yyg->yylval_r - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); +#define yylloc yyg->yylloc_r -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); + +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); + +int yyget_debug(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); +static int yyinput(yyscan_t yyscanner); #else -static int input ( yyscan_t yyscanner ); +static int input(yyscan_t yyscanner); #endif #endif @@ -889,42 +3078,38 @@ static int input ( yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO \ + do { \ + if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ + } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ +#define YY_INPUT(buf, result, max_size) \ + if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ + int c = '*'; \ + yy_size_t n; \ + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ + buf[n] = (char)c; \ + if (c == '\n') \ + buf[n++] = (char)c; \ + if (c == EOF && ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + result = n; \ + } else { \ + errno = 0; \ + while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ + if (errno != EINTR) { \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + break; \ + } \ + errno = 0; \ + clearerr(yyin); \ + } \ + } #endif @@ -943,7 +3128,7 @@ static int input ( yyscan_t yyscanner ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -954,11 +3139,9 @@ static int input ( yyscan_t yyscanner ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -970,634 +3153,550 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK /*LINTED*/ break; #endif -#define YY_RULE_SETUP \ - YY_USER_ACTION +#define YY_RULE_SETUP YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; + if (!yyg->yy_init) { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ + if (!yyg->yy_start) + yyg->yy_start = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if (!yyin) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if (!yyout) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_load_buffer_state( yyscanner ); - } + yy_load_buffer_state(yyscanner); + } - { + { #line 75 "lex_sql.l" - #line 1022 "lex_sql.cpp" - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 232 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 631 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP + while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_match: + do { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 235) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } while (yy_base[yy_current_state] != 640); + + yy_find_action: + yy_act = yy_accept[yy_current_state]; + if (yy_act == 0) { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + do_action: /* This label is used only to access EOF actions. */ + + switch (yy_act) { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + + case 1: YY_RULE_SETUP #line 77 "lex_sql.l" -// ignore whitespace - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP + // ignore whitespace + YY_BREAK + case 2: + /* rule 2 can match eol */ + YY_RULE_SETUP #line 78 "lex_sql.l" -; - YY_BREAK -case 3: -YY_RULE_SETUP + ; + YY_BREAK + case 3: YY_RULE_SETUP #line 80 "lex_sql.l" -yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); - YY_BREAK -case 4: -YY_RULE_SETUP + yylval->number = atoi(yytext); + RETURN_TOKEN(NUMBER); + YY_BREAK + case 4: YY_RULE_SETUP #line 81 "lex_sql.l" -yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); - YY_BREAK -case 5: -YY_RULE_SETUP + yylval->floats = (float)(atof(yytext)); + RETURN_TOKEN(FLOAT); + YY_BREAK + case 5: YY_RULE_SETUP #line 83 "lex_sql.l" -RETURN_TOKEN(SEMICOLON); - YY_BREAK -case 6: -YY_RULE_SETUP + RETURN_TOKEN(SEMICOLON); + YY_BREAK + case 6: YY_RULE_SETUP #line 84 "lex_sql.l" -RETURN_TOKEN(DOT); - YY_BREAK -case 7: -YY_RULE_SETUP + RETURN_TOKEN(DOT); + YY_BREAK + case 7: YY_RULE_SETUP #line 85 "lex_sql.l" -RETURN_TOKEN(EXIT); - YY_BREAK -case 8: -YY_RULE_SETUP + RETURN_TOKEN(EXIT); + YY_BREAK + case 8: YY_RULE_SETUP #line 86 "lex_sql.l" -RETURN_TOKEN(HELP); - YY_BREAK -case 9: -YY_RULE_SETUP + RETURN_TOKEN(HELP); + YY_BREAK + case 9: YY_RULE_SETUP #line 87 "lex_sql.l" -RETURN_TOKEN(DESC); - YY_BREAK -case 10: -YY_RULE_SETUP + RETURN_TOKEN(DESC); + YY_BREAK + case 10: YY_RULE_SETUP #line 88 "lex_sql.l" -RETURN_TOKEN(CREATE); - YY_BREAK -case 11: -YY_RULE_SETUP + RETURN_TOKEN(CREATE); + YY_BREAK + case 11: YY_RULE_SETUP #line 89 "lex_sql.l" -RETURN_TOKEN(DROP); - YY_BREAK -case 12: -YY_RULE_SETUP + RETURN_TOKEN(DROP); + YY_BREAK + case 12: YY_RULE_SETUP #line 90 "lex_sql.l" -RETURN_TOKEN(TABLE); - YY_BREAK -case 13: -YY_RULE_SETUP + RETURN_TOKEN(TABLE); + YY_BREAK + case 13: YY_RULE_SETUP #line 91 "lex_sql.l" -RETURN_TOKEN(TABLES); - YY_BREAK -case 14: -YY_RULE_SETUP + RETURN_TOKEN(TABLES); + YY_BREAK + case 14: YY_RULE_SETUP #line 92 "lex_sql.l" -RETURN_TOKEN(INDEX); - YY_BREAK -case 15: -YY_RULE_SETUP + RETURN_TOKEN(INDEX); + YY_BREAK + case 15: YY_RULE_SETUP #line 93 "lex_sql.l" -RETURN_TOKEN(ON); - YY_BREAK -case 16: -YY_RULE_SETUP + RETURN_TOKEN(ON); + YY_BREAK + case 16: YY_RULE_SETUP #line 94 "lex_sql.l" -RETURN_TOKEN(SHOW); - YY_BREAK -case 17: -YY_RULE_SETUP + RETURN_TOKEN(SHOW); + YY_BREAK + case 17: YY_RULE_SETUP #line 95 "lex_sql.l" -RETURN_TOKEN(SYNC); - YY_BREAK -case 18: -YY_RULE_SETUP + RETURN_TOKEN(SYNC); + YY_BREAK + case 18: YY_RULE_SETUP #line 96 "lex_sql.l" -RETURN_TOKEN(SELECT); - YY_BREAK -case 19: -YY_RULE_SETUP + RETURN_TOKEN(SELECT); + YY_BREAK + case 19: YY_RULE_SETUP #line 97 "lex_sql.l" -RETURN_TOKEN(CALC); - YY_BREAK -case 20: -YY_RULE_SETUP + RETURN_TOKEN(CALC); + YY_BREAK + case 20: YY_RULE_SETUP #line 98 "lex_sql.l" -RETURN_TOKEN(FROM); - YY_BREAK -case 21: -YY_RULE_SETUP + RETURN_TOKEN(FROM); + YY_BREAK + case 21: YY_RULE_SETUP #line 99 "lex_sql.l" -RETURN_TOKEN(WHERE); - YY_BREAK -case 22: -YY_RULE_SETUP + RETURN_TOKEN(WHERE); + YY_BREAK + case 22: YY_RULE_SETUP #line 100 "lex_sql.l" -RETURN_TOKEN(AND); - YY_BREAK -case 23: -YY_RULE_SETUP + RETURN_TOKEN(AND); + YY_BREAK + case 23: YY_RULE_SETUP #line 101 "lex_sql.l" -RETURN_TOKEN(OR); - YY_BREAK -case 24: -YY_RULE_SETUP + RETURN_TOKEN(OR); + YY_BREAK + case 24: YY_RULE_SETUP #line 102 "lex_sql.l" -RETURN_TOKEN(INSERT); - YY_BREAK -case 25: -YY_RULE_SETUP + RETURN_TOKEN(INSERT); + YY_BREAK + case 25: YY_RULE_SETUP #line 103 "lex_sql.l" -RETURN_TOKEN(INTO); - YY_BREAK -case 26: -YY_RULE_SETUP + RETURN_TOKEN(INTO); + YY_BREAK + case 26: YY_RULE_SETUP #line 104 "lex_sql.l" -RETURN_TOKEN(VALUES); - YY_BREAK -case 27: -YY_RULE_SETUP + RETURN_TOKEN(VALUES); + YY_BREAK + case 27: YY_RULE_SETUP #line 105 "lex_sql.l" -RETURN_TOKEN(DELETE); - YY_BREAK -case 28: -YY_RULE_SETUP + RETURN_TOKEN(DELETE); + YY_BREAK + case 28: YY_RULE_SETUP #line 106 "lex_sql.l" -RETURN_TOKEN(UPDATE); - YY_BREAK -case 29: -YY_RULE_SETUP + RETURN_TOKEN(UPDATE); + YY_BREAK + case 29: YY_RULE_SETUP #line 107 "lex_sql.l" -RETURN_TOKEN(SET); - YY_BREAK -case 30: -YY_RULE_SETUP + RETURN_TOKEN(SET); + YY_BREAK + case 30: YY_RULE_SETUP #line 108 "lex_sql.l" -RETURN_TOKEN(TRX_BEGIN); - YY_BREAK -case 31: -YY_RULE_SETUP + RETURN_TOKEN(TRX_BEGIN); + YY_BREAK + case 31: YY_RULE_SETUP #line 109 "lex_sql.l" -RETURN_TOKEN(TRX_COMMIT); - YY_BREAK -case 32: -YY_RULE_SETUP + RETURN_TOKEN(TRX_COMMIT); + YY_BREAK + case 32: YY_RULE_SETUP #line 110 "lex_sql.l" -RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK -case 33: -YY_RULE_SETUP + RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK + case 33: YY_RULE_SETUP #line 111 "lex_sql.l" -RETURN_TOKEN(INT_T); - YY_BREAK -case 34: -YY_RULE_SETUP + RETURN_TOKEN(INT_T); + YY_BREAK + case 34: YY_RULE_SETUP #line 112 "lex_sql.l" -RETURN_TOKEN(STRING_T); - YY_BREAK -case 35: -YY_RULE_SETUP + RETURN_TOKEN(STRING_T); + YY_BREAK + case 35: YY_RULE_SETUP #line 113 "lex_sql.l" -RETURN_TOKEN(FLOAT_T); - YY_BREAK -case 36: -YY_RULE_SETUP + RETURN_TOKEN(FLOAT_T); + YY_BREAK + case 36: YY_RULE_SETUP #line 114 "lex_sql.l" -RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK -case 37: -YY_RULE_SETUP + RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK + case 37: YY_RULE_SETUP #line 115 "lex_sql.l" -RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token - YY_BREAK -case 38: -YY_RULE_SETUP + RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + YY_BREAK + case 38: YY_RULE_SETUP #line 116 "lex_sql.l" -RETURN_TOKEN(VECTOR_T); // 增加 VECTOR 的 token - YY_BREAK -case 39: -YY_RULE_SETUP + RETURN_TOKEN(VECTOR_T); // 增加 VECTOR 的 token + YY_BREAK + case 39: YY_RULE_SETUP #line 117 "lex_sql.l" -RETURN_TOKEN(UNIQUE); - YY_BREAK -case 40: -YY_RULE_SETUP + RETURN_TOKEN(UNIQUE); + YY_BREAK + case 40: YY_RULE_SETUP #line 118 "lex_sql.l" -RETURN_TOKEN(NULL_T); - YY_BREAK -case 41: -YY_RULE_SETUP + RETURN_TOKEN(NULL_T); + YY_BREAK + case 41: YY_RULE_SETUP #line 119 "lex_sql.l" -RETURN_TOKEN(NULLABLE); - YY_BREAK -case 42: -YY_RULE_SETUP + RETURN_TOKEN(NULLABLE); + YY_BREAK + case 42: YY_RULE_SETUP #line 120 "lex_sql.l" -RETURN_TOKEN(LOAD); - YY_BREAK -case 43: -YY_RULE_SETUP + RETURN_TOKEN(LOAD); + YY_BREAK + case 43: YY_RULE_SETUP #line 121 "lex_sql.l" -RETURN_TOKEN(DATA); - YY_BREAK -case 44: -YY_RULE_SETUP + RETURN_TOKEN(DATA); + YY_BREAK + case 44: YY_RULE_SETUP #line 122 "lex_sql.l" -RETURN_TOKEN(INFILE); - YY_BREAK -case 45: -YY_RULE_SETUP + RETURN_TOKEN(INFILE); + YY_BREAK + case 45: YY_RULE_SETUP #line 123 "lex_sql.l" -RETURN_TOKEN(EXPLAIN); - YY_BREAK -case 46: -YY_RULE_SETUP + RETURN_TOKEN(EXPLAIN); + YY_BREAK + case 46: YY_RULE_SETUP #line 124 "lex_sql.l" -RETURN_TOKEN(GROUP); - YY_BREAK -case 47: -YY_RULE_SETUP + RETURN_TOKEN(GROUP); + YY_BREAK + case 47: YY_RULE_SETUP #line 125 "lex_sql.l" -RETURN_TOKEN(HAVING); - YY_BREAK -case 48: -YY_RULE_SETUP + RETURN_TOKEN(LIMIT); + YY_BREAK + case 48: YY_RULE_SETUP #line 126 "lex_sql.l" -RETURN_TOKEN(ORDER); - YY_BREAK -case 49: -YY_RULE_SETUP + RETURN_TOKEN(HAVING); + YY_BREAK + case 49: YY_RULE_SETUP #line 127 "lex_sql.l" -RETURN_TOKEN(BY); - YY_BREAK -case 50: -YY_RULE_SETUP + RETURN_TOKEN(ORDER); + YY_BREAK + case 50: YY_RULE_SETUP #line 128 "lex_sql.l" -RETURN_TOKEN(AS); - YY_BREAK -case 51: -YY_RULE_SETUP + RETURN_TOKEN(BY); + YY_BREAK + case 51: YY_RULE_SETUP #line 129 "lex_sql.l" -RETURN_TOKEN(ASC); - YY_BREAK -case 52: -YY_RULE_SETUP + RETURN_TOKEN(AS); + YY_BREAK + case 52: YY_RULE_SETUP #line 130 "lex_sql.l" -RETURN_TOKEN(IN); - YY_BREAK -case 53: -YY_RULE_SETUP + RETURN_TOKEN(ASC); + YY_BREAK + case 53: YY_RULE_SETUP #line 131 "lex_sql.l" -RETURN_TOKEN(EXISTS); - YY_BREAK -case 54: -YY_RULE_SETUP + RETURN_TOKEN(IN); + YY_BREAK + case 54: YY_RULE_SETUP #line 132 "lex_sql.l" -RETURN_TOKEN(STORAGE); - YY_BREAK -case 55: -YY_RULE_SETUP + RETURN_TOKEN(EXISTS); + YY_BREAK + case 55: YY_RULE_SETUP #line 133 "lex_sql.l" -RETURN_TOKEN(FORMAT); - YY_BREAK -case 56: -YY_RULE_SETUP + RETURN_TOKEN(STORAGE); + YY_BREAK + case 56: YY_RULE_SETUP #line 134 "lex_sql.l" -RETURN_TOKEN(INNER); - YY_BREAK -case 57: -YY_RULE_SETUP + RETURN_TOKEN(FORMAT); + YY_BREAK + case 57: YY_RULE_SETUP #line 135 "lex_sql.l" -RETURN_TOKEN(JOIN); - YY_BREAK -case 58: -YY_RULE_SETUP + RETURN_TOKEN(INNER); + YY_BREAK + case 58: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(LBRACE); - YY_BREAK -case 59: -YY_RULE_SETUP + RETURN_TOKEN(JOIN); + YY_BREAK + case 59: YY_RULE_SETUP #line 137 "lex_sql.l" -RETURN_TOKEN(RBRACE); - YY_BREAK -case 60: -YY_RULE_SETUP -#line 139 "lex_sql.l" -RETURN_TOKEN(COMMA); - YY_BREAK -case 61: -YY_RULE_SETUP + RETURN_TOKEN(LBRACE); + YY_BREAK + case 60: YY_RULE_SETUP +#line 138 "lex_sql.l" + RETURN_TOKEN(RBRACE); + YY_BREAK + case 61: YY_RULE_SETUP #line 140 "lex_sql.l" -RETURN_TOKEN(EQ); - YY_BREAK -case 62: -YY_RULE_SETUP + RETURN_TOKEN(COMMA); + YY_BREAK + case 62: YY_RULE_SETUP #line 141 "lex_sql.l" -RETURN_TOKEN(LE); - YY_BREAK -case 63: -YY_RULE_SETUP + RETURN_TOKEN(EQ); + YY_BREAK + case 63: YY_RULE_SETUP #line 142 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 64: -YY_RULE_SETUP + RETURN_TOKEN(LE); + YY_BREAK + case 64: YY_RULE_SETUP #line 143 "lex_sql.l" -RETURN_TOKEN(NE); - YY_BREAK -case 65: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 65: YY_RULE_SETUP #line 144 "lex_sql.l" -RETURN_TOKEN(LT); - YY_BREAK -case 66: -YY_RULE_SETUP + RETURN_TOKEN(NE); + YY_BREAK + case 66: YY_RULE_SETUP #line 145 "lex_sql.l" -RETURN_TOKEN(GE); - YY_BREAK -case 67: -YY_RULE_SETUP + RETURN_TOKEN(LT); + YY_BREAK + case 67: YY_RULE_SETUP #line 146 "lex_sql.l" -RETURN_TOKEN(GT); - YY_BREAK -case 68: -YY_RULE_SETUP + RETURN_TOKEN(GE); + YY_BREAK + case 68: YY_RULE_SETUP #line 147 "lex_sql.l" -RETURN_TOKEN(NOT); - YY_BREAK -case 69: -YY_RULE_SETUP + RETURN_TOKEN(GT); + YY_BREAK + case 69: YY_RULE_SETUP #line 148 "lex_sql.l" -RETURN_TOKEN(IS); - YY_BREAK -case 70: -YY_RULE_SETUP + RETURN_TOKEN(NOT); + YY_BREAK + case 70: YY_RULE_SETUP #line 149 "lex_sql.l" -RETURN_TOKEN(LIKE); - YY_BREAK -case 71: -YY_RULE_SETUP -#line 151 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); - YY_BREAK -case 72: -#line 154 "lex_sql.l" -case 73: + RETURN_TOKEN(IS); + YY_BREAK + case 71: YY_RULE_SETUP +#line 150 "lex_sql.l" + RETURN_TOKEN(LIKE); + YY_BREAK + case 72: YY_RULE_SETUP +#line 152 "lex_sql.l" + yylval->string = strdup(yytext); + RETURN_TOKEN(ID); + YY_BREAK + case 73: #line 155 "lex_sql.l" -case 74: + case 74: #line 156 "lex_sql.l" -case 75: -YY_RULE_SETUP -#line 156 "lex_sql.l" -{ return yytext[0]; } - YY_BREAK -case 76: -/* rule 76 can match eol */ -YY_RULE_SETUP + case 75: +#line 157 "lex_sql.l" + case 76: YY_RULE_SETUP #line 157 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 77: -/* rule 77 can match eol */ -YY_RULE_SETUP + { + return yytext[0]; + } + YY_BREAK + case 77: + /* rule 77 can match eol */ + YY_RULE_SETUP #line 158 "lex_sql.l" -yylval->string = strdup(yytext); RETURN_TOKEN(SSS); - YY_BREAK -case 78: -YY_RULE_SETUP -#line 160 "lex_sql.l" -LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; - YY_BREAK -case 79: -YY_RULE_SETUP + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 78: + /* rule 78 can match eol */ + YY_RULE_SETUP +#line 159 "lex_sql.l" + yylval->string = strdup(yytext); + RETURN_TOKEN(SSS); + YY_BREAK + case 79: YY_RULE_SETUP #line 161 "lex_sql.l" -ECHO; - YY_BREAK -#line 1468 "lex_sql.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STR): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap( yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + LOG_DEBUG("Unknown character [%c]",yytext[0]); + return yytext[0]; + YY_BREAK + case 80: YY_RULE_SETUP +#line 162 "lex_sql.l" + ECHO; + YY_BREAK +#line 1473 "lex_sql.cpp" + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(STR): yyterminate(); + + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if (yy_next_state) { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_END_OF_FILE: { + yyg->yy_did_buffer_switch_on_eof = 0; + + if (yywrap(yyscanner)) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else { + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state(yyscanner); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1607,171 +3706,149 @@ case YY_STATE_EOF(STR): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (yyscan_t yyscanner) +static int yy_get_next_buffer(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) + YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); + + if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ + if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for (i = 0; i < number_to_move; ++i) + *(dest++) = *(source++); + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else { + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); + + if (b->yy_is_our_buffer) { + yy_size_t new_size = b->yy_buf_size * 2; + + if (new_size <= 0) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); + } else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if (!b->yy_ch_buf) + YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + } + + if (num_to_read > YY_READ_BUF_SIZE) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if (yyg->yy_n_chars == 0) { + if (number_to_move == YY_MORE_ADJ) { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin, yyscanner); + } + + else { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = + (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); + if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +static yy_state_type yy_get_previous_state(yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 232 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + yy_current_state = yyg->yy_start; + + for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 235) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -1779,29 +3856,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 232 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 231); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if (yy_accept[yy_current_state]) { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 235) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 234); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -1810,141 +3885,133 @@ static int yy_get_next_buffer (yyscan_t yyscanner) #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) +static int yyinput(yyscan_t yyscanner) #else - static int input (yyscan_t yyscanner) +static int input(yyscan_t yyscanner) #endif { - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin , yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + int c; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch (yy_get_next_buffer(yyscanner)) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin, yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: { + if (yywrap(yyscanner)) + return 0; + + if (!yyg->yy_did_buffer_switch_on_eof) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; + } + } + } - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) +void yyrestart(FILE *input_file, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(yyscanner); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + } - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); + yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); + yy_load_buffer_state(yyscanner); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack(yyscanner); + if (YY_CURRENT_BUFFER == new_buffer) + return; + + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state(yyscanner); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state (yyscan_t yyscanner) +static void yy_load_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -1953,105 +4020,105 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_BUFFER_STATE b; - b->yy_buf_size = size; + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + b->yy_buf_size = size; - b->yy_is_our_buffer = 1; + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); + if (!b->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - yy_init_buffer( b, file , yyscanner); + b->yy_is_our_buffer = 1; - return b; + yy_init_buffer(b, file, yyscanner); + + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if ( ! b ) - return; + if (!b) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); + if (b->yy_is_our_buffer) + yyfree((void *)b->yy_ch_buf, yyscanner); - yyfree( (void *) b , yyscanner ); + yyfree((void *)b, yyscanner); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + int oerrno = errno; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flush_buffer( b , yyscanner); + yy_flush_buffer(b, yyscanner); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!b) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); + if (b == YY_CURRENT_BUFFER) + yy_load_buffer_state(yyscanner); } /** Pushes the new state onto the stack. The new state becomes @@ -2060,99 +4127,95 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state (yyscan_t yyscanner) +void yypop_buffer_state(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state(yyscanner); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (yyscan_t yyscanner) +static void yyensure_buffer_stack(yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = + (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( + yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); + if (!yyg->yy_buffer_stack) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -2161,33 +4224,31 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b , yyscanner ); - - return b; + YY_BUFFER_STATE b; + + if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + + b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b, yyscanner); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -2198,10 +4259,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) { - - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + + return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2211,177 +4272,175 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n , yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t)(_yybytes_len + 2); + buf = (char *)yyalloc(n, yyscanner); + if (!buf) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + + for (i = 0; i < _yybytes_len; ++i) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf, n, yyscanner); + if (!b) + YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + fprintf(stderr, "%s\n", msg); + exit(YY_EXIT_FAILURE); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } while (0) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno (yyscan_t yyscanner) +int yyget_lineno(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (!YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column (yyscan_t yyscanner) +int yyget_column(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; + if (!YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in (yyscan_t yyscanner) +FILE *yyget_in(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out (yyscan_t yyscanner) +FILE *yyget_out(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text (yyscan_t yyscanner) +char *yyget_text(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyextra = user_defined; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) +void yyset_lineno(int _line_number, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_lineno called with no buffer"); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int _column_no , yyscan_t yyscanner) +void yyset_column(int _column_no, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (!YY_CURRENT_BUFFER) + YY_FATAL_ERROR("yyset_column called with no buffer"); - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); - - yycolumn = _column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -2390,80 +4449,80 @@ void yyset_column (int _column_no , yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) +void yyset_in(FILE *_in_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyin = _in_str; } -void yyset_out (FILE * _out_str , yyscan_t yyscanner) +void yyset_out(FILE *_out_str, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yyout = _out_str; } -int yyget_debug (yyscan_t yyscanner) +int yyget_debug(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yy_flex_debug; } -void yyset_debug (int _bdebug , yyscan_t yyscanner) +void yyset_debug(int _bdebug, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_flex_debug = _bdebug; } /* Accessor methods for yylval and yylloc */ -YYSTYPE * yyget_lval (yyscan_t yyscanner) +YYSTYPE *yyget_lval(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylval; } -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc (yyscan_t yyscanner) +YYLTYPE *yyget_lloc(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + return yylloc; } - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t* ptr_yy_globals) +int yylex_init(yyscan_t *ptr_yy_globals) { - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -2473,94 +4532,94 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra (yy_user_defined, &dummy_yyguts); + yyset_extra(yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); - yyset_extra (yy_user_defined, *ptr_yy_globals); + yyset_extra(yy_user_defined, *ptr_yy_globals); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals(*ptr_yy_globals); } -static int yy_init_globals (yyscan_t yyscanner) +static int yy_init_globals(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) +int yylex_destroy(yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while (YY_CURRENT_BUFFER) { + yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack, yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree(yyg->yy_start_stack, yyscanner); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals(yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree(yyscanner, yyscanner); + yyscanner = NULL; + return 0; } /* @@ -2568,63 +4627,59 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + int i; + for (i = 0; i < n; ++i) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +static int yy_flex_strlen(const char *s, yyscan_t yyscanner) { - int n; - for ( n = 0; s[n]; ++n ) - ; + int n; + for (n = 0; s[n]; ++n) + ; - return n; + return n; } #endif -void *yyalloc (yy_size_t size , yyscan_t yyscanner) +void *yyalloc(yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree (void * ptr , yyscan_t yyscanner) +void yyfree(void *ptr, yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + (void)yyg; + free((char *)ptr); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 161 "lex_sql.l" - - -void scan_string(const char *str, yyscan_t scanner) { - yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); -} +#line 162 "lex_sql.l" +void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index b49ae624..4b8524f1 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,23 +12,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -81,62 +79,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -157,7 +155,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -197,73 +195,72 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -286,69 +283,69 @@ void yyfree ( void * , yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -376,11 +373,9 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -542,8 +537,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 161 "lex_sql.l" - +#line 162 "lex_sql.l" #line 548 "lex_sql.h" #undef yyIN_HEADER diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index ba0b20d2..5e908488 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -122,6 +122,7 @@ DATA RETURN_TOKEN(DATA); INFILE RETURN_TOKEN(INFILE); EXPLAIN RETURN_TOKEN(EXPLAIN); GROUP RETURN_TOKEN(GROUP); +LIMIT RETURN_TOKEN(LIMIT); HAVING RETURN_TOKEN(HAVING); ORDER RETURN_TOKEN(ORDER); BY RETURN_TOKEN(BY); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index bca7ef87..a5fa1e8b 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -104,6 +104,11 @@ struct OrderBySqlNode bool is_asc; ///< 默认true 为升序 }; +struct LimitSqlNode +{ + int number; +}; + /** * @brief 描述一个select语句 * @ingroup SQLParser @@ -122,6 +127,7 @@ struct SelectSqlNode std::vector> group_by; ///< group by clause std::vector order_by; ///< attributes in order clause std::unique_ptr having_conditions; ///< having + std::unique_ptr limit; }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index f32675b9..28a590df 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,13 +63,9 @@ /* Pull parsers. */ #define YYPULL 1 - - - /* First part of user prologue. */ #line 2 "yacc_sql.y" - #include #include #include @@ -92,233 +88,224 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, - Expression *left, - Expression *right, - const char *sql_string, - YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression( + ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression(const char *function_name, - std::vector> child, - const char *sql_string, - YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression( + const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } -ParsedSqlNode *create_table_sql_node(char *table_name, - AttrInfoSqlNode* attr_def, - std::vector *attrinfos, - char* storage_format, - ParsedSqlNode *create_table_select) +ParsedSqlNode *create_table_sql_node(char *table_name, AttrInfoSqlNode *attr_def, + std::vector *attrinfos, char *storage_format, ParsedSqlNode *create_table_select) { - ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = parsed_sql_node->create_table; - create_table.relation_name = table_name; + ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = parsed_sql_node->create_table; + create_table.relation_name = table_name; - if (attrinfos) { - create_table.attr_infos.swap(*attrinfos); - delete attrinfos; - } - if (attr_def) { - create_table.attr_infos.emplace_back(*attr_def); - std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); - delete attr_def; - } - if (storage_format != nullptr) { - create_table.storage_format = storage_format; - free(storage_format); - } + if (attrinfos) { + create_table.attr_infos.swap(*attrinfos); + delete attrinfos; + } + if (attr_def) { + create_table.attr_infos.emplace_back(*attr_def); + std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); + delete attr_def; + } + if (storage_format != nullptr) { + create_table.storage_format = storage_format; + free(storage_format); + } - if (create_table_select) { - create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); - } + if (create_table_select) { + create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); + } - return parsed_sql_node; + return parsed_sql_node; } #line 155 "yacc_sql.cpp" -# ifndef YY_CAST -# ifdef __cplusplus -# define YY_CAST(Type, Val) static_cast (Val) -# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -# else -# define YY_CAST(Type, Val) ((Type) (Val)) -# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -# endif -# endif -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif +#ifndef YY_CAST +#ifdef __cplusplus +#define YY_CAST(Type, Val) static_cast(Val) +#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) +#else +#define YY_CAST(Type, Val) ((Type)(Val)) +#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) +#endif +#endif +#ifndef YY_NULLPTR +#if defined __cplusplus +#if 201103L <= __cplusplus +#define YY_NULLPTR nullptr +#else +#define YY_NULLPTR 0 +#endif +#else +#define YY_NULLPTR ((void *)0) +#endif +#endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_HAVING = 11, /* HAVING */ - YYSYMBOL_ORDER = 12, /* ORDER */ - YYSYMBOL_TABLE = 13, /* TABLE */ - YYSYMBOL_TABLES = 14, /* TABLES */ - YYSYMBOL_INDEX = 15, /* INDEX */ - YYSYMBOL_CALC = 16, /* CALC */ - YYSYMBOL_SELECT = 17, /* SELECT */ - YYSYMBOL_DESC = 18, /* DESC */ - YYSYMBOL_SHOW = 19, /* SHOW */ - YYSYMBOL_SYNC = 20, /* SYNC */ - YYSYMBOL_INSERT = 21, /* INSERT */ - YYSYMBOL_DELETE = 22, /* DELETE */ - YYSYMBOL_UPDATE = 23, /* UPDATE */ - YYSYMBOL_LBRACE = 24, /* LBRACE */ - YYSYMBOL_RBRACE = 25, /* RBRACE */ - YYSYMBOL_COMMA = 26, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 30, /* INT_T */ - YYSYMBOL_IN = 31, /* IN */ - YYSYMBOL_STRING_T = 32, /* STRING_T */ - YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ - YYSYMBOL_DATE_T = 34, /* DATE_T */ - YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_VECTOR_T = 36, /* VECTOR_T */ - YYSYMBOL_NOT = 37, /* NOT */ - YYSYMBOL_UNIQUE = 38, /* UNIQUE */ - YYSYMBOL_NULL_T = 39, /* NULL_T */ - YYSYMBOL_NULLABLE = 40, /* NULLABLE */ - YYSYMBOL_HELP = 41, /* HELP */ - YYSYMBOL_EXIT = 42, /* EXIT */ - YYSYMBOL_DOT = 43, /* DOT */ - YYSYMBOL_INTO = 44, /* INTO */ - YYSYMBOL_VALUES = 45, /* VALUES */ - YYSYMBOL_FROM = 46, /* FROM */ - YYSYMBOL_WHERE = 47, /* WHERE */ - YYSYMBOL_AND = 48, /* AND */ - YYSYMBOL_OR = 49, /* OR */ - YYSYMBOL_SET = 50, /* SET */ - YYSYMBOL_ON = 51, /* ON */ - YYSYMBOL_LOAD = 52, /* LOAD */ - YYSYMBOL_DATA = 53, /* DATA */ - YYSYMBOL_INFILE = 54, /* INFILE */ - YYSYMBOL_EXPLAIN = 55, /* EXPLAIN */ - YYSYMBOL_STORAGE = 56, /* STORAGE */ - YYSYMBOL_FORMAT = 57, /* FORMAT */ - YYSYMBOL_INNER = 58, /* INNER */ - YYSYMBOL_JOIN = 59, /* JOIN */ - YYSYMBOL_EQ = 60, /* EQ */ - YYSYMBOL_LT = 61, /* LT */ - YYSYMBOL_GT = 62, /* GT */ - YYSYMBOL_LE = 63, /* LE */ - YYSYMBOL_GE = 64, /* GE */ - YYSYMBOL_NE = 65, /* NE */ - YYSYMBOL_LIKE = 66, /* LIKE */ - YYSYMBOL_IS = 67, /* IS */ - YYSYMBOL_NUMBER = 68, /* NUMBER */ - YYSYMBOL_FLOAT = 69, /* FLOAT */ - YYSYMBOL_ID = 70, /* ID */ - YYSYMBOL_SSS = 71, /* SSS */ - YYSYMBOL_72_ = 72, /* '+' */ - YYSYMBOL_73_ = 73, /* '-' */ - YYSYMBOL_74_ = 74, /* '*' */ - YYSYMBOL_75_ = 75, /* '/' */ - YYSYMBOL_UMINUS = 76, /* UMINUS */ - YYSYMBOL_YYACCEPT = 77, /* $accept */ - YYSYMBOL_commands = 78, /* commands */ - YYSYMBOL_command_wrapper = 79, /* command_wrapper */ - YYSYMBOL_exit_stmt = 80, /* exit_stmt */ - YYSYMBOL_help_stmt = 81, /* help_stmt */ - YYSYMBOL_sync_stmt = 82, /* sync_stmt */ - YYSYMBOL_begin_stmt = 83, /* begin_stmt */ - YYSYMBOL_commit_stmt = 84, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 85, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 86, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 87, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 88, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 89, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 90, /* create_index_stmt */ - YYSYMBOL_opt_unique = 91, /* opt_unique */ - YYSYMBOL_attr_list = 92, /* attr_list */ - YYSYMBOL_drop_index_stmt = 93, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 94, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 95, /* attr_def_list */ - YYSYMBOL_attr_def = 96, /* attr_def */ - YYSYMBOL_nullable_constraint = 97, /* nullable_constraint */ - YYSYMBOL_type = 98, /* type */ - YYSYMBOL_insert_stmt = 99, /* insert_stmt */ - YYSYMBOL_values_list = 100, /* values_list */ - YYSYMBOL_value_list = 101, /* value_list */ - YYSYMBOL_value = 102, /* value */ - YYSYMBOL_nonnegative_value = 103, /* nonnegative_value */ - YYSYMBOL_storage_format = 104, /* storage_format */ - YYSYMBOL_delete_stmt = 105, /* delete_stmt */ - YYSYMBOL_update_stmt = 106, /* update_stmt */ - YYSYMBOL_set_clauses = 107, /* set_clauses */ - YYSYMBOL_setClause = 108, /* setClause */ - YYSYMBOL_select_stmt = 109, /* select_stmt */ - YYSYMBOL_calc_stmt = 110, /* calc_stmt */ - YYSYMBOL_expression_list = 111, /* expression_list */ - YYSYMBOL_expression = 112, /* expression */ - YYSYMBOL_alias = 113, /* alias */ - YYSYMBOL_aggr_func_expr = 114, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 115, /* sub_query_expr */ - YYSYMBOL_rel_attr = 116, /* rel_attr */ - YYSYMBOL_relation = 117, /* relation */ - YYSYMBOL_rel_list = 118, /* rel_list */ - YYSYMBOL_join_clauses = 119, /* join_clauses */ - YYSYMBOL_where = 120, /* where */ - YYSYMBOL_condition = 121, /* condition */ - YYSYMBOL_comp_op = 122, /* comp_op */ - YYSYMBOL_opt_order_by = 123, /* opt_order_by */ - YYSYMBOL_sort_list = 124, /* sort_list */ - YYSYMBOL_sort_unit = 125, /* sort_unit */ - YYSYMBOL_group_by = 126, /* group_by */ - YYSYMBOL_opt_having = 127, /* opt_having */ - YYSYMBOL_load_data_stmt = 128, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 129, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 130, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 131 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_HAVING = 11, /* HAVING */ + YYSYMBOL_ORDER = 12, /* ORDER */ + YYSYMBOL_TABLE = 13, /* TABLE */ + YYSYMBOL_TABLES = 14, /* TABLES */ + YYSYMBOL_INDEX = 15, /* INDEX */ + YYSYMBOL_CALC = 16, /* CALC */ + YYSYMBOL_SELECT = 17, /* SELECT */ + YYSYMBOL_DESC = 18, /* DESC */ + YYSYMBOL_SHOW = 19, /* SHOW */ + YYSYMBOL_SYNC = 20, /* SYNC */ + YYSYMBOL_INSERT = 21, /* INSERT */ + YYSYMBOL_DELETE = 22, /* DELETE */ + YYSYMBOL_UPDATE = 23, /* UPDATE */ + YYSYMBOL_LBRACE = 24, /* LBRACE */ + YYSYMBOL_RBRACE = 25, /* RBRACE */ + YYSYMBOL_COMMA = 26, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 30, /* INT_T */ + YYSYMBOL_IN = 31, /* IN */ + YYSYMBOL_STRING_T = 32, /* STRING_T */ + YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ + YYSYMBOL_DATE_T = 34, /* DATE_T */ + YYSYMBOL_TEXT_T = 35, /* TEXT_T */ + YYSYMBOL_VECTOR_T = 36, /* VECTOR_T */ + YYSYMBOL_NOT = 37, /* NOT */ + YYSYMBOL_UNIQUE = 38, /* UNIQUE */ + YYSYMBOL_NULL_T = 39, /* NULL_T */ + YYSYMBOL_LIMIT = 40, /* LIMIT */ + YYSYMBOL_NULLABLE = 41, /* NULLABLE */ + YYSYMBOL_HELP = 42, /* HELP */ + YYSYMBOL_EXIT = 43, /* EXIT */ + YYSYMBOL_DOT = 44, /* DOT */ + YYSYMBOL_INTO = 45, /* INTO */ + YYSYMBOL_VALUES = 46, /* VALUES */ + YYSYMBOL_FROM = 47, /* FROM */ + YYSYMBOL_WHERE = 48, /* WHERE */ + YYSYMBOL_AND = 49, /* AND */ + YYSYMBOL_OR = 50, /* OR */ + YYSYMBOL_SET = 51, /* SET */ + YYSYMBOL_ON = 52, /* ON */ + YYSYMBOL_LOAD = 53, /* LOAD */ + YYSYMBOL_DATA = 54, /* DATA */ + YYSYMBOL_INFILE = 55, /* INFILE */ + YYSYMBOL_EXPLAIN = 56, /* EXPLAIN */ + YYSYMBOL_STORAGE = 57, /* STORAGE */ + YYSYMBOL_FORMAT = 58, /* FORMAT */ + YYSYMBOL_INNER = 59, /* INNER */ + YYSYMBOL_JOIN = 60, /* JOIN */ + YYSYMBOL_EQ = 61, /* EQ */ + YYSYMBOL_LT = 62, /* LT */ + YYSYMBOL_GT = 63, /* GT */ + YYSYMBOL_LE = 64, /* LE */ + YYSYMBOL_GE = 65, /* GE */ + YYSYMBOL_NE = 66, /* NE */ + YYSYMBOL_LIKE = 67, /* LIKE */ + YYSYMBOL_IS = 68, /* IS */ + YYSYMBOL_NUMBER = 69, /* NUMBER */ + YYSYMBOL_FLOAT = 70, /* FLOAT */ + YYSYMBOL_ID = 71, /* ID */ + YYSYMBOL_SSS = 72, /* SSS */ + YYSYMBOL_73_ = 73, /* '+' */ + YYSYMBOL_74_ = 74, /* '-' */ + YYSYMBOL_75_ = 75, /* '*' */ + YYSYMBOL_76_ = 76, /* '/' */ + YYSYMBOL_UMINUS = 77, /* UMINUS */ + YYSYMBOL_YYACCEPT = 78, /* $accept */ + YYSYMBOL_commands = 79, /* commands */ + YYSYMBOL_command_wrapper = 80, /* command_wrapper */ + YYSYMBOL_exit_stmt = 81, /* exit_stmt */ + YYSYMBOL_help_stmt = 82, /* help_stmt */ + YYSYMBOL_sync_stmt = 83, /* sync_stmt */ + YYSYMBOL_begin_stmt = 84, /* begin_stmt */ + YYSYMBOL_commit_stmt = 85, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 86, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 87, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 88, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 89, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 90, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 91, /* create_index_stmt */ + YYSYMBOL_opt_unique = 92, /* opt_unique */ + YYSYMBOL_attr_list = 93, /* attr_list */ + YYSYMBOL_drop_index_stmt = 94, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 95, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 96, /* attr_def_list */ + YYSYMBOL_attr_def = 97, /* attr_def */ + YYSYMBOL_nullable_constraint = 98, /* nullable_constraint */ + YYSYMBOL_type = 99, /* type */ + YYSYMBOL_insert_stmt = 100, /* insert_stmt */ + YYSYMBOL_values_list = 101, /* values_list */ + YYSYMBOL_value_list = 102, /* value_list */ + YYSYMBOL_value = 103, /* value */ + YYSYMBOL_nonnegative_value = 104, /* nonnegative_value */ + YYSYMBOL_storage_format = 105, /* storage_format */ + YYSYMBOL_delete_stmt = 106, /* delete_stmt */ + YYSYMBOL_update_stmt = 107, /* update_stmt */ + YYSYMBOL_set_clauses = 108, /* set_clauses */ + YYSYMBOL_setClause = 109, /* setClause */ + YYSYMBOL_select_stmt = 110, /* select_stmt */ + YYSYMBOL_calc_stmt = 111, /* calc_stmt */ + YYSYMBOL_expression_list = 112, /* expression_list */ + YYSYMBOL_expression = 113, /* expression */ + YYSYMBOL_alias = 114, /* alias */ + YYSYMBOL_aggr_func_expr = 115, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 116, /* sub_query_expr */ + YYSYMBOL_rel_attr = 117, /* rel_attr */ + YYSYMBOL_relation = 118, /* relation */ + YYSYMBOL_rel_list = 119, /* rel_list */ + YYSYMBOL_join_clauses = 120, /* join_clauses */ + YYSYMBOL_where = 121, /* where */ + YYSYMBOL_condition = 122, /* condition */ + YYSYMBOL_comp_op = 123, /* comp_op */ + YYSYMBOL_opt_order_by = 124, /* opt_order_by */ + YYSYMBOL_sort_list = 125, /* sort_list */ + YYSYMBOL_sort_unit = 126, /* sort_unit */ + YYSYMBOL_group_by = 127, /* group_by */ + YYSYMBOL_opt_having = 128, /* opt_having */ + YYSYMBOL_opt_limit = 129, /* opt_limit */ + YYSYMBOL_load_data_stmt = 130, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 131, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 132, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 133 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; - - - #ifdef short -# undef short +#undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -326,11 +313,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -# include /* INFRINGES ON USER NAME SPACE */ -# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_STDINT_H -# endif +#include /* INFRINGES ON USER NAME SPACE */ +#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_STDINT_H +#endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -360,16 +347,15 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 +#undef UINT_LEAST8_MAX +#undef UINT_LEAST16_MAX +#define UINT_LEAST8_MAX 255 +#define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -379,8 +365,7 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -389,42 +374,38 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -# define YYPTRDIFF_T __PTRDIFF_TYPE__ -# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -# elif defined PTRDIFF_MAX -# ifndef ptrdiff_t -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYPTRDIFF_T ptrdiff_t -# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -# else -# define YYPTRDIFF_T long -# define YYPTRDIFF_MAXIMUM LONG_MAX -# endif +#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +#define YYPTRDIFF_T __PTRDIFF_TYPE__ +#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +#elif defined PTRDIFF_MAX +#ifndef ptrdiff_t +#include /* INFRINGES ON USER NAME SPACE */ +#endif +#define YYPTRDIFF_T ptrdiff_t +#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +#else +#define YYPTRDIFF_T long +#define YYPTRDIFF_MAXIMUM LONG_MAX +#endif #endif #ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned -# endif +#ifdef __SIZE_TYPE__ +#define YYSIZE_T __SIZE_TYPE__ +#elif defined size_t +#define YYSIZE_T size_t +#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +#include /* INFRINGES ON USER NAME SPACE */ +#define YYSIZE_T size_t +#else +#define YYSIZE_T unsigned +#endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST (YYPTRDIFF_T, \ - (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ - ? YYPTRDIFF_MAXIMUM \ - : YY_CAST (YYSIZE_T, -1))) - -#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) +#define YYSIZE_MAXIMUM \ + YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -433,604 +414,2620 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif +#if defined YYENABLE_NLS && YYENABLE_NLS +#if ENABLE_NLS +#include /* INFRINGES ON USER NAME SPACE */ +#define YY_(Msgid) dgettext("bison-runtime", Msgid) +#endif +#endif +#ifndef YY_ +#define YY_(Msgid) Msgid +#endif #endif - #ifndef YY_ATTRIBUTE_PURE -# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define YY_ATTRIBUTE_PURE -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) +#else +#define YY_ATTRIBUTE_PURE +#endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -# else -# define YY_ATTRIBUTE_UNUSED -# endif +#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#else +#define YY_ATTRIBUTE_UNUSED +#endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +#if !defined lint || defined __GNUC__ +#define YY_USE(E) ((void)(E)) #else -# define YY_USE(E) /* empty */ +#define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") +#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") +#else +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +#endif +#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") #else -# define YY_INITIAL_VALUE(Value) Value +#define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +#define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -# define YY_IGNORE_USELESS_CAST_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -# define YY_IGNORE_USELESS_CAST_END \ - _Pragma ("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ +#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") +#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_END +#define YY_IGNORE_USELESS_CAST_BEGIN +#define YY_IGNORE_USELESS_CAST_END #endif - -#define YY_ASSERT(E) ((void) (0 && (E))) +#define YY_ASSERT(E) ((void)(0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif +#ifdef YYSTACK_USE_ALLOCA +#if YYSTACK_USE_ALLOCA +#ifdef __GNUC__ +#define YYSTACK_ALLOC __builtin_alloca +#elif defined __BUILTIN_VA_ARG_INCR +#include /* INFRINGES ON USER NAME SPACE */ +#elif defined _AIX +#define YYSTACK_ALLOC __alloca +#elif defined _MSC_VER +#include /* INFRINGES ON USER NAME SPACE */ +#define alloca _alloca +#else +#define YYSTACK_ALLOC alloca +#if !defined _ALLOCA_H && !defined EXIT_SUCCESS +#include /* INFRINGES ON USER NAME SPACE */ +/* Use EXIT_SUCCESS as a witness for stdlib.h. */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#endif +#endif +#endif + +#ifdef YYSTACK_ALLOC +/* Pacify GCC's 'empty if-body' warning. */ +#define YYSTACK_FREE(Ptr) \ + do { /* empty */ \ + ; \ + } while (0) +#ifndef YYSTACK_ALLOC_MAXIMUM +/* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +#endif +#else +#define YYSTACK_ALLOC YYMALLOC +#define YYSTACK_FREE YYFREE +#ifndef YYSTACK_ALLOC_MAXIMUM +#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +#endif +#if (defined __cplusplus && !defined EXIT_SUCCESS && \ + !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) +#include /* INFRINGES ON USER NAME SPACE */ +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef YYMALLOC +#define YYMALLOC malloc +#if !defined malloc && !defined EXIT_SUCCESS +void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#ifndef YYFREE +#define YYFREE free +#if !defined free && !defined EXIT_SUCCESS +void free(void *); /* INFRINGES ON USER NAME SPACE */ +#endif +#endif +#endif #endif /* 1 */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ + defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) +#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ - + YYSIZEOF (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) +#define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +#define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF (*yyptr); \ - } \ - while (0) +#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF(*yyptr); \ + } while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif +#ifndef YYCOPY +#if defined __GNUC__ && 1 < __GNUC__ +#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) +#else +#define YYCOPY(Dst, Src, Count) \ + do { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } while (0) +#endif +#endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 71 +#define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 267 +#define YYLAST 271 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 77 +#define YYNTOKENS 78 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 55 +#define YYNNTS 56 /* YYNRULES -- Number of rules. */ -#define YYNRULES 143 +#define YYNRULES 145 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 252 +#define YYNSTATES 255 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 327 - +#define YYMAXUTOK 328 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 74, 72, 2, 73, 2, 75, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 76 -}; +static const yytype_int8 yytranslate[] = {0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 75, + 73, + 2, + 74, + 2, + 76, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 77}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = -{ - 0, 260, 260, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 292, 298, 303, 309, 315, 321, - 327, 334, 340, 348, 358, 373, 374, 378, 384, 393, - 403, 407, 411, 415, 419, 426, 429, 442, 460, 487, - 491, 495, 500, 506, 507, 508, 509, 510, 511, 515, - 528, 534, 541, 547, 555, 558, 562, 569, 573, 577, - 583, 590, 593, 600, 612, 626, 631, 638, 648, 681, - 714, 720, 729, 732, 741, 757, 760, 763, 766, 769, - 777, 780, 785, 791, 794, 797, 800, 807, 810, 813, - 818, 825, 832, 837, 847, 853, 863, 880, 887, 899, - 902, 908, 912, 919, 923, 930, 931, 932, 933, 934, - 935, 936, 937, 938, 939, 940, 941, 942, 943, 948, - 951, 959, 964, 972, 978, 984, 994, 997, 1005, 1008, - 1015, 1028, 1036, 1047 -}; +static const yytype_int16 yyrline[] = {0, + 263, + 263, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289, + 290, + 291, + 295, + 301, + 306, + 312, + 318, + 324, + 330, + 337, + 343, + 351, + 361, + 376, + 377, + 381, + 387, + 396, + 406, + 410, + 414, + 418, + 422, + 429, + 432, + 445, + 463, + 490, + 494, + 498, + 503, + 509, + 510, + 511, + 512, + 513, + 514, + 518, + 531, + 537, + 544, + 550, + 558, + 561, + 565, + 572, + 576, + 580, + 586, + 593, + 596, + 603, + 615, + 629, + 634, + 641, + 651, + 689, + 722, + 728, + 737, + 740, + 749, + 765, + 768, + 771, + 774, + 777, + 785, + 788, + 793, + 799, + 802, + 805, + 808, + 815, + 818, + 821, + 826, + 833, + 840, + 845, + 855, + 861, + 871, + 888, + 895, + 907, + 910, + 916, + 920, + 927, + 931, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 956, + 959, + 967, + 972, + 980, + 986, + 992, + 1002, + 1005, + 1013, + 1016, + 1024, + 1027, + 1035, + 1048, + 1056, + 1067}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", - "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "HAVING", "ORDER", - "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", - "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", - "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", - "DATE_T", "TEXT_T", "VECTOR_T", "NOT", "UNIQUE", "NULL_T", "NULLABLE", - "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", - "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", "FORMAT", - "INNER", "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", - "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", - "$accept", "commands", "command_wrapper", "exit_stmt", "help_stmt", - "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", - "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", - "show_index_stmt", "create_index_stmt", "opt_unique", "attr_list", - "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", - "nullable_constraint", "type", "insert_stmt", "values_list", - "value_list", "value", "nonnegative_value", "storage_format", - "delete_stmt", "update_stmt", "set_clauses", "setClause", "select_stmt", - "calc_stmt", "expression_list", "expression", "alias", "aggr_func_expr", - "sub_query_expr", "rel_attr", "relation", "rel_list", "join_clauses", - "where", "condition", "comp_op", "opt_order_by", "sort_list", - "sort_unit", "group_by", "opt_having", "load_data_stmt", "explain_stmt", - "set_variable_stmt", "opt_semicolon", YY_NULLPTR -}; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} +static const char *const yytname[] = {"\"end of file\"", + "error", + "\"invalid token\"", + "SEMICOLON", + "AS", + "ASC", + "BY", + "CREATE", + "DROP", + "EXISTS", + "GROUP", + "HAVING", + "ORDER", + "TABLE", + "TABLES", + "INDEX", + "CALC", + "SELECT", + "DESC", + "SHOW", + "SYNC", + "INSERT", + "DELETE", + "UPDATE", + "LBRACE", + "RBRACE", + "COMMA", + "TRX_BEGIN", + "TRX_COMMIT", + "TRX_ROLLBACK", + "INT_T", + "IN", + "STRING_T", + "FLOAT_T", + "DATE_T", + "TEXT_T", + "VECTOR_T", + "NOT", + "UNIQUE", + "NULL_T", + "LIMIT", + "NULLABLE", + "HELP", + "EXIT", + "DOT", + "INTO", + "VALUES", + "FROM", + "WHERE", + "AND", + "OR", + "SET", + "ON", + "LOAD", + "DATA", + "INFILE", + "EXPLAIN", + "STORAGE", + "FORMAT", + "INNER", + "JOIN", + "EQ", + "LT", + "GT", + "LE", + "GE", + "NE", + "LIKE", + "IS", + "NUMBER", + "FLOAT", + "ID", + "SSS", + "'+'", + "'-'", + "'*'", + "'/'", + "UMINUS", + "$accept", + "commands", + "command_wrapper", + "exit_stmt", + "help_stmt", + "sync_stmt", + "begin_stmt", + "commit_stmt", + "rollback_stmt", + "drop_table_stmt", + "show_tables_stmt", + "desc_table_stmt", + "show_index_stmt", + "create_index_stmt", + "opt_unique", + "attr_list", + "drop_index_stmt", + "create_table_stmt", + "attr_def_list", + "attr_def", + "nullable_constraint", + "type", + "insert_stmt", + "values_list", + "value_list", + "value", + "nonnegative_value", + "storage_format", + "delete_stmt", + "update_stmt", + "set_clauses", + "setClause", + "select_stmt", + "calc_stmt", + "expression_list", + "expression", + "alias", + "aggr_func_expr", + "sub_query_expr", + "rel_attr", + "relation", + "rel_list", + "join_clauses", + "where", + "condition", + "comp_op", + "opt_order_by", + "sort_list", + "sort_unit", + "group_by", + "opt_having", + "opt_limit", + "load_data_stmt", + "explain_stmt", + "set_variable_stmt", + "opt_semicolon", + YY_NULLPTR}; + +static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif -#define YYPACT_NINF (-169) +#define YYPACT_NINF (-167) -#define yypact_value_is_default(Yyn) \ - ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) \ - 0 +#define yytable_value_is_error(Yyn) 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 212, 3, 43, 74, 74, -42, 87, -169, 13, 6, - -1, -169, -169, -169, -169, -169, 15, 55, 212, 76, - 93, -169, -169, -169, -169, -169, -169, -169, -169, -169, - -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, - -169, -169, 52, -169, 101, 53, 54, -9, -169, -169, - -169, -10, -169, 74, -169, -169, -169, 8, -169, -169, - -169, 79, -169, -169, 91, 80, 81, 96, 92, 107, - -169, -169, -169, -169, -3, 94, -169, 98, 74, 137, - 138, 74, -48, -169, 97, -169, 74, 74, 74, 74, - 139, 99, 99, 121, 125, 103, -22, 100, 106, 120, - 23, 127, 109, 79, -169, -169, 155, -169, -169, -169, - -51, -51, -169, -169, 74, -169, 9, 125, -169, 158, - 144, -169, 128, -15, -169, 38, -169, -169, 140, 124, - 161, 129, 173, -169, 122, -169, -169, -169, 132, 167, - 184, -22, 169, -169, -169, 0, -169, -169, -169, -169, - -169, -169, -169, 159, 66, 63, 74, 74, 103, -169, - -169, -169, 185, -169, -169, -169, -169, -169, -169, 5, - 106, 174, 130, -169, 177, 99, 99, 197, 205, 89, - -169, 198, -169, -169, -169, -169, 74, 144, 144, -2, - -2, -169, 151, 156, 186, -169, -169, -169, 161, 170, - -169, 153, 176, 125, 14, -169, 74, 144, 224, -169, - -22, -22, -2, -169, 189, -169, 213, -169, -169, 46, - 216, 218, 144, 184, -169, 63, 238, -169, -169, 95, - 49, 173, -169, 153, -169, 51, -169, 74, -169, -169, - -169, -169, 187, 20, -169, 219, 99, -169, -169, 74, - -169, -169 -}; +static const yytype_int16 yypact[] = {214, + 0, + 10, + 154, + 154, + -42, + 51, + -167, + -19, + -15, + -31, + -167, + -167, + -167, + -167, + -167, + -17, + 13, + 214, + 58, + 57, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + 41, + -167, + 56, + 45, + 50, + 120, + -167, + -167, + -167, + 6, + -167, + 154, + -167, + -167, + -167, + 5, + -167, + -167, + -167, + 67, + -167, + -167, + 86, + 68, + 69, + 87, + 80, + 88, + -167, + -167, + -167, + -167, + -12, + 71, + -167, + 93, + 154, + 121, + 122, + 154, + -51, + -167, + 78, + -167, + 154, + 154, + 154, + 154, + 124, + 81, + 81, + 102, + 105, + 83, + -23, + 84, + 89, + 99, + 11, + 109, + 91, + 67, + -167, + -167, + 133, + -167, + -167, + -167, + -3, + -3, + -167, + -167, + 154, + -167, + 4, + 105, + -167, + 139, + 142, + -167, + 103, + -9, + -167, + 19, + -167, + -167, + 123, + 90, + 141, + 104, + 152, + -167, + 100, + -167, + -167, + -167, + 112, + 149, + 166, + -23, + 151, + -167, + -167, + 2, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + 143, + 33, + 43, + 154, + 154, + 83, + -167, + -167, + -167, + 169, + -167, + -167, + -167, + -167, + -167, + -167, + 20, + 89, + 158, + 113, + -167, + 163, + 81, + 81, + 182, + 185, + 77, + -167, + 173, + -167, + -167, + -167, + -167, + 154, + 142, + 142, + 54, + 54, + -167, + 127, + 130, + 162, + -167, + -167, + -167, + 141, + 161, + -167, + 144, + 167, + 105, + 15, + -167, + 154, + 142, + 208, + -167, + -23, + -23, + 54, + -167, + 178, + -167, + 213, + -167, + -167, + 14, + 218, + 215, + 142, + 166, + -167, + 43, + 233, + 205, + -167, + 106, + 74, + 152, + -167, + 144, + -167, + 3, + -167, + 154, + 177, + -167, + -167, + -167, + -167, + -167, + 187, + 9, + -167, + 222, + -167, + 81, + -167, + -167, + 154, + -167, + -167}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 36, 0, 82, 82, 0, 0, 26, 0, 0, - 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, - 0, 23, 22, 15, 16, 17, 18, 9, 10, 11, - 14, 12, 13, 8, 5, 7, 6, 3, 4, 19, - 20, 21, 0, 35, 0, 0, 0, 82, 70, 67, - 68, 102, 69, 0, 93, 91, 80, 97, 95, 96, - 92, 81, 32, 31, 0, 0, 0, 0, 0, 0, - 141, 1, 143, 2, 71, 0, 30, 0, 82, 0, - 0, 82, 0, 90, 0, 98, 0, 0, 0, 0, - 83, 0, 0, 0, 109, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 101, 89, 0, 103, 94, 99, - 85, 86, 87, 88, 82, 104, 97, 109, 33, 0, - 0, 73, 0, 109, 75, 0, 142, 64, 0, 0, - 45, 0, 0, 44, 0, 39, 100, 84, 0, 105, - 136, 0, 59, 127, 125, 0, 115, 116, 117, 118, - 119, 120, 123, 121, 0, 110, 0, 0, 0, 74, - 65, 66, 0, 53, 54, 55, 56, 57, 58, 52, - 0, 0, 0, 43, 0, 0, 0, 0, 138, 0, - 62, 0, 128, 126, 124, 122, 0, 0, 0, 112, - 77, 76, 0, 0, 0, 51, 50, 48, 45, 71, - 72, 0, 0, 109, 97, 106, 82, 0, 129, 60, - 0, 0, 111, 113, 114, 140, 0, 49, 46, 42, - 37, 0, 0, 136, 137, 139, 0, 78, 63, 0, - 52, 0, 41, 0, 34, 107, 79, 0, 61, 47, - 40, 38, 0, 133, 130, 131, 0, 135, 134, 0, - 108, 132 -}; +static const yytype_uint8 yydefact[] = {0, + 36, + 0, + 82, + 82, + 0, + 0, + 26, + 0, + 0, + 0, + 27, + 28, + 29, + 25, + 24, + 0, + 0, + 0, + 0, + 0, + 23, + 22, + 15, + 16, + 17, + 18, + 9, + 10, + 11, + 14, + 12, + 13, + 8, + 5, + 7, + 6, + 3, + 4, + 19, + 20, + 21, + 0, + 35, + 0, + 0, + 0, + 82, + 70, + 67, + 68, + 102, + 69, + 0, + 93, + 91, + 80, + 97, + 95, + 96, + 92, + 81, + 32, + 31, + 0, + 0, + 0, + 0, + 0, + 0, + 143, + 1, + 145, + 2, + 71, + 0, + 30, + 0, + 82, + 0, + 0, + 82, + 0, + 90, + 0, + 98, + 0, + 0, + 0, + 0, + 83, + 0, + 0, + 0, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 101, + 89, + 0, + 103, + 94, + 99, + 85, + 86, + 87, + 88, + 82, + 104, + 97, + 109, + 33, + 0, + 0, + 73, + 0, + 109, + 75, + 0, + 144, + 64, + 0, + 0, + 45, + 0, + 0, + 44, + 0, + 39, + 100, + 84, + 0, + 105, + 136, + 0, + 59, + 127, + 125, + 0, + 115, + 116, + 117, + 118, + 119, + 120, + 123, + 121, + 0, + 110, + 0, + 0, + 0, + 74, + 65, + 66, + 0, + 53, + 54, + 55, + 56, + 57, + 58, + 52, + 0, + 0, + 0, + 43, + 0, + 0, + 0, + 0, + 138, + 0, + 62, + 0, + 128, + 126, + 124, + 122, + 0, + 0, + 0, + 112, + 77, + 76, + 0, + 0, + 0, + 51, + 50, + 48, + 45, + 71, + 72, + 0, + 0, + 109, + 97, + 106, + 82, + 0, + 129, + 60, + 0, + 0, + 111, + 113, + 114, + 142, + 0, + 49, + 46, + 42, + 37, + 0, + 0, + 136, + 137, + 139, + 0, + 140, + 63, + 0, + 52, + 0, + 41, + 0, + 34, + 107, + 79, + 0, + 0, + 78, + 61, + 47, + 40, + 38, + 0, + 133, + 130, + 131, + 141, + 0, + 135, + 134, + 0, + 108, + 132}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -169, -169, 229, -169, -169, -169, -169, -169, -169, -169, - -169, -169, -169, -169, -169, 16, -169, -169, 50, 82, - 21, -169, -169, -169, 39, -91, -93, 56, -169, -169, - -169, 102, -45, -169, -4, -52, 199, -169, -169, -169, - -85, 83, 11, -113, -168, 104, -169, 12, -169, 40, - -169, -169, -169, -169, -169 -}; +static const yytype_int16 yypgoto[] = {-167, + -167, + 231, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + -167, + 17, + -167, + -167, + 53, + 82, + 23, + -167, + -167, + -167, + 44, + -91, + -93, + 55, + -167, + -167, + -167, + 101, + -45, + -167, + -4, + -52, + 201, + -167, + -167, + -167, + -85, + 85, + 22, + -113, + -166, + 108, + -167, + 8, + -167, + 40, + -167, + -167, + -167, + -167, + -167, + -167}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = -{ - 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 44, 221, 32, 33, 171, 130, - 197, 169, 34, 142, 179, 180, 55, 100, 35, 36, - 123, 124, 37, 38, 56, 57, 139, 58, 59, 60, - 202, 117, 203, 121, 155, 156, 227, 244, 245, 178, - 208, 39, 40, 41, 73 -}; +static const yytype_uint8 yydefgoto[] = {0, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 44, + 221, + 32, + 33, + 171, + 130, + 197, + 169, + 34, + 142, + 179, + 180, + 55, + 100, + 35, + 36, + 123, + 124, + 37, + 38, + 56, + 57, + 139, + 58, + 59, + 60, + 202, + 117, + 203, + 121, + 155, + 156, + 227, + 246, + 247, + 178, + 208, + 239, + 39, + 40, + 41, + 73}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = -{ - 61, 83, 79, 127, 140, 126, 116, 118, 78, 182, - 159, 158, 84, 84, 81, 47, 42, 48, 84, 213, - 214, 98, 107, 88, 89, 247, 108, 132, 62, 193, - 48, 183, 120, 82, 110, 111, 112, 113, 248, 225, - 78, 43, 194, 80, 195, 196, 49, 50, 127, 52, - 231, 125, 66, 99, 235, 133, 45, 65, 46, 49, - 50, 51, 52, 78, 53, 54, 184, 138, 154, 67, - 86, 87, 88, 89, 103, 143, 71, 106, 85, 85, - 86, 87, 88, 89, 85, 68, 194, 173, 195, 196, - 223, 204, 86, 87, 88, 89, 72, 144, 47, 187, - 188, 63, 64, 145, 189, 190, 160, 161, 69, 242, - 137, 187, 188, 48, 209, 210, 75, 127, 127, 228, - 238, 210, 74, 76, 77, 91, 146, 147, 148, 149, - 150, 151, 152, 153, 212, 154, 154, 92, 86, 87, - 88, 89, 49, 50, 51, 52, 95, 53, 54, 102, - 93, 94, 96, 143, 163, 154, 164, 165, 166, 167, - 168, 97, 104, 105, 101, 114, 119, 109, 47, 115, - 154, 128, 120, 122, 232, 144, 129, 131, 134, 135, - 136, 145, 141, 48, 162, 243, 240, 170, 157, 172, - 78, 175, 174, 176, 177, 181, 185, 243, 192, 199, - 200, 201, 224, 206, 146, 147, 148, 149, 150, 151, - 152, 153, 49, 50, 51, 52, 207, 53, 54, 1, - 2, 215, 211, 220, 216, 217, 99, 222, 3, 4, - 5, 6, 7, 8, 9, 10, 226, 187, 230, 11, - 12, 13, 233, 234, 237, 249, 246, 70, 218, 241, - 229, 239, 198, 14, 15, 219, 90, 250, 186, 205, - 191, 251, 16, 236, 17, 0, 0, 18 -}; - -static const yytype_int16 yycheck[] = -{ - 4, 53, 47, 96, 117, 96, 91, 92, 17, 9, - 123, 26, 4, 4, 24, 24, 13, 39, 4, 187, - 188, 24, 70, 74, 75, 5, 74, 4, 70, 24, - 39, 31, 47, 43, 86, 87, 88, 89, 18, 207, - 17, 38, 37, 47, 39, 40, 68, 69, 141, 71, - 4, 73, 46, 56, 222, 100, 13, 44, 15, 68, - 69, 70, 71, 17, 73, 74, 66, 58, 120, 70, - 72, 73, 74, 75, 78, 9, 0, 81, 70, 70, - 72, 73, 74, 75, 70, 70, 37, 132, 39, 40, - 203, 176, 72, 73, 74, 75, 3, 31, 24, 48, - 49, 14, 15, 37, 156, 157, 68, 69, 53, 58, - 114, 48, 49, 39, 25, 26, 15, 210, 211, 210, - 25, 26, 70, 70, 70, 46, 60, 61, 62, 63, - 64, 65, 66, 67, 186, 187, 188, 46, 72, 73, - 74, 75, 68, 69, 70, 71, 50, 73, 74, 51, - 70, 70, 60, 9, 30, 207, 32, 33, 34, 35, - 36, 54, 25, 25, 70, 26, 45, 70, 24, 70, - 222, 71, 47, 70, 219, 31, 70, 57, 51, 70, - 25, 37, 24, 39, 44, 237, 231, 26, 60, 60, - 17, 59, 70, 26, 10, 26, 37, 249, 13, 25, - 70, 24, 206, 6, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 11, 73, 74, 7, - 8, 70, 24, 70, 68, 39, 56, 51, 16, 17, - 18, 19, 20, 21, 22, 23, 12, 48, 25, 27, - 28, 29, 26, 25, 6, 26, 59, 18, 198, 233, - 211, 230, 170, 41, 42, 199, 57, 246, 154, 176, - 158, 249, 50, 223, 52, -1, -1, 55 -}; +static const yytype_uint8 yytable[] = {61, + 83, + 79, + 127, + 140, + 126, + 116, + 118, + 84, + 84, + 159, + 182, + 98, + 42, + 250, + 132, + 48, + 158, + 231, + 84, + 107, + 213, + 214, + 45, + 108, + 46, + 65, + 251, + 78, + 62, + 81, + 78, + 66, + 183, + 110, + 111, + 112, + 113, + 43, + 120, + 67, + 225, + 143, + 80, + 193, + 99, + 49, + 50, + 127, + 52, + 82, + 125, + 187, + 188, + 68, + 133, + 235, + 194, + 71, + 195, + 72, + 196, + 244, + 138, + 144, + 63, + 64, + 69, + 154, + 184, + 145, + 75, + 88, + 89, + 103, + 85, + 85, + 106, + 86, + 87, + 88, + 89, + 86, + 87, + 88, + 89, + 85, + 173, + 160, + 161, + 223, + 204, + 187, + 188, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 209, + 210, + 189, + 190, + 86, + 87, + 88, + 89, + 137, + 194, + 74, + 195, + 91, + 196, + 76, + 127, + 127, + 228, + 163, + 77, + 164, + 165, + 166, + 167, + 168, + 86, + 87, + 88, + 89, + 240, + 210, + 92, + 212, + 154, + 154, + 78, + 95, + 93, + 94, + 96, + 101, + 97, + 47, + 102, + 104, + 105, + 119, + 109, + 114, + 143, + 115, + 120, + 122, + 154, + 128, + 131, + 136, + 48, + 129, + 134, + 135, + 141, + 157, + 172, + 47, + 170, + 162, + 78, + 154, + 174, + 175, + 144, + 232, + 176, + 177, + 181, + 47, + 145, + 185, + 48, + 192, + 199, + 200, + 245, + 242, + 201, + 206, + 49, + 50, + 51, + 52, + 48, + 53, + 54, + 207, + 211, + 215, + 216, + 245, + 217, + 224, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 49, + 50, + 51, + 52, + 220, + 53, + 54, + 99, + 222, + 226, + 1, + 2, + 49, + 50, + 51, + 52, + 187, + 53, + 54, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 230, + 237, + 234, + 11, + 12, + 13, + 233, + 238, + 248, + 249, + 252, + 70, + 243, + 218, + 198, + 241, + 219, + 229, + 14, + 15, + 90, + 191, + 254, + 205, + 186, + 236, + 0, + 16, + 0, + 17, + 0, + 0, + 18, + 253}; + +static const yytype_int16 yycheck[] = {4, + 53, + 47, + 96, + 117, + 96, + 91, + 92, + 4, + 4, + 123, + 9, + 24, + 13, + 5, + 4, + 39, + 26, + 4, + 4, + 71, + 187, + 188, + 13, + 75, + 15, + 45, + 18, + 17, + 71, + 24, + 17, + 47, + 31, + 86, + 87, + 88, + 89, + 38, + 48, + 71, + 207, + 9, + 47, + 24, + 57, + 69, + 70, + 141, + 72, + 44, + 74, + 49, + 50, + 71, + 100, + 222, + 37, + 0, + 39, + 3, + 41, + 59, + 59, + 31, + 14, + 15, + 54, + 120, + 67, + 37, + 15, + 75, + 76, + 78, + 71, + 71, + 81, + 73, + 74, + 75, + 76, + 73, + 74, + 75, + 76, + 71, + 132, + 69, + 70, + 203, + 176, + 49, + 50, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 25, + 26, + 156, + 157, + 73, + 74, + 75, + 76, + 114, + 37, + 71, + 39, + 47, + 41, + 71, + 210, + 211, + 210, + 30, + 71, + 32, + 33, + 34, + 35, + 36, + 73, + 74, + 75, + 76, + 25, + 26, + 47, + 186, + 187, + 188, + 17, + 51, + 71, + 71, + 61, + 71, + 55, + 24, + 52, + 25, + 25, + 46, + 71, + 26, + 9, + 71, + 48, + 71, + 207, + 72, + 58, + 25, + 39, + 71, + 52, + 71, + 24, + 61, + 61, + 24, + 26, + 45, + 17, + 222, + 71, + 60, + 31, + 219, + 26, + 10, + 26, + 24, + 37, + 37, + 39, + 13, + 25, + 71, + 237, + 231, + 24, + 6, + 69, + 70, + 71, + 72, + 39, + 74, + 75, + 11, + 24, + 71, + 69, + 252, + 39, + 206, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 71, + 74, + 75, + 57, + 52, + 12, + 7, + 8, + 69, + 70, + 71, + 72, + 49, + 74, + 75, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 25, + 6, + 25, + 27, + 28, + 29, + 26, + 40, + 69, + 60, + 26, + 18, + 233, + 198, + 170, + 230, + 199, + 211, + 42, + 43, + 57, + 158, + 252, + 176, + 154, + 223, + -1, + 51, + -1, + 53, + -1, + -1, + 56, + 249}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, - 23, 27, 28, 29, 41, 42, 50, 52, 55, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 93, 94, 99, 105, 106, 109, 110, 128, - 129, 130, 13, 38, 91, 13, 15, 24, 39, 68, - 69, 70, 71, 73, 74, 103, 111, 112, 114, 115, - 116, 111, 70, 14, 15, 44, 46, 70, 70, 53, - 79, 0, 3, 131, 70, 15, 70, 70, 17, 109, - 111, 24, 43, 112, 4, 70, 72, 73, 74, 75, - 113, 46, 46, 70, 70, 50, 60, 54, 24, 56, - 104, 70, 51, 111, 25, 25, 111, 70, 74, 70, - 112, 112, 112, 112, 26, 70, 117, 118, 117, 45, - 47, 120, 70, 107, 108, 73, 102, 103, 71, 70, - 96, 57, 4, 109, 51, 70, 25, 111, 58, 113, - 120, 24, 100, 9, 31, 37, 60, 61, 62, 63, - 64, 65, 66, 67, 112, 121, 122, 60, 26, 120, - 68, 69, 44, 30, 32, 33, 34, 35, 36, 98, - 26, 95, 60, 109, 70, 59, 26, 10, 126, 101, - 102, 26, 9, 31, 66, 37, 122, 48, 49, 112, - 112, 108, 13, 24, 37, 39, 40, 97, 96, 25, - 70, 24, 117, 119, 117, 118, 6, 11, 127, 25, - 26, 24, 112, 121, 121, 70, 68, 39, 95, 104, - 70, 92, 51, 120, 111, 121, 12, 123, 102, 101, - 25, 4, 109, 26, 25, 121, 126, 6, 25, 97, - 109, 92, 58, 112, 124, 125, 59, 5, 18, 26, - 119, 124 -}; +static const yytype_uint8 yystos[] = {0, + 7, + 8, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 27, + 28, + 29, + 42, + 43, + 51, + 53, + 56, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 94, + 95, + 100, + 106, + 107, + 110, + 111, + 130, + 131, + 132, + 13, + 38, + 92, + 13, + 15, + 24, + 39, + 69, + 70, + 71, + 72, + 74, + 75, + 104, + 112, + 113, + 115, + 116, + 117, + 112, + 71, + 14, + 15, + 45, + 47, + 71, + 71, + 54, + 80, + 0, + 3, + 133, + 71, + 15, + 71, + 71, + 17, + 110, + 112, + 24, + 44, + 113, + 4, + 71, + 73, + 74, + 75, + 76, + 114, + 47, + 47, + 71, + 71, + 51, + 61, + 55, + 24, + 57, + 105, + 71, + 52, + 112, + 25, + 25, + 112, + 71, + 75, + 71, + 113, + 113, + 113, + 113, + 26, + 71, + 118, + 119, + 118, + 46, + 48, + 121, + 71, + 108, + 109, + 74, + 103, + 104, + 72, + 71, + 97, + 58, + 4, + 110, + 52, + 71, + 25, + 112, + 59, + 114, + 121, + 24, + 101, + 9, + 31, + 37, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 113, + 122, + 123, + 61, + 26, + 121, + 69, + 70, + 45, + 30, + 32, + 33, + 34, + 35, + 36, + 99, + 26, + 96, + 61, + 110, + 71, + 60, + 26, + 10, + 127, + 102, + 103, + 26, + 9, + 31, + 67, + 37, + 123, + 49, + 50, + 113, + 113, + 109, + 13, + 24, + 37, + 39, + 41, + 98, + 97, + 25, + 71, + 24, + 118, + 120, + 118, + 119, + 6, + 11, + 128, + 25, + 26, + 24, + 113, + 122, + 122, + 71, + 69, + 39, + 96, + 105, + 71, + 93, + 52, + 121, + 112, + 122, + 12, + 124, + 103, + 102, + 25, + 4, + 110, + 26, + 25, + 122, + 127, + 6, + 40, + 129, + 25, + 98, + 110, + 93, + 59, + 113, + 125, + 126, + 69, + 60, + 5, + 18, + 26, + 120, + 125}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = -{ - 0, 77, 78, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 91, 92, 92, 93, - 94, 94, 94, 94, 94, 95, 95, 96, 96, 97, - 97, 97, 97, 98, 98, 98, 98, 98, 98, 99, - 100, 100, 101, 101, 102, 102, 102, 103, 103, 103, - 103, 104, 104, 105, 106, 107, 107, 108, 109, 109, - 110, 110, 111, 111, 111, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 113, 113, 113, - 114, 115, 116, 116, 117, 118, 118, 119, 119, 120, - 120, 121, 121, 121, 121, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 123, - 123, 124, 124, 125, 125, 125, 126, 126, 127, 127, - 128, 129, 130, 131 -}; +static const yytype_uint8 yyr1[] = {0, + 78, + 79, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 92, + 93, + 93, + 94, + 95, + 95, + 95, + 95, + 95, + 96, + 96, + 97, + 97, + 98, + 98, + 98, + 98, + 99, + 99, + 99, + 99, + 99, + 99, + 100, + 101, + 101, + 102, + 102, + 103, + 103, + 103, + 104, + 104, + 104, + 104, + 105, + 105, + 106, + 107, + 108, + 108, + 109, + 110, + 110, + 111, + 111, + 112, + 112, + 112, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 113, + 114, + 114, + 114, + 115, + 116, + 117, + 117, + 118, + 119, + 119, + 120, + 120, + 121, + 121, + 122, + 122, + 122, + 122, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 123, + 124, + 124, + 125, + 125, + 126, + 126, + 126, + 127, + 127, + 128, + 128, + 129, + 129, + 130, + 131, + 132, + 133}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = +static const yytype_int8 yyr2[] = {0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 2, + 2, + 4, + 9, + 1, + 0, + 1, + 3, + 5, + 10, + 9, + 8, + 6, + 5, + 0, + 3, + 6, + 3, + 2, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 5, + 3, + 5, + 1, + 3, + 1, + 2, + 2, + 1, + 1, + 1, + 1, + 0, + 4, + 4, + 5, + 1, + 3, + 3, + 9, + 9, + 2, + 2, + 0, + 2, + 4, + 3, + 3, + 3, + 3, + 3, + 2, + 1, + 1, + 1, + 3, + 1, + 1, + 0, + 1, + 2, + 4, + 3, + 1, + 3, + 1, + 2, + 4, + 3, + 6, + 0, + 2, + 3, + 2, + 3, + 3, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 0, + 3, + 1, + 3, + 1, + 2, + 2, + 0, + 3, + 0, + 2, + 0, + 2, + 7, + 2, + 4, + 1}; + +enum { - 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, - 10, 9, 8, 6, 5, 0, 3, 6, 3, 2, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 5, - 3, 5, 1, 3, 1, 2, 2, 1, 1, 1, - 1, 0, 4, 4, 5, 1, 3, 3, 8, 9, - 2, 2, 0, 2, 4, 3, 3, 3, 3, 3, - 2, 1, 1, 1, 3, 1, 1, 0, 1, 2, - 4, 3, 1, 3, 1, 2, 4, 3, 6, 0, - 2, 3, 2, 3, 3, 1, 1, 1, 1, 1, - 1, 1, 2, 1, 2, 1, 2, 1, 2, 0, - 3, 1, 3, 1, 2, 2, 0, 3, 0, 2, - 7, 2, 4, 1 + YYENOMEM = -2 }; - -enum { YYENOMEM = -2 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK(yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } else { \ + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -1042,151 +3039,131 @@ enum { YYENOMEM = -2 }; the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) +#define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) { \ + (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ + } else { \ + (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) - /* Enable debugging if requested. */ #if YYDEBUG -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +#ifndef YYFPRINTF +#include /* INFRINGES ON USER NAME SPACE */ +#define YYFPRINTF fprintf +#endif +#define YYDPRINTF(Args) \ + do { \ + if (yydebug) \ + YYFPRINTF Args; \ + } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YYLOCATION_PRINT +#ifndef YYLOCATION_PRINT -# if defined YY_LOCATION_PRINT +#if defined YY_LOCATION_PRINT - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) { + res += YYFPRINTF(yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF(yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) { + if (yylocp->first_line < yylocp->last_line) { + res += YYFPRINTF(yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF(yyo, ".%d", end_col); + } else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF(yyo, "-%d", end_col); + } return res; } -# define YYLOCATION_PRINT yy_location_print_ - - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) - -# else +#define YYLOCATION_PRINT yy_location_print_ -# define YYLOCATION_PRINT(File, Loc) ((void) 0) - /* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -# define YY_LOCATION_PRINT YYLOCATION_PRINT +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -# endif -# endif /* !defined YYLOCATION_PRINT */ +#else +#define YYLOCATION_PRINT(File, Loc) ((void)0) +/* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +#define YY_LOCATION_PRINT YYLOCATION_PRINT -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +#endif +#endif /* !defined YYLOCATION_PRINT */ +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ + do { \ + if (yydebug) { \ + YYFPRINTF(stderr, "%s ", Title); \ + yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF(stderr, "\n"); \ + } \ + } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyoutput); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, + YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); - YYLOCATION_PRINT (yyo, yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF (yyo, ")"); + YYLOCATION_PRINT(yyo, yylocationp); + YYFPRINTF(yyo, ": "); + yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF(yyo, ")"); } /*------------------------------------------------------------------. @@ -1194,70 +3171,66 @@ yy_symbol_print (FILE *yyo, | TOP (included). | `------------------------------------------------------------------*/ -static void -yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); + YYFPRINTF(stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) { + int yybot = *yybottom; + YYFPRINTF(stderr, " %d", yybot); + } + YYFPRINTF(stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - +#define YY_STACK_PRINT(Bottom, Top) \ + do { \ + if (yydebug) \ + yy_stack_print((Bottom), (Top)); \ + } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, + ParsedSqlResult *sql_result, void *scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", - yyrule - 1, yylno); + YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); - YYFPRINTF (stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) { + YYFPRINTF(stderr, " $%d = ", yyi + 1); + yy_symbol_print(stderr, + YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), + sql_string, + sql_result, + scanner); + YYFPRINTF(stderr, "\n"); + } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ -} while (0) +#define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug) \ + yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ + } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) +#define YYDPRINTF(Args) ((void)0) +#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +#define YY_STACK_PRINT(Bottom, Top) +#define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -1268,16 +3241,15 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 +#define YYMAXDEPTH 10000 #endif - /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -1286,69 +3258,59 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default(yyn)) { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } - - - #ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else +#if defined __GLIBC__ && defined _STRING_H +#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) +#else /* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) +static YYPTRDIFF_T yystrlen(const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -# endif +#endif #endif #ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +#define yystpcpy stpcpy +#else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) +static char *yystpcpy(char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -1356,7 +3318,7 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } -# endif +#endif #endif #ifndef yytnamerr @@ -1367,52 +3329,45 @@ yystpcpy (char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) +static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) { - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': + if (*yystr == '"') { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) { + case '\'': + case ',': goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes:; + } if (yyres) - return yystpcpy (yyres, yystr) - yyres; + return yystpcpy(yyres, yystr) - yyres; else - return yystrlen (yystr); + return yystrlen(yystr); } #endif - -static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -1439,19 +3394,17 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) - { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -1463,11 +3416,12 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) +static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) { - enum { YYARGS_MAX = 5 }; + enum + { + YYARGS_MAX = 5 + }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -1477,16 +3431,13 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) - { -#define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break + switch (yycount) { +#define YYCASE_(N, S) \ + case N: yyformat = S; break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1495,134 +3446,118 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; + yysize = yystrlen(yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) { + YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) { + *yymsg_alloc = 2 * yysize; + if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { + yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } else { + ++yyp; + ++yyformat; + } } return 0; } - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, + const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (sql_string); - YY_USE (sql_result); - YY_USE (scanner); + YY_USE(yyvaluep); + YY_USE(yylocationp); + YY_USE(sql_string); + YY_USE(sql_result); + YY_USE(scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YY_USE(yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - - - - /*----------. | yyparse. | `----------*/ -int -yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) +int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { -/* Lookahead token kind. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; + /* Lookahead token kind. */ + int yychar; + + /* The semantic value of the lookahead symbol. */ + /* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ + YY_INITIAL_VALUE(static YYSTYPE yyval_default;) + YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); + + /* Location data for the lookahead symbol. */ + static YYLTYPE yyloc_default +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = {1, 1, 1, 1} +#endif + ; + YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -1638,24 +3573,23 @@ YYLTYPE yylloc = yyloc_default; YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF ((stderr, "Starting parse\n")); + YYDPRINTF((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; - /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -1664,93 +3598,90 @@ YYLTYPE yylloc = yyloc_default; have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YYDPRINTF((stderr, "Entering state %d\n", yystate)); + YY_ASSERT(0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST (yy_state_t, yystate); + *yyssp = YY_CAST(yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else + { + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +#if defined yyoverflow { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -# if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * YYSIZEOF (*yyssp), - &yyvs1, yysize * YYSIZEOF (*yyvsp), - &yyls1, yysize * YYSIZEOF (*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow(YY_("memory exhausted"), + &yyss1, + yysize * YYSIZEOF(*yyssp), + &yyvs1, + yysize * YYSIZEOF(*yyvsp), + &yyls1, + yysize * YYSIZEOF(*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +#else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + YYNOMEM; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); + if (!yyptr) YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = - YY_CAST (union yyalloc *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); - if (! yyptr) - YYNOMEM; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif + YYSTACK_RELOCATE(yyss_alloc, yyss); + YYSTACK_RELOCATE(yyvs_alloc, yyvs); + YYSTACK_RELOCATE(yyls_alloc, yyls); +#undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE(yyss1); + } +#endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF ((stderr, "Stack size increased to %ld\n", - YY_CAST (long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; goto yybackup; - /*-----------. | yybackup. | `-----------*/ @@ -1760,40 +3691,34 @@ YYLTYPE yylloc = yyloc_default; /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yypact_value_is_default(yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token\n")); - yychar = yylex (&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) { + YYDPRINTF((stderr, "Reading a token\n")); + yychar = yylex(&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) - { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else if (yychar == YYerror) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF((stderr, "Now at end of input.\n")); + } else if (yychar == YYerror) { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } else { + yytoken = YYTRANSLATE(yychar); + YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -1801,13 +3726,12 @@ YYLTYPE yylloc = yyloc_default; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) { + if (yytable_value_is_error(yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -1815,7 +3739,7 @@ YYLTYPE yylloc = yyloc_default; yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -1826,7 +3750,6 @@ YYLTYPE yylloc = yyloc_default; yychar = YYEMPTY; goto yynewstate; - /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -1836,7 +3759,6 @@ YYLTYPE yylloc = yyloc_default; goto yyerrlab; goto yyreduce; - /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -1852,221 +3774,230 @@ YYLTYPE yylloc = yyloc_default; users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + yyval = yyvsp[1 - yylen]; /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT (yyn); - switch (yyn) + YY_REDUCE_PRINT(yyn); + switch (yyn) { + case 2: /* commands: command_wrapper opt_semicolon */ +#line 264 "yacc_sql.y" { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 261 "yacc_sql.y" - { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } -#line 1870 "yacc_sql.cpp" + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } +#line 1874 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ -#line 292 "yacc_sql.y" - { + case 24: /* exit_stmt: EXIT */ +#line 295 "yacc_sql.y" + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1879 "yacc_sql.cpp" +#line 1883 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ -#line 298 "yacc_sql.y" - { + case 25: /* help_stmt: HELP */ +#line 301 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1887 "yacc_sql.cpp" +#line 1891 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ -#line 303 "yacc_sql.y" - { + case 26: /* sync_stmt: SYNC */ +#line 306 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1895 "yacc_sql.cpp" +#line 1899 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ -#line 309 "yacc_sql.y" - { + case 27: /* begin_stmt: TRX_BEGIN */ +#line 312 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1903 "yacc_sql.cpp" +#line 1907 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ -#line 315 "yacc_sql.y" - { + case 28: /* commit_stmt: TRX_COMMIT */ +#line 318 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1911 "yacc_sql.cpp" +#line 1915 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ -#line 321 "yacc_sql.y" - { + case 29: /* rollback_stmt: TRX_ROLLBACK */ +#line 324 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1919 "yacc_sql.cpp" +#line 1923 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ -#line 327 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + case 30: /* drop_table_stmt: DROP TABLE ID */ +#line 330 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1929 "yacc_sql.cpp" +#line 1933 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ -#line 334 "yacc_sql.y" - { + case 31: /* show_tables_stmt: SHOW TABLES */ +#line 337 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1937 "yacc_sql.cpp" +#line 1941 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ -#line 340 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + case 32: /* desc_table_stmt: DESC ID */ +#line 343 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1947 "yacc_sql.cpp" +#line 1951 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 349 "yacc_sql.y" + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ +#line 352 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1958 "yacc_sql.cpp" +#line 1962 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 359 "yacc_sql.y" + case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ +#line 362 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1974 "yacc_sql.cpp" +#line 1978 "yacc_sql.cpp" break; - case 35: /* opt_unique: UNIQUE */ -#line 373 "yacc_sql.y" - { (yyval.unique) = true; } -#line 1980 "yacc_sql.cpp" + case 35: /* opt_unique: UNIQUE */ +#line 376 "yacc_sql.y" + { + (yyval.unique) = true; + } +#line 1984 "yacc_sql.cpp" break; - case 36: /* opt_unique: %empty */ -#line 374 "yacc_sql.y" - { (yyval.unique) = false; } -#line 1986 "yacc_sql.cpp" + case 36: /* opt_unique: %empty */ +#line 377 "yacc_sql.y" + { + (yyval.unique) = false; + } +#line 1990 "yacc_sql.cpp" break; - case 37: /* attr_list: ID */ -#line 379 "yacc_sql.y" + case 37: /* attr_list: ID */ +#line 382 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 1996 "yacc_sql.cpp" +#line 2000 "yacc_sql.cpp" break; - case 38: /* attr_list: ID COMMA attr_list */ -#line 385 "yacc_sql.y" + case 38: /* attr_list: ID COMMA attr_list */ +#line 388 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list) + ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2006 "yacc_sql.cpp" +#line 2010 "yacc_sql.cpp" break; - case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 394 "yacc_sql.y" + case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ +#line 397 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2018 "yacc_sql.cpp" +#line 2022 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ -#line 404 "yacc_sql.y" + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ +#line 407 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2026 "yacc_sql.cpp" +#line 2030 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ -#line 408 "yacc_sql.y" + case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ +#line 411 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2034 "yacc_sql.cpp" +#line 2038 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 412 "yacc_sql.y" + case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ +#line 415 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); + (yyval.sql_node) = create_table_sql_node( + (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2042 "yacc_sql.cpp" +#line 2046 "yacc_sql.cpp" break; - case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ -#line 416 "yacc_sql.y" + case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ +#line 419 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = + create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2050 "yacc_sql.cpp" +#line 2054 "yacc_sql.cpp" break; - case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ -#line 420 "yacc_sql.y" + case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ +#line 423 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = + create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2058 "yacc_sql.cpp" +#line 2062 "yacc_sql.cpp" break; - case 45: /* attr_def_list: %empty */ -#line 426 "yacc_sql.y" + case 45: /* attr_def_list: %empty */ +#line 429 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2066 "yacc_sql.cpp" +#line 2070 "yacc_sql.cpp" break; - case 46: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 430 "yacc_sql.y" + case 46: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 433 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -2076,13 +4007,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2080 "yacc_sql.cpp" +#line 2084 "yacc_sql.cpp" break; - case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 443 "yacc_sql.y" + case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ +#line 446 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->name = (yyvsp[-5].string); (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); if ((yyval.attr_info)->type == AttrType::CHARS) { @@ -2098,13 +4029,13 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2102 "yacc_sql.cpp" +#line 2106 "yacc_sql.cpp" break; - case 48: /* attr_def: ID type nullable_constraint */ -#line 461 "yacc_sql.y" + case 48: /* attr_def: ID type nullable_constraint */ +#line 464 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -2114,7 +4045,7 @@ YYLTYPE yylloc = yyloc_default; } else if ((yyval.attr_info)->type == AttrType::DATES) { (yyval.attr_info)->length = sizeof(int); } else if ((yyval.attr_info)->type == AttrType::CHARS) { - (yyval.attr_info)->length = 4; // miniob🀄AttrType::CHARS默认长度为4 + (yyval.attr_info)->length = 4; // miniob🀄AttrType::CHARS默认长度为4 } else if ((yyval.attr_info)->type == AttrType::TEXTS) { (yyval.attr_info)->length = 65535; } else { @@ -2126,81 +4057,93 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2130 "yacc_sql.cpp" +#line 2134 "yacc_sql.cpp" break; - case 49: /* nullable_constraint: NOT NULL_T */ -#line 488 "yacc_sql.y" + case 49: /* nullable_constraint: NOT NULL_T */ +#line 491 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2138 "yacc_sql.cpp" +#line 2142 "yacc_sql.cpp" break; - case 50: /* nullable_constraint: NULLABLE */ -#line 492 "yacc_sql.y" + case 50: /* nullable_constraint: NULLABLE */ +#line 495 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2146 "yacc_sql.cpp" +#line 2150 "yacc_sql.cpp" break; - case 51: /* nullable_constraint: NULL_T */ -#line 496 "yacc_sql.y" + case 51: /* nullable_constraint: NULL_T */ +#line 499 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2154 "yacc_sql.cpp" +#line 2158 "yacc_sql.cpp" break; - case 52: /* nullable_constraint: %empty */ -#line 500 "yacc_sql.y" + case 52: /* nullable_constraint: %empty */ +#line 503 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2162 "yacc_sql.cpp" +#line 2166 "yacc_sql.cpp" break; - case 53: /* type: INT_T */ -#line 506 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::INTS); } -#line 2168 "yacc_sql.cpp" + case 53: /* type: INT_T */ +#line 509 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::INTS); + } +#line 2172 "yacc_sql.cpp" break; - case 54: /* type: STRING_T */ -#line 507 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2174 "yacc_sql.cpp" + case 54: /* type: STRING_T */ +#line 510 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::CHARS); + } +#line 2178 "yacc_sql.cpp" break; - case 55: /* type: FLOAT_T */ -#line 508 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2180 "yacc_sql.cpp" + case 55: /* type: FLOAT_T */ +#line 511 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::FLOATS); + } +#line 2184 "yacc_sql.cpp" break; - case 56: /* type: DATE_T */ -#line 509 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::DATES); } -#line 2186 "yacc_sql.cpp" + case 56: /* type: DATE_T */ +#line 512 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::DATES); + } +#line 2190 "yacc_sql.cpp" break; - case 57: /* type: TEXT_T */ -#line 510 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2192 "yacc_sql.cpp" + case 57: /* type: TEXT_T */ +#line 513 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::TEXTS); + } +#line 2196 "yacc_sql.cpp" break; - case 58: /* type: VECTOR_T */ -#line 511 "yacc_sql.y" - { (yyval.number) = static_cast(AttrType::VECTORS); } -#line 2198 "yacc_sql.cpp" + case 58: /* type: VECTOR_T */ +#line 514 "yacc_sql.y" + { + (yyval.number) = static_cast(AttrType::VECTORS); + } +#line 2202 "yacc_sql.cpp" break; - case 59: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 516 "yacc_sql.y" + case 59: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 519 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -2208,143 +4151,143 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2212 "yacc_sql.cpp" +#line 2216 "yacc_sql.cpp" break; - case 60: /* values_list: LBRACE value_list RBRACE */ -#line 529 "yacc_sql.y" + case 60: /* values_list: LBRACE value_list RBRACE */ +#line 532 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2222 "yacc_sql.cpp" +#line 2226 "yacc_sql.cpp" break; - case 61: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 535 "yacc_sql.y" + case 61: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 538 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2231 "yacc_sql.cpp" +#line 2235 "yacc_sql.cpp" break; - case 62: /* value_list: value */ -#line 542 "yacc_sql.y" + case 62: /* value_list: value */ +#line 545 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2241 "yacc_sql.cpp" +#line 2245 "yacc_sql.cpp" break; - case 63: /* value_list: value_list COMMA value */ -#line 548 "yacc_sql.y" + case 63: /* value_list: value_list COMMA value */ +#line 551 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2250 "yacc_sql.cpp" +#line 2254 "yacc_sql.cpp" break; - case 64: /* value: nonnegative_value */ -#line 555 "yacc_sql.y" - { + case 64: /* value: nonnegative_value */ +#line 558 "yacc_sql.y" + { (yyval.value) = (yyvsp[0].value); } -#line 2258 "yacc_sql.cpp" +#line 2262 "yacc_sql.cpp" break; - case 65: /* value: '-' NUMBER */ -#line 558 "yacc_sql.y" - { + case 65: /* value: '-' NUMBER */ +#line 561 "yacc_sql.y" + { (yyval.value) = new Value(-(yyvsp[0].number)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } -#line 2267 "yacc_sql.cpp" +#line 2271 "yacc_sql.cpp" break; - case 66: /* value: '-' FLOAT */ -#line 562 "yacc_sql.y" - { + case 66: /* value: '-' FLOAT */ +#line 565 "yacc_sql.y" + { (yyval.value) = new Value(-(yyvsp[0].floats)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } -#line 2276 "yacc_sql.cpp" +#line 2280 "yacc_sql.cpp" break; - case 67: /* nonnegative_value: NUMBER */ -#line 569 "yacc_sql.y" - { + case 67: /* nonnegative_value: NUMBER */ +#line 572 "yacc_sql.y" + { (yyval.value) = new Value((yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2285 "yacc_sql.cpp" +#line 2289 "yacc_sql.cpp" break; - case 68: /* nonnegative_value: FLOAT */ -#line 573 "yacc_sql.y" - { + case 68: /* nonnegative_value: FLOAT */ +#line 576 "yacc_sql.y" + { (yyval.value) = new Value((yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2294 "yacc_sql.cpp" +#line 2298 "yacc_sql.cpp" break; - case 69: /* nonnegative_value: SSS */ -#line 577 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); + case 69: /* nonnegative_value: SSS */ +#line 580 "yacc_sql.y" + { + char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2305 "yacc_sql.cpp" +#line 2309 "yacc_sql.cpp" break; - case 70: /* nonnegative_value: NULL_T */ -#line 583 "yacc_sql.y" - { + case 70: /* nonnegative_value: NULL_T */ +#line 586 "yacc_sql.y" + { (yyval.value) = new Value(NullValue()); } -#line 2313 "yacc_sql.cpp" +#line 2317 "yacc_sql.cpp" break; - case 71: /* storage_format: %empty */ -#line 590 "yacc_sql.y" + case 71: /* storage_format: %empty */ +#line 593 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2321 "yacc_sql.cpp" +#line 2325 "yacc_sql.cpp" break; - case 72: /* storage_format: STORAGE FORMAT EQ ID */ -#line 594 "yacc_sql.y" + case 72: /* storage_format: STORAGE FORMAT EQ ID */ +#line 597 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2329 "yacc_sql.cpp" +#line 2333 "yacc_sql.cpp" break; - case 73: /* delete_stmt: DELETE FROM ID where */ -#line 601 "yacc_sql.y" + case 73: /* delete_stmt: DELETE FROM ID where */ +#line 604 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); } free((yyvsp[-1].string)); } -#line 2342 "yacc_sql.cpp" +#line 2346 "yacc_sql.cpp" break; - case 74: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 613 "yacc_sql.y" + case 74: /* update_stmt: UPDATE ID SET set_clauses where */ +#line 616 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -2353,76 +4296,81 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2357 "yacc_sql.cpp" +#line 2361 "yacc_sql.cpp" break; - case 75: /* set_clauses: setClause */ -#line 627 "yacc_sql.y" + case 75: /* set_clauses: setClause */ +#line 630 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2366 "yacc_sql.cpp" +#line 2370 "yacc_sql.cpp" break; - case 76: /* set_clauses: set_clauses COMMA setClause */ -#line 632 "yacc_sql.y" + case 76: /* set_clauses: set_clauses COMMA setClause */ +#line 635 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2374 "yacc_sql.cpp" +#line 2378 "yacc_sql.cpp" break; - case 77: /* setClause: ID EQ expression */ -#line 639 "yacc_sql.y" + case 77: /* setClause: ID EQ expression */ +#line 642 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2385 "yacc_sql.cpp" +#line 2389 "yacc_sql.cpp" break; - case 78: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by */ -#line 649 "yacc_sql.y" + case 78: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ +#line 652 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); - if ((yyvsp[-6].expression_list) != nullptr) { - (yyval.sql_node)->selection.expressions.swap(*(yyvsp[-6].expression_list)); - delete (yyvsp[-6].expression_list); + if ((yyvsp[-7].expression_list) != nullptr) { + (yyval.sql_node)->selection.expressions.swap(*(yyvsp[-7].expression_list)); + delete (yyvsp[-7].expression_list); } - if ((yyvsp[-4].relation_list) != nullptr) { - (yyval.sql_node)->selection.relations.swap(*(yyvsp[-4].relation_list)); - delete (yyvsp[-4].relation_list); + if ((yyvsp[-5].relation_list) != nullptr) { + (yyval.sql_node)->selection.relations.swap(*(yyvsp[-5].relation_list)); + delete (yyvsp[-5].relation_list); } (yyval.sql_node)->selection.conditions = nullptr; - if ((yyvsp[-3].expression) != nullptr) { - (yyval.sql_node)->selection.conditions = std::unique_ptr((yyvsp[-3].expression)); + if ((yyvsp[-4].expression) != nullptr) { + (yyval.sql_node)->selection.conditions = std::unique_ptr((yyvsp[-4].expression)); } - if ((yyvsp[-2].expression_list) != nullptr) { - (yyval.sql_node)->selection.group_by.swap(*(yyvsp[-2].expression_list)); - delete (yyvsp[-2].expression_list); + if ((yyvsp[-3].expression_list) != nullptr) { + (yyval.sql_node)->selection.group_by.swap(*(yyvsp[-3].expression_list)); + delete (yyvsp[-3].expression_list); } - if ((yyvsp[-1].expression) != nullptr) { - (yyval.sql_node)->selection.having_conditions = std::unique_ptr((yyvsp[-1].expression)); + if ((yyvsp[-2].expression) != nullptr) { + (yyval.sql_node)->selection.having_conditions = std::unique_ptr((yyvsp[-2].expression)); } - if ((yyvsp[0].orderby_list) != nullptr) { - (yyval.sql_node)->selection.order_by.swap(*(yyvsp[0].orderby_list)); - delete (yyvsp[0].orderby_list); + if ((yyvsp[-1].orderby_list) != nullptr) { + (yyval.sql_node)->selection.order_by.swap(*(yyvsp[-1].orderby_list)); + delete (yyvsp[-1].orderby_list); + } + + if ((yyvsp[0].limited_info) != nullptr) { + (yyval.sql_node)->selection.limit = std::make_unique(*(yyvsp[0].limited_info)); + delete (yyvsp[0].limited_info); } } -#line 2422 "yacc_sql.cpp" +#line 2431 "yacc_sql.cpp" break; - case 79: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 682 "yacc_sql.y" + case 79: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ +#line 690 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2436,7 +4384,8 @@ YYLTYPE yylloc = yyloc_default; } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); + ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -2444,7 +4393,8 @@ YYLTYPE yylloc = yyloc_default; if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -2452,39 +4402,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2456 "yacc_sql.cpp" +#line 2465 "yacc_sql.cpp" break; - case 80: /* calc_stmt: CALC expression_list */ -#line 715 "yacc_sql.y" + case 80: /* calc_stmt: CALC expression_list */ +#line 723 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2466 "yacc_sql.cpp" +#line 2475 "yacc_sql.cpp" break; - case 81: /* calc_stmt: SELECT expression_list */ -#line 721 "yacc_sql.y" + case 81: /* calc_stmt: SELECT expression_list */ +#line 729 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2476 "yacc_sql.cpp" +#line 2485 "yacc_sql.cpp" break; - case 82: /* expression_list: %empty */ -#line 729 "yacc_sql.y" - { + case 82: /* expression_list: %empty */ +#line 737 "yacc_sql.y" + { (yyval.expression_list) = new std::vector>; } -#line 2484 "yacc_sql.cpp" +#line 2493 "yacc_sql.cpp" break; - case 83: /* expression_list: expression alias */ -#line 733 "yacc_sql.y" + case 83: /* expression_list: expression alias */ +#line 741 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2493,11 +4443,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2497 "yacc_sql.cpp" +#line 2506 "yacc_sql.cpp" break; - case 84: /* expression_list: expression alias COMMA expression_list */ -#line 742 "yacc_sql.y" + case 84: /* expression_list: expression alias COMMA expression_list */ +#line 750 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2507,47 +4457,51 @@ YYLTYPE yylloc = yyloc_default; if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_alias((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2514 "yacc_sql.cpp" +#line 2523 "yacc_sql.cpp" break; - case 85: /* expression: expression '+' expression */ -#line 757 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 85: /* expression: expression '+' expression */ +#line 765 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2522 "yacc_sql.cpp" +#line 2531 "yacc_sql.cpp" break; - case 86: /* expression: expression '-' expression */ -#line 760 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 86: /* expression: expression '-' expression */ +#line 768 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2530 "yacc_sql.cpp" +#line 2539 "yacc_sql.cpp" break; - case 87: /* expression: expression '*' expression */ -#line 763 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 87: /* expression: expression '*' expression */ +#line 771 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2538 "yacc_sql.cpp" +#line 2547 "yacc_sql.cpp" break; - case 88: /* expression: expression '/' expression */ -#line 766 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 88: /* expression: expression '/' expression */ +#line 774 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2546 "yacc_sql.cpp" +#line 2555 "yacc_sql.cpp" break; - case 89: /* expression: LBRACE expression_list RBRACE */ -#line 769 "yacc_sql.y" - { + case 89: /* expression: LBRACE expression_list RBRACE */ +#line 777 "yacc_sql.y" + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -2555,469 +4509,518 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2559 "yacc_sql.cpp" +#line 2568 "yacc_sql.cpp" break; - case 90: /* expression: '-' expression */ -#line 777 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + case 90: /* expression: '-' expression */ +#line 785 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression( + ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2567 "yacc_sql.cpp" +#line 2576 "yacc_sql.cpp" break; - case 91: /* expression: nonnegative_value */ -#line 780 "yacc_sql.y" - { + case 91: /* expression: nonnegative_value */ +#line 788 "yacc_sql.y" + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2577 "yacc_sql.cpp" +#line 2586 "yacc_sql.cpp" break; - case 92: /* expression: rel_attr */ -#line 785 "yacc_sql.y" - { + case 92: /* expression: rel_attr */ +#line 793 "yacc_sql.y" + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2588 "yacc_sql.cpp" +#line 2597 "yacc_sql.cpp" break; - case 93: /* expression: '*' */ -#line 791 "yacc_sql.y" - { + case 93: /* expression: '*' */ +#line 799 "yacc_sql.y" + { (yyval.expression) = new StarExpr(); } -#line 2596 "yacc_sql.cpp" +#line 2605 "yacc_sql.cpp" break; - case 94: /* expression: ID DOT '*' */ -#line 794 "yacc_sql.y" - { + case 94: /* expression: ID DOT '*' */ +#line 802 "yacc_sql.y" + { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2604 "yacc_sql.cpp" +#line 2613 "yacc_sql.cpp" break; - case 95: /* expression: aggr_func_expr */ -#line 797 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + case 95: /* expression: aggr_func_expr */ +#line 805 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2612 "yacc_sql.cpp" +#line 2621 "yacc_sql.cpp" break; - case 96: /* expression: sub_query_expr */ -#line 800 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + case 96: /* expression: sub_query_expr */ +#line 808 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2620 "yacc_sql.cpp" +#line 2629 "yacc_sql.cpp" break; - case 97: /* alias: %empty */ -#line 807 "yacc_sql.y" - { + case 97: /* alias: %empty */ +#line 815 "yacc_sql.y" + { (yyval.string) = nullptr; } -#line 2628 "yacc_sql.cpp" +#line 2637 "yacc_sql.cpp" break; - case 98: /* alias: ID */ -#line 810 "yacc_sql.y" - { + case 98: /* alias: ID */ +#line 818 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2636 "yacc_sql.cpp" +#line 2645 "yacc_sql.cpp" break; - case 99: /* alias: AS ID */ -#line 813 "yacc_sql.y" - { + case 99: /* alias: AS ID */ +#line 821 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2644 "yacc_sql.cpp" +#line 2653 "yacc_sql.cpp" break; - case 100: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 819 "yacc_sql.y" + case 100: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ +#line 827 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2652 "yacc_sql.cpp" +#line 2661 "yacc_sql.cpp" break; - case 101: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 826 "yacc_sql.y" + case 101: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 834 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2660 "yacc_sql.cpp" +#line 2669 "yacc_sql.cpp" break; - case 102: /* rel_attr: ID */ -#line 832 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 102: /* rel_attr: ID */ +#line 840 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2670 "yacc_sql.cpp" +#line 2679 "yacc_sql.cpp" break; - case 103: /* rel_attr: ID DOT ID */ -#line 837 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 103: /* rel_attr: ID DOT ID */ +#line 845 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2682 "yacc_sql.cpp" +#line 2691 "yacc_sql.cpp" break; - case 104: /* relation: ID */ -#line 847 "yacc_sql.y" - { + case 104: /* relation: ID */ +#line 855 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2690 "yacc_sql.cpp" +#line 2699 "yacc_sql.cpp" break; - case 105: /* rel_list: relation alias */ -#line 853 "yacc_sql.y" - { + case 105: /* rel_list: relation alias */ +#line 861 "yacc_sql.y" + { (yyval.relation_list) = new std::vector(); - if(nullptr!=(yyvsp[0].string)){ - (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); + if (nullptr != (yyvsp[0].string)) { + (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); free((yyvsp[0].string)); - }else{ + } else { (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); } -#line 2705 "yacc_sql.cpp" +#line 2714 "yacc_sql.cpp" break; - case 106: /* rel_list: relation alias COMMA rel_list */ -#line 863 "yacc_sql.y" - { + case 106: /* rel_list: relation alias COMMA rel_list */ +#line 871 "yacc_sql.y" + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if(nullptr!=(yyvsp[-2].string)){ - (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); + if (nullptr != (yyvsp[-2].string)) { + (yyval.relation_list) + ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); free((yyvsp[-2].string)); - }else{ + } else { (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); } -#line 2724 "yacc_sql.cpp" +#line 2733 "yacc_sql.cpp" break; - case 107: /* join_clauses: relation ON condition */ -#line 881 "yacc_sql.y" + case 107: /* join_clauses: relation ON condition */ +#line 889 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2735 "yacc_sql.cpp" +#line 2744 "yacc_sql.cpp" break; - case 108: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 888 "yacc_sql.y" + case 108: /* join_clauses: relation ON condition INNER JOIN join_clauses */ +#line 896 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = + std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2747 "yacc_sql.cpp" +#line 2756 "yacc_sql.cpp" break; - case 109: /* where: %empty */ -#line 899 "yacc_sql.y" + case 109: /* where: %empty */ +#line 907 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2755 "yacc_sql.cpp" +#line 2764 "yacc_sql.cpp" break; - case 110: /* where: WHERE condition */ -#line 902 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + case 110: /* where: WHERE condition */ +#line 910 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); } -#line 2763 "yacc_sql.cpp" +#line 2772 "yacc_sql.cpp" break; - case 111: /* condition: expression comp_op expression */ -#line 909 "yacc_sql.y" + case 111: /* condition: expression comp_op expression */ +#line 917 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2771 "yacc_sql.cpp" +#line 2780 "yacc_sql.cpp" break; - case 112: /* condition: comp_op expression */ -#line 913 "yacc_sql.y" + case 112: /* condition: comp_op expression */ +#line 921 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); - (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); } -#line 2782 "yacc_sql.cpp" +#line 2791 "yacc_sql.cpp" break; - case 113: /* condition: condition AND condition */ -#line 920 "yacc_sql.y" + case 113: /* condition: condition AND condition */ +#line 928 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2790 "yacc_sql.cpp" +#line 2799 "yacc_sql.cpp" break; - case 114: /* condition: condition OR condition */ -#line 924 "yacc_sql.y" + case 114: /* condition: condition OR condition */ +#line 932 "yacc_sql.y" { - (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = + new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2798 "yacc_sql.cpp" +#line 2807 "yacc_sql.cpp" break; - case 115: /* comp_op: EQ */ -#line 930 "yacc_sql.y" - { (yyval.comp) = EQUAL_TO; } -#line 2804 "yacc_sql.cpp" + case 115: /* comp_op: EQ */ +#line 938 "yacc_sql.y" + { + (yyval.comp) = EQUAL_TO; + } +#line 2813 "yacc_sql.cpp" break; - case 116: /* comp_op: LT */ -#line 931 "yacc_sql.y" - { (yyval.comp) = LESS_THAN; } -#line 2810 "yacc_sql.cpp" + case 116: /* comp_op: LT */ +#line 939 "yacc_sql.y" + { + (yyval.comp) = LESS_THAN; + } +#line 2819 "yacc_sql.cpp" break; - case 117: /* comp_op: GT */ -#line 932 "yacc_sql.y" - { (yyval.comp) = GREAT_THAN; } -#line 2816 "yacc_sql.cpp" + case 117: /* comp_op: GT */ +#line 940 "yacc_sql.y" + { + (yyval.comp) = GREAT_THAN; + } +#line 2825 "yacc_sql.cpp" break; - case 118: /* comp_op: LE */ -#line 933 "yacc_sql.y" - { (yyval.comp) = LESS_EQUAL; } -#line 2822 "yacc_sql.cpp" + case 118: /* comp_op: LE */ +#line 941 "yacc_sql.y" + { + (yyval.comp) = LESS_EQUAL; + } +#line 2831 "yacc_sql.cpp" break; - case 119: /* comp_op: GE */ -#line 934 "yacc_sql.y" - { (yyval.comp) = GREAT_EQUAL; } -#line 2828 "yacc_sql.cpp" + case 119: /* comp_op: GE */ +#line 942 "yacc_sql.y" + { + (yyval.comp) = GREAT_EQUAL; + } +#line 2837 "yacc_sql.cpp" break; - case 120: /* comp_op: NE */ -#line 935 "yacc_sql.y" - { (yyval.comp) = NOT_EQUAL; } -#line 2834 "yacc_sql.cpp" + case 120: /* comp_op: NE */ +#line 943 "yacc_sql.y" + { + (yyval.comp) = NOT_EQUAL; + } +#line 2843 "yacc_sql.cpp" break; - case 121: /* comp_op: IS */ -#line 936 "yacc_sql.y" - { (yyval.comp) = IS_OP; } -#line 2840 "yacc_sql.cpp" + case 121: /* comp_op: IS */ +#line 944 "yacc_sql.y" + { + (yyval.comp) = IS_OP; + } +#line 2849 "yacc_sql.cpp" break; - case 122: /* comp_op: IS NOT */ -#line 937 "yacc_sql.y" - { (yyval.comp) = IS_NOT_OP; } -#line 2846 "yacc_sql.cpp" + case 122: /* comp_op: IS NOT */ +#line 945 "yacc_sql.y" + { + (yyval.comp) = IS_NOT_OP; + } +#line 2855 "yacc_sql.cpp" break; - case 123: /* comp_op: LIKE */ -#line 938 "yacc_sql.y" - { (yyval.comp) = LIKE_OP;} -#line 2852 "yacc_sql.cpp" + case 123: /* comp_op: LIKE */ +#line 946 "yacc_sql.y" + { + (yyval.comp) = LIKE_OP; + } +#line 2861 "yacc_sql.cpp" break; - case 124: /* comp_op: NOT LIKE */ -#line 939 "yacc_sql.y" - {(yyval.comp) = NOT_LIKE_OP;} -#line 2858 "yacc_sql.cpp" + case 124: /* comp_op: NOT LIKE */ +#line 947 "yacc_sql.y" + { + (yyval.comp) = NOT_LIKE_OP; + } +#line 2867 "yacc_sql.cpp" break; - case 125: /* comp_op: IN */ -#line 940 "yacc_sql.y" - { (yyval.comp) = IN_OP; } -#line 2864 "yacc_sql.cpp" + case 125: /* comp_op: IN */ +#line 948 "yacc_sql.y" + { + (yyval.comp) = IN_OP; + } +#line 2873 "yacc_sql.cpp" break; - case 126: /* comp_op: NOT IN */ -#line 941 "yacc_sql.y" - { (yyval.comp) = NOT_IN_OP; } -#line 2870 "yacc_sql.cpp" + case 126: /* comp_op: NOT IN */ +#line 949 "yacc_sql.y" + { + (yyval.comp) = NOT_IN_OP; + } +#line 2879 "yacc_sql.cpp" break; - case 127: /* comp_op: EXISTS */ -#line 942 "yacc_sql.y" - { (yyval.comp) = EXISTS_OP; } -#line 2876 "yacc_sql.cpp" + case 127: /* comp_op: EXISTS */ +#line 950 "yacc_sql.y" + { + (yyval.comp) = EXISTS_OP; + } +#line 2885 "yacc_sql.cpp" break; - case 128: /* comp_op: NOT EXISTS */ -#line 943 "yacc_sql.y" - { (yyval.comp) = NOT_EXISTS_OP; } -#line 2882 "yacc_sql.cpp" + case 128: /* comp_op: NOT EXISTS */ +#line 951 "yacc_sql.y" + { + (yyval.comp) = NOT_EXISTS_OP; + } +#line 2891 "yacc_sql.cpp" break; - case 129: /* opt_order_by: %empty */ -#line 948 "yacc_sql.y" + case 129: /* opt_order_by: %empty */ +#line 956 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2890 "yacc_sql.cpp" +#line 2899 "yacc_sql.cpp" break; - case 130: /* opt_order_by: ORDER BY sort_list */ -#line 952 "yacc_sql.y" + case 130: /* opt_order_by: ORDER BY sort_list */ +#line 960 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } -#line 2899 "yacc_sql.cpp" +#line 2908 "yacc_sql.cpp" break; - case 131: /* sort_list: sort_unit */ -#line 960 "yacc_sql.y" - { + case 131: /* sort_list: sort_unit */ +#line 968 "yacc_sql.y" + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } -#line 2908 "yacc_sql.cpp" + } +#line 2917 "yacc_sql.cpp" break; - case 132: /* sort_list: sort_unit COMMA sort_list */ -#line 965 "yacc_sql.y" - { + case 132: /* sort_list: sort_unit COMMA sort_list */ +#line 973 "yacc_sql.y" + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } -#line 2917 "yacc_sql.cpp" + } +#line 2926 "yacc_sql.cpp" break; - case 133: /* sort_unit: expression */ -#line 973 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + case 133: /* sort_unit: expression */ +#line 981 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2927 "yacc_sql.cpp" + } +#line 2936 "yacc_sql.cpp" break; - case 134: /* sort_unit: expression DESC */ -#line 979 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 134: /* sort_unit: expression DESC */ +#line 987 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } -#line 2937 "yacc_sql.cpp" + } +#line 2946 "yacc_sql.cpp" break; - case 135: /* sort_unit: expression ASC */ -#line 985 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 135: /* sort_unit: expression ASC */ +#line 993 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 2947 "yacc_sql.cpp" + } +#line 2956 "yacc_sql.cpp" break; - case 136: /* group_by: %empty */ -#line 994 "yacc_sql.y" + case 136: /* group_by: %empty */ +#line 1002 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2955 "yacc_sql.cpp" +#line 2964 "yacc_sql.cpp" break; - case 137: /* group_by: GROUP BY expression_list */ -#line 998 "yacc_sql.y" + case 137: /* group_by: GROUP BY expression_list */ +#line 1006 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2963 "yacc_sql.cpp" +#line 2972 "yacc_sql.cpp" break; - case 138: /* opt_having: %empty */ -#line 1005 "yacc_sql.y" + case 138: /* opt_having: %empty */ +#line 1013 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2971 "yacc_sql.cpp" +#line 2980 "yacc_sql.cpp" break; - case 139: /* opt_having: HAVING condition */ -#line 1009 "yacc_sql.y" + case 139: /* opt_having: HAVING condition */ +#line 1017 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2979 "yacc_sql.cpp" +#line 2988 "yacc_sql.cpp" + break; + + case 140: /* opt_limit: %empty */ +#line 1024 "yacc_sql.y" + { + (yyval.limited_info) = nullptr; + } +#line 2996 "yacc_sql.cpp" + break; + + case 141: /* opt_limit: LIMIT NUMBER */ +#line 1028 "yacc_sql.y" + { + (yyval.limited_info) = new LimitSqlNode(); + (yyval.limited_info)->number = (yyvsp[0].number); + } +#line 3005 "yacc_sql.cpp" break; - case 140: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 1016 "yacc_sql.y" + case 142: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ +#line 1036 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } -#line 2993 "yacc_sql.cpp" +#line 3019 "yacc_sql.cpp" break; - case 141: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1029 "yacc_sql.y" + case 143: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1049 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3002 "yacc_sql.cpp" +#line 3028 "yacc_sql.cpp" break; - case 142: /* set_variable_stmt: SET ID EQ value */ -#line 1037 "yacc_sql.y" + case 144: /* set_variable_stmt: SET ID EQ value */ +#line 1057 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3014 "yacc_sql.cpp" +#line 3040 "yacc_sql.cpp" break; +#line 3044 "yacc_sql.cpp" -#line 3018 "yacc_sql.cpp" - - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -3029,9 +5032,9 @@ YYLTYPE yylloc = yyloc_default; case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; *++yyvsp = yyval; @@ -3042,84 +5045,67 @@ YYLTYPE yylloc = yyloc_default; number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp - ? yytable[yyi] - : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; - /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) - { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } - } - yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; + if (!yyerrstatus) { + ++yynerrs; + { + yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) { + if (yymsg != yymsgbuf) + YYSTACK_FREE(yymsg); + yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); + if (yymsg) { + yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } else { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } } + yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } + } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; - } + if (yychar <= YYEOF) { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else { + yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; } + } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; - /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -3132,45 +5118,40 @@ YYLTYPE yylloc = yyloc_default; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK (yylen); + YYPOPSTACK(yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); + YY_STACK_PRINT(yyss, yyssp); yystate = *yyssp; goto yyerrlab1; - /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) { + yyn = yypact[yystate]; + if (!yypact_value_is_default(yyn)) { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + yystate = *yyssp; + YY_STACK_PRINT(yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3178,15 +5159,14 @@ YYLTYPE yylloc = yyloc_default; yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; - /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -3194,7 +5174,6 @@ YYLTYPE yylloc = yyloc_default; yyresult = 0; goto yyreturnlab; - /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -3202,53 +5181,48 @@ YYLTYPE yylloc = yyloc_default; yyresult = 1; goto yyreturnlab; - /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; - /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE(yychar); + yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK (1); - } + YYPOPSTACK(yylen); + YY_STACK_PRINT(yyss, yyssp); + while (yyssp != yyss) { + yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK(1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE (yyss); + YYSTACK_FREE(yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); + YYSTACK_FREE(yymsg); return yyresult; } -#line 1049 "yacc_sql.y" +#line 1069 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) { +int sql_parse(const char *s, ParsedSqlResult *sql_result) +{ yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index fdc48932..55c3dde2 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -91,39 +91,40 @@ extern int yydebug; NOT = 292, /* NOT */ UNIQUE = 293, /* UNIQUE */ NULL_T = 294, /* NULL_T */ - NULLABLE = 295, /* NULLABLE */ - HELP = 296, /* HELP */ - EXIT = 297, /* EXIT */ - DOT = 298, /* DOT */ - INTO = 299, /* INTO */ - VALUES = 300, /* VALUES */ - FROM = 301, /* FROM */ - WHERE = 302, /* WHERE */ - AND = 303, /* AND */ - OR = 304, /* OR */ - SET = 305, /* SET */ - ON = 306, /* ON */ - LOAD = 307, /* LOAD */ - DATA = 308, /* DATA */ - INFILE = 309, /* INFILE */ - EXPLAIN = 310, /* EXPLAIN */ - STORAGE = 311, /* STORAGE */ - FORMAT = 312, /* FORMAT */ - INNER = 313, /* INNER */ - JOIN = 314, /* JOIN */ - EQ = 315, /* EQ */ - LT = 316, /* LT */ - GT = 317, /* GT */ - LE = 318, /* LE */ - GE = 319, /* GE */ - NE = 320, /* NE */ - LIKE = 321, /* LIKE */ - IS = 322, /* IS */ - NUMBER = 323, /* NUMBER */ - FLOAT = 324, /* FLOAT */ - ID = 325, /* ID */ - SSS = 326, /* SSS */ - UMINUS = 327 /* UMINUS */ + LIMIT = 295, /* LIMIT */ + NULLABLE = 296, /* NULLABLE */ + HELP = 297, /* HELP */ + EXIT = 298, /* EXIT */ + DOT = 299, /* DOT */ + INTO = 300, /* INTO */ + VALUES = 301, /* VALUES */ + FROM = 302, /* FROM */ + WHERE = 303, /* WHERE */ + AND = 304, /* AND */ + OR = 305, /* OR */ + SET = 306, /* SET */ + ON = 307, /* ON */ + LOAD = 308, /* LOAD */ + DATA = 309, /* DATA */ + INFILE = 310, /* INFILE */ + EXPLAIN = 311, /* EXPLAIN */ + STORAGE = 312, /* STORAGE */ + FORMAT = 313, /* FORMAT */ + INNER = 314, /* INNER */ + JOIN = 315, /* JOIN */ + EQ = 316, /* EQ */ + LT = 317, /* LT */ + GT = 318, /* GT */ + LE = 319, /* LE */ + GE = 320, /* GE */ + NE = 321, /* NE */ + LIKE = 322, /* LIKE */ + IS = 323, /* IS */ + NUMBER = 324, /* NUMBER */ + FLOAT = 325, /* FLOAT */ + ID = 326, /* ID */ + SSS = 327, /* SSS */ + UMINUS = 328 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -132,7 +133,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 164 "yacc_sql.y" +#line 165 "yacc_sql.y" ParsedSqlNode * sql_node; Value * value; @@ -151,6 +152,7 @@ union YYSTYPE std::vector * relation_list; OrderBySqlNode * orderby_unit; std::vector * orderby_list; + LimitSqlNode * limited_info; char * string; int number; float floats; @@ -158,7 +160,7 @@ union YYSTYPE std::vector * index_attr_list; bool unique; -#line 162 "yacc_sql.hpp" +#line 164 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 0ccfcb18..6d186c50 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -131,6 +131,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, NOT UNIQUE NULL_T + LIMIT NULLABLE HELP EXIT @@ -179,6 +180,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, std::vector * relation_list; OrderBySqlNode * orderby_unit; std::vector * orderby_list; + LimitSqlNode * limited_info; char * string; int number; float floats; @@ -222,6 +224,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, %type sort_unit %type sort_list %type opt_order_by +%type opt_limit %type attr_list %type opt_unique %type calc_stmt @@ -645,7 +648,7 @@ setClause: ; select_stmt: - SELECT expression_list FROM rel_list where group_by opt_having opt_order_by + SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit { $$ = new ParsedSqlNode(SCF_SELECT); if ($2 != nullptr) { @@ -677,6 +680,11 @@ select_stmt: $$->selection.order_by.swap(*$8); delete $8; } + + if ($9 != nullptr) { + $$->selection.limit = std::make_unique(*$9); + delete $9; + } } | SELECT expression_list FROM relation INNER JOIN join_clauses where group_by { @@ -1011,6 +1019,18 @@ opt_having: } ; +opt_limit: + /* empty */ + { + $$ = nullptr; + } + | LIMIT NUMBER + { + $$ = new LimitSqlNode(); + $$->number = $2; + } + ; + load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID { diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 6541d44a..c713d906 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -115,6 +115,11 @@ RC SelectStmt::create( order_by_.push_back({std::move(order_by_expressions[i]), select_sql.order_by[i].is_asc}); } + int limit = -1; + if (select_sql.limit) { + limit = select_sql.limit->number; + } + // create filter statement in `where` statement FilterStmt *filter_stmt = nullptr; RC rc = FilterStmt::create(db, default_table, &table_map, select_sql.conditions, filter_stmt); @@ -139,6 +144,7 @@ RC SelectStmt::create( select_stmt->filter_stmt_ = filter_stmt; select_stmt->group_by_.swap(group_by_expressions); select_stmt->order_by_.swap(order_by_); + select_stmt->limit_ = limit; select_stmt->having_filter_stmt_ = having_filter_stmt; stmt = select_stmt; return RC::SUCCESS; diff --git a/src/observer/sql/stmt/select_stmt.h b/src/observer/sql/stmt/select_stmt.h index c243cd6f..0d91dbe5 100644 --- a/src/observer/sql/stmt/select_stmt.h +++ b/src/observer/sql/stmt/select_stmt.h @@ -51,6 +51,7 @@ class SelectStmt : public Stmt std::vector> &query_expressions() { return query_expressions_; } std::vector> &group_by() { return group_by_; } std::vector &order_by() { return order_by_; } + int limit() const { return limit_; } private: std::vector> query_expressions_; @@ -59,4 +60,5 @@ class SelectStmt : public Stmt std::vector> group_by_; std::vector order_by_; FilterStmt *having_filter_stmt_ = nullptr; + int limit_; }; diff --git a/src/observer/storage/buffer/double_write_buffer.cpp b/src/observer/storage/buffer/double_write_buffer.cpp index f1120455..73447382 100644 --- a/src/observer/storage/buffer/double_write_buffer.cpp +++ b/src/observer/storage/buffer/double_write_buffer.cpp @@ -32,9 +32,9 @@ struct DoubleWritePage public: DoubleWritePageKey key; - int32_t page_index = -1; /// 页面在double write buffer文件中的页索引 - bool valid = true; /// 表示页面是否有效,在页面被删除时,需要同时标记磁盘上的值。 - Page page; + int32_t page_index = -1; /// 页面在double write buffer文件中的页索引 + bool valid = true; /// 表示页面是否有效,在页面被删除时,需要同时标记磁盘上的值。 + Page page; static const int32_t SIZE; }; diff --git a/src/observer/storage/clog/log_buffer.h b/src/observer/storage/clog/log_buffer.h index 77cfe575..3bda71eb 100644 --- a/src/observer/storage/clog/log_buffer.h +++ b/src/observer/storage/clog/log_buffer.h @@ -68,7 +68,7 @@ class LogEntryBuffer LSN flushed_lsn() const { return flushed_lsn_.load(); } private: - mutex mutex_; /// 当前数据结构一定会在多线程中访问,所以强制使用有效的锁,而不是有条件生效的common::Mutex + mutex mutex_; /// 当前数据结构一定会在多线程中访问,所以强制使用有效的锁,而不是有条件生效的common::Mutex deque entries_; /// 日志缓冲区 atomic bytes_; /// 当前缓冲区中的日志数据大小 diff --git a/src/observer/storage/record/record_manager.h b/src/observer/storage/record/record_manager.h index 8228464a..a7bae40c 100644 --- a/src/observer/storage/record/record_manager.h +++ b/src/observer/storage/record/record_manager.h @@ -262,11 +262,11 @@ class RecordPageHandler protected: DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前操作的buffer pool(文件) RecordLogHandler log_handler_; ///< 当前操作的日志处理器 - Frame *frame_ = nullptr; ///< 当前操作页面关联的frame(frame的更多概念可以参考buffer pool和frame) - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 当前的操作是否都是只读的 - PageHeader *page_header_ = nullptr; ///< 当前页面上页面头 - char *bitmap_ = nullptr; ///< 当前页面上record分配状态信息bitmap内存起始位置 - StorageFormat storage_format_; + Frame *frame_ = nullptr; ///< 当前操作页面关联的frame(frame的更多概念可以参考buffer pool和frame) + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 当前的操作是否都是只读的 + PageHeader *page_header_ = nullptr; ///< 当前页面上页面头 + char *bitmap_ = nullptr; ///< 当前页面上record分配状态信息bitmap内存起始位置 + StorageFormat storage_format_; protected: friend class RecordPageIterator; @@ -424,7 +424,7 @@ class RecordFileHandler DiskBufferPool *disk_buffer_pool_ = nullptr; LogHandler *log_handler_ = nullptr; ///< 记录日志的处理器 unordered_set free_pages_; ///< 没有填充满的页面集合 - common::Mutex lock_; ///< 当编译时增加-DCONCURRENCY=ON 选项时,才会真正的支持并发 + common::Mutex lock_; ///< 当编译时增加-DCONCURRENCY=ON 选项时,才会真正的支持并发 StorageFormat storage_format_; TableMeta *table_meta_; }; @@ -484,7 +484,7 @@ class RecordFileScanner DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前访问的文件 Trx *trx_ = nullptr; ///< 当前是哪个事务在遍历 LogHandler *log_handler_ = nullptr; - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 BufferPoolIterator bp_iterator_; ///< 遍历buffer pool的所有页面 ConditionFilter *condition_filter_ = nullptr; ///< 过滤record @@ -522,7 +522,7 @@ class ChunkFileScanner DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前访问的文件 LogHandler *log_handler_ = nullptr; - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 BufferPoolIterator bp_iterator_; ///< 遍历buffer pool的所有页面 RecordPageHandler *record_page_handler_ = nullptr; ///< 处理文件某页面的记录 From d0381d16f6b477335fac0a4e82287cf16f055b2f Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 12:08:43 +0800 Subject: [PATCH 251/308] =?UTF-8?q?=E4=BF=AE=E6=94=B9order=20by=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/composite_tuple.cpp | 9 + src/observer/sql/expr/composite_tuple.h | 2 + src/observer/sql/expr/expression_iterator.h | 2 +- src/observer/sql/expr/expression_tuple.h | 9 + src/observer/sql/expr/tuple.h | 80 +- .../sql/operator/limit_logical_operator.cpp | 9 + .../sql/operator/limit_logical_operator.h | 30 + .../sql/operator/limit_physical_operator.cpp | 26 + .../sql/operator/limit_physical_operator.h | 40 + src/observer/sql/operator/logical_operator.h | 1 + .../sql/operator/order_by_logical_operator.h | 8 +- .../operator/order_by_physical_operator.cpp | 31 +- .../sql/operator/order_by_physical_operator.h | 10 +- src/observer/sql/operator/physical_operator.h | 1 + .../operator/project_physical_operator.cpp | 3 - .../sql/optimizer/logical_plan_generator.cpp | 11 +- .../sql/optimizer/physical_plan_generator.cpp | 33 +- .../sql/optimizer/physical_plan_generator.h | 4 +- src/observer/sql/parser/lex_sql.cpp | 5602 ++++++----------- src/observer/sql/parser/lex_sql.h | 244 +- src/observer/sql/parser/yacc_sql.cpp | 5050 +++++---------- 21 files changed, 3668 insertions(+), 7537 deletions(-) create mode 100644 src/observer/sql/operator/limit_logical_operator.cpp create mode 100644 src/observer/sql/operator/limit_logical_operator.h create mode 100644 src/observer/sql/operator/limit_physical_operator.cpp create mode 100644 src/observer/sql/operator/limit_physical_operator.h diff --git a/src/observer/sql/expr/composite_tuple.cpp b/src/observer/sql/expr/composite_tuple.cpp index 81095f53..94c82857 100644 --- a/src/observer/sql/expr/composite_tuple.cpp +++ b/src/observer/sql/expr/composite_tuple.cpp @@ -68,4 +68,13 @@ Tuple &CompositeTuple::tuple_at(size_t index) { ASSERT(index < tuples_.size(), "index=%d, tuples_size=%d", index, tuples_.size()); return *tuples_[index]; +} + +Tuple *CompositeTuple::copy() const +{ + CompositeTuple *copy = new CompositeTuple(); + for (auto &tuple : tuples_) { + copy->tuples_.emplace_back(tuple->copy()); + } + return copy; } \ No newline at end of file diff --git a/src/observer/sql/expr/composite_tuple.h b/src/observer/sql/expr/composite_tuple.h index d3e65577..23864bbe 100644 --- a/src/observer/sql/expr/composite_tuple.h +++ b/src/observer/sql/expr/composite_tuple.h @@ -45,6 +45,8 @@ class CompositeTuple : public Tuple void add_tuple(std::unique_ptr tuple); Tuple &tuple_at(size_t index); + Tuple *copy() const override; + private: std::vector> tuples_; }; \ No newline at end of file diff --git a/src/observer/sql/expr/expression_iterator.h b/src/observer/sql/expr/expression_iterator.h index 52cee4e6..14f7f3fa 100644 --- a/src/observer/sql/expr/expression_iterator.h +++ b/src/observer/sql/expr/expression_iterator.h @@ -28,4 +28,4 @@ class ExpressionIterator static RC condition_iterate_expr(std::unique_ptr &expr); static RC having_condition_iterate_expr( std::unique_ptr &expr, std::vector &bound_expressions); -}; \ No newline at end of file +}; diff --git a/src/observer/sql/expr/expression_tuple.h b/src/observer/sql/expr/expression_tuple.h index 21f34fdb..f37f4789 100644 --- a/src/observer/sql/expr/expression_tuple.h +++ b/src/observer/sql/expr/expression_tuple.h @@ -85,6 +85,15 @@ class ExpressionTuple : public Tuple return rc; } + Tuple *copy() const override + { + auto copy = new ExpressionTuple(expressions_); + if (child_tuple_) { + copy->child_tuple_ = child_tuple_->copy(); + } + return copy; + } + private: const std::vector &expressions_; const Tuple *child_tuple_ = nullptr; diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index 1aa2a850..449a8740 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -88,6 +88,8 @@ class Tuple virtual RC spec_at(int index, TupleCellSpec &spec) const = 0; + virtual Tuple *copy() const = 0; + /** * @brief 根据cell的描述,获取cell的值 * @@ -257,6 +259,17 @@ class RowTuple : public Tuple const Record &record() const { return *record_; } + Tuple *copy() const override + { + RowTuple *copy = new RowTuple(); + for (auto &spec_ : speces_) { + copy->speces_.push_back(new FieldExpr(*spec_)); + } + copy->record_ = new Record(record_->clone()); + copy->table_ = table_; + return copy; + } + private: Record *record_ = nullptr; const Table *table_ = nullptr; @@ -394,6 +407,14 @@ class ValueListTuple : public Tuple return RC::SUCCESS; } + Tuple *copy() const override + { + auto copy = new ValueListTuple; + copy->cells_ = cells_; + copy->specs_ = specs_; + return copy; + } + private: std::vector cells_; std::vector specs_; @@ -454,56 +475,19 @@ class JoinedTuple : public Tuple return right_->find_cell(spec, value); } -private: - Tuple *left_ = nullptr; - Tuple *right_ = nullptr; -}; - -/** - * @brief 一些常量值组成的Tuple,用于 orderby 算子中 - * @ingroup Tuple - */ -class SplicedTuple : public Tuple -{ -public: - SplicedTuple() = default; - virtual ~SplicedTuple() = default; - - void set_cells(const std::vector &cells) { cells_ = cells; } - - int cell_num() const override { return cells_.size(); } - - RC cell_at(int index, Value &cell) const override + Tuple *copy() const override { - if (index < 0 || index >= cell_num()) { - return RC::NOTFOUND; + auto copy = new JoinedTuple; + if (left_) { + copy->left_ = left_->copy(); } - - cell = cells_[index]; - return RC::SUCCESS; - } - - RC find_cell(const TupleCellSpec &spec, Value &cell) const override - { - assert(false); - return RC::INTERNAL; - } - - RC init(const std::vector &exprs) - { - exprs_ = exprs; - return RC::SUCCESS; - } - - RC spec_at(int index, TupleCellSpec &spec) const override - { - assert(false); - return RC::INTERNAL; + if (right_) { + copy->right_ = right_->copy(); + } + return copy; } - std::vector &exprs() { return exprs_; } - private: - std::vector cells_; - std::vector exprs_; -}; \ No newline at end of file + Tuple *left_ = nullptr; + Tuple *right_ = nullptr; +}; diff --git a/src/observer/sql/operator/limit_logical_operator.cpp b/src/observer/sql/operator/limit_logical_operator.cpp new file mode 100644 index 00000000..0ec55cae --- /dev/null +++ b/src/observer/sql/operator/limit_logical_operator.cpp @@ -0,0 +1,9 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ \ No newline at end of file diff --git a/src/observer/sql/operator/limit_logical_operator.h b/src/observer/sql/operator/limit_logical_operator.h new file mode 100644 index 00000000..cfee85d6 --- /dev/null +++ b/src/observer/sql/operator/limit_logical_operator.h @@ -0,0 +1,30 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +// +// Created by HuXin on 24-10-9. +// + +#pragma once + +#include "sql/operator/logical_operator.h" + +class LimitLogicalOperator : public LogicalOperator +{ +public: + LimitLogicalOperator(int limit) : limit_(limit) {} + + LogicalOperatorType type() const override { return LogicalOperatorType::LIMIT; } + + int limit() const { return limit_; } + +private: + int limit_; +}; \ No newline at end of file diff --git a/src/observer/sql/operator/limit_physical_operator.cpp b/src/observer/sql/operator/limit_physical_operator.cpp new file mode 100644 index 00000000..98afc1a4 --- /dev/null +++ b/src/observer/sql/operator/limit_physical_operator.cpp @@ -0,0 +1,26 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +#include "limit_physical_operator.h" + +RC LimitPhysicalOperator::open(Trx *trx) { return children_[0]->open(trx); } + +RC LimitPhysicalOperator::next() +{ + if (pos_ == limit_) { + return RC::RECORD_EOF; + } + pos_++; + return children_[0]->next(); +} + +RC LimitPhysicalOperator::close() { return children_[0]->close(); } + +Tuple *LimitPhysicalOperator::current_tuple() { return children_[0]->current_tuple(); } diff --git a/src/observer/sql/operator/limit_physical_operator.h b/src/observer/sql/operator/limit_physical_operator.h new file mode 100644 index 00000000..f0bddf43 --- /dev/null +++ b/src/observer/sql/operator/limit_physical_operator.h @@ -0,0 +1,40 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +// +// Created by HuXin on 24-10-9. +// + +#include "sql/operator/physical_operator.h" +#include "sql/expr/tuple.h" +#include +#include + +class LimitPhysicalOperator : public PhysicalOperator +{ +public: + LimitPhysicalOperator(int limit) : limit_(limit) {} + + virtual ~LimitPhysicalOperator() = default; + + PhysicalOperatorType type() const override { return PhysicalOperatorType::LIMIT; } + + int limit() const { return limit_; } + + RC open(Trx *trx) override; + RC next() override; + RC close() override; + + Tuple *current_tuple() override; + +private: + int pos_ = 0; + int limit_; +}; diff --git a/src/observer/sql/operator/logical_operator.h b/src/observer/sql/operator/logical_operator.h index 6a89a647..bc6a5bb5 100644 --- a/src/observer/sql/operator/logical_operator.h +++ b/src/observer/sql/operator/logical_operator.h @@ -43,6 +43,7 @@ enum class LogicalOperatorType EXPLAIN, ///< 查看执行计划 GROUP_BY, ///< 分组 ORDER_BY, ///< 排序 + LIMIT, ///< 限制输出 }; /** diff --git a/src/observer/sql/operator/order_by_logical_operator.h b/src/observer/sql/operator/order_by_logical_operator.h index 6b5a25cf..142fa540 100644 --- a/src/observer/sql/operator/order_by_logical_operator.h +++ b/src/observer/sql/operator/order_by_logical_operator.h @@ -23,8 +23,8 @@ See the Mulan PSL v2 for more details. */ class OrderByLogicalOperator : public LogicalOperator { public: - OrderByLogicalOperator(std::vector order_by, const std::vector exprs, int limit) - : order_by_(std::move(order_by)), exprs_(std::move(exprs)), limit_(limit) + OrderByLogicalOperator(std::vector order_by, const std::vector exprs) + : order_by_(std::move(order_by)), exprs_(std::move(exprs)) {} LogicalOperatorType type() const override { return LogicalOperatorType::ORDER_BY; } @@ -33,13 +33,9 @@ class OrderByLogicalOperator : public LogicalOperator std::vector &exprs() { return exprs_; } - int limit() const { return limit_; } - private: std::vector order_by_; /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr std::vector exprs_; - - int limit_ = -1; }; \ No newline at end of file diff --git a/src/observer/sql/operator/order_by_physical_operator.cpp b/src/observer/sql/operator/order_by_physical_operator.cpp index f72fa06a..61688398 100644 --- a/src/observer/sql/operator/order_by_physical_operator.cpp +++ b/src/observer/sql/operator/order_by_physical_operator.cpp @@ -14,15 +14,14 @@ See the Mulan PSL v2 for more details. */ #include "order_by_physical_operator.h" -OrderByPhysicalOperator::OrderByPhysicalOperator(vector order_by, vector exprs, int limit) - : order_by_(std::move(order_by)), exprs_(std::move(exprs)), limit_(limit) +OrderByPhysicalOperator::OrderByPhysicalOperator(vector order_by, vector exprs) + : order_by_(std::move(order_by)), exprs_(exprs) { vector expressions; expressions.reserve(exprs_.size()); for (auto &expr : exprs_) { expressions.push_back(expr); } - tuple_.init(expressions); order_and_field_line = order_list([this](const order_line &cells_a, const order_line &cells_b) -> bool { auto order_size = order_by_.size(); @@ -67,18 +66,7 @@ RC OrderByPhysicalOperator::fetch_and_sort_tables() order_by_line.emplace_back(cell); } - // 获取 select 字段的 values - vector field_line; - for (auto &expr : tuple_.exprs()) { - Value cell; - rc = expr->get_value(*children_[0]->current_tuple(), cell); - if (OB_FAIL(rc)) { - return rc; - } - field_line.emplace_back(cell); - } - - order_and_field_line.emplace(order_by_line, field_line); + order_and_field_line.emplace(order_by_line, children_[0]->current_tuple()->copy()); } return RC::SUCCESS; @@ -100,22 +88,15 @@ RC OrderByPhysicalOperator::open(Trx *trx) RC OrderByPhysicalOperator::next() { - RC rc = RC::SUCCESS; if (order_and_field_line.empty()) { return RC::RECORD_EOF; } - if (pop_count_ == limit_) { - return RC::RECORD_EOF; - } - - vector value = order_and_field_line.top().second; + tuple_ = order_and_field_line.top().second; order_and_field_line.pop(); - pop_count_++; - tuple_.set_cells(value); - return rc; + return RC::SUCCESS; } RC OrderByPhysicalOperator::close() { return children_[0]->close(); } -Tuple *OrderByPhysicalOperator::current_tuple() { return &tuple_; } +Tuple *OrderByPhysicalOperator::current_tuple() { return tuple_; } diff --git a/src/observer/sql/operator/order_by_physical_operator.h b/src/observer/sql/operator/order_by_physical_operator.h index 8bc73dea..c3440c04 100644 --- a/src/observer/sql/operator/order_by_physical_operator.h +++ b/src/observer/sql/operator/order_by_physical_operator.h @@ -14,13 +14,14 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/physical_operator.h" #include "sql/expr/tuple.h" +#include "sql/expr/expression_tuple.h" #include #include class OrderByPhysicalOperator : public PhysicalOperator { public: - OrderByPhysicalOperator(std::vector order_by, std::vector exprs, int limit); + OrderByPhysicalOperator(std::vector order_by, std::vector exprs); virtual ~OrderByPhysicalOperator() = default; @@ -43,13 +44,10 @@ class OrderByPhysicalOperator : public PhysicalOperator /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr std::vector exprs_; - SplicedTuple tuple_; - - using order_line = pair, vector>; + using order_line = pair, Tuple *>; using order_func = std::function; using order_list = std::priority_queue, order_func>; order_list order_and_field_line; - int pop_count_ = 0; - int limit_ = -1; + Tuple *tuple_; }; diff --git a/src/observer/sql/operator/physical_operator.h b/src/observer/sql/operator/physical_operator.h index 36828297..7184ef42 100644 --- a/src/observer/sql/operator/physical_operator.h +++ b/src/observer/sql/operator/physical_operator.h @@ -56,6 +56,7 @@ enum class PhysicalOperatorType GROUP_BY_VEC, AGGREGATE_VEC, ORDER_BY, + LIMIT, EXPR_VEC, }; diff --git a/src/observer/sql/operator/project_physical_operator.cpp b/src/observer/sql/operator/project_physical_operator.cpp index c73f5053..b3242de5 100644 --- a/src/observer/sql/operator/project_physical_operator.cpp +++ b/src/observer/sql/operator/project_physical_operator.cpp @@ -57,9 +57,6 @@ RC ProjectPhysicalOperator::close() Tuple *ProjectPhysicalOperator::current_tuple() { - if (children_[0]->type() == PhysicalOperatorType::ORDER_BY) { - return children_[0]->current_tuple(); - } tuple_.set_tuple(children_[0]->current_tuple()); return &tuple_; } diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 37e32fb4..df2e5ae1 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -27,6 +27,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/project_logical_operator.h" #include "sql/operator/table_get_logical_operator.h" #include "sql/operator/group_by_logical_operator.h" +#include "sql/operator/limit_logical_operator.h" #include "sql/stmt/calc_stmt.h" #include "sql/stmt/delete_stmt.h" @@ -178,6 +179,14 @@ RC LogicalPlanGenerator::create_plan(SelectStmt *select_stmt, unique_ptrlimit() != -1) { + unique_ptr limit_oper = std::make_unique(select_stmt->limit()); + if (*last_oper) { + limit_oper->add_child(std::move(*last_oper)); + } + *last_oper = std::move(limit_oper); + } + auto project_oper = make_unique(std::move(select_stmt->query_expressions())); if (*last_oper) { project_oper->add_child(std::move(*last_oper)); @@ -385,7 +394,7 @@ RC LogicalPlanGenerator::create_order_by_plan(SelectStmt *select_stmt, unique_pt } unique_ptr orderby_oper( - new OrderByLogicalOperator(std::move(select_stmt->order_by()), query_expressions, select_stmt->limit())); + new OrderByLogicalOperator(std::move(select_stmt->order_by()), query_expressions)); logical_operator = std::move(orderby_oper); return RC::SUCCESS; } diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index 87ac746f..89e8614f 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -26,6 +26,9 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/expr_vec_physical_operator.h" #include "sql/operator/group_by_vec_physical_operator.h" #include "sql/operator/index_scan_physical_operator.h" +#include "sql/operator/order_by_logical_operator.h" +#include "sql/operator/limit_logical_operator.h" +#include "sql/operator/limit_physical_operator.h" #include "sql/operator/insert_logical_operator.h" #include "sql/operator/insert_physical_operator.h" #include "sql/operator/join_logical_operator.h" @@ -98,6 +101,10 @@ RC PhysicalPlanGenerator::create(LogicalOperator &logical_operator, unique_ptr

(logical_operator), oper); } break; + case LogicalOperatorType::LIMIT: { + return create_plan(static_cast(logical_operator), oper); + } break; + default: { ASSERT(false, "unknown logical operator type"); return RC::INVALID_ARGUMENT; @@ -412,8 +419,8 @@ RC PhysicalPlanGenerator::create_plan(OrderByLogicalOperator &logical_oper, std: } } - OrderByPhysicalOperator *orderby_operator = new OrderByPhysicalOperator( - std::move(logical_oper.order_by()), std::move(logical_oper.exprs()), logical_oper.limit()); + OrderByPhysicalOperator *orderby_operator = + new OrderByPhysicalOperator(std::move(logical_oper.order_by()), std::move(logical_oper.exprs())); if (child_phy_oper) { orderby_operator->add_child(std::move(child_phy_oper)); } @@ -422,6 +429,28 @@ RC PhysicalPlanGenerator::create_plan(OrderByLogicalOperator &logical_oper, std: return rc; } +RC PhysicalPlanGenerator::create_plan(LimitLogicalOperator &logical_oper, unique_ptr &oper) +{ + vector> &child_opers = logical_oper.children(); + unique_ptr child_phy_oper; + + RC rc = RC::SUCCESS; + if (!child_opers.empty()) { + LogicalOperator *child_oper = child_opers.front().get(); + rc = create(*child_oper, child_phy_oper); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to create orderby logical operator's child physical operator. rc=%s", strrc(rc)); + return rc; + } + } + + LimitPhysicalOperator *limit_oper = new LimitPhysicalOperator(logical_oper.limit()); + limit_oper->add_child(std::move(child_phy_oper)); + + oper = unique_ptr(limit_oper); + return rc; +} + RC PhysicalPlanGenerator::create_vec_plan(TableGetLogicalOperator &table_get_oper, unique_ptr &oper) { vector> &predicates = table_get_oper.predicates(); diff --git a/src/observer/sql/optimizer/physical_plan_generator.h b/src/observer/sql/optimizer/physical_plan_generator.h index 3e0137cb..3aa88326 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.h +++ b/src/observer/sql/optimizer/physical_plan_generator.h @@ -17,7 +17,6 @@ See the Mulan PSL v2 for more details. */ #include "common/rc.h" #include "sql/operator/logical_operator.h" #include "sql/operator/physical_operator.h" -#include "sql/operator/order_by_logical_operator.h" class TableGetLogicalOperator; class PredicateLogicalOperator; @@ -29,6 +28,8 @@ class ExplainLogicalOperator; class JoinLogicalOperator; class CalcLogicalOperator; class GroupByLogicalOperator; +class OrderByLogicalOperator; +class LimitLogicalOperator; /** * @brief 物理计划生成器 @@ -57,6 +58,7 @@ class PhysicalPlanGenerator static RC create_plan(CalcLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_plan(GroupByLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_plan(OrderByLogicalOperator &logical_oper, std::unique_ptr &oper); + static RC create_plan(LimitLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_vec_plan(ProjectLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_vec_plan(TableGetLogicalOperator &logical_oper, std::unique_ptr &oper); static RC create_vec_plan(GroupByLogicalOperator &logical_oper, std::unique_ptr &oper); diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 9f8f2525..f5effa97 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,21 +8,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -75,62 +77,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -154,12 +156,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -187,7 +189,7 @@ typedef void *yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin, yyscanner) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -205,7 +207,7 @@ typedef void *yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -220,85 +222,88 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -307,55 +312,59 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -static void yyensure_buffer_stack(yyscan_t yyscanner); -static void yy_load_buffer_state(yyscan_t yyscanner); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -363,2521 +372,325 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state(yyscan_t yyscanner); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); -static int yy_get_next_buffer(yyscan_t yyscanner); -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t)(yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 80 #define YY_END_OF_BUFFER 81 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info -{ - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[235] = {0, - 0, - 0, - 0, - 0, - 81, - 79, - 1, - 2, - 79, - 79, - 79, - 59, - 60, - 75, - 73, - 61, - 74, - 6, - 76, - 3, - 5, - 66, - 62, - 68, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 80, - 65, - 0, - 77, - 0, - 78, - 0, - 3, - 63, - 64, - 67, - 72, - 72, - 72, - 51, - 72, - 50, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 53, - 70, - 72, - 72, - 72, - 72, - 72, - 15, - 23, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 4, - 22, - 52, - 72, - - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 33, - 72, - 72, - 72, - 72, - 69, - 72, - 72, - 72, - 72, - 29, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 19, - 34, - 72, - 72, - 43, - 36, - 72, - 9, - 11, - 72, - 7, - 72, - 72, - 72, - 20, - 72, - 72, - 8, - 72, - 72, - 72, - 72, - 25, - 58, - 71, - 72, - 42, - 40, - 72, - 72, - 72, - 16, - 72, - 17, - 72, - 37, - 72, - 72, - 72, - 72, - 72, - 30, - 72, - 72, - 72, - 72, - 72, - 35, - 72, - 46, - 72, - 14, - 72, - 57, - 72, - 47, - 72, - 49, - - 72, - 72, - 72, - 12, - 72, - 72, - 72, - 72, - 21, - 31, - 10, - 27, - 54, - 72, - 56, - 48, - 44, - 24, - 72, - 72, - 18, - 72, - 13, - 39, - 28, - 26, - 38, - 45, - 72, - 72, - 55, - 41, - 32, - 0}; - -static const YY_CHAR yy_ec[256] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 3, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 4, - 5, - 1, - 1, - 1, - 1, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 1, - 16, - 17, - 18, - 19, - 1, - 1, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 1, - 1, - 1, - 1, - 45, - 1, - 46, - 47, - 48, - 49, - - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 45, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1}; - -static const YY_CHAR yy_meta[71] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2}; - -static const flex_int16_t yy_base[240] = {0, - 0, - 0, - 0, - 0, - 639, - 640, - 640, - 640, - 620, - 632, - 630, - 640, - 640, - 640, - 640, - 640, - 640, - 640, - 640, - 58, - 640, - 56, - 640, - 617, - 57, - 61, - 62, - 63, - 64, - 83, - 65, - 73, - 91, - 76, - 619, - 117, - 119, - 115, - 103, - 142, - 134, - 129, - 141, - 120, - 640, - 640, - 628, - 640, - 626, - 640, - 616, - 71, - 640, - 640, - 640, - 0, - 615, - 89, - 79, - 157, - 614, - 145, - 155, - 167, - 174, - 178, - 182, - 181, - 188, - 185, - 189, - 193, - 195, - 127, - 190, - 241, - 613, - 203, - 229, - 191, - 219, - 220, - 612, - 199, - 239, - 247, - 235, - 248, - 250, - 252, - 225, - 260, - 266, - 245, - 276, - 286, - 611, - 610, - 609, - 288, - - 296, - 256, - 298, - 302, - 305, - 308, - 306, - 292, - 311, - 316, - 318, - 320, - 325, - 319, - 346, - 328, - 322, - 351, - 345, - 347, - 350, - 353, - 366, - 352, - 373, - 608, - 362, - 367, - 372, - 377, - 607, - 379, - 383, - 387, - 384, - 389, - 396, - 393, - 403, - 392, - 399, - 409, - 599, - 598, - 410, - 411, - 596, - 595, - 422, - 594, - 593, - 433, - 592, - 425, - 434, - 436, - 591, - 418, - 419, - 589, - 440, - 429, - 444, - 448, - 588, - 585, - 584, - 450, - 583, - 455, - 451, - 459, - 462, - 578, - 475, - 577, - 476, - 576, - 452, - 478, - 479, - 482, - 481, - 575, - 489, - 498, - 508, - 487, - 505, - 573, - 497, - 570, - 493, - 569, - 515, - 566, - 522, - 563, - 519, - 559, - - 526, - 529, - 512, - 509, - 545, - 552, - 537, - 520, - 535, - 415, - 408, - 355, - 330, - 538, - 326, - 324, - 282, - 257, - 548, - 534, - 223, - 562, - 221, - 218, - 217, - 215, - 213, - 152, - 565, - 540, - 126, - 124, - 88, - 640, - 615, - 617, - 619, - 90, - 79}; - -static const flex_int16_t yy_def[240] = {0, - 234, - 1, - 235, - 235, - 234, - 234, - 234, - 234, - 234, - 236, - 237, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 234, - 234, - 236, - 234, - 237, - 234, - 234, - 234, - 234, - 234, - 234, - 239, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 234, - 238, - 238, - 238, - - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 238, - 0, - 234, - 234, - 234, - 234, - 234}; - -static const flex_int16_t yy_nxt[711] = {0, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 35, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 51, - 56, - 52, - 53, - 54, - 56, - 56, - 56, - 56, - 56, - 56, - 62, - 66, - 51, - 60, - 52, - 67, - 56, - 63, - 58, - 56, - 57, - 74, - 56, - 59, - 64, - 75, - 56, - 65, - 68, - - 99, - 73, - 56, - 56, - 61, - 56, - 69, - 62, - 66, - 78, - 60, - 98, - 67, - 70, - 63, - 58, - 71, - 56, - 74, - 72, - 59, - 64, - 75, - 76, - 65, - 68, - 99, - 73, - 77, - 56, - 61, - 56, - 69, - 56, - 56, - 78, - 85, - 98, - 56, - 70, - 56, - 56, - 71, - 56, - 79, - 72, - 96, - 83, - 56, - 76, - 80, - 84, - 81, - 90, - 77, - 56, - 56, - 91, - 82, - 56, - 94, - 92, - 85, - 93, - 95, - 86, - 56, - 115, - 87, - 56, - 79, - 56, - 96, - 83, - 102, - 101, - 80, - 84, - 81, - 90, - 88, - 56, - 100, - 91, - 82, - 89, - 94, - 92, - 56, - 93, - 95, - 86, - 56, - 115, - 87, - 56, - 56, - 104, - 103, - 56, - - 102, - 101, - 56, - 56, - 56, - 56, - 88, - 56, - 100, - 56, - 125, - 89, - 106, - 56, - 108, - 109, - 105, - 56, - 111, - 107, - 116, - 128, - 110, - 104, - 103, - 112, - 113, - 56, - 114, - 56, - 122, - 56, - 56, - 56, - 56, - 56, - 125, - 56, - 106, - 56, - 108, - 109, - 105, - 56, - 111, - 107, - 116, - 128, - 110, - 56, - 127, - 112, - 113, - 56, - 114, - 56, - 122, - 126, - 123, - 56, - 124, - 56, - 56, - 117, - 56, - 118, - 56, - 136, - 132, - 129, - 56, - 56, - 135, - 119, - 56, - 139, - 127, - 130, - 120, - 121, - 56, - 133, - 134, - 126, - 123, - 131, - 124, - 137, - 138, - 117, - 56, - 118, - 144, - 136, - 132, - 129, - 56, - 140, - 135, - 119, - - 56, - 139, - 56, - 130, - 120, - 121, - 56, - 133, - 134, - 141, - 56, - 131, - 56, - 137, - 138, - 142, - 56, - 143, - 144, - 56, - 56, - 146, - 56, - 140, - 147, - 56, - 151, - 150, - 148, - 145, - 56, - 149, - 56, - 56, - 56, - 141, - 56, - 155, - 56, - 56, - 56, - 142, - 56, - 143, - 56, - 161, - 154, - 146, - 152, - 153, - 147, - 156, - 151, - 150, - 148, - 145, - 157, - 149, - 158, - 56, - 56, - 56, - 160, - 155, - 56, - 56, - 56, - 56, - 163, - 56, - 164, - 161, - 154, - 159, - 152, - 153, - 56, - 156, - 162, - 168, - 56, - 56, - 157, - 165, - 158, - 166, - 56, - 56, - 160, - 167, - 171, - 56, - 170, - 56, - 163, - 169, - 164, - 56, - 56, - 159, - - 173, - 56, - 172, - 56, - 162, - 168, - 56, - 56, - 176, - 165, - 56, - 166, - 180, - 56, - 177, - 167, - 171, - 56, - 170, - 175, - 174, - 169, - 56, - 56, - 56, - 56, - 173, - 178, - 172, - 56, - 182, - 179, - 56, - 56, - 176, - 183, - 56, - 185, - 180, - 56, - 177, - 184, - 181, - 56, - 189, - 175, - 174, - 56, - 56, - 186, - 56, - 193, - 192, - 178, - 56, - 191, - 182, - 179, - 56, - 195, - 187, - 183, - 56, - 185, - 56, - 56, - 56, - 184, - 181, - 56, - 189, - 188, - 190, - 56, - 199, - 186, - 56, - 193, - 192, - 201, - 196, - 191, - 194, - 202, - 197, - 195, - 187, - 200, - 198, - 56, - 56, - 205, - 56, - 56, - 203, - 56, - 56, - 188, - 190, - 204, - - 199, - 56, - 207, - 56, - 209, - 201, - 196, - 56, - 194, - 202, - 197, - 56, - 56, - 200, - 198, - 208, - 206, - 205, - 216, - 56, - 203, - 211, - 56, - 56, - 213, - 204, - 56, - 210, - 207, - 56, - 209, - 212, - 214, - 56, - 56, - 215, - 56, - 222, - 217, - 219, - 56, - 208, - 206, - 56, - 216, - 220, - 223, - 211, - 56, - 56, - 213, - 56, - 56, - 210, - 56, - 230, - 227, - 212, - 214, - 56, - 218, - 215, - 56, - 222, - 217, - 219, - 56, - 221, - 224, - 233, - 228, - 220, - 223, - 56, - 226, - 225, - 56, - 56, - 229, - 56, - 56, - 230, - 227, - 56, - 56, - 231, - 218, - 56, - 232, - 56, - 56, - 56, - 56, - 221, - 224, - 233, - 228, - 56, - 56, - 56, - - 226, - 225, - 56, - 56, - 229, - 56, - 56, - 56, - 56, - 56, - 56, - 231, - 56, - 56, - 232, - 45, - 45, - 47, - 47, - 49, - 49, - 56, - 56, - 56, - 56, - 97, - 56, - 56, - 56, - 56, - 97, - 50, - 48, - 56, - 55, - 50, - 48, - 46, - 234, - 5, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234}; - -static const flex_int16_t yy_chk[711] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 20, - 25, - 20, - 22, - 22, - 26, - 27, - 28, - 29, - 31, - 239, - 27, - 28, - 52, - 26, - 52, - 28, - 32, - 27, - 25, - 34, - 238, - 32, - 59, - 25, - 27, - 32, - 30, - 27, - 28, - - 59, - 31, - 233, - 58, - 26, - 33, - 29, - 27, - 28, - 34, - 26, - 58, - 28, - 30, - 27, - 25, - 30, - 39, - 32, - 30, - 25, - 27, - 32, - 33, - 27, - 28, - 59, - 31, - 33, - 38, - 26, - 36, - 29, - 37, - 44, - 34, - 39, - 58, - 232, - 30, - 231, - 74, - 30, - 42, - 36, - 30, - 44, - 38, - 41, - 33, - 36, - 38, - 37, - 41, - 33, - 43, - 40, - 41, - 37, - 62, - 43, - 42, - 39, - 42, - 43, - 40, - 228, - 74, - 40, - 63, - 36, - 60, - 44, - 38, - 63, - 62, - 36, - 38, - 37, - 41, - 40, - 64, - 60, - 41, - 37, - 40, - 43, - 42, - 65, - 42, - 43, - 40, - 66, - 74, - 40, - 68, - 67, - 65, - 64, - 70, - - 63, - 62, - 69, - 71, - 75, - 80, - 40, - 72, - 60, - 73, - 80, - 40, - 67, - 84, - 68, - 69, - 66, - 78, - 70, - 67, - 75, - 84, - 69, - 65, - 64, - 71, - 72, - 227, - 73, - 226, - 78, - 225, - 224, - 81, - 82, - 223, - 80, - 221, - 67, - 91, - 68, - 69, - 66, - 79, - 70, - 67, - 75, - 84, - 69, - 87, - 82, - 71, - 72, - 85, - 73, - 76, - 78, - 81, - 79, - 94, - 79, - 86, - 88, - 76, - 89, - 76, - 90, - 91, - 87, - 85, - 102, - 218, - 90, - 76, - 92, - 94, - 82, - 86, - 76, - 76, - 93, - 88, - 89, - 81, - 79, - 86, - 79, - 92, - 93, - 76, - 95, - 76, - 102, - 91, - 87, - 85, - 217, - 95, - 90, - 76, - - 96, - 94, - 100, - 86, - 76, - 76, - 108, - 88, - 89, - 96, - 101, - 86, - 103, - 92, - 93, - 100, - 104, - 101, - 102, - 105, - 107, - 104, - 106, - 95, - 105, - 109, - 108, - 107, - 105, - 103, - 110, - 106, - 111, - 114, - 112, - 96, - 117, - 111, - 216, - 113, - 215, - 100, - 116, - 101, - 213, - 117, - 110, - 104, - 109, - 109, - 105, - 112, - 108, - 107, - 105, - 103, - 113, - 106, - 114, - 119, - 115, - 120, - 116, - 111, - 121, - 118, - 124, - 122, - 119, - 212, - 120, - 117, - 110, - 115, - 109, - 109, - 127, - 112, - 118, - 124, - 123, - 128, - 113, - 121, - 114, - 122, - 129, - 125, - 116, - 123, - 128, - 130, - 127, - 132, - 119, - 125, - 120, - 133, - 135, - 115, - - 130, - 134, - 129, - 136, - 118, - 124, - 140, - 138, - 134, - 121, - 137, - 122, - 138, - 141, - 135, - 123, - 128, - 139, - 127, - 133, - 132, - 125, - 211, - 142, - 145, - 146, - 130, - 136, - 129, - 210, - 140, - 137, - 158, - 159, - 134, - 141, - 149, - 145, - 138, - 154, - 135, - 142, - 139, - 162, - 154, - 133, - 132, - 152, - 155, - 146, - 156, - 159, - 158, - 136, - 161, - 156, - 140, - 137, - 163, - 162, - 149, - 141, - 164, - 145, - 168, - 171, - 179, - 142, - 139, - 170, - 154, - 152, - 155, - 172, - 170, - 146, - 173, - 159, - 158, - 172, - 163, - 156, - 161, - 173, - 164, - 162, - 149, - 171, - 168, - 175, - 177, - 179, - 180, - 181, - 175, - 183, - 182, - 152, - 155, - 177, - - 170, - 188, - 181, - 185, - 183, - 172, - 163, - 193, - 161, - 173, - 164, - 191, - 186, - 171, - 168, - 182, - 180, - 179, - 193, - 189, - 175, - 186, - 187, - 204, - 188, - 177, - 203, - 185, - 181, - 195, - 183, - 187, - 189, - 199, - 208, - 191, - 197, - 203, - 195, - 199, - 201, - 182, - 180, - 202, - 193, - 201, - 204, - 186, - 220, - 209, - 188, - 207, - 214, - 185, - 230, - 220, - 208, - 187, - 189, - 205, - 197, - 191, - 219, - 203, - 195, - 199, - 206, - 202, - 205, - 230, - 214, - 201, - 204, - 200, - 207, - 206, - 222, - 198, - 219, - 229, - 196, - 220, - 208, - 194, - 192, - 222, - 197, - 190, - 229, - 184, - 178, - 176, - 174, - 202, - 205, - 230, - 214, - 169, - 167, - 166, - - 207, - 206, - 165, - 160, - 219, - 157, - 153, - 151, - 150, - 148, - 147, - 222, - 144, - 143, - 229, - 235, - 235, - 236, - 236, - 237, - 237, - 131, - 126, - 99, - 98, - 97, - 83, - 77, - 61, - 57, - 51, - 49, - 47, - 35, - 24, - 11, - 10, - 9, - 5, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234, - 234}; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[235] = + { 0, + 0, 0, 0, 0, 81, 79, 1, 2, 79, 79, + 79, 59, 60, 75, 73, 61, 74, 6, 76, 3, + 5, 66, 62, 68, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 80, 65, 0, 77, 0, 78, + 0, 3, 63, 64, 67, 72, 72, 72, 51, 72, + 50, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 53, 70, 72, 72, 72, + 72, 72, 15, 23, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 4, 22, 52, 72, + + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 33, 72, 72, 72, 72, 69, 72, 72, 72, 72, + 29, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 19, 34, 72, 72, 43, 36, 72, 9, + 11, 72, 7, 72, 72, 72, 20, 72, 72, 8, + 72, 72, 72, 72, 25, 58, 71, 72, 42, 40, + 72, 72, 72, 16, 72, 17, 72, 37, 72, 72, + 72, 72, 72, 30, 72, 72, 72, 72, 72, 35, + 72, 46, 72, 14, 72, 57, 72, 47, 72, 49, + + 72, 72, 72, 12, 72, 72, 72, 72, 21, 31, + 10, 27, 54, 72, 56, 48, 44, 24, 72, 72, + 18, 72, 13, 39, 28, 26, 38, 45, 72, 72, + 55, 41, 32, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, + 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, + + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 45, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[71] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + } ; + +static const flex_int16_t yy_base[240] = + { 0, + 0, 0, 0, 0, 639, 640, 640, 640, 620, 632, + 630, 640, 640, 640, 640, 640, 640, 640, 640, 58, + 640, 56, 640, 617, 57, 61, 62, 63, 64, 83, + 65, 73, 91, 76, 619, 117, 119, 115, 103, 142, + 134, 129, 141, 120, 640, 640, 628, 640, 626, 640, + 616, 71, 640, 640, 640, 0, 615, 89, 79, 157, + 614, 145, 155, 167, 174, 178, 182, 181, 188, 185, + 189, 193, 195, 127, 190, 241, 613, 203, 229, 191, + 219, 220, 612, 199, 239, 247, 235, 248, 250, 252, + 225, 260, 266, 245, 276, 286, 611, 610, 609, 288, + + 296, 256, 298, 302, 305, 308, 306, 292, 311, 316, + 318, 320, 325, 319, 346, 328, 322, 351, 345, 347, + 350, 353, 366, 352, 373, 608, 362, 367, 372, 377, + 607, 379, 383, 387, 384, 389, 396, 393, 403, 392, + 399, 409, 599, 598, 410, 411, 596, 595, 422, 594, + 593, 433, 592, 425, 434, 436, 591, 418, 419, 589, + 440, 429, 444, 448, 588, 585, 584, 450, 583, 455, + 451, 459, 462, 578, 475, 577, 476, 576, 452, 478, + 479, 482, 481, 575, 489, 498, 508, 487, 505, 573, + 497, 570, 493, 569, 515, 566, 522, 563, 519, 559, + + 526, 529, 512, 509, 545, 552, 537, 520, 535, 415, + 408, 355, 330, 538, 326, 324, 282, 257, 548, 534, + 223, 562, 221, 218, 217, 215, 213, 152, 565, 540, + 126, 124, 88, 640, 615, 617, 619, 90, 79 + } ; + +static const flex_int16_t yy_def[240] = + { 0, + 234, 1, 235, 235, 234, 234, 234, 234, 234, 236, + 237, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 234, 234, 236, 234, 237, 234, + 234, 234, 234, 234, 234, 239, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 234, 238, 238, 238, + + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 0, 234, 234, 234, 234, 234 + } ; + +static const flex_int16_t yy_nxt[711] = + { 0, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, + 43, 44, 35, 35, 35, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, + 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, + 51, 56, 52, 53, 54, 56, 56, 56, 56, 56, + 56, 62, 66, 51, 60, 52, 67, 56, 63, 58, + 56, 57, 74, 56, 59, 64, 75, 56, 65, 68, + + 99, 73, 56, 56, 61, 56, 69, 62, 66, 78, + 60, 98, 67, 70, 63, 58, 71, 56, 74, 72, + 59, 64, 75, 76, 65, 68, 99, 73, 77, 56, + 61, 56, 69, 56, 56, 78, 85, 98, 56, 70, + 56, 56, 71, 56, 79, 72, 96, 83, 56, 76, + 80, 84, 81, 90, 77, 56, 56, 91, 82, 56, + 94, 92, 85, 93, 95, 86, 56, 115, 87, 56, + 79, 56, 96, 83, 102, 101, 80, 84, 81, 90, + 88, 56, 100, 91, 82, 89, 94, 92, 56, 93, + 95, 86, 56, 115, 87, 56, 56, 104, 103, 56, + + 102, 101, 56, 56, 56, 56, 88, 56, 100, 56, + 125, 89, 106, 56, 108, 109, 105, 56, 111, 107, + 116, 128, 110, 104, 103, 112, 113, 56, 114, 56, + 122, 56, 56, 56, 56, 56, 125, 56, 106, 56, + 108, 109, 105, 56, 111, 107, 116, 128, 110, 56, + 127, 112, 113, 56, 114, 56, 122, 126, 123, 56, + 124, 56, 56, 117, 56, 118, 56, 136, 132, 129, + 56, 56, 135, 119, 56, 139, 127, 130, 120, 121, + 56, 133, 134, 126, 123, 131, 124, 137, 138, 117, + 56, 118, 144, 136, 132, 129, 56, 140, 135, 119, + + 56, 139, 56, 130, 120, 121, 56, 133, 134, 141, + 56, 131, 56, 137, 138, 142, 56, 143, 144, 56, + 56, 146, 56, 140, 147, 56, 151, 150, 148, 145, + 56, 149, 56, 56, 56, 141, 56, 155, 56, 56, + 56, 142, 56, 143, 56, 161, 154, 146, 152, 153, + 147, 156, 151, 150, 148, 145, 157, 149, 158, 56, + 56, 56, 160, 155, 56, 56, 56, 56, 163, 56, + 164, 161, 154, 159, 152, 153, 56, 156, 162, 168, + 56, 56, 157, 165, 158, 166, 56, 56, 160, 167, + 171, 56, 170, 56, 163, 169, 164, 56, 56, 159, + + 173, 56, 172, 56, 162, 168, 56, 56, 176, 165, + 56, 166, 180, 56, 177, 167, 171, 56, 170, 175, + 174, 169, 56, 56, 56, 56, 173, 178, 172, 56, + 182, 179, 56, 56, 176, 183, 56, 185, 180, 56, + 177, 184, 181, 56, 189, 175, 174, 56, 56, 186, + 56, 193, 192, 178, 56, 191, 182, 179, 56, 195, + 187, 183, 56, 185, 56, 56, 56, 184, 181, 56, + 189, 188, 190, 56, 199, 186, 56, 193, 192, 201, + 196, 191, 194, 202, 197, 195, 187, 200, 198, 56, + 56, 205, 56, 56, 203, 56, 56, 188, 190, 204, + + 199, 56, 207, 56, 209, 201, 196, 56, 194, 202, + 197, 56, 56, 200, 198, 208, 206, 205, 216, 56, + 203, 211, 56, 56, 213, 204, 56, 210, 207, 56, + 209, 212, 214, 56, 56, 215, 56, 222, 217, 219, + 56, 208, 206, 56, 216, 220, 223, 211, 56, 56, + 213, 56, 56, 210, 56, 230, 227, 212, 214, 56, + 218, 215, 56, 222, 217, 219, 56, 221, 224, 233, + 228, 220, 223, 56, 226, 225, 56, 56, 229, 56, + 56, 230, 227, 56, 56, 231, 218, 56, 232, 56, + 56, 56, 56, 221, 224, 233, 228, 56, 56, 56, + + 226, 225, 56, 56, 229, 56, 56, 56, 56, 56, + 56, 231, 56, 56, 232, 45, 45, 47, 47, 49, + 49, 56, 56, 56, 56, 97, 56, 56, 56, 56, + 97, 50, 48, 56, 55, 50, 48, 46, 234, 5, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234 + } ; + +static const flex_int16_t yy_chk[711] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 20, 25, 20, 22, 22, 26, 27, 28, 29, 31, + 239, 27, 28, 52, 26, 52, 28, 32, 27, 25, + 34, 238, 32, 59, 25, 27, 32, 30, 27, 28, + + 59, 31, 233, 58, 26, 33, 29, 27, 28, 34, + 26, 58, 28, 30, 27, 25, 30, 39, 32, 30, + 25, 27, 32, 33, 27, 28, 59, 31, 33, 38, + 26, 36, 29, 37, 44, 34, 39, 58, 232, 30, + 231, 74, 30, 42, 36, 30, 44, 38, 41, 33, + 36, 38, 37, 41, 33, 43, 40, 41, 37, 62, + 43, 42, 39, 42, 43, 40, 228, 74, 40, 63, + 36, 60, 44, 38, 63, 62, 36, 38, 37, 41, + 40, 64, 60, 41, 37, 40, 43, 42, 65, 42, + 43, 40, 66, 74, 40, 68, 67, 65, 64, 70, + + 63, 62, 69, 71, 75, 80, 40, 72, 60, 73, + 80, 40, 67, 84, 68, 69, 66, 78, 70, 67, + 75, 84, 69, 65, 64, 71, 72, 227, 73, 226, + 78, 225, 224, 81, 82, 223, 80, 221, 67, 91, + 68, 69, 66, 79, 70, 67, 75, 84, 69, 87, + 82, 71, 72, 85, 73, 76, 78, 81, 79, 94, + 79, 86, 88, 76, 89, 76, 90, 91, 87, 85, + 102, 218, 90, 76, 92, 94, 82, 86, 76, 76, + 93, 88, 89, 81, 79, 86, 79, 92, 93, 76, + 95, 76, 102, 91, 87, 85, 217, 95, 90, 76, + + 96, 94, 100, 86, 76, 76, 108, 88, 89, 96, + 101, 86, 103, 92, 93, 100, 104, 101, 102, 105, + 107, 104, 106, 95, 105, 109, 108, 107, 105, 103, + 110, 106, 111, 114, 112, 96, 117, 111, 216, 113, + 215, 100, 116, 101, 213, 117, 110, 104, 109, 109, + 105, 112, 108, 107, 105, 103, 113, 106, 114, 119, + 115, 120, 116, 111, 121, 118, 124, 122, 119, 212, + 120, 117, 110, 115, 109, 109, 127, 112, 118, 124, + 123, 128, 113, 121, 114, 122, 129, 125, 116, 123, + 128, 130, 127, 132, 119, 125, 120, 133, 135, 115, + + 130, 134, 129, 136, 118, 124, 140, 138, 134, 121, + 137, 122, 138, 141, 135, 123, 128, 139, 127, 133, + 132, 125, 211, 142, 145, 146, 130, 136, 129, 210, + 140, 137, 158, 159, 134, 141, 149, 145, 138, 154, + 135, 142, 139, 162, 154, 133, 132, 152, 155, 146, + 156, 159, 158, 136, 161, 156, 140, 137, 163, 162, + 149, 141, 164, 145, 168, 171, 179, 142, 139, 170, + 154, 152, 155, 172, 170, 146, 173, 159, 158, 172, + 163, 156, 161, 173, 164, 162, 149, 171, 168, 175, + 177, 179, 180, 181, 175, 183, 182, 152, 155, 177, + + 170, 188, 181, 185, 183, 172, 163, 193, 161, 173, + 164, 191, 186, 171, 168, 182, 180, 179, 193, 189, + 175, 186, 187, 204, 188, 177, 203, 185, 181, 195, + 183, 187, 189, 199, 208, 191, 197, 203, 195, 199, + 201, 182, 180, 202, 193, 201, 204, 186, 220, 209, + 188, 207, 214, 185, 230, 220, 208, 187, 189, 205, + 197, 191, 219, 203, 195, 199, 206, 202, 205, 230, + 214, 201, 204, 200, 207, 206, 222, 198, 219, 229, + 196, 220, 208, 194, 192, 222, 197, 190, 229, 184, + 178, 176, 174, 202, 205, 230, 214, 169, 167, 166, + + 207, 206, 165, 160, 219, 157, 153, 151, 150, 148, + 147, 222, 144, 143, 229, 235, 235, 236, 236, 237, + 237, 131, 126, 99, 98, 97, 83, 77, 61, 57, + 51, 49, 47, 35, 24, 11, 10, 9, 5, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234 + } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2889,8 +702,8 @@ static const flex_int16_t yy_chk[711] = {0, #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -2904,15 +717,13 @@ static const flex_int16_t yy_chk[711] = {0, #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) \ - LOG_DEBUG("%s", #token); \ - return token +#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token #line 727 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -2941,124 +752,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t -{ - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char *yy_last_accepting_cpos; + { - int yylineno_r; - int yy_flex_debug_r; + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; - YYSTYPE *yylval_r; + int yylineno_r; + int yy_flex_debug_r; - YYLTYPE *yylloc_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; -}; /* end struct yyguts_t */ + YYSTYPE * yylval_r; -static int yy_init_globals(yyscan_t yyscanner); + YYLTYPE * yylloc_r; -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -#define yylval yyg->yylval_r + }; /* end struct yyguts_t */ -#define yylloc yyg->yylloc_r +static int yy_init_globals ( yyscan_t yyscanner ); -int yylex_init(yyscan_t *scanner); + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner); +static int yyinput ( yyscan_t yyscanner ); #else -static int input(yyscan_t yyscanner); +static int input ( yyscan_t yyscanner ); #endif #endif @@ -3078,38 +889,42 @@ static int input(yyscan_t yyscanner); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - yy_size_t n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -3128,7 +943,7 @@ static int input(yyscan_t yyscanner); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -3139,9 +954,11 @@ static int input(yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -3153,550 +970,639 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP YY_USER_ACTION +#define YY_RULE_SETUP \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if (!yyg->yy_init) { - yyg->yy_init = 1; + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!yyg->yy_start) - yyg->yy_start = 1; /* first start state */ + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_load_buffer_state(yyscanner); - } + yy_load_buffer_state( yyscanner ); + } - { + { #line 75 "lex_sql.l" + #line 1022 "lex_sql.cpp" - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 235) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_base[yy_current_state] != 640); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - if (yy_act == 0) { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - - case 1: YY_RULE_SETUP + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 235 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 640 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 77 "lex_sql.l" - // ignore whitespace - YY_BREAK - case 2: - /* rule 2 can match eol */ - YY_RULE_SETUP +// ignore whitespace + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP #line 78 "lex_sql.l" - ; - YY_BREAK - case 3: YY_RULE_SETUP +; + YY_BREAK +case 3: +YY_RULE_SETUP #line 80 "lex_sql.l" - yylval->number = atoi(yytext); - RETURN_TOKEN(NUMBER); - YY_BREAK - case 4: YY_RULE_SETUP +yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); + YY_BREAK +case 4: +YY_RULE_SETUP #line 81 "lex_sql.l" - yylval->floats = (float)(atof(yytext)); - RETURN_TOKEN(FLOAT); - YY_BREAK - case 5: YY_RULE_SETUP +yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); + YY_BREAK +case 5: +YY_RULE_SETUP #line 83 "lex_sql.l" - RETURN_TOKEN(SEMICOLON); - YY_BREAK - case 6: YY_RULE_SETUP +RETURN_TOKEN(SEMICOLON); + YY_BREAK +case 6: +YY_RULE_SETUP #line 84 "lex_sql.l" - RETURN_TOKEN(DOT); - YY_BREAK - case 7: YY_RULE_SETUP +RETURN_TOKEN(DOT); + YY_BREAK +case 7: +YY_RULE_SETUP #line 85 "lex_sql.l" - RETURN_TOKEN(EXIT); - YY_BREAK - case 8: YY_RULE_SETUP +RETURN_TOKEN(EXIT); + YY_BREAK +case 8: +YY_RULE_SETUP #line 86 "lex_sql.l" - RETURN_TOKEN(HELP); - YY_BREAK - case 9: YY_RULE_SETUP +RETURN_TOKEN(HELP); + YY_BREAK +case 9: +YY_RULE_SETUP #line 87 "lex_sql.l" - RETURN_TOKEN(DESC); - YY_BREAK - case 10: YY_RULE_SETUP +RETURN_TOKEN(DESC); + YY_BREAK +case 10: +YY_RULE_SETUP #line 88 "lex_sql.l" - RETURN_TOKEN(CREATE); - YY_BREAK - case 11: YY_RULE_SETUP +RETURN_TOKEN(CREATE); + YY_BREAK +case 11: +YY_RULE_SETUP #line 89 "lex_sql.l" - RETURN_TOKEN(DROP); - YY_BREAK - case 12: YY_RULE_SETUP +RETURN_TOKEN(DROP); + YY_BREAK +case 12: +YY_RULE_SETUP #line 90 "lex_sql.l" - RETURN_TOKEN(TABLE); - YY_BREAK - case 13: YY_RULE_SETUP +RETURN_TOKEN(TABLE); + YY_BREAK +case 13: +YY_RULE_SETUP #line 91 "lex_sql.l" - RETURN_TOKEN(TABLES); - YY_BREAK - case 14: YY_RULE_SETUP +RETURN_TOKEN(TABLES); + YY_BREAK +case 14: +YY_RULE_SETUP #line 92 "lex_sql.l" - RETURN_TOKEN(INDEX); - YY_BREAK - case 15: YY_RULE_SETUP +RETURN_TOKEN(INDEX); + YY_BREAK +case 15: +YY_RULE_SETUP #line 93 "lex_sql.l" - RETURN_TOKEN(ON); - YY_BREAK - case 16: YY_RULE_SETUP +RETURN_TOKEN(ON); + YY_BREAK +case 16: +YY_RULE_SETUP #line 94 "lex_sql.l" - RETURN_TOKEN(SHOW); - YY_BREAK - case 17: YY_RULE_SETUP +RETURN_TOKEN(SHOW); + YY_BREAK +case 17: +YY_RULE_SETUP #line 95 "lex_sql.l" - RETURN_TOKEN(SYNC); - YY_BREAK - case 18: YY_RULE_SETUP +RETURN_TOKEN(SYNC); + YY_BREAK +case 18: +YY_RULE_SETUP #line 96 "lex_sql.l" - RETURN_TOKEN(SELECT); - YY_BREAK - case 19: YY_RULE_SETUP +RETURN_TOKEN(SELECT); + YY_BREAK +case 19: +YY_RULE_SETUP #line 97 "lex_sql.l" - RETURN_TOKEN(CALC); - YY_BREAK - case 20: YY_RULE_SETUP +RETURN_TOKEN(CALC); + YY_BREAK +case 20: +YY_RULE_SETUP #line 98 "lex_sql.l" - RETURN_TOKEN(FROM); - YY_BREAK - case 21: YY_RULE_SETUP +RETURN_TOKEN(FROM); + YY_BREAK +case 21: +YY_RULE_SETUP #line 99 "lex_sql.l" - RETURN_TOKEN(WHERE); - YY_BREAK - case 22: YY_RULE_SETUP +RETURN_TOKEN(WHERE); + YY_BREAK +case 22: +YY_RULE_SETUP #line 100 "lex_sql.l" - RETURN_TOKEN(AND); - YY_BREAK - case 23: YY_RULE_SETUP +RETURN_TOKEN(AND); + YY_BREAK +case 23: +YY_RULE_SETUP #line 101 "lex_sql.l" - RETURN_TOKEN(OR); - YY_BREAK - case 24: YY_RULE_SETUP +RETURN_TOKEN(OR); + YY_BREAK +case 24: +YY_RULE_SETUP #line 102 "lex_sql.l" - RETURN_TOKEN(INSERT); - YY_BREAK - case 25: YY_RULE_SETUP +RETURN_TOKEN(INSERT); + YY_BREAK +case 25: +YY_RULE_SETUP #line 103 "lex_sql.l" - RETURN_TOKEN(INTO); - YY_BREAK - case 26: YY_RULE_SETUP +RETURN_TOKEN(INTO); + YY_BREAK +case 26: +YY_RULE_SETUP #line 104 "lex_sql.l" - RETURN_TOKEN(VALUES); - YY_BREAK - case 27: YY_RULE_SETUP +RETURN_TOKEN(VALUES); + YY_BREAK +case 27: +YY_RULE_SETUP #line 105 "lex_sql.l" - RETURN_TOKEN(DELETE); - YY_BREAK - case 28: YY_RULE_SETUP +RETURN_TOKEN(DELETE); + YY_BREAK +case 28: +YY_RULE_SETUP #line 106 "lex_sql.l" - RETURN_TOKEN(UPDATE); - YY_BREAK - case 29: YY_RULE_SETUP +RETURN_TOKEN(UPDATE); + YY_BREAK +case 29: +YY_RULE_SETUP #line 107 "lex_sql.l" - RETURN_TOKEN(SET); - YY_BREAK - case 30: YY_RULE_SETUP +RETURN_TOKEN(SET); + YY_BREAK +case 30: +YY_RULE_SETUP #line 108 "lex_sql.l" - RETURN_TOKEN(TRX_BEGIN); - YY_BREAK - case 31: YY_RULE_SETUP +RETURN_TOKEN(TRX_BEGIN); + YY_BREAK +case 31: +YY_RULE_SETUP #line 109 "lex_sql.l" - RETURN_TOKEN(TRX_COMMIT); - YY_BREAK - case 32: YY_RULE_SETUP +RETURN_TOKEN(TRX_COMMIT); + YY_BREAK +case 32: +YY_RULE_SETUP #line 110 "lex_sql.l" - RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK - case 33: YY_RULE_SETUP +RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK +case 33: +YY_RULE_SETUP #line 111 "lex_sql.l" - RETURN_TOKEN(INT_T); - YY_BREAK - case 34: YY_RULE_SETUP +RETURN_TOKEN(INT_T); + YY_BREAK +case 34: +YY_RULE_SETUP #line 112 "lex_sql.l" - RETURN_TOKEN(STRING_T); - YY_BREAK - case 35: YY_RULE_SETUP +RETURN_TOKEN(STRING_T); + YY_BREAK +case 35: +YY_RULE_SETUP #line 113 "lex_sql.l" - RETURN_TOKEN(FLOAT_T); - YY_BREAK - case 36: YY_RULE_SETUP +RETURN_TOKEN(FLOAT_T); + YY_BREAK +case 36: +YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(DATE_T); // 增加 DATE 的 token - YY_BREAK - case 37: YY_RULE_SETUP +RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + YY_BREAK +case 37: +YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token - YY_BREAK - case 38: YY_RULE_SETUP +RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + YY_BREAK +case 38: +YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(VECTOR_T); // 增加 VECTOR 的 token - YY_BREAK - case 39: YY_RULE_SETUP +RETURN_TOKEN(VECTOR_T); // 增加 VECTOR 的 token + YY_BREAK +case 39: +YY_RULE_SETUP #line 117 "lex_sql.l" - RETURN_TOKEN(UNIQUE); - YY_BREAK - case 40: YY_RULE_SETUP +RETURN_TOKEN(UNIQUE); + YY_BREAK +case 40: +YY_RULE_SETUP #line 118 "lex_sql.l" - RETURN_TOKEN(NULL_T); - YY_BREAK - case 41: YY_RULE_SETUP +RETURN_TOKEN(NULL_T); + YY_BREAK +case 41: +YY_RULE_SETUP #line 119 "lex_sql.l" - RETURN_TOKEN(NULLABLE); - YY_BREAK - case 42: YY_RULE_SETUP +RETURN_TOKEN(NULLABLE); + YY_BREAK +case 42: +YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(LOAD); - YY_BREAK - case 43: YY_RULE_SETUP +RETURN_TOKEN(LOAD); + YY_BREAK +case 43: +YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(DATA); - YY_BREAK - case 44: YY_RULE_SETUP +RETURN_TOKEN(DATA); + YY_BREAK +case 44: +YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(INFILE); - YY_BREAK - case 45: YY_RULE_SETUP +RETURN_TOKEN(INFILE); + YY_BREAK +case 45: +YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); - YY_BREAK - case 46: YY_RULE_SETUP +RETURN_TOKEN(EXPLAIN); + YY_BREAK +case 46: +YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(GROUP); - YY_BREAK - case 47: YY_RULE_SETUP +RETURN_TOKEN(GROUP); + YY_BREAK +case 47: +YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(LIMIT); - YY_BREAK - case 48: YY_RULE_SETUP +RETURN_TOKEN(LIMIT); + YY_BREAK +case 48: +YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(HAVING); - YY_BREAK - case 49: YY_RULE_SETUP +RETURN_TOKEN(HAVING); + YY_BREAK +case 49: +YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(ORDER); - YY_BREAK - case 50: YY_RULE_SETUP +RETURN_TOKEN(ORDER); + YY_BREAK +case 50: +YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(BY); - YY_BREAK - case 51: YY_RULE_SETUP +RETURN_TOKEN(BY); + YY_BREAK +case 51: +YY_RULE_SETUP #line 129 "lex_sql.l" - RETURN_TOKEN(AS); - YY_BREAK - case 52: YY_RULE_SETUP +RETURN_TOKEN(AS); + YY_BREAK +case 52: +YY_RULE_SETUP #line 130 "lex_sql.l" - RETURN_TOKEN(ASC); - YY_BREAK - case 53: YY_RULE_SETUP +RETURN_TOKEN(ASC); + YY_BREAK +case 53: +YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(IN); - YY_BREAK - case 54: YY_RULE_SETUP +RETURN_TOKEN(IN); + YY_BREAK +case 54: +YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(EXISTS); - YY_BREAK - case 55: YY_RULE_SETUP +RETURN_TOKEN(EXISTS); + YY_BREAK +case 55: +YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(STORAGE); - YY_BREAK - case 56: YY_RULE_SETUP +RETURN_TOKEN(STORAGE); + YY_BREAK +case 56: +YY_RULE_SETUP #line 134 "lex_sql.l" - RETURN_TOKEN(FORMAT); - YY_BREAK - case 57: YY_RULE_SETUP +RETURN_TOKEN(FORMAT); + YY_BREAK +case 57: +YY_RULE_SETUP #line 135 "lex_sql.l" - RETURN_TOKEN(INNER); - YY_BREAK - case 58: YY_RULE_SETUP +RETURN_TOKEN(INNER); + YY_BREAK +case 58: +YY_RULE_SETUP #line 136 "lex_sql.l" - RETURN_TOKEN(JOIN); - YY_BREAK - case 59: YY_RULE_SETUP +RETURN_TOKEN(JOIN); + YY_BREAK +case 59: +YY_RULE_SETUP #line 137 "lex_sql.l" - RETURN_TOKEN(LBRACE); - YY_BREAK - case 60: YY_RULE_SETUP +RETURN_TOKEN(LBRACE); + YY_BREAK +case 60: +YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(RBRACE); - YY_BREAK - case 61: YY_RULE_SETUP +RETURN_TOKEN(RBRACE); + YY_BREAK +case 61: +YY_RULE_SETUP #line 140 "lex_sql.l" - RETURN_TOKEN(COMMA); - YY_BREAK - case 62: YY_RULE_SETUP +RETURN_TOKEN(COMMA); + YY_BREAK +case 62: +YY_RULE_SETUP #line 141 "lex_sql.l" - RETURN_TOKEN(EQ); - YY_BREAK - case 63: YY_RULE_SETUP +RETURN_TOKEN(EQ); + YY_BREAK +case 63: +YY_RULE_SETUP #line 142 "lex_sql.l" - RETURN_TOKEN(LE); - YY_BREAK - case 64: YY_RULE_SETUP +RETURN_TOKEN(LE); + YY_BREAK +case 64: +YY_RULE_SETUP #line 143 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 65: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 65: +YY_RULE_SETUP #line 144 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 66: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 66: +YY_RULE_SETUP #line 145 "lex_sql.l" - RETURN_TOKEN(LT); - YY_BREAK - case 67: YY_RULE_SETUP +RETURN_TOKEN(LT); + YY_BREAK +case 67: +YY_RULE_SETUP #line 146 "lex_sql.l" - RETURN_TOKEN(GE); - YY_BREAK - case 68: YY_RULE_SETUP +RETURN_TOKEN(GE); + YY_BREAK +case 68: +YY_RULE_SETUP #line 147 "lex_sql.l" - RETURN_TOKEN(GT); - YY_BREAK - case 69: YY_RULE_SETUP +RETURN_TOKEN(GT); + YY_BREAK +case 69: +YY_RULE_SETUP #line 148 "lex_sql.l" - RETURN_TOKEN(NOT); - YY_BREAK - case 70: YY_RULE_SETUP +RETURN_TOKEN(NOT); + YY_BREAK +case 70: +YY_RULE_SETUP #line 149 "lex_sql.l" - RETURN_TOKEN(IS); - YY_BREAK - case 71: YY_RULE_SETUP +RETURN_TOKEN(IS); + YY_BREAK +case 71: +YY_RULE_SETUP #line 150 "lex_sql.l" - RETURN_TOKEN(LIKE); - YY_BREAK - case 72: YY_RULE_SETUP +RETURN_TOKEN(LIKE); + YY_BREAK +case 72: +YY_RULE_SETUP #line 152 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(ID); - YY_BREAK - case 73: +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK +case 73: #line 155 "lex_sql.l" - case 74: +case 74: #line 156 "lex_sql.l" - case 75: +case 75: #line 157 "lex_sql.l" - case 76: YY_RULE_SETUP +case 76: +YY_RULE_SETUP #line 157 "lex_sql.l" - { - return yytext[0]; - } - YY_BREAK - case 77: - /* rule 77 can match eol */ - YY_RULE_SETUP +{ return yytext[0]; } + YY_BREAK +case 77: +/* rule 77 can match eol */ +YY_RULE_SETUP #line 158 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 78: - /* rule 78 can match eol */ - YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 78: +/* rule 78 can match eol */ +YY_RULE_SETUP #line 159 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 79: YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 79: +YY_RULE_SETUP #line 161 "lex_sql.l" - LOG_DEBUG("Unknown character [%c]",yytext[0]); - return yytext[0]; - YY_BREAK - case 80: YY_RULE_SETUP +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 80: +YY_RULE_SETUP #line 162 "lex_sql.l" - ECHO; - YY_BREAK +ECHO; + YY_BREAK #line 1473 "lex_sql.cpp" - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(STR): yyterminate(); - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if (yywrap(yyscanner)) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(STR): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3706,149 +1612,171 @@ YY_DECL * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(yyscan_t yyscanner) +static int yy_get_next_buffer (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else { - yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - yy_size_t new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if (yyg->yy_n_chars == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin, yyscanner); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = - (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(yyscan_t yyscanner) + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_current_state = yyg->yy_start; - - for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 235) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 235 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -3856,27 +1784,29 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 235) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 234); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 235 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 234); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -3885,133 +1815,141 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner) + static int yyinput (yyscan_t yyscanner) #else -static int input(yyscan_t yyscanner) + static int input (yyscan_t yyscanner) #endif { - int c; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin, yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap(yyscanner)) - return 0; - - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file, yyscan_t yyscanner) + void yyrestart (FILE * input_file , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); - yy_load_buffer_state(yyscanner); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(yyscanner); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state(yyscan_t yyscanner) +static void yy_load_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -4020,105 +1958,105 @@ static void yy_load_buffer_state(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file, yyscanner); + yy_init_buffer( b, file , yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!b) - return; + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf, yyscanner); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *)b, yyscanner); + yyfree( (void *) b , yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_flush_buffer(b, yyscanner); + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - b->yy_input_file = file; - b->yy_fill_buffer = 1; + yy_flush_buffer( b , yyscanner); - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!b) - return; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(yyscanner); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -4127,95 +2065,99 @@ void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state(yyscan_t yyscanner) +void yypop_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(yyscan_t yyscanner) +static void yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = - (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( - yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -4224,31 +2166,33 @@ static void yyensure_buffer_stack(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b, yyscanner); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -4259,10 +2203,10 @@ YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - - return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -4272,175 +2216,177 @@ YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n, yyscanner); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n, yyscanner); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyextra; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno(yyscan_t yyscanner) +int yyget_lineno (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column(yyscan_t yyscanner) +int yyget_column (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!YY_CURRENT_BUFFER) - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yycolumn; + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in(yyscan_t yyscanner) +FILE *yyget_in (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyin; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out(yyscan_t yyscanner) +FILE *yyget_out (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyout; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng(yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyleng; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text(yyscan_t yyscanner) +char *yyget_text (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yytext; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyextra = user_defined; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno(int _line_number, yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_lineno called with no buffer"); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column(int _column_no, yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_column called with no buffer"); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yycolumn = _column_no; + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -4449,80 +2395,80 @@ void yyset_column(int _column_no, yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str, yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyin = _in_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; } -void yyset_out(FILE *_out_str, yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyout = _out_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; } -int yyget_debug(yyscan_t yyscanner) +int yyget_debug (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yy_flex_debug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void yyset_debug(int _bdebug, yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flex_debug = _bdebug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ -YYSTYPE *yyget_lval(yyscan_t yyscanner) +YYSTYPE * yyget_lval (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylval; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc(yyscan_t yyscanner) +YYLTYPE *yyget_lloc (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; } - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylloc = yylloc_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t *ptr_yy_globals) +int yylex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -4532,94 +2478,94 @@ int yylex_init(yyscan_t *ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra(yy_user_defined, &dummy_yyguts); + yyset_extra (yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - yyset_extra(yy_user_defined, *ptr_yy_globals); + yyset_extra (yy_user_defined, *ptr_yy_globals); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } -static int yy_init_globals(yyscan_t yyscanner) +static int yy_init_globals (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(yyscan_t yyscanner) +int yylex_destroy (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack, yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack, yyscanner); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals(yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree(yyscanner, yyscanner); - yyscanner = NULL; - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; } /* @@ -4627,59 +2573,63 @@ int yylex_destroy(yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s, yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - int n; - for (n = 0; s[n]; ++n) - ; + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size, yyscan_t yyscanner) +void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr, yyscan_t yyscanner) +void yyfree (void * ptr , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - free((char *)ptr); /* see yyrealloc() for (char *) cast */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 162 "lex_sql.l" -void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } + +void scan_string(const char *str, yyscan_t scanner) { + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); +} + diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 4b8524f1..2e47bb2c 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,21 +12,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -79,62 +81,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -155,7 +157,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -195,72 +197,73 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -}; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -283,69 +286,69 @@ void yyfree(void *, yyscan_t yyscanner); #define YY_EXTRA_TYPE void * #endif -int yylex_init(yyscan_t *scanner); +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -373,9 +376,11 @@ static int yy_flex_strlen(const char *, yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -539,6 +544,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #line 162 "lex_sql.l" + #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 28a590df..cb13eea7 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,9 +63,13 @@ /* Pull parsers. */ #define YYPULL 1 + + + /* First part of user prologue. */ #line 2 "yacc_sql.y" + #include #include #include @@ -88,224 +92,235 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression( - ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, + Expression *left, + Expression *right, + const char *sql_string, + YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression( - const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression(const char *function_name, + std::vector> child, + const char *sql_string, + YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } -ParsedSqlNode *create_table_sql_node(char *table_name, AttrInfoSqlNode *attr_def, - std::vector *attrinfos, char *storage_format, ParsedSqlNode *create_table_select) +ParsedSqlNode *create_table_sql_node(char *table_name, + AttrInfoSqlNode* attr_def, + std::vector *attrinfos, + char* storage_format, + ParsedSqlNode *create_table_select) { - ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = parsed_sql_node->create_table; - create_table.relation_name = table_name; + ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = parsed_sql_node->create_table; + create_table.relation_name = table_name; - if (attrinfos) { - create_table.attr_infos.swap(*attrinfos); - delete attrinfos; - } - if (attr_def) { - create_table.attr_infos.emplace_back(*attr_def); - std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); - delete attr_def; - } - if (storage_format != nullptr) { - create_table.storage_format = storage_format; - free(storage_format); - } + if (attrinfos) { + create_table.attr_infos.swap(*attrinfos); + delete attrinfos; + } + if (attr_def) { + create_table.attr_infos.emplace_back(*attr_def); + std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); + delete attr_def; + } + if (storage_format != nullptr) { + create_table.storage_format = storage_format; + free(storage_format); + } - if (create_table_select) { - create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); - } + if (create_table_select) { + create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); + } - return parsed_sql_node; + return parsed_sql_node; } #line 155 "yacc_sql.cpp" -#ifndef YY_CAST -#ifdef __cplusplus -#define YY_CAST(Type, Val) static_cast(Val) -#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) -#else -#define YY_CAST(Type, Val) ((Type)(Val)) -#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) -#endif -#endif -#ifndef YY_NULLPTR -#if defined __cplusplus -#if 201103L <= __cplusplus -#define YY_NULLPTR nullptr -#else -#define YY_NULLPTR 0 -#endif -#else -#define YY_NULLPTR ((void *)0) -#endif -#endif +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_HAVING = 11, /* HAVING */ - YYSYMBOL_ORDER = 12, /* ORDER */ - YYSYMBOL_TABLE = 13, /* TABLE */ - YYSYMBOL_TABLES = 14, /* TABLES */ - YYSYMBOL_INDEX = 15, /* INDEX */ - YYSYMBOL_CALC = 16, /* CALC */ - YYSYMBOL_SELECT = 17, /* SELECT */ - YYSYMBOL_DESC = 18, /* DESC */ - YYSYMBOL_SHOW = 19, /* SHOW */ - YYSYMBOL_SYNC = 20, /* SYNC */ - YYSYMBOL_INSERT = 21, /* INSERT */ - YYSYMBOL_DELETE = 22, /* DELETE */ - YYSYMBOL_UPDATE = 23, /* UPDATE */ - YYSYMBOL_LBRACE = 24, /* LBRACE */ - YYSYMBOL_RBRACE = 25, /* RBRACE */ - YYSYMBOL_COMMA = 26, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 30, /* INT_T */ - YYSYMBOL_IN = 31, /* IN */ - YYSYMBOL_STRING_T = 32, /* STRING_T */ - YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ - YYSYMBOL_DATE_T = 34, /* DATE_T */ - YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_VECTOR_T = 36, /* VECTOR_T */ - YYSYMBOL_NOT = 37, /* NOT */ - YYSYMBOL_UNIQUE = 38, /* UNIQUE */ - YYSYMBOL_NULL_T = 39, /* NULL_T */ - YYSYMBOL_LIMIT = 40, /* LIMIT */ - YYSYMBOL_NULLABLE = 41, /* NULLABLE */ - YYSYMBOL_HELP = 42, /* HELP */ - YYSYMBOL_EXIT = 43, /* EXIT */ - YYSYMBOL_DOT = 44, /* DOT */ - YYSYMBOL_INTO = 45, /* INTO */ - YYSYMBOL_VALUES = 46, /* VALUES */ - YYSYMBOL_FROM = 47, /* FROM */ - YYSYMBOL_WHERE = 48, /* WHERE */ - YYSYMBOL_AND = 49, /* AND */ - YYSYMBOL_OR = 50, /* OR */ - YYSYMBOL_SET = 51, /* SET */ - YYSYMBOL_ON = 52, /* ON */ - YYSYMBOL_LOAD = 53, /* LOAD */ - YYSYMBOL_DATA = 54, /* DATA */ - YYSYMBOL_INFILE = 55, /* INFILE */ - YYSYMBOL_EXPLAIN = 56, /* EXPLAIN */ - YYSYMBOL_STORAGE = 57, /* STORAGE */ - YYSYMBOL_FORMAT = 58, /* FORMAT */ - YYSYMBOL_INNER = 59, /* INNER */ - YYSYMBOL_JOIN = 60, /* JOIN */ - YYSYMBOL_EQ = 61, /* EQ */ - YYSYMBOL_LT = 62, /* LT */ - YYSYMBOL_GT = 63, /* GT */ - YYSYMBOL_LE = 64, /* LE */ - YYSYMBOL_GE = 65, /* GE */ - YYSYMBOL_NE = 66, /* NE */ - YYSYMBOL_LIKE = 67, /* LIKE */ - YYSYMBOL_IS = 68, /* IS */ - YYSYMBOL_NUMBER = 69, /* NUMBER */ - YYSYMBOL_FLOAT = 70, /* FLOAT */ - YYSYMBOL_ID = 71, /* ID */ - YYSYMBOL_SSS = 72, /* SSS */ - YYSYMBOL_73_ = 73, /* '+' */ - YYSYMBOL_74_ = 74, /* '-' */ - YYSYMBOL_75_ = 75, /* '*' */ - YYSYMBOL_76_ = 76, /* '/' */ - YYSYMBOL_UMINUS = 77, /* UMINUS */ - YYSYMBOL_YYACCEPT = 78, /* $accept */ - YYSYMBOL_commands = 79, /* commands */ - YYSYMBOL_command_wrapper = 80, /* command_wrapper */ - YYSYMBOL_exit_stmt = 81, /* exit_stmt */ - YYSYMBOL_help_stmt = 82, /* help_stmt */ - YYSYMBOL_sync_stmt = 83, /* sync_stmt */ - YYSYMBOL_begin_stmt = 84, /* begin_stmt */ - YYSYMBOL_commit_stmt = 85, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 86, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 87, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 88, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 89, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 90, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 91, /* create_index_stmt */ - YYSYMBOL_opt_unique = 92, /* opt_unique */ - YYSYMBOL_attr_list = 93, /* attr_list */ - YYSYMBOL_drop_index_stmt = 94, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 95, /* create_table_stmt */ - YYSYMBOL_attr_def_list = 96, /* attr_def_list */ - YYSYMBOL_attr_def = 97, /* attr_def */ - YYSYMBOL_nullable_constraint = 98, /* nullable_constraint */ - YYSYMBOL_type = 99, /* type */ - YYSYMBOL_insert_stmt = 100, /* insert_stmt */ - YYSYMBOL_values_list = 101, /* values_list */ - YYSYMBOL_value_list = 102, /* value_list */ - YYSYMBOL_value = 103, /* value */ - YYSYMBOL_nonnegative_value = 104, /* nonnegative_value */ - YYSYMBOL_storage_format = 105, /* storage_format */ - YYSYMBOL_delete_stmt = 106, /* delete_stmt */ - YYSYMBOL_update_stmt = 107, /* update_stmt */ - YYSYMBOL_set_clauses = 108, /* set_clauses */ - YYSYMBOL_setClause = 109, /* setClause */ - YYSYMBOL_select_stmt = 110, /* select_stmt */ - YYSYMBOL_calc_stmt = 111, /* calc_stmt */ - YYSYMBOL_expression_list = 112, /* expression_list */ - YYSYMBOL_expression = 113, /* expression */ - YYSYMBOL_alias = 114, /* alias */ - YYSYMBOL_aggr_func_expr = 115, /* aggr_func_expr */ - YYSYMBOL_sub_query_expr = 116, /* sub_query_expr */ - YYSYMBOL_rel_attr = 117, /* rel_attr */ - YYSYMBOL_relation = 118, /* relation */ - YYSYMBOL_rel_list = 119, /* rel_list */ - YYSYMBOL_join_clauses = 120, /* join_clauses */ - YYSYMBOL_where = 121, /* where */ - YYSYMBOL_condition = 122, /* condition */ - YYSYMBOL_comp_op = 123, /* comp_op */ - YYSYMBOL_opt_order_by = 124, /* opt_order_by */ - YYSYMBOL_sort_list = 125, /* sort_list */ - YYSYMBOL_sort_unit = 126, /* sort_unit */ - YYSYMBOL_group_by = 127, /* group_by */ - YYSYMBOL_opt_having = 128, /* opt_having */ - YYSYMBOL_opt_limit = 129, /* opt_limit */ - YYSYMBOL_load_data_stmt = 130, /* load_data_stmt */ - YYSYMBOL_explain_stmt = 131, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 132, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 133 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_HAVING = 11, /* HAVING */ + YYSYMBOL_ORDER = 12, /* ORDER */ + YYSYMBOL_TABLE = 13, /* TABLE */ + YYSYMBOL_TABLES = 14, /* TABLES */ + YYSYMBOL_INDEX = 15, /* INDEX */ + YYSYMBOL_CALC = 16, /* CALC */ + YYSYMBOL_SELECT = 17, /* SELECT */ + YYSYMBOL_DESC = 18, /* DESC */ + YYSYMBOL_SHOW = 19, /* SHOW */ + YYSYMBOL_SYNC = 20, /* SYNC */ + YYSYMBOL_INSERT = 21, /* INSERT */ + YYSYMBOL_DELETE = 22, /* DELETE */ + YYSYMBOL_UPDATE = 23, /* UPDATE */ + YYSYMBOL_LBRACE = 24, /* LBRACE */ + YYSYMBOL_RBRACE = 25, /* RBRACE */ + YYSYMBOL_COMMA = 26, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 30, /* INT_T */ + YYSYMBOL_IN = 31, /* IN */ + YYSYMBOL_STRING_T = 32, /* STRING_T */ + YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ + YYSYMBOL_DATE_T = 34, /* DATE_T */ + YYSYMBOL_TEXT_T = 35, /* TEXT_T */ + YYSYMBOL_VECTOR_T = 36, /* VECTOR_T */ + YYSYMBOL_NOT = 37, /* NOT */ + YYSYMBOL_UNIQUE = 38, /* UNIQUE */ + YYSYMBOL_NULL_T = 39, /* NULL_T */ + YYSYMBOL_LIMIT = 40, /* LIMIT */ + YYSYMBOL_NULLABLE = 41, /* NULLABLE */ + YYSYMBOL_HELP = 42, /* HELP */ + YYSYMBOL_EXIT = 43, /* EXIT */ + YYSYMBOL_DOT = 44, /* DOT */ + YYSYMBOL_INTO = 45, /* INTO */ + YYSYMBOL_VALUES = 46, /* VALUES */ + YYSYMBOL_FROM = 47, /* FROM */ + YYSYMBOL_WHERE = 48, /* WHERE */ + YYSYMBOL_AND = 49, /* AND */ + YYSYMBOL_OR = 50, /* OR */ + YYSYMBOL_SET = 51, /* SET */ + YYSYMBOL_ON = 52, /* ON */ + YYSYMBOL_LOAD = 53, /* LOAD */ + YYSYMBOL_DATA = 54, /* DATA */ + YYSYMBOL_INFILE = 55, /* INFILE */ + YYSYMBOL_EXPLAIN = 56, /* EXPLAIN */ + YYSYMBOL_STORAGE = 57, /* STORAGE */ + YYSYMBOL_FORMAT = 58, /* FORMAT */ + YYSYMBOL_INNER = 59, /* INNER */ + YYSYMBOL_JOIN = 60, /* JOIN */ + YYSYMBOL_EQ = 61, /* EQ */ + YYSYMBOL_LT = 62, /* LT */ + YYSYMBOL_GT = 63, /* GT */ + YYSYMBOL_LE = 64, /* LE */ + YYSYMBOL_GE = 65, /* GE */ + YYSYMBOL_NE = 66, /* NE */ + YYSYMBOL_LIKE = 67, /* LIKE */ + YYSYMBOL_IS = 68, /* IS */ + YYSYMBOL_NUMBER = 69, /* NUMBER */ + YYSYMBOL_FLOAT = 70, /* FLOAT */ + YYSYMBOL_ID = 71, /* ID */ + YYSYMBOL_SSS = 72, /* SSS */ + YYSYMBOL_73_ = 73, /* '+' */ + YYSYMBOL_74_ = 74, /* '-' */ + YYSYMBOL_75_ = 75, /* '*' */ + YYSYMBOL_76_ = 76, /* '/' */ + YYSYMBOL_UMINUS = 77, /* UMINUS */ + YYSYMBOL_YYACCEPT = 78, /* $accept */ + YYSYMBOL_commands = 79, /* commands */ + YYSYMBOL_command_wrapper = 80, /* command_wrapper */ + YYSYMBOL_exit_stmt = 81, /* exit_stmt */ + YYSYMBOL_help_stmt = 82, /* help_stmt */ + YYSYMBOL_sync_stmt = 83, /* sync_stmt */ + YYSYMBOL_begin_stmt = 84, /* begin_stmt */ + YYSYMBOL_commit_stmt = 85, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 86, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 87, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 88, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 89, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 90, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 91, /* create_index_stmt */ + YYSYMBOL_opt_unique = 92, /* opt_unique */ + YYSYMBOL_attr_list = 93, /* attr_list */ + YYSYMBOL_drop_index_stmt = 94, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 95, /* create_table_stmt */ + YYSYMBOL_attr_def_list = 96, /* attr_def_list */ + YYSYMBOL_attr_def = 97, /* attr_def */ + YYSYMBOL_nullable_constraint = 98, /* nullable_constraint */ + YYSYMBOL_type = 99, /* type */ + YYSYMBOL_insert_stmt = 100, /* insert_stmt */ + YYSYMBOL_values_list = 101, /* values_list */ + YYSYMBOL_value_list = 102, /* value_list */ + YYSYMBOL_value = 103, /* value */ + YYSYMBOL_nonnegative_value = 104, /* nonnegative_value */ + YYSYMBOL_storage_format = 105, /* storage_format */ + YYSYMBOL_delete_stmt = 106, /* delete_stmt */ + YYSYMBOL_update_stmt = 107, /* update_stmt */ + YYSYMBOL_set_clauses = 108, /* set_clauses */ + YYSYMBOL_setClause = 109, /* setClause */ + YYSYMBOL_select_stmt = 110, /* select_stmt */ + YYSYMBOL_calc_stmt = 111, /* calc_stmt */ + YYSYMBOL_expression_list = 112, /* expression_list */ + YYSYMBOL_expression = 113, /* expression */ + YYSYMBOL_alias = 114, /* alias */ + YYSYMBOL_aggr_func_expr = 115, /* aggr_func_expr */ + YYSYMBOL_sub_query_expr = 116, /* sub_query_expr */ + YYSYMBOL_rel_attr = 117, /* rel_attr */ + YYSYMBOL_relation = 118, /* relation */ + YYSYMBOL_rel_list = 119, /* rel_list */ + YYSYMBOL_join_clauses = 120, /* join_clauses */ + YYSYMBOL_where = 121, /* where */ + YYSYMBOL_condition = 122, /* condition */ + YYSYMBOL_comp_op = 123, /* comp_op */ + YYSYMBOL_opt_order_by = 124, /* opt_order_by */ + YYSYMBOL_sort_list = 125, /* sort_list */ + YYSYMBOL_sort_unit = 126, /* sort_unit */ + YYSYMBOL_group_by = 127, /* group_by */ + YYSYMBOL_opt_having = 128, /* opt_having */ + YYSYMBOL_opt_limit = 129, /* opt_limit */ + YYSYMBOL_load_data_stmt = 130, /* load_data_stmt */ + YYSYMBOL_explain_stmt = 131, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 132, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 133 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; + + + #ifdef short -#undef short +# undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -313,11 +328,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -#include /* INFRINGES ON USER NAME SPACE */ -#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_STDINT_H -#endif +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -347,15 +362,16 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -#undef UINT_LEAST8_MAX -#undef UINT_LEAST16_MAX -#define UINT_LEAST8_MAX 255 -#define UINT_LEAST16_MAX 65535 +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -365,7 +381,8 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -374,38 +391,42 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -#define YYPTRDIFF_T __PTRDIFF_TYPE__ -#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -#elif defined PTRDIFF_MAX -#ifndef ptrdiff_t -#include /* INFRINGES ON USER NAME SPACE */ -#endif -#define YYPTRDIFF_T ptrdiff_t -#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -#else -#define YYPTRDIFF_T long -#define YYPTRDIFF_MAXIMUM LONG_MAX -#endif +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T -#ifdef __SIZE_TYPE__ -#define YYSIZE_T __SIZE_TYPE__ -#elif defined size_t -#define YYSIZE_T size_t -#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YYSIZE_T size_t -#else -#define YYSIZE_T unsigned -#endif +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -414,2620 +435,606 @@ typedef yytype_uint8 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -#if defined YYENABLE_NLS && YYENABLE_NLS -#if ENABLE_NLS -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_(Msgid) dgettext("bison-runtime", Msgid) -#endif -#endif -#ifndef YY_ -#define YY_(Msgid) Msgid -#endif +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif #endif + #ifndef YY_ATTRIBUTE_PURE -#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) -#else -#define YY_ATTRIBUTE_PURE -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define YY_ATTRIBUTE_UNUSED -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if !defined lint || defined __GNUC__ -#define YY_USE(E) ((void)(E)) +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) #else -#define YY_USE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") -#else -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -#endif -#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#define YY_INITIAL_VALUE(Value) Value +# define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_END +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -#define YY_INITIAL_VALUE(Value) /* Nothing. */ +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ -#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") -#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_END +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END #endif -#define YY_ASSERT(E) ((void)(0 && (E))) + +#define YY_ASSERT(E) ((void) (0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -#ifdef YYSTACK_USE_ALLOCA -#if YYSTACK_USE_ALLOCA -#ifdef __GNUC__ -#define YYSTACK_ALLOC __builtin_alloca -#elif defined __BUILTIN_VA_ARG_INCR -#include /* INFRINGES ON USER NAME SPACE */ -#elif defined _AIX -#define YYSTACK_ALLOC __alloca -#elif defined _MSC_VER -#include /* INFRINGES ON USER NAME SPACE */ -#define alloca _alloca -#else -#define YYSTACK_ALLOC alloca -#if !defined _ALLOCA_H && !defined EXIT_SUCCESS -#include /* INFRINGES ON USER NAME SPACE */ -/* Use EXIT_SUCCESS as a witness for stdlib.h. */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#endif -#endif -#endif - -#ifdef YYSTACK_ALLOC -/* Pacify GCC's 'empty if-body' warning. */ -#define YYSTACK_FREE(Ptr) \ - do { /* empty */ \ - ; \ - } while (0) -#ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -#endif -#else -#define YYSTACK_ALLOC YYMALLOC -#define YYSTACK_FREE YYFREE -#ifndef YYSTACK_ALLOC_MAXIMUM -#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -#endif -#if (defined __cplusplus && !defined EXIT_SUCCESS && \ - !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) -#include /* INFRINGES ON USER NAME SPACE */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef YYMALLOC -#define YYMALLOC malloc -#if !defined malloc && !defined EXIT_SUCCESS -void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#ifndef YYFREE -#define YYFREE free -#if !defined free && !defined EXIT_SUCCESS -void free(void *); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#endif +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif #endif /* 1 */ -#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ - defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -#define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) -#define YYCOPY_NEEDED 1 +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF(*yyptr); \ - } while (0) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -#ifndef YYCOPY -#if defined __GNUC__ && 1 < __GNUC__ -#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) -#else -#define YYCOPY(Dst, Src, Count) \ - do { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } while (0) -#endif -#endif +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 71 +#define YYFINAL 71 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 271 +#define YYLAST 271 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 78 +#define YYNTOKENS 78 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 56 +#define YYNNTS 56 /* YYNRULES -- Number of rules. */ -#define YYNRULES 145 +#define YYNRULES 145 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 255 +#define YYNSTATES 255 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 328 +#define YYMAXUTOK 328 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = {0, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 75, - 73, - 2, - 74, - 2, - 76, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 77}; +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 75, 73, 2, 74, 2, 76, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 77 +}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = {0, - 263, - 263, - 271, - 272, - 273, - 274, - 275, - 276, - 277, - 278, - 279, - 280, - 281, - 282, - 283, - 284, - 285, - 286, - 287, - 288, - 289, - 290, - 291, - 295, - 301, - 306, - 312, - 318, - 324, - 330, - 337, - 343, - 351, - 361, - 376, - 377, - 381, - 387, - 396, - 406, - 410, - 414, - 418, - 422, - 429, - 432, - 445, - 463, - 490, - 494, - 498, - 503, - 509, - 510, - 511, - 512, - 513, - 514, - 518, - 531, - 537, - 544, - 550, - 558, - 561, - 565, - 572, - 576, - 580, - 586, - 593, - 596, - 603, - 615, - 629, - 634, - 641, - 651, - 689, - 722, - 728, - 737, - 740, - 749, - 765, - 768, - 771, - 774, - 777, - 785, - 788, - 793, - 799, - 802, - 805, - 808, - 815, - 818, - 821, - 826, - 833, - 840, - 845, - 855, - 861, - 871, - 888, - 895, - 907, - 910, - 916, - 920, - 927, - 931, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 956, - 959, - 967, - 972, - 980, - 986, - 992, - 1002, - 1005, - 1013, - 1016, - 1024, - 1027, - 1035, - 1048, - 1056, - 1067}; +static const yytype_int16 yyrline[] = +{ + 0, 263, 263, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 295, 301, 306, 312, 318, 324, + 330, 337, 343, 351, 361, 376, 377, 381, 387, 396, + 406, 410, 414, 418, 422, 429, 432, 445, 463, 490, + 494, 498, 503, 509, 510, 511, 512, 513, 514, 518, + 531, 537, 544, 550, 558, 561, 565, 572, 576, 580, + 586, 593, 596, 603, 615, 629, 634, 641, 651, 689, + 722, 728, 737, 740, 749, 765, 768, 771, 774, 777, + 785, 788, 793, 799, 802, 805, 808, 815, 818, 821, + 826, 833, 840, 845, 855, 861, 871, 888, 895, 907, + 910, 916, 920, 927, 931, 938, 939, 940, 941, 942, + 943, 944, 945, 946, 947, 948, 949, 950, 951, 956, + 959, 967, 972, 980, 986, 992, 1002, 1005, 1013, 1016, + 1024, 1027, 1035, 1048, 1056, 1067 +}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = {"\"end of file\"", - "error", - "\"invalid token\"", - "SEMICOLON", - "AS", - "ASC", - "BY", - "CREATE", - "DROP", - "EXISTS", - "GROUP", - "HAVING", - "ORDER", - "TABLE", - "TABLES", - "INDEX", - "CALC", - "SELECT", - "DESC", - "SHOW", - "SYNC", - "INSERT", - "DELETE", - "UPDATE", - "LBRACE", - "RBRACE", - "COMMA", - "TRX_BEGIN", - "TRX_COMMIT", - "TRX_ROLLBACK", - "INT_T", - "IN", - "STRING_T", - "FLOAT_T", - "DATE_T", - "TEXT_T", - "VECTOR_T", - "NOT", - "UNIQUE", - "NULL_T", - "LIMIT", - "NULLABLE", - "HELP", - "EXIT", - "DOT", - "INTO", - "VALUES", - "FROM", - "WHERE", - "AND", - "OR", - "SET", - "ON", - "LOAD", - "DATA", - "INFILE", - "EXPLAIN", - "STORAGE", - "FORMAT", - "INNER", - "JOIN", - "EQ", - "LT", - "GT", - "LE", - "GE", - "NE", - "LIKE", - "IS", - "NUMBER", - "FLOAT", - "ID", - "SSS", - "'+'", - "'-'", - "'*'", - "'/'", - "UMINUS", - "$accept", - "commands", - "command_wrapper", - "exit_stmt", - "help_stmt", - "sync_stmt", - "begin_stmt", - "commit_stmt", - "rollback_stmt", - "drop_table_stmt", - "show_tables_stmt", - "desc_table_stmt", - "show_index_stmt", - "create_index_stmt", - "opt_unique", - "attr_list", - "drop_index_stmt", - "create_table_stmt", - "attr_def_list", - "attr_def", - "nullable_constraint", - "type", - "insert_stmt", - "values_list", - "value_list", - "value", - "nonnegative_value", - "storage_format", - "delete_stmt", - "update_stmt", - "set_clauses", - "setClause", - "select_stmt", - "calc_stmt", - "expression_list", - "expression", - "alias", - "aggr_func_expr", - "sub_query_expr", - "rel_attr", - "relation", - "rel_list", - "join_clauses", - "where", - "condition", - "comp_op", - "opt_order_by", - "sort_list", - "sort_unit", - "group_by", - "opt_having", - "opt_limit", - "load_data_stmt", - "explain_stmt", - "set_variable_stmt", - "opt_semicolon", - YY_NULLPTR}; - -static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "HAVING", "ORDER", + "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", + "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "COMMA", "TRX_BEGIN", + "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", "STRING_T", "FLOAT_T", + "DATE_T", "TEXT_T", "VECTOR_T", "NOT", "UNIQUE", "NULL_T", "LIMIT", + "NULLABLE", "HELP", "EXIT", "DOT", "INTO", "VALUES", "FROM", "WHERE", + "AND", "OR", "SET", "ON", "LOAD", "DATA", "INFILE", "EXPLAIN", "STORAGE", + "FORMAT", "INNER", "JOIN", "EQ", "LT", "GT", "LE", "GE", "NE", "LIKE", + "IS", "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", "'*'", "'/'", + "UMINUS", "$accept", "commands", "command_wrapper", "exit_stmt", + "help_stmt", "sync_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", + "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", + "show_index_stmt", "create_index_stmt", "opt_unique", "attr_list", + "drop_index_stmt", "create_table_stmt", "attr_def_list", "attr_def", + "nullable_constraint", "type", "insert_stmt", "values_list", + "value_list", "value", "nonnegative_value", "storage_format", + "delete_stmt", "update_stmt", "set_clauses", "setClause", "select_stmt", + "calc_stmt", "expression_list", "expression", "alias", "aggr_func_expr", + "sub_query_expr", "rel_attr", "relation", "rel_list", "join_clauses", + "where", "condition", "comp_op", "opt_order_by", "sort_list", + "sort_unit", "group_by", "opt_having", "opt_limit", "load_data_stmt", + "explain_stmt", "set_variable_stmt", "opt_semicolon", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif #define YYPACT_NINF (-167) -#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) 0 +#define yytable_value_is_error(Yyn) \ + 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {214, - 0, - 10, - 154, - 154, - -42, - 51, - -167, - -19, - -15, - -31, - -167, - -167, - -167, - -167, - -167, - -17, - 13, - 214, - 58, - 57, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - 41, - -167, - 56, - 45, - 50, - 120, - -167, - -167, - -167, - 6, - -167, - 154, - -167, - -167, - -167, - 5, - -167, - -167, - -167, - 67, - -167, - -167, - 86, - 68, - 69, - 87, - 80, - 88, - -167, - -167, - -167, - -167, - -12, - 71, - -167, - 93, - 154, - 121, - 122, - 154, - -51, - -167, - 78, - -167, - 154, - 154, - 154, - 154, - 124, - 81, - 81, - 102, - 105, - 83, - -23, - 84, - 89, - 99, - 11, - 109, - 91, - 67, - -167, - -167, - 133, - -167, - -167, - -167, - -3, - -3, - -167, - -167, - 154, - -167, - 4, - 105, - -167, - 139, - 142, - -167, - 103, - -9, - -167, - 19, - -167, - -167, - 123, - 90, - 141, - 104, - 152, - -167, - 100, - -167, - -167, - -167, - 112, - 149, - 166, - -23, - 151, - -167, - -167, - 2, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - 143, - 33, - 43, - 154, - 154, - 83, - -167, - -167, - -167, - 169, - -167, - -167, - -167, - -167, - -167, - -167, - 20, - 89, - 158, - 113, - -167, - 163, - 81, - 81, - 182, - 185, - 77, - -167, - 173, - -167, - -167, - -167, - -167, - 154, - 142, - 142, - 54, - 54, - -167, - 127, - 130, - 162, - -167, - -167, - -167, - 141, - 161, - -167, - 144, - 167, - 105, - 15, - -167, - 154, - 142, - 208, - -167, - -23, - -23, - 54, - -167, - 178, - -167, - 213, - -167, - -167, - 14, - 218, - 215, - 142, - 166, - -167, - 43, - 233, - 205, - -167, - 106, - 74, - 152, - -167, - 144, - -167, - 3, - -167, - 154, - 177, - -167, - -167, - -167, - -167, - -167, - 187, - 9, - -167, - 222, - -167, - 81, - -167, - -167, - 154, - -167, - -167}; +static const yytype_int16 yypact[] = +{ + 214, 0, 10, 154, 154, -42, 51, -167, -19, -15, + -31, -167, -167, -167, -167, -167, -17, 13, 214, 58, + 57, -167, -167, -167, -167, -167, -167, -167, -167, -167, + -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, + -167, -167, 41, -167, 56, 45, 50, 120, -167, -167, + -167, 6, -167, 154, -167, -167, -167, 5, -167, -167, + -167, 67, -167, -167, 86, 68, 69, 87, 80, 88, + -167, -167, -167, -167, -12, 71, -167, 93, 154, 121, + 122, 154, -51, -167, 78, -167, 154, 154, 154, 154, + 124, 81, 81, 102, 105, 83, -23, 84, 89, 99, + 11, 109, 91, 67, -167, -167, 133, -167, -167, -167, + -3, -3, -167, -167, 154, -167, 4, 105, -167, 139, + 142, -167, 103, -9, -167, 19, -167, -167, 123, 90, + 141, 104, 152, -167, 100, -167, -167, -167, 112, 149, + 166, -23, 151, -167, -167, 2, -167, -167, -167, -167, + -167, -167, -167, 143, 33, 43, 154, 154, 83, -167, + -167, -167, 169, -167, -167, -167, -167, -167, -167, 20, + 89, 158, 113, -167, 163, 81, 81, 182, 185, 77, + -167, 173, -167, -167, -167, -167, 154, 142, 142, 54, + 54, -167, 127, 130, 162, -167, -167, -167, 141, 161, + -167, 144, 167, 105, 15, -167, 154, 142, 208, -167, + -23, -23, 54, -167, 178, -167, 213, -167, -167, 14, + 218, 215, 142, 166, -167, 43, 233, 205, -167, 106, + 74, 152, -167, 144, -167, 3, -167, 154, 177, -167, + -167, -167, -167, -167, 187, 9, -167, 222, -167, 81, + -167, -167, 154, -167, -167 +}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = {0, - 36, - 0, - 82, - 82, - 0, - 0, - 26, - 0, - 0, - 0, - 27, - 28, - 29, - 25, - 24, - 0, - 0, - 0, - 0, - 0, - 23, - 22, - 15, - 16, - 17, - 18, - 9, - 10, - 11, - 14, - 12, - 13, - 8, - 5, - 7, - 6, - 3, - 4, - 19, - 20, - 21, - 0, - 35, - 0, - 0, - 0, - 82, - 70, - 67, - 68, - 102, - 69, - 0, - 93, - 91, - 80, - 97, - 95, - 96, - 92, - 81, - 32, - 31, - 0, - 0, - 0, - 0, - 0, - 0, - 143, - 1, - 145, - 2, - 71, - 0, - 30, - 0, - 82, - 0, - 0, - 82, - 0, - 90, - 0, - 98, - 0, - 0, - 0, - 0, - 83, - 0, - 0, - 0, - 109, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 101, - 89, - 0, - 103, - 94, - 99, - 85, - 86, - 87, - 88, - 82, - 104, - 97, - 109, - 33, - 0, - 0, - 73, - 0, - 109, - 75, - 0, - 144, - 64, - 0, - 0, - 45, - 0, - 0, - 44, - 0, - 39, - 100, - 84, - 0, - 105, - 136, - 0, - 59, - 127, - 125, - 0, - 115, - 116, - 117, - 118, - 119, - 120, - 123, - 121, - 0, - 110, - 0, - 0, - 0, - 74, - 65, - 66, - 0, - 53, - 54, - 55, - 56, - 57, - 58, - 52, - 0, - 0, - 0, - 43, - 0, - 0, - 0, - 0, - 138, - 0, - 62, - 0, - 128, - 126, - 124, - 122, - 0, - 0, - 0, - 112, - 77, - 76, - 0, - 0, - 0, - 51, - 50, - 48, - 45, - 71, - 72, - 0, - 0, - 109, - 97, - 106, - 82, - 0, - 129, - 60, - 0, - 0, - 111, - 113, - 114, - 142, - 0, - 49, - 46, - 42, - 37, - 0, - 0, - 136, - 137, - 139, - 0, - 140, - 63, - 0, - 52, - 0, - 41, - 0, - 34, - 107, - 79, - 0, - 0, - 78, - 61, - 47, - 40, - 38, - 0, - 133, - 130, - 131, - 141, - 0, - 135, - 134, - 0, - 108, - 132}; +static const yytype_uint8 yydefact[] = +{ + 0, 36, 0, 82, 82, 0, 0, 26, 0, 0, + 0, 27, 28, 29, 25, 24, 0, 0, 0, 0, + 0, 23, 22, 15, 16, 17, 18, 9, 10, 11, + 14, 12, 13, 8, 5, 7, 6, 3, 4, 19, + 20, 21, 0, 35, 0, 0, 0, 82, 70, 67, + 68, 102, 69, 0, 93, 91, 80, 97, 95, 96, + 92, 81, 32, 31, 0, 0, 0, 0, 0, 0, + 143, 1, 145, 2, 71, 0, 30, 0, 82, 0, + 0, 82, 0, 90, 0, 98, 0, 0, 0, 0, + 83, 0, 0, 0, 109, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 101, 89, 0, 103, 94, 99, + 85, 86, 87, 88, 82, 104, 97, 109, 33, 0, + 0, 73, 0, 109, 75, 0, 144, 64, 0, 0, + 45, 0, 0, 44, 0, 39, 100, 84, 0, 105, + 136, 0, 59, 127, 125, 0, 115, 116, 117, 118, + 119, 120, 123, 121, 0, 110, 0, 0, 0, 74, + 65, 66, 0, 53, 54, 55, 56, 57, 58, 52, + 0, 0, 0, 43, 0, 0, 0, 0, 138, 0, + 62, 0, 128, 126, 124, 122, 0, 0, 0, 112, + 77, 76, 0, 0, 0, 51, 50, 48, 45, 71, + 72, 0, 0, 109, 97, 106, 82, 0, 129, 60, + 0, 0, 111, 113, 114, 142, 0, 49, 46, 42, + 37, 0, 0, 136, 137, 139, 0, 140, 63, 0, + 52, 0, 41, 0, 34, 107, 79, 0, 0, 78, + 61, 47, 40, 38, 0, 133, 130, 131, 141, 0, + 135, 134, 0, 108, 132 +}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-167, - -167, - 231, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - -167, - 17, - -167, - -167, - 53, - 82, - 23, - -167, - -167, - -167, - 44, - -91, - -93, - 55, - -167, - -167, - -167, - 101, - -45, - -167, - -4, - -52, - 201, - -167, - -167, - -167, - -85, - 85, - 22, - -113, - -166, - 108, - -167, - 8, - -167, - 40, - -167, - -167, - -167, - -167, - -167, - -167}; +static const yytype_int16 yypgoto[] = +{ + -167, -167, 231, -167, -167, -167, -167, -167, -167, -167, + -167, -167, -167, -167, -167, 17, -167, -167, 53, 82, + 23, -167, -167, -167, 44, -91, -93, 55, -167, -167, + -167, 101, -45, -167, -4, -52, 201, -167, -167, -167, + -85, 85, 22, -113, -166, 108, -167, 8, -167, 40, + -167, -167, -167, -167, -167, -167 +}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = {0, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 44, - 221, - 32, - 33, - 171, - 130, - 197, - 169, - 34, - 142, - 179, - 180, - 55, - 100, - 35, - 36, - 123, - 124, - 37, - 38, - 56, - 57, - 139, - 58, - 59, - 60, - 202, - 117, - 203, - 121, - 155, - 156, - 227, - 246, - 247, - 178, - 208, - 239, - 39, - 40, - 41, - 73}; +static const yytype_uint8 yydefgoto[] = +{ + 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 44, 221, 32, 33, 171, 130, + 197, 169, 34, 142, 179, 180, 55, 100, 35, 36, + 123, 124, 37, 38, 56, 57, 139, 58, 59, 60, + 202, 117, 203, 121, 155, 156, 227, 246, 247, 178, + 208, 239, 39, 40, 41, 73 +}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = {61, - 83, - 79, - 127, - 140, - 126, - 116, - 118, - 84, - 84, - 159, - 182, - 98, - 42, - 250, - 132, - 48, - 158, - 231, - 84, - 107, - 213, - 214, - 45, - 108, - 46, - 65, - 251, - 78, - 62, - 81, - 78, - 66, - 183, - 110, - 111, - 112, - 113, - 43, - 120, - 67, - 225, - 143, - 80, - 193, - 99, - 49, - 50, - 127, - 52, - 82, - 125, - 187, - 188, - 68, - 133, - 235, - 194, - 71, - 195, - 72, - 196, - 244, - 138, - 144, - 63, - 64, - 69, - 154, - 184, - 145, - 75, - 88, - 89, - 103, - 85, - 85, - 106, - 86, - 87, - 88, - 89, - 86, - 87, - 88, - 89, - 85, - 173, - 160, - 161, - 223, - 204, - 187, - 188, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 209, - 210, - 189, - 190, - 86, - 87, - 88, - 89, - 137, - 194, - 74, - 195, - 91, - 196, - 76, - 127, - 127, - 228, - 163, - 77, - 164, - 165, - 166, - 167, - 168, - 86, - 87, - 88, - 89, - 240, - 210, - 92, - 212, - 154, - 154, - 78, - 95, - 93, - 94, - 96, - 101, - 97, - 47, - 102, - 104, - 105, - 119, - 109, - 114, - 143, - 115, - 120, - 122, - 154, - 128, - 131, - 136, - 48, - 129, - 134, - 135, - 141, - 157, - 172, - 47, - 170, - 162, - 78, - 154, - 174, - 175, - 144, - 232, - 176, - 177, - 181, - 47, - 145, - 185, - 48, - 192, - 199, - 200, - 245, - 242, - 201, - 206, - 49, - 50, - 51, - 52, - 48, - 53, - 54, - 207, - 211, - 215, - 216, - 245, - 217, - 224, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 49, - 50, - 51, - 52, - 220, - 53, - 54, - 99, - 222, - 226, - 1, - 2, - 49, - 50, - 51, - 52, - 187, - 53, - 54, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 230, - 237, - 234, - 11, - 12, - 13, - 233, - 238, - 248, - 249, - 252, - 70, - 243, - 218, - 198, - 241, - 219, - 229, - 14, - 15, - 90, - 191, - 254, - 205, - 186, - 236, - 0, - 16, - 0, - 17, - 0, - 0, - 18, - 253}; - -static const yytype_int16 yycheck[] = {4, - 53, - 47, - 96, - 117, - 96, - 91, - 92, - 4, - 4, - 123, - 9, - 24, - 13, - 5, - 4, - 39, - 26, - 4, - 4, - 71, - 187, - 188, - 13, - 75, - 15, - 45, - 18, - 17, - 71, - 24, - 17, - 47, - 31, - 86, - 87, - 88, - 89, - 38, - 48, - 71, - 207, - 9, - 47, - 24, - 57, - 69, - 70, - 141, - 72, - 44, - 74, - 49, - 50, - 71, - 100, - 222, - 37, - 0, - 39, - 3, - 41, - 59, - 59, - 31, - 14, - 15, - 54, - 120, - 67, - 37, - 15, - 75, - 76, - 78, - 71, - 71, - 81, - 73, - 74, - 75, - 76, - 73, - 74, - 75, - 76, - 71, - 132, - 69, - 70, - 203, - 176, - 49, - 50, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 25, - 26, - 156, - 157, - 73, - 74, - 75, - 76, - 114, - 37, - 71, - 39, - 47, - 41, - 71, - 210, - 211, - 210, - 30, - 71, - 32, - 33, - 34, - 35, - 36, - 73, - 74, - 75, - 76, - 25, - 26, - 47, - 186, - 187, - 188, - 17, - 51, - 71, - 71, - 61, - 71, - 55, - 24, - 52, - 25, - 25, - 46, - 71, - 26, - 9, - 71, - 48, - 71, - 207, - 72, - 58, - 25, - 39, - 71, - 52, - 71, - 24, - 61, - 61, - 24, - 26, - 45, - 17, - 222, - 71, - 60, - 31, - 219, - 26, - 10, - 26, - 24, - 37, - 37, - 39, - 13, - 25, - 71, - 237, - 231, - 24, - 6, - 69, - 70, - 71, - 72, - 39, - 74, - 75, - 11, - 24, - 71, - 69, - 252, - 39, - 206, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 71, - 74, - 75, - 57, - 52, - 12, - 7, - 8, - 69, - 70, - 71, - 72, - 49, - 74, - 75, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 25, - 6, - 25, - 27, - 28, - 29, - 26, - 40, - 69, - 60, - 26, - 18, - 233, - 198, - 170, - 230, - 199, - 211, - 42, - 43, - 57, - 158, - 252, - 176, - 154, - 223, - -1, - 51, - -1, - 53, - -1, - -1, - 56, - 249}; +static const yytype_uint8 yytable[] = +{ + 61, 83, 79, 127, 140, 126, 116, 118, 84, 84, + 159, 182, 98, 42, 250, 132, 48, 158, 231, 84, + 107, 213, 214, 45, 108, 46, 65, 251, 78, 62, + 81, 78, 66, 183, 110, 111, 112, 113, 43, 120, + 67, 225, 143, 80, 193, 99, 49, 50, 127, 52, + 82, 125, 187, 188, 68, 133, 235, 194, 71, 195, + 72, 196, 244, 138, 144, 63, 64, 69, 154, 184, + 145, 75, 88, 89, 103, 85, 85, 106, 86, 87, + 88, 89, 86, 87, 88, 89, 85, 173, 160, 161, + 223, 204, 187, 188, 146, 147, 148, 149, 150, 151, + 152, 153, 209, 210, 189, 190, 86, 87, 88, 89, + 137, 194, 74, 195, 91, 196, 76, 127, 127, 228, + 163, 77, 164, 165, 166, 167, 168, 86, 87, 88, + 89, 240, 210, 92, 212, 154, 154, 78, 95, 93, + 94, 96, 101, 97, 47, 102, 104, 105, 119, 109, + 114, 143, 115, 120, 122, 154, 128, 131, 136, 48, + 129, 134, 135, 141, 157, 172, 47, 170, 162, 78, + 154, 174, 175, 144, 232, 176, 177, 181, 47, 145, + 185, 48, 192, 199, 200, 245, 242, 201, 206, 49, + 50, 51, 52, 48, 53, 54, 207, 211, 215, 216, + 245, 217, 224, 146, 147, 148, 149, 150, 151, 152, + 153, 49, 50, 51, 52, 220, 53, 54, 99, 222, + 226, 1, 2, 49, 50, 51, 52, 187, 53, 54, + 3, 4, 5, 6, 7, 8, 9, 10, 230, 237, + 234, 11, 12, 13, 233, 238, 248, 249, 252, 70, + 243, 218, 198, 241, 219, 229, 14, 15, 90, 191, + 254, 205, 186, 236, 0, 16, 0, 17, 0, 0, + 18, 253 +}; + +static const yytype_int16 yycheck[] = +{ + 4, 53, 47, 96, 117, 96, 91, 92, 4, 4, + 123, 9, 24, 13, 5, 4, 39, 26, 4, 4, + 71, 187, 188, 13, 75, 15, 45, 18, 17, 71, + 24, 17, 47, 31, 86, 87, 88, 89, 38, 48, + 71, 207, 9, 47, 24, 57, 69, 70, 141, 72, + 44, 74, 49, 50, 71, 100, 222, 37, 0, 39, + 3, 41, 59, 59, 31, 14, 15, 54, 120, 67, + 37, 15, 75, 76, 78, 71, 71, 81, 73, 74, + 75, 76, 73, 74, 75, 76, 71, 132, 69, 70, + 203, 176, 49, 50, 61, 62, 63, 64, 65, 66, + 67, 68, 25, 26, 156, 157, 73, 74, 75, 76, + 114, 37, 71, 39, 47, 41, 71, 210, 211, 210, + 30, 71, 32, 33, 34, 35, 36, 73, 74, 75, + 76, 25, 26, 47, 186, 187, 188, 17, 51, 71, + 71, 61, 71, 55, 24, 52, 25, 25, 46, 71, + 26, 9, 71, 48, 71, 207, 72, 58, 25, 39, + 71, 52, 71, 24, 61, 61, 24, 26, 45, 17, + 222, 71, 60, 31, 219, 26, 10, 26, 24, 37, + 37, 39, 13, 25, 71, 237, 231, 24, 6, 69, + 70, 71, 72, 39, 74, 75, 11, 24, 71, 69, + 252, 39, 206, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 71, 74, 75, 57, 52, + 12, 7, 8, 69, 70, 71, 72, 49, 74, 75, + 16, 17, 18, 19, 20, 21, 22, 23, 25, 6, + 25, 27, 28, 29, 26, 40, 69, 60, 26, 18, + 233, 198, 170, 230, 199, 211, 42, 43, 57, 158, + 252, 176, 154, 223, -1, 51, -1, 53, -1, -1, + 56, 249 +}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = {0, - 7, - 8, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 27, - 28, - 29, - 42, - 43, - 51, - 53, - 56, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 94, - 95, - 100, - 106, - 107, - 110, - 111, - 130, - 131, - 132, - 13, - 38, - 92, - 13, - 15, - 24, - 39, - 69, - 70, - 71, - 72, - 74, - 75, - 104, - 112, - 113, - 115, - 116, - 117, - 112, - 71, - 14, - 15, - 45, - 47, - 71, - 71, - 54, - 80, - 0, - 3, - 133, - 71, - 15, - 71, - 71, - 17, - 110, - 112, - 24, - 44, - 113, - 4, - 71, - 73, - 74, - 75, - 76, - 114, - 47, - 47, - 71, - 71, - 51, - 61, - 55, - 24, - 57, - 105, - 71, - 52, - 112, - 25, - 25, - 112, - 71, - 75, - 71, - 113, - 113, - 113, - 113, - 26, - 71, - 118, - 119, - 118, - 46, - 48, - 121, - 71, - 108, - 109, - 74, - 103, - 104, - 72, - 71, - 97, - 58, - 4, - 110, - 52, - 71, - 25, - 112, - 59, - 114, - 121, - 24, - 101, - 9, - 31, - 37, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 113, - 122, - 123, - 61, - 26, - 121, - 69, - 70, - 45, - 30, - 32, - 33, - 34, - 35, - 36, - 99, - 26, - 96, - 61, - 110, - 71, - 60, - 26, - 10, - 127, - 102, - 103, - 26, - 9, - 31, - 67, - 37, - 123, - 49, - 50, - 113, - 113, - 109, - 13, - 24, - 37, - 39, - 41, - 98, - 97, - 25, - 71, - 24, - 118, - 120, - 118, - 119, - 6, - 11, - 128, - 25, - 26, - 24, - 113, - 122, - 122, - 71, - 69, - 39, - 96, - 105, - 71, - 93, - 52, - 121, - 112, - 122, - 12, - 124, - 103, - 102, - 25, - 4, - 110, - 26, - 25, - 122, - 127, - 6, - 40, - 129, - 25, - 98, - 110, - 93, - 59, - 113, - 125, - 126, - 69, - 60, - 5, - 18, - 26, - 120, - 125}; +static const yytype_uint8 yystos[] = +{ + 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, + 23, 27, 28, 29, 42, 43, 51, 53, 56, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 94, 95, 100, 106, 107, 110, 111, 130, + 131, 132, 13, 38, 92, 13, 15, 24, 39, 69, + 70, 71, 72, 74, 75, 104, 112, 113, 115, 116, + 117, 112, 71, 14, 15, 45, 47, 71, 71, 54, + 80, 0, 3, 133, 71, 15, 71, 71, 17, 110, + 112, 24, 44, 113, 4, 71, 73, 74, 75, 76, + 114, 47, 47, 71, 71, 51, 61, 55, 24, 57, + 105, 71, 52, 112, 25, 25, 112, 71, 75, 71, + 113, 113, 113, 113, 26, 71, 118, 119, 118, 46, + 48, 121, 71, 108, 109, 74, 103, 104, 72, 71, + 97, 58, 4, 110, 52, 71, 25, 112, 59, 114, + 121, 24, 101, 9, 31, 37, 61, 62, 63, 64, + 65, 66, 67, 68, 113, 122, 123, 61, 26, 121, + 69, 70, 45, 30, 32, 33, 34, 35, 36, 99, + 26, 96, 61, 110, 71, 60, 26, 10, 127, 102, + 103, 26, 9, 31, 67, 37, 123, 49, 50, 113, + 113, 109, 13, 24, 37, 39, 41, 98, 97, 25, + 71, 24, 118, 120, 118, 119, 6, 11, 128, 25, + 26, 24, 113, 122, 122, 71, 69, 39, 96, 105, + 71, 93, 52, 121, 112, 122, 12, 124, 103, 102, + 25, 4, 110, 26, 25, 122, 127, 6, 40, 129, + 25, 98, 110, 93, 59, 113, 125, 126, 69, 60, + 5, 18, 26, 120, 125 +}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = {0, - 78, - 79, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 92, - 93, - 93, - 94, - 95, - 95, - 95, - 95, - 95, - 96, - 96, - 97, - 97, - 98, - 98, - 98, - 98, - 99, - 99, - 99, - 99, - 99, - 99, - 100, - 101, - 101, - 102, - 102, - 103, - 103, - 103, - 104, - 104, - 104, - 104, - 105, - 105, - 106, - 107, - 108, - 108, - 109, - 110, - 110, - 111, - 111, - 112, - 112, - 112, - 113, - 113, - 113, - 113, - 113, - 113, - 113, - 113, - 113, - 113, - 113, - 113, - 114, - 114, - 114, - 115, - 116, - 117, - 117, - 118, - 119, - 119, - 120, - 120, - 121, - 121, - 122, - 122, - 122, - 122, - 123, - 123, - 123, - 123, - 123, - 123, - 123, - 123, - 123, - 123, - 123, - 123, - 123, - 123, - 124, - 124, - 125, - 125, - 126, - 126, - 126, - 127, - 127, - 128, - 128, - 129, - 129, - 130, - 131, - 132, - 133}; +static const yytype_uint8 yyr1[] = +{ + 0, 78, 79, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 92, 93, 93, 94, + 95, 95, 95, 95, 95, 96, 96, 97, 97, 98, + 98, 98, 98, 99, 99, 99, 99, 99, 99, 100, + 101, 101, 102, 102, 103, 103, 103, 104, 104, 104, + 104, 105, 105, 106, 107, 108, 108, 109, 110, 110, + 111, 111, 112, 112, 112, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 114, 114, 114, + 115, 116, 117, 117, 118, 119, 119, 120, 120, 121, + 121, 122, 122, 122, 122, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 124, + 124, 125, 125, 126, 126, 126, 127, 127, 128, 128, + 129, 129, 130, 131, 132, 133 +}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = {0, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 3, - 2, - 2, - 4, - 9, - 1, - 0, - 1, - 3, - 5, - 10, - 9, - 8, - 6, - 5, - 0, - 3, - 6, - 3, - 2, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 5, - 3, - 5, - 1, - 3, - 1, - 2, - 2, - 1, - 1, - 1, - 1, - 0, - 4, - 4, - 5, - 1, - 3, - 3, - 9, - 9, - 2, - 2, - 0, - 2, - 4, - 3, - 3, - 3, - 3, - 3, - 2, - 1, - 1, - 1, - 3, - 1, - 1, - 0, - 1, - 2, - 4, - 3, - 1, - 3, - 1, - 2, - 4, - 3, - 6, - 0, - 2, - 3, - 2, - 3, - 3, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 0, - 3, - 1, - 3, - 1, - 2, - 2, - 0, - 3, - 0, - 2, - 0, - 2, - 7, - 2, - 4, - 1}; - -enum +static const yytype_int8 yyr2[] = { - YYENOMEM = -2 + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, + 10, 9, 8, 6, 5, 0, 3, 6, 3, 2, + 1, 1, 0, 1, 1, 1, 1, 1, 1, 5, + 3, 5, 1, 3, 1, 2, 2, 1, 1, 1, + 1, 0, 4, 4, 5, 1, 3, 3, 9, 9, + 2, 2, 0, 2, 4, 3, 3, 3, 3, 3, + 2, 1, 1, 1, 3, 1, 1, 0, 1, 2, + 4, 3, 1, 3, 1, 2, 4, 3, 6, 0, + 2, 3, 2, 3, 3, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 2, 1, 2, 1, 2, 0, + 3, 1, 3, 1, 2, 2, 0, 3, 0, 2, + 0, 2, 7, 2, 4, 1 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK(yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } else { \ - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -3039,131 +1046,151 @@ enum the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } else { \ - (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ - } \ - while (0) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* Enable debugging if requested. */ #if YYDEBUG -#ifndef YYFPRINTF -#include /* INFRINGES ON USER NAME SPACE */ -#define YYFPRINTF fprintf -#endif +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -#define YYDPRINTF(Args) \ - do { \ - if (yydebug) \ - YYFPRINTF Args; \ - } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YYLOCATION_PRINT +# ifndef YYLOCATION_PRINT -#if defined YY_LOCATION_PRINT +# if defined YY_LOCATION_PRINT -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) { - res += YYFPRINTF(yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF(yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) { - if (yylocp->first_line < yylocp->last_line) { - res += YYFPRINTF(yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF(yyo, ".%d", end_col); - } else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF(yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } return res; } -#define YYLOCATION_PRINT yy_location_print_ +# define YYLOCATION_PRINT yy_location_print_ -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -#else +# else -#define YYLOCATION_PRINT(File, Loc) ((void)0) -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT YYLOCATION_PRINT +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT + +# endif +# endif /* !defined YYLOCATION_PRINT */ -#endif -#endif /* !defined YYLOCATION_PRINT */ -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ - do { \ - if (yydebug) { \ - YYFPRINTF(stderr, "%s ", Title); \ - yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF(stderr, "\n"); \ - } \ - } while (0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { FILE *yyoutput = yyo; - YY_USE(yyoutput); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YYLOCATION_PRINT(yyo, yylocationp); - YYFPRINTF(yyo, ": "); - yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF(yyo, ")"); + YYLOCATION_PRINT (yyo, yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -3171,66 +1198,70 @@ static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *co | TOP (included). | `------------------------------------------------------------------*/ -static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF(stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) { - int yybot = *yybottom; - YYFPRINTF(stderr, " %d", yybot); - } - YYFPRINTF(stderr, "\n"); + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); } -#define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print((Bottom), (Top)); \ - } while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, - ParsedSqlResult *sql_result, void *scanner) +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF(stderr, " $%d = ", yyi + 1); - yy_symbol_print(stderr, - YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), - sql_string, - sql_result, - scanner); - YYFPRINTF(stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); + YYFPRINTF (stderr, "\n"); + } } -#define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ - } while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -#define YYDPRINTF(Args) ((void)0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -#define YY_STACK_PRINT(Bottom, Top) -#define YY_REDUCE_PRINT(Rule) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ + /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -3241,15 +1272,16 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif + /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -3258,59 +1290,69 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default(yyn)) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } + + + #ifndef yystrlen -#if defined __GLIBC__ && defined _STRING_H -#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) -#else +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ -static YYPTRDIFF_T yystrlen(const char *yystr) +static YYPTRDIFF_T +yystrlen (const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -#endif +# endif #endif #ifndef yystpcpy -#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -#define yystpcpy stpcpy -#else +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char *yystpcpy(char *yydest, const char *yysrc) +static char * +yystpcpy (char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -3318,7 +1360,7 @@ static char *yystpcpy(char *yydest, const char *yysrc) return yyd - 1; } -#endif +# endif #endif #ifndef yytnamerr @@ -3329,45 +1371,52 @@ static char *yystpcpy(char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) { - if (*yystr == '"') { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) { - case '\'': - case ',': goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes:; - } + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } if (yyres) - return yystpcpy(yyres, yystr) - yyres; + return yystpcpy (yyres, yystr) - yyres; else - return yystrlen(yystr); + return yystrlen (yystr); } #endif -static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -3394,17 +1443,19 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -3416,12 +1467,11 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) { - enum - { - YYARGS_MAX = 5 - }; + enum { YYARGS_MAX = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -3431,13 +1481,16 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) { -#define YYCASE_(N, S) \ - case N: yyformat = S; break + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -3446,118 +1499,134 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen(yyformat) - 2 * yycount + 1; + yysize = yystrlen (yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) { - YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) { - *yymsg_alloc = 2 * yysize; - if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } else { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } } return 0; } + /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, - const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YY_USE(yyvaluep); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + + + + /*----------. | yyparse. | `----------*/ -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +int +yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - /* Lookahead token kind. */ - int yychar; - - /* The semantic value of the lookahead symbol. */ - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ - YY_INITIAL_VALUE(static YYSTYPE yyval_default;) - YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); - - /* Location data for the lookahead symbol. */ - static YYLTYPE yyloc_default -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = {1, 1, 1, 1} -#endif - ; - YYLTYPE yylloc = yyloc_default; +/* Lookahead token kind. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs = 0; + /* Number of syntax errors so far. */ + int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -3573,23 +1642,24 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF((stderr, "Starting parse\n")); + YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -3598,90 +1668,93 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) have just been pushed. So pushing a state here evens the stacks. */ yyssp++; + /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF((stderr, "Entering state %d\n", yystate)); - YY_ASSERT(0 <= yystate && yystate < YYNSTATES); + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST(yy_state_t, yystate); + *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else - { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -#if defined yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow(YY_("memory exhausted"), - &yyss1, - yysize * YYSIZEOF(*yyssp), - &yyvs1, - yysize * YYSIZEOF(*yyvsp), - &yyls1, - yysize * YYSIZEOF(*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -#else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); - if (!yyptr) + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) YYNOMEM; - YYSTACK_RELOCATE(yyss_alloc, yyss); - YYSTACK_RELOCATE(yyvs_alloc, yyvs); - YYSTACK_RELOCATE(yyls_alloc, yyls); -#undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE(yyss1); - } -#endif + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + YYNOMEM; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ @@ -3691,34 +1764,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default(yyn)) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) { - YYDPRINTF((stderr, "Reading a token\n")); - yychar = yylex(&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF((stderr, "Now at end of input.\n")); - } else if (yychar == YYerror) { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { - yytoken = YYTRANSLATE(yychar); - YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -3726,12 +1805,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) { - if (yytable_value_is_error(yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -3739,7 +1819,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3750,6 +1830,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yychar = YYEMPTY; goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -3759,6 +1840,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) goto yyerrlab; goto yyreduce; + /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -3774,168 +1856,164 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1 - yylen]; + yyval = yyvsp[1-yylen]; /* Default location. */ - YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT(yyn); - switch (yyn) { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 264 "yacc_sql.y" + YY_REDUCE_PRINT (yyn); + switch (yyn) { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } + case 2: /* commands: command_wrapper opt_semicolon */ +#line 264 "yacc_sql.y" + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } #line 1874 "yacc_sql.cpp" break; - case 24: /* exit_stmt: EXIT */ + case 24: /* exit_stmt: EXIT */ #line 295 "yacc_sql.y" - { + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } #line 1883 "yacc_sql.cpp" break; - case 25: /* help_stmt: HELP */ + case 25: /* help_stmt: HELP */ #line 301 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } #line 1891 "yacc_sql.cpp" break; - case 26: /* sync_stmt: SYNC */ + case 26: /* sync_stmt: SYNC */ #line 306 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } #line 1899 "yacc_sql.cpp" break; - case 27: /* begin_stmt: TRX_BEGIN */ + case 27: /* begin_stmt: TRX_BEGIN */ #line 312 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } #line 1907 "yacc_sql.cpp" break; - case 28: /* commit_stmt: TRX_COMMIT */ + case 28: /* commit_stmt: TRX_COMMIT */ #line 318 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } #line 1915 "yacc_sql.cpp" break; - case 29: /* rollback_stmt: TRX_ROLLBACK */ + case 29: /* rollback_stmt: TRX_ROLLBACK */ #line 324 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } #line 1923 "yacc_sql.cpp" break; - case 30: /* drop_table_stmt: DROP TABLE ID */ + case 30: /* drop_table_stmt: DROP TABLE ID */ #line 330 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1933 "yacc_sql.cpp" break; - case 31: /* show_tables_stmt: SHOW TABLES */ + case 31: /* show_tables_stmt: SHOW TABLES */ #line 337 "yacc_sql.y" - { + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } #line 1941 "yacc_sql.cpp" break; - case 32: /* desc_table_stmt: DESC ID */ + case 32: /* desc_table_stmt: DESC ID */ #line 343 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1951 "yacc_sql.cpp" break; - case 33: /* show_index_stmt: SHOW INDEX FROM relation */ + case 33: /* show_index_stmt: SHOW INDEX FROM relation */ #line 352 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 1962 "yacc_sql.cpp" break; - case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ + case 34: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ #line 362 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } #line 1978 "yacc_sql.cpp" break; - case 35: /* opt_unique: UNIQUE */ + case 35: /* opt_unique: UNIQUE */ #line 376 "yacc_sql.y" - { - (yyval.unique) = true; - } + { (yyval.unique) = true; } #line 1984 "yacc_sql.cpp" break; - case 36: /* opt_unique: %empty */ + case 36: /* opt_unique: %empty */ #line 377 "yacc_sql.y" - { - (yyval.unique) = false; - } + { (yyval.unique) = false; } #line 1990 "yacc_sql.cpp" break; - case 37: /* attr_list: ID */ + case 37: /* attr_list: ID */ #line 382 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } #line 2000 "yacc_sql.cpp" break; - case 38: /* attr_list: ID COMMA attr_list */ + case 38: /* attr_list: ID COMMA attr_list */ #line 388 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list) - ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } #line 2010 "yacc_sql.cpp" break; - case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ + case 39: /* drop_index_stmt: DROP INDEX ID ON ID */ #line 397 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); @@ -3943,52 +2021,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2022 "yacc_sql.cpp" break; - case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ + case 40: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ #line 407 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node( - (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } #line 2030 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ + case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ #line 411 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node( - (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } #line 2038 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ + case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ #line 415 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node( - (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); + (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } #line 2046 "yacc_sql.cpp" break; - case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ + case 43: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ #line 419 "yacc_sql.y" { - (yyval.sql_node) = - create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } #line 2054 "yacc_sql.cpp" break; - case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ + case 44: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ #line 423 "yacc_sql.y" { - (yyval.sql_node) = - create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } #line 2062 "yacc_sql.cpp" break; - case 45: /* attr_def_list: %empty */ + case 45: /* attr_def_list: %empty */ #line 429 "yacc_sql.y" { (yyval.attr_infos) = nullptr; @@ -3996,7 +2069,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2070 "yacc_sql.cpp" break; - case 46: /* attr_def_list: COMMA attr_def attr_def_list */ + case 46: /* attr_def_list: COMMA attr_def attr_def_list */ #line 433 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { @@ -4010,10 +2083,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2084 "yacc_sql.cpp" break; - case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ + case 47: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ #line 446 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->name = (yyvsp[-5].string); (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); if ((yyval.attr_info)->type == AttrType::CHARS) { @@ -4032,10 +2105,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2106 "yacc_sql.cpp" break; - case 48: /* attr_def: ID type nullable_constraint */ + case 48: /* attr_def: ID type nullable_constraint */ #line 464 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -4045,7 +2118,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } else if ((yyval.attr_info)->type == AttrType::DATES) { (yyval.attr_info)->length = sizeof(int); } else if ((yyval.attr_info)->type == AttrType::CHARS) { - (yyval.attr_info)->length = 4; // miniob🀄AttrType::CHARS默认长度为4 + (yyval.attr_info)->length = 4; // miniob🀄AttrType::CHARS默认长度为4 } else if ((yyval.attr_info)->type == AttrType::TEXTS) { (yyval.attr_info)->length = 65535; } else { @@ -4060,7 +2133,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2134 "yacc_sql.cpp" break; - case 49: /* nullable_constraint: NOT NULL_T */ + case 49: /* nullable_constraint: NOT NULL_T */ #line 491 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false @@ -4068,7 +2141,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2142 "yacc_sql.cpp" break; - case 50: /* nullable_constraint: NULLABLE */ + case 50: /* nullable_constraint: NULLABLE */ #line 495 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 @@ -4076,7 +2149,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2150 "yacc_sql.cpp" break; - case 51: /* nullable_constraint: NULL_T */ + case 51: /* nullable_constraint: NULL_T */ #line 499 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 @@ -4084,7 +2157,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2158 "yacc_sql.cpp" break; - case 52: /* nullable_constraint: %empty */ + case 52: /* nullable_constraint: %empty */ #line 503 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL @@ -4092,58 +2165,46 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2166 "yacc_sql.cpp" break; - case 53: /* type: INT_T */ + case 53: /* type: INT_T */ #line 509 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::INTS); - } + { (yyval.number) = static_cast(AttrType::INTS); } #line 2172 "yacc_sql.cpp" break; - case 54: /* type: STRING_T */ + case 54: /* type: STRING_T */ #line 510 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::CHARS); - } + { (yyval.number) = static_cast(AttrType::CHARS); } #line 2178 "yacc_sql.cpp" break; - case 55: /* type: FLOAT_T */ + case 55: /* type: FLOAT_T */ #line 511 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::FLOATS); - } + { (yyval.number) = static_cast(AttrType::FLOATS); } #line 2184 "yacc_sql.cpp" break; - case 56: /* type: DATE_T */ + case 56: /* type: DATE_T */ #line 512 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::DATES); - } + { (yyval.number) = static_cast(AttrType::DATES); } #line 2190 "yacc_sql.cpp" break; - case 57: /* type: TEXT_T */ + case 57: /* type: TEXT_T */ #line 513 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::TEXTS); - } + { (yyval.number) = static_cast(AttrType::TEXTS); } #line 2196 "yacc_sql.cpp" break; - case 58: /* type: VECTOR_T */ + case 58: /* type: VECTOR_T */ #line 514 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::VECTORS); - } + { (yyval.number) = static_cast(AttrType::VECTORS); } #line 2202 "yacc_sql.cpp" break; - case 59: /* insert_stmt: INSERT INTO ID VALUES values_list */ + case 59: /* insert_stmt: INSERT INTO ID VALUES values_list */ #line 519 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -4154,7 +2215,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2216 "yacc_sql.cpp" break; - case 60: /* values_list: LBRACE value_list RBRACE */ + case 60: /* values_list: LBRACE value_list RBRACE */ #line 532 "yacc_sql.y" { (yyval.values_list) = new std::vector>; @@ -4164,7 +2225,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2226 "yacc_sql.cpp" break; - case 61: /* values_list: values_list COMMA LBRACE value_list RBRACE */ + case 61: /* values_list: values_list COMMA LBRACE value_list RBRACE */ #line 538 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); @@ -4173,7 +2234,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2235 "yacc_sql.cpp" break; - case 62: /* value_list: value */ + case 62: /* value_list: value */ #line 545 "yacc_sql.y" { (yyval.value_list) = new std::vector; @@ -4183,7 +2244,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2245 "yacc_sql.cpp" break; - case 63: /* value_list: value_list COMMA value */ + case 63: /* value_list: value_list COMMA value */ #line 551 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); @@ -4192,54 +2253,54 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2254 "yacc_sql.cpp" break; - case 64: /* value: nonnegative_value */ + case 64: /* value: nonnegative_value */ #line 558 "yacc_sql.y" - { + { (yyval.value) = (yyvsp[0].value); } #line 2262 "yacc_sql.cpp" break; - case 65: /* value: '-' NUMBER */ + case 65: /* value: '-' NUMBER */ #line 561 "yacc_sql.y" - { + { (yyval.value) = new Value(-(yyvsp[0].number)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } #line 2271 "yacc_sql.cpp" break; - case 66: /* value: '-' FLOAT */ + case 66: /* value: '-' FLOAT */ #line 565 "yacc_sql.y" - { + { (yyval.value) = new Value(-(yyvsp[0].floats)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } #line 2280 "yacc_sql.cpp" break; - case 67: /* nonnegative_value: NUMBER */ + case 67: /* nonnegative_value: NUMBER */ #line 572 "yacc_sql.y" - { + { (yyval.value) = new Value((yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2289 "yacc_sql.cpp" break; - case 68: /* nonnegative_value: FLOAT */ + case 68: /* nonnegative_value: FLOAT */ #line 576 "yacc_sql.y" - { + { (yyval.value) = new Value((yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } #line 2298 "yacc_sql.cpp" break; - case 69: /* nonnegative_value: SSS */ + case 69: /* nonnegative_value: SSS */ #line 580 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); + { + char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); @@ -4247,15 +2308,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2309 "yacc_sql.cpp" break; - case 70: /* nonnegative_value: NULL_T */ + case 70: /* nonnegative_value: NULL_T */ #line 586 "yacc_sql.y" - { + { (yyval.value) = new Value(NullValue()); } #line 2317 "yacc_sql.cpp" break; - case 71: /* storage_format: %empty */ + case 71: /* storage_format: %empty */ #line 593 "yacc_sql.y" { (yyval.string) = nullptr; @@ -4263,7 +2324,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2325 "yacc_sql.cpp" break; - case 72: /* storage_format: STORAGE FORMAT EQ ID */ + case 72: /* storage_format: STORAGE FORMAT EQ ID */ #line 597 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); @@ -4271,10 +2332,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2333 "yacc_sql.cpp" break; - case 73: /* delete_stmt: DELETE FROM ID where */ + case 73: /* delete_stmt: DELETE FROM ID where */ #line 604 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); @@ -4284,10 +2345,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2346 "yacc_sql.cpp" break; - case 74: /* update_stmt: UPDATE ID SET set_clauses where */ + case 74: /* update_stmt: UPDATE ID SET set_clauses where */ #line 616 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -4299,7 +2360,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2361 "yacc_sql.cpp" break; - case 75: /* set_clauses: setClause */ + case 75: /* set_clauses: setClause */ #line 630 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; @@ -4308,7 +2369,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2370 "yacc_sql.cpp" break; - case 76: /* set_clauses: set_clauses COMMA setClause */ + case 76: /* set_clauses: set_clauses COMMA setClause */ #line 635 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); @@ -4316,18 +2377,18 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2378 "yacc_sql.cpp" break; - case 77: /* setClause: ID EQ expression */ + case 77: /* setClause: ID EQ expression */ #line 642 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } #line 2389 "yacc_sql.cpp" break; - case 78: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ + case 78: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ #line 652 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -4369,7 +2430,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2431 "yacc_sql.cpp" break; - case 79: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ + case 79: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ #line 690 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); @@ -4384,8 +2445,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); - ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -4393,8 +2453,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -4405,7 +2464,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2465 "yacc_sql.cpp" break; - case 80: /* calc_stmt: CALC expression_list */ + case 80: /* calc_stmt: CALC expression_list */ #line 723 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -4415,7 +2474,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2475 "yacc_sql.cpp" break; - case 81: /* calc_stmt: SELECT expression_list */ + case 81: /* calc_stmt: SELECT expression_list */ #line 729 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); @@ -4425,15 +2484,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2485 "yacc_sql.cpp" break; - case 82: /* expression_list: %empty */ + case 82: /* expression_list: %empty */ #line 737 "yacc_sql.y" - { + { (yyval.expression_list) = new std::vector>; } #line 2493 "yacc_sql.cpp" break; - case 83: /* expression_list: expression alias */ + case 83: /* expression_list: expression alias */ #line 741 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; @@ -4446,7 +2505,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2506 "yacc_sql.cpp" break; - case 84: /* expression_list: expression alias COMMA expression_list */ + case 84: /* expression_list: expression alias COMMA expression_list */ #line 750 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { @@ -4457,51 +2516,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_alias((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } #line 2523 "yacc_sql.cpp" break; - case 85: /* expression: expression '+' expression */ + case 85: /* expression: expression '+' expression */ #line 765 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2531 "yacc_sql.cpp" break; - case 86: /* expression: expression '-' expression */ + case 86: /* expression: expression '-' expression */ #line 768 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2539 "yacc_sql.cpp" break; - case 87: /* expression: expression '*' expression */ + case 87: /* expression: expression '*' expression */ #line 771 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2547 "yacc_sql.cpp" break; - case 88: /* expression: expression '/' expression */ + case 88: /* expression: expression '/' expression */ #line 774 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } #line 2555 "yacc_sql.cpp" break; - case 89: /* expression: LBRACE expression_list RBRACE */ + case 89: /* expression: LBRACE expression_list RBRACE */ #line 777 "yacc_sql.y" - { + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -4512,18 +2567,17 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2568 "yacc_sql.cpp" break; - case 90: /* expression: '-' expression */ + case 90: /* expression: '-' expression */ #line 785 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } #line 2576 "yacc_sql.cpp" break; - case 91: /* expression: nonnegative_value */ + case 91: /* expression: nonnegative_value */ #line 788 "yacc_sql.y" - { + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); @@ -4531,82 +2585,82 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2586 "yacc_sql.cpp" break; - case 92: /* expression: rel_attr */ + case 92: /* expression: rel_attr */ #line 793 "yacc_sql.y" - { + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } #line 2597 "yacc_sql.cpp" break; - case 93: /* expression: '*' */ + case 93: /* expression: '*' */ #line 799 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr(); } #line 2605 "yacc_sql.cpp" break; - case 94: /* expression: ID DOT '*' */ + case 94: /* expression: ID DOT '*' */ #line 802 "yacc_sql.y" - { + { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } #line 2613 "yacc_sql.cpp" break; - case 95: /* expression: aggr_func_expr */ + case 95: /* expression: aggr_func_expr */ #line 805 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } #line 2621 "yacc_sql.cpp" break; - case 96: /* expression: sub_query_expr */ + case 96: /* expression: sub_query_expr */ #line 808 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } #line 2629 "yacc_sql.cpp" break; - case 97: /* alias: %empty */ + case 97: /* alias: %empty */ #line 815 "yacc_sql.y" - { + { (yyval.string) = nullptr; } #line 2637 "yacc_sql.cpp" break; - case 98: /* alias: ID */ + case 98: /* alias: ID */ #line 818 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2645 "yacc_sql.cpp" break; - case 99: /* alias: AS ID */ + case 99: /* alias: AS ID */ #line 821 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2653 "yacc_sql.cpp" break; - case 100: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 100: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ #line 827 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } #line 2661 "yacc_sql.cpp" break; - case 101: /* sub_query_expr: LBRACE select_stmt RBRACE */ + case 101: /* sub_query_expr: LBRACE select_stmt RBRACE */ #line 834 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); @@ -4614,20 +2668,20 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2669 "yacc_sql.cpp" break; - case 102: /* rel_attr: ID */ + case 102: /* rel_attr: ID */ #line 840 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } #line 2679 "yacc_sql.cpp" break; - case 103: /* rel_attr: ID DOT ID */ + case 103: /* rel_attr: ID DOT ID */ #line 845 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); @@ -4636,22 +2690,22 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2691 "yacc_sql.cpp" break; - case 104: /* relation: ID */ + case 104: /* relation: ID */ #line 855 "yacc_sql.y" - { + { (yyval.string) = (yyvsp[0].string); } #line 2699 "yacc_sql.cpp" break; - case 105: /* rel_list: relation alias */ + case 105: /* rel_list: relation alias */ #line 861 "yacc_sql.y" - { + { (yyval.relation_list) = new std::vector(); - if (nullptr != (yyvsp[0].string)) { - (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); free((yyvsp[0].string)); - } else { + }else{ (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); @@ -4659,19 +2713,18 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2714 "yacc_sql.cpp" break; - case 106: /* rel_list: relation alias COMMA rel_list */ + case 106: /* rel_list: relation alias COMMA rel_list */ #line 871 "yacc_sql.y" - { + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if (nullptr != (yyvsp[-2].string)) { - (yyval.relation_list) - ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); free((yyvsp[-2].string)); - } else { + }else{ (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); @@ -4679,7 +2732,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2733 "yacc_sql.cpp" break; - case 107: /* join_clauses: relation ON condition */ + case 107: /* join_clauses: relation ON condition */ #line 889 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; @@ -4690,20 +2743,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2744 "yacc_sql.cpp" break; - case 108: /* join_clauses: relation ON condition INNER JOIN join_clauses */ + case 108: /* join_clauses: relation ON condition INNER JOIN join_clauses */ #line 896 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } #line 2756 "yacc_sql.cpp" break; - case 109: /* where: %empty */ + case 109: /* where: %empty */ #line 907 "yacc_sql.y" { (yyval.expression) = nullptr; @@ -4711,15 +2763,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2764 "yacc_sql.cpp" break; - case 110: /* where: WHERE condition */ + case 110: /* where: WHERE condition */ #line 910 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + { + (yyval.expression) = (yyvsp[0].expression); } #line 2772 "yacc_sql.cpp" break; - case 111: /* condition: expression comp_op expression */ + case 111: /* condition: expression comp_op expression */ #line 917 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); @@ -4727,148 +2779,118 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2780 "yacc_sql.cpp" break; - case 112: /* condition: comp_op expression */ + case 112: /* condition: comp_op expression */ #line 921 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); - (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } #line 2791 "yacc_sql.cpp" break; - case 113: /* condition: condition AND condition */ + case 113: /* condition: condition AND condition */ #line 928 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2799 "yacc_sql.cpp" break; - case 114: /* condition: condition OR condition */ + case 114: /* condition: condition OR condition */ #line 932 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } #line 2807 "yacc_sql.cpp" break; - case 115: /* comp_op: EQ */ + case 115: /* comp_op: EQ */ #line 938 "yacc_sql.y" - { - (yyval.comp) = EQUAL_TO; - } + { (yyval.comp) = EQUAL_TO; } #line 2813 "yacc_sql.cpp" break; - case 116: /* comp_op: LT */ + case 116: /* comp_op: LT */ #line 939 "yacc_sql.y" - { - (yyval.comp) = LESS_THAN; - } + { (yyval.comp) = LESS_THAN; } #line 2819 "yacc_sql.cpp" break; - case 117: /* comp_op: GT */ + case 117: /* comp_op: GT */ #line 940 "yacc_sql.y" - { - (yyval.comp) = GREAT_THAN; - } + { (yyval.comp) = GREAT_THAN; } #line 2825 "yacc_sql.cpp" break; - case 118: /* comp_op: LE */ + case 118: /* comp_op: LE */ #line 941 "yacc_sql.y" - { - (yyval.comp) = LESS_EQUAL; - } + { (yyval.comp) = LESS_EQUAL; } #line 2831 "yacc_sql.cpp" break; - case 119: /* comp_op: GE */ + case 119: /* comp_op: GE */ #line 942 "yacc_sql.y" - { - (yyval.comp) = GREAT_EQUAL; - } + { (yyval.comp) = GREAT_EQUAL; } #line 2837 "yacc_sql.cpp" break; - case 120: /* comp_op: NE */ + case 120: /* comp_op: NE */ #line 943 "yacc_sql.y" - { - (yyval.comp) = NOT_EQUAL; - } + { (yyval.comp) = NOT_EQUAL; } #line 2843 "yacc_sql.cpp" break; - case 121: /* comp_op: IS */ + case 121: /* comp_op: IS */ #line 944 "yacc_sql.y" - { - (yyval.comp) = IS_OP; - } + { (yyval.comp) = IS_OP; } #line 2849 "yacc_sql.cpp" break; - case 122: /* comp_op: IS NOT */ + case 122: /* comp_op: IS NOT */ #line 945 "yacc_sql.y" - { - (yyval.comp) = IS_NOT_OP; - } + { (yyval.comp) = IS_NOT_OP; } #line 2855 "yacc_sql.cpp" break; - case 123: /* comp_op: LIKE */ + case 123: /* comp_op: LIKE */ #line 946 "yacc_sql.y" - { - (yyval.comp) = LIKE_OP; - } + { (yyval.comp) = LIKE_OP;} #line 2861 "yacc_sql.cpp" break; - case 124: /* comp_op: NOT LIKE */ + case 124: /* comp_op: NOT LIKE */ #line 947 "yacc_sql.y" - { - (yyval.comp) = NOT_LIKE_OP; - } + {(yyval.comp) = NOT_LIKE_OP;} #line 2867 "yacc_sql.cpp" break; - case 125: /* comp_op: IN */ + case 125: /* comp_op: IN */ #line 948 "yacc_sql.y" - { - (yyval.comp) = IN_OP; - } + { (yyval.comp) = IN_OP; } #line 2873 "yacc_sql.cpp" break; - case 126: /* comp_op: NOT IN */ + case 126: /* comp_op: NOT IN */ #line 949 "yacc_sql.y" - { - (yyval.comp) = NOT_IN_OP; - } + { (yyval.comp) = NOT_IN_OP; } #line 2879 "yacc_sql.cpp" break; - case 127: /* comp_op: EXISTS */ + case 127: /* comp_op: EXISTS */ #line 950 "yacc_sql.y" - { - (yyval.comp) = EXISTS_OP; - } + { (yyval.comp) = EXISTS_OP; } #line 2885 "yacc_sql.cpp" break; - case 128: /* comp_op: NOT EXISTS */ + case 128: /* comp_op: NOT EXISTS */ #line 951 "yacc_sql.y" - { - (yyval.comp) = NOT_EXISTS_OP; - } + { (yyval.comp) = NOT_EXISTS_OP; } #line 2891 "yacc_sql.cpp" break; - case 129: /* opt_order_by: %empty */ + case 129: /* opt_order_by: %empty */ #line 956 "yacc_sql.y" { (yyval.orderby_list) = nullptr; @@ -4876,64 +2898,64 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2899 "yacc_sql.cpp" break; - case 130: /* opt_order_by: ORDER BY sort_list */ + case 130: /* opt_order_by: ORDER BY sort_list */ #line 960 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } #line 2908 "yacc_sql.cpp" break; - case 131: /* sort_list: sort_unit */ + case 131: /* sort_list: sort_unit */ #line 968 "yacc_sql.y" - { + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } + } #line 2917 "yacc_sql.cpp" break; - case 132: /* sort_list: sort_unit COMMA sort_list */ + case 132: /* sort_list: sort_unit COMMA sort_list */ #line 973 "yacc_sql.y" - { + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } + } #line 2926 "yacc_sql.cpp" break; - case 133: /* sort_unit: expression */ + case 133: /* sort_unit: expression */ #line 981 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2936 "yacc_sql.cpp" break; - case 134: /* sort_unit: expression DESC */ + case 134: /* sort_unit: expression DESC */ #line 987 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } + } #line 2946 "yacc_sql.cpp" break; - case 135: /* sort_unit: expression ASC */ + case 135: /* sort_unit: expression ASC */ #line 993 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } + } #line 2956 "yacc_sql.cpp" break; - case 136: /* group_by: %empty */ + case 136: /* group_by: %empty */ #line 1002 "yacc_sql.y" { (yyval.expression_list) = nullptr; @@ -4941,7 +2963,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2964 "yacc_sql.cpp" break; - case 137: /* group_by: GROUP BY expression_list */ + case 137: /* group_by: GROUP BY expression_list */ #line 1006 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4949,7 +2971,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2972 "yacc_sql.cpp" break; - case 138: /* opt_having: %empty */ + case 138: /* opt_having: %empty */ #line 1013 "yacc_sql.y" { (yyval.expression) = nullptr; @@ -4957,7 +2979,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2980 "yacc_sql.cpp" break; - case 139: /* opt_having: HAVING condition */ + case 139: /* opt_having: HAVING condition */ #line 1017 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); @@ -4965,7 +2987,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2988 "yacc_sql.cpp" break; - case 140: /* opt_limit: %empty */ + case 140: /* opt_limit: %empty */ #line 1024 "yacc_sql.y" { (yyval.limited_info) = nullptr; @@ -4973,42 +2995,42 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 2996 "yacc_sql.cpp" break; - case 141: /* opt_limit: LIMIT NUMBER */ + case 141: /* opt_limit: LIMIT NUMBER */ #line 1028 "yacc_sql.y" { - (yyval.limited_info) = new LimitSqlNode(); + (yyval.limited_info) = new LimitSqlNode(); (yyval.limited_info)->number = (yyvsp[0].number); } #line 3005 "yacc_sql.cpp" break; - case 142: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ + case 142: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ #line 1036 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); - - (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); + + (yyval.sql_node) = new ParsedSqlNode(SCF_LOAD_DATA); (yyval.sql_node)->load_data.relation_name = (yyvsp[0].string); - (yyval.sql_node)->load_data.file_name = tmp_file_name; + (yyval.sql_node)->load_data.file_name = tmp_file_name; free((yyvsp[0].string)); free(tmp_file_name); } #line 3019 "yacc_sql.cpp" break; - case 143: /* explain_stmt: EXPLAIN command_wrapper */ + case 143: /* explain_stmt: EXPLAIN command_wrapper */ #line 1049 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } #line 3028 "yacc_sql.cpp" break; - case 144: /* set_variable_stmt: SET ID EQ value */ + case 144: /* set_variable_stmt: SET ID EQ value */ #line 1057 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); @@ -5017,10 +3039,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) #line 3040 "yacc_sql.cpp" break; + #line 3044 "yacc_sql.cpp" - default: break; - } + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -5032,9 +3055,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; @@ -5045,67 +3068,84 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) { - ++yynerrs; - { - yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) { - if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); - yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); - if (yymsg) { - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } - yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; } - } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } else { - yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; + } } - } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; + /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -5118,40 +3158,45 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) { - yyn = yypact[yystate]; - if (!yypact_value_is_default(yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - yystate = *yyssp; - YY_STACK_PRINT(yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -5159,14 +3204,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; + /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -5174,6 +3220,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 0; goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -5181,38 +3228,44 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 1; goto yyreturnlab; + /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; + /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE(yychar); - yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK(yylen); - YY_STACK_PRINT(yyss, yyssp); - while (yyssp != yyss) { - yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - } + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE(yyss); + YYSTACK_FREE (yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); + YYSTACK_FREE (yymsg); return yyresult; } @@ -5221,8 +3274,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) -{ +int sql_parse(const char *s, ParsedSqlResult *sql_result) { yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); From 27ba21ad02d293ecdde7f5dd2c4e7ec16162c914 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 12:13:46 +0800 Subject: [PATCH 252/308] exprs_(std::move(exprs)) --- src/observer/sql/operator/order_by_physical_operator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/observer/sql/operator/order_by_physical_operator.cpp b/src/observer/sql/operator/order_by_physical_operator.cpp index 61688398..9f3c4099 100644 --- a/src/observer/sql/operator/order_by_physical_operator.cpp +++ b/src/observer/sql/operator/order_by_physical_operator.cpp @@ -14,8 +14,10 @@ See the Mulan PSL v2 for more details. */ #include "order_by_physical_operator.h" +#include + OrderByPhysicalOperator::OrderByPhysicalOperator(vector order_by, vector exprs) - : order_by_(std::move(order_by)), exprs_(exprs) + : order_by_(std::move(order_by)), exprs_(std::move(exprs)) { vector expressions; expressions.reserve(exprs_.size()); From 1f9730a3659833ecc87cff4b6627ec82e2b783e0 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 12:16:18 +0800 Subject: [PATCH 253/308] OrderByPhysicalOperator Tuple *tuple_ = nullptr; --- src/observer/sql/operator/order_by_physical_operator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/operator/order_by_physical_operator.h b/src/observer/sql/operator/order_by_physical_operator.h index c3440c04..5f901838 100644 --- a/src/observer/sql/operator/order_by_physical_operator.h +++ b/src/observer/sql/operator/order_by_physical_operator.h @@ -49,5 +49,5 @@ class OrderByPhysicalOperator : public PhysicalOperator using order_list = std::priority_queue, order_func>; order_list order_and_field_line; - Tuple *tuple_; + Tuple *tuple_ = nullptr; }; From 529f800cd5771bcdadee896104c180dde9fac335 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 12:55:02 +0800 Subject: [PATCH 254/308] =?UTF-8?q?=E9=87=8D=E6=9E=84=20function=20?= =?UTF-8?q?=E4=B8=BA=20namespace=20builtin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 174 ++++++++++++++++++++++++++ src/observer/sql/builtin/builtin.h | 25 ++++ src/observer/sql/expr/expression.cpp | 12 +- src/observer/sql/expr/expression.h | 2 +- src/observer/sql/expr/function.h | 176 --------------------------- 5 files changed, 206 insertions(+), 183 deletions(-) create mode 100644 src/observer/sql/builtin/builtin.cpp create mode 100644 src/observer/sql/builtin/builtin.h delete mode 100644 src/observer/sql/expr/function.h diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp new file mode 100644 index 00000000..f2dd37f6 --- /dev/null +++ b/src/observer/sql/builtin/builtin.cpp @@ -0,0 +1,174 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +#include "builtin.h" + +namespace builtin { + +RC length(const vector &args, Value &result) +{ + if (args.size() != 1) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + int length = static_cast(args[0].to_string().size()); + result = Value(length); + return RC::SUCCESS; +} + +RC round(const vector &args, Value &result) +{ + if (args.size() != 1 && args.size() != 2) { + return RC::INVALID_ARGUMENT; + } + float number; + int decimals = 0; // 默认四舍五入为整数 + if (args[0].attr_type() != AttrType::FLOATS) { + return RC::INVALID_ARGUMENT; + } + if (args.size() == 2) { + if (args[1].attr_type() != AttrType::INTS) { + return RC::INVALID_ARGUMENT; + } + decimals = args[1].get_int(); + } + number = args[0].get_float(); + float factor = std::pow(10.f, static_cast(decimals)); + float round = std::round(number * factor) / factor; + result = Value(round); + return RC::SUCCESS; +} + +namespace date { +static string get_day_with_suffix(int day) +{ + if (day >= 11 && day <= 13) { + return std::to_string(day) + "th"; + } + switch (day % 10) { + case 1: { + return std::to_string(day) + "st"; + } + case 2: { + return std::to_string(day) + "nd"; + } + case 3: { + return std::to_string(day) + "rd"; + } + default: { + return std::to_string(day) + "th"; + } + } +} + +static string get_full_month_name(int month) +{ + switch (month) { + case 1: return "January"; + case 2: return "February"; + case 3: return "March"; + case 4: return "April"; + case 5: return "May"; + case 6: return "June"; + case 7: return "July"; + case 8: return "August"; + case 9: return "September"; + case 10: return "October"; + case 11: return "November"; + case 12: return "December"; + default: return ""; // 如果月份值无效,返回一个错误字符串 + } +} +}; // namespace date + +RC date_format(const vector &args, Value &result) +{ + + if (args.size() != 2) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::DATES && args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + if (args[1].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + + int year, month, day; + + if (args[0].attr_type() == AttrType::DATES) { + // 提取年、月、日(假设日期格式为YYYYMMDD) + int val = args[0].get_date(); + year = val / 10000; // 获取年份 + month = (val / 100) % 100; // 获取月份 + day = val % 100; // 获取日期 + } + + if (args[0].attr_type() == AttrType::CHARS) { + // 日期格式假设为 '2019-9-17' 或 '2019-09-17' + std::string date_str = args[0].to_string(); + if (sscanf(date_str.c_str(), "%d-%d-%d", &year, &month, &day) != 3) { + return RC::INVALID_ARGUMENT; + } + } + + if (!check_date(year, month, day)) { + return RC::ERROR_DATE; + } + + auto fmt = args[1].to_string(); + + string str; + + // 遍历格式字符串,并替换格式符 + for (size_t i = 0; i < fmt.length(); ++i) { + if (fmt[i] == '%' && i + 1 < fmt.length()) { + switch (fmt[i + 1]) { + case 'Y': // 四位数年份 + str += std::to_string(year); + break; + case 'y': // 两位数年份 + str += std::to_string(year).substr(2, 2); + break; + case 'm': // 两位数月份 + str += (month < 10 ? "0" : "") + std::to_string(month); + break; + case 'c': // 不带前导零的月份 + str += std::to_string(month); + break; + case 'M': // 完整的月份名称 + str += date::get_full_month_name(month); + break; + case 'd': // 两位数日期 + str += (day < 10 ? "0" : "") + std::to_string(day); + break; + case 'e': // 不带前导零的日期 + str += std::to_string(day); + break; + case 'D': // 带序数后缀的日期 + str += date::get_day_with_suffix(day); + break; + default: // 未知格式符,按原样输出 + str += fmt[i + 1]; + break; + } + ++i; // 跳过格式符的下一个字符 + } else { + str += fmt[i]; // 普通字符直接追加 + } + } + + result = Value(str.c_str()); + return RC::SUCCESS; +} + +} // namespace builtin diff --git a/src/observer/sql/builtin/builtin.h b/src/observer/sql/builtin/builtin.h new file mode 100644 index 00000000..d8cac999 --- /dev/null +++ b/src/observer/sql/builtin/builtin.h @@ -0,0 +1,25 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +#pragma once + +#include "common/value.h" +#include "common/utils.h" +#include + +namespace builtin { + +extern RC length(const vector &args, Value &result); + +extern RC round(const vector &args, Value &result); + +extern RC date_format(const vector &args, Value &result); + +}; // namespace builtin diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 4b75bd7e..e27a4a3b 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -899,13 +899,13 @@ RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) } switch (type_) { case Type::LENGTH: { - return STD::LENGTH(args_values_, result); + return builtin::length(args_values_, result); } case Type::ROUND: { - return STD::ROUND(args_values_, result); + return builtin::round(args_values_, result); } case Type::DATE_FORMAT: { - return STD::DATE_FORMAT(args_values_, result); + return builtin::date_format(args_values_, result); } default: { return RC::INTERNAL; @@ -927,13 +927,13 @@ RC NormalFunctionExpr::try_get_value(Value &result) const } switch (type_) { case Type::LENGTH: { - return STD::LENGTH(args_values_, result); + return builtin::length(args_values_, result); } case Type::ROUND: { - return STD::ROUND(args_values_, result); + return builtin::round(args_values_, result); } case Type::DATE_FORMAT: { - return STD::DATE_FORMAT(args_values_, result); + return builtin::date_format(args_values_, result); } default: { return RC::INTERNAL; diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 5d6ead3a..5920d53a 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -22,7 +22,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/field/field.h" #include "sql/expr/aggregator.h" #include "storage/common/chunk.h" -#include "sql/expr/function.h" +#include "sql/builtin/builtin.h" class Tuple; class SelectStmt; diff --git a/src/observer/sql/expr/function.h b/src/observer/sql/expr/function.h deleted file mode 100644 index dea0eb7e..00000000 --- a/src/observer/sql/expr/function.h +++ /dev/null @@ -1,176 +0,0 @@ -/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. -miniob is licensed under Mulan PSL v2. -You can use this software according to the terms and conditions of the Mulan PSL v2. -You may obtain a copy of Mulan PSL v2 at: - http://license.coscl.org.cn/MulanPSL2 -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -See the Mulan PSL v2 for more details. */ - -#pragma once - -#include "common/value.h" -#include "common/utils.h" -#include - -class STD -{ -public: - static inline RC LENGTH(const vector &args, Value &result) - { - if (args.size() != 1) { - return RC::INVALID_ARGUMENT; - } - if (args[0].attr_type() != AttrType::CHARS) { - return RC::INVALID_ARGUMENT; - } - int length = static_cast(args[0].to_string().size()); - result = Value(length); - return RC::SUCCESS; - } - - static inline RC ROUND(const vector &args, Value &result) - { - if (args.size() != 1 && args.size() != 2) { - return RC::INVALID_ARGUMENT; - } - float number; - int decimals = 0; // 默认四舍五入为整数 - if (args[0].attr_type() != AttrType::FLOATS) { - return RC::INVALID_ARGUMENT; - } - if (args.size() == 2) { - if (args[1].attr_type() != AttrType::INTS) { - return RC::INVALID_ARGUMENT; - } - decimals = args[1].get_int(); - } - number = args[0].get_float(); - float factor = std::pow(10.f, static_cast(decimals)); - float round = std::round(number * factor) / factor; - result = Value(round); - return RC::SUCCESS; - } - - static inline RC DATE_FORMAT(const vector &args, Value &result) - { - if (args.size() != 2) { - return RC::INVALID_ARGUMENT; - } - if (args[0].attr_type() != AttrType::DATES && args[0].attr_type() != AttrType::CHARS) { - return RC::INVALID_ARGUMENT; - } - if (args[1].attr_type() != AttrType::CHARS) { - return RC::INVALID_ARGUMENT; - } - - int year, month, day; - - if (args[0].attr_type() == AttrType::DATES) { - // 提取年、月、日(假设日期格式为YYYYMMDD) - int val = args[0].get_date(); - year = val / 10000; // 获取年份 - month = (val / 100) % 100; // 获取月份 - day = val % 100; // 获取日期 - } - - if (args[0].attr_type() == AttrType::CHARS) { - // 日期格式假设为 '2019-9-17' 或 '2019-09-17' - std::string date_str = args[0].to_string(); - if (sscanf(date_str.c_str(), "%d-%d-%d", &year, &month, &day) != 3) { - return RC::INVALID_ARGUMENT; - } - } - - if (!check_date(year, month, day)) { - return RC::ERROR_DATE; - } - - auto fmt = args[1].to_string(); - - string str; - - // 遍历格式字符串,并替换格式符 - for (size_t i = 0; i < fmt.length(); ++i) { - if (fmt[i] == '%' && i + 1 < fmt.length()) { - switch (fmt[i + 1]) { - case 'Y': // 四位数年份 - str += std::to_string(year); - break; - case 'y': // 两位数年份 - str += std::to_string(year).substr(2, 2); - break; - case 'm': // 两位数月份 - str += (month < 10 ? "0" : "") + std::to_string(month); - break; - case 'c': // 不带前导零的月份 - str += std::to_string(month); - break; - case 'M': // 完整的月份名称 - str += get_full_month_name(month); - break; - case 'd': // 两位数日期 - str += (day < 10 ? "0" : "") + std::to_string(day); - break; - case 'e': // 不带前导零的日期 - str += std::to_string(day); - break; - case 'D': // 带序数后缀的日期 - str += get_day_with_suffix(day); - break; - default: // 未知格式符,按原样输出 - str += fmt[i + 1]; - break; - } - ++i; // 跳过格式符的下一个字符 - } else { - str += fmt[i]; // 普通字符直接追加 - } - } - - result = Value(str.c_str()); - return RC::SUCCESS; - } - -private: - static inline string get_day_with_suffix(int day) - { - if (day >= 11 && day <= 13) { - return std::to_string(day) + "th"; - } - switch (day % 10) { - case 1: { - return std::to_string(day) + "st"; - } - case 2: { - return std::to_string(day) + "nd"; - } - case 3: { - return std::to_string(day) + "rd"; - } - default: { - return std::to_string(day) + "th"; - } - } - } - - static inline string get_full_month_name(int month) - { - switch (month) { - case 1: return "January"; - case 2: return "February"; - case 3: return "March"; - case 4: return "April"; - case 5: return "May"; - case 6: return "June"; - case 7: return "July"; - case 8: return "August"; - case 9: return "September"; - case 10: return "October"; - case 11: return "November"; - case 12: return "December"; - default: return ""; // 如果月份值无效,返回一个错误字符串 - } - } -}; From b68abb8b6a38c07ed3c8231c37865dafbb0b3c56 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 13:18:22 +0800 Subject: [PATCH 255/308] =?UTF-8?q?=E4=BF=AE=E6=94=B9check=5Ftype?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 78 ++++++++-------------------- src/observer/sql/expr/expression.h | 6 +-- 2 files changed, 24 insertions(+), 60 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index e27a4a3b..0049a46d 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -23,7 +23,11 @@ See the Mulan PSL v2 for more details. */ #include "sql/optimizer/physical_plan_generator.h" #include "common/lang/defer.h" -using namespace std; +#define check_type(str, rule) \ + if (0 == strcasecmp(type_str, str)) { \ + type = rule; \ + return RC::SUCCESS; \ + } RC FieldExpr::get_value(const Tuple &tuple, Value &value) { @@ -730,21 +734,12 @@ RC AggregateFunctionExpr::get_value(const Tuple &tuple, Value &value) RC AggregateFunctionExpr::type_from_string(const char *type_str, AggregateFunctionExpr::Type &type) { - RC rc = RC::SUCCESS; - if (0 == strcasecmp(type_str, "count")) { - type = Type::COUNT; - } else if (0 == strcasecmp(type_str, "sum")) { - type = Type::SUM; - } else if (0 == strcasecmp(type_str, "avg")) { - type = Type::AVG; - } else if (0 == strcasecmp(type_str, "max")) { - type = Type::MAX; - } else if (0 == strcasecmp(type_str, "min")) { - type = Type::MIN; - } else { - rc = RC::INVALID_ARGUMENT; - } - return rc; + check_type("sum", Type::SUM); + check_type("avg", Type::AVG); + check_type("max", Type::MAX); + check_type("min", Type::MIN); + check_type("count", Type::COUNT); + return RC::INVALID_ARGUMENT; } SubQueryExpr::SubQueryExpr(SelectSqlNode &select_node) : sql_node_(select_node) {} @@ -861,8 +856,6 @@ ExprType SubQueryExpr::type() const { return ExprType::SUBQUERY; } AttrType SubQueryExpr::value_type() const { return AttrType::UNDEFINED; } -std::unique_ptr SubQueryExpr::deep_copy() const { return {}; } - ListExpr::ListExpr(std::vector &&exprs) { for (auto expr : exprs) { @@ -873,17 +866,10 @@ ListExpr::ListExpr(std::vector &&exprs) RC NormalFunctionExpr::type_from_string(const char *type_str, NormalFunctionExpr::Type &type) { - RC rc = RC::SUCCESS; - if (0 == strcasecmp(type_str, "date_format")) { - type = Type::DATE_FORMAT; - } else if (0 == strcasecmp(type_str, "length")) { - type = Type::LENGTH; - } else if (0 == strcasecmp(type_str, "round")) { - type = Type::ROUND; - } else { - rc = RC::INVALID_ARGUMENT; - } - return rc; + check_type("date_format", Type::DATE_FORMAT); + check_type("length", Type::LENGTH); + check_type("round", Type::ROUND); + return RC::INVALID_ARGUMENT; } RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) @@ -898,20 +884,11 @@ RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) args_values_.push_back(value); } switch (type_) { - case Type::LENGTH: { - return builtin::length(args_values_, result); - } - case Type::ROUND: { - return builtin::round(args_values_, result); - } - case Type::DATE_FORMAT: { - return builtin::date_format(args_values_, result); - } - default: { - return RC::INTERNAL; - } + case Type::LENGTH: return builtin::length(args_values_, result); + case Type::ROUND: return builtin::round(args_values_, result); + case Type::DATE_FORMAT: return builtin::date_format(args_values_, result); } - return RC::SUCCESS; + return RC::INTERNAL; } RC NormalFunctionExpr::try_get_value(Value &result) const @@ -926,18 +903,9 @@ RC NormalFunctionExpr::try_get_value(Value &result) const args_values_.push_back(value); } switch (type_) { - case Type::LENGTH: { - return builtin::length(args_values_, result); - } - case Type::ROUND: { - return builtin::round(args_values_, result); - } - case Type::DATE_FORMAT: { - return builtin::date_format(args_values_, result); - } - default: { - return RC::INTERNAL; - } + case Type::LENGTH: return builtin::length(args_values_, result); + case Type::ROUND: return builtin::round(args_values_, result); + case Type::DATE_FORMAT: return builtin::date_format(args_values_, result); } - return RC::SUCCESS; + return RC::INTERNAL; } diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 5920d53a..bac00738 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -489,10 +489,8 @@ class NormalFunctionExpr : public UnboundFunctionExpr case Type::DATE_FORMAT: { return AttrType::CHARS; } - default: { - return AttrType::UNDEFINED; - } } + return AttrType::UNDEFINED; } RC get_value(const Tuple &tuple, Value &value) override; @@ -564,8 +562,6 @@ class SubQueryExpr : public Expression AttrType value_type() const override; - std::unique_ptr deep_copy() const; - RC generate_select_stmt(Db *db, const std::unordered_map &tables); RC generate_logical_oper(); RC generate_physical_oper(); From 6f55a01fa41049cd6f110e49837373064b710e1b Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 14:08:43 +0800 Subject: [PATCH 256/308] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=BB=98=E8=AE=A4vec?= =?UTF-8?q?tor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 2 +- src/observer/sql/parser/yacc_sql.cpp | 416 ++++++++++++++------------- src/observer/sql/parser/yacc_sql.y | 4 +- 3 files changed, 213 insertions(+), 209 deletions(-) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index f2dd37f6..aef32c86 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -88,7 +88,7 @@ static string get_full_month_name(int month) default: return ""; // 如果月份值无效,返回一个错误字符串 } } -}; // namespace date +} // namespace date RC date_format(const vector &args, Value &result) { diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index cb13eea7..12669ae6 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -712,17 +712,17 @@ static const yytype_int16 yyrline[] = 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 295, 301, 306, 312, 318, 324, 330, 337, 343, 351, 361, 376, 377, 381, 387, 396, - 406, 410, 414, 418, 422, 429, 432, 445, 463, 490, - 494, 498, 503, 509, 510, 511, 512, 513, 514, 518, - 531, 537, 544, 550, 558, 561, 565, 572, 576, 580, - 586, 593, 596, 603, 615, 629, 634, 641, 651, 689, - 722, 728, 737, 740, 749, 765, 768, 771, 774, 777, - 785, 788, 793, 799, 802, 805, 808, 815, 818, 821, - 826, 833, 840, 845, 855, 861, 871, 888, 895, 907, - 910, 916, 920, 927, 931, 938, 939, 940, 941, 942, - 943, 944, 945, 946, 947, 948, 949, 950, 951, 956, - 959, 967, 972, 980, 986, 992, 1002, 1005, 1013, 1016, - 1024, 1027, 1035, 1048, 1056, 1067 + 406, 410, 414, 418, 422, 429, 432, 445, 463, 492, + 496, 500, 505, 511, 512, 513, 514, 515, 516, 520, + 533, 539, 546, 552, 560, 563, 567, 574, 578, 582, + 588, 595, 598, 605, 617, 631, 636, 643, 653, 691, + 724, 730, 739, 742, 751, 767, 770, 773, 776, 779, + 787, 790, 795, 801, 804, 807, 810, 817, 820, 823, + 828, 835, 842, 847, 857, 863, 873, 890, 897, 909, + 912, 918, 922, 929, 933, 940, 941, 942, 943, 944, + 945, 946, 947, 948, 949, 950, 951, 952, 953, 958, + 961, 969, 974, 982, 988, 994, 1004, 1007, 1015, 1018, + 1026, 1029, 1037, 1050, 1058, 1069 }; #endif @@ -2118,7 +2118,9 @@ YYLTYPE yylloc = yyloc_default; } else if ((yyval.attr_info)->type == AttrType::DATES) { (yyval.attr_info)->length = sizeof(int); } else if ((yyval.attr_info)->type == AttrType::CHARS) { - (yyval.attr_info)->length = 4; // miniob🀄AttrType::CHARS默认长度为4 + (yyval.attr_info)->length = sizeof(char); + } else if ((yyval.attr_info)->type == AttrType::VECTORS) { + (yyval.attr_info)->length = sizeof(float) * 1; } else if ((yyval.attr_info)->type == AttrType::TEXTS) { (yyval.attr_info)->length = 65535; } else { @@ -2130,79 +2132,79 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2134 "yacc_sql.cpp" +#line 2136 "yacc_sql.cpp" break; case 49: /* nullable_constraint: NOT NULL_T */ -#line 491 "yacc_sql.y" +#line 493 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2142 "yacc_sql.cpp" +#line 2144 "yacc_sql.cpp" break; case 50: /* nullable_constraint: NULLABLE */ -#line 495 "yacc_sql.y" +#line 497 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2150 "yacc_sql.cpp" +#line 2152 "yacc_sql.cpp" break; case 51: /* nullable_constraint: NULL_T */ -#line 499 "yacc_sql.y" +#line 501 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2158 "yacc_sql.cpp" +#line 2160 "yacc_sql.cpp" break; case 52: /* nullable_constraint: %empty */ -#line 503 "yacc_sql.y" +#line 505 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2166 "yacc_sql.cpp" +#line 2168 "yacc_sql.cpp" break; case 53: /* type: INT_T */ -#line 509 "yacc_sql.y" +#line 511 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2172 "yacc_sql.cpp" +#line 2174 "yacc_sql.cpp" break; case 54: /* type: STRING_T */ -#line 510 "yacc_sql.y" +#line 512 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2178 "yacc_sql.cpp" +#line 2180 "yacc_sql.cpp" break; case 55: /* type: FLOAT_T */ -#line 511 "yacc_sql.y" +#line 513 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2184 "yacc_sql.cpp" +#line 2186 "yacc_sql.cpp" break; case 56: /* type: DATE_T */ -#line 512 "yacc_sql.y" +#line 514 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2190 "yacc_sql.cpp" +#line 2192 "yacc_sql.cpp" break; case 57: /* type: TEXT_T */ -#line 513 "yacc_sql.y" +#line 515 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2196 "yacc_sql.cpp" +#line 2198 "yacc_sql.cpp" break; case 58: /* type: VECTOR_T */ -#line 514 "yacc_sql.y" +#line 516 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::VECTORS); } -#line 2202 "yacc_sql.cpp" +#line 2204 "yacc_sql.cpp" break; case 59: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 519 "yacc_sql.y" +#line 521 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2212,128 +2214,128 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2216 "yacc_sql.cpp" +#line 2218 "yacc_sql.cpp" break; case 60: /* values_list: LBRACE value_list RBRACE */ -#line 532 "yacc_sql.y" +#line 534 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2226 "yacc_sql.cpp" +#line 2228 "yacc_sql.cpp" break; case 61: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 538 "yacc_sql.y" +#line 540 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2235 "yacc_sql.cpp" +#line 2237 "yacc_sql.cpp" break; case 62: /* value_list: value */ -#line 545 "yacc_sql.y" +#line 547 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2245 "yacc_sql.cpp" +#line 2247 "yacc_sql.cpp" break; case 63: /* value_list: value_list COMMA value */ -#line 551 "yacc_sql.y" +#line 553 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2254 "yacc_sql.cpp" +#line 2256 "yacc_sql.cpp" break; case 64: /* value: nonnegative_value */ -#line 558 "yacc_sql.y" +#line 560 "yacc_sql.y" { (yyval.value) = (yyvsp[0].value); } -#line 2262 "yacc_sql.cpp" +#line 2264 "yacc_sql.cpp" break; case 65: /* value: '-' NUMBER */ -#line 561 "yacc_sql.y" +#line 563 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2271 "yacc_sql.cpp" +#line 2273 "yacc_sql.cpp" break; case 66: /* value: '-' FLOAT */ -#line 565 "yacc_sql.y" +#line 567 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2280 "yacc_sql.cpp" +#line 2282 "yacc_sql.cpp" break; case 67: /* nonnegative_value: NUMBER */ -#line 572 "yacc_sql.y" +#line 574 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2289 "yacc_sql.cpp" +#line 2291 "yacc_sql.cpp" break; case 68: /* nonnegative_value: FLOAT */ -#line 576 "yacc_sql.y" +#line 578 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2298 "yacc_sql.cpp" +#line 2300 "yacc_sql.cpp" break; case 69: /* nonnegative_value: SSS */ -#line 580 "yacc_sql.y" +#line 582 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2309 "yacc_sql.cpp" +#line 2311 "yacc_sql.cpp" break; case 70: /* nonnegative_value: NULL_T */ -#line 586 "yacc_sql.y" +#line 588 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2317 "yacc_sql.cpp" +#line 2319 "yacc_sql.cpp" break; case 71: /* storage_format: %empty */ -#line 593 "yacc_sql.y" +#line 595 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2325 "yacc_sql.cpp" +#line 2327 "yacc_sql.cpp" break; case 72: /* storage_format: STORAGE FORMAT EQ ID */ -#line 597 "yacc_sql.y" +#line 599 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2333 "yacc_sql.cpp" +#line 2335 "yacc_sql.cpp" break; case 73: /* delete_stmt: DELETE FROM ID where */ -#line 604 "yacc_sql.y" +#line 606 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2342,11 +2344,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2346 "yacc_sql.cpp" +#line 2348 "yacc_sql.cpp" break; case 74: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 616 "yacc_sql.y" +#line 618 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2357,39 +2359,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2361 "yacc_sql.cpp" +#line 2363 "yacc_sql.cpp" break; case 75: /* set_clauses: setClause */ -#line 630 "yacc_sql.y" +#line 632 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2370 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; case 76: /* set_clauses: set_clauses COMMA setClause */ -#line 635 "yacc_sql.y" +#line 637 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2378 "yacc_sql.cpp" +#line 2380 "yacc_sql.cpp" break; case 77: /* setClause: ID EQ expression */ -#line 642 "yacc_sql.y" +#line 644 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2389 "yacc_sql.cpp" +#line 2391 "yacc_sql.cpp" break; case 78: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ -#line 652 "yacc_sql.y" +#line 654 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2427,11 +2429,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].limited_info); } } -#line 2431 "yacc_sql.cpp" +#line 2433 "yacc_sql.cpp" break; case 79: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 690 "yacc_sql.y" +#line 692 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2461,39 +2463,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2465 "yacc_sql.cpp" +#line 2467 "yacc_sql.cpp" break; case 80: /* calc_stmt: CALC expression_list */ -#line 723 "yacc_sql.y" +#line 725 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2475 "yacc_sql.cpp" +#line 2477 "yacc_sql.cpp" break; case 81: /* calc_stmt: SELECT expression_list */ -#line 729 "yacc_sql.y" +#line 731 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2485 "yacc_sql.cpp" +#line 2487 "yacc_sql.cpp" break; case 82: /* expression_list: %empty */ -#line 737 "yacc_sql.y" +#line 739 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2493 "yacc_sql.cpp" +#line 2495 "yacc_sql.cpp" break; case 83: /* expression_list: expression alias */ -#line 741 "yacc_sql.y" +#line 743 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2502,11 +2504,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2506 "yacc_sql.cpp" +#line 2508 "yacc_sql.cpp" break; case 84: /* expression_list: expression alias COMMA expression_list */ -#line 750 "yacc_sql.y" +#line 752 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2519,43 +2521,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2523 "yacc_sql.cpp" +#line 2525 "yacc_sql.cpp" break; case 85: /* expression: expression '+' expression */ -#line 765 "yacc_sql.y" +#line 767 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2531 "yacc_sql.cpp" +#line 2533 "yacc_sql.cpp" break; case 86: /* expression: expression '-' expression */ -#line 768 "yacc_sql.y" +#line 770 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2539 "yacc_sql.cpp" +#line 2541 "yacc_sql.cpp" break; case 87: /* expression: expression '*' expression */ -#line 771 "yacc_sql.y" +#line 773 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2547 "yacc_sql.cpp" +#line 2549 "yacc_sql.cpp" break; case 88: /* expression: expression '/' expression */ -#line 774 "yacc_sql.y" +#line 776 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2555 "yacc_sql.cpp" +#line 2557 "yacc_sql.cpp" break; case 89: /* expression: LBRACE expression_list RBRACE */ -#line 777 "yacc_sql.y" +#line 779 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2564,122 +2566,122 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2568 "yacc_sql.cpp" +#line 2570 "yacc_sql.cpp" break; case 90: /* expression: '-' expression */ -#line 785 "yacc_sql.y" +#line 787 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2576 "yacc_sql.cpp" +#line 2578 "yacc_sql.cpp" break; case 91: /* expression: nonnegative_value */ -#line 788 "yacc_sql.y" +#line 790 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2586 "yacc_sql.cpp" +#line 2588 "yacc_sql.cpp" break; case 92: /* expression: rel_attr */ -#line 793 "yacc_sql.y" +#line 795 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2597 "yacc_sql.cpp" +#line 2599 "yacc_sql.cpp" break; case 93: /* expression: '*' */ -#line 799 "yacc_sql.y" +#line 801 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2605 "yacc_sql.cpp" +#line 2607 "yacc_sql.cpp" break; case 94: /* expression: ID DOT '*' */ -#line 802 "yacc_sql.y" +#line 804 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2613 "yacc_sql.cpp" +#line 2615 "yacc_sql.cpp" break; case 95: /* expression: aggr_func_expr */ -#line 805 "yacc_sql.y" +#line 807 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2621 "yacc_sql.cpp" +#line 2623 "yacc_sql.cpp" break; case 96: /* expression: sub_query_expr */ -#line 808 "yacc_sql.y" +#line 810 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2629 "yacc_sql.cpp" +#line 2631 "yacc_sql.cpp" break; case 97: /* alias: %empty */ -#line 815 "yacc_sql.y" +#line 817 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2637 "yacc_sql.cpp" +#line 2639 "yacc_sql.cpp" break; case 98: /* alias: ID */ -#line 818 "yacc_sql.y" +#line 820 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2645 "yacc_sql.cpp" +#line 2647 "yacc_sql.cpp" break; case 99: /* alias: AS ID */ -#line 821 "yacc_sql.y" +#line 823 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2653 "yacc_sql.cpp" +#line 2655 "yacc_sql.cpp" break; case 100: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ -#line 827 "yacc_sql.y" +#line 829 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2661 "yacc_sql.cpp" +#line 2663 "yacc_sql.cpp" break; case 101: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 834 "yacc_sql.y" +#line 836 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2669 "yacc_sql.cpp" +#line 2671 "yacc_sql.cpp" break; case 102: /* rel_attr: ID */ -#line 840 "yacc_sql.y" +#line 842 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2679 "yacc_sql.cpp" +#line 2681 "yacc_sql.cpp" break; case 103: /* rel_attr: ID DOT ID */ -#line 845 "yacc_sql.y" +#line 847 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2687,19 +2689,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2691 "yacc_sql.cpp" +#line 2693 "yacc_sql.cpp" break; case 104: /* relation: ID */ -#line 855 "yacc_sql.y" +#line 857 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2699 "yacc_sql.cpp" +#line 2701 "yacc_sql.cpp" break; case 105: /* rel_list: relation alias */ -#line 861 "yacc_sql.y" +#line 863 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2710,11 +2712,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2714 "yacc_sql.cpp" +#line 2716 "yacc_sql.cpp" break; case 106: /* rel_list: relation alias COMMA rel_list */ -#line 871 "yacc_sql.y" +#line 873 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2729,22 +2731,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2733 "yacc_sql.cpp" +#line 2735 "yacc_sql.cpp" break; case 107: /* join_clauses: relation ON condition */ -#line 889 "yacc_sql.y" +#line 891 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2744 "yacc_sql.cpp" +#line 2746 "yacc_sql.cpp" break; case 108: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 896 "yacc_sql.y" +#line 898 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2752,260 +2754,260 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2756 "yacc_sql.cpp" +#line 2758 "yacc_sql.cpp" break; case 109: /* where: %empty */ -#line 907 "yacc_sql.y" +#line 909 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2764 "yacc_sql.cpp" +#line 2766 "yacc_sql.cpp" break; case 110: /* where: WHERE condition */ -#line 910 "yacc_sql.y" +#line 912 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2772 "yacc_sql.cpp" +#line 2774 "yacc_sql.cpp" break; case 111: /* condition: expression comp_op expression */ -#line 917 "yacc_sql.y" +#line 919 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2780 "yacc_sql.cpp" +#line 2782 "yacc_sql.cpp" break; case 112: /* condition: comp_op expression */ -#line 921 "yacc_sql.y" +#line 923 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2791 "yacc_sql.cpp" +#line 2793 "yacc_sql.cpp" break; case 113: /* condition: condition AND condition */ -#line 928 "yacc_sql.y" +#line 930 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2799 "yacc_sql.cpp" +#line 2801 "yacc_sql.cpp" break; case 114: /* condition: condition OR condition */ -#line 932 "yacc_sql.y" +#line 934 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2807 "yacc_sql.cpp" +#line 2809 "yacc_sql.cpp" break; case 115: /* comp_op: EQ */ -#line 938 "yacc_sql.y" +#line 940 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2813 "yacc_sql.cpp" +#line 2815 "yacc_sql.cpp" break; case 116: /* comp_op: LT */ -#line 939 "yacc_sql.y" +#line 941 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2819 "yacc_sql.cpp" +#line 2821 "yacc_sql.cpp" break; case 117: /* comp_op: GT */ -#line 940 "yacc_sql.y" +#line 942 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2825 "yacc_sql.cpp" +#line 2827 "yacc_sql.cpp" break; case 118: /* comp_op: LE */ -#line 941 "yacc_sql.y" +#line 943 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2831 "yacc_sql.cpp" +#line 2833 "yacc_sql.cpp" break; case 119: /* comp_op: GE */ -#line 942 "yacc_sql.y" +#line 944 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2837 "yacc_sql.cpp" +#line 2839 "yacc_sql.cpp" break; case 120: /* comp_op: NE */ -#line 943 "yacc_sql.y" +#line 945 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2843 "yacc_sql.cpp" +#line 2845 "yacc_sql.cpp" break; case 121: /* comp_op: IS */ -#line 944 "yacc_sql.y" +#line 946 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2849 "yacc_sql.cpp" +#line 2851 "yacc_sql.cpp" break; case 122: /* comp_op: IS NOT */ -#line 945 "yacc_sql.y" +#line 947 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2855 "yacc_sql.cpp" +#line 2857 "yacc_sql.cpp" break; case 123: /* comp_op: LIKE */ -#line 946 "yacc_sql.y" +#line 948 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2861 "yacc_sql.cpp" +#line 2863 "yacc_sql.cpp" break; case 124: /* comp_op: NOT LIKE */ -#line 947 "yacc_sql.y" +#line 949 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2867 "yacc_sql.cpp" +#line 2869 "yacc_sql.cpp" break; case 125: /* comp_op: IN */ -#line 948 "yacc_sql.y" +#line 950 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2873 "yacc_sql.cpp" +#line 2875 "yacc_sql.cpp" break; case 126: /* comp_op: NOT IN */ -#line 949 "yacc_sql.y" +#line 951 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2879 "yacc_sql.cpp" +#line 2881 "yacc_sql.cpp" break; case 127: /* comp_op: EXISTS */ -#line 950 "yacc_sql.y" +#line 952 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2885 "yacc_sql.cpp" +#line 2887 "yacc_sql.cpp" break; case 128: /* comp_op: NOT EXISTS */ -#line 951 "yacc_sql.y" +#line 953 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2891 "yacc_sql.cpp" +#line 2893 "yacc_sql.cpp" break; case 129: /* opt_order_by: %empty */ -#line 956 "yacc_sql.y" +#line 958 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2899 "yacc_sql.cpp" +#line 2901 "yacc_sql.cpp" break; case 130: /* opt_order_by: ORDER BY sort_list */ -#line 960 "yacc_sql.y" +#line 962 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2908 "yacc_sql.cpp" +#line 2910 "yacc_sql.cpp" break; case 131: /* sort_list: sort_unit */ -#line 968 "yacc_sql.y" +#line 970 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2917 "yacc_sql.cpp" +#line 2919 "yacc_sql.cpp" break; case 132: /* sort_list: sort_unit COMMA sort_list */ -#line 973 "yacc_sql.y" +#line 975 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2926 "yacc_sql.cpp" +#line 2928 "yacc_sql.cpp" break; case 133: /* sort_unit: expression */ -#line 981 "yacc_sql.y" +#line 983 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2936 "yacc_sql.cpp" +#line 2938 "yacc_sql.cpp" break; case 134: /* sort_unit: expression DESC */ -#line 987 "yacc_sql.y" +#line 989 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 2946 "yacc_sql.cpp" +#line 2948 "yacc_sql.cpp" break; case 135: /* sort_unit: expression ASC */ -#line 993 "yacc_sql.y" +#line 995 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2956 "yacc_sql.cpp" +#line 2958 "yacc_sql.cpp" break; case 136: /* group_by: %empty */ -#line 1002 "yacc_sql.y" +#line 1004 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 2964 "yacc_sql.cpp" +#line 2966 "yacc_sql.cpp" break; case 137: /* group_by: GROUP BY expression_list */ -#line 1006 "yacc_sql.y" +#line 1008 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 2972 "yacc_sql.cpp" +#line 2974 "yacc_sql.cpp" break; case 138: /* opt_having: %empty */ -#line 1013 "yacc_sql.y" +#line 1015 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2980 "yacc_sql.cpp" +#line 2982 "yacc_sql.cpp" break; case 139: /* opt_having: HAVING condition */ -#line 1017 "yacc_sql.y" +#line 1019 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2988 "yacc_sql.cpp" +#line 2990 "yacc_sql.cpp" break; case 140: /* opt_limit: %empty */ -#line 1024 "yacc_sql.y" +#line 1026 "yacc_sql.y" { (yyval.limited_info) = nullptr; } -#line 2996 "yacc_sql.cpp" +#line 2998 "yacc_sql.cpp" break; case 141: /* opt_limit: LIMIT NUMBER */ -#line 1028 "yacc_sql.y" +#line 1030 "yacc_sql.y" { (yyval.limited_info) = new LimitSqlNode(); (yyval.limited_info)->number = (yyvsp[0].number); } -#line 3005 "yacc_sql.cpp" +#line 3007 "yacc_sql.cpp" break; case 142: /* load_data_stmt: LOAD DATA INFILE SSS INTO TABLE ID */ -#line 1036 "yacc_sql.y" +#line 1038 "yacc_sql.y" { char *tmp_file_name = common::substr((yyvsp[-3].string), 1, strlen((yyvsp[-3].string)) - 2); @@ -3015,20 +3017,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[0].string)); free(tmp_file_name); } -#line 3019 "yacc_sql.cpp" +#line 3021 "yacc_sql.cpp" break; case 143: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1049 "yacc_sql.y" +#line 1051 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3028 "yacc_sql.cpp" +#line 3030 "yacc_sql.cpp" break; case 144: /* set_variable_stmt: SET ID EQ value */ -#line 1057 "yacc_sql.y" +#line 1059 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -3036,11 +3038,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3040 "yacc_sql.cpp" +#line 3042 "yacc_sql.cpp" break; -#line 3044 "yacc_sql.cpp" +#line 3046 "yacc_sql.cpp" default: break; } @@ -3269,7 +3271,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1069 "yacc_sql.y" +#line 1071 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 6d186c50..abbaa81d 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -472,7 +472,9 @@ attr_def: } else if ($$->type == AttrType::DATES) { $$->length = sizeof(int); } else if ($$->type == AttrType::CHARS) { - $$->length = 4; // miniob🀄AttrType::CHARS默认长度为4 + $$->length = sizeof(char); + } else if ($$->type == AttrType::VECTORS) { + $$->length = sizeof(float) * 1; } else if ($$->type == AttrType::TEXTS) { $$->length = 65535; } else { From 0b3df12e6e928e567ed1bf4d218ea3b83dc9e6b4 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 15:04:02 +0800 Subject: [PATCH 257/308] =?UTF-8?q?=E5=AE=8C=E6=88=90DISTANCE=EF=BC=8CSTRI?= =?UTF-8?q?NG=5FTO=5FVECTOR=EF=BC=8CVECTOR=5FTO=5FSTRING=EF=BC=8CVECTOR=5F?= =?UTF-8?q?DIM=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 137 ++++++++++++----------- src/observer/common/type/vector_type.cpp | 6 +- src/observer/common/value.cpp | 8 ++ src/observer/common/value.h | 2 + src/observer/sql/builtin/builtin.cpp | 96 +++++++++++++++- src/observer/sql/builtin/builtin.h | 8 ++ src/observer/sql/expr/expression.cpp | 26 +++++ src/observer/sql/expr/expression.h | 20 +--- 8 files changed, 218 insertions(+), 85 deletions(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 8f775456..41d71d21 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -19,74 +19,75 @@ See the Mulan PSL v2 for more details. */ * @enum RC */ -#define DEFINE_RCS \ - DEFINE_RC(SUCCESS) \ - DEFINE_RC(INVALID_ALIAS) \ - DEFINE_RC(INVALID_ARGUMENT) \ - DEFINE_RC(INVALID_HAVING_CONDITION) \ - DEFINE_RC(UNIMPLEMENTED) \ - DEFINE_RC(SQL_SYNTAX) \ - DEFINE_RC(INTERNAL) \ - DEFINE_RC(NOMEM) \ - DEFINE_RC(NOTFOUND) \ - DEFINE_RC(NUMBER_DIV_ZERO) \ - DEFINE_RC(EMPTY) \ - DEFINE_RC(ERROR_DATE) \ - DEFINE_RC(FULL) \ - DEFINE_RC(EXIST) \ - DEFINE_RC(NOT_EXIST) \ - DEFINE_RC(BUFFERPOOL_OPEN) \ - DEFINE_RC(BUFFERPOOL_NOBUF) \ - DEFINE_RC(BUFFERPOOL_INVALID_PAGE_NUM) \ - DEFINE_RC(RECORD_OPENNED) \ - DEFINE_RC(RECORD_INVALID_RID) \ - DEFINE_RC(RECORD_INVALID_KEY) \ - DEFINE_RC(RECORD_DUPLICATE_KEY) \ - DEFINE_RC(RECORD_NOMEM) \ - DEFINE_RC(RECORD_EOF) \ - DEFINE_RC(RECORD_NOT_EXIST) \ - DEFINE_RC(RECORD_INVISIBLE) \ - DEFINE_RC(SCHEMA_DB_EXIST) \ - DEFINE_RC(SCHEMA_DB_NOT_EXIST) \ - DEFINE_RC(SCHEMA_DB_NOT_OPENED) \ - DEFINE_RC(SCHEMA_TABLE_NOT_EXIST) \ - DEFINE_RC(SCHEMA_TABLE_EXIST) \ - DEFINE_RC(SCHEMA_FIELD_NOT_EXIST) \ - DEFINE_RC(SCHEMA_FIELD_MISSING) \ - DEFINE_RC(SCHEMA_FIELD_TYPE_MISMATCH) \ - DEFINE_RC(SCHEMA_INDEX_NAME_REPEAT) \ - DEFINE_RC(IOERR_READ) \ - DEFINE_RC(IOERR_WRITE) \ - DEFINE_RC(IOERR_ACCESS) \ - DEFINE_RC(IOERR_OPEN) \ - DEFINE_RC(IOERR_CLOSE) \ - DEFINE_RC(IOERR_SEEK) \ - DEFINE_RC(IOERR_TOO_LONG) \ - DEFINE_RC(IOERR_SYNC) \ - DEFINE_RC(VECTOR_PARSE_ERROR) \ - DEFINE_RC(LOCKED_UNLOCK) \ - DEFINE_RC(LOCKED_NEED_WAIT) \ - DEFINE_RC(LOCKED_CONCURRENCY_CONFLICT) \ - DEFINE_RC(FILE_EXIST) \ - DEFINE_RC(FILE_NOT_EXIST) \ - DEFINE_RC(FILE_NAME) \ - DEFINE_RC(FILE_BOUND) \ - DEFINE_RC(FILE_CREATE) \ - DEFINE_RC(FILE_OPEN) \ - DEFINE_RC(FILE_NOT_OPENED) \ - DEFINE_RC(FILE_CLOSE) \ - DEFINE_RC(FILE_REMOVE) \ - DEFINE_RC(VARIABLE_NOT_EXISTS) \ - DEFINE_RC(VARIABLE_NOT_VALID) \ - DEFINE_RC(LOGBUF_FULL) \ - DEFINE_RC(LOG_FILE_FULL) \ - DEFINE_RC(LOG_ENTRY_INVALID) \ - DEFINE_RC(UNSUPPORTED) \ - DEFINE_RC(VALUE_TOO_LONG) \ - DEFINE_RC(TO_LONG_SUBQUERY_EXPR) \ - DEFINE_RC(NOT_NULLABLE_VALUE) \ - DEFINE_RC(NOT_NULL_AFTER_IS) \ - DEFINE_RC(UNKNOWN_FUNCTION) \ +#define DEFINE_RCS \ + DEFINE_RC(SUCCESS) \ + DEFINE_RC(INVALID_ALIAS) \ + DEFINE_RC(INVALID_ARGUMENT) \ + DEFINE_RC(INVALID_HAVING_CONDITION) \ + DEFINE_RC(UNIMPLEMENTED) \ + DEFINE_RC(SQL_SYNTAX) \ + DEFINE_RC(INTERNAL) \ + DEFINE_RC(NOMEM) \ + DEFINE_RC(NOTFOUND) \ + DEFINE_RC(NUMBER_DIV_ZERO) \ + DEFINE_RC(EMPTY) \ + DEFINE_RC(ERROR_DATE) \ + DEFINE_RC(FULL) \ + DEFINE_RC(EXIST) \ + DEFINE_RC(NOT_EXIST) \ + DEFINE_RC(BUFFERPOOL_OPEN) \ + DEFINE_RC(BUFFERPOOL_NOBUF) \ + DEFINE_RC(BUFFERPOOL_INVALID_PAGE_NUM) \ + DEFINE_RC(RECORD_OPENNED) \ + DEFINE_RC(RECORD_INVALID_RID) \ + DEFINE_RC(RECORD_INVALID_KEY) \ + DEFINE_RC(RECORD_DUPLICATE_KEY) \ + DEFINE_RC(RECORD_NOMEM) \ + DEFINE_RC(RECORD_EOF) \ + DEFINE_RC(RECORD_NOT_EXIST) \ + DEFINE_RC(RECORD_INVISIBLE) \ + DEFINE_RC(SCHEMA_DB_EXIST) \ + DEFINE_RC(SCHEMA_DB_NOT_EXIST) \ + DEFINE_RC(SCHEMA_DB_NOT_OPENED) \ + DEFINE_RC(SCHEMA_TABLE_NOT_EXIST) \ + DEFINE_RC(SCHEMA_TABLE_EXIST) \ + DEFINE_RC(SCHEMA_FIELD_NOT_EXIST) \ + DEFINE_RC(SCHEMA_FIELD_MISSING) \ + DEFINE_RC(SCHEMA_FIELD_TYPE_MISMATCH) \ + DEFINE_RC(SCHEMA_INDEX_NAME_REPEAT) \ + DEFINE_RC(IOERR_READ) \ + DEFINE_RC(IOERR_WRITE) \ + DEFINE_RC(IOERR_ACCESS) \ + DEFINE_RC(IOERR_OPEN) \ + DEFINE_RC(IOERR_CLOSE) \ + DEFINE_RC(IOERR_SEEK) \ + DEFINE_RC(IOERR_TOO_LONG) \ + DEFINE_RC(IOERR_SYNC) \ + DEFINE_RC(VECTOR_PARSE_ERROR) \ + DEFINE_RC(LOCKED_UNLOCK) \ + DEFINE_RC(LOCKED_NEED_WAIT) \ + DEFINE_RC(LOCKED_CONCURRENCY_CONFLICT) \ + DEFINE_RC(FILE_EXIST) \ + DEFINE_RC(FILE_NOT_EXIST) \ + DEFINE_RC(FILE_NAME) \ + DEFINE_RC(FILE_BOUND) \ + DEFINE_RC(FILE_CREATE) \ + DEFINE_RC(FILE_OPEN) \ + DEFINE_RC(FILE_NOT_OPENED) \ + DEFINE_RC(FILE_CLOSE) \ + DEFINE_RC(FILE_REMOVE) \ + DEFINE_RC(VARIABLE_NOT_EXISTS) \ + DEFINE_RC(VARIABLE_NOT_VALID) \ + DEFINE_RC(LOGBUF_FULL) \ + DEFINE_RC(LOG_FILE_FULL) \ + DEFINE_RC(LOG_ENTRY_INVALID) \ + DEFINE_RC(UNSUPPORTED) \ + DEFINE_RC(VALUE_TOO_LONG) \ + DEFINE_RC(VECTOR_LENGTG_ARE_INCONSISTENT) \ + DEFINE_RC(TO_LONG_SUBQUERY_EXPR) \ + DEFINE_RC(NOT_NULLABLE_VALUE) \ + DEFINE_RC(NOT_NULL_AFTER_IS) \ + DEFINE_RC(UNKNOWN_FUNCTION) \ DEFINE_RC(SUBQUERY_RETURNED_MULTIPLE_ROWS) enum class RC diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index 3fae3a3f..b3755ce4 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -8,7 +8,11 @@ int VectorType::compare(const Value &left, const Value &right) const { return DataType::compare(left, right); } RC VectorType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const { - return DataType::cast_to(val, type, result, allow_type_promotion); + if (type == AttrType::CHARS) { + result = Value(val.to_string().c_str()); + return RC::SUCCESS; + } + return RC::INTERNAL; } RC VectorType::set_value_from_str(Value &val, const string &data) const { diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index cbcd7240..6aecb976 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -460,3 +460,11 @@ RC Value::borrow_text(const Value &v) length_ = v.length_; return RC::SUCCESS; } + +int Value::get_vector_length() const { return length_ / sizeof(float); } + +float Value::get_vector_element(int i) const +{ + auto ptr = value_.pointer_value_ + sizeof(float) * i; + return *(float *)(ptr); +} diff --git a/src/observer/common/value.h b/src/observer/common/value.h index db50ca47..b0003b59 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -122,6 +122,8 @@ class Value final string get_string() const; bool get_boolean() const; int get_date() const; + int get_vector_length() const; + float get_vector_element(int i) const; bool is_null() const { return is_null_; } inline bool is_str() const { return attr_type_ == AttrType::CHARS; } diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index aef32c86..a20de953 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -92,7 +92,6 @@ static string get_full_month_name(int month) RC date_format(const vector &args, Value &result) { - if (args.size() != 2) { return RC::INVALID_ARGUMENT; } @@ -171,4 +170,99 @@ RC date_format(const vector &args, Value &result) return RC::SUCCESS; } +RC distance(const vector &args, Value &result) +{ + if (args.size() != 2) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::VECTORS && args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + if (args[1].attr_type() != AttrType::VECTORS && args[1].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + + Value value0, value1; + if (args[0].attr_type() == AttrType::CHARS) { + RC rc = Value::cast_to(args[0], AttrType::VECTORS, value0); + if (OB_FAIL(rc)) { + return rc; + } + } else if (args[0].attr_type() == AttrType::VECTORS) { + value0 = args[0]; + } else { + return RC::INVALID_ARGUMENT; + } + + if (args[1].attr_type() == AttrType::CHARS) { + RC rc = Value::cast_to(args[1], AttrType::VECTORS, value1); + if (OB_FAIL(rc)) { + return rc; + } + } else if (args[1].attr_type() == AttrType::VECTORS) { + value1 = args[1]; + } else { + return RC::INVALID_ARGUMENT; + } + + auto v0_length = value0.get_vector_length(); + auto v1_length = value1.get_vector_length(); + if (v0_length != v1_length) { + return RC::VECTOR_LENGTG_ARE_INCONSISTENT; + } + + float ans = 0.0; + for (int i = 0; i < v0_length; i++) { + float v0 = value0.get_vector_element(i); + float v1 = value1.get_vector_element(i); + ans += (v0 - v1) * (v0 - v1); + } + ans = std::sqrt(ans); + result = Value(ans); + return RC::SUCCESS; +} + +RC string_to_vector(const vector &args, Value &result) +{ + if (args.size() != 1) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + return Value::cast_to(args[0], AttrType::VECTORS, result); +} + +RC vector_to_string(const vector &args, Value &result) +{ + if (args.size() != 1) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::VECTORS) { + return RC::INVALID_ARGUMENT; + } + return Value::cast_to(args[0], AttrType::CHARS, result); +} + +RC vector_dim(const vector &args, Value &result) +{ + if (args.size() != 1) { + return RC::INVALID_ARGUMENT; + } + Value value; + if (args[0].attr_type() == AttrType::CHARS) { + RC rc = Value::cast_to(args[0], AttrType::VECTORS, value); + if (OB_FAIL(rc)) { + return rc; + } + } else if (args[0].attr_type() == AttrType::VECTORS) { + value = args[0]; + } else { + return RC::INVALID_ARGUMENT; + } + + result = Value(value.get_vector_length()); + return RC::SUCCESS; +} + } // namespace builtin diff --git a/src/observer/sql/builtin/builtin.h b/src/observer/sql/builtin/builtin.h index d8cac999..9e64f7de 100644 --- a/src/observer/sql/builtin/builtin.h +++ b/src/observer/sql/builtin/builtin.h @@ -22,4 +22,12 @@ extern RC round(const vector &args, Value &result); extern RC date_format(const vector &args, Value &result); +extern RC distance(const vector &args, Value &result); + +extern RC string_to_vector(const vector &args, Value &result); + +extern RC vector_to_string(const vector &args, Value &result); + +extern RC vector_dim(const vector &args, Value &result); + }; // namespace builtin diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 0049a46d..b3ccdc5f 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -869,6 +869,10 @@ RC NormalFunctionExpr::type_from_string(const char *type_str, NormalFunctionExpr check_type("date_format", Type::DATE_FORMAT); check_type("length", Type::LENGTH); check_type("round", Type::ROUND); + check_type("distance", Type::DISTANCE); + check_type("string_to_vector", Type::STRING_TO_VECTOR); + check_type("vector_to_string", Type::VECTOR_TO_STRING); + check_type("vector_dim", Type::VECTOR_DIM); return RC::INVALID_ARGUMENT; } @@ -887,6 +891,10 @@ RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) case Type::LENGTH: return builtin::length(args_values_, result); case Type::ROUND: return builtin::round(args_values_, result); case Type::DATE_FORMAT: return builtin::date_format(args_values_, result); + case Type::DISTANCE: return builtin::distance(args_values_, result); + case Type::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); + case Type::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); + case Type::VECTOR_DIM: return builtin::vector_dim(args_values_, result); } return RC::INTERNAL; } @@ -906,6 +914,24 @@ RC NormalFunctionExpr::try_get_value(Value &result) const case Type::LENGTH: return builtin::length(args_values_, result); case Type::ROUND: return builtin::round(args_values_, result); case Type::DATE_FORMAT: return builtin::date_format(args_values_, result); + case Type::DISTANCE: return builtin::distance(args_values_, result); + case Type::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); + case Type::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); + case Type::VECTOR_DIM: return builtin::vector_dim(args_values_, result); } return RC::INTERNAL; } + +AttrType NormalFunctionExpr::value_type() const +{ + switch (type_) { + case Type::LENGTH: return AttrType::INTS; + case Type::ROUND: return AttrType::FLOATS; + case Type::DATE_FORMAT: return AttrType::CHARS; + case Type::DISTANCE: return AttrType::FLOATS; + case Type::STRING_TO_VECTOR: return AttrType::VECTORS; + case Type::VECTOR_TO_STRING: return AttrType::CHARS; + case Type::VECTOR_DIM: return AttrType::INTS; + } + return AttrType::UNDEFINED; +} diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index bac00738..12bf601d 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -465,6 +465,10 @@ class NormalFunctionExpr : public UnboundFunctionExpr LENGTH, ROUND, DATE_FORMAT, + DISTANCE, + STRING_TO_VECTOR, + VECTOR_TO_STRING, + VECTOR_DIM, }; NormalFunctionExpr(Type type, const char *aggregate_name, std::vector> child) @@ -477,21 +481,7 @@ class NormalFunctionExpr : public UnboundFunctionExpr Type function_type() const { return type_; } - AttrType value_type() const override - { - switch (type_) { - case Type::LENGTH: { - return AttrType::INTS; - } - case Type::ROUND: { - return AttrType::FLOATS; - } - case Type::DATE_FORMAT: { - return AttrType::CHARS; - } - } - return AttrType::UNDEFINED; - } + AttrType value_type() const override; RC get_value(const Tuple &tuple, Value &value) override; RC try_get_value(Value &value) const override; From 83d03542753f87651455e53971c55c8a0db94ee3 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 15:34:57 +0800 Subject: [PATCH 258/308] =?UTF-8?q?=E5=AE=8C=E6=88=90YEAR,MONTH,DAY?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 97 ++++++++++++++++++++++------ src/observer/sql/builtin/builtin.h | 6 ++ src/observer/sql/expr/expression.cpp | 12 ++++ src/observer/sql/expr/expression.h | 3 + 4 files changed, 100 insertions(+), 18 deletions(-) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index a20de953..300b5270 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -88,33 +88,20 @@ static string get_full_month_name(int month) default: return ""; // 如果月份值无效,返回一个错误字符串 } } -} // namespace date -RC date_format(const vector &args, Value &result) +static RC get_year_month_day(const Value &value, int &year, int &month, int &day) { - if (args.size() != 2) { - return RC::INVALID_ARGUMENT; - } - if (args[0].attr_type() != AttrType::DATES && args[0].attr_type() != AttrType::CHARS) { - return RC::INVALID_ARGUMENT; - } - if (args[1].attr_type() != AttrType::CHARS) { - return RC::INVALID_ARGUMENT; - } - - int year, month, day; - - if (args[0].attr_type() == AttrType::DATES) { + if (value.attr_type() == AttrType::DATES) { // 提取年、月、日(假设日期格式为YYYYMMDD) - int val = args[0].get_date(); + int val = value.get_date(); year = val / 10000; // 获取年份 month = (val / 100) % 100; // 获取月份 day = val % 100; // 获取日期 } - if (args[0].attr_type() == AttrType::CHARS) { + if (value.attr_type() == AttrType::CHARS) { // 日期格式假设为 '2019-9-17' 或 '2019-09-17' - std::string date_str = args[0].to_string(); + std::string date_str = value.to_string(); if (sscanf(date_str.c_str(), "%d-%d-%d", &year, &month, &day) != 3) { return RC::INVALID_ARGUMENT; } @@ -124,6 +111,80 @@ RC date_format(const vector &args, Value &result) return RC::ERROR_DATE; } + return RC::SUCCESS; +} + +} // namespace date + +RC year(const vector &args, Value &result) +{ + if (args.size() != 1) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::DATES && args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + int year, month, day; + RC rc = date::get_year_month_day(args[0], year, month, day); + if (OB_FAIL(rc)) { + return rc; + } + result = Value(year); + return RC::SUCCESS; +} + +RC month(const vector &args, Value &result) +{ + if (args.size() != 1) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::DATES && args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + int year, month, day; + RC rc = date::get_year_month_day(args[0], year, month, day); + if (OB_FAIL(rc)) { + return rc; + } + result = Value(month); + return RC::SUCCESS; +} + +RC day(const vector &args, Value &result) +{ + if (args.size() != 1) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::DATES && args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + int year, month, day; + RC rc = date::get_year_month_day(args[0], year, month, day); + if (OB_FAIL(rc)) { + return rc; + } + result = Value(day); + return RC::SUCCESS; +} + +RC date_format(const vector &args, Value &result) +{ + if (args.size() != 2) { + return RC::INVALID_ARGUMENT; + } + if (args[0].attr_type() != AttrType::DATES && args[0].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + if (args[1].attr_type() != AttrType::CHARS) { + return RC::INVALID_ARGUMENT; + } + + int year, month, day; + RC rc = date::get_year_month_day(args[0], year, month, day); + if (OB_FAIL(rc)) { + return rc; + } + auto fmt = args[1].to_string(); string str; diff --git a/src/observer/sql/builtin/builtin.h b/src/observer/sql/builtin/builtin.h index 9e64f7de..f60145bc 100644 --- a/src/observer/sql/builtin/builtin.h +++ b/src/observer/sql/builtin/builtin.h @@ -20,6 +20,12 @@ extern RC length(const vector &args, Value &result); extern RC round(const vector &args, Value &result); +extern RC year(const vector &args, Value &result); + +extern RC month(const vector &args, Value &result); + +extern RC day(const vector &args, Value &result); + extern RC date_format(const vector &args, Value &result); extern RC distance(const vector &args, Value &result); diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index b3ccdc5f..91b78667 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -866,6 +866,9 @@ ListExpr::ListExpr(std::vector &&exprs) RC NormalFunctionExpr::type_from_string(const char *type_str, NormalFunctionExpr::Type &type) { + check_type("day", Type::DAY); + check_type("month", Type::MONTH); + check_type("year", Type::YEAR); check_type("date_format", Type::DATE_FORMAT); check_type("length", Type::LENGTH); check_type("round", Type::ROUND); @@ -895,6 +898,9 @@ RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) case Type::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); case Type::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); case Type::VECTOR_DIM: return builtin::vector_dim(args_values_, result); + case Type::YEAR: return builtin::year(args_values_, result); + case Type::MONTH: return builtin::month(args_values_, result); + case Type::DAY: return builtin::day(args_values_, result); } return RC::INTERNAL; } @@ -918,6 +924,9 @@ RC NormalFunctionExpr::try_get_value(Value &result) const case Type::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); case Type::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); case Type::VECTOR_DIM: return builtin::vector_dim(args_values_, result); + case Type::YEAR: return builtin::year(args_values_, result); + case Type::MONTH: return builtin::month(args_values_, result); + case Type::DAY: return builtin::day(args_values_, result); } return RC::INTERNAL; } @@ -932,6 +941,9 @@ AttrType NormalFunctionExpr::value_type() const case Type::STRING_TO_VECTOR: return AttrType::VECTORS; case Type::VECTOR_TO_STRING: return AttrType::CHARS; case Type::VECTOR_DIM: return AttrType::INTS; + case Type::YEAR: return AttrType::INTS; + case Type::MONTH: return AttrType::INTS; + case Type::DAY: return AttrType::INTS; } return AttrType::UNDEFINED; } diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 12bf601d..c2e25976 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -464,6 +464,9 @@ class NormalFunctionExpr : public UnboundFunctionExpr { LENGTH, ROUND, + YEAR, + MONTH, + DAY, DATE_FORMAT, DISTANCE, STRING_TO_VECTOR, From e49bcb867187129469ee2a6015a09d9c856fdb3c Mon Sep 17 00:00:00 2001 From: Koschei Date: Wed, 16 Oct 2024 16:00:15 +0800 Subject: [PATCH 259/308] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A?= =?UTF-8?q?=E8=A1=A8=E8=87=AA=E4=BA=A4=EF=BC=8C=E7=9B=AE=E5=89=8D=E4=BB=85?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=9F=BA=E8=A1=A8=E8=87=AA=E4=BA=A4=E5=8F=96?= =?UTF-8?q?=E4=BA=86=E5=88=AB=E5=90=8D=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 2 +- src/observer/sql/expr/tuple.h | 11 ++++++++++ src/observer/sql/expr/tuple_cell.cpp | 6 ------ .../operator/index_scan_physical_operator.cpp | 13 ++++++++++++ .../operator/index_scan_physical_operator.h | 5 ++++- .../operator/table_get_logical_operator.cpp | 8 ++++++++ .../sql/operator/table_get_logical_operator.h | 8 ++++++-- .../operator/table_scan_physical_operator.h | 7 ++++++- .../operator/view_scan_physical_operator.h | 8 +++++++- .../sql/optimizer/logical_plan_generator.cpp | 6 ++++-- .../sql/optimizer/physical_plan_generator.cpp | 8 +++++--- src/observer/sql/parser/expression_binder.cpp | 19 ++++++++++++++---- src/observer/sql/parser/expression_binder.h | 11 ++++++++++ src/observer/sql/stmt/delete_stmt.cpp | 2 +- src/observer/sql/stmt/filter_stmt.cpp | 5 +++-- src/observer/sql/stmt/filter_stmt.h | 4 ++-- src/observer/sql/stmt/select_stmt.cpp | 20 +++++++++++++------ src/observer/sql/stmt/select_stmt.h | 2 ++ src/observer/sql/stmt/update_stmt.cpp | 2 +- 19 files changed, 114 insertions(+), 33 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 337ed4bd..c0ed3559 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -27,7 +27,7 @@ using namespace std; RC FieldExpr::get_value(const Tuple &tuple, Value &value) { - return tuple.find_cell(TupleCellSpec(table_name(), field_name()), value); + return tuple.find_cell(TupleCellSpec(table_name(), field_name(), alias()), value); } bool FieldExpr::equal(const Expression &other) const diff --git a/src/observer/sql/expr/tuple.h b/src/observer/sql/expr/tuple.h index eb5b4e39..ec87401d 100644 --- a/src/observer/sql/expr/tuple.h +++ b/src/observer/sql/expr/tuple.h @@ -199,6 +199,8 @@ class RowTuple : public Tuple } } + void set_table_alias(std::string &alias) { table_alias_ = std::move(alias); } + int cell_num() const override { return speces_.size(); } RC cell_at(int index, Value &cell) const override @@ -238,6 +240,14 @@ class RowTuple : public Tuple { const char *table_name = spec.table_name(); const char *field_name = spec.field_name(); + const char *alias = spec.alias(); + + if (!common::is_blank(alias)) { + if (0 != strcmp(alias, table_alias_.c_str())) { + return RC::NOTFOUND; + } + } + if (0 != strcmp(table_name, table_->name())) { return RC::NOTFOUND; } @@ -272,6 +282,7 @@ class RowTuple : public Tuple Record *record_ = nullptr; const BaseTable *table_ = nullptr; std::vector speces_; + std::string table_alias_; }; /** diff --git a/src/observer/sql/expr/tuple_cell.cpp b/src/observer/sql/expr/tuple_cell.cpp index c0f111d5..f55b93a5 100644 --- a/src/observer/sql/expr/tuple_cell.cpp +++ b/src/observer/sql/expr/tuple_cell.cpp @@ -27,12 +27,6 @@ TupleCellSpec::TupleCellSpec(const char *table_name, const char *field_name, con } if (alias) { alias_ = alias; - } else { - if (table_name_.empty()) { - alias_ = field_name_; - } else { - alias_ = table_name_ + "." + field_name_; - } } } diff --git a/src/observer/sql/operator/index_scan_physical_operator.cpp b/src/observer/sql/operator/index_scan_physical_operator.cpp index 38483095..fd4a8966 100644 --- a/src/observer/sql/operator/index_scan_physical_operator.cpp +++ b/src/observer/sql/operator/index_scan_physical_operator.cpp @@ -28,6 +28,19 @@ IndexScanPhysicalOperator::IndexScanPhysicalOperator(Table *table, Index *index, } } +IndexScanPhysicalOperator::IndexScanPhysicalOperator(Table *table, std::string table_alias, Index *index, + ReadWriteMode mode, const Value *left_value, bool left_inclusive, const Value *right_value, bool right_inclusive) + : table_(table), index_(index), mode_(mode), left_inclusive_(left_inclusive), right_inclusive_(right_inclusive) +{ + tuple_.set_table_alias(table_alias); + if (left_value) { + left_value_ = *left_value; + } + if (right_value) { + right_value_ = *right_value; + } +} + RC IndexScanPhysicalOperator::open(Trx *trx) { if (nullptr == table_ || nullptr == index_) { diff --git a/src/observer/sql/operator/index_scan_physical_operator.h b/src/observer/sql/operator/index_scan_physical_operator.h index 902c49f6..fb7b8939 100644 --- a/src/observer/sql/operator/index_scan_physical_operator.h +++ b/src/observer/sql/operator/index_scan_physical_operator.h @@ -28,7 +28,10 @@ class IndexScanPhysicalOperator : public PhysicalOperator IndexScanPhysicalOperator(Table *table, Index *index, ReadWriteMode mode, const Value *left_value, bool left_inclusive, const Value *right_value, bool right_inclusive); - virtual ~IndexScanPhysicalOperator() = default; + IndexScanPhysicalOperator(Table *table, std::string table_alias, Index *index, ReadWriteMode mode, + const Value *left_value, bool left_inclusive, const Value *right_value, bool right_inclusive); + + ~IndexScanPhysicalOperator() override = default; PhysicalOperatorType type() const override { return PhysicalOperatorType::INDEX_SCAN; } diff --git a/src/observer/sql/operator/table_get_logical_operator.cpp b/src/observer/sql/operator/table_get_logical_operator.cpp index 705069db..672af036 100644 --- a/src/observer/sql/operator/table_get_logical_operator.cpp +++ b/src/observer/sql/operator/table_get_logical_operator.cpp @@ -14,8 +14,16 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/table_get_logical_operator.h" +#include + TableGetLogicalOperator::TableGetLogicalOperator(BaseTable *table, ReadWriteMode mode) : table_(table), mode_(mode) {} +TableGetLogicalOperator::TableGetLogicalOperator(BaseTable *table, std::string table_alias, ReadWriteMode mode) + : table_(table), mode_(mode) +{ + table_alias_ = std::move(table_alias); +} + void TableGetLogicalOperator::set_predicates(std::vector> &&exprs) { predicates_ = std::move(exprs); diff --git a/src/observer/sql/operator/table_get_logical_operator.h b/src/observer/sql/operator/table_get_logical_operator.h index 2c39071b..66e2e151 100644 --- a/src/observer/sql/operator/table_get_logical_operator.h +++ b/src/observer/sql/operator/table_get_logical_operator.h @@ -26,7 +26,8 @@ class TableGetLogicalOperator : public LogicalOperator { public: TableGetLogicalOperator(BaseTable *table, ReadWriteMode mode); - virtual ~TableGetLogicalOperator() = default; + TableGetLogicalOperator(BaseTable *table, std::string table_alias, ReadWriteMode mode); + ~TableGetLogicalOperator() override = default; LogicalOperatorType type() const override { return LogicalOperatorType::TABLE_GET; } @@ -36,9 +37,12 @@ class TableGetLogicalOperator : public LogicalOperator void set_predicates(std::vector> &&exprs); auto predicates() -> std::vector> & { return predicates_; } + std::string &table_alias() { return table_alias_; } + private: BaseTable *table_ = nullptr; - ReadWriteMode mode_ = ReadWriteMode::READ_WRITE; + std::string table_alias_; + ReadWriteMode mode_ = ReadWriteMode::READ_WRITE; // 与当前表相关的过滤操作,可以尝试在遍历数据时执行 // 这里的表达式都是比较简单的比较运算,并且左右两边都是取字段表达式或值表达式 diff --git a/src/observer/sql/operator/table_scan_physical_operator.h b/src/observer/sql/operator/table_scan_physical_operator.h index 206ecfd8..28678031 100644 --- a/src/observer/sql/operator/table_scan_physical_operator.h +++ b/src/observer/sql/operator/table_scan_physical_operator.h @@ -30,7 +30,12 @@ class TableScanPhysicalOperator : public PhysicalOperator public: TableScanPhysicalOperator(Table *table, ReadWriteMode mode) : table_(table), mode_(mode) {} - virtual ~TableScanPhysicalOperator() = default; + TableScanPhysicalOperator(Table *table, std::string alias, ReadWriteMode mode) : table_(table), mode_(mode) + { + tuple_.set_table_alias(alias); + } + + ~TableScanPhysicalOperator() override = default; std::string param() const override; diff --git a/src/observer/sql/operator/view_scan_physical_operator.h b/src/observer/sql/operator/view_scan_physical_operator.h index d55d3c82..1716a225 100644 --- a/src/observer/sql/operator/view_scan_physical_operator.h +++ b/src/observer/sql/operator/view_scan_physical_operator.h @@ -28,7 +28,13 @@ class View; class ViewScanPhysicalOperator : public PhysicalOperator { public: - ViewScanPhysicalOperator(View *view, ReadWriteMode mode) : view_(view) { select_expr_ = view_->select_oper().get(); } + ViewScanPhysicalOperator(View *view) : view_(view) { select_expr_ = view_->select_oper().get(); } + + ViewScanPhysicalOperator(View *view, std::string alias) : view_(view) + { + tuple_.set_table_alias(alias); + select_expr_ = view_->select_oper().get(); + } ~ViewScanPhysicalOperator() override = default; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index 0f1c7e4a..784a2332 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -104,8 +104,10 @@ RC LogicalPlanGenerator::create_plan(SelectStmt *select_stmt, unique_ptr &tables = select_stmt->tables(); - for (BaseTable *table : tables) { - unique_ptr table_get_oper(new TableGetLogicalOperator(table, ReadWriteMode::READ_ONLY)); + const std::vector &alias = select_stmt->tables_alias(); + for (int i = 0; i < tables.size(); ++i) { + unique_ptr table_get_oper( + new TableGetLogicalOperator(tables[i], alias[i], ReadWriteMode::READ_ONLY)); if (table_oper == nullptr) { table_oper = std::move(table_get_oper); } else { diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index d0877213..f704b4e3 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -188,6 +188,7 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u const Value &value = value_expr->get_value(); IndexScanPhysicalOperator *index_scan_oper = new IndexScanPhysicalOperator(table, + std::move(table_get_oper.table_alias()), index, table_get_oper.read_write_mode(), &value, @@ -200,13 +201,14 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u LOG_TRACE("Index scan used on table: {}", table->name()); } else { if (base_table->type() == TableType::Table) { - auto table_scan_oper = std::make_unique(table, table_get_oper.read_write_mode()); + auto table_scan_oper = std::make_unique( + table, std::move(table_get_oper.table_alias()), table_get_oper.read_write_mode()); table_scan_oper->set_predicates(std::move(predicates)); oper = std::move(table_scan_oper); LOG_TRACE("Table scan used on table: {}", table->name()); } else if (base_table->type() == TableType::View) { - auto view = static_cast(base_table); - auto table_scan_oper = std::make_unique(view, table_get_oper.read_write_mode()); + auto view = dynamic_cast(base_table); + auto table_scan_oper = std::make_unique(view, std::move(table_get_oper.table_alias())); table_scan_oper->set_predicates(std::move(predicates)); oper = std::move(table_scan_oper); LOG_TRACE("View scan used on view: {}", view->name()); diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index a9d0fb33..3a06d42e 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -32,13 +32,15 @@ BaseTable *BinderContext::find_table(const char *table_name) const } //////////////////////////////////////////////////////////////////////////////// -static void wildcard_fields(BaseTable *table, vector> &expressions, bool multi_tables = false) +void ExpressionBinder::wildcard_fields( + BaseTable *table, std::string table_alias, vector> &expressions, bool multi_tables) { const TableMeta &table_meta = table->table_meta(); const int field_num = table_meta.field_num(); for (int i = table_meta.sys_field_num(); i < field_num; i++) { Field field(table, table_meta.field(i)); FieldExpr *field_expr = new FieldExpr(field); + field_expr->set_alias(std::move(table_alias)); // 这里设置了基类的 name 属性 if (multi_tables) { // 多表查询带表名 @@ -148,8 +150,8 @@ RC ExpressionBinder::bind_star_expression( tables_to_wildcard.insert(tables_to_wildcard.end(), all_tables.begin(), all_tables.end()); } - for (BaseTable *table : tables_to_wildcard) { - wildcard_fields(table, bound_expressions, multi_tables_); + for (int i = 0; i < tables_to_wildcard.size(); ++i) { + wildcard_fields(tables_to_wildcard[i], context_.alias()[i], bound_expressions, multi_tables_); } return RC::SUCCESS; @@ -178,8 +180,16 @@ RC ExpressionBinder::bind_unbound_field_expression( } } + std::string table_alias; + if (context_.has_tables_alias()) { + // 多表自交要投影某些列或者有谓词条件的,一定是通过别名进行查询 + if (strcmp(table->name(), table_name) != 0) { + table_alias = table_name; + } + } + if (0 == strcmp(field_name, "*")) { - wildcard_fields(table, bound_expressions, multi_tables_); + wildcard_fields(table, table_alias, bound_expressions, multi_tables_); } else { const FieldMeta *field_meta = table->table_meta().field(field_name); if (nullptr == field_meta) { @@ -189,6 +199,7 @@ RC ExpressionBinder::bind_unbound_field_expression( Field field(table, field_meta); FieldExpr *field_expr = new FieldExpr(field); + field_expr->set_alias(table_alias); // 这里设置了基类的 name 属性 if (!is_blank(unbound_field_expr->alias())) { field_expr->set_name(unbound_field_expr->alias()); diff --git a/src/observer/sql/parser/expression_binder.h b/src/observer/sql/parser/expression_binder.h index 894669ae..7b856536 100644 --- a/src/observer/sql/parser/expression_binder.h +++ b/src/observer/sql/parser/expression_binder.h @@ -36,6 +36,13 @@ class BinderContext const std::vector &query_tables() const { return query_tables_; } std::unordered_map &table_map() { return *tables_; } + // 对于 update delete 目前还不支持给表取别名,所以是空的 + bool has_tables_alias() { return !tables_alias_.empty(); } + + const std::vector &alias() { return tables_alias_; } + + void set_alias(std::vector alias) { tables_alias_ = std::move(alias); } + private: Db *db_; @@ -46,6 +53,7 @@ class BinderContext private: BaseTable *default_table_; std::vector query_tables_; + std::vector tables_alias_; std::unordered_map *tables_; }; @@ -86,6 +94,9 @@ class ExpressionBinder RC bind_exprlist_expression( std::unique_ptr &expr, std::vector> &bound_expressions); + void wildcard_fields(BaseTable *table, std::string table_alias, vector> &expressions, + bool multi_tables = false); + private: bool multi_tables_; BinderContext &context_; diff --git a/src/observer/sql/stmt/delete_stmt.cpp b/src/observer/sql/stmt/delete_stmt.cpp index 120c3b50..76a39d80 100644 --- a/src/observer/sql/stmt/delete_stmt.cpp +++ b/src/observer/sql/stmt/delete_stmt.cpp @@ -60,7 +60,7 @@ RC DeleteStmt::create(Db *db, DeleteSqlNode &delete_sql, Stmt *&stmt) table_map.insert(std::pair(std::string(table_name), table)); FilterStmt *filter_stmt = nullptr; - RC rc = FilterStmt::create(db, table, &table_map, delete_sql.condition, filter_stmt); + RC rc = FilterStmt::create(db, table, {}, &table_map, delete_sql.condition, filter_stmt); if (rc != RC::SUCCESS) { LOG_WARN("failed to create filter statement. rc=%d:%s", rc, strrc(rc)); return rc; diff --git a/src/observer/sql/stmt/filter_stmt.cpp b/src/observer/sql/stmt/filter_stmt.cpp index 8a156f03..33edee9c 100644 --- a/src/observer/sql/stmt/filter_stmt.cpp +++ b/src/observer/sql/stmt/filter_stmt.cpp @@ -21,8 +21,8 @@ See the Mulan PSL v2 for more details. */ FilterStmt::~FilterStmt() = default; -RC FilterStmt::create(Db *db, BaseTable *default_table, std::unordered_map *tables, - std::unique_ptr &condition, FilterStmt *&stmt) +RC FilterStmt::create(Db *db, BaseTable *default_table, std::vector tables_alias, + std::unordered_map *tables, std::unique_ptr &condition, FilterStmt *&stmt) { RC rc = RC::SUCCESS; stmt = nullptr; @@ -41,6 +41,7 @@ RC FilterStmt::create(Db *db, BaseTable *default_table, std::unordered_map *tables, - std::unique_ptr &condition, FilterStmt *&stmt); + static RC create(Db *db, BaseTable *default_table, std::vector tables_alias, + std::unordered_map *tables, std::unique_ptr &condition, FilterStmt *&stmt); bool condition_empty() const { return nullptr == condition_; } std::unique_ptr &condition() { return condition_; } diff --git a/src/observer/sql/stmt/select_stmt.cpp b/src/observer/sql/stmt/select_stmt.cpp index 0a4d7092..3e8b3ee5 100644 --- a/src/observer/sql/stmt/select_stmt.cpp +++ b/src/observer/sql/stmt/select_stmt.cpp @@ -45,6 +45,7 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt, vector tables; unordered_map table_map = parent_table_map; unordered_map temp_map; + std::vector tables_alias(select_sql.relations.size()); for (size_t i = 0; i < select_sql.relations.size(); i++) { const char *table_name = select_sql.relations[i].relation.c_str(); @@ -59,17 +60,20 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt, return RC::SCHEMA_TABLE_NOT_EXIST; } // 建立别名 - const string &table_alias = select_sql.relations[i].alias; + auto &table_alias = select_sql.relations[i].alias; if (!table_alias.empty()) { - const auto &success = temp_map.insert({table_alias, table}); + const auto &success = temp_map.emplace(table_alias, table); if (!success.second) return RC::INVALID_ALIAS; + } else { + temp_map.emplace(table_name, table); } + tables_alias[i] = table_alias; + tables.emplace_back(table); binder_context.add_table(table); - tables.push_back(table); - temp_map.insert({table_name, table}); } + // alias is all avaliable table_map.insert(temp_map.begin(), temp_map.end()); @@ -77,6 +81,8 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt, if (tables.size() == 1) { default_table = tables[0]; } + + binder_context.set_alias(tables_alias); binder_context.set_tables(&table_map); binder_context.set_default_table(default_table); // collect query fields in `select` statement @@ -117,7 +123,7 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt, // create filter statement in `where` statement FilterStmt *filter_stmt = nullptr; - RC rc = FilterStmt::create(db, default_table, &table_map, select_sql.conditions, filter_stmt); + RC rc = FilterStmt::create(db, default_table, binder_context.alias(), &table_map, select_sql.conditions, filter_stmt); if (rc != RC::SUCCESS) { LOG_WARN("cannot construct filter stmt"); return rc; @@ -125,7 +131,8 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt, // create filter statement in `having` statement FilterStmt *having_filter_stmt = nullptr; - rc = FilterStmt::create(db, default_table, &table_map, select_sql.having_conditions, having_filter_stmt); + rc = FilterStmt::create( + db, default_table, binder_context.alias(), &table_map, select_sql.having_conditions, having_filter_stmt); if (rc != RC::SUCCESS) { LOG_WARN("cannot construct having filter stmt"); return rc; @@ -135,6 +142,7 @@ RC SelectStmt::create(Db *db, SelectSqlNode &select_sql, Stmt *&stmt, SelectStmt *select_stmt = new SelectStmt(); select_stmt->tables_.swap(tables); + select_stmt->tables_alias_ = std::move(tables_alias); select_stmt->query_expressions_.swap(bound_expressions); select_stmt->filter_stmt_ = filter_stmt; select_stmt->group_by_.swap(group_by_expressions); diff --git a/src/observer/sql/stmt/select_stmt.h b/src/observer/sql/stmt/select_stmt.h index bd7c9454..5e0e0e16 100644 --- a/src/observer/sql/stmt/select_stmt.h +++ b/src/observer/sql/stmt/select_stmt.h @@ -51,10 +51,12 @@ class SelectStmt : public Stmt std::vector> &query_expressions() { return query_expressions_; } std::vector> &group_by() { return group_by_; } std::vector &order_by() { return order_by_; } + std::vector &tables_alias() { return tables_alias_; } private: std::vector> query_expressions_; std::vector tables_; + std::vector tables_alias_; // 存表名 FilterStmt *filter_stmt_ = nullptr; std::vector> group_by_; std::vector order_by_; diff --git a/src/observer/sql/stmt/update_stmt.cpp b/src/observer/sql/stmt/update_stmt.cpp index ed0a2319..5e5fc298 100644 --- a/src/observer/sql/stmt/update_stmt.cpp +++ b/src/observer/sql/stmt/update_stmt.cpp @@ -105,7 +105,7 @@ RC UpdateStmt::create(Db *db, UpdateSqlNode &update_sql, Stmt *&stmt) table_map.insert(std::pair(std::string(table_name), table)); FilterStmt *filter_stmt = nullptr; - rc = FilterStmt::create(db, table, &table_map, update_sql.conditions, filter_stmt); + rc = FilterStmt::create(db, table, {}, &table_map, update_sql.conditions, filter_stmt); if (rc != RC::SUCCESS) { LOG_WARN("failed to create filter statement. rc=%d:%s", rc, strrc(rc)); return rc; From ca409aea4d9880abafd43b43b652678a037b7625 Mon Sep 17 00:00:00 2001 From: Koschei Date: Wed, 16 Oct 2024 16:30:13 +0800 Subject: [PATCH 260/308] =?UTF-8?q?fix:=20field=20epxr=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20table=5Falias=EF=BC=8C=E8=80=8C=E4=B8=8D=E6=98=AF?= =?UTF-8?q?=20alias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.cpp | 2 +- src/observer/sql/expr/expression.h | 5 ++++- src/observer/sql/parser/expression_binder.cpp | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index c0ed3559..ed37432a 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -27,7 +27,7 @@ using namespace std; RC FieldExpr::get_value(const Tuple &tuple, Value &value) { - return tuple.find_cell(TupleCellSpec(table_name(), field_name(), alias()), value); + return tuple.find_cell(TupleCellSpec(table_name(), field_name(), table_alias_.c_str()), value); } bool FieldExpr::equal(const Expression &other) const diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index b76d5ce2..3ec8f246 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -219,8 +219,11 @@ class FieldExpr : public Expression RC get_value(const Tuple &tuple, Value &value) override; + void set_table_alias(std::string table_alias) { table_alias_ = std::move(table_alias); } + private: - Field field_; + Field field_; + std::string table_alias_; }; /** diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 3a06d42e..f3476a90 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -40,7 +40,7 @@ void ExpressionBinder::wildcard_fields( for (int i = table_meta.sys_field_num(); i < field_num; i++) { Field field(table, table_meta.field(i)); FieldExpr *field_expr = new FieldExpr(field); - field_expr->set_alias(std::move(table_alias)); + field_expr->set_table_alias(std::move(table_alias)); // 这里设置了基类的 name 属性 if (multi_tables) { // 多表查询带表名 @@ -199,7 +199,7 @@ RC ExpressionBinder::bind_unbound_field_expression( Field field(table, field_meta); FieldExpr *field_expr = new FieldExpr(field); - field_expr->set_alias(table_alias); + field_expr->set_table_alias(table_alias); // 这里设置了基类的 name 属性 if (!is_blank(unbound_field_expr->alias())) { field_expr->set_name(unbound_field_expr->alias()); From 2d2e4673ca171e2c960af2e56f84829c90e3b708 Mon Sep 17 00:00:00 2001 From: Koschei Date: Wed, 16 Oct 2024 16:56:15 +0800 Subject: [PATCH 261/308] =?UTF-8?q?fix:=20=E6=9F=A5=E8=AF=A2=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=20tab.*=20=E6=97=B6=E6=AD=A3=E7=A1=AE=E6=89=BE?= =?UTF-8?q?=E5=88=B0=E5=AF=B9=E5=BA=94=E8=A1=A8=E7=9A=84=E5=88=AB=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/expression_binder.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index f3476a90..3dd43f70 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -150,8 +150,20 @@ RC ExpressionBinder::bind_star_expression( tables_to_wildcard.insert(tables_to_wildcard.end(), all_tables.begin(), all_tables.end()); } - for (int i = 0; i < tables_to_wildcard.size(); ++i) { - wildcard_fields(tables_to_wildcard[i], context_.alias()[i], bound_expressions, multi_tables_); + // select t2/table_alias_2.* from table_alias_1 t1, table_alias_2 t2 where t1.id < t2.id; 非自交可能指定也可能没 + // select t2.* from table_alias_1 t1, table_alias_1 t2 where t1.id < t2.id; 自交的话必然指定了别名 + if (tables_to_wildcard.size() == 1) { + // 看看能不能找到对应的表名,能的话是第一种情况 + for (int i = 0; i < context_.query_tables().size(); ++i) { + if (strcmp(context_.query_tables()[i]->name(), table_name) == 0) { + table_name = context_.alias()[i].c_str(); + } + } + wildcard_fields(tables_to_wildcard[0], table_name, bound_expressions, multi_tables_); + } else { + for (int i = 0; i < tables_to_wildcard.size(); ++i) { + wildcard_fields(tables_to_wildcard[i], context_.alias()[i], bound_expressions, multi_tables_); + } } return RC::SUCCESS; From 270856942917902a2a17a5f5591b8e3bfbbac92c Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 19:39:58 +0800 Subject: [PATCH 262/308] =?UTF-8?q?aggr=5Ffunc=5Fexpr=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E4=B8=8D=E5=90=88=E7=90=86=EF=BC=8C=E5=BA=94=E8=AF=A5=E6=98=AF?= =?UTF-8?q?func=5Fexpr=EF=BC=8C=E5=9B=A0=E4=B8=BA=E8=BF=98=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E4=BA=86=E6=99=AE=E9=80=9A=E7=9A=84=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/yacc_sql.cpp | 10 +++++----- src/observer/sql/parser/yacc_sql.y | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 12669ae6..9041e904 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -294,7 +294,7 @@ enum yysymbol_kind_t YYSYMBOL_expression_list = 112, /* expression_list */ YYSYMBOL_expression = 113, /* expression */ YYSYMBOL_alias = 114, /* alias */ - YYSYMBOL_aggr_func_expr = 115, /* aggr_func_expr */ + YYSYMBOL_func_expr = 115, /* func_expr */ YYSYMBOL_sub_query_expr = 116, /* sub_query_expr */ YYSYMBOL_rel_attr = 117, /* rel_attr */ YYSYMBOL_relation = 118, /* relation */ @@ -756,7 +756,7 @@ static const char *const yytname[] = "nullable_constraint", "type", "insert_stmt", "values_list", "value_list", "value", "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", "set_clauses", "setClause", "select_stmt", - "calc_stmt", "expression_list", "expression", "alias", "aggr_func_expr", + "calc_stmt", "expression_list", "expression", "alias", "func_expr", "sub_query_expr", "rel_attr", "relation", "rel_list", "join_clauses", "where", "condition", "comp_op", "opt_order_by", "sort_list", "sort_unit", "group_by", "opt_having", "opt_limit", "load_data_stmt", @@ -2614,9 +2614,9 @@ YYLTYPE yylloc = yyloc_default; #line 2615 "yacc_sql.cpp" break; - case 95: /* expression: aggr_func_expr */ + case 95: /* expression: func_expr */ #line 807 "yacc_sql.y" - { + { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } #line 2623 "yacc_sql.cpp" @@ -2654,7 +2654,7 @@ YYLTYPE yylloc = yyloc_default; #line 2655 "yacc_sql.cpp" break; - case 100: /* aggr_func_expr: ID LBRACE expression_list RBRACE */ + case 100: /* func_expr: ID LBRACE expression_list RBRACE */ #line 829 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index abbaa81d..095451c1 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -213,7 +213,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, %type rel_list %type expression %type where -%type aggr_func_expr +%type func_expr %type sub_query_expr %type expression_list %type group_by @@ -804,7 +804,7 @@ expression: | ID DOT '*' { $$ = new StarExpr($1); } - | aggr_func_expr { + | func_expr { $$ = $1; // AggrFuncExpr } | sub_query_expr { @@ -824,7 +824,7 @@ alias: $$ = $2; } -aggr_func_expr: +func_expr: ID LBRACE expression_list RBRACE { $$ = new UnboundFunctionExpr($1, std::move(*$3)); From 293ebf4ce6b420f21a82a99f15f2a6cc37526d4f Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 19:51:21 +0800 Subject: [PATCH 263/308] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/obclient/client.cpp | 6 +++--- src/obclient/client_order_by.cpp | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/obclient/client.cpp b/src/obclient/client.cpp index a383ff46..1808cbab 100644 --- a/src/obclient/client.cpp +++ b/src/obclient/client.cpp @@ -8,9 +8,7 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -// -// Created by Longda on 2021 -// +#if 1 #include #include @@ -245,3 +243,5 @@ int main(int argc, char *argv[]) return 0; } + +#endif \ No newline at end of file diff --git a/src/obclient/client_order_by.cpp b/src/obclient/client_order_by.cpp index 43bb0fa5..c533e0e4 100644 --- a/src/obclient/client_order_by.cpp +++ b/src/obclient/client_order_by.cpp @@ -1,3 +1,13 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + #if 0 #include From f03395a1eb638130be593f4c559510a8540fe03a Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Wed, 16 Oct 2024 20:17:19 +0800 Subject: [PATCH 264/308] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/obclient/client.cpp | 4 ++++ src/obclient/client_order_by.cpp | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/obclient/client.cpp b/src/obclient/client.cpp index a383ff46..9dbd1884 100644 --- a/src/obclient/client.cpp +++ b/src/obclient/client.cpp @@ -12,6 +12,8 @@ See the Mulan PSL v2 for more details. */ // Created by Longda on 2021 // +#if 1 + #include #include #include @@ -245,3 +247,5 @@ int main(int argc, char *argv[]) return 0; } + +#endif \ No newline at end of file diff --git a/src/obclient/client_order_by.cpp b/src/obclient/client_order_by.cpp index 43bb0fa5..33b86e5a 100644 --- a/src/obclient/client_order_by.cpp +++ b/src/obclient/client_order_by.cpp @@ -23,6 +23,8 @@ #include "readline/readline.h" #endif +const int TABLE_RECORD_NUMBER = 20; + #define MAX_MEM_BUFFER_SIZE 131072 #define PORT_DEFAULT 6789 @@ -210,7 +212,7 @@ int main(int argc, char *argv[]) send_sql(sockfd, "CREATE TABLE big_order_by_3 (id INT, addr CHAR(100), num INT, price FLOAT, birthday DATE);"); // Insert data (for simplicity, inserting a small amount of random data) - for (int i = 1; i <= 20; i++) { + for (int i = 1; i <= TABLE_RECORD_NUMBER; i++) { char insert_sql[512]; snprintf(insert_sql, sizeof(insert_sql), From f82a336201a8b0f9ddcc0a8705dd86dd12245299 Mon Sep 17 00:00:00 2001 From: Koschei Date: Wed, 16 Oct 2024 22:59:20 +0800 Subject: [PATCH 265/308] =?UTF-8?q?test:=20char=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=AE=9A=E4=B9=89=E4=BB=8E=E5=8E=9F=E6=9D=A5?= =?UTF-8?q?=204=20=E5=AD=97=E8=8A=82=E4=BF=AE=E6=94=B9=E4=B8=BA=201=20?= =?UTF-8?q?=E5=AD=97=E8=8A=82=E5=90=8C=E6=AD=A5=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/case/result/primary-aggregation-func.result | 2 +- test/case/result/primary-drop-table.result | 16 ++++++++-------- test/case/result/primary-insert.result | 2 +- test/case/result/primary-show-index.result | 2 +- test/case/result/primary-update.result | 2 +- test/case/test/primary-aggregation-func.test | 2 +- test/case/test/primary-drop-table.test | 16 ++++++++-------- test/case/test/primary-insert.test | 2 +- test/case/test/primary-show-index.test | 2 +- test/case/test/primary-update.test | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/test/case/result/primary-aggregation-func.result b/test/case/result/primary-aggregation-func.result index c4f15205..c2c0390e 100644 --- a/test/case/result/primary-aggregation-func.result +++ b/test/case/result/primary-aggregation-func.result @@ -1,5 +1,5 @@ INITIALIZATION -CREATE TABLE aggregation_func(id int, num int, price float, addr char, birthday date); +CREATE TABLE aggregation_func(id int, num int, price float, addr char(4), birthday date); SUCCESS INSERT INTO aggregation_func VALUES (1, 18, 10.0, 'abc', '2020-01-01'); diff --git a/test/case/result/primary-drop-table.result b/test/case/result/primary-drop-table.result index 39b2331f..d4307bf9 100644 --- a/test/case/result/primary-drop-table.result +++ b/test/case/result/primary-drop-table.result @@ -1,11 +1,11 @@ 1. DROP EMPTY TABLE -CREATE TABLE Drop_table_1(id int, t_name char); +CREATE TABLE Drop_table_1(id int, t_name char(4)); SUCCESS DROP TABLE Drop_table_1; SUCCESS 2. DROP NON-EMPTY TABLE -CREATE TABLE Drop_table_2(id int, t_name char); +CREATE TABLE Drop_table_2(id int, t_name char(4)); SUCCESS INSERT INTO Drop_table_2 VALUES (1,'OB'); SUCCESS @@ -13,7 +13,7 @@ DROP TABLE Drop_table_2; SUCCESS 3. CHECK THE ACCURACY OF DROPPING TABLE -CREATE TABLE Drop_table_3(id int, t_name char); +CREATE TABLE Drop_table_3(id int, t_name char(4)); SUCCESS INSERT INTO Drop_table_3 VALUES (1,'OB'); SUCCESS @@ -28,13 +28,13 @@ SELECT * FROM Drop_table_3; FAILURE DELETE FROM Drop_table_3 WHERE id = 3; FAILURE -CREATE TABLE Drop_table_3(id int, t_name char); +CREATE TABLE Drop_table_3(id int, t_name char(4)); SUCCESS SELECT * FROM Drop_table_3; ID | T_NAME 4. DROP NON-EXISTENT TABLE -CREATE TABLE Drop_table_4(id int, t_name char); +CREATE TABLE Drop_table_4(id int, t_name char(4)); SUCCESS DROP TABLE Drop_table_4; SUCCESS @@ -44,17 +44,17 @@ DROP TABLE Drop_table_4_1; FAILURE 5. CREATE A TABLE WHICH HAS DROPPED -CREATE TABLE Drop_table_5(id int, t_name char); +CREATE TABLE Drop_table_5(id int, t_name char(4)); SUCCESS DROP TABLE Drop_table_5; SUCCESS -CREATE TABLE Drop_table_5(id int, t_name char); +CREATE TABLE Drop_table_5(id int, t_name char(4)); SUCCESS SELECT * FROM Drop_table_5; ID | T_NAME 6. DROP A TABLE WITH INDEX -CREATE TABLE Drop_table_6(id int, t_name char); +CREATE TABLE Drop_table_6(id int, t_name char(4)); SUCCESS CREATE INDEX index_id on Drop_table_6(id); SUCCESS diff --git a/test/case/result/primary-insert.result b/test/case/result/primary-insert.result index 4dd00eea..bfec2aeb 100644 --- a/test/case/result/primary-insert.result +++ b/test/case/result/primary-insert.result @@ -1,5 +1,5 @@ INITIALIZATION -CREATE TABLE INSERT_TABLE(ID INT, T_NAME CHAR, COL1 INT, COL2 INT); +CREATE TABLE INSERT_TABLE(ID INT, T_NAME CHAR(4), COL1 INT, COL2 INT); SUCCESS CREATE TABLE INSERT_TABLE2(ID INT, T_NAME CHAR(6), COL1 INT, COL2 INT); SUCCESS diff --git a/test/case/result/primary-show-index.result b/test/case/result/primary-show-index.result index 7c46933c..1ca4c7e1 100644 --- a/test/case/result/primary-show-index.result +++ b/test/case/result/primary-show-index.result @@ -1,5 +1,5 @@ INITIALIZATION -CREATE TABLE INDEX_TABLE_1(ID INT, AGE INT) +CREATE TABLE INDEX_TABLE_1(ID INT, AGE INT); SUCCESS INSERT INTO INDEX_TABLE_1 VALUES (1,1); SUCCESS diff --git a/test/case/result/primary-update.result b/test/case/result/primary-update.result index c95cb54f..6c376314 100644 --- a/test/case/result/primary-update.result +++ b/test/case/result/primary-update.result @@ -1,5 +1,5 @@ INITIALIZATION -CREATE TABLE Update_table_1(id int, t_name char, col1 int, col2 int); +CREATE TABLE Update_table_1(id int, t_name char(4), col1 int, col2 int); SUCCESS CREATE INDEX index_id on Update_table_1(id); SUCCESS diff --git a/test/case/test/primary-aggregation-func.test b/test/case/test/primary-aggregation-func.test index 478c3136..58dfe82c 100644 --- a/test/case/test/primary-aggregation-func.test +++ b/test/case/test/primary-aggregation-func.test @@ -1,5 +1,5 @@ -- echo initialization -CREATE TABLE aggregation_func(id int, num int, price float, addr char, birthday date); +CREATE TABLE aggregation_func(id int, num int, price float, addr char(4), birthday date); INSERT INTO aggregation_func VALUES (1, 18, 10.0, 'abc', '2020-01-01'); INSERT INTO aggregation_func VALUES (2, 15, 20.0, 'abc', '2010-01-11'); diff --git a/test/case/test/primary-drop-table.test b/test/case/test/primary-drop-table.test index 8d15a47a..5fbd448d 100644 --- a/test/case/test/primary-drop-table.test +++ b/test/case/test/primary-drop-table.test @@ -1,37 +1,37 @@ -- echo 1. Drop empty table -CREATE TABLE Drop_table_1(id int, t_name char); +CREATE TABLE Drop_table_1(id int, t_name char(4)); DROP TABLE Drop_table_1; -- echo 2. Drop non-empty table -CREATE TABLE Drop_table_2(id int, t_name char); +CREATE TABLE Drop_table_2(id int, t_name char(4)); INSERT INTO Drop_table_2 VALUES (1,'OB'); DROP TABLE Drop_table_2; -- echo 3. Check the accuracy of dropping table -CREATE TABLE Drop_table_3(id int, t_name char); +CREATE TABLE Drop_table_3(id int, t_name char(4)); INSERT INTO Drop_table_3 VALUES (1,'OB'); -- sort SELECT * FROM Drop_table_3; DROP TABLE Drop_table_3; INSERT INTO Drop_table_3 VALUES (1,'OB'); SELECT * FROM Drop_table_3; DELETE FROM Drop_table_3 WHERE id = 3; -CREATE TABLE Drop_table_3(id int, t_name char); +CREATE TABLE Drop_table_3(id int, t_name char(4)); -- sort SELECT * FROM Drop_table_3; -- echo 4. Drop non-existent table -CREATE TABLE Drop_table_4(id int, t_name char); +CREATE TABLE Drop_table_4(id int, t_name char(4)); DROP TABLE Drop_table_4; DROP TABLE Drop_table_4; DROP TABLE Drop_table_4_1; -- echo 5. Create a table which has dropped -CREATE TABLE Drop_table_5(id int, t_name char); +CREATE TABLE Drop_table_5(id int, t_name char(4)); DROP TABLE Drop_table_5; -CREATE TABLE Drop_table_5(id int, t_name char); +CREATE TABLE Drop_table_5(id int, t_name char(4)); SELECT * FROM Drop_table_5; -- echo 6. Drop a table with index -CREATE TABLE Drop_table_6(id int, t_name char); +CREATE TABLE Drop_table_6(id int, t_name char(4)); CREATE INDEX index_id on Drop_table_6(id); INSERT INTO Drop_table_6 VALUES (1,'OB'); -- sort SELECT * FROM Drop_table_6; diff --git a/test/case/test/primary-insert.test b/test/case/test/primary-insert.test index f1d2eabd..96c831f2 100644 --- a/test/case/test/primary-insert.test +++ b/test/case/test/primary-insert.test @@ -1,5 +1,5 @@ -- echo initialization -CREATE TABLE insert_table(id int, t_name char, col1 int, col2 int); +CREATE TABLE insert_table(id int, t_name char(4), col1 int, col2 int); CREATE TABLE insert_table2(id int, t_name char(6), col1 int, col2 int); -- echo 1. insert diff --git a/test/case/test/primary-show-index.test b/test/case/test/primary-show-index.test index f5b3311b..46ca6220 100644 --- a/test/case/test/primary-show-index.test +++ b/test/case/test/primary-show-index.test @@ -1,5 +1,5 @@ -- echo INITIALIZATION -CREATE TABLE Index_table_1(id int, age int) +CREATE TABLE Index_table_1(id int, age int); insert into Index_table_1 values (1,1); insert into Index_table_1 values (2,2); insert into Index_table_1 values (3,3); diff --git a/test/case/test/primary-update.test b/test/case/test/primary-update.test index 23405322..4b016ce9 100644 --- a/test/case/test/primary-update.test +++ b/test/case/test/primary-update.test @@ -1,5 +1,5 @@ -- echo initialization -CREATE TABLE Update_table_1(id int, t_name char, col1 int, col2 int); +CREATE TABLE Update_table_1(id int, t_name char(4), col1 int, col2 int); CREATE INDEX index_id on Update_table_1(id); INSERT INTO Update_table_1 VALUES (1,'N1',1,1); INSERT INTO Update_table_1 VALUES (2,'N2',1,1); From fffd607a089ac6ad479f49c87b1a90591b5dbb04 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 18:01:58 +0800 Subject: [PATCH 266/308] =?UTF-8?q?=E9=93=B6=E8=A1=8C=E5=AE=B6=E8=88=8D?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 300b5270..8b455268 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -41,10 +41,28 @@ RC round(const vector &args, Value &result) } decimals = args[1].get_int(); } - number = args[0].get_float(); - float factor = std::pow(10.f, static_cast(decimals)); - float round = std::round(number * factor) / factor; - result = Value(round); + number = args[0].get_float(); + + double round; + double factor = std::pow(10.0, decimals); + double scaledNumber = number * factor; + + // 获取整数部分和小数部分 + double integerPart; + double fractionalPart = std::modf(scaledNumber, &integerPart); + + // 如果小数部分刚好是 0.5,进行银行家舍入 + if (fractionalPart == 0.5 || fractionalPart == -0.5) { + if (static_cast(integerPart) % 2 == 0) { + round = integerPart / factor; // 偶数,直接舍去小数 + } else { + round = (integerPart + (number > 0 ? 1 : -1)) / factor; // 奇数,舍入到偶数 + } + } else { + round = std::round(scaledNumber) / factor; // 否则使用普通的四舍五入 + } + + result = Value(static_cast(round)); return RC::SUCCESS; } From 346a6f800d65d2e0767f7b27adc9207bbd2b3043 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 18:08:05 +0800 Subject: [PATCH 267/308] =?UTF-8?q?fix:=20=E9=93=B6=E8=A1=8C=E5=AE=B6?= =?UTF-8?q?=E8=88=8D=E5=85=A5:=E5=9C=A8=20MySQL=20=E4=B8=AD=EF=BC=8C`ROUND?= =?UTF-8?q?(4.5)`=20=E8=BF=94=E5=9B=9E=204=20=E6=98=AF=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E5=AE=83=E9=81=B5=E5=BE=AA=E9=93=B6=E8=A1=8C=E5=AE=B6=E8=88=8D?= =?UTF-8?q?=E5=85=A5=EF=BC=88=E5=8F=88=E7=A7=B0=E4=B8=BA=E5=81=B6=E6=95=B0?= =?UTF-8?q?=E8=88=8D=E5=85=A5=EF=BC=89=E7=9A=84=E8=A7=84=E5=88=99=E3=80=82?= =?UTF-8?q?=E5=BD=93=E4=B8=80=E4=B8=AA=E6=95=B0=E5=AD=97=E6=AD=A3=E5=A5=BD?= =?UTF-8?q?=E5=9C=A8=E4=B8=A4=E4=B8=AA=E6=95=B4=E6=95=B0=E4=B9=8B=E9=97=B4?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=AE=83=E4=BC=9A=E8=A2=AB=E8=88=8D=E5=85=A5?= =?UTF-8?q?=E5=88=B0=E6=9C=80=E6=8E=A5=E8=BF=91=E7=9A=84=E5=81=B6=E6=95=B0?= =?UTF-8?q?=E3=80=82=E5=9B=A0=E6=AD=A4=EF=BC=9A4.5=20=E8=A2=AB=E8=88=8D?= =?UTF-8?q?=E5=85=A5=E5=88=B0=204,=205.5=20=E8=A2=AB=E8=88=8D=E5=85=A5?= =?UTF-8?q?=E5=88=B0=206=E3=80=82=E8=BF=99=E7=A7=8D=E8=88=8D=E5=85=A5?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E6=9C=89=E5=88=A9=E4=BA=8E=E5=87=8F=E5=B0=91?= =?UTF-8?q?=E8=88=8D=E5=85=A5=E8=AF=AF=E5=B7=AE=E7=A7=AF=E7=B4=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 8b455268..824a25dc 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -48,15 +48,15 @@ RC round(const vector &args, Value &result) double scaledNumber = number * factor; // 获取整数部分和小数部分 - double integerPart; - double fractionalPart = std::modf(scaledNumber, &integerPart); + double integer_part; + double fractional_part = std::modf(scaledNumber, &integer_part); // 如果小数部分刚好是 0.5,进行银行家舍入 - if (fractionalPart == 0.5 || fractionalPart == -0.5) { - if (static_cast(integerPart) % 2 == 0) { - round = integerPart / factor; // 偶数,直接舍去小数 + if (fractional_part == 0.5 || fractional_part == -0.5) { + if (static_cast(integer_part) % 2 == 0) { + round = integer_part / factor; // 偶数,直接舍去小数 } else { - round = (integerPart + (number > 0 ? 1 : -1)) / factor; // 奇数,舍入到偶数 + round = (integer_part + (number > 0 ? 1 : -1)) / factor; // 奇数,舍入到偶数 } } else { round = std::round(scaledNumber) / factor; // 否则使用普通的四舍五入 From 272193ea98a7fc61b111131555781aa41612199c Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 18:10:17 +0800 Subject: [PATCH 268/308] =?UTF-8?q?add=20doc:=20MiniOB=20=E5=90=91?= =?UTF-8?q?=E9=87=8F=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/assets/mathjax.js | 11 ++ docs/docs/game/images/ivfflat.png | Bin 0 -> 629204 bytes docs/docs/game/introduction.md | 23 +--- docs/docs/game/miniob-vectordb.md | 209 ++++++++++++++++++++++++++++++ docs/mkdocs.yml | 12 +- 5 files changed, 235 insertions(+), 20 deletions(-) create mode 100644 docs/docs/assets/mathjax.js create mode 100644 docs/docs/game/images/ivfflat.png create mode 100644 docs/docs/game/miniob-vectordb.md diff --git a/docs/docs/assets/mathjax.js b/docs/docs/assets/mathjax.js new file mode 100644 index 00000000..e1eac71d --- /dev/null +++ b/docs/docs/assets/mathjax.js @@ -0,0 +1,11 @@ +window.MathJax = { + tex: { + inlineMath: [ ["\\(","\\)"], ['$', '$'] ], + displayMath: [ ["\\[","\\]"], ['$$', '$$'] ], + tags: 'ams' + }, + options: { + ignoreHtmlClass: ".*|", + processHtmlClass: "arithmatex" + } + }; \ No newline at end of file diff --git a/docs/docs/game/images/ivfflat.png b/docs/docs/game/images/ivfflat.png new file mode 100644 index 0000000000000000000000000000000000000000..0e98a5ab4664bd3f007e83072a8eb172c9224608 GIT binary patch literal 629204 zcmcG!Ra9J0@Ggo&aDwX)2o_|J;4-)*Xz)OAmq36ZK?ZkscL^@R-QC^Yb@0LO{Ql>h zb=Q5l4|lEmFl+Vh?%iFptLv+;t13iUQ3ea03>^**4ogl}@*5l+sskJxA}$&NtmlXF zKT|k3OfgFd31vA632J2rJ2OigSeI-_f+nh#>JU+;PHeO&8g6s^WEwRMop(I$ceo>| zD!f>@oL&;NPtGPPU3Fo|Hisp_MyS2MG@$`f)%ShAzBOz_r^9IklfU&J);%^>A1*-V zua5hxDef0=qJl$&VUEgJa1K%rv5V1g{foN#1FgD_1z`DcqvVYu6@R00La)ZV2529Ik0=->gS9W)FHT9lK~S z@vwa$g66P&D#AtFO7B3;hoA7GQV}BwCUDtaq*vhxdMLBX7k-P{y~Lq#*&Nh&V`CYk zL41TpIu^8nT7?txPht!^cBz&Usk%S=aWzJz^wban+_ovsZ{D~l-&%I}Wl=q~dP)+R z-bEygk?x;q-0j+vYWOv3#uJeuR}=LD{5_h4dl~6e$x^ecWFlPMY?8UMF{-(;$VsrP z@p`**(+AP$vJ%-a_eC)^(F7EdCqja>0NVk+t=W79V`f9US_QybwjbSQOb?E_A*+?6 z3y7A^2w#ie1XMd!j*X84QZD6iRjKP)aOtJR%do3e^_+DZr_G!U=>;7orD-A(`t08Q zDibAmpFKH%K26tE{pD$TwYBTPD2*#1U6xKHI*SxgGKe$Zy)(QM~Z8Ba%P!Ui6cHqYcqSoLbDhhVYO}J}pqGpinPm?%J)x<5L2xHjqK`x#g znCW|%x(wyJ>}L6?RZBzVK^hEagNsHYif&Doj9KGd)z;8Xyw3E;7oJ#F6a^PfhK`Gm zMsA(fcY#kC?bTlv?kcb!dC(m>8}3R!NULuSFMq@xW0$t3OEuV0jBn8A{@VlNRCI$R z1c|d7?0V2W?031}`RU~C{+aqI!%&P~d`K2mnA5^9v6tG2nj@Y>zP1PJm;Newl(!~W z>xVu4IX_?2#hrhVKXx~5_iu5At-FtgF}p>K1Kx^%0cE37%TZ080%m z4etyE3Uq^^x*?z|e(-G?E7w#3|dS@v%2VxU51SAD_I9rYd^4JNM2r@UEcwh<_HgI@~zrmK+^2 zI(E_zGzhDhpWql=G8~2h#=#E4st+#&Rg4-_(#JI#lfL_qYfB)>yV!s}8TE@OsTPWc z->m`uBD%A$@Fv_})PYVWdm>$=q^{rg#1)xr5QG~amrX8T>W}`RlX!@|1l8gcxWxV; zP#Q5=r1xPTX^Ul1XvFgeEM*I|v|4U%JlX43kyAR)BX}v$ zirf(j>V1OPA${r!-V}w<*rOT0BlR!#e=p8&D7eMGg}M6mhrf#?jY^V*#ErK*M@q6( zx|pu~s_5!hA-Pj(5&FA0*^h{^h(kdHQrodta&-B>^Vjm}rwP9iANhrrgcgT}eX05q z8Y){LTcB&2H2f}s`O}1&NF4W|h6&JtAVn!tQSZyT^v{p_G%hh9)z3^k1b{C>bYYxP zHHqK8@=G+yxaF0USXCSsljVI<%P4Ku_?>mkKNnO2n5&&Vom;fpnaj8OI_vy5L#?I! zF7Qjich#3-rdf~U_g37upKsxB{RDoj$z|k?Yi8x?<>(c8NxjfT$p6c&w!pUxsC8Ht zTc-P7iK5-}-LJfBF1cJK=a=M8p>zlR56677c(aOqqp=^U2iz@nvft;wi+%SfH!3gx zUQ|al!_kbKp>QyDFw-zKG1*cZvdptgamI4Sc_zGkw(KeJU7$iBL}140lT+l0)3H(W zd^5!w#acl#s*~NJ*EH9>@zJ{*qNBOvA5-p?Ao&e_{cQb`4$ZgbR|dpDv1qaSE(gCq zeoujoIcF!Rc#ZKYrO>H9zQ8}0n= zFN$zia8h_ysFBx5NoPOeC`fxuMOV;F;YkrOKV;Vmr|ADKjgdDoI><6BZ&lw{ws!ij zDZ~{sFhN>$RBg zv^~;95jGSL%YEws2j8|FYzcm=LH_dRkx92X{I(}-{OQ!TC+$MMQ{P#>bXM9D)Y98F z-!{-QO*@x2y+f~>MmnZDDs&(R!GxsmxQ$-tCADa_FThuJv{JVHYjbgPiK-`MC26z0 zF$OpSDkg}s6!in`N-oSc6hT~|3jKr)S}+E<{muE!oJCNB$eQ=W)Z5YfFkR|+9A`FjBzl>6bB)P zlCezxc(`pu-he{r3gJDQ2(_2x^BU3$lBKvK4eKutqu<+4`JMTMav8=l;Tha_Mm2^t z>`fm6;$xF*gbTpBlZ|sb&HXJAKvJ-=@0hABh|>Pq%P+aB7&{m^_*$n%|)>b>DVt zYUgOD)vTM#m|hH04ayBKrIp5}rMgSz(+v~V$@8QL**XL*is{mvr*Ctc-o}f_HJZ3n z#qxfr{Gd<%I@lm*ThJj3Ac7L95qKo0^4)HJ9<$7~w4FIC0;ax}u{S~*NTHbP;rl6O zTnA$wd|}+yBQ_?^%cuMNM2?{cPGeXpEsj*CdUvfGVd-HS1Z^2vpF64-8(n{1?&ynq z6*H*-W8znJH`@$m#65EC4WDvV!sb~YHHLw0%KN$+dUvKAc9#MAGOx{d3qEv5Uzd}b zfoqN7jqS!pwq}AI-A~rV zM<<=_`uUCI4s|=;RlWL`6YQzT@r-Igof6@aQWw&*@8A9AWv%}>M{RhzDQ#v3ejiw7 zb^m>zc!v0t|CD*5v6$04GC5{UhZs*MBU3fn7I#Ik6oL)U# zbA|q$nW7vRjZ~*t;BUV{+LOEt@hR*se2v?VYb)YZ6#khx>v4axIJ5BG==<`7e-^(B z5A^g%L&JK8Kg)4o+&u&2;NzC_n)}q(%+pZc)6w$c)wtHyb{;!W5IB;VL@p@plHR!O zvNt=|S!!PStKvs1m0R16ba#Xf@4&`sYhTBlr{KX|sUWh8$VP^Hlzrt*d;iN7sx(f? zYt@snU6K32Wsncf3RRzQ^HcIYv@foeLBBaP>swYLh|5!B?QGh!jG^)1>iXA2i(at4 z$2seR>h;8MQaupoW$#T>XJfIwLNitqv68rh!}Z@z`N_)u>)|Wvg~NuYm;PhdX3u!k zXjFMttcdWF&@IN%$a1B#K6ys~xP>=bkezz}OXHP3Jf_BHVM^}>LAY#sMA4uFu3^5u z2PHk+z7+MyPH=Z9S8i(~qB6$YhVh@RjWGqdJ6pd2;9n(j9MR8&-mXgCk!0Lzs1sIK zjs<17Tl@x&y9>3epCNXk+oKN>tDpwa!eex=pKr)|?H=0taXIj?I|ZMqmYkV_0^BE9 z8x0OV$Px|-*7|RR4EBSAL&!$>KRu`p*@*wAjfnf-;KJ+a2ppU!oSdYXnk)Qin|b_? zf!}Pd*KHY&2$K=#(&Hg$NN6!gj#Z3dxuzlU1=Xe<+;^^K^MC&Bm%DjcKhL}F2fYY& z^xMt@WY{!bFVT#!l5zSIoH_s}mbUs@) z&+>FZwq3!7^6H{y5C|He-qN9?@cUsTe>;|SXV71>LFdaK4FO6Vl53^sZT2Wb4eUF+ zV9(G2j4|C!BtRFccv^q>pm|D%1$*#wIx~HnxHtsQ!*`rfWtI90-$CN$tqD=$hPm>P zz(e=5$4qb<%XMYHIOJCZQ*M?YlZlrKZ4WQIiPvSQq6o3ae)lHw(T=y0tUB82$!z#3 z&bXP)a6Inp5ev54!N+fjHT>7LAx>I(mNN}#o?SA~AQ_~U`&rUE&UO;?7#tdaq)4y_ zHB$UA^`qYwia@AWftUe%dPW>0lutQYQH;2@r!d~RYrsbw5_2!e?l%hjNGU18=Q}O> z;Yw^5u|HrCl?W#nL?ZQN*Ut#e-k;}q`c~+!G~2f8o!EvqVoJ~hy56W54}l=l&ksr* zUvA8TXpSVy`WZU<}{q~x%ION^6~%j1 zL3^-==(;MJdh8j{!{nE_G3R1;-M_?nckty#CtK2jFPPnGJOQ@M;jdkYzmj^6{1(8k zTlcSgB&u)(Nm9aP!4$5C5SpuE0N6F%f^F)+HwvLU$nT)r@eA_Nbk?r!+R_!nZZ%Wh z(0D>U6C!EUSjsOWT?Lx8Zo1l*966bioPD|Xk5uePfNjbxKoZ?&D!#@ZWthT(KUi?R z_nVmG1+jYauMp(q!7KD9jp~c++mlE@WpMEQg2RDPt8gUJ%V;A0-iHk=(!op?T=E~T z!$yIjv{k(C{oe1sOl2DehHfI(L%csg4?ob};lC%bqAkoGgS`8JA%gkt0tpZiFbV|N zJ-jPzGUn6d%A%V6%cHYQ$WZ!A(K27ywL&*h(>0wiGMQP+hiih(o5eye~>!l z`c8&|!{ggwL<`V)C*s&2wwYHDjDyxESbI;0@rL%+Shi)31ITL(@EGa_b%WTf(cXez z>8~*&5Mt3q#Nef85pl?=G%z8-&KIj)qlg9ur-1LF%i@snPNYfs*9;PXI84{vSBXt+^>f!iAI(C_W*i3L|F`LP zL){D(hQfcf$GlCG6}tY#QNI1KLrE>I=U4m7CqFH=b8C%0O|v7O<<-OnJ z<6*BMC-0;RY3Wd*%{hk*?DI6H(>&*)z-&7P=ln13gJl&iY!R_b-$7I^`a{OY1aXO7 zzd_W#cQgP3Y%(n8ndp1i%>Qt_SEjvHNRz?&s8O^9Klvvj@V9-_2kAq3|d(~k~{i|G{!(R(N2i-SY3&cW-tBw_v# z*Q)ur>H^tssXYpJbTE1PKhGGRDFCVV6qQa|+5rfJ!L9P9>0)z?H-0YW|2d1agVSq_ zaWf{y*cJMJ-X$OA^g2qA`#=jFd{T-0we`{MK_cr3d)?!JUSunsV(IncMS{pZW$S~u z{=N)t118Y*p=W@PW@A<5Z`Y&N4x*ju`Ye3bPm7-Q^kmwD6C2gQFUKqVLl1bMjr`Sk z1^65#T+3P{Kv0)II2agTdbOH`HVA$HAn|PYF=)^nMPj#TP-zT}20(&Vt{v=w`;ZOo zVua-C<5A`64?PiI`m}=a&|8l}RCf_`{>Kqr`V69q`|!r#cz3ZdGhA(X4hLo1!gE2Q z!Cq6XQp3d{3A$0mdc5ouadYKa+#l;9B@(9QNxZuOBGna}w9m%U{$x!52Et%ogapZB zU@1Ho`S{cX=0{S)fqqB;bFNTG6b{vtk|gLuAWY?f0fS1gZYi(fr?5fPiD=x1O?U}~ zO#b&~VOS~pn6ljTN?v%X`q+Z?(v;ts+T6mH{9c@Qc zEPO;v%CUk2c`$tTO8D)_>gd2~abfV#oQxyW4L2+#*fn4u{>BK?&U0fja~$)tG43S* z8Q|v)Aa*o$2moW!yyk5h<3e_fD_QDVJd0uM|CFWu3EA;MRVU}%(Ylvrm}SQBRx zOgDIMDi97d=r0aUdQIp6^)?7y1O*<%wm-a!{zfAC3_}a*&4E7M6kXT>2>!n}eX8CB zER>y+#VQ~x1l-2N9t>T@vzzQEI-mbme8x$34+80vXWymuVv+nfJLTGe5v;%?NSk`W>+859P1yNDz{ zV*dkuyMB04Uv`LIRx{}TBa{F2`F!*h@0!Yx1jErAWqlZjkqT)a!_F$)C#tRwS3Y9U zvs={UggWsr_Q(9P7=|cGF4)tN8H-r=veQF00);i@DXMGCH&{ZVq1Ep_I;{e&{lUq? z@gL(Zr3@J7C%bTNH}O0u43GdR`jTEKusywyQy3o+C!#q)!_SNt#JQk2cH9^3v2ae1 zFR6)F{)ZeSKWhg37wsE!VeRNzwODZs#h5Gr^o7jKR1=z7J+L!L>3SS{cY{yac2pNH z@4`tZU+Q(+hC6WfWz+pw)Yaej_0O}%Qg6HAqit$F*qc6|9Jv~%+L4*G1zc@ z3hy77pp5@*$2rbBP zVd4Y@Mwy{<)t@(BnwplszP?tBSB#HGW@etNaTXx?LOLLCMLut)Ub}kj#(QZul{Y|I z>PJ?C>;}}74N?R*&=otvS2-?J#tcmuK}3TOKp4W_#;FDc!zh@yk9W*}%I#rTX(v;Q z^zR)XM`5}M_V|V|i|h{qOF90tM`W0ul0{NaX3HR_Y~Jrp+R=sGD+bsRDaV?``h*`H z(lKCW6OH(ej*qy*+M}?r@b%&C$<8Cf6@DHo}-*1Y2@^u+`z=0;{ zkA1Ved?hT~6RV)(@(hHM&BU&5?IyfesmvnTXlmn38gvrC-tfQ+Qed_Mmp zlq6BPGIu-yh7q0i;fD-lc(n4f1w9l`;V;z`_UI8nX-WY=&`q{P<-Dv@)4(4d;=r9OAd0`7Qi9d z4FXhNa(@&lfW)yr)?YOOcb6!YfEs2xYB%QyjscQgw?u{Z--U5b0J=m$e zjv;O*Jtt6gz*dqdbdPh`+CSd&e`SXr6fcq<>8_l!v zZi!#)rbIMj|K#bGfdm8Wzx4R^vm-<`8L+!S__A8x3Fz zrsW~kN2era=^E(juELZsVT0XR2NKB5Zaju>Bpfcb;l;#aezy{NcV`h%tKMqm_~BJK z-4O1J3urP45g2K&4c}vUq6&8fF<5N@sBBzrpygY#Ll7E4Jl!N{jm4;Gh$p@xv5p~S?*iV8N@3k`Mk za^32ZvR1VTORA$6mCd)O*f$2HOlalX1X!UkE+9ZE%l+8#WZw2~d4)>sUEbkF=6NOt zF)%zTN+xgWQ7SBv<;Qnrp#8P~o+=S0N||j()ftpT{WxgI-_KNXZp41T2-tkT!8*WhK+n@@}yJ<*zn6A1C9h zF`5Ntg9UG1WT9_66K^iZPqZlsM^ai#F~32R1~XV1O#2DiKT-@WLR}q(jPlE*<<(PS z{M-FXHxU{A!6H~YBiNmh;T0Ob-ilS81kX5qo5Kl-9WN^#!hcRJSct&;N5JP7(6gtT z8^3T=-(r#2tCP$9^9<-^CJfk`JY;q!RCQqYy0fvWUXMKWfdpx}_$;qe|2O0!Qv~xc z#YP}bI_we@5gl{(S;N&294+epOJs30~ zIgi0-#w#DF=n+nRLX(&A@x_~?!QZSv8Ew<`e_%4t^V0ET4!_`YhGI@jSN6Y(5AF1jysu?~LHD_n9Xkgy*wP{6&K{t@6UEn-2U+M$bB6o^_Z{Dr z(Kia5SpJMKeCQk+WM>f9hj0iPx{B#zysgUZVBquaqJH<+bMEtYeBByCooujSMxHo4 zA{}HPArnh`^-SH3veh|qGW%mT>|0IPz7@*duTDCV0@6be2)s3CaU8VqZ#=8(Bd(PNrpHSMP9<;0(XL{lN@Zb? z($W)c1C?M3fEzLR`HlK&BRL@@ZxFK#mC%~vc-5YQG9o7#xuR*)-SYFdPp`Gj;*ld} z(N}FA4U@zk1VwzKAD<<9{CK(Y&%G~^?M$x{)Qx-)3_Rkm;L$^Km1dL8*0;2S22mnyZcJFDSAy`Hn|V1y`8+>0Zwg*RG1Rkv^9RHE1YTKlkmYY zSXCIp-JByv0=r|jXtAHr4*l{+qg>FzUeg0fvm2CKLaW-L>-<-$kD8AQg1lF=g&z#P zc;o1l+&-s#D}jJ^BxgD{xzao-WMQ`P{slkpT5%djLQL@eyM4mtqmP#756E3w;?=V< zy&&iL`ii>m84K)Ah|ZtbMGEC+Ge!p@LlM!;A=oZ`E6kg+DwBl;&GPkQdzISf5_XuQSp`%}K;eic4v?0UMdrqah{ z*tC96sb>8%tl|8V*soXA9k4_~RSwvBQ0{>s0!STUwgd7TFGBKLpJh600|TsIRn*%Q zUU-dHYPETnW;C`7qg-Eou}4Lj`}b7U;Z?CjQZXW$0q*MJc*^c6;CJ{J8w_cnVvgw! zE4b2}%`+WEJP!h)(Oa)|Vvo;^;n9$&FgWb zx_0@N!JM^JR)&&5W!RsskhBXYQ?}14%JgZ@En`0E*x*X-o?YeQEK*G85K%TDe6xpw z{#nAd7T}2*cmIo2Ke(Blhev=*IN}gLM)or>MqewLIHX@$sU(+(>JdFXv*nd1 z@%Ag7x!Jd)_=GxTdJ60Tqv}>yn)hKxhT^>rJAPN0Z+zUy8$HnB?;4!^abM_XQo>DR zg6uw%g)&@iU&8#t9eZH~|6k@3C(baDIvRdq?hNs0e^EF?()ZP_LO>t|k6w>#!3rjp z=MANDR`JkKadEL4eS|5_R%lvMl4f)k06j?kU-$!_W`###C?kU{r<-r~J-^7~qc~x* zI`~iLQ}kP~wGg+kurPPbut}Z;%L3Q?i19EbwnuMI2L}Xb-bv4vtWY8&qbwYlt+eVD za+39>fPtPKcM1VkKp>5d9tKx4U1;YQWtCI}{PA2|Z!$X1Y z)AIhots0FeQO$PNr33iPE%S)8zm)#i^|+vTET+2uJ5`+s~9G+0FEfIJN)33fP^eg6kkDV0%%QOP> zT3wg7XZLc?Zl>eLOR~d~&cNcHqhIC*^&Bua;t@JN{P0@J_1m0`YD#9KYxiaTnf5Vc z25^1FFgi>Sq`D+S^6P*qqNS4DsWO%G@h^6B$5>wNrPLw$KOfj-u8R@vEt(`hW-pxR z_rp-vK>g|E&`^7O=JnxIv_1=aJpmaa~=BitCdwrX{lup9n_%CUwC{3#BOqLbaK+> z&}3?4M4^k^0-2obJen!``sE9SQd_Jn0T%#ENPVF^WH(1l4!}e-w9}G5cTi2x3^cEk6UY2y8QmF z66Tw;y`8(fjQlm}Gf=k{?RG-xqxfk=gia?&8{3O;! zEGN1iO!HZi5f@!XJRw0{l#570=P*R^#SZvpxKDL>VP|KD`maBC5^)N^tr~}qh=|zm zbFKN$t(AP6X}8er>DoCtBsMVJ2_Q%L_~yamfvffmSP_tQ3!VI;MhcZ0dGJa5!FwxS| z4$Wf9AD9*t)cyW_7+F&@9UEJ-oh!aN?rb~58tR!bwQbL(!fSe?LTR>Rj6U?t2E_$` zk{V|QVF6%auP8rnJaQT^+It%skdz2Jpo)g(Dh@ROe)r{=0kSe!SnfnW*iOsiv?R-i z8#%2vq1?gnfH=mVhSmKK$-Rb0yc7d@YY3jzC|KZ@4BFGjClBiBds52XfuS>IhylQqMwi-~UW+!eU8OeM4#CBYa(T=@H{Ti|b@>^E5LNagFmfJ;b?&{~@-MJ~R@NQ^^bxN$A|a1G-Ue{UWtT z%M}P@Y0Z=phwqdco81tX5@DQ0<3rIZ&UlQ4fG1u`-!(zGn8xtMH{dRR^`c4>-9AnT zi3%oR1;g`67i{4ko6nG}9c22&8Oz%LRl?osV!lBJY-I_Wco>GXrZxPe5WE}Dc|n~> z7hIT`;pXNqXic~_)UGJgZTIM#HvNi<8Wiu*se2wn@rXdw@HGi|;kk1gM$G2y{JUES zorb;H^dA8e>3o|cO=V;D-=ACEb=I18ZPq7=E%lv}Uzz`<*cusK-7e_A-ByCv=GNxc z*Wumb!6}P6U`nxZAfWVHj*0SPax1Ijmm4*wgmY=qUVmTV(6nH~7hE!)3 zb|9~9=;aQBftA0CtA__dJ~h`?O9o(qnH8vCYtdCxFrrbeSLb$}*xxVBlaR^-!JAxb z{e>?XNg?v*?ldKHeSPTim+Nfqt6K;kRhz+x7ob<1D{o4GWJ^j}Qa=HRKWp^zn{5$HaO$i*4+ocJ04UNNbSGz0zj4uEo z*UgoUN1ovL#6;n{Lt{Z_8<6MzX|=J8Qij0Vx)(mmqdX7(I~jv4Tdi6W?pE+brUE%n ze0)4g54+Dn^c&=;{ZHK)WQ$e?n-U)9=KkKONy-}+Jpexh>9lNY>}&nSV!QQ%aH(eH zCpI>-XtNQes<95QgN;AUEnh>!0Dqu40|0PtP44s&#pmbYgps%BjaSka@`yl}jek!| z2bpJwhmxQ+$J51vuSu8OMt{gg6UAJzD>Yg4s}FpH?>8Dy0aA-MN`vs*Q&ZJR`j2DG zmF)<5_FyHTmG1 zmvw%}yU~af-awhaxEcG?LM39Tkg}SZuBv7j4hpko*=p6Vp5r;|Q1r0YTU3Pp%d1701Gzn9EVG!db9$4e_)?-9csogBhzuGaTu3P%C%G9EBPV&I zp^?5gU0d0kJ^e}7A-e$b^LKGOOXutIE=k-%B{tyJ|R}B*5++5=JmJc6H-qz?VF0%9|1uj%)3EsoX(8U zc@jy9+)HIIvA_93YAR%GtT=?kF(FGj?i)>U#?g`v=98*f}E4ix5oit2O}fQTix={ z*c_r??{dI(@+y=#pvjRWwl?TC5U9%+m5jq4QbLnonu4Y8V@x~_a6dTAkqFB2xcWCC zbbZqufT3N5%b{%1Hr;$b#ycQ0U{K!U3H8D&4pT z(dIp^ufIKCPwey`IiW|QuRrb(sgZ_Kw`Sg7thk(>@8~~n13-|?Ord1Flyokye<_%& z{$OYip#5&y8sZfI{1jeQ)s%Lu>h2dK>!pW4)DsxkUkQGh*n}TbtV6*(EI67yiYxNE z93j4Mf0&=EuQ&V)T(V)I>I41V_Cxez_tdkr6?VU)z>EhkUOt$=9+EcNsY=)|{z!?e z821ap?kXGQ5E>M2wKFhqH3^P)uyMr>PuIw9%`G#$G=kpIj1_lSVH2uaItlB%_JDW# z$I>d>@5t1uudcoc-F*8x;`3rxS6kcNN4|l=-sU)fmvFLBq5rc9iLw1=5A-@JoaN(J zzi)}-DT&7a>$x||>n6|h>29sj+0)6vi0EyT2$$az1(Nl;s+!gE<|DjUU^=S{U~TE> zxPatHbOJ;=A`}#=?ye+OAMbDPD241dm&?;GwFr2L36rQqJa9?Yt?aVWNf33_jBUCM zp30r6aiZOu-7`J!w4u8AOqm^>DM>ot*IkW)xt`fAIdMH*q8}y{J*d`mUFwP5)lnJXL4n>`_&4c7t+td^i1R`{*!;W`&<2J*K96 zQX^se+Y_^YjnnTO(JvSYUH-PkRaPZF1c>6pvOd9Bv&qzv_Irp$%qTIJeST69!%PDf zNiQoBSc-BcbF|~5;L(Hy)hN{;Ur%BWTyi$g9jhy-;L^2u&5tva=CO}*peRW{}QNhY<7xaxIM#@NS|it*>GgFA=;Tm|a=S;)n+d=;Ft zQU&4Jj~CR!_1y=q;)addKoq}#zUsC6y)_pwZe)SuiJkUQj?c}J>X9l#4R6JgL{)|2 zmi8_QZX|LxBuQN|u{_vzg;1w~M@uVzdDMMgIw#fT_gL$tRpBisg<)>#!XD^K63&Yp zAHSHHHRUUDS!CpCFJoD>Jv=t64&_SKhZzSZ&n=2)F@zA`UgCBV{eM(tnz9RwtlwLy=fAcES{>Zw^fy+I0L|1h}Ej{8~4AIbEpKV4ihNYvGR zc`E|=-`y6DXDVh1+tzJV1qGE^e&&)G3zrnX6l!D%U@q;(AP&+ji>%bfX9Lo1SkAFB z_C##8`N0ZwO#{T2iwyVxTa9^u;$KRUhccbfqjCT4(@sIQu`1=0-?1p- z#!^j4*kBz40lf#{e@qg<-712&gTXUnZEL&nbnXJa>z>#$z<9wL&z$@HJB%0@=+2UB z{2^8X3SB>`Gr3F zGol8o!5MErChgxu!3qj{Gg)8(ML?}w3H7Ukwwq;7?qionJemI%4t;y~vv0|=mA~ht zZxBv`dIDWR!7=f-XiybSWMo7)I;L%YYb`;cp3Ps7FZ(9>-R|zkRPQRByu7@f9b<_e z`@BpowGLUqT!AZA1KOXcqj?(-<1WjB%Q@WCi^v|eC&X-@7#Y2}iTbTK;RLD(Xf+0) zz0e5qg-NZ%xYoR2^x}W!<6b8#8y4Sly*Cp;B)TC;Em`WEH(+wBf}!vSH$ z$^|_^IC;xxVVA4_CQ9o4yK{1VeFHFvXtJ+6H{pCa^T^QZe3Cy9uxRBeIh*p4B_$=~ z_>D^5X6|wI6g0ojxV>Ak0|+>wjltUrA*+a>V}zQ;&IC(!YwVktyAP1NZ-_eW9+#xT zcxwNmOHa%jUl(tPo#%BLux$eVf zFITkJBX_DsKzkb*rymH4xfBR(a zc7L!d9B0rV)CiVDl-WIang>`AT$*8i;RN&7+>K{#Y)!Ez$m{V5UZ?4sDN4Ev{z?E~qM>10} zmq_otRRp~}KAJS7Pv{Dnzia{MoHq_QOdQ8>n}6bJ9POlV4H)oYi|TK*3$t^^3p9d$ zyJpS(;zBb=AQ5KeV+a!8p@kIG{b~Nk5VdIBW8z+37Rt?y`gK!Ic;Xo&C}}F@2;jls zct=t;+%>!mNv#VuFCr6nM+FEh49kySCY+s2P%YWHY={d9kyEu4n5N{R&KxK$O8Cvv z5>e1wm~fe+aPh9xEL1G^^gJke5nb*aiY-3hl!siVNT8Z~-Eut*(^-2Yvy|6MNhwD@ z`y4H#`Xv5i*D(jY*lcgf(CiV0p0zzPtoPQym7LIruXXho%)huJ_`ta7R!DlAD~IC^ z>(#ePy=3XSiS#d&OHmDzox6-QcDS^cGu}~iR6}}pL(c2yFGCA?RV+KE1DkPeZd}*n z?VE?V9x=*Nje|(Bsv0Bw&gdTwaMj35w#Rh1fNuhB_IBAt_*oPP z8YqEghtS=BCdj`6H_0_v5{H;E*|e!1^A5UQE^={c;eIGP_`{%Mi4?9!E%VLSJ`7L?wKc0RN-&q&=w!B`pCl}Pl&D)al|Tm zAf6=(XV0QVVMF@0OC|!?bzscf4r%e?t9ZRy=3U2doYnHH6&)iDjmz-L#_hvvT2W0IDUIFU#ZhjQCw~LYsbiyCP`C`fQY~# zQA!kZ(Nm{F*X_EzA&Nr8A2N^x{1K=R$$SEIO3c|{p0IASvi#LqblAJPo_NbHKeJ+d zuh(F>mIUKX-QD6Zd~B&%NgXy1oJa~9JIwFH=I7?m+7B}OB4C8*D;XKl+}wQb>!mA8 z#<0A+A~j}TifWPGpNG9`;_*B(R2(Xg%RXYw3f+W3i9rKg`d9g)e+-J5j}H@GUf25y z{@z+`&bO*cp3YB^E#xrhmm>K&VjO(7vbN;Vbo>19?_fOL_Ttna%BERo4p8FYE;E1u zdgD*e5EKwF;BPa(7mfnm9oE~foE#tHrl;B`C$~=j*_+eUdwIYB$w+Qq9{@cr+&5N! z-D6A6d3!`2(DB%=UnPM_{TA*pfbI6%y}ufJ*?u(N6i;|!|MHS6iIyW3VC|0VOJdRf zuI$f_p$1*RnAi}U$i%bNU4P;lxo;&b$H#D%-x2aU|eIU9+|ki55&;Q+yfRj z=9b`bPGDp<*ElUTt(3VG!Xne&_2+2^@CGf=)H^>v4#WeGHP=N6-}P2xxbSlGzye@h zDb4@#PIimqI^2#5dQfq?DZr;0E}xi7h~|K+jlb~QY3%Qh9`mlCN^>+pHk9_M7|Ixy zUR^$Kn=e>#oK|{zdiC!2=Mm(*Y&z|&6@@5WY|_#)Z2GOw$JUkUe81kS$W-WcctIdt zl!6y*-`mJKN)caTw_|0fJWY0sJ;-ogQUE0bt}E-P$x0A7b%sU=n#*>XdY+@0hK z3JTunQLuW=`;NC4dFiMg6Y0A*%BIBD0`&VIv z2tuDfhM{{3A%9};Qdnq67K=&0iy^;uEJsi$JqNuH-=OaPp85sFPt_T{0&ddJ((xh7 zb~vsBs(n1BiO@zVhO4xTI&y-rrw&Q$pOM%xUh-M*ghq1<;R^Bc2y-Lb3bs2EYv|C6 z3%w{4;<~W$Q+}a4GZ-d2Oyl?9bKi5gyHQCGVtJ;HyyYXon__ou+dT*(PeX8fxD!#!}H>}LW-2{5ye$R!_*W>y4vy2mUyM*i5CVlIWN5#0pj}r2kGi#JyHLLjH z{72yTF68F^ZO*Di)R3Pb#cFi{{+&+VcyZ{Km9haTBSN=VCIqU4Cz*8 z6z?FB)Tj0MB4CMyWwOrC9+6E4RcG{?DZZ6K=NC7W@5U39?XW`jgn~EYP=q3xsO8XH zw=M0nq72^Im3&yXLY+RNoB=+6etE1!@bm1=a;0S!BZ!PO5DI)m>WW~uRZ>DOf<-y; z?Z4GG3#x?MsZ+{+CY&g)A3fHO0r^Jt9J|DNz5lhSAEw*)8to?pjXAVsjl%t8h=gg_ zO~?MNI9qPO^Rvm}beum1tNc?cuk?E12XY3W^Y_YP4oGuU>$wz$3!r8IqRe!dft zAaIu5>`yG76RK>NSF_dJr!wTr{WSOLd@35v+S=OATN06c#(3G@h02vGtGQ!inW)ys zVQWo4+bN6u>goqaC1GTl?=_!|qJ4q1q9K zzUyPD{>yjn?Oq=OZl7$eI zM{jzywz2(nc$yiOFI4sWM5Cq!#ef_c?#7Z51o8bqs8n?3IcT0F zRsDV-S1OF^&tVQKz{CD!`F5^O-OUXdlIvX<`nT(T^xrSD`BDQ?Y*4xv*j^z-bA1dQP_Z3c2$+Zbs}r9 zCuZs8S76)h+)~6Xc@mrU6?7+x7iekrc*yYbakAIZ&_f0;iZ&=pUQwYt@1b4z{tXu7 z-HY8X(3*>O!{n|{{LD+M!S@|?<1DU7$qygB_PipE;kxn=XLLGOKZPSAMvTTEC0H)k znn)=ZT(gSnL4v{_`d`f@4akz3ulv2kjtesY@+tcKFx~5HAtmn#0e`1ZpWZfa^+N=;#Sra+B)@8pszcG0|J%LR(J<4SrL#dF4#Ss_K(9mI z3+<)X_F_%11h1C`pZ1?5YJOo!(k@=~HGhN=$dE3rWl8E7=x5FrHeJ&BJwLJw8|w3e zuH!DGj)?;k%QhKK?p+Fw<6c7+0?BQUUcIcH;P$qJtb1OAJ6o!emPCvCnF6K7RGe(p zt)`4xS}0>UPBYWEp6;cHcmtVIQGds$EHu9Uz1)?2JX=64wk!dAiJ8pYNnU^Z`R%92 z&y|iw9G93RIRleUvhyMmYz!h9jWR5r&w-F;|MW|amO5_F)3Z(j%r58p>pxcs`T@ke z0lYuw1MT(!u5J=t8L#IJ<%wMO71hR<$~!fO^=ngvBYu4awelOglKcI)voVPC5BOd3 z!^e#x*I@wUQ1ojmFU(&;5Ne~ZYaGq`Y9ni}d*Z#7B?psfor2t!8&*BmA9C}M(li4! zE3oHSF%J%Oj%?~HnXktUpUkY$&|i8j_6OT<`paX4-Err&eaL>a@w^5cRHeEdCxOs0 z@A2LU;w7C|!{&>5R3ad+LHGVrVVC4ukSK2M6oEgC|L#p&I>^Ux*err=mfi^%{NOw4 zt2%QYr z!q1tgLKpGx9DqUla3^3^7Qt~Wy7OSPnr}db&ahG@c;D)iVT~)~n@VgwUn8RAAr}S8 zk1m;iSX^oU1Dp!-;gq0<@g+y|qCzu+TlbqOnRZwuHH&sVfwUgg^~c3-AKcTQ!Cv(? z53xqyeZ!>?uyHZG9&p3@(_qQaG_sf=DLyTu{|hHU*uGE+B~@5R+E`5O?wvc~vU=jw ziOH#{k@3-!Cy#I4ww2AwqzFW#A!q_|Xf|+Vg~DXfM}7G4CUgi0B4^|qohq&?Dk|B$ zaZ?aW_y+ZNHK+clC7ElZ(FF@@pLzNVa1BQE30NPydwSYhuP$y_tk($%VohKy4|sYC z-_j8Pp`>)jj-7RNYB4<~WzEZqQsbDY`jW#znJ^So)Z@u*vf+mlRkG=HLD}V9l{|-L9Kmd05 zSU8L*BB-_v6th%+TqY7&%~|_smBD5l@g9i;!pCqV5O+2wD^g~ zAN%Y7@qdExH!pz?2^_weiNs@xwQJTr^Mx-U*m3_r9|BWcxNz~*sZ($ghr=%`kwG{k zf9qer3Fm95WR>M5k3as{6OTVxRZ|TUv#J!n1VloJ!&b6u*F6YQa_RD=mMbk?otO#kY|)Js3J zCr6kVFR#Zllv0V*14zFm6-qr1>OMV|AMKmJNKDcENP`sTG=J%P6tSQ+olG4+o__mP zSPT*4Ex3Af;)~D4w`>hnRFFRhk;HA;*v1X9ja#Pv?O!r`U!rA9PM?@Lcp%cyME=5N z{>2l>1)C0m!1%B=IgGcN;DYAZy$?p#t_~HI*;v>EKSU!}<$_4#;&42kT)#Pc>1<%6 zKZu|iZ@iR!=n-;ZW+xb$loe&{fz9>n=`+X4bvhhI2#EM+?hQbzr;VD%x~E_NyxsgB zRPRT)nVMWw8s7bA{Qd``jZIj=4=ZIuuZ7oec6exJ%a)mc`oDuS6Y&4FZd^?rKNeZC zG*XJC&b9uK>Fu5Q&9AM?r|=47M`Mvy8}h#RmDuLHLWolrfmaafX4#WdsU5o}|K`Pxg7Wh-MVR|G>aIyv=+*9*O0puYe*I*Sk>{LKkjWpRx|(1!Cje2g2G z#2$Gve%E#^r5Mc5ha0k;$-;4XX8X>m|MGWs?@bV}`g${m_Stvu2u4dm4qIgD(t-sG zv(r=A{jX<-`-o0KLE^p#Vmt08$myx567BH1rPfi*^bMp>ykiZ5L+o(%qS#YkN<8>L zq`I1yWP}A8gyBDx#6pFLuZ=(`>Ep+3Eb~b9SDS7KH-vah}aqxNX z{VVh}fBN`GUkLuhZ6p|p3z;R&31583_$b#o#n9kja%-av3G_7c$7%YS6S))(1wDx9 z%vanY!^y~|#t40d5ik*a0EO_69yB=c#>2=#)oV8n?myJm(+79n1&bP=c;d;X zrY2b2O!ZkbIPw8nBQi)UP%*b?&i3(tkb)!Ay-GIFk>n4}*DQvVI*8c8^@|oE)@^U7 z56dT9zi|s+g?acGe8>|Q2{!%Ejni<-1yp^or#diEE#FWIaWLr7vp0GsY5+wCITe+a zOPiOSc;`gY%EF(tZ-7>NP#aF*jEr!}_{A9LXYjMVR1ylM`(V>p9HBJ8fY{K`VD6?; z*{pS?we`e1C&xy|!m-Hx_usc+6I^0dKxCH;ZUKFGKqIup)@?h^pSys#3OzmDms>6) zATQ?6jycnL*g(N(Kg z-*wkrSQZaK9y&VP&!0Q@=%bI7!i9m#1utG|IeGjPG(Z4Sw{XFuk3Npo_E?XnCSapy z@-8nwZ{y}IJ9g}7X}N-MC>Ic@;_{{S8`i;EPDPj;buw;%N{03-hGG7pY*T+^;R<%) zB~8scckU`JEumb#9fc^5Xkb~Fq7^Ha7ZeqYkBuX;HiBZq0fK7Gg_#Jhz?je`31T{@ zJoCrJ^ffAj>bK3Fk zy8e`<3ejGjsRB+i5*2Nk-vu8+K={WQyP6?r6shqd_=x-w`AMU}841orBJ+zvK;-AU z%TENN=fXgmhEg$oj4I$upor>38|@Wb764DTHf|RFV#O5 zi>%%dXIm%YaB2xw*T+8lO#CyS2_?MV zFrh$kacu3{&|m(~V|{&A>p28Lwyw3p#~BOm1@qaJhpI_6#QOz5pLSehfBh}8gR%aM zFms8}x@~!X^yT=LyF$f?+QG$DYm1BW$}3V2{XzQqZ@{@5K{K*F?b)GW3Rr>u!G_-v zmc#<_m>r2xf8n8Mcwu3f-c1-!I=CBZlN}kfdphB19t=l=i|VoPU}QnPaVkPds(ZL7 z8ZIh?3sPdm%H+0t!o>x4lz!ug+g0n-neJ7p2v;A+v&1s_7-lg>W~Ov8hl zIh;nY9;)0fBvQ88(Llkb5->7#s%8V7$KsokOg4Q0a)bpX3VmQB_&5wA{9}d+5226m z_)4eK*RHi*ymWDTW(rkZzkc1y6)WM@i*uF zsZ1t4GXql~7V#S$9h;nlZBak^#?9+6AL9v#bTK_K1^PJ0hE9W9bWL>?7R`f;>(I~$ z;v+9v+FZY=0V~4cTevCZHkDIcd?v=mu@+xfcV{}2uC1zFy?S*)B0rf!p_sz`Abar-N*}a7e7pU(Cr%oNml7lDE|C(NAcog-~a$X07*naR28y>3g@e* zauw*BQW37CsK>rIg9?R`g4QKj;S+!YP*xl zwRH048(;h^zQ^fGx`zNWJBJ1(2z`b_@bUA%@aH`9my9nOFTd6NBJzhtGRbigHzJ<_ zgF7jS{GoxRw@=jgvXiOI#q-(Y2kA3=BpO<}GO^>HP_8}G7O zF9s$?0+|^^Z?Jal3e_z@W4!uXc5Ebb_-zDkMni%{<+1H|hYAv=y$lX6RCPTt%&otA zF7`kd^zmD}Q2mnp2Oo|sT&OFk1{@I~`4cM0gT*;>@J+k(Izm)udO9;b-Ld8+N;G9B z#?n_VkgGKsp2&-A*`Bv`o3<&>;ZH=1i#+^Ts^c0(5g8q_uAH~VA3%UVOf$HU#L_c$1-nJb5$km~7QlY!$L{y~z{zsOho$v4cw-;m+H7W%(ueDLda>In1a2x&T@L{4y0 zxodqp)0=eU&g8PxDB>I@U}!t!s4V3<2}0js;MH@ovB0@dc;Rj`mI%UTIn5 zKw!<|sF*ti}Mc*l;r~0ujAy>$d#|4!{3RxQJyDNA&0jf<;3sQ6WC)R=%HhXc5->LlA15!)5j2g$r5Bf?q9_ zA#V$4OY|6;YPmsHCX03Xs4{SlPG^QkMv?8vXDZ5@*0FHTPtvJ;U`X8hbAfsB!5xY| zN|5$v=qdU{FBko2INGpyaU~XgrZwoSvGIwK(P3ER@gu%$I@5NgjoTZ{OXRIxw>}SM zR(2)uQsQ&k!GK<0Utd#GgMLX)&mdUy@aPCuYote0YpG*N=im#fph~1{Y(#-I61F~b z{W)FL+IfgdLn5k_h+rWO3#*1$fEufSaGr|~kyE|T{wWABqVPd6Cg+f%)e&JtMs#mD zv!m^A@7sruBab}%@UGpv5z9LtTOtpkQDA*0-k^FLre$!|bFrU~zJ8$hseI3G*T1;c zOUZ@Cn=14f0fUtbl1Zkc;4k$Ol5g6`eA_@bEC0Xg0Y+@PRcB z_Q#e>_9(5b5{wtb)~pXTH6tn|jPse~{p z8jA%$QTHD!QAB{fpk2M-V3Ofvo~M;VSdN*eKEK; z<0psdENtsn+oJfrDFXV1;cZRHs{S~k3#1@W2~KF^qq$H?*!$?CjJ}P?m_O$pI`Ppr zRJeq@Gs$!m`T)U&hR*~agNa7scY_ayxzT*>?E*Td?@>GonO|q;&bp>CKuLU$uSe;E z$IYxeguVhq@F5(8e`XI4|Ml-3pPAGQjHf9qvVr+46lz$ss0d&9ZzCU+5WpT)Cp8ID z1e+@#V7`M(GQ3a^?BD;!8+#E*7b}>-6&IFMs2K=MOdDK+gP{y9p_gR=qpXKSXx0Xk zGfmW_pzxE_)2R@h&5}Q$HaIYF=FFMbUVr`2!9zFOZ;g+Q!H$gJ9;hvheOTKL7IQow zKlxG*()6kRN~wVLF!s=c5AEH%_vn!$Gs$FoNBavezPRte0hkV(o10fGU*6QzREH%2 z5lW-Fs=TZW@t#>5QS<_6DLi=<{odZ*Z+`n*iFh7009I&5Oqb&Z;HmgGJv9vjB`}2P zb82G3E1$Wr0+>!o4RaAtDJsFmpKrk~2Rt~s{AY@q3>5$g6;6%Pm zYBwK!RjpZjg?~MuQ;8w7|_G|Ew|Ti=}m*ns=M?R^#g5oawgN) zLu=^aWg!&K_75h{oeA+e86?KEAVX=c4UVadJv3y|iv=u!!j)BgM(REsFy8=2^LwXKZvUL3%&!j@Z3pv zqmVj~T26tr!5i3_M5lzRKdrUMu|&`<_zfv7ibz_ztDjSMaj%l%tNcbZdDHF0d)mSs zDk%$A)dpHG2D53q{l?4-Kd^=dVB8PY)P%s#coyO)#&~%Zzy5DX`i^)k*V@o`Gb!1J zzsY)E{VVhhY`KquPi|aH>W7OD2f+Yo??5Ha=OhxCl%+DwgDK73kjk4Xi_(S?7k7rV zNu{zvpHU!W1s~y`PssR!X%As%m3k44MhXy@N<~$kul}lM_1+N+`UL*CaMwL};NXvb z^5gyc_Q9??lbnJ7FU+r{rKMQttf;8Cpr9Z>500&QU0q$LPo3%?98@|1%Nw%;efqD- zLL)G`2~u;9FT||4)qd+2zxd@(fBMr)7cY*EjlsZOke^>&Q(an8f(I8C7Q&;H9-Njt&E4r6@U6?e}+gPSetHG1@4%b=xlF4d-e=&1}OwXSX5t+ zVmr2PziZpJYOH^42*4*Ac+%Rz(AKgxY^L}qPG)7*GNlcXT7(<$OqR(u)&?v=S|Q?j zIm?D{HkaUAb^VNftjRg`HjgLNa^sUzKF^`=!JkhRT_|f?_!@BEX#OEZk4Qs{B_f6p9r>A*t=p_Kk)lflgEckPUwQT` zh^qX?>u+>)bl{7{Oixc=Z(m#M6}Y#9*-FYv7A>q_wsaX*5d?4GJ49Tq5UA*@N6teZ zMcj?6iAw{EIlj;S1qG-6E^(F0*M_b+3Vj8W;6LB^6@1iK5q!W2N-}DeaOE>42tI<3 z%wKod{0qC|_@vd}M^<3?XTbhgRz~Z&xsrg@4X=I$Ilxjv>2#DmTYl19i!`2cjW)*@ zDjj>pN31=mQXc(~v!T4%siXxD+;ocSGSr`X<;B$gH=wwprnnLRHAx)Q1!#;8g=VHG z0oF}&?7+s^TniFse5bnItAA3#T=FekUKZWFHG6cQJ(LVg&t#7uwIBa%psAT`wM5%a zo;jIqy%b0#VfYT#E=t_Lhn!^9=Fx8{As2mJ5(nKF4iZPNNdzA~BBy?COkmOK8{mnI@`ryCmQANk>$?%NIqNFaXD$Wg?^ZtUWB=UJt6zX?f84o^`qzTgx zLaB}hA5(90M3BR(s_42+*^6iF!QMb7X|-NRc6OxSS`=KkC{$Yqb2(z6ge$8k)m(5_pz zuBoZHrn(Xl5@2Y9ff6R{H{W=(qrGEjn8GPA2Y7a@Wgy}L3n#5iK#JT3pOMkAS6_Yg zTi^cn{@OL`5XN`Ks+IK%7nPNl<>lqU6PX_!{l|a&hbygD5Dh~KKccKQ z#vkVIC!Tl=D+<2x#v8|u9&2g6f;bq6tuZ}4jp)pSgM+u)+s|J(fB4YhH}}5z)E|EC zkDhr33->A95VDyfT5z~tgbaS*{`(g!TEtqVY6`-Cp%tW3QCqM%Do6ldQB~@K=BJSL@cTIdI_6`3o2Dv0(zCT@YL) znL_mNuCAV|SFdAj!+i(dzVF`qzx?GdZ{D;S26=w|teWPaPsP;sVe~KYg}?rWx&q^a z@{iCbJh>a`#PBDNYLg-O3qCYX%=SB<--SON2Bba^{1qq4{E};aH=|VMM;av1# z&<#yfX_k13(zTsOK)ob~S2RK?hqz8744p?lPzAVB9{rH=U183r{`ox^jm9@`N!B$4 zMhD;#oawxtJh(5ka3T4?qV5yp=|cytp?=bDBjNZHpQkv;4#nR}e^6E8ic*bp=(isF zFe?WUO#=( zFv%grFvp!Gs~)xs=PyJN_m*S{|D!a$aT0weHuRB>(|P3&^ona&ufFt~ms&2jAb>L5 zhaY(0fiHgXi<`G>DJ?063vf7yN7GYjZ{vGBFD0x+8&f9gnm(-IWo4DScI{fbX6>~b z*G`={)!Nny3wR%_%l!kR!^2pi4kqU5=^g|_=r053~ z73F{U`Ooj%d3QuD^g$2MSh0X*Z3v1Lne-_S8eI&(w$mFWK|a$h(501MHLkeiha#Vi z!q4>iN&3n3NMZF|6*5B6c8_h(#&12sBe3@5)C@A<7>>9Zv1o+ZPu+xky5Ckoka5b2CljLrTq~a1sFHX!pt4Rb zmEcX+-`BrfEjIU~h^`aUCnlpL>JH7Cbe+5YaCKj^W=&J`l7}9C1mRXLUbuMc*3F)t z-oCy*d~X;X9l@HE!!t9ZqvHepg8&4dC{`|C2}?SWG>|%{GXE0Hz@NaT%^dZq;3N3x zLCowS`lo_H%QwCdeAK&+LPqd0IOLwc1Ruc%2)O#s`<;K`fC9CKeKQ52#OyVG*@=tTlr zo_+#1-^dJ`V{b&GVYR%6^ZxGWpR`mP?(p5jm$}DR1X192erBfaVlX`&m>5kR*%!O_ zzEDFWZb@Ignz?cg>%~zWs~6`z{v^lqW%@*nHgnXc@2dZxYQUc>$h*1vEhus!qE4{l z{f8A^wyHBGj6b^7aqbC+tpNE@tIEvNzagmaR0REt8xfm=Ve-}=#K|2Q>HOwJ6)>B{ zp)dFag6hx7s{XpJF8}EI>sF%jMn$JbX?(yxy0ZEK^YagKLeZw?z%$Qkwv+90+aRp7;14#P8Y`Dk%0o;db=7+?@LBih1#I>#tvE zbQwx#_Ed%E!JqF@XlcyocA>8@5d6UjA3FcAGnm6=T2}J7rDtKh^Dxxd8&OJZsrl4D zN;R)?o?>!!zf*C27ZDKp1cue>1GW6-ONTsJ@%OT&$!W)ZKR#n2ydEJ^d6O&T|1N|@^_V)I{jCiG`^~A{& zmoK$UC#P=Ry!Gm?gmIe! zI9L5a8IJZPQ8ao*D3*VVSxQzuWKIC&iFJ@)qX?tOFb#!VaR z7cML+E-|&?N6t^5oAP1wuWlL;m>(Ynj~5@D6NIJ$jG`f+(3JWMK88Jne`tWn_#%-Z z@{Lgt`AM9h=Uk1&HogHneCpeUvVj)entA5k{`r4 zO0}Dxf0W+t)en^bhN=eJC5PjHsvIn;2+g`WIwD zM(8Ve=jmU;XI}a6!T5)a8UUAh6xb`i*WB-NrAbh%YQ~IHp3E5RM~0D1QkaTsiK>~~ zPuY-jdetNdedd1yhu~wFTlnYqKECn`^2;hJqP(mbhI?mc=j6mxetx0%1F&!WvMCR& z%rm^2DYbk+%-Qblp01vrR5}w0g_kc|x^w5Q%1UKZcBP6({*eBm)B%<(K6#}KseBu0 z6Y!%}It|arv*izBQ?$2tjEsyyWaZ}<+_h~h!fq54l1*7rU`})Ct5hD9#EYQG#b(Pl zv=!dRkw{@)ejyfNTefUPCPSg9`v(TFpx-yX@r@%#j-avEuU)-<nJpJVNq>u zZJh1$ur}Vjd2@Pd67JG?0zKsY%1_1z3Nw~FMDXZrhF3~a^#-vIAfLIxj6Zd#qmwZZ zTvMv7p`XrXu3ft}&_95lMq4VYs>@2tBJ6<+i+TOx#V`$HoyO_u_jT=t*fgmDK1jk1|M`9hjmkTxr7WkdT(F|Fu^fCUivD7_f&tb zg=R6(rPmhX33UfO78|=%kZzsL;topWGE{H1<)jY>WVodxvI^Yc8yXi|nQStd8X6pI zyLRpQ=fD5mfBOysP{Y=Y5Z=S1qij|-Ei(~gbl>Ff>tRiR)4`t7s$n4k=!~*4) z&RIi4Si3t^ULC)Cw=#k&f}Z`m(>K*{^;?B!PW{$HnPN!Tqoc5EqeUV7L=`biII=U^ zhrk!XXp9tPbY^mf{xf+(D_8#_@I`QHf{6!g_=Qkx4FKrkLs@hy{(%IL$L8v9ltYhV zuyLgO)Q%4HkIK5`nHCChALYg$1n?-lwvs~6k7N4t)IR{Hn2PdHacOkrDl9Q?jgDKR zL)Or+H9UY7DN`qp1#Vp>7&P1nsYe`cnqMn;BF0n``alPfDK3X6(#^{5GSlUKe`%r#RT1Xv>lMs4%Z zM?{*Q z!m?7AsUkV+&kuJhVal+C0S2t{LNA5sG6TaXwhuu*Q{Sn&s7VAEFiKpDS@g$7M$eo& z-QC@VN7qzUu3EVgPTUmegKM~E)fz;y#yMQY!9SfH9d3J(N*hx~7u)vG;P9DqXW{(~ z{IPgrQ&Uq}X@#nXDoE^t$HP^fv_n!$=|64yfK)2)-h*_y$W?#!s=!8Sx|@pV`waik zSA!5OMF3ZhbULNNe7m%96K(U+r}SVjj4&YZQZFtpYFON`bI10_9(@!iXarUxL}ZK^ zMEsyl*Pm|TYtQa>^kx3NJ^q4^;KM^n#uqVymMuoU5i%MW!AJ1Xn!~L5-JOqwe|VG# zJ|5)+r$#@4(wImD%gUfX2NCCXeB2%xhRehJ{KNVid?82%<(5An$%;DZ;0VKKvt@Z6 z{7HYCtsg4+1|rc&sJIwzv(Pew6XVv%5XHp6>jTthEaicpW2!wYk0FlT0lxsOC4+Rt z0mP3fNgp=y0grd|PbA*9{&bgv51N2xM53|#9tf4!&_W~0>1Mjb=k0kQ|EZ@7|GU2^{ty3q^vN#-@(PIX)I|15OQyXYZwRib+z*K|D=&GFy zG|H-M#ljv&*4#@)d5$nt4LKyMhnfVTuOQNJ3qA~l@XyC{e8H+#zqp}!Npk`poC86u zM0erRW!MLahm~+O10MB<02mzTL&OQq+jMZ{14MdQE&9jF2*o=ygAls(?Td=}#5mGaj zJvlX*Nu}o2pY93<;8!~|IAFoltLv|Llj?{#8{^~SEtfANaI%-aul}Tk1&ay_%Subh z%bS`F<2gS&5Xei!R<2mNdeus}vSKBSBS#MJKd=up)idU+Kj^13*&8=+!7k5b)XomW zUYVB&MyM8=gLW z`snd@#>d8i^U`I@wr|^3QUbfV-ZpI7xTt;+J^$fVOPS6aqKNBASTlkUSGoB?m{ z^0KnxqGFVQ-W?OKv3HZuGZOyq@Y>Vo-& zq#uqCXRlwgVDjdNdHLR*?Fitwc^Uf8yiFGH^VOmF4)u4)lgAHRogJWKN1}<(+#fC}RjnXe>Up|Zs>%wadFgxgLso^c{2kTVd&6w{c)RHz z%wD}hu>|o7Q&thGuI1o_6c8g+QWC1JBi|XgG>?tgT^%sWqizlmMA<_>+ua@L?IsNq z!L`fFgVj}<6qTZ)Mn7j~18auz9ax(wZbtst+Uq@?WsXYW1W>!_~$@z>u| zua;yB!+DmDSZ`X^Bk^-=K}R-b&Av{OCtNTKDd|SV}Bz z7jHl5xR|Y?vf^L={okH``sunlGM7;#$QW%?*{0^^^2$p1PwDQ-sR)q)zcvxH+XoLG zJblKDoSYoEn$Mjp|HUtU{{H*#V{)d?x-sHAyR$Ph zJ#H@?>y=g2Cy$?OlOBK3GO-hlCVac5e?VOHFFlT2OHJ5Y@t5?EA3yf;%P;TWzYnX$ zvom{5nL1_g&>>iyE6&n2_(0;r4}Sq+F_1>kjf8Q&SNFySR8XnX=~g18D()q)%&4C}qYUhN!Sw$;6|xM*p^NKRu4_UkqL}ewj#% z8vx$ioE#+aJ4YE}bCi?>=;lyb7OlH@0|6}I|uI?$){st!`dM$dN?Mlh3ek31+&FJr)cF4(zd= zK0+|Me2&7tj>1CuF+JepNKUr*>1T8K&?&K&rtqPI;i_uUK3q*tMMN|{=z_rB-LX1+ zA0>(@iZidkftAkc*(G?w7ccB*Sn3_;7YZvn#M>XIFK(=N8gOxq;2)Gwa}4{OW*R;$ z4MCI-TPzZZBG5;C>(G9zXGXY{IFFg>E2{MVVSb@46HBn+a<)aWQVG);&{xkGr!Ih@ zQVTxj^BRABt-hV9{axix3wfsBkv}Z}X~0$A=`7=~P||>01U@uT*Bi~iX;VT${4Y11 zBJo5WDH!^s`6wyq+v1E$Dl$x8Ai(%Y9x`)|nL`+#Zi-J@disQk69x|%jD?oLVCa=s zUj6Pr{?nN=rvnHq1#f5&$JVoFOMd!4|9$_1_doaCZ|m#pO?`}?nU#LP!pywhxdR3a zOu>?YX!PJm2VZ*WrGp0#wfX(kkAP>+4^C^YsTFc<4X><3ABX8Z8tzgH|=`Hv|m} z?%%WTJKy=v!bJ<=POYn}4+ODF+Au0$*u+q{cHP=lD_3GYHh$?JFrYu4I>9F+3L_3i z#+*5G#*ZJ55E+Qef%V_Z?!EWFe)1DIEdzl7Efx@>06>t1L;20O-n#RyJHP&azP@|U z9^h|40EG;XWbgcZL{~sz$=Nfj*R1~NqeF0rqw&~~z{=~^mNp<@C}pCpL`_njgz}+nQ2R`(l{MS$R@7t#rjMMl6is!2;fA#BM{py#$LYom)dBlhjKq)sD zE?qPJWbdiZS<`@oZ2R`pt8=31viCcn7*U*&nMqCJ@t05#ylKK;_desJK%oQUBUnZ6;_}7( zqcJfb86T3E3+R6U#rQBjJic6>@de&n*PvmJK_f^3!L&YpB)Ic~FxCa@K}(Ha_!dZW zQ`_c^{#9?nuS&uR`-e=RxQRw(h(VE_?#RrNPAKRraAeFQpsNfjzGN0~`Z}*gXm4y*_s;@WB zvzX6!P9HTiu?yf6r@{0IRf0=H7RQECjL%iV2QQV-COgCE3z2~M#>HIJK(U^C%gf@I zs=T<6s-X+T&>#w!zJ`nOQN9}uh-MAuA0aW_TfPv$c-)w=^XJb$d-m+PbER-8;+tde z`A(iXxnG|m#GE~K`s9HF2TDrLAr0RmypHhIn$^6)|2a9m=FFb8XZN0uK04Uk)bi3F z|Myl?-(^VO9wCOlqGD1eB>2+~IHAxT?Aa}dT_yj+zv zapHv4t5-KPHo?=ke#81jix$qEJ2xjM51zhLr%soZmo1n-|B*)?!B_Hz4jnps)~qw9 zPc=3+mz13Omw*13*WY-3%;>RjT;k(tWo2c1_Ut=)^hj%KtH&-|M1-xUwm=;^yz44YHB*}1>f{1 zM?Ts4!A>j(hWlF$oWi^k78HS+kdQQD*oZ-c1|qI8K8W|uns-j0Iz4;#oPvVhsDG}s z4Br1KQ>J|R%U>xd$d^KQvHBU;(*@Ay_%21;d+%*T80ey+ej`VYEGQ`Sdfg3;jYmE? zibcw`b%>#c)fMg`Lx(K8=bo`+ZbDoR`LMFhppcxH^tG>jt-QSaz=8d3ZT>gjcpc94 zTW`Cyc*LlTjPy2tE57)*X3g5|+qaRG=5+P#+h@trC0HX5vLHo|D)7f1?Wb)@4Sk3wK&p-d$ zeftlL9Wy#BGdmCp96x&E^yyRo{=I*jJ$p9sCjyH{BBxHD{>Oj(?lZrBX7Z#d}9yHiJWk%riQTQKY z^;P~Aufh!T&7J4U&BYh4;kgSpG=x4m9N747c*lFT#(H}!qIio;F>)Uo_AOR}x-xSd z`3130_G7V#t*Wf$&woJJU(cX{_%<|E4257<1r8nvu3H`6wbkC%M4mnskAmDupp5^t z;Tsoud7f#r!bcC=P9DaG=^}?dZ2YhPNVxwCzUkAQscA8MLW5j`wA|Si2}N6)L&uH> z-di7fZ>=pc%{F&|F}^7KQ@E=z4WV05%jJzO)_>yc)yq9|Uf}r0Fo?jLhFou1(%1CwWkR+J&!TdcO)|H}X3RKlEjj?4_K-lgV7 z!!fMc!OZT*{}HP$gE1U)dt8G@c*c!K1PPoM4?_5$Dk!62_(Ldb(MBR*+C(j?NpBts ze5kf)jWCc!Ril5+_zR!EcKpjL9Cn1QXj}INF;~DJIE%_g6)?VifR|jKMGE!FZfeRkc3g}C2Obx#{cTzL$Qj4h?=`V z_5}4(oMk1a3)Ld4YMG8}ej+6VpXTsXUtGiVmRJvSUYWO>HeL8jbGXe{lc)18M}f+4A%AXH1_aT4F2gQ*h^suE9uK)Rw`kYD*QSmaN3)mrLBa>mT*Pd)Y2kAM8*Lx&Dw6*j^UA3c670THHsJ}fZzW92(u zhqPm|;OSq~|G@_zc;LPVva_=ksdnQFS&@W{xB+@cFpoMQ)HW_6E+VXHiGsphlG3s! z#xLfCwr&exvD=LGBP8#ZoOkN<)i-KJNsUicXW z_kh`%k(r*9oE!=vymGYkY-!2aSC%h-&F96>4S0DF(N|irI9>K{etz$}?z;O+kAAUF zpFZu{Pt8|js5z_TGK%@X)n1 z#wyEWRp(-@Eu@oSennucE#+CQpr3R|Q^ci;a6A4gApV)HjsZI{yG4MqfDl5BA=%%w5H8m-!rSKOA z5v-f~i8gt3IK5M*`_r>x_0_PX3O*@^c(>@Fyv zYY>0Aq9pj|=R#}WY8yP%HS#9+pdrrOY`CGLP0f)rrvlrzMt1LrwKTvbZZ9lyj-QIv z+~QuQ_N!h)BhWq`UqpA9`n;I~X;vIiCmM56_ACl0osQ<$cJq&wh#flYJ`;4`# zaKe&=*lmar4CiTfPR^WJa~^*9A$+}MP+RX8HQGXPEnY08cyTEX!M#ACIK?UMP%Mz* zZpEdz7Wd*V1zOyTd(q&Q(8GVm`i*1aXy5|d>M+#aOvn< zY4=-jdhtb450yXIP9&Q%o(h&$r$~kv_e*lQ2Op zFCd@x!60F`ou_-dC$ae39oYe_ftlDINT0!{nw4m|pB6)LK07$^>;{c2y``yzlm^7g zysW~9sfJFk_+2J(kdIprp7ttZqbs!%C`TQe(h3e-RQENTdqcDn_~CA_vMs-~RY8}H zXH}+3op~_52>*5Qv2%F;f(f*+XosB$lO<5(PW81fp3`no^2fC3HTqz)nD1Rr4c83= zlr4(NiUSJhGc$a(PHp9NFO5z4i5IjM{5lR_9VRiWL3XATtS2%P)6;Pu%`>X)>c;ZshIQkQSlx#c-QWO*|dV0nJIGz*FI<~Bl~2rDCk>?DQHQrgOu%j(VrIb zQj-rzoos~X%cE@i^Lm46{f>DWZ#v)KJ zof3RGWv?ldd?MpUrzOl^enRN5kDdE||E1UbJ$t&lY<+7m8U#6)I?sa0yFWIW(NU@T z6;8-jl*=~fYSNrf2@QZgO2l(^b6&@Lt6o#b#2*-(n)JfQk(HnjmfC=$e|Ob8;rHS9 z`xk%I&8`S&PCt26bmueaxKYALse4lo4h!S>6bjztJtrfXAwba9(2Fjh>wfZy6 zf02#pS&gP&S4z(_C1|GXy?#15AKPr2g{q>e92c$}-|HCpk2{tdE3nu3lCj-)cfe>( zQLenRIPrkZJm?31hAF9akstYbTS=S5l+aV zZS+?3qEcjSDc(IGkuHmFs4F92vSJZ>UNJwrjLQqFkMf5(Vq45Dt-I(cM zGI(<63e9HJ`8A;hq$ogJb?B~4>f2pG`xv>gj`Ts;S-@>O5N07w9|a)x)pe~{0-rRM z&1;U00k=^@ZfNhw)|LxPhr?3+ucXqA$c?$*hbiMIxzt3nRYZ8;C)wKv@Ckf*eTKf;enB83{PwFSW^}gcE14cI) zIa$E|8IpFBe&bI?S=m=A$~WP)gXQJ6a&mIOm_nUj-br`&GIzOb7IXnlVV@d&&${5G z=lU%V-<=fPh@P5-`@`{a#jXF;=Jyju`0T}G=viX7n7V0>mTj4{Tal_u$!Keu_jTT` zwVU<^b^6_&Ej6?kT{--|&zzr6{hE8M>1I_@M0WLujrN`IMRK{E|I1X}E~+^tWYE6^ zI+O?7v&_< z-sJHpl9S_LCGCwo@TPYPi3XFmWwXo+uId&p$&D1-0EC2(R>u`mKDuu&9k2t zhpS$zcp+fnCnar9ZF_sFz9mK`roFwL*e=_vM%$T(o5NskrY#huE@F86;G6T~ZLiSx zRP%sIcV6SMk-J3$coAKfy&&#ubQm5;!t0Nb&}3bgZgZkeHpP2#M-abDPd@<|H*cd< z9%ARczYC9n*-Ih=O&~j)4-fJ}{?Q5~^vO{_tBIdBo6Z($*2zIWFJ`}e`&KKtRzVg_ ztb__;?+1Yc{(}8)K`p=6oBbwEqeg$^b>o4WhbT{C8e3Mk+Wkyk`WSUc4TN;_n`74iMX1o%Va*mp z(D#g`NR?EPhWZtOs@U&BWP{lA%>wKijL0_zlH&2dr2=+B7!2)7M7t;7In}e#1Rlyh z_EKxSs`cE2Trmu4{NC?pb4%+1-weFiPcZwEMr8)6Lm%LIVzQo+)T=@X{0YDJIhMJI zSIOmC&PhEPIijf$2iaG)prN{;Z1ZfUmM-DZ(s9g)J0$PlwAa?AZD|fzNlFNQEed7G znX)L17k}w}bbUVTXYRRg@m%)&E1Te3U3%g#PA%e$G(45!Evw(TooV;zE?md&Om`c_ z>4f)`dX{myWnxMcgSxmQp7T+L;cQmKKG*L!IQ)WYii(W8TTCK4ajHZ_ntdQJ&MLO? zn7>(p&Gf9^%Ch|l{o+tJ_i?%I1xwi3#dFJ!$iqBS8l_)6;Z(Ptw}-?zB77a|L5W;R|m%@cYu>ur_E&|nBoTOeSJ^)g0rX3 zpoWW%jh;`Gc||XYYLMvtPto3itKjNd43Qavyx`gn?G)`hSt`4}*es^`*ghQgj-N$^ zgo&vEs$re`(iz-e4gv>drg*BMwfjBd&i{`WfCr_7GCR|C|72Z~7U@y4mZnziH_Fdn ze=6z>4RX^P!k&3HH3dMtdk_2U{>B`SSB|T`2qUwg(BVsX6}XbO>0$9oAi5sCR+b31 zM0rGIcl57zPlN<_1H*4XRgxkk=8E5dG4?EWq{M);;7djBjJ7b%B;sNDVQA<-(@C81{>eaYi=%PqSUDA2|ib zGAJZG@2+Olp^q!;=)U)@KFHgw^}Bhk^?^$PdS68g8I>&1>h|@+`JAj!O}jFv?lqyX z!QEt5UC-YW4-;{vPS&5gnO+Jqk&B&ID7}T%DyQW6iyssNu zwv`>}0d2p1o3t9?MQA&RQcW~_5HQd2xqozfNPZyMX+YEeW9S(bNF`*9_N2vF_GxB* zI%tBUdGZWTZz2Bclv-uXpV850Nn>B9bpBl&#_$&M$!f)Bi-4TFf7VEFoZlzkWKouL zwb~$xMEU%OOz88LV(zu*E;1hU7y1)-)2`zqX)LF|hSbZ4?W&+!N%q~@D6$Wqh7nYH zbu4|k+n&rJcq#bWz{KJbpNxu%2LmTsdcxDcpB!uLP>QdKeyOB?C+@Mc zy@9b}ekW~e{>^Wif4$N6%i?D@K1EG|Fm>l}6=fL^2$x3G9JRMZ#4rnt-cL1y7tb6f z_{7_A;)C|*d9aZj{F8q)^)F0*Rh>8J5|D~lh@+l)jw!8SsdXO9bmto}Yxxq}&>GhU z^`v#h_l{%E&{y8qx0s~n>SM}xqYK1mKchR!zB{2SO(CMGp@xD^Hjl7w`Ijju=m#T8 zSOicW%@4G~KG_mPi?f)>_Ws?v;vyk8oK=~y_F;98YgXBw_PDz&RRt=e>E3VO&U04t zWiaS>8S5UF(__dEZeAm>`Y=Uc!My`Y)l$JPJ!M;FWQl&6=H1_0TWFKY3e<4BPMPbj zOO%Ai$z^5+i#CUTIhEwb^ZOEKy=OE)O!88VorNNezxzq^`0k}h+QN#US73V?CZD?N zdBJihtLyxubzD*GFuDq|=rpD1OeglQ!L*xha# ztJ-*{H9-9k<{gC)TLbgl%)OCOH++gMN^x{L%qbIo>qb?|f%mR{b9$?vMgBETdC;2y zJA~?qpj|yYFA;5kKZS2nlaL32{zjJ+)L*6A5-%wA?-{-N_aeTwH*t%NgyjtvdAtQd zYacQ`R1?YPygkIFnFA?jbiI;{1&{{{nTD9Jiq<3o12T*0&=N8SIQdVhT+h={5~e8?sq1(oP|%M_ z)OjRa+4&hz-h9t5e2@{ojDN-)_v%ue8s|4J@SYih#{(d=z#<7$KC@GR0>hq128JtB z`25J{^Y{p5v4XQtJ~}|oQQLp7lT|xM%rD3dQsRePd0G~U5+&7r<)5Gadoh1h#U-{~ zRuwWaf0>39yzb@N9D9r2MfUX47q>$2kFJ8UiUr=a%b>`{)Y!?%p9$vSvK1K>ymQ+l zNkXpaDLcZB5_#tzA0p6}Ox~L9NQs9$1nS9H{A?DOpSHYw+$`=3ul@e&RRk#fEMwzZ z=3zW9&$JCcI*VRFHc(QG|0g9ZmOPjIh+Jg4rEz@}9N|H}+)x2C>9$}4N6WFF!nBCH z5gcbD=1rLLn<@;kk6$9YUK84{)=nX}p*XrJTPGs>JHoc>a6xamLdV}zKv1*(izdc% zwEVC-2ABPAF#J6x%XWaQwDmz5LPHrrA3|7JGmKpbfbEL*(WolSm@TRUVP7muL~D}` zXQmnWIdsGuF69Q@*H((D&~*hV*1mgX{~T-!Y?coxP=lX#C&vgK%Y!*J@bayDh90DPzJ5RD9~$nFmU;7fI)gTl zKnMm zG;*Q;Q)7E*uUSt83&ObweQ7&IaHU2+*!5b!7i7Fd>};h%-~UGHqtbxP`ISojHQV%s zoWkJeg&vgD3@7EIJ8nNE+F1bQl`WFtBnLtIw z2IN=J%KTqQM5>e2aE zH3b&Ml3H-&JdJ71v8=96mqoW6^u3FLHA6aF@nMMX!zcU4=U<0|n}!6Q1lPY$^K#uR z(j_!ZgwM_651=0!7EvxHc8N&Ee#7H)VmYX2_u9$5IU)B@y~FgKC9{7-3uxnkHK^vo zm=V!q3r(A#>F|NtS^U9b55lou+dh}9bQNuN1yP5U`ArPkbOowle1>gQ_B@6RDCP?b zJ|)6Y3eY@wRT0`}NsmZ|Hd-Sr5y$dR<=(^?O*~Lu;8GTU|HiDIa}n`^wi2WVt_?W& z{1BKu+Gopx4x<`IevPoRRuBKu;T$cy(d&Ury+aFLN(?zCm$t`|4f*Xa{KV(d8T1-( z7!!Ez?{gSjEU7)&{pQ5_L0ZWBX$w}7HI`=l&-sZ$T1+Kt(n|Ao1f_L>odb~L!mu?h zKIE+N_4wp>Bv?J5FbsuzOGyUOU&eVm zbw&W0N#BreJ8o_-USDp+>&qEs$MGdon?jrvgZV|OQ6%icKSLhGmeV+LH3GQ= zW=fuXHv^7AS`C`Cr$~J)d*yhA6G@ECBC)4Iqs^dp6!SCn#|KtK2zgKmflfEwj5UOR zj2oHIQ44vA?b}{`h3fG)wqX5rMbL-Pa<=1u^26BPXEZE38Q0yJ@^xkC6+PX#cKfE8qpwaJ6Ozi;yfHI>Eg$xmC(-}1g`;X)kJ$3Hl z%Md#$j_PP;!d6If$UKqu2${qZAVAW;cn#sK$YReP**?Q8AH{g8me+>y>Cw z9sWEY_BNHQb_d1KB z6%8R+STb_5o_aO`Bs`^eMmaqX^+(oyLSZSJJ4Pi=$vvZ;Sje%pZUzO_+y@elHi3L za1Y2dc$mb`IID%*Tf#=TBrY&%`QE*A95_!zKh+t84#LvJ{dOPH4rd6}S!`nFrraj? zW#wqQ|64I*Vvt)QxO!pM{c|Nm6MiiV`aIG+Y~XHSNv>mM;K_mvG*4jgJt0rga>G?} zXwyaL`-k@0(z?Q`@Jsc^rr+J4i>sO<8JHMXdA67ojGgk8FwusVml>DN)^QCXoFi@&u|J{yn!kU|6TWjvjzW+27%n}!&5uR&%K?9?>fe&k3cuxy-yDt9<~bmG$H+Yt~kJHIHt zw%C)Xm$h{~vmk1fxw_BCzqNavD^$<>eb9ow{1txMjIeil|8`f$)!c}Bj@7RbRW^=?7C$b9mNynJAh@`ZS@K!|zffmL2KaclD51^gD*i`6B$Vp{# z;yP6l^>j~?AM`1#_16;pU9pULLxMz8PoDbo+A5jbKla%+{hd-B=B0Y+w3QgpdcP3VNT zvpJc2zkWCMx=vh1$NhD;Iu~5uSH9w!5u`sqv>ie!Z(ICK*%s8y8$+3y#X(rl6ny@q zLTl@sy`XE{qq(3PWd|HJ9m+fsQGDspXD`Om1pIN~Z(dJnx-r56WrRs^Q?!$74C*eL zc56;opm|NjXdl9uRnuM0{Kv@tnCLB*#*Z;>VP+KRwWzw*nYDd_-)P}*qJYGhjCDUa zS01pZgenh*O_tt0R~w8$1&mqCG*w@Js7 z8!=Y=wuz)nK(E^B;i{g68un~lD81GSc+Afb{ej3R4zzJFnGh$vM6YS>k01X4a%Qdk zeHE#5j<_L8_(fhIYN>iw*HyJBvwC)R_O~L@{vT8|Z1>lXs41i=k-sAKGxQ^zn4ej~ zo&V_-m*|6!T2|Omh98DehOK77vQYvhT&}hM^t6ZW(gV2SbnN460mTn(SZX$anTtaX~0WzlxW@cCNAM%(tO1oFc@4ZVW*%XbslC-@bk8CUULIRoTMtwtxn0 zZfrhXYVzwJ!gERE>N;t@y7K5qc%u+}Q~(cY4ip0FgJ~|0q?9r7SkJXI-J_dEMtG3i zNWy4SKJUJ7v(~ECzdbXcB>(&SxBGCyyx%XPSj#8$qGPDX(xm@LhCGY5_ythgg6LJn z%#`e$fEkv)$asTeXY#XX)*VM|Z<&(NLd!-voMr;^&DuJ>77 z0@LzAhgtdDzz-OYj9F3ai*1XrK1C|5p<&$6L;<1@f&dGg7pQ;(#+kDZbZ%5z)ay)4 z*O!xyr_OsPg0Y3`yCC#*gHA?MYnmFrV`te_sU{;CxNr3(5`Z0{|225|>1wea;E$YG z=1-Z|QVeBA;=5 z)b=x+Ef8!=1u!%0PeZ_J*~LMjn?)}VKP>?DZJysRXR71V_diIE;G;zfZbPB21uHiKj5pL!v(C@u-KZcl6u@ zCt%V-eV!O?6WRi=QELfb*9MqAW}kqH$*S$)uXWgFg3}SWtmGD^rJ}*`ZDMWvPH(j2 zEE~fPl6jT!*1KI;@_om3v#N=m6|pqgBCtk=2dET>mgsZpXKP7rJrKQT#*S50fE)W_ z8yt>zBnb4jz{x!v8yQLGcirk}y|n(FDQvlzz#wG!TgyK%)x6?}EZ2qm=V9k>B-{jf zy_WjkDb4zj#tSh=tR6!pxOQTTq>;vP=SF%=GRLU@4SPlwqaHs=u+Sc`eUl~c8y(e_ zKjbx*6s`IM+h$eaP~qVf1K0OhSg{S2_InRMp$5=>WS1Q98PObn>VG1(##0{rzsCwx zTabD`gYSp26~c{-AX}^|j4G}RyJK=`gj%CuxMAQFmq#Wq`uZqJXZCLo6n++>usbP{ zfJATI?87lm3&_CN=V9iEm(=;P(Yq@DUIxjuIz7i~t_W1;C#x#2cr;yU1`Lv&*Sp}e z9%L$pSghMTM^ZD(Ke-8+jtEpOz3jmhmTo&CY0iMxC&CbQ zl~6sTks8vGoh(#>*}{NgR=H;&UncP0lKIfvzo?c~r`Q~B-TKyeT@%u)+99F22pqI; z|6d0!LcSjZ#CF}%ObvF0Y!AJ!(5YH(aW-*xch~tcKY&Girq|}NR|y!W+#A;{=oS5? zhXo>P%FF!^0s6_kI`qrl_+g)fe;44{0)99s?7X~$ZG<(M?I!fKtFqF&ae_zUNX=rF{ z%x9OO;jaVVOd;$p9wXcmG_UJOxFyJhL@X(C@e}m0DL^>XG`tIBxi(tv2gkMmmdE+e zT3u12%HnbIfN51+{y8HB2o--w0UpzLQ`$?M8uB^e2o>Z<(%qoH%vDSyM-wGVmQO~j z>-1gcY}QJ3WFu3JYjQS*er7?#W@y^S#}dL%8xt=bv>W}E@Yv-!oER7F_6&SJ%2oqN z$6$-FZ4M3&pVn3!G7f__%U?i!%+1YhD>~U3_dZJY4YT@p$OE}L65-Wt@8Cc!81Q!; zak9?wAEAIdku=X>F=jh9Fdp_Z+4P=>WfC*s`TZ6QK66a~1YRsDeGgjCr|!AD#JVTX zxg{vEXrWk<>J835kk-t*Md{6rUO3<_X<1R_K9P}IyYbmtr{wqPjFp>g70?ZERppPhr?sJVZzjzH|rR7vREi!Gsp}Rq)2z3DZu+wV?MT^x&BkI z75Z!)aLp*BocOa%o-ZXMifDl6IlLwg#&j}+V4~Bm`#_lA1;$>Nq6GDr!dW#;;gXe- z5W4QS<|7f(;jlx*ooxTRxxn{lVJ(i$Xaj{yt*5E=sxHSX* zyfaO3?(1Is_`lsx7yvj1$^{*JGCT}PJjzk%4R?taKV+-YnY$=0$R z>xJYT-m>2pmu@0R{om@X^xcUCWbp8ma&Z3_)p+o7QpkNq)N6ztfadxEh97@p*Pj0e5dDR;TSum$S{zhre+vD zE}YU#J-+{YHls^63}*INO5DmFHU5-8of>@K;hLxz!3Uest6~@M(de$*eJ_eC;D~5gL7iRZFk`-f;9#l z^kBVkz)(QcxwFZ9y{psH(^JBvF9b{LwEHYjzrp(Y$Z$vHDu{I3_rprQAPJO-;Q=Vw zPtDFQ{+(|0I_m;XpwE_;V%NV*A4qOUYpzxg?rhLEVK0ZC$D4=+9C~>yNmxFno*0UY zVY=&N5;?46qefk$9);(Wfy}2|c8rujj8@77TICr4Ek>5}YN6k^xJ znV_Xq#lQW|0&|jmZ8Pm5=?7b+PLle2EphQb(Xqg0Jb*b4R;FzfoO#O?6Ca|`THjU# zmG0H>mpMVeK^!KC<@Td>ab1HwmqiSG>JD#M)$N+!*`!&&=C`Ce$}|``=AxFSCK&wEU{u!9#mT>i$Leil{&jv$fl%wmc?}@PY z>Nkj^-?cPSi~D-?55)qRZ-dv_TIycv-@n;d#LVo*kQG4x@^F1}G@uSojfJ&XSr)Aa zJf4t}l5&Y5Ay#sO(a1;h8sknvKT28vcTx`gM21L?8Q!K>MYDZlPZgW3q zM85!T2CaWjU5SUdx~@}wF82ti1jOEP3`&h*>vcCRAi1?3uMQt4`vG6j`Oc>cmEkyQ zIM9PKH8~lwauQ7p;m*_#nEN_(;kUb^+x=J03;6ms#&3cx1?Rz)Q1+?b|2`_W4(F?F zvH(V`?`NNm^(!C~B{aQnV}YZ(+S=Lz zRKCS1ZRbwFCJ;z~V`Sd|)Z&@a_W&`uy+rN%GFyAvN?|2u;M*fXR#St`0SC@B_k)dI zbqScar`4|L(LAk~$AMt?y{B5u@h`0s-%i?T^-5%lb#Ry{EeH*D@IKswbeq2TZI?A< zQG($y{hIj*Lo?w-aGu~lpxOw8z%XPX5^){xHhW)LJ(}|^?wourYe>j;Zt$H=H$7i} zVj8GP^i7~-V?FQk@;^zHgUjlCq>+A!O1(PFKqTEf#w}Q4W?Pm38qz_ zDUs{Hr}xp(&JR`|H4quTLW9J_r}#uvyy#{r`LF0-EJQ+>TLlfu*8t>dh62v|O}^L7 zCoA?pek5sWF}=@hw3#Zn2POk0uaL0tFEg*NP2*WQpL5?Mhc?yIR`>vcSohOE-J^d; z0?un4NBso3(9Qduo ze=#CZsf@2-W1H8l*w`|(x#HAu$+^*U^NaQMdSD97gWeEetHt2>?f|9SdZ}(C@TlCH zQp_~J#hgCT$e(bk^3KKB_wP1dB6Cbfp5&bDiT44pF#uSMh<6c#Jq!MSO4iySQ&duF z)qM#=G3?031w z%U|En&jGsnZO4NHs*nG|3YpgcCv^@EynuT;nXtF6#i(O7J0%l)6I8L#f%BRr8D-oR z0%z{syD9PsZIV*l9IS?AA()(Y*vh zmY@9F(r&+ZbR$_$*JYk6&KpMPqI%}uD%!n)jb-&lDGON9Y0p_?!jAHO8ut+K1vJmd zYKOCu4qshQWX2FssJfzE5+ne@rh}wiDb52kHC9@3GCTBS4v_mCZL8x0^d%-nMzt(~ zlg;pMZuh;Iwa&{<2`(~Ldo>HV`-cY%v#n{(ncB(rrl#xmb-0t9)u17p4setP08%7Q zmXVev))?vx7WQrw^xmJqYZ&J!mv-rU|D?bZjOLoQB4h@X0mT7~N$m~kE`xo-Ti3jf z!o4K8Bp}>?-OdcJE4tfnbiSXO))HtL6LyKP?qkq3$ZRyJCPkVy)pK;e)(H?<)*u%) zag3HX$3NWr48(9k^Ui%;T{=&!r(+1b!>P0T8?3*hZpzHG+P`wPo+l;Jy(hR-iMB(i zrYWKDvohGrCr_$r41}thE<1Z@3c27IkSXX{>ht;NFP9M}JeleuybgB*hE-)7iWPQIu}SFTHx27D1YhGSg$ z9oKP9d>1bT`c4HCcp;w1!RxTzI11yYB*F%SHJoh0nw+t_ppAk=e*Zp z2HI}m%!Q9%YL$~KGS>z?!{q<;bNNPwpU}a_Py4EH^^4(bqTxp8rLpeWT0}K-=1kN5 zn3YraOc={VT!^Ki5Vg3;OGmq(<5x=(W{)8!#F`xx5g|n;IB=OLbiO?wtsEPy=S0!1kv*OEf#Y}1N3t4u)~CZLAzq-o!cFicljB8_ z209fD!1W*zB$7x}yc>XR17f|i)!Uw6DnW;@g?#k%Cpmtn`ki)j0LkN{lUnuIw)~Ds zWb_&zGND$nxAg`5*sWDQp7uJ{IlyA?D&u)KbU%(D$N#j|9|K>W{-t#Kb@!~SSinm@ zOskL=N7mo)TI&$c@zbiI2j=&sfdh#rGLca`+(Y4ds8mOwL2M%Y)&-zKE9uNFVeax7 zzVr_MDmwH}Hf|SUSdX9jlChQP_xbzmqCOL&%lov|I3bGWMqEP{>Ze0#O+dnkr_EXk*gsh1VuiQc@ZFUpEbdpcfcOSniy*Hjtkz@>n1@ z+mToOAcV_PNTd^nfAB}iSGwYrP~5{uv4^Ey51@xNqNe+1!D2Yh-qv=dlVBSpyGU6HMzhBh<17LnGF%dH|LnQzyTiOOgFHiB zAuz}#BvNh_03`n$sJy5ZtCD!ntsV&lQvB^k9Xn-_Hn%aCPxRsKNJN|KgwRVfU@2V^C+;5LTD{CseL}>2OI-QL@#(<8F0W;}5wDAg3!w>tT2i7n2)s)mS-r4IY*(!bd zw7S$_oyujBlbZ`g`rlevS zhgT&o+a1$LaJhCWJ@O#=kT|KP$eaZ18+GGXa7ibtWe^n`sG2kRz73H6I~)oNCp+dB(7wt!9Z@Gg=VkjX-PeIK?~ z$Vy9#`y0mZOg=nqYf1MW`?9}V%)QS&AufM`#$4+^c%yA3h?x>db7-T<;E>yZ;4h&G zVt!#bP#WX_9jY^hkf0cRR*e3uxUEvu)pZiPTQ}-15Wc!*ZQA!u)N!XVWpvi^>XRsh zI#Q{5Ts3RO>K4O%e`2^czD50-c4fb$+8jRgP(}5thVTQCe&PFtnkT!KdJ2Yv7WRA9 zi(x@HM49;mO)HVUNUo>6kqUOIX-_Vtlg(zPeoZ3X7*MR=V(O(B2fqllnn~c6C}KTs z)?oRlt>0unQJuo3Qw_acot}2bFSS@4*^G8FZuI!|4Pcjh`(IIJ?l8}Tb)~@cBtu`H zqke${zUQ^=o<<$J=(z>wBVe&Zz2dJ_!X*Z_rk&L;_qdkL(7*zMu zq}DmPlU2FL)oXcS$5ob=+RCpA3o$HlA{NP7f%obYROwwIqcO28A1>bxg~KB0B`M|I zFp77`z$&cpg`{0JqR7U3!+09;F7vt3IX0bM|HIqI8NTV4A%Jw}G)vh1v#}GWdG>1U zT?EF0uRf?IF5t%dFMSvRbOV85XJ@xiW!PeUdkXG)a&t01y@PGTth%W}z%_ITY_q}! z&$US$!Jq)sr}CBJjRv^Oc5M7OavT|iF%WkTj(hg}jaz*Lj4r;EmyDkwCf*b$Hd=y` zDFrQ8kKIU<$lKbgv1IzxMU?rsQkzvBHk6Jl`O*Fq4D2{2zR2O#H9M-0%<<3r2 zhZFpF_VLQ{A^rrT7Y#d6h%+WW6!|JweSsiG9Rm_#sL!34%6-CJ+Hv=p>`x{eA=Z0& z8V(G9wHT`l>C4?Af;XxlNnVMNXO{$6!ONJq95Q64s^G)OA0G7z7wY5ld$(yRDgJkx z;T5{o%Xe#j+S)1QtgL|IJsk|~h2M&En-6G&&s_OYT*mA78j~Vm_mBwd&f^@bxw$z} z@M4`=|3h}RF`z}43Bz@5GpZLBPX%xH)5XV26K5>N4||pE=2YcoAX}k~1b@?Sur9&> zU9cWJGvt7QA&Q}3csvagmtz3xCG^tHJq1&nhX!QRP?dg3b^n)f+s#Q^f&! zC#&d8os83kfc%e^4IWe+c->}u-C|vsI(dK6Qu!yiUZ^PAPS#JIT*d1LC>;)%+j-X8 zxONa&bsNy4HXSMme^Q{?mAWsy*0A_!4s51%*_I4@AjSY9LKy>q`}k~&Y1`f9@%F^9 z<#g3c&_T#;$3=+x6~E2o@lpdhyOEIpa^tbFFh0f+h(lu`0?NHsT2k^SQ@o^O1!pVN7m2hSC z`T$e7sp9avT97oedWcsCsG_2|UHtUW-Jf1TacDMZ+3{}1$?LQA$~2#OsbgL0kd1{u zJLSt*OGInxQ=zr=F{qH0ZUt$lcQmyvx`&)DW#1EOOj-krwVOU8O)>ccP%Wxd@myj; zT;-Dzdc)GYq=6~<8kYpOYYJ-{7a(K}xE*iay~fw;0kMed)_?vj3Tzxg-sh73{xWXT z(;OLc^Z+R7(N5pc0*)T31wA`piyxQ-(Lj& zqQ>)W3#oim`7~k>P4>qiwd6?F!4fC>`sA>61*a{WUz5tScRoru#P#0lKhyx~np7bB zHhpaZ1YqZU13ix%Kr2R94tu(myzl#F8KSk=b^^~uOiTnkG~_xibrcu3dQSF85r|(+ zYOO!))%%^%@O#%zq}e>7l(CofRr53rx?Gdw>x(2%LRvcf4K znMH+aFw7DL6MkZzpFAXTwS2(F4`kc60D?TDPxpN-cmJ83*v|Ml*BJY6Yy=L44INij z)@=`S8FzTkk7uBvp*f|sS5?K{YaMPm4dr&$*ORY*0ooat>Q)(ep7#WTpH6R;e*Ky$ zRZ~}1HifgJOVf7SM3~*5=v+j5dG&7sHE$(V#S2DnGpkQA@UVc6f*ZOSU8X8CE}W9U zV~SL7uYNFD)7;#Gd?62{hLou@*}Zu}X?F^M5hGELpd7uc;{n_EO_q~4HvqX{baejO zK1cz7rQqd$1Wz?q(#nQgPw9E}=~F~<#4Iv*cfA$^#qpJXfJs4B`I>eBr-9bCn$jNP zqyySy@E^G)I=SZb7#tE8Axpp5;iRsqNrY0R)$)%=p(v%{qs>dJ(@+iNXBKG;PC54u0(Nbl$zO!8KT%`x>C^+0Dz zbm`uBd|KHE-10PiAjLjxe!y_^w79SqBC)e`h+47$z%qbc;wCL!z?)kX$aq6@A}D>N zyd17-k}tzN{7L`i*3Zyk#mmDUP8Rzjjv8y8f57g?cfT9onN-os%l|Td zGq^kaFqiWIys716YwKj|NTqEg=J)6Ls?j5)JjPFUmtEn=IN!qxy-!M@b9^AFVB^~f z^kxk3a?xOhoN{g5O`qEb;4hl~o@qx)Dd+_gOXjmiyA{-`Y~B4$ZYvvGKOYvjxZvDh^a+@icL+ zl81(_{IDgM)pDps_n4rD&u)a}S$Gud{0AR?PueZWcf;-q6iA0maIHSI;2N;{op6~WPbm^i@zJ*WC*84kGN_Cf0WQ46kr za>d=}LAX2ndt^6gz1O{S!d|dV`?L7F?TyC#vUQuJ?kG8i& z_>bSTuyJsBdHD_mQGD$~uP%RSG4t{A&S=hjXK78ma_9dn>Um*lWra4x4T03FOXX8e z0UL03{^SM>{$mmRQ^{WCGNXY}V~|h<1JNsuVz2y^(i?*6SO&R1mT99iD5^xA?)ms8 z46QK)9fu?jMIeRnl}PVNx6WMz&)>Bg=Wd`nqe1~Khsxd7`E%+~iLF)bbEWINd&i$6 z;oe+VN5>|L1J6lLXBoZ)I9xUi6QGnZQn%7C3%&s~ks;@M=KA_Rh82Ls>xycUi;vzA zvADzte}-_dx8)Gm)p193tlCZ-rp&acgVI*qVTeFIZVC=@sw!b;_vPaypXxqoDiksk zdkAL<{6>Q%rff7t`$lgzC+TQptf`%Qp~My5W`p$HL9$k`i~5x?P-E@y?2wRN%aq9j zpbXN4?Qs}{nVgmev{@*?p~g?E&H5$X#dO2hn$n~cM>ct!D{w&fB#4mB7>$hKeT7MyZu0v~v1^rhiOk?B zHC1ifk`cH{fxFB(l!4mT#zx3x1IYH*%BzLXFopg)shdgl_GJNqVJ%B{UINOkDg7@b z?tLiN-Br2P1o9?y^g`J>$a=mq0}5L-A=x3HOxZFx4jH|3fPeien@cV6^a$>_>it8b zq{JFc#@S{Ct9te7JbcSwPyJtF^p1K*XhQ(}ACpl zG#I&m+YPpv%o}XsP%DZ&z$?n-DT1FXfQ_2mNCRa4YiR^npPWYTPec!!;0=G;ftElW zhleZT!E1QJzE=nC6B2$vA9Zo3_!&IWgi7XOA5x^^yBP69$!wwEe3s6JyHSo@YHnj~%02;}`d2eW6$N8(z~Yo%5fc zaNSXDKi!-j-{srw*||?=0pP>!KKN*{+G}oX9d@-9|KQOTC6h`&tp?${-)f@+7knKX zMx$+V!6x|Ufr0GK+~8K9s{?aJG00X(FZ>&1s!xl^Xocxr^C#SY^tFGg&aY;Z%gq{! zYKLKydw?o)E*o=8VOj!Xq#(!;A3r~utoz8(+@I0yg>*7LK(Ia6S8XYYTGnclPcue4 z%;L?I);z?V*t?M?EgcVy*y8%-N5G9!ZEd*DQyiiRgv5Ng*ctIV;=?ktu|;C^OK|pE zO%%6Tf11yyXOjS>YsY5CAN6{qPFQ~?St&`U;PDpYmz=F{JlB81X50kbo?N#Ph-S_Q zFmvWp+_t{TnRMk?U^@xE-xx2(R;Hc*;ZI9jk9|bJgx{-E8P&ve-l39XW#!P$Afj|J z7iQgViAk!bc&W%|Y<}Z{>x)_T>QhX@te=@>HNH0c@}v=S{Uxt`7oVk4gi&K)1i*y* zSs&cAwe|GaDGpI2kO%nBsNOjKo&3S@v#`8k6MKAyW{8xl{JEyKKi|m!YX;cM2l&^4 z@3YV=-kpjRt3l2e0NRQB!~7{IJbAToq0!IxCPUKWz97iGFXryF4K|Jr3@uc?Bp`Fq zoxOZ;VrHi0axm3DP*fB)a9%PrRB6@In3bLiYWf53tW$z_yoZ3#rf1Cxi;AStXIb;r zyJ~Q0p4Sp-kV^xZ7vYxP-m9&Cw>PJJe`sE`ivGm*5_2JK$nI4@%ua_=g*Y@bLO6EM z!nY59Awc(uyiHDOYJ_jo;nKg=v~R*IS95B~MI{1b**)d{OXL1)eHXJ&z><;jK1%ZV zXxAx(Sk0$?G4ekp%pHaLZ^^TXo>h8hTqejO?lJ|XYH9i2!eU(!Xcj)y|6srmMaw0V zUQ3R)eS;POK`Z3Ew$R|l6sDv^xP;ranyQ29>58}4s^4tfV)E9`hfjH`6~t-3Xdm3e zRkA2vA1y{F?;;-bs*5gfU3mi^ec@2xjQUjGR@-n!&=_v13MJtG&^DBjj|v`K*0EpNG|k@h)qZwQK}d!nfK+31%A zF2pdB>fiP&4Z*SOOPokAm?~{Rr4bJ^cCi4v9!mYPSih0oPbQVnF|Vw;G!&{29ICq3 zf2*;w4qFOOxX2zVa6a99xbx8^_UoJQk0zmE39Mf1*SDHxvP6%J{zklz4Y-IWpMJ~C z7AL4_s2r+*XCjMxr?Eu1wI1^EvXCNOq%4#45!?P!QjRrS9;_D8PH+m0*2tXX$^9;T zGa4G2_01$xhEpE?r#H^T+nND#1tkT@uQw;p4riSgYWBCzNa@R+FAK&I<$xgT>qeKd z{r*1d!W^##6bQhRke)ls2VwSsMH*m{4Om5h9Ko)HE!7!fgzrd(l<#Q9^5Ke~*J9oA zX787y#e8S8Q^`YT%MzGc`cx{`ecl8U76ypiT6==>rk%@gkq8dp2C8^^&RkLpeT>&$ zGb$}A5_jF&Ykz<*&r0{|(ekd8DG10L*Zb%g6Eb*AFYQjn{QY@?BsBEi_rKo(lTM&= zpImAmSPw#nbb9ClPqG;DPEcl3F@Kx&?h+_9N)z*acr2R-OJ67U|Bb}oX{KYEm)7Tw zc<|+YoKJ#Z+M4RX$iOu_tMJsUuAbh8A74GGvm^o?{(KEpXzSCCp=`$)gjB#*vD@Xm zz2Ol6T0Jbf>UtNKJKy4Z`OzlkgH<9Gd_%(9Kk7U&Ax3Z~Pe40QLjt-1fd9R-C5A$_ zm+AnNqDOy^DK`BU-*Nma0@1r(TYR*hDaA4CB4_aV!DYNbp%av82FB%!{;87lp!DbKfh0wf>iwdZ^Zmn>O{9Y8LzGj zz5a$UTf2vx0#5mM!%+e_ndeyjES?q|UQ+wzJUsqc@)yqA@-Nm&Ex${oXSpyy@Q-Q2 z3)+KByyB5Iel+XJw}BBxjGqULHi zQ&J<<9k}-7{ibhk4><4|Y!C6F^5aGijf`A-L$0o#=_V$Qf9-n2GScXRdn)-2!b&9_ zh^yS&I@%X{tzWv->`k!2X6fDQce5;NJ;qr780KPs&142Sn#>;s&WG!x`HS|bm#1Hr zge}m>6;ul#ZX#qqP5@2zX@l;#pVI@> zHAd7~9+mRU7HQAmANB-s?keCn%EBQd#%~hB)Gu#jU)02}|Qr7sz?}Yw|x}fAW60_{;n@Z4Ws(C5TP`GTj9z88k-g-L_ zbVa)c&JcE)@F$iOb44oEt70`=_AzO{lEnRP-BYpvF9Hxi}z9f)_#7i9M3T`H8nLeb+XcAceUtHK?9UOQ2Q{_5n3*v+?_hV^*Nf`8d9t3 z<~>BdkG$o^#y-=(BRZb_wI+BNd|u^d5cj}rV6a~ufeP5L!gSu^jLzDs-q}wJ4oNjj zxxBM_lU-N2j|*0QiV-Dx`Ij9 z^fZ(ZB5y>1p**-F3mL!q3B5`!ZE3!FX8I3Nh+KQEB2w!C)ESz!Sx6np2UIs%?N10; zIh|Wb1#i`=))H4T8sg`J)7ET~w=>kDiby_$vUVz-=xWCOREB>BXj zn2fCDgn0O#s9=wIK?%{Vdfj|;o8Ym&4F8_O)N>cvaT*r8S7Kam5{v4n53?836X;z( z&fn6wbVXT$_cR|oWj^S#$&1GD&7gguyqlBs!;A6W?Sf+4o zJ>wRr0=H)D+!FY3P&SCD{pNGFz+xyVhh7`z8nNE_f=cnyb2NGNyy|?WPA@|J;ln`T z_sU6)Vi@nvGh+Kd-a$TrIQfS$H0GG{cl!mnz)HpPf%z|5G;F1707nN1oq78}kEB1? zUdnty5WB=Kq`+98OHE-f8%Zk^i21(HP63j+nVOoKfA#MbNa{3eS9M-KA<|_}!xCKzMVC&NaY3SY834H?X0k`)*;|gP%7ZKWfxLG1t4g2|*J88H%cknw;>%k5Gyb5Tzd} zTkMfIEgdqbK2G%bZE1%BS~gBoxnc4ci9*8U@T7PZ`s1g^Ml%4Mj!PMrDeeWRc4 zOSq?WbOmrJX=hu7M!xajX!OkV>>UPrk9Ly}anDsM1a$V&A7Hha5NH1@^QJUIFPAMh zJ%0}!S!w_Tc*uB7=>|Zw`WUi)R>b%!eIMWQWqi)lPr}koo+r1}7RZ7Qjb~R^QCANQzHTVz3 zFvJCYB9C3$$&VIU&E)F2Z}1iU5vfd{iDc@_;rd^y=Z$_D zf6CcfL$(hR|03?bjsDo`cIU+aI?MUGd)>0!|ysJL>Cnbui5m_H-QciuKAE z@>1gSl!0}>taerHe3%ZEez{5e2k6fP6Zud$w7z(A4SKq3r(+h)E;0MpvbMEitbB)I zYCP*qtL=R}iMV5~O=fV_!1lSY2|0yAUB;%O)l*p#LQuvh)Z@p$g*&Wk%$E+*Ab}u4Ae^Fx{u$P{ z*~}sSYG8WM_vYv=1Q}mdrTD=L*cnulxMgmwApS{laqqKxgfJw6d87n)ToOT<^pKJcBwYBjzdKV7I9W9}NXxcy9KAS<2 z>_Sx(<}?KmCwg`jgQC;3i+yAOyYvlMxuO5SOwu3z z`dxTx%gQ=9ymn%cY=E7f089kC#_xdWKJyBh(>7pn38&zBL^jylJv!9?_FqY9={x{Tbi(PJzBr_dILzz}Uq-~l ze7~fOaLSzej*9;kCwbc7ov)GZqjSBtGki#OY&DS+%Aydlwl2yD-gZk&62CdUuAkSj zt#%rDzd1DjnPqUY&*MeR#Lr4ePq=1Q9lMmNjfPIGaG|3f%s6fJQ2P*(z}gvBJ2wqq z=V4YJl4fAKcu0cD&Cds23<=qD7Ve2X{MInxl7-tub9{bvOE4oqa6k5W7lVxXiMK^0 zPFhk<7ADAYN#SvOuXhx?Uv4Gv(G%b0hEOk$F?m3gl+hn9#D55;julG#wP>TshO`Sz@)O|~$06ay!GXZLK?K}$D`qgZ+*($IX z#m8|g-DfM2Yu=ZFk=+RzOHa4`35uTF2mTx$`DD?HAQ z;QJ#p9!BZMnA-vn)kpAZg~wo1FfqetXNT9k8P_w(ZIZx{4weQTP*C$eAPBF zy>wA=A!?cr_SR*ht3RGyTcOUZyS`w3lvfggl>85aX-%q|35Nrk!EG+rWmZ;pBkoX| zM0QRACN{R(!otF`toF_8jr$=(N)^zZp?TfnSuzgI?fK&Q!0aNJ*m1b%YryVPS6dfF zBM=A4j7D<|C7f4kb1Hm$we8z>=v**A-enjVMyuXZ*j7n8H~ti>Bas)L9W( zo~=-3((u$jZ;7+T?Fjh<5|NUa7#~8PCv$}lFKyTyy9eujkT{Uv4LKLU^ z?q=U1^s`kJ74pRU{}i2N8_v(pgb@bJ6(pQ8aWinJ|GE@~UDN|1`uq0wsfMY|&f1T+ zgTrtt7(At(WZZjj;m%m{?SnqW;{mZiT(6(vF)E~LHr(qN57hP&RhIMl#im%=xZnAv zH+j&gyz;-pH)!+m0rmU-+d{qm5H#_U6v%%Vp9^kJr+^_xbr@(?o=zeJs0iaZG`YCA z#||!)L}I@4xu+!F4#4yKlV9Z^@Rj6#;X)QZu}OYIFp6_#$2%L!Q+Lq%*p#gzHZD|? z)qjaGv57>Q?LNAH?=2|xsW!qk>l@`Q3-t}qa>#$l(DP$(Xass(JIgq4Eg0+%ifIF2 z+fh*4H)OnjzUs&k1O^oTybxb`Z!<&4GIbJoph9B)58aF+Dr0)k+}Dc^7+iKYsPtljTWIZa8IcByIBdb;B;cf_sCZZ7Gi_#jm7?>iJc5S4SMdt$sIn6R)Mh4+$X*tLb3h|{3sO?MERN! z!`;S8tg8Z{okGhHZ@&n9Xn#0sHD}!n(oj*$X&j$CbpB0tl&X1F&U;WV`y9R~>fGFB z)mwWwtG3hC9Ztyuu9K7yO1rux6p(%rn#86`!Q$^G?=8Q7Yz(wN&kLr5tmOj20ZA~*F4IbbiaJJkHFMFCE)l1yhOMguiQx;&hNO-^S zoR^3)`4o=+3LIn{?Q>c>oY7oTam7~3Xq0O0H_n*Q#*4s2UPOrY5 zE;UqpEM80bdaXA3Qu-xnZSeX*_bJVM{Z5*_Q>m$q(xb>#nS(C>+%w=x7t;fsPh0c zS|*xUiqAgA#c1&Bnmo?~|IT(jmJitLAe;(%D=15;yGSUyJ6PsBaY~-n-G?Wn&wfm; z*5S^)5$g}`zq$&RM!-$(OWArm9%^E~j`iYXcEAEwH+u1~} zHatVpuhDv@n&TpP*UsA7{*`rM%kc0>HXK>RP=qm4Z~rv8v0K~U|0%1TRV$4;36n`` zxzze;Url)?FCSH7q+UF{IF)n$SBHzGEmdp`ZV2ib1mj6P^9dZhlFbu>Kl^#h-Ac=zyqdf~73iT%i-k9zU{X@T|Itae9Ww<|Z$+ex^&Fk$&@wD<-Ha*>9+T!tCd z+KTvmI=J-NFU-bWmlhP=ZZhBuTo2rh)BMi2`oWk5a0E9E^>4XAtwP*6JOae-Z@*t< zqjZxeO2v;}%UJg1=YDp3z5br8s4?1EHU(Z$J8w-R@_EalycJvO3_IM`e?z(U;9)66 z=|IAnvYJ5_`(s~U+DGQiJ{a+ZdZe%chQPE@lKy};3=n9_O2#xWa*zJVDt#&)`wu_c zh(Din_RqtjpHH!Jy-I7Ev)>$lN^OwBKBq&aSneD$qh+A{urxRMq%{qd|Mq!e0)i z68W0HkNbUg_^e3>3ewzO;^io!ReHWI<~HDVlF-S1-Tu3Ct0 zj`h$iZu*Jx!Ed_6_ALkJD-jXYat3k&)Ptb}1I88JOV17W4;#c6WSorQbFVQv8`U8! zB#i6r!8Egb?{%;ndLq_(q-y`}RBLRR=jkZoSt{@Dqsn1cB0Z~Zs---!EDSSB*a zwtb2&_=fkHl_^2Ptz7`B1pAiTe2Z?NtwtzElP3w8Lu4U<*|Q`!#%Y#a&e@tf4L$<5m9cKqItIUhy-j2@y6ibgy{C}*#+ z^u5?UlPM$d@cgcU&Y#V3B396@SSayHr=JG-k1O5qFn{~+zCBL?lysn z;SjZy54U*hUxp<&hNbeN;tq)?%NvP#fvUAsnGz$Y&@;7~dGF8u{m#y3BBH35R9f*q z++1gGSYP@C8IqEdDapvnjA{ize8ga8qK#cjPL(TFfw@ zOa$0}IJEDEL8xu-duAe$TJkPadb5u6=O;H<6dZ@_^-^(8{uAppQ!EbuUt^c%;kuPDjeesZ!kN3AA_C_b4m`<;(_#Ew3h9~o(n*aR>VRCyX z&VF(x(-T$v^ByYn0CyiV2Ez zEcn!SXop^Jtn?m5%P@qs-8JFFUC?s%i-9Z87><@FS7v(3hGV0Ju_SRWoiJ90!J#1_ z!lNIDJn_Qbmg5G6CgJS}=^vs*{C~iKka-SG=;vCI7Zt89&tKfR(kK;F9SVKw-jy>= z1Ro`|uAh1~($XBz($F~0u)}A=Yq+u!8JvLE%G!Mgs78eU?4jCxUnF?NBQ2!#jgT$@ z$qx=*f2(n++O8<*^%atYl(moQcn%^*hx$}f!eUHnN?WcLYK!eg5=@$W$Wx!Os$P{s z5=K6v36$Ko!TxMmq~FS~g98kMpZnfe?DcgN0Eap))Vz4maCjx|vbdqq+0EdtX4q`q z|GS|&HtBeyTNVH2)Yl#T_o8|dYR&M5rY1aNHj=u$14$_?zk&K``igry+^AS9KficV zC}y}*-*8_(n2IkldDu_A5JuG1N_Ft}e_LW%YhmTR(Y8Ggx%2`{KIw2l|5QmqZ1=pp zaCYJD?jhm~#&{iRjOlNB;#26CNNs8$-GP=PA%t4&u?Rk@6!{eVZy>e3WR#QfI9^G% zo{2%Ox0v)yo2M;4| z1nS>&0jldCe`2DpXT)~k+2`>&Ztf^j-%fb`KybfJy0sn`IyT*b5xM58*wnIleY_Y9 z)WCh)TT2}L7FJ?p9U1X$*O2WjBUN73NAvePkr>6nWAINnpWO^Zhq8}*f z@LSpwD0opN5vBzBP;5K&y8)FryiLBn7g6ndir+^kWi?Y>Q2o%Qv>wgy7+X>ht_Df^ zLRE#df0HI~;;E;1oueG@33NVgY=tiT61S$!`*5mXUtbTG^0gg4n5Np-3Kwq)dGw-^ zFId+^z~roV+jHLWP4ZxF7GGd>;h<;R#%|0u@r9S(0>7&AwniWFt?+g=2b1}$UxLp~ zz8UuK2*-cjIcbM-B5zFEp8268T%ZFl(t_6X5HE83*EriU^gy!*m;FgwIjjW8P?}%E zfIOA4`x%?Gn`8o#^L|Qg!**Y6XJ4AWscuHH=n?Q{fg9a9cQvgK>S;=ShEgi~ro8Ge zvD3xL#C|m}wf)j=bzNn%WY0_M&7a-3TRMerSxzwe$-m0_N3Qms74;Z_Wm^`4qdOCK z9i|+pXxW6cD@crejB)re>gqGs*KgcEj`a6;Pd;lOU~d>i>$E85{AK|)a#T#Q-(~_8C zGzI@R_q6%`Z|Z4%ucEFgdn#WupsS-JEL#8A-)h_e>&^o2igA6gkEM8af%OcK2fy!rK_C98mQ;8k`zl?oaI9oyU+&jtYKSH3z) zX%a_Qv#mfm1Ui540ib%slQ{)A4R-+%>R4&>QI!|wAt~rf>;G7@9(OuoekvXP!Sr= z&x;RqC@g6qN%7u09}>F^zzot(V$=mb0*Iv8R%dQV7}ZQ6L41d1kjg)0a;WQxCDt0H zioWNMoD?B&cnW(2f_;e8)X*5|>l^#*p{`!X{@TwufKy?Embm^SQ!$dS{@IS^E#K-Z zE>?^4)u^bb!DPPErCM66Z8mnpn7fU{VLm%MJC;v!RoLGtpE4wTPd4NU#zXHF_D8{` z4bAj71yZgqlBw9$K8(lkjJM+_Z<{({i7AoJbBa}fjmfL1;aBX=P@ejE$Q`p>vxaN-v; z{0HM^``CI##dOGed`416d|I*4-Z-YZA(#5)%-sM(R%1zB^B+X;xMU47v-I9ep3!uP zyF+jrCL4FU8XNs5FOTTuvp0@Qm!-~rcR;JfLPDW7Pd~*$3++erOAX3{Oy8T67QbDM zKWz4sJ(0zFZ85R2{U6^DzrtQVfD2^zmiW5(DcCCbeK}t53@$fq8~L>80XYnYi096p z2|>5BIb1C*H-LB`prX4R+bN23xjGQ>_V%XXA%9mZA_C74*8;Epdm5m$D7u8S5>~z3 zeh;@v*Naa~3_K-m;$+yIZEb#(xi`8OVCdM3PlmGQ*EulQqrQKpxNi47zH2zoDJ)N;ptQnzXN!W51*i|CNrz?rBg(1d%jF_(L9lB};RMx;NSNuDi<6m5{lMhb;7& z=K4|hAY$}!;)3+|*-@gU0X10eve#vuDI~h6zKolKqjAN%>vRx|o^1q3DSHEimTPIf zV5pXgLo&LlI%xp4yx{@~HO9HO&HbMJC$4J0oxVA>iU$Tgv)*Q|CLI2A1n!7>|FSN| zF)SCIrk7Ds-V>KIIC7TFS2}uHT6A4kx8`E}yR=L59=Pr3@J7_|%dznN1};9(sbVap1FmackX~Vlx#vnlr5q(}H-vrS+O0%d#%%!;A?CvBJu_S`P#ZW{p6~UvE^o#I z)ok&J*^{4(xwyUz57RTm%dsEwz#5Y^9ZBS}fri||KK%Pjts$~D+cu{y^$*e$U>Aq= zqozo@7~T}z5*RnUipGfIpvS*zQ4O7!$R3qn@3-5e$tS=%Q1p23?nuVfw`RAUA+wu} z@B;q>kH&(z*#vX5I>-H=4++NlqL_02mkHJwC&K~MHR{)^Yf#%;IGXy|N^@O-V z&X}Gn9C8?jUeIq9^!O~$<15$c(7zui;pODpd;(O}6XlaqTaDSxXU^K~?qseVdZ8np z;!@XBP&xdid&FwrmC#9i&8Nau6o~ur`rTWW29?gui=uJ2oiF5c&Hlu8z?C+l9h83< z>SVJ7ff~uI?RNLBd}v#H+xzY{Cn^-;By+Ky1mjEwAUVwLUZvGuyw>U*ziU_Dv$Qu9 znrTsv=5nS2FW$tq_a=PG5QZN84vqgvN& zI*3O$-uld83j6CRe3+eut`f=Us7mleucXHtf+`Y+1i}k*ckJ^*2 z!P^_*-_lBRE3?KA&&JN&q0Xqu7RW;JoYy~eu!ASC0A@&@m4lG8KzHpbF`cA=wlO#b zjF?Gth63qL*bd58evgT*t{l0`Cceqq|_8jBmKM2 z;tY;d(H6EOJ88_Uc%JSGXj=TvyPgnkDBj}zeiy)9mO}#MdU$h7XAXL+#M$%=Q3IgM zY%3=Hw8Ws5nTe?qkeK?nFaX*k`IXl7C=lQ;t=rMtx*em9n5UkniB*$+m)?uG7f6P6 z?__ughbFg?r5m7>s0j?x1ThM_5g#oo(!08`$){>~wkjC)Yx|$9VjYC7NcIc-#1r~M z93c@~>k|!rON61x3_~1AoU3b9jd*%Xry*E-)*_!Cl9F()%Gvf|q{3ANXfic(-KjQ} z@YK4a=V&Nz09oGe;~;_QtVyFG(n@(8G<%8 zZvMn6a9N|)!F^sH9>2R|FmA97J(yH_3b4D2*1~|47}U>`W z*-}(amoRJo0F(1AWMr_J%A%4h?o8+eRXFpBP+=4CbKPOK46}06dNT{dfS(eC6VXe4 z!z_42_X<77UXHeIaGQBvnLw|e!P15oeg=TJbbS;W*}6Nb<~JzAeN2<1{o>2JM$PfQ zA2DufB9;ToAb3gz!GZ+_=ndZI;;0THRz1#D|L4#D;#tt2A}hlFd+|i{55f*HUr!7D zHPjOkQDPn5y?dpjtDlwsc>F&gk)d0Q_I$f(a2r^?X6{Z;fiLpA{nIxn>Z05cDgpw5 z{o7MRIb022Hr!UXb!N5txxMf9&sETk($oG@eIoU3?ZBhRJ5I$v51V=IFflP*xc}MR z*r^spL#t~RO#;Vv0$=)7E;yRO`9z*s$>%zFb9nX8NyoqCse71+eTse13;&=ykX$xE zNuiF~BnFe?5%RXP__tlY3|msdgPS}3J8U_(RhC)cX?Rk|TN;kJjCcN%bOuF+(lWtn(tEeZCE7ixzR1 zjbIR!W@FP0zt{VS5w2mA@72#xGr7Xk(&Vw2L_o>A#)b&9dCgyfKLO5^Ak0@JI}V>^ z`n0J~76fp|zoq?dxB4~RE`kk7?5W&;ZDk7bqnmnzd4)r^vVTm+B?!CC3|TaE=22(@ zO1aWtB8J}r4ho;2`WTp#$Xf-^8c(m69Dlv{+u}(NB!2wg1nCV6RxS{vuIJ!j{Q4x{ z{M)^iG51bbiI$xqn-dVf5-lG!)<2f^6)&yyk#U{yNXA(izZS2ell*E9Q0v~_4Vpcomg&OX z+Gu@;sZiyE8h6l`r$mc~h_r7o1xs-+F^m4yR|q=fh|nUii1i^OxKJu(Lh`j$Li>YwA_Z?(uqCn6zc>uFqZm%Iz&3 zGq1~^F*?}tS-vkSqFqjuy&Qz5OE_Pjzw)?JvR6Ou_|~vME-eke!D8_DGMYCrFK4^t&#OH(^r8&4rz1#vlfOUDW9!^PA9mCFOd(vW{TMO z^Muy7Vb}7y-_CRTU+ZzVc^@hmdZU1P^<61Z=cRx%qh_vkZMluzwat99e7;v)-%#7b zRDIjkqa)KZQ+aEhQe1S8$7qrd4Rj|_Mh^Hs0(ZKhk4#tP6dEN@wvRuZ3P(i|i#^OMQ%*<4&sj3Op#tavdX%_v~@jq&g?}HY8x}-NrNwfmRK_FMUs^sGxqEb*INHd;+3mRl9 zT@~I0kxr&n=J8;k>X)Zn`??psVE)D9xD|5;Fma;3*N!VCL*r~A7Ej>i4Y^lGsd205 z>w3V0<5(-=P7l!bqo?>QW)J*vId}m_ZYrf zRSYOzf2Q&o`db+&FV7$OpJuL;Yg4q|8+xvCkH!``oy4N<{VH)O-g20>g;S8$>@1R$ z2zL+*r~2v&WbFe1d@rSJ)jnF16sUP_(f4J;$sXVr`vv+ddGYX|j!B>$yd=C6u81BS zRS5C7(R(ZH!h~OJ37&Y_7p{%=6(ZvCUs2<8`nb50VF|a9NwKkSy(bdF2A)D(6Z&Wj zL%0Q=ujafDj7rQgR3pHKQ*02+JNm4!8nzS$`?HeOkFJ?jX}VI2fk6TMQy^!P}o za6?c;!P@CnmDN@IM@HCREGI>~zoWY? z&k-&x-(v{)9-(;DgFoKN^lNIzpB^sM4#Qo+F#pVjf$R|bSo3h!%SeF9;V_Ej zXR4?+KT}=kgPkGN0=67R?6#~FxsQcqOJRz^oBqV0IUq$D zjGYE+d9+nS@&|Q&c4z92Prm>Th84`+Crb@gO>nE@{A}xW?JmWTW&-{|w#2UXw+;VQ z7$B?zqjzCujqU=ROcwK1Hhir}OAU&H%%S&7Y8$s&)qIU}l$vREPMF5S*>XTPjovs0 zO9@%^0JOS*yFVUL(t10`*B>&k8S36JE8-#h#SSiS%iq-beKb6EXIT^^CWT&xRX3UF zry2F;vJQ`GjGzBUrWQTd$-vpMYsbuig3x;-O_o?^CF`yjKA*i^8BAW;=R-$Sz7RTC z`Tj&r2T8qo6}&Q^+)ZXNs1Y8sn5@eg0zyV}Zk^l2np81^@{p;?$v4ES=sOrP*f}RB z@8Ff;d}b+}-_uP{g^p}cgTS7_Eg;LNm4yzNZ*c3xu(>9$a+z`Z3hd2@)W!W zfNc2mff%~-z@ktkdpZK{Xo5ul71+!uFKPXXy*QjLJ6=Lb2i^85jZW=r!J|#kgkXp^ zZN#q#?%MeXRV2;lmN#iDyBAhNpWc2T)`bF~DiB#QTA`faY4DZG`#U34m5%a%m$DiY zMf{*0G;;u2zW^8VP8(wpDdbaBFKVxKi}1%P)=XHcJpak>Ik9%H38HrlN@c_qxKZz? zIJSgx{Kfl|{QzTo&wbS1^M2xbY#3zT(sZF-5yHQh`nJ7`r9$}h0n8@>^bQ(i+*;mg zg=t>!shgPG=&#r-u)$njz;QraKyK$c zB1^A*tCOQLYV<<$x7ZoLX-K;@=9IQfI|^$465bC7`&exTsiOdJ!@4E2Fdp~FeUs>Q zwZ(tf!;8X!L3+#vWt*7$*5jb_6alv#W9QblE*)}Z@A56F^q+7_`$anM>D(Q><^#97 z+XINKKCkIQm5r)QJEEp0BBXot>l#Bpa#a;$aj6%*>*U}YJQ+!RJ)XK+eje&JjkOIv zlqvQzv#m<{+-I?CN4UYly!(Aq7L1BM9H8gpEnDO35D8av0YvW+?tw4X!H(46TOr~P zNIu`q{{~j?_0%(BziNb%7>5!w^M`b=UGlYSjqJ6> z;9HTw&}Y38UMH76Et?#g*bQ3nZwarcd&%xvsqlx~{0%XcZN8RdE06m=LyYnTS1Fo| zR2a)COW%3hc3~Ga#QT-bt_ru*65cJ@8t}8{h#ydcEuq?u0^r1Y&Uk2X(9v3xTI8~P zhF>c4C!9=z#6+Ma_n}HPeEN>u+o4a61TNCqRPEw{TTJziu z{v~b*75LT7wU(vNs8{n^bn!#KKiL$Ik&%%A_X;r#>AZ^U5hZ#lxp&(-Yj{dbRAeT3S#brxB|ATA$aXnV;!LZZ*r)A5w;9b@h|YUNrfQ zu6T>j5Z-cxT@5Eig^2T91#s-E!QTvj8nY^KjaasGcJS@^n^RXKAbzX*?<%4#hl5AN z-u^%*Vj=&mz7FZA&P80+-yM&YxgjA%T0Lg2UsS*H2F2(sl$*n$bvQi3r1G8szs)9e z+yI!YWvcb5N%j=9BhEa=FjdQ5K}HeVPS&ZJ$E0H|F?Vl53!?0%^BM_-ieoH;wetgbjI_5>-~Y;$PR0SlEWaO_=s`T|AqLX&yrelEjdlzLHg z0zZT7^9mhs&)#DD#$B$fM*-}_*w8RFHT6f-#04d{QjU1RV|v2JM#*P3#*e}@+qNJ4 zYjE4)HmWM1(bk=gdMS~omKv89&Xm*8w|A%Se)fW&Fa_jOyYOeW>W$4xHpyt|s}En@ zxY8BkGiRBv`r@}$`%ucZxuK?Ewtm%oJvV<%eHKrzhzAFGxM?ijClNEfevg%JoSf3c zJaPW5;x>=_%PkLkWdD03yXQ_#4PE-|qWm31_lN-Ruj$(haxCez4bE=Ny(f5%Y>$nR zF1z>^)E%2?-u3Enjc=UhZr`jvlG+$8XZJ9;b9`kb%B!GYlvYha;lDSeL^*T%LDn%B z40PXg%+5v_pkBaN@9GM8TfNKZV1flasveua%`ZY`7|>49o9MTv4Vu&R^&k#n)5I$l zg<=6)!b5Q(ua)M+V!h>-o6M>zx=@LjeW#s>eIp)UqK$Dbr_Ja$Y|r)+wQTenj#dEo zXK$&V%T2^9tPB&V6}4*V(4uYhxxO9{MMY2vbi}1}Nnh!2EPe=e{un7=)ZJwQdHfkn z?(*j8)$8#RZYi_>YSwOPOijQ+f@mujqUR!xmNAUWb|L&tT;4HZt)V&zO>J)HJE zH5QB{`@T~^3_!y|x^z8dX@5y*gyfH*AG7>)|yY5V9jO#c~BqwVPgs9_IJYVV%K@Drj-!{iYYZ{{(foVH5CT~v+POs- z1ypU{@gJE*qfbetL&cAkRNq%AuO0v?)Z`J4J=kLH;UH$W`>G{$W>6wL259wc85pyU zL)8}@3;>lWFw7xX)Z!ggSrsDRU>3xMmABPH#5M;SFdQHi8e*(bcp_&X908+1AKp6Y zBQ$;@pmVQ!EwI3UKuC_wB>L_GNXI2z&N}3C9{cWZtCRMqf9TIv@3O{3mgFSxwdXuD zMC%)-{irP4#)OK>bI*6^SVez5ygcx1R?D!qTA&)ji%9 zfJ#ns$e&=Zy9$Cj*VOb|m@^1wG9!YZ&kAB$#+{TjWeHP}JPab76g(5JX|JHctNPdw zh2zeG@uxV$Oj|tj>2$LTTzmE%V3~Ox@!n9_(eIlSocXgIueII1xGOEUI?= z-~kL9=7l?M!LC)VReu885E53925pG=YG4rO@g8JspF;*?T)DA>e#8NdGQDfhy;;84 z?pF9dHL^J$YaJwh*4NvPL^7o1a?lzkK!(0=1seklf!)C5(ITm|(klqyjDTa%yCCd% zG{7m(E=`cg{mPui4)k6L^yeH1fm~dvP~{4?uL)ECA)}MT%3dyWnPi-6;E4=du%zAY zfyER{oxV8Behvo%0}xeKTCGv`{DSZCK`j__ppUz_TkYMoul4XiA_Yld*KNdRwD6;C@5@z^e-|}bmbLqMwuwpSJL$`5Fz~DfMVR= zhKn6;vu0K%fx;s#>UBfYPIBA-NIWY`KvSD%t>H+uCZ8F&pw8bG8_(WIiaT#44Mc&c6r&5jqu58w9N_it(s%}qFClr;sedfUE! zc0LNX;{Q4f=xbk`(a_Sahcb0>+`p|>4S2yIFa3hkT#3SMUelZ9?dR{pGR0Y8qhCF5 zpT08@|62Ir{|=_;z4Ks1GKzHk_QA!=lb0WuQ~uSgq#=i52&!Sv?m+=>;n7^{W-ti7 z-gJsBthuCbjnqc$LL$y?mHSZ9^oNR3^Z*`PZ@jqhl;G)`wr20?gK2ispou4*nl6US zp$H=GpTv(VaX!XICcRO&Wso3(q6-D8L(^HfHQm2$SVcmV zR8n9_3(_SLlP&@25|Hk07)(GqMt4YqfON;CyQI52M-R5~+jAW6`!8(Y`rP+*ohQ1X zYhi9)-_UT1mQ*ZW9~ly;Eg46g-Tjj3gDe{#GF&aI!D+HGIDV+&nlmQzth3=r{5+I(eu|op79T({c$Y_ z-otfJIY3706XECEBU?68R8+*2{`zly%YDmivQ{!(eIw#PRZLq&Eb5~)&_tp`rjoyq z(Q5SWCIS)prW^N?ze3k`fN$eRz!79wWl!wkm3!+_p=YY(2Jyc5QKMc3_-(I4vCEA_|FAf47iqm`7T=_5O?3OP9pTBg6afAvuF+Jv|XK1CL?BWmnunhySK z5!j_Jm=`DB(kmDmILtkT@U7Ai(dGq9J-w!?pup`J9S#aTTp zHYqi+&SvJfE^m%B{@=HP4#x}at+_PFCps>GPh2s>vUoDIU*sjbq`}wpW;#VxKjp*6 zUtvn*&D}_2BN~#m+Jrl&Y|)?Mfs91OE|hUxUsTX@+H_!hKlT$jt5;ojqy#sb*o~F( zU70I((MV$3nzRCX392=g7g(&p9|kt{mf5SiR=d9LVaz@i&wEMU=gD ztZ0$(ghVw%D`@gs%dD&f(B)qk#-Nj+)eAwZ${NINYGZx@p3_ zXg&1+MrX5h1(gGCGskr{ze~=fN7aS=HPp>5I>#~5O(XP{^mA&maw9LlkoR>uzhfJ$ zmty?OFdBk(=tY^idhf`Ek_%WrIro@uXfDUU%XrsoHz3dVYm#cP#+q30Um?otrpe>_ zzJuU)rNeb8KC#ZF_hp$@g}kC-(pZH1Bc{W+2=CTTieZcI8OOz*!&-~|?1=8=9Tvf&_sohkn7Ymef$LTyM^jelo?OGngy_`7*!^ob`RO=}lI zPMN?@^+mLkb!s`PDHhfqzAy)dgR2uXAD(A>72kNfKIm_7y8W`W>tM`pzAXQVsd? z8(AEw_Z`(=`&eIO#?<}p5p>ZISH!|LeoYLbt?1}Lt=Q|2C1%Q)O2Fzi=L~(#x5EtH z=al?E3m`5xemwD51-@_H@JT@#4oKXT;m6Fs8Xujqu=uC+(gEuZEovBO?6}`SPm5Mt zAJ@^W{cPlMxl)E9Pul3a&f>NE*AQ$i=*%A3$En(Oy)0WbvKZ9sdrt9k`b*{eCB>JO~F z4WB`g=zF$As)10I)Lqi9=11!G>@x~SLiwW;(fbG-kQ&cFM{-msd(Gh#MA-z12bYlPyS>i&Ey2OT@fjE{Qy z8XW}G(_f6m4-WbBI+^THBpL_{1?EO%bm5gwuG)+!C}hMzIB2M6?8S<)dx`JgzrAFq zsJ+CaxVmtqMaUXb*qTlWLw)!D20$id5Msid%lRCz$CNIi|XzVs7u@hbQ?) z0?T*pj;)%%Swh#g8%$|&paPRtG->fXjB}Y;`^AQHD$xY{bLUm%c55ht@yz#~sV(DU zz8)(f?!m#BS8}XJk`Z#?0y-s(9_G4>(HFa9T7N|RH@8uK52wrRmm8sg7-~T=X0}L& zj7Nw)l2Ig=ahlQp1`ANEeO*<*bt$8-DO^(@py~EU_Qck`#X%?IGU1Dmg=vi;b4Hv& zA;Cp++`_?ghC^r?mSl^n%G#BchThKz4yze39Jvd%)BmQQJ^yL62}RC4wP=N*Apags zZy{yxkp4cTh|NXe*3JDJ3SzFwTmBS*;sJIK~rYX72PQvZ>$qgsdJ5%!e(S7cy=;v;{?Na;Z-Q^MrxhE=(vgaj|iCt0=g zcoa+CgcLNCMl7fUB-^T1JBoe}QKM6#OUwTRTzbL;JMMaQYxll>Y8}H2|Mj_Nhz!*1 zeVKe)JB5lNP2yG+_KY(|nDGN5RnP!d1{g8@s0h^UAie&`|FLyV6m(_PKW5N7Rir`= zBziIb(Rtw;)hfK9is-G6COAgqv0jci`km-R;<0cP-!JF8R%y*UCHm_w0%{W+l9_tq1rQ`UDMjDCDUO$D#18J5J zeNW^b?-mwqmQbrVo~ZMOkPx54-ygQ#)7+e^rT|jUkl)8=+4X6bTUBz{{w3|V@D27) zH8>zr@ZB5T=EW)-3`!cb>znNG8)qg}7yh|a_xa=wS=V~z1I1{6mz4>JIdhAln$XII zTeyKV>muzTbdRJn|u^~2wfa|=QXXhS4<@Wp2DrI^j17ttV# zWR5M%>1~V>{G7(T{QSw&b6*O({e8I^I7nm&b>FdZDeeF>QBGO8(<}9kD?lVlN%UUZaXW$Gf{%me>YnW)DDdZ# zwAaaB_mZQ05xN6Af^#W%mFEe~26nxcsoV+(2CnmWdBkgZKY_06EO5@%%Hm?nJk+k+ zVn(^r{%C&VI}7KN!S&AK?gOb4vT4XZ%ixo$r;pmQ(8^J9@o~C_IFHOubR`j(g(Fa@gW z#o5=+?8|NwX*||GZB%gHdd|-{K-P?JXSBT>sNB~?H&3cu_V8usp55tu7^FBjkTcnF zX{HecZ6_r}-X;TK_D0c$rbF@yY3T`Km9(y_=hK6_MQ*hsIz~{K=ci0rd;olh6RfMM zDlOKZ9{(;ndAjcd6J*Zsag^*Z2hz>hQ0shJ>uav z5SwFuV4hAzWzqA;#bo&i@?|Mj0y`M>HNh$P!HW z*l*7Jh?fic2Zz~8y%S?YqzncnoiC6{6O~8D@Sy+na)J@MARtuX?s%yk#K)pur0V+Y zHzv!Oj-hZSQSki>gCsY+k^K}t>6d_SIdgG8O$rG3s2J|nNxHK18yoCad>(G>gF34= zgLfP|;G}ndqiKy*hH*uQXlG;;3ozfudS9JV0}8Xu`epj=USH6*IMas=79_+tRQX+z6DIq2&U;c2bt?g0CdIm~s^{yLwu)6#jMoa9 z<~q)PIu_es%!`oxfVvF?8ux~#Kc&Ff$-_1pgW)+n*Hgb+Sa|XdLXg$lFZxIU{!Gc( zA!?xmb0xgQZk~>{o{qQc{P9| zOHBP)ZONpPb_nws%M$iH-gb7w4{Jl^vV-fr;c`78l_WURXNX*(Ge^G#UXdr{%%8~%8{0Ut~@i#l=Io29OE z36kIuFCd}AX{g0~4@e~k@9#}CaK8I{{*>mwTq|ND3ymccqQ+lT_O*&PHf8g#!(w7$ z+TGbvO6POFuRG`t!7F1a`&?;U(EXZQ?mO!XFIJQoBq5$QR)>y6HxTgB9H9(ZJINh3 z?Gir*QmPGjNq2k?e5be`|Xc(Dby|Db&U<1!y2z< zQ!?WvO1rsXGD$Q;vI_xNmWUKb$diLv=>CuO_pGphH{@;z*`I2);zKNzJPWiDC#F`^ zKc0QCP*D66jfkZ95knV>v&h=ix#|iV&GM+B*&sxuf~bN{7rg!!k#JXEN-*R|@r>iC zSquze4|6e5MfLra*<$B>8vqmweX1~m+x0oF7y9cLEk8Sn^j){?Em5VAZr~TJqG~JT zb2RZnL7D!%v$5FS{Thw^$+D5^3UdqvCx??EgZJfKKOlTU|?WawsE~JFRv>v zFAsgaj4v{W@+oO^@V05UQ79HDSe1qfl@pJFbaq`kk2Lx8@P?H6?vCra}T0 z0O60uYoJ+#Hz#LkxM2(nC495ReS8!=W|FIX#5b4%5q#{mvO{Cf4og*3vRH-u;1@eV zp+E{lE)h}s1mBFN>VbPQ*~DEQl=zdW8`OP@VLpW^x5}`by{iv53lFhPmoGP}T)ymW zl0{mwL-l^z!2?@Pigdxd9El2W&$j6|1wJ<4HjXw&x$y$WpTY({16!}pZlZmWx?Y>5 z1M{)A0Z+a(7M&-&{phfzvV9ls0$_ZS#94mR$yt7G$pXWsaGz42GWIVUon4%bA#mGX z%q;PIm3*&KEJ4LY(*^51aq;s&Au7?S^9(@;CPrOD@JW4&q0jqws=vo&A&*uH9zfPx zkbmErMzH{;d+jcHk+NoKVc%(XHs^@Ngv9Y+%_)!6erF1!Rw^9$}4>nXXpUH?;J1Bc^u&F()Okz- zW>_vXKi=g0f#*L=Wb-I-vNF3IQGK?$2J_ccB1!k;AK=QH%TThC7bw<22bx_kx$yvE zXfv!c8g4?v%f!y8)o@D;$(((;WMOv*fA5LORQDuczxxg3sZCzYlxl^&=bWoS`YiqWg{rKu*=x1X4 z>$d{-pFM=!oIYM345G`^S;A*RqK@CAXYSC)uP(hb8RTXrA46-?^8E7rhD3?rkvlzm zc%-X(KLewckfhHhq=$Z9VD@DA%GBm2ILGTC@K*3>*0H>_G+WTokj{tgwik*eDz@CX zbNAPaFsf2#54*=5v=0E&1rdPrBW;L+^gDqAC#g^0_}`G{5J7|Px~(G<-aIn0gy4YH z)YT$oNJ&WEJ}RcL{zY$;tNGPnLkf4{6Gk`c+mN zXeL|u>6_z(^1swl0gwB??dn^A!aMD*)J8kMWxsH7=>1k2XNbp4aePW0?$!L6c8=uC? z&PGZoB{@A%xdy$p77`Nj_O?jI1pjlG~S zOd%LdL^=%B1o{u9nRfMi;bk57>KT{`D7qO z3}a5b8@^GhVPMaMo^Q8p0sKJg=wc}|P&Awr(bi@xl8JGP^N?b8h+0aC3+T1R(y2n} zX|#@pkcF5>DJhp6I_0*yq^pK{lJwEA!MFH8K`~_f!_e0Y*1uc5gF{2W*1-YAo3o_5K6+Bfa{EoC4jWWzKH3&J zi6wcj&i}maje89XOuc`I(-13GrXV?WDuRVn${9k980e3YeaY>@`t^O+5rJFN`9~rU zW7>T8<0VJLMl8B8yd^8PTEs{&1u^`6@oAZW<4&JaLyVxM_P09Eb^b18--pT6DP$sx zI1fHMw!<2&v&tT%^ZU1YpL*rUGr9e#f{ycI?TbSFyo_!>ot>rhj7f7^VYbU8ZNt&A zu_5Z@j11maqeJ9j6!||HnVIQZgMa+kAe4Bpd42s}9nJigl+~>*#(a@A(_)s;O#9y2 zEksQIksM{ED~$HUb`SuqY8zFuL@>LrNK~?lWGhK)@M8QvWDl_RD}g?rolTm`RDNr} zznD3inbGWz$x7umWfFVEpZ-M^R@r|}AoNId!fn#)7F76g22$rr2`D^a0-BN)>HFIt z`a5D5$nr!Cp(}gU>a31As%7#Mhf!8HeVpleBY+C6&{?xD@A{3pzAl&08O;l;?aa~s z1&k;1#ie|O4?H?FiQ&^!dYCV4=w)3{t{Q@2bb6|Gcikc&EIM_B>-QxehlKG1jf zc)>LX?PPu>_)!En{^fSyu+o`iEml)EBdda&(MvyFV-!8!-sSv{OS)KX)Y0<=A$1?g zARzA+Z_iZ_s8>q#iualtjCfiFR51 z26uz1hD@F)DP|8s3mOBc>^J-bOa_=FeN$TeB8azv08-NeI1B;>&bJ)#{d86&y>My?y~-4W`6$h}UN2myblGJ1U}H!Pc4d`5jY9BJ6|II-9`v*kBG z>)bu7HFesvf0@SAeK%b&Nvi%^e0(Vxv;P^PG(JE9Z%cO9xt?@k)cYy9Gibkqz8Bn* z%;J@Fk@B5vIZ__+UgRMT4CtmjzfblW<hbprPGnEnIUxjvf`+- z-ZYVZA*!ZHK!iHfpm4!v`PVr>o1~{0I`3gd9zW(|9x*n6#AItN?w4rv#Y$l$nUc)b z1{I@!hMOPJjgiiIG_3@s0`js z>s3r%ZF4UxFSi@d7Uj)O6EfcP62n)DN;!ipk!6YT)XvD49xmc)+SXQ<8cMf|&lmLU zt9h0l6~@y<0jcQ6p-XALLtwQU__I^~m&S4lP9h#XM1jCl_~P+O z4Nm)rXjLR~TeE7crAAH4fy*MaR>>{UD~VYdCmA9t_hk6nYufKBVLLB_7m}K-TD11B zAV9cYJBQzM$~eE^@p}Vm${^jW*gvzBX`K>|Yhvs97oKh(zj?t{!*MgK@;m7L?0lL@KC7Ce#1*%${o*eWUZb2%cbDq76J~e&!Rm~NnJK}>T{|-*;8^%ZF!2y=97V`wF!P*Gi|xbyv~O?5F3JKko7u#`V=tK7wbpbx#FT>k=ZOd#9#fyx;*oFaXB$g%*U+6|v5Q zVKfCY1^~Q)1wcY}c1-wwIV=jA2%xNLd6A{1=W;n^-TK;Rmp+9=uafRbEFB17fFKM_ zZ8V#pK2O`T<9iOa5FZLhX<`PTlVxGaOFZlPNG8wVu} zfTa9wYfHF{LasehcU#ZSOuvUkM^IV#q`$x)7z<9yMzYl*UUUfPr?9?yw`uuhSXSF7 zq^Js${VPcUrhQDpMImn&E;w)7=zDY*ps)8G^%|lB4Y@y_hoK(MPMW}v+2dP88!}!NLPWUO79^Xlx3?Fq+oj3|wv`Sx*v^fyY5$=el@UpXEKa*AX$iO=T(%%* zNNflSqmM+cDRRb&2`(-gOLI}{0T@8|pvvRd4bvddKr5c|t5)3jt9KjY6JA2l9LCB4eh*&larJ& z3rW0+!U0lH;ewyvV05oJG}5zChyiN#D!N1Wa{UF)n)irDEF2~}EsdhJBClo#xIQ}n zW4P)8qQ%^D2rSlpx7)5Bm3j>dHn0IvYya~HHL#)LakA*Xdz{vABT)3^GZ;YyLKF*ky&*sZ zq)SqQ-RyrXIR%BE{{-LyUl4am;x6>;{ViCZA`v47PheydMbz3@JjbTGFXNf?nKX*D+)Wj`MZr$9Y!UB^yx^Bp zQ&XovFQ?=AIN!os5kts#x92d35~xWlH*6e*6`HWq@gwq5EtsU#KWS>q-mU4_aP`lJ z;M;)8w@+8 z@}zhHez4~K`D&Z?7xb)mhrc!OEyH$dg}>j2$Ua&P%g)83F+oKkGVO*rR?6$5A24jX2JrNMHEz>+ba%O;SFu?N~a6f+3@y1{;KC+_@M=6TH}!oI}H( zGhYXP68`)zbIkH6@39^yqAol<{zftS$%pp3dHPg3>M%*h(#;jRgNc{$O)kBk(*K86 zXz%a055n zs;WvnTH}1v`t&`(J<(=hdW`0Mo_fcR$I%M*(b2>uW_HF=6M5p0Ab+#Be@Jqsm~t7H zhEKy9s-sOHYGOR=Rz>Tt=}=A$r9?T5a=w3{@9$pgL_9vjkiob!kIk5Y{h4#h!j#;%K&a{)DU!cm$%B2qb2NXmM9gJ2&7h=%nlyvxrTTlSA#vA@r zs~Jb+ez%%Wzu)F-P20#%{E~vU0S=pH^%M5LuGwlQ+nhE6(HBNqR7h)K;ZlR6qqVhV z@{SgD35bRlQ&UF+PaSSTE-GU$)j|xdte=^h?`ge;<$(#$6P~;=CpP+7gNmwKvA4Gu zC>uS2nOUH{iiNow65)=4bwiggF#_+%lpjyz#SF6kaMoAK#N~Kh;Xju>SV#(D(5Aw) zcp7Yt;i>2UcJm3Vh7LWK@4z0;RGgh)cZOE!#h}2DXQq3i2MdJ}29(LSzSw?mJ6qm|!KXGVaG6&jTq?esIpzGt!iMSDqjrhy652r$4dhJA#r-;2`?L@C>k8-(VV8P$i^=87gVVf z`3j;d0yn`9WYF9KDY|}icUt+$BU+I{w8r@C`8QfU#2%$v{^Jv*V%#`UnEgYAK%`-t+B|DEgf6}2ihj<*k63-ekI&Kn0uVHv8a)mV zQYfSQye5sFn_(3{cLChxt6HPG{5ig-&EBqijH%IRh%L}<--#V>k+kAYlByFb9`e{^ zc6nFF(5~El2dT?`b9=2fT4MIngON6pN=fZ_Z%mwU{qs#e^yWkf9%!YdtGj~^NXrjW zP#jJWQ8k*Hd)} zky8*)f+TfW<)4S9h@gYTWHy_6sy#qnUS6SvO?O|r*&_5pD>)=WLH9tV^zlj5{@nP3 zo>-p#aJ{WygTvB)d-Pbl-Wrm(g5@fTik73~@%Gjf)DLuJH4m!>x7Ct1jfzR>4w?Mg zf*yf-WiO4$~H8SfI-p4UTL(_|N026qJK#)?$~lm?t}74_v6P3^11SItGyPY z%GMXuq#>)-UEUwZL$|PZoth{q-+nDqk>e^ZEJ#<9;eRAoi?N^F0`i*Z410bPj~oBa zbfKyl>R*-i#>@l@@Z8+zU#QDB{(oxsk>5Z?7Un1ugF5%u-%a9aO>r-j`wD2$Tqmo( zr+x7`O0Cwo%h=1{UiLn-tW{!umnM~QJovfel!`5p8#}`mb z!n+o<(Ch68`s3e=q5K??0t=gY)U{8xQqfKty3f^vMw6pnIfX!@yc5q=de80O--&#i znsw+8Tb6q!)1q3?3Gmfm=>5fNPab$TVSugl3iFrO)>(SG6HVeo+XRi|i$*S$9M zBB?76jXaFnKXbG{nC}=h(hm4Cw5YoE>Lr5TA z#uvUQn*A(cOBnzBbL_9#4>mO{zZJ_)X(oBw!8gYqHzQ*X7AL18%82>arB>={;RnlN zOAnu-;@00S4AQE$6(n+jPjHC!hNoFKJN9Ve(tbU8rxq|kOGHG0&U%fbPYhk%$mZU7 zn|eLX@^OV{yN+$=ovz+^4DbI6$b&voa{i}j}*EK?@1MN z)P(r>eyrl5oed&eOxxpTJCbiWqO(z|ah$lPG!OeLG;;~YKcT;#vv9dOezu~~uu5Fy zYv&k_qJI$unV*}w-61og5_Xy1@i4t;0U{HC?<>n=JC27)nF6jMsYrPxd4pyU9K8zU zc3zV_tO9{{hBPr#rGK(;AV z-V63_7M{G+Fa0-+>B(~~td{oqx-t=|S_1u>PuOme0os3wB&z?+N>~7748@hDyGVF1 zi`!R%aAB!Zz6kwg`BEIlg9zu10`6C2ZmZZGru1wVqXFL|a&w379?ZS(u6_N;^O>qc zo%ae6xi1+u8Q=*zH+c0u`vdc6PmHV6BPt-b^EfjTd`kxIa2aK-FjQ>rQxH3;+R?lT zP?li_Pf8rNIEgvI$m`j*-&lE`%p@mA?yLWG$E}dpcF6iHVQtBJpWmMMyX6o`AXZXY z380}60&VZ>XEcCHjyLUZT(ZK+e+YB&ZQpp+@bHvdTPx6Ld$S_EYhm&i%%|{3iOzX8Rt+lyb7=;D zgqb+kz+JqWxc&%`-St6^IoIf%p;FWfZ2C#?^nhYW#6#Phf4&XY;@`{JHu!JE_t}=BX z`8m#?WFqZWC3&UM*GZKhH!*x5F)`HlunF{!F3iKDrKNVihCBjCduV3K;Qvs>u2iUCeb2tqVy`dl9o)Sk;*MK=puFYkS+JeZ;M(a=Y^0<1zH|Iiwo)T0 z70Lt};C7^5>2|IR*tW zQ569!NrmWTfq=Tg%Wta5V?En@A77qZtP}L8=2@sgds2Yo2jg&zVqt5*E)Q^&N!>>V zYjd&rIHogKymGDocY_&R+BoU=tA!D)BajEJ>JeE=w>xYT9u$gSU+-B|sPl-Ha=Zwg zwd0}RBxiTN1!8v2E$*TYjY_sEItz3=#+sbV)QZhLl1j<-q@RF;I-6|!|DaVtU6r<0 zUT)h18ylU*fB(`DKZXBf8I0I`$YK&!k#`PA%A2Cuw;|J=E7UCj*TKA#&`1Z-Y2Xi> z;rFF=R@(=EDcs~Am=>N5=DefC77A9E2blyAWGn_Q&@~yC`|-!zq+xdcin8?QQ2oK~ za?1)YuG@K=_ljGNRo%|0yQ>Ol0$-_%TxoG$AP`OGzEH zj_K*;Wo2geTqV35B!9x?!B_|S+Rb(+v+Q3Cfs^rJ;-h!$3a{qdvsDFy%S;jPcqW^_ z>%QPLO6bjD_#RFuW>|T9Q?Z2h3-3%>s!S%|ps>%-@CtzoLA8tK8XfGZ57gnYD54a{ zhSa%o!&=L;?DF!F>? zuKoFe^@%6DkTEpCVQdU{HtB^G`1z!xC*Sq0ky~r%Al@$^=-^G8*u%hneq3CuKkx&u zb8-!hIlJl!!CY)&4`AWB{GQVd({&2$>BkZyat&i0MpzvB{>H``P}ISTlpIguJk6OX z++Jfk>At)hp?)ysq2&H3TRbIX@F#b}nA2qC!dwD1LJeZzD=AN7bj=-;=Y*wgFqaU-yVPrNqunE9u z&Io)s7>AvhnVG%8AmlV``7xOG0;+p~`onja)GUo#7xC#^z>P;#Ve$nyc^@#QBD3<{ z;7#wXk?NC4s(jOYa{qwag=vlFonNPdf)sULbXEUS{s*tBb)E#1!g#~Szua}Rk;p(l z&T*=7lB{}2_kQN!h>G0c$LFMXiOV(G(zM(=;4q9RdHITC7g&|#xu5z$%0|%CQ-KZs z2ATN>#1xS&xH?_c&7BOHbInVCYO@wC~!BsdyUhS6(i7Cmhzi{hx-jSrO)Qd5CHR^N_lY zzWB$mS7MF@pls*|x)cqlT&%IA_m_}ZlsvF%N7i%`P_s96x!n>&yQ6@mqo6mxCPdyD`OjspUw#_6~Uiz;>__kCAkJNr!9bIeBj$ce3Y3<{s z&m6heyO$4UyeH4PFz2IeuwT1@$pSiseU`88LeFl2ev5&gIlAh=L-)f?Z`_f^JvXeD zB@+MirSN1kiDkYK>xG{U&0-%?qEL1^>Q~j#jp=W1aRXTsID9QfI&upRp!M{!%CtBZegz zGVLl=91IN;w>*8xFSCco6rM1+_Wr<;hkO&p5$5Wuu_BdMoYi2?muFb#^u#+z?n?G4VK8+O($TcB(gB|48(ftc6cs6gQ z@KE_iLCDw*3+CP-F!jA;m_DLY(k3kNl@dw z1&#zrDqM4B=5ZW+2gSz1syMJ_O0Zr;c$b2xqJE+7)`0KFER8D!g6gA^AQ+e9vKz} zr8S(gAD|%lPwX6#ILJ4ANp^U7Rdp=|FPpSU=Fq>d%|U&socW_yOIn-hY?$!8V<5I_ z>w+M2b8eCne3w*iv}q0ax&(=i$rAG0T>^C2+S;mQflzPTEC#YI6nO=7^T9W4<9)=uOHK$)1Xx+xXRa&)LoEyemX)a;0( zvy1bI2#@N#7K%tj8N2H-mFRB(*|vJ^C-EPz?ZWF2R!2Z@xI(mQg2BN!E1|FcWDq%d zt$_K{+F6?mHvWZ|NtE5_>a}6VbK3PQUkoH3ig^!-9L@992q)UG4nEvWO5Y@5RVS5s z@y?RP(aS+f2+UjtRfC~#x_oKLipg}wlwh~SN5jFK!6D0oLK2nc58A6tnV=*?^8poZ z(&A6qF)W}r>;Ys%Nrt8@io9=%e)Y0Gg~6Ic_NULwppOry*$yKLw+F>J=u$Pc!9>vc zI4Ocrl(ECgwrXA&JuH09)LsS|G6)O`rY&D z?ztEHM%)$VqxpqE$)DXYDj9jy0L9;RW3BL9#*M3@jeOOz6iy?EZ4G+Gwm+Sh_{fcL^xiR2A75+g-)%B zSP3X*z~OJ3b!*rKQ%ZG7B4=BZHoMOGhAaSa0zTb8-T&l!vmCKghGzEt-VoJ!jRCN5 zoM-)sQ~QXs7MoBx{q_xhhKZYwl->S_U3hwJC>myJG$`QuJZ<9{mrqbfNfQf{7GU`_ zcbgM)tu_7z&xsLEf2p=A(~D{w7$-xjpc(l?Vq4B5a0-wC1Iaw`jmL|uUxcJZZj*cSj0EKqKQ2j&rdxA}&uYAoQU?rvDt(o6{@VZS32%pcj9zm*^SYz^uX z!5_IcX{H?;j5|eM6^u-8Lz#RppYnTP8(+cbV4iz+f`_v76on{zpZagvwzA&asjW_0 z_*^VxeHpU7^i;SnE~Y1z37JX%J!#XtJupO|Ed<-ipP7#}t)AUUji^wlpj^xRO97(g zN-8d7ADl8zXL;0#FQATbC*Q0dH)2_spS~M^yi!3w!?-d=Th~@ECqn_-ySv2Ij0XMo z#7f{mUaHUkRA!wsH~*=^sUC!0AT}IKaINcV_xASi@bPJY9-HDwznpQ|@#vqR_}5Cv zgp2-8Vef}h4Z5T1=Z<^LqM9hFx8V9AE1necXrVU%!j}N~-loz?ov0$Ztg#_|Y-06C ztF6nTq2lF&d(5kzh>Pr)0b6TJ;+yDG`9*+40B87)5qFkXp9~u~0U>{3#02d!hH+1F-=^P=<%F043Upm~bBY^9&A6s+U9`JY9 zm{dZNe^xo7#*}a4kP@EQhcu%@?tLr1Bv_Iohn&ynrL9_9%oPnB=Fpm3PQwnXx74QV z47g(PJe*q)R$=`#iIoJ+h@=36|FbRqjSN}0I6->(Ufaj=55=8 z%j-|ORPOU_4MV_fSImA^^1Gb<0p`lD;Pj&W>36l$KkF-9=4c3FgwRXeFCoF4c5l@J z{D&~HTM?{%3UEs6VL@V}AkP6ZQBHu16K-_rv?`OA`}VeC_{Os>4gh;_Y4Ck|`@Lq4 zZJA&RE-PQ}%eqJp@>x{eA5g7Y3NZzuox|v8=kulcq(I)q!#TTl_}@{!g(Fk&aPVKb zMu}hRW7UIeJzY6im&c=+Ie&qg-rn3xd@_pa?g#j4s)NchRyuc z$&^OqMgOc7tS6lUxp3G{tkrtawZ-GcF&qOnl!NJ_kiSY z2U^#ypu4LY>;Aid0Kj7oAVFGv-F{EnC;s>JuJ58p>B_e~Wef>g)kXvjMVqYN zLrd!>V4~jWD5HwX%F?CQ05L0bPtOnbtq~D84zEtJ{@O9$XX`lD2_=;rkVnk8kVW83 z3X*K!fXwD>HIeZ9CoU-j=(c%ch)glsq@MU)U~U5#ONa#-%r${a?0`k@WKJ~9>r%zKRow6RzUNdi?GDV>8o5yNS5WhAUw;EuW0Ig z?Z4oS<6CeuN6YcIeuA`kym}H}sqQyFUe7Swj%k-hANP9h2n7L`KX?y&93&t>GKBp# z{aAPdfk&-}97$UuSUUwQ65MCnq4o6-=We{Pb%(-vE=*JBfS=Gbv@pv;ZU+TZ5N?F| zNXb~eLEL1xcHSKh|JvN_&g~wTxp%%UO_He4(-R5I_;%NG9;O1)7A>~x*Xrva*(%!8thE11u*!JT=5-RcBKL+~$Eu zo9*p>VD=brbGq8%Wo)Y`!Oq9MaM9>`{yt0k+DwM;*){i!#OU4VT}y#lyYht)^9@ZL zprcrBI{D*&a!0%l@wuNHeW?^T!p+Ia!x8;0@afk6f<}^v=~q2OKmOz?-qkG^>Jcl_ z=V~Nuz=3rO3i0oGq=+i?Hr+JRv;YdjP`nuQK z{a_ZHKyC1vh zc`-;)4hEp~o105PCO?Xzk>;q@Ro715lBZ^E(ctNy;~UxcAJOjRWCk+s@AKZYIf%62 zF@hcBAAL}ke<0;VfFDjEE>5muX`^Qy_m3zM#^v&L6b_>YuglKalU|mCt=h^>ns-l{ z)`M@34Fl}v52o3Z0mZlfXN!@ z<_xoYR3$)t1hm63=MThMUJiqBI=uoGmxmBdy*Q9q;Ke^Gu}bs#ePKy&XUtWChKh;` z=@56hMZY0LjsLjWTfx^ivW07pobIMAPjN3gHO0I^(bUlJq6=_8tye+d`N)NuZD1c? zuCr_EvPk45s0)eO12ev_ZmAxKGyH+Kw2t%PvI`9R(Jst)%zW`Eifeq6Z`Wy?hA(Hjr~*R-r(v`LT>L&&hKRQv-t`w ztQ^pENo3$9Dli|m{Y!He;tyBooSygp=dtS=m;%{zZQF8fK4=d9>xaNxNy#wZnGhC| z>`qUbm+8@Hec^bBWN|*P2%*%>ndE3t^UL-=++PE_vkk7g zhH~(<_yE*lfc=s7tho-B$=AvI2YPd`|4ms2y}2}X^Xd_um-ghxeHCtH_zW!Jy>nVB z=ICBE$=@Hz+T7j^TO$iu2d zM`!|S(@#148)b5w>j$(}{7>QLgo!Y8Xg0|U@B8hD2uYtaK+V&;eLe8zGm{5BD59X3 zELLG_Ba}2U65!hh+!4y*@Ksja@8`t zptGY=r*EkVyLMO?{qllk`c(kXx5%u@)zL-5ZA(5t33s;8&A)R4@!_#}jXf__3xD9o zo`Z@CIetv{Hf1EPd=;)f>w9$kkeaKJ<))&D8YC*J#veke(B)Ehdv$Yld)vC|a&-}( zKEiSxLeX6A7;-Q^tG3Hmt591{HfJ8~#$+71qWR-;`ep6sw z9s=uiZ*C65|L~OEFf|Y_gR4qEWa} zjM>ZLIXn-Xwr|u;4ho0mNUnyjJ>t?xmRR0n@5b9w)W1Q_tvG(&cjY~s_Rh}VBTyw5 z2?u8$zIS6%C(<*oZ>r}PZRr9g)_wAuF`i|u!>@4ODcvO`bHYJB>ZDMI{kTZADDd>a zdd=h{1i80v(h<0Lbg8eSgCfSFgoHwh;0xW1+n>|XYwwDSW^7mqFirG$+mXr0qN_!}ut0XJA;o%5K)5R*Ti&M;(bxPN*T|4UHbm^p#Wb-<%)6)T z4?Mh``QXD=VDExluKKLDuVN#y!G5>w-1-&WA3J!I-p-!oa zf7S+~LJyzwzsm=?^+lG&?`V8$TG3KmM{h)J-h2gTYyp7zE^#EEsC&Sa0M@ z0!uyyFiZciejE-HBPzMjpOSlZ+BLi{ddC#>>{s0O7iYrmXPXiSe#hz&>(mnCy%ymL zGVkOHS-`&5iC56rz)qow`*-^RxmR@>w_lRA{>6*V9JzL~{ZZl=js9=?7jXxpfyX~R zbvKbx2@9S6QqR)xZpSSyBQU^i^o|^U5@hrjS$wU- zfw{l_jX7&=jakjhA0NJov~t_*6cPCZsOf=b9Ne#MzRDCF3`b0Ce6GJx9@?`>nv-`l z`luz}f$CnBuM;dpOxV}Y373(EG9OqbRDeRi{|ko-{Eh4aDWDSIG>@yATz3KljjU9U zKPtQ}1dUC&-qCn-9M2!YJVb!;B~+HQH`M#%hnKDpM4c56bgkwfD8fc$o^cS=y-74^ z?!xhtAx*!kp4h0Nu)2D}N;J>T9JBGCZOc}2SV9P08o#*5GZ4++-dbp`+#jFYH885D z>J*?#@TWF9uMvugi1AUGr}orINo`x5LB9oe?%jEvHEZK{nmee81fiAEbD2K~#$Nwe z{AdKcqX20##@5=yV|p-w{XXE{Ak^9lcJ>Eersd?}o|LRp{|_(piJWVbj;P_Lnp$w| zG_;Ja?oNS8!n9Iz*`D!>t&J*IdeTJ}UD0iS{(~A^o2!CvuT!usD9My&H-1xWwy7S= zvNu@xnEiS`1>Ck_=*t5U#NdPk9e(*s94`Eqf!C9gu8_GbcwY-?)Qll8Wv6FBeq$MR z`A`!}#PZdJ*`fX&=MK1#)tr)&_o3*OxsLDe+;;P;*Z=-IwFOasq1?=qZ-V_bDB5qV zAt#g3P8q+@cW^KDEQ925R%jO*P_WevS?R)(4=GP(bw2g4eBnv4WroxuC5axWfOP8l zgUMmnkG|v$wTZ~8jd9_fmy3ykoY#W$X1wcmm(jpE8I))&g%|#XzJPh-s@2~aO-d!P zB*a?7wy2#neyaW=_`MfhqsbYWV2&;sv{G!bG7tVGa{cM8 z`R@Su#$xp{8Kdz_eCzjT*AX36uVhZ>z2fyOZ`g5AX^fC0M?krTA_k+X-GgoP_4_A# zlt|Fn>OZx&_ORgAap1%>Clr(#!n9FjYtv+$r&(Y)9nJQ#J>wBexdp$OKDaLhs*E0? zLCL-g6o6qC%ES%Qci0yN&6+Ri@6;iKa8<^(+F(0jEi0F}{Gg0&l%_+XeXN?gde8mI z`S}NPS8$(oxQb3~pz<#3R}>_1u`;$2bLRu`IseOq;7YyRjtjo%|KaE)&=N~=hjjt{ z_eP`Xe#=3@RZTHl!;Oy5h_5{HAGIC2Gv@H~l|QWjYbWattDO~htTUD7uG)Gm9NV|l z8cb9=>y=E}C-<@|B3?%3rFXifqOcsy3oKAO}ZCD6`ge-QlXzC^ztVBRlp-B?cHzB(N81eir++b ztb|AzTh|S5AD$j?=4(u3{uf4*{24883<)G1U zj~zGlNX+CMcnSXR%lWax5d_Hx34kr>k_5~S>0;(PF}LE2i#&0@!J38t%27)%&_9U% z8N6~kJE_e&GR-hOH#rewlWoGr zMc9j?z!e0>=%G16V0eA+%ez1T)_!(A!M|1z!=`Oyly2sf%`y<7wifWp@U=P>Yhe)E zeaZ~ikMwb{!r9i4!{7hgq%cNzl7l!%0oX-qEMeShlV>rCz@X4p)M!TKrdeUkxKL=? zj2T34(Zv3MOY`z6gPB?afm8ob@cG*H!ptPjw%T0vli)7jl2e+4Sx9EpG<7UE3+==Tpn&cC8 zRT<@<`R;Be!p8kZGIDK4(JI=>TCUxn=?{ov87+H03Ud{RXq41dv)M^-6!{q4ao3k# z`Q4@aM3+GvOzzSu?Zf3luC`Aa@5Aiu^gs6~9o864scQc$ zu&0zG^2Y?z0Cv1a^S`XPa%NNeKNMhDkfMFuGxzI-V9#^QK@B{leHb+@gGAuY#A2PD zb7Kv>77o6z1D91+>P=QNI#?F-PyNG!%C@!!O~n3Z;46hAhc!&)KDK*RPrOiU=ck73 z0Yw(Mv*1z2hGG5G`jzy%+4}w_d{*RD%F)p5Fc65*xO^dyS*O$@8jOO(prv#@5-^7z+viZe|X#2snemo|z$2rRL zp}W*T52L6glaRhs_2)qf}!oQtL8o6#S7D%r8DUiW!J-c#h(6;f2%xx z0xI)ez?G5~;`W%YTm^`P^Y)3UCGdgCo^M3oWE1lB2BLl@s$l`IfTF2al2%?0O%~2Q zR#9kZYB|Wf926A1zQ0gB3=^P@p`p=hmj(BudS0jSaq*2bTP&wF#Qp1$>D7TS;Dnf!iG*XzkaSJ*QSE-%(yw#C`ery+1=Xo;yc-6Q{wa_PS!8MeLhJ(*B>y}6e1nPL%6i5SBl zYAkIu$~5Owj>%gfwQi^D+doo(Y4J56kTrHPHuCQS@*mp#hS>rs@RUMMBK2f97yK$v z{Ax^=S~u)pUhSmH|I!t+KQ3z9^7+oyn|Yz#OW*7~DO!B+5vKGOk~dlJd@uzh(O9W8 z0SsFqyK!&tiFft(8)QTetkj_fL*wrbiCLsvZYL)AMYuE6XlQ8M@#MNWqKMyE07nKM zm7ns~6BfA%`MN-9zKq3j7PLSQlmipUFk*H8MTM$l^O}#9NSAj&o}jHLtPIjaK%=c? z#ER6QQM3rtdoJuOq#Woe5fmK!bd~TJ`(i%d!RS3OI9Le05mk8 zFatRqxJ3r4$EdFd-k*#fiOq1$wh$ey2kouqGPnK6nSmcGe}n%(uB__6LROl7z<=bW z93DLUOg&fzD#t+z*Uy_wOi6KFt!?l$J2*c-2WIW0#S&kNV?Vr-_fejnc=YVE!DFjF zjRM88K~9}?ZHvb6tg$zsAGq{7DLNtUgK&k{jK!-11K)Z!`7=g^KGK1w2Fe7xo~#1Wq4Sb;M-q`Ta}I-JOP zfZuL5bC78Jqs5}b<)U?I3#L-R)QHefhXh~iz2WV)oxsB!%0 z67@!KB-u;8FBzRPyyj0cIG;_Ms?^J=STx8~=?~2jU?Ezx(R!3lh$&cp9tJhZnBT49 z+X%QSek8-;FSfB&ks$^-UkgY}GpwFNAeUeb@FF`%Iprsp7R@}p9M}IYBOI=97nPFi z1spxJVgflljuB)yy=8DJ(nUA{zSyTl9bH}6&7W~77;?F*p3&1~{`aXGi7WFxr}VZi zyhjJ`MDZzR<4HVRocvp9v_3(bPU;9bRw%Yr9t9KZmAtKbN953@oPkIqy>Y z+wz7?Bf$EoivI`K*YtWQA)eLWkt3xNv^rdgdHynEAbEYSfL-e$ch=GU60U|5I_+|H zc*;Oe(?cl8$Awz?)f}q9zj@IBPG!cHPV8L9JWS>(ZPr_CT|qI&d#cGZC6iGUY_gS9 zh_#WEo~z4w(7C9zHwdBk^*zA-X{m5MO0JUgg)v44+TFqJRyw{`KAB6L(Jj-jFlc@r zln?j;eBm=CU1&67_sr>BAR|#6+gJQ~OY6UmEZ^O;=nEy4yrRx^5H&rGo22Rap3sz# zrv(1qXiC`FdM{^Z)bGxVCRfs4B}#?9pG*2Rtm9uku}pP1k{R9)rq^E-lMo;?u&2YC z%9QySt3EuVs>Rg)7fh^5WGo=dg!H5-NbYQ}&S2&OZ8ZljMTMZJ<=1uDBt# z1`o}ZEiGlh!J1b^JXs&n@k`n>AWfUPI`;{Rh3$(K zAVBc=Kby=`w2cG&>| zhqH?#;l%R1)A1e;Oe1%buO4JNLWsMJwF1{Zs)#Y>$F9UWyXCr6RHo5lV4mnbOlMGhu}^-y>uz&k(E^S5N|!tRkb;F>r(v zpMV$Um-UUbZg9aEWaFo0HMY9r;_6J5FL1i*WvQa~-!y3DM~FKta)KX>OLZ2@aFd>g zg7?wJW||#9WI+7Z)@Dvl0=tGuySMsXdi>8D^Qe-10{pM$7S-m|`zdnX=egnp>l%4? z!8wzT(?U}O_yhoA?%H1O{nlG4W%7HH^_xhn8gMV<2I?PmBz%}$TsL<-d~uzeHetv@ub4jtTUL%B^sD#t4-gKDLdNOj+2s28>*OZw+4ZB# zXK~MZXu``csa|<{-OkLtTB#1+uB8};yL)I?aHdi`l1@L+oZMq)RWFcF*{Qeji;((J zG=J*h+o1ScraynY?n8#)=o7j|wO<&|J?CL_ojl;PH2*~hsv;OyoC2n+fx-rx>{Z~3tbBboC031JDefoV@rANx2*r2aJo zQjn9Q{+Xi`013up@?EN(%f*?OV<2%KR+ljx0u{DK|D1&AQ*I4C~ihN z$auOu)y-vnEy!LnLG?`SVfkk!&2AOP9WBEhUnXfggRWwu_qC$%dPEpIA!K9FK)d{C zu41{~&qK+MN`eOhC^LW-3>P=I^_qR}k_N}guXEQVoap3N@G=pVxR?AB+%2mr3F3-p z^S>s*wr5HX4kb_s8VMklqH(Ns)rrzmUxq+Nt~5q&*FTVE zp$L)hFY7di?4Rcp_Q%-sEH^mqC65~OGk!A)x6kob`$KrmLZAQPzv8?+_$)11ir4U#BLNntxn@@qV0e89_w(E&>dkbN_bgkB$>`{Nj87 z%s!3cj%?pjRsLMboEi!lfjN6LOFl7+)CwKDL)xmA=vfy$#o3jT`73FQA{;heqF4yk z>@%1o=EF?Muz%U92!j$o{qBIomrg!W2!sA4=R>Xk_h7l&jd;1IQHxGbKwaUYG}1HT zK$2^-vlZPWc$&_Df8R0K{a^?-b+*e}USZno3`3P7fm|}0G#Whp@3!gr4{ArY||~<8W+x^(dXaDI}h< z9{CLFMyhgITJoprl^bX_{dtyv*cX-%S^B)tZF;xiG6iAWiAVW;1=n0c1q|uV*>`~f z!O9;M+;b}H;9N2eV}v4?s+#0`vchK$%2WdiF{c}ZTSaMDM#|j_;%3T&RAD>Q?eE0i z=jG^7lF1@{wREoILIb-5cwV=Vzse{UDduhFQe`{ZRZ9nemGOvvS}P>q;Zhb6c8U8+n?PfuL+?T%VY zSv~#!0^D=1`NJ_ZB3=6R;#=b_e(U@4eoO;O_C@?y<=7KkVw1MdlY5td69WC)=Vp{U zt*Fp!S+fr^1^3V*GN#(ADjsn6dq@rF{WxKuZbU?MoGgTw_73)TNCf@z^v<}VO4 z)%)5}-;OGC5;%Z(O$;)A|L!>q(_b9t4}MPzN;XpguUm4kz{ujOV4a>_I*8D5-qim1 zWn3D+j^95JKk&PbXc%6!2=jlQJUxDnVo(#cm?^URSUEVl=*YigeH9-)WzrjYZ>U+) z$yQIy|2P`+5&HnltBkV2!z0ZmrMUl_9UQvDjwBnreQEXEgqrMMr`4TWw+u%Z8jS|s zKp=-#oN>zye_S+YLk=rXE0X~jWRUc{zyIl4E97dRCVt8BYBXLd#wkd zVrb^arP|tGR~orikd5(M;wumk=Q@$|_Q{h65fK6~5|IG(L8{jXqiiwQ^Jzk8)glTR zD3_Q<=k+IbWtw|6J`a|zmcC#+|yV{#$eOe{nTc>+F@CIugIR zc**K+I9J~1bn1I9kbhs14*;tq-ciY_4MO+I2`bZacAv>jp*@CwS)9#Bb%Q>z;UMtr zh?t_nQ$uP6CYe#E@=V=#CM7O%u2 zj$4Zt{M_k=ZLn`_^52z`D$9Zu-CD)v;?GCBB3dj25YN}L7UzGfEXVc7srtG z>BY&#$w_bIRMN~$;#BPvkcIZi-^tnr7AVixV8F9~oUK?U9}j+x^#YG3_T4$;qc38j z>&g8sh?<(ZxU|wA^FXXuX<{Q<#1B^XKH98E33@CkE|T6J|D@t#k;yd;&Ev`veBGhRzaw_zP{1BG-w@)oFFV<5>0?W|+5K z`cN*4L5cUH1`KtJGvJAb{q``vouTXS%-_GNiK{L_yg*GM_Ta?sR=jIyg7h z29?8`$Mfqj35{9li9BA~0SK=GGA>nAmG?Ps!8cb|Nl8g)Ac(U%V4MLu|3f(|j$YEt z9FtvC4V_6mcpHWMc7b~t zw|sH~@QomsqfPq?Sx`xn zLVu~OXjRYiG~~Uip5D#ws4)QKbKmN{SZ+GY?DWmat$n;=>-hFSzQkNU`gzX?XwI{y zQ|ZM%Szq6P?`4X_Q{!T(`3G)Bk}u#Y`Hu?lz2;UH556ekZ{0KxCVnjUqsh%<(A2Ha zatkt5fnYe#H#)TNk<&!xz^=qV{LimXpJPj+{9VEkMqI8dKJnD7>yljYW)Rt~tH~9y2<+m9w(pz4Qd7y6tDteC^HLyk%4X!70R*#| z(s^HN8|?Mo%w;0{>tE`9;!I~5%!6fryQOhaPk8jG(2>(L&yT4QLx0oMq^w{hK3>Qw z-yhNkBPM3OmT<34yaYmuYBh72RbCo2ViBV0w%w;5H=dA|rDU?p!s!^fc{$zrYEbPoOH3ixt1Ad zB#WS>9Q;EV@Bpca0nhFzAj?{?T@rlP&85^bPXRgiK!ZW`@6k)y6zjZ$AVLZ4*-xlf!+iJbIYfeE7I-QTGwKCO4q zKN29J+yTV-<3co9ibcqC1@Ostov48XD-B0F&6zL^Zgb70Ubv zu~`YUu^xpkTh9wxw-*K|H(qCw_wMeSp(>jNwj5x4$`DC`YH(B!Bo^H9H6SG0dyRwrs0v#_*e zR9C%=L9C;F0d40X(f*+1ovS>T*mGAAZEE>`Yr4XSs=iI`Z3RDmg zTj2AL9r=MZGajI5u5pJXK3VcRT-=EtH#1QQE^z^)rMhSB_iG`@B>P*t@faaUAFPVe zpN>w-PJ^q>rC==Euv1-MyDX7iHSW30i@ny_(-4Gm?#j-`3@dD;X7iYN`wFYNCF#D(kaIIy0+ zKIVci_-myz8__lSreRud1klr=y?DTeu1j5q`dsi!u!x?o7V!V&xqM%YFP&63_ziz!F<1&4gr;Jie!)0h<0dI8D&2sjKEr2}uMEvP z0+Fp}$7PkJQwLW$T9T0$Oh!_j12><(BYzk&@?&pZJBb11lYhW{FyO8=0kV-tyNwV5 z+faUWWbIFVxDexajXo14qX3*t1_R&Z&Y2{)5m@_*v`LnuQIZ49{CS}rX7$nL-NwR2 zY{!j2QJe%fH%aP!aHor%=4nKx@DDxpe~Au&TFCuzUikP9%*Wds?0f#7G>|9?%J}iV zBdM{f*Sv!ReW&yUqUIHXF{#yoFm+C9>J`XKQ<4NlfA*jPGI2L;O zHOBGi4t@I3n{71FADxGRZr~Nl)cFH;TJ;Nrdw;YCzjos{r z1iUNM4D|kpjmac#eV6r)2gHT-%EI(?jDWGd)z~}Ls*)1ZPPbK{g-}YV1B1bGj6(sp zQuf;?#|dE-CYgD*VD@1MC-m1;Zv(XWDIiTldQeTM%}p-qYMHbJoMnkP&8PEr(VRbj zhxrmT5^xu`a7|dp$4M~kDe1#G%J!L)7Ongm{E``Tz2BXFNDM}7pxf^?jI$V|Jnbjr zTYLlsM{GUhca*+kRDKwyC6s+|l23U{&7gB9r839Otp$e)L3GpxX-CrG1ZNH(o$H&M zkwDZ#Ds0MiQ&PcK`*W^NQ$W1YyO&-PR6b(o2s3MY~No7H$xW&{%1P{4T zH5pNNYq|4yyn&)31#L{)P|+)TMAm<-y39*4W`EgDI`-Z0TyS4Jrp-|Sy`h%b-><}J zkO~PMkvnpe&_q4m9Zkfv$ByW<0Zv)%&CC$>X_FMgOiFV=>uKk9d? z-@8_7HO4nq85;6AUYVR(@I2|e4)8g(lG0aFQZk3|wMa=hI7$FZ&Q>b4OsDm;B@8vx z-JP3x>^uWYjh3U``FBC8aQ0<*PVm^7jwrf?f;Q>Z@<*?fj7Ds~? zo+5jMD2_OR3uyJCGhXEFJzq!2C>L+u)7be+Q&(kWrZnY1>fErPuyfp2pR+Zu>mgXq z=4F%Xs)YX)hyRiBq%ON0+=lJ5U;IQiT1K-RR72F-Zhy3W()#(oL23^2mkb&`#nv|d zTp64;5;siQBy=ZZ3BR9=D;~?-y-{r0$Z(8X4eAKsr%TBEXvFcHjCcAMh{cCPY^#5~ zu~9FOeY#k8v3Zd#Pu!rZX2$Z`9n}vFsvAntDws98YSD?*V*M6;3bx3m)OE;xZhl#x zK2!Zj%!3$|e4F_|x(N=$`zHGQ{JveL{yI7~w`X*KWJ~G##_QJGI`^@BB9L$B?Bwbp zVLE_2qQRJwoh|LVCet>EiWWvECSBBl+XCI_cT5P@6^jCuuM`S$tY(zqk+08dStSsW zS>zxj_1%{bUjM5SChuSKjsnc0_hC9?0DD>wB1ogE;{M4+|JdbG$xux)gQOt%#D$Jm2x@;!(opCbl z3b4m@l>T~`HRiC5p%TXRXRN2bnU{l zz1UM+p zXztD6lr!Ww8>I~vd_H8veo`d=-yoVL9fJc|8>ft07ILJcqob!`pglc0>-Slxyot5@ zRG~hqKAt55e61ixPpw=DK_DKB7g_gfl<3CONg^-W`ksk=B0KiP9=qgwuO(9*^N}6N z#P;=-wSHtgWuk^5`$g)%>upx@NCdr5GN@2d=L-5YP?OMCVbA`rcrl)@ZUlJ&r*@78 z%mV9zhTS|*Kih+&Ct~yIIaU&_Q<7GJreln~#qQsW*6Lth^!83<&|Mr2T8{C2V-tu+ z+->r0o~0u^YpXj;!5pUGJh>B@5UfEXjO+!BH*BobRMsm^c{PkPGDrq1E+)5?ctOM-+q z5<)WasvXPQK>Mk$3Ukpp3l99|jcM{Z3EpD|4-SvpnL8=Rm2CASrMO17peOs-x8R#A z0F&8wuhNu*w!K~Yp7_|j$z}CWq)gzFF7gz1!z2fzsz33uZjs?4w+DiYBI5B)ix7cZpKk10dO!;h{AZX=IPy$Q#Gr}_a;`n|?>YQ>PFTqZ1a5n6Hx zW<`;PtQ@&*!*Uoq-^3Q)(gqf?Kxh&D`ZBNc=JyKo$C_fKFa4Di6#f$pi_v}#B>J)z zbldajaJ+>ordcX4;g$&3jOHUk|HAfxkiymp)=w6nN$4>X*Hx`W#1EL3R{pPg8W6rh zlM{d~5~9|=W-m;w&BN*48VXTN;%TW@-U8d8{MZC;rrMp^-HvYY=FJn0?(%|(wGN-g zEgoUysX^~?<#t)GUrLTRf)AX}YZtpfe~3(fuY!-)At!fU4JzRX3Q*9Mri1cRLIQ5` zTI5!=Zx>|ZpdM%?6cpG{$9>z-)X1tA7MAiyoXe`J60}6uH#Rj%1$;*nu@?V10D$%$kr!7+ z$z##}X@}4%WXn8QAiK40I^aqvr;K7|ipR)tr6Hq*YrGLPIzGN!<3VMX$G_Oua0Kkm zt+Cm$2Q;b45hCh1G@KMc2R=L(`Umy<73IRl@x}#v4#X4d;9>H?tGZw}%%f}z|?I`B6*88F$d*44)41pR{UPK2G z#_Qpj2m6!5BS7GOaUW!)6Q=l9&%3dIyK&h$>O=4W9b+EeTjf%#e7Pa~I1?Q|Wh-?8 zlvcC4>Rlu2>UcVR@id+3_!&Jr2<)4OEy~m883wDfQ`E#b4E6tXkK>)VpSVAc;76&Q z`|A`6f71M2=v*-rU!*gfVCDADhF#lwaPDK0U%;|`hfG_vcBD;&s4c7dsICz~qNA{c z1`)>LkPr6U;SF)17y3O9Xj9{ZD8P?%Ke^NOJTh)@p9KLGHr)MuG;X~n@JT*r!@9t&+x53ma#PFq16_$4BxB2IeNcfH6< zK-se98!TvV7D+rA{%$B)8OEpNT#M-BgllVS-<~c8Z6Tt*c71L2IU;7bt0`@v{d6a= zK}>r`_{}X^$_m+&o_z5H_ooM!v;@^;vfyVyR1V?OI^t)Ykls)xNsc>~-?R+H2kD|_ zosfZ(TP!R`y}qvwgK>{!1SybtspeNbbD}B3F<+^COFl4Z){nTM%e7?bG4DS)_6mwhbkXsb{to1iyECjP%R{=EJ$1Rc-@d*T zM40!-(f3D^jJS2Zu{dHu>)6%+O3nPo^tS7^FCon3og*MxpTWaBykU(y;tlKExj66E zlcA(x;8%3i`x*KswLa?|1;fdIXWHt61CxS6UDJNBvIkt`{>xi#^!D~_sF#w({Y59{ zD&=BNO+!=B33QM`@1~2&k=RIzB$#Rnk8!)d7vLBX5t+3Rwvu926xPc5eR0p(lSXz* zRAPP}9I8Ayo+%x)vGJ(2r@6S%`)o}b&?)37@h*xB+C6W@>-1fQjLhscyRSjcBDzoX zitK2>4{twRNI7y@4D$?`U-25Wq|;%t__`B&H0voO{&vuCbWOPZx8-F zWibK30UcyTUF^+74j#MTVwvTDH3Lk_iVsuUsZ2Y%mY4%{76iJEk4+VD=*jKO!t-#NA`kr5^!eZL@n>Sc5eFl zzO(P7`n;r@yP@y!c$K)J(dD7rXXb#le7)w%n|GV-d!g_s>IB{8ZJDjRd67G(&xCDM z!6j{O+-R1e8M}B=7>k*?PN|FHx}M)VlZTsnnjB#&@>9O3;vDoQAO;0(erhhOBYSA9G(7_j(cR|Dz0$JMGRIOX zUK9Jk-1=AtEiX>R-%r;#_B!{e+8$nwXTOEoX~GXav-g8KhtC2ftOBGq4(k1W%LIvCR>|!uytduVX919FBeJ@`rrSS5Epbb)@eO|xCQ@>{)TfJD##Xw zpecX9^ZdpiDYQLK#{*Ju3f8^egF@yOR%RC0y!R($M^>Ax??u~p9)xD{LOT^pxWqDC z92!Iki{1#xi?d8=z3|D?GjL(LmUksv zd`*cD+6@>_>Aixs*a&p3^HQI7NAX`fYCa&dy@e%?h&b-qGa~DducxOjo<~Rf_IC6% zEtc)3E-CK`>T*O3dBnw=eP0fZ42=wq$-0(wqe8m3nAKv!*)ne$8zYGs>KmoEDai5J z_qdFwzoQLuX&xU_-SdLt;vui=?zjy*-zms((Iy(YGev13w|KfdK3Hym0+=g4W}Wxf znJc5)3=tdj2=v3YndwdU$9nDX~Y>72db{VAjGfQz&^}8^xshh&1e9d@#^S1r&kAmx}FQ6^@v- z>2pmJk)RW}$Xn#+ca`gZ(97#+%HLg=9+%#yEB{Niy}F9V>c!ROMHprI@|lz4-V2Q9 zxj)#hPQg^@3onzBv(?imkQqq{?KZ=DS7Xh-2h81Vfc3}EOw-N#74fqK5|oaeP1z+u zxRTGKKkpu1^qkz7RIN{v;e5sB&s7CLDTVo|YPM*vx0Um|5;B6%nBI0vKSKIG2gUYt zUtC~6HWS-=DM|mnf8ZQX4ot-K!Ck{gU*9JnfbP?TLUZe|OWk%JC(hNjxqpj@2(Pq| zG%q)MQTBh&f@Cc%nfgw%>BuBf7^g_pq(4Xc?VMep7Hg4&$d8kaP~gr31M@V_IK4ZS zCJzby);%cK@0)^k3Ub>($nL6EV_oR-D{sOlg`Qy+Mt_E>eq1DtC)Uj^#R%`@5sCAo zW|n=q&W|hiYqvwGP`uc?0<`;A(yt2z?YN>19TTnL~4%wWk zl4*C5f5QzF8A%bIS~!sUiPg43DnO4{A$d9I83`A z?U?cfX^$%O_<0p?n7S^QuFw1R+~?$ZAYMki68C^=i0JG;jVvkT?$Nq+mJ5&Xi)5;k zC!EjqI^Jby`FPABIXjY5~IubcHnBb}@$*`t2q{tIPm4|#?}DbZ{GaClZ_+V0Yry1vx*w2m`*guC#ZDk?IL zU-YomPuD2HvobO>E9O_OTD59$pueN5yRo6+=FM9Tj~iNBpS83+ec~7Hs`csS)SQ&;`8j3P zd6lIZMfqttY1#~gMW%TaWsJt{yp%s)zoTu$(`BPJWn4`W)6suiM6uhCE*CBFX100~su%KO-5 z896KTNAE(EiyPN(+`oVK;>C-2cfzMg)ErU8AFmj>M(xgmETdZUc-TJb@nF=UMXN4N zHE+tMZ+M6R06+jqL_t(dD=_I<_D|D3BOqCAx~auxa$_bI#2-gVXI4wARu@`K^Q{;$ z!1Cv%%zl$b!J zGeY)%*82~b)(|rmp;xlki+MTVdG_@6cXf0;d)A8R7QH<^a5qOrN9<#Euh)&pGH46N zc=PP+EOgsLf8=@d<{`dCNpUgyGNh-cAt0a`z5fhGeAdCBITY$JqX@?V|G-ZMeG>oK zZ-2-Yq)Jb&=vcXmiGK(lv4@iX!nA45!nC5LW%HITU4nRb_@LI@*m&#Cod*xM*_T6!8tXt5yZlir{+==3m*L4p${CHsb&j^5K~9X!o`O!NJnQuf7%t`4PLMnaO! zPD&}7l6(@$wTX`YQiY^G6nv;9)A=A zd=S>_4VhV4Sw+;6^>TSBvd>uWPYw|1R zmsc(8R+i_889A94qz#B)%O9Ul^bIJ~4e#L20Xh$-cXRDkF-|09w~f7p{wzpi}Y zb7w^gefPu!dfhHBNSv$FmsyPYh+D`%{7hFqUg|0=rp7F1MS;E4rbB7tMPJ&?UVidqOkaPr6QKH+jmhNs z8N7v)oU6gaM27!yl#jHa6&d5;Fg?uJ=xBfcK>t7=`XXb%%`-G7KYIpe)QOq+98Pqf zLEF69h&jnEMd?LZS=l+c*#-H9B_;DJ%FFT!3(;E{h1h5|X<)Tk048}zI4Fqcurf^8 z@k)w?x#1}%V$x|ki6i7fhJaS}({@%S)r%siYl`LJdbm5{!80m!(!dcl_ zu!>6Rg)_JK>2f$vojSdL{|~5EN=r*Wc>nzkZ*4H44Urk{#NsF7UknVmuUr(H9*O~< zs%nv8!zN8eCcRY23sp$7%|4?eVMRs7_HEk`Z>pj3@%anq@!E^&4bY*U^{kyA!jbU{no4TUbnHbPYj=$Q<-a&dV>J zS5#46Q8aHJ+LzIgj6TZ-oeuqSFlP^cqhzLAHjC1h`fD+Mitzb)`)VBhb81#*+K^JR zkppJz$4ko(x9(vVhilL3ZB{C|R4JjbRFZr`1ovVPCg6{Pd=7H-^q-b|rKr}Sb1{KI z*dV4fuO0yfu|>cis?RV;pVwchR%(p=(b78X;wj-jE&ZW4k#P8u=&7aCr>A9LtQQ;=zP)=doIiK@@|9~>uAMu7 zwyeAiwF{ICX4&)h;T8PkI)|rjg7S;62ZcsmwqEPOCoWM$*l|5(bLZu9X7VxVUtPL2 zMWb!8S_WL`3av=jYD!a06&6g8$>z13nfwIdC+3Vsp+}^61eZjFNSJiVsD-6&0{o+$ zze)Kh4vB+*KoCF}gt0(e3pNU_7n1>Ca5p?qEO16KYX_nv0%D7xOphdGP!d1+k~68`E#VKf%a~Wy{y?+4~OSw#)7U zAY}ZI{eLhdD1qCb=lBymJ28LM=ue|kS+&+wOG;5eVcn8CL;`x+(t@c<5$_Js9vT}P zJ30}Bx#Q05dk8lP$Em!$V!{0R3u`F^GwdgZGtQCx^#=ksZr%Ld7heDzbRpmM_S?I6 z?@migp9%ia^FKxOWVvX~ZJA_1AzI?^% zHES@je8c0%h_hU~sMb_&QA;zrkE@+0=6^KwR~Hm0a&l?PzP6{B+mU+?Q7XUD(4W;s zSdFWaBBH++k>gz+d@6-|Wl2fZhB7Q#_HB0I!>ftt;Xk|Nqhqqu=^W@E?CHg1dlak= zYdH3O{fIUPe|`|(_Lx8KM*n5J&gY{27*!Pg!I#g2Uyn9r3U-l~hXIIqe?%X7c_=?2 z@ml|!O>IFnE!jraz8d_@Pe()C!WH8ROZeGH*&h}JgH#Fk6G;ilpi8OY8)+>oDPJO| znZ%%cbFY#k!Nkz{aq{Vn1~&)63hl5b%vgT3^`Dx2rADtx$x)fp0;7Fmfcmo{y@V4I zi>k$1q%x*ay2D_MGX7K3KU}fNVB&Vd~Ma4w{{(<}U?K`ml0BdE6NR>dE z!oM?aU*1Y>v!kCShmYC)g@V6h`<@FDR1m`Arv<#+J`MOdL;sCeTMGGOf3%E?GCG>1 zWs`-Ash=ze{qQDklUB-V5XW6vi5=u_ZEX$9oXssw9c}HseMG|b4h;^CQs#ML9K#Lc zRZ2>7R#rA<5!6mfbC52XRBJ)_DhCCU+X7DqQd{U0-ZP~iMVtiKNT;-X*C==t|IW01 zvrR?%F8X(X0C2X^v`OR|_Of4&@HcTSZ?hcx?~>1s5SR{qqR*c>^TStPebvxdpPs(@ zm6u;8Lj}1 zX<11{)m?wTK>WZG5)*M2DOgvqWy@1p8JV^;sY(Dof%+{FCZF%G-~aW+3l}FQC$?Fl2X|T<La5)JU0XzL`hsAOrgqN1w0iU?z> z?BS2x)7?#gKCU5SxGv-IK0a>o_Ffemmyv}!pFw6(YVA=5AUrH0I3x&_-q+9HV)5c1 z;zGtpc`8S>IXwNb`juAa)z6k1{$>&kHMYu2nC~R-GIc7aUQxa_UvnzysITQK{k1l* z*$`s;ku)IilDoi*`jx|OUfP%Tq~(R`{|wvr^7f2M_e?05>}_@H?b76ena+v}a&)pK zd8>yXfhT6Lj{snX?aS@PCO_3MeH{Gd=0$@Km8{PE@Was~U%+y>_rHuA?8Z$j;bL7f z-__{6(W?dPKjsPxQAu8237LtpaWUDObD!-v(A?8n)>v_?wD8ugTa}en#4D6`l$4d0 zo<4m#F(Huz8tXT1$Xk<#vl!lCL>PNGn8Q81J$w^_25Pz{TEq|_^rqf{RVM$WQ19pf zcU87aUT+Hhs|)O$gFcaZ1QLGo$tP!jI7=Cpt=qP~_S$PHDXD6$Oe4do`!CQmHw}OJ zC&YyzW5>~HH9TjnH88kBX8;)^yBz~kAc6% z-Ob|R87Mhk(z>i@*p1O@jf{6d}Q#)ih)+B)LkYS>lZtFN!8`tvw}Je0_suzLG= z2LuF0MU&Vfn)1%1UnJZ+2`QYCLdImKG}PI{gp5BjqnPZCU-JSXhxvwq8|-X6F$Z#b$9~c zGdv^H*MOva~IWpN=i#ko;Z<} znVFrH?P;-jEK48R1gaW6i>2Rs1O$47hP!$DxQ&mE-Mik^AY!8!1@@Kq`%v(7{8bJeKs(%C$v^iA@uV?D=~f{me`M#n~a)H$2#9a<$tkYij<)#{Jy~ zNn}}exBN~~(aoDT$mx*Cde)YOo(zNrx@+tS+Jh8F{&A>>D5Nu3-sM1){9W_(Fv#TAES9NiP*Rcecf zu+R{k7qrs(;P?nI=OW)o-GuThB105WbAex|R6e=rNAatRf1!n`n+Xy}_z1;l2N6v> zF8UD&2xC2Y@_%A-91mqw;wx9KQg&?Xj%|kzzlhip^<(MuLz$Gb*5=`1@e1@$3P?;y z+PZyPeO+BuW#ygH670*jZ{Dh|uBu^0udbG?VhIUJSs7V*YuDtjE6B@TlbV_;6-1V< z|8^cTNoFqegK6XZk7qyo>~pg86M6aWJMSKP{*baM+f|aev@gA#NBh9!ERPFIodr|b(ey{GGm=b{Mrz>-1rOm z=HcVXdcW}o^dG6N=kqT3$N={c``!}?ACgy)&Vm7@hJq)k^rW+CsBdj_(qZ()x+r}H_$sFZBeSkjM z(Z1lvY}R(1WBW8YJ^EK>Wz`2;Hx%<2zn0Fi=^HpPJF1T62itYI;P_|K-2?5bboKJ~ z{6Mz(ZeK9x*zS_I@8#_gnc?jphHvsjU$Yb?@D271OY#UwcK1=Glj*NX2GUt)>%Ru4 zBW~3dL#}A>KCJ&R-qEj)UAl0IHJnXbHXnZJFtcdvFA6)lQHRr+w{KA7Eb*)Sr9Ip% z?iR{=L_|iA^lIPUy`;p!r|ia!8{eJ&uIP4AduInlln7rsb@~*!aPWyBNAupjd&$A< zLnLy5S7?5$Ph{X=ZO>@uAO-ro;{pScLVRNa$%A1K_M_o5xBfqpzot(=gk9gbcJ0fr zzQlVDfq3}E!@G9wmQ23W!|#&!Ur~?Iiz%{anfIS+ubVb*+`aQ@%F$F;-TURQeu?%; zo^bLm5&ntsl5-zF9}2Me`1uC;2T~|DA|irp;Gv;%!WhPf;E)ie6KXY-(F`alH%E~! zGO7vlDpim9uNb8t#=kE73QOcWL_}qatYx2BR1rF#y z6NHSGOE-U^7X)=sHJAS+z99Jkq8M|)ojXMYAYQqAxvRUUr1(z7-MeSco{5TzW=U^t zUj8%B?c20*6YKR75T?{5g*iR&n+kv-A>|tzxvSfZ&zcjAZ}lCz0li-o_%I&bt*H3$ zqmPP;3O&3$_Uzg7);n*hGJUG28bi+1e_WMEE?*wMeZ_5T*fTZ5vUR6tLZWtqnWckdRPn zc#-o8I>zTQA}TyIBowWldo+E*VxqK*>Mo&6>!fXd>I7NPR&rntw_@ds*D0 zR#}4r-1@t$b+y)^A!}gZ67sL~-st-D`p;d{fWH9@vq^O{KbX(6!9~8%U$XWta8}FO=Husokl^xm_L1jEdJDS5D`q#1 zonm&~^3?XVO;Ot7QTlGj8{~@FhH;#7Fu!|b`wQLwS+?(K@d%1@4~X`dl=VQy0W0c{ zE|uf>`U?;LS@z$Q-qVLaDP=C6zi|Ak<1Cw}rlcG^aA57)wLadyW=poCQ{b1Og8a*5 zw2Y03$y>8#=gysn4eP7sI>_P=`r^Ft0+S%1LIy&m>;};qlWFe@~ zV4?dDvuj^k)0_O>Y{NKCIhfzAEclzy(O5KLFaCEi0SkYMF7XRz*fe zvIvCMsrlEOsHpxMJvAxP{HS|Am;MWs9K>tN#k4 z8p#^-=6)XGqm&q-A5B6+HbP43sV@2v2pAyIhvf^Ok3YI6{)qOcBG&k{l=!t;DY*T~M<0Fr z?YF2R%uxQ~&;C3mIaO?qw#@-POWuFC$%(P5s?qOHy0tdB`v+RqZ}Bcz=jrcn7u*_} z4&7IMHeqZWryR`h)Q$Rwjz3?z`8CeS)Z_B^3!u(B$^(`uC|O2erO=ByFXs@OJE>hz z#_<=yg#6je zIB|*X8IyzP^t7*CCe@?V^dUOR!#_x>%Xf85bhLRAOl%wYH8dRoC|C5=`vjZnyY1RC zm;Yd+hhzsmy+D)ICQt$N6c0I(d@~?E^5pGi5o>&U41U$)R1Bi=te+SkXWG7Mbz1a~Ss4y80HAto z2ZekzJ4TE8eN?OFJ;qTVjOW>YVcs;QeVa^DB2^$f1x!3eu9-ibdHeR?>JB?w`(m~c zF%LY=mz)A0XYaps+rZf4`_EW;r?~jTkN-d_3Cvqh@7}#=-qWk@%FY8>@pTJ*CB z@L>pMEFlqFctm7&PWJA7dvRXAbLY;j+qcQNOc(??F|S^|f`*FrhVybB-VS;BlvW~| znUP)+5-53MzNC}l7wbr4Q{&MiN4`FB5;Mu>Et_6`>7|^U93O90XYfgg&ILS;%?-weLVb@=)7|YP{Uy&M)k|v$*n~7k{$p2mh_ch6c(!eEM*nIXzN3jGMG`vB_vAlu03@VL_G$3{km2ZzR~zQ9Vh(&>SW z7x^2}|{JUmBnf+mCGK%ZYri+5Izdap&*pPh|9u`~Yg{h8y(kK=>0Z{M@qw`~QEPAcC- zi4*wgvCqaarXY4w`-61Z=;C7cpA>W>!^3!M;dT7G;+uKQ1 z*VEHGI6RD>6|P#WGO~(;Ux;Y)WKbf#MFIu)#5IKLtU3^BU|(x76ajfZwJjd}CuJBm zrWFu_kgJUv7FT{Ui>VxbQ?+82;nHm~{?x9>YiB-<0ZnkgCCRlqDN}t-k09~$I z-2sBE&MA##{@OPmzEJ&lwQnPlhvHYkhi{r%8bA2pcc;HS#jyC)md$Ux{(5G{Y8FtZ z(v0J$>Cw+3!r#-wJt!b3Ff9n903|ODb+jXP%1XjK+FART8yM09J_urrSc0Ij| z%)Rz5J{rHy(0@nLQRhxaKO+2QE8m!mH#Ih~l7YP#2gkqo%fHCaFTnbb(m6alGCIa# zXoL>~L;cv7`+LZX-PhlTaf@OC92gc!2*nMfqw>f7Bf}%yG&+KkItB@{^g(Qn2b!gF zPgVysOpM0(S5g9pY#X>o`1*(~nhzG#(x6}lP^t;aKgQW$tlhyO=&m}_hmlnjU5i+- zl_A?3n>Hj)^U56q6saLjmi(Q9{^yr|n8=;|;mnUeo@1Tq*=L?fOHG^K_5qrPnvKd` z?azh31dNZ6Z`x~!#TjDVdb)Z#JG)w1o2n|SDk>|gtM5^l1Emv}WJ2NKud%TaynvX> z#m6U*Nhx7fV*2W|^wp~qR;>yTk028bkpXa$@;Z{Tdrl+&ZPX;g5Y=5wt^_XTheyE2 zymN`iFBknU5dF^-zjpdDWRr`29-vLRV3XX-5{Xd-j;mDDr-CaF|=)L~hYh;bU zkCOLtPW|=)97sPgtHrNMh>nh3lbgG5-!lzOjn!3^SFc>XeC0CAd`DY*Yjaa!Vd2Sd zPO>PNm6g45{lqeW7|LSFWPcFha6ZJJfW zz1@9X-JR4qsl9hk0#&Li+uK^ZI^`ey#T*&_;%-)9NIR1e9uXhAip9mOtc>KO5srW@nK^yz2u;SV*-_!{mL971`el#LrV z9(v*Vs>-`R{&@b{wQH0Cp%7D3LsNZS-Ic3Xk9=_?BO_zG1k-IuO-`j^2BtSGbOtLd zJbz6SJ`>}kXwTS`EACd($>*MV?wM!yMMg%Ukboe?wvWTFxVaq%5$&fuUx&ZdnUH{tXMu&tAB6a2|gskVv9F-Ziad>SM?A1gFYlUx|V>V=89 zv!k=Ozqgw-QC*Y=@4_P1-`}q+)5BvUQq~qF6$`bPo<~P%W_WmFU~q^gjSatNrJae| z>Vc!OQd>EC5xbAir5E}tuFj$GMmRgtz{!TyIW#N;_XusAMn7dbr}k*8eoEU_?V$Ej znS^GPeH&F+4;Tu7CKUBi_R|_)rb+*^9={&iJ|w{EHu(<#IAFxb+pcdchyDwOg|>{T zr|Poq_cD;rs-tu5Kd$|10cL~%0FX%38|GsIQ_6}k2vmidZ1PpZdO5)d*AT*jKmYuT zs;Wv{v?xHbW7iJ+_#9?<>Sbj&EBaYn_@HrEWQ{y%Rs5>_wfWeW8yg!hUc7ke;>Ejn zEAU-IYobQe?OTN>zB-r15nU-x? zztJ-+lynVd&(vK;2c5D154CSRivBTam6qNmQx*jkH*DJU)Ki=AKR~6%+J!bR^>f|8 zAr2U_NmM@JhT~KMLnSvhl=i;9K4k*y>gnn3>f)3|@2;MK{$cV{V-Xu66Pp~A+li?5 z{8H@DBO?=?U6WEKnCSz5vY~ft{RCE^1d#jSpy$XiuF$^!@~;6OeM*WA3bf!hBI!0F zBSO&d#hOND7_p{dmF7s64%wI*`+8H|4pm;9QgH9&$R}nB?oxG74G1C@5X_BP66_>oRf-jgMz<8Moj$&=5s{@JNjuYVB@^S)G zh%)T%=^7pshh?}zFTLQ`A00(uz3_-AvRkBNXJ_ZGS(6aA%2!IBupr~Z{8whGlEj>O zswt(GPJTWDzYg|Q#dE5Ia<-WA-xeUF)?S2l9Q7ZeM%6dt3xl!LUFwqDt!|RNai;-j zV=kkAVoqNWVEp4*`m*||(GchQm->n3V`tdDG;D*PdWzYQt9=6!3k{!%v9Y4U!lTEI zR##UCg#;fuaA5b-yHyId<&9qtPd6zH>*I~pEG{;-pkO`G&?S`rxKmPAMlfAfZEY=a zf=vyLH*Vgb2q+0OvT-!U6F4I?At?cW2S!|Hpicx0aUY+2^2vn@7tjVaZPYPdy}6z>SJG<$lXu@anzbA-;bAu)NX9GM)0 z0x`L9LfvcJoC(G=!t?@I0ruvDxKg0R8D?m4^u)tLWp6a!+4<-bT^%idaHt<>An0)9 z7Chv)%ZAPWoBh$W+o>mV_rw#E1|i>@)Ii|DM61MJ^JNWU*SWLpSSkSH{QS|qGLnt znxa$D=eTvW@YdLsb8f=}?oqK`8#i0h(%n=r>%5Kc^5)J$pR7{fymg(3dnS(?H*6p; z7TU6?^psc<4l?>Fg2WhqO~x|$OAOFfaT}SyZG`d;N}1>5*w`pxRV33upGSdb{ae!H znW{UAJpLtG-RC0OJ(~Uyy1ckKOUR>gD;XYgvyNEZXxXi?-lMTWw0K-dw1Jp&lzT7y zmc7Z~tdeTrI3XLEG~gX}R1hcA20D`H^Mo*vhQlv_a%E`m63ZwGz4%D$9MRsGoJj(v zH>E3?=LQg*VSMlD>T79j1wXtcDm{UiMkht%F#RvMNRyb9^zG8J-p;$sqZKp&yt>HiW!kUp3gsc&h$N^}+Z;-EJt=j~E|k-G47F#cb~^ zoUMjR#wz2)1flI7`eO(H>6td%8=Y4_SN&BNg#Xm7w%-C$xyFyonT@R}+dXq?f1&&D zYG0%JQTTOpYiw%z>iE|eFI;2{+q!k@i-%uIOq4-Xk%h6dA$`X5;{@=BFR*<@`1mm1 zq^70r*uJy1O^QvIl$72sq`covVx^1j6p^g$)alc)(J^W1X*t0;6v@fPd@$h$QNI*`c2}FmtJ}a7i?5ygYSL{zY8lLrqO?+p9U$-Q2s23_8A>1 z7=7u|W&8{B*5qy8yqU#P{klqg3Wk1?eptg`lW|dgV-FONUy9cPo0W0}I7;Y$oMS1* zT8yGfupK@R<2W))@{CbbQF2i!8#DH2%+8Vzj_l6t`v>~_diqEVhcZhF4*A#DOPUVd zJ&DXy(RsQUt}QqZ4Hc&c7{NkV9$pXL7CHB(7y`Pf=&bxBfhas08X0HG*0D1}~^5Xwl1Bz6o^!Mon-t9p9G%{-(q-yZqSx zL;I+nb#-+}>3cQzFd{cKH?=gkw6(Y41VrE|!`3)8JVwV@Bf)bacTHYuN-{Z)P(2e9 z6QUxc(MKuDPEIvO0sM3D$|3$#L(2{~)t86pKTZQ56TQe!v$lqYn+Z)t1`p_OPSbxA z*-xPS7t}aC{W!qiMn4X-ljYQZp=r$y!oT{|)qf2UH+RPPQ>RYhh0xX2ospSw=!HY; z*R8`?#P`lD-wcdSZ~S5{TxZE-t#HHo4ejK+tF5ajzgt*bbn_-w=F*D075KQ}&WsrX zn{sAW*4i~|$V--)of#Y$JVpL5I{l!weShlv-@N~RU0rQ#Y}}h~y|riGUeqHyNvkub znqQAK)D55fda|L$-OJlEcb(r;J3K-{VLrux0zs`nDjG9X5vS_^jN~)U9JNdji%Xbr zk+U0bBNSUbjS@j`7dj5756B;)o;=*dd&6B`+7-Q&Qc7Vz&qg@ zl9iK{l9HN~lq4=8@$qpnv0=p6hK50ctc%Dpqw=_4cJfEzi(bQ&+P*polRBbuG3BSN ztdP+GlbCFpqTR|abYqg6?KV)Q?l8>p=5-ks$G4q(`{vUY zs{gL`1$}Ifz%O;iPM<#g<*{Qd^RG&XfBp5>Hf~tYfTDl&gyEM_mRDmvHYz4EGb3x) zuAQuqQ3mAJ%^O#)Tq(O-j|7C5Rh9rb!`+#(xqQop;hPw} zA^ao;hcG0Ig4!p4SeN^H#njA+sHJj1B&f?hJt(kJfP@IY@$rGtF@}6h*tDeE7bR7t zgcEZ(Cn}0grF*upaExk-PbfYSr2iJB)E`^31hQgZ<^&@%+A8MeAS#lGAG9QR#^gr= z0;2q+BDOR{2$OORu@6czp3P|ddN};8Znz7frUSNwgaq_!+immHz9Bt9krl;BDT6(Je0v2GcNQ_nuBIY>Jk$ZLt@R;)U@Oj zycv>`lT)xMqj*Y^K}A%;K5EnW04H*y$jHQtFw;ZzAM=K#m!C@gqTAAObr8}rySEJb zud(mqFGr*;m3)wqL+Bk+GB>BEe;55|2t1yC7@uzy-u~Br{nzTM>WIkjg9i>g|NM(M zb7@4&-T~!&Fh4E5e47P+5$Y0h;^Pw@9!7P9r?x)T(cWHBQF-g;t!vk=-YzU;^|4xQ zmo8qyTX}Ux`i2b~$?un&lTFMDi``iL)N>b4exjIB8vXs>zE74C>~+*peB+Hbm}~GZ z)4}hO$WQCw!0`8{#;=}ppBVQ{O!MCJoL5?!yQJ>5QPZ-dpGVO@4#E|c6$G;~){-L; zFDslWWimS&I#gED-%~$y z*E-@8==S%2KNJ**u1>KQrN}Gi5%hZ0cx=t2epdb?n8^DEus=(UaFXuvj;Q+*5~&Id zGEvYvlFV==J%(hBk%&g@(4HQ+Ekmmqmr>tQ>8a9!0+01MBsdhG5_Mg2)QB#x{_rue zc!}~QvjTGQNiG76+4xhV&zmAg4Swc_xzZ1jYWNvoVT_K6re2#3S@YGt^XrGUSDuIY zk&PthWB!7LnEd0=Ckc`3YHRThL7its4KI<#hDK(cEVFSBw9d2-;|z)BW1^#y5|dNY zQ0V19wX(?k3B55fgcC__0g-}P^m?b%@4+NHdYo!h6hPo+LJba<$C=f8b<^g{OE)&67f zi;Lsc>sLPi;`8$Iir~PYx88d5(4psX>{4VSkefUGI3fIzNFGH0`&-aR86Z1lD6hvDh=)5<9kbhl zp@oxg$~Dodh(VJ5i|qIGvOSUq%QgLl7@)=CEN&8#6He`v!I^t78%vlS_BtGr)FZ(S0;?a|s!BzGn={&IKtM3+sMwp8YqNMv@F%G^P$;B2wzy8Pw1Yk?5QdE8 zRexgq67WATzL4#jnvg9~Bj8rnFdwh--U;g;zZDgXU2~(+-inC`$|1SDmH2ql-9%Q>v`uXhIS7e0I0tq!6`RSq`=cFG7 z^@fJ}KYaM%wX4@~K_tWQYp=da#D+FwDN>Q$V$L7cLl>6*!G*Gac@aew6c`+zkhp2{ z=I38LL>UqcxP`ZF-YG6&QS#oss@l3*>Z#!KmY$ZDw>G~ZKcB33scC5_Aqt@egccM& zl*{<=_rJe*{sNr0VZ-`2-g-SHHHGm?lo>T%iBe-IAx@z`V86-&7X@9CZ(!j=V;9Twpg1;*;aNUQNTa%MkX(BGl6-@Y+=V_bLxh`J^bj8p z`q5xh-LKo0~80kbw~T#9N8kD0wSLj~p8tn-IS$Apu<;eLfKrM^to7WJCl6 zLx`c|Ym^zJ!3d^&2FW&HELZt6#lE_9@?Xr#CdtqXWmr&`M2y=0I8~cLVFvgWT5O2m z2JZ`!++u6gC8S{Mqht<{K};(ELrZ@ zg~{?wil~Z7$lTPK?1VfRZwK3~!@cglAs&H|MmH4=88<9$|9RRR>7Rj-rBs|EiGq)a zh|JE(*}Hd7Q&V$wRn?u6q94wjy?E(zb7MoNFcIH%CVhky9^$Fo1uYHr?IN-1V#W-BwI!jL>(b>Y$c`j@>HAsbYqs7UQ51BGx& zL#B$;BJIUzf^(9?Ve-S(nT<7Nvbm8RjuRD{N4OsGc0**~z`l$dDS!ArlbWED(j*;S zl*6V>Nk@lN#>4-4a$*SCV(nJ)MG{VnshKCrv{1NEtwc+ zuSV&Nj*W^4kHqgC=NVQUaC6WT9ff*3RVy-oGUOZVsAvskOgSuzgb{)@I9U;Z@!==w z-v*#32tFdcY?!tI!UZ1ys zFXtB&AQ)E;etB2&b+LMlCXk+%v3}eYD4;ryEp_63;)Cr9kw1f)Gi%;e*+k)Xn}r*poRYk+UfFxB~Xgd&!=HKs9aW>ZJ{zwubQ>EcyOvk#Chzrcdj`ilFoXV)y?x`M3r?T&fL|yc z7dMtv1O5Fd@RXC2z4w`YKYQohyA|a}j~x5vo0CmVO)Uh}wY1zRyz||u?|%Ec-{ody z9e(L0?8`B+v5b?ZyMX}OzRCRmC;97<{bzXp_M2}%{`h0YOA5ig_R6cfcklM`bqt!C zQ~SD~3T>*B8iDiI{}s|c<(#iyr?^K8_AP=d;}hahuk^bM(=7-3r?;xhG8CAL!k%J% zrvIc-_QNv;;$V{(5?5y!231Zhekwy8J`(s+s)QR7R3~~Xwr2`0jFayf?UlNLI7v_l zyN#L*&8?lC9V}U+ySKD9ceHnsAX-BFCMQv2hbD(mgi)1gUq6zTS*k{5Mb8ku6&p0C zDmG7aR$q$`$^OJ7?IpznEtcTWFjSP-xH$HaQ4!Hm1eit<085M>H_!wo?AG>nv}F3o zM=H5tloW)y=-(VAG$a(pHB{zDK1lT%$r?CPTVH?e^5ydvE)*6Pk^q#nD=bNnCS203 zOh8L+EcTHSB|0K%bu^u2Sd(uX#-&kGkS?VK2?1%C(%oq=8tIab3DO}gC5#3M5s`*X zx=XsdyT*XAz0d!{`+V8Q9mlhK_kCa2b)LV|yQjXi-g)-dGd{kwhXnjbFL=#gJ-Cn~ zS|4X)UsHi@tM49<+F@SZ3+Ud>mub+DKkun{$U9;YnCXM!e;%lT*Ne|+Hj2k0U#__Y z#!9;Fqevn+4kU>(}X2#YDZ!!tM5ftAUYWFd!k~($1|cD=$(p z2zUnsfb9gM&L*@$z}m?FwMG<4T3k}y6RS7+1^44csp&oO(f?Th@Q^xyCw+ebM|o;G zlRR`FW0pqtFjOaxXq`b*&S%(d){d8%;HO{iURP%)Kxe)=e_MQYEZf6q9lTZ;1{^S4 zvXr}AVf%$FCG4d|B_%>T6wk_#og3$Lj+no`Yga(eMvYf4$CwJg zirGa;mp|Dr(KhERk-e1{;@A3W2d#Mylz++@zJQe%y zAsy-D*Yhv31^)s(AG6rC680r(+0?6u_aHK~z_4A)g(%!wmB&TX`45D^>Key^u< zrP}96>~=8#*OG&d2&3hgIycxRFWQAX4iLk!Gy+S_?u9>!4O>?U@ZCg1&3bxO=7gff zZE6xIxElFf=3DItr>kbQStpB#1)lvPt@moCdVCep_W|oRTMN&kwmPdUXcq~~JCBSa z^eeluqx2|Q)TePW##3d*I+D7vc2O%d0FN_X_dVx+weYR*)`%2!k@#>Jhi^_`H(JwkX(J&p!oIvBe*yDA==(+aDX9bmi4tK|`0DAtW_!4FjEfaA4xb*yK@RG?= zWs9W$O~ZzlPh}z7di(C0?A)CAoasUB4&>sIHkI@}?)?iE6vfPj{Z;ZRBm7t5*q_PC zqXlo&(F&SxAAo4v0W?7G>hkhf5v`n@?27E|N6^V16tkNv9a*GHWy$)RvG z9UCBMx)s2j3)Fe-=Ak12oTxVXQoD~*5PY;SpUHHeA=IH1?O{ntTVL@$aDAay&hP3x zZLNL0(XhsG`ln6i(t~gkM(hI{Vix%~ug)Cfu&n74ud|X5O+O^&d`w7Y(Xs;XRZmuN zE(ogv^9~(j4mbmplWUC7J;?k`O9ew@lon%-#L?klhoYQX>gDyC^fRo0u8pJwt30sA zsFi$k5S}^Ki_U!d?8c`sN?$4AicM_}J0np$k7ZnZy#cmRQ(FabrpCanM=z-9=pNJ4 z7qBu8!_=%qF_;Z*gAZS6y9sk;KOX1mkYN%FWR|G-qOO&Q_6? zyCzus8jv~k=)ZZ%!NDOc?5XMEVx&dth`n9}Bp82J#<$EcL}z) z*;i_#^zhj;#wJ>WMCJqviP2!Nqa!;A&}+>}20&KjFr4#6F`b2EfM<^wf@puJ75tSS zi4&$6nlLrLxQGH_b}-iA+3ht?;j6Cb+iFu?!RN9 zzVo@M{A=B^%KeZ!8XeECV(heVxJmZ2S+T*j@TXw*;1GL_2llp>{lr<-q_FJ_I*4zW zUiRB7JS+4YN+9Qf%Eo03?{a`S#yzf8oe`{DtiWkb6Z?w}z!jAHNEuU!o(!*NWc1*HfGMWgZq0 zep)pLSs?1`zg#PX!u}u)PkoxvUo5vB8|RWrfBtT6Mt*g=E-x?sgy} zqt5-X{eYD1;Vo(&g<4!(G<2`|MfH!C@frTs)gLvB&W6tZ6cWfYtMiesXh zu-d3Gkzd^W^|cn?)%b_-ggbcKN$uR{+u_s_W+!Msn4W=<=-SAQ%gSz6AKzpCpNP_d zPn4b)_$(D^lW8nLsPR4h(xf8-#0li$s3C=d;#2VS-708qLHez~M{9nUq|ghd#{@4c z(oU}jDqNP~mx~xkqn~N8g*`aJjNWPQc22-+NRyPz0uqFNJGH3%;C8uN1kTd#X;2>25R z@wC*Aabd){@|*B@|5$HL@Z{!vPvUN64dBD1(d49UGVJE?urZo03ks<}rHU5Kz@-p- z3Zv*UU1b@6woFlZDJatwC4qIJVP4q^5q|ygtH6Lfwy2>5$qC$8wgq`$p;H460C@XG zdI*5;E8_>a1hA@mT%qw zX4S}C2rM6#-`Kbdkn-=&cV8w8sB6~3U;_gK0|52lXvtRj7*5dc?aLfW+T~)ow)!MWECW#?mafUx3S7uFgGO~N*Zq))>cas6i zHNSaaoE#BrnZRx|GWf2=qEpEha=o|m)@VooGa`pJncn>TgieLPU)j;2)wtU1^{wtx z@`<>AP(^4u@=ZQ&Fa7#g*ARH^?tNqa870+hlm~zGd69o?J>SNwf1_NN-urf+^gXqC z?EmO~%QW~n;G-^d8dH0L`_p+t&E|7_e4+ohOMLx5aYkkG4jcKbM;e!93vo->9m+Cm zs?IF&Osz{T#z7lB@s2aqYY8S`@XFZi*u+w7c4Ai3TstEpDs@5|H?aFt` zNS-oh*Q1>rk_(<^Ic49&e3om=(5c9!=6f7yKtbHRUdG+`v6TOL#QJ;4jo`@diz1lu znrWfNl8b!P9E@=*d`ey5_1*bl_#wO^h%&_+xEm*19M~GUiDQG2Edj zn?KO}O$;*F?{N0VMCr%x;V}4J3tU|#%J?;YMvr?I>dyKvI4LDxP$OR(hn6%_F(P5= zX!DG+D|C%EJ1OZ+u58tmw8bTS?9{j`Zoj-JLQ0m>WBp(!y09F_Vd_UubzE;U?-zDP z%jEjzlv>9;$gj4ls+y*z+;ws%&G;*?#{TKG9z`R8<1}0%9!CPMMq~1UNWa_J^j^S! z?dB)Q{HO2IDv^k6r=651{bEqtlA|5ltqT+)sJhOk+yhu8M{=cl9ky;RcKrPV+^pK6 zisbCN3Aq$gQN7XKp*SAiM$<4m=rc9^YU>y=dVOrdzj%<|vl*>>xihD*VR!6y-t6D+ z1)tkAjVFw|8e@*cztt+{L71O;2DQy;y}vAc@SE_|c=Y9(3p3tXZ7Qa#6b!_fO=!z@ z^HV;iM<0(aFJTUYt>{mZ$?$Ws3Bth&FTCiDs`DD zK}-M7#=yYvKX)O@^zQluNX)vM02G0#=Fcz`S}Ae1BBkWEqK;Csaly3g5b=Nr1BS}a z1h{xW(nmm-c(ThhGRbo!VX=~yR~as|Ha*W8-CKV|;(J5o6Wee$U4l$Bb{j#DIs`te zI|YEigM$M|FNe4LS+5*b;y-p)`I~N}^fzp~lcJwwxMg$1=?8YHsCE1%ZvEn^#uY#d~%oPWk%W?sHkK$QnvG4~=lDsExO+iKa|B`dmq=3GpP^Glk)2S% z^nB(6H~1z@r;GD3k6v4{lcvjb%~~{CR9-@80iF=NIZmVsja`DZNa4NF)7M9@v7oQv zs0w(q$IU>)N|3q=(+KG-wP_sR^EQ3dN(|(t0yEnbboXU{mW#f%PTi@YVG$9A^VG?6pyhmKx z!JWwgP8y7r>>SW8h`icq}k5-iH$0G12 zTE#`y=dGE1AeyKjwo#R|Ooh8DQjQ;stX4sgqa0i!=*^mjzSTr^@D*=pZEnD^gmoTj zpc{<8dK?MoMvFr=^g7(%4>S`KfAaPz^hti7pz1q*RFK`^I=$EuxgVWqWpy0imN6Hg zqvK|64VW07xPa+0GY@8{D!~mQ`!5zPHmE{cm*1a4a8dDR#>K4q95W@@qZ};nFRgwh zQU_jNROi6WrBwS#?g^C{vSWiqo_@wvHp2V zgm`ApxymR?$xmJ>)Yhukmt3M9Q<2XCywCYk}K_8NA$?&e}R8oJN`+Z zi%aA*ptFy%da0IV<%)j%xXN~gHTkZwzWkFd=F*W1OlspjaNiFNW1+?8{ry^W%V{?q zYq5C^V@Q!*{;4hL31=0`;|ULaF8Yp0k9gmTLV0`XCQ9di`n@kg&`or9b^?BU?TDDH z=C>YylKklIJZ_d+4A>l9UGFXvAgKL=>g43)|M2wo8zo)`MF0N%D^#W0XL;@STIOqv z&da;11l&hU&-rhrsxdRe3k`umLAk)*FXalCe;-YvFo-A18wMH8m3e1s8q&?jCu6ho zm5I3RdT{gy($F_moflV@^wN3kc5zLfF0%yPbHb~&=+ZjV<4&mCE70lTR=;m_bcK&uH==9Cow{MTL-X}K#e{)Xg zxC9my_t{%6_f<>0@b94A91@Zze|`X`e|c5aGZ&l$SIbCu_e8q-mH_kDZYCxw3cd=T zoIa`PslAoV)9lP+l&9*RHDLj>(18?2DwckyVbr_fU8zFW4@A4QzHaokp3&?+ChlLJ zf<=U3N6yP&om=qSXH?gBTs9N~m+ew$JNnJQSkTp!ai5)rpey{s#nz}K7Gf6yHhSIP z`u>-TOlF;0jJnHWv-{1ujl=C4r>frt3q;yy>mLWB`>A+(5_xeFwi^xFG`R8Cnj02*wy@T9L?U4E)YYuU zMM6J9tFMLuuFZz3)}kz>AqwYAwdAWm#vEcCX|idW)@uCWgRbERWBo56@sZWZrf1mr zym(su=wS4l_BXyEIxk)V&nv!oLNcxOv7HS|ce-&8ZEj=dhzH}zcJ=2ws^K8=-<<>t zS)rLl@YV7+pB8`PUPd?ko+tjh@T)XH9uv2wMuJsR&J7nl{sj0KqK~A86>hIZd-P8D z@D+bL3K(9cVP*T-LxDDxF4x5haOTlpTldr#Fz0}-+1yw7s`#vp#ogRMrc8q1`MwRT z+cP(^s58Ro%)_!?-S~w(mS6nTwnbWQf9!m-RNo~OK)LA9tu2tx5G`+SzzGvbmz72D zx|qkhujs*Qtm+QuM>uh5<+2;!M_e%g4Ih}dbFiL=p2EeZke6{*Aa);#M^vC7)MEGZL#Zu9rE$ImQ|w@q9e#C?v zc2Y99E{?Rr`uSGCSFm-A=y%I3-$(77J3& z(i2mbsf~hT=12<@rkokWb2XliUH9n(1Sor|3#;2uQ5B39PFdAGUHo=CH)+;o^ZjXD z-siu6SO4zzaifwbDJg`7j8jNuWrAK^usw22=?@DRxuDuC^X+^Ei+TWL@#tttVaqxj zPaBjon0&hLQeV><6yHnwG&nmLefAc=3Gj+Pr#$izVla*+PW&Dh;?ZJpCK%P}qz~yg z^Q$eNm1r_WTTl3mRs~JPIm9EV^MEl83Ci+e9(8*!OVInkQf^7f2#+VDve%4*!P_1w z5B7tRY_=T~trRob-c#D%^^FM$?v&RiOICV!Cl+Qcc#t zt?sJo1`JT=%lKb@#JmP6VW60G?P;pb!t!P$5xw35&gBnf5vx(Y2=lDyz*@}yvrEh@ zq8}cqFM+7*>MCMd@bUL6Y?tN+*{#U>LL&mrOphpQy=rgff1FoyR_?xbprzdEpO+ak zob=#j{Z(^^-*XflAX+qpD!ib8f?%wRMXO`h) zMDgqh{5AGJ1$P0F1Hen&2w;gIWEhj;Cb7+w@&=R_kSV6Jr4)5(< za}^GbFT3gbhVyOJe*MQskM6YQAbSP)Cqugzk5ApTRn-I5x;stOsz1Oz5QhnqP0=yY zZ>easHR>XIq&p$Gch#E7p4$S%{Vqn|lT?$Xg`_8!W)>!+&j5QY4Ic~yp)tAn`PE=IZKFNk9>t2;i9O* zO7K{8`1rHPOVOhO=}xFCy@HN<=JIjp6ngw@`o8opZmG-xm*hp){{F1hHap@M4RW*F zHh%W>Gng&>g`;h@ZNQ4{j`g4H+A79W-qQ-8hbarZZ(TjwXb8HiH#Q3ne`>?w$wB}j zgX>gJ1rSCtS2cb-YE>5hQ`*oiBQ%_R_QwZ7G)qUU_KR;qqZmp>h}wFKXz5GzNR}+iimb%c)79}L-2o5ErcnDFokpd&UZiF8`JBQPSA7UN zICNX((aFIPB{lV91{x-KOr|KO&D{FNy6&R8!_$hoNq~=fJ%i4^4n$sxZrmq$XFuFlhNdf0)k=w&$P%JA3?@qlJ?wPM$yi$R$5S#^+Ws`sG zN-hdHQbDtL++S}2+je|heAS?UFW_2D*4N_>!%>1F&m8$LLHhT&y`<|fK;+geDRrVc zsU=~?R$N>Rj6mWtY;3lQw`{p*NaWi}%)<<4v zcal3}=9l@t%{sX%^Iz_1iy`45X>#hC+=QvhPIuaDiCHonDSSSVqQvTpLlaESoJNft_3;lpKjiG? zd^le?o)IR$lMY*$BDe`zD|f@RjLWWYYbyTHYONoR9C~+mj(ZVKT>uRdZHUZYChtw8{Jny9m5&W5C5pA|s!p)mUEiO-78 zmwjeU5HB_Q#Tf^CkCneE+(KU4*eA#;$kcxBKlt^B=J)T6WBc*PAvXhQV~OUQ{@&hz zo!#4FjVX|oaCN2L>%g(P?OS5TYnMWa^OKlxI5|RObD?r=Vrj|iVwyzA-1o-U)dU_= zE^zBE8u-vLYVuQmLvOqQAfU*uvnzW?qOeLsE6hW8l%V~UEP-s@U+VtsG4)-yK(LvS z(SYRwAdG-ZBRF1yxlJ72!hT)Wj$Q7}!q^-BCdT35lx)_#L>=TWl<)6L`2g<0ZVifvB{I-g^=6qk_8XK^dOq zfE}~ZIAWjoX_|tPei%Cv77DynV*{N)+Wd^vj3}GA(UpYsy0(+`zYzR;W!3IQmd8il zGo8*(*1wzVJ)9Oh<(zn}O4{$VmN0&$5TEOe-CZCjD8IS+76=aJ6uO%=26L9OC-E`y z^5p4=RQe1u$m)I6wyC5H%B7zxEX4VOb5&Q@%~AY>&w8(dDxto~lk+0Ed zUzND~kQugX2TRG^nzodr+v=1es$EiFxZ^MEOr zwWE`}M^Z>y&0@-DIUqf|=3s~n^V1xutqvQ0Bztug-`(v)ThCU=3SbFo%aXYWwP(fj zgGb7Px}(q4E&6%~chV+h+1?dFL{1ZvOfplk5-Hv>56xi*Vn@rqdMU_+Y@swfy=8FK zxoi2Ef7}&K3FPRGf-usshCwDY@ytMkw5*Wizm~M1F~E9jvUZKN@Iic=*4zQb()ec5=Mb{u&!i5=(e7ruCaMFb!pl6A>#* z!u;opZSWp}T4dIo?^jfR2$iy5xwrq&Rl1_=UO4qvH&Q)bf_{&s(DKze*XJVRgkt^*E$8~>yfUEx*zS5(z~`v^j`q! zdA{l3U4_wB-spBI23SgwrFLp+LP;9Vn6Z3aThF!D3au?4e2-^60XH@dRmm`Hft2?LfsTjB3h3Stg@({ISM7bdJ|4-ww%=06s+ z1~~?=UydrY(u!D_{l?L3OTL{Bsf^PPN=F%)>DP_6KZ)3%+WO}A5qw*h_#faR=lj#A z>zyDJdMJ~nbx{UbhL`JWH2QjaV~NC0+AL^sb-#gTXp{ZEKjVGlYIXi#MuaDesWQbn zrKs!N;{3lDcLGRCa`HORz_Xm}fOS$>TLWrh0odu`a?rr9t#tto2cYlI`5~(}yg=J1 z7I=V(&e@@cwtDA1R7KSS=L^;4#jy6s3?@8cw4?51%VI9I@kpt&dpVz9TD*I{$M>+u zvem8;q9LdAJAo@Y?MjpnDI6>QY4x?P?%GN4HP#i-Hru3RG!*3D$gy7cl;{^z{UIv! zZ)HW>K+REI-8m>I=mTF9Q@_jj*zD~1{Pe=g%*=|IhthI_li5D^{Eg6De!+Ds^0FdA6Y6v7IYCEgh;X3zk}q z7p6hc;G(la1b2n?D8}>?p^(#6bXL~eexFD)69WTX-4I!jkn|x9`7h62Qk1Wpyu5-N zLuJXh)k$`<6N~k5ZTB>$imlVCn8Qk}dbReD8M@i#*8-s4zGf8l{!`sK#=PH!m)|mP zO%p`oQ>IW7P5)HHnBpTyQYSYzU$XW@jXOGfGthbvQPiI6jRVNmYA2Wyj^`e{x>|t$ zzo}KPXQ=&EbPAV;hero%C(b>N(^9tjo#^U(lf|nJ2?N{ej)M(iI0mU+>-%8uyCRCl6U`6kk7;#01UpY1CND z+1N~s7Oc?(G28Pb=wBAb4`eB5YP`rri5U>^Ef4oP>ddCYiab3CRvcqnj;ofnndmmN z7E6xn;aOEdSNlqL>vc{Hv{wS#i?HJq|0KLU%p+HpPge*86UZIaNd^Ilk3rMZF}DZR zpgNn1hJ;FeKJ5ESHzY5i_L@NIxS*O`SXfC(3D8-OH&h;y0b)-v2^ge}{oIH1wvv*f zh_LVx8cg#l#`i{43Q0_s@E#tV^O|k!@^YfZ%F=35=brpVq6KkPJquC+-STD!n%N)e zTU$CWHrv&LZ|e{Ho<8*B><_W%E@7m5QX4!~@+V5eweI*;5Yk+@o9mk9 zcC&2_WTQ+Q8eI;1O+H5*7@Qi1=T;Ra8*09%CBFjf;8WMfR8+|;1yR!dUF}!b*CeE* z<}S9Kib+G``Ohq#WOl9baB*cPE-wN@z(Zz6jr$#QFiUJhLqdA@;6zRgqO}6QDA>N& zSnOxx?u5H!(Ptq%OF;6WKvcyWuLZTo1@4RZvJx*e0P=-YW6487+#z$i-`1|MQAqX`)|<0ad{p+#ikME3M1S80u0n^3Fnum-?UB6m<8Ef=eD7PMYT-; z$Q9NkM-e1`%CAGfH5Kk9$ z)^|onC;GP2FLisl*$LIg%aSJ~+0xw_H=Bb5$qyGB-S4-n-ciRIqvuhThfWmO+}Ng% zZls-WpOj8+PFiSdUytiLDjy(U!%N>?Qucs_r>djM3W1ejmkZ#TobT2z4vedTrXjKR z<8svif73%EDXr%aa`NPI((28#m(rlV+yr%@9{2I>*hlVa$H)7-Ck(W-^t23gTop|H zN3Cto^O&Np-GRL=V$xy2EG33#I-r8JbQjhtUr%+7qN%Y|*)Mn@X-imfz_5AoSzY50K_YPM)#cH>c z4CLbC5+4&I?YsNeb5thwNH5>%<*r?LCr0-&;U$s#iSt7XJb-;ED@Rm!1igV}oH6JntnYn+`4JS;4NV~i z=yT_NJId4BRY7~j=?YqsD@a9WIu91gJyB`t#R*=2uCKab9ce37d8s;z-Af~1M=X-} z1Sc}SpI-h!-fjp{#eJirqthzb?CJ`8Pu%b50h~+Ns4uNSFJxiM$xX)2F>yyy=_q$j zbZFdMQBOF1)70|KuKsObiTIczXhZ?D{lMX0LYE)+IFj~$h3?K(#Vg8*V?=;^@T`SQ zw(*1S;6iV}LH&_H>#3zen6FV*>vk4|F9a1*#~nsxU4x5{-=)xNY1sow6!GEXbB-Gq z$EroeUuj=y^!X^=Mx&?XHhc=;u9xdKHJ)~hJ)F|X$*n#|wd|bxxw2>H`AtngT~y&* z#n zCvTI*OHuAhXdw}jpfS0H#Kns@pn{teu||4Qtv}L>7>{tSOmw4Y`oDd8ZQoMl-hV=BDyoT|R+< zh328G&eGp89kS=iQuEpGvQ+=F*0=$|2o(FqE7Q|J3tNH8r{I|`uj-EojGThCbw_z4 zva9HFGBu2Se~g`rvuh(G?iyRNG%_+NZ2s49AJTD`nv?j$x$;wsP@Cv2vf}r9vD^h} ze+AvR2Mm@xv2P86YNM&Ygnmc}E`nMuC<>GA>?Y4&d(>xJHxUSa4O zPD0^t?uqi?0E!%QmH?6VKIBdsH=$e(-q1ww=necW|MsvMhe!d$kCMfQ|EesdxeZiN z)AMlqXyWY5^im$@UPjL%w(i|canAVF5B)fS4N6KXs=`t&lRHU39Rd((5FZ-a_czqR zREqs0ho$-mmPX#nvSoT?Cg*+OtF^H&4MLoasi~8Ti|_wI_BfqRh7LxXgD72y@<6_g zeqrG)ie1fDh(;2!xTzUrv$L?78PoSR%%c(_ES5)VuFI`Ar|OZqX+TsTP_5tzR!Uf-k9!aT^SZ0UEarX0tHOvx&7(*SoW;R2LtS+!#{ZU-`p1LRyx(^+)Sk+ zo*AHjuuM=i40+!D3kg5OsJTFY?YhG5k9U*U+Jf$Zv!oi1*uT9xQ0@4Yaak+9N~Tar zd2Hmq(LUtpbsZ{39SIi+G_e>O8Y((`2XWPQc6Qd+S9df2H8Y*cbsMnCMjjC#R-GHtED;!<{!Ci@;fJgYD+wX?M@uGZ?k!;kbY z_>^yG)hc!?VA(y!FjR=W5tGNlVL;;hLN?e=9`wjDhTK#VOBq=y6_L@eUPkknairuv zbF8!?2q3}-lOVS6Ao(n13c`QS^B^=q6f83KKvlE|!d!qF{`>(FJ7Kr;75|ylWi*9b zRq*)6(uhq)E}siInO;Lx6ilb%qaJVpI!dOT50%&cnRQ_~I>B0(m&6!f?}E#EKmwrb z5OH14#Ju)cPPymT@77I*wp^_H%WFjXla>6*_=JYhti{94B5R*_=Jl;&npojN zhAM?J?07s7nTqfdk5cAFs7cwErlnxCHs0z!l!@t zqWPOSfX(?P^<>VzpQk}Z{bCXpT(GQO>)=^OM!OvamNo+-L(hTX`VZGKGBP5_-f1kY zCJJR;Gx8Wtzv>ScT61M$$k?rH@HW&W_Reo^xl{62szyAD_PNgb{p*LI zQ0oNdGZNrxmc5tz&0pEUG}$9HUnPlE@#I0`DKmG599^o|U3XiiDV}7z0af{DHHu7A zdsem$rLOom2C;&!kO%#)+EDt>V81-LO_1<&sLh~jeo!>Ff|BkGUjim+ttSp%Sk8AThjqTz{JrkhL>v#=9HQ-dk&u+g>4{J-GrMBmd ze!A;8)?g>ke844CtkQ$c>-oq&IcH>TE$R3t!x2;2@tnkl$9U?qa0)2JTRypDz9}lh z>2+4**R#j5$Z!%qAYo+rpN=sBjj$!7_)6)RviY}A^r-v|D<$!Csd**MrF=Wu+7_97 z2|`9)2?R1SJ$-af6ZQ9Y>H87naeaiu5(bsMa(Rhhr9K(&Wkz3BW0<&}3rKjeW-ES9!0Zr5mg2}m=KImk?<84e#z z1LPT-AkW$qqAaZ_z(Y#xSY@+&K!)eHzOuG@NT(Wsf8n-190@ z8jFd7OU}Ttr&cwDm7{Rj)r@+&fCVukB$64m07gHOjIDbCj&^F#N)0xT6jc??lR-t( zSY}JN5u%?xl^_B!BNQV?!mC-LNx)jZcKM}L5v(?v6;2nz~2k&p4 zG9tC*J{K+%?1ddc%ns8%9*><8#(a9emVor~lMiMqe&(^lY2*qfzr4A`xtA2LSW(0C zu7gKm;E`HL+z&TqGK%v2G2wq@@n4^&S^&BpYhU6!HhnESK}I>j-&$4Sitlj?Cv^3; zxx<%C&CEjnZpL_YaT&8_7KYn2kk=@5T0ZVGSk=~wDe|?8fCv$=APW?q$9x#m3rE;s zKTrHJNn03I2D_*NZX}?`vARUynLlJ-c`m^cqoCTKbHK}_jv27@9{>=85JWB1f>mVC zH{_ZK1%G;{xyvG4&64O;4ug?~lW?vYduxStB;8z`blVo1W!2@6rDBI33esp*hR4>V z2cvWmj^3h|b6jWbE}43T4ko3`wZ`^Vom7s0gQFDL5|uys zCs))1ozq{_mJukyGQ_)689YqMAn* z!|5U$WO;Zti2AH?te1I19C8hh{EepF@pBIlG?hhNP1;|gID$7<^ zE!4L|!cGWq)klVJbcYjiVLY2e?z%M!tc=}+KZ)s-xSMzfscv&_xg0OKY;Hf?lDsTF zy?^%B&)=51s@D0=`-v)fnw#FAS+h4V+6xLkll062e~(OAFR!cWR+O5tvDmqJpx5DS z2^^;XPCx$NzaQnE50SNvucD210w?w5z*uw7Ih5Z4LpuvnG{PK0k>E+ah`v&2wOmpk) zn4pZPFnJmQCD}W|U{zDo@NF2u)WKV8wP%6OQwIc)r(<4)74TA;+7@!g`LW5cALc*k zIcM%@*biS9hZFbxOm0WgHU(F4SS{Ruro26c6#fm=^)Eq$1^>S{-Bwp@jXU|ATu1p*p_Xh@;kT5rKwHMSCkH5O5U|l@^5upBZPgt2nD-0WD6THHg zkFhM~D@)ol+Xkma+?Y-fQI90w2vZfGIDx<6e$i2_lkXo=vygLfaEr*VE3@uWR|wmC z(ky|V8XeoQ<=ogaKsH9LUZ@jVKElP88>Oii%lSYX*bG+q`ryf`Kxt6Y*NgKlbs(!i zNro$XDZ>6Kz#st^TRNmB-F!oQD7@5GKqb|v*Q}A63O?u%B(;0a%a%0zcT1&{uD|L# z9@@ZB#Oumy*Q3O)BoPm1${er313hRg!VEnFs4d$)cK2&49S%CiPZ)Tdl~S13W)lO2 z>hLm0ozY=*FQug?7Zx_IM_-AFxz4w$x++A3wYG!Vg(hm8497;F$~$1f=V`ceZ`w{| zfM)N)(!~8T!AV`+(Q9gTb}6<{zGRSvcLW=uGHLtqrN4!Rzpb52l!8(L!{mazf5Bs9 zN~E&185#S7m*Zs?&VsaS3QBU;%J%k#iZ;$cOoyvk4!G>b`3?jl<$^6_QwWoU!Fe}k zG_h)M#&kG>gH;E^=@iZVN8rVc97~Tcp^M8%_qnl6&Yy$FXO#nvpP%Z?b66Ns@ zWG?Du>;phPZno!$Ls4#YQo{+ta>R^9T$u|C=bDZVXGe>1rBM%%% zhrQ{!6yPPi+Bb}w{+mw_04pz#5n>+#7x_>}CralKT_!nt4Mcp~jT2tG=<*M+A(PH< zVB}Ac?WowULa}aI-rs&ZX*-oO)*kIo0br)LQ$YCaz*=ur*^>#i7om_<)vsYzZomHK zLND%?YA;9kz8Ad>`0@oQ%1Fn|M8}kybc_aQ$5oV1#btTo$%0r@9ELordKCb-_aI_X&dK?;lLu(!0V%+C*T#Cg0Em{$GLc(tOU zkS3tC#||gTSk%GrYU|sbXzGy*f8FjB(HLkh4|R5iXR&SFm&ZdhgDiUH<38F>u(cHYF^kgcbtCP}#`5R{iH zB}hZ6Brs%l8#(7*M)&dg@3Nb`JmiaIZ>JBt5Ip>EyHGjC!=KEzV+67=%e^o1sirW# zzUr~fn|aVVzJk><&&nsBrK9Xkme~cm&jNq&7oMyZ-uvS4R|P$$jFgx>X}uV!sfL~3 zp`?83@Ar-29Ya*(T)+J<7yj*bK9R1We=Ly>V_D02;gvc)Gxeb+ z#BTeSJUWr!oI@Eu?pyr%MK7gi@Z7ARcJ+5<9*|$mth|y~n4M=$Y(jrM(amyb=1nS}_8H41!9qC(Fxr}r0FBtJl7 zo33hSE*d#iR8)gJ5r?=3O^JwD%b`piLE>~)IIkAwBWv*G!0cKr4yCZ?IJbn-sa$7@ zr*N)L(wl}Vm`ZUNFLZ1u2>m@X_lVTo=l?8#c9$f4@Pf6Fkp-rE{)r7-JK}KLx{b`Bhx8M z_szP$(&FsDX|rGF@2us&=@N+3$T#S{j9b`Hn)~|nn;YSHk4h2jXA_;-#z6U_A>Fbc zKPtE@K6AV^aO#XC(F~hlAU_VPe5Y}HR;h7y!uylu`~%#E0P;yWgG)J6V3yIr;xqgy z+%mlnS0B}Goibnink9+-$7OqPG9*d~IhcU7Kk~(=iJ(8B)2nvu)@|P*LqaWv+gi|{m?d`Q>XqJ}UZq^VV@KQ8 zZCl}8r`MO373Ci$#ow);1VE7 zxq|Vz_G|5Lzw`FGb?aKUY*8ZF3lqRp{Qz^GCAWwncZF+~0zk&bCPs%x2Zsg*hlh~U z21fp@%kA^|{J{Ximhrt{G8m8<8Hp_5KCZ2;t*fi6tgJ*th|Pv-C`GX6^#;9Or=`d7 zg*|V9?VAPqWSag3_~0@qd*19451f zO-6(*BdH(8|L~6_gf$0mEBcjr{llImK3LpJXmIY}_|Tf8N9)wTLjNLCCWS;)~Rf z=(1Au!PG-kj{WH4kFR%iX*B95o_gY`r=B9KqoAMBBss6&ELKZRb&c6%g=?yRpdYq^ z3HF164GiW0{&6_PzCIf3yN*spSze=m_%VgOL=XVt_@rJ~DgNhJ5VL2%{=tXH*y!l# z)2C-#u9DKyUAuOcS4iGi{_f&h*m86v%J8EiZP-b{ZLC0GJsroef`73gD%(X91MEj93~^8N}@)mM&t)(6aq+T zSs9YlH8nLgG}f1umRpOgW}{iB*Wn`q);yLZ*`+<+F0@YlEA+o2fz}v(1pg|%J$v)4 z_wUTD%!w{Ef#}fYIEflfIEf7%5z!R3^ETo+c44wPB>*f&hX2B&_|>Th&=C=au${LN z&)pHeXdd7h1^A56spORg-095S=z~Ev%(Oaq@ZjZ37qwc=zJ2?ieBy~>yPY#CZl;E~ zUHh(C`pb1@W#tz6(D_7YP8Ny8B|@m=%92`D?LDk9GA>`zV|7}6Rb`dMWbp_5s2YoI z%xp5VW)o#-o?r>GD4xsF_U#(=j!(~_OfeCYa0L&dZl5d=ieBoS^4(i+F=9fHbdv2Y ziT_0q*a{@!8{x;Y`QPjFUAuOz2g%D4@jZL)MSTxM2_zr3Z1?~bi^aSV?_9`@Y(r+P z*{CtA6{>XMpK1E6GWdFf;fW`nK#TwOcfZ4|w>RH>vuR!P&K+&YkBso+>B&h1tz!n< z80EE?z+^aF<8ryE-d-ROi$#qF15G}ttAn9gUhcp&xQYs-wkyv;oP3;hdGAQSWV{%P+o+6#HZ@axrJk z$25Y-gYyvQxr>@qj$zVi=WhJsm-_G?>o9NjqMwYg)d)< zocL1a_sih`d-w_UmR8gXqo>S&jL2K;=qlnLB);hF>1l7j7K=m>yNcO|a2E=%p4ve4 z{vr+1NPk9Xk=VAci#_Q`vInX^!N82K6I$1W&IORJPG-8xu%>*J?V6kIgccD&WVvx+JT)< zuH?D7NH~nR5KJX(Xly9OQdWk#*;r5n1)gPOtSc%iLj7!H)zDyiF~*Hj7s5}(aShX- zktBodn~(4rqonv(Aqbp9QaLCq`~$Z#{D;Em9m64s0{s*b1C=?3?5k9~M%eO=@VzSC zAzm~Oz9bW{WhhWax;jnpQ%$5y;J@^Ups1_+z)%yJOpq=bn4ErKN>Um*b2e zDermhyLRY9dgmtoSE!Yx8?~FB2uH*5@g7+uOjjVoa(RkF!q^^9<$Sa62VB>!u5 z`l^~L#5jz=4jmr$cztDMkU7Y-h{H|zv*Qv*;zhaDzOF!s9QJ&nZ2~@1WT^#~UVkJS zhZf2Y{)C-z;lc$(rP>{(JKJ`amO79QoAFe7@DD|U9aGn?j9r+Tb1G#DyRl?r*|wIF zjYbVpfbj=$BIZ{6F0+40@^c>Tj-ESr?!W)n|BAFi zh)c$tIAm5skc-Rh_PX83YyrD75{arb8rYew+qWU3A|}D1E(h$+5{IMMR&22#W3vUe zDHJjm)_+TEBkdI0ms5bNiv`&yxy(NtH;Lm!CAc*C1(UGei4qu4F9rThD||+I0mTCS zi5griSD$`M;U9XYL;sdUBbRZr8qx)MnZ*FX8B*~JrVIIksT&A>G6ppg!NMAhYi%mHb z(WqRlUakGtlJx_sGCqCa>GsZ!H(r0eyQk+*|Muq_H@Z+;52JU;kxZ#A*b)c^qbRf; z2_fM)f|0jvYpt(qpbC4)j$BcRI#o6sl4@9C(Cf&LjKL!{3In3s1Ht)Pu%8&BtIvK| zGX3*azF4ygEt^*T5Qn-E#~h%jSCBq%D|4SR!+}=x$6lN53eaJGj$LrmN;)Hg zKo3K`(0uqzSa3Wc2N5V*Ce850heImq;RX0N(SKp|fm7rB`SZW~-R}nn2avM!nP;DQ z;DHCt7Bg#d5yWlVS3J2k>8~)@)lCn}^u_Vv^D);bSWsmxQ`hZLR_%~$jKup{q>o0U zDszjH3Yiny75X?~5 zP~QL>w6e%rgc{JWIU&FJyu?U~SY$~eQQp%>e3LZrzX&RITc8h7L!<)VVohd}s7pDy z3iMB98);vpTt4(K64EIaSEpE2ojNsszXU}DD{ZASh4z(blDd;|`XHZ`y||>*QKr^t;Ix_;cSfR7 zRP9TCL1*{-Li)Z=go5F3PQ?pKt7&VrVtxki$k0Ps; z?D?A7df4)Hjrc>dWP5S3PODQPIl4xJZ!tOl!#yJLxM7x;{F6oc7w7|y5%s@JPSdvW zpKN;auOfPEh4c?gfZ;gTo(7$erXy@6{$RhP^BfkvkN^Ug@nZxC z1+^FmdUZO%0MUig{p<)^iKiD1KhyZH1^8gj;o*Tl{_&3&FJ92=439qc*bC3UfKfG} z5rxg|+jlL{=WhIo4#Hs9Hr^kvY)u3_aNH>jB?=ufpov9MGAv)I^hZ~PLa`Oql@~6Z z$0Quo20*D|xTWrfKS|`>`l5}cty-n# zw)%O2_%B)iuW|SWgC40cUU~WD-~Il#!5~UK`wa#o)paf}ud1p-2t##sO;vRj&4w#0 zb2uCZogRg`mEdq<3ZX+4<(KgtXBt{d{pWJ|M}*HtM~o>JVPuIS zmXr2Zfqy^&&i6ziA_uLd_Ak)q7W#1h0hQPyD306N|3pVdQDG$znC_71%PtVF;#*ov z=L__|h5mP?52iCUDX2D3>w}_mvKncxhQl{G+2Iq2pi1oRe}`vAgzb_Ux0h`X+?e+K}H+D2({= zzP{dAG+td(v!P{!R->cW&rkg(Q)`uFl~IK<5emgzQ^=aFFk2-3%bJw8>so2wJIR+) zrP{iE+cO6aw6}L)vZ3D}zzjlU3azXttE^<^d{uQ#T@7;8A<;Hc*I5w;j)EsjCAsX` zoKemsDeK(TKZ1)=phdy|!&Gk0>9-XBY7#-(%clGaZe{WFg4jF7ej^TIxG}aD8J-;x z5A%a;EgTXEE!ZlY2_^W5ivfJPl3$%}_?gCkEx-?lf`<=(^x=me!XDkQvE|iQzK=DO zA!7omBe{M1t_Auq&J~zlutHP$ADpe!C=8`CBOLKU?>kVHYMDR8GwuB-fHyYIYH&^Uk?=WcSONn#~^G2^Y{eg+dD8Nc&hIo8xY6fm) zgsj?2id)vV6x(f(FX75%THb~MKZ_* zZJIUy#Diw$rd)w(wOUtdEYquWNeYSd$tnK4ssCC&|J$rZ`}Xhq?f>|#Qm5M8w&Mps z_#r&VNU4S(7aLNlnN4sd)0BeLF5U z>SV0*iYyjVlvElHJg2f+1R-G5WJFv^{?7t^=KOPA-QB2cuT(1=8ycD#8+jgsT;m^* zVj=dG0(lrJD`hH;EEbgvHzVY+2=)~h5&ol~-&VPP$U^@G3eo~gL-4N(X84NqUnO~Pka;6o-Me%Y||bhmWPvfu*_ z`##DP{;M56=!WTXzx(~~k@Xe1)4e;(su7G!*ks zCp@FrQ5YQxQyGf*$>l1>*_>)zR%kyv{8?lxs;Q|%pNCojg9C&3z|f<@?{eff-R*Km zQmcON#`1j|$|`I|F-ttKq~^Je{z*6fH|w_rz>h>C_$27=?nZNL+Pn!iDC#o^T8nNc z%$I|IAnc!<~Qrd(l{YYhR zdhD(E$Ko-kf9%Vi&)UZ?`XfGtOjT!V*w^sz2FF%|n$*i0(f_eT+%@CE+oB@Jef#$R z;^)6msWBN&gDI{cf<)Nt=!euNt`Yh#U%pa_ws8K(UBZpIVV`h(NOGmzoSglZt$&2q z6d$la{lG70x`Z$&@INDC_Vn{I=r8rUDc)1YMY-AkGQ#o>3cCyKzm`ECJmkCk#|*(w z#Nz$^{qMc=-qovDH5&DU4?gtBBaa~300PFbl6sti{udY{H}tc>G4uITZ#1GrugPda zvetot0hCKAu{&r6y~xg4*Pn@S|3LVgW3tH!IYKudd{ooAO{Pdryj%711(g?1#67c~ z&W?_$sY$D~XzSLk$W)To{g+&$R+N@2wEDQu6`P%nyWOcqf*>YbVa?}H#(wO?n$iEU zcmiqbW6_vaqusS@*H3@)QwPfAuyl2T+LttJ!M+lBCi$7O7W4x|Bn$eP3mog!DYaE1 z9!H|YR8f_1NIjS#`jgK~T#`Bg{4dU6qfi#{0xlNxOFTrkuqy<2ym*{G3m{bVGvyF| zQ0zYz_9cTG=|L%1NbDxwv}pL!jTyp!>F{H5St2ZpN9om-D$0t$;}b=QoVenzOws>4 z;g5}u{pL5nX}@|+qtV`b?>#Sk?}g$LJK@F}O1zy~@V4zMUa(^Lb8eE*SS)`^H!hBU z64AJOA~NuGr0-;WW<(x~B(w%)Rja1uNp;0m87cxZrUx=hguhh!BXd(-T}@eO+34uV zjT<+-9-qxt3|u5MvP7Rd<3B#@M_{ct0G~1mI|bI##fe}z+B4x9bb3q8I+ih6BB4yD zQEjiYBgyjA&OkIK)9aLFR;>xSGg52j<}iQqn$f7D2ySR@YObxXL+Nbx_ENhnOTGXW z{Rx7&NoeUGNJqPJMFJE;EIm5_`DKq2S%K4E{FP?;jmzRg?*7A_@17q#=?=K!i5PGk zb@w}cqfc)L?ylMc&#EXQwB=~PVu#TdOT>@`LYYvp&nG%dOAfa$u#?Dmt9&65O zzB&v>14<_$Jej=@y%H{#Zd{!HVeKn4CvfMGP*@PEytedbBogf(?C@TQg63{A}h3;LfvC&c4xNdG6|v6<5%%|Vzpq0$qQB)wBIC= zT;udlWx9g>mg-;S9I_(xp$X>Vz#4P{!~hF+_!vHu3h@xO0tXA)gMEkyT?j*-?k4M! z?vOgT`S6iRn%#}?Id(C5k=W&Iy?pp0uuS2<6!@^YBmS6cFgkWM<{p+KEUmakUDhfu zs+BWmN;c_#clOYu{_1RBymP=C z?mZU1^nQG5NESur0s0qpO(fhCibwtzg{77a9A!hkZlXU%Fi;<$y0&IuXaH_yx7Wj3 zkx8higSoh_RQq~E(V5u*LcQS#g>6c{P@sam4HyItglD|rNIU_Lqku6HmM%~!<)v0_ zsa5K~*?Z>+e|o*%YuDPH&T+W-H*DBYR$8i3u;INl;jdR4N=&6%wI&n`f?l8~Oh0^Q zfXF(P!KN?PsSUy$Jx(?uTrq?E8IA?dj-0+Ye99f1!SEWjHAW61{;r7*gXYsRb7fO; zGjK`O54dG=ZgSi+>I-|#T2raHszhI+RUvl=jltfje_=0#7s)04&(I|fX6=jWE!VdefGWatz3jHH%ACZ45D#{TIi-Cc`fgu#`!{jF=`H*p1xPt9uqkR+cNchsF z(6P_sbF*@@RrkWHstqkNHtA|j@sG#tzHsh*Pfs5zXKZfW)Y#OhL?BUq%a=l7GApWU z;=LVluP2H;7-XBzv(K41i(_0_tX=&Ojm4Z(laW{yCHTx%3nE~+)+*4a(7$j_$fkd9 zo_}@a`gd|Gizf8+o2xIK19$q)YKM-M&xuvV>QO~+b@T81^zo!j>=@Wq=~Tl-?ZLDV}E?Ku{o zVLoNXzT`U#_+)+O!`F}K+kPrjkZUvx@^usaLF?L@nuhxN6UUE@jEs(tk8Rqx2?Yak zN4_*lr2(ZQk0t z&1^D@pPHhGEKj~nYRkHkO;yEBfr)F;XcUx~ z?x_xUz#T^}ZF;bv|0A*R4d=B1S9hbW5&mMri6J%@@n0Rk_*Ks*y;EJWctowy)fYAH zYkZ`&Y`a-w!ABH>!ubJf+=l}zAYTHygf=Y_{&$ft6jAK!?SltKr`Mt=AG<4`@MkYd z`7_y?2EoD`ptMf*XaWXvdN^Vsi$a^IiJimEklKLJwC;Rm&$egfhgfB{xRYUztc_s zL=4f&)3HcYXVoK@vK$dY1^t;t`coT=3)`pFn&eNsHKOt0UnK&t2rVMTiqMC$AW70k zUl_nbXcyKr$rY}ng&&}+*q(U3aE|7}u?3*m`yhJZR`@u^{`0K>li!yX_y9EzG=4}6 z+b7(Xf&XIQ$0PCSo=C?hvA%P%ndx|7PUiO~W~ZZFUq`OKA9oKCK13=0mmT`w9{;Yc z8-ID@FMa)eDz);_M;>|Ug%^?ib4l%cd-yoYPoQlzx6Qh9F9*M6-%fPsx% zqJN1++gxomXekGRoKIz7->6!(qS|4sE;guCN=EZL(?8Sgn^yR~Ip3+%-yjWwUaQ-< zabr_+qfW`8V}!?x_0pDn-_*oIlUv( zbI$SEp-UrYKI=Sqb>dPuMmeLijDH&C7b#FiMn>R4hjuL~u@jYvfc$SI^*G-H8nM6vk}7vmoHx;d!7WG|7DN=6X8(g+LiFxQ;A4O<|x+=Eo-fP>3#1iU*Sk( zYGww(B3iA+Vn%g746d#r{{K$;fPRc;IQ#JZ0)0RdMwR3$9rQ`@pJW6+aE2_9ID7~G z7=XeR)ETfpx`Qpkt$f%`I*LwL@OZc#6ql3UqXuI3CFFTuE{0S?zFbXDD;$hlm2!AA3N(9`f znVW21`nsatg*eSg^tSiTM5010t6HU~Ew}D$F0F)HIXSC{ASIiY?Mc9~vm*H4PQM9g z-bQ{C36%9Xefryp@$ssv>bADFl9CdhSwFq_8`Z{LHG4`-B|TGJGl5C)L5aapXKSvv zHJCJJl4C-S@LU}JOQk=ue5e)3H>Z>(;65hNz>_gK2)U3{DwP&9Hh5|a20suDe%1YH zx3fJQXH^G@G>K5y-!;`)GE&}bUtg-E514G?Pt=l{6Zo)aO9xUp@$USI_jbG8K93jO zpI)agM(eYdNEdveLj}0}q)*P`AB)DFLmua#d(Im|TJWM0eOZImR%#SeC=yTPf&Sr) zD@Z-zEG*1i%p?2>?Nq5_uTj8Xq)Ji=F~SI|%+UwB5s&2d4?V1)e?Wv4<UQaJft&m*NFLBA7{^3u^ zK75ef?Vj!E=s=(VT#B1EZZ0n`S16PMKCJn%pUR0z(xe_`H)J1whM>qhk~$z{Bzq_}EBndP-SdF1}0hB^ctuDyQ%VPSOjdQaXux>QVLvOT!-@)IN_V7LV)o zdaK2vB)4+%AqDz?0;!Zvk|y=&GU#7`4+4YLiQU1$v|x?iha!g2{qWzkVN3D=zg9es z?b7%kH>N`3@DZ_3JM5b|WY4?#>`lMv9q16dC-phEflna}G!2@$+dz(V z!xvD?82*cZpNK``vtx0u3%*5sjv`?KmCd3hk??tAQ(cMh{c70D-nW}B?xABu!O z{q)m!-+d3BN29^`%U}I!?|u8!YF=ngz(_=JA?+*Nk~RESn12*1xxOfYMg*&;v@cO1 zAyeAQQE!ZOaROPSO?K!5uB)l7#dLcl!N8N7kwMcjFzX9N^lD{8h57zX6?>W;Mja(7TjBO)ubUSBM;@;0o!7g%kk}#7(Aa=z zWur;>(n||`iM61&O&U{6$>us+V>k-utX!?s=u{vrOkUVMsS9yJruC0SW38~(bUQnc zD497@N&iz{p-@zqYO1WY%A_rx@P&OBku@kmK4ofpkVYnp$q?74Lwo{#PU%)8)A%Unq3y_rgXGV}_3&>}%C( zFz=FSs+FZrI2;@7n7VdqbZW#K3B|yZ2BW5GUD1}kRb};7?mtMg{EEyiZPN>%+<>eH zz`O7TBcDt!6#93Gf)sfZ@lrwwQJXm zM$PF22kEp7vVarL6zI7*?^qK#0lR^717L6eT#`Vrl1PavF z)uK>}#ex)V!rNz#{`>(Mg%7(+X)BUd)g-P>$DQNx>8V@WH1)`;Y+v?*cjF(twa4xC z2QULzh6%w2qfsHo$D|Sm`)iXvneiVAq|GS*;~Dt}pTZewA!dUih6T!KCHyBUf!#$_ z$dF>O2h>rqqhg08TuE1?EDU-47L}>E<#Hswk_ex+^up|=GXS43Bg>XB$^`z4hL2ig zv8X&oksL%oyfVX%7y!TFbVkVqhActmOLp;xr{n6CD}Q<8jgHO^rBeCIE3f?EwbzVP z)`KmJY+t%3yZBQ(i5Y$%L%v$pw^USAP_aJN1R`C; ztw^6m!B52^6bpHS?qDPchq6^`MUr$WBAC6AK>sDfUljisHO98;d*BqlF@7Z)qf{7> z0fcp+wBVll2ODhb1oa4>K&pXg$QPUy$U=esSfDr&+#C-@f`O0^gEzRF^G|m0Pn-NE zWX|ykyblr$6%`e!Rch7@^eV~a&is>lm2f>{9_)*JBW{uPJOtE)5`jeB;sy`y8@y7d~ACy|y+%U3KG>F*1?_g2C^E!P>;`ybNoyjQN# ztP%MV6&<}UavTl}4tDqSLeIgi+|<;h*XdS?e8H`3FHzMshTAX5+%t)($#^89m>+6J z9CwTUNu>|Y=9zsi*>MZg|M)2Jcs-$D5GA-#3Kap%;_HjjxVGs-R9IvEugCyQ9cGjN z@n8yECHo4W*YtR9%d7m6cap0UdL{8N z+hPTe067WR-E1YCNDF)dm`VH>3typ9%1yR}UMELNWg-RPM>`1xN|GsxsubE32QFvH z?BYK@F@EUap)+UBLOJfachBGd{oj|CmI@rnk>zcCQ{&&EecAibYp_P8U+Lu^f|p(T zd^i5!=b}pWx(B1)sf2SthDcP_zH*&LwSK>5-6JxV#Xm`r?Bb8768UH1E}uMk za&~qW4(0VN>x+wv70RTrq=*cdj`aq&=+A}FKbDA%dWO%Bd^<4H6O8(GYGbXfv8{4v zxur&<5I;Yb0iSS?mWA;TyyqM2Tb|wY{cjA8_K7Q=z?4d%ZLl}*uHCo0=01zY0_h;J zAQH$mDxFzxb^Bd-2&VGTv=&mAbW*FpnDYDs= zU~~y?I^gpTgkigM{-N8YWnt}0moFLrgnZ5)>bv5+`t9iSs1M16kfT*8SBwvMXU6At zKiMGUnpiUY<@I0TU}WTm3mGsX;TWo6a4rQ?2K#dQ|=Ki~0(3ZpV`;2%hUxa6mP&P)9{pMU)R zz}F{EeDcu|*X(RVefjZ<*@iFb(oXlDTht9lZmA3D9 z(+3=nyiaf|d)&c55T7KNeMoASwSJOBYnwid4u$@O$xNp8GgY==|3&|*D5)zze?%*% zXhG@Cnaqf?LFh3pBwQ;Vr!7CkUm*E~j1x?pqzi;T5AbQ>_9vbz-j_!BA}z%&9!I-r z!(W6eZodP5T&Y);wM0uBVuS5+d@mC+?DZ9KW#vXy)mE93xs^HPvp|0lZ@vwO!>7JE z_3?f^TT9ZCU!j;&AU%a69oev+>Sy}pL2Y&^E>zW_dYc1jSk77fY z6TyI@$f4f!q-Mio3Ud{aaE02J(_e4USJhM-40?ai-_zZL@&fEQt+GR(@8ln73nlUz zKuW2O?oA8by;AbKDEc4+3S^s>c-$WdB7t&GZ%;>OXV;Az2x{;kw#4lo9U6^9B9)bu zP0dY4qj6F21ukOb5#8v$KAH@nP+S{7Kjt2MqUE{zqDCbj z5ZiFW*^T)Zhxtgrh-JOhyc~%}|VTf_MWa9~_tr`44v0 z?Em7%AtEH=;8;Ha%IY-+_{Z%AJ7tv-X(8ORqVffDERa7@W@lnz9M`KgO4Qzgrp+(> z#jXHbp|4s#{-B9#Vy>@!YHHXM4hqrfQCZYC6YIX@EUqxO?$he@_*#?NoY*hz{COw% zkx<+GX$9pw%gCcA4Ik zh=ilagW>Ziii+49C09#_pM;U0^bzs*dVT(2K(16Er5ys6Z%TqupikQM4<|eq8MdF_ z{F65NDA+dvz>yPzj53i!SAafH5Qx!ehfV>9O7wqR=6?+dwvU@Waqe& z(pPdthA zK#bH&Zr>#Q%i$bDw`n{$IF zTmcs)i(oWCDvWc(-xTSK@!zg5Sq^*=;YI5QaGFl7EmK#Nnow{L3-cEv3Yjrfs{Yrj z4G%XxG3f5=b+)4v29ZN1)2OtKB`x>V?6c@>D}p~mS$J#O=Xfu&f5G<&^4H^LWUjXr z*-+m@peNsCSO4dTevU^Hv(A9a>4yWC6BgzH`ETR0P#`kWJ+ppCsaCHh3atcvFjR!3 z9B4Q&Fy^5U7R0fzVOUxgd~yn&a5_V$mnXjhh|JqR>{akm3|;mkzwl?+a`9tCr&T`D zfA!!G<|*(Gv7Vrw7(0R@IFwcXgi0D597KtfuTP$UtMR_Q`(AzZ`;AC{A!R&U3H{0Y z$<+RRrRcMo^g}~^1MCM-b$EDi!Z|_n-Y|tL^X-e$$)O`3#zy*Sgtc*vMZ%J*dRz_DoMrq99FQUmwH@Mfp(HKEM{_(hY}#(Fh8R#}THgP%03; z;rIEG9Yo}9(gvg!xdO;j`k=6d#fJZhiLu1w1kyclr6#^(w)I;M$}eIIz!gD%5SBb@ zHfl6lkwhz?|8tN&`OW|NCBHP25?lu^V18w8ldX{cVVOOX<`5Z25_b}U-0j2<(+NRZ z#A}2T^wGsXwpjl{M+J>4IG0nd$4UIB93bGi48YGc{)>bU0-EfajZZ6zYh#0_qBH$? zcV$Vlx_*zctW~BqGKz}2h$yp2`0R$o&_4-(d~D*c@4WrR7hk|LcHe#X{p{zzsIIDH z_Q6f~&`0!w+cyax4ZZr?H--Lkl}={XD@N_G28ot8(UZ3_5h^?MQEOBchA72e*A09PHk*xgk73O`cHUA zFOQz}1Uz^s$t=^uKxTGs`iArJ)~YtEwumQmX1sT+ey004!kOStfJV|b5x)4@Ek2NA zg9Hf8_6evlfR)1Qbd91`9%jr_?V&x0S0$3y-wO5q9J40qtdgA4YR z%LBehI23^l@ekK!(w~D_6#uBz3WEis0LoAlgFwuMOcIUHNx4d;G?+A~E0|IG5VL2X z|Ak>f3lkT>XM`2VyeRr`2<-On(4R~d(i02tvngL0;vd%H)RNTdjDKj$UaZi*E7HCg z-2U{lBL@#2oSB|!Y-sxRfA|mg?%9h7mRs~WYc94VNl0tG8>TWl%%1c-~o^GsDbiJ{{ZiF_P=;} z@+*TD{6Enpo$#qiIiW>z-xhQ+qUNB zW~8_N_>)in)Bp9Ku6J}EIr7<#w(TV)rB*A7M=x4_Q`?vCv$fnE@=W?B;;1G@j#v5v zXu!t{x%}=a-&C_LLT+U~UWj{gfIn05$37TSqta|D+q&M-g0PT;EUHkbbt;Wkk&?MA zxA6zfZ3#oKs9t`&8t5v?lCMG_=sei#Bg9>E^lo(ur z@Nk|buEjoRs8S&s2w^h}fY7mLwSU(dHD$Hd{`Tom&<`^W$dj$cHl|{2MUzdXW@F^^ zVuBnKuDQ*hl%@wdf>yjegkgSx&N+|&ZRIPE=)aoqXY$PCljK)ia-08G6a7h5%H=Rf zu3qi<_`{C|`ua^K?P%q=!<1}^bbe;zxh8Ct_d)lvT?oP+3zVB zgK^MlfS*486pUZ+6m@m@1<X8Na(J`1r=FmR59!HVMII4UsA&BdpuWZ{SmgXm~}A}nqATCjW8nEZmV z`g(hhe0Br@%c!5}^La4?l^BhYqd*@)-K1!TrI&W^ zzDJ`apE8yeqR)c(XBqSt;e#1sVHg|CSWqE$Tw>L%(Vx>fYy1hj2xS;cOC2y2rl+Sy zhK5N%nE)(Se$zmIFxZ{-Lq_3KQdB5knLGvoi1RpvFseCYzHL5H^M6M3{NRT_wA<}`p7NsTlM0^^C_VfGP+8Xh3bn#) z*PCn_&rBc|gvQa^ zi2kJKr`SIdKC7nxA`;V*RsJ!V%?Me*uz|}p3tKf53ZZITM%y(;@dU)S8+*w_R+pKNMLza2fe;4lC7m-Y4anB7*;Z=Ch> znEx5-xr{&Tc?^bORAYR6{Pefqp1*j(H|GPw=!zuOvm*GXR>mqpKU^T5vI@$R-oo1mR%d1s$VNEYd9;|C`!|wbX+6vq)zvv(`*{#-s8G@CQU%P!Um~u^USqrZNNq z}<*!aZ2;J`os zKfjrpp8nB~e$>>|q*C$mtyQRh?%w|@Rf>{wQ_VWN&lPY_hcJr6%_5aXQQlx(zoSfN zP%|c55dUX_e+*V#+atBbWrl%Hmv1%zPPdnv8d^(gn(at2DGET2@;_t}!)f6_aMtDO z9~eA;{@m$r&s;cnuBWdD3K3t$B(?ZYdC3a$OZu0nK!0Mx3fmlQUto84`4V3vWB7ws z_%HAeBir5We}T55IIlSVdEUP0VlYs2{P>B(hYvZO&c>$3?|tw2t*zVmP^H-V*op)% z&_DnAQ?Jw4*465bhUuA^;o)JVV6$4xEJ!vp_Cq2O>ADg5=zUo0|8Vh2_Ox~G@0(GoCo%w9G@6xiRqBd0!OBB7G6K# zNi(6yB`k-}SF6+N=)WE-Ymv3Y;eh+N6gBG|r6s7l=P0cxD|3{U6x-|ugF$qDkOT?6 zg2X>aK5Vf(^w2|yeSYKhKX-O?{Q1wX*HqVTY2CugW&-v?>EHVM`ZYRj zsof4f1iStAfBX&!h<^F2Uu|pM3g${74t8?|f02vD?jV2plSqpHc`IK_#$QH7G(BE7 zG(Vbd8h+qr!Qd}drc zg%%T=gtwfy=Itq5LK|V1pBI1SEd4`sq3)yMv#-nC6Y)qmfkXx764i!>HLcGpE!E&h z>D}2*k_6&j9`mP0tws_Cv)KgetLu7aED=-i{N`fQvTZ)KFDX#AU`JTsK}JU7cntH| zygpRk@Zitoo<%lWjOHP&^zbMOZwyaQO{3-pYUW{t8P+KxNo+8BGyniV07*naRH2Ab zNe{uiu*-Gu9P9NMb~c&J7Lyr9CtSugH8n^SQ(aYER#9#%vKsUT!7N2$231O?V2;pT z`CqA0ZCJnlz;g$>db&H?J3jyXbL7WByeiC7QM(FkNE=~SfGhmEEBsPZ`SyyoVOQ_8 z&k2dV}JXLzkTB`e|h)4_eO_C{_WrX4P{_{_OqX@U%y_3JihoWxNG~aKKg_0 zO*Y+zUF9mJqUYMAd)l9fCbR|=wY6@)zqYj2O7lr*5v5@z=wmQzH|(yc-|Ps7V?al( zS825>XbjFb;yTUzBZ8H-i+~T&M{qJy_4wwz!$V|!9y|WksZ*ziM@A6CMd4N$F=Hx^ zOfp&|eIT%y^qZevS^9GfMGXmDM5N|z7eOD%GXMZ0usrVHSCT#=|G*2uSf{{0NtT+& zo`METGkp-Ldg;=oH{bmCYggMXR_oJGJ@w?1Pg*SIg8a@WJ_-7&;ZK+ewY7CNOVNmY zWO!s4W=3soEwden_tc$SXc+>F^mS zBx(Z$bX#QEBSRAoA_N)nA<=Nehi=S=uskoaA`jO$Wu`!I?lb<;h z4unFefWqFN`Zx5@z^kL1K zk@jV%^0!NYk3Q09RM<-t2!!`}V$)8Ue-4dlJ``E92gk<_c!01^ZEYa zfBv7^cC;ZDiD;EvZo@w*l+1hjWSc)l!ipr$H~Cr&{-hKWvPdiv4EQI;CpxcRKl#l! zCypJ58^P^y!{Y&C9=Z!vl(_z915CmLvQHnut;`uhd^~4$?(P;918s4h4{?a}psjcT zJH{Z;W$fzYtMQ9)f<%V|9}D6LX)XR@cPtw|0Tv-jLw9tDoI7+L+}AO5wy{Te1xJ^l1kPe1*%&0Z|L`YNVREE*m<9scGI@u?B89%F-W zEI1qw9+WAynr$yD4K~J>5*uWM|1;gbcY+TSt7ZKLd~A%5k9GI-VhkUyOm=a8@IMkB zqld;UH{gtz1(d}LBYj0E97Gk~P{=8zKAjAP*?+5ENnI_@+_Dv^bd>4Y_!>ID27r~!_Cg>y1E*J(Rc@?kt7}8TOj}F z4aPn9?0N8k3*%$sH*Q=MF#`y#M~e(b3V@Uw;E(H$VCDk2h`FgwYIQbb8%Y zrGM_;|H8ppRBGJ%P)+4J+vJc3--fml145NeRz1&Bm<#-g%r^$J+8`5BMF|`!88Ga3 zF7PJ?GoTwi9=CIHdZ54e@}(*{t{tzLP3;Zu&vo`c+G#VKi9{T8`kI$Yxi{xAn-2cGKFTaA$1p~?S%~R;# zb5B2~i$CjXYixEqjD^vWu?eRW=7JDBEU5AH*$?qVsIwz->KN+h%9U#M{ztSMHX>A+ zb;_doM_Wk$BEGMw0$xIn3fDjsu^lLj2iGu$-eC)2f&b3qopaC5xZNH&&BsRJJsukz z8o=UoPT^{1$Rkr4a=Rh4gY0>Dkl{LpS%nENh-j)8@@jKJ{d8U+>_+z^9*nioAA@KKcl1`UxIXfLc6# za>71G(F>I9Gg}g~vohCg+~bzhmsm2A<|c~WmOjGUr%;w%mOlOzkzin{+0qUl10L|) zq1^q~$B+NvU;p*gsZ;RZAq&le5A6TdFaK`WJ-cRSX06tu*WdUvGAO?H{s$<`{_DU0 z^*#68i*HJNa1u^zS*`TpLXtW9uVwg*_oB$qi8&cVgTrv#eGM)=ejK54(0ur=#H0%3 zbH}u4)Ee#S?gpc!o&Oh0e^ReNLtqGgx1d}3L6KEBrqY#y(Z*guxC{Ff1cP_t16raQ znFk*~1lKa9SWez4P-5Be85|BaBlzb#{IT)z_dj?KY7t5uWouu2;YEycqh1o41xwNn zU26O0EPWDTU-ZW3ag>|DYa%@+78>G6Bz&&u^`okajmo;cG?A0|d=>H!W}4U3)|8f& zU%!51a?;t+(Y|m0{Y<8lmJhx7cgb(o=mY+wglX^}!%e~*C3ACgvv7^LTnJi#(}eB2 zkt!PhT(d6B1I4+Snb~RAjL$m<;m3!SQmI1l0jx~2I88>2*@~oTwqoS5D2Ba>#2|1Y zBP#_w?AXCiI%Ku#^?LZZlCqH0Qt6=&P^zh|e)RFju3c;Y=9`m8zc{*W>$b|u3P%YX z{ltNH(Vq*Tzr4a)^<>MlHTK3~SAQ@vr&k%PZFTD%o63!4NF>MjpL;G@`!jCmdjjLH zM*e4X!;6VMT_*J#CS8ITzdd{Q-M8QU=%Wu2CSP1^+p}lSD=)wF)Kkwm%1VJpLqpR) z{KG$h`QCZ^ZKVBs>&-VkZud`q{L_2x-EFa&DKoZ!s?ajo#GiCyCh2o0_!_OUvZ1K5 zv50?gu*(P&krbk0F7PJ{7y?;1B{_XCk`ax>{DCfgfzErYc9{3}Vp#bWI#y&g8cjk% zm?Zy07}Cc7FsAYKuz&x)ix(~;pWe0htA`ICZfR+0Y-}WL$QQQFj{V6Vm?r&+p(>kA zVJ(gg^~GnWetVBRXFuvP8~k;Vc#EfsnHpLUx zQ2UCiAm{qWcr1>boRiK;lzM81%jW8pD_5@F=S7_?jjEDpNTtqkrI5<_~5XSI~U|kEJjfSB(r|0Z-xkoNf~_r|Y?rVd4CO4!;>b z8K3N-6f%0#!tUe8mJDCCosxo)e8?JyAC81ioH+UM$Dg1hZ)m7{`k7~1w{C;SO(M`L zrcWX;8=W4O$0LZ5htCkaN?R}sCRxpn#%Bf-)w|>>UN}3W{J%2%3CV;Bwqf1+Z%?20 zdVQD;y?_7xX!pg-Z#waZjIsp-a`=xhWGwMWGz{A_5SW{B%_5!`wP=t4d1`WsnVBwl zjlsQMuZI#?pgIR7O%5S@GF}jKK-93ZmC6!(5h8+-BCWivw7k3=`74ky4JIaB$#5oH zi{M)>((7r?n~wgpDmB7{=jlFBhAXEG(Z^sg-n(lzrmGGN_74pXz4g{xE$dtEfA9h1 zqG3;@75$N9CJ~vBqtx-!MSS7+pk!aUxyo*E%$4to#3O2@TCX-}6V(LZ+S{;!x$g_6-!uhTn z-6JDI7-~ZfeS~qXTi3i}`;OhacW>FWxxTRh{s@#Ox^nq4(s@(=C$u6{9^Y-h75E2c z?y~grD&v2lgObUq1b2adm^7i+=3A!iS%Xv0yO8grMaUOAi_YtvAAS7M_3PJR-rWD- zL;LpaMTn+?1(MRE>B&h%_^x>T_WhS|c~V}UzY@0W2KBzs2EGQU6gz3yD z(xkV26X8hknfj1to! zADwf2Y$o`hGCB|5hO~+iy%%p5Jcr(fQTVUp^E;La1A2~GTbO- zC}~mwd%g;3kc(|LqXl2EFMayyk*!->fAo`|pza@kJYP#TeRlMN@Y;e#T9W=jIFhYcUTmW;H8%w;<0DO` zMy-o%=(jZBpGtioo#csy;*Sqf3~V6!=dXW#``EE#$lh%<86SE0(I5Wswfzq~P*PmN z0b$GoIaPk}{Z}!b@w?ys{`Bcn$G`dt_1^sf|My>c1vA5NLE80yF3_jYzX+U^rv9Dl z&qyR3@cRdchEBnrKX*knj<8PTp;NfeTk4(VMmfGONgN1XwzZw z)I9h!X$4o(&47eU2#WZ}?^zandTu81&tLfPcigyf(?XWs315wIgRjDkV%=6=273j$N(%qt>XmZr`SV`z=f_!<0$bc{m~p zDM>%qkL(Do#8dO+cRBnIhzR6_l?gKwJJ`aGgez@s4w=zHNS=m(1*dZY^W9KtV{&Q| zZe`c>6xK5?7YaMa5|jj)B?P4`LTZ&7l{boQ#Rh{8GrP?u3*rY|TvAw8&_z(8Z+0Z|rwZl>R_~Vavbaa03!F%Vz%jX zdGoEekZTXw`nGM|{^E<@d->&;(Y6pbQLKn;YLyZ*MP7O36^%v<&+?V4myaAdf=a#+ z&qp79)Lv4;xKz~5j9IhBpG)rFm!lt+Nq-^^(KQ?Ln+x=TBE?5ICTYN+gkR~**>5jj zy4=-u1F91`1STe?{5ICtZQH)1ZRf7m&0A{gYmgM4DL_`~xm2@J}}N52kS;fzpSEKSJ()c=2{@-;Q*4b@dHun&3}M z{_qcw1^=vd`+*va+H4X1*Up_gVfrHP@b&9m@Wx`A9kqKJ^=CXD>F*1D^<{iw98lGJ zAJpyJr_j<<1YD8BB9=h#FuW4J@+{8UTNA3)Mis-ZVN3TNEZO^7C8lkU}B*{tI;C*xYSXKnT1Gqj3DIF5<9{|Fu}`Vci8Mj@FHX47ycnk z8Sx{`phq4I=HnFJnxQ7)$9A&Pe<@66q}knj;J`EZei`WRL!`+1mJR#%?m;RHvfb!U zpc(bIK$;y9g)~?BA2U9!R(TOh6RTuFe{^y@5edl=h?Xz-Gb%5c{;=m!74688&)TQgMAktnC8z$#s(--V3P$gISe|h}F)XzfOH!h1KP!6Ae&IxBvZ|~VNXV0BK2mb)l zmcna-T%8VwqpGrU%a$z&5NX}IwYjMYk%HV^K%Y*WpP&rsOP{M7Mp&+U_yM|R5&g@e z@K4omWP%V*gcZk&gW^YoeLBG_3lehTg$zYu#8S}d;>*xh+-G+X00y6oPkJ+~u!C!8 zNh5p?kgo|WTMF>ON(lUXV-g`!8l_Uw;^4=Rj-hmvFKp5dEd||7gfb!K-Roy*3v$N;hnR9mg`#1mh z&$s97OmBD3)>LjDig{)RZ$y~lIQ|5p|N?jEx9)m}P(VaxWd zSch4Q#NcP{oZ0KvZ&XUZfR_4 zMm@#RUO)ai$Y;$?kI_eS%TVekw$Gn*LSj^>-L;RqnbHRz6|d(oN7nQ2lse z{ecW+?HA8=-^;e^Y;znN>GI~P9xor%_%_Cn==1o3G}NQJ!-2J!jM3_=Sxty@XO+58 zOJs`%0x&79UVM-V)8UA-oeS&dup7Gu26}mUp~#Cu9~j_I1Pf8?u zB>!k4{+#^hp1X%*@R&{ykM6dX?vj$8_I68$0o{j}|9=^O^~8(tzg;&<_|2O)cJJP^ zfB$~;D_3WiDKloQS@YJ42p-}0sv$uxt z$B&P5a#C*%2YbDa5)+O^c0-2^kyW?%}5S&WZ_z4W*|Laj00*yl2gyL!;jsGuwiR zMblK~UX7h0K@@%lrsjhjc||VDQLb7JsuMKs==)aiC9thZ?x6=cy^qNme=iGPfM{&g zVH7?j?ZH-e=ghiHIiBn|78ASJZ@|0Xvb^0qpP!{qnmYe zc5W^%ZXWLbf&Lz@p|}_aj~PP@f$-3a|@)pCw3 zd^3t6C_TPO-O3-=ZKi%*-92VxOuspQeqmt&2?lp;-!XOC^wg9ToHw3O0&Ed~Ncr;o zW2q=zHSj=ZPe*G|Bt5o0%YLgIvCazDxAIoxRNXY6{D_PD-(ixV{UAl6)UVN4t-hFo?mSvbh zm(fBWO$NR@Nc10tFU$mWe&t(o$9V z=x$EV`E%#4T)CQGkjHvrc!jW)o<2S)v8hugPo6brHo?{+Lc>`djL(;zIR*i1{sB?S zAZbvIQu0eMlY*&7ZKr)H#1wLZU@svR#%A>l3H?Xu^Hll^&j|h5kMhqD@n>gyM^<+B zwjDc3(Swe(bm?N29%7vvZNI}PpNC#PQ1!%K$j{HOtEstu^9EtH#i;zE{fovQMIL_+ zS^|rH7T}S7?}w;;8Kkgu|IgRI(A6fyPgu2jb@tsmw==Vk|Mb(8^mJnJF>Ij>Qj`(c zf7!dbIF1Xo_w%%*v@=cA97PA|!yLc&4T{~3sq)BfbiQ{R36 z?WvQeiSNx+#~X_l6V77h^o*df!OV^bQ%ZRZ0$A5C$s!lNu^=cY*vs2{$M)@o_wWDh zZ+~GH@b7>7o4ELR7boYz#(xz42;fgN@a}G$?J$Yl&o3Z&-MRDU^YikGii%mcjbA+W zjo9%Ml9Q6=&Yhb+c~W>pB$0nSy}gBhg!vxZ@YmJD3Kip3uUL5oe-6R;MVg0d?Sho0 zjp(Vhr?-D;M|~c)Ze2>eD6TfkXaX@_5sL63>9{O}=-WPD4!$P#;Nd?K;bXYFar4%$ z9XksP3YY<2wQ|*>Hx>|MR$>fGUA`9dw|8=Lp0K#9>Op70S-aLYyY5a&I^pc*6c+C^ zafO3_%+T=vF!B!-P4bG^xY)~AE;lqZ<=)MiKX0D2c`NDji|rTuS@y>CS_jtPPDVE! zlDip0nyh_mYG`O6X9X70;-Zq0lH&Uh?vuxv*vCAEcLRTf8?krjp;uNhkcnyR?Ca~z zVj@;&d$_w}fFn*&baZr7WF%>Jv8lnXZm610Vmp>7YuH=$x;c2);+A1Bv5@w8@K=v1 zVW*4EZz~F@_FxDrfyicccVOW=N;}m=Nqa&ecf*dJHW6H8EeNe(A?x`~1B8 zA2$>CVsl|(Ap@e+)U=O3`eeh#4NQgLo}h3xKJ`@mSw0sK7`$k~LRcLGI!S)BZr=L0 znt#I!=%bH6j*g0g|E>CFApmvb%o<1b*Xl`jC31nGW zSypEDvExTCUcAK0IHvBXdX{F8xFaSyW=2NF!bJPM#mmUx zAmJrcQO%%Fd#W$}__;o;$EMyjQc(!Ykefa^ zT?asrB8|BI#mU(rB-}nQ*si#+yRxFEq0X*54C>n^{e{B)6!9o2oy=FP<=W#51Q zJ&ET3>A(Ef#H4tZlv&t7G!;9ZGyM+CpXPOSG?7%r;fjecr=rnltwvu}Y_1As zT@D%1@N(~qRuBY;L4+5EFYlW#1JCM1>euTApR8y5_U^rO`4ZZ|ym|9huU->|4r;Yp zs<$FuVfv87Au!r?*5?lX5nYvc>{{x3oLn7)qMc*rIfYJ=fC<)2_$u-bQU*;gE-nsh zZcA%(Uj98?irw*8w<`FP?H6SajT1E!KZGW6F>coBn_2NzQ&U|jsW&QXs;VDWR8(>L zNSqfsIx!y;bWQBe40TW;Nv46W>E_Pfi^Xmd9nD`By%EiV_yA+Z5JD{w&kNEWxVgKF zx`_-$QcVcTXo% z2i|V}X<<_rjbAY#Fp;&BPx9w5)-RO;%b!1gZqs+)|8(p)@xTepGH?F8k3ae3jrsEl z(E<~z>gnA*6MwrNqPXxD&4i_(2lns3|KPz_Uw=ij`}pIJ5)%^e-?2a$q4hh8zl8$N zsh==tXZd7VX$hW*#OWi{T2@weeQh1iVB~(pkVK?E<}jvBn?__+`gEoxOy6V?0==7+ zgyf>!62XGAvO1N!#^cZA&mq+hrA>oSFV?+hQYN`&;H+*~-5te$=;>qDg;dxm{fB`5 ztOYxD`s9|ao0)1#OiU*6@8row=Iv4X4*~scO8!ipIvt0Mn(FGiId_@iHWIKuTYlm} zOt&KWuF>hqi`~>hAd6Z!Ng`NOS5~6VD?J`W>Pzn{As5s-ZYIP+(%wl8{pP;d~bO$fV0mTWdJFCTJ9h$_$Kgj0ycm5GWn>Pj8O z$xdBSyJzEXyko2KpFvhcMC9rGUcGYj#w`Rci#+g~ zBXn|fR5Vi;=~JdmpEeEM9;Z4dM`w%NkgESV`>Iywl`22n{9^{eu;6a8vzFVI%fcM8 znJg{meOX_wDE`qrL>n~?%<6{8SptAR^`xYZery{M`09h~`ie^RrPmHVroa;?PVC*k z4>!_rA))WAdnbL$WJCFQ?dap+6cFPy{es5^qsQY5!k%Cjq{&8^_wvR)nYm6k zJV+djG_cm=f6bn1|EkM>9I-PpX1xF2dj)y+%k%$R}C zM}PGz5k&U(F)`8q1Wf6B|tJ9yv#^Etok{N4Py^W8n&4VW|wi_kK40_*l` z)p%Yz`DT=TgwqE{5EAj-y_<9K!iBTv&k}x}rH6=I1cIlxS5i`P+N89(bLUN+Iwd+L zIw&AW5^FzZ8dii5u6VZml)QDO%pYFL5?ZiDG{9hxuDw z<&IG_9yQyDyrSXD>y%u^G6pDh&)k_HUl_i@euIYp$b!#mrAwDC{rKaLId^jKOC_xb zDZ;$Hyjk+ZiX&Bxit@Tr_$}5!=CgHONoDZI52-RZR%(SaPGEVtsdfTE{ZKzOJjpBn zbojym0)BqS7LM^q$>v!jTNEQv%=bs@31go`OuxJkEg;hf%0uIb;eS^FImG=?d0 ztdnQYow;!F{EnSFNgNyy=uZo2?`peSnYsVYj$6f7S~^>xpsR~}M&#U8NgE^mqnz!{ z`EyN0X;N~gscZZ&f2*t9(XCmvS!?>MHaU#+@9b*7PEHd`yYIe73_-==kk_n?{?H$L zbZScKKmFrB;_19?+g4KlefRBm4EBEW>)%YBG6iRU5vwD!eihy$m_G*B;v3vf2G$qFSbKjgX+l%w={8hwOgEc~OmNok8V*T1|1^^5*i zTvYt+x8I#QecIj4b!JA!y7ljbg@tu@c0Wu1ly)f2&z5Dhu6P%Wsio>=^AC9IlwR!q5p<4N`nseJ6ZOG%zc^hJ5QKl+t5d}e*{3vqFF z!LrPt`_SQo;*-_b^2UPsegQNkrO>|we2v>{)xJa!i}aDA_t~CSzw&^VOS0!rODEoz zAH6VMw0@ropKr)Gv8@#m%pfl3ZZ2~b`wt$#Z;TkC$WKy4#l*%$MnB9hPLP)}$fh6Q#0061<`2ttxnTYGO!$M1|A>H(#}i%J z&Ye3iUA#;lwW!D_@+9QspkOZ@M#BV?8+8pbb<`Z5)!Syie{RhT;H ziUSA%vYx0+sh%g`3q-XUP+kf6UCi!xbsEI5VfxU0Ub%7w&q_=fS(#b?-~akwiHV7X zi^6V&PjW>iJ`Ck7gTrfq%Ep9;n8Odw$WAUzAHf7Qgwj_Yd@w zwQnqWV;u*J-_UE#N`CT4wF`mN-)Q?a=!1$rDJ^Z)n$>xE_wWecxnq0A^yv#1EO2mg z%&*GbmAU0s*(E}Y@HBHEO>K>53yyX4bZ(gRaimYQh*iybCRNR&klEPusY!S9Xj}Ae z?{2SXC?$Fd;sp$KuTRnFpc~ujtD7IScelAa2x|=^{y6@yNR&C}ty{MqK6;qM=i@>{ z=FFVEe#3eq+v16@y9U8fq4@&z$5t4hnE2oR+y4^~7|6 zESyz|vGp?Wg;@rb!0@fjt;7#veuCbau_z)sD=Q1{G6DfH zCr7yXxVZ5Xlao@?(x#@TM@7fDDqnbEt>=K>`xs}6Z}bu2&f7qcYnmU_nemi*@_F#* zc>@jOO}U`omNUJn-}*~jFu!A4@<%Y$c#h)VANinaQxVRrSMxYpznc3^zB1`z9{Wch zbj->}mHYSaXNe5TIBU*=f`h9cRgsi|M*LL$TzQ=mxd02IEGW~PmKk#X+UV!cqK`SG zd3^i=c^Ukpc-a2<1%KnZ+WKz0?y`qv|M|riSFcZw?*#182?+~n(%BIK7QP*Rx59Ogce7&bm#l z1&l2E*gLy8j2&m^m;ORMHq{=~-sBy1WhCmK^to+qEyNTmDK5^< zy_c1pb?xf)8@I0GtxQ2#vOu)YnCR$)goLz7sp*raur%4r18*Ts0!59N=6}P!YN6~e z@#lckUzwHrlt>!_b@5Dth4ll1qKT$)>~k>hskWwHw0_-A`N(MSd`drU{eWCCVHn3g z2lL)D;hW8qZ@i}PiQz)ntektfJGbvRdh}>@Z8bg%%v%4jY17V~JD?9V)Ej4-1*ri} zQM1rNF<$Axrq;R;tHw{o?!ELk0a>nSAm(NH!ej7NjiBCizhdyktc*B$Hhq|pH1A6L z;#_Y(Papk`8Zbx;F(DX2zygTt&j}wKYpQDrYk`Y#TYLM33l}kAI6Bxjx3mJE2x!DX zW>3mExq+N#eqRVfjSg2dM7z?{R4b`eK9d3B0UKvPXHhZf^2S5HjSy}X#CU% z^PYN0H+;P}01UePf&M10HY6WV?bobXbNSMxUAuQ@XW!nmY18=l34vq%ua{oRF2A8| z%HT~S#bLRltNmU@c1}fhxMw(ij*eEM(X-YgDKUxQCm56yl9EY$ z6c89lh)TYqH~HL)*RNp9pTe1)G&MHhsVj0WCoc|Py=lPea~Op`0P;cVhs`GXFNK8g z5C7Rl>vzEGmu59G)#7@`FPhgO|1Z+#IrZ}wfKTL#lF|}% zc+6jS?_}rYxRYK~nEG)cF46C1x9wm1l1XsyyOdO44pM!Z%G1u_nuLx%JFZRyPj)8%8gahV6 zT^*KXyYL7hZXd*rUp9#Uv&Khck$+fGe){Bzt=qPrJ$tsgrUtwJqQ#3hZrCtu)+}tn zn*4oUe_19-kpT2taD$yfJQ}p)RZaEKP7kG3y^-oi+> z!T)_2K+rOI+&Cg@#dby(Qxct)mX+Pk&c1o`CMyo_<>V4m8)@w7>`c@kmUaulC&*@S!>iuDED}p|HRT=<`ALn@ z>wNm@r+4n&&d$1h=+GhhpJneXEvB`_VhHhHI>wrwA*#M**W)V zUn7?O1W+F58}XpFkbo-?6^;@vX7AwS>mCs38RY6H0gDHT{t#Hp_NT(fri}`CD=TZ) zjvd&Piyk~69>t8AGuN$KyKLE;(NR&%(+I`}6q7ZKqftLU17DX^YSs{zb~LfD@QC#r z*SosAZTkNE>({RzJAQ&73FK>9yl8Pq$T-nNUjn|Mswk{JsxX(Yzij_*!G9FKQ8`xf z0fF4z*~M%`Q)6RwbG$kc@>eOkICQV}T zEJG0@R$6q~r}F2M{PRonSKO*OcO%v7`JC-G;sWTJevr69c0s`Cr{I zFOSL}#ln!`=k*8lX%;T9j$zN` z*3uSD{GI||SK^Dn2bg-9cLxPNqm5S(zLZH*8=)uTF9unyt!<>zW95>Mw`W39L|9nR zqv{4iB|ogF6+Pd{nIx{0CZ$G2MU&TrrG)77X!YVF5)jCmLts-95PRaGZHZ9x8*-N4W3Zx)^yO8o>{FJ8L% z>h)_x)V+M=%Av!Du_eXC#*xF&V10v@`e1YTTk02O)Xv+-&fCw9RN+naT@@8D7>nvg zZvTr+#PP16pn!4K<}F*YZe_y%6O)ryty+bfa&po{l2RIV^h@$tH41rFpFGQc1qb4g zwRrJjH#dnlLr8?1*RMAIRxl%Ad#AJ2MjxQpfk z<`%ZGoIHzvo(F%4gk_EsD6CM%QrchQ&*y=!NNti$1AGR2v=ePpRyfE`y{pPA)nN3} z>aJWgC5bxkyR&@H1fk5208ujCgfFd6YPegBkX-{0-~6~irUA#_hT%i+=B5_b(VskZ z>d=7$=g(gtv1vqjSZquzfo~;li&TRAsajMgj0xnYO3grROXbK-Ig$G0&oXMzzj)ZZ zsp?mhL{22nTL*FO>*{OU+S+*!b%hKM0e%54Ovt<_d{j{K(28JJs6UCntnCx_dIEnb z2b)69a+F{4N8!YMz`$RM{WI_>e@90fi_le}K*z~gK0HA12LpfNR;Y#Y(#&Xoot^FZ zdHI=HnT?H2p}bMAb9=5^0NE)ALQib+`gTC=g!^SJ2}-gwXSZ?4E2de9~&E& zn2*aD{qv46n|J+k;yHVqveiCtRdtdL&8ffS!zmk z&Nk3~E&QYMe2Kbmpg2k&3-8Fui||iJTYGV7>4gjD4jwpo^rxdtJ_QE&CdEet1^Sur zM1z-e%^RW!YsD7oi?(ag&*dQt{|GLsmgH?-c|w0Ss*vYIgEZl5MO*123cw4%$HzsG z{U!KT`ng~#|DJ}witX_t_>V034n$z3T}ek`5U;$V`tr4VRW%JR&Q3F@#((s|!uauF zRgW4jUcI~fz@@C)g`Hj9K|#JNmo8kmWck=}A%w0IJK)c4!V_I}^{r=4ciy^c-`(jD zm+CxczH@k_y_i9T{;FXcHOCcU3mcF>W|;(kwb_dN!F-&YkhJ!#wZ%mbZr!{^vV_D0 zym|Zx6!^5dusQsD>lY6(FK;LRfOZDsElu6!5AC|T?X)s(5?z|7vDpg!d-2!YtC@p+ zPftxv?bWMS_U_$x@ZkP}fIpWoH64#e`yWxq&L6P*iPH@8qhIC$hKP z*Kf+x7EIMcvQts4?#EFS}g zf#87QZ?o{bd%CKsYpz_rOz^dnCr{?(-*a(tnURsPY}vA@Q>W6InYBSZDNClJ3^OL( z;@YYdH|5O0WophrJ!O!Ox)9y6w|?ci3`K?1dSk|>q@*M_H<$dv#3=^`CJ%gFStK4A z8{`aGH`F&^i}v;PW-WuSpC4Yk6i42I z1kXXAXTcvR`dh>2T-*=Ta%td`ju8C6`TCpe+jsG)!~^c5Pkyy}*;-xVgEKyN`%$yZ7w6 zbLaNa14knk1*6n4VwY0DY2@dYKYLe4_dxexEUil1Nx>}bQ(aLzxk`!k-g4g*tTsj; z*fup}N_9)sh5M%~8j9OG+bEsCdvH={+RX6z!JcExA`L12_ypzT+&ysMz}~%kiB!@`7(>DYHO?4u6-vi z4$l`A0!2t;>-B5FPt~JYnfmzZ;!mk@NFi%Settd?lZkJWdoLGn_lk;&*49>EZ=aM& zsY!_mDHBsBOh|~0jV30epMRj6D~g%uK!eqOWhsk-u9REp-+Sf9khU*{2D_0VpB0v) z^nn6>+HX%6UIoa>+zS`ZGZ(_<>gM9^>h3D1?x^&7d6OcXP4~YxRlg*5%Dj1N-=Tv? zj~pfwMoV*R;)L+U3#Pm=FEw;r0D?uN1A9>-mHbC>H<}Y?ee`qVGPgx(*P5&O>OkoK z&ktXwU}Ytvj6&os!T*=X7Y2Me^wG};Lw_EO@zKlSk1c{I6p+gpP`7t;Hf=kM<_W0q@bn!TI5LS9vt>_*#fKjc4Q0_V)1o12HRsr=r(0@O%!wu~7w zJ=|TPq!3oiQQ2GS$Gl-X`Z+#Io}N9vL3YkAcI~Yll@&eh&E)YLG59NrYWmW;%PT4m z9@xvW!}I6Q*VfcVMn^4Kw3tBHQ>RTQL6B*1c)I=SW%=LU4ukUCIdilbia-2=_^qz0 zpyF=dzMXk1GdJ&EVSYh*#l!lBM%<8NV`C>wn2?e>k=td(u5qSASb*HBf^Ls6sD}4F9^T4eg_ACT_)iaEBGktgw@9!K=dUR zA+`{GSX{8}ySoC%k$M@D@Ub3Q|2wkdLwWWFM)@^zB?rqt;nQ%YvY+N4^7OCAzEOl;D#}@ftizZ!r zrlO|teO&%fY8!07*7(Q8#ID1#d@J*A&fUvrE_+1G_KORu>8R-JW`aPlCt#wJlS`Oi zWL#jpvzbSQI~s@_)eqUR^;15pH-<-kB2NN60v5(Djqr=gdU&(8rP|%uJ<2~eX-w)k zuMk%!b5$RuMJWIPKmbWZK~$Qq(r5H91BgGVj%w>_Z{5n=wr$(~1N)1MiWwx#o{_O} z{f0%07KMa`5wZXwXmFi{)B{a_mZuW6X5qqx9+G9p<;anv*;$g$t)->yz4zXmFkw6i z+^zX%r1Sr)fj@~STU(pppYrmGyLawhynK;h7g&>PYHRR7WD1>BE#YC|X=!P*XU|SZ zh#xmD#LL@@3PzuSm3p_qX}_od#wQHbNg9=LX{g$ll2ap3KEE3LDQb(<_dw8JK=m{< zH162G{rc6bzCOObDwnV1|MK@k_rnn^EFw%EvXiC9)m7D9ot-YsoJd?PH35!xh`CWM zP2;zcsaE_6qN)|VKKzMB{iwQ{L<^fYZ$5G2I8#ub9hn>$I~-*e5xaQf@<@M3)D^^DhZ(W z-8D5G=g#)z=h`u{j!tlyn&B7_px%%|Yk8sG7#{u5KvkDPqtzFGqexn$8TjfS!-hZO zU-I-Vcw+(j{NW>quUxr|%U5)CbYx_tT29)B{x*m|WY*kb@8;$Z6yV_Q-qYIB^Qf}B zp~-=m7&cFT6Mw-J{$U~?-((y_zWw&wyu3WFrKY94_14-oYgQ2f67^nM*&y=|6eU&W zl*!ZF-8@`eU3Tu=Ra8{;nbWLiJd}9DprodLXRF*wzalnTEmJNAD@tvm^dS2M(X6W zu#hm69~@>0Mg&t?cN&9ae}E5UlTRW0I5F77;0k?9wPxdnJguIWLJAidPYwkC6JY>= z7V4>A3ci}Nl@IB!2m<^wH_Ju2EI+JJ(x+-K{m*0Y)x(sV8p_Jd#NO|ObFz!Gcq_Z% zuI#o{l4FiTHAUm(YvkxWeDH94N1F$uY7bAI;lPIZpNSp*r6f;8f7Q6ro05nO+o-dP zGgegH6I)On82qKIQntaOPe0*Py4vcRo40NpK753P9=Gq@X6X$mz$G@S)kRPWoi zmF`ABq$PiJ_aKdQH%K>#l;qHzN~a**-67rG-Q5iX%sl)5uJ!T}hPCg#@9R3w<4it= z|4{gkX?FU{(ZmVIcU#TM04@eg4v<0o}E|6)a>#mQkr zKxqeR$=|~NtcUw>khLnn!lJ0Q>E67=H@C?ix#>Kw_=LJ7K0n^T%&=$MJ3n2l4O$W$C_ptMN zt6MO_FW!9ea|y8i4jA}O#Z~KW_1jmN*08nA-;QH2=k?w%O)@uaG1f_R;RU<*ap%0- zj4Yf9mN?nYo_T*tyoH;2aYA|y%Izqd zAKr-Q@e=eRnQ)ZQ={hGn2O_OSN;xZS-jl~%Mb5S;nCOPh-@8wEoW`?xqWbts=h1&- zzJFsB<*IVAoHQYM5BS1mhS?Y>w>WvzJvP1hXax}C#55PH;9#WU&V7xWv9S-pC!d$Z z&E+~(gqr1tTM62JTA;XuI7lZ>;qwKmLN=FgcKSy`d=bkr{sVMo-!D!gCv{)!y6ArH zNjNFrp$$zYOn_)`z}pnR`2JlD(Q57g9jRme`cTOV7!lfG#!hhU|C}W8XaWcmq>opG zMTAK}`1~8=h6kf6N9$|ra-<)W9K)*F;S{Ogeg1ADBUCvhHZ#jo1zdxX|NU6`D-$bT z{NG|_t)w8G?O5P)$!LmVRvPZ**XcJi6is3Pv0OK4dTkAI zjy>ptKGJx>?{Bj^+x6mR`n9#Lj)RZQ{+;l$!W#}-`)boFTlTR{MHBX?U15t>vo!=E zt^G0?p7Ec0evGIVG`pKdubL(VUMC8KlOOKDW2DT1#?9ZT>^yI8Z)3?tMhrM{D~A)T zDOaNE>8c#It4=m20t_w!y0b3G*EQq3O3B^k`S?Sagn@gj-~ESv%cH7m9XOCz)I(!;0m;8iYc(cz8 z4YPtv%{(G9Nx!S`lq@8S5J= zP6rMm(D%{D=HR4IcAu)5?wU$Sh<}&03Y{#bBmec4v#-LGU4Y{Ia|vmt>t?AwcV3QN z@&^Jh=lH4&1s>T~Gr1QtpHYU6qmPip*wuE+kXTQ-DRt$kg5jV8H>!+j=5p5S>TQnI z*BccsU_F-W$U-Kj!*WXQ1Y|SWV(0&#K!`W;err4yVy`DDI7oqVF~|)}+hclY&R1f+TbN zx(9zm{k{nZLVi47m)KIw3*Ehc1J)O1T9v6BX3~-xpZ9sLKh;BMOMl47IQWt^$Y!Z` zeeJ@92GF4B8>y?$Pj8qUvc7&Zv6AO_83iR1jsL)82kUL&3l=q(=f9)hJdj2=-esJc zT2j%`A?9TLJO%nUOtL%;f;Ro5uz%%wg|rH4sgR4hrZ$E!`t(9#IBGaP(2&K1=Cyb> zD=VZuLA@_;U0!0zJTCTpVCxVcI5JvdVYFT@yZg>Y=8hwooF$e5uNAE7=>(1}=9 zGvUGFkJ>l76WLAR8uo$Ft<8m%^t7Z9^c&{oZx-qPSTnz4sgFemNM!@X*FiLr~LDNAUK7*@?32yuH|= z=P>Y8IIv(xMh-QlWhJ4m?h$=ROirv_DsAXkpPckqsV~9!Oh>0|F30KoJI(g~`kqRo z%VI=*{-Y1A3_1z2a;MGjXh)sW(d4T1&4TWj8|-`b+WTIr-W(1*6SiN!@CTzw%I=;A zS|O0agThjo`;F}Ey*z^KMzg}s(=Xd^fSqBj-4kA&2&QutaIf35b=}#PQ53eQ?*ug6 zpX+f(U&93j0{MGFg2D!VOXkv9yYmP zv)$svY|*4JgV)xMJ;=jyCVijlU_vQ2itO;%@#wZNp0WYuea)8IF~vLqR}oGC8i%X% zGnLEfE54h2yejA_Kx@IPQIC?bsqcB3Vq36*fZM3D+nXW&Hh)4(%U^7uxV~YX{pxtYw!`nl_ z6$2N=?Hj%#n4xqv7bk3d0AlP-L=^Vt54pB7E=$8af1}+-%~hP@?xtB7^Lm}tV`Www zFs#?p)FdP$?07hD_)oh^Rz4&8Ih=>9lwa=x6ZdU+O=fEy8}#~baq}|6sk77lo~bfG zF=jk^8DQxYluOf7P0>RVb|Q_Y%WFQ7+)<=G;j15+=#sdbN5|)jx1^*DM$XG<#-S*M zGzL0xCa|*84$^-Hu#q@Y`71%=dXfmVf4mCki>Ah8M$hGi))*dytr*iR1c$che@@)S zbnBB$insengMbguk zNq-4O-HnjS^TGcqZ;K)ms)sCNpTcitB1Gq%-e0j(s19lS29rPf!IDawB8Iu{R1jIF(`{m%2)S$S0#B=R}6Y141ic1I&YY-8WN zdM`-aq3@r}hj|b8btmf*N=4dkw6#oX;q_NygsxA%)-5HBjF*l+mr4&=uRX6(gRB#i zsa;3oNlL6g&t)|%*sLhDWvmp-x_2r1GlGV4cu^<!RCN>4|MB#Rk;qzDlJp9|j%dXK;wxtd$4|R2XKVL4(iM+oA z90lGRR(D-AWxkB|$W5>v{6gpz^-WA=Zbd^(!oQAoVCz&_GjgwGX=$TtBVp((V@2fE z-#itc-~}Gwsb!UG6fUv;Z3LFHuiU&eG)v1&Lso}(Tz$^~J7P6# z_+CP_Ev|pI32yZ3UOw6kdj}3xGuqfF)2`6%d{vx2$oP0l>s`liPYgCQGYt+Fm%Zy| zoo>uB6k4(7W5Ha{Ps5EN?;ZtZrqC-Z^|Jhr9q)?$8&-{9AiRdlZZZqgqPe-4##u+1=N-cJt@Lqa4m}nth26Wr1iXL7yLz zz7~<8H{JZf$s{wQ+uw?Arhio?gwc$9-issWCSgt&m6g3fgKqxP zS03)AGz$u`_?g`Vwv=3uJ1Q@*x$sVJn{DWWiaHu@qpGlzM9bG2T`17;L9iGrdxgA? z1jy1?(fWp_OwoB~2(h2o!){O30qgfH9H&d`Xo6t88AcSLG)zwoSlGvbhp0PeS9fYM zNF?EZj+-4W*J}bl^6Ba6!$M=tY;`}D`l}-6R#rT8F$ZFy)IZ)6N?Vs-dT9(Z=NdiP z?>;p(HgF7fS&SZJ3Auk*V>>%O1N!z}&*~-@%8dZ&n_`?<$@~6wiLYQmU_e~~J|r`C zx@3a_TgE~BqS!^gg{FpvDxFRr`ypbPBq5pWutAxv7d2Fj#qZ zUhev`J@zz75bbnjS;y}VDpOWdvNq*um%=xiw*PV)U|;V%9M76GFjh3gBp=9T1}KzkfkXz%UK(@%=fZsZ{W69TjzS@+cu2( z>B)xDSSK`sv$Cs#7%yw}J;cM+R7N{QMF>5YM{XQWj};pp>eE(Q3K>cO>S+xEo~8t+1n$|ooL)<7*r!d7)I(ynIYKxua0ew;w7`@ zjrPkw9@YdPDb-W#!ijw4#vtDTZet42lGVR`tFEIU&G)xx#*m)y*|;`hQmm{Nodc^9>dc7rZg;Yo8lP(j*+;;yQzI{eYy zO9aj{hJr$dx^wvVEIl2)jI_+t&lkK)^zHv7T+5{G+yoQPiQsc~ED||tn7TvtwmGLf zJt4AR2sPZLJ@+3Oe9$$G2q9a$Cd$p=!K>ZJwj}9ta!|X(AeEziGdMkr2>J!P z!G=ltk<#_*6oxBJ`p10A|Jq=M)+NNr6w2cs`F5syBOm#dVhudCG{b;jdO~4Wv7~bR zOs$%+JD?mM9S$cd0MBOF+3GO*p?t>r`snI{oLnd8UQp_W=J^>hSSBBWtYh z-qpj6(-C>8`qs)$G}Me$@Q+pXQc2u;qS3WIiIGK z++5~^O2}2!`bBh`%)?_=IY4t3CR{b~BOv609CafJ&|&hL1)GQG4}wmdUfyH%%_X0Q zopl$Y%egu30)=S34j(-o>pu#~;fA-@5I0wM40N*F?ty2P3I}69m*(bT``cs@{#oC< z?V=iI)Q8%=%|y`py2En|nasoeoW@d%C%_0Zfa9D+8fsumhl3BUUK&adIoy&IbC*-j;}vAQb82DMUm7(v?2Bc;M~TPIEkrL zRx9n7WXm;vsdoW&rKoO}E>A%p>oN`}b6)&r=@dlFPyX_yc9}0DUv_nUzs~dbf0tHF z>iBy7&HVUQ-)=K+u&34sdbTW2#9Gsyp}Uw=rX>|BbF_aS3F1y;(coLH>K5RYfr+A& zz%d*&s=iJmqoj&`Wa7l$YIXDGs>a72+6dmB>UEuUz76S25V4kc8CH)g+_!PJ-Aa46P2ke~rjv+hqs|{);cv zT3ykbUt5@4K0YBPK0K$wS4m%MeJ;Thj)MM}jRX@5g@%Mw>NVWVB>i_dnI+_Ta~B=G zi<_`*x;7U#0`1=>b;649A+~?!qP((UYY}M4;B^wL_JExWd9=0)p$0TLzd`o@(@OY& ztxVDX7(@+vi2~h(J+)K#UQv0L!LGtU)#W!w2{dlZe~K%0?;lRK{3&T~-2RfFJ#QMn zZi}p@z)F)uI()aGGHd6zeNF8@()Mte37I@~LInd@VxHGYesdKnW$@bk_*k}=M@t~N}-yKrNrA!#I|L!qwaB)s^agLjN!7OorH9A7q*C0>`pd!Cye*KWfQ5BQ|?>Ne=wVxA} zkx`VPZ>}*1xj)@B=vE;)dfWW^UZ_L&cvASU?z+|$J%RMMcP%fD zYt6bwM((?idtdK|U-O}BzUiH6aQXujShsiIiHR%^&(>zwmJIbw7v~jYW&4Sco*mG@ z1Jyv9uFd0o128_$pDyYS_9(!RDSWE^-a;AG>1KJtQ7qJj{=Vy#1Y-;;cme{MME}uz z5`Y>W0$7J|#;?Ll9t#~oIYMRHEY?hojma>&YXK~LD2<`$)~uePVbIHZfjrUhl;5Qh z>&5UAHmYB^nXQlbYq@|6T~Q$&9j%m%402qz$TB=gbDKiG;^-@}JLFUaXQZ>Vm0beO zR@Hh3Wg%z+bXDdv_gXh4r?i*X`mJT8e*=9%n{Wh8*DZ+;GY|e>u)}+LmFK}5>c6Jt zR3b>m_0oj6LBVEy>c1&R?BR?%{d)s`kZWyL*I{F#z5$wLNmU1YTEdRse^>MxoFswl z{(BWys_@J}I;L3cJyNPZX?<@8kE|n;yZrpRKa4_xi#*)LKh5Ak|8bp8f+4rPH$PC3 zWVrdUv2R+u@lNm_EtRXLrl$BdeOxxyT3!)EovFm$so36U`2>O>;8*E_sdNIhxuO}F zq;pgVd__Ua^H@tA0LFu}1wCtPZ*ac~H^zZq2f=%@RJ#Kv`FsqFchmLf$UYmYRrkxl zN9~2~y*$Za45>`E7!q26g+-qlj+X%c7W*$=#w7k<6HI`E0^A#z9%335lZYahNIK!lB|c`mWjjNzjI7^J3dHgPm)>-oo3p&z!SrtRy!!t3j4Lua&2x*R`z zc1l~HiDB&1JiY@M_7D%pO*;4`ZSYGZclT_e;@=h?dI8Buq|g z2mNqzcP)&FlqkYK|7FRz5IYO)vKVe!iUiSH6#7XFa%V~C(HOg>>qZM0) z^^3ZsHBpL+i#(8^C*O8o|El`(To(!DKjJ5pk657)l#~qaaRtirpwS~eRpYpqmbe42xv`eX5 z3D6hC-xzryMQUvgr5e?on)UWibYPYWU_sJ;V2U0=1yp_J{}Xx8Y(ida7E8&Z}g>`$k?aG zY*lN?gl zPaA& z#tS_t)Bs^NY)dbatcFh5QSK;wK8NsU;~4%#?nzoXe1bl{ZveJ8NC6vA-yTJyY_NId zK(uT6x@+;@>vUbJ&z4#AyL-dX{jQhw%OQkFd<1<=EL^vre2a5Hdf<6}W##MZUon`N z#q0-&#=OQhRDt2};zF+;C(nI|&PwDcEt*L}T)gImp{|xpx})oLe-waLcHe#J5p({Y zyfp#+OnTklw)`7~)GRMA56FS6dwYeKOf9dYGS;VMbfo4{iSDXN?LHLeuh)d;uG)!b&WCwpYLPAeP#osWLHXhp9 zNx)9W`=Pgu$}oCT^zCX6q8TST41$jaZL#O$S%+LPVvka&-D9v6s~8(^?(Ib=(8tGD z%g;>U%=V&Ur$;a{?uv^ixm7hW_eR0Y&YN;`O$HkskRQ%_iRjEu?(TtOE!n^8b+k6$&8zd|X7tY9u>pg=zlh30auD*VxQ*^h&6;?Q#Ln z2^C~9e?ghUES>nUIJcp@vbL}^eY{OsV{Ihe`Qx#7gh)Yz8Mf6uz*?PTppeh zkzYLk!zx!)W!QBbSlIJ~AdMD!4u(1XAS^e2#G1`4^!Gx0GntD`o;bM~7?~M3Xw`y? zhah_+g?V~Ew{3s2()8#k`tVGNQRVgVc0+yZR38-A_1x-QulRI#c|OLsxR~o}X|*|! z^hYuGz0rNeSE}5{`}$ z8{#`;l>46Z#m}5-3k*|s{W)yQT?{9f7+@xlj#$Sh*c~BD^v<0D|IddK;}AY2s+(Og}o5>$d_YX*EoZX>c z^r9Wym%Ic4jc}z-#KXibi{d!Q9%^zMmqD9fSA1Kpo*0w!lg~RUr%u`2oWS`OVV*o9 zb#Zx~DvE|A4;b8QcyZiElC5lD?fu8Z1T@gpdEQzc6i=o3`U-Ov7W!RX1X@JVBSXAz zam+9{D1(xwbv$*U!}R%Yr7l!01{}v#M$>V{ht?m|x`qGV;3LP$o zfW_DW!`hVy@REqGVvZmOqUQL+H9a)FcggvoGW*Yprs}k=#@^AQomM06E3S>~J+L12 zdpvIn!=|Y8xkGst24ud-4oZ(-mkGF(Pr6R7VBgYs?q zMWyV$Q26}|4z_@7mq=CPLiBengCHP7TW>2XbqShjtjo2QAlh@_#U|i!nVg)=foJZk zuA%~XlDH?*>#WA9DU8>it~ZQ2w*AZHAD3Dbr#7ds^7V0c>ZS$0Pft;hOSDW*2J~-Y zh~=gyUXvxf1}139?iD+xQd|VZoGk4{o~)I}mRfg6ac+;QqLrgnY?7!v1&*j+H(8-2 zqjYru%PV>x2|=>+Wm4W`$>q`IK5e4m&9 zj--*d{Mf(gmnTxC=|>x<6C$+g9gSLyPx822dxiocX`s=;*_mU7*D(qx;N?{sL5+(d zts~F=0%jalKkl_)+{Y)?p117biBtYJ7?82XtYhZ91&6~*Nj%OX?eneuvkyG>d+vX) zsLR(vZGO968y&*b?!EBM0f#S7KyBba{{Wr@a*(L1W^u_o*gGwj8c#1T;wND~UnFdB z2~Sx%JPe48I6$_M2Q+ZEw?`StUK_jX&!2)}(U0;ID5ONk67o%@%)4`mF9+AC&rbIv??w+zwkd=SQZswgeclEz z2LgT)ua8bvl^6dB5_`eG#7txN>#0AUrBhB9Ht9ha(+miJGJmg88N|_U90i3UF^%q& zu#OqW&EJ+8b^X0jXJDs%l_O#}kn7M@N^IqzydwODU+JlVMQyz}#J7BQ&R;~UL<}N# z$n^K*H=^9Q9uO;AoR|=nBamAf!-vo}`3&0I=a(a@4 zswXVp?j!v6`u)FaX_!o%7l4`vz$0S=i)K-k(*!r z)!&6$+R1N(kkNnIuRoKS$TQJVU#a=;hFZS1keja2jv%QqU-rik5Z;l5vWAY1=ULx) zdtjJ(xq)y_->vfnIn&Y3?Y1(;a&v0Dv2Q)GM-Exrq{Zg&^Xg`&H0Dq5`;V~po>+Cz zG7pbnv$xQ=@lksEh@jy(T@M>tXLXDvncMF3{ePYY9A)p=DN|)yt|8q3r(91~XYA?e zDT75J;Jnl4VGMp@gWa$V(bmB?nm{NGUSB`K1+~dvuFh+??;W-k7A|YO{W>pf{<#QP z=bG$0{oasH=SaG$JWne;HaxA=^gbTja>E{$SBb$hCH^OeIpEM3YoJN-CV-OjRU6bx#L&Q0#aN0oc1LU5N(OLhQkJ6QIlxXF9Bll@!bl~?N`-*pLr8`n z!#SC(P#u+e#9=nDlU?p5EAhk_Ffadecg+1L&R^5H?GGqWvwFT((iLtw6c0>;BAqkI zWM3YyQdCU+&B{$P7wzJQobiQ=x{U;ZY%7)_tDAXI;psl13zs7Xici2Y#cM>u&JIID zlE|4b0Xf{eetAacJ$T;I(5O8KDFt8l)Q7xUJk_j!-)-$2ZTtGu7j$S~H`ftc6GS4%Z=UUAQ&U}C zN>kj7^Sl)SQ_nm2K2T5qNd7;di^9oj9r*F)&Q*PgDMa!DQ$Y$j!V$PAtYgH+;qv}6 zyp1NAE!~yt)}cJlXyX-QuYP|MmCkv;4c?LUnwBN|So)jyXv!Bumz&aLEQiH8#`Uu;k{^dj4zHn z@O}R}IQ@69ucUjC&+K4q67*s}k=X*|j`3(TWOF}jZ$4O{KcPE%)m>77=Enr;e0+4_ zcN@GHD_>s&fv;V*3KoZ)H%MLTk@ftSy98|4FWBg(T$3q@`-^Tk{6-7%LfnfDe7uc9 z+X1Kh(TBCHH9p-Bd#hX1IbXQd$Cw-F74Ct}Dv*pYC1o0#EUPRvsZ4BBkQy8upX8X;NRxMNpd_)0FU#P+duQ2!? ziGMCYdo`Pf3yp&H`$|T4YK<{Ba_H(Xyw&YpFGSMCufCC+-sX z{*jtov`Yjnb1?!fs9V*E_K>hfTGvW#1l^M~nMt6rPC0}yyn zdMD)JKuhSexA21(od5 zY~V`>`1xjZz3q{JaNWv1xM4TH(Fl4_TRruiq^_6US49KE+zx2?-6j&AW)Tst`TO(= zD0iMc9~+%kV<~o>z>kk4vxRLfq>W1BP?}g+g^u~uF}C)%e}BOAY!Y&+*UwQzlbNFb z3v}JwgaJrMFf!$-oPvUesrU@QWy-?jcaRlq$;q?tdRn_Q8JG$=UN&?4j60#PuMv2E zhz+!4<*J;zU5T&whKp*ddkVDwG2SI6)=@X)@d^13A7Pd2SLm|tlA-%}s{SW8+J9 zK9`;~Cntu-A;gkC*MQ9(f%S%X;Yh}^C}};@P9AvqRs`y zEpAr)IqL3~+urEmo~vK$iWLx!&mHMxCF8B(dKY#HZgzYVl8cDgf*n-Gn!?ME8T&^#kMeRwjMjW zS*FiM{xCO9%ump`YY@^k@TkR4)D$2RrCvK#=;DK@$dxn;c(Qp^w2^&}<)9|bJvi3T z*XQQze^DuHhN6Bq{2KyeDO38pt~814ycw07gGXlJzfuZ8p00Ed&-IE*HaqjaqR)c= z8OWJ#f4e-~`E;>;;K15ApL3G(ircE!!1m#Q8SL_$RHhwEE;^E)b-vn2r$8JxaVq!7U)8}LXhkx1IPT;kf*@Qjt^&zb{*lF9y9UH?QEadHO0TF-dFTvsUam^+$%aY#5 zRr0mUp4zqLLWA{S2gY(kI|+T8FNTsnzn%Vsndhsl*6sC*?Nr&xJ}lhx<=+*_INI8H zXI*(9mJJuSTKF^p4-coq@kgscf3(}AcT=tF zEy>9h+%8T+a6*F(TMPynH~WS8i~2qf5-4fCX@mFcP{m{6gFv5Hbrs8(RUlzUEf#Xq4A;-)}dnQ zVb$-JPDj{yA0_-o%!JV!cOcYN5$n1l%-Z{`;)b}{$jv=G(p*exp~CEF;NYpEh6OXC+5yZqCm>A6}u$SKr zon$p#Wh7cFoxWCaIe<6xqLXY}lIs6q^^PJ-y^#w?41=YfL88wm78I zk+tN@#&st->kJ4p`c<+gKfkbCzwP4Ud^P`eqsGkJOAv~6s`0(!eaa-f92mtBh2akt z!y96`hGo}wQ$yo=v!^fMat3Z=lfy0YM?T_xw;QlBrCHH+;J~R*I$f}Bf*etFr8EMb2O|LLAM~(eP z8{AZyAhp#ewbMssC{NV#?S1`I3et>1yCy2=LY=UV=-mKsyX!m`bAs4%RP1!qnrdsE zhzRz67be*V2s$s&(|)GQS5U}GP5%V)6PMK?X2dhFxLMNsWnGE_j-!OAywkicWjGle z>M=I4;{_`|;!44^k-@1}eK&Cnr{x`pM-IAfMGbTX>?lsSVsZX%(+LU1x4~ohTpU_E z7ZVQ)Sllj|;!{!7G}M&v)bD)#cKY@nK~I0m>+|LAJk4kv_@g$aU}bhX3kI0efkE&9 z^TSCi(!IDCLsW6EJkQTTdI}}GmlE!o<}}|`6$!@cX7T+a`(rnB?SOv&*BH+XsPu3- z3U8@wa|Dt6Q;1XVUH5Wjef^Ka>{}pUBq$&-mciqE+;hia_L?M=K0>=W38C%$s%Lu^ zcFFS1+GTGkrc8=fq*4hhAy;0#=($k2flq{rfHaQ%EzFji#PDM;`f1pVk-0j1zHb`Q zUY;}b*Hr><|^Cm#uDgIqM&*EaWj*XN0m%o5*s%6^~&C1zebe);xvd-dLab8_* zj}&LRUSmLR9Nc63oz?kIBfkx(?~BLf2BtuSd3rptGC`YWnO0F@!B1~UcE1PDg*-) zsuU^Oiis}0Fo%o4v#em?s%OWbCzC@GNhKgXryv}mm(uM_h?Fu7l>icU$(_eqn z`M!f;b9A|~(Gl{zB0S!d<)lB9!u_t*)G#!zyD6JF5^MfVm?wd?~iu9-mkUXR<9;9s*67FX`4w5ph6E8z^`P1aL!4F z12`daxIHiAf<6d*6u;(sDs^h@8{gdV*xD*+s&ZQj3u5}Z0xB=2jVikx1>0LgDA{Pi z?S`2jf)OD60_!Ce;H5Ps7KD}-g{$kdPe+6&7nN%wK)5NdqOyh@Md=d;ocP;48+ded z6gHa!r4bdS;^85TP3%cUJORIbyi&yZ7?0|xve!k}DuGT>GTOc#flm(uKWxB@meMQ} zEig>TrmIc}9EJ}GAmiI}^1pvr|IX)q3Gscr@ZRj`^4(NCUGHc+#oTa%!)WaGm!p%x z$7BdlK_XC{Fu56fth#WK#-l^AN&JR&l*vUuS5jG8`M*EtS)DSQap%m`)X~`1AvDw+%_VKfh08uw!?nTbT?YqX$oV>HU8&h(MLiJ@c+vMh*s9Eh>$iX)U zQbLqhT4%}ubvq8}{mnqw&=FYG?`SCaFfEY+AzarifS{C4+}$!Wfl-;u!Da;+@|+1x z)ys&FC;s@M^2>nm-e?d@Tp|g-D&uNfYy4AZ{T&vbzvUrNXT^88)-EI}qOgsze)H!o zViWtwO3xUZl%9+4tT+n}X%5!2h`H4JM58#-`l*>tQeMn?now8~r#P~X5Ah|S9#r=7 z;puO<=(=HgRLbq7QSS2c$XDWR!`E9~P5odZ zE#`UR3BxzZmR_k@+VkHAPIXUEp5HgObfZ0G(X007tEOb2CF<)ZLTS06nu28&V<$rL zFGJ}WqM1lL(Cw?-(s%;yQ|W{3jyC0NVRc>IfNnf~H6!2qq~*H9f6j5SO!!v#skudQ zy2o+LmpY(NY0c~F>!OgO-7@X27N2A4wJ+-ihQrD5sK@4o?@ln{f9bPMO&> z+FeLApt;7s++x`wNtImeo1h35hc2l&Qrd;esf`zU(MF{I{vVRKW%w z{N#gS$z-sl{-ghg!jvNOpP*oT(gVfT-tMjK32?1Q5}5r4Oi;Z;OOVL7Zj? zqXc`}6x|pos(*3uZbRZyrgg+}uW`H?HmXcOlVSAqK@|9aC1UXt4dP$B@!-zoyKZWj zMLKW$@2a})F=2Vsp4JrY{WTYSpp$sQ5lxLa^&;je@7hR*=k-kg*;zS|96@+`@&4)c z@UO70=wBDM4;EtJt!QtrJDe~z$NT%+o) zY4m~>!0r9Q>3-jN`* z+%inVtpu9aB^KcMGpZ%rIqQV~ihhu@(!}h&qHBr+@c5^RB6ZX}Dc#p_EkBN&tgY{J z71CMe4-7Hh&ir{ok8pEOEc9-!ZysH>aMzw|Ee}mrW;42zRnFls!%9}(u6XIk&x-GfLB;gx?2 z)J7B?r@!(ih`U8cd%Rc=bAJ=se0DSy7Z&9!J%X2!`>WF-b3ZRJ) z&`nnvw><#mkd-AZB>$OudwLBK%=pX3wT?VMN?FVKq?Xxap%v$!$~%Jg$vc(i&^T;( z&vV{GDAR0weS3kzDwiKFx3`W&ABd=&{Osh>F~-)X-H_SHLk?y_7GJAh3hbmgt#+P6^hO&>=6NZ)Qi3#XTaP zjv2bpG!K-Kr8&WENmIL!e*1DC-`5YUdcjHBdhTZo|5ZUvFPAC7kIyc6S)Xt*#ub#M zB@eI)=eb+_3LOb^hlipeQCz{Yb!fw02F+g{brsNVS?iJ$D5ovdj>dBB1K94ABR(4# zka$Xy`o{lvy%y5$R7pe)HZ}FRDz}mIgF4D~3F$z4)@SBSa`e-um-1a*7UavTTp8Gm zTF}C%7Ld~gTpBT!&&k)pO-EoY9*X15BarVO3OIN;J|{1-7Gn;~yP1NhLFG@k57$53 zT>dhb#9igwQ9$FD=w(0riPvxQCS{+hJf7j3)3wpiaf{TX1n9NFttw5sNcpHZAGf`$ zT#4{ZF-co{duA``|FqhP@yTeV+Ozy|+|G-WvFpL~3`lBT8Hy+D8?kqPqAL#G!Px?x zUDb@qC@73QcHSB?%YpZXv;jUtZHSPZ{9;&+u~?isA8?r)iLGI-mtMle+ZI(^OWzV~0b z3tB}avmtRE=GCnkEBx&csE?U}^4t7K(z{3K<|Z2x>q?sywpwJ@eO(i~GIB`aWHc7U zIy$sGIreqHJ%)VQECh36pEaqlzTh^tXIhylY1-VqZkob1lnTY)U^QH(uKUo!zp;-x z2c3wu)%E)3uuYV0Y;thLmr*X&o|JdwG-U`Ofl`7Jc7~4~R;51O5 zP_M3WRtNBWw|vAMx{-{gDaa5i;{>2;9M+`rcN7i}@HAV!_wA75enm>iN_u#dw%ez~zD(Z*X~K8F;y>M-sG3<{>u* zoFKo)5EK7Dn$ChNs`qW%B1%aAC=qZd>Fyp7q+7bXyL+UhyA`CQyCsKirMtVk2WEKp z^Iz+oZ!l}to_*ifb)LsT6kZURcmn<=1Sj)&=pE)U+3F)4)#?&0t*n%u|HzRFQ2lB- zD>GJ#2?~%Pk$sbsBcr6q=29L1CRD1=PwEI)Mtb{4*3mW~&MBDoAp#KH^u6KGG+EVy9cKB5~?jsWeYm1Q^$c~V{t*v$s>9sifsPkri zKRzdCutZ3EyZ?sb04I7bj+?5A9{(%YPjbljQ0?r$G&#(VgiN4JoD`DiLtVzRi|zI0 zO6H~3;I?$!t)Jdf2dbmr%C|mU;%$n1YI%oZ_t=aZ_$GD_2D$ujjO-eFm9sq{%Jeya z7Wj1|Pvo82Yu}=$IRTfmCz!sqcSd@+mzeRl$QXKhraxltf@sAeHxSLkUO9fT$DpZh zL9J4o!%hT}hexCKx3?s+2_~;7TQ9`!BJj$8z5e27u-j+xl$ZyWDgi8Wbx!MnV|(8v z%%}Ghx9OB>3REmi@Ds@?0{98+NcEV#I=A`>Pft%lPOG|xns6gI`r!t`vbN++% zi3y-0y$@s@RaGhT0~_-4D39l=A-lWjz0^IMA}56cZ{KnCz2QEj$hzwk;ynmCiU^J5 zD*o#XgDOE`v(+0qtn~D-r>Ao-rZ&EgP6l>rgS;DC)jNtz^$!`mo*ky-ju3dGc0~lC-8NzFB+GT zla*pdc2${tg*?m7D8OWbgWgv^Sp|ACa8rQjq5Fh+T+s0O^1uN_{FNDuMedt6DGbRd zl%bQ6jOD`5`r(z$!g#GLNHvhX)ix27cNM`{z?Sa!5Up@uTkBHo=>JymXl#*dzW(Y3 zamj%*KI<}xP!T_H;WUeSN{f}$)EA4jfU}jg6`553!rAx~T33gl(Ez`5Idgc)O_%+{ z(Z_rt%@x4@%DK2=@4AE7&Gk%hVfo+BY+fhNsPHzjNC(tWqXJdE^|EnBUiJBc`E4R% zUZ;L_S)XiJNHwRM9IN4$c&yZQ&cis#GIGuz%6<2FY`^}=FdQn-2f zvcX=SPfe%ktVRQJpVvPAiZ;>?&RlV(rK0Fc0f$C9#J?jNAE<-VCQ{U@si|!NiEn&A zA)zt(s*;kG%VF#a=-Y8ueSI=A$^3S-R8RMj_-|Q5|Ean@T)JF^@VJux`~jFo{$+`} z-L13;6&8Bj-rA5lh((d9x`rk_7-tua215UOH<_%gS8W*E%BPzkE<+p6ILX zK}6nw#Gn6Cfh9u0A85GcH{;?c#l?rLumVDF+csnfxiLFOKKV{ufe9Y8v{u)F2wlcr ze4`1GF?!v+kruyMfZ_EhxX$Da4Ap++k7}v9BOn8Z1)dtcz^wdlDs!L!ihYz;9Y+(4 z`Aal{=X}a0vnse~mr`Uxu!7El+txkeA@4db7YA8BHym3uD-WMm;laoW3Lk%YelaH4 z+~`I|M@PRV9&1ia_=*{JbjnJnuJA4mZX7Xb7C$w9QcBqeS=cZ;5o8j&@5MnNW;dxl zusr58=Sa2(UV6RO^xM5TP-;0cQ_QX~r%@4Kf6Ha@yKJ39Ucz4xw~+JYw(5Lft?#hB z>GWj`KyI2lx2HpXGnv9v#0I{067N@ zcp{3KJYy|1tPa^FC&3f2nd$=y7{$efW}yT9{a6Tc>nG7LvJu$m;n0wEAbhNAiue~M zsE9-)JllB=gTpiNOr$UH_;w*;Yy2`d05n${taovq_s@AEJVFU_Ft2?8tPHh|jB_|l zdPdoxF}34k6=V2TPNCm@U#8>J0M}%#VN%Uhl$fS&3{E=Mjyp=G>Z3JshtDf6r4plI z0kJu3jdj!$P^)Abu3?MZ5id6`SbGbA5jP=jWKXD1B()wme(M zdlC|h^KbqZw3h@lSBuHY%pAnT#Mjd~9lLvHodHjGM@LV&Qg(XB@sOKjm+dK4lkhl1 z-)i2@dBH{jo`fKUWVn8(JNhK0%&!>Cga+IkB|8VR{nOpZ#>QgBpWpwH516g27;O4W z^XstbY?MWZfIdI^6Cj>p><7vzSSwa6PeY^Nl@a~7HCq_WxDga1^lkltHwWl>s@*J8 zf$d~(qIj6Bt4NF%g#tFWb@C2`!zv$&#L&MA@v1yv{=?k@*IlfN2pjp@>}Csj0iwTi z?X&H12!e}9I2-IF+ECU7rJID9UxM17F&Pj;WENO_5^O=dvb;~Mfcb)uuk4pD;%^*O zuCPyx&-JmnxtU69o^35qh@Jjb+<)IQ|KP`m41yNVBzixu`5v>BJl(HDptZGlHoxpo zPZ5Xv;K3Nzgz$NvlGm4d%EcfQWsrAdJGsS|*wf!}CB*&e*vCqXauvJSo=q3clLM-R zmlo1^Rx9Kj&*DLY2g)n`{`54%U+|wE_jAlLgOO3OCF^1nJ_cOL%4F7TMP(Y`v0*KaIMu&KN*r#JsA<;r_G3`Q@k{g@ z2jJ3a;`61y=~PcoS2qwgontEYI@yqfCv-I<4Rphe3;pKqXB7Bo5r{bbUPRmY9~b`3 zggQ1h_Tk|+2bGZ7KtfOS!NZs8pBC3l z!R(*EQJ5OMKf61Qgsr#3OmMHLd2{ohRqR>H#p9izQsjuwl^~=?Y4d~Nx7QqR5eWFv z$Ve14z?q+y(R#H^_Wh1Tzoa_nojTVdp3o3Y_B5z~BfB0p`s+1(ctKp$+gx#9FCH%8 zl%PeTbwG6p!gw~k+qBNZQN!3FRwonjDL4vD{#ky#^+>XvM2$x&m-Ueb5-SxTpU%4< zmsdwLnkb+D`c#d|oF0I_P0#3=uM))5FmL4($IVBh`sEoq$GgCG0^|%cX6?+ zZoD9Dd2!j>M=mQ1s}f7ofyI|u`uD87H99@x3_cu;oCcy9ho1^TMZGVa<@K1PL@mcM zF5%}8C!qPwZdX~^FPS?YlV9;?R2#+H^oL}3Ss#P1GPIP~;V&jC&r_rs~08g?x$ ztv@rvhaB&oaj2ysxZl;e_(+_M8N*KxsPG>0VBu?czc}^apRU71hfFZmiJT9@-uS(V zzcZ$2;C2`9ilqEYig%awaDsd>{9q0`uphjPpG9`ciKEelA zMzRKog#`yc19z&ItGl}aGFgiB#Ds)7{4PKpf=s@- zQV+`d=@TIqPVz%u62$*Qc@TVu4(#aQ^klzp#RA-Jo|gSOMMa(3FH!cAqCePn!AxqN zQx|25e3`1&om7s*s8!KTK9}?@^-hY;$nH_JCV!WLVi7@lw0GFPX5$VZ}53IHGvhW~`Y!BV4CMUO86J7gStkBOrtixrsxG)*~qatcTse(y_@Jo%K zb37WSI_&H78CviD;l?noMd6oOioRbSa54V?(T8Q~xo7*K8*n-ZH#KdeX((Ro6w$<1 zRpppr_}!w-^K@x-X${elgP2^`;s}tVq8g_c%Y24beE)2#DBJPApP~EhA$?vU>fz>E zxQ&EPdZlc0f?LpPG2bJ4`IfU%o#%vc5cu8U^u(0Q-to`*x~T5DnVk!t`mX{0*1Sg> zk9O)d?u&)3^34=fXc}pXay3|YoONBIR&<9&vDXx`=g*E_Hae?^$#g3s`cSqf6McK; zYv$xv90VEklOzTtZFkq!y&!lgu+N~Z?VaEMXV~fgIHZLt@i}B=Rpk9Id%maxwpve* z=DUm9vQE1b+j%}7s$otqrexs^y%#f*;j^kLpi%QO2zlO5WlHBT(%d|1bw;$Gzib1| zqpVPL5KUx*i1ZaY0RZ*TgK+|>TCGnFmy z)`hrv#Y))FL|NIB@0$ zILkcZN9yo`D+qZOhxS1~Aqf0|v~X>qbhi1>oiXHN2Q3Zcli33v47GXZy>N45>8YCC zErDzp-Q+7jegTCm7v+2Pp~Pj$3Xp^}2p_?Z=hIc48HCWjMupW^R>CbEJ>4*h@^tzo z2Vt-$PC|Q>hh7S>Wid{VLxMG?-8B629`d{qa?ixbL`L@8hG7^unL^i|!_U2ad{vW( zww~PNKvpeoYNr2sKm4V-M2~GkpW!lfe;S+0X-*;|(vjhLFv}n7I zP=RAC;~SJa6+szl92~Wc9*y^BYhM}L@G5>}y+1lf_4`=*1J@f9mGhbn!{=ugeQQ_e zYZMOe3RN?mp@)&5?uqNhx5PYp2arVUlSm7RuDZ9PLjt-71!{Kx4E{V$Hf`TC9t8xf zAWWu%ed?!vt3CW1vL+#bct|0PyrESPcht%I+)@K*h!ee9N1$t9+}OwpK` zo#V?h5Mv_!k8Eq}Xyk{Icpx(@N246|h`4M!_aHoQ-NtltK0LSATKj_P?`nJ_jMQDkCE!UMCBPpX=?(Ka=g) zJR+i^mY!k9;D^n4wXa_lFL4XvL}%8y4z2Rh%b}J<@d}L5v9VzgfG$;58p&v{oQ8^fjvLsI&s+F&pDGUs1kk7#f;9gf#4< zV8^xlY}G^#t)%xL-F{bAIL~ z6xOOJp7MEPO`$NxkSB?8qmqiDh>I6E1c5Ubk8oY@eB#jniij`oZwIst{ob0LS4bg8 zcF!4QPimJ>?Ql2l^ER7xu%I%@{wd!k0Ntatj0H);H!sL5f$dmp+tQ*XZ$o35dc@Z| z_mm=E`lQvJv(E?ys)>v=h&OUNo6)c2?66ymD!@axb6^5}1$|`%ey6?lwgBFHcztq+ zIu>hdV=L-~c)mN$0nYSz@-%+l-mJRq4?-^&w60DjDS8zBZY!O+L=?Z_sal4qvW1|) z8y6Fk?#TjaA)zHG@ICrsKDVr7nyyN51te(CSa&_I%9Z?ULpL0{hWj>{s7pGY%*JMh~{ItqE4uW zUf~mxKX#l4o(JB-frZ;HVG8sKp#{BK!o}MQ_eHmTcO#AMudem=NePoGii;~^*61#J zN?)bZ0>*7PAhpWqs+2rp24@SzFm?(4`x>G?AzjQxK%jmm;@y(luq18^wZH5mCW>)O zoBpx++5eH^!S3Kl&4`J8r8OE2L$;)Pb?1#9XdZQEaCO$^ul)1|*GlWQyN|`{zwDfz zilsUWd3AM6`DMlk{7B4Y1?b_9jvc54cI*WI^g3cT7C+noPw7blL}yi;$yEe#yFCI% z-%yY1xy}whAiWV196T}p!Qn2l@n?Bs4tOR?vV4kfPKO~?Gwxr-&F}ltv5>i!nwwU^ zwz_)GX2+MEhsgpDkJ~td;4lo~RgspQkZG@mNom|S`F#^3@#R1YNP~&c z6=)w_uG-C4=W#uZ8X^9xrOr~Fftg;o#+oEIU}>fI7bUC{jH1x+J9lALaMXfk{}eemAT z=5+&auv&jmDLOv!rM!OvhgLg_`&20MNs1GL&Lz(b_s)$e9@`CfahSj+z6>lwg|>bh ze03r2PTXR;ng8W}WJFi=xu&el_UWz?DF`Wpm`%Efvf(1W;ALogyzK@#HHWef)Z5SP zJTRBkP+vqcz4IHNPp~(Keuz36+~diS;CFD5cXC38dB9@S>b|-4C4!m4JX{_@X+cSu z_ksYuRH>H6eH7Bw(0SYp2T_o@_D7H635^fLqvV2oFHrexQ3(ox(-LWbRjz1K2JpCYYkXKV*+nk4~|NLkr2F?voRFqr$ zbGe%|HT9%1`vhG9k(1ZkFRJatk~iMUQ?%*q;(yN9WJt`o>e}pGZgON|VEkMa5>XPN z!B(|W=i}xr`KLyh+X`M%3XOLJ`R(MCeh}|^J4sH4p!o6)y8b<#Z%LNCDe!^gKinMA z0FT2zc!9Gcsy--Z_|T`{b2?=t0S3 z%_0lv=$L%|^ofp5_mA_^%;CphXB1S^>o(wntKFj++!hFTW4oBxy%HVgoPGh+*FPA?{`6%GR!r8Zvy6)4x zJgO0_L&R*wIr-sbQ^pcSH16X2e{k8K;)+Qxk!jRYvjZBw1bhdmhwdZ(K{M}X?(@Ok z#h18#kz>EIdUVnIa zggwH5(&XQ4KC81VpCBZJeLjjTvBP*_ptmVJ|1N79Wm0_Qtqjy}=EV8P%9V-B9*qGX zd*$}U8R2r`D>Al5Tw~=M*7(7c%%Wf6yvgYJY;O^F6gs;AqJx#PR3>6Jovr=w1qV%P zUs<%|VbPHbk|LaRA4ZYwPm!ULTZfx1j<+8$6--$U%h&yrvs2;Vmuo-%bbxmnd^2so zwp)@LkK~igv($7q7d28QROscnziVMeZe8)lKrh-=#)9)tlEi0;#21cF0-tz9SSUr; zhKFTKHjx{ZeUEb{*2^Tk7yF4OjZ4sfQG*tC9Z-&?sfM_ifX!Ho{%>PXN%D+{Xo5`3nT!e*I4@L zbDyBmQrg(NK5jPrjBX>lX^h8VGx0p@MbD#kjdgEZqn4vs6K|l~Ai1fqDIN3Dv1wM* zJ^Hmaa2B&t^Qk{QossGI&c9ZVF}X^wjg_B%K~p<3b|?IXIvqr-Dsq&RP((@ue{8tv zR+v8gT2yTW#r9!mM9gU%By$^G}Clf&t@6M)pPF5%|pJs|y2K~*5D zF3T~QQv!MOm}>{`1^p<|TLcb{{x?Il@F(b4Teg**UHFW{s8)q`hcDr4ErA`RUMu?l zevBvi3oZz>*SNRT>m#u}mnIkg{6UJ?UVrK6tnyrKy;V(AEvbhWza&hdj)iF+0_m{Q z(iXpcLva&v?8R$=T?>m3m2=(QYvb!+8h&m@K`I6Y08P)s!7<#siv0L72<*_IJ|Z*v zVx0nNYIw`wPDOBC{p0)NVVNvBPIRE9EIV4Np+c`R$JwjmhT6N>98)$b*+JB^B&ki^ zFMlk2oA~^NC1J&=6`7kjJcxqVqB}J7{0G2^&C$MO9kL;2V{=F+Bzk#qlf`RM7DABR zDPZ?e?nN~SoL+!59RGMZZ__w5qob{&qN=kvyfWfUZx$iSOZ#tdo|JkxwD?b^HRFFe z?Lkzx@(9#us8TTtE31IV5dm!s;QnDVY@p|$TY1 zv|2@qMwphAmw#zL{UzeZ?t>er3IRiXuJ?f;x#jZ%<_P+bUS=o3dx_`MO}%lFOSgn8 zbi3Z!zYg6!VG-Ay5wa4#o!uShQ`D^QzXW%=bDP6M28Q8F7jzSoA&Dc@tVnKqQknp?fr%wB zHBQd$3vLCbnoCHsQjLf_ENG;+wME_U`)nt<4+7f?P6!QC)7uFTb?kzn9)Gf5YbP0X zf!?qAdBpx*1`C}YR%u`MND_xpw<>==rBS7YONxpo7%tSp_+ z-vr~*B*!3a{^6V;dZ3mD@gt6pbjOYUcpQ6@#H3wr=Ue_&NEt1BZT9|!e;uXAsG;cI z)}8peqCwY=k9c{8e!1jTBzZ8)f_bXbFplszW%rt$VOEvq@!iKi-uq{(%1sV~)5m;{ znC~zfEZq9qo5tDkqy7xQPjgR)^XX{kVvk?6uTW3Pw?8!PO^bA33}5cF!pq%ZAtrY)(9SeJ1N`s{{xcwcsZ%jR^&*!HWamRXoZ^7)P){!kDBDH8r?qOS!#u7NhBG zdPL-;EFKAoVj}e9x!pta>xj{piA@}X&CN4WuRHyg(=rB<4na?+ar zE-V6w;M8g2j9;Q|*USQm5O>W1bc6U6>YNK-vd7|oQaL1OiJXs*L7i`-nXh_j2tz4M2>;z8f9>^? zmqA<(zy4K%eozWDm@$|qtoFwd8*9drkbW4J-Cx9HGIJ)WE%$`DM>t78aynMZc5FvD zopVDM2nqHr(&2Ps}LT%|F^DWhj(^Chtg4cXi*^!8TM6cG_T1WkDvO@-Gv+u30f|9geOuB51;+53I zgOnQ0$g|i^P9$ZJuj8h)q?GYw%JcH0&s(3t`0NZ$i=(ARI|s#rJ;{y4;&}2oA8hRT zef>oGwi}N|l+-ERJ$mQZ`WJ>%)L5yIK4L(R0>7zOt~TgE5yA~Bza|yQVR*;3y?1BEmQVt7jUw((*x1Ek1;nchY_-aCu$p!CM^Hx zlPFk^9~{&e3nUQey-1Dc0FQaC%uNliO@|ASIU|hYO3ix=0xykh!-vP!t^8V>TE^Rlj3b z?GS|--_Tfah%CbWkq8mT3v;fuNP3ic43#b@`f$yO`?AEKeK=;aIJp?4|K;rL;}v&H zHp_T31sV(WiP#S0;zqSJb-sF?-}8h&#lzWps3!~qIP;8&^9tYIt3E6*FBj9$1>6g* zOXvX_!9~){%yY0yPMeUKDqQ`NT*1Td)9zvQ~51eC@%w}p! zRs1_tuc@l8k0$#M;H|T;0-@nAKm5Y#-6SQw)y>`Y_4QqC<^1*aWn?0v^;v)O;f>IK zluQ-YJgSap_9kO}PRt+_eS7xtRppRgn22g@po?2d>8hdd2@}|y;ckJbHx?QOEeJ;h z?1Y;SQGqLHGh@*6EN`0w-@ZlZXtBW1EEROyyO|x!&(6tlb8}HrLTem!x12`&Q55G#2wGy@0i;Y%#346xNjfG47?%XB-Hri+ z|EsbnV4Dr>7ER`uZScxw)w72?$yH%`0z!IEPde0|ipAplixX3Fjuup?r9X@7K)Gq^ zwuCDO2T*{1l3P=POT@63&!Q)%=dQr*(IJqB`X*;meg!K%p#OppJV5_Bn6vMpmy#48 zA70-a81?AiCc5mg?|7I;9nPc6lXmz^*oHI4KZXiB)_Pnz$i@G;Og{cP_2X6uf=J5CJ5xYAW&%cjFfdT+N1hx(yB!4`x5DT$?`yZ zjKVfy>G&WK`*IM3Q`ACF5KYA9cy9gD3qpLuJP5}Q3_HmLC{GxeXcTF|l zMhWF>brSpWDWL1Ec#g;KMJTulJ_QlF6-#PesGLZ%JTnY!DW0rjm18yePnbeWm$630 z0q5ZB?fA2m{b|etUuhdtccg$YSXa?2XNe(B?>orLps`u3BN=tE#X8GxX(MTtq|`yUS-eS6g+3 z-{79Rm6hLW3Rrs!ud>jzgyRHY;5gBuo{R(9DFb2bD8zy3H+u@okO3LS9>VyLU^W7* zoUVbcYe2sKfGV*4fY5`j_pEc|m9;#K`yI{HreBuEvu$)8Mrp z-`Dmiul$WYC%bvKo&Txny}}7Ggd-*qm+WeXGiK}#6%aS;nh}q*V)=p2wAb7SVjDs7>*aOK0iB?x@rynpG19qtj(wS#?b+Q)60{ZBa=^s_VqPzW0L$H z1ght#Zz(O91Stqm`uGy7wo3x z&GYvIC~!RDT-8!MZdAeU2}?U2+yMH%UgMdPMrVk#@8qu?<&r29h94F$zpk(Q{nuk9g|N)ki0ECPeGflzPH!=S{jOgVFY&g}0v{ z^=`>bxA@SJOh2c?_-A;)H_;deDxClQsMXMCU~(oU-QcPISVO%Ug+(~2aG{e*WPB^2 zy#ZE-20dhPn#GCIJ|gWEsiD#7*WPQM_g1Zcq8-?@8%AHAe$sFR5X zvP`T4#OX}YHAiPMnHnmbWJ+2NdbIYQ3T*sGm(NNP_Wrw~g47aoGzKDfEFaD1Cyl3= zg5Pz0!SK)jK+m~zqv}!aw40jK;auLC$3nAUw^pIvhqk<|N}Oqne;6EeJ-<*nYskdC z(t(qhr?Sg{&im^fqdN4FDRr@!Caj~yCr`IP)Rz`Ffhd^+`-ai#4XlHcx!<7EYW)`wRjl;B{Gx#V zR#6%~prWJw6YH;mI3kI!*?EN|fG}mW&n>V=z-Eiidldt6a|krZ5_vA0p>V~;4!;8n zR8&-Ishw0UUVuUL88zx!^=;xND)4--1&WC}K@I!UIzs-N6Z3rnO|rfA!|0!GFG)<*fhSxkie&F|N?7u2y&*z_>oWavDAWXc zgR?S{FN(XcT!38iDt{w0V>~x%98Ee9x6{g3!oLK^AOA0f3IV;DuP#BAc+bA;Qg7}) zvgpFj`FXSLuABllzxTnbG{s&{O+W|+KnGpjQ_x|7+7CiRhd7y%q~C3fK4ix&F1CL( zu~B5Q)3d7x8T;W@tN9iE%VePMGRejJiGoW(g1-@8LgVZ&G}( zQa!1;p86v3@$m3OMMV|xT{&;%!C->U3(?Csy|CA-;jxH>=c2smn~%T>8wDS z-5H?p^EfPV6Cty@B5aPTWkm%Lf+9LOfay-gQ&q)Th>Pq0-r_@4QTh_^nbiIa0UJRe zRi!qqMjMk8!Gk;zD9)1nw&#hdKpYyI@LaEJzXrqD!)5FKKvZUpf~Z^Kg>HP-F* zTyvatME+gs?2hnmN5Yk%xs)nZsCwQ=FQ6^8$>*22!oB;LzCXy(NU`Eh4On*1jcq>=J(eg80if&ry&6HM~uu z>{B#Rw?`LpXyj`A9^2##-bEN`N{8g?(vq5n2egI)EJU~e^LSo9IvS56m}Kbr4AKj7Ka+=Ca4e5550biZCu}9_tx{mME~DMKCjtf`ST9ffdX_CM1HtdQedAW@ zq>a2Qwl%VE{!IqJF*?5t4YwAy>9?x6>fFY%i)U?x1O?q(>y&Z? zE!Yp%5&g><$+p z2Xqq1A;Fr=dQAZKKlHbxHe-c$fehj)s_<~WBu)7}l6VjjDX)E(+|L~UIuSZP;zjkP zrKPr3!TrBK&kuJQq~dbw_V+8JN@P5F^YmH;DWA^1O0=s z@}TszUqtwX$NT5UJ16$iT-y(lXNE+WhxUt1VPB{*49^&OD&=0v9dp?V^bfiC)_ zos<1walNsQ>YkINvjO?Z>uynUuucu`A(k{bl72#rH9#rY*g7Id)=h&Cm0k|0IbbkY zg<;DFbj|yd)oiae`zNd7fPmFvrIbEs{eFp+l(OCijzB<7On0MQKixlbz#mUX7s`^6{ek4n3a6JSE=7E5eMD}3 zu~5LJS6fpVZV%EL?8kR7Aj>os=7F4^(%6*Zt*JWx zfb3f8Q;YdnT=M1)NRP4P8nN7%?h`ifE+|(VP92EZ3>TUlo*udOf9UG6t2a4!_h=dU zc`P*?Mi7gqj5Vk1<2D&>HUClryKTklzNAXNe$0d#BT;dQ0(mr`W)JL3D?2JXIvOo* zk9da2hNhS$7Vqn-NGKK5afeL>f1Kr#aCmxonnpe>zkTGZG8%0U3VV?I@ZrNOV`FS( zV|cigxw^To?olW@KH$3rmUO$WbaDwS4GFa0aI$W?&Q}9fslRv~d??qmEH?^Cc|olq zw)?~y&A5Sg#U^Uw`9g{kB~JECH%aqSM)(~EwZ|x^FQjXoo4zkYPAHK+pJb%7`#n?c z5dWB$`fI6AOJDVdaxeG}iC-d%->7|-vL-jZBO=UpWPkO)`gXkK183%T3PZAo#v-0q8~@x;);0FjbU1uh{T zd88ZeKe6d%kL+x6m4AYjO9KN+c`98PAz3{!Mew8-q-p8$Y2%uWiM){8+uO~}O?gA@ ztc-};ZU#iULq%Eae+W66s;YO)R+!-%LeN0ekSV(OoHw>FSEDc4X+Penn*R~i2MddV zvbz`ZXJ^Z}V;LQa|81C?^?i1qo1x)s3`)ADJ`GPp6p(lJjjXO>togr(-`m-`I$2V8 zA<=%|oLZ7UJ++^xSYB8%c`KPu?l7mx``>TdKILaR4aNB(FYDePLMmx4Hj=koty*Zd z^c{MwR`rY+k|qp4)l7x-A7EoKhs;EVO~HPzbm zA2l2eml>QdALnv9M#js|7RsTth}c&MeIUu-lqoJcn2X>Rf;%|an?M|W&D_E#;%k4Qi#aacbej#miD}-^Z9AVquC(L5h_k!=K&V%c|DsgA1;~2soJhq|nXs zZ`yFS4_f8oZqD#2^-}e|7}yxE-sSMn`L!u~XJ@C$3j#hlsS1>lnEjp3PToujNSF`r z|FZyQ(NM)r(?~PtrsS(D*?4|-SVx4X<2El(gr+mVXqt>A?UZqU0ZmHg`^BScJqOX#Spme;fEU zpTkp?JH)lLwQmmpWe+*-ogFnfPxk0=?RDAE2Vz=$An-SA{2L7};-NgOR9l3nL)*QM zHCZ)tyw3r?|0Yi0E9s={kd6p8tAXCj`S&q}*{j9pe5>~Mr&HFGlR-i5I*i%)2Rx(m ztE(SdG9?Qqo#4G|-YVc%=we!CZ~`VK%(A80k3Yp?i)Wm0!s4SFTvYnpVB$jddm%U& zT*AWc{a3q-_ClT~@BhOM4}AmBJPJ8crKRa)m{S;|M!&W;v zHK|>?$|irk=}=j@7_ig+g^u{2jU;%Q^tado3VK7@!UU%NQGGr(dk8KALnuc4HXBoC zBrX+$B+Phe*dZVPMD+0tnYf+8_%5)`8XN$`yowh$@31VQ$rAQ)m6PMtb5Y-*cG;=DAQ}8v0lgt=qO39+|IZ(J zVUQ0uR$Eq*m{sRsJhU`iRE3)e_KhsQ%!ufbL*vsNZDwtNbhMC7PblBIcYS3emJJiI z77kO{wMpI%dG7G{XMd*i(%?5eeMhQ?iC({HVjTQVG0u{;p=7KflTjc8EuQ0t<4CeN zxrjdQFYy}us$|$FyJl&yO1xqUq}4VEYz_Msg{9~)sI>9``?;*d8Gd;<8BG*(eJ|Z) zit9CTBV9GUWcjzn-pq`Y=%79lBatPm%a<->i%mFfx|kMmb=n9;=Yt~!k@MmeXbk}3JRqND)Blr@o_=5b0&}W$sf|-3(f8)0!zAts z9+bi}lVL}*s;Ay{rODws@%9`I(z#Z9e^Rq_nPEJ*jb&H2-@>Du?t4G zDUcdVQcOgQ=J1_H;3W>V@|`o2pDgaeZ&lJC$5`10O)D;v$`bMy`;RzNBoE=UkMG`H z-JdVVzimEGO*hfNc^|~2)d?gkiM+hLSYbVU3*o*Iv`3)UE3}7azZ*g6kdL1f(9AkH zDEKY3`bM9(>M=l6q3R_YY(=j=f;}thT3rF)iHGiASS%@34>bi16=j5T7H`L4$ggZw zr?>N{Fe42OjZgjki#m(MtVYaZY?7TGXju6Y2^!Sg%mD8ieL9hgbHK!x?~ObS>{Xt(fEmt;4TvF7sfnJ~lA@sZd!vWPR;Ts*{iG&sk(XQC5TLj0AEfVK#+ zW9|GQBP5N0z;EV;b&=hC+E_so;KSr9jBhwhe|gp9U56w3Ml=W{_bkol&yDhH z&G35fp9ErLwGB$o$XZHYE$si`{0$-|W-O+nVr;F=Kak>lcD#LjwDlSllN2DwCdsj`*G`uxel{oiLWc_m&Oc+(>-ienXBw6m?-CB`fIJ0{#`_YAm z)G`YcqI@a(Luyo=!|P&0AnXRGr!HsT9uqFqra$dv&^7}x(oM@9{LD15wz+dm4!Y%^kKD({Tu*&&>|!LtGukdp`oFoqI~bc z%Wy7x`??4Exd#P!VV$?oK%c-M4?kabHy61*T5MYk>OzNs7mOYBNz8^t5EK7L_gMeS zKt3a0`-S$Gc!tOMo+6uZhG)=Iqr?pKgCd>r6d4n^Yk@yN`lvLT%@^q{#I(8I;TWeR3Xvpjcy8u1rxByHLH$h;O~s7iOOybh8ZqhDY$;^ z+IxThn~k0Q^l4M!(B$nVkmvZbFXGgqKS2W8Ono$*vr5UXK9)Y1grL*vuxc^vXN>L_ z7Z(*37aI+@Y(%Yuz`&x1et<>KEO&|&;qGHx!-_z3hoVSerIT@v|9B1tJ6Z5Z=8fA9 z_6RbAfe(uxx5%c)Puv1T8(a9V(G9SJkHFrRT-X5MfMv1CeurAHF&H$?a+QOlq_e}W zwMEm?Vy)I#QF21MO=aVQQCwFTjP(umaE^bmXV2H?&o{R;ySuq#1-Z5B*Ug$WM}d4A z1ENol{VC9x5tcO6Gi@LCTYflwz_yI^49E!Ry#K(#s_N>GwtkE?PF{QE)#S7kgpaV% zga_plv$NG24HiDRcjw;i{JdMY@^0VGFDxpoudCJT4S*RQ7#7V%zoVZ%C>3qrl26Dx+FE}jr9ohTfF#%#DoO600lHe ziu1}T{u&kXk0N?`daqu)24kLo{?lK|%I_UMdhWju(xpe1RGc9k}#v2Bv43ufOvt^Rp{K02e}ez)dgU2ASrTa!|yHy9C! z>*p+;=HouW(?x-RUBm#>H~XvK9)J&=he^K~jS$hS%q#=~+`fGqb=cd-*WJ?{h$~ep zjar4-XW#-78cxYD>BW^xm%V^QUG{b?@yoaBFOv|VQW4pO)8V2&ms=8H zIx~sEAmwxT|^Z_X6@u5v33C3qFe#lhuc@;15cKJ zqPtMr`GKTXeBBK2M~J`dv)B!qJ{J5r1$qkw1ci%;C?`Vwg~rA$)}67?pD6GEeFkGc zpjGtr@LaHP!Np4#sw%5g8dYOUM@xHGaZ#m>oy1Wpb#s>o2Y7^s_(etfM}+%_1bMr= zIb-BkDn(Etnp4as!s5nY5HSn=FV@17eqaiKc8tZiOZgXi@fUaCMuz=^TX+eE06jw| zfCXp_7X1JydcXp|U-W^kRa?{i)$!{E#gz)VY+^>#lnHSP1&x%Of&NA-O-+;TT7gwl zyAdI&sSyszVa&fkxD6gYq7Y_IPr~@IvRj>#ckk?(GcXQeGf$c{5%wMl5)*wh%71_K z&tU4;sD-aH=rNeIW5*|0C<#l)yScgg`uf4@R;rY0wMvJS1k7lM?G6_+neTdids_#c zvW+exqJ(NDjY>lcz@n!rigoDO%8jt(QFd7JWYjYgpKNxSBbo1H+&eILGpu|3rWh00 z;ke7}d06gb*-OgqNSfR1TiTt<%3ZGCa4{I9as{4;Pa2H@W;C*n0%?u*_O=tpkAMF8 zu3I;6A<1N9LhgWDw zFy?lrXN<$l0g{vzBhO^AXIP>Dqq=SUR0$;2t54Zn&`&T*9Mnu0+<(%J)?&sp!XKLHj;;=@ zg$NHX1PdZg1Yz?G(U!xX($Uu8?uJ#Zcs0T;f{*9W{I_?scXo85tw%#GN6enw8PS~d zdN26&IKA@_`G;*#RauGL#271tWiWZ-q!}}&ySlqQ27d;uzwpIR4;6nwX2{;g4I7n8 z^(Wi6mzI_sJ9ZQ~LteJEjf;ziu|lPOnEuh|3{7fvw}z}HLXvte5+g<3kloa%RB81( zE21PP-2m}#)#xubw0?cRu|ur_7SL}Rovu`)QR(!Kwvr4F7by%Rd;>ci2$3h~H+q&H z9aj2-fXE7tsL~yu?L2n$2yB9cgoNeGmL?~sphQSdjFea^jEBI#j5Cc!qeThn3Vz}b zDGRW4FIM%{AtoRHwJ`k1xX|eFAk0_V@C(m^=Hy32P8N8jRZ4vuS*_%&#`rZkt?7(g zxy*S7`xVQ0Q1CO{$FNLcd@%1aML$y%1X-}$iiPn?rYwS@;bsPj5!-(5?CFNaCSO0_ z$&)58U$$)aoViGXLA93gW30$OmxfU;KO&Mn`Ui>(m2~2SiAa8ej>O3mCn_o{KmKTI zS7+DiHER+Q6A;OwRH<8AnrrK7%gV|TMw53tAM118xqAmS7I|0vef5MI9n!A^D6Co2L@ni6=x3*g{#8Z*$D%= z2t|PX1n!`wQ}{9S7gH27nO00ZxP1i{GRb6lG@u&rn@l4LTW0!)i!lJuJJ`V>gXv3d zX0-auX12gbeRwE+;HU5CQl7bR`^2eC4DF{zM$Da+8XD#UzaiAu;OVbdDz#Zf`l4!y z&R`YjVLvlX;-L^@%*_BF{B?Gg&Yzp1ROvq4aXd5o?y1wKVA>&(FRTUTSr*iq8RcJ8 zlFzLEr0T{hAgfMgr&@2o z+CmM~yMjrN=~8-w1m-;ajO4K<#4vTr&X$6l!Efdtu+tmt+FKn|Dp|Wm+S2WK^cXx3 zxIjMUj#+ap?=oR;^qa5abUZH#OQ!-Cz%8GGg{& zU;00L?HAnradEM)ZF&{KK>PN7SyWJf4A&a9wxhEPSu#94+#wom9qo;EbrqFW2%*cr zotJ|dhlK^oZY8>Ju5RuKxeE^ui;Is(cyek=s=t2#1`dd8r0Ga#Nl0kJIcFoO0@EeB zZQ<__)2EMrm9@nqLVt2AGnwELK-Ph&;7mRQd0|)iISCMZirJ5*=W&(paPjJqFLntR z1^DEP!+&Ou^mzf#2`>|b0mC0^{Ko`*FjV2<5*ZbNG#72{9qDQ5D_&ZTG0sZNf2gcP zikzzIDmY0o6$L9PUA}x7;bUINdFkct>*s@1839ljL2xw(`XYauikog& z1bsvS6NL52@{gcAYM*r^x6Ckyp(ga73|3IP_v>m{x&SFsXCN{YUJD3tS9ez#OoOuW z)|M8XK?_%!ho@I$cz8fSAX;4$F@*|4^yT>Uk^i=q_OH)>edheR*47qybCxb!78MnR z7?i%%jw%%1CX`G!2#om0fIk%e0~J+3L8yTJrq5&HgS_yAuUWGiw#?2QJMY}NbNJ9< zxU1H!TZ1-!SG@&R!@0xsaJ7LWMG#cP9Hpj#22@l zJGwA?i(Y_2WBfH*Rd*;en>(Wv&JGyj7a%`1{5~%L2>;EnWateDHz4RHCAB}xCVk$K6E?2?`tm$-#rdM&w~aTkAD zSf^UptGG=&*s*XclcO0%E5=vImL&(Z4neF+jgp?kLY8!yHoSuME$O3V&+7C>9b2mn z_A9Q#V#PIhr}YSj0zHu24U_mVh=mDz7<2*CJFw`uQi-4j1Sv0GyeK&}*+t>P25lG} z%_^TJ#yqY33=@Ba5}VK@#+y@q9t|J8#Bu2vh*NQKb3M5K0G4~+v2$lrb2IY&`S|)) zR8%0%MR9S-ozl{>ihB+9jo_fKw_i|DP<#T`nu?1?-ucjQe}6w`xg07{{Lb*b_) zdfgpdm)c2f{Spy)#L376fC(%~;Q;W550L2+7-QsB0#x3h(HZ+ed;ViU@ab(1wKpIU zBo|-{{09};n4}K|6iJkrUy<<~93QlNTI7c)ApBWbA-z;=OdP@zx;i@HGXCigUTkjZ zsHthLs&1~n-%wH0SYOxL($;x1zdY;aT_;BeH#fPLr^3(M&EL<<-`5RUG6Io~+1t&- z)!9Yign&YrR=kGdz;&O=zQUDW_AT9qyOUW)*yAU?Kx;ITmlBtW<>XDKf3(yeq0N1& zOasteT%x;p^4s?F^93JfQclj@Z97liuWJbm@Id;DsT1OmUfC@4fjy-wtkzz*Wo&7) za&)ktp5hQ6il9`p(_ii^U9vEP0zUL7Ze*97Iei*Y0(Lg`<0odokH`cBJB$9O%0hqQ z#?EO6jy#4wu#JmLNRYC^7T8l6fgqpy(XI^RwK~cf# z$6I9Ht5noyfcM#e&yYQju#+wfEZ`yna1f5t*r;!4g1v%~Cs^r-Q%1%-SoD+~&yMVQ zl}6dw(S-?=ixw=P3qOyqnheJ~X?G&pSI z`j=f@TzBu@os*k`c#*Eoj>d+D__)~CwvM9W!h-z5(vlKnzOJpU1*5U>Npxg%bX-hA zTs-Xgi13KOz(6Fs0DncM;p5;N*D<5f|3G+hA)`G%dnV-vg`zc$Sli4!{k;mzxWx)j zyT|Jv@c|Rr@XFKim;6&q{c{X>*P<6#y3If`wD=8NAW34kL^iS8)IVXjdR{`y!@U6} z__&8R*?)c%A@MITsDpt|9}?&$BFSKK@Eq%5gpbdn`2`t>&JrU9KZ>NFlW)_F6NJxT@7@5~GO{TfI32EA}oL7E+L1{@T!p)jmTA)PWZ??|0hHFPI zck)2ovWI6#Xb8LmG11Y!{{EO2t@!`hd+#VYuH#;Ka?YD`1U4aq0Eiq20w6&UOkhqD zDeC*4CHwi=&&TH-AItwdzvJ`XXG^jrJ&6)!k^(_6gIOdph@3Mv=e)B!J2N{wdA?uW z+dVrABJ5&kHUMZ~yL&oR*R85sx4OD+mBFaeAyWpTm=&VTBnp2~C?*Abcrr0*AMx9m zDul5WT#J$a2nOf#=Pn=vkwK@=%*iUuFRZLlAMYg=2Z%h?Z~ za%N^G>lH#PuP2{?eD>TKB#x-7t%WMz{LsTIR<1A^jU-D#_nQ>-xgP!`;7ptmB$Jhu z^~9r(!wz}pPh0U_W5*{SGqXckJiP>gs{A@?6ca2^7{*AFTB%dW+G`z^7grmUg&(&Ok5)&k;1osNqMsbW{2W zPZ%ZsM3ry^UoTFbIrFEt|Mb<@U-$R-mz0z~{mfI3Y~GA;Q35N{U#65HyH-Ri=x1sS zon!JNHV|)%2v4AJ1zOP-eqkU*Q|ZV_j4cH*kU%r_8GLG<~T12ghll{OoD%uT|E3#np`e(xBa|n4f;x7JzT936)MCK-rJ|sWv z56(z#8bvj4!t7h2XWlXJ;kAQy#kbX#=2o}IQ;?gwaNcyx7je72eGYe*-OA@4HtF#*BqWL8o*DpZmPJHMCTd>#RKXNHl*8)<@r)Q~`&6FCoME3;H-)z#Y zzi%EqmN4ipRJNc%G#-Rkn_07GBSdvv$9E>2w1RZq-2cEwJ0_nbnnS9JgW(4z5Pw7u z*VWZ+-TL;nZSSJKNLqT@Q%^qm$}2xAEGR(YVvZ!*Kw%i@weaDKsxTIReiZb;0`m-t znWhoKD~xCySokOrB%1=xL#SaxBA>jId`ooqaIb-H2Nm9Dr?) zNsw;5&0f4PaPd6CPrPQEKPBC#lp%>13y7xMX_8|w1Y;lbBoSCJeR|QBC$}tJx)ie~ z*!wTB?3(ybApPTHUx{4d;wJKD!sQcLv-9$E5#t5d(3@|*b^O@z?+zYp?dZr%OLMyL zowD6-@5TEWLe261SXflJaN$Cvugfni%t%kSz@FD@?rQUg|rI*BJ3zQ zI*5Pxh{~^F7cvO!wqYyrFl|Q+Uw{yOU@WF=e`u9Z_+fuI;PM6fyuqI<>_>nMb}!{rAB2;m8F(rdgoR82S|-Ke*>Pdy+Pvarm5uY=|mWMRhFQihdZu> zf*$0Q;Rna4pP5xgkc5T#mJ>vO@fnj&e~veQ86k#5pY277gPo~MfAk%+27xkyK~FtD zvG(m92VW*bECMEiR901X_qfiTZ+Pgzg_v$`wHT4?0-t5QgMPb%T*+Aen=wNGIjOaxZw}yZ*5&2zTdyU z{lk{#7IgV1o_PGnKmLD;ii;T|1xm7BbaVRzDj16}QB29M7h1wL0)u#mCZiqQlJ{R8 zbqt}T#6~#C{L^H&lbaZSEUN~>pFIQ4o!<@w2ZDV)l3DX54?iABONSW`4>V$#$r0@* zPjqur^CvrYv@|sjxCY>@Mm7dE2leLoM_VgkeRq7}jOShJR{IzFCX#e-c;G>~LWS%W z2M--QfA;J}Hk%NYR8mrrJt=!yadAb(jM;N$7vvWpl@fyL5EVz-en@`qj_+5A=LFkt z)SZMe8(ac+*d!IkuvkeMIuLu5H6@Pv8DFUhJTn%qCKK5OOw+LEU48bd-=v)A5W8m> z#@~mJYnV+!$=Jwbi8p+LiX~zAbMQBTkGMTgi_=wY_jh{WRz^8@l|`q|GwF)0DkEaJ zqBQzGeMSUdxJcYwMSpm)Efx!gB`ERswl?VW(1Ls5GNN$?lTTzytHok9n~MqyX3d<9 zDd#Syv$M0Sy}hlYy`!nQskODOwG}BdTDy8se!A)0xpR7h9tkm$lWb|38QGbLJyZr*La5{!qAug+(rx3-R5^PfZexZp(lm!27w9l|sr@*|KSuJDoD54o8hd*X4-y!zmS59;gdKm71R402Cy*#ghh zRq}&YrE3(6(`>M7E<4BF$0AGe_Yqfqz`@Mry>(FckK9}*-Atwb!xAvQ0z(a7PIGuBI^O94OQ4cmI*~Lx9$MK?1Bs|y`Y(5#Zx3LglOz7s) zABlK9p^oaXy-sQ?kjRjg2&s;I@IgyuN~uzd;*sObUrY^%_&o?9V$uS;5F$gP28j;B zi+t{(v-rW;4^xI3(E59FizMw=I0U7u42u zeDcMSrsgiALAz>6#qxX0kc|W{!EvEasL$m;dL`V}17E(ZEKfbNK(191f8qq6y}vN_ ziu}d*2Yi!w_`yYZ!hgQK^Wv4}&p-bH`OJ{lZuYEM{L<)}M1p?Y)eljU4BG*H5PVTn zUA67K?FhR;d2@tsAqwZkmtKUAPf)JI?qFSvUR|Q{GyL@MUpJ>e4-n&b@tL3ijl%VS z&s^Ft`QTpE$ACqh6|cQ}VE?xfU%$+#)0dSiE6QQMAmBQ7>F(;nti-q8eyh5=X7`>w zbLPy!8w%bU#@W7#LHruKH>ZziDMfFd()cG?t!vk;#$*+Q@9aCUAB`(2Dqgf`A*%2d zPb)4cC`?OF#pD<;owxT+qYqj=_4q4{t~8<&^3;a->4(wCKTCo^k0%_2g)~2Q$!MV? zf=$416|RWcFy!ef0fM;Ymq%5e2%ompVAkjaz$eTSiT_C9qdril$8oaVQ|AbI15ELU z{p|z6UJqQm%F-068ZU7%EEnlBQuuToTdqfcX#^RQ5wMI5`aO2!Uu(rzL`-<2dt&H= zZ&2_T<9~W;Dr)y3nh>d#P}~m-0-S4WYT^4sfGtu4x3-a&xvjNDdf@_6@naf`*=&JB z8SVy5&%u&kke`#C18+6rQjsB*8N94jah0E|@TZ^S0w1|wF&$}+bdK3(U3Ka&u$zo;`aiFI_=y z(-q5BEMJDHLk6@~loS9=r2Jf`{}S3U@*^~kHv9&*7rPSM&GE*h`02&dwrtsgPu?GX z_)%45)wXxvg)8dmr=QNw$%Z}5015g>EtgM+v7(R{nhYJDL2o!@f@9jCEi`JaDonFr z%W(Lkq7UB2a&($pqt-r1iGh*mmx~f0>s5*}vmT<%eLHxPNOy6Y82Su7=VtH`=?kCo zAK!T6^Dn-DPZ^nNo_uP{rcIl2b8@1l03#+R)1?kphu2814kndZN z33kCK;Sa}O9GM{5AV`F3UiK(@AeK?%KO8;>!oaXykuKu)E__ZQP;IKy2Tfq{t;5=J zm%p5^@#8NFoZw3y;v4LC`}s=^uKq!jS;wXbk&5DB!x)0JDw)ovwAl>s6jzkwB4}`6 zz~^*%y6yeVP2Kg49kuoC^-ZYDgyJf$uAcrY(q`nrFzVoy)+Q&Ja}}qG;ZD1 z|0M83i%1`2sX%VAcTgZ@`}W4h#^jWw=bn4+#TQ;cV%woHpWikr`$vQ?(p}sVV}$-o z-IjOVQNl+OWkqVb)S4uzlS-Za;ht`JI4norGX)HlA^1p!w)v6GhmRgUfA0LAUAvYp zUYz>yCWN~Q?IQW4h26k0h*>8Rf8nX@X(C<3Z4CamOrJ>&Un;dFCEdGd(aDo1PoFuB z5TAP&-}~}QFX2T}Z!qBdfiP+HF8!y9d_qilwsOj=3?0FTUphGc{YyxKA#?!#eAcsK zIyu|LV2`sgM_FeC(sYO)9(IzAW~@o#VYbBzk$_|b3HM_ooQMm2f|^MDM+hI`$pej! zf!e;X*M~f(C$N&XBhuJtN&@ zGT3{1;Suid>o*xqbkjBIBatG-EmG`D3!$|+8HPL zxi0>RhR^7O927R24L*0cl`merh#+nxokcH(?*jbA8t7rlztiouS!~FCCGeLH4@C{A zG+JnFk?T0Yc4P1d@q2rF_aE4g$P}l`F@OGo`!}r1&&wA+Av0jyT1=e$BnrM%iXy`0 z<>k*l^E^tnef-f!)zy{nzWXj-mY#V035Y8-E=E4pa#@~UovGFMLPn4Yam5H&=H+HM z8Ahvru7aPeQ7%q3dxPOxhued>U9gH2aueR)Qp|IcjEGhqBYcMB)%+DO=bP*F-y72( z)6p(my!gjI{_*1-J22CrthD@@XP$ZN(Z}#z2d{u*hYtuhkk3TJNAFm)XwlMTOF#SU zvzpqf!$%I6Rg~ikRt!qOkBycI)1R^MgAqxK$9J^5|6-rZ0k?8QV$~>FWE?m!Up z2hy~f5|h5dYOp9{;@ii---)IF_4o_@W42f@O$8}yWKspJ((IfZd|xE>9*c2I|7D=! zFaNPm`@a5U4;5FGYD*U8-*Cy+!h$Y`f5`WaQ5l~$;9TwvbY2Wx{wCB}FA4Zj&`)Nu z1q+v`OV`V7MR++MpYcnk)XI~KrM7H|w+bnEI8n)4g!$!KjUsD~L?y=lqY-15f5tSP zii}w(v0XkM@ENTqr~V}R2~sQW#*DulabbN+`dI|ZVN9s}j|2WN?kJ@xb*drKja@!D ztZ~4f%jhtXn2hp|$zBBo1xZOs_}bdp)z{q8U182c|Bc$8BK=9fp^6K9JFvZV29?EP z$PC-21vC9~r(uSAcdx6txwEFOy|JmQskH~LKqSiOcMf#+^w-w5pE_HsQ7LU!V{UG0 zVSajHL26b;N=|liW{TBlHJFV$pg{zKN`?N!gXn3DRWN^tAre~(x9(#BRk}SWyZFfU+*GC_HgutU8{pd&2r%y+U z4=@=3xG-=5A?6cObTmQlzf%i7X6oU+dfU6(w!imYV`CHIl%L%4)GM#PihwQl`pkL@ zCn9zyk9~#D-4>H9B{d+IN&6k4*5=UQAi0%?^A|A(m}aqd&00jKRaIAiyKDD73+~Cy z%ZD3is9~ahAgPF5nC#q@AM|9RR#XO}BpL&K@YRQMduC=JDj8Fvk%Zrtz};fmX9!w(GjJ&lggpr7X4a+@2J z!WU_O$lKxcbq%PJwNf@~JaP2bsMTqhq-06%XzxTqi@yH8oJfv9a!wTBPRrHw;S-th zwF>?nqsasZF=jgZygrAcudA!O4Ta}gTAP|1F-YLEYC}Vl-QL~Pje;RnaD$pHW+V>I z%F4{l&dJNkMg(*o!kG&T;dh1=#bu2@m9IxFKO)`5?KSXE7<_z%RTz{8_&{OH!?;(e zR0AG_D-s3CE@V=UpNQ=|XN1q`?p@Z@4JK617I1nURi4tT(_Papk8^pZ@&w z&k-k{mY%uk;Z2yFf?Uia>R%#UaXX&$5oGzs^ap)lbe5HuAX_U^1Ap?#XO)$eZ@u{z zDD(KEkK2-L{PrmR$Vm>zj#?h`0W9VLW0W72Og6)8)XEi?O}cgueF8Gdm3aou42vN{ z2M@NO#W*sPg#Pe-*VWej_P4+L{L@bnFpr{|&ph|+V~;(So0E;`ff(A*?ilIApi%3` zQ-4DLATV~_`gKQ+9O>-pIeP3UDpe*YCGl4jhSK%N7g27+EiNAu{-KDpW6-y|z4utB z-8~o}2V6t~=W;{82XDk7>hh8rnXA&_MmY1bbgNO!OwI9}iu4yK%r;lyk3j*oKCli1 zefcW8A9k*5VbiOmV_t54-CNPES+tV8PZ6D^A}(!ui?v8^x??RCD*fmL;&KJF2x_gNAOSP z3|0AqD9ax1Zbp$z9H%+qYNfJtrJ`_|jDmo~fq=mVd(jq~|ZO zgcEa;=x0veYw-74^pB_fOc4Cx@*@gYoaFO1pijKy6aG6`M+h&dtg7noAE>Hpuc*ii z4}ZU4T>(88TfxhV7Z6IECX>oFGF4b%&}-l_o|d1s^xg`WYoObXS&4lut#VZ_OVPmC_1Vt$ho)4X`L5Pd2I9<77raToj!zrmjT;Si7{>YS&nU(ayGpk{t z{r->NG`4ji#~miEzWVB`#nYz6Oa2LsgpR)x1Rn{mkZ|%p-+Xi1ws-Kxhd1S?o_y*D zKYW?_l*QTPd^8ruWY)iF#TVA)c>fxI`lz(>j7*el4!iopEsaR>C^1_It>OCLX0@$a zvugkT{ijZ!I(p>rnbT*|(=#<1=78oZW1{e9B1IG=g%nF)VPBBBNlX8+;SWn5lg?2? z3q_%v{fr;OcmI=ULoJ%frtZ46Hy$skfb3hQT zsHz}zg)3vQ=eI=9@lML`XEp?#$6Z*c-8jvnJlQFs?~1C3UBgd|9zI&apTc(HkN=3^ zhmhIc>1Wmy(22c85*`c%JeYOMN%(#G#9llm`Xk{$T3T9ivJFt$QH!s~4mSwiT}MkF zIox_GIiS(!tn8fGv*!$=u-3ppU!SA13;7;8YHDjvpE`}n6zy%Tt`--@$O{+GBPdm; z)0$0|)U?!$^o*iuMRRA*nZIB`ZcZ+eWbno_(xAQ3Mc8Mubv^ls8-17v-wOSi+dTr> zTCEmTBoM@n8bSEOoMJJ3S;0W4udf$W;^K(QcRIgmIV*R@HDape=Ax?7o2u&kuh~#C5IDN1S{IyywvN*l?;)_V_^zkPjpFMZ> z-+%eYU~CqVxUlOMQ?bP9Qy$&hcia3wh_1a z8{t!i_n6sZc+m?(w-4RkMkpdoiiFe?r7G}<7a`Lhc&JPokq~9<<1G$(H zA)(W$(o(GDrMX^DV8H7I%&s11M@L^>Q~SB|^(W6D1zvl1cYjZhv$Cp1tybu@cm>cW zB^lDwZ238RE|A^qr zkc~{Q!h0&C171^!KKK!aeTBeFt(x2u{2$RiA@r9km6*|xmYSwi$h*6HP(cp0g4HTE zr5BB$Wpwmstd$`Jfl_HS8H}mv>4;)RodM6FyREIWp`pIEuJ+Q!%U7;kMiORtRFQhP ztGfqIXFN%-*Jos8=H_N2F??BBX<1o0Jk&`x=roH0c{$10g-DD4WBQGzpSMC>--y2myT%lUjT<)}Iees}vt#$3-3u2j zTzu~$DFv-F`Md7;5-<4_=sy?;ws{7fg8@*M1~=&K=t6JG3>g$t3rkv@o)*twpVwUOKDsr~x%~4fsMBzS(qZ6r%sPhc* z7nP>M5qEFM)uspsrDEL@5q`q-1H?&hQx>k2rKjpT92&H&N8{?_}@hCQC zkx*cKWD*ch_za-Hmqd)eci}Vn=lX{cgK?5p<2-(e@1Wo~tNNoLb(4iY z)Ne=regxWG2Y*!U)9VTf@-Yn&#UN0K&*>USwwa&V^HINYOKi++R5f3yY-()mM4do{NZb1d8k#zQ zp<1a(PB9}9b75|3X-Rfj33A`1!sBd4H99R`5vU9@p+Rfn1IYuaFqTT0iwQSbNKS4M zf4Xzh!^bD+s_K@nzBvVc;jL-o`i1l7mN5IDwS3I@hcU-)|CvZj52!0E$W$#XlNpdJ ziP$~P^ua4!ZkFxEXIA&STyMRzr=_L!-EHrpFwBcDzl6#4>=g!#r(ujlg0LeA!48QB zJ2rgHAA%o6y|)(#s8t%2Ppv2`$7fh2PD@oYDrO)ZGa{BzQ3LV0Nwy@5#T=XcR%oNh1h}Ug z8X9-*-d$Byg+TA6%a_6NYS8IN-oHkU{|NaDfY+oyNBJuJS)U$-e!vS7(rmpFdMy|X zfAh^Z7tddOOKV zUw-DhDx+M7X3VVe>4P*EgFz^Mh&IIl06+jqL_t&=_CCx$2*Y6JaxRb^8(23e?fh7Q}|3LgJ%U9Fw`2UO0USuk(<&bI-AUzr%bQFI?!~Sm+bAmZAb1or_E}ju1jC`pus?Y8j47l(S!`@fzXNJ=uLrC4&aQVa4@^Yc;)@-vW**=9DVVb7~jZ-76F-~%(h!Auf74Ns0Q{*w)U zPoML%ua2KMRS9LgU~cil4=ga7;PxegUz7f$#Xnfn>i_P7Bp8sI^oqIDm4z7$ZrtDl z+Q{Vx6XtSrQvcsqA5usaTR+&}+}iT)_V-XU{>dkw%*n~2q*6kgsqtd-Nmzw_U`>0% zW{5=C6Bd4&u7~7c!`D-#|BB5c{9$w;NBSTB@Wxwjy@|w<$eI55V_RPR;VaXMi<$j6 zMd%}u$&E-dmK4H#1gAUPW2fpALRBHgGg3X&USy1%H)r0;70YXDtE;LiKmPdR^0Kn@ zj0};pe0%%wcS^`7>Wu4Aaob?PS04l{54ho04r6xuZP34_1pP_ehb?1}e`w7x4f=d= z;ZWlV9}q{ZpD7n-^x4d;7}Du%kFSO_fAo4%6}UHgv!FfLqhZ%XhmGOznZ*M`f=;ul zG;xMcN=$4}BJdv}d=!&66+S7xJ6*kYdrft<`ltrDp+aCvYD#8CMtOO~oH=s}3Ja60HiWWjH5w!-#y9Y& zcQKYe1D=7(>go#@FF1Pp;Lst%S{lJay*?ji(CbP|V9$c2qm|DQ@|Qz~>vR6Rxp{fH zj(!Jo9P2Po9~m%o8ZCb?k_aPs8QHR6;6qu1MC`>&VE9$^N7v|g_V3@nZ}09sKEH3? z+&TBHxi2p_2RD*%jI4i+3V+@T27JQc!`r@S;lcpwm3ut9cke!a;<)s82!~g%xo@?} zWTCWx=pTHD5E13%yEXkY<>*5^l1Kt5^j%%`Z@>8Y=bwG*aP((nX1(~*i_bjwTy|C_ zQR8-`4~owtkL3FG>rR|Fj@ z#^dmoOt0?{M;S7JQwP7jXv} znJGhti)C_|)+*Ck!c@5rFaEfeVGSPQfZ8b4S!wjS?fMruC6m$wb-@uxYF4oEsQu&E zza~I_gbtc8`Md++^FfHDh*9;f{Gb!DVSukembmmUL?j?&0WleEEiGN0c4Vk1ot8zT z5cOD!QpUnkU(oo71uL%3*blmhp~2ogY5W3qtXKf)H!(FMz_5ET;vsubda5Ng#WHB;H_O{-ty4Ld-8)|CXx_bKE1K#?E4um$JI$NXDs!c|Ha*`<{-CA6j zHFHL8X>oQ+vdLh8rH_yink&i2NFagdkRzNBjX(aA0lwcC*t7q_C!Zbeb+~e}Q=WTj zP092uvge7yH=+MX@RxXegCBn<>Ffg?5vr_QJ`;H`h?Q}Ie+%*h<`(3pz5K%3U?{ll zgZ&64+O};Q>ZUyL_~Ys689XJ)M5u>Q!=qbE+DLgvG@_pf_k!#WiL-Nv2%L--4_fCG1;{exDkl`6eX zr@#b6pVvL$#w=Ksglc#sV*CPFg3Q-!6W{TX0lrh=L+g_|NgbZ0htj%$UAB9R-5F&BLe))u0}}*@x_KSl8BNWoAW-zlk)u27Sa+d^>9T!%K`WeaIn=EClEp za7|$HJ`To$1!~B)%#MgWyAFSSUhlDECqDV)la|)Dg1o#3AKEzoo_hdXgcg7NMaXvKYkA90c ze81m+`SRu8{@>qxx?=|t%fQ+C{0qi#<%!nNfep5kns#-dgETtODGOrJyXPDoL$q--hnis&Dam{h6^ zjYi48ga|Sa`-E%5kGUct_{SYSyvq2Gh9kp1{L0*I%bqem_)Eh59sUa+1uuUa>hF;v z%Qa}Ps0#NsYZg2sFIWlo1bb?OEtkW-L5vjO1N{*@WQd~)_jZKp4n>mkrIuXylyOpS z%|W5OP*=Ug*~6};@daF!sWkGmLb)X$LD08f|AGvITbwomeJE;>T26;W`+=?)TE>UJ zoc?&K_&C}V`upV6&mx6Hgo%oG68>l}{tNQMntoS)1Q`%TgSK(d|CsHFnd52c8R1i> zk&mLe-5v;rkzQG(KaET@Ch^CyA&Q-1zj=5tPO{IT{3Na={Ye|FD1s8VlYa%D*qA<` zc2Es!8Jxu?qZT2_MTO}IlyQ4z_dDH)Vy>!by>O|qrmnratJm%raJoDl9lb4W-RI6r z_G!SeQ{!np-wKJ2lmcf`JyZUZ=qnN~DFOie$71@{bf?h26^PcMJtw8AVJ?~>3==^Bf+5eyK|wFm6C8snru<8o}_E==x_SgO*Pc0b z+GzSRDLFYeD?0~?iu3X?g$kbH)bzBZBpbZdcq#7hhez5KB14!AV*Kask)4^yv{6Pa|F;2s@NxpX{Eau>`1I4y`y7tq;-Z(3Q2FJT@pgH8>rY4wx)nay zEMC0$*s){K6331nU%G60a&i&{IPh+kc=<;)qGFSFZnEV_Al&EkaW5)a93+ewyMY09 zL%l*-k!;G*<8r3lsh@m*xwia^*NM`4E&af*nH2Jms5A6UkROv#2Hml4<#EA391OOe z^jGeS^dj{zs895lVdh?2mG9iA8cUAMoFf_Nj(GdX`_IKg-~|Qe;_h%yYp~^vENzC& zk^_v9b6HuuGBVg7tUVHTbV@@(`aGyJ$}-DTC97rT%;-B0z!As6Zai{|^A|oN;j{iw zTc~BMbwU%PznSdOb;60sEuR8*k5G1!UEku9%T0}zV-_70#xJ^& z*v4+)`i*o0|HedzqYJ@Du&F{KQ)<;3tvV^mn4g_Gvm$@}ee>+SuD15xrk1XzmhPtJ zZY1dF?CP`ky4ySZkTK)@rN-TR&RDJb%#7r0O2?drx++=eNf~LV|7x^a3M3AaGb9})Y zYjb1c_V?f0x^)}ge-Wqr*kg~q^2#gIr%yxp5$n3V|4tG5AipO{86_o4G+L>%Kji2O zyIk^QeBNN%MraDxA#?=oUAb!Io_%{y96yc%LPw7sdpHBdpMl5)GC$N>qS;O)bF7of(;W<)i3Uhb^MAu{(@i$_}$U=1MGS9FJc_CfVoq7qUa;I zm3jA%$`adwS%NoYQ8CaKhcRG9ui`k17qDOK99_n)9%>rD2q#$6IS5Pw!ad^c{Ejih zkD+5i@E;X?l($pa)Jlsw5+Y_(K4s=}xB-1e1)p6k5|I7)KKVo~EWoBwwztYe4D0=H{lJ z9@H3Yud1wq#c41YF&d?&q$2XVu%Mu*xEPHZ#02cYLClASu}d9^)yzX2Gg4**@i{m| zvc;C0&?ojHMm;*fcE*)Hm{5N7$gy3!b_V=DWMp2uW-W4TF>m$Mz+dR`W9YxgpR#J@ zN~+)I^&LHW6iE+It{kO|+)rbNPs)cgdm{LIYxqNuQOWT2*ME;GV_n_dIoa7i zcA}TKDr=_4kFoS&X{4d zA-@eHfS^t}DH6h8sO=QBdPTa;q*7M(IeWc+Oph=qQE4R7?F~A8KIk8tR#jp#E=#v1 zsg=W~DiAeA1~JMq!V;Ut4S&v1js$x;9T*FLDbJCf+{y!P7pnI0tkZFX&#=2LeaQdY zdLh!+feTMBcvka+L_JZdpRQX0XOmi~6hphIfT zj37CN&xtC!isDr=OIE0}Rx;?4DAls0EJgM_d1{$dsS&BgICk6gFO2;p2UrPvBo;zb z*}?JZU;Me_CO`af)b??=e{Mhh%!oN8KfEI{A-Zn=y-WWw(gzucP(B2slG`=d+}eYr zZ#v{XV17iRKkYD`NW&xEG=n95vRDaTY z>s9dON`+A=HyU&)DVE}*Ous+iaeMpv-92_^OFJt5^)xiLH8gZLwsj$IMo+IBi8A2D zKz=*3S%S20)^VPZriHXXf|zn2ycLR8KkirTxJX5%>MJA?C7|@e=(}zvD8gC4&s`lCj4UO z=rSOC3;2h_AxyFT)1ThizWrT9?CSLTr=EK9l~-RaD=p_!TE_@K(fD5*zFLWBWr@xZ zao8me2i(dLRPB?gu1Ozc-<~;h=90yWuUx)_D7Vi(+p%KBa%71dANpS#{}_%>N&1fk ze`!Q1R~n24q@DB*`uh7Fp16oeM;q;S+FCGH!}L z+{#=0$~f0o6FcXP6`q z|53xIc?J?xo@Wam^KV3-QNza#H>5v;`w9ySko35#tFyYQ+R@*SfM3S2gz$GH_~XHF z7s?d~defQBrp%12Pzl_Li~K&X!{KabYP@vua%JTeIG0=7TD!Zt5Ef_e?WwM+#6&7& z=`vePS(({16iFl)j9Dd9J&M1fCIF^i!CtXik${zd_{AkRq0czW|263Y*Gywm!;VjP z)YjFb1lH1}OBO7=2Z^eg%)}pm=o|OI1=#&CuDpHd;7x!T@u6;i}nL^q@V@iu-6^x zZH_>znKNaUw4k$x*;wQ`;U)((DY!xkFDwZMyb|Qf=(rf_u8H{EQjK12%~Q?VB-2`? zO0`s}mngOP3_4`*Og{ZE=Kcj*U}5wj&SAN^{g#OS1snt|#sxe0BrkFonU6vz3ovnoN_ZH{_IYc(?*)t2D_67#rzMXr|oH}tF`MU82 zxAwmKZ8lc4fOrcbFaPB)ii?U-;C<}y8GaK$ADBr}t5s?=(OadXH|&I4 z8Fi$94yW4H{7p$sUbAM+&Ye3iT)41z?>@{#+_-TgzgFZaHAUQ?GW?w=`m+v%hqLF8 zUOpkya0VbCug}qUD;%WEXa}Q>gW3Djc-(C7M(lT0zGD)Ns_a_g1Xl!94HmxRB zf5NRi)cM7}Eo?=?F(f&rLmF1lUokoZO=91esX=sDy!I;iY?2l|VaWK2J|KFJNEFs( zH~>=WBZ1FuA&61NN5K!_bmzd=Xtc;6k&=?!)zyV?zs}B1BpqfHofPyz{SNqI6cUA6 zt&SKBR;vxUmKH9Uk1Ri(UEQrMsP;!oV`D=re9Wz_?d|Oi4UH|$Z7^izN~KDQ$kgfJg`{Ql@;L$WgNlEje){SD{rh2c&X_S{-MaPJ**Pdy7=Qdj z63>9o-r;dOys+2x7PTc+uQ&1WW8(W4T8!k{Xg=(6=$8|xPVL#Vm$GVW)br=f$IhLj zA6T?Y%^&{ohfhA)(c9aL+!rst_|mh_K8p&RqUAU#`fsB97v#WfF)vxN1aZnAwzr=< zclPVAzb-1wPfke{b@)(6Pu%zgkEvcE*Xm`NIyHQf3hJBTJc9-iv(Pb0xfHWcsm!@J z=83pX4gEukk}WswUy*PK-+P*y>H`6PcaI(KNcdE_Y#B24tVBdPzWo4@hyB7aOs-W+4d|qB}$LVawUWcQ{{gf)0i$K$-l@OatIT+zxd>c+(&A zfU?`@*GS>Ra|#^fDw#?pkLZ!I1G(?4vu5TG40sX3+}>tyYU_ccnbKu6b+vZ%wsrJ& zcK3DJ`!7{CfBCICHOZKsk(8H}l$n{5lbx2Eos^Yf%gjiEmsx>we~HH*4W%JtZ1nN_ zeY*~v{phnJXmv$d-V>XbPAkr$s=rJe#tvUH;PD^25Ne^)0@9o`)ymm2la4Ws*gbam zag!gZM5ou>GjCb|BdkQabKmKcCr`Zo`s)~l*R9`RGMNR*BKcy1%6`X)tZ3@e1+*~! z3%l&v`1dbHMtW3y;UjVg^X)!*|AY76f4{c24zD?=VTd?oOuglC%6Q~d)&KaQWVOmn z<^ZZEyD1NbG>l*imB_~-LUP(7plrc{g@_cXt*=99!rO1Zy>!`9%wV3<{1t>!Y;)Y@ zCqeKLx>R3ZfBEtym&@hxc=qqv+tt~*c<~b0^9vU&uq7o?eO1oDDJ!3M9R3hO>S<&H zh^*t{Gk*G$l3=jsLu2#N6whX(s-Rz~qlkYDTWCM}ExbaDc+=gy5$p)9#8boIlOcmE z2?QRDOGMbTjRSmoZX)rYa`3?wn4#I(xtE|kE?sJGZ!0S;qw*?=;qO@KBalhpe0zI8cnVxT(J})&T%RsZz7{<}n2=S*5 zC;ag?k4ZmZ6iZ1;*|2_HFc=v0`YtdxBE~k|PxLcq&rrzO>7|XU%E{S(xd<@a;w3-Ggi=tDzk2oRQ)f=2 z@9*2YcRBenR}CdJXZASt5dK_o%R3)2T=?V2-MW0DhcI2jJaX*)nH4t23pjfQ$rk=@ z9e$$mA3OX@SFUW|wymzd0q?GOIqc}@*t2KPg$oz=?c2X>`O+;WH&sZgRasWBtiaXDCXFycfCW(w87*bwryL_AKJ)})&Av{YwJ5dMU7!sK%l{3U__ z7orpRGgjNS$%Mjy>sR%B=xl2P!57D4qP&jsl@#HG=iR3^QMkuRF`C$1%D zG+oX+JpCa40u=TD_*US{q+ulf#iCWKkw&?wFa!06T`n&yce~vQhjLq6Uu{GCxr=od zFE#b{4>%m|x`xiSu=fZ)WmSV=Vm~q4Z7U%;~RaUpX z`~JS><}O4iZ+c+iie)o(S`Ek=ANofmgU2d^$1h7ggZLV%-gvK~C|e@O?92(^?@j50 zxwwjo-Fwd*KXwe?aCJJvh7B9I2}hzuaw(3B;+BMwWN*rkFUV!r+}Ql? zcKTOURf&4`$fx{+AN;Viv{V%>=RR5APj60t)D1Tpq-LvBp^Ug)lHQ)MFCf>7?IGQ9 zHGh+nY|lUc{J#AME}lQPckf<=&b<8MOQdN?Z$S{SbJu<#S|n8dVfi*=lJt%phYlS^ z1`N4E-q-IqcI;?Pb@k!HhZZed^!O8x&z(CDVO@+V=%a*Cbj9%_6u-w`c2UCdCv0vD z{UGYNvC2Qu17i%>!N@{CCx|}eRu;u2DklsdL4atVPB24+DR^dS2uGPjVP6;th(7og zZ42$=5Ie?iBNKg7$~k#*!2w3sNr*fe9gfS>^mENdU{$;ZnjFHM8I-m zW3$ie)#$VWSs0}zA$=emusN{6!D=>}G4VeVn(jy9U7x?dudltc6Sg$fxh)UzIyTQa@pK8fymLD>~ zpzwv4`4QW1G3YY|JYo0~pD~8f8x3s*>yjU3*76fef5;J|KjshcWkT(T z+n)Zg4;L<42rq!kHPF!9+3y%Y)jR4AM1L8jxuAI*)HOIM$Yn?Q7s#Yz?_c~Bc!nJ; z*a0``yAtU@xTrARUEXeEty1igb24Q01?> zy7kn#x^tHrdb;{O?!mr3cYQ+#vgP3xqfwihgmigH#l_ikD)P$93NkaTNVuWZ;5^d+ ziN=4#@KMP2voDUFI8})OWd5Auht@AhO-7|Y5I8>c543do_nnJ$^niQv`K9WmGvs;| zpieM=Z$KYZ$S~;PS%%r*bPgOkb{R#vA!T^8Te)&2)_kBH5<4!nf-0vUf_#!thGtd0+hd(TtUV_Ap)F5gHZV*^ zHl(DCcs!xLUNX0$?~;sTjESOJ!4a8k_Ut*EHf^e}tL?Gd-`To#&FWP-xp`BOzf)H} z9eur@fAPhqpMBPAw^z(4yMNt!R9QW6@Bl*hjvYUC`SRt12M;{>(56Qoei)fCG$_o7 zrt-0YBHadDI)}&YD%R}tF>6o+4;Hi=FYwUzO_gn(caZrUsHSO z@}=tPn)*7F{A=uYI$ZtE=H`~uXU^=|yANLJwA7TsqT;gBlH!t*;=-cbyu2iv4L)lo zcYGy?G#A2glAmw{9DxV?y8{Q%9m>ng9^SkuDkEDMI^bh;P4VQY( zA8P4tcLlv6&`+sV`dohBU=Z&PxCno6szmzzE!BM~*#?76qf*Ox!*AGsR{PD*ct@bZ}`qRRKB1Efj{IR}e`p}K^OaTDVn*WK2 zU^{eLAp9ukf6MS&TU!79SO4+hM;|*J{W-ZgufFo5mtJ}?D>DN#%m_7xq_9JqNryiW zio5(MlyXFBFI~Fy=<(wXb@hji9A10>+9gYp=@XH#5H0Rl`iMCq#HJ5YCZ_wGv!uQosO$m$iVGBYxe z=vZV>ocb3s!e`D@&3_`O{4CgfLE`tq46 zj@YZi!GPSHDbJZJPbvOt!i@Kzxc6TX@Ll+v+(c$ZaZ!B>gqf1`p~kS*z*M^{Kca2LC=wl> z1;WIKK8SG4%gswoOY60Fw<4!Ro84yB(@VP)c`(R%iT(?o(0}%W^c!~?vv)6g|AO}z z7x6cJVjK1tuDA(~WcGH3Ex{xO2|(=9IKc-{=xpST!ly@#Mq)B)Gtw+GD)Lt>nemu& zz~0l}(A-^F*-};8R@>0l*wlsW83XN}w$8ruSDL>&e936mCD}{`Icd|2GfRrI3X3xG zvr*661ScI!0+Mk2Z%m)lXX`%t@{q&n$;wFHxZ$4i(mX0*5-0kH2E6_gmBHE;i9aYc z8C4H1lqa(!#c_h4Ao)Sb3B)X~Tt34e!W^RD;p3HvR7IvKNWrqD%Y|@ArV_d2ay7!b z5*^?RKgABxdHiviWm|qneEJthBtGyZ5_@m&j!!<>x^-(!O*PUqKKkfmFTU_X>GTpM zvOb~#Lfa-Q{^9^dwB~<=sqh!2zf7l*rKBQlc4(kG($^P;TY0E$yoKUz3E-54 zoBsUu*QZXOx_IHjH{X2o(#tO^70M~b-;vQr6zxeQp8=o$$f3g@ee`ilOEV&t9(m*u zlClwkpEJ+r_aQwH!m*Km8M!{798aA(iEPZhy?uSXeN9cxXU?9(hjD}6n3|T% zlGBweT(}4mJ@WE%;jkMw`Hz(!lt`|vum9k^_q)4$kQw^EHTT_n?_!~PLriC6okY+M zH|<{>ek2rbZ|M8(v#Q?iLG0sIfkpy%fI!g##xpufkX95yd)~e-Z@?RbTX}@=$D@DA zr0E$Mk3aE*&*yvncdysg*S)j#9hFk`5C8BFNTN+TL?Fp9?JUaI~KmX4U zKKQV=*Pfc1_Tuv|zWjri($nEnrgy<;lgESpw}gM<=#R>r^XAQ;Sw6F=q2b)wv-|h& zTd-gOrW1-vOc-AT`DSmy;;CU0f`feUjS}+~`q!OC|3EObZ{NQ6Klre-t(EQQBT zf2m5ZE?lWdo*wFJ3c0&w3Z=}HDYq5Mc;<>B{z`GBENuq-$jF0%tk6iiER|~_5kFPY zCHDyn>yt%z4h^tVas8L!br(Jf6&I}A zN&j&9A)%uF!`?bsPl{RH)z5M3U+~J>tV!@p9XQb0(%RSD(lfInAKHx3AKjXgA+Rxz zeK`7_egjjWAHXC*zhR%a#`ORlBo-oaSvY_^2lOj(@JVJ!iAR(sgudu0+i$(~``3S8Q(J=q^&1{|;N>5@TwY#*M320sw4SW^ z3;JO=hFm{fO@FOko{}2T=%je3wRc7O9g*xzl6h(xUtL50mz9^VTfhF|#fx@(@0VYG zb>Dq!3knLZ4PTUuNyT5WX~Q@;Rq(HGsDJ;%4^EssiFc?aOO|eU;K73Y0z}%uH?nxi z;^W6oy!qyT?%KVpyW0-i{>+)PpMUY?mMvR0Kl}*%CkRjHZN4#or!;*?r3j)sHTcU) zTM$F=$Nj7Hy_ovn1mMq-V9-D8~rStvxiVg35Tq9Ry1fQBRt36_6>K2Dc&>z}rsJasY>2~VG1g1J#Pn=LN%5BS0t zj<)x9dEidL5Wrp;pd(rDq^{1}$GRk3E1`&QFaU#?9zCM|J5KxsBhu5;UwH8aBsuxx zf4O*@BNs*@5(r>AxuC5m0HmLX-iiDOgTk*t}Eh)(< z(7ni_tkvqKPn$NasOY)pp8fg1{ruOz`E`3oM@wt#haY{kbJtGPeE-|O{Ts|IQNp<_ zF4vTQesW~=kz(eBEU7@AR6y<#!V!N%Z5Re00qrUszXEHVLXfglW0L7@VMU817!&}o z`hPG=q*{~IoGDd^vr}#0J2k>*UWVx(&-;xD#^#CR&=AKSa93jSt`Y1;JSz590e^g7zwdyueLrBV|8!2xOm z{bPL_3X=PWX=VZhjSjNY*b#oy#W+qYc9&ou(#IxTA*_V^5)B`oC}hi!DP=09!eG#) zrJ9jXdCkh%p_jv+L4Q?E>&`u=zuI}~(&fg1L7&I#MaGGqp8l$;mi-4W{-<)t}Vofes$F=2+W7Px%-UQ>z`hf^^?~&WoIWbGUKsv zpnt?4@Sm>>RU%Y5AhVj)D`v}+O>F#%4}6F~Lg@ofztO0ts!hp@Yr zeXi5%9@+fJ_U-T1*VdgredfFGzAMNtU_!`L(>UT!RAS4h_&Y@Pp*?~!{`BX_)1yg) zGledQRumVe$HnX10|TGz*zw-`@A-X!(m5rMJhB;;sCel}ykBQ!XJ=()J@DZAk3Rb7 zfB*0Q@5<#%s9&{v_wIv-4u0_Ahkx_e|83dwWqKW}5qd-Z4pC)jk1&Yhblb?kNY|0l zAM#B^h~74|Hx~NvA)m;b82B+*-VA^FKmF4`QB#;6r5&-k1Y?*e(#au_p#9;bp(Bh^ z{OQpFiXD%_M}DP?moDtty~k)Uth;|*VPPRZFRn$Aqu;jzKhgM4Mfh;fIo+-k$4{UH ztyZH&Ubce#LM3w4CV;;aOdse}m?x;qB$w-SdU%TAFMjU%=QlmPY2Ms#eunLYjpWCr`DuwAlOXn5acLzbNE^ChT!N%|tYA^64EM z{PWj;Mp?G*p6;CN-2eV}f4g?={bTQ6oc`{9|Jl8b0}dZ`Yt|q6ipqM>+XekX!+2j; zYZaMAmdrw{N~7Q>sHNBGzvIqdsX=cjFDoDPdXV76<#rxAd>Efe%1TT1dV?^4GRE-L ztWaEK+8q%|wtllphik!WK0J=yDuAR`vGw-S2;V@Zix)&8{UedU|6l*>pPde8L4MwAKYk4vFhF)j6Jifv;ANgMbLImNY)DQ?!8<8BDI)Xm z=Jn@4{~1FMVw|l>R*gzax|D=gWLgY=r*8kH2H|f?>7V}o{^KW3oH>2Eq_hM%>k*g6 z#yVn7%)VA9{l5yC@Mo}iH;m5JmL>_FY$qn;!j`)q?27H-p%0S zyZXfo7x(VojRIxs)_>2fEP}jc_=0#R4F4$#Kj06XJ#+TLrHkQk2oBbYvQo@Git2ok zL*Se+5ZpHOhY-RWm6@K27oN5E!E<}x{p*mGb!l-?F+R8<%^XU8ps0f1>+kIBJahKU zu3bC7{r1~EyLNqd@DPH#-EMaT7HcGgdD94E=GsOSY>`-_k$)~fp+Ml`rOUtg#m~>4 zI|sMvGtWNrmp}bW`dTQ0925N`5|4AR`c&6|84|`OPdT`l5=I z)EpyPc+>tnA@XlD8Buf*r6!R+8yvZErBbccl$K7{Yw^jHwTRJcB>HDU@E5p%&9(Ro z@k5>HU;pY?sOe$v?MY5adiB*G{p2rx0y~?A_~^~!qMs)reTV=ee+@=Gr1a#e(_Nii zuyTs0Pb(}afTxmQL)7K;x~u=m(!0j^J39JAB#5Bjy7is6-+a5htqsXoe)h9}T)$zR z2D2Tn1s^76W@hH<)vFiGpO5h!iCo}`?(XhBb>`IZW5;{#JqCjjeOakQi6I~&c7_=K zj)(rigOxg&)+!16!rnefkd!3ClclB<)%=ImGar$mULVPuFcgw#MHdleCXeC|oE7DB zJn*Nd5gW(CU(9Q7Z*M=aZ(nmu^P+q2U9?~!X6gXsRKb6$)BkqDA8zG8{^1Q6maA8< znKyqf>kVU-&)bPUq&(uSAA;d9YE~aVcFgT@XJ@C(ol%&aWTK~#ZosENQeIFIQ4K}9 zEXICdNd{o-5o)xs9a`ZA_M0HVFO3uY0M|H^13n@nldXn|^88gRX02T__r4W#mMtwW zE6K5$^>T_QLDmlmvNrYgq1ton&V6UT-FC@Hi_|h`9V~xf^uWdke*D^x=ggi>xi1*QAaoEov3D^c#Bn+*^fCMz%lJP2 z@X?%LV?(I=5?(%K(<{{Fvt$|#LxcE9ON{=B@)xFiK|#T{yS{}zKj3zmOy+s>=AjRd zKmNoQdMf^?4@^1wj}U*K&x^v^|MAOTT)tA7oSgLZGtVGZ9m>Kp4x#0ONDB0qN|A7K z{`~n!7K&>;10JUnDO4Tj&R+nKy1F`@L60I;JOYpChPy#H+G8Z-`|NPR<3yL z(f^;l_l%G0IQB#*XJ7_7XOKuFL6Be$ASot^A|;EGl^m{hE!o%h_1?Yrz5DjcFG_m+%6Lr52AIX+nJ3F%{_3YD;shKT-tm&a4t;5>L%(l;nY>-or9^~wU7hUYhfMxJ~8Mf;zf zk)V*tTUz_Nx-D%TZQxW!dODVqVrpRSw!i4!^!4|@``&y1@gM(D*HC9NnjYA;^`C$C z3#Pw=^XONQ0AAO>nw|Pns#JNqyS$ew{KLbt?rv}>Sy5VAvV0k0pbrg=I2{N*)L&Uq zapbEbFz6X0O-ePMQlbi@<_7au;2al#03Su^CYtbV?CUt2lk!jHpi;~j{_s{VKSyTe zg?V{pn>Im_j?r=2>Ceo{oT;3_0fRQD6Gtfc0lFfhDICWg#Cu$QFrY!NyIf8ri~pLN zmACI8vobM4_%nDI$gt&MZK47l|aa;~(f4{l%QYBK> z9z1mL{Q2{Bwe@YS&AoknXaz^@v~mZ%Y_im1W4)m}$|scjnX_kKef8D4+PcK}gdhFr zIk@d(#*ZLiqxVG^!g1U|yvH8ok{*zE_CC;odUrX!eQm=YCn6>bjXQ2CRPyL}eN?F0uquKnn4Llzx3u(h zgI>q!Kb!IA^rAgsDbN^e257P>a2$6K@7+#6Gy2UWe0Y-}1UBXjTHD*!u3oirW!T0E&h*NE==eK4WPRlo3W5Q%GS-C63HhJv^v3`m z{ZA|bX=-YWGU=8q%FfJ8fSMhXso;tv)+jD>q6vZY4{0){@W!e*MHUiyNJlqtEe*#A1K0ptW+tYq6`Ij>D#v~-MOuF)pDfoOUcSiNKP;!S)5j@L{VH$&)|@) zw!ZVLV-=qrEF@5so;yRe17&~ z9b)S}_Q<;Dp51OVVksnpL11`o=lg&MGu@aF{e3=9w+189002M$NklAx#w~t zrUT_A3pJaU$>L3ZxzG^bEqsBo)6HMCR+W+*3nH|4_H}ghA{rq|mzb0oWi-Ke0MsGE zaY-DLPOi3sLQeC8S$x?ZIJo<_R^S1Pt%N0@4Q5Vji z$MOsKY$e1e78T}GZv@*o#tOe?kiUddIOQj-@G;?mImq|kdw1VkZw(9%78Vx1@cav# zHkP5IK8`^|Uy;Tl{h<)yEQ0YV0;a)g3EK!bHEg#b>Cw@nN8vAmmBeV05Sv1cthksDvvOG(Gb_&+{h_`wMMUi=m6$ZZm=2(yB4XlQUaQ1s zgd;x)`Y7;*_|Q1`0hz^zXuVC~X;FtTDB`P=haYbI=PZ0_PEJmIQc_E6YhzOr0$+mJ zMCy6^OZ*6T1@}5^Teokw4h&#*FjjoGwzf4iHMO=j0<#@8?OJCV=ov;F%oRbGJlK?IT}WaKJ&QbuI{iX>yKZgj+jD|(~a6sy%5xJ7$H z^>=3Fzo4Mt-~Y?M!?5__hwpcGcK-R#e}+AA@7}%faq&(UrN3wV<%PK7` zMIJf$EF*(oQPCnKnGkD`NH*S}1f*fUeGw=yA^M;XiWM9C_wPS?4x?=f??|%1* z{QP`oz85;1BA{E=FAOS@Qj+#QzPGe=`KeQ^X0D1jPE-Az=kJ(|2_nu9bCv!<^223n zqWWRJ{t~^$_YcQpgRAR6Z4tD$(0@R`9m|t3pNbV{{R1|5<2s!#L>~q?xCe-7NE!Gb z_>@=!-F~6nrZsGcpG;3P;QTuMfG)JDi|Jv0BHk+fn zXP~QlpslmFskyhgwYROKx2?S&6dN6Np0B7czgP=vNK!&nLSl4kN^Dkod}exldP-bs z3YJ1eMi?}5*f^ON9@myP(x=Zn^x?;+PM*GkNDlCo{?Ydyh>thIq|8Z31Qf^DQ=`8R z9@RB%o-0jKhf5l7QkCS$lVY&YFjVmQdi5FMZ*pSvcOP2^*POTCJ6hM+_4l{mMxWuC zXP!Y4VC49nTlxX>YF#}&`#<^Qwbx#Q=Ujv#V(Yf;KmN({iHD0(GBtHy-c$wANSv7u_8IkTd3XGYe;5+7o>GX)~b|4s476G+Vd@b2AJ z)zt`?cIwRO4I4KsU0Mt?r9hZ_g+4RMUx^>Vkq>|M)mv}vgFgXM@;&+8C$~JX6;Uj> zSQ4L@zGqS>%GeF^31j8X9ovv#6Vm`+ef`z3W5?_3>nbi*v@|t+`Q?{on>Qo;0u0s& z?2Fj~0u_+viNOaNfj2}X#`Nb++1gJT^^oLoQ8!;FTwBuNj zm{B!gZ4O6?vsq*|9=L7`+z~-=!{v4GNqPyiUkV~nABRZ6L^?F^#gB&z|2YdkD=RA{ zG3lJd4|`l^cbCiKRIA7#cb@(M3Mizqn3!nzabsZ!-0BhZVranH+ScCK1Os40ZCx#L z9wG#@-DZR9H=@@=b*fYftO`#}OU=s6%3YAVFgGtJH#;FQF+#6bt2J^Z0&h^KRFH6F za}8A(bNeL< z*RA9;K!x$d!LPs_5yY(JuitO63?Px|#~**v-rk;(p7F$!Ppn_R0m~Ixp(cgD6j>JY z^YgI2b=9hs-+c2eR(+f=FNbeFY}V(`U-;&mZ{P>LX6>5fq-3p5i{O}JU65HzpBq@q z$s%5!6n$o@{pHe#J*jboN}5aZDH3}8aqiTw@py~B<|_VU@*|W$6sGz5E3%dyL(E?+ z)xts$*~AenmX{) zHsa{+wX}8iU${`GQY-LEVnP&*%Q;y|3$l}QbKo%&jVyfd7{SVMSk2@hDY;=1eH>2L z>9aKlzb^0XABv5Q{OOM#DqfV0XNcoW{wGI&9~&7HlSKL>6mJmO2KLqQ49QOiZy}naXdqc+LF?a1M_xQZiI>0?T0E1intE-MC@HfdikR ze^_;?vi#iH1q&8L2))e!muHf{x5r<&%P5LnwFN7n7Cra%8g~44t%!%>#x2xTg>RmS6!<5 z_V}?KJ9ch)U`tk3rcS3=cy?|EcPdeHF7h zGo(NHViRD(m`Xd5siFdBYJhH_Z^G?g>PT0zPDAXK6J$te&g6Rse57kiN5i-FkHltu$c_oTon%RoapKqpzkxcR;O; zHbrM-XRX_?c6eyGy&W#hEzQl1jZMw%Z7s0PV{+AkBx`1KXGiC$lP7h00|Ja>WMpJz zWsw7OdS+r$QXJdRRieQ5Qb~37)sH^@xVfo0AtB*AkA4RcNa1@+)c}kLMg0oMC%V+e z7;Vw&l+=P)r_BZ9w!s9)WUK@vj*Ag51okr_2z>u`^)~^iTiv z69jdFf&Ow;^`HLyXN6qx;6pp3V`6Cmj)2+C_0Nps5A5%0@82*^fWd7;Fbz`H}Y1CqGEGxqjpNEn7CfwQt|$%U8bq>Z=6{7h>rE zYjDEbe$58?2{-*m?4uVhoWryYW$2h|C6$e$#7N3$F9TyuJ6Js()Abb;+drO;|dcHVv zvA(Vo@V9M7R`8`-t$J$o_qlu$hm%@8okj-74@Q6Ah{JWh##_;dtVGiEB<0F{d1|aw zA-iYz3j=*xYTRRc*4am0AAWKYYeV07^G&$-KK}UQ7)haH4}l9vGB+r&D{M#7%EcY~ z8PospQ||8W`TX9*!RWX4UGIix)G8tf*#_wmOcpFdx&kSo`$T?<#`^t24l7)D?!U7-H3E1d4PtY2`KOHN5fda9D8 zC97Aj!76T;t+A^6=+Way26*=DS*%1XU9loJD_e&g-7G}mq~Ozs=llP}mC5Qia!RAO zg!Z2Um^6RylKz5OSsY%Fqy_0`DiW(tbe$R8=oh;pUglbe?S)GMA%wcd9}mE%=8!d* z0^Cr;XK0c{62jQ#;WI*m{)p}bC*0Wh*xv4*s!NxUzZ-73^Ypn+K1pN(`cIS}I4EGr zq0wY4D#}MZWke=I20yqh!|fY}=B6h6Z)j_4Ml_XFV*tTeW)CL%VjFqD-Qs(uX-R?234KlJ)C4{1s|>OuSAa!GGu% z>ZsBKfgSx|ADwXhWpB)I{X#C3l9J`W_{A@%I|_E%O^zVw$rqn&%`p@*>ghRTN$ z3R+blX+ZzXIQ~d&)Y9Da?z`{5_uhMO1x-y$`R?OSJoD_+IXSs-h9S<}R)5Yo{)7Nw z$wg_#F7YuBz_<>$+m|T$(C>?+y7E zSsO$js^s(ZxwZbBm!CjYVrqejPT1uKrnlteWN7B{bKUJ-{g#0de3HJ33QdM!F0_za z+5(jvk_;Ow6g&QyApsYJXW;Ba19|$z17ol^X}m`NxPG`d;3HkNR;|s>(jXu;=J>5v zyJc_)*-|>X%2RdNcYQFC|8S#pht8Xmfdzc&si~|tFNh)+ za8|Y04wso^&Y*twdJ(d=`;+~jy!pnP6_u4*y>`d8ZHQ$Dn;MUOAtEZG%F8gv`wv1P z#?xP}(a57?WNMAiVe@u%`)wnVC=-8@>mSBNrf|f*1~skhYD7fD<}GF4etYcj;Vw-XkM+ShIoZj{-$zDD1p3Fy(Nm{Sb+&gPym&=r#j=uR>(`^FzZPR#8k!MF#6N-U zBGJV5h0vg;274|U{D;tf(Or6DhV2iGwQR?*A#`T}{?u-Bd<6TdfToD3NNPr1VaJ~j z1O5umMX`3XU#!jtBAN({WyE8M(=Kq4F4GSI`LR=Wf%wlJ9fQxFfXpDsEPsdHCzyd} z?g~EPLV&}C|6GP&R9J|dp6zYz*J^9}dV8}nGB8&>Pk$zP!2*11`GF^aUXTAt$;k!z z`EYp{b&L*MhX<_#EiJ8;m6tADyntTO;GorJvmrkf!dPR)oJOlbIA&O-wOUOl!n_R( zz-=5!0`nIxMBui0`cH!Xq$g-Yy2aAv%aL;c^goPHtrsu8_~MI^k;bx3Wd^;TGzsJ9 zP4v%<)?ciZgPgqn`s@4Ne!H{19gggeJo@O9PdOKN)z z>7dgvc{XDPE~=nmGSD< z`c2};+6ycKICS{%fW@+C@#5Wk_AFk!SgX}?){n7zs{BQscT51RTD`ikprCAH*;hxt z+W*P^+PWH~2ZT$-wZLht*%<9HK#9 zh>V@QUh~tb@^?&5#18~1g`m@U`1cNd0`e0yx|-*2nE8u^SxD~zFTax~P9l78Z@<;! z@yQh|PaF-rQP&tdm@1SZh%zqFKN=sg@t2R{|MJ>TgLrJT!vlQJ7L3r-G*Y90%D9X* z4rJ1V#<(}&qZDeTGCt0j5NFEG^0-_c1j?}4MhA!Non7W@*V@Y~>aW(qUu4K`cXV}H zIy=oWX)^-fVcC9Eqz;L_2dpElt^M#&erVhB~$Z>P?$AzwncvEH7QIR*8#H2}RmwA^stz4~iTW<40d{z~}Gl@!D*ZyN&TT zPt zRkpUYc6D@~IeX^F(PMib`wkYz$Hc~%SJ{GBo zRT)rxdi9SYz}{e)$GJGtKr6}X0Yi=H2!sv_*iA1mXeBS>&V~-nL9hW>g#H&E?Bfy44UrL4 z(L!3kCWwFFF%)@H^*8WhnDoQM;Uih_ij}1=JpYr?QO7sOk72U(*T4Q>D9xs_&2Wlj zJ#WTM5#sddH}PvX(LYFo*4)(c=9_Qs+qbW+wJjwj<r6VA$>L z8g+J$I+3Xpi)oXzswBNuKR&?Ot>|MN9D)Zi{OGajA~hxT;oT3z@*9PPjiP9Y;&E5< z3D&5T%9z+#tkr;7WaY|LhYub6_L~z8jZmDms2XQZpV_u;+XLIS7UUPi#>5~AH6g%+ zTSVYK<*!)$yP`ix2{@$pK~mOnV+Xn#Lihoe&C&K{9)C`OV4=8G`+_klZn5DEdkMSw z_KPS%?Qyu|UnWCfBBYB}s@0ak;pXO^;SqaOl!2N)GMZ7oEZB7D2ibP;kC0*4=p0Iz zDFE6r7UM3(zu+o>=>hCuMy7ZROi`fAOV8Y^@DV0Xp-}5}nwaQ_G`|m4&NZtF_I_tA zlKUYLbM>{h`o@m#?!lh^fq}u1;URlp-=N#;LAX3*oLj%PaOc+2__zqT?@f_D=p7D? zc)FCzM6-7D9oCKK~YliMk{vxJG{=&3p_Lhy>o%;`+ zfv>YZukh9{ChPdrt?Do82FB5c4j+P>NL6(e1|3_s zZiA-_7G1%ANW_u7O`zB|oA8Gm5gA2Na$<_VrqaKXArMSVj8q>9$UbwgZ^$ZzYXb{Q z7%2QL;Uj^(Ucanl`RdiH4;(mf<#P3zQ)hB>b7ErRfFYS486m~jf$aSF2t*}$x|Mu_ z3r>gQQq`rm-+8CvQU&C5+qUgk8jJ9oL`KGZK$uATen;f;vW*Wu^w8o(i<6R*V1^Ei&TfxC!;{Gl?WnM#08B+bnIMVK z?os&(wy(0HhK9c!)WqpeD_g~h3$P5F!-f+QB9O5z(`vK(k z=}!!vocu8V5IOSmA$J@?ks`y@^3r9Gjyfy@gY9jt&9Klkw=^~&<6nJCOH*HepF*Kp zupkfiefA>NG5$&H=jksJV?z2ztJQ7TxZdyg!I$RP@o!F_I`jMA{tkxw2ev+-QVPxj zL{-5Z4{Qw(dqVI-sDJQjOyvB1-&=3J^(MlHp>ciu@yDM1-uLqh@&!}{?ASn%1OmT> zZ8qS~v6)r!sZy#-N=lY3TUL)4z%{jJ&z3J;x>TpvQl;ejyPfU*OKtWz!S=r{VzxwL<@nd!M^%pBE8XFtG`St`R z>K=GtOHt9H=%^?$OA=@1{m9>t(jP57t)piD_|SxrG^G6H)s9s?`cO#mXQD_z*&i=P zsO57We^4NxGKk{DMqFSl6;JSki4ojd@kA)~!#w?OPk;2@(=*Z&6B337&9#l)X7flC zvi5;Pj34Or5I^wK#~hQXS%l*;V;{maP_F{#X z^Nc|E0eq=Mu9Eweky>MfJ~=72s32qe)@6vf+}UGkZ|!Yr?Q3Z4ZfNRgXzJ3m&<$L(Ak=rtN-JF{7*zFdF-*rkV>73Oa;G*{vmN?0!%{8 zd(PqRKT9MQ^T45l2VeTjOBc>xK(>!9Ted#;+>e&8Scb)^gb(8saSM8re$zIK@DB%l zq%ba;q!E!mbQy=NUW>)=@kmvw365Xjn4FrCwqgA`MCtAA>pgY)#MFDVA^wUpIo;ZOu(<@i5e)7rhW@cxQ12{v3$z~|!6Eg^r#)zdQ zOX0t`aYNbB<43;y;ww1V)iu<2bak9Qb7uX<4Li1OEm^iaAt4cKK6tfYRb$%g@7(7v zF_CS-^=q7cm3SLU{*v_4#<~Xr?3=?Uv$DuiJVEo?ffs|g&MxxbOhdA#7-s^{GeE*4 zLEmSWxymQ_6cY;nS$8KK@WYM&oQAJdX|gi1BMp&*)bacc%+}+i)@9lSf|J&bsTpqKzf7mvHr6@wB5vtcb z{U@z|bQ&ETD!o4MsKbG{PA5*DL|hRB!d|g*B^be4EKqe!|ICPd!V?A2V_$pquP?v) z7dW%W#l|AGz%#HZ=jW?fwrkFKw&y61>F?|G=ZxSliYG^tFr2df4<-ImNqSluRvn&3 zbi>-KCr*63v8*gUE`~SHLCAT@SiEog;RoT)HJb8opGwp?_Cr_ottJ^3As=!QExc zm+#uWCpR}2iH?ZbjBvr^WCRRc#%+3NYWQPXB{?-EEPNn~RoBAvAi#Rx~@DXo^&?5KPKyQ*E5D?pW z`Jqa{$Pvo=g|1FYQfgXi+Uc(L#-`5x0c(zgd7^Rm+PP{QL#E)9pI=ML81H{NZ=MLtMK(yLami5lmx}1Tyt9 zWBLO(s1EVoM9{q6Md!;J~Dm|4G(?$%{QNX^67wOU}64(J$rU9TfRcA)G$`? zf(9XkqK8O6vFZbpK*$|cxTtX31KU6T_@mDb9H_6WyK?1fV^ia?Bgb~`*s*K(!w7Q+ zcGFax_~Ci}GU21$l=K_kl2Ln2ZND(}7$7Z9#Pcb`M<3yK^*0#4{J;O|R{>>BBMkfq zd>3b=4fu}X#nl6wb)%jnp5*`eO&XtYok}lpZ9)(UApi5bT(0Ws%SVoUjpzZ}x9`Z# z%BDy8Z3cvY5bsV6ez@_U)9^8y)Z5#4>eR{p{=S5S_?0VH#>K{A{lYx`1M(S4{zC8} z$1<5(tuh!Q5K$B=^z`Y|{pLR8|693o1>#&&9hsN^ApJn~9vcj?OmPTWy zBEk^S+}PaS+1}dHf=Sx^yoDgRLN32f|Admiq|?~wYdrpRnN%7!Vl7PGZ5_epV>t2wL9K+H$R? z7Fje65xV^R0t7KV>)}&Uc*#g=r z^B02HG2%Sb+1F;ZBepWC5mP_pL5K)|gI<48lmRK3Zw22rJpAeYPhWlY)sBwN1q*YZ zefHU{4{XKs3^6|Z@(FRmB#=RGSdg~>Df^I$3N^^-bRxcUb4v@7`!zN-Lno+|3XN8a zS~DU3dcA(P-R~HbxP~NtuT+Y%%kS7fxfOkaXfTW9eNTs8@e-3U;KDq8=KG(lzK^wEHl}Z_6WyD2CqT#+)*Vf+A?{K(QmF8up#z_?v zW`t-Zw!agkzkkT?x=`z@ZuZ-ql1QB_I@0;cDSus?L@8GkWove?Q6$9*^k)z!3x5vr zS0@>p6=8Q{{enCQ)r;FY#?`Ojdvm@0^+~+mt5>}ZHBzTdo?ED1yhMV2 z1*;HLDNy>`(g*P&)f%PcnyWd`@ zs6a^N#~$1J)KgC-B_}|CO^W+9e;_|A;u4>^PI zojG#`A#dPIi^T|;8R^JZ8%*grOn*k_S&Ki^xx?W=wXdtIM`+Py%S*Geb6^((*7Nk| zIs#Q^WYF2$Hr(4fG|*!owYe2?nNkH0#W4!ql)p-aG9x`b!f5R5=+V{6N-e_%YMeyIfkMI4-3qL{fOoftGiUe;n zt{SMhOnKDHC_q2o>HBbB04f@z4_+S=x(X1B|gos*NEoxk1$ zl1-j!00RW^gW%;D4JkS-&*a-U_;#BOA(j95$3Iq8T}n(!-22$xCmw%1IVD->?TPQ) zg#IKkyzT~(o1PyBpRrSb!p_HbB5XPWK9nSKf-fp8TD)XwYDx;CDvyi|4-O92*43Ra zKaUwByWI}vB5SGwQEpJW8z2eaa*ulY>fBA=xEqhV+s=FY8zr7miP|7jY6X;mAw3#m z{O{QR5zC8jPlx`w1%1FYe-}3^x3wXf;mQ>&vA%{TA{bGa$lTxbA<+lp#G4)Q6da)hre5E^+^6u-U#)BCyi(g{whS*@ zoReRWu0b3JuGz=6zjvY!ta1HT_vtIX#twq@v$wiQ;&w|DV$|Q+peo7&OAvP1 zZ-Eo&5HXFKKYR(7$J$@c9lAEi+Q9>#|Ms`Pzj*ONL`3A~&6}Qo{)IJb*J{*QBp1L5CyeRr zLf|T(ja>-7%04p<_zR>9n|_wbW=tXjEBuGb5sAUO?`87DWP55yU! zWQ^vT8XN2C>fmpin2?A#fwTaT^$)|1|Gfd<>-JPvU;E$x`;S=ahlt19w{L&$x##j1 z<_Y01NZ4*pe}04A6?XKjxJ^kuF+fx2WM^aba7IQ3d`aCNw{_5p$eYFZ1Q;z!v|H*ohxT%WkeL*WHd#AZ@j_gcr>b-FQ=cNIZ%F0_Jn^278sMkiZo@1Em7nD_^P=a`?iB!iN7% z;7dF{_mFF}YuIJBW6Y+A)M`@lSQT`sj6?AWrWDAQ5TD%cpSb z_V5Gm^OHN%UnY%?iq2iI0QnsH&F04Xdi%(*MjaD|`V}7hZxF%I(uXo&blGYycDL79 z?88n>Z|Wjd>3K0ZOX8!F3~&s&j^M#R(H${FMn1CV5uo(jKm5L`^3oSy9@c1Ka#Ulw z8%BH*@G#?lBYdyh4PVQ*_r3kb-`{L%YC>wqJ$v^2!w>!;FE0;GX)yjczq9;IAO7Sn zj);udQx15EoVEAY;d}khnZh6HYgtLjx;1N?o6r|+LKGCNuF~mpC1Bc2)qJ_et+>prjFf%GZk zHx3_$34}lU>tFwR_Ut*m-mqo!mc5TZo|%;$)CZ;4rjx%)wW_G7AU!=5QDPz^BM}>} zy}hHetMj9eKR$i-?CMpkw(r#zhsfr#{=Wmx9;Ia{1m*{*t^ndU-86zge-_X)OU}6%bg;vfn4Lft~<7}c2or?F?Y-XSK40H} zG&x$cqCgRWt^zm;UfrAg)hOlbR~N#>h_2}IQ`P6roqO@cKOwdC0}ng^Zv7*7T@T`G-dcg3n1WnXa2(ef(3|s z_B?`YmS@kLJ^aPtlP6DgbhN{lrRs9kvE#>(pc~=uva@n9CyKT1~FwTLH@HgD}PXs>9VQ%-J&E7IO|nvGl6X~@*f!)k-u=E$!N3;Sm1vL7DPu!qvnK= zzl7Jc%YO*)mq>=pqt&N7u9bJ$hn$SMQcJJhY9589tWce5iq#_MUoe*h4v6%}O<16I z?b3c;n4CU{g+rkKg&w zLzpyPvSjf%o3e<%ST^x^3;h{({$eV|Gvajhxm*^n*QtJuB@oMP+opz{raS&L^zU!qy4%Y`VYB19m6Eg5M#EUg`7q)N{7#K zyUo!(>dew>D0c9a>aPN+w3P~YJxfOkd@y|c)~MtW0q^)A`0z1o?`Yru>8FUohGrf) z4-v?C@uEe16$LA-z-m!0#bdbTQ%do&Y$LX;>}+6wyzs!&Vz#umwY}TYQc-d7!uj)9 z>b0n-C@DD^A%=jwAfG<3&)Vj?^0}wxwBKPDuy=VSjwZL{Glf1@k-J5L0CVBSf40LH zdZ5Ul3{0_NTb#9W|Hxft`I>4{lEe>5(yD?ff0~kvbW~pOE8SeOo>m7kLqYQ*VeW7 z_6?*aMRSk4Nzq?|R0zETzQG}y0R`#ZZVBwmptn|z6W6gyf4|k&)`PIi^0av6qAYn- zghVj1F`f~B?m_-y`PPOtg(D-oJU-udaYn#zQgWE+H|O+1FY z{=)0UGVt|RUm`0wTmqw_P3zZf`0+pfc+=+1SjNx4E$r_b{X^xwj{Z`aJTZyFD|ff} zdpdl>LriIis)rNkw)6p8F^*fkdeyhzEbr;*xpMi+v7^Tpe*{P4c^5VmX4p&{eeE$4-%or6fS(28X4hxB#Ei$H7h&SH?^;i*Z0bh_bv6RB`I{6Hr zewZ%)ij-i*4WA~2nl?G%BabJ@^6G0K8%=Fr?skQxT@DZ z>|*7WxCcjvtKB}QTdtPt(oCEfK`4QejN3QRC*1fWHf4Hd7Up{`1B31D?ZYD@v2n2! zcQQo$4LAN1fRA38rN94Vzxj;K*5dWrXu+5|Cfc|tE@4ZAAs0Uh$V|{5#D|q6Au*}D zr@OAczPGP0Jw07cE8j_K=BoVj3VwI^d)(gEtLBEv9@~%$UKq$zPN`)ik`b$``IHhsvx%3C$|6y@)u`b|H5PtpO z@wgkCnm+pIqqpCAr?s^O5vF$U-u;7r_#q~Z$Jvxok|6xY6>cWv6OEMHJuonEanO3f zX6y2L9SVg`uSqjsjWSGuDp0@u}*J5K58Z^ z46nPBPl6LD-c;ph)a!G5y^Q4umn7rfq0|!krEZ_kfqQ;GnU$vmACZIOG>Y^HZI8|A z@VJBFD`fJlNJEN-*5}eD!bji3Y_WXx)t3i8JJ8>6&d$kxi0T5 zJ=eT#m;6pU6ara8C_6HOf=axWZg*#;JY~6*@|Mg@`x{JuQIpM(e6r88rP4g*+L(Y7 zlJoT8HDEUBXQAyA>+cN9Pk=t?ykK5}6eJ{B+~(ycKp)=52Q?scCq(p7sTFbYaWQex zjSZ4s^H868$m8)*mr`h7VDA^%!p+9`G>yNgf5liPph81+&O%YD2uXTY)SqMgWf14# zOC$)emYNcsni5lSxd{=Ln_GJq6=rHEpGTm5pAh{KPubJdBN-T>Dn#^WZ4>q|H&@kp z&U^h%w+wN63p175OI6DjO5qcYARE-XnGk${o1^@NP_AEBWFK{dGAGYog((USm|mZ6 z{rdHSWqDfkGZyX*n9Tn$L7cQ(QEnT~IUFnL_tc)yUl#vXD0lX(HKVijRkm0~L zLQS8k!$=mw87A-xc4(CHfHx_#)ookx-#eh7G>oD;ez=8mYIy$&ZS}2C?|0&*dF$ z8@446X_6vj$dyER1k+bIzn(rK-r_OD_+x2vc2=e_(%8}2jhQ0E#Y2EFm|wz2pK#Ov zI{1E{YjCiltNZZqaI@FzrhXc_XD+ML(GPQ_S_Rk3IMDQ#@+s0?Jcg3~h{BPUmX@8B z1z)?Srsnq6wxz|zayiX)-!t?l+6HYC)DH-w+}l1hGT>xn7xV+V%^3Yy&5l7cd~l+a z=tnbM6$D;T8Jt-(yp_q2i}J}QzKb6Jpa1+4Lhc^;?2uZe!P2V5#f#NSWc(1`7LWKz zry-=j+wDf^s1HB<=)HH|uB)w$jg5PF_ru@+;SUxsDxw^H`eO`E$nf{N z?H0@Vj*k79kMVe2NOT5*4-Gfi>}{ZIO!P`&N@ncS*VCU9lkVS2|BG}NkMt=1?uP!* zX|Or2UB4Dl>({MKOiYHknJ~F)_zXV==I-dPlOvZq=5d{1x`a%f0E|I9 zMHJJ@Istl8EQ$kdCsB_}&fUpRIOtC?Q}9m!9gLrFKF$4;Kn<9J{D*@+vr0b)*WcMg zpYig;tKGEf|Jhu>!Yw~Cxhf_$29s*YN7`>5?CZml7>`T0p9^hB$?mT?ZLK+trm7X4N(5w5+*1Gx* zr_-fTvp(L$=>rq=u+7ui=eOCZhwEeHCI%ovmd9&#la&B#!wa+353W!xT_8jF3+e{n zFZ4I)v|GxSpuP5by=TtXe*NXwkWNIyfY}kff^gR_l6r}MV88+om6u=s3j)F_m5L1; zHvHtL&#zgtR;SYinn|H%;BmHzNBp2up?=+I{K6k50MpoiX85r$3x#3drybuWhrc{F zMiv_{L1)%E>S<{3u3RJ6D@daN%*5cM$A)ClFgq3&79v;9rK(Fv+FVpvq+@;qB2odu zGn!5YzF00gPJ{fQ+(bdz2bVwe_#=@|eSQ5O|M-VfCr_$1$~CK3KmGJm+1U#yoZW1q z4^p;7MMWV^bWTprs@1E@%g=rN_1729UubGj3iJpziFefH zwv77hUYU{1$|4mw?QTV%>*14BgpNLBf=Nq7PZT<+tGg5F;0p>06ml$~CiFP_8LEOL zOrF2t#a|E?ftWXuPnX+j8N4tu0zYN=y%PITDlo(89I{w0#>T8usbX=B%0)%IQ9i?n zKUNwiBqZb)+Rk34D{vH$Ij*Bcrd4}5+AIUg_wUO<$GOC!KzV~h^9en9Mt zmX>DtDZlgfzPh^FxY&4@>Yjb(*+q+rR4O$u7yJ6`qCXJ>8RT5uX7lNx;d-CXP4rS+lCOt@ZNds-wq_78VtyXQasx7@F~U zHt4rVr6R+q?;CZ(=1YThChVBeQ!5qek-8)Vsv!R(PFw6JEuU(+yvU>n3uQlZ+iW%DynKa-V}EfbKKVgCAjJ_LP+ z-X`@;!iiPCa-%T zIR7klGSQ17wsLln0hy)Y1DfzkM(>I*5fdJvSLqMeAqS#J@M1D!Gqqp$JNzhY z9ys{X~~7Wgu? zR+^M7(`tRAqn<05{3F8>y%>0U!t_z8lsUP%>(;G>k+G|@>&Vwf$~KlQS+az6<3r5f zX{HZ87h3rY;NRERzi;2ZFTVH!GmFK=%g~=kOlo96qz7i7e8T7y7Z;0VhzoLZmo8a) z8pu5c1eUk3R>?_BVy^Lrhr5Xpav| zZ2&dsgFalurVCYxs97|451jMVXeCfdpen+-V-LL`6q& zOxcI;7Cyr~jQEEMKGt$-^h%jR?s0=Hj1o)~@dLM1TJ+LMKTc3S@pM8$;-il}=J9#n zdh@NO=7x_y{siXc?>_n6g8V{6#ABtPuW+p!VE6>#6NWdFAFR$pZZUl8-FM%|ym5Sd z!o$0FQ^JJeC6p(6cGoYz-!tm$8L_qdpv}m&iAu=ne81(=0<;$Ob>gnR8CGhcQe3^OvD&$JFR!an;W)*EK2_z^cmn#r@ zZ~5|4bV<<%MTW++XU<%?a^=*?Q%#M{XU?8kU0Sj%#=dYw5+ju$Nh^v28K(9ZU=&Je zWV}>kU{_~G|1SHio-c0{YN`8nSyy0Q=;d~Dv{NR$#p8iiTRv=es_5Y;k zAB@S|rjIB;bYvu$uV2?mLiqTLr7ng@1J)EHuHDG+Ku3?oKI)2wav=S{>NjO?u%l0ag-Wn5hp&EF%;wJz9em~0S76^%$Yq;r4fyJ>`G$ri30NP@3_jzibUXT>YaA03 zvtj*)lP69d`r5{8q)0ha;{&%3 z#Nm7117RJRu?K~B$HQl80Pyi&Ab|J+KhjHlY%?|Z4C653ePt1`kU$I(;gI3IQ`2F{mRZ7MC<4+s4!9M)=|j;?s9cAH7}& z-^tHEk3^H%)YynXv_YSko%BbU(ch&WE>Vzh3=l5}cREF<*XP61XGVYe#gh>+y5k0x zQU%@&oN#%gw*|ooqx_(2vUu^L!oq_3`nsBH*P5G}va+%iSfwItgw))Ue-U$joFe{e zogy*Q)N<84*lQ!^u??_fa;YgnXNuD+U>T!rqVSRTHaj!p@x6~jTwed%-w>4o9>ka+ zedZZ;?t)x}LI_4d;Kpqeg%3o8cg6Y(|H_WGjt@V0|L=c)v$nPl%X}W*wd;h_^JP8|IF^PcYR)U?z`AANM)x^)_jka=b{=pW=5 zNli{_sIP<1GMf_w>a_3|cIK!kQ)+5T7PibxIItjb-_avSkW?BGZ@xL+Uvu@^iDbiy z7}vTaMPZ^QLQRRKNe1BU5S5}xUMkbD+%GrOUxF{vCs_9B`q(y;@-vbC6|1yDF@SXt z?|B&n{83bBS!i1FPb7Xb?K(U9CjmCx27eS|uJjMbWQWe~5%~$GKa(FS7x_@qfo=D9 z{R*ZJ^;mfu6rTE}RclgH)6n1OMIh1+vu$J))fy9WXilgn1yeD;ORA0ZCo?g#^MG=o zoBRs1S8`jJ(0`^oq#8&+;1c*tW@(%O>^yuB0fbnPos2jb=PMhUTl#8iItv!0t5h_N zJ0bc&38R7Qwn&C-perN=0QrHe_vjNW&e7~zqg) zp4YsWs+#ui|IFicBW+IUa-{v>(R+n@MxuV#`Uj)M!9m2n`0SNeUWQHC$qczpzD|n2aAw|*^!bYO%GkeJhxF5a*7 zhZLPWdGfW_{?<@euaqlx?Rx0ZM<0ociROfw{q#Xho0OCkqzK5%FW9hl9inNYM_+a6 zQu(=a^>uZp;ViOh6&7}{UbQ+VCK^G3?(_P^*?PVFL-;X1qB?;8!X`W;{+u@bBmdQ} zeiisOwP#}01SYJK^4*wZ;yQnxR3pv`c1Pl`Fxc?QYOqo6?FJxK9;dH;;?mr5|6SH~MnMRDpRp0##D^tlm! z$mxS*tu~we_&3KoySkH8lGdzRjV>wqg^AlNqQBqo_1W$Ara^1v(8v|Ly%j0=WO7(e z)MzPhDxX+9Jv?-E)X^pJdq6ts2#X@6)y2lgm#H;L=2qo=nAJ;Jo~jL3*ceDS98gKtcM{$x|`?0EOR z_g;JL)w=qI=$P1D4?pzGv)@}Nc&z(NoEm+m0e>h2l}3$dyfrm-ZEfwN4tvp}#hIDu2!1kq+83ov7Oht1 z81$J&U3P@NBqnlMOk}2Bt5;BF_Ym?I;tg{ubMhDDnOIDXvfn=Hz&eS)zW&$KXU^&L z+C2~N#^gs@S~_0gY~lwlut8!wt?d`uBTU91tM$l;4GA#GKtkTeN~9ktDq57AyFjbc zz)dO2WX#IQT(TJJKhhAme8h%j;Jqy!y*1rKZ3DJZH^P8mQKm{Ap_j*{sfxC%vNuRH zaCi}?@mYZbH8X_tXP`JaucyDL0I0?Z&CRs;f6zhe>Fzvs?083e+v?S;SFT!tNd-Rm zB&=@Te-jX9C7VI~@%@>V&somj>7)+Mv2@#Y?zFF~ z4a?$W#ifX6A!T;|iPIl2z)XZ3!Fa8)u@R}8t%HN{3Gs^-Eh75Q_fG_2Cn_Q4cwK$% zZ-4U}c+$XU89A)~>wo#bVUZW?@1m9_)^M#asO_2Te{%i?_WT6340$+{Q&I}^3$wDb z5xCsxaP;^0V^X2Ix*EyYtwTe|MyoeOVD0a%>^}qwe?jzNzp$eb1UuZD{afph_3XKG z6%`lr^71#9Z8DjRj0U6*r+@rQX5|3gN$Lm*+6h7^oH2&r5@QWl-0Y6{Djo3--Jw?* zpx}G#oTM6ZUtM+i$dRuN2K|oh+q1K?aVs#3fA{d|+u_9jCh#HP8U+UNe!JT};+7yn zEIMv5d?x547bWNy#3;0EDs^J?xe5GG(+4x@F1HJbty)`KVP9KTx;!N<6^@+5h`Z)* zNbyJ5F`K#nWLMXLp57A!mW$S*Yc^Yx&tq4rj7o)``B-sD4ag^$q40R^_K_C1*G}aT zHcmBHK5WQ@F-{1AI4tKVSrGMml&-unCNum7#Ct}Z?{ZujnofB1tRlq@ZQ zO&Jj9gnnb?M$Kul+d5gyMXEcHRd8J2 zU)SH)i)D1B%a`j7hS@`Z&=XK~Y=o*&kv>7D{tDn#=*dQ|?AtAYv zaeXUFCO=LG{imUQnTURd2V+-H*Ri9=&}D}Y2$m9SG&(*}OO(0q>BFZS$BPFDLoLHR zeXeUChpa=dyz&a->LASy%*ylhxsE=f6opHEpaUJFj;gBanwqOvno(4kk-s37^f^9A z%n&wlTqGRXfhsy0M?vwyubJGLA>~XHjQN>x2>8w9Ur-M0Fb^L=|K&2ovp#pBp{Lg} zI5_g1-D{$w47`=OBmEI0(bLxJI&;}Nk; zw{DHWz+A-U+egv_qGkyw7_oiCnqb$Z%f6OciPtSl&s8reMrUpc{aXy?(f6~B*e+eV z)Z5#Sd6xYAe5|emN3Q=k;cy@I--7!mJ>5NT{OyeoKKRgL=`SoS`fva3ziwE+UW^wJ z%%eF#AE-^G0>)(n*54Eq7GTE67->WW@9F93XlsRW8S8-idU`R#1cwsLIY2@f8P*hMz4ztX>FK|r! zqsjQtLl6Dvx#x6)3N(x8kA5)>qjJJ1z@jko zS0Y91@7~@XM1y(zop&r|OL6hifBf-}H*DO1gcuBoSwtVgM=CXFb2GRk!h(t1+#KY`W|lK1q<5izoTHg^pbJM0xzx?GdkvPI^^qC~ zGCg{jVsC3Q{VSM9VO@c<&b4b-N9~T})Rdya0yr7WZTf_czYd23QKyklvazu~Ix6~S zzxc%ykMHGqEJ>Dxs=&od{52W+3xX*eIE1^cUw4*IsT6!SnWAzsvx*iK<>lw;_4>Bf z_U@jZ=9Xq;Qn_;VYIk>cWTY`ZJ|05>0!Z8R^`8SenSWT^PZxb|CO?CN*0bg3Dk>}T z^71y8l^GF*TqMl&(?>8Xb4d|D&xtnXy2MxpA;o<@;~|n!yb<`#Akbs%Y35tV?gikx zovzE()o|B`xAIsJ3_Qc%xNGE-=?^+%7;x!Q<+Ykx#Iwb^9;9@WOXVS{Uz|^zBCPs}>{ZA7$M69JzaP-{GYgK85itXM$ygFTAf7=Q6PqI5+?M<*o2+eStZ zWVxfGqpP#iXpGFxS%3wM*UQgj;Df?ubN`!f{QcMe@2{JiTOtgG2Y2lJ=|BC`(xpqW zsC-V)A7N&^-VvwU>i0QdSJtYNG#acZbo=}c%p7af#<-Xj=^0NLBa4w=VK(Uph{a9X z7vgnP6hg+M8`|B|i}jK#R;;A?gSjC8OnOOMinP7wMnh-Db%bK>}Otk|BTCR|_;=J5|A4`XHEcR1)XG(7yuE3bOJEC|N3 z5xw}+!l-F-1+kMwvN=~*flHjO(veJme0rY;VyNgm;eOpH-sBwU49yp zQ^i3a40=_>p02QdDZ4@s@>}#YyEPA==%Z4quGO_wRyWy3obhp{jq4X_)X3g}TeqbT zCim>4p2|kg#X7&;CD31`k}k{F?cJm*N(bC|`rjy@aBeW@wYk}ea+&;UZA)LDrKJVY z5k0V{m;__W)b)?c={$7ki(mix*X8Bq_%!_f{`KGfZNr9*Fl>p^&m^B}1+N-ZS9m4o zbpt=y$u!y@1Pll>Y?}`KBYuk)oIEDHU7g+wXZ@o#sYb6_S0*!&k!uR{fzc4l z4Tr1<@^jWQV8PNptXIQgQwHsRr@znVKYzab#XtS&%$c)Tdbs!T$A9)uKZB)}5qi$c zC;UH@Diua^xw#8qAt@**fH$(auOA&(jN+@RE?vD=W3vszeu{v)3JgxE*t0|anLe0i z{b03P5sJFKgz^we=`3Ffg2r5WWl1vMTs(>BG>apN& zj(7Nolq(j&`p2eS*)6(E&;%%c2@=FrU%5=Nl?@R)w{J%X75=7JcJaxn!e?;8i2v>2 zV{t8#uW6KWtx|>zW5O)TwuX+scTazgBqQy(`a3Q3 zVM83D7cxcpxekBSOOweI9~X}?a8q+*XGbRjVi@$g^mJM^PoD~sA6{y)F5I&Iq7wD> z_wC#F)*t`)M|eyi>gywW9{JhNe^#<=sai#|7Yt-*@E4$P#U`lfyN3^LjL=oby1Ebb z^?q%!oVDB9WD1SZSYV7SG#ZOyqnF0VZ-|ZCpx5VOvSzNxry)WQ3SmaOtE&^WtfZtQ z3t2IFaJLZY&$(E?+-^7A+5YtBKO?HXMx))aW9RpteKsdMJCFip*76tC6KyGp`$XiQ z7EUVRxtv#!znB@9F%LO7IMCbM+fY|`sq#`=d%N51h365n0>Tl7SJLp*FAjCO^`}Ut z+vx`+_3G;GVrFF?1Ou^^VOGYgqzPxXeVhpXc;=4!nN?CI)PY(*5&2=-e;)qC+b;@& zf!NAk@0QJ*mcgt%FFzzg(<+}>l7)`V`EzHRn_8lxBT9-FrX@+bVg=xXZf;}_ zgjnVR&vX^)6#qr|2la~hW$Fn5n2; znznw+AjY%s(aFrrGDSt96=RJb7iQ3(H-$`81&PIhU*yl=7YV-0?KyPt(C>ct+w$^r za>P^KSO!03?6o?+F80p$4F-q4cvJXdn?AW#dGeY ze`HXqR4G=hRU{>0g&8Xf;WjDys1%5SrfqI+uDNz~XlOV-F=64te0U|!UHXKif93W2 z8|oWgdg-Ol_J3xx+psS4|M<6mEi5QRe?BDeMOm6*`Gn}BL@+L6(r9V%((IgUtVBnb z17RoO8Cg|zxuK!KX0yS89TPuD-N|eIy@Z8z*iwJ^|zp$)qljyBHPQQsf z4ZD5_1i@fco#7y!1r#5U5H_JhLcat}7o_u`Er_S=3hfvidXl}&eo@Lk_vOoot$dWc zm3QpO&JxYa?4iIrQ-%*P!k7Mk_TD=@j_b%5#pHlN&XEX2AOev{Fh_|=mK7|oD9N^> zC0kzG_wCx=Z{NFnZGZ23-@ZTI`dZ%g+EyZETRG=Mksv8%0t7%11c;n-8UQoE(;MB zY!?M^i9B0;`b+GFvG)GH3#@<`=b(tc!$+a;3k=B6>Jl+AI>B8RnZuz}0wtrBD*|yb z5-YPGrwqh)yQRQ=Jbb<3=9sv_UfzX*X!!)pv}Jh?Yn;R zlb__}<)d_%C-8@KINPr~;G;laZ+rWD9UY(P_16r>b|kPe7@JTP6S->r{W6eb1`{(H zbsWBmUG;=a0GSD~;78POmPGpk7J≷BVEnYiM8K`})H5{{Hk9Gv}{MTby`Nx6<(XdqGK0B;%%3ee{m*ZC?w@--%vp;^_TB|<3K$7El$B_|Zg^3|Uc zt!m=vR_$vc>Cb!O(b3V%7-QGf!XnPiT$P@RJPdM1`s?Tq-oU#IvzZ2`)F_zdqfckj z26mDg*2F~N5((8&X5%{+f5N(Zy2%Tlh=76ZnG4k&9ldrR$Ckp>#DoaU#Jdnz?6t^- z66ueXV%AlzITgqO@c&)xFp)V^d~BC5xZVKCBDAu_*LPUQz@@# z>>n6tZfV6b+*Jt)fq}??EF>TiZ+6n3k(3}_-+sr&#yd&>59%{6&|a8}UbA5XSGQM~9`r$w{kiHcL+*!n*n!8tSi9 zqT{Q_#CC81sxxWeU7@iaYX(FFenf<&v+T?Yq>o-dd=W`7%F2)laOaL)Vze@&g81Q- z2`5!NL?36NHawBfWkVkM_-cYL6HK6UxR7B*pH78OcZ>E1uA%EhZgTxCz=y=+A7d^c z;Sv!xgU0Te7kqlIC-I*Hd=&e&TdWQ<%s3yZTq0A*d}NcV2C@EOf#}cim&>GKVPO&B z5kLgl(0h9NtQH&mFH4C24y*w4lPge1NP@K<%u29B+#os<2PTp=GMN@D_PFvCWr)k% zGLRpIT()}k>d1)5hT2*LR5mxarX;5j@u|%$1N<4DynTzbUk>dTfywLE71+@unarPl z_9@bf|MjIqmtqST^z*8WOyF_iZOmeytxEICJLAg$um_0%g zz~x@ts-#>*bd#>gpRH7<<`<;1|?QmMajtOk??_W7sw! zAfHUC>1CONiM~w=fgssmN%GJ1o7ir}y+GKND*sF)iAixdij0GY zQk=v_tOP{*LLDAhN&KaA6sHWEn*icEZX3`I#QASDe7t>BMDXgQ=;G4a!GV#=>eg*r zvb7pvCFNA~aiF?;-;kqofOM}`D_@tYx^trpH4oJz&ar=;_>g_ZZTU9 z|NSczO?mUJw@^3bp@$yAGDKk+7Re`#8*gF1LH-RRqeqT@`Mcl$?@O0TkXvKJh7JGp zPydW?A1tb-HbIR7FzCqn!4BAO)4?ZBGH$Y)0Sez2R6i^{{?gzOX;82Y6Hw-Hdv`BN zQ#w>)zbo#Ec8nI&(nq6FZ`r(M$BrFuy#9Jkb@kU@pH59%6Ca1g%EW|e`8zHAg{KeD zo{#)s3gpb0vmbo$K}UNhvR)iKc>lI-+jz?96)c~K|3Jjk+N`ySs}eSDEd2b7FF*e9 zgW9_K#>S@h){f$mVi@`N+;caE;US@+NK8bF97)EoeIwd0y(sy|@WIs$d-27vZ^^AJ zs!NdtgdJ_p?{vTn5vCmZ;F|x;S~PwYG==yw6YZG6VSxB;)Ws5$@qq(e$1cE!o8WVR z{F6O)QQER5Q4doyav;} zU7a1{CZkHDV&3j~@z-7ShaVYvGJ^s$#>TqL<`Ia86!Q^~90y8;YJ7DGYIWq|^OyH% zc;^|*zmxtkF|oze)O04VEKPR ze!;_!Jc_E7N51;1Bk;V39v)hJ;YlcVawZ4f`N<>Z@y~wiC&j>`# z$;sKcabwN3>h_L~BVT^8al`tU*tnVSmtJ`4{)>JUx24Qq*Y=CFgBOc0yz$!WSST75 z6%BFSv2&N7A0m2$H(7T4<#>ze-%38woROV5JS-w`bI_`U_)Qx(6&*iz@%%+pIKjj| zT+AgUB^a(CVs}k?Ix?_3$D(+|OyHB!#-+2=|1-zmWAMoYg8@e7Hto4~C%GrwR+jv8 zIbR9=7nd9HbIHi3C_fJPDB0$fACQ6R1&_7g>*1qTZB#@Aw0c+9a7RbKerVL+j|y86 zA}}j4eI(e=Xbm)KV>$~5*wFZK5&1R|;fdtRTnErOAL6LsN2WXI8-cMCOa_GR_reG1 zf`WAEtE07Q<%S(SI zs360wAjyP~4iFh;<`b5V>Z{N1{!ubo$Eln3MT->&GOL$lqPaQce ze`f-pVI%T%Y4g`=w_dBc_RhQST&cLMR4Mn|e*1y_cOa4%?L{E!(#Bt4JaL6O5w@R& z{R!uCKww~Y_S)#^m~{pDMaNH|U<^v>)Ymt3wRe_ZE{8pjEh{rCB0Nl?QqLB?D3!C5 z&!r+iOj+`-nO>Z2bTG^IJ5T*aZe_N)NTO3b>6{ZcMmKyDFT{T0XF$7@7Vzz6yRk{HzuaYNAGVF#s1Ye;s!(75%rO7- zP`PfR$nV5!6Hz^mKOTbUhS=z61X^MZBPy5~4Ms{zB@j*EF;Ee>I1B!|4S%`ZKRn_# zi)FMIsW8mLkQi8RN|`z^FfBL~i*}<}q!ppew`C+hK-k~UzaTH~laD_h92!KDYqQym z<=7;(0_}<7i%Wk_Rq<0qi;(iTeA2`4AleB6$R5kiiilu8@$+otQ|sruaq~t96IRR} zD=Ip7?komQ$P#e-o;@MK!OX)VJmaSDdwY7{egD0e{`$9T*J^xqzIWdF?H~Qysz8Y{#%=TkhJmT9&rYUG!(fS#tD&yn|un9TK!G zzF`xZ!7c5#CCXny%ZtCjPN6Y^ASA{UjP(eA>0tyIpB{nlY5Z3Pe3eQS5g8F28q(h0 z*3muKH!vC-i#!Z8ZAAK*JB``ci^gB@9y5EII7e(lFTrF5;sVz(8=Ya#$NWqi-~wES zJQ(Cv#u;2h|JfHWd{984kmamR@blLW431RRwDk0jgoOnYk*1=*U1B$mJGuvbP;IIp zUA3=Jksc?}D9Ls2rT=W?QzDlpC4_(f;BLFc{`&i;s;jDBdF@pMD&BkVcVc3r5qeAw zoVq(fJAo1faKTCo^*bqL>HppGu>>NILQxw}L=a9?A z>}`Z!8Q<6|iSH-^5#Uo}#=Ul!DR5-)i`)qx;IVlQ|5?Dts`5VLa7DM_+JM~(dkpr1 zkI%Sm%xH$^M(!uqtqw)WpzG)}3-}^KW<`G|eB_gjjf>Oy`C&PKTU)!qXoSK-XUzCL zNf_n^pM+_C{6&R5Urj=6>|IJ#@UXtlYBk8@YG2=Y~s zYKatINkY6N@aJfVM3{sUfE{W2-`=}|LxniQxe`OBHrRgvv`FYE;xP7Px=Gv{_hKcvx^49^c(F)Z06Rd2rd(7E&HkiB=)=FLC2zp_R+Nu?}<@rA@kzG{_8u9BF>ti4^fF_X+@m%!a2ye89+ z!u!q0z5+W|B_wX!yzS!o^YB+77--9uEukSHDz$1^(ua*YTs~&XU;VKD(@#Hp=biWZ zd;3!A%=BX?=yIhu^IJS1M7e)p0Sg;UQreSy>x4Z2a`oPm$UV)g6)c5K&(j z&Y$16Zy!o-rlh6@1qC8I^9rU9rhJ878EuRCS82YO_vf^uew{YfzkAv~p^|;{ATk-m z2h+1fghVt5A#oFt6mVvU3coQo1=EWBECb^TA5oc=l~;?3iZB_tZ{Oa;#3cTjB5c~v z2fhHuWBAV;KJqCWng&O%^x8&Ef)U2ls1Kr+Eq0|Jay;l{NISvlzEJdc;*Y|th?6~c z_Iz7=8?sMs+Oj1oG7GSp_1W|8nd}iE>+6qzCIG9Y!}{x-q%I0rq#2+Ij^Ov7E48u|s zoY}NZ9vSJw+zW)soa{G@mz642Q)5$2O$`jTkdTnnv=l!+0kC}R&-wI^HmmLA$&=4L z|6Fx-bx3IN!3XaDhkv*~G7_s&1Q}gO{xUu~b=9KT|Hz*VD;< z*uoFOo0(1K%Bxq3jurXobbI&gO-f1O^Hp&>taYGMPrH z4uKn9r3zQbbrPu@oyhojdw18-?ye*KgJr||+L6)v(a{EYmX)dyl_CgtEq(bx2h-o* zck1-%k>OEaU+unq2UKKSE-m_V@ti=)!}`G~pVU%3pnqK9BdLF6L_|PfKu3E=OG`86 zzz2s0!otI&Bcqg5zEY5X1S$9R_Z1fxzy0>xufP8K)vBw$TJ2rmzU#>!J(&-mvPQiq z?RUQPK{-B|#5me$G7k}<1-nF|ko$&5AZ^(WrNW=qZwhK#kb?Q^e^>f@n!jjY;o)H@ zNLqTSOs^l3$>eKuP|P7jEab2x^qc3}m(9m^=G2+rKlA%**RBNy1s*(j@CQG5I3hfp z+o1E6pDFtHh2-yi#C)X`2%N`!6N-rmvO)z#S4SXEV3UspFeGK$)d zegXbui3;0Fu}>UuD3so+h1ne!L2aZ~$qxya`-!hd*p_|V}) z81Z7wX+c4OSAN7kb3ywTbkzvisjaE0sHi|er}WhL+?+(M8pa7!mf-uPwvBJ3%vi_H zyL}N|*77MY4qK^&OU1PsPMsj!#x6wrqBTu`<%Q1(LNrDmf5k_iT^Jo5Q^;id_v8oo z>25(EiA<)52$HP|M|E=I5w#pI{pT*9Sg#rws0$78*XxZ9jh*dXoxRZ{c`l^!TjON zzyFeGRi-b#a18eNz~#RtTamO{BA1i4U@u4?vmD>S3zWg%|_``X?kNBCB#* zYHDCW(7@0TQbM(~v>+8VrXu?L`Z2?Vp%CULFgBbOd_j9K@#PH^axBWS_#+o>{_}#j zU%g&`vADRbv@|U}4XLFA;Z{bg5OEbzB$UN-9>m|7TbUX;`N9RFuof>qU&IO52vdiQ zpyC(&%n3}N_!F7~F6F0%+ZlY)DS!>XAdWl$-_!Wd96sXEnf=CSLkY7umGJU(1{=vW zJMBuJnZpN|2?}yR^hvO}y1ps>UEyQRTtZ?ZoNMi!?MTI7vsx6;`-~|J-hAP^kH5eg z0mw2S#5b#Xpug{2ch8Bjv2J9=rMI?8Y*wSyJR(>4DHWkgRTvy)^Q4da@Ml=x(7uod zBP%;QJS@C!xDLfk>+5Rs^75A?{cn!Hr|IKq`0%eGpZK2J_mKAelMganA3Iv4P$;!( zZBAaUOe%r(S$(Yf2kt=crPNH+S3#?z2E#>^Po9h7 zDo8DMVv}0*_Jvsa0Kcrbga@Rp?+p*vBcn1mUg1`EJ6H1THwdX zC}MXr`eSx_-=2M6e)(nbMfA9r&YwGv1iQYzzKc%(8R9R#o4B8i{B*Q+Jon=B<>h6N z$#wbb9(wR0lsysR8m5p>BxU9255mB%aF{3!qhHl1RkuKtXHuQl{M52%e2L~hXO>$E5#=?zAnSyaLLD;#e)ZUOn$uZg$6Ji z`JajY6x)@!zZrbe2u}GSPT-HUhP&X?v%T^|Q~(`>PMOg|{6go6+&W)fbaa%jPTSf# z(B9c^G@1hg*%*V=HilftWkGqah&@oavEIhVH&g5 z);e~ZeN;jbOHw7ILU8TmO(Z$fKjIf$!oK4Z0X^#r*KOFivAL~8sB(5@CVU7)L6JVL^j~WDGdu;RPsQJP;*a&U zs2P@;nuh$YdHH!;w{3m@gZEFKIN8?H*3;Epak=8usju(+_MNxizBeu=PKl&L)QZJz z1;`KN0PjQnJA1Q>PncVoQ&)H*6H(R|iqblSLsxy@i^W;WSu z%#@SJloCY%iqFXw7yrPZfP{nuR4CH7=`jI_+656<3G3vblUPfP{&t6T%+xiczcMxs zpR$$EB(FW?t~Ogo_4>+?;6ki&_VIC;o%Xh)q+tMS^joOb5rB%Z@gwUk8j<&EjBKedEbav^ zJgh(60$(oIh6JqFC?iHk>P?m&tR>QFs%1_#wv|T%PRb8!W z>u5ju^+~u0larGf0avp8_Yd^{`A>g3cI4>T*m%OK#Gn5Brx}?UG;7F}!Oi3o^55Cf ziMf5udqWGM&~{90Y-ngG3kGp&AtIXi=N|ou4EaO)VI(U@M1g*A&}y?Ql~^$um9rKr z+7cCrQ`*Vsw=Lif_;>_*(_h0isqpH91FLuTdGrh&oXGv}-J?9P`d5urH+eJIqM z`INo%cawZ#s#vG>EzD1`!;ElPzbYy(EiHTQ*%ulb8?6>AYV#uRYDZ`1(BPoSWCB|t zz&3|{pl{%V4?ci6BNJ;%N(u}f))Xe%1M3;NmZp>9pI5($3WJkMq>FQ}$XIJT@uiQ+ zY-_G{n9USsN9|Y~F+zplj9D#pf?>+p;x0EJEw6A>A}@_!GQkut)>q zfPXG3{87W`8*jb&&b#lxQ4kv&`_z+9Zr`>YiDU(&_?y$G>)$s~K0y$~q97N7E-5)G zDjEa%(>qUn_W9=!n2yelo}TW?%BmB`PaZgMVAsx_xBxYHmI8kT+2wrXTog_*nVuzo zh5njuWp{D`7Qcym@nPckNwUL!oU{Bh_kjz1v>~ziu&0SF3SWec&WLCV`$;?TH?BU| zO_SksmI1L9Qq`Rz^lf0s{h< zIQ+sI;9(373BKdN0i)4?W$)LjYd-q$gD<}L!eX%)jbm1%9(LG~;v0Q= zN@~imei+{W{{Df_KmWY6yllhzLIgAJ-@hLLkE|tgrRGF;A@C<1;(Q=If9CpAf*P1Q z-D-G~k?tKUVr5b#GR*K*i0pNiIR1h+Y|`uB(0`%&3Vec}eDd*?$}4Bjo-Mvul9ZT$ zH>Vd|+WKM6@;_!YzVpsIZ@m51z~De&VBr7xfBoxiyLKa5hw=30{kz3%uCA)Oc(HhJ zV907Up~?-iBEU(Jo0pfcDo&xKdpWfPn(?n(@La|32KrAcpX1|W$S+@3RtAe131>Kb zEEGU&5waXcMn;O0C=C7C!xs_175>m^@T8*^=jZ1oCnepsd-qpgef8dZ?^RV^t-e~_ z*3$a**C)4Z-SXgr4;8N8pj1J4*gG#{`5|iHkG%mtD7*n1-in=}V>)mLf1MyXWH0;` z*1xk(g5(GP1+j4+c;$yEAc#EQ312+WzEFoGA~F)8mz9-QTH5;Cx`wi|7$;avvG{ay zWa5}Mj6NsX&*Di`{NdNoJ$M0lJ?S0zUCb3tSMthzbmWCE(g)PqzB%)iH;RTw43*bf zdU^+AV=zfi4ospYUFM~~Fc$WZ{D9iNT6JMT>X_LwJUVvj?A5d9&m!?AObggWW{Vk- z`d9@O78Zv5S6H)CQ&-p5*NgPZH8s~@)gRb@$9?zR6B8T917KM{&spc>An*IxSFe7% zrG8W9=9yG#hso$O&}SbRM)qsaZl2>ut*>@1!mo028k!oBkPyiUvE)~yi9)d=(nX%J z4;f_sadZ25;sO#DL0|-lnY};$mYqY}$0@^l3ycW4UTma}%7)5Sx!b{p7xTzjOQTw+96Y z!6FRGBJfvGD1v;=U4EE0VmT57dMw)bohD3$AqDFiS>Goh1?J#|>62~zfb|Jnn>w%M zUxnVnd53t>_3(-3^dF6n+J)QUi}*6giwIu=x3V^LQ;a4pgyI=V-$B?V+8E!Ejj_5_ zf$-vRx-KyNUFj1Y7qcp16-s0lmy~q(^nz9M=dUY#Pw#oY8T(a?sN!A86$aUv6# z921jenM>kK<U(;6mOlNR_!FHMv3;?pGi2t=Us#YK zp`mMYa^X8xs1(LA(*Qz!^m;7JNAl&zfB3_XKl=FO$rG==`q~?Byz%e<{{JKZ>hHO>mVy z{O}L%zyF{{s|Au%$tSdaU48wrqT?MM9iv8r$znw;4;F{kH`K#J(c9mTkr?jgui=yk zfq3(?A28S()ax7T8(``oYaX)|ke&fKF)T=mhCHDL!{|cxk8-&pI3%QS{d!dIdGXMp zM;?C^h5JB?iYr%MJaqVh2OjvhU;mrQY~dVVB>r+i6CXZ5`h$rqR1SNO@Rt#aONtjh z5o6``?_T-g+F&W@f5e5XUY&#)#Fo~c_Vzx87}Kfjh=p1RJ`X^Z@l&&zx$8E!a~>_on75UMMb~@!#(Vi)V}zgRoxt(}O$3F6#ONgpLjXX*UNb~KDw+gf4lIqxCG!5|4*gnz~7 zbnq2&8M0n%-n1zyA_Dax&YnHf*w6^mQ2^+~ZLaX$Yu^GZ@s;Op|G=C4>T9oEEG~ge zZrHTpfd{`A9UV>69s(bxq(6K5gnnkE7Vg1MbEE$fqz`*dKDxPHeq=JKe?VY%X4a#R zKJv%^`s2U;>%XR^uEyx5zP|o_8odAXXFvOCNy#NE8oMBY%a}el^zS5kvu$6_J48av zMSfsF@L(V&WArhB2EpaNI(CvjMtm4&rR%5j7pJ|!Vci5ivt2+0atX5A*wYy>ClpuE zlYf~WKD(YZ<3)upkx4Z%{!#l=!oR)RKPSpBGdy&6Qq)~*{MLj?loWf82`Dr%(BI$E+=TYF^y!bZuuA7AB_03(KmbWZK~!~+LaBp8OhQThfHLu#RUMP4 zl>w+WCJ|Qgy9$x>&6be-s1>TTl(dM5aI?wON>$_95Q6QBw9D~Q#D8V9-?1^{=~Jiv z@XYT|pFV9g7y<+Qw`|^u9;m43I5Pb|`-hXe`?p?q7)vwA+%K%DL!;7zfT!aUQH<2Hk-7-GjX&AjWGIGsi>T%et z3#0!TVhcx~fB^r0`0jTzGuGg_l;Gg=&&*EG-~^3sLZ3y~&vR&B&CRWUfBEH0B_$}t zx@GIuAO7%%sE5wk$`s#C`uCBM;iksMVf_&7epnSk%1wu3eB9L4)rm?MW~=$8@-u(> zU_8**+cz*YKw-+n0rq_MFyLQPTZvn9@Bi@bJMTX5z(J%0LG1zL#Q5L8`(1i!DlAkOrdBHrX2fl#@WtyFPX2F3AC4_P zfd-4FyP1BNKYzuS#eR9w#|3fW(2GA2!bt@ufhOcf_-&f@CEmEW@-JdBv3I`NGR8kV zJYscnib|~>88I|Ab`0uAY1WuViqw=T3Yi^%^bQG)zizOfx&FmvoEid6DB2ch=o>nR zN%Zl;2T`2#8GWP3_y2o6xqARL3Xrz9x~|=7b9m|Rq|d_0kJ)Ogs%d-v@R9dFIX66F zR4Wx3nQNYU>ZvzgeXX?g5<){Be)N&_HEH2tp|R1i-+SnLZ@u;A|NHO%Ubuc8;;TkS zMoxWw5+@&i_~D~Rj|~kCiT3;Hhjz`_k1SiN-3`Sa&bpZa=8Pi$f@<_7ozh$Y~k0kuYkN8Wt%jU!)vIc7A(#l`*T zsi(3sGa#rU8J&Btd=e>~RB+M-2M8_FXtb+SR{!D`zkKc0*WpX1l?o0C)<;4cAo}}% z{rZ1hx^&4nYQQpg@y5B!=c38ab^SZuWRd)zvfuvpw~UUA9rVF12s&Wr*|38h^J#0G z1l7n;;TP~deL8;^f8hFxL*eHnNTqM7sJv2itVpNx+q-vfQeqOg#|;+e{quoOcnFwz z1pnE>$E(RSa!r(>z z=$6i&In&oa;OFNLKPDw;r}v~@Uv9ULYt-RV znTAm2&Bw#?KWF@Br#~eUjI_;WYe`8lrU7IMMSfmRNJuC#Xl1o8Bn|u<+u*2;i;eyD zuYbLH^A^n53*00UcomY_MMOq~hlVSZa_X@Fz^Pc>(SO;j zw$AR(mZlb(k8y?1njE67v$C@M{NNU6Po4sQCaywQ9nfPe<$M*s%vt}-Wb#!>iQBeq z%gD&IS{?oUeORV2I5>FnSbQ*Q(8r3R z5AkWn_95OKLm_0<+q`*m!Mc2vQU$lN!C-_vkDM5opTL2?f1sbgAH4RMF6E?~Ied~B zb`SepX!*hF>Wjq}%gV}A(^7Zt*bxvADD>ttrjHx(7u?F2nBikHCU;KwB#oR>L@v>i zU}wbBTuRxea7qw#ey7mJo$yT-Q)R`K<3&YSTS{)_q$ClLd*FK-|9Qa|%r~N{Nbl?E zGcWkK8QU%CkKbMNKP_PEXm7`&X*4iY@Y{3yZOHA*#8G6+EctsKe7DOFhcAMYQ9F@RnuPO%y}kWQqp`iIKzFSe3aAJX);x-%lDCG$FQMR|YVbK`Y_=ZP> zXHxtDm9See^f#N$=gyrybm$Nwmf+}o^sz^N{No>mhlMlEE0T>-)2W|{lw2ge^2x>O z2KqokRBF|#xP)E1b`})mW8EqovIe7}qrC(6{MmD7OylDr!NF>+7CHfe_9CH|dix#H z>x(a5EGsWfO-bFgb0;GD33INcL{ji??2W|Nx`94!kssM_fAd@RY~e8^lg!qjH3j^D zaHGu?LqVJJ)9fC02}4P|8fQp!b9n? zvw_d9B@8@-{|bYTq5I%~9?`O`Ev@jp?A^O3A|euP$;p(ZN`G>H>3ri=>R_2ntI-7M zd=nxgcErZstJSW8Lt@F}KOvtoxx!|(e(?VLSneGZ6o{ogkx`M$2!AK4%d7n&-%Cq# z^DD2u`scqqS6fr#@8^fO&Y%3`C->ZQPiSZ;TRF;A+SK|-f~j|PQbHo8$KvDS%*e!S zHjRvo!f|=_{JH9?YVcU8!knmDp^&rwNzk#2uHUfIr?Q?=HN82MrDMA3~J%;2=Cxb}|{*L!=To#1TWZDxOjRp+R20 z|2t`WQ~WveoYw$9x{SXG_7h0E9L^Gd$Pc{RNYZ`#ZMWk9m|9FGSaL`|edhF;w)QqS zmz7F1b`^_s5O7(t@`LO>qFcFb5MxRVwkVJC(flkvm-15zX?=V|U zUldy_8zl}a-v4X8q1|Frs+H?GXX0BQF_`~~t^yq=u*f5z)?IY7lWPT0_;t)x8Z|Wbw;v{4z$Ks^4^mJTdg+V-K z?CI_~cm5n!^uj(tb}Y3t7!E3X5nFfBKW3{3BK~!_Hh5_}{dBEgkwpKOm?mAu)0Lw(UqQ zg8mT$DAaLjX>B`m=1g6E9hOn5F?83eRDvR5Fr%IpjAo#-s_ z0`a9+C<(?ftZd!84@oc*-3#A|7^kV*@n2!^A$VAQTvl3ES62)6V1${HnnF=mA{S@N zU+0aUr@xdEVEQHo1?GeVuL}#^92l4@m-$2LfV&foC5%7E(SaE;Gy&xNLe(rRIY$zP zwQJXMMaG-VtlF3J#XV1d0sm#!e$nA!_4?(@6^C9r{L0HO!wVc561s2Sz9*l0YWJ?& z0s;a+Iwu*Yl^#|cwvQRdaKQB^M#30DB_<@HNAUAU7zhi~A=0yLivC@E+Dz>Sv$S2IR?#}Mx zCyH8I+cs?4SXj7Tt)ggU@wq^D$+cgil4#D0czTLHUihLcOt1g-!^4LU9l|hd_ieih z@+k=hZC?3dRPa#yy`_9g>S}ASsu!v$BQ-u}ZKBRk!yJ0lSV)O8#E8E*gmVXHg_D!o z7ylXVWp)LP@5nVucQY*k{xVqfg+KxLHyXaJOK<-CoTIxJIjb>zsxgjVM(JCtJuNkM zeL*T#N`1rW<5BrRx7*a%^UepSp8x9?C1nj-wX$$s+GF3l{hn`aj0g{wDuN`+SgA7F zM~d`re7lu>0-G>7IeF8DO{)^(wOZeC6M{vCo12=?pFdk$TdUU(t5r&*zf&j`G+Q7- ztJuUt5C!W~8eY-}j z<@kt5dF`L+?UP%zFNp*V8FB8&i4hwUgSZgW*f{cZS5;lb^5w?nMl1lu=pHUwj7dlw zh~6Y$OOXD0{Sfl8DevCbJrE*W4$xy8*e_d;_m{}2R;a?OeK^1Vmg|Flt~N)vEQMmF*HruZX%1nUP8gEL|rwV1}CNI@%Ktp=43 zve#xuMnov&3ML)6dz$|Jrtop{7V<-UL8S$Mlv-6Ht{+o{$mX1}CL?EUZg6lA!h)v7 z|JLx?qut40pcEMym7SfjHYYbMEDY6FQE0xayQk`ERat3iM`s6e`~?REQQ8o;Ej9e9 zQBx9(juR(Nwzjoy!qVUM$gRwW-0tVE+v)F=CVt?BzrgZ;9sQ9L=B2}jtv36vop3AX z-`f74gMRSxcUJs`0~n3EwB%A>-#~O^$cA;PA;EsEeJ=E3 zVF%FS5&D9QP`;J_<2%;n(QE`GK@s zEVibm?ic_5)n8vdR^QMO6zF%`&YY(n*?;@){LqjPsWQYzu}Z3p^pWx*6_@pC>^Jn= zI-NEpB{eTE57oUe?>>kE6oW$z_4No_zFJ*nG#dT=0uU@h`FyEKu~xxa5;YI}7x=q! z>}L>e4&!S(mW7@_E9vP#J~eq-rXpoE;t1SAANZ89piMul$E1E|d&k(gX~Tx~QPGj) z>tD|Fhu|QuRMF96Fa7PM$}3eNp&<`_?|a|5@7}P`FiQ3*=x5>vlQfbxI=~Jm@JFJE z6YP_Yrnmp;a(*R&5x{T&>;G4(Il~=A76&<78%KP?V;0oYwgzstmR~~${6hu~D zDlSH~F@*1J-@a3$QO}vbD~~=4AfK2XH;tRV{PM`?=m@-%xj8uzk&$z2Utao?X5u}p zs92o(4cP{JyL&LFg&GJ)zB+@PRRC!;$~~o zGt$yigF`|9&1f)mcXeSRt@27`cTca~Zc{1|>!6ZS&SmDoo~$UH*1+V`6Z+FV{B_s{ zhss9{Ej|vLAZ9FW3<8kkQe|*(UQkdri&iGZya4h~k6{}-pb!4~Fo^JPpwLHZN*Y?9&;tS7bp4lm=s#Ed+56Imt9&BF`1r{a zzyJO3Yiet-gcF&;A2|3xNN6bDW#;rj>IP&F3=G6b$q&1TsL0hRsaaWB(NPG%M+Rz< zJszMB*av?y^8ZA|L`6kK$H&JbJ6Q7S)mS&cmzvI;zc-~1q3&+{0T4wXqobm-GP74F zC;J8ZA zqXRa(+#$))= z(eBs@@q@$;8w3uQ;UY3na3lXO{^p=&$HDOfvQAv#BZCR}L~dmrO7@XknZPkHA`Ch) zXZW7Rf91iKE9C8+o#)S<>*?)5Ckmzn1o(kxbK~#Iqt61!Cy0hr2_=_G8X6ifCzhGH z2B|QF1?;nIUtao8rGKD#nwlCu{P4qk)zMAYJNi~d2o zLEjS{9hH%hk(!!@G|fNVlg(-8Q@eCnBH7~q=hQHft88(@F%;tWF!;J7* zi4XpRI@9zo)6xgN)8XNvii!$MM_ViwEdLK<9$0$cg`z(m#rrrs^1A+UTKpL=Ci+K2 z-i9^DA0BR`Y+&&JRz%A#b;z@!MTij@fN#fXkf6p zrKS9GSxrq%Ur!JCg|@CzYv3Yh4UOw3oW{0@?aQaDlb7sk-AG9=SZ-x^w6E*rlX$ow z@`6S*O*H_AW%8CTp)ze#0M zWXVJ7-ZklKVqz)H9RimJ`unP{UAtO&rMa~gX(Tl$)}hrZ6i$17a{Ia^e1?zk?D^Zb z)E<|Z|HN{w%2rk3W4Fs=;}mQ2q*~#>R#K+IyAMwyvtExLY zJG;9(b93`z<4|s$&x6ey{%q`L{z~(tKZc z9Ai?hOax&j*}Yyq7mz-1D;F1EC@U*VOH19cV+T*>Ip6j*SNsvJ{2R1vY7F$}q!11! zPB_nk%ItXJgUh-g@uacYPXHwx0-^|;!DnvetH+CquvS%KH3IiDo>q0jU=-+oAus%?+p)+5E_j5wtVlUKj`2g`9y|(iW$Fj z2~*;$lUHYDWufAGYc@=ZqJ9qDX z`sttCabSN`bd=Ml>@NPog{1Y>A=Pq5Mmp?Kc*>A@17QxRTzswO8W8B|?nY=c^2TDk z$NWtsRtwg?KpIrMG+X*iCInEk^vW0)N@Qwva74t;(9kU?gSmM6(_yn&jE36IuFt!= zj}7#f43E^Gl0D(T290(+8r6>3EGs zi^(laH&QR)vMoFMxZqBQ9>O0)L&48g@$qXiGcfW*qecRpf&L-%r&ZO}7^S{)krQZspciL@O7rFVv{jEL947^gPxxCFfny!`@IExiNs5}&Y(u!IZcuwX7Cbkt}ZM=gr(o*tC@ zzIyd)Q*$#O_!C6cmHzXg&s6v$zTeu>VYzr# zVm8SlqZIk;rT&5JLGJO-AZ;4b$Rf>PT}>@g!0G(_khcWMaPf%cM}Igm2M0g@{EOFL ze;uI-Ny*6%KKQ_Gx7`-V>ivMi*uH7<<7xT45k49(0zqQq;?vUCJt;l3?r%2n-@=nGhF-;zG%fP_mCT zLE*v99cAESW`odMI)Av?0kvT|&+fqy`@$}yBPVTB z!iOjDUy<;2n`+xkS zAMMz_Js>cU7O%My`bN;~%vA7svvBG+=iT7CTqZ@|6B8Yqk(mj5RHafQBOA0oiZE1F zA=aT919GIqfI|nyDEXV{=4te&6Fv^+)4t?#omvxypkRl?B9~z;8T4^XMA-I-h}|kx zIB)**fj^c0pB8_(xrc|ZG&a55+jn7fv~|qXZ8WwS49zyjxJDI@DxEYI1Em_${r6sc;YCDh#Ky-x z_UL2#_wUpBvl75_rO%D1!+C87SCB6pIk@3WfN;!%{x`zsXFNe4*JpVYJ}4qnD6rON z)vCD6>}-k_mr2LR$6=2)H@9F8qvl%8s9_W(K~!p_#Smta7Nva&)TZ3ZohMG5XkodP z5v`1z9;{t0kp7u-`*r21>#;}qiwAk(yHeZrnB2;T4_j=u-Me-d6y(vE!K)u!3B-;U zQhqSeRa0{fMTbU5N7GVb3v!bEbXq%@!t2iDeI#$OYC2KBG}n|O}lk1v#`pMZ$x zsXri4VxkQCjW%}jy7A-0J5K=|}DTBR*y;BOrfWPDLc%bU2tDhmTR4?c%Vp z&+hP-_~dC-k!s}Hl1c*o<=e8=J94B7jdJI zE2>)*a(O{+@(&+9@SVH1L`Ox+)R7WZyhIu9BSnBG9#0s|+&-LmgULrE;1UV)Lxx92 zAbV+6c2-D82n;YZvCfVT^zR5}?Cb4A=MG~Y8$wmsgUM~>iSY${sq5rtGRBj?G5X`w zLig_=0y33YP8{_y86+WLio8NuNC?*%?y`SSrVsfH;qU9}>c&EioSYoE0ud?VF8GYp zT#hEu)a~#MMk5kmpfg2ySx8XOJ$K)I-*>+o8xu<@6DK|SCSMkdziw<_>>U?cKBvMT zja`T0_0iFp8ClsmYmvnp32?AX0l8MN<`~7u`Um=u-A=95AczOTw&?UnlJScdE|yZX za@zJCJAyD3L4vzD`iCXKpvSvNDsh&b5)BCcqewWHD{+XkY~$Cm_uwbkDivde?`JqtJEdM#pM;3(M@7VjFO`;OgR^4%ik4AA2-VX zRP=!s8yFhINT92$3--#|wQH$60T*W3zNUhY^WVVs1xMJRe(3b+GlyR~{NYC*qPi~X zz21AzJ&!;B*t+%Wv2cw>z@F4UKCv&z&|}GC^sy8dq{AhN*O9r1bc>yC+S14 z;{qS5+idD=Z2IfKK)KCkBAG>wD+Iz>3@9_GRQPK(F(}SScX4sPp?_h&Ow)hC=!f-x zspL{?Yb(mIpbyH+%@gS^?&krYp(lQLto>qw7H+}c{m1W+DmuVF@ZiDwzyJLoAOoPN zy4@o`R*My-Tzh(YQQ-|W+b(h|7l<+p!nq7-#IsDKr_s+7 z#K)1B{?pN)lS^#3v_~veOKS@z(7ChWTJ%1)ym5LzCIZOO8oq=BBeoYqEsVLi&RQpIn#%3ca=Ps_C6%r9^ge8S0-_^(L#(94+UL#XWFz#wE1MV~M{X50laXUE?aNgonm56dTFX2-_I z5mbBa+BKG5ITPuX;d=1Wf6n>=8VE~@ijE(9?%C(iRgVsjqGR~M!w*05$fL-eq*SS| zQ_vGbD?#+x&Q0=+l$ekRiwCO#&|MAbhv4RJYHlbiE3c}qvRSSE0Rb$lENgmG z=ubDcFVqZ_$&v0LOsiR?)vi)2!)0=0J%io`Vfd(#6M`vj56eGqUsy0VsK3M!R(AKV@s9E|xJtQbO;Jgjfpf5!oYJcu0?d-6Qs zbIgTLH_6X+`p0IoVNT+iXP!B8<`le>d-v`6#XtXZLQ>*{-gXE6$jsB**NqAAlG009 z>{;K?fXpEnMEM8!tCSihCQLKB^zZc6izh$alvn`zPdwrV{zAIs3Pn&r@amM+d3m`> zNeS@bLJ{?J^)xg#!tBGUAgk5l=a1@$zUX<0TAuG;u9F{fE3=Y)ZS5@^H*Q*2xL!T zJAbaFrB&yv*}5q+HYRk!zr~jOxFAE=k*neQAsjJ)_rFg38Bdtqgd`X&ESIe{XQ!PI zS2lc^RO+XZ$AwG60vyB0YcYb%7~H!K0yya-VOgjf#?2MuCX2&ob+F&sZ8<^T-=o@; zDGT-og`CvlLuD`hC;ING$D61153;dob-uB&v1@a(k@*T;`G|g`m-(A2Fo9fgSwB1sV;&n;0y2B` z=Iv|c_m42uQB3Aiv7@~Oe37MQC{VRe%FKG9y|AV*h5nf#eL(+l<2dS+BH@_9IJRzG zK}>9{nA^||@Cj3Ai}j3si)sGX-gy0;citHpHLPF14#U(<8#lsTKIic-S>@z}6Y&=J z-*Ed}6uO)HC+XK4_>0lH&R3V1n2?*Bo1UJIStTSg?(6TvXsF^!IU<+!Bl-Y;e}t(~ zun05gJ*|Ikgs&geUnstaA#G|}`mUWj;7kxO;Q}zf_C;iwjr@qw%KRSZog|RXjSiV% z!BKObrvrY9Upyhf_(AM9g?mK!JPAh8F}Rie_V3-7NV%2W3Ezn~M~UI;g)hp))clpo zWJSl0c64?2_xAtr$tSTSo{?_W{PohG(`_pGpNc-D%N+K`rp62BFWBrh_>|Y?to7Bx z)y0&YAjhu!6OONIUsJ(%SNmNq@NIT0{3f4#^2s0m@W-#eK8YE{?40b!9(nA+2Oo@& zkB9ed5%hzEs?Abq>9n-<>(_^ehofX1Y>58;K1{QpK7AU?(y>S$)1LU0p|UjVpFGW9 zD%2;z8Y@)#VWIINUBo>kZ{hT(Lt-1~yD%_V=5W}!q|xh>qnkFB5`8y1^$*7#$NDfPO@lVAlWA@eTS%yntPY zbi%lr-@U@&Lsx55ii8MRVzkv@cJvNOEEZDU&i5x`fucS=CTsDqNiUVgu1nwgk9UV< zCrj0c6cLCdlG;muCONm1ALOkb9xApWT<58m~|W zOH_$cRkV*3OWC;ed3<~X_Mzj3A0sg_aYNyT7DrmHA+;TS}@j zFJFT6(-Uy!3m^Amd>0xXdbz9|1&W4-2K{t?>(>`z_{?6z4e&imAK-`7mtP(G>c!_@ zY-ngmOh|a(;K2iTd@D2<*+K+X+@k-*C3F>iy7JHC^1op6LvP35#`XQ!E3*&wJ1J8^ zmM4Cp`$%NxPal9m6>%g_Pg$L^dCTU+#6);9vGj0Ya0pHtq%J`v1BG11%hJ%u2-=K2 zb^+QKrw?4)#TUq}oQ7y+D%pqVD^3aayNBs>oqQr%`M30Nf$&c5@l#?9w?G@wRHPe( zE5)vnPKi+XZ(PXP}jFHg@}-+me%$Xq+p|i7;{sB&8kW{muEiQt88*s2k+}7W6^a*wx*GrHdn@!{Om! zIk|b^VJstoll(#}_0nII!71d^Vzo9mH@))mE6+armx_vtfWQFc&wc!{$M3o4u84?8 zA&D{9J6u04r2e7oeA0jb|IEy+oSd~0;gq!ic?OVSpuD^s%UHU*d(0M#j!H}W0#()w znbhE=1p!>K`pxcuU0y$=FGnt4-cr!N@UBTJm20&zfq`pPsxX}6y(AmFvETVcv!PE= zQ1IyJNJ&WvW}e}t-Lhp%L_`E{YD-+dAxrN^AAR_@zx@qD4u|;DPd|Of9d{ruMi3P@ z>1WfpslL9h^2!xt1BVxqQHH3D5N3nX5EC7Zx+o-{Tq(_-{!adKnmgg+VA1K1_r+_D z8b%Py4r<%1cDVvkYBGix$Cn?9=8f7_Dg7$hfIlNOh`CLR-5EV7u1J=ZblE(QCC zP1G{;f|@M}gHyi=-$jyQPrWQDe!2wrvxd%pp49)c3s*3F%)&8N3t|H)?;|LZvv=&QmC zpR9~kk9~j7kDk~c8yziIgiBOO5=8_{d_jaI!Nfm7KACD`A53y_#Ocot1o`AvrXaqI zHw?xU2mNDt7)r!1zQZ@JfJLP{~^ym1)m5hKKR4wc6?SW@MBO_x~ zV!T|+(zPw*_>Qo_HVgSNnN7%k`Nu#0@%;I-fk8pvy7P{M2M;DBBuEkM;|}>Gbe6UJ zEGhh1V_&^G8F5H4G12fK8x2M**h1uTad9z9H;s>*kR=eqF=Sq*@Fz}s&(j~#%EiSO zSZ?Li9pqLjR)G!!2f zw|n<(jG+Q!X3pQK;Is4K!+hmu1;dAFKQ?B7yP>YG7PDUY1qDfoiHr-gXkROsK6tfh zc%Riu1T%7+83BmF6JL3+v6A$g&2Aj%FSc4uN5gz^9D-S(M(I>&kh< zCq{{kaiji()dFwebI&~wZH-la-}~P89)0Z5NSZ96@#?hwuZY$3@;^K>Qe9mIx1+^s z;rJ6Dz!Ha#&1T2EeRNC=Ei)wA&xrm&4ngRMYP29fqSc0b*rW+z;zs%~nqP;{?BD}W z)OknP3sT)(t*&ZnY{WnX%@gG}<-!_**}(_RluA`Js()l3;f)kU5){H+)1ZAA0c+8VI75^H^?WdMmH|P}5yB{$h@*wY{At zO^5VhVF88tX(7nxD>iPZUZz;C8y_(RKtC}3HmU!m@g3LyOg~UBz)sNt^Hwu}-!%B> z&suvdrM33HA*2zxjy~w#>=H?(!BlNBqq|#Qkdm4bBW9`c(toD%W3$>?+InAo>-h73 zJ5o{EfXUqr1u0KI_O0*UyCXazO0J5Ns1tl-@S(Wb{^1RTea=Wf!vI61!kRT1m_m+? zjmM2}Hud!NVkIJSV!-P(ZZe~Q3PyHV700l}C5xsX7E(XcVo2kdspyEqJSGVWLwaRd za438A>+}!Kam#9U_LbBAjERe_uWvv_wV|P5g+iW}m+u$gPv(?B=J~=G`NdQqNroHn zNAZ%{+G~IQ^Rrl4D^tjK?AZCl6Hnyk=JTb8D{p+qXgEjydV>B;;;zGIdj2A(Wk_gf zR%T{48hczUtanuN8|d%5R$E(f8I8RK!!)G%MYsq$VrS&CNAbrz*2UuD($aD)hK3X| zx3U}LbB^>uv@#!yQZo_A>!h-?J<^YCqXx>a=R;WjNhSyVAnfVb*_OHCL8s_Wi`jIg z5+(bJ;8qrMEA!v@=X~Kaj6I0|3Wnd-)_&^iud%9HrBQ$PzV9j&NE3q&m2AkAL*PS(r4$+(nt)_73RJhB5q)5IVI53QcTYn@V_ic%yww8(L&)}nUIqmKmsI~U zHfF3so{Dql8tUtjvtnRy05QclK;o2;;9&R#=4Suk9kpt0d|Yf!ZVs}mL-yce$1*xJ z_Htxbuc{gu8O9KZ2%=KL7$xEJSpSQDy|c6H_=%#HmNumDD=geV(aK^!PqH-c_BA*A zaOU#qh0nM|ymHwVLI1;hf+QH^R^EAAK|#KNj8}e`npi~p*KjVkV_YLE6g=E&0`+Q@LVTrb+Z~A5~$`O!;jc?P-}kS2C@dTLmR% z`zV-I_+gMRzr8E1sjaoMD=s=@_H@KP+RHP8pF#5vfvGdHi$D4D*q=W-R8UmmP%!>w)A%G(fNNcEp5YhQ3w^z-w@vdre~BQWW2M`_+405apVJ4KHg(#sfA!1dE0#0HZvdZPr#D_;lFX;^^t+ z;Tap?ztG!fj=jC7RD+*yUmgqpH1@3ZarNre+`L>A0-7Yocx&qF>TBy*aRoiErMVf) zKDXG~+VO*Lqy6f{-?oDt9=AQcJun({KqzP@QQd&S@G*s*ud-rBm_ z>C>kE{`dcJ!TfnF6|G)4#PXr5vx5p%RaHp@a6?&CZ2^@C5Bj)CajaLP&DoYF;^*pD zZ%Zbv4o=9b6`DWJi*~je$1?F zC!BM8Ye#!W8%rIrZ)Z_hZ2QbdY9oxvy`rL%Cr_4@mPincd2^kdm?JNg99{fBR{gb5 zVc_(gD1XT5D`w>nKY$hK4-;E?$jev6Rg5{op9&XR-fGFC_YdTMMC*m~=NX1%$$+`D zC&k7PE`Y%*#4OffvHB~4i_GSlx+qp>DM@yw)tG>=5L8_vkKDD;*SM^2$_bKE-G64v z@2+X=Jd@s)QAlJcg;<3IXD5cinU(`C2zgM`*>$bCt){!z!O?!{;$$BmVpUDxUsQ26 zwKMiV;vZCix`vjt%Nd`1e(dX=r>d$O!oqwvteN|(ch)XjG|Sa9)Yc))+9AZ+#!(8A zO|f%7{?vtY!;<(p{lqYls!}ZZA6dUF#aa@&eCUf}iK>t^B{?oO#@E{iHHl`or1T#4 zCY+ZsF4H>WDuOd3W9mk&8#C}*5GFNURrkT;r>DKG^X~2L{H)%t4!o7^5-h9s>6aL^ z(-hG7d@}sIxw+;S6yCmbmq?Pfb`IWNo^36yc#`5i!t^`To@O*TwN6MoY7klx|DrLW zJ#}{Xpk<-c!+LzVZ2jROJ+%A-RvQ}{jvV>n(@#Fh&dz3y!C$=g+H=os^7Rwf7J1#! z;a`06+jq zL_t(rMgffxD&SQt-|tzHP+wI?m9(%zzdUC7(hsNVa%z+^#N}H`6_5mwiSiW{O#J^0 zeu9}w9Tbw0ky+o+n0YrdE;g_e?E2=L9r*c@an{UPufOry`t|FhBBKmnPTi`) z#$%E{ncPRHrstk}4rfM|o;Z2x^vP2v2-S4__;K2&)2B}_T9~?Q`HD%CCb8%rL;fPw z#;1I^xmuBV1i$?Cm`yaDu7|vj6dBB4ohyMRAOZidwdG z8M9|_Oa11X?HL&v*z*`)W`vnBW~v@3R{o`n?!?Z~NhMfo%{XN-76%;8ot?QUUbi;* zM#$oab~u@HM*o6w07xqvvH9)6r%U1$$H3kpzV(0SCnY0RuL^yTa8 z6BZJ#n6UplezyE>t6t304B=;G<)8}57o$=)H)rSM;7CHu!SIN19mHb@;g`yB-!>rp zFkEo2sJOParl+e*h|!A+nr^Imt12oB3yQ)*!=UjX+b?h!84*F~n^`laUr$dz#dh*! zUS95r<0o(3ymjX6xzzddQx~PO?1qRuW!J`z%#>@+&^>$6M+rrOO3INx)g5BRSGq*# zs7hxQGc=jG#9~K~Pafe?Hx%SPox9HBl43TB6|UjmTykru_~*&+4+AJJ1|E~0B&E2T zgs_gfZ`ASr1RfB5C(0js`rgMsitI{q^{0(Wn*=pzXP!>b*T9sCkRiekOG-pWN4dJW zwzPKSz`sJ>kNF4gtFEa(b~62|?I+G$yxY*+8WSC~<+%l$pIbB~X_BK` zsI^^)l|9Vd-+VE)NykPB|QKIjCa@pWF zgYksn^k$}{`djjtH~Sy;U6XBLF(YXd!k4U zXTD{yYSaOy>sWc+rR!MD<_-qWwYnafBT(xR;*kZ$iOc~JYzGZ(HNEw zXf;gT3JVFHHhp@^yp$sc4-pZCY4RsdoWS06?!v{jYuBVMNTs{z;ii2&<=aeV90K_~ z7U+xmhNaQbDX^!fUED>j2>^mCrGy1gwa=)6axjvbz~C130BR9;_;Q6kuj@+EQ zg2E!6R$3yZ^GZBVY_XrJojuAaDfChdi=@z0QCP+BERhT3$I5FcrmP%-O_pbYu2t^@9*blX+sqXh7vz~CgE9PVq$nT4vDBi)>d{Hm2m(`OiX0;IkAfm4FBC7 zoy3v2S5m@oJ5TT!HVZT)9B9Em>>UsopyvGzCH$Hv?%zMUe2liN(TDGf7%-K#BVu1w zF+2!}v4i?2I+I!D9=H7d^-I?IiHi>j3!R>vJahVtUAwL+G=W=E?&->pOWC==JG7y=ZX0TSG|(5+9OA=ezyI@rK_26>GY(i zSGO#AZsYvOs91aFFdO?ID_d7(x4Vx)N4S1TO*d-02E#n-*FIv)3=IoKPfJReJa_J# zqeqXOJ$EiIH}}f5D|a(9E}p-*a@ES^%a_N+#o_0OaTCTco~D8gpnT)S1{%h2`|Idv z6Byj<;AGv_++9`C-Oy;`>SiIHk{O&07JdwMl~tA1HPvFV>**~iDXpleR14oJ9S7Vp zr;zE8L=+TFTl_{ypt-Xt#oiGO+}_R>R}ppF!3E771s=kXV2Ae3Br=u2^sE$nE;&j$ zc#ZHUz9XW;Q>^IsqSkZJM^t(Tykf*UZEXX5%--Aa^*3kEoIzhpouB&J>u)3^CIX2d z0@5pxHHwA`KL)q<Vfz+LIo z$x}XlEZMEi%BbvOF6I>KqnJbDAL-}ZMWAS1Ua9kvr2SP-h=wn^JZwaPO8;jDZ9`Kd zA$Ry9DOcJgV>1(jtzQGjk6~8U516mls0LghGm272?kl-xf~$^Z26duJkZjZodDi?i zOZg&trOvQ{7ulO<>WM*@F9n+=4hQ_>xO@+H&*|E0g2Y^dzp*W-FIZ zxx;nV;pyp?y8>3PwJ4MJqNL&zA!@49E=7aoM2yFxUn)zq=$jatMVU1`p&hYOtAKli z-4llia*7+YlZ%7B1OeeLzGi7@X=l!yrrBJ)WcijCx5UTA@%-@NhwhwOf+i6yy0oOM zrKOoGEL#^A78)NPhkE_M_WgnQXEeUPzM-w94PA&>A!?oyj4Cw5d6|G7jIrx*a*A+* z&B4>x;F!m3zi>4N`6{3Z`Uy2k3@OmJw?_isLpWuYG0T>tslcdfj|;y<5AW%PI|2d% zBf=wzz*tjLjls8sRs4!s$4`|n_>do7Gpe!+SaesE83>@bg;v$eumsoTM6$5~86y?) zENkZAktqJ)*1hUMDGeS*F_k43Ia5FLAa_R#{|bv5nqkpDC(2i}9#Z<6{6jZLl0v;9 zE#G8LUGzlxnupE3pxR99l!1R_RaiuXudi`lh3M5xgmOml0QOUMPa0kk}n8ykuRLdPv;}`Y?R;I*3nbd(A&}~E6;j)+9pLf zES~N#ce0JU6R5TEa<%dI>^ObX=}!KnnkIicn|obdgmkE@S?2EQq6jvD{|E3-TWd#V z_Pv8guI$`EFK?lJY4Knm{KyE7*ZxHaL!;uHy$H ze|&^8NuwdMq3+{mVk0U&24g!1RC=t+O0joD{1kN)rIXiw(?Wu9C7V^c)g z+kfyN-H<6$roQ(2>kAg7GWStaO3R0##SdkwV&x4J<*V909Q6yX5mzBX$g+%zUqC=< zc^PpOD~T;zRSgG%d1-s~M$Y^7bJ}0@bM5FZ1<494J)*daPZf!`|jI_m{6eT6UCt zpR<$3gi$7UpRoMlhJPHFkGEZPOe_v}&CM-2Iob5~m04L@AI+!2ACIE%IL41K$x|nB@e2(J z-m+yY!2zZvPj_>3Q5aK5vpi*RvObvNOXnMV^2gQHZQAtY$jESJ(4cyrJaO{e*>lXP zDJd(ta^=d*nKKtJT9mqQA*w1GjIN=>&7b3@e4-p2J$`)qSKCjYK2=^;PIcS7c{9_L zTwUGKFo~ZmYNv!ymbkRI�(YoJq)9wIhVBZ1_9NL1JMM$Cg`Iq-DeC%);MTo(bdD z-c~2KJ1MhM8hz=Jo|T!Ilao_gRu0=SPm>{~@W@Cv7a7*28=`ABtN~MqyNlu<*a$|UcLPYm zQf%0d;UbfNU^MuPz38WMTf7n(-{1mDD2p-TKv7;^Hm2~e@vYE4*5$M24aK?|RGn08 zET8erz;D)HRmBA>57GZ8=sRNgq1p!q2JnC9j!kuSV|hhgM@P39t+Wx??0<<27C9%v z?q}t*vO|+aG7%I=ddF&$qND)fbrQ<({EU=ug-8wZv55`i!|kWX+0RX|j|#GOc9f=q zF+Oh($3@9x=s52e?R+z$t)sZQJ}0* zIdtS&Zho1Yo71{gvtD^|amw6jz5#L8j=@%TURKt|N)m%?e>Kmt*Nm)>W|=|~GyR0^ z`%lYfo?2Y|q~PF?>CWZFv;=_oUOn;A%Kz)aab9t4S z9uWSCF`IVr;@4koKk~zo!lD8c)D>zA3RM}; z@U>km!zucIH+fiSvy1zp--})^*NJM2{@>X_k3g;}fheRv7>KTADq5n{I+}#&1UbKAKQdd_OB?lCm1sxjIPYHd6gj$YS4$l_+a6(&a zOF===?YnoVYyBKj8)~`I&$$jN6$6QR zRf@Jh*3IF9f83T2@e<EYu~EE-{9;UOWRENn%5DCR^nh^@`a1FK)-mOuOBAEl$V zy84HsM?d)RL)N7s4#uQO30q&@`s&MDBco#oH$di}kw2E}7R9BH!XrT6$C96nl>7Sn zd9Y$#Y)s1Bl%q$F9zJ|H{bqVjPA6+5R9;?j@Zf=uKld zt|+EmXtb<~*N%=WN-Kqk@mlQEl!o^NsxJyIUUj4_N+AmCFPuw2a}F&zM<> z(dq8tE+AO-N_=Rv9)`xl!4~?O60piS~?#g6fxv$|W2AgW{wt zxRr3wm@RNK6rEFUiP>4QiF}h>HZU@aRTt#vS5{T1JL)m@RYD#m2Ms#u+nQ?XRp#}l zKz=HC)oucQ_+UW#xyF=ml;juI>f0XJJ{k;SWi7Kd91yj5%F1ioJ3C#h9BH+bG$4i!6&(tLSJ|-{K`j(TwR~36KyL8}!v{!y%ruNo@r(=} za8#LvStN_>pONxyaXp+JZ|&zUb67(CY`xukv7Pn9kF~3dLsFD&uy15^a9mIKm6Pc; zb&a>~6wXUYAhs*=c>@0y{z0uFNXw4X| z&}X9qUuctHRQYKsZ^&2-XUAnY- z?Ye~v=0`+DxwyEgxl#Iib^Vf>s8Vv2@0AOE+XLmZCDSP42T5b=>22-f3&=fnwLLX8 zvZket!{FgZEw8JqJ$LTxr=Nbt5-BWi&SHt{*KOFg?e)o1rZ_v|djX=vms2)bj{>!w zx`!4on!QryMX4r(-0JS?APySF=k|_fV$#dHer+iBqR%r|QIyo~Om&+<{|?^aDED38E|K9UV;8v+iw?{)Gx!Mi+pm0ES$=0&p-gLd&O- zz6R8aoX-^eun=qk*A*5P-n@0|a@xf!*RHb~Im^8h0GV)w@$r-BIN$~}XU^Q<;9&fO zaPh!E~iKmL?S)p7zwJ&_<_2>HnhEi>PDjA+52RHpBzgRzwqoh3;nDg`;!{ zqbMK53lca)!2m?1B8aLX{GqG7Fp2ro*T_gh>yJhz;VR<;^_9Noe^fs2;ZHrxLxR4c zEnnasPWZ=n`H|64IPT?SXXCP;o0~^~SIq+e`7A6=lRxOnfLy z9%2zqBP!p913!4I`uO;|dw7I}h0U2W=j4eKr%#{8xXi#qc}WS*jtf##mn>Q`W7c$x z%LGptjC>vr_(!sRc{u#&f0>yXdv@>H`Q3N;h{7TZ<}Y~Vm8~zl@Iqif5Y|r~|LLaS zS1p{b|7!9u?UriWQCC&OTl5PnSuIUXs1v7T(-4i$YN)TMu*y*aHPY~FmV}s+MeS_w z5I+gdFh9$IKf_r97wL}1`o`S+9K2cz3k$yf>Pzf}n>KEWh>So@Q2-CL{U!5bw~uHu z=sM^yW@DgHWI1~zeVI!b9262965QO}jDoH!Bu`;eW-10NRcfY1EfDa`-N4H?bqM|N zpyV?!_Q9-f}@ag!z`#uM}=DQPnM;E)h^H+RL5qI>H0S4aT2$;o{i z*OW$u51~qk;wf+mTGXx&Kk}U52ad!^UkyZw-I;$jd3dz(F91yFZ;Gvi7;1ZD{pzEy zCcB(Jp?=N_A0Pk1Kf;+4{4+ZEhiDI$KiIGkuf+CmXlyGft8Q&+_x5ywzVyNnYob!h zR0SKFE9v8ju~-+yxnc2B5>DtV4=|jiSMn1fq-BeGKnkP)Eq~SRg8HLS_t1 zW7pX;7w**8HO9w;zOZTD=I578O`789647fPC^ltbIyPy)MpnM*m%`QZddtoLN9u;O zyHW$y%}2^ljKv-v9&WB~LBYXzE}uEWdc7wvU%FCUa&P~EgXwrK&!4|^=~5;sVvu6Q z{c+15llZZ*a&xos^<$DhfeTswxVNLz+8*y8p{4oL$bAg@qBj>675(tTu^l_Uxp473 z4x3Y_PI=+^&0Dv=6hCPaE1SpweE;%=fcKRz7leW;)|t|;3NG${k%yNW>c5(Iq;&sPp3fj7Be08}Tb)9;0$EQTA%?tF5`Eo-gF0 zvmqfNR9-v+lSH9Uij0i(@N~yFMP!KK7y=rw4XgH7^Qaog{Rw}{1M&<@(pV&p=2~;F zn{8Om)zuZ7HIy)vKgHVj@xPRCAOD+0iu4*P`NkWhQ)(7xzQP38axMv_h^R_x_NC;i zl6Z2|7o`r%(`H?k^!??F@+tS(kszPSAemHA^5CG#*9Gdm0%fB7$Dpsbr`Ocv%s z;(LePYV(UPNQ(&y2Tb1y{0jztp8p?-ALcd?**zvUhLFlE?wOOD)6(2bsAX|GQ{@h_ z{HMKs!HGF}xgUM>(RVw)%gN5NwRc#(YSmkBy}fYJLW1S%@!rAUf6U^Cx$rn25rHdV z(xk;pmYz9t`q1ISmoKGVxq3A}KmX!|^K(eOCnOVEO-Ff)v z5!M%OYH4n4YJ5%)cAs@)=df&);Y2)MOk&atiX$viWLkn$b~_Q>RU1qPD3s z4G8}xZZ)aoOmX{==?_F52@MN(b9W~o8mrerCU-YCKR;hjFK=d^neQ_R`l$91iV{9A zGc)tb<;%DuWn^R)CuDRbm#rb#M3H6PPFD|>@| zbz;Qr4=|3qyW7;{sgV)k^HSztOuNX^DW}hzp~qKRQhMd`r5Q74tyr;Q&6?FrT~*Lp z;59zMaxRGxhhL%ZG4OBe>|*N|&}r*n-O<)nUESN!ZsUskxol4cKhyiL=0*n2{q;9itymEn9!>x^UHCxC7yZ+sU*Sbz@K0X}mZBul$5}8XIy-wViOpGN z6N(^J8|N6KS>Qs}1IJ}q>G8^QnIyi;#rI0~@87?D`*u76Z z-P1+iu~xqxmp=y%KO+c)C%u$*>H4*+x9;36$jd7&Eo0$#rk#5G_z<0P_N>{-$y11U z6BZVVLl{^4DpD1zR)JR|GLl=Bsxk~!`NIwWcrKqv zjSCkn{P2Shn61o8Xb48-_QWSE(wT>c(sw-LM|jlWeZ{<%>M?Zqp=P+bx+cU=3JeOm zcI_IT;{;R<4i2)G5g_9=&n*5i$mM3|{g40g-@o7ceQ9|)0b4e#U;qC5@6VY%%UR-) zjdT3KZp2*;3=Z-Q@Sl>Dv~WS{{(}b&96XSdl}#g;nVFS#;llFeD>iQ0FfDnSi<_I6 zJPq0Utk+-sWKW$w{V#v~)2UOZ>*{O${rq2g`DN5N(8vObW?MDv{DS~Nf$ddxXiXV& zZ;BOluBoLg&uA3Vg-2hFj)@5h2w)MA{Rj4C-p%;;zx<`8we|hK`ZcjTWWtolreTL) z1NOM`hcCdu5fc;b>F&-~)YjFYDtUT)Go;TV>G&*bsXBJxC+Lu$uOEY~V(OQvXLzQ8 zV^RMGDF1m5uat_)@*CIF83DR>^-2bkysEl`KqywdEGRy8%G8AmQ&Z;6o02>=JS5c3 z-HoLh%@G37Ebjp!!&HA^6w1e~nev6E!Z`9eNpnRsS>w&>Iy2!`*gOy)-EpA0RePidOKRWYbveUSi7Q+ zfI>t48vuQgLhY?>*RS9B^s`U)?>kUjTtu{i4VyOp=KbHyPf2knh;yH+W-!QOl|OL) z;YB73vih-l*M0EoOT1k3r;Iy^$dn7cQPHts;bHhGfBf-BMTG@BcYTKo^MClOp1Jc= zSlLg?l81&D{)zHIv)W9uaq^)0Mbk!b!uqtj7PXCFVbT?!%#lOvkeM!3XQHOt! z{5cljM;=8+Mn^?NUcYvYNfsG*GYHV*>?~FFk@agVz%MehUu798{vrO<`Sa)h^rt@^ zWc}R6W}>ycwDqNT-+dPoDyvPJA1*k0i2O0LDfq^w{CO1oe4V|Gt$%?3;-yOxk|r-$ zu;9S{1E)@(%FD}Roj-246B4?q0y z^5x6SM`L!<>#x1>)?05zMn#HyyAqNnV~i#K(Np*YG9n?^GHY_q+_@~_haGnJu04hM z1^@QvKQ}ct{rXqGN=Qu9-Wg+7KA?Xy1uP^ql+iLme_)It%7hVhWUS(!1)VV@oBE%@ z{*UB;g6vgRRuOCE>eXuu_T0RcPOyvSre?~)b{rQUKV{04*%CW>7771=06LcaIq;F? z4~cveE0Lk@i4asSHHy!K7UNugN_A3JGEiW!o*WDfc4Y9+i!CoyKnzrW)?7H&;Me>k zNS)vxq2#dWKbrK9#h(mehJ}av`uTNrTUD0VR8_HftgPAx|4_*d{wJ;ZU)wtr{9+{5 zf`LqQ*2GLB*_3RMU>CZdtm3z0sOFsMyxPF5`garMORZJ|cQ!aMT8D)A#Y6<1vA^X?3?2|cAY7{SMBNUylhGGo3E~1l$zq@7ia4fW@YOlHWJV{ zuH`dz%G%bBcr~~u$Hc^^%$;-a;GrLWICAsmExLZpL`=Jswr2I3wQJVQm^s7O*B5+@ zHTiF8%pM~D33*}X7hvV$YSmENTUyfH*kBtJWHf`1Ltm!#)z#LWK7H!5&ptnP^cX%0 zETp_~!^XGYdTaKa+068kdN)SfcbN{NWhfF81vox7{_S_(qWAjIhaa(M^ZtGN2%+)I zmR~MRO(o_bc_jOI=l}k-`yu>8HjBzM!u(%fSD%@km99dcLCfe zSpYIl&FktYu$s&+7bI6xO}E3 zv=-JkX4iIBw=iSZ*4fS})YCoQ$HCjlTKbsg_N3(x3_ni}|KQ7yh=_=eiN10DMs-cq zrOTH$Z49wgW9ePpt$+RcwUw(@N_gdG7XMbg z_4SSW_I>~12OnZTC1h1>TYSoib(liWNtW z96ovCWIGwc&MEU*j!|1T9v%~Be zv3vHPudHr3e=(!0hZwW6zMmq)vxt9|G`n~?^MlV09X@)!vbsJb$oskV^IqAqbo%s} z?%r`W4gtM3Y5{6tJ7K*3o8nI{$WgBMyF0@5OA%Sizy9_OKzb7U0~Lr6SPN4ZF@1jd zvSmk)9oxTuA5pVzT)$paP{68mOBOF)zhT3)Y17@@WNK#LclV_PA7d0hOvUo{wf6Pz zEidk=DC=!%d>{oM4nM1xRFsvo&fynde4%_qTEWK4FTecUrcJSNafVG+gBi=9pf&P;xC(d6mfBLi;lj7q;!@}s15j{`ZL_;iT z(PXKMLm(d>g&*DI$oof~|HZ5y(cC*#@pN5(TSloJhw5+ zuzC~ofz>>>pQZ0;!Vl(5rn8VJUyo+PiNxX&Ghs;ckh;!mobx(^+3ly z{|q_)2})H{U4s$ra74Uw?n`_3O7iYxrRbma~(yghvPt zo;7RMqD70o-TCdMiNnKqX%eL6q+qk=VFwb$}!iCG0FH1~F3$NKgEXL{4Zn1t=!GaNk|7iL zHlTVos4A-n~{AlGpi&iG5p!Y4|B$w8e5N@xbepi_g%h{ z!-^N-q5dzwxaifFR!mBm?&KD2o?&3<>cr@kGu~bQs|h*kF~F_ZD4TE zooiOr6;@3REHT2eB=>I*gP*8kIL&0elZLma2t+gWx6>ihcoSkYzc+a87=)U?-KEp08T>**lyx`5A0pFQPg>a(WMuAMt?-b@b-4U372X2N(#a0p(szJ9(Q9$qd^F3v7a z_Dp2fJ!D1o5#XPP!*5|p#a{-8j@0aT~toQNuGD2uQh4dXN{P5{) zv}$f{ZgH_OfdK)@$;tREA36HN%^No`E+6^fNM=?RS5~iC&BXiAun-9)Ote@fe-#+I z4B@JAQ-6EAyQ^#K@bCEGgAa}$Kh6kqSXlVFwQFB{?R6%~xwtU7lI>}g4~*?aL`A*z z_M6O}qt`(NIk^8I%TE9Dm%m!LDAmiG<$z@T>4EL<7?E#7%l{?^_mOnC%V*hToWv_C zD)aL5($jCU6y%*dw{dM~YHnl**2~Lha$?w|gm@P3m^EWYY;3HbufMp`^abJ@W&ME| zf7pzqzar)z<+v;rf>SwDz)kSa(<&bfN{*C#yN`bqH%;)5)TEKZKjc<5_W|{{y|d%q zz2b_B^6t*=)|R$|KcwBx$O{kkiwg6Phztq~VT}eaUvGCWZ#Nfb2Nx$6i?X*>>&`0p zdqmw-{WWE6)&^#1OM+%Z90H}AB;=QT_$`Ygk>}!AGRDycQ4TPro>pb|u5w)@E8#B0;ul;L_NKpL$v+WD@32lMyHsNcSI=o`V@_pa$zk2m*VR6y9^XE`G z(#~I4xq3}X%G}7vNTO$mvxwfzA|GDHF6e!~@-5nj6wWr(Ce*S)5p57i_?sz|F3XfO( z2%~B~H;(3s<$8bKS2ur-{~t+TCJY7m`^Ut_y1TiTm6qPTb#u<#IVcdySzLB(VEc*7 z*U-rq=}mvi(7`_><+rppU%Pt!tL8#mvLPJBu z$ORi~!1TVKd^T}w!fhT$jQNJ}55!4= z$qc4^LB?pye*{2OWYjzFyn{+j%xJ>+GG(%@y}h})Y1QgAK0e-nI9};Hy7*_H3xDM7 z>}*1KN>Bdl&l(E_!S5O z4km6O5gk+*MZu?1a%TL-r+gSA_&0KTt$j2M}ogE$5uU`9R z$2Z^a-Ct8z!-VU`#+LM3`L{EQT%8>Wh2ie$9O&!iAK=M8B*Z5oJU|ZvpubXjlsu6Lkb zF5lV3VbT1_hkm%+(AfIJiR&+KS?uBI%+ybob;9V3O0UL(6?(=gemXk4a`H-c?@!yg z`^>Goh4!|#3sMqaeR=tcrHex%C)+y(TiLqeBQYVLrDn;`%F)gtIyyQqAczQBX&2M* zkYIJ0qT=Fx2M*l0d2{CMnah?eTd*)SCNkPZj9jJ$Z#=Dv&JUSnB zm6fdIqdm1irYpDw zP6J*Iv}77``0ry@^#+=J%lotq)qJbEtwfCprg6OQVBS+1bxD@;qy*(7V-z(kF8GS73^5PXKcZ*G5<*X{}lf2p6=?Zs{IG{fArDE zS1w;|X=!8>6yu$}oqbtFc{N6(7280>64cyHSu2aDX3maL%0g`1l2>sXrV& zdi2QQTet7rzI~hal9BMmOO~L%OrJj8$In-MlZ3)1ymA}~`kL<>YW(!}wzjoqW@h2r zzI*p>gcUxS^XATb@4a^krp$1d4Eqbum@?*R<{xTqa8U4zFK%Jj{9pd{&&-iLb^0{Q zP-}bphV|?H{QRV9KYRQ?9Q5t!?dj_1tZ!%_nDwojx6htEb@|HG^73+)^1%JdLCspF zy0LJ_g8B1l4gGw5St`@P$+2%LkIC_4rhW;Y_^BGePWcszz|vO)T)8#DKY{^;B=caL zOyI{vj1uC)Km425%)|u$j0XQ;h#@-Xg|v&GeDpD7N; zwXUuy{dV3T|7~AjfVZQAoug><1j*pOHA=iv>8;S!F*g&Q1fAZVF=VuO?#n6H(dtq5 z)kU&lk7kUJAG$pF#=@`WkBZVR3n{YKNu}tiB++2S#F7WnGv~%>cvcb`T?|7Q^PtEjw`t%U!w~)=%%_S*ua#(0s%G|kU z&z)s%K8qd|78aJ4mR`Gb_4Mg88#b(;KW|=eNQfA`gyK@K6fF8^oa%#lPgPizs}J5` zfM1H#Z{Y~D`Ulv0`Sg^vbltht+t_U7=__~53?|Gbj07d4kwCDSMpMLVmt=qS| zySgSNOnPa{md%?t$HvFGI2mik$b-iAwDJ#C)7Qsm`SNA%ZpKtEMB;1N^&v{p@+M>Hfovp*WapHcdX!FRil3PRhUDA_Ve{? znD_^?vP@0V{Rag@9|&@40%q{DA@$8X#!(*(ezH7aX1cF@OPx@{Ph_A$6J1{hUA~lP zZjTGUt%HpfdXsgRG;JDCDN2f=C8yCg@npQ-sW~t($k*S`+uO?>e=RpR3_6<7ic8E-H;(!+ zApRM7{AjQZJ{S@HMCog4Wc8>Z`q-BYyZeO(-KZJqTrgR>o*$ zpq5kVREXNk%W;$@2br0|CaSItimn{wc@p|eWi!NzQ6&dTUu??o89{+R`{Il9=g+pb zwk0MeZrQTsrL9|;hhpy_3(gqZ1pip1$$j$E2FhYs#J@WxCI)4c6_d}LJ&nEf=FOY= z1$hMUTCrjUAzz8c>+kO;F)l+&{r=?+2K6LP4Sy{QK zxA)@33*UHS8%v#l3K&;vu}F}y2)`*|OxQF*ABumPBs89N>o-u*|MJ1VpFe-$;>C-t zZOj*Je*XFA8CqALJj(6M$ji?mq;FSuC!WZ~MMXI|IX7?JLi=RTLga02EeP0vfPko| zsD#ACnbT)XpD`^eDjHt~M6PlLw$O2G;vcf0*GNrJu7n&1Dxc*+wFzY(%AaOE)2Nsz zU+^)WwdIv{W#x6)m>Zkg3h!0t6;#}~o$q`KUuHWW zZ;#Lr-GJ6BsDtD{E942eOP2%F zw)B5Fd3^dZhS1Q^dg*HB_MK-A9lcUfRT~)Kvu4GtZNFGMYxaB>k7#Q<0?1;B(AF|j zY-onDNE3a^Ubw`}V;uEiJhw0OtTw0Qzeq-s< zrAwABoiTlSNN5jXnI>1czA%g;t_hrd z;LxGFSs5RE_(4-s<14ScGASW}{`<4Z|3lS3#W}CBvA(plob~r`wYqZUDs~l4TU(l` zV&1;KAQ=zkY01g6XU~b76p#H1`w3D|wQPz@$FTgN{WYbi2uZ09qa;5?nk$+q7-XmF zrUikj%{ObPT`mk z&tJT_efw8O4j(BhE+W_k@$Y}}>Z_>>7b$y_4GyzONlDBUK=EW@BIXMasjUp_a%pLC zF)@xx%H+T7Udg?CB_+3R-eT4P_!C znxB#&40))q82BfU5HTnTS$#!hqPQ@~eHk#;#$RPZ7Uu`d)1rimpR?$hoRLFaK+vMa zVtQ7VV{}@vM~jw=X;-{gM9am00zKExMizh(%eLgvhHK?i?MPa*VNq(9Alck z7ASx60hT*M13w%9PO*F~Uc8uf1{S0)ICJ*Q$rGmt0(-0RK6RQ2bSsuGn>}l` zt1K-oeTHF||K`UHt$brb34v~ZIP$}{J9nHrcOL(&$jFGzn_t|zW$TowQ(awgY7m<; zn+41IwBO!x#{_Xq$_ERS8gi&ie`EF9)lksW>*GTQ4yWI^`LBQeGtT~Rzx8%dNU%r( zc}7V4^wM|a;cshi%9Sp;1v${sI0hHGup?=xSUGb;dORXg*>u{S@&w?5i2($(V*;5PbipzlduS z@ZXOZ<7~L_)5kx?8z%5SqWCvoCfLWdjrRT9ojbqZyZ833+xP{~pOf&?a|@R*n-&=! zfQ^!g7xA$non2joTCS~c!E?E?vc96Sro5u=URlk(lIoJOn$psmipqxa%KEI_(z6%t z;8^PA?ds>{?(gpv`iE9ESQK2X&QOY2Er zQ0h95ikX|IM8kKmMt|2nDq_)=V!3ET61bV^di-=ce#&Rl?$p*a$3z8f*}Qnm^Q)7l zq&T{VTHCr4_(HRR5*(J6NIqN`MR-YZ7e|dGmH5d{@~Lgy${)rEyu3VT&YVf4*Od7w zD7wdfIClBUm0P!N78ey=xNv^ny!qIdQ&LjsXfrZkBE&$8c{-Z-u?-61zx#%@Rda1m zWw}-SWccr=^rgZ#G}K?bnD)&#UmrbsjFtMB1HEqjx>sI)b>6%bLQcc9A|Hew#+iO= zLR{Lyjz^Z#JvLuY4KX;~?A z4H<($q0h<6%Fi#TsjKbk>_By&GL>#(@|2`0iIWpzVq#eV(#_2kk*1_CcorG0@oT~I zkFamvmyCu8Q|;FX@+Skiyjeg+bc%hI$seO6KP^0}&?P$)DFzyisw=P>AnGdy>hy`) zTkh*8C3im>80GV+>bv!)Q|b_xKN$F(g5BMde7l<3yPDb*dN7(4_co`qjjj#3!z)p^2~VhvbG3ovM0)m5?UWa>E($p!5K|vDW6|E7qXyE+QAAaGUvBW=*i~pa(&sw*)Zl!U^B?&e3MXq4~<8WEE;6%ds7NK#HjMHTH|>M!amgTHcJObtpTiak!;^zmCzqjnMl zP83P06Y@F7pzk|J5s3 z@YLq|(j`mYdhgvu3se35{85qxFoWVxD1XK`|7d}$P-EZ+VmLcHM}$TA`}s{xPF}od z@u5S94jed8SX5AR=Jc)Gw+Q34a^*^#!Qk@ilGx*4*xPyO+uB#&k(%l(1M&wkt}Z?HT+!sS!rJls4MFJ45z z96EAD|G0bS&cFZV-yUFnrkfd*C45bvb&b|=mN3&0JR_6@Ei5kAip}Z)IW{u3HS{%3OYn24JUq-TEPqS zHo-q)4>Q?tB=E23+t}26@xq1AKKtz0v16rWC0J|Lu9)@q8>>_1#QS)=ql!_zZF;dB z_BuJ*ySX^|`g+Dj1a|iJwxcw*v^O=k*VQ*wR@Il5*B2F+W@eRUX5Y)tFR!g{uB~m# zw=Tmf$%9y#aaKn11^5t`*(*HMKOsJp1?VCp1KeGm&<#->MIP$UhxL?l2ygU?Gcyc= zh(*t2R;1!fAg6g!_Gqz_3f>gLEFF5eps(>5PuuiRq>)Q*jOFr~c$ZgHwPV-mJ^RyG ztgoS=nGVr{1(VmWo`uz~v#W>5imhE;qQ|#)wY7D2pwG8=wzi9!-`d(qx*hX#XIEQm z2bz6b8;U%gFPwZj+p*O1r@meZaf9J{rGIVCgI1mGZZSzq7D!+!0x0lelZFi9g@QH@ z5m+_|1z+@h^IwkooCmQi+bF*h@odJ0nhlO(wxf+0nr(~=B*d7F^9anMbbf1_hUVt< z^n#4+qV~=nru4l1+M3m?mxV{qaC8YV178^QRV*_$+Q-qTzXNH1Au0Cz04koRSA2ZJ z!uhE`oH)LB&u+$$E?>Tulaov2Kw{s$@cgD(v(ySS;8fMK;g$c?$APskb{<~V-u_m$ z_Ev-y%gJ?`o7!vVtU&D3pAiQ2b=60X9R1{zPtKn^U)N9{6cF_4FJ5`|7q8(;N_a84 zp49s>tzQj-f1sC}tJ};Ovs_)>T^yai*#32KQQ`J)zNxOM` z*i|<)!>B9fWz9uuZ(K4M#gG;H5!Ld^eKA%kg~BLzsLLM={C19ZUQ+|Cx_cY5tGjC3 z#17|Z>lozjnH=a8>`LoP;e#oEAov-X@= zj*4cuS$(M5ne?SSlVL@fVC6vA-`;K?tDqiyA6T&zLo>_$RT3Seq8$59UQTX4BSA$) zgfhTsuBNIA*XC@iY?K(Rip0dggE9!Ca!5#wY|+utvBYol#>3g0SYyoJQ9NPrqh=;5 z*9h_F$l%}XzZ>7mOEHb%@qPT*v2VZK$xQa@>T04_6QqK=iPn#)r-I72X<*c)VR99y=*E>kaO%7e%XrrjDbRnRZHbY~@CO7%T zNKFtYPCGgnF~AOu&6@Y9VqlgYN<=_Yicp-FP$CYZa+`A7IhC!aTfpmLmY-~&-Xk%$>{lEt&*8AW!R`N~j05 z*p&U)sb3aY({WtPnUohWKk}zp~1mZCMV5bF#r2K-{ZW@fKX*+ zB?Cffm(td)TfcnSvZ&}NV*QOZ__eNLpiFatDIeh3%#6&hzxjISw>xukau~*1wPMAa zZ@$T3j2enSW|`aQ;r}7le;lpiRuo&f*H9l6W#ibOMJgnmR8fWpd)=@Q4WM zRpSpPn|!fWo*&4cLqgvn=bs*`kKU*hQk5p;r!cN2mO@QG{7B`Qz|YU)XM%q$RY|q> zBhNoQy)2GWgEjf{&pu<>?S|%tAV06?Hl)1%%F-#5qp$)ixI}+~ld(wcS|et(zBBkI<}N zautCjhGt#qjE5~k$^ySKL1U=kg8726RDN$a!;{TtFWla->)g?k*GtN4u*}BCg>GD% z^1{Y>)2BocP(lo8J%VlYYD~;%+vwO@mFFV5JpZEAclC-E-zBOw>UL*mPggJczdR-G zB^{DeEYcXAX|Bl7j!xe##%D24qw06IcgXYPrMJdQ=(csEy~}%*YTskU)ow1z)gB7$ z5mk9EH0j(^!Dp(SFc>@ z6EfM(K0pP&Ft|X|SD!qM`ojprkHMb+l_9KVH>X4Xj@LC&gpZ>*Jt08oRUj#L(x9=VzTq`wQ+Xs zY3%6A&LqYy5~P3mup;xG`JB%`|D123e~J(3>#zS}>(-Zvt|?B+8lq8xA5e!CKbG=w z2AZ6h_{N*tuyTI!#TP^(-M#0#_V$+F{%^mXo05WYz#yk4iYY$@lcP#s3;Y5J+feh5 z6gdF?BnzvTGwu8C-8+}kE?>HwmXVQ(vm*u&re1jYdgGluYxb;^l({%5vpg7cJ#m1O zVKpEgK=}p}DrnS43et_5GD`U8wX(qphJ96mGfMck(_CnIyF!nWHvp#)rLiOc>-wyK zw_KFV>KS#pUs8RPj8CYnmS-WET;n0LXJaYKl82%!7azNPDgH^}rwR0O^qd*!9PZxP z&_Ua4!@4^@&h|de49n`TSKvQs`TDyQX3Wxlf}g>_Kd|yq74TC0_@j^a@7qVzWW0)( zEnD`^+wUw}zAPZXA8qrI_~#46#np-*Bhywm9W%T}w2PjeB-9)tdp0#U)l}D%mz5Ql z+$$=&S6GmrlbxNDn_E*;Ezy}PE18Bs7zEtw2)yj+?im;qfLC2aL?nR@;$mas;^O`N z@lIuK-6-Ja$@yns`2T777;~>)x%$bcpBz7aEH5t~eK9gBYU73tn>KBlHhmfsa}Cp93>Ww`Xv=jRW=T&iAqsa2T?7RGKpe~H5fe=#gYTcB&w^K zRn%G(Qf_u)dTvKaML|SYRTgSdQk6AYGLb?4y3k@pxg}sX5?mXqu~6e(p{`3I?c!T4 zci7`;jn2y-@6_-^a5c%!9%X_-j+FWH7_&v#%h&2UBgs*c4^K*8v&QS==)jLqgz+4l zoFb#6`~w4K&X~#aeS7xqJ#y$URr2sbf+wUOIecjShK(%f7Zx4{iVa2;%*!?g@!tS* zL5#lA+IHdGc`6RUqZyU)^z;D!ZEw6WH)Sr9<`5u&ZD~rzApAop-=Hr&jcGGx{Of>|?XBuq*O4GU!oDlS-Ri0enf$f(*1y$aFl!VuE8ANhu+d|e=w zTv`aFGI8Z8g5SV6bm#-RUvkXje;mPY;h%oJ+X?)e6|5gq_Dc>Oeo(uZd$e=scRO}` zd-K-K_SWXagz#;zEPr9+g0OHu0vkxvuezJOUdw-_682yw)cT=1A_K&onIV6?N(i0o z>+Ob(7?*^WruOF6*82JuB4ZSlRF;%f6%|+I=9lH#jh(d%5%Any zygXd|{5(U0d?LgAL&N-|B7+lTRtoUED~- zLXGy$XL8!sO7{i*zZ)%I+^ba)+yqtuAIf1rwzmlh^4YLv?y_a6ej!tA9Q>@T4Q8

g_w8%Yi{580wR!CKJB$;6WxL9%MDYv**rbWo9zYv~tzTjq5iu zwVxUNf>kJ@8A$C%0e&pv0YSYU9=-K7y?MDk?X5Oe9wtQA^epe*$@ucCFTdNhD=#O9 zyr~NpzWesOt5&ZhqUL>i*J!~n2$Xk^0Dt1p5Emc!&O7h<`1pMAm%p&8$H9XKo10sH z_q*RMTfUrS{Zy3^L1_}TU-B8i&jaNHA`bf!Yg%4BfByQ78`(M86=fAo&5gJp5#lvz z>eP8DbLY&NOJvuGhzK8FU!17aBn{1jPqF;b1ecamH|sq;R3D?t8;oLnWB-e=PCusU zmmD1b=)ex@wf)MZ)@YhZLbcX9hsq*J6F}i;l|!|I{j=)t>z7r_G&Ma+Dy9DTAurzo z*yF;_@N!#eW8L-gwz6h0?GWVVl^oy{=w>4`Ty?4as_(Gj=ZWFhgfbr&3>)&V-zA8J z_HpXesXzST@6Vn+S65%>?Bw*q3orcU{ol--IRhVL3jxiC225WJ%nSpmXa=q>F3cu~ zjEF=V5sjmxv$dtQp|PQ^t~M_>|I+140C4y2-InGSrYBTYu@tqn{cR>vIXE#x%-Pw^ z)!p06Ga@o_&YU@m7A=}SZ5n_n_8SlQw;)#YCmJ71LVfwgmw)=xAB&2MvB%?X$ya0L zU$K0JUw|*m?5WCjU;UD2g}&JJMR4fNR)Ut8#Zytm?$0Jj(-|yh+A6Jj8u+J(zK$Tm zJ%qx@EsTVoO8Lt5Ky*}YbLf`EM#v#rto)Od%OrG4j#|SN{Z{-PaI@eFy06%@B`L;h z@qbWiE?GEXLybjaWtGCFre=(ryLRu&&(CXWYC>Vg(?Q#mjZZMY#{48Xe=PZ9dGK-N z!vO2o*e{>P#?8%bQhae(ojZT|%lB5VUPCs; z4dyoqZy4NUUK&mOGjM?x{ZIe&Pibjs%`MF=6Z*y*gz(vhD&~Zflu2EzB_s9R8g^72D-J4t}3|w!jEVRQeTCojBSE{1QEmDK4KrdbN9}N zAN=Lp9Xrd)OVO!P=Oz91uQx49o$TZ5frqSAa#8R26JY4f=rr|92>{tCp~hYGH#uRG z=m$J&(?eV`+7usa*RWu#!~|SfaVqE`QbT=HOG9Hz$-SBzH*-&(yM5zUUQKmFT|3hj zTM5u?YgiXt$S|W+>jtYXD0{2u%-V? z0+jbP%Q%q>4&<6pO6lhku)?CBqoZ5!18P_}Q8afUt|Fd#O5xL>DrsGmU{vs`b{xqm zHfi*KQRdOfg(J|-g=Z;?Yl=~L1ofR$<#;0Rp<5^VJ63A~>2V|{9`2&?t2vCEb@$?e z($v&O_=}?A%0ox5rCrHvZRx zoU0tdKl+P}%mDgqluuQ~pCBS4JRmTDRZ=!>dJdO@{rmQ_W_4wC74xq4?*0Dt*M70( z#g~GD1N)FUO8AjTih+SP?j8`hr?#@Ys?ydkK$9Ksq?_rt&{X&B+gDptOYdXD#`VAb z?eB=)hs2QKi9Wgu6F&>|#XCDZJoJs%-*9tv{rf-sflw#Mj~^$71C?{t%2h06HNpQD zmWF?dSe9w`?tT0BWoKm*;<r3 z4aEKBGX+aMt(J#UB@Au(^6JNjzqh@o?p9^Z*`kiBW@%2Xt=meQI;&cJQp4P$y;xCT z#PIWE@XIF~)O#5ITUwg;?A`N^|M)+zUb)7wa!_c{wm07V<*$Af6%~bxD6bZpn`AZ4 z6gCG~zIw#K6(K_~G&?#tQl^)8Z-{jWs>|%TbGK~S%&;~QGj88XXGyxV=g-|MzDGd% z`i92p>KY*)n~nA5%a?cW-h)Q#>+j2i1y+EaHG58MY_zABCoay;PA;M^3vUiFe-11D zHGTw{{P*;>b++BOmj1u~`JZ;}+Qnk8Xz_s|L7Sg@?w7y%HH$$J;YS6NQxK7V0Q9}D zd;>QRz>i{Pp|*H|2q+33lJJiD@m?;;#)0S)A|F^B1pfjG)mK&Wr}&pAPo*TE6B^gbSZ7#+oT!&zZyI*-t+G6wC6x(&Dm;vdfpRY}vf|t#{v=I%S%( z3+vq((tPmpUoi$4)npV>@_StR!YK{)_22CH_8?bK-0i-!jl{A9wqr6YJ`pNM_#KVxV(7*e;zjJbS`Qsn|nMmbl&Ybz{-~R6Z z`Y-=w;lfnR1cNM}`m11kD)B=HnTZrQwiC0D_T}8Uv(+`#SV{O821W69kBy66zkUOK zu;|E0Cs!w;L@F7hcUts}5BY<@lzHark4i{Fu^gZHG}BkNFHbLjKBe$0Hp1-`@F)0Z zJJ(6khIc*=@a zM_RlJ_*Z$wRavw>k#_uxd>{{xp(ys^!q97D?`&)3Vr}K+64>KKSu>{gtXVzl_y3`@ zv8g31tK{6JyB98Jfx>O?EXY8dZ@gt9#gD` zyYsRo$-n#crUfa9M1c?@JU;#(2|w0d<@n6pEIQX(N3+mZR#Oy`vnetY`9yI7H0iOo zA`rGlxyXH$k)x{3WELJ!m$hTHfKCl(la@mGM|el`k7VT{rD^_AJcOays;aip)y28^ zUR70fGBxxi0~ zB8$!=$!DT`Wn2yp3keDem_B{_s#U8#|LoJWOP5)^y6SAzt@QLmhmQR6z4sO^TIlKJ zg|E)2;Rg=!^0IdK6n<=N?k*|oO-KS5OcO-!`LF-|znwmDg6Xk=fk9hedhyqP^?u^y zMAi!tDzZJ3^rbKE?d$W}8?QS!I{x4P@Bfo^_bzTUfBUz8`=9^r|9JlS7d*T?73)8v z{Ey^d;sm~lH*coz-nD!G!2^|LWfJYD2ahys7gx9N_;A(}dU5mS88c^jdU!C{iJq^y z$+90$^5H)F>gdT&>4BRp2^7-y$c9W7v26a-HRJsMXYWnG+PboIQ9wdMLJ}b6d7d!_ zj172<9S_)voy23}3{|OAD(S9%uU~!LuV44~`riA!d%v&yR#y+zUDaKw>Pk9^6KAp$ z+p*&@o@Wf0d7i<{2n0wVF}#26eU6YFV>5`sm}4Uyonf7I)>?b*wbx#IEq0Jy#Wc6& z`ui`x|1jX-0Kq3)1^=PyMcDK$Zfu`ErVM`y_`}-hZ`AkXHV=08!|ozn;NLP0_1ASd zI7uAUawktE`d^O!6yOs;{*v^`_xKB14&&g=!iPc7*wA#~lTY9O&;O)iXi~|NrHODT z@7}q~+uMsr%ZtbnhPI_YGaATODMNoIb#zituJo|*u;;h$AXBXQUS)MnRy= zZI3?)!Z%yN$Amxfc%oqUfsZ~$LK4igVKy>j<*K)T_R~!pH$(lQb&x>dsf-gAL76N0 znWB6`vxxZ9y9l-;-i8~$v_piYfeXvGY$x&Y^4+p26HcGv;^OPqZfxGT1(AbT>P43c zFK?mBRP>JpANFL16bJou!l#rYj-er;fA!aYwSC8qgP(nV^c%`h+|ttg-XDH{^317S zFYVg*^1j5xL`1)WeT-XkOn)>MVEFzAAAI!DhaGM0GP%>Tl$4*n`}Vf2&!H?RL`i5l zB5xVa0*~hd{u~vtStXBWUU;c%Ux7RQK;a63amACKQ{vZG2fBe<|^Vgd< zZY0k#2=O%02VMm%6>n*6L8^;Omo8nue!aA;47r-14Uo+p!N^fDk*ij&UiZxURT&xX z?jA_9CP>WvUkgZn-~(j35XKmD2T-#S^)p_2M&)x6J|pi!>AxtF5-%irt5}m+lpknV zQWy6VLNH+-Jd6u*9cd%hCfQYw)X#{(Ld+Vx$-n!L_mIB_%fbSEJ@)Qe`})i4qa*w= zv&bGx9$|9X;S+G_AC<}@=-g*3HhBJQ*8a)oi0ctW%+-M~SYv?5PGiG10tI8h-VXVI zq;?V~M@Nl|!q3-z&DumPJ?re$*VeaHRNX7DYOJhksjR-&(A3`FXN0#1Nfr8g2imU{ zT)I|(^2|sL5gP0h5#kdW9S|MvA0Fxx9O$J|DPYZGumJcohd=X=+KfJsf5gU}y^#Cw zfA}^lrxG#U@L$A52mJJnExUHCLZ)dHGPEuIZHqrAgf)L33Llm_1c%EHWQR6pMzBL9 z5+uTuG@9fGITDc|QR|{kSsES_?SJk+)!`Js3ZG&XrH-gt^veGIDBK7A@XgmpklL%KPk-##QB*C< z+>-h7%P(hSWMBYpSqM7I^mkCI9bB|Sa2A^ehVM1mkBs#6_M+PMzx?`Ni%W_S6cQI3 zhn&K%yz)w5KmZg0V;%APY38q!-0789_Pcwy|HChTb?fHM@`{RI{^}o51!>Rjy~xZa zgn>OZ@((S8Rn92rRghP3>C#0kH_Xqw+okIvOT^B>NiO#f3|O^l)w;E7S7xjV2?=(T zKM?UTN+y@`$a3}lEzePywxg6?r;7=ZZ6pL)=8EiAyAqy2P$ztdNNu@Fx+1qgn0{91@KG$oYU&yWM>~z1{k{`uhC*yxhBY z3-a>XIy#L8bKj#X6!InqhlcLo zx9=x!y@llQ2qOg}r_sJ<7XO)+eBh}le*UL_ znwFjpV?xlrBq$IQY)^oGo)P(BZ;k{441Qm;2%3{Wq*R9{A$X4Jc5X2a#247K0rwDUnceS)%yCnrLTxW z;kbTeLg+I#x9Cbr>vHm|bM96)HFp_d%~OrJq4o}aTYJx~JEe}um7!1|w%6TDlNb|{ zvNR$wF*q>5OQn!u+8CKMFwaMQ6)CHk!XIymb@`K}4;&fDCR|o|?}Lv|AN}^$z4lJH z_E5txb92i7@y?F8r~sf(W@!Lx;XO@=aA`RcCwWCkH=4 zS@_JYTi<%?Co!?HYNVHBnPr*SGjhz#_`({#gGObq)!Jd4J76?5)HmO|_n#ks{JY=& zwynJ#b?Q=5mi@_}yt8fFb1oVe(pA>m(`}z12ivBNo0JOYU;gs%FJ8P#*KhFi^+Vw<3e2}`3toPBDhTSI`Tsf7Z&LnbG8E{~(vE4za=>yF2igAE zhlOQyJsBhH6z&vu0a1i)0Y{I)KP;aSF1Iy&0Zq#T9}VB!ZyM?zpwb3Fhm0s91z-1r zQ|4|1%Qyv-Y1Zg7Is9=o-+oAcRB=E}4dj}5@Atp|{_Htqu=Vlr*|KHJFMjch_=E(j z=}HlVZTJglL`Dn29!-D#Y#0|Zg_Ae_dwQc}-?JN@g%UtXx1yq=+qZ6K=j7B>RrmCC zclY!lX+6rm_4f65b|G1F)s?H4M}KRF(x{PM zEu|=<>0FMPAbSs$Ph2r+{0S-(>+#@I){6lnJmzqfzW>KRmQ_@M{s=_f{=fh3@4h>J{M~ooUAuOTpTECSp%fxsIZMRP8I?~Y?(5X)Zd|{PHNO|n zUqH$%*bT^j`_rHP6iISu+RvhHL@}`(u$GjCFF$yFygAcvNFcL!?{2Nu?XUmlZz{^l z3-Swp{p(+wOy(DMY}a~tz)nSTW0%q=-^LDDQ;nUQQU2lyHh~W?NZ>v=Fo3S2t-YV(T{zuTgTBC7y(}skGty;YjS~osEPN{Sj^p8LTe9_A=4%@_uTNI06u6D6G6cxLsuKOhr5>C4P~GIFwskyDwiW{QU|OMh7b1JXh$oKLLQb~QpfMqVQ zd<-Ds#3YeUumhH(Ts*m)vP*R4U7cD<&i=AZxhpAn|^+H0=` z1qM2xIxBA#;2d$2J|E_PV`pcKzl>!zlOLpTLUv@73q?+)_Kx<3hKBR!&ts;frnVMJ z6%&pMrP9mG%irIB*|KE_5Lvl;mC6}4fgZ9gZ26()D(G|&AKZt3b`SR%Km|eSfVRZ@eNKn>@ znc}Z)@CWe~PKs3ciI=4!^LkfzS2d!}YHJ$m>zlAOHlo6q4vE=y-95c}n56{;g?V{- zl0SanrgcO7Gy2QGz(AxK4fGH2Mfil)&COM-(WqojPDm5STp)^z7R_!zBqgK?78p1N8W(i`Z~Dy|MqYH8R2HRA^{8b@CKaKbPm+MsVt1fAg=`u3RfADM58mR5*Nb#}1fcQsg$7`~H_GDl+il`qNrI$D==T zSq=^kpx8@YLp@R|<=)MK=oSc9uG`FO`DJo`cYY(eRXkbiELK5hK9@W`@b zTlukowd@G?^P>D%D02VK^yv@%*45RCde3ZgnO3DC9NS^`K0igsprMnqlh(|N<1e%l`o}H@Ft(4I*%6Vy(}IsRBC#<+ z_`iSe`o2B`a%CV9bA3a5ow}T`;7yp`o^}phSo#JuBlZDe;@bI zFrOfQPk(=pKtB&ZU#*80v1kex7nQDR>gf*ulC_R7ZZ^57Gf7|o-q42SIG&0;TBR#gTw7$Nf z?evB0<*7>|T>~YKF09WX@+|6SYLZN1Y~KH(ZKS5AhJ}Z3+PvlTsgu`k-l(puYP#3> zFaPo{2>FCPzjn=Hy11lAQZ%Hruug{SiF6E9G$M~dJmla{z|VAPVL~Jpy!@@ z{`J>iOHNLvn3W%FGe;l(s3!$J9Lmd=FaQ7k=l_BkkJ^UKtu252;~$Mi<7=?zms+6*6rK6t}eLOl}=6`9v&f~q49C?Nh!(8 zQ&S@&(Fsx=pdZK%9e7gs`%vU3ia*on!o}#{v4I*mC>Z;6V7$$?^kGRb@F;6u(8z)v z;v5oj5+8g&Vhnk@T7V#ab3R&LNrX?|^up|=X8=ASH%a^@3aQN1Nh+5h{UQk^eH1qgH8;98n_vQ-DvmOqf1&=_K)|TONRqpoRfMNpb0+uMQnKcC@Ct8nb_C>1l7g z{>J7_o6s7u@MY{CoAQ^yP9J{;g@jU+AEfE>^zg)g#3RF9-rLuUU^HZE#|j!uTVaEj zxqu=3CoFuI=tAmhYqN8**Kb(w<>6s3lUcVydQ)tZ)IaQ&8Pspnhp*4cX+8S&U~@gS zBR23GHum@2xoNMEEBpiGett92z8>H&25A9-fv>&(`r5T?uUx$f^X2A^8!c^ZCr_Tt z$;nx9XkBgkt0WIYpM~j zl#!nP#*f}W3(~r2St>|U6=U0E;4eJ+5h=mc3Dcjj+SjaIBUi}ZQ@@8?5QPN=zkly{ zSjDn$-@fp$FeEPLw>**hhn2BMX?m<*fj2onFaOS+J4l{`?Az^a?IyDcBPDMyZ_KBr zEK5c>LqdE!1RKfgDeohMM(kgnKKa3$Q;VVLbg08o%LI|wj_LH%OdnC5Fe(wDW=6kp zE(l}qA7mc)f%;Sq9WAT~tT)8EpnV=EBy!u{Qbt5K6;YCKw zvR141@p23B_Y4d63JCP__tpCQx@+Cl3d)y(tH{TUN6;Vi8$+9?`ItWbFh~$vT~*zD z@@)2r(^-YZbyz&<=Av4?GH&ONjP+|0Jw084!aS!xF`2R1=Ja`}{J5%}(^Dg_TrawI zqo|+|CVf#*NQ6@6jRkUo%R|tvtj#RiZ$t*x+F1J~+Dwl=5PNs6_POVtTb{b?c2*XQ zzzdfy)YjBpzjm##s0iUBu;(+kW=2IsVpS+bY4As)`LIXxhckrezgfRY{Chfz$cKC#9tzl$OF_)b(;RV?osnF?k8nF zDsfOq6d`WPAdNkUgpHv&E_@oEk->(TA9_B+fn7|u@mnnb7&ON1AJAu9_%H=0Mt>|c z)9Jdh@8o=S_$%}u9i8nS9-eE~ta_zkltG5w$Ck&t8&aF`FGo0~lasrLXLxuxC_XZRCC?_Lf~~5qDlNr?czttoGXk00+S=e>HX8e}6uR+V zOXVeSE#WkdaQK!P0(Iq(-_7M*)^g?Y)z3fw{L;lsgJu(ArsETk{pUH9D@0CdHZhAw(L*N4-#Ml~9?xWZ`t%`f zH;(*+9f?bq#>B+b)*((d54}rtRJ5xbDgv`sBanc7v9`sLu|f&-oT>IT)Aa8+|NUTV zv)vFh38@{@lqm0N8qjCm?$4}|d3*EapH?r+c4t6-&=$fYBH%k-w|3p(!-vm)f3Bpc zxV^po+i$ABquNR@$qv~C=f6N-vVLGH(Ssj=0#7BE;~E-^DjRC?)Zt0 zt}ZW6Ph^CDyqVCxX8gG-+po`kA#=o{Ef>T(cJGCs=2b*7=fGAUpidUr!rjJrJsN+(J4*czdNKa0 zpa(nPGx zbU^Y=kq}d-&)~pNM^{g7e)X{vH_u(X+uE*kR>+nv3E8+lY0rzRqoM*8abjX#x+*O>Smlqrhs+bgWX@tyO|bvsVhUnUuYIvbz$Qz0 zd$?czIc$!a1wneU4fW@2;g5Fjg63noTy|<_zNNZSclc7J_1+uD_S5$s^=Ilq6buEKKN{K^aY|LAK{)?SE zce=Q`aD8MAej(A{hVp}4RL>mxO_H6MNWAyU@A`_4P?w_?5TlP8~} zqo$!DB(Ll0(lsmmZf^QyR%g) zke8>T{XRy1&`C30h7b|%Ulm)b&DyWf_9vj9;p4Zu$_jB2C&n{Diwf6TH+z1FUp(eP zrkey<55lLLdH;^*iuc(NzKFN@O{mZ#`2do=E1@86gr0+)!cRS%=n3O^u%&;*G=!@i zlu|{2i^~!(nY%OCL>vQ{ap*H*9ya%xhx7v@L!(khiPTjtb(YyPwLEG1hU%YT0USx0NHum!I_xHv6XkUL{UvFO@Umq_|IIld^8W$wuLhew7wIy&KfJ9+Z-xpQYKD=KA9ve@VtV2DIlJV;p}|77?pK5Bl@Uw8rA%MVuW zM}$YLSiU?fE32`w>FTwsX&LDn7q#U6Ra$udEVr*2r~jy(p}G>|DmGMPgdL$lAl`F$ zpx@ZkrS;;aOJ9EZ#nr1W$;ye%sL4^!aC>q5K6r%S#gzF)={u z>!JOlC~VgHZ4T)Jr^A5J2z6dvRaIP4Tu@L@TwGjQR@T$4L!<_R){yupCOSGUE)IzW zqhn%&g9DLFNe~uGyO|IDmreOgZ#Is7@(B6Ins(es9UO7l`u^#*U;c6nO+PQnk07+d z7x;U>{D`L)+ZUt6H02)?s|Z6wwbic<9XfOR6sFL8z1^Q#vt;ki)vMBDksX5IbDutO zg11?GqA?3zWF$eR<2Z(%8L=;{GsI8U==ljUFNFS)Yz<~@5CqaEyv7Xe&JKKgnlzV4 z9DRITe0*Gyk=Zyf)Ya94{22FIbuBHrmewxpBdEExL*Lb@*Y)&u>kYSa%Wr0vImx72 zca4vS8*cRT(fask@#*E|=I!O`<)Lv!`a8JcUfx6l`EGoU%r-;bEl!c;mENg zSc!-U`1R}8W8@VU9^tHna~XVK{2?_@%7!s#?1LZTM@9X^&i+9Equytat|#kG)|X#= zdFs^3=8jG;2m93;=U3LPeg3sqS&Z$p;Mg3mV=)vF zIeh3Vqrvd@+ixR9HPS(dx}NdO(ldw*6uo`!<2k z&?YP5XG@H;~s}UfAEi|Av^;b0*r? zT+*Ktg|Tv6`jD(r<9ty5DJll(`G;{5BO!ZNSC{mR^h=j6U%Yhj@}nuo4su9zj0{5!>sxY0`hxUP8-xXnaS5K(@M=y)!6=ge?s7*~TA_MypC& zkro~ixq9X5Yd5Z)Iei+b%u7p4(0p#)yot0JTeoh-CtQ}O-OjlCAb%Ojf%$~!gEhZ( zb@g9=efZF!!$=2=dy|rqkV_d)!SoT5+YmGY_QU>VBJgREgNO-VT|)5K5&B|SP78kl zh9F)9lWmNVa|a)#j^Js1^UWV?H0rOuI#g3r4HF;g5y_EOq_0rOokVH^S%Fit)_*;k zK4_?@+%aS}>3jR?>+5dax`k>1<>h4!$ZFZqJ~%L_R4GxZ6*<{6($W(W6GB5munxt= zMT1EZav})Z9MgYZ=^ro{TqcTOkNsHi@;|TW&-KqdX&i4%jk zwzqdTHgr}uwAR$NHnnu!DCY1`3TlQg zSf!T3oQEe1HLfVCh)e+L?#H8#X>hout?R<&yrU;?<=(Ao>+De~WEsg(+cQ(wu3i!m z>Zer7*`R?!aYx|P1pBX%(UG>+wzKEX9D$^G#{d9807*naR6O|E?c2Bd z`uYOgTz5MTZ*x&4jF{0BImf3AUl7r$^i%_W)_Qtju>jA4&oLjve}eF58h@L^hp~uk7LJY}gA4q^U=ucYC3+2p9xC(K zgHYzu@^bjaYO1QcbRE6DhW`G(rsn2`#(Ts>dk2NW$qk!Ui$ocbk&!5`7aktr?(U{m zYg8&{^vbAq1>FZPGqXko`5!c!JKH<5vhIBO#TS>aUTtr0L-2ZBY|M@wFYVm>~qHD^Rf7k42>93>b1M8zef)bl2YTUa&<*;H?k@tAhEHj z5&6GTQ?Ok&BU0z20F0jXh-F9um$qGO`c)6&nJJ$wG#IV7+{dW z#l*QHUkS23VrUCctn(9L-p92E;IjuqQtV8o!Sb?-gP(u))fZpD=1^(WE0(W#{q@&3 ztba!9=_w@vctrogz|a-g?!%vclcb{%gx+lK!6+4tS1M5-KsZ?efe(AQ^# zE-kMpzkK;>PWGLen%d6J4uma32}4OE*#(NytXua?TwIK=ub*12f^Np_A6}SmkJUdG z`mpOCF8??+XZFb?>??*Qf9;3KKYLT+FVik0^t@HDI~KnDv)6no_-p;9Gb{g0s|s?& z#Ea-VuKmw0WXR!K>;8p9U;yTk{+Vq5Wh?vgVf5E0(ychvqCCJ}n-RdPTZeNM;TQ^q~()3eG5xQp~(|?-s1NH^^ zyRTXmfBAZ0MOE{K%LVJ!6hE^*P$KoPmmr%N$=dy&^m9=^%$)u~kcx|oYvPi`@bJ*I z73t^BojvyLv9i)~#B($?H6tAA+O=!jckDp=T6cGM6lY@LR9rJpPCpL~n;IJK9Y6l< zflm$;6&9m;B_<}ljC@WMFdeNqs%7@`Kqd{{a7eFYiME z(|`Z%Z}JKY!L|N=1L`?#-L}o$UCU@QkLY9ZCc_O=Q(blI=B*pIZkCso!<&ryC~(=R zomD7;g(4`c*J2gy(%`^gH!Wh76xQ>0q$+4z)DOJHF#b~C4sP?#OHikCr9Y*tDKi5C zY!bxJB85U@Wh~?$gf1U@^C1ZT_0N>7@aj|0m#<%jqm_(}gbp z5CKmPKAf+J2Na6Kb9@LRYy9tnKRP<3AM7pbGB)%gW*Kiqw%hRNkipzvt&^zbGM69; zvSEl8+C=DcAN+~Y2gXciXV>M+mp(iA`Qhl;ePyLatMN={a*)nqR6O<=6> zC6HTuQT9Ej^q+wIOo2WSN~AExCYQ;bRjBphjW>l$;+fuFRQH3A`CfA~Vwe$kiRAaK zt&}|j`F*fF92H1m(8FqUzT}K-zvRF0@d*kJ2?_~9+6-jR@bUF>*LtW`&Q1y>WtJNI zjU{CzXHTCwdHNKVa+n4Oef|6pq`c#W7f@{1%L|KsX!elFzrYcZF%}*yNcsySl=0*r zr7}D3HCE=_t}QI+@9x6tO|_eQU~GIuQtGml6fAo|mxDA2SfUjY9E1$m)6qZkpZ;DO zHW@0)43*_}LndffAUtB{;HcJUSFKe91hatUxop1(lJfNOUgf3@506Y+vEuys3pa1x zsHmtw9ijT#`a9V<8#g?=X5AVTNrM9#o@n4duKxU?ejByx?d?NStpgu@jO;O(@A2{W z-Lhr#-o5+M)6*~~&!;1)wT#ohJet37Dfb)dI&?Sn-K7Hq-AKCVj8G_TikmiFDpidq zpOe5}cswcGsr8SK#-9^xn(_}#g_5BN{g%sQ2S59)sJIA~7%?mPlb`$qYRbjcjW^dh z#~<$h-o8HMFDkF7C@L&O^DizcMn)slYlYX?)zuZ%!(-#(l9K6PSXdYaKX95`)a#t% zZ&C5{P<}`}X@xuUhY)_u1wT{$?_>1;JfzQjZol)*eqj2Y2|MLm5VtAmXPfA^`9_~9 z*#GDRq3#fxaQwuH=9YU}SM{2ei7)S3vu+ipY*lQS0jr;=g;q>Wm)bAfpp@@|M3-2C zJ#%XVd|c`a-P0EZ9E_ zKtE8cwr;}w2Yu3U-k+jP^OpT+{R10VrFL1eBmt4jSdaMq_vf%Yw6L%Uks=uXqGZLo zXXsyIVj>2xuo&@#Nx{d;T~r0csza=zuB)v>NEQ~MzV_Pd8?30L+B-U{YpaV3i*j@G3JUX37Nw`B8?1qYB{(uBIyO2n zVM+3`6lA(Uep02gGbS?xtZ~tt;y>Tz2gHG=fM|sO!Zug(PeH7fXEWcnz&adfd;EiI zlKXIlwxWA2H{){lgKj|2V=*i5hfjSH^}%!+MvnLpo55%HlYrAq;BO5d#U;$$#=+*^ zkwG)P6a}B-h1l9M^N_hkZ|XEERTeMxgy>@pe#GS}ACR8&;e)>L)0cObnTyc>v_MdU0N?0~A68`QeGdU$#vO;t!}C~5$DdU#Y< z*PK3m`c8IsduyA_Nxpo=iaon`XKvjZ7#N6K;N2c0_)|}Ri+;e+N8j0Ac5=-6r9T4X4kXKL7pqh#`gd zzofJjDVR5G+_3T4jnPq2una7djgQtp=o)mouH(l~eDJ{sce3x82M5DK!!S3tXYXDX z=1(3&Y}AOx?_VClU%1f>#=6F)Z#p{en1_1pkO<$-p|7{Lx3_F?Nbl$KoPz`9Yo0QE zh8=zI?q@#BC+66KLxOkh*@JvRAO6>eaABa1Uw2P8JhquzGPPPQy7D>1-#ln)?`*HC zth$qxb?eq`1SunE9WG{QX_d1wDk>&EApuo8;^UWuhlOCR9JDLKmY*Q{b5zH=13m;4 zUtkvG2QAUTo)*9h0}kq%X2d>OsP==U|FX1q>^xe(iR^s>^aDqA67oqR%M9PALw`=1 zK6JxG+ZXcuoH+5_fBo0{w{B$_488t7o;#k)*tctSLTn(G$#F=KA@UkivMlPbSdR$$ z(@F9Mv;L6|b9T^S{Gh`O4L0_qfM&E#s@6&FXEuJJ%QzdKH26}9RIQO{GzuS|(WnSt z(=segH1+kHx^(*Xc71DmcU?mp0-398nw#6YdvtwW2ykxIRaD=T=2RfP9qRkJxoX_C zYF}^H;6U%NP(OcPH(j^k{FS@cZxq)zw1IF@5&qjVS3I|Qd0cD|DtuFoVv)j&^q+|Q zKv)9VTwEG*8+&8e-axqA7^+I8!YOEWns2`dr#I{_!6#UAUNgH}^NcMLFxPSN89R|AE)znJfArwPkmYzPhFw>*;UYxLH(G1Ye4- zvkNX4)Km=!2#AWt`q#9Slw}bS5nkTj2w0ZN9BHvD+k~%0{lEx9oz6q`1A28b2Kaf4 zCS`rptdB2vZUoLgCUt1kytm{^p0#mH6bna>BQCUlek*-~`*encfL`i{n+Ts)43RBk z^&~-pYy*F$@wdQ7#-M@W;ejDWAF9O+M>F1p?8o6z^T4p#V6vjZgy~~}PgEpAK9v6O zUSp*LCKW&VP&Y3Z=Lldy)Pmc_h$Q`T;SCEwwe(ce8st zJ6Y@;Mb{whlD?z8DmTl;(__h!CBdPgZSC#1Zrms>DMM*ExR9V&=ZXASHE`ST7fAuV zHa_bd72SF5lCic{;-t_dCA+39lWX1Vc*Vl`(thnxIRUdWetv#wX=!U#ul@AX1Nr#{ z$aQ=1;)U#-oa@)GBP13P5STE>l~6~F?N(Z!SSaW>LUQ%&K&rZ2L^j6@gxO!!QerHg{H>(V;WVgMicWx z`LsEIACUjKf-jXw0s{i}?cL|5b^rCRf1Q(^eG?^K2TaHpl(}`AhgOR)7AxGa3&bDN zeyy&Vmi(jZG?|P@h2PoLSy^6j8aYyjL8pE=vMtZ37N2o1ScuOA@S!T{YCn~@N*|Xu#Sl5gwaBe{w1FUY1BKgt_o5@QZ~X<2c4& z;z|03yP5q2PZk7x6sM3X(Jv_F8qKJ$kK0J}C=7ZO?Lff>B*!SPY|P26x|?59-`v*I zV?g@5-o63sbanNXRnSZuQXisYkvUSP=>el@cw|(gaZX+u_R}}EtY5d(MXhjoRM)h^r+@QK5zKqTT3fPnbBl_LuUxsjd-vXr8=u93UA40_#<^pt(H?6L z;`k0jxUTLl)EfQ!zx#WHJY#WiV1WPLeJ{WD)>|RLAygb?WLV-CIFg?Y8{Cwa>%8rG zfS5J==f3_+c#Zq;$B!RuGfw|$%0D8(pLymP#Ebl2|L31yy>=bZ81Mhr2XNgYe_(KM zFqJBu&Gtpf28R)z+|}KUh2Yn(T|*WWl-3>?FhZjutG(Jq9qHqXD0l?2WMpJ`dU-iw z)Q2oYR>|w`XTf}@KkJ4c^lwM}Eink@=_#D``)^267tqF>KtYwLN zWPS@eO*~{pHF_m>R#bc9Z}A#BYY}YhiN-v8b-Ks~@CmP(#NQe|P4J`W1M=$<^0cH> zq|d0G1Zg`RB)qf~JIg*EPakXemist-Yx+QHdb)d%Wgk9eB*#SAB@Ykx&6~FT=*=Im zU9%dQe{nCdL0|=kB>tK$`aA-E3(GCnupOJxXKL_q7kpoQ*##WU$oPe&)?wk{FKpkA z^rOu!%~e&^s8xzmS4fm`?_M*~C{u`EFIL#~BTgLms$E=Cl9OI~@g*d_@DB)p6j))h zNdJfM*EBfL)zXBbiX$ktjed{GIw^`#yPl4=&c=qwrKyPt38lrw$g}`|WyZ=37epqC zO=4cjkI>qt-M;K)a#cjQb3{0eYy|B>FKR3JObgpaKS1Lla@pJ4`{kGStzNbA_;=r( zI{97R-Mr?O7L=^azI_Kl%c!#lZy+Y6<%rqGYy5yd2u#MZyU#v9c;LV%m_I-TYAlp{ z^Ua@ZfBt#O;WM^9M1HI!;nD4D)MV=J>#sDK^$t+g+=s>>BNKqx+}+cYqfy7Oo?jp{ zeF?i91M$}n@E3*AqW?L8$M6>Srh`9V*cd+An#RRt^X5%3<$m|O-(9_S71dh)_1|dG z#`YcCY5oQ|Ozzue1b=8ws8CGWRaI8s&Ck1j?P_jLF2n$f=CBkQOD~brDK;iHby@1l z)vF>SBajD^IZwtgdqU}Nd4bu-AM!6u>jMel@fLZ1TI7EY=`YgUf&$-}k@jWvjG2Ki z$`7n3COV7qV`)=Xw5Q!i(SLBzR9sT><(FUl;rD+)-brVrVtGpZ8~dN#o|)w4qQK4M z$zp}S{KXUw951dLsa+!?rIA;PCOBzs<< zkiDHurB?d;X*aB0Y91PD>(JN1xmnW;|0ZntmX|Th_ScN*w;UdTa`}Im}vja z8&dYXxOz!KFx(y>)gt|;EI*J=&_8{7G*XMyH+9^;U9w?ag}YCfqf}#OFBcTYLb0#J zhG|juHn!hp2tNG9YK>;~>NN=oODW{DhtPi_@cA|3r-%Ui{aF4kO!)RFb)}$G7onlg zKDz-K+z`dw(b>`5+)`g(TUA|s^~$xv!U9Cuu3EY3=Rg0`jEr>nqeTMJHz%T{<*=O@ zm(TI!#~LvaHR0Io^A};Ng9am9NX%74s!Yu9cR6%`&mdSw6p zSFrdU1wh2N5HDxHXB&TXMF@kzgc8PPDE0yuFf+4k#$VB=JSIOFEz;A-DTKfpiy0=g z_-X5BPSvU59}pP$#_Mlnq^DoHdvZJ4m0>P~X_s*9)p6 zK~YFZ2wM8GWhpQ~!z03dynU=%J@I5=&|e@gm$+GLztr}ajFXVl9%nH7!pBo2|8qls zPHy_-szvzyMADy-W{3-O=!^0raFcyKp1)9J$Ub!C@|BN1`tTIe+#3v@9@@-JX|KPs zad}bz5?@eXPsR9P90}u#2l_8k8#sipW7>g8(Et($MiJJ)e$f%uqY3sEkU~F*tJt!I zrw~304EXuD`T4k~r^gJMhC6k7T_@`P=^C0ks%o0=t2QV{pb3#Hqs=%E&efHL^n~hBk7tViQSWvh;H5EBA)~;O_5)y<=ZwT-o z9Lz7s|Kjt{zyA8`hK44@h2XL`e)PtM^&4Q+G0UI#7NZWK;dXLIJHzN`SKClWht$Uh zN@<$@C62{YEkE`S5s?x9_h0^{R_pfFSBD!K8b1E$KzDb~kAL(dga#vD97tqy`mhl& z)mrb?=}-n7g?4gsvI`1}kwjG2)eWuTCe>0)lZ zkb%Q)=J(zQA3uawr)*4Pck<^|-iA$F5e|7&Wue{=} zb>pQE9zp+y!6&yEagJG@mi|HH1+{K=mksb2VG<~D|4D<7kYu$=t#%Fy2?pVi7^LEYRVy+fnEtOW*hwj+8`>|i3NHMk^Hk^I>E={U#1l2@%- znUs`-mX5_Y+@266VO;o6DE+yZ&$|48jM$j`6J@bYm%oejf3*BBO!`27GWns{SJpHq ztA9xJ=12cEHT^jq{4o?q-H7kcfB(Vz@8@La4h;{5hWfv>eZyO?ZwL=@g-J;*lc);f z;+yqQ^!xt)i(Q3F=px*LTn>CAQwoQeEkfKO$Fs%0;^QwmjlZWAJ}BiRm-_o^{e84? z!@;0`r>^IlV>fH-+eU_TOB2G@u1fIn#=r_h0tFZ8KVA7ja;=E4fQ%J!*KZZKbaY+4 zQMfWad8vD_odoOBs3IH}M=rDY+ms^5w{neDc(({Jgx*&d%>np16G{>zS+9o_lWF^3>%%zCQ3*!hS=R$gJ!;AAR^S zO8@or=-l14nVDPOe*0&L5y2ueVU)tu4LB?H^l(t9hIP7;0pn0(1Ki3YPe}&E{YCyV z(PpwP(&RDpkw_e4V&i`P^FM>1;Iy}-}r8D;o+L=e}R%r{{_^)P>uVnVE@<`*;>M_QXff|33H_<{RLt8tgHej7ZwyB17sh z7pVjJ#hwiMkMWlFEHXDc_`};GL)K3xIcoYLt1>!Qe}6yt%Xkba@qi)4aAd#OZ}GUL z<7DUA$1LNIXA&}V+P-8?3J?E4Hy@utqY+&cp#;5yKwPPVHXy(^EK06W258+kZQ6vC zFQvsLpMLu3)~(yp(pK;l`g4W zS3GWG{?dcy4nF2};KP0Q?Vlk7$?4N)P<`>UPd^RDF5kr4pSy|c1lP5p>>|kYOl~UofEFtcN?W^~^u+q=liDg>=IMzbZIN>p- z?h4=ZC-z^0CIac<-iN}Z*cJ!sn`rQfZ_XaR!dxKp#W$Cw+J6JAVOgxTP8uE zj&xwajJh>WO1YB)Ri(N`m^7)GwSk<*c zxDmhp`fy%;-uh>rS-pC7e0)4IFl61jdGPZuZeG7;9vY5{j@`C3bN~MRadB~IR6vO{ zQQ$9hkXmEs>S@>9XlELPTiI?|D(NNRszv^i4i|{Q2?q*_ZR4^0#lpVekWefhb(A_D zK71JCuW!FS4*%~fuk24G^q_~>N@228#Bo|cxDnwlB}59L7=^70V!XdW`F zoYj7Qz5zi&k>Qc?@o`DXNr_7mQ3>3Nzrrg`Up__J(D%gYV|DGABH^+p(s)|*pG)|7 z0eX|U#GjI2u;+s#+}Z$dc-tN$HxZf>n~u>)gan=);TN%kG^XM&#NJBO5BI|-Lk8v! z-Ha2sfuM+g{Jv?yCj@2^{|DgXb!4tink7C?-fB~ial|wtagxZj3c07V9W5WW5P_&W z5&Ap;-$I|!;nCLi){7S|9y;{ZwX4^9^m>fLGq+~$*zp3E2_t?Mgq$q=p^>51-p1nA z!fIV*uTc-x@2&Dp^ht?ykC92`Q{(S=_}fZ;<{^Be(SXFDMuP!~FT8zxJ3TEU zb$KeXH8nKUpZx9w7SU+kv~cT-L>?DDJ)4?_E%h5sBUM(m9s5R~bpuriIQ;(dV)&Pb z`+6nv-KvNPF(g0-SCLMq`38)L;9SoA)Sui$=7V8GOM0L5v7u5inDJjNY)~0DUAah&}2W8vzUXTo{N46!*rrQ2|41FdDdkbSm7kQoX&wW06_KV_&2*7 z=fTBA`1jEV)Pj$zOQ-KQ3}SZNL+dPaloA0!%SHOzN`CC@<6?rgJeyoxQrq0xb@B4u z)MZIaU4vv27_rjX9KVCzXeijEoyM zZz5?=L16)Gxu(X3tgPEh6O%A%%f54`sHh03a#y6KV%_2P?c4qR{gED!5kjPk_zj2- zUfv_6_NZ+#+|Y=?S2nM(NPnw=$TZ|f3eR$IFfya6RO+w3`YOL5kE(F#dtTMQx?#h5 zH?4LG@`?ThRnB|+`dV9CQR}F%u&@OAwoA*9YNMmG9gDUxdGBktc1pL%FIj}I21aI1j?@k^( z@JUH|DNeyDv-72$FYMSJ8jcc1f(w|_o$ef;{&bdY!=uCZ^bMD)&fICZ(Pd~i51U|? zDy7Qu_Trt1uf};MNbDgSw!wd9=|89PgJs>_x^CnTLfp5DTJ7oSi5k)qp+A^l;qL;b z4=D}2>iGHr9frnT8=JOLu5hZ#&+YB(#2QYuyH{|+lJLZ2wbldvSwQgh^G1rUYnQK9 z)mC4)bn*Ee+p+daLLobkflqX1gcj8nlYaKW4$~g(Oh*3<_Zxce=JXZj4I2z}EAFS+ zGP|K}o&IjFG9p?L5GYZy@^l1#((r#MKc?Ou-Q|ltw{H&h>REDNDjNeAc3(+>gNv(E zaG*3gno=!O!xvwa-fE89FCzD0*`T0bQgY&|l^G|#`|kSn8!$srr#L$&2gn)?{g{c_ zwsq^PukKGuPEjkJ1#SscvnBq}(`r?epa1g`sdKNsVtB|1ud<`u&C`9km)AxVli+%j z7&Za@DIiE!+kn3eh(#V5P!5*uPF6mrjK9K3k+^gzyt+hl~=SixAYnN(c}^S93L2;5FfW9J!46H zd|+UZrU!TJ=8_3`yHXs}5CNAzEd z^kH(uIvr%K=iAe&Kdssq*BTG+zsx2xa>`%4boq-fzJO;L1)u!`ymxF}zh~#F#8@8% z%bZ7YMa>f%8Yg~`mzg4z5s)l)6u5xA!nlIBU-pX(5vmtJkEXk+{nD-jouDfjSe(K= zi|`+$4{CfE4THMwet5bR3c0JRN{UKi=r9)PZ&UeEJIhz5#h$x(_u`d;f})z7+=B4% zSU0&RRw*)>Wqc9$1o>xzOuZ48Yx;b6`&#VZMe^C0K3G`h>E*R*jazJd+{%?Jk!Shb z`3u#Rl?C~QC}r>9V2=n^XO(izsx|xfzr1?QS`VZI6f0(mY!jJ^%yX#V?dy-V6)1Z$ z(%Lj^FiO=Z#x7pC$X}6EQm%r(XmjSBcnmD@5Kx#O0uJ-S7}*!eSJOZdt-`J>8y+hLlMXD^z;nWLJ18I_ww?@ zJOn}&G00-?!9W_~2z(J|d_MxdMTuKkg4Bz$d$So@)u691?Tu}vV%MCkJ%{syBl|L$Gny+8z6MOir_`Y)+YetCKm(Tf3e+P*~>*M33UgsSaVboEA zf2FId*3(z1Qrk3zln-KnR zD7$Hr<&IiIf6ahNXYU|YI{B(K(K1I&-P4;A6ns9#?N=t1MMXyL-nHA&QFip`(URig zZ;u}*gR*zunl-CkwOS-kcm#b=!Lp}U-`>&DRNsiO^y1QzqT(WSTP>|E)XZJoq9UR~ z!$M-BW8xALu(A?@p>ff$nWIJebK%3MAk5ekn&18U=MnU$>nG5DNrUiem0actKHa$} z{}x5UC^A#@=cJxF{>~)<O|IIDMe>h;{gYe}GvCHjy9B zpNF>JN5ChMV%QKq7A-)A4StC2|GxXVbXZ+%eU^y_)9M_m@S=buz$anFy-3XhOJ@e) zb1KXn{<93fqqFn!rAvptI&}HU<+ipqUq8RCTerUO!V9U(meXo+o_msrY%P9|qCdwU z##5KEv!b)K)6g+IJS=b!EFtC$7dPisbyRthTbXT>hreLxPp=LdSW$re9&0Qp)7aYF z+HV*@a(XwdyORvnrPw9x9;=VBTLACrp$`d=74^o|4~Ud^Rx2W+;g%x$U5A8FX|t{XZrL9*Ucuokzuxkl#ThI%dt`c z12#EaJ!jbA6vTcU(caX@Oox>GQ zL8GICAfQB|w6_zcF7Wtq<M z_x2(Bcx&c17gse4Ko~=v?b#0x4a0X_Sy_o?ad1XgR#hQoO-pNQUvDp}wM0ZjVuRfo z9UUDJ5#jF_;OXh%q+qr9aKE@M(tmc^FST#MXduBO&BeAw`p*viL2=P!n~?su*v}%H z*!{fg!y#&cq&I1sVg30~_*{NSs0fqC+n-OZ{nM}S&$@H#*s*WVpZ~tPx<;*1tzNTY z`_`3fGopMwRS!)#gcg9%i;~9UMea`8R?jN>4JHWCjv+Tc&{*V+(cEMzVO&mF( zurz)+7xU>X-^rHTrXEz*A`y^dg5$A3^54n|@;!d_8Z?=sqN0%a;>DLXXrQg_YCMz#uK*#04@6qrH8NN-A{thVPg3Qj2GCR`%iv|ME zSOY?kk)urN;wn)fAG8%-)0Te+xf~B=aZ6l0EP`c+Qgl=ykmWDqFE?-H2mIA&G)M}M zpnf2UFjbU^3keMw^C`0zm}&f}HV<;gqwKg9iv-e<2E-qJF`ik-%xdU%< zM@NToU;uMN8np|uCMPB=Nm-VP+8utrz8V)7g;I&KNURIsM7EHX_dtvEpYi^Y`g!W} z@o9M$abb4!=VJR>F!s-V@*`M~Ph|UL20C-#4nxTv8yM27Tw`^Mb z()Klpah|SfJBbADV0tKZJ$MvvnDj->g^w?=3*6W#LXx4xKZN@TbJl;cD;cJgH3NqU z|3&zZr4Kl!?;YsrHG*6kjZy`-GWtKFAQ5ko{(_v@LOzjQBrYZ}IWfGbq`s!M`A%-} ziqvGaYk-3zOnM0ud}<7|f%aA#lYjgcFR?ni*nbIhA)3rMeV|d4N@YNRKSBf~5{yFR z5m<~CiDJv}DYJ=cGB9{w$CQcq&evI)!rCgQh{FaRAc*5#ixdst83QgMxclAK%{AR#jDr5`0-% zcd+QNt-ZakuMeG>Qt6B$C|ESSeED*W-TeLiv|10PQh@+=9tXxb2%d|=#|}&zf9mv@ z94*2he|*Z#d204^PJb~8hJ|OMIB>mWIV`Y~sVY%O?iU@4{P5G34xHa<0YvcGi{m&< z9TBehO{c|!Q-)8#2*~}S$R5GqBO(`;A0iHihbX#`Y(p4-w8P9owgWqGbQmn8BV)(O z^9#cb-e5XNpThtGvk_J!zzh%5-Uw>p4Vm$cQ_N?KT{111_n1Cmy&}DuX^8&82E~TP z3}~p-IfTEFA)LiQ6g8@>tf;B0MK#a#^t3&D_CELAHa~wq{ABOKn8EkNPkL)kzDLoY zE|O5)V`v+q5)p-cz%~Z?k+Rm&0fI4O^cS#Q2=L8j6IOg96@gNrL=ic;TsATKKTlC zk`w$9JBdOj_x6_g`Z-XkWo#3|pI;~pK-q0$N|)&Z9J3|<1dels5bW(kJ}y0etDV)p z-rmUn#Zh3NPXPX0z-Ep<^8`N99Q*qDXJ%%CLCAZ4ErNe3FZVdC$NFf#&>sk^X`_E(H5T6btc{ zEWEZ|`x=uU^mj7=UqGFGJrq97Y509%h{FPhy*)w>UfA_yx#JAEc*)quS?2l0wd^ce z<8%YA!8!T|liOmVQ@n@W@aWJeEOR@NPjMfwv|uV30@v|pLGWQIQm6sD2WBJSv%7}yIGB*gMvOoWT;{OqTP=5SS9v)~<>o;%o<~f9g$nxH*(sgWfv#cT z(-?=?^Ck{om|S9_BC?i!iy)_o|NMcE#6z83U7(>-t8jC5qggx9k!jV3%0H+7{J~$~ z&J)64sl*Xk#gBY*^x~z9#U(`-&Yuqt4}&!$P@LWZeK{B}_D#l~e7Ikc#15XKUJNcKpd1zNZV{B^dFUW)Tfoh;tuu_T4FTf>j zr7|oS*&K+KPeS|Bb?I~{%xLf6>gMX|=7w}9f)G9-_%k{)5wjhC8O+(}esJrsQhy`?*Gr;djQ69UFX8s-WLljdLc-F zy?0XVMHD4c#cGyqS(5Xf?H48SpTx;aoagf5#CG!Xr#LUNow%u3&5~u=DikHL_fD`E z5C98$+g&Wm7VP4E=iHgWf&{?@unR1}9bl*2xpU^scgj6;=N81z6nj&sD^=i9U@yXP z4&4!zix``mUf=+gxD=~X^e)2eE)JFHDg@bxtdUCbKT+iPA7?1!rwCkn3&1&~i1;73 zLa5GXDIbx<^(msdm1mPkBNTjjGDQ# zi_*WB3b_xT(&;Ib1P-Gnrv!e4JtPn;UQRN5T~gsZM8MS4=c6@9~?d) zXth}}*S*DP!mHPBfBQ~(Ma5gcehZxokr)gFFz@2!vda|}mG$U>?e*f`MH9wj5~Eo& zW+Jf1XeR}Q`FLwH7))9kH$yTziN#^5Kcw;zOWf)wM>l;41o%+=zzPy;{UPm(4u7sz zR@{IP89cIlH92RJqO=u9NZ`~6uEj2`BY${2PPm0W!XAw9aN*JgbZn<@{63WCRL2|e zBU(hAEiKUU00o-Tg7Z{^i$G8cLV3esD1tqT`Z$23+=%%&)3AO%hni8zlll!SDu%0{?>mJ8U5%!uN61X!w##TCFBZ)p)=5MtDRk)EDN z;3W1b)+1Ocrl$}P*U=gNQ>(QY2pAADZn=W2!DF%y1`OnSGeel7}rKKlP zJGpDuE=)UsZ>Ph}zbeI$m6iR#W_?aU>*<2 z$X`GHL0k|Q`=VN9mkS6v(lG;Ex)>xfLW0CF-(K*LaQqV}v6e4Aue$VA{qoW2&4!gs)c*){bt5%_B97a*ja5}A4E6OuW zWXq);3sIJY;`P5oc_Pa+*9`IkV6J3c@f3W8Yu+VyKk4j=Jhyf!rAz`{{HVs5_= zEiy1m5C!%~M(Z{N^H>m{BXFl0WVzEG)c~X7m#S^4mX;%W>{51-jzqjF;0#?&8>*$f zDL%*b#1ew|ZkqgnPIK^%6f7c!#~L{(%IEl;x1xCmj&U^w^s)xg>oV%N=pmVGkN2m_ zTKx5j|3%S&F5zflfS$!z&@_xzI<3#|Z>X>D==7P5n#slX!fc&EgRV|QAMJ`Iy%qPN zo73B&2+Elq+LagD#ck;tW|yjwd5;q5fUc$N;>9FMKRSE>o8KRFc`#K<&|uJ}rdcrB z8GZF;7?b!51!PSX`ZiSkM7#U!EXUfFbB-LpeDZYpk)s#atT>;YKiP_4gJ!(It@xhu zR&i;ZD%fG05WBRF{IP`~L0q0Jzap`r{TSebS`kdSfkAlD6$3--W;ip@Qcb>36!bM3 z-K^PN@4tyaDqLHI=7B0TbzT(Q5sPBs<6g3j5&w4`eT-XTvCNq_&xXP1EXLPgef`>v z>+inv?yjA?P^O|6DO!i1sKwYOXv?@_Q4hCh`8w?n{PAV7~xI~U`B_+Bm z^+$>a=-Js$hTVU1wX!f;Apj|mk)Xwed z1cd}tJq(m_OtWiAoMGfFod%zy(QgB9&}e0d!69f({W$2I7}M8dKy!^q!5Z{%j1*+R zDawHG5z{$iA8Q1XT7;1rEd`T$%Bj_mEu!NAMVVUE9aF4{3$Wl&1fEjpN$JFoRtG{@ z&YwU3lOO%Kyt1QrNa!1tVkJ3wRj^*`DZRU-*mS)u=Vi&YbU?*s<^0&T98n zU$7HTlxj+!mAh#3)X!M;HWJtn=;LZgvcuoj9_j$TR=w4vvrwBgqAAfGB7K%7KdpF7 zp<=^GA7!csp4j6CQW!KABgR4}oPL*n8=u%i6YKe%2#W#I2SE8 z6&5&GuJ*g#I*Y|LuE;X3NNqBWBK^U8eN$tj$K!#wai%%Zz@HtqFkM~`qy3IX{b!zK z9hbJfHu5>n7!&`4HV#(H(xppLqG4jv-@o@>eSJNOZM|4d1`v+O0L!=d1VI*87$8<$-d4qvaT zX!Un=AzZLK3`H|CW-QLnDzwpu<)P45IF1YdL=-%$T({Tjefu}R*}HcyYK{@igDVo>fh~ssN*|AIGx{Kf)XAz+z zFE(_N<9rItDL&`Wotk$bNT=|f<8~3BQwmiUV_E|(2EL+K1l)&0e+2s!_=_eY6yxJk z+@Aw_m&^6iOE2x-v!|}E{?zGHb7yB}XE;dDsB&6*E^HA%&{JUnG?Y&7IrQKnRepb= zBmBt4;Jt=+rSnvv(jsQ=qrD{kDDiBHmQD*#wb2T^2@!{ zNb)*z9%(B!l0TAf#SGK^d(l_Qgf?&6snch;6))u!T8kaQ1M9Fv9Vv(osbMh76Du%` zhz+qHf;I{nH9DgKRk>P<=y=6(p%wupe_x^MS~?@eg{a%5co5fe#Hgc4QG+$+z7jzs zf=eCfi~3}$GRD;)!PlVi6;9v?$Jl^0GeT{$r21&CUS_T+k)u^auBb1@g$OX!AcFuH zVJOA4R6R}CX}LB^fm(=d&fK}@&Y!zhbpx;Qzj^1KMN5{T6&Rx|AtOU94x_?fDKoH> zYEEBPye2QL=(@WS)AylEeSy7jV#c&gbEaTm2=u#MovzZ_6PKFKx;k3$=y~>nS-JBj zIj0)6X2i`yrcVS2E=AiU%@L*I@X^QAEACb=fr*adc01&&a3nL)OaB%86NG;j#9;Ji z1o8-?jFOA`sJbpjx@? z%H?B6kE1!m%9ShDufKQBoY}?26LWL24Mxng)9XDV_WBQpuc*sN`+rn&HP?Ah?YV}g z%Ap`$uh1w`SJAdMmoWBsS`G7-}wl`BX2h=voU_>C)zIS8hj zS_6XtuBR1(as<~1xDoXu>L#)x zn#V?vq^O>vcuJr>+?Q&V>00DPxK4`{p(Er+{Eq_){W+v3>ZrV?Yn3`_PU3bZ6wMO= zc*@8Hy~X{Q6QaE0N^MOI#*yDLe+Uyk5^BH;z+#+bfe)aR&?M}*rX6SL z4geH)!gW$LGKK;sf^-Hy+9c^mi4TS&@%y{n?sl|UHk%BNG@B06A;(BqCh?Dlexmu7 z(`jEgf6{>?7cN)So+!Pt_R58v+(`zjO?VLjJLxg&dxFQeJ-$~kth|kkQU1{yu)d+u z<3=+P73LN~CpJCRZ_q+6h?XAz!xEH}1t9RTS(zyodw07hj2WTJ%QR>_r(7!K6`N#y z!lfypBV#xOd{C54C@y*G^G{u`y7AVpYayiBbLOmHw{F40MN=kE#$0^pZipgKh)~E; z+*i?PnTdYotK=S|`p?KDihjaB!|a5ggs^C5gz!hTvWS0}2U-cP$Q_Uxam*rALVzbL zQ-r=ryUH1v1Q*C4BF8vfS4^b?kv5tQxw(0n=^6OikKoT}Fw)Qu{4=65m>WhRRHT#G zHyIJ`VXa31$q^)CKe-+k4o$Q+pvY0w-lAey3JNI_q;X&nM&eJd=7qf=nSw(Y4iZHx zVBR7RK_WJ2|A4@g9*iD?NCF>`pYDnjJPC!&3TU^&(npGvTf#?VAXpeUg;aM|R_2qB zJ@MiDTN)bccJJDC=-`3Pn;#Tt_CZwfHHrxP#9tN;c*eunboS|)GfUD-(5M7YgCW>; zYJFeCi90!6CUIN(DNUVCJIg=bTk)x@wK0H^XI0(jb>@oZiyJ0CJU4ftNoSHtMQ)>~ zFLK65KjnvGCB1|GqmB%XmD{{tv^KHZ(emB~t&+ruC%Y{^BgQ{<0p;$W+&rK3H$niT z27jyB{J{MWy#4muSFV&FI&|>liIW8d1!SAjB8xEb@CSnm$}+dgRyh*||0KAP*MEg| z-ieBTG+DcT{W^L<+icdnyj;`-@MYxm#Ptf5-o$aFoQVP-x_DILqd4yb>wao^^{+6i60V%exS3fs?1YU>Bck)q?Gt^ z(S*6BXma|5R3oSLj(-w`f5qB}M`|sZv@iBJikIP|$dz(N25StLFZA5e`cI)hZ~{5G zIXPLmXt0Z@9bviwdj`G9h@c&Tyv}4YBZj9m4)u`(I|fuB(;;GUB_J1(HJlA6(V9-- zE*#w>jF&2KDQc%C#Z-qYf_dbn2pwS!T4{iPT!D7XR91#5GuLf%bupbmd4mnFUejzL+BCSAJ2igrc}YZCuB>W|H8oH?Ut+LS_!>3aU+wbN(L&zL z1-?6*6dm=wC}(67W&Ib1BT*nS^kV|i`ZxJ*N&19@f`WhrBPZ0<)VN#SR;w*HFV|wW z(x)(yEjs))dZW5zYWJzbsy0vPN||c;N*VB*w#uDl5k^NpsXsjk^wxhAx>?T5jPwj- z!006pZr=3S&pw4$Y1F@=thfpN2+1e$zXcmgP!Jm_eDEO}0>(eQCjL=o(bxbz(r2y} zF8L^OrJRWY|9Bx33lpW4OjL%6eFU8lpT%j1Amo*Nz(>k?aV0&F!l?v0712D3Sa(Wc z!MH#Dvp-w5WGUD9awRZ_h!iEF`7Sjz&~XTeZW3C=id0{Wh6EH+V#U?FR4(8S_$Mf_ zfC|A$s7ebS1`#E3OIc`7JO?^m;E*zj=b&{D|CBDB;N9LUafOn`hcaEhF{jA6#Fo}Q z^rc*V;Y0cOk+4FPykfSL(Ur3DZQHjmUbHwj4|X9roCL%_ zl7B`_$Tep29WC@R5+>#v#;`_alclhr5YBw~_2+KJpUMfzL9vxc3P}5kef5J6z6!Lp zwPBblv&B?WQY_ag<7%cxt0B=BJn_2k_#tuVV+4%GDo@ZCqVLMoTc2BP07Y~QZS^-d zv`tWDiN^sb35O3ig(Ttg%eCl6pY)%i{OCvjN0EL?DkrR+){1?{AwCJGptshu&p!9~ zV~-&?=Zato*s&)E>{8s0T4B*vL&}DVU9>Ic+FdlN;0oK&)U_3D!+PuA5}?>~I*o+VS$9X2$x7Q&)0 zM2a#SQQ$iY~q(P)hx=V6&cQ=fZ;ec(7?YqzKIDY#V_B_vh z-`9P;&eQ9AfqI8xVN&hT&!k+c2$F=0V`~PkK)ve`d~0qFRUeKD<66cTm+d!EOs;l>J+IZxUmYzd)r1;ynX)Rcd-}*8do|H%@>9gA(sSrgR4By4I z3`WK+Y`$-I-Ggply4N^%tjw5(<5S=RBMQ!TAqup)FdufBBV86|NEsO+zS?MqN)p}MkmMW=A}yfa;_U2cyBAUs5mPj|C?@dq zQO``V-SLkJbAdo~|3duv>p2Ixx$u}MJ0PRP6HZS@)VBJzoBvPK!1WeaZ2F1qhfMGK zx?o3G;@zI72}7@X(?O5ON|Nj!08cS_=&9^VuHP9=WMmXx-h%k~y9))K6riQHz6{F? zY;dq88X(+F5fU*!Xe=^AXM$nloDo0*A_PPt-SOT?@6C=v{v0MRE6Dp39OZxf&61Jn z2#?@=x?duONlU{v1m&N~DDZ(|7=CdbB z@R%YH>k`$^A(k9ERh8?atJgrP!IXGkGjlKgV%oj}8xOMm;5cw;G+nMX?RNN^p9FLk z_pA(F?wQ{QI~?1V_4!9L5-aN3#0#WUMemj)JXw$*YU9CC;W2fVK}CCJ3U+EPUzy*D z5C)~06|+LNNdQe>Jp`C-d)U8qcGP8u$y(Y;jV6FQ>vjJx21!2+m-cJjG8!#)1;GQo|GoV?T=yV z<_iS9Z?PlOfrcic3u2#E8%nCr2^5RI{P+TIdbXY|mGdA67|l4~KZs8ln}@i;mi!~b zVvpBgni9!yT>Gav)v7DtpWh71G~567+{d#S1O_55H#-H< z;?+!oP>0*kP@pKRpuoinja_g$h7RSUUR4e0f6s}+aU~#2zJB*A5|`Q+DPe@Db#eR? z^(d3NhhY7a=&9XQQsqcu;;<2-Dq25K`Qubj(QvX;A4fIWa12#ql!6ksdXbuoKh1Yu zIaIHecnavSQ1$&=6#GNj7j=$iBHFVi@sm}p^Xqz*9uB{t%*2%hR?J)Ews+P0Iow-K z?Jl0^%~>@7Jy#t2kKm)^>G%SH!ur+D5Mq1!p4jBz+3Rewcnkbd(DgkD*S88G&B5sv z%3E$0jrIs-Chw#NeZbS8n#bh7KNzEQu%AI+++cz7y!H95Jttu*UlZ-lNzEcERw%9y zbO{ijA>*pwx0c@6&^UKW^P%8UQqLrmb7S$_u4P1jcvR0gKa0VOQJNq>3AtI&q3M+D zahm@L%Y*7C+z4VEL!b6dY~M8V`{J&Lm9D`AgeQi{86`NK#>Q=C*Yw9G(rmM@Lo($> z=v+!#?c<2z1M$S?GMggb9I7adepn0UT!>03SG^L8dmd6+@?HOvfIW&GqOnCx3&oMQ zNa$573QaGy|0Bc%w-Lej^pAOjP>mtuREL<@G8`&O9?|_$W>2BY`}N7o2>NC2LHyM# z%G+FaQ}`?s`-{vTuR>HQr42f&K&B@b2-{I;beL9VJ*t?SzrVe3ad$Uf`OoM{zh%2X zD4g->Yu@9XObe43IYcw<16>9C7FBXBa0kptl@|(F84-OE!2mAw{_zb9$^6_=NMpt|{2wlc5AO(+aJSj3Uvv`SG@`Q&LxO6e)(`;kdKm zKn)i0Ek0To2XS)QuR@jm-xGzB&Bio}xW%B|{^qy1Q=%dP@|&4_i7z`552}d;o&3i3KoaE0thg-dUTF-atb6n=IH%^3_S^3+5E2 z#7hgzlb4P$&ty&#KUgl$oICdkumxbWbo{Ma^yNbTgU$AC*c(eUdaA9=)3}unB=R&B z2a|I|EU@_4gz4Zd!fWyqZ$;xZ?dsoavb9OYcxavwCfe!O9|P42>Mr^yhr{lOWsZ=G zB!f|>@ZxMXYrNcKR?@~#vnzTj9PCgYp=f%^qvIVNlC*a+-0xWSg87jmFhTP#h**f` z1Z4btC=NqX2rMjy?@mh-jn}$VW9jL}N=ncA#!fy8Goqrtf^uf_UB|_o1Sg&yXw;DC zIgDl(skho4N)fZovESL-}jDw99c1b!Dr8-rq29{N<;#Q;M;@1 zEycC2{2$0QSqJvXxe?;wk*ERl*ZvCT8m?OY(O7j<@?YEDfoY)NP?F*`V@PtMZVb={ z8PBSbVdeKT_Bs~3Z|F4LD2fJ!exI$ugx75wIH*g75nSrX=iUY=peT8;3KE> z=@{y#XoX@+V}rB1dx3R1KR?mZ@mGG>TxZ}VBB>DcXWoIbbn5+&3O2iwp_6i4)XVzWMEb8NHT1tgww zNlN>4oKN_>6u6hjWnvd-SVp#r{e`qgU{Jn+?#}n&F^|nz$~B~XL;{dMHCkUa4daFQ zP=T!W9~$i^FV9cJyHKeKY;24(DhvzY(mXy#Pu@UfcBQ)q7t=zV}V)d_ZK zA(5ll-1tFPPZP4WD>^P$Ks*rfYMzA)<)}u7jzr`A&Xh1E`OM|(X0a7($KBZ2kh6(3 znqO4^u2JrIulxw}^lnl%i4BE21#&eX*bP^aT$d93XJ(+`tq{WeG|&w3B3Fhat{237 zI3Pcl8p@+8kw9wlAl}}}l<0?8T3RfekJqjm9~qk);Waog=A*FZxgz%U^>2C>LN7P_ zO!Nr$x^m0ux&==Iq>U$t_0 z+hbH;6oDp;D=88@0zy{nzUOI7j}dd|C&w!`+$H-#X15V8uV924(71l~pop9d>>F&%BQ(hDM5sS^^q4ph;3P zC%ZD7He*P&99@eI#|pd%6qO9;qE$h%FlY$wo3->Q`;Jy4_i&y3^z{4`FXFLj`f$0} z+2Toq*6vLn%=Y?QKdbj-i%pUp0 z#Jwe(N3>Zvp<+(<$qeEBP&5lp9JR28O#t`nAQZzY-9TA7zRnqGkN`8|jN9Zq? z-tJH&3=;DBmOO)Oz2?__yKZeVxEFxlPte($0n`3#u1c@%y1uTMFYA!+s{=NHZvr|xmdi^0Z)NO70v|>vmwRHL+Bzob!xwhQxGEm&u6472u=Y!6lJZ=v zUGN*D!#J6JC8fwJqZ-K|_!V}3-2VdDXn%8FO%#Cf|EQgUx% z-UAHd-ZP0MoHH2tS9y|`UlG(=b`hI$SjpiuPpTn9_UAY0y*ka#PR*JmeLJ2!SJI@a z<&VL5oF-Y+=F2pDOikcBOj&kYEY`VLLShd!geOfnX}A%T7SRP3NdAI9q7cj~IT5i8 z?<6lE1UAcF5PI&_+0kDZj!SI)$S@;t+hQx*sqD zN2US(CZPrt`Dhn|Cx*F0QV+p~R*467)sQ$|>j+w}6)I}$>L;(HzRcp%EwPF+@GNN} zd@SS|NvAgiINd2ePfoLzv$Qs7-=+HLE|i1CAZ^i0`2}C?;zqroN5fKehLZpV`T0|S zG`Nj!9j}u3WnNZJT3H&lF@cRdCVhtvU5v^c8(afP=h%--y#t@dGrR_egGM&byz^>+ zAr;WDvc_jN1_$ee$A|o5jg+T`(rjEucK&Yh4ffv96f#PB=eFX3c_5z1l^|`ND0+ms{QaGu%8?-Q zfhJ)wdUUKpM>*+tyz4_nZ3zx1MI$RWw{bWEIr7DJ{Z~!clM4=fb!W`At2?n#zFSv7 zbxZr$**^mp(>x0U^DQBlp|)QTY8=?JzMl_sLR3g-9lvzFa@lb2Y_UOpMt-h4g;}um z2v9?7_?6jjv&7dSOf@6wJvu2p@dOIO->&2kv1M{q@}s2kn3B!+$f){aAVsPxB&B5B zsJhMX0SReLFZcu$Y!~MT^5@lj+u%6;qUSdE{;Q8{^FYdVwD-A{ctUOhb{k^3z`6hM zV_0gRgaV>pnQyO7hF5Q(KG#cK;8DK5IcH&@@|Tc$$}ng0@kuKD-(CF2IY4m6_1O4du`)gwSOCUC@4E;AH#oq(p z%Mx}FumsQ06nvU;}sqt|BpX zpXE)Oy0pfOl}o^QOpjv-7iy|&?wZhK3rW@2 zUwGsno$^WO!{<+a4C2+x(kby7{;D&x3Q3Tj2lr@xsf8$=8X@(I2g2+1RLNYBuReS3 zgPxvLEuMPr$1(&SBxASp3(L#y>peDzSn|6KZ(XD;^mcGs_ogqv$!0W%5iNvd}|S+UuAPN z&4|>pDT_uvUfR5=Z}K3Pi)Aa3YOE~`8&>^A-R5~aOuOF03?`b~1ofVkbP-wf2t8YS z@d%SVs1g{Fya%}TKyS1cpbmiBpE2Fpr!;M0$N3=?+XGvnXEn59Zgk4HJLATFmunC0 zW%)sSG3WG>M$K{%%lZ||+* zHC;PU9}cby{!8Gu>&rAlzHsWhy6RZNGi;QY5K;(GGI+OMV$=M_7;7ngxoW0Pu-0sx z@p+-L62=oJ1JL@hGBj4lW`y7q%=m)tCB`VEzx&meLZT$4d?_d(3D0=<(?JU7Tmvt{ z+RcOm72qS#1#OQw{c;|+-WRr5jE0@q9&BkLE0)S*V`DGZJ+`4XV4d{*;N#7Q@eIxJ zkviJ)Q7VDrY^zGGZ(Kj0x7k+DJVp-m-;Uoul_(j3M?qeh76<=S1dHnno6AHNv4l{w z-~-~-SNE=$mO6bTo9CTc&Ef-qT6@3=WVq4q@xNIeR(FHr#+AR#Yd{w@d8zEv-W0Yr zgPb1nOr4YRTv}x*=rZ>&*3rbu@}DmjmqTwG3oJVQw2DqG#N6l7JWas-o8smcpO0XW zs^!{??OxEoqe&g$gO8e8O!?1~UX;2VSggrN)TATiVw1smWxsTGI%w@>-G|ic3$r@? zQ^o^Y0-Ua`mZ=v7L*IIqjN)rHrs;9yK(bJUlu+Q#zM&ypb@q`%DPvfk*emxS&(kw) zz1hDZAA#40asnr}B*xzzj#x;3j!2J+C62_H+vj^}kR8k1q@7)`;Y4GXr3#?EXIJ`8r-ZX8~4^!0+!3g(5v$5ZH&NXo6xf4fVM*oaK8!5|bE z1VjD1HM}3dqOki3v6$7C=MZdrLCXJVBFd}m zV}%~7wezd4qIvm`C~ebyHE-CRdLzzikkgJ&Ag_1BvXWgP7%9&O8Ump>Vl9Q}XjZPlqS*Z`4WboXtRxDCAKNXmPUmUdxo(p zqr!*QA;b)J&^aYxhl%p4S|Dh*AN_!fRpba(QQ_}XUD%KAC^aWqVRN?;`~DoT1Aj>#mX=meR0B~($9iSCS!&z9 zKX@%Iggp1KwcRfG9={G9aCK#&>2QE}I#==m!5@q!w1ht%9%NMe7}JY}CFzK7tj>A0 zRU#k!+!F#MR6_qG9FbW~9^WmzIe(Kw_#8=;u*9SInkr+7c@m>_$gd!&`rz)_3`d0$ zWrmkNR}QC^i99HhZrsCO(Q&BgotE_qpSU>_!aLs6d8|@ZFdRVnR_S5>%?mA&k6%}q z2I|6~6C^w&yY+kRnhUpAO6!a`I;)L zYLRlw`u$`X<6v)BW7@p;2mPRu#IV_ZJP}Sy>0l=*V2qo~kj`J7)c-{o zjJx1bWEjvbMgkIqDr2G0<4xd(JaDUF?1LrOo;=se|E;@XDJ|_?T5O(TX&eW$jwi!m^)Ep=)SRp+hdoElc&WSYkITz>b(!}3(n ztjcOKbC1!2GDMPQye1tBZjHZ?*Qq)(!~gXtWYo6FVLx@3FPcOwFoe?DYm#kXdpp+cc#fs6z$V>6E@KN7bp_ZB0s3k?6h0w5jk<~gMubEu*9;U{rP3Qg3}iYRBKt{i!j%On=|5I4SvR5h44Y%X+al zM>pl!yQ*|NrSX{umGo}k`jUt_zSqeN$ax~^GV?m-(%C1>jbmls%wAbj43tjIU6%t0!2}NSDgw6KLk<@3R3HI^BcoJHSo=U(xmnTLA&%lrTA zz*O2%_7AUze!b{kiB-q{mDH&&R;o8KdKoYo6LMA-EC)hPFOF%I(<`KBt#aV}>pp|B zTMaS2%-BtTwI7M?{g`1ndU~^PD}grm?Vi+<5+4O?IeXa+lUv~INQTJ|{^RhI2eWF3 z|9uW^Ef%fp>yD{x-1Ew)65MeS#JvPDa&t>< z(98HD7q(H8V)^%T8GaXQ5N9WRoG>o|8vcjm!F6KOWWYwUDB#itU1z&3giV5@I zR&btHA74g*0G70Bu=ie_{t>#wEH+`HH>{T@svL%Ua~A4cQ|(n;;`FB6h>gQq2@85J zu`?lJa}mW-BQtdGjTTMt;s0 zOr*lyJ?OP?b*!9a--odW1EjG+uBK7e+y&qlLdjK(%+(BwpA(;ml~b3*t>7m@e*%H#VL zvFsE>i95mHQ90GfFg2&F{c4;doV=!i8J6n>=WYuFUF+$*oi8Z@@bKcKab;D|Nl&nU zb@@T^yJ)|iBHc8f7F@1rk@JU;Ra}hkUMt4a=WN_T`?6=taQSzzK%xrbg$MJviak#@ z{K6g$k%zu-BG;j*y?(1!FvRlV~W~{YC1A6Zb!{K{!?|q*lLIh#@Fjp_W4m z43LitGA$5vZf>pYJ?tihZm&derRQuVojmCBS=NDXhmHup=+ zlC%u3SDFfn`P2Cy1G)fB_rZSv&;36c37c~Nn|Kr(!V0B~jckS|b)v~A>}$*!GI49wpNcA zng&6UwC*Br7LM&!@-4*vB2w6lb%YS;ENsJoer z5t0J62a<35{}A05u3rXhMXl+GB48i%S)e3*FT~@y?jx_tElfOTnMZ-Xh1N!YBK8;} zFZ9AZQk&R$(-^M_DOs1U_2S}fY$NO*D%eu-JJ6^Y=vwp^?`kD zCTN2`{ZK9`YNg0d5kXwlmA`})to2^?gFZb3RP{F6EKOutB2JANLJwxEt2McpS-=}n zpy5?4q`{#e@D>*cj{-jY1A^aws;jsji^ZU73qp_Aw-H19p`Lq#__bv%vw3 z@39T2{^(K3w>?Vrtv`)++dARw)zBnKySR2d8*cA>k|E#}a&_T=0FH{LqDwTKSmEnY z6=ouO@llDK*jPQdBEk%A$l`ST4WJVE@<)3CkY zZ^al985bkUI}-KKnJi-({kc2O%~(ptY3&o6RAsu;V+tJMm}%7$Vw~6Qm@R|>`w_E% zIB0hby#4~YR;eG*Lsz)3H|+kh(3Z4#r~2p`2RHUKj+E)Onx%X=a@Y6Q-yIzgve6iO zLRrf`^~_2vTbjC`D`g!Dgj`XSU!*?}Kf%ZFN4`98{DialB(5y$leIATOq|K z8P#X#_ySbmq~wtLsZ$UFq5t-n>iX@|NBTC(1(&k6P9()(h7cH0cCQt>;WNc{o9D&a z;#d+8VLR2;Zjy-?7dZ<=+b{sSjamiVW0sF)4BH#0%;K_;FRgNjesE?9FKKrXyJo2^ zy44ow?aeQ39r?Y9?2ui4VHHEe`OPK+DQzZttKJ(%|#vaM4&yUp0xay|#+k z^0=K{!t;dQ(6eR7|8i1Oi>?%Yy{;8Tq7>APjmx{~2NLuG_#u@20ueq}g@qoU9Y&U8 zNXM}4Bj)~3H$navYd8A^C|j(Ci7SCd;SUJXek|%5Dj+3Axb6FAiypcRxxwDa^Kf!n zbUQDe)%LW6fDcyYTA0Mg3c$s1Z(;t=a|zu;Nr^|x>Ks#s(m7m&;rg!NaKF<1s3s{7ic9(NNH zf9i6-s76FO*MtK@H_Xvrp9j3(2f$+!wYMt_O89%>bAPeoBBP{E7XJO1#m1hxP&qke zuIg|UE|~ZnH1ePV2N?3F?(NKL>iMl1xE%533te`H9|L8A3acv%&#w=wjB5en0Xw7Y zKcgB2!g@(rQb8he|E~n=t!>z^NTR^kp+}kX#^tZ#Jh3%R$bk8= z{qgS)-KT&06tF_=VgKIyfY;Mh&(X}2z)j1&*ZN9~6`9!U7uvZc?UhW|aZZ=6c%)sP zdWOw3HboQwHve}ack<)m%z+Hv)L~|}ap@ucsd1gY;suRUng}l&N;qA7PuLz}L*Tyh zXl*nf`1$fY%Nv)N{(k~Y!Jyh|+XhUGd=GSC`q6%Ee=(I&m1!0J{CmoSH;CsX7VTy= zOO=!M>7yL^f}-fa9r&M@ANcO3^43AnI7<=gC05?Mq$I?mJFU?y+H@hUfy}kYs;RKJzeAr{M z%$v&p(K51Zvb_;3{Sr1uD}&>%QYO=ERMl*%`7CRd+cgp5{H9`6b$6O$a2fNHzjAp! zR*g(=Am_)CtoNSkNgxmhZo~Emg`e2!evP<>VUf)+3>+&n5jCRpGTm{W4F^S> z8R}1f(|ILw{~r(6)GP%6l^kLdJ7rZ~y74ANE#IipD6u414-rvT;y?jh+d3aq2dqEf?1l&?;EvS|;Qg-U9Dw5e-paBf0vGZBSpXcffNqOk&jFnH z`=;8G!}HZDv(`NLweZ=jFtx0{pbl-rvMNT_U=pgq5~I^!P?`4e&!^Sk1fST3pEP*f z$g)#LCe;`<4ZhlF9$PzNj(YKtXnJ2I(Jgof9T`WF zz|SSLc2OAyCA;_Wi*P>c&%1E0%1b7xdfFdlTM`l11lA+YH7K*^6i71^} zNDqal(U@19@2pA3cZdx$ZIL_=4lJfN;JN@02CZ~$$fV%?&}9ov!M@=Z9X^n7Vwv|H zKAg%9HYfK3KoU5mG?6yw*De5C2&9X<{-HIVdqIe7a!z>XF6Nxja69~8!BWc-7SGgV zq&>8!s`Q)`IF)w;q`}rfrr(#;&YzZP=5<&jt{XHm&Q6`Ni$}=xUWr6tdqe3BoNwvB zFgc!Ui!dZ0Vbzu|zueRIsgxvCA20tIhAUk;Bi}7weAY_i5SN-7tyi{zW%k*P|H!Zi zhQLQj9l>8-^W+EKt~Q@7m6VloYBPkI2z7Cw8kMU?r?~_6py1=lyiO1Xts{eY>iPo< z!g4;dkn%e}sZ6iBTyOKd>g` zb2g|F_^I8YZ8JbyzN+t7PX-bB15g(cf~!c&15hf`kpHfd+SHl0XJ@xoXQ>II5^%b) zbS~lM5i;i4I5|X|5nmAVB;XZ0l7~l>NsZYC+vtYr4Uk^>MuxxkPT1)il6DQHJ9&EDz#C$HjzC z(rc@Mj&kEPDGPw1(qD@pD)fTW{POl^cSyzD($dmhD?_{g&AF3-U=o1CCoZeBLW1!g zx4|6xyqq#{r7=4g&s-srq@@i@B!}REK85h`sIyq>59y?Y3Q#$_Il2FZtye2Y4Ool( z)5KQ`RyG9*3G0h(x7NWlC5G8oo9|YTHXBy$T)% zb5X;?2d2yG^vd)|_V4cexh>_F6b>AGyJPO~SF9O3CR2Y@f?seacOK6wvgPimWSkgO z*-fcs#Bz@qKaY{|CQ(6?M#xB7Qc_UJz-JV&Yk=%>JGSj|xl+I17sYVC`Kg8Yf5Xdt zIJJ?^s`&m31ssSd3Wx|&L@Ov(@D}!wih;6cr$bKi&7zx5vrBoi5O4jSrS87(IUj^MKv8`9W+M3UD;PhB#xGbyMiW@LGc+@*9d z3r-f<^si~rWWPg|g=l3C2N-zhfWfWueCW*dV!+9%vu86R1U=zn=xQ=)IGQrZ{s^YB z*c}XkK@7kbn;`Vw;TiVoCQB%!XLU+=RaHs7A^2mNhQN1HswPa|kYahx(TSAb0mqTb zYPW->_>7>7{N+3?#V1o~W~t{1_#<|@pTaWOO+A!~F<)&y(uCX>kcArw%W(6Kf6Oz_ zZS^tTt@SVH(KRs(t*EZV_8kr?p1Ul68uO%}nPf}SFgK(1>ogz$e|_CYxt%DXIn4f; z(CMvea7RZNRg=KWtFz{yxW!*3+TGtbzu!c)GqEy~zqZ3xI@Vc2)a;>uaOa+w@U1#I z*h0bF^(-DoiYH%mpUpj1V?S`6{+v=Q5-h(&$28=O-#b7l{B;YKY#ii6bole+!}*Eu zFV6#@=LxN*GEMSDPr^H~N^Y*P?STD+c5i!1a;-mSPCz*O3rqvwO+daQjGY9o@-7>< z$SR;hMY{Q2OG#`YP=ydvCt4>N1pONY3b*LB+U@^*X#%}ncQ3s5yvsKyq@0S1k6=%E zm~{L{%$3e5#(q~1_Vw$$JI~_NA!JZIo@koP%W1aH6QtZ%(daAYng5u=Z+d2IYz(?W zBMREb#{0&#FAQrXMl?E1u65j`KHw4? zrWs#ugX(_$+FO9k)Bf#rhwib8$F;}fKkG0!Ka6XySv2JyW{UYa?Oa|B$B&{0^&ATz zrdw_kr*8c;>%(5FYqD{hj*Zv%eLv7pjA+9fl>!r!z`?9C)NV*FU(-a^MJG3ZT!Ckj zu&9}zmaSXm zw;bA{@bA;d!^$6Wxa`IbDs-^BM!Q2hH=T9&ZD5oAVs5)I`}aZocP|H9z`z+P3KN0# z+7$)qSTdTMGz}a{{1^{5Ci$)O({xS}@b$~_PsaYjA^(wHJI%zFI_pd#pKu=|>`ndGZq_?RK7J+Y-WxI_!Qc z8li|oh{5K}DB=cgG_F(|-g5bb@@8>Z{D(5vAib%jq71+MF0YD8==tir*l)|X$$8D9 z3+;xa*)xXj9?d5TADi+E30XnIiG(~GJ)tq)v4knt$c5X3m00x3LPCNrcP z$v?iihinKsE?i9?i8|iX2cquxE%Q>+({I|R-`3lJTPQLdrZ3-O9ol_NlV0Q5Z1*MN zh}O29qB%#NAy(wHq*O*NUYqHRqwKM!@B!rsJw(JMsf$CjHsJ8<{jnngyz?PFJ>4C1 zguOp}pcvkjV_ter`xkSX(Hs9L`9f4!JjL@;(5L-8tz|ZYpC*9~C^lWc+k+KRZFmQ) zg3VgbH#>VfN^du}d(46we6VMYyX{`j-F~I4tSrYZ&TW5@QDb@TuQ#OL$~Lh{mzOV< zKQ^vUl59uVFj^M&77by9TLrJN`*9fE_@IOdea$0(8x?WYd5`{p8@7uGr>VWwEE*AG zvj4yx!L}WBBtNx@75QV%-vnrJuO_Bk+kFMoU>M%-GjD$^;y+^#l2wRVxoEs(xxoz@ zSR$)IpTO3pL1;n%D6Cg!+Oq5R$o(!Jkg>1&hP0nCf`<0D@oO9MdsrfKH|SB2;a_G7 zJevq229{JVOSrT-r(eW}Hsxp>=h9dwwvg8Ozsmks-%5?hoGBUw-;lfBmAAipRiHQn zXdG$_oy@(Hkq$o9JcRC3>f}r7e-P5JnRrc0^)sY?vrg^0WENZy%>6-Ja!V&`{Slb` z>SeisvdT1NC`=v_qu2<-Ep%Nn_=4cLSO zBMBHa{U|7rn%yAef?C$60+CqJF7`|k7xgqy7=w_Pw#8^LcP)Fr2#1NxVw}t~ArHkp z3#QT-&WC`11-dZ7S#Uf=c&XOXy*~5I`3!r}_AcJI1+gdUwy{G0B2UWy#lUq-QyY{` z>D6AOWyy&IT=mv6$>M8i6);MKg7O&~3Cfje2XtrO8H#Vg`O0=%lNwQJ(%U%ZJO({^!!~Ee)0uR;ySaqV#QImU_PX z#t#vruActKn*!Pi|GM*p_=}|7MACIF2FVXjVlXI+pwOniV^8`Wn86aT zG|UpxpQ!;2*qyhr)VE^%2<(Cn;HzTc1foIwV}chRt|eDQW6yLc`f5BR8!lldDL=up zY~`fX1Tqk5qw`2{6(UHSl=@vd@i12iW9Ev%tYr7Br&<~cPqnMnp&2;hIR)U#Fg$TAuOqU?m~5y;r@EmINiD) zQpPuBa=!puEXeYjW;R%Q`_=|>lrkZo^Ua~F>|BtySJkRbtVUO6>~Gv)!l%Zj^t;sS z1YGpb(JvYt;14|mss%UEZ(^&YJda-w8^ll-;pNA;2NDSzwC zkfCw&_wf@I3wmi@yyoikf_qm5NBuNo&|&Zf{IOL!023BN>Lr-5{=2*E?h^PC*11Y` zDUbQXHpxAwXXk)-BfPn}TY5CSjk&zTz>_c@NSH~JpoLKPi4KE#z1yW?qaN{H-|$Ql z=u06UW+3!=`)3p}^-J^ZD9pzOPEN@hHulMuKuFVH%$?RWu6z2ZMSxGcn~Tdo z+{ZLEOZG#IR14#&U$yp_A(Q3*2LnO;zSJLBB8idKBgj8hEAt{N6%HuMP|_6MWKQLb z*n)fMG{rkuqzyk>&xHytWTK*4nuUVDt@k{8Z0Iu=apXVI=wk-YS#xG@+_(Y#wr*U% zv2Dlp%8JT<@J}@U2dY1bz`x(;bGNtBfExbX6e zFa7ex7q3)QW@TnR{=^f{KmR{w%$R|3kOi>u_CI*9Hk!;!mMs0Nzy7OlfBQR+KmPcH zqN3I|FXr_7-rxV-|NpQ5y!Df<^>y{(t`JL$pGAB$~hVhfhkly&XN~0;pEDV6kD0X(e(H=*nipKnpcsGa{;D>5qQY@dJ?>d-kPD z(dyLcS>}?tS<@Hf<`+BAd<04!KmP;LkP*+eLpvfA!&V3`-u9cM4=o1N@ssax(pU6{ z##A8tq)GGKZAF4$nV4i4?zOqs#oQZt@q8y^y=q{!YNZMLE8eCrVz(H%} zv~)Z5sAW)-_z1liS^dHEz!QqHAKbXuYBg0<*6rANptj~}I2;@s{*#;s+pn@2PXCFD z)%yDSH(z`0@4x@OGiT4~H7V=nPx_0e)@_(S#jMk?{<9akt$%=HQTz{k{$Bove3tBg z$p5qdAveVr(HeiqVbEzN7iNBS^OA3FSoFCZ$25$=(cZRi|ABw_!4JOscYpVr-@JvH zRM5bd++4DJ;er%U3`PF~{y@9e8xD6H40?1xM4M$UD?}kpFb|PF%Lyx@DwZUDp}k}S z0ukE83?JAM=+O!<4s2h1o0!oDuhH{QFNd6)_)%C8pT7EjexV&w*uwBcpu_GF4=7V* z(vkFOAJ@{SFY-rxN^l_Gd}#EUA&R1CXOz%KFSo946^2y=DguxJ@$XD?Zrc3N+_`f* zeZGVH4sPGRt-Y;Hk}8u^u#h1hW%wi-|LyG^&CRZ^KoE8MPG^QuZ&bX)9rb@S>Sv@KjEBwKHr6l7hZn( zmDgT-qqe%HXxzA`pZ?kQhi7{rUeG>OWqybFy+CdT8@EzxA!Z_{+aq zzh<2?J^e;i)f=zB@weap&j0<7|9kZKF}KGrMRcyE}> z#~9*s3;*4i{JE(aQyu=Yviz0GYrmZOy zcm=>fY$l^o8l0gAq*06yV(U;a#oy5t=tQSLOvoC>xTAyyJrggq8B_X0l}vaUq=%!2 zL@3J7Ijr_ecN`P?!w)fv^?&I63;jXxI-LH0tm=$>4NLY*_|s&4O8MK(ACAbglYn^Gc9M0(`xm)6lD`FwHy*Yh(TbXW_`hBl99 z>z0rH{(C?8{`bGXb?e75V2rS0nEf6Z*uT%p4Jnc#_1TkFN^t zUENK7zsny$&9Ygmaq6`Wz21P&gppiFAdK{z@YiTH)2B~+=9y=%UB6aSSF>}+u7!&h zFJ8D1y&Jfg6|x#m`HmX=2ZxWR)zji?MttLNq^75*Yjv_mhG?SF|1plwP5K#WeZz*2 z&1#!JfBwu_Gq!Kvf!4L9Cr?hEJUKNrmFyqODDe-2)6aO|5C4s!buXMh|HhkdzV-H7 zP0dZkB@-Tf?9pew`0V6KlhhiGz;)Q5ba7EK6p-)$A~6)RMwPdN4pV2K0v=3*PhaC`v3x!XJM7mG7U7Pev>L^1A@Jt%tL+v!D9h=MEk^NF5M&pIo+h>iV^qNPrp-ib@{DFZ3}8&`T>a zWWpa3pnK3C+cv6<(H0QN)H4B$Nckv<4WBmn!y&EsDp1C$yNG_L&tG0y0|2Zh^gc{Q z^F8b*@c{x*q6E<&gdCG6{HlhkQ*UiM5xlv zE&hkxj;Q}(KSLQM{Kc{4e>hpK(pn5z4)cZ#dx_IF(`w%9>9|fCuU)h5*sH(>g7OIrH&Z{i%*ebPrrWV73sFJE3(=8K4-6pq~T9Uq)as_|Ubglz`ve)O4uTQ$}sr1d>$M&>aZ2 zwzQmbIOcP;a^Lhr;SgFYqu-oXqj97;=tJ57^=HWZ%R-B3`PCgvL4|VJ$@=S;o81i^ z!9ZAVP^afwi)Us{S&(f{GpYFduFO2PedD8K=ul27UO0p{ zFq_K$n2_&K@Bt{YtOyygj3W6C8~;7}!*!FQcpV%5VWjj2Q_1v*3@Y z9N;QvkptPF@OLA9pD%FbY8@g&N181+D~%@|OX8DQ`U81nW;m8Cp0aIsX?c0gz5^#7 z+Er$2q~f;q*x z)Dca1@|*nw9Eai`h(6jT2u~z!qV+%QsX*Ws`rutra=Ss;;U&cJ%0)HEWhHTRw5hM2F3x77?2A(B#JW;jvQqp#-te>1go5wNeGS zxK6oftkCa7wX(;n)u`=uyUAou;uE1Dv`b1d+Vn@1>OxgVmVdcD4uc4j5jH7e6=@%d z%0dAREtC^>M{8dAm{YOGfeuk3zt*!*Si|%oEy~gpvqj{I1$~ecEcEav-$7=X8Iunv zKWCsdes|*k|FQQT@Nr$|ohZumK7-x?0whR+1POw@QzS)-qGZXIZCQ?7;y7MsvvHEm z`@P?L*<|1D+c;bNHk<5j;>2=Mv0P1C#>=V|HNXlY~QtG)25A1 z=g8I4t5>gF#phW`r)EQc!-_v7DMH{w;76PzWo2bQ`r#|@y!|egW?o%T@a5n8y%)dq zV*c{wcmW2g^I|_I&<7vhQ`1rp9X|9&-~OXN{gXd=>Zv0*z1!CI_HW+)?|=8-|Nig) z;nc|!9qpZNw;Rl7eVu3fKLLN>L|6%%Kl}0-?ep4)hVNjE1s)S@fAPcs*6(w7yWE}3 zN2$q~Kp!+E!yHz|D~Hu)iHV`k>2r%e$=K}D2mZ^@kgL9;yQaLoyJZ-YVEFw3*NCs9 zaj^1YOMOL;$4%=Qj@x9BnLr=LOlSeFNcKOH=>z8iF)4EX=oM1_z)z`#fj?n7WB-$G zWdKw5uNEAC=aN43EJPcKs^Yf*|7`il^c&|iWdq(5j+Jxq~>FNPSB&K1RpbR(|PojkDt>=S{aA1eZbejMRDM?CfQ z9q<^f7JW*Jb%{QaDL*=ma^t$Z;&pk^F|jvpH=a9x&N0}|sxTA%BCUB`?Z3$=<&r81V~pN+ye`+#T_Oi!qNko*Ut(Cu)nc2m7Cx$#cj)gf2m5lUb*i!^(@rzhw%@m60ej zJ^Bzm7oL5Xs9#iz&`l;uxaq^amGKZzklYN~=uG-JBQA(6z9tizkMaqwh$QVpf3Pf^ zaSwb7tK&Jc)5DLPP59x)e^%f(JKPuA``hdeKUS8)hd@wdbkyPTR`v~L8MG;AMS0X4 z(M9HiL}!WKg6I<6j7H<8Et`us6n}L5<69LsuUx&da%FyEViMhQ5B+Bae?0hp{9VNG zF&$NZf8WsHAnKT$l43FQ$Z^36+DkvL$30>nat;mo{a&R?tGAl9dZXyqN!$ptel5WV zA5==^%H{d{_aC@^?PhCR>-m!N#T$#UvK+XuL?2;E9;(0aP~d!&UMl_ZPkwytqhnaF zuduN23t#xc^UptziIt-#%n}eH|5Jo7S+XhEH!^b%gOBMZbvhkh#naQ%SFBul{FBvZ zPoKSARe7iSPIFT;zO)@YcyQ;=otO^AYPE{Vpb0ECg8Xp!qSV6FUvLtW_j^%G;Lkla zxc!Bnfj0%rF3guCI!N>o)g{6p;ELYLUY{4SdrbVJr0JC?|Dp0DL7FB0&NBUdfuXJu z1d$zsw5|baB;fn~qXT{Jrplg-d@JU}px*6~iT|U~Ukr3b)u`5@J>nFdNxuco-$$d5 zAOk2tn~)5dF7k1SJ~C~V=EUagEaXrh&hXgHli!>T}3TD&>YVpyIQzcMT7{EhnS z^&K5|TR!OQxO1oaR>iH|dv+JBUXz@fq*kfv`HcV4`yEr_LGq8`r$fU-F)=Ylvq=~1 ztxWWzjgRt)e9pO)DgPb>pP&T&=EdkgOGM&&3VH?UGVk<};;V!kGjY!8&tYYLw4e{Q zArg@oCxK9C0m_lll#b&L@->zzabxK17+WJhi5?|NhZdk58HRKmcaX2$7k;?$pB4D1 zMU~yr?ilg&NH!Xm#v*{D%j0Vqb`JY|W|cys#1!a*nUwSL^7icATYmj|TU&ccNy)~| zn=DoM-Z>zi0 zQd>RP+2QlJH9CEKdS-UP+N6wZ_(qGHK1>XWAma%moyphuG_3rMj>hCLm|?kKZNbHo zk{dT}+`MrkD=X71z66jJdVKBARP+mx$ie=B6Q@qS_S&mw&zwP2al?k<7r*$WBS#Kp zWMoiGd7R+SIe+hOAM|>Cad9z%%Ny4hpDQUjfBxL9ii!&tN*Ws*%dVF1-o0bn_8pkV z1MU=0i7~Dkb0?qo$Dd@Aw%L?Vg+iy-rVI@=qWwi3X@mDcwT)G(jB1rl zl;N=t4|}`_E5~3Gj98vZn=Xb`fA4`m>K`3(xLw1L#DGE>t23#!It2~n4s9R^t%>*} zi>k{9`C623bkynaIEOucj3z;@bd~%c3^H*Hx*dZaTS63#iJlRBdeGd`hdDS!|BY)b zc^$ws*uzDll0>e^#h)>gcscGMod|X>;ZGC@FMZfZk^JC)>|smvAEU)g=#R(<798HU zXYcv*C1qt-E|pea-&LQQ5~tN*9w!=oPShsAU@(F=l%yQm!vfHT)w4tbWl@^S@>PUx zL`h-)DK5=1M9Bo8QFxr-`@H_np8laBr&^_mvl`;#j1$_&$DBSSNf9GI8jWiEmet$0 ztnBFQFR!ROapKI1Rh!H(UmT~q0%E31=$%Ktz`$Ghs zzWrhNF_@P@7p+x~4h}~TIHJ5hFbQjEE=!HGnso))$(JgdFWzdrQP+0!)=dmXynf^Q z_8mKR?bxwq?b`UbIQa9AGk+y!2tmKU{8Rr$hhunXSgY2UjUm02Nk0~|{7;cSOh4=v zn0+9v3yrVNAN~j{L&l`9JFM1>8`G6eWx^7^L}p=?C>2DIXyj%W>#ZnFesTVg5VKL9~L$thI1*O50#((!Tz?6POsOCIf)Vz6ICju zjHx95KDV>EvZCVb>GsB2*T@Ja!H9`f8mcP$JKBm5Ka-G>Mp`5)hC3e<`jf{&(j8jk zAQ{5PUo7;Iot?F5?PIi3 zX*Sz73=G|Ix%$K)Xt9E~LZLAkb2Zv@p$L=G-{W!*58M4dpHicVvsrk_zA-ZvKK%`q zf3L^i+v#Yj>g{Q@d);2ORvn*d%w82|Nx(AJBq$HSU%;8Dzqo;J;|T-#cG3PK58%*b zE^7aTE6)_+u8OGf;+B7AHE~w5Da85N)UU@Eeu(@K5rP&=CiFP}e~JE6r;kdlDJ)vI zW9N>ls><4ij*m`WD_*}mBO@^eU%EsLm`IEiS_v2{DU1_ClVFGjjo3j2m0D?wGwb!*CHh3N{A6S%?%lcm)6$xzmadOa zUOaTTVqI}+Of05iTWY_kZDT5sU7$@m(gCY9dpzFDmoLBa%D+8>)KD(iKV|;wPR*TQM44-!Nl(&Wr{|`#U>o%1WE7Z#(UFS~ms!8};gWYK6 zsj-wie&$XP3McN_1vxL1cvAh6FGhm=Zl9Nanq%DH*huI#h9itb-QpPrT3|^TW|JYca z)l}q4YVYa3xt=|TkHEUi$&4CY)hhsT2ID!QvAnXk>~^StJbT~ zC@87m(Q0}e7b9GV!T2?w3)ceCberz^bzfQ zq{)v)rP#P3ckSw|w)Wo2s-_DiB`a5N(i)PM+AosX5GwGQw1fKF?ZfD&{QZCY{^>KP z(M4coM#2~Nu77sN8cc$rh>-?MPt88SU0^#QJ&i2Lee4enf`AbNVpF$26cILRv2Y)Z z7zS?p`|UBwaie%;BtInzzFLyiWYX)FrP$VFCx23Yr>v%>rK|nK$DyqkgqQWip!7YFZ%Y0rJCQB(77z(Dp?%9HKE= zH1y&6vcN4Q`Qg`cYWzu8D85P`g}8aA%xS+L;U*@*`1q~Ne16D%^@}ILAS$xZ&@OnN zBt|SllqOrkd7Q&L%H>;WAG|JLQE3STiplU%Rg|T>sOofqZsn`N`#Fbq@?|a*y#65g zgh%jU1U_=%=bLrOI!%+u$3t+5R0uO74vCm@x=v$MC>ebzQckkJ?XKmpcgV7{pg7-lpArFdM}lfd8cW8>@)2CTJ5g&3zri-hMZ}2r?7U zFDA-l)nw);m@FCy4^x94I9>R2W8VaQrY%3*Rgsv;o}(B>PZH1Ic)!@>pK3-G3zvR9 z*66LtnPYVG(*Hag4zS73xvo zGn%sf;HOAf@dfeJ2!WrY*X~ZWedzV~IGld?bXA}Y_KFR&W*7@9qO{1vgWnduqZ zwr{^udgV^-oy(Um@j&k+jaDOcV*$}e=(1p0P=4kYf3%$aeSJOMT|Qp`6D!BX#Z8d^ zfZy*NvLj?X>Lbx-We^7pvkTaJd+wB9b`B19w=}uk&KQL({^j$!o9PzI7X)qYgj$AFnIg&~EpiyozyW zgASJ$gDFyN`mOniTb3u-^pfaGmR2|h7l=}M)=XWif*^+ZQu zyo^zyG$OvtwHBOXxez<~p+ok;kr5}Jo1B!SQK{LYNxs$`@E2CsKHzMu>K(RwkcNK; zhaW$rhwbi~D|d_bWGYo+%21-s)ahd|tMk?+`n~=;*E)v!D6$+KOR?sHEor%hNh&R^ zOvuov#*a>ah5|72@1LNe0vW0li8`@f%8E$+U1ao^gfu8r3!45*@*^v@VC&TFkNmPU z_I|_?5n>-=qHPw--aUKHojr$chF8jK&X(ND%1qK~sDBx4^gcy@LVxMeP-qG?3#CRr zZ9yfc@=$)ZpZubX45m;tA7G2KGeQ2evWe>;nc?OQRlS`y=}Lv*BR}D#ZRg z9Da;4#&6VP$@M6=XSAz78uNi-cn13?LHIF&7^6;8ke!&GXhw}L`C&u0<_8mR?Ou?#EDmDA7R09ISHIaA0Oxb=SgA5=_QKJ?-k?bd3B`_iOS(K75 zEEM>T;o+X%9=sD_y*>lafFUZjQ1B1>s^AfENo|u3E|SEJaWI%k*?bSzDJ02dN&mQL@Luv^$fvC>o*Fy9n&L`ngE}w z&lh+FL)3p?|Paz&FGwha@MHAAI>}Yi~zP z`IR5OQe9Q8)o7mBzyCYm`LiusH+KxW-?`jyp`zX4#uNm^=Z3bSjy`-Xh}yj>S+Ak) z_SopTkt(0)xu8<1Q&LhA5)$%Pt}G}hc=z3RFI>FP+S1a|(NDA@Kf0f~b2W-l5tVj*q8GIUkWq~jRTLz0v6m%%8MDl>+@q5Y*!$E1G( z{Da`z?RG3u3ce?&rm93l<38}ifj_#(IPJcXL3aSl4xqxonfwQIqbK7!(Cr!-c4OV1 z8PF$28Jm!5Q148SOEGlcwR@aim0p#aWlmde)##NmJkJX~kqI{g_>n9>TqmL?xuKHM zK3smn!C#gb>V7O+0B_(|FxA^5|eT(Kg5 z*UnuSUenpt_sOYi`*y9(%S#hugvfy7O^SLC0$)UTzzb?TKok6^I`l(_LUdvhf8*_^ z(0&S{(Cu7hO5vu*0lt4UYG7a(|FO|AdV?m;Y9u0nCioZa%i~R-$dn(vH?7Ri*tc_S zWpztu&%m$V`taz{Bj$v4=tN5hFWDd2KZFn2+t+*i*zq6!@CTPJmwMgqwYjO^dUo5P zO{**hjc}i2`#?u>I>|f;`6vI76oEccP0K!r7&6(Ap#LMj`A-$TA~p&kZ>>7ubYbDX zfYTjo)P&eK2|n+da_Uj^!8yt^DZQ z?DBQg*HoN6m64aPHJTn>zaoPEqoZCI)-Al%-`Vc>`k?k?4TwwupV!^j*51|FkdmFN zGh3!h|C!MT@xkC18i`;` zNY;YZuRy@x($e~~H-GlypZplJg&2*dXP$lLTYvb68#iu>j!~91v|YH}G34+_`aT-v z_WSR&^`EX#WhWW(Q_OgA4caWG>*V%drq;aK2QUp5GA%Xr3!nc&;kv?;Cr*BN?AW=p zXXoN9tb8_a_zQf3Xv|1H$sP%xgXMor{O_k< z0|Nsi4tzogBqt}SRG7$kZsi{e3_peI%@1b4XqM*I(7O4`OO?+GKI40KK||F37^6d{0c5tpA>Ua|6eY!pzS9_WA5_HB{ ze~EO^eu5(`*SJdK+e7pVS7>pNMGQaS3-t63IYxZw3Su_tv3M1AR%Ti)(I=AS$Dmh# z_L&{WPhTs)R(J7Adf`p?yj!)K6t<4R>kh! zd!Bvf*=^gln#^Xxo?D<`GX#707`E@|t=!w&8yy>CG#ZQsJ?V?ssEMG|V@@9k*}VJb z%n;(owB(as!m-KUJg6c;W>Wqf@t5P-Sr6H}IT=VSq2A$KRk90(@<3Os-zDEzZ0%-d1EaBx@B)IFg_d(G0(t z&>tO^H*eXpecKL$-cVLvcI?9syE-~SdIl)-;t}8jGiom6EtJ0tj{c~`)bSr4abOM% zgq0C=v&C5yJSPzoLXv+R;xjVSRu<^Z7EIGd6vE{|0KFm9I)h55_4!3$jwVxQTE%$1 zzV?Q?yY)46POt=nM1syk;XhQrc zcxb@q@z7Ivn>zhxOdo?zzjkfm`t|EHI(2Pb?S%`UV(G=eC^}VRT0(U9frY{kUK5UV zMixtc$69do57Jf0&Xn-Se99f2ufF<|SAO(^y81ec#rD#RU;48@`_s*vx2iQ7hsS%R zzT58bj8dz`@<}Et;PV6;+wFJm4*Bry0FNP}@l{|D+3z&Cv;Y7=07*naRQ3T*gHokf zv%26bU;WDe`yc<~U;ou#7p`09a=NdUUU}t}AN>3O@c;btzx)gOFMB*5As9?jsfJRT zDvIAs>@z`#Z2E8=sdj`Zmh2nEyY~nbA~`Whd`p{4{2_8!Rs_LcnA@QLz+#AQdNBzZ zCbdECEKm5#63E;U_){e$?#Wlj(?2#gT5nRD;xrmPV#+8wpZ1f9FDgRyq2I&sry_C< zr8HHPIEbHI=g{_r^p}XjgyC;OT;&C#zg$PEov3yg=p#{Y3I2WLXB>T4jCi#4lKg~d z+ib~aj3Rb*!Rr0{4;U@xjt-h(xvjlV8fVT?9e(v>`eTx1w87v9?3?hGaKvQvWCE!F zanOEp4sxl3C;T!li--+0ii$Gk!amTI#R}i=4|Mfney0(YBGzUxVjheo`YZ_fK_oGM zMat2Gn{;~hz`)Qie|fyMsV0D_3H=z*1RF#$Ob1S55FV!>$jFz)n~RWW%UN^_wI`y0 zNG#O$1$FQ0?0E0p_g?wo53opel;5{!ecm5GyZd0#a*8RB*#{^-z5lQ^Ao|=R|8#}z z1CG%l_5t)6^B?YSA7%s}#!IJ))+p#hna?}gZx?fH&8b^;^r@577l>!Cn`x0#+A5l>L zah`O}nOutB%!1{|7ayMuILILQWQ*`m_G|nN{0Pc>H2C4hKV0ymNAWUC^kKq*IA|XI z{1T0Cb7Fa7i8NE74=ikER@Re;o~*ceqx8yE%*(c8=k|oeL_~a*HCx&)cK2&6CNAXuSlRjYc`}7JwGI658!nL4K}^kz*T_P5Q9(7WD$rK*yBiN z;j=&ZFq@j1TD)=d#S5P{H#eU=c_JetJ#YDPOcWafZNZua&@sHdDR73_n6bl1JM1`x z0!nBnV@~gDv=O>k1Pv8LeUQc%1SqZC1(Yg8b(4QwP3fF7nSC>{pW)yyM6{`;@wHc9 z|H-SbwcouPXN`OA`RBg*tv@VSQ=sA*sPXpIJKzEXfibv24)#r--qwwgVaNNH0Gl9t*+lLw2|9cRPO!qlW#wx)2gJGDUKKm|BB=Q9N~iqBtsx5ZbW~y6d%Bg;wt2e8D z`sS~8KjBbo4Di{>ZRb6PF<}lFcIDwLz`4gbU|b_;|WX8PMrQV`HK`fzg3sbO7Rs ze8`Xy-S3aTPNiOvmY5c2S(TOeyGxZHU#V&8=(~Qcys^ISTKV-az4YSVJ^L_JQK3?T zzXWSMBL$D|$&M`k%IM7yf2_Q1w__3RLA1^& zfJLp$HtCY^JzZ8q)as%1*Xy-w*RH|PkGh5ibU!?O`fTCab-8)VXqXFa3z$Chg+IQ0 zV+Gaz{(hg|3v+CRWwh8he^JPP^r%Lwvn3>BwFIxrCF(_cL^2f7TD{(6L!3^{ih8eo z2$%jEjmG@^ytMSR#-_&7(#uUvje5NS4yFpT!)P=b#QxQ4tyZhV{JScpR;yDXLxT@7 zxI&jS_*bc8RSM)G2k#*otb?gi5dbwxY7m2_5-JV(tI|fXYB;eN)rBwbA{Tr1b16n^zr!vl~t9mzwyS;-h8vOs{?Vv=bwN6t6%*}LBVQJK!_teajPB+ zUy$#}5<6ypRH_(se;}tE+m!78EaOit7J(GMnY3SEP@FC9i6@@O$-xO6zwCvP-cSQ1Z3|O>W$YKK z{aNt%2hA^nk-{|%dfwveW3T|OhyDE`;_TOyWOQ2KCQy?DZQsppTbMuxwGdn6E|k|OHRW3DRtZ) z+o<)L>-Vome}9=S{vNM;aBu)qaY8?^?2r!Ods2026KXGHnR0^{aQ*S14-b`Tt8 z;t#{GL>Vq90~!O(DLI>tQ-+VSbaU{5p^zdRK4QxC!>*F9zN!JopxX=TX_c{AM%{tb z_?0Fdn$juak60z_=H{(iKfQG6>eaG~7ccJFwL3E-18pafatic;4fpwhPC!9%Fp7db z4)kZ@Oimy8p!T65gjnEeA*^h%SP(pv%hNGPA4Cuh=J=cfbH<8%zt5*oz}ZoIMx2?e z)^s$~W92$3O`bgb`6x`s9G{Ywl#@%Df-yoNLZy~31>uuqqYM?8RKFxJ^Co+PYnp;|~Ub%v$3!gf4I6r@dPOoPhOg9JV6AFpbW4j=HDo=dkOSn@?&Yk?v zxP2cS8nO@B@rJ20=q)A-)MD=K52$6bYS(N|PtLUTca3;lK8-b3iE#PB7ZNNa zJT!!rgh#y|Uwd2U-L_6}4u1&x()_&e++{zWe0k)Vez{1^9cC|aIw)F7q|_zY&M_JPNgGO~CUKL|zy7!lI5VIS@bA8RQ`8#Gu2 zWfWcOhMl7$u4tWlTJ{aEX{ib3!&~#$QjP4zAd;9_Ovb1!3PQTA~Fa7m;ec{@|;^K`p)irmjYtEINLtnhitjr*Q`_TuX ziiJ?PLDp|ztcP7^ijMIpPDr)^nO%H_MITj zy?joNKPEvQ7#tiP9!99qVzpte`(T5F8z#^ndIOIFu{jCWXq4KZTehaCt**AMwi@#b z6Y;T>ty&$QoVIG)PNP-ott^$l=P&_&$n{8}PY6on!6jy96+ihjXwcQzi2A}6(dzU` znOUoL>`KVaf!`pPp9}nb9&bZq!^u;pYU}FYa4cWG9G_UgK78Bv;TQ1xz+HSrp%dEh zrr|{#+Uv!#iugmq<#xdrML{?>G#@i>r~)Y|W+y`qe|8aJXzbacjiym|foJ1RWSfluQTYh_<~F)*eH`@)8wQAkctA&##>vi2wRO*x#9j#Wyq$e15tWL^IFu+e=Sn?^$-q;cNgUVK` zrKotrvSrJPH*G|3<o7x6OtALcGx7UvE`wjjEI!Gt`X~N)e6OX_ov4a3iRGp`3Yud_sXG zcTHv{TrvJeIu-v-ddLIdhoT|Ui@-iGsg~$-FK;P_Vj?6`OZ1tXK94T{XznvIG7lX( zbm`J1Oq^PB@z&m*Yj^D|fF%r}KjujlDvbxSS1Rl^&hRym^O#56xWk7*VKnEGF@P1J zKfVuHoF>&2W^cs!S&`ZjU#8m=f5rJVluNKnl^r z=fjV$T)J8V`AoDLG3fzY( z;>))ld%eL3M;{?*>YYMSZGuF;JkPereM$HNdQWp4n%)=KX9s*BfNs(;m=2R(AqWpj zK&L5*&b{Cf-em#}O^rYM`7f|FH8xrGs)HL>ymX*=eQqk|zTnpri1$?Vmo)x9@-JBf z_8%tL2UwBWgAeK$bx|s1RP;!cgTl&zD6GdgJ@|OT)N3?(sjB2S)5aAU?_RidytKNm zt*7GV&8DX2vhs3_%iOpBiR{cQlgR{vvfU)sOBR$A02^gb*T3Q$$L)xulrjJCF`eDu z;2`)50W}zmkTDszaR^U1k;}|K{z1f+{7)uDh+M&2hr7`7>QsiDxE0%Sb`>TU8`TDxlZ4;B{3X<;Lx1=H zO#=-zUAHc=45Q(BW{v7eM$4 zfjJ`NSI4-T$c zwd$LH_)RPj3_iLsM+w$t!{&C6xLoL1jenQh03ku%zD;ptC*rOyTtV7{LRe&wi%}9e zI7KOs*M)0b9(Ur8BGcF?JdGqRA%c__GZ6cHD2_b@p1f9ggzO$-4}XL_f*Pu~)G}{Juo1nQk(ES;CNFd%vL-|BWbh^MdXdd53J))Hu`lsf; z)jX;XC6yF_ZfR-#naF(G05 zj&14b>FBw9^7N_8mo6c=4Ed?AuivwK_r87mHWY72Nl68f>2b5#K0YG;z(%G7lQZa2 z$hk9skM;WOL&NxTf}R}^KN-@j!6%f)@O}{fqzy`Zsu2{I5n1f?pE`X+$*IY|~n`ywMV0q-UJWy*^qH8r%!bdisXnGMN#21e92b!qNf9*T zzz_)ozjGpiC@YdwhDAoQ4-`)3`xhbnsL_!TS9k9q>Z{kQ6BEpGV2Nn6M4w2OAE(oG z;`H@5e|f6AYrtyIetG}K&+jeNs1$IqofJFvyWqfk{5ZwCv)fBfI1*0s(BYc z4pR4M91-j#51!-2*kcn8J$d@*1WlboV$m-e{hKx9pDQqD2hF;Hz9x7%#}A$*E~vC9 zgIR!SYCX8~n12slN|3^AdvH>PV-JU4O`bk7`-ew9IeYP)4}RC&)Rba19Nx6@bGr-I z5G6wPBpbBJaOLCt!FM^Gm;?iO;R^@8 zchH9k#&DtFztHI)F8sko{_q0$5M1Ks{K=;@2?ohkP^=i6;8{??C_5yVMG?4DmdGA= zku40VUhp2ij2%7!k`pA|FFzQnIvel_YB=!^EBs-42kW`3aJoMoE@Ru%4hyK-l6~DXvZf#H1uyfEq>Q^f? ziKf(z>05W_Jeg=r0;CD@GhO)8mCpyjN5ByiDzoy`qgm!Ei@M;d&xQjF>Xw#pGRL&1vrAj6C?Q=p}*hG6Kxl$aQtg;c5y+ z!%Ibkny=F}j!%0q9S1VKUi9R4BLxB?t_`U`92=LMBQA8d5G@e-FVsZ943OJOT_|WC z0yd-M#ZopX$}?tQ@(e`FX@d(3K@~&sKy&z=bPhL_om6y}=<4aJs;nFu8Yo!3=3C$T z*3qYrrlzGz+>z}MvyoV(QN|YK#HCtv9fKpoE-wZT#v3&$R-HwUu! zxjXtt;NYfMwDBg5?C0>qr=wq>(7o`bs!U72(6e5x%UixYF)^`l{o2cyN{<~ocJ|EK zTeokwx3`y-U)!~7$H6BL6>r!;-5ltlWTh6U{yvmGgF}OM2Tg)ui?hLGF^T6+eS{Lv`?h|AN{M{8(fLW9IO zizL2F^oeZwLC53r8}+aL>_laCE5^({y>0c&hl+EOY$VWd_aUt0$&*o{QG`g-51&m& z{hY?zHNwTzml@Gv+WT<}yn62_b!~emSy6w``8XTp@*ept5ITuXAhyKoR=@Fh*Dk#XTh_$=ibq#Huy*(*5!*e^= zJin_jKO<46rnfDcl$fm?(s&$*A=?Mwfipok={T8vU@HIvLB?R5fspOPEW^ipPP9QA ztx;3gG7#N9tiWrT6#twF{^-7wXff?MNE7^acM3f^o5PRXY zkEq4ti$B>t{+HvcvZ69k=9a(ctsLTog>Xg23BpB5)-tKAByfBXS)%Zm2T38jD2q;J1HO#6d|XKIz5Y=b+Bj+w1%2qiq@)iJE}xe@Mb49V52iobsO01{ ze2&9MxpO7wPMdJ!!$;(92B#E8f4^bDIdmYtd>bV~h1`H|tu z#|Ocu=dyTB7g$7b44XX=%3PQZ}V~x zz>&3OLCODU6k?}Xgs|>5-g*0-o40P7493HU4?p+pv#BYm@X2sH95d_~4%;7=Rh$Ml<_n&} ze-v?+u8`jf9UwmuVnqr|gX;V!!BJ@urKUZ8l*4LGpNj(cZbQ*&3M+FAn&QsXEt+D| z_>heL(MWlnE{ZRs07_Blc?5Ch5jXDeP#R^Nl%j0hPu(-mmyboC1e^w?dcce=~!dpZV2a64vd-kh7XIUgZwDSY`*{z^I{^C`%{3HVQHe}MS| z;G?$*z8ME|-u;=+eCCZeUazcf`RL^J)vL17 zQsadq!Zrbv$C2V{IC3zCeR+6f+)ITTC2)mXZoU9jr}qm|e+oF$DMO%w0UBUWfEFKo zbU^JNz!Ka}R2CB#BqW)s-b^zjmgp0i@`En3Ev?d+Yx2($k%Arl!$u@{7 z$tz-_G^QUTU3njcSS`Y4EYY(3Qz1CT#A!O<6bb&yLNQb5jd=aW74oU+G9{2A51(Sy zQWh>0zonC%fo&`TQby%+fb z41eTEv=38Vx;$Kx+<9`^v2%N)JW(!+jtew66FB)v#rf@=T~BVp>HWi|*B#wf@Wp-W z^U@M9Z5~yYR2yhxPiK-9kn95>uMnsUxO4)o6Sp-ZGY9$yz*?TF1z}}=|6Mrv zGc6Y|{lkU7{NadH9a1$$A(r2{{-n41s+O=!(p>tCH-e@m#xCf~f z<(7(`2yTszx;!II{SBA|*`zk}v+u{>snQ2RP}^5k(^cVekB}bFMhzH(Ze8|{%Fdew ziR-l%E%(Dm{7B?UksM82rqm%PBrD1%Rm08y|EtO<;jtYiM?A_Ywzt{ zzyF{)4zslo0)jrY$CJkqu6v%#YIi2G;b1* znJD*_e{mPAf6uV6{Q;*8qS_MT~}LET6*Qs;X}K2?n+I^ zhYEQ{DSE<`;6oOq3JS_e;)Hv#F?q++f4cZTI(*c_K4>4d4?{NN;^IYEnbCL%ei3clhjobW~b;+84k0 z1+2ndS9j;)rQ6#!t~hdNvldYpNq>O`2ZJg6!U`@L7jo#~Zcwu#*cI}AfpPmdi{>Dj z5KL}5sr@AwIN?eOK#K%E{HwN(UU);8!`5aqnvGbDcZojWb42qO%k+Kt$<||-RkV)hpSuFCbk%GS>heR31U3$O9RC82q(ilXaB^99qPQ-x$U`HE# zA^O-trDYwXP&EFK2k@juq+<{#bdcsW>)I$*NJ0SGi@wqnYexSPbd?q}KGP%{2rk3d z$H+&TmjknKaOfF+i;(N52n?EK$c3?h}o`G|Hen`cn_P-R(VtgCj1ZUR|_2 zEjKkDb7M&O%i7Bo1Nx!-orFFDcd8~)gd0GRkb+jiKFB77Yy*BE1l5r@2XOm!`fvjr^;&4ZTWUnXL)%!=ENu~D?fPf z;1m0wSec)XsYG3%*97$TsQ{ zw3-%-!y(xS;yF()990dQ_*~=^zbUF^gm+6IxjJ${- zP-96OvYC$*{u;$p08ZbiPonRA`72##h?Br4CbJX;qWqmhZ6od>)DrOdafmIEYG4pj zkE46gGn5jQ&ax?_E(lo`m&x!C!WRhep8No=%~a$w_!LS6z-QUG*S-Og zM1P7U!yA(_$kI^*PM7h=29P^SBWHsAAV=sOCHO0S0PY=GSGEbPo_rH>=*ZoY#Rxu{ zC=MBTWkQDsOwxfdeKf%{cYi?m8Qmz*M*^Yfn(FF*`saVXdGkhZ4>;MDzhWi#-WHfk z_yg0R{1YaGxsbF8@-`8Fy8mJJ0drr}+#USnMr%vgFtC%r`~8ibL+^juxGdhhX?c8* zk`w4N75D<+tl$qjhye;o$w~VU9$dMqVArl)@4ff_sZ%Gh?nhU5&-EME&z(E>!V528 zf;NLeh}JC7XBP2)6#Ia07Q-WWXK{lCXh$%;HxQd+`acT(OvahWXN1r{eE7o#ahuCp z&4z?6%tQS*iT{h9KB9u*qyOT8k5+-@hmLF1nEa=^h8)Csm z_LyalgMlGnhD?B26!0-~ZfjdF0(@GvB0Dn)(}fXjmgp0~{Kc5a)90_h_U0!|&E1&Q z?Th=04sKYk)hLC2LAWUjN>Uyp%RlwaolO2&2}0hl>0Mirf7y(U$v*{(aR%>Qf=@~A z+K)s4-Jua?CjEjgu?z{{o*pr(VEw`+I!5cMzcXc1QTivnLquA@2d<=k^gbL#({WID z6LQ~iq(0H`@~N*020r2O79*zmKzHs@^j3CzV$_P+;x9(2T8+9*`I(qIW%KIHk1kh#bfxNU zXZwj${Z&;}=gyr+_oKs4Jq3@KSvSF-C%W<$#`mKz!G{nz93z-h9`dZgTJc5>E6WuE z2PLr-Vk_+-pd>#+ZgHUE4|~506aE4$@3C8W^baHcU>*g}1b>J{^GF{udu&e`4M}~1 zS|p1VU*w&Ts4)>E0|`@38DtQ}kOx6cCWAB>892PTXd8+sn(!5kmU-@b@#E9e-zWDZ1USaL9q2n`&9SJc#kr+6yb)RyXBzPNwyDr(D)3=gF{|?6z#u|$Mza}{V1P0p#B9Nrs47*D z$RQv{Ec~{*J3Y-!)K8gkCG;UHkeQ*L-lpo?*=yEY5|UAkdBh*_?u!>L{NR-z+^MZk zh>t&d^ytC;2jM8NtV#4{VUuZ3N9HM+w1}ZU&0H+z6k*#*E-SFR2XRpeh$*$Tthi*2 zX&4<3a-#}CpXiUuL@isEgUKA~YVY*+^`1RfvU&4XrIIH2mIxrjzvnTOA@oIXcE}bQ)dmvYeEZq@tpt z&6_v9`O}|bwq;Ds*4WsHzGE-F^yM$V^d-#MO>q~YE7@qRDDU$D80mAwmeJnNy0F; zO=AC9epryHsgbuO`3a}|#Kp($+xrB@%~amLU4E^u;&xMddV-$TQ{~Vov4p;1Lwb>* zm=c+`V2F*=K_7xHiX3Wxai=(lkJq@u9tU>t@5q$^i;-Fc@G*Zub4xe+g<_SIyk$vC z^oel(A|h5%(fFg+Ke>Lp36lMp9cy3Mvo79j$oz;LY5Alsjr(?5tmn66U9B-u=HCjIKn6miS!Z^Ew>pCPHClJq({# z8{+e!M5N=t(CHsW{2`V2#6>cSe`%X9`DC9#MuM&Dn9eYEVmF2;$_iYCr4@Sy0Bxcp z6(zr8Yzx*6@Yy55L&@ueZIDPHxi!))j{=_oN)HsM6VQbN->8gzA~oUJoRn1w<~Y4J zPOr(fnm)5E<%O&iqgd-~M)b!dp-&xoYW11|jGHMbxmZ$i0Rx*SrO)Q{t?AYr*qRs~ zAS7NCaAMY4S0}A8s0q zNx=htM{gfuQS*yGzU1GotbFw+Ke>A4Dwez5zkmM=pMN1UI}4ILFY+S`2_1#VgoQrP zTY8_Q1Nu*3k9Cld!mZHs}wvgMp3`$Hr{ z^C4^lDP<@@m+S+})@2k3@g`OOh-^o8no_ z848q*y?@=?{t_F>J`fKnkcNYB@;GPFz{iNt*1O%*TUn#d%}Ir;u|yxRIx_hS3ym2| ze)aD83!mP?VtK{+>A(Nfre(=-m?MGZ6NpRphw(?I@F|fmX#oy0f1wsa{^>3u+EO{T zW0b?~BM!3sQ^^qhnmhQw2spru6DpL#1d8m=^C`T0WlRi0&^onpZBFuv%mj3AZfNVd z)7I^ByCMPqnbRNB^1$KLYiUkpmpjni7Y_Pk#!Ig)WLXn=v=^5n(?7(7iWtI+2@Fn^;Y+y5k6TdiK{=};_F%I0JF7DP?b;mt z|DT1+p3O|Mh_9DiHQGsa3?=e|=#Q3YQ*rUrM~=kDCv%Aq zZ~Rv&rVPOpJO{xkz0$ZTYuB2Tb!r7VL_CbY5^fKt|LVlTOluy0R|ZgsBHf8lvPo+$ zNM0AO7xVK5>nH=9GW_73oOlp@xWI$pWB8SQXlQWIj*fdKv&CkyQ5!#QdnEV*((LHh z)ac_H8E&Y!Ui#4oWhalf*4AJeUP1pU@)tA7B2WoW9CE^3RYUB8dL*>rF=E zwyj(L-CzE@|N6b}9XxbMuh+vqeDd*$?|kPw|MoBbkCJmG_<%Q_ff0m1BPNT}1KUTZ z%Y`9xm{CQqH|q5|dZWS34{qO=^egh|gKkc&Uc@W>=pePfOZ=5+!b%ddTafxY7x*v9 z&+NV*k^EtMkbOpznUa=@wYc+^FYh0)mt4GcqoN6GCg3)TK#~2SKLLWFp_QeHw8(bz z`xm0ge4YI_GU`-TYJaIrh<(6Kq4r@>z(*c_Si<8rwn z^CR>k4F4Zoee?r0M6z%fC1y*(PZx`9~4RKlehWbWr{& zxGqXBAov*xmQ`6PI<2~+fB1HNN1p==ceCP7uD=U_J_wdaS&dk`1D>D-R=rcS2{*Ryg>fw!XMm?58FTHx@yWjnrKmF4`{nf92g@vi4PZhFEKwwyE zAS#>$etd~`QW+{CZzw~#R20vXb3=}@d`kDqr?_qQ;A8%j;UPOZizs4Zj0U}y7KoZn z_*A!W;=cs{e)1y>nxGF^KDKXkIv@OnEe>vYujfq?j4{cVQzYIfBPtfWEhHfz$YO;H zQc@J*tGHQ)kBEkJK>{%w@BvDOFF_Ru)5*es52}DNCZ#glpv^JpEDE0W^pWvbC{@4r z^2^(IY)3E<9XXF5|G2NOPmpK=f7d4!{rSGX-kP(|thSmomYn$fFBSj6=L=s>Hl#5v zAIM)ooHG5bTH7}_|4CL{E~3@=?iw2dKS7CZ(fe0Cy(4R%MxmQTex?Io)GlN{1^K)W zd`wH*)zvjJ;=q*3@iwd3YM!iVm^pk#a<1ev5a{h_J@&(Y{`L31`^oD+I{xGDzx{WA zd-hjv^xnNo^LNQaCpO=!zcPIiGIR7MGxdpuS~2!Kn_m?A$0nwwn-efG?!DU_(Fe@B zeEHIkfBX~sz))sp=CjW}yKUPxm0Ba!X3Fw;PX*=(fAQQ0(|^pWjish1KLrJA)~;To zQmN1f|Lobb_<}u`^iivnnF*MS7!$ye{NNuxFtsnEQ5sdu`n)*!JrPcS#8~5Ka+Rll z`ugkN`)~iPu&_|AR`vAu{`_Zee(_6R{7?VsZ!kHAn3Y(r$ikB!Eb~acmHmFLR;||= zguc&>e1=>8A8YtDLRhkcqhA^5tubJkXDM(@$J$M_CgF*5kz0u@Uiej%iV6Lg9d|} z%(~PR+Y)^umcN)txU#zS@4x?Eb8DAM8T;(kRfo5%G-%}c7$y1Sd3TW(vAwCvKizzf z{EHa1Y?c-Xe49zPHYX{;qPIJo)pxtGf*)2@k#MKO!lMsnor_5@M=4^WuwYE@K$Ms- zFKqlphc=x?S-d>sZ@zK#wg2nO2a5CcDkVCL9RK+Epa1!v|K(r)RcUFdW5j`xh-?AJ z#6wOkfc6W$l~Dz(keuhgj! z2my;ABAg(%ggGeAa2W~s7Qs?nIjY@Q4yULXmu3Jm36M+wRCRHK&`$YwamORW7dSB* zgg-DLa^o*R!@wUM{|WGCojzfOpOlz*_{l>RH!HB_>6tU9ckJA?ZL3kuAFL#f3HnFJ zEVC~Ei`{?i@Q!$WF1^O6j-i#BurXnYj7U=5NhD|!T$D~^{!T@Hl8q^Ub?Cnyulj9W zZG)+@A)Yo5e{tRNu#Rs3ZC8uye?;-q6U6z-* zX5H{$--vyf3|atR1!y={THcDhqD@!}V7};s$*;?v$UaKg~NjOrJF<nAt1p&Tr=-N0O*;NS3-!gT z4~K`zKO@HyS(E~Y@DuBJakorj8!g61ZX9AOxQ&bxZFE80hw{W<=I|nbk2NP+TDnHu zK9x$5lab7yOPA;qiTp)qw6?DO@BY`j*RMBXc-#IB%U{~RG1X?8OgGKk7)Q<_hMC6(u(wi=FWk-yFK;oy(=@5m0Fq$kF=lkH=^;Mg#Id3 zbesuOAdkAdqr*=BfIT+e8g~9-Eh|;bo^?6d$>z69Zhvs0qNW9XMS5O+_0`hS%NX{G zwNi6)b7|;atOAr}BS|txbY?Tlk{R5|1vrDGb6(p=EdDq=Jd9cUFgv17uSY)^3DE_D zzrdEsIIsS*L^T{Dg})FhkcC@zN|3&@=Ff|KB044s6k{TA5R@VFx1Q9=l)dIEtyx3}Npa|HsJ z6*69}G~*M$)CW!wedh4-h;Yy+h<`ZXV_wxAJ9nNqb)uuAqq@50Ldp4+`74r=l89UP z&>vRbs4_(1pLiy=Y0!V__*<0L7uLQs;&pg^Zmq(gR%zrXP9i^HrH?FWLZHX-7c*6L zc6DL_tHgwal$2x`Wl;##lKUu{NAqt4+wtS+{#%+VcEI*WanjPbht`ZgPD? z!~go9|9IiTr}!AVbJvcqeC1_CONAuKB`4u8*9+GL(}|UGdV%p*s_E45-?e+^nl%Nm z2F*=PAAIoMxBu0@)@bnoX)fr4ZxG88^v`X{R>sEMZtfo*p#i)my=rZ??Q`36ta{bL z(l4b-v1#+BycNsOpF8*V+i#yed#1Ui6@9?(+^N~Oci*$0d3M|O?MVsom>h;?j=6vP z7}T$s$^S#!-|514I$aJs!pc6(@?p^F#ANpi2>%6VpQok2+$xiz%*ejsMr_icU$L}Q;0eXG08k`5_e20|F{n64we4}1|PJ@NU{~=B!7Clxvh8bdR_ar z)ys@p)dHpu0uwq-lu{iP?Zm2mQN2S^ah4GK6Gr~RAY>-lzHwypmi+W%rPU|PYisXz zp+jCn^GBb4X78T8+1c4@HE@IKkQibELgI|%Q%Xlx`|k02?ZZQuD%yw*lVE7H zgg3SYfd|U-}@dEEIuRCCQc~W3pl}k^)n~&@rT`8e^J- zq);NZ@^aY;@Y#Q%CyY5K!3Xet;!J`%efUh-sHh>Y_tv1})6T*AA%`1dcw=K%*^E09 ztjo<>q=Q(`48EXKc<93#-K8es*EHS^laM6xJ;0rFw#eodpw)SF^>LDrxTN4xEv#a?XKD~t1YMXusI)CTW5;J-%q}eIZf){;yog7q=jEG|k`+oN?igd6ND*hJ zVjpJCUr@fMr|aiG|M`c%dmnNCRjUhL{=JvCY}p!1`p(=4!G8jOgY=Q`mZ-wF%@zI+ zr4PLm(hqNSvE)R{NDAbM=CaHoITiYwjHb_h?u9E?uJ-r$efZ(A=b!& z>ZzyJty_Qm_(#8a>#g!@*E%{oe(}p+TrR!*{BzGAIr{Y4f&!hvpj1!;B=c&lq7Q{1 zyl0C1WzaK+kKqd=PABG=!z373HCm(7OP|vikI2U#Qbb5D9Qm0`{?gop)W$)IK_~3^ z;ScxUge4`?-YfreiT{{bFY%WcNZY*7U&s$0PD^kv$&VzBQ)+)D%_G*aHRW^Ju1-O} zqN6NU>*g(+OVC5){Q0sQ4L5GqXJsW?Ejp3~e7pndbU->gw@&d)kkR##rzT2bHD+}W3e zmG2cavX&~m;OGOj!>g!X6NTA2vAlQxumW6z`I!^`Vsap(M!jWKc5Yh2#{BdTF5bR) ztFgVW|D$8aua({S^y05h)J>({QIIejuWcUfXmGQw0;DXP;W@i*M~&kKBy*M}J}y1KjEUXR^Abfxq% zX2UQV{(tt~yF0Gy$QSJfI!AOsH*z8ZNd%H$26HAQijr)PEz5Gy_9M!Ks;2#+q9`-{g@M|M=2u-7o zKwJf)viv7_YG&JUX1^j2z{3MQ<8tOY@;Lpe**vG9tmwB8<=fqx6D5v zflLI@Cq#7eW%(AhMBJk%#C7=y8WLfj*}ucxY~{+8n>TN|fA4-nQ|ILyW$W|PEvCds zQt0t6gP>0XJ_T15N9@VAMguXj6~huoIs_SOuu)awLHa=m0Zp8d!pQ4vI5RUaq?`OW z-3v4L&~SVEy{)ZX@D4$LU0&Jr_b;y-j2aVWP7PYUR?UihB-D7VI#Pq|##)s|g%|@M z7fMRDb#f@dIeC;ULHeLV7eoERrhNBq&Hw(d(+GlL)M)qQXB^zLG73h<00m}|`4jyY zc$k?GV|o$xH+A2t zY|Ko=qzRmz!j(RedhNJb51|tn8&mWTPWUH~&igU`oWuG>Lyxwaj%-?;mE<~8R8?3~ zb+@Lqv!m^U58f}iQ~D;xn0xlDT$OE)vZ*wXxhxI9MmV88NeABMO8(CXK2U-(@97_a z6#$kBlgWfg<=hTLA43RJt5~e~3vw>&|DvAcsz=iXyOI7toCX?^SYzg+-*h7X&0qcU zL>41B*#rn1+Jbn~2`eIup!^_R&V(ySygrF^y&Qd8+PyBt=A)=8S&;K$A7Nr^EiCiR@z!yuHU%Y z(9j6_JZxzA(_j9K6(k0|!D!IKgAZ%N5qK0PW`tWZ8qFq?5&z6)EE>ljW(199vxV-$ zEI_|Z5+x&i?QEN$a zWMoBWJM<13(!B)!E|+WDwt@#`_xpN!Z``=CYu9ck$Dt;Wa$#NuKEYu?VNHLgMvxv7 zU4p+Kr;l2#UbA*he0=Pdty|BX#a38ZRf&_T%E~QUw(Q@xf9KBa$tkH=Lr2xOSm`tF zA46c}QQs(J6(kq}u}QejLHlKHlV#2_d}g@0)K5qSgZ!uA4jo17T&6!uE77oN|Gm=> zCDFzQK?aEvpVdFg{6pFVZ_DjhqS~DE57f38x4U5LwyRgKUA}bj+Rcj1>$4K$qODdv z53;B_NUbNM8EN-C{vxbMXCn5-h7&wQ^Gf8QO!iW`iVY70^+SGxe(`cCf*HQ>2fe;q zw<=+UM{x&-M!q3-s zat&yp$*W;phGI*;&hV2())lf`;+u11}CLO3Ge1d_@CckSj_*h6g-Xp!w0@XVKW=@S0-LAt8ZxQ zEvahUwPpnt|FI7~_hukOSkWh-RYh2g6G|0CQDDFu7#MZ2u# zH7gP>l~$iGt-Dv(T3ULip`rfrwQKwL?%la-CydJ$qX{X7h_Q(6@JB+DkBdUTLKvBm z5je(qfEE1VEM~L7jxc0-PA!BQ3!%RV@n^IqcLGfb(`EccwQ*-Iy551EyDV~H$y z3EG6jRLo@Z6U=;QDYz*8P2T1!(hb&AWZslt4!(w#hN&l>aiEtZ7N*B$3BJOw477|4 zw|GY|7mY^3eF}eGsX#Q0`re^N`>@MSu{&P~e?pYXkGJU%th-smf3D%{jQWD@1v@V9 zXlZV~fB!+@xx!T|S0*OG!9hi3ph8K1lf|1s{Ss-ynm$wTS19`W`w=ho>#x6VYirf& zv}%=RXmD`Q;~hgDD{}0efJ&)Cza5FG;z*c^vBxQVmUTK9p7jPOpL!h`pp7Q0#p1Bp zkUq}tbVS>ocDv2ta2PFS4OCHBZs1r82ns+VYcsom;4&F}VflqZk5fTdh>oYXujkNT zqctS0$}Yctb=d0x{!)c211hZ+$@=WEaqzc(8Tg_6Gci8l8yf6sYw2lj91kcQZnrHy z2^M(h;xCMUDEuIQPE7b~YHR=VKmYU6l}n&f{)YAc^w0mYVnsS>`qCz|HGYO0e~wT1 zt2!QhQ}uOu+udQGcU&=nv5eaoyES>|{)|_xddgzK#iF7;kv^hD((#7 z_`IRH`A%tRLw&u&30u5ShNR=mz!&dMqQ!_V9r^Hd`H!Jyv^(a&{{6W*IRyn<|N6I& zFJ8FN*4_?Da`V=$%U5fIhC)z;BYQ%uww02DL$tz0PFT+pPw>&EmA1?RJa9ZnoJh zHmiXZc^H~0#x)HIBH0#-#Yq7~$zyM4_*jtBGZFp!M*nH@Pj|QHZ-2jV@^q2UH@Z5> z{qB)X8!{763pCL&g+FPcL}F#(dpw0d!NfuSC(9E#G$S^K#Q$ub6kJSIK^*-U|A!fT zZKNtIF*-fYiNt+XE#1}4o#_cqiw@=vA`=rYwEZr2`k?Lk%?2erlzrn0@5sdPNCZ-n za?7FG!pXeVZ-mln(r;RskRIpQn4R+NweoLoJZS13xN!b_`TYl%E?s>6jW_n~-RE}4 zV!1LR>aa#dJVhHgj&PL@3)Mej=EOHV>>2c80Y6;d;Oxd&2^0xGrl*AFBE(-15lBiW zbdU%vaQ{BzPyIPnAjM!6_ErA9F!bRd7=#Vs6Raa)`sZudk$w?!k83dG;n2I>Zn)L( z)sUS8ACPbnajPKNWkSp*e1He+!BPLvIN6j5arzSDk7Y2Jo%Z`ZV>nJ0h>?`2|6Ke5 zAKTo~XCC0AuHDY)-FtT5D!NsA_wE%~IJWJGcDam3o?{?NOksxa8-0TH3&!yd4i??I z_3_7_l$PGbdc*wu{G6N|=!yM(0|-Ry@p?v(^O=mJ%!VNZCXbLYHSp1BNE*#R8=-S z(;nTI3N9vSxKpa^8T_fzsFPOa(?6|Uy9Sp2m%%>>f5G{`YpCl|{kf8c>w}{RKui+UH#+ptH#jyi zW;Hr@rS4NJ5w=2-U_tr^FFYH6jGeM`b2BnmHZ(NV*3{fDdyt)*gGHb+Pcb|pKZz@- z(w61JGuqc9^g)|VN=$OQV=^+czWw&wZ%%%D?|x}xL&GPZd|X~${>qV8_8r)lk&$V) z*=b5CScg1{2PkfYv)n&Y{Y?-4#Q6Bo(2#G$heZZ3D`PU_`_Mm5pFVh!wvg5lF7%=L zmqZ3J84b623m5!>aj>z3BmI{c{(^sqsi-YHOaGVIEU2@vybNhUkH}AYKIHB){Kx47 zdPlor_Uzt$yQm0pKW`ORUA%HXB`F%_P7HY9pFnH;(ZCTam^&2WJ+d;3Zk*2rg-H(3 zMeZNS63Q1~i^9Xaq>WyL*q~q>nXuJ(UWdH~iv}@Ei@+M}lA?s|8R{xWcjmwvMDe9a z|7r5ikazgZ`I4_r-stZ0x~--k?8w`elcrOvAz`NSCz(lUR4?%-8R?(GpY+&c{4d1G zqI(#HI zFE`rh#@asS)y33*DHOxLk%9gJ#rOpL-Aop<)Sl=N9D8sd!2L5(7+c8Q<^EU5AJ8O7 zuth>2PHn-h0=Th#H8{;5isAg=PnJYtC^60?CgM#PWaVE{^N@eaY$ow!=v|Up^oK{8 zO_>cJgO3O3#^j6qtPDO#gcpR5rAS7#N*hW2v*?Eao<2wG{grxkqyZU|7$+IY;FoD0 zZyNaHJuX=Ay;;Sdpw2OTC_#B^)@<0gp{Ay`qO#)Z)hoGc@?g0X-kn7E?>Bt}{e7c8 zgr9!z{r4~x36gBxy7k>(y$hnL)G9wx_F-}O=qU8hK`(;f4`OMFchHNScff=BK>Y3> zz!|L1(jT7oLzDIUp{n94QnDgA1gyHS3nLgaV&|*DwAdq*n+Dn^mf-0T{Ky2^kLVgE zMAbkn4Mf^vo0E(FCN&E>}W3)!C+jqbk?P#tp_w@9_ zN^W(CU<@EF6hw|sh$nb>==Rf=Gv##zgSB&c?KYr`Lfdgby z#x@)9L+H3L@}aS>zP$bJ(3n@qGbWkRKQZ3nX}QyMGsm45V~V4~%3F}8C_i1B&aA$I)i!k;F8E)D*XYF1R$4Ebl)>z4&1#$;&90xvqjwp_nNgh`sP z2;?1;XPG|CBva`l%Q|Y!%lxw-`~!V2EiJ8JTLIieS{fT+R^GB9YeT*XGnM3=366%7 zCwE-j&S`)qF*zOZ4?k%~qaQJ5qKQXV$)uh19xjUU5kHA{(IbWpd>DjlAGZGG{j*;l zzvl6bWMwA&_g}wy=+Gg(C1cdDg+dOE9*!Y{LqpKxp~w$HpC6z-ehzrN@FVehy!`|H z_zwjixon}%lR`f>*4gbHYs2XnG5s6u+hC&WSJd)IT4SYFNdV>~$^GqhK!K8=xK)^hUNoVHp8d^AzkSdRGbdh))#%FRP!Tdj0Wcbp5n)v(u6GeAw z|N800s=5}G`M`$EV+BZuq=TGcMkQ{>IrAqot~f`-doq25e3BG5=3_i54-6*xpCsE7 zfRCbCP1=>o(Jq^@x}~$Mp`)#PAjWP+be3?W56!n&^h%vN;86s8qZ8gil4MjAp}Wxh z7-~(7A4T-8B)zTGiL86X>3J6~pd`hPTfD4Xu z2nca^az6|3BO?NF23@RC*XA9eh&=pF-bJV*l}Q#uic!xWd|~|Q?YX4SoWqBXl9-UN zbNkL~SFS!NFDpEEZtnmGLHNGDeQ^{30mTZ|`S+JTr~oX8D}PY_-hch&`0?ZL*W0jR z!#nT%e9zw9NWC5GD2TP#cL7ex^pD+=VR42zW)yDAVt6*6p5JQU{K@>R2Ezp@DFS2U@(T01Nk}N zRHvp`a0WfxoSo55r^6W??LuJOXm_;3?!Y7go`F3JIRs&}#s&?QR8!JVBhaO++O#b> zJJ0X);R{-h(V@~%q*r1-Y|m=HbpP4>kKBJvpBcgL8tUjB=^>LQNF#X;5s?tFx@V}PbEqT4tW3|yI8V3z!gYSvp56cZkAG}x zYQA;zR%KNM%*q6Whm=yurNfKBr&ohW&9HvuvPhq&pW@Pd(H~^@jZO3okM?h87Zw)YzkmPA)hlnl@#gmJ zJKQc8thZ7rX98akXm;s?fik?6;kN}hDok)ejLa^4nHQwWl}bIo^(%clZ29wr@h2@5 zqXf1hNo`8Bt!4VlG+pM;V6%`&0+BZ<%BB7Vmx3~RSw1{YADMJ?oICp1Y_^RXHeSlU zghU{B?$utuS(%lUV6&LePtu1a-&fKf5FS~w%T0*O;t8r*TF(h}ki`PtAvfiqe8Bx+ ze}t=W5slz~VFDim!S?pPPrtbG$(L6;y9ZJd-M{(O;Wv*RcE;yNsGVe~;tgs%R*3T& zLrmO*02443%T6SIcrd_rjNt&XL&L<})zjU}8hv+9cPBD>cXYsC1cn=^@~}|*{Jt@t zANFV1o{8d=@(}GQpybqlIERC>R!i1r*q?DiI=Uu8r_)+Ydb`8oa#-zlbF>o?HmnYZ z8R-O}^}|BVE+{H31_PQ%HDy;G2V^ByI+1}N)r@)z6H%8k8h|X274!$pG*u|ATNr{tsjLNP>|b?@WzxR5f>3HFs3E zb+1fyV~S$h?RPQJ2Ni74Dv+nKOQ9GYQ+S4vsz-qpy3dk7^Mt=qqsd8$Npe{?WhR{} zD*O6sd2LHq(e0wD>S~0|eEY4p_Z~cu5TBq!rfYel=1G5qp)^6qza~3X62o+fc0qY7 zo}oS6765P}KRbDwZi(AZf{*qx0ynrpta(+yg~e<%%bdc z=K~|~k)vIG-VrhNJOVsbY;XgK3C?MG7T6x#j=*i$pxcUdbg&3c1fZ_M(V0xl z-JQ@%VQKEbzPk(V5HLfJ4Ab)SA*{#4g1lh_3Lk~J8vEf9cu64KE)+070HV4Gfk-t} zR>~Iw-{Z(gcs^Tg_ULFBnt5~4sl#rE+cSb{z!e(t_}~%&hiF=or&0y{fr+8v$WcG? zUGu6u-S)6M5z z2ckdAPYwY{cqzsu9O)p7S!QruR(MjDGw66tyLL0iMr zkIi1NB5g(f`ux9r^6~wIhUg^CfufB5ZwbxdyT4j%l!YFgW=?_1wq2VEn zk+D1%ap5sd#Wg_;IG_9Yb@i}wU@s>430?ZNT)$j#a${zSETH_y z_i0$dL30 zM8v=y8irAgiHoGD(!;pG*PvUHYb^aBYnw1Iqi%76U*s@0L2&WLVuv3XR}6TDzWwg@ z2Ok$Uw{^N*_P2ht=h&+U9PxRRHf3&K6o&%K^tv3to{FaYj0i}yq(x2`Y3;* z|9S?0(mm!+Vo=K1N2L$)Kh7WFe`fG0{2#9H;ouwZw60EZ-6(t5*xC1>zHLW#8ayFb zoes9&u%S z|K+RK?%#WG&}~V>%P(d_mgDD1T4!C(dH_qKBDAa!89@&^h>TiLXK)t zItD9}uZGmBIHi5)A6h>VcO2z;oet*xwr6l8LE#;71diP#+my@7&hAc}?sD_|@*h=9%%YlAmj zL~nx~W*sQ_8w}7m!1ipwUJGTFM-$JH576J>tvo*FLt(_IgZcoJj)Hv@GS~-(`!4z?Skoo4sT%V*?|Jo?(vZ@&EoCeF)Ot{gpjbmhvG664}? zL6((SUX&hpq)l9>edym)<$t))e{k4;xxDSu%k{Nw{g}%^@p?U@ja`FHU4uW|nz}N< zif)A{FcbPfhNuz$EilUic+yENp3#C~$;M9eY`{SDm$p2WM{Vz~i_wq0>S zFrL`Y5Wd8^)I8+VW%x{0nI7^F`S%pr89wyqS{3L@CE+VLe_8oMAjHPt!<0T$f_cFo zOV)O5-*M&2wbqult2fIEFWyZ}jO78$031RFD0oItm-j%WN0)i%|zk`Lr3p0a`#2(QR|DSej@`B4zpq3hOCvzF@?od-`pq% z&Aa>hKKl6Yw~B5beeE^aRo3U{TWogXP$7ru$Q(@N;!EP5_{D{jZ%iKfZGJJhqZ0vf z60ZD>N8w{dbWcwYrn8Vv)MSET8OD0v1Oh=g5hO&XjgMPY5ivTQO@j#V_?Qf13SjA~eD7KC z7Sfa@oZ8F2H5>Yx(0791f6BwTZkyzGeG(q*n zMR*R2(FYX>%k@+$oxy|{9{fC)TP{8S2yINys$bCI=8c;l{q?Uc%}t2@@xveeXwRNK zh!`c&Ov2~I;nSNEtSN{2ho53k$%xMG^t6qP4#A;=O!FAjC?lgyvFlqVmf$kd9Lh@;$*1&!<10$IuHS2b_S9=u@)_ zpNR89_`@lprhVX>qNbYGKF(}OV9;oWhez+$btSt@F!sC5$msqe@KI1q)@0{oCnP3p z*|G%!=k)2*b+xsZFJCGzE4zB-$`5|<1MqWPOf14HGEtb45>LuBmX1>n^1bQO|7rAr ze83PFvIA~dFmR(~!HY`zKI1|k5`+yU@7(JT!TyWrE=n7U09}!3ARVV1xx3s>#{_kI3UAJb%_N}Yoy$FdYf1Q0Wxq?U=qw5f;Y_!1> zge}J&^bSyj`bMYHeUk9BiOhX;hSwJ{e5~-hdZXX^2%QW`Fz(a>6wjQ~|k!BMI~z33_K`*poxZQPzpqy)^w8>upvn)z-;g3ZWA)>)-B`|~qi+njAh00bHk2>!%pA#6hV zlkj7th+PE_VlOm=ne*q;fv-_VW+XAYLhQe54fmlkU^AsPd<)bOH@QlnB@ z%>j%mF<$iyPYn4YqD<6+L@{tSUHLP&^{b9hrnqfC-LrmER^rJU6<=Sw|Ddj|tg^cP zKmOzVx${4G^YtUIyppvl8>8%?e3)nb8P)^D?7>oOOfg|xk0s93p3#7)xyu_}5m!aS z!gcAVILP<-s(3N97(Lc&i0!56GuQafE_|rZNVs?A?AibL z_kVv_{}ArUM~=So^I!ZtJv|*QWLEh95&BOPe>{e<0oisCnqacUh)SB$zEETESw;ls zPKvF88PgsF*68l)LP%$5rNgumZy2j!u;Wv5ZKmXb$Ury-2MJ0)2sdLa@8gYqEy#Zw z42?x&5y&&*u-PcAh7;j6T#jgGOpF^=W?%(FGYn4%*rda`!3ecxM5*#A6obAIAg@L| zIdYpuBE3i>B8j+TwK_cjL%t9NW-fmaM5L;!3L%y6l$2=o1_W?8cI-7^1&Yk5{Z5nq zOz3IJw->A5XT!JY96M9@dVK>`-Q^fZpgs^&&uNO;n7m^{azTU~7Vstc)9G|>+_D9( z%IzH;uq*G`y~h<3gM}ReEHHdY_%Z}pHbO59AicA{t#7!q9|2$d$Zr#4)w!dLX1!{P z;E}}XeA9o#=dbJVG|39M6|sCeb68 zz^sgjJ5kmsSeAM6XbHBj7mz<(;jB;4nNf&#?(ExKLx-MNy?^f<(Ph$K5F3^BrvEbyYpWQg`a;)7`wtY0i`L#5FRRE0Q0 zzeD|=pe;<)Brxd?Jwgx2`r9IekJuDOm`5Sgb=#b@D zxEfF5&lHf^mdl573bIf+nI5y%|HAnK=3Z<@nN1}4@=vBM?O=9BUKT{tfEJI{lRZ7y zk$R6ci!ehYI}6euj9~s3XIQF;EG?8fkan;;11q5`CvYH$Y zs~aIT9HwYzRJ6kqWrGbI0}Vt$LzFxn;^gV|Q0fs=Lxuc<8g&G$&T7nHAjXD@B8C88 zikC+`!l9k%WXAl1I3o2AJ3c#c{o<7eaM0e6nfMR8*CxB|aJZrBVd6_BWHKAbo+>gM z;*(F}Pl=*W=TF2LXZBr+@M9g8O)C>G->t1^>bzaiv_C)HVu;~U7&AQTjoLVocCph3 zO~qxLI8{+PnaPK(P-j7C`Sznv>7s%UEH?74lrq@uFo*3BC~ ze(UXZ`DlldkyK?xMMrzvS6_X#W%HK!gm@X%(Bopne|Gt2*gJUj>XqOB{`W{@XttX6?c4jS zU;JuK-WqNKQvC&~5K0<858jchaDnOp{D{!cQ=B?bx=Gx`cF1CxH!YG zY&IdX26`*}HzAUS(PUIkjCa=7`aFH`oDAKYjv5!}6lH-hK<#Hw1+c6(NbR1){&)(q~P6 zLVwS6t%d{2gSOJP!DgrhMy)B`nUU>UXH|)0zEonte?cysDSu*OU`jTe+qQ4bUY(6+FqjKs`B*7}cVrU0 zH2)(ABzr55o2_QFR=Ee8HTYADF#Gr~!+(1JD5#A+i7E0nlxufN6P?TU1>9If&Q<$e zhCe_2KgmB*3znH_xqhcqz&y#fl;qUid-fFHzFk&Uj*tS|x2)c^-3%p*`d_*KLc0^* zew_3IKgeW^j-E`&Xq2cpk_JL1U@tC_ETA*G%ff=|7rp}g9$i~(@R7`rvr529*# z5l#b|JPgdF&kI$40B3_p(?z*jkgWxpJhXXoDH(z787am+-qHSnwyK&IPB@MjdqHq#e7P{AlAj6 zS@v=GHd`;B4sVyIbE<-q@KM=QLFoRJn^O2PvuoGx{QUfw zxCAU%B>n^!vrOfVQxdLJJh1ny+Q*QW3Es*GYG*W?oGxLSht!t8P7R7$)Kj+Lo#p=h zi4F9ISeF;QqIGmXq(%;t21WH~>@S7h!NN7@JPi#O?M zew?5O;iIT{mdZ{=ryKMtzY%<&ukcR3%?}0dKMVd`;~#|Y4=AbzhEFwiRKW^2ItGOe z$rYjv+D$I&PPZdk3k%mIu@)iz5_$?nbc}1~u3Z-{T)cU+2#Nb{+`Mr#<`|-Xh710) z!av|GIO~?)E&byk{|tvsSU1<_Z}|B;KZnVZr{I}UXM_KP{1c@Atl%#}BaVAg`$aSg zbp!%W!1OCODf%oe#6v_4b+UpV1b(i0=~fr z9SrMiwMOA02YEIc4Qe>A0z{+=k!ax+fp;k}A$i>dpgf=a<~X8(BkXi$M&{c;``M0d zJ7AxdMTXq)o+N*sOrJ$Be>4%=OvkE3YtrE8;OMv?QS!_hvnG z=vh=FKD>n5msBRMWWjOLm07CaMF*c<6{&DMcoECo<^F96%Fjhdf2rNhVf&SeJU{Z2 z9AC-UBQ{AeEz5_wl+RDAUxUH0al?l78`mQaMnz@grK=BCuS!gab7C+?J!*jZFVYc3 zE5`*IeX+5a99Ris&cp$)R{UV~0=*pDqsgn0_?F%Th~TIVR|K?01>f%vJZ$Xv?e9;1 zas1k#*O!$U_lut%*}MOMF)CddNsH*I*mMvZpVID0`ZGTm)IYdM@eYrRBkhCt1=zXm zAC-|2%e$slZFC4n+;Zr&SElJtwtmjM09Ut7Sw1lsDghpHqzsfVq6`80Agfr#^T8v zx2jH_y4Bd!>5j6zx;1-OUOJXXiQ1XUpCGj0PxA3({v_jxur1F9e=Z&PAZ?t(yfVRE zRN36#?J2EkL7-}bof1(J;a;%)E)0E;vQKF@Pc*eF{bPZFK?T~jhT=q1`vXR_(fKsw z&-~#Jbdp?AKis|ssr)XL)}Fpyal5j)uCDfj4?Bu(746==wQJY@ok<=_YTpTW!re@bXSvwgvhK&#Ve6 zIRp{vnQy_|tf{G~dH?+no042 ze1KOEawl%zR*;#Io|~8V&B>G3uU~I$Y&=(ZuBx)??!CK*4jx4Kd#pu3lVO{-{89e2 zR8!pH1p8Zo&I`yNj8Q2F#*h~yRkOtex1`yHFIPIFI|ukL!)Km+vV54JF*$FbJgH_> z3(NH@8Vl1Qggzu>m+2#m8bPBVTP^dC)R3M|pZVn5ZVq*3{Hm6CI-}OB8DP?3v`(_T0bi6#=>SNE|LKX|8N^kf?5Rx1{s<~qmbSW z3Xw$u9|@sbTDw2`0g|l}nTf<>3M|L1bBo zYtmKRVOR

zMXMAkbznc1B|&w^FVf?YM-b*_@_>d52Ssv5+-Gt?f!7IQK_fpnjLt(NFg`;`;0PN8 z92;COVLL_u4fbWGz|F8YBR7~CP7p9nnOU%*CIo*H<%J1>FM~HDDE9Ld{uKWA^k69ciCF=JWA9N1 z$TycTe4E*jl^hLAeOZ4C%*t)u1F=yi)DeYWrS=;(^idi$O1l+NBb0u>5Gx~-x!s5_jXVC{RmbWWs4#yA8J}%^zv=4=@ZuQNw{G{B}(>H?x7Z_|58b^RqiH9 z(sG|Fcn)~7>}7=IXF@OHaeji!ARZQ{yeIpIklpgTq{EO-gZ_;Kdnl+-3IsnoWB7B8 zKf@na1nNA4_q+NLcTy~p=CVLx3-k_;-0$s3g`=iQv|qhKuP`fM#tjmd;3JMR(gqH} z83K#!I8+A5coXRY;T=KC@vtDz1GSVQIpaUvB;Y8)A>lZ(24ZV)3c|jgzK-?|sI8-8 ze(1dLS49{%M94s#W}OZpn<=O?hopl7q0^%0hubFEoKW`Wico%x?O~yGSL1b}X6_h1k7 z&^bn#G}$Tk+$6i*hUVKMZ+w^4P1=B$OuRSF*Y!BbEh315PR}$ z#u=W$NR0w2(+~1=##3bYz+Hw$5aBS2$yV`?x=0@1EhPMouKur1-uUaM7kl~!W1}7a z@Pj=+`G+^6V{-zLR!LX zRNy+bL8sR1wPboWP;3o@PK)uugYw4Vp^^0&afdgp%t~@=G?CysnLnX_3R}T6`BThs z5cdYj9Z|taS>ROrPGH7A*Az2z#AACQdmvlfAmxrNy!VWD|S9XzrM+Cb` zaKvZ$O28)?`YIk1dTV!AXA3RO8$;bvmJn4W+#=vQfjo*o{pni>)DWqLrYxzFa`VRp zp+HLVL{uey$PY~A|2d-%RYds6Hw-;;vvW3V*l_o5X?1n=mFrhm=d2ciQzQz#K>Ly@ zPIVMQf6T{uM#seD1d)h_sI12fZt5P1*l(0NV`$9V|5JjPu{BOXz4;W z%Yen8SrKPJ0O(Z-QAp`LclC=Yl~p;b-LdX9Yt~%5dabbVEd0ldZ3@*60I3SYpuD+J>*3J$t6Rs~hw$DJl8g|N32gLY&(j6B82~7aL=D zIBa$sQu#%}&jKnbb9rzEg2)ouzi?g3^+`vWDHgJR!Hk54jEZ13`Pb6NpV}3%4M`|I z5Gmy1BSV}W;S2#3xX{z6NASzOewH9piE{I^=IfXkFTS1V8k~H*qFIjM;gZ_&P-X2>xU?p2DAGhGzaGzGVKyZI(#S;m@T8KO!QK?6R#)c3pi?*U{s>Sy8`d z-3o(N6OQyzT8v7gPSNWNct;eTVG7HG&=KKNzwpFQa#`)>td)tb^%)80ORBF|G{R@O zy}jek-FsU$-`uxn&xXwfF|qNHYFLg)K7(iJB-q)~FRAMl_r&k#_AdxZiIB?o?%svJ zV0UL1AU8HN{PB-}#Nt%93whb$I~421-Le`006+jqL_t)HcG^jwhpE|$b^*z_mMeWa&{-`tNn%U$Z#zbPiAmcroKWXj~BA6e-Dw!6(s(buQXrbqRkM zPXUJ)p^prIuJL~qzQJfbaNywSGiSOBJMY}N^X;i`)6>&1ktIq(#SsNUp`Ka43x)rS z@ei~aWLG}^_1Ay>@T0oAhtbi_V{g3n#+z@r-LW!nl4O;M5Jvp@X#KtzeYof|l@Ew( zL0gdjWgv*DL5coAPpp^=P}V;fplN9x!fW6br?AH92;3i_n)dee^!E4k_Vo4k_4V}h zV0j)CQ#eMqHZ|2hY=9{Z{JCrAE@Z9dqAgASlu0*#@;Tb=EZA1??YE~IA3i*J^2DpJ z95tHE=pAOAe>9PicC)s*W6)0vK2Sj77s$^@MF6QeHLxjTn?w142+mHY%VLd6Nlnep%|7+*sf(8{)z{QqyLPRrs;acK zy^CM74)pTps_!Mq$5WwDrbaD2c_lSYTg=oIvDF6lED`iZDh>hFmAq(3SK z-*|cbXVJiiz~nJH3r-$7aFJ2$CDgw&wP)IYNn&R)$e(b*pO^?^eAtJ0HiFQWdJH<9 z&+!F)j~eTeZ@)xWA(mJ)aWlpRx&0!0+O~r2dv@=6*zmBfzU|zF(wx=FS?OA&s9@rd z`!U;#$;&vj|Bb+PK|m4b0-^!Gv7`FM2k0h?K>(mW8#}~5AjeXUamz4qX<^_)q74oV zp1WB3!N=$B-mleY)cba?`}Hq=khN;7O6NjOgdlyE`IAUN70rLxQDsi@&m?`|>5Qx< zI=uq_`3dO_sPGB|)PNHJZD0au_q5WG-Ibx%BWxZ*haqYPEY6<(-rl~R-tO*R91+PG zaW?wk`wR!?!LF{(`uawU3sPgFH?K}|*$tdI0{kTSlloxhPuf90l=%~=QvXG)_$>aU zHPJwl`BShfmwJ*vmpFW@S(l#?UwGTrJurNsr1q`d>zo!)80HJne#3@75muwZXi#+b zDKJ{}4yoYTN6W#(27emD1r%nT1`gx#F6+uGrH@b2pC@2jh=yLscr>F>@I72QN2bwouU=o>hHworw2 z13DuX0%N`rrjPiz_{8L-)TAVrI|dU=urXVsY`Ck{K%v*F)NrC<8L_M%a>Yzne&RVu zG9sEJVfh472}kMgh3l7DV+#B!_SHFn&tK%SJQII1E6ZI9upri_O%Q>}htuH3=d|Oe zn7@M0<0{>e9-n#{7jc2$Q(u7ptd2~1fxp2o)9!`g&o%x6K9r^yy;iSMd;Mcz5K%Ui z4w)CRQrM-_=pw1G!IDT+q2F9Yser-DxG2$Qe(7*~2iC4xBWfau=wilSCN33dI{bsyj?{B!zB~K=d+(Q3l-X?dW3RvY_FF$oPE3*F zmIi4Ah`cearVAf$2-?nP`&vN$k<0sJ`k*mT!VcM6geyp*kHq^dWy$0`5nvZ*_(qJ4 z!O%r{1j)hK>qTT{-u|9`*zEqo_T7At}-lU^x*IJCM#;V;ua$cQpaKGLi~LrMOq zBGl{Ftjo>KX=-Y`bEgyu&B50?m=QEN4+lcPZDek;D&zKDbE*=HGliJMB_2V*ba8>+PP`VCKz}TnBs-$gI3qk z*>$J1d;eZXM+f2{Wv|L{yIo@wW6(q~7(|92#Ck@1L^UBvrpbUw2McV< zn2m6|VxnDc7Xm6doernNW`pBH6#m%OtQQNiW}QBu`kc~#>B7fYo7)PMF&eO=ph97h z$T_vy;i4oTX1#qeg_q%j41$%zkp9TNKy1NwMb>#ylx6-wby8hUB}7nMO}#uP{BL*I z_wL+||Gw3vkaHmqLh_@#B2SlD6U-LP6bW!$~ zDf~&y_ZWXpkiR8)EU<-|cvSG`_Xs`)Tx-(evRA~FHFVUrbzi(&o0a5(KRCDFaH3Cy zUZadM2AU$^i!{+cH0~QCMLZ1a7y0>YMtxpdT#VhElj^>7x9;lw`m)Bh>$i#HW1MCQ0VWX)-3)!+?sT|ZE{r>n*^ktDm(y;uBOJ5U0)w*^ z@pBNC1ZW7{7DoQix8=W?(`QmZ5fs3|g>aYuC_@C>SBXK;QFFPNM)OV|6_Hb}9U5Us zY%G(VZZpYc%)|x4n9rtQP2&?T&g4rh{ind^>Z6yrCzyTs^f9U3$w&%JMG3?QUjl!E z4|OWpq+9EZy4uo>8Co$Dg^vQPO{>YZ8I7276<-zT$lsm@edYuIC(_4cG9Ed6;u88E~Zywt39M>+wmuUff!3tRW}5}5PGU9< z`G7`)^qZx{#owJd13&1pvhuF34kQoE%E&~}w=G+?#K*_u85oqiIyyVLJ3HGuS`l=) zy|uBisU109+uGpGgoy`ahe!TTGiH0N$hc`n5Fw`%J`mCF7I1Dg8V8da597SZF#CAqB-?`zzk0ZkvaU1XGD8h!YqTUYK9_P!18I_phH` zxODB_@UUgx6voe-VaEJF1Xis|bJohXo2t(==+GF@*jB zB+(e37#kTGn~41CtCMvP>tP5({4-)7iQOLIAHM!n{-oDt!k>8j`vTu>GjGgFyjW6G z-PCpRX4#R=t4xVnk^#hHPiw!6k3O16rAZ%vDH-uaJwpngPifMH6aG{AQ=^WEb6V{t zeR@LlhLs8DOX~`6S2naXpX}~=P*Hy4=8gS(_w3lUCoU;XrKMD>K{3GR&yf#^LJ66F z`n&HgU%ZG28?7xZSP>j+H*LvI-m)qsJ>Cf_dWL=7{exY7gPr|@?fu@4?t$j6{?C>MF zF|+ftcoU_eQvi@*2f@)r{KN7q@eDsGLz(jdPAnj92s` zn-l!lNa8sSy6rLc9GeABZE}GokBbL?s-4H^gNd=sjErCY>KAwJl)z#6tFOK~eB^L` zetvMmY?0$H2t7^y86OWkxc}hyfB4U7py05|Mcy=+&rxo)=X?qpwEopKa>BL z;WGt@#!r+FPofVN;^DtaWwT)lHv-O;$Yjk*5gwMdrNo~L$Un%8n7=MRJ|Xemy?e#Q zx9jWc;D0L9Sjg(hMi#t|lNr$;K@!qqtv}qB8spGEXzcS0jTy9&D`L&Nvg2}+?4sWZ z1wK>w^gOc{P8eMY*d*$qSNZ0Q@SlJ9nBl{^wA{QL*q7I?S(}@a`}Og!VOd7tV+6u3 zzE$+v>#rX?aA3uX709qI`q*c;FGL?19`x4L*A*6?J9+XXf+-`sIkIKO#l;tF-HMn< zFiF4=tf9n!6v4(fHa70}qumYk^|!XQH#9zkQM;`TVQHG1TUt8W+Oej!ySp1EX9Tyw zU=pnr^8`A*9$w3U1KV;!LP9LG(YUyT`1oj-3)W}ITfoN#cZo$#f5AZE%Riy`vsNZ9 z@SbhU%k&2=mPY+jrOu;#6LS-AY?T!H=ji_ua!X7;6U`SH|3tgp`}Xd+bn#+wN%4(a zl_dq)@o~{+lOC)A8!${t6pN64kabByUfko}oUc(gia%VY`h{Ht0e+Tv^M(2I zdjTIIFV?2T!artF*)-bkVxmt(WB}onBh`ViQH6IXFyvR*Nr*jD z{wyZ^ACsTpZA6$zi&4ip;Io9sS$y{xFJsjB87V$R*Y|Dd$=&XFUptjXVCb-0ko zTd@1H+ZXZ|VU^+KiQ zejJh$>C-#=ye(aQO`ZL%y#sCC{J#frCw+ZAon0O6m;pjFM9^pQ9noqnCNlzM#Kp%V z{vO$vV=!Wfk9Ef&I(XU9EXz+2;f3i#au5`x4SRIe zlnG&>=r1jsC3WDjYNi%TGF{X+BmDH841nL60*Zc2g-=QhfO9Z5>Jpfro(`Jt%mls! zYR>Q{_#oU0qxQ{Y_dScTdB`^&2q1;i3bSsN#b}`%VvlZ%4S(SGIDN3R`OP=p{PK%0 zPnLo?@;`anxUey{I|dT?Kj_igWzAAHg5dYFMhds z>t?tFhP?3v`h?zn*{V76|Y&l4*En0uqT{OAAay#}(s_fr=V~02&O zWGJ&e0e^wg60F}xm_Fp^?D9XEiHNSUB1+4O*~@*>eIxkoW%@IrL_=DpPmnLBp0J-P zSYP>%h~g#x!I{JGvX+?Dk_SM!H7v19DiYy zM*py}eBg7cQo177FM^p8!qQc`#lLZa2!Q+~^8hQ)^93I{EC zeNfTV)KYr)-od?lckkPmm6K;M+axpLliDzvPGdvkmCKh-pFMNq+Vz^68pN83GU?al zrtZpJQIM0Gl^ku>Yk8>(y$>rjekgPrv;&9Lm>Of7m`EHOA0HeZ?e-4Akr{^Oj$Th& zzo)a?+t%yB75Gnf_j|j%p3ctB+WIHl2#@J#&8Z+=r$RMg(qe(v14LkABXJa~`< zh*X2}@hSEDT=)_>f`^5m4;FF%;Saz6```aQ==Emj=Ki7!71ro)|~^X|%eqYhOXemzhmE%I!)%E@=D0BByov`DY6Yv1;M`h4Vjq z=N*`pxxyYr|0U@ksZ=;DTKosxxqwgThHd}y4Edl^MM85seE4wo>g*lccF;uNHzyhz z8b0srC@v|vy#3N!KmEy;&0F<4{UiM^=m8gnrsk&8r@zCb+MSY;#-^rGcr;k8+ji`D zrYG^K#sE2R; zLY+py>y4`t)8g!#vJy`fRh+t6`LMnB+~pf(m9>|yUVHQC!Tqni?oLcYfJmvuiUYS_ zM5z1j%;~R>A4h7wn%Y_{D1?vBmQ_iwY+k)-RdQB>3l7T>$P&X3KO&#O`jI5wl?ZTz zX-K119UWyKPjCMHJ?Np{{;UOZNcyr>?!buDPeHf3T;=hq#oL zRaMFenj$hIl&aBav07kJj^+)c12{FOVq1|09}is4k&~2)KM3JGf_~z;q&Q(v4YxPax+K|Ht7YJD(2IKFBgG=pz+MJ}_;#gj0$4 z6#6_4e|G6V9ry(W1^f5!|M0^Pk)7$x+0%Jz^003C(aK-M_{*f{<74zk0^$!)wh#U~ z;PE7-G9=+qb{}{`+0s-Pf;QtE{M4w{BgS%I78AzTl6XnwE^<#d&MX!ABq6 zyL-2)s=BGE>DJAnV{aV$$&Y`Wl$@y7ag&*#CezW`dHve;&p-e4%GGP_ZEa(Izr}1? zw|2*yZ@#&6_pao`BzPZS5;4f0({Epq%1Fdb#(y|1faX|Rhm4!pkO+RD-_rx<Zg>49d5I%*nha_>;5GNjF0I6T}98GEYB?KbJUskVN23dsb46x(KhqWH5o{& zxIQ!Ki_7;?j*Mv3kt>tjuNUMT*|I7<&Tc|%K_x88G%X|O^d$NG1pWtQVVj13vm-!3(IL=B z$0rapV`OxEV0fh8Gu%5k+|lEyY3-_P?5Jt!>FD*2ATcMx>J1FEwl>320siF(TZxDm zh|P>tD>jEcHrkc8B6Zd3)ft&t$P)uqU#CN44Vb(m5#kapKj=)otba}lvuXA(s9%=# zpggyVpr*_nkKDfpug)0$O!_bQpb^VSeP8g+Nu8J^58W3AVt!Uah!5g*7Tb6(^nL04 zQTX(hP(%Pres31x3y^b%|MvhsM8NB>zm9BO2%UNP%C&v_OR>N~6&W%EfjVS$jq7rL z`RC>6KQQ2dlk)F>_q&eHHZ0uu!4F_g`H{onm_Po1Is7O2Iy~wB^7!ktIw7%OQ-;wB z3-duyLDXrzG|XDt7h=`RR3 zYwb4z6D_M&twIuw%&g3lC%-8yEJUr{DJ^blZY(J-KKj}*q?ShNyq>S72izjq&$ODVT1#e}A$57t2AmY~FI=;)U~tJ$LTb z-Y%|6ONzGH&B7$ZssK4S5qZg=hnj;NV4}l%jPRsl&HycKQcK2N$x4AB%XA%YK=g8? z3^BfAp(1V&z&V2N9UQ)J`N1FFJ5_SO&Y;&EI|!YTFXlptKVfu!27i)I-}Cr? ziNKGGwyw{NzjCk6Gcde%bg6xz7`I&1nVx3kqv;OSxKWvpcKtdEdeZXloC`hAMj{5z5L!$$pp+3)W zmuIjAN&mV%Nd4E*@9Fi7z%{sDHsh?5WMtFL~qpBm{)8moM}2dnEtG6e@`` zNq)+NSOEIalr?SQAnAfEY(+J4cO=)Bbemt0>X~YDa+A*a9@R36C_OL=_7C$o?L(uW_Zirl<;)1JM1|MKTQRaI6ZcITShHL-EAGM9)-ds_W2 zUix^wgI|2{#lQaRzgE}OAU^4_*N(mW?z<_;Nt51r^TGd%mp)-pzi_1G1^5c|Qlq0j zP%~tcemztEEYp8l?H7xgjvhPu-FIi2TbjQ)`OUlk_-;mehLF}wa7l2_T>dZ9e_HgP zQU8TnfI!>6eFp+Z6clVjz~u|)&(+sG{Px>#%F4>lojZ&Ce)aYBH*Z|8sjV9v^y1-- zIk~%c@7lg?2Q14@M>ITuQLS@Yze=o0M#v1kAto*c&JUxb$ODfE&v0)T?CtIC>7`iA z?d|QYt*wa5(F$90N7sO-AB#)s>U*lHsxYrZ-K zGXGH1S)}6^4AIjw(hIf}Jh*qSxwZ4swfmbkW>~BSB~mw0Tme)cge7^L!}(Vd17e6q z!!#Ph(KuDQfdl;{V>6lWSbzwzK}>?z2%LDD-kVGKNFjTxxca|7I& z*w9C*)hf&eMPx)^Y+O0yLv|fS0Eu?O2LI{vC%D$6*W|8p-zhCGuY@}WlJKoca_`Jb+qE`5FE!3(H^2#);E1n(a0G_t9?xJ`-w@(5H+S|oclUMm4fYL<42_JmG&j`O z)naWT79Z;Mh?!xuT1;eCM!=?M#KCjM$H%3lq`BO&7K;%H%zkZ;^S@<+v&B?N<=>8#>USrr+wuq#t3x&Da^ z^GzQW)0pW@SV*O(Q`$&tpiAO19mSK6JWq38G^t1W1RdyciDFXa$soi{>}e($JTV9G zL(rWQ{Fgp_R1f^ie)5x_6rMQ)U$Qf2&urej`RLK38jX4y^}9&v~gvC^77WLUHA7-KfQndUR`ZnOH0$)GlgWs9Ud|oOl#Jx-M4T5kt2sQ zGc(}{tkuv;LIGzs`gcH*pglu=!i)hgV{C}33{AlgofMmYjF-`kz}Acy&7ECcH8oZE zhjdddE$ssX{a#q0y+cS3*w)qo!!*!_ld@i?gTFR(Q-{NumX?y0wQ|LZG$g0CSgj_M z)@0J?keh_ESi_&07KjP_o~oZr3xBzcQc1&6{?LG2R6J^3HUx!l|IS63j{f<5sb6l< z^TMAp|Im>e27UE=-@fLL{?F5YAl(tRzF=Fy#mg7l&v#wBRasK{FfAq4q6$XdM{SWZ zNcsDy?zkF-aG-jm70@gzSmv_lF|P0>yn!QLAY&lTXq-o;Wf}7(C^Fj z)va5%Zr!?dt1csa!W}!eJ^93A`}QB!>JhIG`KXF$5H_1pJ`>(TPkO834?6%Em06#R z*ve^`mT6eR)g7v>sJ}5@;`vh$GmHF*g-}KQq%j*pj0*fo9`sk@Pe$F_4F2{y2cq{* zy8Uin^tIDN9gS5copKY=2YIVRMl~E}%aZAQIFV0fXe3Bt>*Mn0R;XW@L}E8iR4km%WOC>Uvx%y-f^RmN?m2Ym!w-)m&DwkKz4w{VJceoHO@u#Cz1{j31W|*56?WC9 zpZ?0Oo!viwo;HM-h{u!g@WrB&JMP$j_};_2cke;cX1QDr5-s0uO8*FDk~a9BXz+bR zxn~#Ttb1T5N|@CS?BZt@@Hg^+{fg!WJViBx`m zn*S5^w=Ma}x0g+&|E#V4@R9zJ@edQUwBB6Uw&=siR3iEbJVFp*`S78`Lj!}eb2G2L ze!6Q%ZRhq{aunr8aa3M#a$p@JBP`_k0CL=Lr2O=4Q1G4Gi3O3$^ z$Bv7g?>fMT?l&?v_mk(}e(lY(kyxT*Tf-AyeB{o9_Zv(#Wnzjt$^_g>#;05Ijp`BG zMzvqqhA`&~9?8P2OhGVM2n$vXyfC4<V$%i~LE9cuoGK=Q*IXyFK75 zW%5t&-+uJ`_~e5B!@ddF`1I;>M6B_M(}V+kYHC&K9& z@uo@QQ};wWuIDY0{+G~Vm@%Qlbx?GHzfOnTwhH_K6~=k$i1B|3IN_M>R{5N-t9g3*k$+ej#uan2)6aP8QzEOX}Cb%T(MKQc>g+(o2$fQWc2v6bL6yOA0k#mi96b)2Z(VI|XIB?&$Ejo@8jB9 zgS{ECM?ocg<$B~N9=iqjA0@?b4B}8|%;1GB`N{Vaw?O?8m$G8qsD8de`Apw}g$G>3 zq)G|v4@4RKZ7_Z4gEzT-VH|$=zI)G}JLCDi_q}76_v~z{tb{<+k-?byM7dsFq79)IY;hd*tvfY%Gm7`JKtqTrjc|AIa#m&xF&h-yVnuslpqNH9kwp(#&r zA7(ii|B&uZ+aiC`eStse`V#)6mxv>Y9r^bN7JHvA->&d?HdnUQJ7&DWX>ahfrv6_@*1VcCn_Y8`Dj9tBQMuYgFi!*$soY{s^lEPR>M znQSbP4#ks!NDSeaeUaFFAiCg>dcp{x5m^YvyrGzTHaIs^7#tpff3i{`!_q{fPG^FX zh}8}wl>?#hpv;$7*z7jD)oiuek?dQpqAcZT?(Bz}J%u*4#a zVpR+ETT1kywQ_?)KmEy1-+1G#U@!oejsN_g|F`?@yB8B&SLM%A!hZ>pA8lXg4C2v@ zcQz9A#F0i>XOP>f4SK6u!e(u#)l$_^?G)QrHl24*hR(h-=^hWlrVPamow9o(6!9iI z?v^-fb;#XHFD$9lB?t%rZz_F&k4&yW=LzoyWB}uFAuK;ipCy=chb4hO>9oLg3El#p zC5Jy&CpI^=bar=N?(c^~=(#gz@7RB*PN&^0_rP;&CGD$p;G=0@>bdlr z-~HC__rojso_p^3?sxvIecN`WQVBl-UMkRzntM?`ln(xc){+e!jZ}(QY|4UOZ_5{I zs;eo%Pd1lHr{jr4GM$Qq!t?X)nVC7a+ch&g=Rz((H^R5L!r?HSox!~*nnZ%U^9atY zR4Y|Fy#Y#Sc{x%BP~wnE_~Dm3VQ@#(X)Mb{G*YbTV?Ml_gFcK@0z+O0e?orZX>53w z{%FS>60b*pyAJr9LcZP3^5G-xi&&wkFx+VUF5@32P)b;T*hKyB8uBL+Q9xE=`B8m+ zgHEem@OoZ&>HT;j+1^rBSMRK@uX3Hs6DTFQrO!p8sv3ze{PD38@iSVsw7;SFyb zGQ>Pot7IuD@()WG`3d|<(s>s93So5~i#QOepU6P&}Swo4oTW%BdJ_!B~Paz60l2fbr+K3LMX*EpYf zXzyLy>Wo?yBsObd)ILA~K|bFY{0(kj7=cLSQU!8GsuX6Ox&o$%ya-`4U}&Z|c<^XW zWW156%O9TiMO?n{oG(1@56yVPfk@mRi+dLq%EsWRE|tSYSt(Z{;fh9MGaKwSE7RtY z*Bgqx9eTahQLfVHpwL69hyIVxf=pl&`u*re-4xy9_^2pONw6}hh=Vn;f36RFv|m;z z*1rN}4p&ytjmLkfSy>nh@Pu8Yyl}*ccZR8OX?fLf5CpQJiugnBDLN}w9FBy_VgTup zHGofettbAsHhfqr{ej@T+dV!p-rqmad#UHbg$oq*GM9t5a&J!$79iAASFwNisjjK4 zvf6D(>xmWCSXKw2R$N00<@TX?6 zxGlD?TsH4>$Hp#tCI@{XUp$vCsC6<&t)cynis~jagy&MpNrj@VkWOTV&d<+{1R%J{ zEubLEVf9%$H#Owf7!^8$LTgbjiq$K%-)@;?cR0|+Imy&q zUT!j>UqkR`146nXi1V$apTK6sPwRv4`RXsq8@`DY&xJO!*mgEC|FH6I;SVybS^Wz9 z0}oe5SoX7q@CE)8`ok^w#WuT08g}&2{tF}ZXgmfPI5jy1?~2~O%V*AK-mtFX!#>b%ivfiIXA`INXM7Q#0$Y8BIL6mPyE7dO;5jb-tl zJmuKe88gsD>P*;jNs_iqctl zpOXD}3I6~KCRUd54_JyAY4?6(uqvwep(sr?l{28GmAu&+U&q|Ms~z&JKp+skUnS z*B{<{a7VpKi$#aUR@MWI!hdlnMHyjVg;^9QX6AHT!7D)`p5%`2i)e42lsD)VyntVlN1ykv5PN&mm zE7xP$rU45e4RW=nOp4JEjPFG$vbp6ydRO9g6o>U+%mB_8O(^2VjqiA~G7w_;EX8Bd zG*4IQ2|R+j7m(ziJ}Wv0f)=@OPtwcW8>@!T;lWT`7yNHk`0-d` zXlM|@B4Cdg9v+>XoWO!&tTj%h5?Gmp#S2(}?2glVFKd1slQBU;XN5ANwp)i*o!&txpijMgH6r z^@{*xu~2g4f@|=sC+tg5qKiTynaDuCYKmnWLhk zs8oFNEkT^++0j5vyG3JCvUSm1Yb-_jV4_-~Py&Bgl3+qw6d}z`_H>h z54d~7sh~t6F4tFemG5n~wyC5lhBC)`9N!6ySu*%56tX+_-&s>zGc+(fI52eK!uh7A zCLULQSJL?NBSfIeam4M>zs$O3fA+JVzVZ5Nkyxy~z3qSf>%Y14uDg~-QfAHM=F4Zs zL962*P8Afx)C^Mzl$nBBq&Daca6`_u!~H3T{tNM!BjIQ`9Q679p7{k28JgkEJUcZt z1@C4=%!t4(!sV7q2H`oy1ht@SE3S>pG-5|aQZA(@aC-Fjl`drhW;?F+2Ws7j*qx{V`N;Fe9mMt6B82` zFZLj7>&VC`+(g_iH)LHR9*5Qh7ZA8Fd;O6>Fg!ZylFB7omC9t)7>sI|l@YtLvcghd zV{dGzXsEMWtp-})Li1334U;jMR7+gpTt*>oBLop&$(=;v=;x;!oxi;mpC|7%};s-zP>y^iIz2ZL5(P znW7+~zNuC>2mUMK&qy-;htq?l{1Mw2u*ukp$ zU$i6|dy;{LHm(y|SNLeXfX{kfI>0yC=Y{T%_P7lGD`G(p38-<$+&y}1mH5+0jQik{ zPjIMkBoUBc`$anONaH1=tAg(#@A9u6rHy958_P4+N z!4Lke|8hS}rC6In zSrdi1(NN#1*@K^HmCCr7Q+&x#F2pU1$1?FqhUW3PHcAbV7KOpvFCI=u7UJ1zjG;XnP;KY8GRPpMUG4ufwg+>R4^w;+8`FwEazq>9c* zrNZg}qo@+n536jkye@;_PRT?n9*;#~Y7R$`18`_)_`<~t=g*yU&AEf2P%s=s&jyi- zxErv=!vTBU+S)ohJ9h5gU0+)dOEgiCr((&;pCV=)h62xX{7=%K z9)JrC)5}UweqIxQfq_d{{@)h(3;aWR6|0L<)*l3UcgxEEU^w*Q@e_ae!|%_ZKMOCA zP%s#aL7z|Ma#;*29Ztugd+t8+z=Lqxf(OaTlP6D{IDyBKiL^Hm!U7JsF3ROngs?;^ zB!gaKHfn0B?Yp}h@7UYk)?A@fDv*q+0LM6PBYO^s5o(H5`($`#raPST<2$-dTtUy_ z9+Nb5$h%H)@`nux@d!O6MmUWtz)vJnr%n$&_xw9&&JU&2nNL5o?=Qdm&90sIC{#vr zfM#zjmv3A0fog`UsFI}*DhWeKDa^`wDjH;U7FmY)1VT@ehsbmh%q> z3b*JUy~tUp>6l*R><@IC-o9PnoAsJI+8bU!Jq-8H3nMfByS8an3bNR52KtC3WfGeq zt5O%j2~j+mk0r$UoJb69ZFAtiGX6Z-KlzJyFAUEvV5Q!XJ*|)3wasSIFzYL8;I}&e zlPZqsOH3pd$`E)}tCrb~h{Onk2U(d@Su9%4#Z#GBA_e=qKNK68^IjfzogbZ>at9-^ zWHg$b7YC4UMkr7{PWbSKY<2{+NQiUy7?uoE;humrdrf$Vp63SX zR513(USh8o;WPb$KDwwptSNl1BmlWi_-}gnm=g|%A~Q2nJ-wHY9X)pT?3tO_nSeh4 zBV8evht_B|TiV;(ySuvXIefUYtFzo$4(}~6$B`pPFcNorJmaGy7cO4vz1%lDGwtuj>LNyNyg1`~NMitw<>P@#}hE3_t+Q7YmSno~(>&x`3uMbclX_QuOWOYlCZ4@{sL^;-}3NbIz4vm z*w23Y-00{C60Cobw#Q))y@~vDbLkI}fI$avK*t1kW=w!m)KHcV2!;&=XhuNCL?Qu) zX7n2K^YifRLu$(5p^^D{mp=##b2t(SrvrXYH-hy7!AIYG^DT`=jqn)A{)bEhZLMuB zEiDL}fi#JTngPEE7-jH5)?$h27zJ)x`@I_dnI#4?1X6?^q0WP~YW7P%3}beO?z1!Y zq;P$M^4^N()93NZo`eN|}jj_tg(1X|2)o$Ci{ouiad-m+X z%0i3TDwT@wz5l+ie)VgCfFHihJ(qeeUc5LlHooBVVv(W`ON_l?s@XD;QZ9e>_0tFi zaEcweLQK z(n>E2Tao7gk3r?Qk-xnqA4-ru=$}~-j55T($iPs94vF{$wRfHTv*^MG`NQ?>0{`Gl z5JJR$3@Ru0Z)5m!srZiesw$hlXFT3J=I$Avud09T{jm#js-94R+UwdFrz0-;mNNCHft=x9}kBWve z5BUIpW=u$_Ma*-N%_w1p3EpP+q#L8jR5YIUM`9E6zM(1a@T?cnnSJ3{B$^B+65({% zq)1r002M$ zNklX!E}E~)H9Igk^uc@YB1sa$VpLaF*EiNRH8vpv zCTz_Ojg4v~>s$=pcD?*_1^O4tqVc$Ec5ZB9ba-eO_LQ0FnK_qhdTM&XyMS^XI&|o( zUwyi{sTneeUdJE%VFz@wlt1ZS$@33Pl$i`nkz}dF#vDJ;Kq#&sgC#)a7E`dF4ltaOd*rZc&0*gqXDB$E!B~vE=~GCc2I7aGK#H?i4Z{o zt%83z*|yg52jum|y@Lyvf-!$CpChKC!4kH7I-8sgPEG{IstmPSxh|59oSi*!dg}OG zWEwNC7L9#p<^IF<59pN!uJgLN{E05SwzmGkBM<%b=RX-99XWdRgFU-14A?4U90MK*x`>s`NF@Hbq(L7qbPERJuvM!Zh#cdLGj^_xnk zCMG6NoH!1r<4YHN#wNyt0rC!kK9A;%?5yw(x$CaGcJJQP+1XiLQ>EAG6$&|x)YwWk ztimwr^$=REZS4=-ev>J+c*3oHg(Wum2FMKq8VdL>&_9 zllX_Okr|Mp<|3Q4%M%laJOCtP0Gl;1u#9F1o>n=Ag8rw(^DI%O;`k03v9 zcm7ACChHX#0xUqmlEpHKT&GqPj1VQ3UCq_m95MmskfU-wi0psJ`xip;!%4S)%`f|_!f7#9+6)e>t)Zc|xvs9Ep}M-N#$>lkR7SDN zP$mNtvVN4w80zebq7!&BTQG>McQ*0g~BY-i2w=Y=3byPDmY!nbL;_nXl>wg z0J&fK9^2^PwuBEY4Jsx^$y3u)zx~Z`UwrY!;o%YFEMlf)bm1b*dLe*Cdt2KVzVP{n z9)6^@s#Bte=LN3Evc&pXAZQC|{BArPmVsQ+`v7q?q2k*c4 z{s;a2eF$oq$!1fOLMZ~j<_}MPh!ja!dw>^V?AW_!@4bibIdu45o5cc8GW=s-Vx#_# z@eikMkV1h!Ea%JTW3lMa@bK9)r%#+bgIhq*Os!EURAf`; zi^r9dl~=2kH|=&V%tfQY6qO0yEYSAx5?dXX2&a7W(PSc{)F3A~yH5~Hjy?$NkE%uB zj&v%?3u}Qtxw4i*{gMN6IucHX(s|gvffq)4OnzeQBr3!+u}}iu=BaS1@b2hquMhls zK0KEzAX1oQE;uzZ-@g!bJ-zeWDs){XK!2T9bL7EKz4Dt^!og7Q<;xROlkIKojJ+85 z0magzKhX_;Y-9B28wznVcY}U!9sI#mQj`SbQWZ>N%}J-c`P?ce_G_U+r*#6D3$ zC^n-A`?;;?!?7#R6jzr2Ncn;284?IqQJKbQGS%1DgF`TVg$^`tC(Rbc?`^=fMfj|&J3S!xG zG@6?C1TXfEp>t8lrE0a(V$tnruRV0vj=S&dsIRptR7m$ngKmnf%qga5UoiQhm%gou*m9u0xxE1Ty7m5Gj%-|d627}Q=jl=Ngj~%$9 ztrm@i@hr!;Tl|03_6rLJY1&ezjmt#_jjGb7D>PT43(8LjP2>^W&AHuO6uFJb3^{iCtbKnVvuXlSet{!n-`I% zOBSjZh`RXV^7ea^>4QNE!kvO2p@F6{SsqJ)KRNo80{)mhm0>j}V#;7dM=27C*7#3~ zKv_Y8TVl#mGT|FIJ#%a!3Y&5kDigw7qbRXV^!V62HKxYGV#GZYV-CiAiK=9UYG%bL#ZS&hgi`Sq`V`|59F(O6wW{a^g$Uv+kN6>Z9kY(Y%1(fqSX>CdDf!m*L11~Hn=qB3~) z!SCE(r*HmT$xB*S_!te1k^cg8XN7 z#5dzoke?*ji43&oHag%OUzLZghvc zyCr{ah&~`%9vV04z!A^uhE4fKx9yt)Ch?LhFycvgryRl-Q5p8_~3zq z2W?g>36sSQU<9#$P5BS~3hyZpIZm!XRG+Hqn!E12^RNH<=hDRwu+s7DSuEfP z`27fd7f;3!57!@v_iqQ6Il}3y8k$$gt zVru&D|KT67rsV0Tzk<+15S#of*lo!NMg+d0(Qc6k=&1DQgHb1fV8B5p!y=_ZKc*N} zn0-Jap+N~vO3*o16yVSFXI!IU4;7CL#q>+!hr3DghZU8?5Kf5SX%d61&ooB5?cu|- z6Pe%kZL5RlX5Ym8h0)or#&Sfn*%b6a#wU>;kq=~|Sh9fsiFBEP3AbCTeiMnz@t(0? zAG0EmihM_P0|YsZ?fk z&WDgA7e{A@=X}&X#S&qx)IsFtY(AbyN8+gke|TWZ_3F`!7}KMtt96>Y8!Eb*tJ>-+ zEfv)kXO-4bqchuOO07(;l*m!{?e1`v`rmA%Ct1{+0Qkz4?jqZ7F=6%4pWuo;8TFiyXq3dl@q?y?aCTTRQL|;g23Y`s1JcbZ&aiVljW^%U{0#{`+7F zWkutDmKFKh?Q5<0zjWxc=JEk87t@~y4MGy|Jbp~4&~BOnvy zoIFRx5GOOOZ%NgzKt7PD;fcb@C0d+|=`)20?(=!Xxa|?lB48;V(WIrq` zQz?{KY^T=f5D&V%yu7Ni3X!18D;Ly(F{b#&H@}Io z3_My$f#tSav3(VV>8&R}5hWFCUy%m_3C9r!gBb?U4UusGrDok7DaJ$rL4PI@!;M&& z85ut~Bk@C)V_tt|tj{J+kzkT_c6f}zpgUXejaucNma2Eo4hLfKb0f14>}jiam^KA{ z$TLo(%qyg#m`D^&iQ3@Ic!iCW}sYLv#-L0QH)Cn6XYX}f? zTl~M)@}W$uRVcb(BW|d8`cu0Tsq}mxHs=q+ra$Km&Uivd{x|1?Ya@EFbUc|!U{QP~ zH#p@Pob>$rJLlm-ZZ~SGY{p89sj3|R%PT6-YgJjScAd$r)|)hXi(I8GlOy4+tV{w! zvjjn%S^vz`WKO=VuK&V38$>4c`jBr-jG{j!!0bw~2iX|?lg!HO!%N2jxFjI7SXAza zegz`%IJ5WpyCl`QQ4e>Of%zDG8qrYs=?2@12kdOs@Yfsvl7J68G6;p`V{qt2%Dn06 z>4Cw4Q>RX!J98HL77{=wpnYP2n_K}OD~w%tbad?7yB7**b#;x&WJF3gQsu6b{smDc zk_ldP2hO^)!35XoCtb1ROeh^nnfEwldIhXy95DJ7_y?Sggi-C=+VP)TSQiS1ygo02 zR3b_S5T2Zvg5K<&pN~ePfnea|>652UokS34cya+lEIr1UoN@`~5uhE}=ER7;q0wp) z;@NDm*zGn1yJ>1_gklY|mlZ4Vv^up$O==3Y)z|Lo zr(11M)V5igyB$gmMZh2+#rGDEM2MA*qL;)p8|;nfefF8Eu&>2sCHNPdtZyA({$D(_y{RNR>f$AfZxl zDzq+{FsF;p$2jm2s~n2Xld7DU%U++^s#SmUQs zsURXaAgroaB_FOve@q{!lS5&;NXW-t#Aa`o{*|}^nn_rQj{qGKtaF0 zmB^`7NG1xg6vb}8h3Xe8Hil-szkKh~@xF2R$=1G#RDnt67&XjI4n9!lYa* zM&r^ztJkRPCT)$=)>!4NtFSqt&%+hVQLeYzl{&LnsgcUnW#rL}fKgJKCL=k;rpF+> z=!D5WCf4x7ZP(OKIFZLh<%Zh_1O#ahy!i!0CY|jQnf-j&5U9C1%5sK5sSzKV|SX zy$f4dHk6L`d*nvBq07Nsfay9{=O3p(EV(j+RBzBDkr8qOe)hAU#prr=W~RTt|Kg>K zW20k80O;{}F!W}>eyko)%9JL=#86|JZHTAHC=w!nn}%ZTB&Ol9FW z;q!D_rc$ZzzWbm?qt@zmul?b*+1c6u@z4JZuZnMd>svrTYtXXrJM7IOQwsn-jz4>j zZqqH=R?PqGW&B(>{pkg^(WiyaLoPLTIjUPN2$YO`*;<1_rGeWx{{TI8CHN3u)^c6< zJvA5KoeTw%2zh}QkPcO?l~pyGDjSRnHIoU~YQKca)!^fffZ)2&2l!)!Cd4i*v8go7 z%0h(^QVc8Z^Cf`4QmpEB?o4E(MRJA$C*Lqprzx5*T8p{^PAON{DhmM7FnAxOL6G#yTAFZZ??C$A^Hln zfTFM{Hp-jCKSC93DE)=93Ljs8{)G7hVb~B53ezyvHPu~RUBq*RLM%>8c7|BPnVg>V z%zI#T_IZ7g2o{pVIFmp?Czs20`EoDu3zE<%b6==zmmZ!~{w%=PoelGG4 z^o=e4xpDmm%kPj@2=UnwR${^9nVy{<=pR7z_ERTMdA$n=qlGX$P=IS{Y8?(+ZC%~= zZQBprb=S_FyYxoGP2?ZUb!nkPYYi0@Rol0BJ@lw3mrc#jjr9#+m0;h<=(u|h_GRya z&+m45L!oFamV~OV)u|jdgG#M58nkA!!Dh9Tmphu8>$kPFwX|$En5)Vp$S1MHK)BfW z$gLI0#J~I9KQ|f-FTC&qqT9dz+8^SHSkNE5=kOuB-HB)lcvqmwy6B%<@VU-{hB1RT{Jkk;TwfZ97!ffNDT;GIt;f>;KrCciiQ32O|D(93im7v1A-^Nz<8N zH0cRP5xDu-r72(s^uj0_G9jtq~?yXQeWI3|~uJF#jEt_01E%`L6X7?(EI zH^8+Qwq~kd5S`<*8>CMml}meK*-#3r^Qhv9e`!J_UzX2CQ%O%;8_kN1k{jh8#BXb0 z+rtk%9F0b>et3Fj3O;u~``Pms&tKH5bw?h0u&blP=`6QdZFaleQSNlu?aVlSg%)!~ z{(;J}d-ra&N)7kD7k~BQ;LyNNe)?m0f_&>6-#qf*5wq38LaZ|;+z|d>8U0z!QN#Io z`;sfAW@ph5%nCy7=vwU;VSifoIAQ3T9S)FXIag4tW%e3F zqTIVq`WMIn9~hFiaym`&gv!eV&6VhL!|>S)44xp2Rsmn9G#sco?9fz<`UV4WpHwV! z8Y z=^R4ES6I|G9YRb}^>D&#P1=`x!Snp{&%g278@X&2k&V9gwXg2pvx{cxz&|K9xe zyFUE6!S#DX{DZcGSzcthY-?|aWJZM00H#j8KE%y%yWQRe@B9LmmCwVM8EeUrgn)vU zCgPKm6XWA!ufF;_sZ?gS+MG^@&1QF&J8X7zg*d@A#Ai0!ELK>XVQWSg58pp{{}GE{ zQ~rZi;7_cFp!rxl%g#Bz{CNMus*6$grph0N0b0%mwci`6Ujes`(4R}N{VwAl#!YJ| z--@)o_4*fB(6E#?9*ucC^HY=4Q09k5hKB|Rhlht}rlyd*9!qPnCJ(V7>ac>Lv8lDC z1#9o{4@+#(&bfwLQuGl^6%{q@6*X=5-jZ7 zFo-DjpMLbw`uYZ}bOcSd+V47z-`8ILAP1Wa+$@2UK5`PUU~ps~ptu&yOu*G8WGnS* zkpHZ5x%#CiZ~-S|ZKF<)PUwKp#62V`;b2fkH+q}hz$07mMIxJC+u2n9+9?&hEYI}M zd}jZ4y+%odD{=ZjYeCL-jSBM%xlCFdjTf?6aUMfLs$UrVV51NtPBe7j&Bi~N3JJy& zA6y#y{fWLgZ@9{Cc=XQg``c>ODnxzU;{OtAzfzgB+HR<^8wT}bJ=t@kxamw39;3%4Gj&!LmBBi0>L2S03e|d($*vY-cFg;T6YOblN zLd-Qx=_3j)yqSo+*p|@$M)8LRoKI$8*CtkG9X$3_(-4HnG8WI}GFe#}mnUu|{DYN! zdV^t`!2lm*rBeOM%fE*IY(sthx4-#Ed-m?pYIHIMY;Zik5wqL~e}X>SckJMTFaPVa z&tABA>F5XVBjt$O?Rx5|FFBkJ48{qz@PQkJ&(T)+y)OR0A^Zi%tSK=f2;aDB`}#!q zDz&VAZ$)LJDHckhausU1-lR}!;s3^&8n|z*96qZm_Cwh7(3auOJ;616?)UoWkD_6? z1s6S_jp!)6=-@s@zf1p00)LHMyTjhqWNAs}k`j?bC08*YWWrM-mNlB1wmCY2aepY` zM}kVIzbFD$1-6y%I8b+3Sw>@|Vi~zo-W2`>+2I?7#@N!*f=p#6Pn`TvRh$-PaGxoxw-NBFJtW8U|AU6Tt@tdLSGq;(Gc{auw^wPpqK)1Xjm zL7zk-@ybgt!*2^tVF>2+#U~!W_wcDxdFx)mWiasnsfkmO}q- zLGU&Q{yEDlors%(V9gGP1Mne0U}c6dhtoQ_Go#BUMN}vS+tX!SpT8k#yx*2=fvJ0%wP8qK;ded%+LJh;zjv@29*iBuzkV{#b+ zno;gwo=|Kj@X(d@H_)fDy84MH92WV%}{0lSpPx_D}xey^C-j z*J~B`?QTA@r^RX2bFOb&{9l^wS0R%+%vz^eTd2o+oqRl#jVII5L<&JOU`qCeqYHuf zTre~}A3&sLw?7g=8o*3$%(XByH;<_gaI0D-Q>*1VtZ~$1YGGULBgt(RhOr!t7;DiNI0C@2b&EFcRhe$i@q24P1`zLBV8G{Ys1cHA$2CY%UQ zv1jO_@W&)9PPo_UW3;ZWG?^NoxQUpRjr zZoJ6FH#h4_rQ%pPk6>z;u}1*1_O{l}?wvcfZ?A7?a5@|cr4oGuD!xdlW!1N``bC|| z$Qc7rr>3S5$74rVCsb;0^x-OWIbi;51@wW1 zM((C){Jzy`uJ;&SuYzdVlu*$k22! zg9Un+c`GX$o(;JIQR#hc9d%|Ii`zpVS`mB>e>lCq`No^yfA-n2(Gdhkc=XXnKli!M z!I8CC*j2(O##=@h{%rO1S#SDpBKU~sgAI|HiP%^HjB!ympUtKM!H^f*f_K(6HwObV z*6~bFyWH*=0y87qKnx*G!_%`f2r!SgBvPqCr$g0aDG&Zwo~vr)t#vw`dYvAr2oMGe zkvXtv9g{$`q@Il&QIDumR-5=?gLx)tw(55i@eki7mv#_Te?lGd`(-=f9(#2a@~0>t zIIR$1@t^S&FM;SoYXP4DCO{nK+%JE+N#LV(Au%0dzD2^M&m+?MCFIoZxrCs}&~=fQ z58XUciD06rzP_%pp>gM~T^$`AO-)Tz6_pyD4(cny5TnSnQTYWL@cU&u;oh3nuR!<} z&|iX;aI-UB*Sr_SM{&A#-RG#bI;6n*68kf54zK z>h*@#Uw;iNJAU%xA0w>Lm!A6a?%mxwy@4pUj4&&}e_h7E8!&$4=t<(7qX0+7MJfwC zQUdhBxI+fRj93DF9-;iu2ZGUo7i}1pP!9!yfl;V`WF^8I6#asp!4(oQbRBlg2yKhr-YmrCyL zX!ydx&elphT)l`>@wdhQtc{l3+Xsw2Y^C?qJS1~)8s#~Ecu_39A@H~*9nDF0Wsk& zrwOp9af#n^J6=a9z9Brc3_jNZ;1=~2^uv8r_#AMcYr?Dip4(j){Ka><;%qATm~n&K zFGh}74?8h2IWU9;aYOKEz_=2tWs#RpCPk1nZAB$zse>`JjpC8DU@5xO;neChLVd8_ zS2$Ud`bFp~xkV+@DN>0ntdLB~v6h5{3o5C?qQZoWz#&52-8lWh3Wzv4FwlozWP)?u|;yLas@|9ur&4VFzHGdqI4!f3vJ^kI-Ull;eE z#uG`uc42yGCWwX1#5Wi~7oY%Vd&dLs^v*Rnbw)Kgp$iRlS^szq`g3f}^^f3utpEM~ zv)}K#d|9qkJ@BaqzV)qdVtEIvi_OIUo34J>Pd`EXLiNG;D_6*nOaSwsAP&qi&<7&n zNHBy2HUT&?yXPr*2Hcvlc76f5v3%ZOFbpS0tex-e>w``SS7<1n1|$(Qo9%Wh)-6>a ze5u2M!~~diHe0NEoem2=QmGVFUN9l^^TB@8$p6JQ!Z#sqw}n56l=b7!rSgY0TV8}M z;UBuZx%yvLkagrAv|qH%P%tz#J&CAwSZFvf*grltfmH~>U;u^!tUN%X&IVYMo0^a@ zWP5u%)*PV0Vx|y!8C9szQ(TSy#rs^lC@K0!6S3jZ5hP84UA%qUc4tMMSZ?B(hw;j4 z=nn^)z5Dm7G-~+P{QB3wMiSJQUU~^RQNR4bUXCe+VsYi@Bya}1i2Dr*e9jaN@E^w7MBa2yt3wDEV zF-83uLxrM!c?&)$tJf%CR<1v3?i+W#db0nqgB=E~iupiN<18Kei!%AV*H3!1%^;RZ z@>q+dSLb9>tXM_bib5QVR`dB_EPd>0qFf1MXfy}k}6I?vA5PbP~-_f24 zGy=rA{@j6%9S!9QrF4t`H);DN^Db5k!mn5?QOjkp5yQ?(S;|uBXgr1Bh`vbN7lAc7 z;_*iof>BQhe$Dueg^?dHo0(n+j=6lOeT7_VK;l}p%&1da^b|Lv++uWEOctxjVYMJR zf!<)&==7mrJQ;Ksax7UE$#k&XP3vD^xu7P<31@}~CyVI{sVST+XQG>)B6P2|74I-G zc#5AlTn?W=5oij0ga_9gzVPw&!hb#Bi?A#%3nwH@wvSJYojG$Bj>(9th?L6V08(AV zv2sqQ)iuMI+}N~l-@eX{j_T?f_$5L0gjUM0Ltm^G0mUoQU$}Wg^eK~sSVbI<)4{$IcP)vpk%`s?5L`n~twM_yyB9E_Ih!~ZLyKf~wx+SjcQAB&u1kSWZg zAG34CZL`t`33==~r%7!|=V2u;$i!H|E~gRY+O^*`;UAy`r~c-~#s2@?-Vs>5#OTB0S13$*B4aKHN;dMLz7BtcD?FF`rh*IMq(RN% z1+5tWLScM-0wI-8oH&`yX7=yj|I9a@K|)2LBPeP56l+na*5bZ+XAA!#O+=_u%G75x zR*R|;4l9$+CXljKjP}=O{BP7!s9T^P-{75p|)!6|zks_4^vKRNoJ2${T zO1ZMDv&&>OV8ZO@&;J~xe(TLQy&ezj_zyq)5N6acPbYj}CGa;p{YxKz_@83+Ay&JR zw=$ehk-UcuO*wC4mWjMd@H{J>ok zyqxL!7JQCk9Ss#bn<|HA7RFuvlYNuhYV1lma)p%`eI%m1H;e!m(uOKggHxoGBet># zS^Gp`aV%LDOXT9oT+dixct#{C!)jLY*o1uvtg{*T2ed}Ew>QrY{qA@#?2JtnwukR% z-@mO|hhf5Iz#q)A)xNG%{-8V3suWta!bvkBqHHFY%H~sj1NmE`0n z*;i>&j)_ku5vfgcf{`73?1#Hgj|lRUE7NlOt#FeG>8sj@Ifppma|F5g9{(Bk4LT-S z&aSa5{HJ*lPG`mYoXDrAc@TJ+yM~6&qJYp_5MB5sj>N?^gTLPRuOWPNj!40WK_Ij) zI4{8a@4ffl>+R`X@OhCO9(OUM)T%WN73Gx`<$L$+z4zYx+uK`pIvs*5vgopqpgav3 z5wDB>E5*M|W>gw?SKy2B@nAL%b6#GGFtK$;W4BXo*YFOnRE;a=pL9AiIfd11;{a1r zTU}RIi=2MMBD679S{;0je?ir4?d{+Fi|<-2mjC%L|1v#2^VZvM`vU>2E`I2t2W?h6 z8e{Qe`0#DZpI2esJWyvV8bN_~1Y+9LJ0lwoHb_R^}^dUHPBzS`+*Qj$&*j zoPfz>SfMUq3Egm!wiVKcy$K3`6#kmvkL+QURh4bqww*q63L>ko?=n)-!_A+y`SqpG zn&7|s{_7L@6I2K%GwEE0uSC=X+&|c=P257Db*Y?WLD~iS-ufIFP^S znXi9+|K9xyDAPcWeRVbP8D{InKN~>*TNr*d(Bz9P@upz`eme;4@eT?YL z6XO$o{ry8jgUG&sP_5B$Bpi<=6LHVN!klX!_AbyzB9$qTIb9@<#bWRjBc{RVWl_K5 zxTqB6&ldlDqWrlz{Lk?Z1Q6S9Px*sUA{3H%JcdZ<3m$iW|KQQ1N6(x-2}slW}G1ToIZ@=dINLPK-AT%+S-v3R_? zs=B>>hgwZD(5!$$DY-rUu26qK_N2P{`X`@y3KM6~J@>;47cQJQbqY&5u#DsJ#~(-k zD3MYE+ZDrS2vS`X@ncumk5HH`_^Y5#8N$DyYePqtfyXk7f=v1(ugmbJ4G^E!CDILw zDaN@Z6Dz@t02?A%-@tDCco?6p|7w>Te59DbKl5izY_g$0s&Sf9B1~ zOg!`La7q78(wM(WTmxho_YfZmm${4Vm%qe4#g~eIr3jzM4N4RNtTlXwra(XT6#>z; z!G8_l=L?B+D&X_G=iTGuWBvUDi1UlY9d4H!;WEKhDuvQ!wZfK+?9c7(?VX)aK0A?| zM~+!t3<5v0-5~u}j6Vds%BEHvs!g_7l7WOMD?;oGg z#+vMhaWh@m;{PHkN`pQ~LPYE9$QQ4S%_vZPBd=FWYs(IQP$Z1iP6){iA7-~3 z%h2bcZy-w;JSbsJ#ukr9@fhZ^7^`sni9&Ai&ldmRp#DazcU$uh+7V`S<~{QWnmjl- z1brT%lP4x7B9RDIlgMQXqsaiz*}A$qI5c$Z=s+gE%JM3WMg@~7C%4yDzaob+UUbyeJ2z_UEQR^$)CC?`VZ2*g~5 zMPifiPcof5-9P!m*Wf8Wuh%H=+tu`iyF2Qg7BPlYjCqlpp4fkj|Cy3;tF~WAH-rsG z4h0A=IgK63pRyp*)jCagY^y^|4A_eoLNV7u5QgU2KzPB2a2XL#FbW4}gl2{T8kqny zh)s`|c>5}okbq0f!#38*;)uVo^y2FJUk(y)Dq--YJnsr$Cr)PlFPr-#1bD&B_?mxz z$wj)%-r;U79x~iXKV|P1OGlF%tj|DL9In9ZKD}Lh2FJyVHw>S^GqhRfv=r1$ho8x0 z{Q>{f|s!;wq9y`e~`qN1{WTf50*z5@TO0zU9$ z=rM%FBD2Nv`7eAC?#ci1{eOAq?RVhjfM}Id)6?Jnqd#hEZ$k^`3qqx1uLx~~hr=$? z%_7hx@VRH#5C7X2KD?FX%rO(LcexxiQ6!-P&vCV}SQYHT7X8BzeVI&fKih2COd*+EytpNT~L zgQG_g{-S?i0LzMzZuFbq`W6zkagvIcOM{N1KuXJ}Cbd+n(;;`?o;|zCi87r+t}x`MMaYb~ITt2`CMG8b`ufhDKc7e@ zNDbYRpH!hjm9CWjAUop)g0o)wb1AmpBL6HIo!kum-)Q=aM3}spnVv(y%{t~w^j#=crTZw-VpJ!lj zVBWI;H;#RK_t|aer!Wmh8x@l~!k(3xJ6k-wLH>aRGw2QX-FKhKXhxi$mtT2hZg%$j z-~ayT*yw-ykN;`!zC8#9#DACj@D0MpyIb->ARy6h&E%Vi^m#1o20)5~0e@viYiLav zfWbykz@D=uGnS#djDN`Un4VnJuW&-1$Phw!jj>fx|L4t;&mqi(%Tu^KQE&wilbfm&OfxcDhFp(X%2y^r zI(J;(B=w6pdE+kM3-4Vz)i;f_m3v#Op1gM#>H;?9Qlmc^?zY+&Cv({E2FM>!99<{o z7Zh@dRwc3N5o#Z}P< zP)N)$77-wF^(&m+F#ljq4(W)_ojVKX)B3tPBqYSzz@5ANyOcR?F$om@NNL>QFirAE}JjN zQAgJ+e*^}&Vg9@#{}40*;(G9B3BpGVnYy~V?yjzrAD)<=nLc^qAB^cRs2=RB^aqkNzHlZZ%9G~@yh0>(6^8peD)lUg!PWZ5YtSc?$@KPI zMph!Y!og;7-+lKZB79{<6$?PL#s4JEZYljiC=Y8`E399z6DBhdI0Ku_ZYMDb&MP2p zM*95O^Z)1n^>?REohI&N|CV)iSJB_D!Jh)Yv@bq}!`0xA8r|xDiJ-Iz8W%fWmHtM+ z)>1x`xrX4OvV?6-;g?ANPAgQAawnNU5=~^w#5w@DCBOgv2Z(eL3I*YA3Ab4&jTIFY zFrhZoH+1jrK6Lk??K^hpbQ(z+`Opc}S!4Q_2z}7lg%W~SMPn1==g*ysMI&{!bsZf$ zv|24=VWPp3$JSClDCEk0`}dj5CWMkl62FP5iC12J1({C&=5PM`t~(Bx%*I7wax3!Z zQu>#ae7FXGVnHee!C-FeFe&F@AEZ8m^h1&+I3RAJBRb)IkU9RrMHbKkd)&nvV&Xcu z`{8pWk;p7f90?F~g8^ptW$FXB;1}s*HEOzBDqlU>=kiC7T^j$!L;IX2ZOPF`R3>$r za`lefLa;2ID$M&xv!Qw{6jI3cMC<`h5hEKDT$ndQ{eqX>{?PAE^!?%VKr)kQud#jc zp02$u)iPQ@w#A=Y?e_}ujWmdYL@q6uG)j|BRnG(-f@fgq_N2@A?C(xJ|MmqY1Brj= z;3nzMiABTidC$!3%-HDI(BNS2<-Y#DKICslxfMzUQcTz#&YGI) zhK7dL)>dTUYi?;ZnGBem;K_Td(uYZZM#g3QgA77_m;1*?Mlp5W+1=IH*vOutpLOL= zcz3}@_E&%Lmlm_-*S~&cVshezU%UWK^qH@I_0EHLTFf?DjZ)-zVsjpCj(de$*USG@ z9%=wLk3Tm({vsI*Q8ag2umAu+07*naR6@=TIZWJT%0!gck%-DQnQO|QE&5+uK3@lY zL5$`Rt~ z?TeTQ<9n>uW!5_O0!KqSTvz>V1K`8;IER$l@x;Qy{G4lUVq$V=aJc{S<(|Ht>8Tm4 zmx4lKFd3oHS5#Ft*44GNw(Z!_(caeLbe1oMQzJy#-|f-9(#hoT@X*lEFv3Lc*|)c* zt_DM!4Uo^UC1O1FSO4*^Dk_}M|N9F)y*2G}VTc5iB{;H}o%?%F2l8m3BvC;9_*%@!Zhb*@Uj_hzc ztE;P9T3VX%zqz@wp#cFOuxd-LM7AzA*;*vrEk>VDs$Zm^dgHA(63Jv$RaIw4r^RXo zB^W>87kfHeC;o)bc>DJDZ-4vS4rlob&p+SW+xz?9zlwkuUzvaU(~mp~M{+WmeG>k3 zU#K!17ORn6USIrILm%XDLO?Tk2>@d;@{GcHfDyfv@mI(dVu>U}E9P>!3}Iem6ya#o z(ElTdZVLRB3T10s>yFN@OFg}#!(+#f9pBNh16k}hBmb`x{naYzy&aX!6~;MVB9YE$ z)Y2-mw#uSGq7f1lHz*%47ybXU_uk=cUCX^F3qTYCAlM7oyI3Vr)v~PKW!aW2cb^m6 zC&~Mgcayw7-h21`mE7;U$-PN#&bc?=$&KUVZXfp|*_I{Ql5DG6oxS%?umK=C%lpk* zdxM}%iA4YjO4t&y`|Me>X3d&4Yt~FpSJ$y`zWwIwuX}p+S(#bSJp1g1jgKH8iI?za z&3``q`yKm7R%#|%=*JJ=)mRu!7q>xAZq}z$dH4_&63DTC6sG zUte8AZEa0mZC!m+Ljz*S^y&MoRx2VShik**;$kzivX zg{vl9gy2+@5~TY3#9`)5CtZZ6JLP=r^I&X?$qxXHSx;7r}(tjsI%W_w~sLvBL1O&i`0KfNMws&hy3LyObcWv(QT60^a$Jd z1;UtLb=|;SCc4GK@Y_uKPk|3uxW)eSy$H!e@Hs*NjZFZJ6BnB7n9-bHb=|<@v%-H0 ze8hHjjykP&`-s7SL0V&DV?||URb@qeeM3ik2Rv{AmDZm|N5{v;WoKsP73SwJ%Yzyk z6B`{GstS=H3=mhgM08nYc$5B9@aL82J^IWNKFpd>*3bTU7P-IRr<|9UhwOwz5o*TV zouAOA>hunMq>_-#%*+>Gd@edF^1b)oMH0Vj*RCS3k#X2?;IRYAsi~oIIsde0`Dd2& zVWgN3f8GT?`nJ*0F|)xw)Mqvf+VBZYm^>_Aq0uNLAqc?2nPP$H&l~70>o-^eO;mz; z8ge5VA9ZirP%mbZKfcKS-l$(*^^?TGH|8$irstoafT+mG6~)VcICBQg_S*Gp`#Se) z)Ea~%_tT%t2Y62?rIM_;u=E%WCVMfB3=NouHr$iO)icdPzTuU@;bDYMI&$>O#)d|g zo9N)9`}fC0MZ02jE;0V$MBoC3H%DFoPw}T8KDAqHx9dM(MT^zi)7^FP;-ybN`4r*N zM=_3fRe_)WOz{HM?m@qO@cI`jG5ez#-lg6D(j>cM)MmGv%_Dt8@9ysI zE|}qAd`C>b^vq19Qpq)U-amS~eWABS|MI4_}~s%qQxFn3nB zcCX0Pk)xZB(LWID{xTBBTKfXpy2%Uu7xf#cQUt<74;(>l)ko{s>U37Obbo!Rs-me& zE|Wa6Jmaa&C24UH6vc(JGhfOz;7y6PRqzhPD)a%)s*m2z!ByBC4Ib)KO?gj=`%<8 zNELnS=FP62ZlzqAo12@KlFFIs4*cU4`k+$aQgPtG0aV;aAAN|_SXI^4Z@u-#z+nIW z{f`zE6=Cf^)Em$6&m8GP+%kvug=Y!PyVoz`68E(mo67sTn++odJDR^zD@#b#rWQoS zCx=O7v_5(v=|6k(-!NoL8DS9CM3cQ7WzCQ*TFRe-Cssp8q#vOGSM+IPpJg)3hli|fBqHU zfe(GY6_Kag+rbnW8R>}$39euulcLkh{E3NN*s`~7-HKn##hyHIqPey8(~mzj8B9+e zJhXbv+NkJA=27k+e+f*wSp0)pKo|^+zsAOB$uF~HvY-}}tq+m~Lu9gkVxz$_ozf@_ z*z%2Tx#SPGDZ@I4co{G%l0BN$FAnJ$8e{+rd!1~Ke)ul>+Bm2uvn;S*)SJX$?G>zB@YOOQOkGv$1ytA(lvPOQq6_( zX2;n0n%ty=8w+!iqk%Ju;O9@)T>b5LX88tROrzCS*RH=%(R})5{jItVqs7J+V?ext zn<)4JNjf^2+$Jx$UuE|_DF11t1AUk^(8-UpBa%2I#JN6n+s)fgMF8xbDH#6}z98vY zFgEHESb1&-c-#40;0v#M1AmOohK7bZIy>81S`g-V zKnD$$NTEldF^-aV18qx-{v2ob-=&4WL>i(?(!uNJ>h)`wS1T{au*z1K-4d+V*=J=6?Ja zK>xAZYz+;KXULv>>iYHT0|SG|VW13BvL$^~16Vc8=DPjucUt!J_b=0v#dQ_@gQ3il zlmGCJ95Ic+l-%0Z) zSVZ`UyeEYzFes4B$_U8Em3cH2G8Q6crprD+wM31Le#mktG(2{NJ%y@7FlDZN3eTZ# z=^SU2$c^5`hCLDA51$Ak&_^zpK3tgo-SxUbqxoWG%i-RkOkI=@(my~E5||Pb*xEhO zZbfao@CQdw{f5f1Uc_hX7mI5<2aVresXl(CYS3iKNsM{o;i7fRQWQuRh8P z3#b|78wQ451BOc#EoW}kU#n^F=r;yRB&txg*@oaSqI~0x8*+|mW(4=n8#Niai#Fte z@jDBG0cczl^RE(Qc8LpU5hwA({2}odSJ@^Ab1tOl3VYmDBoRLCsrA#J@T^DSvoCuR ze{@$cciNEs**r4PKhV|LSzca#JpHfOn zN>pT&CQPG{Lt;p&q67+vbh-n5JdVG>QX>6*5I#Eh&W^6C%1TfvK0ZDtD;vJvcj6y! z;}0BAmFw27!7~4d$jHw={S-3?CypN<9vn29j9WHuL9RttsAYx>{a_R8Rowe_{eq?Y zyGB~82h78Ep(#@4g9)?I(NQxP9j^+H$BIrV3gLtNLuO^fsHGqtqvKBGL0x+EXDq{h z81hSwf8fRd`Gy6+anZ324Gra`<((bv%&fdL_zAAUQX9UVuG9)bKZ3=bC+6&*Zy zaNXLqSnuMZGH3p!#Xo4ah%aOwF*}`3iA17MC{&0CC6h84>M9u;hTD|35BFc3mqfh9 zz0b&hgt(_78)K+(Q_ZWtU zklq7Iph6*s4xbPopI1--k&6gv(J|5CVOj_)=<`^%Ptu8Re*Od?>=2pqAVoD9e*~m22Q9~Rw{q}GGg#*qF;~N2Z+dlfmnJ)W@UCatOM@kPtWr&+@8bc4De4Hu@*$RSaFY;g~%k{?IkyDL;HS`XC!(ab`kh zLgeKkQ*-yg&Bm_O_(*B65LM83=nv2Kz?kr{q^L3dP=MJg^gO^1b&p}8LWTo@M}4e* z;a+MOv7Ik%JbJOBt#2qHD(t{RdD~XyM5seWNdwIN{7Dt)Z@+hvZ?Mvg*zAp+{U@*0 zo%p%Bp?h$2JSZ_G1*zH)CIJp!U?4uj!q}g+3t}sRM=j&F%{%?C5Cnt1<@zk+ao3q} z1EQE}`xmG&ZGm5&a+8~*xR~d~VYl%E_iPlH4unm(;Su-*(nI)!YoUGi_xIWC4vkt3w*_57d|GOHT3Q<18L%o2hEX^yBPoPXsf=W-gj0$4 z3;ImpdsqVGfcIsfL>?SKNenm}_$Ym-R)0~y^PoRcqf}N`bhNi41xiXPwlwq{0@Emfb2ld-j~sWWu}xd>r75j-iFXymRFLdC+Gb z_~R?Q$PCG8_y;k}jDr@_kd@O0Di}=^vTPZa5y!CJ;5PlVF>>3`4l z3#-R>-+%wjH($f{k(QSB*kg}jS_`>Mxr3EJ=cUF!$T!f_(}S2%__f(=At92;$mnFu z$0jBzRVs0Xgund?)ho(p5@vIiZ_qDCMn=#)FPyt@;=~Eeg(HKOE>X8`-MSq+c3^Vi z%{Sld?d=9=mU3;*@VRy(;N>Cxkc#ag{mn1`88L}#IOoije`Z_1=zq!h0RF)j#Lf5Q zKkQW&ixtszA$btHskyls6QcF?we9Vly?uQ)iv>ZP;7pK_nU$2Bl%ATNm6Mf|ovlku zh>nV((7;TY5R2#DSQuUX{4cT>!We+U4ULTmtQ@b?rKhKbBDL%1u7~(1`U~UHjIR*^z36&(R+<;Gv4(q=fNS{e;bdHLJv{*igSR=>&2z zk$uS*>(^p;+-&Il>SASmhh7`1+*XpkXI-8yQccnLIsR<#v-tbl*P_cGL{RC}8?V*1 zes{J0VpVg`ph+99T~oYb`}Xa~^l<9TX#{SiY;DZG%DIX3GKkWJ)lXoZaqC4z%>Ya; z;v^ihUPgG9+JLz6OG0y)?3wYt0PA-6^di?k@m=vfCc4C;i=f$l&hSON#XX?V;hgZd z+wI6WL7|edD6X!trKJh^_j>wzjKfB=#T*u4 zbuYjy@t<&v*#<1u4%4W~4t%8=xgse{9-#<;*?;c%69RXlzepExPmkhnPW16Ce23F< z^X5$?NKva*NYfl2ALm*40tKm@?)-fR{uJpFB9*44ragJ+5Nh_b&pv~L1Csc`VHuX? z#}7VHke`nwkVH4ueE3Uqf-imtFz9fh=|6$M#N%V5=zXaV1_r_uKKN!FaR%Yd>ntysD0-1!S# zU7c62UE8^9XLK~;V6biJ$RBV5X9k~YzfOnq`nBtjJau*T;Su56ckbA;dlzDRa?Tg4 zcZta#%$)Z3_20O0qot(<&SIEQg!t_4>4mKaVkaXbT`tEk#?L>l>Yac6f}Z_){rL;$ zzx(dH3l}alH8*3@aLu|kyLar~ylqQvP7bO7T^QCJg8ON}?w6keu_uX-Bk##i{+as# z{#5=Espm`bAHK=@{{H5sM$+i(8XB4!+uPb;`b0Q8v&8}zH|TgJD_3S^!6`W_EiElM zDLFPSCM-;gsZ%UXquzmQi-OKbW%TP0oCchM-RXmsod_q=(b0)$xk%TSl$-*8k%iW8 zMK+vlUx8R(6|r;YP6Q;3i;F#W>>CX2-hco7?(W{_o_l7~Bb%Vl2&G`}`s?>j^~*`? zG5SovsvIOi5RBkJ8g;-Kk5aKAB?Wa#q}A zL=v|m!|2RXXaW#(oMG*j0QliEYwQ&IXcV%IMd=@$x-nw4l{I#^^$bR;bv{V{KuK_r zE+Qx`Zfwv9*Udnx04G7%zH6#qxPt{sF);MS`gM+uH+T1cezxrA>Q?aTs%43fuFK0v zh(NkZj(5-U|oR%&hFKTet7nzO}e`x!q~M zeEBjA%52#N$u};j1u;(NLSHRjr~PFANYCNB;#>EozcHN&;5jq_7AqB9Li=Rs3HXSg z;`p!!+^}~+;n;B``TOqhsVodGn`Pt$@g#hPHeomi{2^TV$~eSRLk6mf$_gZ*s;aE+ z=xj&CWQ)~;?hX^GF)>k@Sq~Kz6)vMKFE%zttEb1qVb%Q0_B$*1Bs%6PA7+M+ z0RRlkKy{2lD~~eF`48cb%}4l$5b?bHoS8n8G!Q<|F3^uB=>yJ3sPR=LB`L`%w{G3K zbm`KqTcwya6=zBpzx^&<`a>9&mzTZ!-a9{E{u%UKzi$131CM5BWlJYRDtobgd5?e0 zW=kEiU^O*j84w#XQYjD(qob_@aWJBzqp?iH&p-D_e+9a`qPavcW zRC-K8j8BXqW+(>ZWEUjnhS``6urU55Z{$DBYveI&X@E!ia0*>xM!{=wqPhPFH*qntK2?sY8t;kALgh<`#&n$wR zxmkhy{6CdHA6WVzwPVkq@oZ`1SC=Yp)^+rotXMv^VeP6X4;cE5AFb8Fdm5zg}2#j^rirnU#5p#aHl+p zjsT-U)}Coc_n6psA?F64-)9R{*xEUInEq(<1bhaDK?A&*@DG4~X)qbF${1lT;F?@n zgBWWy7?KSS4cQzHI5LE(HCdS%si_&+*;#q{dD+KL86t7({WFSAL1YJHNR@EB!WvQ`=r%y8o^lDB#nJjVzsY(sb3gGnwnbPd+)uIC%>~f>}%JodFtt>N>-N06^*+|5xV?2w_iAWfs$9QT>bj%ug;t~ zgWST19J+i(@t!?<9(@$a9_7u~+OV5Ze`7DOrx%!i*oT)e|KGRx zLn<-;p*<6Pi`agF0hU4Z_V%^4wZb(SYeH+Pt8suvVYS-e$q1`)qE45Rl8Pv2dAYP@ zu;9OPxg4e~a-HN&&)=(KHLcGBjq#(ag zrBsD!BR>B4qssD%AI_W}92kN}(e6FF6XJDTC{pPcwtr;gUS#?#hWsaYVu^(E4~vaD_5o^*3^!&f=3<7|6Kkig@e5g@DcWuju8>IrU}!-UUVy=Yu8<+xwfW&s zr4J|-6{dp4^Kw=DfYEZLy7kfZ1@RGT(A4MX4}@aFgHqzg^oBsInb&WCT8YGEE~!O0 zbF0{5<3D7!9{;)Ki=RpdM=V+KQHLK{zNsiv6RMz$7JmLjqZI8A{`O1U>n7ho8H3GU z(bV(Zwc78lR@Zk8fYsB|(zk8hdf@RVR znORw>l)fV&oU%VlVMu1UPeoifn=^f|5ZKgcu(l45+nk^Zn;L`=514R{SsR9InUS)H zNwYHl?!C}|mh?d}=2yS-fPeJJQIp98wZ6D$1tM&^2r01ARQ{O|3Eb_Q|<$7~t(~1=%3-rGLOgZ*LFc zxgR-l1XG*&1qIJN|2!P2G#U--TbDF_CJ@;J4$JUIBKp%RRT{2Pkpcn`c*~RDb==*O-u~sHlKTczi;_maSX%@7uq2?b_JbScDG(X-W42cv?XW zt(DF(InJ)ltiSo&FA)lxU%s(!23*AWhc#j{5Q*D@(+BxKJ3Ek1y9{d$YisM8nwq-1 zy885b_$GtPp|FD9H==4$I$O3z6D^@}gSk>#zo-a3Eb!u9LdEEaQ5 zch57=JdIm|Jfv2B+vXGa6HW`>zUZUEz(UwDEabkfR!Qx%eWRjq* zD>E|^!W%mKE1G+*RJR=1P$2S}Z_z(ER6d>*Gv3@a-f5=@%P5LUiBKvNc1M6z5-7N* zQ2`g1f3VX1dTsk3PhD@<8>6+MyH@4wT9X~EMII5-@ou9(n*#CkC)wKl?H4fvJNu2N zuh)HhrTS)l$H1^vsa8Jx(1s@t9on>MQ*u(0G$aIFo4_vEjbruyF%&(I4rTAT#y4xcQh)Dh5a za?ItQ<3$v}3op(O{$22=PftuZ9M0a}UZk%%fA(BOWo1Wudp}zi=X5xL6~qS;V?Vw{UZTmk!%T& zi;CW&k4XLng%AI=ufF;UF}1Lue%GE|NS$$a{<%y2dKG^lmXn*U4gVFAH2&caf4Eh8 z>*9s8eSJvY*#Gp?Pa_W!Iju96^-cUaZk$A%lR{OJ?B(&Aa7Am)fWE_sp;uI*IwdzM zE>){kNd+cgFSs~w0p!DM>KFcuh}K6gci@}JAQ-cfKeK_)%j)vzwf)kM>81u4hJu7mAvR;lc1d4=(K_N0JB1hkyK0d-f5IlCP&0sWQ zG^|pq*1mS6}Z)%2e0R}^r5`N=6koJ<-WegxX`>-Qmjs7SEzps=jKP-O3*|9i0g5>+QA zuxcI=3=oCs^qDjGZEJ1O>-$GW%yx$jk=rGbp!nFhl9G~5n>QB}79h+;RAdzNd6`^> zMfbcq#9u%E3zWDQ{xld3*RS6|6+}iw=H}%g%m`191er|adHUnwdohN1HTYQI$Ti^l)xI??aL4v4k7PU!PgXAmDW6-i;v(luE@sew!CcJxFA_SqMHXf%2Kh6ym$0YH>?Yk{qDLqui6=k&Y3Kur#YKkg zSzqw4pZ^Gx*5#_!O~skoP`MA%AG(VqK4Lr}dO~jqurd3IM(Ma%KHf7VDae!*r6PUb zqVo?(+&66cUtgXpZ|=ql;MKV)k8LVWiVg?+@%HBDPk;NJR=$mmI%_)m-#>Zn+p9I5 z{lmy*8lMmkThmidKb@PMs}9pJX~zW{{gOqQL>w^`2~H;N#2?OU>@iUuQsc+53yMeO zKl2O{KF3u-0TakyCdlctE-z%>6gc7}%BO5Nr#p06>;k6TcLC%cGSmyu^LWO?@Lf*^aSD=W&%D;nzRI=efq7AxjR6$%AH=<0Nd+1Z&0eGTmsnfT)3 z6EMo1S`LvQ?(pv!f9l*YoeG$2`jrU6W>-l|2WcqHDLGTnF&<&;LEjf}U{{47JVICL z$*FjY4|xTD5jghqfq(A&`OeNx;G33~v3~tJhP#jAkBGkUaR~`Yz75!BmX=}# zN1`qP0h%6v;^2md9*T^P29mrzy7&i!Z*Vg@&@Eaq>&B=VeNnAZ5j<|SdHzseop27i#z}{x^T!hGl^CZ+S=jBGh#Bq`lnQe>N0eh zS((V#kqwJ-W=2wCa%6OrDpU!x6~GX-LQxo&Lg@tjJw>0Okl!Lofm;qXqkH zAQWUtn9R+o!ejK|@Oi25>v8(e50{?MF~lvDE#~4 znK#?l-SMYhmLo^c(FP~M&@dVP^Hbb)F}=^?k99O7JmhRtDzxTED-f4=0QG zI|aUN%-&;Yuhv)T%{_P^R+W$yy)03a7!u4p?p>{l6P!TYZ|#?p1qpDF_$WR;4yo14 zD=J!BS`rgFXiRugWE+E zmpuQ#vXh;YgHE}vz0GFB(nV?;lnXaDCOth>8wMv1R1Ul9lky+(!8BsNbm4qWU9HJ9 zLLoZ>19~VNQlHr}Qdm&5!190GIoi|Ld*R{*1Wh@A?tHJl50OJxty;Bb@7^8Tw__QB z0`a&-QSUB)n6J2?hlzs9#qT~%e*wA4LWzxo_KVqm#jg`fGbATb6pxmC`<=dj6p9D! z6{BUb^qy|N2o{G~w;{tY%*W8@5j45Jp`o>@8T>yyJdC@@TBA!$%*aSbnm7mG?S_Ju@*O|aDN)Ge_BFEIb~8_e&2f9;F&<%l-6Oc(j<9jhKL zNJj{N#;|_=^taz>LM1d{}s&2gd+Rzh6guy^EPvS`zPcVm0W{&=3}7U%zqd>Xpka&8_+YyM(^uj+OOd={Ppi;O}wzz^trH(wduw#_gj4W8G z9Q}EP3N+^@LPNMC|HF%6{krw=aL518KKrDztLw;-qXPr|NaFYKhK-n6V$Oxr^S{UW zXCC;ArF4H)xW;PG*XfU0AI#SQOIVc=UD>@j3x>aA%wE}Z>tyZMt%HqLrv|Biw!V_iHwTM$5&T8Ey6 zn4VIp47LEV7CebR!agFeFIGF*Y*rc;P}dC8t`m#C>+0&ENTe$>5a?q8_!D18YO==0 z=C8msN5878uXETPh}pG$+qNeT9z=Ze$jAtZG(@m4fEKs$4{*mt!e2Pz0aWOwP59n4lfJP7Ugfu;{}1N~uK!x#fUoZIe|e_&!79d%f3HlxAR)zwj2R(9e1 z#rpa>EQ>K14DcF(_o7S|f`x`ihK{7B>(;GBFyH8yn6R)g%&$m85SoV9jEK<^m!Cvq z-uS2$@=YutJM%348OS-nhrdpJZ5?vosX{|x--kRz5E3^ui7|W-f2l-@wT8d`lRt@$ ziGKH;cdBb@emHYxpkF^QIJAG?9&i^KJvm4FB>tc>8yRgB+ZrtT&p4w$Miyaw zO>g_*gJRRr2NaIhC|Bhsp08-p8%C;Hdi$4~l`=$eg?ZNJ=pPs=56(#$Ywrs{C=BCB zAQI4{Zmsr-mhQ3Klwh@-Y9DpK;QV8CI8R=y{rHDlBQ|?{MA)H63b(JyQ7h%dsDA$R zx8GmLALrOHfNDQ)@^Z?%olz7aKa5@cqTy;Ii4(aLlAP$#atG;=5De<3uPr1q_~ilYeJY4;6?qEBHWV#5`gc9`5VaBP3;A zeeJEArBzi`a3g~DiIwtlg+dz^78e(nn3RM(5*T#BnIR@FE=(Opp&o&VP%7Y0Sll$I7F`e0?6GzsK>PH~(N_xw^U< zX`{zS$5T^N5R#ROxZw1k2mYvd3|eyYmi_sk|2d4vpMCmSRdv31OIEEu zed?6HukZSe8=E$5fmvBByPy9>O5CA+!Fqy8sne%V9sl+?7Sp7rr5rwdc+;lMDy70D zIqnbsL7$HtS!rph5fR${!9lCpivBkuJVG0;h1Zz4Kz(lgFRbw0-QB#e$LKUFG7{l3 zqoN{1WO62TJ=wk-&e6ukCacv#{LfuqP%+~ORW*vZoP+)SNxCG7MB#1uX}6DdcX$2# z^W~#o9X)sUER5PJB$ZvUeBa*vd-m?h$V`{Z6kG#yao%+NgNBKXEefVS0Nc`#{~Xo( zMt&0QUHZXN=znjgKQuYUKeXTGOiEGsWVq>HZ3j)8$8 zo5L;(kt1LZnt4)ka#m*M^5rWE3i1<>2PG^*CJ(`kGeuq%Hi5F!@xQ3RFLnC+4F38) zeQjMG)@>vwrDSGig(LnW*{#^d>OpL?xZ+#-52hla!#sKDNn~aJ;|K3wy>jiwjhj}h zZNy~UzkffbJdyH|ke=+1eG7k={9t^}8A4=lpQk^iRY0y31WO)6sB{Pq5-5;~+&+N9 z2vUXd43jjthR3)OSqN%@=gIdEcQBO%$7R}3U64owfV`aPC1zoyV?5x8e@FVjH+gwR zqApU?+%r(y-q+eYtc%i8loGHPk&{U2BlJf_1}8=ar^b#MOaW#mo9xFr*0J$HQ{bR6 zFjU6!IHI_Y7-e$#vb_AQTem&_*Z~CQRbdf4`6@CY1{R*)zDjqQu%jQ6dF+=R z6aQla|Fb8GSdAu3j+7nDr<8CJH!APU_=~iitQhfqlu9hKiz;+sCi+N1 zrJDR`iAHAYFgcBO)U8ybP$sDq$=V>f=&i;+GC%n2RfZYEM8wg>Soezm{NOvR*0QqF z{(*k1fhs5{NYW)P7X9aeKh$M-wnGzr`kAMrqM|(nV~naVrz(--+ityVv@etlj+;nklnU%h&@uC6LIE!ofiV7wXI z7o@PsWV&$v{O6y44xdx4R=WqL!99E7Z7L`ajD7jfeIfq?5%nT6GAdjfKE`4tBFcxW zFP>}vi*@l86<88qInY0V`D4rv%ascFmlYNkq^6{V@C2})lMnDrh83HObXs6bIso|@4r8F>I`CV+wJ!B^z^M;x9r`!Z{^CB zQBlzdJkMMbX6WD9TsoeCl;T)2gcn2qVZ6<##V`@+HUs{XWaUR(Y4+nUP(#oF9UHZ^s2bYS%%eDg7B z6c-bdl#-I3mXe*Fn+~-;Jx!<6ao=PfxemM}^vIsm&;9(#C_s|p?((^{trbDuoz77V zyWp)X!?fts&BYTgu3P~AoF)GwvKnGB?b@{)WB91ZFV37fRasqSeuo0w9eVQ6isdVm zN?3(}I4{z|wXa#?Pna>>L>#ASU%rVydVeVN7*dU)7bTBnP#7f{9|yaU{g?GnC>4u_ zK^Is##r}8F!~*$4COa7Jf~f2hFeqa0A_@*TeF&Z({@v&Ul`KOSS)8S->*#Op8LV#a zU7nesR>+9vzDNH+Sx9h7+<1NGgxLn>pt{Fy#5~$N7?==66I(c6K>oqhNNHpD>&Gsa zHg;lMxUo3v*Sl7y$3=iIp`Q5p)8BsG<&VwbXy_jJ@n*yKSL<%ocMgu2vD|9QmMxF& z+qZthh6J5XE^|dFouU6_e9y)tjN{P`s3Ev*3nu?52nOqa@I_{+MxBd$h7ZYQ@sINZ zQ`>+rlh`8O^foU9yFx$Wtts%Sqrj8Am6M1PVKZp#of+VxyTM#gZ(koQ$rw_?<*2K&t;W~_$|4h%+kg6y2^y!?XvWw}||Ik9o^k>L?al>*D1;OEG`IZynlTpp)S zK%i7DS7in(b((R<7z|VrMR1Tp8Ym5(r2VYvb9efC1%Kk-IrGoZ&@enuY*ss#Ew5Tt z0)H#cFiQo0a1r#OL|xK>0|#PbWB&O52d95HQ(9I&G;HYC>tFoUukw~HL(xF+g=}BG zQ@^a0xrD%M<-=_7rw|yy!EA*r66W!geV&9rqkOP9Y+a^Kt7C+TDqg>|Kn&I;tKHmZ z?6x>eYMB~knTLE^Li~@~i!w)|Ur?U38wyRgKuUNSXOY#{7{QS?@;12zx z&1SoK^VSC+e02He%dod@-@fhX!%x9nf_0$~`S&aTpueC{Hl%&YDbB4ono8Mofq}58&b9TJ$dkMTJ;vSX5XT z6B~;Z7aFx1`V|Ez5X_w---vtg5+OD%|NHs#?($*o^nrA$tgLMBXqSh`mgVMPZch>n zpO~dYe{>d+k>Q&k*&H2-03MM?zxukhrRmd8KJDr4{q>8#-ni*umVwYO-?-Yx<&y{M z7cCU4b72z3(06nkN$SCxtaqXV*q8%hiK9+|jK!=)vkr+)2odyOWQQj41NUYg)&URG zP4+n5f`B0X9FK#qSv&*=$`7CDISqZF#KeTD*5{{uccn@{Y`$LGv8f;cTASsD8MqE0l1M!dU(iJ)v9-#}g;Ubfb{1Nt?c#Bup z-0XWaup?1R;9PL%6r1au4rmxfwnKWF-=JT1k@ox|-Nu=#EOgA?pkH>2q(9xq4=)*e zfNswK9|k0o$*9*4w6?X>*Vb26RUpJ+V`C#+z2LBeK1rk2q|%m_lbw}cP?(>emzCLJ1u>JWzygf3DE~gaepKC58X3- zvD!qS0xERs5&Y*0AFd7cb+vYfJw7&e?V5Ek_;bD?geKboLyr-9uJAd*snQ9czEM2+&$RW6Y^CtaJ9_lU zg^TCWx2{{a?%8LbFDxj8n=O&Volp-XeK-M_1fPa~MxBnP=4O3=KXNJ%|3GCY?I-}t zMJ-kU{VvkOqezdc5O~B*Y92V2Z9a%Ae0zsJVc*+*AHFD z|Q;!!{Tizy$#M@+g?Yhc?f_#egrI3OeVPaAxb8yn#q0)4)&x@KT_5c)hC zGfa4~G10oD^AyirsDV_b*)T5J_f1e>~;c_SN5~ zFDok>92km=jVWG^*zS>hhE4d;V)Ex4P06O>eLrM3HDX768!r3xOq}q0=Kc@xzBs&WS(-o|ZleSx8Y@LUC5&+0y3nrmm{C z?v(g&g+xLzB|ulUEj;}v?4x7N-Qz920S>I{p4=wP)<70oHx2**KmbWZK~w`W+_=@R zb8Moi3kfFz;0HhmQ+c5u1}H*;bCcoSj7#3Yf52!xcBT6C%{qg{mKLjhdC!`4xha_Z z^z)~`{kr%QZYeg0v$1>d$D4IuU#zZd=^nA#qhsSXZrJeDGfzXS$MRp;I7n1+={I}* zmc$?4qF=F@@)P3!1=G)6{z8PmP=?9E;F=3J5mWI&>?dyvuL?Uxgvl4_!AVUAYg3?w z(j)ZrWZ9>O4{2aBk2EzjRMpfr!VHNp7fsFZWf($aMyqXXd=%OCii;8FHa8#Scx^#+X#437NlolNS5UCqC$$wW+1KvZ@-U z0C<@Z9cUw3&>s%{{7;%W>GcQ!bn@i)$1!Rh9?s3rN3yjwt5+#hN`X+cdrDdH5ye~S{j_AA(-%#XZtT$etUYl$e?`e*wq`?VZI4fsStDKz=6je*|aewIaMK- zG2|G&4AB|+2ZX>g|Q;$rg_2(u*VLp(!><98PL(}Erw z6!^O8+M1ebXi81ZO`Yu>y?woAvjx+{a=8L&_m<@@%gTX0Ig7$vBqqj0MadOP#9`+x zj**Vo%55Vo=nt3t{R`_~+=zoiuhZu`7TuJV!qAtNk)E?GM-{4?Mt%z7MnHyGhGQvI z-7NTL0qQp>5Xq5pvU8q)=2^ImeEiAB*RNjt@y8$g`v4`N-X#%MR>r@>XZyWeoLu5(RpYGSlzG3k%6hi2<&S>sr3 zTcB&)=c->+HQAO>wXA-@AA^SRVG}OVxoB0J2nrrIj7XB>yum*fhvUba^+(Q?b@drS z<+7)?uH3mQ2P-+hWWIg^r@a-2_FNa1f7fPGH{kiH=RcpI`7;81wtzW-y-~L@Y zcjo3UQ&3(<@GKL0)XVTQA|G{}B+|HOGGw^h_HqnHG_kLCL{7{S`d&Oi%qk#vbSvBvU=@mxX8uF#c9K|a2lt~KiE(bRv7l_ z>EXKyJ16`Z3A{+32L%3z$qZc$9suBjLkACqs*vD|wi)?He9T+?IbZle3WcJeuqZq{ z3gQ3WeDke}it;mOPIt7oBlh>pFTWD1R1({}+K|`U*L?98Fk2Gzr{(j(h^>q`YU6NM zhU+jED~JUr9^&dGiK<`7AMvq!;vc0%krSPFqy5r|&4>ges7x|AjZXlv2vuxmRE}B_ zN+0rq{PYO^UZPKYg08r*`24xE2m(`CS+RNZW;p)9ou5_00`)JxOdsM1qJ_Yph|+uh z?D==!eY?4(B`Pv%-|oFTwr|&lhg0qN<%3((y%Ya{j!cgrYLRSZgHKL8XkL8HA@Kvh z%Q(ZG{;u|UC-~F0U-$(-^w5TIZ6pFZ_xJZ9$a{QTd|rNjW@ZL*Hqc;Ltl#;;$4B{# zyt6>j%FD`s`@7#=zI>^pqr+i$rlqGm_0-e*_wPeetT0U&R{1denOZgL{)PBU=#Dtu znExFh;V-Vr}7VRJ<-Iw{Ue4l^c^tOo#_u(M9iWg^8VSgXA!rqv#SeH zT#%O!A!|mRqhLqm+-$?3V$L40)9y-;3K?5;34S1INBX>qBs;dSl(g93ntBMa!UPaVFdi5Az29U?_@!25*0NwW_7pIXdyHohzQ+ygXW~^7AL7Kh+J< zpDNv@h6@<{3H^LAx#$oA%Z}}!$c^y5%&rw zcj;ePY70hTyvxQ#m}e6ie-Z+x|2*KkzcOS0#e!e}dEUTvRdI(VzIv z^!QVm#FrUJHwXe;KYVwp|AIbc<)yWCHFmo#Iy!3S&K(#yFgh+_`h)in=`SfI>F|?J zsWoA*zxLX->(|RG%Kqse{|O1Q|Ljly6v5Yp)pNvLe*R%RF|YQ;GWH?zEY{JEvDN64 zZE<1RuOvv47gM-3d*6wgFZ+yL6o_MDTq>36!csP8>@193E(s2q#EGh#bGPtIx9&&z zfH(ko1$l@z4vSk&O>J9STT)V@JXpcX>fTTK`9HwvaKgg!zyJN;s;g@>8qK5o_Z@!f za8hC-R(BJZ_~ip{Gk28_&<7$SA~1T0Xi8mbC?Wc~VI zz3}4J?b|SU2{Fj^oq4n`rkG)z4SZd)h$wXL^dTUVFd6ARN`F6mswZEP4`N>itZwHY zG)#-xrq}nu;CSx*`Kwp1AZiUFp<68$=jbT3KBXcwH7zwSciD!G8%tKMOi50Oh>Vac zm?@c7TLZQm_xSmf>fRUIS9@D)RdtocY>rPzC@Ly~gd`!ru%(~LBRX3u@&O^dVq#*p z@7S&l3&R4DZ@)d()Y$aid+%X(2I<+E>$+ack23u@}@zPRU(xZ78XDE+_R4zIFOu@imWZ%fH~j(k&8U= zn8^Rs64=HYg?Kh!_-;^U(m%x@7_4p5cj=q7r=O{&0J_RfA!b7xw#9{zI>NH9;shM zz@S*^fx!l&2~K>7F@nIpYM6GgA&-wr4RaDYZ=nNcd<8v&?>$9-rBt;!V|#)+@n+Z6 zZc`^DdZId|IH4pbDo+_guFAg2pB|yVNXpygKb*=C(H^-{VOGWfthTOp<%*SXH)HH5 zzT}tBck&cCy&)86Cne_O)>4Pz_5}QJag%V(E=qK3tM`*_n?*Tpl zj5?jyuU~)j?YEDA`z?A9xMroKq&&&Cyu3VxQW1m%M(*uTL}2#(Lj!LbgkgLo;>`D+ zz@JgW9Y0PUMjJnTkr<*Z6wa|D+AKBtO!5!2^8kPFzSV4PYH2FFRdxd^{mq;84fTd$ z1H#sUv4bQ*(B2C&GL{!FFDY4Bw7fVuF&T>hV5CFDWJE&n_|&ue_z%wE0|bmVx7^shsM8{sg=q?@N097Rk!w@xmB-=(5gda zYPn1kDhpN05Y7@lV=xf%{+*TtF`Ss2D)o3ockEpFKm@@@HHiIV_bC`Aq!P&{wz7gt zDrEVk%lrxK{qU#I2ma%6;p)89xO1hA1BQ{R*4|CU>8KZGrzN5<0{sz#J3caSW8tV) zHCk35IAEGUjz?^~ej!?>tzTBRfw9q&HMzn0slgOv0Gr3~hwWNFJo4rF${%mlS)IeehNrv0$Nl`t8rg%}zL1BszD@t-xr(nYmN$0y+nr-EF|oUM?t1pwXG+$r z#-c;Porpxy{QE~f+s5DbpnPU+g^OHPjqLF5@I|vSUZsJMSSB=1U?+kixO}50=!ihis@f1TQ_g*+PynG zB7CXfzhLbPQA9uaf3qYoel&GfI@O-jJVx$UQEaz&r{c0i)l2@7=fGdb75s z7U>5;_LAi#|K-2@9fEJb1slU}(1&F7J;(=WSMc*8>(<=7{Fs<% zBs7LkC|FuxB!Wd7apEHBZ|v(NIPRr=Jy7_MjEpqYHFS4%V`zp+WnF?!LPkKM;O*Pe zln>}r^79M+-~Z?Tj*E?b^*>&1Zf^PZ`0>8J-v4C!PkZ+5g&zawSN2OB?3bUj=YMqC zShQ*wG9bH}$!a@(rRr>1qXIL=QY=CaqBQm)Qn^eL9;!%))I@1i(b~|sh_DE)GFGdK z57&gq5V)50U)23`+T(z=U&PWN-x9h?v6@LcU^h@bbWBn7_#4Ei%p`-W41^$m=n1;@ zfWilb)Jj=yVze$sThZ86)7p(7%Ska>3WUw%^WxA4YqTOX(zSVk@sZBU6#*^X0i&Zc z)GshD%#yCp3yRVPNC|n*;*a!eKb1Cq_T!D-fsv>P)!{A6Hx#DJLL}(b9%TOUw=XV# zY|haiZ#KUA)x}FStyZf8W4w&i)W76Br`p^IT&zF9_Y&MS2R3fa!K|$!kwOTFwk+*H#`uqzoz&9rZ(MB+Wbo&~f z0QykzSm_GawqhCfmp zBXRlv{FmP;<%*9#`eev3ceJ-~R2k?c0?K78!teo|RMF3v>{>?wBF z?HhQEzsP?Vu>CF;|AX4_O#JWv_}_o}@keNe7^aSxM)031f=xt$I!v;{Y(gSKl&;LT zFCY*S9INKBP7~Ho2y|VNE-of6L6?vamjE|s+{F+V(}wuPh7*3oC{ErIATx;}vL$iB z9v}e>Sjr{f>A zQ>2H2AKA6**WlF)1LZb57#1V^X}5w5uRE%^xv7?aqnC7nXE^lJ_$`>K7x^=$M#4|3Cg5k-mQa``_2p)Lgu9Q4fW_zyHvoLvTG~nxVj{ zVmkr-pQ15jnsMS{#lR3 zJ1eO7I6(YgS$u>>7Zny078(~72Ges)xEjCVDg{i^6qG#}t0SPL2Vx-vE>O5d1g;_& zV{E|>3rsjhqXiOJ;)X-vYur#H;!hXJ0L?-!;9-s!hJcvr6=WF+GlnAGq|qUjnjT{o z#-#>7L@LQhjLuGoF0Jou>K?3a?<>mCNtMBiOdl|WA|xa`F-RTiJa=onwtZsMaYyih0eFoFVr%T`d?n-OVAjASX$L%|I{D1%XKO>Sd>=}V#Z+aR&SKY)9Pwrj#GqW=LG~qxS7liznnNo1q z{Q*KzL{r#L*@^d9Vfl;huTwWc8`ey{_Udaiv4}A2Qi)onfOR9dc z{KsM+?HRJ_jqoNLkI=~Dw2Dx<6mA-m{7FJ2>|g)&Uy;!1wO3!QuBm~c?eG5XZ;{Y! z|D%tBy=mbCf7-o)&=nDeu%EIM@7=L|-JSmIH4(-Xz`owTMn^|sbNQ!#{O3+EEoOQw&4=@i4BMptis#r9%>}v(6rZ{i@3E_MZ(oZGA4JH=%qS^YRa#nB-_&^a z+}XmSLRkIWNZ|GU#qC=@C;uIG`X)$L#pD&dH0zh+PQUjZ{t&X5(;XNXc>Rqx zh>u{tkx10)P{_B;^bADWUAJx>I5{yfk&Q+e$GOPC&;0f4B8d0LU!Lt>5CNmBr>m)< z5gBMxQ&O_Cv$Pr^|2DPT`>TF2TlvECFUH11zxIdMFJ8RZ(9novsssJ{r=NK?Jv|+< zGQr3${-y)Y*zWAT)asWQ(>wS>Kkw*hfB*gW|M2?j?X9g^l_EPaI!YUg)Mq0$hnfAy z(q#vhC4$N57drgJ*cjH?umgk=o0u3hS%yuPs+Jy5+qHr0Qb{nPXGDZ5G@%N_ZHNd} z!tpj-tq51i)k=A&T&7ZlgyO#pzjCEq8Y+X(B5gi6kcMTX)FaAXU;s{Fh=vjm_+%ue z8Wl8Ho*9rnNsz}btBKg>fBDmWmIH+Ka(?@WJ%JSaXqNFnnE z{SgSfqPh3?N6xqR4k=`ky=(Jd+Py9zLIpNieEPTq{r$_IKHI(^q4Xy6&y_77oWA)} zS);}3K*or?Wy_v<_L(Q2JPcikqzp*_CSBbHtRM{7C4N_U$i?A;Jf@rcMe%k14!5ro z@WtzYVOB%@cvD4>_GTq!Fn|F3`l_bn|gFTC(#YI-^>lY;2*^QS-ok*)Zt z$Zc3id-K+<-~INtUmiIMKlh}hq*q>f1R=iHb1(=9fIB1$twG^6 z@P}9%bPxjOmBY3i4!g59Osx)!ij07P8)j*ot5hn4+CWTUDV~*Mtwji4!}Az*Fb_e> zElRQ9s8?XcW9&kX8DJUV5)nZp#N67~qRTgpIuv$UUiHVN3wzuDY=iPVT>1^+a zi_q*}pLclcij?Ru*p4x)ia5(w=cr?J)M|4e$x5+TgsGA0u6#|26= z<$_N>+!QC;+wc`~>FS*1Wht?zZWv&`uW0R!kJ88}zyq`gh9)~&6#T~w=JEdF3CAem zF%5lSW}29=SjY9l;EVtznUy?C|DIvf`=_p5scyqWK}lB9bK6#CB}HOlVhPo+xB2Hm zgO8;Q@HnjR=>O(&#WxqL8#?vQ@j%#-ckkKr+zT(1tXP4eAC2;vOu$|c7yOj?liC$y zXIB@(PiNL2ARq7!2M8c^;8FMtvWVMV@h3Oz$uiP=94jg{6_3k8R(1|=5~@&i*UoiE z1R>13O@&XO2((HQx_j zh!}luUvp!l$ut6Q)1sncczud>y=3ZFZ?JrOz3tf5)?pKt-Vi_c4_mqiM{LfqgKN_h zBb7o_50O4_Z{53ZZ%l0L-~ZRY|M|-0_V)HyU;B??Sk014jw?LK}=mQd#i_Lm>SpIR+CklaBZ_NlSP;z=n)~!qL%DFsH^uMu$ft zCuIbJJ0q_kZjoUcn_#2HDUM`_xFPsC2a(4!TqS4$Ul6<|C`UGQ6nu#F5p3R>BsP83 zEAsiC>sKn3WoBh9%gwE;t!r#*s;;gn$S=S`G^pGRwwL>td&YmV3-oCF0>5;0cD(V% zo0l$L#=yI{sOaUFUdhSL6;o6ZSsrBiQ1cNsu?js(e;eG|$7bf8D&Q92r|M14^`rhtXt$OeJWxw9NIxi^}t{2o3aq{8Q(BPpKO&~2B zT_lB`2uns;=;kmq>xV`LjOKp)9~v1lTl)=`A(MstM_^xejFQE96bEDWQK#K8?nJ-> zcsc_djEzqFnB6upGy!dX904(iTbTt6Dn0fB4k-FKtjXaTWu!)_RV$;z)R7tm9IFx8 z85U=FjVMBbVPOuD2E*MM2eJ?xz+w#*9{Miqi-8D-2!Cgs;eZhnFsTqEHL0A4r@{Q2 z`57cB*oI0=3O=q;ydcI(xW;nK(M?<@BPyd0euQJdCA?WV7yt%_?AO%4&li43aBy-= z*z$~o8};p-{f6^p4Qq1}qqQn30>}T};Ljg_xVsOH1QUtg>;TC5rIQBOWnv^qBlj$*_|o}>T#>Ej#x^WfkQCPY>^ zy}@*)rv0-YZ~b(u(PVdOHR|l_oWoBc0N7K=I>6?ksP$6w29tnM=!_aQzsi5v1GoLS z?%YW~WH~4a6oIC|@-*q>LHKhRpK?bSV8W259}#JxVXzXjV`?kxDJJ#U50!wuO24lA z{7rh=MF|&t658x7Bx?W5zxd1jd-owRAAijCJ_E_&&KbV9@%O_Qd1d4wGI_>ae$;`|^{8|8HT;!_%+xZ8q!0$1B@-Bbg9e*Hzx%8SY!T z_=M4Hzf#ke5vz$(>q6xy)D-$)wtMyJ)&KC{{^5<+-}w62Hy!QmAAa!B@Q~s8XP;ZW zeqFdW3{AjQen0;+fxvzyCJZB{Ygezp>~iwt_g1SFeta*#^2&=ZJjcSPa?atuF8Yxw zhD)@hjd%+c1Ou%Ex%}`-a!Rr&S=gTb(=cMAkQ%08?6I!XJYu%m zZC0}d*DO|>6;}{y16F5;4gbhR0`3wvxIB{sw9|nVd*t}sgSW*sA3Xu)1k zkR%j~@-!M{XeeBqRVoeqnl)I!AErS7?ocSH3MIm8U^0_jp+glarHYKtP+i%^4>0|P ztl6+eL%3oig_I1^TvJ6r4qW3RSu7>r)9)mGIAy1m&olBrsK!9v5k8QBX{?~A0INh{ zye}`Wc;t~su%e$9{m_ROx&6+FKcR@fsqI&|HedWv`+fS}KmPH9FTeZ(e3F`)`qC>e zJ^b(nj9BPXw6Sl_7e1?!1*%^W*D3PNkN;fT7c9t#8*t;=^`pnWIrh!hkQi|4%*)H& zv17-9#~v#x%*TQU;tMaeUyRo|bUxaoGe7@$K)*#p5G5mP(Lx2%v5UTUm!Ei&y}6{? z*LXl!nC7|Xp8xB=`YXtP;w)lZUJ!QXmv0Nz|B7T^2>t<2H#axmDlN5IZAgqmOD!*vlqgzJ^xl&oy!Rd` zxbjsfpxzgm_ZEsI2!bR40#IENx2}yF85tQF85tR2fd;QLS#?INXB;+}hYeQvkl2i7 ztX72TK8%c_q{CZn@O_328vf4s5AP8?V}%)d#2q%v-hO@0fDRt1ga!~GyP+FQ#_*Q# zmCKY02_iYG7QLxOVQ$OtyFO;1HaoK|Tk4$O&4Y zEHgP0OezU&6TwI6auOq=gVg2C9VHE&4P664ehR7-BE}TJN6CT4v*Pat8(!a#U1wso z!SF}@y6&6vCfW|0N7- znRsAWJcPekVxj`wpmYAmQFdHpw}kfvLI||tk2~O#IAa12t4b6K1)T8+GT){GJ|H>K zpFS>N#cpt9*cI_I|LCOgcfl8$g}}7}OE~IxV)~d&2872&aNE&QH<(#NLPFT=4b>U` z9_Jq{5VqJx;RbB7*bx27N8ye1s?=`8XJ@{Cp?@^@=(-1ZXGWOwe_-nF0b_03(6Z!E zGAlnuAB0oL$jta}fBbKuVW9`U`>v{{`o|xC?Ck8^x9{DpTVH|iHse&Hfr~$R{X$*P z>9kiaU;gBiPcB`$WHjj)F3kP??|zTS)WN~QTt*8*32h!MNKOolBgo7;zWjNdKfT;N zkjoqYop~6K0V1L~!(2QJuLpP)G7~Zxk8xr(8}%@88(?k5A56|rS&=yqW@w|ys2kGa z9@(gMi1v&h+F*Bv%QG+>7#M&#sRc)D!!K6m!L&wuu5G{J#EAAa=V&h5KVae`7oKcW@@6vy-j&dsPawz>L8fea4)YEII}ZFCfC zA*yR@e){RuiQ~r+7X{)1UE$iowL5q0z!I*|&`=@r8p=C8`UzkDK;#5`Vm+rml@7s? zla-&WH3=2N-gNa}bDKY(S^m)4Zv-Kw{3v8ocJU8uSFA})SNr7+jeUoa`z5tsXh*fR zwXhP}Mr`?u7iVQlhZ7Hr z4SDYZXFSsR=>}L#>~?7Mg;f!FhQ@^WkJNmKl?;2XyC0FAw-nyVLI1YehG8#;+1O%3 z01fyuk8nFOOw4*x@ojq3u#q%;o55@`nuift&tSr_8L^)AMhpXn4W?lo98JtN3=ptv z5oYTlqZvjeW^@MYyJ2l3)*ixR8A}jRD1_JG2QZq$4o>!E84Tix>Ff>DGoos!uwoZk zzaVE^dX{< zp?RGC9mo@rAEQ4?kq{o391~dA+0)iLSX$qf9Ulth@i;VxN9g|?@CgozGP(M7z_%MM zcFlm@WTv4SiVY`aKb2>CtVgh)y|vd?*XE|D+>hwa>;pOk;kL)vJdmT}Y5e1W&xrdF z|2XIap1D!k{OPG%ja~gJnPh80+TOy25kWqpf6qkxIT`ri^XKM&7kn_&1oC0Z>4WBE z8?|-z=`I%6{dBAHPE~8a!Q`v*UtF;GSHF67-MaPh@$nQxhw&3J`tv@9>kcLk5rZ zYxbz)U6Q-3%|ImcPqO{0tfVu3f*@KY-xB zL$B|79T#DGrq^8j@8$+S0a#=&U%m48e|&QF%4OJd^A_g)@sIy~+qUgs8=}0hxkHT` zw!)gLhnW}Zg&f9LA3wx4COzYE`SY~;BZwG2x!vI63x z-~q}gGBRQ^n_+5(ahcqlVQ@CV+zey09;aHJ7M5l$ez56udYH_$S{SB>E#M|-x+D0{ zV#%3U@C{6<;0w@-$oGJPxIu=3shDnwoD?Ml(&e&9P!>@TKkvD*DtTp@$jcRPW-eSSIcAvcgv6v5ta-M)43z`=_bE_C6Bqqwj{d9_v(L?N`_=UImz9?F_Vy~}%7Vp<&AZ!;h0K43V&sT(TV{dr4WS0*$N+L93Z3Mu-*i3XtTj+K`;ayBi1v5A;2mPRUUyg zXg6v{00x~2FwCPA@R{4kSpnef!9A*=dD}53M`}3|3Bt+@pCl|-ME*C0RH~3mU?0cG z7jCdf2#>6TSktJI%Y1#L(B=^#nnLAycz}BNg>MQuU14L&Je;XP96Gd*a+eaEO-vtZ zwDiuS^oO++K|eBM!)}x}^=pl#ja`TX85bgXR{B2){`1xEsLnXrrz5Xq42obc4iEIo zP4q~M^H50bi4pbymA$NCw13EMv%ABuxl`kw9_uFYei8oR_+wyJ+1mTvxd)~7ofs@F z$%uQiaAACy8now}`P}?Dwe&$rAK`x&{O9BU3HTF(e+=|%J9>{?Ejx9)x~aS0)7v{a zId#K^4X?enEq7tAzpoz}Cu{SxL#0py!-1%E(-n5x(MJf6v5Rz*y~EGO4%s`7`lY5$ zPY4Z|$G;EujXy6SAf5>}J7DEpS_h7f$AGgS!`Y8`oeC(>&*>5# zChG`&3Weo;#T3IAzcyX?yWmsxVS7UTPCy@YwAEEL<>lq@_*}YVX>w8uW^@S>aTpoU z@FTwNhS*q@?L#N-wA`=l(P%B`>%BbP?>8u$dyJbFMka>&z#PW$aC!-_gf=9?q4RO! zKL`G-)X+=3d@)h$>1l@Uf%#RMDkr-l@JId!KX{9JA&l%3>4WY+EG%r-&Ydv%ef9NM z*REbIEh+wwkG04aw`=#VwA6I?rQ$==hd&2B%i$w_abI8mg^L%y`22Gy>u@T_&(Hth zHy>=>@(Kc3IMWAi??Zh(O%=s$6_vVyKGe5L9Tc0E9-Fzqk35Jh-auo8~V**o9|2%tnjB1G7XjZmxc4;%fM;q`2Q7K$}`utUT4Y(S(9 z1S-TK|1-csP0#WT(Vp3xcnd+F5iA;)@gl&I^%;7w5b@a!mSXaLkRtIcrMQ+uL6u>d z9-YANnVg!HJ}Mt%A(4ZU+}ByIK#({%MoVCN#`E}xQ%X4q{|eGl$@mQYmHSBGkQ7&^ zVm{u!@IZK2SWZsP1sKk{y0A!g{f6~0ZNrr9c=1K(Pal7F`NQ6tcKPr~`$E{a^2!RN zJ1;3NL8|e>wQGO#n~!K|!W_YW%H`)H^!eq$N1Mf5Qf*D`nX_k3o;-ovt!T&yMT%8& zuqm%zy-FPz$OnXAR7W$JKKcm$Fs$RnjteUByK|;}O&@(oTri?MF5lRl@%3AgfWIvL zlSVV>@yG>E++6aFamhU9PYlu9+n{z;Ku3v>k4sNab4rx*OW}WvKK#`Io40KC_X`LO z4LNrFcxPw#=bwG1(P-Y?_bz7BF}p8{bJ7XL2J%ax59fbK2KZDIJ-GkH7hfJfeqv~# zFEKn|Phsw!RSOcr)E-`fO&Jf96_h$7q7MWw9T55Gh)x6_TZa-sW+HlmUSVz|bVz1s zl1OBhCW_+$5>B}CWcYZ@ot(?D>;jL{h6_B6b`X-v(;*Ee7#sqLlz^5Io7s$r8HlQZ z02*+D9)^#z#bPs9tnhb+85%xDMw11RH^?3h-)9P!M+pY8;1v%e!5|!>nXfd01e5Eu z8G~MOCV|Nt&MNfF3jtfROy(`~@{~zoWya>ojLs4TLTyOAm2!y>rlzG{a=Ao>up4qI z3$@`Tr(EM66hY71OCj@=(J52sVS`24P#PGc*+7O=aYpJV(#PE$c?;8H!y*FwdImZw zTY8#0`eTFrSzS#H{iz0@wSH|j1lY!?#IBIICq#H1wT@twHEv3q9z!PG!&&*0%JCD+OtFvpM`ANJ1ryzICLSoohA|7YRP z=b?`aK5A=<+=uh&lK&3->dPHpGrOK(I49A3=EsbKW9kdWv^IyCx= zWv#H@1}Nh~d@&tMtU@obDyNrUm_J2ePvjrD#3La@6%nLF#4e~BB(;DtkoNG1Q2V4s z_$j4KF?lk5!0c*u(3VY`LqdbY!@`doJzC$`@X0?v?d zsYON*l{hxfA%_9|GT z^#&-bBM1~n@N8P`U|*kYn1P0#N;CT8q3r1mJyU|%fUp%~T89F>;T&dX7^2C%Og3e* zLCfJQp;D-P{9uUoL*PsVf`+TDFZ`c<5CWRQbKqt8J7e#Oj3t0aHfUI%xqQGYNXVHG zpMWUScW&RVsj7~Ri4&Lh&u#u>!sdzc!MT26?r&^r_~z@c&!0PwKq(7zb3gpeZ!$8{ zi3y$gcz(6t$?BBm{PmKwFd)=aKE3zU2ePG%Y9FtiIX*7ic4ERWEr(^t)p%A|~N4#OOwX!ae z#c`mH3+K3nCwTBs06a!(qG3$r7B)bdD)^LQ+Y>Is-fr%45k56Zd=8!jHk%!K zH`cA%hT*V0g4Kxl2kjnqXDnATTFA1D1B7-oVGqY=qgijZ=?rFs&m()Z$%23zaC1f$ zaazd;cjr;N!8|f#(87y^tfMFvMVNN;Vky31(}eO3l;F4^@$_Js0}*Y*6EasEytc73b|KC zjEBE!xVF`<(R!prxyvLk$Um6Y=o-`>xn6qwMg?+3Mg*(&Zz@=olc11;4Q3aAPB;Jm z!r`Ldw6A}XTI{v*3DbCWMpQj{R1E%n6^2i_6LW375qp% z$^L)_mzdOAMYVyNHM`7i(TyqWU&yR1f+YDsm~brUYvLcfCY-a2>?x)>I-Y;{@rN&S zlnFld1?1CUZ}05*;fKS%K7Oc!fPesa%b^xcwg??Hu?y%BgI%}n)wIzm)Ye*4ky)~sHQD7k`9=)(<3q!g0?;>k?5-|6OmEJYg_7`$-d z{3oA&a_8Ks(FMWv0C~%I%;m+ z2#$=&Sh51<{@F|)sKc1j#K!V-32e*@NcuD4FJlKq)g8``v`i0Ipku-Wjer|4K;sX7 z%CzndaX?JgLG1v>_WgZ*-Mu{_>1?a}o2_aP`8 z{vy=IApf~&#}RT^LtFKRQv=zL$tH~`aWErGV0i}jA}>v#S{)n|qE-i}gVn)-!RkOY zqH*A1Y%pNMPa2E*;i_C!S#{^$oq{DxB+^h}IS^`!+O7B}mYdF}x&6)Y?Yx9LZC=C_uVL}K+ zeDpFNoU8N!8(_YtuA%nu4?q5R&dS}C;T`O~f1C+>X z!p3*Z+RH4Z$ghS*g06{mNf00SPbw+ug{Vizv{Vj`N9>d@kg#LPC<#(1m+Unhvv?Du z7$MF)d@NS=!V*S_rxMr`J`8_~xC?0@Cbo=&%BkP z+UpD^jm|uzHTGzA{aRDM-rP5!M;Ho(fyMv;aWzJ4@WG{5Fhqcnden?z0Y2kC!uXi) zs5AFKH;(}&{KB!$lI+K1IYu6H@-y*-CECwN7T}}sQz=4xm1>pT-&Yyprws5_AovEX zGI$;Vo?$CTENmERdIt@6s++g3%#4A-~x%mf-G-MjS^q}GB)$-=e7Ev?PG-2nOe=k!8$Oi8p5C5Qr%wI-?|&;QDncya70Xv3 z_QlH8tKt31MU!*=nvKTpmImE`23i>v8_FhyB!Sz)sD7}oySX7LXMseC1gyBn|7JkG zO&R@(?=diUbBF53d0UXabOJJ9dq}=Pv4K(vEfdybiq1?LDt<;_L#9N6@M#{>4(JAT zLln~)R)8Tb^i#c_c|l_}9wI>_RS9Bom`p}Q*uYz4zh-7=zZq_8t?7jL|ncMu&C^$`y=}~0w1vl=%HtkpLlkj&_`@ubG3fQ!ykq(WFBs)uft-g(2x*BlcYo`zwG+; zboUGj4ti_vUJPUZ@sGdXyMO=wy}SSW|NY;cogKUP?1_(y!#c6a>kspQ{~^z?p6wo|Blk;cK4I7Oa388NnF512#D@3iNh)-mU<0N4wVZqguD~FJW+*pTSZq5Ka_V1zb z3&t|Ub|hY4qV?cG2?3LdkJ$ttVi5ljY6G~!&seBm5^~-`8DI?;@n_w$JFLaSC=~Q? z==RXQ?XWwOk`L`19?d$VRSO4a@@uxh06k=Y%d-`+o)MSBY#l*%K|DqQH>?N=P3k-> zuogsaw2c_yRf6#W)`8MBqBiO9(CWS1y(oV;JW23F?$1&zvSi-P{tBs5E*;Rp-UL~g9H@+B(9<_qkvq~ z!=FHkKJ+B`SnMCAR%}}mw4fy3Tl8@dfs^48{zR)FKVf1R=|gk}C!=?RV#@Y(426<*WPwItXGCj8+-HP# zMuZKd7o^zFMgyf6)FH42cDf-94u*z=P#Z=g;yWWKhnYorMrv<_N;en`m^Z>~5OBc8 zTCOl^fclEq7#LxF{@Lefw9A$+XAu}DYG2Nk>|BsJ#Q&fMa+7}b)mK$jRVeS)En8pT zvnMblSkO7i1#r1y%4sQsa%5xe%9H*oh<|5Vv(TEjYC^WfalaCb(`~hVi6e7KTbksb| zVmDhUwg&ttX-{beZBXuqD31#g3_{6=V;1raQcOKPlzA)c)Hdv4F-CqtI6}iDjbwu` zYJC>RI3mFHIZ%F8GdW!NKG8`zU?jMLIY* zSX*1y-#>s0}FiU1MD{V1}#^uk_D=yl>BSD z`14Wx$Kii>ccs)TA;dQ!M0nU4e=aPlJxv3Y99aEil?2N1H2GFD8pe1qbJ8bR#{P6!Un*um_fKk*MG z7{tcg%ow6r!OAWR;+x+fHHrB?!#SCINuZ?AVqrsu-FW~(@%slfeZ80lK+Sv#QcJbmx%-kSPW_DiQ8?V3dtJi)N6&1zie#Ewjrp8s!ap8&=o#8)Y|1u7I zHUuEh4$%tv$-FG)XaC~j&#C1fkt@f3F%7&pf3aStZD?-l?Cxs+>BQwLmohUmckSA> zuCNe}`AU@%`aF6f$2(7wpNU; z2t%hgf0^}*Au~eQVNNA1Jk(d^d-%u0ogE$j{N&TVKF#lc`}@2_c?tzzu!TYQG>xx? zI(UijQ8K+jckSA>fB*R3FPuN`VIR#&jCg-@!7Bx+2(ZBL14A*bi*^Of{y}W%tHemjD5!R2ciY? z_z{5~qYnjS9;HxvunS|5gm`*nH@1x$hpjL)4-A?6boxOA+0YsLh753g9@HatI*Y48 z0ia=YMp{BxoQIKP5cV~!WV~I~tkD`;di%F6%Zds0myk;pkeY||2e~?XwTPm7>Q)uv zUZzF|zqNkhl9XsULOFxZF8&0&&9C-Fa>YshjJVkiCTm4=*MW;gN3WG52#iE3OG!=L zzJ2??_x2|xBqHhsy+Z8{uQ}^DtR)gO;Wj-YZc{IxAqp690e>7r_>IX2@x$Z&iU>{( z{wxRvectI)1esmp0$LpNh#z)(5{JAT41ab*5bErPQ;|gY^b7cI_Rz4f-~ZtcNELPF z>{%>$Z)|8l5YS`Cj@`a}8$J$&g@p@p79=JmBHaNQAZX*?6@Tf&H9Q(Rme)KH$Gh!K-^*u;9JUkpAX0~NUmK^+=H?~sYYQNb+cfdmB} z5rN9w_`s+@h2sTq0Y`};#DO{Oag}Y(@Y#iDz<&nd!=-W6>QxGb9B~QHojcdj(f-*# zSvu)=-p$L)gL*1z?P59R5&y$*+1}oE^w`nA{^hULRaJ<@_ zl`De6qm{n?gT1}fy%QIaOaMd3Rm$M#7^z$?a0Lg!S>eUygWV3lUR|F?*WZr>c~ZH| zPaULEtC4J(zVPDk85Ampqf3}t{GSG&m<%cY;D3fEMb~G6l5TGC^t!m=DmJ^Db=acQ z8?-}%urE`H4J~ZX;Ny)2Lt=zq5_ljl95g&%@Kh(N8Eng1* z3mPabTZFnty(`~b_4_ab%`E?nwX<0(-yS9pp-IC94l@a&TY(^Qr&&m;bzQ_B`SwEKH7hYeU|af;6=+nbc8Ca&E+w zCN~`OOJebH4NuS?8}#!zSGh?91jsgx4^b`wb>aDrhu!_G!x-yDFNx>f1H{dH8xm zYv1-2*}2K#fqp*79LQ>J{?H$OLol_UFRnd-G<`$*_%Q!{8yBt5OIFGezKoP57k?7> zFdpKJG@sfpN`?sL^_~6KN*WGcF1cCJ1Sd8`>s`Ef@s8~~w!X48P#wr^4x-*H{*vIH z+3`E54?PSRV=|77F&KN&MWJ4VTB7P2+oq>~5rSaQXBZvmfKkSACftCq26j$Y=}BzN z4$m(?bW?0?L|R@h_KO`Ys{kx_clfL!@I_w!B1Blm^8ed+ZkLypBNFA|!-uhUCO0>C zDRQMRS)7`h4sUa0H6^z|_D$M70Y2TDPW)Z)i2~T3h5lF)-qh3#>k`5;B_t%o#>P@m zbH0tsKkja7g=}qB1k#M%sq60UN06uysl+QP#AkVW*vgCue}zQkDnf-AY>N1kka|h{ zgG^`ziwjgL6&4jD76e>7j~_pd2n27uu@{-X;N3sA$bt&Zqy_CnN{GKN3x6V;0|%lb z+s3V5+!66d^f2(op+kodB%!*t2E)$HTeiNp|K0q>1sJI^5KpXMm~3Lw)4CdStMA@2 z>vagl&4i1m%tsNMu`nhr%hTI?I_LxIX=6!AecAni&JKhQmdF$#F|o)5 zn*5nE`rGYhD_Fh#(xuCoA-j6{>cG$d^p^a^i?(igW!<`Ui3y2P8JnVcN&U;C@|o#U zEYA(b>u9bn{&|E1Gs{1Ze0&bc2Q(oTdb0QxEB2U(}}R%H>Olr~Jy+SCG-gSEb@}1W)204-Y#My~c&8A_7&B!9MX}e)*|E z>#`!3rGy0gQc#F_S-;4DhUqU@qp(m;qtU?av97+MwXGEasY60SeUu7>seKOm&rbfw zq&N~uG&D9JJaFL4FTSjAtPfHLAqLKe@KavA*s)Y_g7yn8kjj00gMuJPu}lk#!lVjC zKxkNM{?Y|V$r=$2S@DSc8J9nwi9VPksV};B_w>=0^3uWH9{s?O4q+hL+YGuPUv-Ed zLM$=foR|E`bt!=Z+0T>OuR}h7W07tVHnpUbB#D=IPft&Oe_wrFeMM!J#bovm@JHZm ziU~k|%X3~nBjm-^D_61bv$C?%-`^jRZQg!oUu0AS6^{7WxqlUor<^~9+Hv)dljF}R zp+5qMBMQueqWfQc_4SuuetGZiU7O8{2~@0-``|YpZQisgG9uC&!!76f7wU=e#fjpxbzQo2sin0Ik;j%SDUeE$*+xKyP;>DQQ9%$%T$sDs@3`_GN!vdC^iy~YtXo&O zXi>ggE{lqc%*ag7$*2MfJi{(&l}^7T(j zObiYR*7R$7yL(z&TdOK7%_dWLL?i}57|(Kb@tNpPrJI%V8IcuG%AZag{XhTT|GigK zB=vO9PmA5ZdGQ9=lzkMU{A650_+!H$fCa6?8RnQo{$cIWAq(hCpbsfhys?rxMb{yc zaEU$Zg3q+*>7@^>#d4{4RIqet)WdbL`_6+04^mT7)~;EDgcc%$ z5}(d+|KjJ<5US2dCO#kLK|GOa+Z*_GQ z)&_q2-M0-54WS{Szk2nR_uv0@Ufx1-e&KZI3?hsj$Duz4r9OTEf#H#`CI?5wMx~@B z=gV8~!j-MVFL({PD+Eu3mw~1e0eUeDG_`X?uC{@D~m&dD&(i z{vhI4O_}U@ur=NT}G6J*m zIt1)utW91Z=+HCaE0U2O5gCCsSl}+BLEqZiR#sMuC@~!!9Xh>sbi|IV#a^D?o?d7n zF8MQC32^>Yjjsi=zYO}@ZMOE7rV~ewAoj(*2gSZ}>9WkY zw>RXiUzqH#l=J?NGX~g#?8A)N>AKMEfC|q1&)CVKKVvk=kVhEC1FOAn6Utk9dR3zH-FuFGAP5s#t?97}{`B}AEB{E7BD_uDUO(mFic*{{7> z+5GK=qOZ;r)wcKg`uZ=(U9fxS&VBp$uUfTQ9T0%2a4u;%gNrRpV01yS(a+S|AMmYl z;SUWA-MxFe2xjHf6r?YL`G{J+gFgv1p?Vm$WAZ^no*v-GQW(BUar$5)0Wnp-|NeWVp zkHbH>ig-PWhd?rcaF5ro*<>lJs5o%&AVSbKH#bH{$0E1S{`cO? zUEr`O6Ws-=JTd*@v#d}AMnr|h#D*j!g+#~76v`*bpBJZ3OJ!;4<%on+#8j1kfTQ@6!k_qlvhwrA@dqu5oKKL?(+3~4^7ju&O-)0}GMP*P%Q7qr zNY)DbGV=c*b0F?|d&3zY*gc(pW*&c$GWZophyzFc!m3hLUGw+9{TI>$z!z`XvgN=1 z?QfSaUnY~W@E5;;`kk0Q>@Em5ulirid?Q@ujavXpLAAa&5W@%Co!hr;_R*}&tZm!2 zzw`Dx8#iwTt7C9Allqld3)IA&`IDWF(H|XcS6BDt%a__(TbC|dicoRPtc>a*HI81M zarwY76wu}IF^{L2Sr<$enJ`b8=GHs-Hgkm% z@G%R80Hywg6kV;~L17gAg5I);t zwe=3_8oLLYyWq8KmUw#l`67LwH^xSMd^ES}7r{Qd2K2{omLIzKpnFi878CZy+T4x# zsfZsdBR z*}4V#{PyiTVVOi`h}k(l#en+G-Md9a#i^;OYu2n~X63Q*DXWf|>tDRsr-&VB9bl86eWqF)S}H ztH9s~dHmq8dH>#n%Bt#Xm#$?RKyPMwJJ@`|ilmqgWCf z85M(dlyATFc3N5*EfpvEAT+GWw=akw52+lX;)U%A^5+Hd2W}?qkV&rv#hErsn6l)@ z@c$bfHkyWw`sc%+(B`&fUV!PrUt|-H`1 zKwVuu)-gb&`}qeTp%ZYML-GNm8iW);N`R9mPU>{}w2ZWO-g#%`3S{6^y5yVC9)%xb zI?iv8)GugANqO8xn2QSy8D9#2vR3hQ`2+4W8qF=OO&88zJbwHbmY!i@cwj(aenI|@ zZQGYFUltP+!&k`x;7qo!$>NU!fZmi7p4SH(75oC^&m`$Hx8#pg6MJI&qGzV3ei?tW z#tI)n2P$I!0%5N7@y*Q4h>wp$>WJFfn(H^NU%Pg_wzjsewzjdc@%HUosVS+*W43hZ zvgD*h$bWCCH`wtJ`7nL>Q&-M~&GgV`p20U6jrH|)$SDn*QG8rnbWF6T7hj%5lEl@% zgccz3KM2C*KWxYOdHHJpfZ!nY7hik{eg5ZDr(j|p930%VabrY81cd?<$Vcorhxp%S zHn!ANeEZE;2YxtS-O!?tOAB+8-rrQPC^bTfMKHt_4*38>90)RsD=;mij3_bJpNVdC z8P^0h5`+o8zz@lY2V(Lcit>wxd9qm-d@dhnmOiK~SdMcOB18OD@!^3dZ&co{YOZbR z?HCjWh>jnV z|Lg&}PV$fau&3y<)5dQu7D2NVJEr{hlsKF7C7UW>1aKo|(# z#fjMQ=Q#z(=!h5D3B4e=x(F{g!>2xj%whB;@TP$2WAL#uIxsLGAiys%J|Q=E!Gq!l zP(_Q2OR!kJsAk=C#UYP;>r<*?W48EIvw7avjth7|G zHzcPdrKYDT6ns6DplLiS|I9P`2*r7f|Iuhl@xq4-ISUAso=-j?$Ienl8BF#%_amjZF4;(*sthc8pE-nrcNZ)+(P4EWhha947 zn&i)m(8p#Q*7f%d_G!o-!(IpH}(ALKnhd-m+H<44;&JFwPu z_s(7GH>?lv_jQ;?8G}r!e|!=CoJ{{a3*kd1*hXx6*yHsEEDc74E0xkmsq&GMUjS{h zO}?QyBeC#<`$eaI{`uV5vyDwnSjeB9omE)4j#7DKXZ!p5A+Q%meiq^ndO}n3a36&d zCKv)~=a`=BFBqc^gBkXeK(xuC9 z-nwz`UQumrbw^u!YjX=?E+cl(^5x6(7Um)0N@!T9g4TIBOHdbozI^_~`iy}gicF~K z>w~)kq6Qwq{=MpUj(Yn0{JG9NmEi&-hFppU|{e!-+m3xGEA`;4F>Jt;Fhgh z6O$695{lP3m*kIq#Aejhl@%TO{`;@KKibgN3D4ESg-P#kDacQbl1U{f3ke1KAy;K= z%o+^SFv$simtCf3=t*8p#7Q*eiEH#I*Pr=wT+EQeGu=o3<%0im>4PPP(INf_sT>*T z8yn_-vADjjRdfD9Eg}iD_71LDkdzt|tdh%U8exvquf;M_RM&Rsa&cK>mqO;fDl2|d zerj~6KO!|T`xSAei$CX0`$h8^GMKAdd(Riup1W6F)zWKo^N34KT()e*&K=uUtz3l= zUdZZ3%*!?|hi2XQ6zz+IA<0z|oJ=r^J3)7vG5pD_EN;|R1nEwc6Hn<#(5|_7=ZMp@ z4{bQ7J9L==dgvydhyb~V4D~YfJi9SId<0HaD3x&PMqJK?xp|e9Wb`T6;q-k6R9>7Z$N!fD-)oZwH)KhDtEll11(`E%C5N3+A) z(9FzCOq2x&g?#`0!F%`aBOvC`z(99*&(>GBU=B^wJbH2QgRj5* z>Zemb_iB1lQc`yB+6}XEa&j{AJh10yY5TQVZ5?&hwGZwg2*&7$jamRXRxnOxc*_;? zu($+Yb+AkRJVpK^ON)nlkXpTdU14N+cv@=OiIXQE6ct^)e7U2oqq3s%)nC1~eCbjj zmCxh+GYi`?5E z!O;xnu#FoxAx3d*Y@Fbv{BYf~Gg1F}M*4`5rm}y;;2zju11|JOKja}g3)>eVIJNpG zm6Abq>4zZ0*!H~q`4Imw(z1p+23R&&$in&54RcxFko&@2TW}m;Onu>e=}pp-wcK-p0lT1eAxHNPJ=f zoE{vlb2i9lbQ09Qg*NWYgR_EvJUzXTzIEr$9qItT0|yUXyl}CoxL9W}^lCKQw{6SH z&QU5A7^BQu{7G~=H4Z4-1_?9!5@FR*woq?;3MC*B5UvZyxjP3sg$xG;aS?~ z2mK3~lzA^sr%ZnqpAfWZf-e}J=`-LcuqnxZvXr=ul9wdC;g0@`^;a(Vvw=Pk?EXGV zm|lbZeG(#r&fclMUfxpL*x56vuWIexyf}4LPC}?ZoIO!zv%P+YM@A}JyT3VGe6_3* zv|W-OvtwmeW^9;@0`y^62bTt}Fw}H&cGB0_!k0MDe4Ulq+$+-3V2>u463D%ZAjRrXw;e>ym*j&$ao$8`mVeyI ze=TRhg7AoNbl!-){`2XdYig={HN90;Rn4#O*}QoR1U_aKXLI|78MNsB{R7{AcjxwP zm`As6eP#dt_tH{QSS%MO#D&8-DSw=bG4=SvPJ#F#uqz?fq{(QqjgG?qs7)g6?&%2) z3nMq?(Gg6l!E{R@x#eBa%@?~;T78(`(yu|iJnwH3R!tWS;FeVqK^>Ish(1Gt9z+c2!ETLFXhPn%X zN1e_HeMJ6&2jOJs4-Z2$S{%bH##}y+>CeOr z%nOumuyT`ugqQ`k5rRTug(=*0h0lLdH~R>QT=0eVMYMSt^pQ)v6C#3w{FF&yfzcrW zCt;=Q8uCf{di7U@0>B@v57Z^=lioxAhJjy;gSmUX{*hS(F&Ld-Z}P znX#0nkM}+<{-h>Jb?6xX&e8TeI%>CCY()+2$8S_zDz0zp>^Ip)V&mgqedX1yufCF# zl^qlmgpjuryY#P=tqtWo2c-Kj`w6%h#{pL|*Ck z_KwcZuF}%7OP4RLD=b{PY#H)TBi)%qicu*4vWU?O#d-{0ELVct`3U`U4olJy379d%A4gI$}^tGB%GZGO|Q2;t9QFGM{{8(L7>RUxU2tGXa#D)Fzn^2p9Dj0*0oeId`R5V%Q_i2W6F$POVGOo$ z^G1~~yhBuH&YZ5UuF~nWNW%X5>w9u@7ousv;KHa!C76Z$X)qWNV*8U%K0SHzgxPFD z@cTF3cw^_T-EncT6uySxJZtf{nk_Z=Zq%1Nu$s)UEkE7FJgqlQ%HY{+1k)h|MTfn2M!!4DJer%My%6czI??Ftdd*3IwUyM%ga*~ zz_W!vC#qlE19gay!jV(O%?129y0mw-FRDpFqQ4aVmT?lHKz<9@CdWVSZjh7kGr-^t zkpT({maJH@^2*iAB_$=z&8_$E-mj{xx^?r`^5sictX!Fsy#OoSupWqY1e1f0?wR*- zf;J>@yQ3>1OlfoR534k;5lqNGkj@sfrKzd8wXIbymnFouUj8Syz%(;Z1ZeG-%sR5EfghU7Z z#}V7(x)5`jixmO`^D<_gnOmL<{;Z^rx2LCCrCgjA9UkNx9pZQ7S~(J+J*e$y>m6+F z9)#QPqU0!l9|da&v#x$I=P{@^Unr_SakHXNtB(rye-+`OvlIN}axT$a{5fyhuWe+s zqfdLIqUFf7(%Y3S{W=qpIxNXs_}Z_2wPE8%tgDwwB`jL6D1PY|_5Y&wPbL+orGEra z&Y$=MZ(lF5|MmRSpZ<*#j0!B!kpJ+(8^h3nsiU71ls0xlc#FNy$c_$#z0BXG+X583 z8>YLTGXoFRv&E{N|=+n6Z463YCu-6=ibpIonKtKf`kx=`$tpN33>JyLRwFm$tYIc41Sq z*4(bOYK-n)UJ^g4JLNT_|BNJT_Za<0O~ZY+JG2kFM~qhcFeUdH9kJUj!^49X51B+7 zqVk}uD*WAt>h~f1?e@~LvO|XsHMg`NL)XroI}?+VyeTmSHm>xu4?he4JOrQMjF12P zgO3&^k$8uOgvP|hq8hupx?5XY8X6mVdwXDNhK&P0%OqHc9Ve2sRIDxBc>gpiRaW^^58q>?9UmX}(MKO`+_V{ukv{8^Zxi+}oIaSB zLC&JGlCtjZE}EmE5hk3GXxxbCf?&8mv z!~dhBaNjw8^2F7v*MozDw{PDDxgn=H)Y-1T37P`+FSA9yf%Cn+z0?8fnAljQ(x<<_ zuZ8sa#p=vwtWe(C^K{-1oK= zBt^oeOnytmpM*UV;R60(lCl1s6$#>&p2Q#XLdGF4F@Hf!!9>sm3h)=$xeNX*r4O9( zJv}^OJ5G!YiVF)w`t7a(ZBM_hsjD9jp;p^SkiWuLA%p)7vmiXGpRmfs?j_W($!xw{ z-0<1yyQK|XJ~G+16&VQU5*_4+2_6@JQX8EY?H3+ldeiWo%9d}=-~aAn(Y@+cgV_ed z)b8E8-hc1c8#Zo;hz!T#X~^ffrGE|$4c@tZx9GtGc(@^ahaZ+sQVAYyU*h@n>bJ1* z@eeUk&JKlMU~FJ4wsbry-eXKg*Xe=-QylV6kUb|p`v`mr`oTVG$EuY_wn@VG@UVM8 zas>n+q;h(C`nq-NOG``6oH={+=+Vy3PEDVtysYy4`ExnBxtrk#w`n7cZoG$^Bzz`B z9M3+2KPxif?WmZsLO9-WQ03X_^P=!!`LYcfwH3YE^4?Ls6{BL{H)666Yppi@u&3Nx z5w9Xw;|cJ$yIBWJrn>%73oOb){epmi>~63ang&#<{$2_d-J+sDkv^#3s;X*?4WK8* z#l^+M#K^`10SjE?fDb@4sCzp9yeNIx7isrY{GA4wR8DM;cW^jXY<@H&_`@q1k;FrS z1H-~XKL6s&>Z;10emVtRA5MP=8UT|Ps!1%@Y~j!0Ve8GCH~*ji^}lZ1yg6(!r)OsU z`u%;|w(kfD4f7gHY{jrq&qhhTVvq`5PVGIF-7vv8PX>d!&o_>KL{z0K^Zj+c~ zw&5>u>WuK`bGKjk<0Hz!?j1YR)6!sG`0HQ)($(H^;>7V<1ktanLq^Ax;j|`metJ>e$g^)z#HTy+JCM zz5e1`08qSglie=T83xk2yv|U`^Ny9mm|kpV#V(*DtF&Vdv;O9bDsr z|5W;L{sG0{P>6qwVzi?_dU>p(_@Q|HA^8B~GUg7m(lZj`mr~Qx)~#K$_w9G0BE$L0_{qcPrEuT`tj5sdMP*WMo8Aa;lFK`47ernV^1M^d~|wQaSU#L@Gss;&b@Z(f*$N$xA5H!`7t5>-q4K2CXXZh zBSStb0181%URfeOQGcchWPyL^HIY8lBhlldcoTX7wM*8Kvo=o`=$r+hbHSg*^ilgN z*Dg$q3s+w0d}q zu3iwof6LNDn8o=J)y1FlrTumf=zqFh{==oRqWX>@y$S9V>(;K`x9{C$%a&u|EYi3z z%>@GHA^imB*ye`*z+0{`x^@2CxlLO(FIl`KEFx4cW5F5ed(VkKuqIK+=)}q=;!eNMj6Z`g)$|`8HFq0L zE!q*il|U2y(LcM7+HB?yy|JNB7A*JhrBFdn#@}w!!9#2q53r&F2vs_i0_049soG{l zY+2!b2A}lt$N9%>GMAP-=MDk#&qeCZG>J`0V^I@%E03 zOW6C?TL?}2#TQ>7Ea~;@HwFiX5RG)l_8n07F9cSI|3U1m@FB#(uythA4hLj|&Y(Bq4~qo!h>?mbNa})r zIvt|M4b|7zAu*4KmuGf%&IccSuyfZgc)N(J{P3;u`RDoQ!`OOC=?}jW^fq!iq>X)K z1fbENh@@0^ZeHHrGNlS_<8l6ZwEV!Zjr-u!~ah=IV^hH#$_{F!}|>XkJDR>5P5Vi2BzyqLkxLR-Dz60n*MMt^h8`aCC`$yC``~onez~v1MIx$bf+83)|YG2rxeDJVX zErWxDR;$_FjyM>&%TqWH(JJtW^mCV6K5N3z-efx+81uYddPfwSk&^>+7qOTBV( z7rgb>-aWhb#Kp%`xEm2VaGd?^i?Ahx8GRU484-!zbjGvndA1piCJXd=6I197 zy1}-l*2bE9)y+n$4W{IG)-8H_y*gl_szNcH_Dq^dIt|(C~5B*+P^t} zc~(M@N)7=&t@TU%k3an5Qy#owfXxJE!V%K3kJPpGAHG_8v%J|pGFp%k`)@k9BscNqi#C01tD2ZTrWR$r@FDH9|9#Fk(6J36>cJn7A=y=*=ld9 zZ{BTC)iW-cGx`JJ3)~?snc73A?0_UOlg79~SLk?p?Qf(OFl~_VAvBye$2lF4peNmp zp5`}b&o0t0zsPYPD+>qa44--zx{nBZnxkQ`XlOD%YLzoN%`<%K-+c4U)vH$#_~p+Z|3_y>=lk#fIx#-plNO572E`FR=4``}-3@2N1#}7L zwqdK$Y_Y;f20O47{}4J4(SwcnXR)wrxP*&liwRQ%ukQ&`2T|`NZc|R5DW|_&;S-;o zqiJihpm##ejxq~81?2Gxii%N(g`p@@Sie(_|K#PfSSR$$o2hW%EFY$`{UVTVNLc9J zxAr2w)eqkvI(_zBM_b$BAAW3ZZrS$QYnwK2iBE`=cp=!xq}mtw9QZSa2h+prmH1!S z&_}~NNnl)?Q ze(SB|ltf_el5fN};`UVjfei5V^9>0OhTsB)d2d5gHp0MC06_AA*%C153+6&-;jOFLfMwqo^4tXvk0IH~>%$dBM3rLp($WFe@g z7k?4C3F$*B82WcIx6m(_USgY~U-1}+43JB{@qV4C>!J^cKwQE3U*sRs7TNZ~^ntAn zOAOZs7G`E;ZQ8g26X*DcC5akM-%mfEDk&-b`P5HKmn~nhVg*8HKnud$o{K-Hl|LaU zdV9LzsysL}m>8d!yC5edB!t(tOFq1y{Dkq!*UxA5>NUPf71;jd$&>9J?Vo-AS#NLm zTkpKPY{?S%<&c^JJ!TZLXB3?YsrEP$H!>BB+M#(vSBK_KW?*CkfZjq{J6$j#Up4|z zLT?`?g&rH6KS-0eSYbtm;TU)D4BoU3TkvlL4kOUt#f`EX-QFH0%D`&736Q(y!qoekR199^_B6pRr=n5&r0&@P{Me_6)*@a3!lDu@`6zDN8t!lx35} zSWZkQ4AUp#@8%})m3jI~hP7s)K(Iw(Obl?I9$x-34$B*KC7gY?YHpbsMlk%qoMwmphJ-KJ|}kI@nS#0Ot8{_dV3A)%W#Zwd?y zLTqu2vcTn^ef~M}bpP)6zYh!!LeGgTSnxP7KvguE@QdiAa6f?iu->49xeV8_!SYMC zGG_jT>jLa)=yu7F#w=*mBcn4OLC!|}0$4re002M$Nkl zNjk!x_#l4AZclUjlE`Jri&po zb1=!uRjVSSqS7-m4jedGR$792LhyEVUG3gC-h{0|A(w*(F*8Cj-^qs_`SU1Lf*ms$ zP$)-7+=xxl2rxvl!qWze@|~oWJE-8a8OQ8Hlo?xyL0>K@e^gGr9GP7bLTHSC@wvH=Jc|q z%VBp$nianQGA@%Z#O&73r;t7~$)D&8kw&+qtQ3k}bZksQVv<6kBo+`hs(D`fF8V)* z{6X76?!G0I5y?=ATva}ev)C&wlDm})U%nyVZk~ow2kuDQIjaspG);eOc z+Dw*VGxk=f@))$@*lL2w7!x8;@`pzZI508hhbun$=a0f48PJ3S#_gof)9PDTpV2Hv z%){`+vwC@ZX2ymu$%s`-rNp8x{+#3O7a~q;G#A&kAH7j=wYa`nGX!U_w9E{o=6mh6 zZRr_lDj%$WrD`Uz#iSA{T{sYgj?ly5A;u5FgSd$!x=6qL4dLfGLBN7SaVkhI$mzUn@VQ1)^AiO#9GBUtp z@PQD0h^Cmx@;MHEF9siFP{KW;W-O(Hf-8-?(Er17cbQ})OR7NUuWlo;^GSz zFBGm_w_@drgoHS?I!G#!z#0a;uss!j@v-Tm&x^x{AGWu`%R}brre%FRmJSio5x@eo z$?opRcZALwngiO>lj-l}EAvYa85uN>7>7x^<4x3+r-#H(u1xTgs33D$)s5}wzBB*y z_G#`H6?JuYs{;ZSFD?iU4q;qDOu-q$@i2oVaQ{4@KX_;Y{(tfMb-*W0ROPpP`BIfH z#eq3~>{v%<$B##jfWu`{DJ);Kk--f{Hu{G%QZm^FV;uFiBQ{nSs9qY5VL1}5S#uwS zX&9&El}^@E+=5!^t?Yi6F$m6#7s}-PiJPE0seuPVMtVT{?^wNzW$w! zHE{ZX*<7U#O37cEn!nf+@t7E{4wjxi`8kFBGt21@!*Oa#N}yUD6&Zc-(4p(suQfF{ zfA{rwbu~3xwrq`xii9~B<0#CTz}JTSY_M*V{*3U%!So6D+QDVg8PN=&Kss+W^gt{h z9IXVU``D47q_&Hge$*U5AL4&c+TjlucsGG|N4M#+$H3rVMOk@ORkh037mHwM0OgWz zAl#(&2MCX-h^XO(Hbj|0`aT%(v6dDC3E2NpzicuS@&lsDGr-qBIx31{(NJ5P`u-Op z5<~Xd+S+5sjvYO6q^7nO{16ctxq8*AH(q~Zalzt%fB-DHU=8pgVf7^W0~~c0ZKbB{ zM$@H+zFM=@DDjfUs1ugPtjZ3}^_RoLi6LSS)(e5tOg_Vf2A zb%iu|=qgrdGo-y^(i;=pbXnBzNuNjG2muaV1s)zy=9#X7hDj;X&@52$11%i_yLI-@NNx}dB*?SN0xQ--E5WXBx z@ZNh%7?Pm(-btiHili*1Zn-woJ=3!{v%7cSxBboD?M?UWe*4{wx<@0mOiL|K(R&i~ z4g?7g5Z-%VK%qQ<`y=zcLV+SFm;zW}@j@xM2Vk?Xo!zk+@&4~@0IZC z%)rq7G4Sya-4JTL88(=;KMp_@l{Ct6sA5s*4$&WlF%}cI?27vyK2v$z^h62}A_nK5XsB8ykM`tgYBHGI>#@oSJ=!JsW zge$$n>LFtvhfoe9w5k#>1_cKtCMM7{E^#xzBS?V7*T*M6Q=-o}@_1e{2*|&}yKI-ou5E&7{T6nW8jFF#d)<2WsuamP27O8Rd^y+PCLF6~c=E|br!u9T+EAxNyOi&0E*6Uk4LHDwB(**BJa6GW5eY%lf4s(%tVYI$d_8 zvZDk(Wt18nnV!Lp-oY+(d=`c*b8`{f#7EPIz*^k3gwJl7X*n_d$r^5|8U&u;(*fR_E^={ORNGsQjR}GClGG355}YaUJ;AFrc_>`HDN)v=tQO*VWY*9BIR99C)J9B#;k_%Iw z+b3jQlP}mAD+a+nVP-qs#D7Fek*O||y3nd1E@b^nu+}V$cNr$%z|O%x*!D8A+~u(1 z@h}=z+@hCo0+Sv_4)ZmOwmjKS_zEl~c-rR8o7dUhjYyH=n%09?3qpO|u`CTxN?~xs z$-$0U?hZ}}u7^GE-~gFLt#D!^C(hW}Dci%jRN|193%dwPr0h;%<0X~O+6@JTPw4fJb-+vc5B z;1e{0JYomOKwwayx3@PYQ?FmQK0iPA=B-ix!83 zgrHFuaC#j6qwvkeqD!<{8UM+^cXE*U%9RPe$f2xn7#MS462IToIR!T zV9G`CNci@4E*^5v`GN8vH$%4;xey$sP7)uv)L-GGKw?uW=%e{-hd{IPva;sJX1Ht; z5)y)ff}zd{4O^fOm$}E{4@9~AJd!?CmPyM$dl^4tO>w$9Df&QYF=mSy{fJrs03?A) zPD(~tfdqCU>_;gKN-`i}SfcTkkr$YLu)&JNRlLqTY1q?7EiYVbxFn%}ut0GNXBi83 zz+5@1PN3k;tyLhC8$2J(-1 zH{3zz2?izgo7g+(QBmMMjgH753QzCojyLkT*26meqiDvB1H|FN>9Oj{8)?HPNh}g6g^|?G(&K23n74;O&=Mwen;_5+8pJvHvz|VXzvv*J{YnKUq?OjT^{7pq zeQKnnfRrF40~R^N6yp~p-Odj1|H7JgK{y8-!4PZm4x>|wNGV5W34-4s=j1O2OypyM zG4JB&AVr@Qa_;0P#gn*-H)$0dmYC6ggxT^mHo~Gw?9rE{?yi%)R%a}%ZaH|R;BrBA zZbegXzqU;^@WRTBm|$<%{&Vul>!G0LZM*&s8AqyHyH97AoxfLJTHl7m*?xfmt5>bw zwrv|G9R>#lOQaGOYxF4pB&nO(*naWRJkFyhi@&+QM0%UZOz7a4wE+B>T@ZdmMnK0y zv_`!W?3^TzOikeymOhJychvEN2_@l@Z zoj>h&a1~c=TxyXPd8ND&~vk?y}U`Q)*8JOE{Wluv6*Z3D_rsUoVz&)o$FVru)0nqL)p^Q zeC^uR?++dV2fKTF5XG=$>5|>gJ-2!5wtxVCbkc>Ei+@-|`G@#Fz+doMrRi-@)oTrE zFrHQEg9(*JfSFLjA3+uY-RXljN>nxth6n$;OQvGBY!=st2-! z2_r*u{N);Sg7y{G9B6E4sIIDpQzj%dI4mq2W3+SfPnI*^tXIFFMY_9tPMtn|{KPR; zZ!hL)?R<9UuARF=!$RRoc9A&4w18bs8IBP~Nfr!+bkGT^7IPEhfcn>Tg^;7`>>sy( z=vatl<4Cgt`~ZK{V?1c_1nCf}Jq#vX(-|4_ckkJa@GPu&aprE>yr{r+>9O$l0UX|9 zFQR=R&orHoH<+9XbV3IN2KTU33v&hFc(i?_N2sl&xA_}*1>dIk2pqw~f1J+2pQZEx zC!0D|c~#A7tpQ>g9pbYfHdFyOu!Eyi;)GBTxQXRhfCA>13x1su4~3L12!Mh)CYQQM zu}7c>246`2DZGj8k)@M_2Ad-Ugqh%ULZU|h1kqvD0Cb}+E*beG{}6Os@pE_eR$_d{ z>0)kmWpnp8S^0xn!@f1?iQ)bTJTcpEcyvxaiKw<$f3d($k9sh_qV@32qO5!6J^dO4 z7R^gf-@bL*j%RjYK{dHThJFO;ASM({jgSD)W})9mRY6{uZ19`HFKIyjEcW6FdzY>g zIQ)@-;0%w>G<^Cp`#dSmCy76EEA!HeXwVs}gPcxgD$)U?skj$U#B+9+E{cC5U4HLp}$uX|q zxUpdV{6&kGEL=E0E-oI4q=+QI;s^Nu5I)CP_uu zpJ6~X0)23R#S#qISg%%~D(02wP1@E$rOxQ20QVV@IRYZx#XXgs=9%FC*p1#{?+Nv0 zEdJ=PwzjudRaIg!iSW?y*!VbFrHyawE%V#LMe&^DE}T6YK7DPP<#V>chi?FpoA8Mo zKY6^pqdg=z_?>s&Iq>@HSo8z7CbhBLZDHo`D8H)%m&uS37zIOhV?UsrP03Cf#U2C7V zEy8no(xTVibn|fcKz`5Sl9KoS@E)q+zJ2@R7!`}#X$FmzMT9HvrvzUtE-NAfZ^nBL zKBEUG%B-gk`ai+>6IV!4_##nd5Fx%+YigA6crZTVH=WwH8wYQo;sOdn3py$ zZPAj&ixy-iB`0}#d(ptvD7~K&`cr{;Q7mcCu2@SyV~JaIk+5_J!eS#MqCghYh9jnaeR|9JSU z*diOp5XR1=HEHWr>Y5&7pAK$i2f4E%)ZHz?%h{E!I?6}_`b--B82XPOt358@KOo{C zK?fhGp+>SIEcr`!r-lAQMq?e@kUAqGEIc|Ai7BzBnYhts*{5+q*pJzX_t?#c$&YpD z!#_UD;r9>pU$}7LyYIild^C4=_m^J8wm-nnPjEw+DQsB*iM}F@#}HoNhIr4)^hXYY zwDk1dd-l{fHrCbFo;r0ZGCFGKGtUBTYt=7~`845grseE{k1S=K%?+iuuh*3p>$O@6 z_&|bny-JktDJw2U5n7GR2n>TIVvwJsY$%O=mARme#T%2{545BNdjErII82yRY zG3gi+l`*(CgkBJyWPFDFV6ab$%qz}vbf$%?_I7>Ro-5Vo@6=!K*Y*vM7}2HH7}UL* zF8mMohzM{C!IS)J;~7qI&X`T)5D~-E%a%jDYKy-3;STWVHGE)z{aXlamAIGV%n*#m6Dh)13U9<=?C_x#Ubm ze)M{M&YioT{rOWwJHgt4PvqrSUcuTwn2p5=E|8tR{e<;126fQ0+x^`0Sm+`r=g!64 z%A^Rt*ETIuVohC^{Q`6lg8mq$IOVMkx1ey7uiQr^Vf|B)dMpN+uHpq6`J{1A3M}QO zE0hhIR?4n12Y)uw2kCU`+q(a9{@(eV@&UCT=~Mn@*Q#xckwEfzQ)oIb5t_WnAlTX3I zv^xDKtsgJ}x3^z&DZdJXTldPF+j>=|5&N{Xw3l9bY0cWT(UB3ZZc4-&i5f;|Z|Rh` zyf)wdaueZ4@n_}WoeHWw^cH`|vVe4jU!@u)R4j{~c#qwjEPdcsrl}>Iz6|0h3Un$W z1|0eKm`sV!2z$O0q|N+>_|O>m<}y)Rfx?)dwi0}TC~l9&9}68gxVgC@X(Q$qrDvpV z*s$qB*7*}BPGTYWnwlz1_<|L6;llaNo40J8dUyD{{~s(Q|DE)Ej-HFPw#$LLIZ5FPo6 zyky8u^l1A0IDA51pz|31g8r~Rk)g7=3DfQE6H}6~WFJfrJjuYMO zKl;9WC~&&*tO;J|^EE0(#rDTNk`3N$79 z5CB1wJzW35gWS@sscRcBAj*R2Pp-#6!vU?SzH3l39GEeGfwz~ZOriMd%P(8nS`HmP z+SA+n>tFxvqD6~nRPwR#ryKt{_?GmCtY|dq{QSaizWL_dxwDOpO;|HLJS_Z$J?J1m zAD55-|1xi_NU*4~2+fvoii@N{#HuOm`EHE-;2AHOcbI2Hb!X|IZji$f+FyG|WVZ-# z4Ms{SK*CpshD}YX`oh*+m9_`ty@$T0CMW*@ zLa+dYB2H*O27h*w9>MjQv=2vViw{qM{=j=`^kGF8K=9oheauoKl9uf)TVOA0v>K_m=Z(b^`(S7Uokz>blbMH2{G`F_4VD#wX<;$yAt-@S{)YMeux}j=5 z$6qtIcy$xBz!?6*sngclmYsbY)6S7}J~cIkPs9-)n$r)Q5>wR=dV>MpFz zD^sJ9!GLlnqjoW~l6@COr{IR79Ahk+4h;)a(xdV-#=b&oX0!m*5&~sv3(%dU1M0!z z>Ky#pN1q`(dn{P|&87Skw@SMEHU8f2KYeD&=FE7d0!A`x?w>e+?d=p2rkaB3Kg>leiPxKWfLt1z>V{!eB7LR4~Nd+*Vk#fPsKRX2BO3??s6 zZ{)vv{q@%o+2i5iL5V=Q=3sm?w|HFZLE@eo`xg9#M&()+LP`hb(vH?IQGS`NW?^Po zvwfj72!sr))C>`h6kgeBei9lUOjk#M`hj@Cg)Mr^GDyp4H(CROKIe z9R4UaEK79zgQP*oyquVnxMl0s%NMV}znouCfZPI|9i3Ry@AT zU`YjdNhd%b^bvLK8dY(-wxNH-WD-b>sjo(@x};0uqi~A#a&U37BK?u;Uh3=W;-?tu z*A43_$c`9|QC^1;tk3r26^#3DU*n#VjQcNDt5x zuZS#ssQidGr%OI(34DW2hqY=x{^XO~++5gLTeod}^UXKoV`8yVhe*Z=$mdwjh$OH! z{ZZYJc6Q^2O@)QUS1(__lbv%RD=RE46iM_s0_?-ntbfG9{guei@Q|smqis;FVhVt3 zUf~c46T4cP5xMCigu?J~EnA^K7Uip}tN;A-&rTdafd%N35|dth=|!Z!cXLB{JJS`` zmQS(bh$6z^LuG0WMvdM`ArtHmnhI45?l@3Nqc!RbLs;=IAwK?BfAdSE@Biqdk1#5E z{``f30rflYybJq=;_+#l({E#_z-VImGwt+2cz$C;)7i6UzCUy*FE_WZx6j?v1Cj50 zUwC2F>Q(;!0f;U~k5$~Jsz2Q&9vMMPT2zgtEqQvAj<>(a@g3uvygX{HpPL`$*kJ9i zVMtfsTQi{Rg)14?sNXFhVQ(7N->JXK+{)Ia4~Iq=kO3-+Jo~J8G9&d1Ums&1iXZpVxtk5g zXzsncl@%2iFJ45I->`90X68af-O`NeX{OI?hd+QMRJU%lw|5{#bwYe%d|ZNHBFs2{ znPAz9eIl~eydM>$Nzex=m@3N4zW(~_t5>dQHG}gr7X0EDzks!a)%e5@ObI@$McpL@Q%?Ebgkd|TJr{bkm@s35P%0B=#70Ver>seNJ1DSpwm ziS!{miqaZTGf3COC}hFDqNah~CLp|-Ap48J@jWn~gFkEN1Ls|5@4#O!-2L)mUTg1w zo5JPw%?qAiHV+}dQnl{ekKU*E6M_oy`6mnDVx zc;Ep+Cg$_BHtl+qC!NM0_c;T66o{fkIM=owb>yeTJ z%lI~4{RWxj_BrV%riLt`h|tXYCk~&jkxHmibt3;N4a#x6XBvOA6N(Xqeng^+Y#@x- zG1YnY6uZKHs055(^lQG)-=wF_lx7ccKrD+Ao~NP{OBeup(EL8T!hXct>>>00$H6B& z%pW80KMo&gVr^U>A8$`DujHiUXP(`0>(;IB4;{RH^L9sjdrx;yetyBB!-tnIUyh)9 zNG;ZhV&xJFHy-?lG$viMO4l|BpE6LQH>v3)J*w}~YMKUQVIB@h{K9Wc5Py1$kQhrJ z2Rn(c%stt6SgqGK57?QY{|K&&Qtp-(AP-hLun1yY8xQ^ufsacM<1fBZRb5?DTw*ks zU>hYTCu7-7`t;QJi;uy5(=nhOHrabAU6fL1^T(}@KLZGSC&1qc(P!%L;R-A*EB)e& zzudfW16cyrtXcE3pZz=|BZHHA>hM{~AIaaTz{e_TDJdzK0#H>|(OBPj{@l5=)HE!0 z&4M~P$tPTYA1?oomd~l+&t+oz=rbMgDf=*#4Ih;yNoA7F^bc-9Yp{)dnSN}9{=*oZ z`skxSA*V!NzY4i@UU}tZ*b2xsAy)ipk$4BuE?ue*s>FL?J)c5No0V5{V}r(8FeR7P2;oMgJZK|55F)h#8k|~TkuhRTV^1<@^kXCXK`bTTTb(|FT#C{#2j4+Z7cR z-@BK0CBJ4tT-h7j7Ry~6&FvROVnIKE{uHE)k`Vo2LYch^tO^qcX-s!y)V^ZZ$xncP zU>;55p^Az?Wweh34aanQ4*qPQPoG+QkEh4QTZ*tW6L1^F*g=PChx~7#(K1{vxQSsY~_c zxx3%rD5`7g(Hn+5J-v7BdiJ%~UY(bkjy2S1;YPxbs~e_&SeFgg80VhW_RGS*DwLD- zCsBe*Y$ge(%XHC4a4R$Q%)U8>{=@;{Dse+Vgz;~)P}P*4c(Ku>QErqN;9s2BFW z@c;bx|J%#UOK{7M5B|u|kg?x@Nv%X8&;lxnErLtD9vU{Pv_l4?vz?ew+|2)p;E$p{ zKz|3RlQPN2#arH++o~?_8qp8SLX}=igXN)0L`DNPZR5kAv;G12jIx4AnE5-P9w;p- zsjsU;;MMBYs}m9vgtzEhlawEwap*=_>&ID@EuCukBSL&!pIs8UZeEaw9IIH2m%l%x z&qMKNXii3cW)gl^ch{GH`Re4UQxHr{`8@F2fklh?bbH29E6LBa(8u21&&PM;rj5Dx za=&f-7D?H@{q~!bl;nuW2wGu~ZDc}RjK6QYl!vy*pFsN6$o zXx9Od0E-N9tYPXH7#Zb)rC_E2U#QgM*8lj{c<@)L2EP05yN^HqxTm)}I4I<&Z~o-K zf!Dpg5d}lIT9H0Kia%yh1$oGPJ*9PR{VYlb!@!g@3V%+H4t}08q*r!g9!X@V_V93j zasP|HzJCAk5C2e7Qi7QT|M;K(p{u+5?YG~g#2tkFOyh6n`Q+s1q4a?pbYutwK>rRk zmEw)e`XA-9K!iDb zf=sH0DwP%CkD)&iaSlF6GD-UfoO)FKnxcG)%4llvZB>3SP$YL%#JWaDM@DYlvNiio z_J<#QfO#Z+eSPKS0~HljM~@y|vu5?*{q1j-E?dI%0IL%-+rIFcVzc};nhZ5n)p_~3 zSo$_1JUk;kUC@ZcbS9X>PB_OUE9y_{$fwQgpYHCSBS(&W_W7sv^>v7#-;0z?yI&9{ zIdP?7!}=2=?kkqBz`9sf)m5E+y`P-9vwlHbd??u!_LT2}0MRXKAQ=qy%P!Bsp9S>M8I3nfYCb-dUESK{yc|}o&Mb&%YuAi&$EBFioa0V z#5xCDQQ4l3`h~pncdJ`|`|;`9rS(`s4AYl7EOjYJOL*H=w_L@$w}klt9p8WK@(Hl=+#dz-I_d5r69a zVW1ex?;G&;DZm^I@&Q|775y%B?z;pHA}HQ2LBP`khWE= zZyUrac6g3IjW-y!4$?q3wn$eDr>M)w)C3b?=`n#p*@SAXsZqr8d;G z4;Y4qL%bDosWZwVQk3th_~wt&O-56?Dv*~Qv1flMpX^z>H%;`JB7DTKwY9Z=`pKuC z{`u4P_V$R#sJGvIYv-<=-k#o^3R8qXN~-CjkAuCd!WBkyLqkJdeLYgmz_Xd0n2dly zvL;DpZI}KtK_5nWk(&?d&xz6pV`WmQe4wYRucLj)#FF7K8pGWjo|Kxha;?(SoAjMf zhpeoBCRe`(2M3QFJ^H(U{^!=Vwt&FEeS7!4{`vu=PZ7mqM(ZzhrA$I|-fBA#tYE|- zIncleh_j6vHtxwfgm|vhb=p!Q|$+Jv8 z*crwDf%bQz^7DZHG_d7Zvv1$Ndi6?fZeCM!Gjf5T=DIl32p={}_{iT~QCWHI+RdJx zZqlb@@Qi3RT2;SF;p*z^;{#GY0N=Xx3!fWAlYRHzzx>PZfA_oJH#fI9IXg#1N51m% zD}VQ!zgxUysTAuAF}_W!{A0k(k;WjJZ3CCaGps@mT<`Y@i3v9J17s!u=t z#AF&;w{CsL{P{Mh-%z>W7=Q*|zkYpsdIpXMH5wiMV-=9O>!v zbhMz&rrQ2atA3k-`lTLJA3k(A>tYs^JovlgnP(IVmg;woKD;JCP)3!4#o_qqgC?=3 zr|-mxflpwhTuWQNn5;t!a1>^9X) zg23>nMiko|e4D3_-ekI6((wDQFBR1^L%VKSl=!n<%cBFm5RGB`{6$(cUk}&lKp%r? zxV2l=GoZ<@YHn8z1bQlc-4%{b2o9Z-PsDc5Q2mAfr=`39qchq6?V~gI>)K#h`}qev z^URL_`d|Lb_U+r@Rp9+A>*_aNHgg{VTE_0!NMml0H+|1IeX|pkQnnLbYOlAhwKTokMy8;9q+OJx5c9zzR_Sr_|m0|7qMdA zrp=q8A|owdGP6sBLnuuMzWK$e;|~V`9LH&CsVi2lOioF5c5+gy2hl6mXf$_oa;{#z zT6(_}=?E|>OfJJZKd4#U0(c00PzaOSXy{N6X^cc#A`fDgh+K#%c1!S;hbghh-gMC) zAEf^T-iq`QpotJsCZo}WC{(zWo0=N2==Sax_JjlnPldl&C99yJ=c}vLT`Db?AJB}v z{5oTw#^CKP3-OY>AjsUjiFHUs>PgDa59u>?{`U6ue*4XLANK_;gj|hv3ilpTF0xPFW|NOPVN9}XQ znlEljqrqU%3=9ts!M!Du%Y$MQ7H--W9219hRATLU^74be1V-;ppFaJ6{n!5!60Y=6 zZri%;-Jks|E4AeMPp)#-@hvzd!W*|M@S-r>q&&cze^5p}+q1-@W$gD=<6+Z6jjL+ZXX{M)eQq zBXN>AJ4!m#?P~qNu-y=@zz6NA@ZOxbYgN=n8n_;xeKk(}L7(>4_RCi;H8wUaUb>S2r$f*au}Ngr6Vwl) z0_P~unTXW%$`4w**4FmV|MEH7uK@pm=bqoSc=2LkmWl20m*_(Dm^u3J?@hY?qA64l z3?Nz7M}PV#FE0loW5D;)T z=U!V!M{}1-CUHuS4soX8cG7RG(?)~w?8B^DL4KIyoSGc|pB2{ZpQ5%1*IDG9SOgGE zIAm|o?K$`&DHwNck3PtOmR;8H`)@AZxnB>dUYi#CtLIi`#00^eGF$kIL4O|)MSO@4 zvf;J&s4GbLIE6Ks_JPfh*8WJi_8aJ``VpFTVL&858V0WH=@ zUod|@2H}4Bi(jUvr@2TZvrGSTnGuCYkRUEfT%OGOjU0=tYKzxNF+O0wsZ@PAId{=P zi;It2y?PZ|6H=jOjmf~z7=6gCOfF7A`kLP3BHW{^2JIT=+3W1kLLFMuSY z7v@nr$U>Cv^ZcaVGCV}oqs^N51DqxOrxiYOGF-ZR@zSMBTCIN5hK*acZE;t6n2SW1 zOpw1?gXum4JA;eiy4lPI*2^a)wcz8tV<`NT#jQ^tn%M*pqs4;W&nIeDD1v-1? z%=_=ZUtU>(R1&*)?>TVbKm?_appA)*nb^}+f2}1y5*HVlT!Gx>HMKQxPPsTaCnhE# zzd2JIHYER0=OlC}HZUXV{)m3F7JWn=LhzG6_?XZ^PKmOx?uCA_jSGsN5wE6G<{_oRLQxVQdJeV^4N$Usr z{KEa*7shzci}Xy7_Su*bwlyszHV8T1oy=8^C@JbUv>N{YzHxE!TAdbYh2c{!C@jK3 zWJH9wkB^fxUz?Z+hi!`dwIcn^_;b9NN@2p!_*++7clq+AuC6Z1E=`w-B|5zh`J;W{ zvh{?=oZ-T64Ue?8wPfGAg8*kD5xaxgue6B!@Q9O>b4YNYo01kYWOo=mEAe+|XjrA{ zzkB!2d++_>gAYHbuBt{K2J@o!@7w>kzy9@#l`CA`+?c{-rL+zDJ3G4gy9W9y1Cd(9 z#ZlrR^9uEf*p|3^ee4!w(jX!cv4OC4^bd^EwziflSFScTH7;GUWbvZK5-9?=tp=Y_ z7U&X4tMgX?N#vM=&jJ9=6cP2$OwzxWYn59E0-->E|p1jTIevns(+xeqVn3+tN8`_Mw3x0mASY`oG`}#@gh{`7|yH) zGGaeD{6(>6>R@{1A0u;!r$4AnDlGC$=F9FiyFG2st8;h5PEBH5V{A^@6$&uC?1^cfl+E~#z% z-v_T=FRFpwSdtj_tKBP?r$nN=C-Ro|w$EP#R(rU~qXNAVQ_|Ku(52E;H+Ggawg-55 zz~hWOFl+`I(!G#@<1a)j7v#kwT6y(a5A?05h{OllvELb^4@Fur z%}kYnNN&c0;bcaLVa1W78|*2@8T0ePqa1(!fKV7q_>@x#|IwA69{AIQzrCY_ySsAR z_8lu%tU`9Sv**qr)pA{ZU0+Y%k;8{?T))10)yfSUH>YQ$g@;9WdU();S8jia^l|o- zc+B@l4ANkIA7Ykij*p9j)K}r29w-ZR!y+S$s?$#YX`&A?bi}T!ySKWsroXQr{=t~I zSa)|1K`5|e8xsy*Qk?&|{GeItRqKcOB3b0$qos_Pz>XjZM!yE((Fp7s-6jg3ziTO< z(?_4F)Gy=@gHQR^?OPvx{BcoH5u)SQtXsEx&-2K3M;F@Dhxt5rWPKkRwDh5dx-1Lu@MGpHZb zB4)=$CXp)KkT`;YB1{+p9G^+TM`_F@F#{5cXl?ioj!vF_{`jA^b^~EA!so}6qmR|` zM}8zo!vFkV{~LZlM2xLiwfdL8{N?-%G5ig<61_M}p8)-x9PE9RGG8~g(wcw;(a++L zAJYYrHbADR=MsK-~%o+6L4lE)S6EETkw#m_ly-Yvg1~OPOMiP8x zj4}R*;yh*e_{bRfA*AWc*1~@d{#b(IOdu}jFP)i>1gcLH{YPNYLtap`g>T~9HZDJy zl`oOW7c5v1AD6IW+m5pr&gEp^sjRB(XzxH~n0xo`Em^vBgU)#KRaeTNldaT58sy4HTzp!6>Glei>MX+MBod%ApQuL(epf5i5=l&bYo3}SQvhrX@3q|fR7z+ zvHyHeUmXR*ju}n()d|DrFW_Zt0%$A3SGp_V&Re-^IhJF(b?f%+TenL}OFFx|j~qFA zJNr&*YU+|DOP4KMg1pS`N_WesGzTXKd4QXP%t;=uH1z7w=XP|H$O9D4zOIfgLK=q| zq5pKz$7nRPwKl`muG4E{Vxyy@qhzpZ(AT+?Mh!jg1XWP0e3@^;Kk4#KsMqq*6rZp;*|gUw_BRU!z{%R#VedS=QIy zg6RbcO!14135!jXdMIf?+Kd^uZf7U`nauo9KUAnwh9DF%bz$nZZOEjuZC*+W z58FIu;l=v3kYUa`Y><=6`=7svcd>H1d!jEjrEHPGrAFXZJoa& z{Y3$M3h<{Qus?LBZN7dzKz~;^1!jzejk;Q{lI)?$EZ@w|fAor$C7$ko^}(!-&Mm zBM@x5=|cl791%i>b#U4D$xJj~pc8Rp$D=>uW!f`}vRil)<)cGD{2_c?#6KGRXV35- zf`DxlG&|xK`R};l3t*-Ve>*=v|BahAFU(xLb?cUE*REZ-kcAl1j*gCV=g!{Axr0oO zt5>aByKY@_axyY6V?hH<5duyl&JI#<1tz$T@RgsO?HxdVwuv+{mzfTx4}VT(>%zxe zLL_R$1`{DVDmpwO($NW4I2F%aD)IOSSLvyT$d9wLQ>34(r<=63M+0&|T!1s+!JCXZ zDdGM|Ydx9)gYL`{`I!*?;m|>!=d(ZmIqUMJVbk#9rHkMC>6^=!uEe63fb+2WC6K|o z{I$A%0P21L0Xv@AUQ<*3-NA#%%Kgn(--LyRV@QTFl|MQ8$5LbUMTL16&$ZN6>NSI~ zeVv?LJpBCoR<515e6<1rk0ga$cgW#{$g_IzP)>Wy}jT2;~($cy_Pp46IsNa5HVnBE?Hx=ERRkabW7gjrL5e4AtUj1EJrXH8dU$%p#>S}n`w)jtHHK}- z*yHNziYNm&rJHz7*iV|jsG(R?&^UpuObm>y0v<8Mm zU`ALg)?Z9zKqL-ZXAi`{fC$Y}vLbv-5>1*uX08AlZ+bb3qrh3e+=}oCvgKFVm*(J$ zRN+iuM6vjpz4U?ZLXi+SX!ZJKL7s=$hY&I=*gr5P-93;BCS~5djhi-RXJ=nHcm7V! z-Hy)oo40P~=H(&t*zy%CHm={0xhT`i%L|KJVuek7*{rZFC4H2&mRDIZW*2|q7{VwW za{gkTinpiN;zf&GWKy9_q|G_2twDd0$Fqw*lh$wWq;+?7A3b*b;P>CFRK4*D348bK z!Q${}r1%K4sH8=@hT?kADB%*iLKo|CV?n2ew|jkNcwE*DfExn7uC*{ss&6>?X!zx(&^N0>xS zBVxyBVx|>Fe*_)DcDAoSdDUR`L--j#{?zFZbRvomRSW+ruWe6&KEjfH%tW#*0v$sx zm=Y&!8KWM2!1A2RKhQa|yUw3K4<|dyw|UE!_3PGQ<&!DO59sCM z-aU7!uB1SxRwE4yqLtzIRQLA}_Vv2^_<95e3aNetSY!0tkHWWn!18#U`qT22Cqf@f z1T2pyjXx4NmfpYr!3Q54KYl`|)21Y+{OZ@gLf-HPeaho&Uo26w5&A%oWinZGY;15) zFoi0&qgiOHs;V>^jlSN#?j9b<{A>I57t^2B1L~IMCcV)>L?)@{o4wM_Eg?Q3FgOsa z3y2r#J{B6lG8!5r%+?{3jNpC76t`?jG)zI%_KO)7jO9cIT5%KE;fO^0IQ| zPEAcq-@Eq(q@G{4d>KY|(Iib8{$uPD)3B*W*Hzn7Rnd9Bwy#E|??vC)#aZU$z?P#C z>4UwkweQfZZEdZX@87_3D=&i2NGfGZDE)~2X67#|l=bbyIrv0V!7Aj$u=Vx@xs^Zp zdm``x!lzlMo%Kl{Zm&}IA4{@q;teZ2gm9qjGx zJ$C%~f4u*GZB0!`XxQ`5J^#YqyZ@w1 zdQ@smV2BO&^>UN51?njznfZjr*bk)O@cFT&XBQu6U+9{+iME4yjn%?A_#%1C{lOWh z4^}~H=~5lMn*ZJ9g0`N45MPg%*Ux`x?E*h9>eE@^C+HFj`)c$q$p=3Zuh|rTF-^qHJ~+ky2-uWkZKt#!N4uS%4(DN12e+w!Tz;~Dl@VOS2ulkrQpk~T=BRp5_$Us#$4i$iO-e{uvvv*EVZ43&Hu4qJ*VkidX)I2d zbs;MwBLi!LELfNk5)!76%a}KruzVeYd2e(n;inzbS^Fx=0L!bXTftXSd!I}?BK0^3Bn6!)`% z{+QNXUt53hyMsrM9P8}p2n!2;>7|#pY})LuP#C&9^lhD{LA9f+tJE*R*~8tznF66+G`E~Sc`_v_Y2EsDSde|{@-wPZxrh+DKSCdqUf)t# z-q~1d)RX&+rsdH_nPOF)oy`?xVM!^@wA9#?>MsHuhfFZQMjVl~9r3C#xC9Kv{nX%d zr0LhTdI=dkkq|}%^CR*}U$oq2ioX~Wjf{+JZD~d_bWD!MU<<4j z;OrumU}8#eNHB&@1-wN4gOSt#fB!{`7y0@7b#->?40$O>> zZG|dr@6gDQtJE#hD`s){s${=ZiIapR!)(%xTmM+{mX4=DpU3J?U`F6czroxa5$5*e zf`}<@+cN%yJZ;lO9}ayEK1l%=2__ICS&` zY^h%uM9j*{!s0O)2wbszrN6H)E0#znUffy8-zQ1`kr9k5pE`N+U;p+0E3c^V_4C`d zb?d(U`ywMEEe1XUdIXt`T4nb?>Alyuk>?w^YfGo!os`@6jcmw z2fXZDpcq$#dc^DpdWspv+$VxtNTETO1d`x&Mkr>Vvq$k7dv*>!5$4Iz2R!KL=|6h2 z=-`$7#?C&aO#0la)IF=yv929;aTv?Mb7oo0ZvJ9$aeiE=QX%v6bUS#Zpr)nk?vZwM}3CJTaQXY$YNDt1*6lquT}0EYD+sOmGtiZfBQ@{iA?eIg{m;EIS> z1g5$z3(4?-DgbsrM2*Ga@XKRvimd^4O*mY(#}7twL=D5~EZndPe1gcRDSj2_(+(e5 zr93^ou)0)yZ2X!vYs$*XPM$o8&|OR-%P+_+uPDa~LRgbw8hl_KCKZ&aFEz)HI-K~#wkOTs$Iu5pWn{7Z;)}n0{ngj)?Hx#7`TFax!>5e!QW5(nFQ1RWpSRXR zRTzhSx=36WEL`aA;~Nwl{Qe)`Z|~?ha`b4gs#mMgtXj1Sy?0^6aeVq==J|^O)Wu7d zIJ-!ys;jhE%F=!WzVh&hu#EKiK0ZD?=Qv?yfjWoB1Vt>QJyiuDW4P@k^% zO3nGpRj2y3D$_9K{%;>}XzOq8*Q*uIia75i^3;-&5I-yKE$PFEz;28~e#`*qt;y=2 zQT@Qgm!~3QORkv_L74+u>L3rNy=}!|A6EK?|l0(hr7!uD``N04)7Q@`RYiC1aLvwfc#r&$o2)|XX(Ns*@ zP$jTtpI|SLuaT4oxsCar`3FEPYDt(v!DVKJgFt3CG`&C@x6dhQGiz!1wK@2V4l_+3 z%q8yW*PP5Q`x-27>XAuY_N`BUb>sYq058ncehT?(Zyy!p{mO<6FQxpW6Su3|x-aEc zb@r(TH2Te%@!swV@^dlCos&;iaUWNIv4pf*uP?1@`zkB%a(-oNx7yChDJmxRx#xF1 zx9fRC;JPYY9awHmTd|*c9kZSGomRGB|3&}mW7>DKewZfv9MQ@ay+DgrO~eTZ&>^!T zgl9)_qGHhN{NXWH6(cvj_yBx*ncJUuQGCye@Ht2kC59?pvKs!6hL0>4=y+p8pLYKI z`8%H3apv?HWYTPCz`$*7Lw$Yro$SSnmmp>h4(QOZ5GB_1qXaQCM1M5YhF-0%ZBXAi zIIK6(f`R_7F8&H91#&!3l|D%Qkynt{+}MN}3du={L4iS(@k7|AN`EZO=j$f*R!R^d z2ay52*mPYHymjUC(flRxX1p?g7zY!U|M9_x7Vhoqy>#i)!S4@O*Hj~;-<}sK zRDTiDsA_F1yO&*^e^=Gj3HC|dlo83viAz@ahefiH7!DoOo(%jMlTR~!CN2L^M~Kz^ z?%Qv__~Of!wpM?C|F_=!=}Rxa_UlLW8>WW9eY|w(lIZBDE|Ok5=p{e@0HvF& zkQU})`T^r5_%Bn)?M8+zYZfowB;*I-)Fhr;K?F~81{u_FFv_|R`ajPNHsEb$YLC#2tIk^Xr+f6ern zCi!`q;E$Cbv1GHq{X(_C(3DIr5AY96N=(|ab<63Kr*GW6QC(e)SVFaQu#rGrhgkUApXz*WbWGvV4}0Ewt~};xFts7zSInZiNUPJ$AI9y7_EQMW~-wOpq7Z3GgqH z%HUpPn80i_2CWT@Zgz*7NmLuLQN_bJ7w7}?o5eX(4P))8XrHqQ@k0AG2OrdY0`$QG zYw#z3f3={ZsZ%a>+_oh7&25XKgZ!`}2XW?U93!8o?>eKYxl?t$sQTMW1qIcuT7${Q*C#V` z(VjiK*RI{*@9!%_VRHJBa8vCUH#&Tp^ru)Z+E2iK5C_&s)R_Jh;XDEQh-=1iE(x|E z<2qN{j9o(E%&rbzUiJW0nbA!+X58nMh`%pN0l~*c<;Lw1YFY&Khq{L&e#W2SHzp1r zfcRI~f%WnKG5Gd&h{g&E3iR>z&PYouE-6Js)va5%FhE^j-_YFLa`WcRwDj~ft5#te zU0i%DoXZFV5U4n9^hfKhYgPBa&9^M_{jqTUHrK#mI^~unkDo> zq#-gh*45T_{cBfiYs=vyha;n+Hg4MBrcm;7%$R;~mdTVpJ`%YM$&|?vhR<_#VrSDqx9RO^}~qWKu>Sc%_~JWFAsEfA!{>04D@slbam+Z)tTF#^$QKBgcyQw zPaM7|z9h+F1+iKE+25}^dHUpMfBp$()9}-Pt1OO z<&{@F+&w?}^y9p|{3}np+N3Y=pQUlhxPhK zhXEe1KPfU+P=u3~Poz4Be!zI!_un77apQV-SC7I~fpFm$G z`ue`wK5aLcWY!N%9ghs^2O3nhI+IT7h@}O%{uPV;c>2t2{bgDW=rQ~S6-Q_Mf}r>h zA6x*Z^NLj~RxV$Wn4FAZQKrB_5mMl@Q9fZcqIE{O@QZxP3l}V8t3yLE%;^V_1QWDR zutduJ5-cF`K3XoMKTAtXd-JD1S-f-+rtfftJ7e~(z`_aQKT-XFDi9YJw{PEGX1n4uU)8D?|@ZF{Sf~sb?k=LZh9@vx_734!c<)@mzkY_JfIl_~b zGM7J}yL+v$wz#(Sk4LVz_YJ(XHX}07+lkHdn3KHJep_k(f*gkT&4seZp;acNVw5lf-|R^e4T`{mNV^ zJ|X`P%RD&B4nZ%of-wZSPT-e`rDnd4c@kbr*0-cq0XOKLz;VGj!mqJkexJnyvbl5g zF#XYH4fqTUg9dnlSvOgJZ zHD9}O6)S^0^UU^DD^|tEMZ3Bpa@pKJ7tysI{>FZNUtwE+ai>XZBB=wVjYeIw38#)y zN2e4&2PsWZnjHQ0I&E!j9o93kcXW)5ijIkil}NZ-dB*8)1^IlU^26}gYBiYFjbO$r zm#<(M?iDLny!z^^utX8{r*3W4R8=DP1+&Re=U6%uSZI3vKv99NYpaVN+{)IM9}*4P zEPv_LiuDWbs%_i17Z#Nq`u^bk`{ifOoWaswiO8mcY)WE*CMTajb1dc}xQF5I=(>Op=@l|B!}A2NVR#1$1)-+lWH ze9E=8HJGXG9~gl2l)w1J&*S3ak&Rujs~*J1`tpPLXsuC$ZZ1&8AM^vO&J>T0U~0Wd zZyFk6vcWah1M)mA^qHu9!m<-o5O5@ufcQ8L`wfrT1pW+R0F^;%z5$b`Og~VmrnCN9 z8NMh#v}eL$W%wkQPhS7Sxs3cpOP6}X5_{&EXD?p7h)j3L+11nCjd8)8yE(^?o!GEp z-Igs|v9gGlm$zl)vMu0mQD1~w^QiU<>pnC$wNzGBA!Zp~^3=3cu|1m84_v?>(C0rQ zpCfidh$#Bt!w-%gKdv6s#Kp$`<~M(jU|v{00w9qgytSapKi1NoUGl^6$JjHnlh@VO zA>^o`qy6-q`*A_u%hRId6w&X17E`c*nKy){0)mR@xloHLZlnGI(uS;UVyw56_rv42yZZ)zzH@nOh%W?{*;*`2X-+=H`fD(nnmScy?v#CZ zIlru-Lu)X&d3a)c_Ki1wf^4y#-rkfu1-kG-eP~t@HrhWj>m~A@k}iKhpHC0|q&rDT zvbKYN;)&6Rx`wr?5Y0SH;gKkqpL!ZlDX)^Sm5dM0-p|q^*i!Z;pc=3{P$b^|7KYimTD^{$ON~LI_htz|^1A}(M zCU6KQ(tqDs=!Pp5G1T%@p$={(NV_$n)e|Pr~ z>}S+3ngvKkF^&y7eOp6aoLVDMxC)~JkIQ4_w0_1jidT*uEr#AeB;FDA)-4S zt0Tk1-hTV77himl*OSruBGenYFh%={05CiO>IuRJ79Jj+tJkc}FDSs8y7%kaFWjpN z5A=x%@}}@j%7-aE224ite%a>WX*9+@SrlEy#A#d$iyev6VA#p+*4H4x1Q)1B5%U=kf%*AnOQiLZa z*t$wj-YjY9Qh$Eou1074#jfS?VSX|!LOv&-V*MR54fhP_itCyVT`4}3bH7tHh=wvT zA#T%_O$T0mEg>n9rv@UKnVtPRplw!PT%S`}1jRNz`Wa9$f0Vv~|H3BVAfECDVFub4 z9-}IJmh`n)bX;Pk=Rc#A!F7%+*W~<{y)QgNFR&p*bCJvkfR8&gp@mT$N=E#M)!;(9LS39cY%(|?h7>s^Yr=%=ju_7}wGj(1{P;iJ$DuZX%TJ*OY8ZiwRhIA%savA+umyCvZ z?XZGazaH*pJ0CNbCdOZcjCFT)VXo7FS{)P=gvHjB?jAxno7ik+`FRZenGn(sFUjQO z^U1=;{5YiHKK%WmbLY?Lw1Zf4{J?9ku35WQDw8nA*-`3bDQ0=YE~7ltC@CAhr&2pe zW%gLIk9u|jE3G9z0ytnW&HBN~#Tjd?Z{51BxuvbXp&o1ZMMg!gTDb}-4h6%J3Oeol z#eBQ)#3Zb#(pY)Fx4m`PG^FtI42p^kib=o{WRKTxkC7jkcm{)h*o5fHZ>upsja&UsM?M)6H@-; zldLu)GrPO1PmFhh%$d*E8Lf{vnr{6$e)xFO!JZ}<3ywfiN#nBLtSkSVW1L?$MIRtD z8|?>6dd?{R#6oy5AVp7k`(>7Y1n@>gMgQz)?{40->Bfy4H*ej_FUUtir;3X5#(!_P zbn)WS#Y?cjDWXZR?w?#Cr?o~HOKiM-hn1oo)L@zMuFiHBXP2bJ1Ptvnxth}tyn2Zy z8&g|9V*g+fv!0&g$Bupd_19?Def|CRzqo(jzWp2!Ny1azzQeGIj*7&}mJp}H{Jd+$ z)mXdF*F)i{kTG3B#A8HY^kB3Qnjvb*Xvh=S;6;W^Qr+S01XnX;Khu43B;#!Ygc}5h zIz;RxuEOWwPb+;eE33Sz>)`dmtA$lMlQA_a=(Wv@mL)|>;Zx>pVZX$fzYhM!1pBZOeztfXhqD_#9127o zA_yr?fl^O~K74IfMqN%-5gmcZIHe%}@!&X~5qM9|zRpQAtn_jNLt*7cQvp7Y`YYU@V5FaL;bYq;F|d-N{x&$03a} zw#ADVr6eV-U%%mQZqAh}SCB%trKKe&C#STe`24wZ@G`7fy=GzN!oUE3iBv|@jX|a< z(x2lfG`qs+A;X$Cz(5s@qEbzQznCZo{OjxMhfT(i;NbA^2$_W9>_*u=d-*%v@-r4b zJp9egt#F+j{Qgi|OIu`gB*NG+2mzT9>XZG5#Me(28fs{$8`5bRyGVslrE_$Yhlfjj zec*E$tyN>;6HA!-Wt`?UgZLzFpSC2sn`{#F4xoYe z9w6bpE0_WbRk%Mg-zxwlNCIR51laXR)N}dbMMgwMX2y$*@Yug^KR&daJn>!bt((V= z9!I?0=-3z;3qrSa_}kjM1qM2Mc_Y9JhPP6M93hqY5__upgZ0~e=!1!+T&0yM6^Po5 z<@0ECR2@cr7*$n{F0iT#kRJ&?v1EDkchWFfSy}n(fB)6ht5=|FQj(M2dHbETj0}ko z4|loa&)71f*COummhhYotD*DJ#@*dqzdm{l`Jlf3>g(R#UL-JFyKcQ&rNYeV zarHlwvFQeTANgEv@`ElEol9p&=h?Goj~+dmpO@P|Fi7M|Nj?1h;ceTtvN+T5dSml){v&VKhu%OUsde_~NBYt5>f^D1bE?YXXCUlu9|0m(o~%8Pf-hgqp3Y zs2Ug=baHe;8W^ZtCPj-TKZ1-tZSc{54e5rmva;TL?>!7?9W?4^pLyo>*WW-~5msYS zU7+*S5fFh94n$N-rXV_ghax$2+_ zurtU2=BISRPtj0N4WbVlDr4O(S`XC^{TJ)62m&_R;hdgi&5NB{;X?$8I*Uag!=$OP zqyOlY;_t6l_73X9{al~hxN76-P-m?YqoE%rf3Y+r#Lw-mooNUo{$W;LRTG@_Yx{@B z`gV@&%ZPE-s%Y^FvE&CwAIRdk!8kB7cB`uSL{3?DMPo4=S5aj?ASzpUH0==^a8k)Z7u(Fi`NOil}dQcF#rnPz2i zEGkrdnzP~&SMLl{@zRWX;gCZR*)E=oW#}$F%-~}u3IhX3g)9J{@LEj#&G4tjCyYAX z#PBdyvrDkjO{LVgx9V@#8^`tZer_{jl$e?rA8&6T@9MOPjGDrHl=Zc7@v+gd(Hquf zUc7wiTK2W_vhtSZmI@eMsw$DwFLT3&%=PP|qhox1eH|RN@ERcUJSu%`C3f~&xvfez z)yHrHAR-d}+2WSeK`vEDnA|O#{-!CtUJu7ogp0Pbllb}j`}+AxWl{k?LmEG#uq+%t z17rpxoGl4|nFP+N|Ic(yX-pQ5|Kru^$)Wu3_ypO{Ekwd##G z-q^5l6D+49g;#)l&R>4SO3mEQEk8){8XX<|+Usv9RO+KgzpkvPgy-_e$jFdxc+HwM zo?f1m2bs1X5Pc9+zOTQ(wyOG6)@da0tgov_=F+I>=*-OZhYlV}O;6L#Nae8v`uQIE z+iIlRRR48wPcCfD?H%bd*_a&V&LM7*YXa7LYQ2Hda&Euun-YdJ@b9Dy6Vql4p)?K|Fn=bg|niYUTbh|p{p!MF%Mh5b7wFMfW0 zd-m+9udmBGot0bD{B2H|m$L&>nPELH2tl?G{3in_YY~hpbdiVw+XzTSK3mwx9htQn zvM19YE6OQHzqI&_tsW?4og)dUb!t^m3ZJIj=zR4~IL)j&gic`GL^~Zd5~~ z`o{MDYo!fvQZ8y}ot(1w^AAi*Pdj+<;HFKR5CB$GjJ*9W>+v&F@M6Q7-t!UilffU_ zk<=uVBI|#dB|*SURFq5CzX)b!P6_e#oM>eCFpm)#lW`wf+FXhwEfA5PuzOStm7`~w zkqfuX@LAOb_~f-L+!3F6Z1^+KSQPv@eBRIy)%?gH3w9X8|Hw zCnP4NB(F|bl^78f;q2%lm4R80M1NabnVU-K=V0j5n?`{Kb+trsJA0|CLgnXZ?+Du& zyS701=*6)@xvsVzE4<)}jbs$=u5O|kbP?&#@m~!2B*F-^SW^6Tx{<4wuYUaTM^%*- zUS8gNcJF!dg%`rY!&z2wjuib$Rchz7H3-X~%g-HaX`0fH+aVgaZ-7HuhEqzKM6}SY zX!;hSSuXSkYJ?(5 z6hE4Q7`sUKmNEVuUHTOTfL)H+NtrnWV81(?IkLbzitb=4UH>P{6YE z0ckt?b*FAs!Bx4fZz#aa<>30*gPHMx9xmLbY^A?SAv?G}-bthQ{Bq&d;@e0`_xqFA zy9b8%WJE^?c&HJ|@&_ZI6Gmfu&u~F)^V$5W?6Stz-VrR^kBg7nvIUE=x5UK8s#O{` zWadUFYyZM@oA5Jt|H8)Zv&QG39SAqmzWM~mhcrE7D6&cjRp7fBjK)o%Ohx%cIuws- z_QCJceNyeD;8{8L%xw55D^#6^RMSsd3O<9gi1;)3ron=Oj-y|W*4H6V8r4>zRCxKw zy?u-ZL`OxfVQytKV6{beXs1%yV>vU3!cdz@AEi=(%+W!?foZ9!)m1gQdAD+|XICO? zTUB*KLnDmK;o;$H)~fn!!jpgO%e)!Rc1%*W#jTRnx&pr1n;?~O$6+s{X?Kvsro}O--w`szn#=F|^ zCBq(OWlwKqV1Pse3mvD^yy=hjYBcf~W{93aV=!8q^Pu+2-Y{?Yg!97m1Byd#+}+*L z=or{0rD@3q9~Y8PJWbH$I#U&a+Uf{Wm#`W`_!b- z!PUh#EGjrY0mkJy^}|yj|0dJaojbR`_~MIij(;;aG=%u_ufF;!0%>`;xl-a5zA?To zRR6F?NgAI5{eTZh0seu9o_WUA-BqjAUb=LtsIXvcbfmw3;K0Fy_+m#%{Fv(JwH9f$ z;PxdpgXO57Ck@8l{=U52{8OjCzk2m@ZCxEg$Hd3S?cTE+2Ibh8co$b^F(2$Qz~9zJ zCDjBwYJwbtA%$d37REnZBB!K1KfWcDT&>D>e{P zkc_>H#9xednf%bYOZKjr<6F*6^ZTD}`N5nV{3cx3|aH)pg^>jhO#) zo-zcj`hmA868H!7zXpS;si!&7j~r48h?!WV*ySdc!ZDbv94=-K@0FD@0;xA(bf)!ULI z_GH9`csffF-~qg}(x2wgHd>{8OH#NyvTbNJaM5k*=>7acVc+oRv+EO9hxw|pMx5N~ zNuZxr`A3JM8`D=ecc00tzF1gW-O@cVX%iG2ym8}(?K^j-B&B$HdD2>Z-d@pQsZ|s0 zm~s?bv7jmiJs|FWK>Blj^a1rqGn(zIjC=xRIfNzaUtm_AW}f(NVLt;2QqtI6E?DU1g+G`yt{?B|(RX(mN5^dKB{F9hnTNZ~!C?x} zm>h_3xNNX9&euh5UwD&DhOhupJ9q7>tE(?9ErE?GDl*c|&CS)>1*1kTs?%ukBQ}bh zvwgAhONu|I)4lo!%l;f(-NKU6yn@5VbVG=yEmNtr&Mr!|1{QNdaW4I^eDGhWegGYi z8yXREzW(Z~W5&o@xrA`)zvj0fBf;_(BQMrJR27m=YUT~D_Q;@Kp%YE(v1w?X>7Q7 z`O4{2C-d_Q5d*~C%`GJ*1*_yR4E6Ex#d2(PmXF!L;4_+OYGTracvKQ83_60^d@TKd z<^K?gmDPUf`ytI~prxn*qW@S~_%o~pnsW{Efbowo6=BaXPUDHEWcXRDTwYPp-Pws@ zURi1JjT<>@)~?G)Pm73%@bdCfBc~rC9X)CJv@x0xwWGYe0xB{zC^!~5Ey$&s3)f=F z51+^^o_sDbd?YcueY@_Xk3anOyOTPd4vxC`h`xyo^bQ=8AE5rh0#<)N|4m!AmY0{G zId`tGwka#GGQiu#&lNNgg`Q~-LGO^vnM~B#tZ08=2A z=nqjw@C>q-Fk1r^CZ%SDZwdMsZKnEkW9Rd0K0cFQai?9YQfy8PJ+v-1#@|DN;Tidu zV_a{gzaXDVximS_U!|05l!_BK%GBOJKx``%r3p%J2Zx1{j1|*ckDo#+wE|aQ6Xx-SvxP<_{98%MH>GsJNR6d<~@E} z4E$kM=I`gTHB!N(%Gn;rOdqqsDsaU`x=u3@(f+|M@M3~`=U1kmrw156S&zUv3Y27O zo|zvBmiT7@_;}r-;t%+`($e9gT+_rjqXM)jIxi&bGfWQkOG6?x-kzg%wUYz=@B>BM zTdBrD9TVr2o-X(HhUJLR!yo%$2Xw;egXt~&(O_BjaQBFfjzM(g{DOkQ{JgUA%KC=- z^XD#9R90NMawREgHU7oM#rgUAA;GlJD-%!N~B89v-(5RedNroO)3#>U%Ue|0n@G-Um{ z^>EH6<-t`5S5yqghsytg=(Bk6fwCNR@bR^o@|`9zYjj+{->>~rvz$T(&iedqmao4)sv8`B=D9=ZY3WW*EP>~Wm4D*+J?+HQ7O_aXhmA$J4rTUFUFX*GSjIrvs846c;^ouP`x12WiR`M>^V&LJ8t8`Y*Oz z0_ukn8qrr`{1Tn1p0ruvGa^`qK10J}S4-+YIag3v+oDm)Hz$U@xFs)vIk*cn;sq<`pt!`{$a74c`A=JYO@gJ}~Rq_v;a{tI^ zX=CTLlDf+!4W*48hDlp2)7g-@Ve8f{Dak2b-riCPC8!s-71+Not^S-(|3$=v$dTG) z$k90+h<|jK$tMnkA|eMYOn+uSVz8+R%-+oBbU@97<`#qyzd^t3BJKG_u`<*3Ac)je z;Fs44+MjBMA6_$l3ul&rPvFFjy_Qbsz;f_)Wu?fL#-XC3LYLJJ!-X zT3Z8aokXdW1q3@MCTU_~B@QqYKAb+l6dkaypTC>CJA%$^+PDF}1J|xygS$g*U43^) zS7}-4rOTJmLt~t}CL`T1Adm%spCA2gZR`~Yelfc}KPr7pCR0mGGe*fU3i$c^#>d7v zIXMxz#ch%3FM?-mWha*9?~=iX+gx)?%cp<()5#MjMn-k#0TcFhFX2|9RvZl-?~NS2&dp_05jX~{NS@v z^!i7~9})fhe0|}tTvJ!yck*Oj{;lK3zX=Tr2?`BHCrmGRJos$A92z8zKnbAb^aHEB zh#)&5Odk(E@YL&c9d{c0JK7E7<4TRzBQVI#$4|n-q&z-+LU3AM7}A`;kB5J6Z!bb) zfA!UuRn?U)PR`Fi|NM{Md@DRG455VC8)v-e@#w>#5gBG~=JRDsAC9dk&H}!WMtsIk zO-*xfbaHod{p|BE5ODv*$!~l5dUOLr8@Fu2H$2hA`snQouU;nfnb7MI?goh*&z(J6 zQCWr0NJtg6b?fGxyLRmYORWF^KmbWZK~!Vu20m5NM-)z@ncQ6<{#akzKh|5=mRHbn zvs>3;oHEFzDu2g-6#um`9`P!fW-;V{PX3xJ@kHrQLof_2nF7R~*M45(ljVUwXaCb6 z|0D)0oBpEwz*&KBBuAnw;gAXX53GGn%O?WCd$@Z#JG(?ghOb}09^N50ufu)$dSz8L zT$tfi0A~>dn#4*(1iOojjFO>qWF%X9{m|FjhqSsw!#Woi7og;z)d*Z%+48w`?Mttp zfI<1wPd-J!6D&M>?z!g<9XjOg?KPX9LMvH%{yzTvT|k}f7KA^{y+~Gx&~`}hj>$(u zTj%ksCBdG~Yhr`sQV9H%9Yt71hXhiQR>vFghb#O5Yaz&FiSCNlWwNVOfHV%qLU@3c zrX3CF1;exefDiAj@QJREM<2c3kXPIC*`>m~nr2MU*2DzDrkoNUpyq2D9vlAC%3rwf zh5ET2R>ZqGsJ^&ToL||TUD^P%a{ut?zBREvE)HlNPmO$%FHx`VQc>;cyz1iGmaf4O zrAm{zF=OBU1MAnW!wg=nR%6*NYs1visWn^s7fa25N&P`>(l7n7jh!%3lL8R+Co8x} z^rz`P+nC1Ts6bou1CE4PLcmlkh&{uR-4+Is!j1`vxl;Uj@iFK&d{ks#Y^n5g-9<`> z1s@eYfg~7!O}l9{EQG&}twIj`p#`W@V@yIt=v8*M617?z9qXK$X6Wr3*A3Y#m2y`% z7?ka0GQQ%QBlbZ0aMa0j*~in%!_6%^CU)b74Og#SJ$vq4SxISAQ*(Y^US)Yjc6JVy z*WngS%>I79YUb%MPx!ppW6}qyqU-AG5d;IMh6V@wzypzcP%bk47n{FJ1b@n=v!mlE z@^c+K3I_+IOMd?F;XQlzxVgA-kp+*Y#diVii{$6Q{GCL=*6Y{%Z)BUsMxf0wGP8vj z?66VaP}hI!h9)vnqII;hGiwIIgSRCC?8D$==mLC-96 zN%+pGR3Sv&qr#s;?#%Il?yiB(jZ`Bu5&Xrzmy;I1qF69OF9H7e zxEK=|rF~hgRI9)I>~k0+E}TCiI=X$wHaNi{^vyK+Sc~J00t9_%|FQ)56JH<3 zUj#_$>+Q|U&-?D1Z!TQC)ZW&H_6X;_-Fx=z+q*YBJOWud%>z(#?H-N46O-d*okeGA zzHRAk95+s&joRAUw+`IajSnj%$|(03d~OxUV)6D%LPW5a4}72kWZ3Y9a|vhI1PoV- z`~YD=eXLCRe>(6dsV4g4*D62L4V|^9Y5BzR3s+Y+2PdcC;9vyXEh^k_@#3Xhxi=dd zZo{%%TT^}Y+O;*=Yqo6Kl#rMh7#!r{=*-MvOV>YQB#1;Q)s@wg27|w^UuamERIaeL zFQyooawHMIFMn}wbaeFOsZ+oE-S2AZYPDL2J$v@P_|l630f8*%A+-|vV?cxh+ASS_ z`K!$x5new1`X$kySfJ(?;J16%Zg@(aK6R?Ft}QFC%HP8!#0&Wns6U3~gB*_8$|3Xo znmQvszeWY{pQbBx4SQx2Awx8JY&sUh2;(*@$_8=FPL2Ck_>W1Su?a&_UCW=&7G#$+ zU~Ts5NdMJO;jz*2$pdR* zg1wyWCH5;_{*9)okx_kRQ&(1g)tQ^s^=;ioTl?V9uq~T5KX>@K#MP@Ev|4)@7D(HW z9$I4kLyCjxg{N|Si%PNDL5D&=vMSO!sY1R9N|7!Kf77=G!dQ$xWISTn5K?9wxaoZE z`5VV>Mq&26fIUZ;t8?NY13eQyj_F1C^axEa+~*jG^?yA00tHzwBfj6l@EsGA+m&k5 z=m_XVRim1)Nvd3>jEs^vAzHD6#L-1bMrYWXDewgjM8xQU2hc|>#^{TvxpqLD7ZMug?&2n{m_rpA{*MQLPWiDQ{!b7-;)Zp0cOU=en-4$wsHM5Z z#l`idmtKZ1Cv2u{49ePwC^HLcU-O}lVMy0^O z+0-~TJPb3Iv!{1ZY(iL4va^R5g{hgh{z3e~zV^2E#=8FQ&Z)^sjia+?V2FD_fLy7v zto)CSjn?Gn6`ecX*V%5IL{d<~Q9m@SAJN%JC82SNw7ktsj(Ow1c>D!Npd65N?xPPr zLX3FewsqT%H(z@rHYNr(Wy0U8A7(VI`{`%6qWcF1zWDqLFfn}g`Df(ecH;)j$_TZ* zf8T+ipg=o&_RXK37nH?A``^3T7kjmZ`^S0m*Dx_rUQw2nb>{4uvn7ZtHLQbU@`lWf zd-m=^dLN|nkRp`_@DqBn$JIaGBVD(ea_)53O&Iw~BY-vzj~XgF3w@meeH{XvmD4`a zPrZCn`xAtQ2uss>wyhxf5k-EM^jh(sfB$7c{mtvGu&Al=PJ3%xPIh);Vj@QK7}Cea#=2r*3Iv^~Droq{?Q84I&9<3|X6L6&1snu2MtIm-~EYS<^dbT)2JVv9MB;;hsb&}E;HNj($OCT@elBS z;f3d`YiiD(J#+KM&0qfVmw*4?{vONZxqPz<&=23H<#R6j7{>L@RTcT?PPfnsvMgg&$Vnx@(sYKt$PX|1gp8y-R+b-7C8=Is}? zW?e*bx|}Nk^K-M+z`Wqkz#oAx>I!d}ZOV8Y8*I(3b=8gqUS0t~8YdU?t8lPT_=KHB z^*?aS%gy`blTWg9uEDQi`}XbczVmiUYKls!6!5g_hZ+2R0R55c#@okx-@d)hE-vT- zE}XxRpP%2?-`CUA^V(~#hJ}aY`wEA|3HxCA7l@DDlcv8;H+12``OiLst^8I;dpkZh zAl}6@&pxwh)8^3N5RFzNd|hM1kO$C56sPH$;b>0zZ`ZZf_f(A=$Js0hG-FV0O+#aY zw|i@PMmn98PKXgD0$kMb&y%M=P1b3iO}c~)7U=-nN|7HCXJXes*f3Ysa2&?>1 zBbshgbIT_vhMayuK|ww~-pMJ++qTsgD?COJ zbD88^+#U*_wFv%dbJ>TF-{5RpTT|27*{LM=mX5p%s!1$oc{cA28iL$&#mwuMjxZm)X?5{^h(LO+#21;Sagu* zo4ZoBr-nOeu$qB%gq8mDlurr;qgJht4{_0`oYbo0*NPk4d%wC=)ZMRpV`o}=bby3= zimWvGAD@^ks&D)JLP2(U8VXEk%EEsXOBxp&+8e zc*$AHFcW@6l<0Ie>Z|}g#j!Licy@gn5COm+D@E?ScWoAdPcRn`e|x3E`^8s`6NaJO z8#d!(_*QBsRjR_nJ@!AN4i6VoX%Pxknc4NDQ-0||^r2_&#UC?mED8?Mguu9*o|?LK z%N8WnMPz{5+FGQ;!gv(!Z0FCNM~Q(bllnGAP(%*RFjr27cu!>SIVAT)zkxxPB?x7D{(c!bUZQE8vuGeZcr=aj_ zYL6T_GCDH)_Pg&yM!+9R?8Le3FA%=)-WjidFn{mYzGeWRLjp3F{7)DR^>y{%eDlp0 zpMQZRH}JkkVyG=!x4ihmiy0XiF0L*@)QfxC?>yn-&2!>EVi?xxhxk4ErEZ)3o0=NZ z4~xgUSIco6G3`zKI0eEG_;qesgs%Gwc)qOGkkzu@x4OB*+D+P!mk{Hk~) zF_uWkRfP*U4#d8K!=~TIp?`n>0Q^)&$40%qyrQF`oE)7k3!h;*hx|-q|9JR6Dfq}S zQ(aU2hd=z`@}rMwqrUWo@HP3e5D{t=IeMJ>$VCq0B< z0f7N8z4%gfZS}dVbGIt)e3M=3>7ohpWL-Z7<$QdL$4pqyO&v1+vmZ)p2J+ByT-xB1 zNA#t;d}pR7o-+6E{AmV=id*3`a?PJUh-}c>GXx%;xL(mQFcjqN{KCf7yV9az7=`l@ zHY@!XCZBe;8l@~T%vYn4X%zC$E)}$ayg6k9!(%_*w{}f*fQo{OFeR`;6v1NS1pmxx%NlAU_rI)sE+wSY@BSc1JqQZpbDc5g;%6}5$Pg*n}>OfMF;;}$` z+Cfy8g8tJpQoNCD)m&q9iwi%VffOqtVrM=Pu;n;Y6XVsPc?(nc0ssb|cL3x>jiW_? zzu5S5_}Y+=fVbZrN=X@OZn2p($~@gQ(b3wl2z!;9SC&+kL`j88Bp z2COn5HH3P>wl&n-qwDQ928F<^%&q}Fks0DSO7iw=oHVx9*S3}B zUwdm)Wrdf2u+|N^zXj~3cOu9I@fYC&j1!ZL{(Q9=Ar9*@8uTRYjg3DheBp6R=m*2( zL}gXw2OoZj;0C%uUEHepS6+E#?b@|kwN_xaRX;qif1FePp&YPo8UnA7%MrBkyYEi4 zw6=Ww@kel5ehY5kNy$oul7+DmIlB(4*&FJ_LHEe1|^g-W5ITCC%a*bN5C3Qe8 znE{(I{z0>#mVrlb?~&TC1=|NJNjaL8k;o(x*thpfx1J#PSZRM|-zesd} z>@vUo^>5+dqZ`tp7yHFu{(SxVOgRfn&58-?4OFAvQhz z(hS)rBqYA}%4^NdEj5*u7Ygg50=yhEl+F%FrNG3Cjc-wyN(;|Y@5{b}(gk)6{TF#2 z(Fs|bsh?&K^ZuRgp?~KvsGp~&XN{k&@E=N_Nt3Cid+_MBk}ofnwD%7Bx;Z|-A@RVv zIB*K$Y^6V!IHnsHCZ95ieT1*a>$_7NHL@=*l~gx%T`H;{L#`2B(&p9S?pmb{Ekj(^ z@{iH8ZeqNozV+Me@~qsd#`b=Ml#Ggr*|~G)fqnZDRwp^YK~2zif*LS)S-kyDk1*Id zYt=#8 zvUN$+Dwab@sL&GNj|2$r9v&MqH^j!o?%c5h0hcdaxR95d+uhT9>EgxGk`e?BNJ&ZE zyk+z1#3WaD7bHOA942Z#Hh%|)2FglH2m1#6{QW{h!rVRG$*#dRi@@iSAn28)=kH_F zXHNWKSgES2`u%(FoyyA6>&I3num0&ze+uirTq;H#5=baKEeI2K{5t*4{JU@anuEVn zrg7x?zH((CKiAORW$5dLO@R!epe;5#J6ow#9vJMBu~z95Ach!T2>fXb2_8G+m+18I z@ppA~edgI`3knM%GYDlLq6YfsHSL8yjWPNE1O;r@)#? zBf=JQay$foqhVs8yJLKK1P`+DEVE7l6?hQq^@F`VBO}8aS2rd^j0jwS&2(5GeN-Ap zxmu;`@8tv~6bbZ{jlHb`>ld6HmWlqv6bp{1AAR`AH^-0l_VvWY#=iaLTNq@xxeCg` zjQ(HS?$;rv??jH7h^`9Ac zCJ7eQ|2|s35cjBo(H^J(GNrP1kCCxjp$&0~bXB|ALI;9&Oa*ZM8mA`53}gNJKHb=$ zLaK66yK1Cbi7gG8ICiW!`{7U0@65mDLjO7S17fz4CSe0nCONZl=QZSti~m0D?TZ-6 z`S?`uce*m>dd-wg%kh^%<=})jiSJp~^1o#CnU*V&F5-R`eK3ATMk6T0kkC*>Q9zV{ z3zsfjyK=3$wI%OX9#*IzR{`QGY}&MG{rdG@US9abXckxDK!hvqXTe7qx;{g{@k4$I z3c0YTsI{$CCX=mN6(1ZFwA|?PVEl!;@ft2w`-LsO=}yy^Uwm=mO(I{#{Q~&=MCd~}^NsUG#2b5sQobQGv!uABr>ncUW8iFlRhX}9 zN`${cCYc`Jf_&T#!n|H+pe}AWggBe~FX0wRI81S%J(-!QICJ>`5c+y73bYmeJn3Vy zF?9`)BkGqIitlvwdAT?o-k9+G#soh%2V}MZd9Cz+9Ql;m+6B5fA?=~FM)T3R+``({ zo8`BMNA=x0U|%KDGa@fJ{h3*L27e&};_!pv z#1WcVfUbyW3j0|*@g9>U{@~2V=^K~0;Z?l!%mQ>pgdyx_?ZkWcg}>PN3-FOhUa7WM zsD%b2)`_7d;y4R&p|0XR%is@3PA^XnH#av#Uf!@_!}aUePk#S>NpW$1fB((A+_LiW z3l}e}&&=GjYgY^sfVjBG6>`|4MPwh5{xF}xoRL>pfV#svfIw_WDk#ESbop5#{!)D& zkv?3UiP1CUA7jwA*48h-{NmKflRBLa{QAj{e}WvT8a3=eBJr@N$3z(s_Oo{4y@kk+ z&6J_Puk*WayHB4qbavU8CddH~Dd%8QfXA;|ZKriq`1m?yZgO6`PU7gm@unBez+Xi1 z$?z8*J#ley=(H-zD_dKePM$o83D^tIzo1g9%)J(;%>C#Cvyoh(LOwkNlfh^c8(Egf zs)CkmD_1CG3I)o{hyE~=8L@#)j6P(V##;dpsK9yIXasE;=`15ZuD(8={(*ztU6bSE z;y@cn+p0AVUO{0l9=?k%Kl6}J80)cg_v@oaj~zb-r_|8U&=+2QY45(hh>#;%42eWb z(7&uu{lKa7VEQN&ipYqlpZwX6q3}QW;Dd_tip!TTj|?N;-PrbR+Yo;l0SfOY|MP** z_+wH1W15Vp4OrJR+|k^BdvbDu+7W_ENmMc332{D&TA70=HiCY`0)gg%+c~$dly?@78g$6D z73dnaF?f4~Tdb140`iv6_X5cm6@N?9hp3G|hBJPcUkuk^LfzOc-tcEO|HU64ii`k$ zmeHTH)T0%DOY@g8iR6bQN^Hf#fmMEp0<4jVJK=<%&P5+*Cnwk?u>=r7fr@q%etY7? zjT_f{y1UEE%MkDG>XmD$sY(0xA3#<=R~J{cM#Cdxm|ycy_;a?e-kzQ_XR;j9TIywU2Y{Z4LM}tq$_(so*FogZAop_JEZZ7)FiN6S)<1E6M1=zy)W5CnX-E%rC z>)UURx3;#pySpRU*Zu)3g6Smd)Mw=W#wfTFI_CGX}Mfn zAK>9c)-+m&$2M3;sD}c>(J7;gV(8)`i+(|6XaYlbxJdEdjCyva@psAW>|qpT zKDG=z3R>ack3OLG(8zdpX~UNni)&lETs5klsgciS#s_=3Nm*t&EBzl|elRogc5&Fh zF2==C`G@assjgHqecYk;`_hLa^XTJ`M znKuwfOJKqv9O=D6YsG{XTxVS7qshx=?|%e0^$82$6*=;dVz=-pz!xG zsA3sm&v(N6%uk4gX2CbtiP{P^7y+!M;PW1Z)mfm+EHa@MR6;~;;rLHKE6V+ohi_|# zk)@N9qk}_SKtMoBYI0s~KJ3eI>TGIi#$Xh=5pLbMk)Dx}mXWb4F3#WIpFXGCQRn?= z{2kNl;dNVET@5n_68lC(L~=dCNFma8`OrsT_q^nDvG{8tcLxUr zz5LS4TeodxdRF20O{zO5%lxOqrc#;88z{@dOzC3y}(dq2N#wW-107wSa6XezTfHAA5D0kAVfL0fm^;B38y%g>5q5{% zS$gjU-C)1QUTra^Paw!YXln`6&I@~sZwXcpFksiT_P?P|946{aC{`NmZKBebd>6Ku zpHv3Tmi!LomB{KVd?=J0zl!g!|Fu2&xG)r{WB(@VZbz4Jb4_4*RcPLq`=W>+{4t2D zNjt;I@w%Dc=bM&)Mj=KS(+3=o1c-4Canb_{fja!DHT!8c`IiFd(7;~0g_X+)dGs36 zdP^#as)dJl(>Taj$;QS$j(i?MHqKus4+=+Lu_9ke#i&W8>U4U#Iylru*5mx`bKI~P zlv7W_UqXBvbG^S`vS07_qR)SCYO?2OWNV1O&1JE=wB-J= z8_so_flkbuj^~hU{Vu_AvD#6Cn|`gwkOI}IjjrLh^GiSt=IC{W<`aG{zTJrob9K@t z{Mg&qQ8JUV`T#p`%H{{j&JkVw`-YF1_kLAbxo#H}gB=(8_^=cQawtd#C zit|Cv6`YLqzgka`kwu2c4n0;!M`GW78!7TOUU7;;)HzC;nolk44qjGky`2|`jiLJT z<;(Z)vwwtK9BxxMy5MjJ(~_7#Tm0!93G6)ft&J*xlo9BcK)Z z_K)GiRXP{de(Z5~#=c3k3eBitMnFa~YMDwnPbdEQM-mSDoK!&Fu1ChyC*cC*90mJK>nmTTKixca*f)y3z$R}^B(|>Vl zCK?j|Lrkj8eJ4a$3PhXhB}1=93ClL)oZLOH6mI%)<$Aq45Wk~p2m(Jn{RSEWzGb3? z`yR)B8B0S*=7Z&U;?el_K@JWCINh-wkD(zUo`Qmpfm76<@6N=zxKtpxD)TzzFm$3R zKZFrPB_=v%VUboAkYz(*AH+;iQe61vO-7nUQ4UxrVoYL(O8`kR!wSCMbKkTrtq4q% zLt2oK$b;}G!JeKTrQmc%_cst{EQd?HuRp%%(&|UcYxA~*YF;tad(h?BY4K{FAZ{``ZF@Jjbp#=Zs3f3+!PDI_#o&d4X zy0*5#ffd&+I1Je!pf=f~6=LX2b9i4Hi(yz9)@nvN2x9Dgyt)e5p{b)smP!JV?0m9R zQhbD63sRIkaAb(Y`2=`7CGZjIt-|$xP8QBgudcdXuLobMWOpTd6|`6Ap5{t_EB?~{ z_|t9}7aLonEQz|lC=Xl}ot-!%XmB#{ty5*YnZ@{3`R6SvFvMShm>y9F>#84mDp^-Y$ELIOGCnpLKGf5 zS9m=^hM6(O(smwBkn_kzv_1O622 zx}dzDGXMU`8rNtkyYr6lAk^fADc_Y|#>gtV1+LRN*>|>|=Lj!DBGu zcu?XRMVzq2K$yt$+Rf$ZJ|$TojCfZko8SMv+j9`}^0`U2}Um((ny(RYTc9kifSR9|#Wsj;EXk9d}3pB`Gng ztn5)>=$lUX>M31MUYHx+iQ%i~5btwVM5DJ=L+K z9o~MG(vKRqOcLznT9oqA7kdH>i06rgGecszDeby^uc-v6a6=}AqcLFQ zN%S`)pIW`7ifizr^cfTT0@I9*31J~8MS-Rc-T^9d$IHVk)EqkoRqECR(}C+1CtvS4 z`F!#1!2J@t$LkP}JZLc5J^q`Y*`tu{z{j1`2ohps8pq>4S<7V4{Mbh zK*ECcgnpQ?b9NknGYyCwzY6~~mNM~&hK920;qDRnb9E{Teg=Xu_^M8JuWu6}d| zN)3S{@h-o9{Thk^0H4p@zuHzY?fo?RHr-?^{Kw~kzyX;LOpxEfV-BM`=lBXJZSvYN zJ@emRQ#c|34T*hPT9(9FT`}z$w4q~srltX~*-Zeb&zbS$_dEo&Kdw*~GqDLP=(tpg zEBin8f=c1W9}Q@3RBl}t-!5o&}$I??s z#_qTx3xQfl)4GZuB9!;X!TDaZr|T@zgfy8Aj`KNJ`1Q+GZ7w_I@UR0KfFx(ytadm~ zth%bk$NzXG;m9##aJ1oz%tF|0wtW;53YL3QS663M6*w&)kf|3tTcZIFzCKufl5%uJ zAvHtdxru#V|6QVep?>w9{%ei~TsnTo>6YNRr(760X<*L@trx+#eg4RSJT&aw$O;h2 z;%VRS|M@Oy8o}F#L7hCqv9X!u6H-Uq&mBQZHVM>#>y3scHV$ zDNybe&!41a`HwoR@25Pyy!yg$-J4E@mYkiPE6OXliO&BWvv9J?Tv!I#OGd38A6t;K zo-y{S=Ul5A6?flJK!c4d3L6R=Tk*uPd;9t%BqhymmJ~paw4xjcxpP?N7QDElgPKRO z$!_fiVqGIGEA1$&9NAnWbYhQl8m?#eAOvMTBaS1r{4++F#p zMJ|)^4iy#Ik&CQhI$f+@0VB5UeQz^`-7lyShd*resCV0QX>NPA44Ce(ZrvT+u=SHg z1Vk7#h8riV*)W++Lbdm`e;s44`P^lym*eUuqxIRTX$%-?EftRBx;kCI!Nv)TK^Kcl z2HLX1U&W|b$BiCXnWwTAgdeECoi5s#f2)^v4^b`EEQ^ZhF=2Y&-A)3@#`pOV4Uht{ ziRGdjwe92~YrNi&5)}o-v82}nO;x&Ezt8WVG%DWmrhQb6!kKG;moS$M;iJj?*Kg-g z%ZJ=B!Vlp=K$8nY-%nRP%KbfZdf8V;z!!Y1p=S=o7P&Qu1wjMZZhCeJqy7UM z0?5`tajfO&yvxfQk=Cx~i#24j3hNr5PgX%;v|7KN8#b7#jDEP8&+sa}=%}U>PjB?B z1U)gXMOXCtpcqt1md71twcG!8^1pAndx@s++EQpsXdl*zyA8YbwvXtWxDs;_6!6M~ zPeeNJF`s{5q1Z~#4Ml*5MfvE{OVdaqo_Qg%6;KBgj>9KRHXLm_bv7Rnqn%Js{hx^Xmj!SDkEd1V0Bjh+g`=~r*x(YBC-cbWS0E;HM+BZacT+~ zKh$GWMl02Mq(DH8UJUo$s;kSPH)Az3Lp_EJU%s3lkQo|eCt=CjSHSnJ5@(FNAcjnd zCXiOsqc@*K7Sy%$*{UPoTsgRZvtD@pN*u<8cojka4(D4srel(=-`(Azq4WzQToK({`lgSf67bom-Yti<$_8XM7`by>uGT`B)OX3G5$Bs zQ}wm6J>Zp3s~NkcB5HX3Tz57bF&Kj*-Pi{S7vDHO?B{kjk4C#4ElLIz+MZp!o2Y6{ zOxE>jEX-^4BEXJFP&0A2+iJB(bPW$<&3gSjXL|OhHLjn$3?q8=#q1D zAY6p9Ps}*rbq0Q_H-3C3PVrOO#-23U0q1Y`{V7#vK^g%FZ$B7o^dg7IuV3TT=y!U; z2JZ($24k8YpaIaZu+pUcLL`@BZg%c^Biwm%{O#vo?DTJTDz4sU5x?Nv;0!Vk`mB4? zzb_zI#9JzPZqGmF3-#8aL?q>_zfY8g3Wm7@Y}Cj&|lPrR}p^lxg<6_TB+zJHr)9Uhn$Kc zq>QYDttwDG&kvu0Mwc4?N>}Q84*C|i@$sdFZCMrN@mW>|Z+U~VsPWF9o;>!hTiA6o z8Ynb0wBFe%hFU1#nS;8Sk58}zewbO2m^d!~FSP_p;2u`v-Hs395C=R239M+AM!D!fI$&?5qus`>gzclX=Re{U?V^6L31ZVppze)VwE5R~e(Yc?=kN+Yzlxg6id zLl=;*&u8K^itNFhYwe5JSUx8$E5?-}EsWF_zQ_d5M27IvDCLW50Zh^qlW)&Qzp-#4 zeV@x8+PA9aTXHJpHc+&y(_czKnSOQmuv(8i-`nsaSlODJQ+%IX>xQ0%<{GJK)(G|& z&!RDd)uY`R;}X23PE?tT3Nojr_m|c4?I)JwzK&AhZv8v_WcYrxk3G$ADmd_sS&|X? z^r>_f7QLp#w}V|*ks*>N7u6U(9I%8t3IJb+x+|<3x&DZDOg$^rSz$0(M@NT|-sWEq zXJ6mV$E}<;$6Fa|MMYUJS$Wl&6+ZL0xyy9PDTWdT>-grc1l8@&*8Iv%jjrk%n)#Sc zj}C!L91=eh#HIx#MaaJTY7)TcHp3_%3=wefA0Wv0w+nd#WPl6KiyXqI0p!o5U+Xsc zOvnSgT6-Ne0;+!}=QR&~5_qMV$485nq+qL;KbP_G!HUFwb$4%GA{cHw$SA`6hl3Ta z)V7Qto`x5tR{Op4cCsC*bf`7x;o|))@DKURD}JR(*crNOANW-NzTff+XTkn^nbN=A zh%*oNGO|+C`$5$o?;%Q*gTj=jiZyy2YTD%h838bBnckr$Awf0-@XY2Fta1w?2cS!+EKtMc)x$5ARo z{Pnk=wy^U{U#;(Yo(DGvlatEiFhUTLq+;BKp03yNfWv&y zGr&z>Yl0t72+qy%b#!(dI8}}v(v!dM&>kmM5e0;T!;%RPC@^b&?)77R`^AmCb|>e4;oixlP0G*)Bz;L~D7d{WDD z6Btjm`;06ae-;u(67rBcp03KueVfHrq}aT%q3Pk_PE$iu9~pw_A0fv233l9*QQ_hW z52`uHFohNas3xYymQGxr&d4YT4^9rS7dhGBAKr=vQOE2U`aCbxnGS8o6O)oYte)1K zueOeD%ms>IFHfr%W@-S(XYuiAKqexwQ&Y$-gAC16mh}qK(Mu0q@5ui6hf^n`Bn-wi zqkbhWAjnHP9T29xL4IRDr<+cZ!A}%PAr|;X;3Ag-PZ8AnS(p;E`7zX<8sIiz62(u*%YyOGU{^j)6 zvO>msYMfQ$f`2QXpM$?BsGbZDCF6bEkA>Sf#l9}=EXkA zSg@dDl_ru>qe1cQ@jG6}1WU>X#xZaC{&*>Wg2Q)Z4!!0EXZf_Ze5~AfIVly>@4OA( z(*7V7_2Z2q#X%(F02~<(oP^WcBNHRlkeY8#ox%G|p`$7N;jt-ud;80a^Xlrd)|ABT zR=4v>{dS~EqLW+aFY~og)Y~U(@*FXOskN`}+|_uvSiSjXX-6sFeKm1mwl+E$x}e+B ztt?@XorML92>Tfs_^ATfjC{`?o-0yDfem^e-})vuvNEH$M+u@<;AQlZktyod^crY* zd1Tn2VI6|wH1qM5)Ty29C1>v<_przX`u!mfY zkY+=ea6lV1&{IT!NtENG2HSu;uQIo?q-K@$g8lDz)NE(uC}kHN5XC%Du}zfZ7axsQ z!SWls;~k#p*f9aMhXR4CKOqc4ZEa7o19@=LxE!xzAdhirC3`5v^-b~^1bM64Ps)Lx znWvu$){59j-JYOeu>38(Ywm5X6UPwxRQyiFL9R%>^Dz{--r-u`QhE$VJc9i2SE=l~ zP?`gz&$sfnuG&;YVR!4T^%EQuiHS03F+i8??j17xp@Hh}Ea(UytYGedh8Ev;SDO3^^l|J|!ny;t%!xJNzu#lSBCN*3CW$fq}j%m(>-Q0V0M?s$c zwC~+hmzCfj&!fV8{y{h4p(@;Q=Dj5zpFx1KCWI>)y1XW@*H}KT(WAhcB~y5WWBpIq zb4%Ex-r4A>>RlNj%Kk9^3e$=q+Vc`s)JKjl%uYz+YH7LUX+|1%5AqDA>3j+xnw66B zFTkNpZ!dnaU}6;vbcC_Gole^$_m(PlzCGt59f}Mvr8J{Hbf_Sr&bn8qeORIHIkXje zwp-7o(pS>thnN>N2X-5XFVWz`P4>VyJEjxhcQW~o*N#1TJ(+@btVmTyAjgM_&I05_ zzNM=PKA!F@&pOgxcfNY?Z84v&a<{Yh##c{FZ%+t2U6!CFgrwKwFOt2_ok zMbwp^9ss(TS&{|QP|mluwspRkU($&D7L)cTV@KV>4WSdphbR{QtHnYr=?@9mr5|4e zxaW;e=pS5ixjWXAXccEx;HKe(aA{hPtkxt(o^JZQyvB*F|Es(;I`zfl1`TZ%hm=2L zY(-6I)nedLEvM`+kdViP1vrS0R0-8zBK~l610yBZc z!M@Kk`Zd{9qFn4EV&9(nkVJ@+hwQZ+--qXsMCKPSOai0RiDuu1Ut?xLdPYUZ=5CFo z7>3?Z#}j8DG)Ljd&8^9f#%|ab_2s4p1Up4iO_7Ea*gq}szl#&t8u*z?OE8En;G)hO zvAMZkMl|VC#H&!&;+3wy6n_RQBv_x70lagHq2Y(_v*uU8g;j3#aq3yEg zu^!juP#bMse`O#`b1HhPv@P!1pB=D&^uB8NK_u{_`uqAP=D&WEE7IeHJWvKsBW@XD zq$thhs{ITNSjht0{XEJU0j+KRu|wQQ(Hc&?teF6pf+!L(wqWMJ{y+eV%QXE8{(uWw zCdsW-w{o?x2&>7#cXH9v)HLY$O$Y)1{hQxZO$r}d(W>7g-fgno=<*qwoZdE4s0q@E zNapy!+PblfMW2;Q_RHAVW1{7$$^s@+S;#hNCl@?);S;b znE$!Q$BJ9VHfFeHjeOGsQ)EkM|Gc=D=ZM(DzsA?_{)PN+JTjVhW6eIob`XFmRS(mZ49`EkRH3M@u`TX9I$GN#`Ag92&R zMrdE5;509Ty2$9Xu|#FDa_g{j9Zh5s-|=Pq@9$Vdxu7{jPs0tTxvtYe)&T*5O_%G> zd+uAvpq}sTgy2^9y;2EP5Lj}tYz`b5{frEDc^V;nqe*#uSezERr^Qr_cl!I$-W$=% zaF5SPNx#QN=)QW^M!6HDj7G+#dH{&0p~V!leIHMF@DVcMq)%pUP9!T+IbdV>SQJ~; zZ*XxKlZ)3hDBp{UGIBMc){RN6XMDren2Jv_ywFW==_zg|I=lyp zKck#~)WOT&r+@mC@o^W})WA=#Z6PiF42Y$^zPqZeg!5!5p?i2B?tqAc-sfA?z(6_5 zlih#N$Q;Chu00G3tNXV&kMSp=u+a2TTxDxTS zJ#>_L*Nf!0$qWwiQ*!*B^6>mET6ITv0sQxbc6~pUE&LdZc*1{ve*Tf2-f9e6v+pDU zP=yj$=#>U-$p%kZ*oD-+g2=vSwC!b?djDkFPxN*lZ2ee0`!^vgE9(~hV_7_kI1Q&x zauliX9FDl*gS{pqvWuJy9cKEs0O}Kj|KblZ9{QbSKZ*VYQa_IFSrQQhIH_RSR6Zhi>EIj5OZ@dj;?^ z-i4=H0s&7Z9wHqqPrzSSJ9{C+nruZxs1rzJ-utnkry$=Sf+GB%KJoId&aVgU%ugW2 zJ!Y$}7r2h)pk4A6Pu$4CorEK|Vb6B?IN~Lat=^)rbIWIm5cH(BnD~Yzcus z(rElc$mMt&h|J3Ozmkmbq;HTXIKduarbs-uiN9Ujq%q*+yQ1r=YI#7P8IUS1X>M*Q zCC}5(T+^BR{(U6Gz?|{_Spda@!@?zSkBoh1C#S!ib)=i4^R1Co#5@qk>j%6D#cx)} zfdpGLIp8pGNN#72&%-n3C3tIb@lDb7BJvCWGz4@DrRgS5I-Xn|g586|#)uO@i&tjw zu%~JGNjJb$9AEJ9E~*jBVSRe~6F>iNWJxL@ARw&Pq4JlhCAFLgck-?p#%>ymXupWt z=e-O$Iy3<(A!wf&zpLxLH~jesaR7!IYH=D;($I*1%ZO^YLmYviu}cPC69Y&N5rcQ} zAPJ2>iQxY}CWB(w-+UkgMZ|YHjZeex^wg_kUYi%G2M>e?*rBxXSr3%gRbFBG+H^~& zP4uhNe%TFba;N)eIhe^l0PRne~zrH;&{i zkp0gb9v*yR3qB!+@T;l0+=8EPVPIe=R~)A6NCqKL=kXI0L!ccUAlLy{jb3X&owJ$Q z;TCLTtEi-iPCr@9-LX004(MRu3mvHKSy(_uCa}a)+Pz-v-S4WSv8A}RGd|aSZLqF2 z9pFS?tNgM0|+`G!{$+vPr%*76&& z9sq&>;d4mgry+eOk*#t*X@{+{``Z*`vPp@}(b7*N#x*OQHxQ%U>Z zWI&yGH!{@l`!;_EY_n}z4z%Px87fhdp-Lm(f33@!aP&9%!~1(7L-RQhC)CzhAGGu(Zp|R=i;gMB+wB_kXVYHdw#lfZC zRmpYwiv`_Hz4uOR>}ideq3})5%g4rrD@<|fco3un)wdrcrem$Bbc^emOwFtpNgQs zANOd%J($~^)ZE*zbaSHkclv9T3dryIU-<)3Sz<}a;LM0#>d+8C$IHRuczwkg3G#AO zbB;`nUE1jjHS{^xU??8ar2%wNEC}IOUL7$+KJT(amRB&)o?v}IsHDTUs~XU)H5vfy z`8*1OW+I*n05F!%Od;~vw_Rd5IT^f4p9cu$ z2aDV5PgfhQhox3GHt;yeNGLp>u5Rr+Z#9j?Xfb-sl2QtM`?w)Hd&GGd@8Qm+cFyl6 zFzb(}N?AAa6Ols;i-?}M{^=O|LlS(Pl2})0(;3n*wt44UcaZpuB9TUu=c9cvbaNBP zO1{h2KQz?G;_%ekha{kW$#!jPD0DHhxEhQ;m6i^!*xf_k3>g#0yu2Vr5)yR`aCsx0 zpJwkknxO0|Psadj>wlYwZPb2}o|aESLMP0?XY3S9lfNG$KQCTS>F>83x%`2;y1Ds2 zte6uHA1u!laJ#^pRi+TPDsRv{+l?y6yi^6Sdhj7NC)e1UG9zOa-vVhJIu!eGD70EE z(anE+9;m(^n{Vw~4(UCUf55$;1+qM01oD)eP1=J;s%_4KR%rP|@3;(?&;I4UdRKX; zEqa4$96AS|dQ*vigWOy6tWwy93B9?F%$=3M~5Uip<*+p@AOHn^QRrUfDvTWD3KOeJLs({|VeM zjYW3=I6#aJqmwA2{{kB8>-hvr&fED0+uijl1#Fe{ww-lRQ)<*PF$hNb1zyAam@2_j z0dKnp`#!5pp~2 z9;FibCcCqVJYq85^W2aF0~nZhdPCqi~NeEjosYsf>y6+^_~lC-om5-6Q1 zVB@)WFSu*Em&bEWlFoVK`)c30@Gjnga_J$`fjk(h;s-ak5>W=`hCYlL!e_NEAHj$v zM0r_RtLM3uu`wM}u^76W#jnbLQlJCJZS?m!#$<e7fnWjFjznkO~XK;-*9}&P(W@ z-6ug~qwPi7P~j=+CoE>M=~FOumqTLHq!V`ET2C^Hr%)VClcXtMi(D_MXtf4>XGziBW}kTuRpdS+`bMvO+q^)_=J8! z`0_@}BQqGN3Go{hsl{MQ*d`iFyHXPeDg8@|q`wT_XECoFJYkiX-6>~(<07xuby-|l z1@MbCw{T;nL^<&}d+KxyQ2Cag@n%@$l_+$?$LFvZ0?*J<)2(R#pt*&66BT|R73T8T zPk`qf==)Rd#<%548YNv|R|EaO4G%P*<3;YPP|9Q054KRK(PJaP2F4_IQPX0}(zc@2 zC1mrcXu!i$Z6}xc;WZsda}ys^l)WTsJZj#fj0@axbhT4}40M-Qms{D{o(pE8sMjo+ z7jpen&rT8z%3Mx^hYg+n`?%mv86QW}=lGdRL)}lM)SJAa+50y$o}lQ zYQbMTp@>*8gi0^&4zTIeCpX7W8+xL*hsWoHb_1yS>7TB~%TkDkl)m0qU-h)N;<_|s zP?mF?+vctPSwaiGvZClqP?3EKE55AiSj+aQ;^SIcoT+~EdVxdl82meZDGSZLN^{ox zw{gRrs`b3}V%6l>+Whjox|*)n)wcNw4(YgJy6hh!^D1!6UHtDevH#kHabbSL-@x0` zNktzZUY=ARF4Mlk$jQZ^@rDj^tD_%hoYk-=KaJoMz0-s4go0j{Kw}dV!C)t3)#kF} zMHv#{f=?3OY?R$A2D#wAGG83CSLuQ?vkyg!()P48#6}Sj4*I8ge`0&;^6dh?tf+A7 z?p`9`mlbRkwcBh=QU#XVzZ^;_NOO&&<6u!dlA$&E(TC9&+q~$nW(rlMnp*b~bc)_N zyc7HWHgdrGbnz;Y50p_vY&`t!SgmNLylsnm=lcf* z=RGM$xTl%&HzFeHSbbnrn=c+dh%K8o^C=nUeEtEIj+G^{tQu=MpXd`Ws0prML(K&{ z$$}VrugaFKuwUlWW`D!QEG^r^I^s2W%4IMn;MHVX7Z#$Fjge!=9dS4M&fKVLxMCydyOfmbIS z#-LXz&_Dg?C)yb7uqg5_B}EVXPspapw&>Gh*JgD`M~eN_9m#sFi)*f>)8pJJFKMui zmjRf2Y-233eYV@x>4bid;}Q@8#7IT5sKAKDxK!kV#`!GazuYGLnbZ5S`Zj#|_OA|u z0j*9f4Jb#;FZey{K;o0N)me^VR#9n3#);3##W*jv|Q%91oA-BPJf^0fepQFOWvF1HE<*v3`Xg$UC{4iB&UePcx6(obu zRx~s`GI_qh~&DY+kw!l<5vjTf6zXFEWUzemeG54%E16QO0Z5?~WeiAk zi~PzXlT}GTyd21S9>qU^OC$2Xz$vk3H?Xn{rS_=Fj_}Q>59Y> zONUcKK-BM9@5n;Hj^e-LcbE@noYo0Z_oCPh-bVlV56zDV&OZyk>uX*Oxe#ced189B z@kL)xIKegsuh&_rIu(W{^+aKbB%bVz-xN5xDyoG2NFma7XrAHSj~EHy;h8xO>*29! zj_nZ@B*Rzgk`1sar`0oE-}W3-D}AH>Yq~EKrUEw+6pTzZV_jNQUs_mlZ*Zml>`ks{ z)e|0{oZRRzlkai+J^u2o;@?O*%<7xmxKe8d)_etV69)-!$B0+fm5;ZEucl`Ja;aZm zRl-;;gcKmdsMaF3sPmeixY6%q8+h%BOoR1m|1vhv#zg&L5dOH(no{D}fGab{AUdMPMYc5X=h@_#e4FtEC@pzBa! zKV#zbf!KB^0=TLTu+JILjwFlEfeQGhyTssp_w|_5au+`+6xv4TmsU=49#oJd6ip4IyLZbnekq2egfx&H_xn;(~ zpZ{Zv^N~KJh+@wysw!%3ndah~`|`?^gWey=|7m)2(d{sbPS9)ED!w#I`&DPiW~K)l z_&-|mJ?X zdP(7|5kEc}RP-dh(e9MvCsO}I@J#*Ahbb5487G=A;qW!5<3Vx8zHf)?6IKqdQ!;Yb zZIZo!bf$GzGj!s4d!$o+!zRREUya9Bc*ku;U>uZRJFb>T<|x6{i`#fd=@}8JSgj9^ z@Xrz^abI0si*tEdP5zK)yklv3+k{+SNZOG#PlXQFF#Q=O|Icig?aD%G1eM*rE`)(j zA|YCQEIVaQs8P%0{#tx)9WV{>t{?w3J?=!&iJe>sdGNA znyDtZF2F+ymb?!r%t!`&|E64yD9aZ_pShHRh*+*lT0LZ{66a&}M|TuSVPtv%Hwg@s zOHV;w{)HWHUqZcYj!$W&QeR86h%{csYc;nOofgzaeq{O9 zcx_4okH_&>uVO^VvEq^?GgX`fx;#ceHhgadoGZ10tNoOWo(fn)n4l1(g};{@G93ck zDwJL+(UXb?)OgDmM|g|JMI3zBOSs!-X+ri)mTZO6~bz_n|k`+U7Hb3r`X!> zZgXy2yek@X(vU3Q3W^`C6GjLSvcv}^!v2Cgvu-g`+n{4~V2bCzZ z$GU$!qf+`~Hko3kX`pdMcY<5LH^UP?o~w(i_sd2zaY@#64Q@^5m)SdB1wQw5mSFq5K@vmPy ze+~RMSzF6bUM4!dG`nWrp=D`hH6J3|W>tIGZE>P`@0u>{@iRw^YoOsnz8x_ zeBu^jblvGy!ru|4;`4rw-gWyECiBy{@OT^hEfSQC_%ie0+1a zSp(4fO6u&PYuUU)uul?T#jwOmXP+?tRR>0i18c3E3X zA7AsDjl zJu4*v^17HNeIS9mnFbjJ?vWOss_^=+8LtXGt{Xo4N_BuSWGT!8!ykOhPF+qMe6$96&i`wg+1vGa6~1nEh@Z-cPfClbm( z5k(#U!8pM?SUEu4rzaJBme@%1f#AAs0292a%fR&OyqK!_;U0+hwer%w?lld@?OVdYx>;Dyt>}Oex z<;4l_o8MMa7%F)I;c*d0qN<|pZFomrz(`s<_Rxc)Q?Sq4ZA};Swalu=$R|=O=A@j^ z>!pPaRR0B#zq86f-AH)F3t z>`hMK{()`t1?GjEjZvfpDxF?-z$RnfaY4e*-YYGpD*>kW!y(3_C#H?s&bK%5>6m+* zs)VYl@r3lV_OU&H6dQ+c(}Q2BQmcN%$c3&+H|L?+Z*i8lX(10*mFt4|rAph1nGl0` zQ+NBJ-fAA9xRGUSCmRk0+SDv3Dxq6>g)C{{8j$TGQs#_xKj$ce0n6 z!xKF0pW?budoWfQSN;?M<$BJS*nNU}iSJb{Fra^-wY70DR{Q!JzIUrb-F|+C@PDbb zNA~M2@rjAidNP;r{Sr6|e7m66kQd!N3YrOt4x2%$-sU37xZXQ>-DiA69zAfH_2$7$ zMwn1QVsP`fJ}nyLMLwe6Vc~Bhk(a?uL*w8m$H!o9{rS0-YNn^l(s5^BGBCV5k#&cy zc>A5aXdYa#z6L0eIKpHV*%t1;nD+PkoM*S-84Re31%4oO~6 znfg)NSlv}vSXq0lX)La4YT9=@1q4u2D>>wR8btI_L>5c$pOd}Lz$J6rkag6>Ep zj%|_Q1hf26z2co<8@J>=U#V!=4By$6;c9V&XxazcBfJwe?W5h#ilI-0S#9`Qc_RZ{ zTXBE#$Vv?@Fe{Sq$mC1ZB*mKZ_77sCsG!EX`26d7HWnrfP;A0&v4d{Eaha&)us!mHVmWq+qJF+>sJ3{#OsDi2N?vc!KpUDBVLgzwL( zD2$EPR=X&?PPi%zbMra7!X6nKopLy)AN}A+ic+tsbmNEj%8Z!sw^)LlKTYGn=TAm- zA(6I)PxP-ZWehHca=a5VQ<0KY0h`rY`>igIliND9*IHEAXQexPu=vHA_*q&1%a}rp zctSSBe^Tx3KdSa&2eI^BKhF0~lhe+2j)cEMa@{;E=Ito)v|PMk?_qwR9~XFem=?s0 zpQANI2^)k#aOegX*rmOtrL5>=TyX2>&!1Rb!9LUkt%uJtbl#dU#^C7LW$Iv8MV8APMFxtLqU#i0BKyq8{Uven9s1?`0+EO*{ zJnmGS^OE-hqdjs5#DFYnXzNe4K122%NBFuB?RLQ&BNMabfK>yLL@ph1^6H!52qNRq z5yRR(t&%N3{EUL_qKEm?hCBHp*Z~CHTV!F=%3Z|N{Ei)jt^qJL#8X2ACfHTa6Dh=q%|58n z=hQ>d(SK)7-Z3AbyuAM2{~EpOh5ig-Jj%R{tA?0PeA=_s1p46?PRmLlq|eNPyb zcr0!0g+2bAN^5IdFII|I9^)1w{1%*=Z!TsEhPq%6!ig(M$&F}^qZOK!R}aYN%P4n= zO*2{_Ca`aCNJvN5W8-fAnoz6IO3}jBezG*iGdjexV6t5mGiH_R`)3>Ae_w3QY(uQm z{-Nk=-Ua?9B6CPrkdQ2Q2?F)P3B5_I&dLH~7m~fcrWBCjh(b7Pip!AKYU3~a{lP~H zRdL_Hc-=`^Wq0DYA32b;uyD=AX5%{1>{#a6nknBodzS#k0zIskm$_ay*=*Kch&>WOG@)H z<>7kw{jopSrZrkcC;v@37ULIvkDLQ&?0l_1DlNhFyM2e_Q31Irq7e$ySTY)L&J0n7aD782AUgPY*vyW z3=ktx^R>hQD>tT3k}{$$Nl8BGnHHqN=x9fnArTSL%Rb0{ zve<9oB9#cPFrrv5k!WKcX=p z4`JA2%a-Th$@=({1Lb$h4;?uSZx@)txrWCIpA^M-%cop+?8i+%ILiO%;KQek$xk1C z@ZqNi4mLG62Ze;Z^wLYOz4~ehGTu<6h`oM|4nFfvW(O&bN4768c=|2Y_8xP)!E79` zs6E{Mb?Q(bt(T`-ddH4|3~<=;X@8ZDoQVFzr;kGs9*)1!XuNv$DjxIq^F_jOD&_>x z2MqM`1XCiyLPHm%+f-^)YHC&cjs3NCb=9@C4fXY9Wu+I+|1f7x!m4LhuU@rkPSTvf zfWQECaFlOsU3--YfyuIdz>tB5n5q1> zf5r{I(*Dvnr0wDIDc{9@1o+Rwx08#G9;rVa$U9;5zfXQxb&Xj*XZbs6{Ds~3!p;{j zU%B%2$&a`IZydnd0|G_>kGH5(Vs-M2Xl3n5Y-1KwsbeWsE8m@U@I#!mBqRUaG> z6&7zmB)KH~Y7PZL%#V6e}Yn-4Hu2z66s?AYHca1O)lBc8C%f+!(M7+`fJL z?74F~A02Xy$H&Lxo(xQ=cRrOb*KX>xTV3Emqm9|@q4G|h zAH3-~ξF{K^#J`;$VSVd0OVRE^rhF92<)t*;M_A#!54`}lY#BnNEX8nkw;8ne_N z;{B0JGYtADEDEJ$c7IjXV4r~ogaN_T#a-j+IVUl2!zRD9baziI12}H< z0dya4?}+e-;^N|}d-pn8+mI0t;q-ofer!52V}_5vjG4R_9F)jFJLz!T@Mm~a3?H_7 zOIzy~pMUY*d%v%#sSXYa-uK2Ezx?xGMn*-zwvdpMtF%lRM+%G^{t%ZQljY{U_7geP zC$q8YX5;npmb*;`j7tXSw4Q37du7K&=Ef|475y_fgu#{n`1OBaUImh7?tkmekPxIQ z7HZIea1s~CK|e!6+$jYUYB~N~tw@7owLm3eLNOfN?d|RNs;dhNZe7p0URGA#*3#f!Gn*zaoWHg)o(66(!qJhXAa$?FogB={vDqqi($v-}-5{R6ABv9amG`3tpmwaZs5 zN5=r`E6N&j-0H8)IAuR>__Kg3V3mVe`1U%Y5XIqOLg)kg=YtPEu-U9w*ar*8OWI|; z?GrA=gy28X^l@_dXa;oNKAu`_c1|`{obKrCj0g`;N={PdcsV)#Ku>PTM&EuR3a_cD z`HMq;`ryM4kl!yRHg@mcy%hbYRqYtxqdhoZY z!|>(B!aI#^Vd0TGUU&h0Ta`))%#!3^aFn>o^+6V3`D`TiKWYSg%J^j<1i{o#IqTpa zFqzHW9bI+xb){vc*RNeix{Uh923Y&>EPHx;iRA*trzQE4>ldBMmt@?e2N_=pY1&DL zj(6!@zHA2}AB|rB^9SUwO;7k;UESHaIX7?J#4-SD)~-c96ParYu_uo{l3Q7@PiBw6 z!#*@iM5iZkpX#1qviy5L=jkdv#!vIuEIg}kPyeu%WsSs zK7Z}W_#;%+L#IR5acftHwa0)Yu&61nYOPmNO6ZPVehU`3dm`WNL+~FaeDN6nj*LFT zgb!z#%GcK?KEWIFnqy+U5|aH^tPI)my#L~*8UzlLAp~ws6#nRfVj!!&uI_emNmo~w zMy*AFLx6vPVt}!TOo;pplRgUlF>I#uQV$HeG_b7UK=tap3jQ)(UMYD zQ#EIYj_P@&SRQT$AUVY`&zxkWLiHVLC zDY%=t-Mx(;IB8wJbYW3py_ylAMvRSR2 zo!wZ32TMU>U=o?ymSilQHz(cZVzs#r!lCTv9gq^X;JM`O^FtSSs(rXbCjLsj zKv_u%S`CN47~sS7Ml8LHz?0=GRzNm{TloR`88v)SEBW_9{X9#52jbvx+SA9-WBB0x z58+l`zhQmWqD8a(op$`iKwwC4n9XX#Vofk;`}@r)$#cWQ!$pfPwJKbyr&T{7N7L!k zr;x0v;?AA0@Ni@W*|+bFxcCGQX^mOgBAcxKse=ejd;Ks*`GLWy^YaY~48r0KHFdQO z?cF+0?Y!7fTDyf4TA zx!v5^howrkZ+{^+HX3eUl4;(UeO#7_>7SxSKwwHnX2!}DE0Fut)5{wJa)$1nme!Wa z%Bq|B`BjybXgCt*B%*7^HHSjUs4|j-5n?ihWsIl4{Ua+CD$zvK|1t2pySsC9a&G0{ zOrAS;9l4c#6}l5(;9S1KKZKFx6H={Jo;1gP+^3OG|ZC z+1F>7Wcmyre;2Hv7Zj)u4DegHSQM8zK{-c7gULhyW$&Z^@Zrn6cnE*tyNim7*|~F9 zL1AHONy(*47w620w+xv5^#K@LM&z{0Lyfcph)|;(ZE!Y&70d@2CSfHXKLq|`pj&wm&WM5JH+7g0n(phVUXvEKV@ZscX2kLj#M|0hj~_qwr$dL@+S(!_BHnoI zjU78)2n`J-QnTodFa821NXGDqk`o6XLzC*@U{zo+S01p4KP&HKOommzB>uX(sdRp! zn>XnfE$lA1Wo~WNgogMe&+`lmrG+I$p`@xRM3sw4UwlISeT@8QwcgJ>vj&UH{o(yT z+`U_I=FI7N^HSj2@<8Mxm1rdR;|1}!K=n!bZMwrZ_8Tu=`r&uK`(0sS5wZbo+O+vs zzxoxD;R#%tu5rxcthF{PI?_g(j4c;19ZB1?0O8h6_ba3*rM}0%-wj zSyW`k&hl4of2}sm4Jxu&2C!aVTwIKoCoe)f9QuILP-c{39c$ts*qE9XqVGuM-_;FL z1SJVubJ_A`ukU-~@})~(e)(m7{te_{Mhvx9>lqOcIX8N4YDij5M`cZOtxls)4xJmM z4@UDrb#9iw6QzFu7aLCsCL&`SIe%F!=v8hhWSu~uO>R?JL-nLBWB$_w2rOBQCB8HwTR7ba>v*t5(@ zEl3E_hlem?jH*9d;7P}{6aELfjX!Fph^KVSkCLUskBOui3}c$X z$2vl=oC_-(|M2zIONEtKW@CPA*e`ZGla(Bc{yF6wo7wc4cKpS>^u{(ro1quM!oeXS zK|w(Xq7u>zsU^83sf8R*pngVhbU;85{?AKGdv)*LTQ{-5>1WrjU8}3BHTLym6)SHa zFZOg(eeCP&>oyn=%YqIFF3##t)|0Gm#^B$01b<1zk@iBRrfu@{Gk=YK6#hcFaDzbj zkVNu5X|Fs)S9v3Z#p4pv{F-!yfr?H9KPNx?0DLk&8H%j@CD^nZ5BQ=a07i|3jGFX~ z2jIJVd-*S0u3xyw+Si9@Wj7yhca@mwPq;q<{}I3^BmhW8g7A4VeMSf$AZbLMHc?*w z;)LT5b93RMtTn6GaFU%ejPsv6cRnmE4A};J>7QPw^VSCh`1<%F*Soimw5tsX&t*g}P6%%9GWJ^sBmF%?^q8h0zAJv2+kD7J zM9zoE&)`r;SLc~C-$0YrR#zh`cGvFRFvn?XxuE~V;7{D0O!z!`?Ec~pk3KT(6se~R zpsK5zCL|q?qe)=F)LvU!&3p-vcC@8>+-r3pNXU?37h={~S zwjy3;a^7D+x}@BDJbW@z?az)s{!;=U;tnI=;>An<=l}dmPEIZ=_}caB{^BqGucV|T zVWdnleXt@+bGNa$wnO-oL2z^*FbxBXsiHq{uf7Rd!dg!a!F>{Zc#|zXrhyjYK(`5IqRLyN4f4_ic)6%a zWzy>-mw#%e+}(o$0(b1#v1ZNM!oq^=>(`MGW5vo9$f1N8bADQVfJ@koTLn4QH}Az& zrOr!>jf>a&`NE3jqB7QkE>FUrh&Md?Fg!aU$DRJp44(%IAY;&iOfR9(M$2EOxm_pD z(tlj)uQSV!Qf-9%faA0T_pJN~x=cg;gTdpSFYG8RC}?SEg?(FCPza03Pp{X*ruXy1 z^e4ZIby5x76CTYqwmx{-?u-?$ot?d8Ifh zA{eQGS@5XJ;Sc(UT*_Dx#*J(z*oo|G;0g)Gv3A0a?(yT8q0Ej&ZUN~5mR$)LAJemT z7u~djZ?aknDjR=y^2&u{W$}Gbj7K_%cA|f4ryJ2u5R|UrL8dBS5fAZ2k_k~D zE|tWt2jG(;CvPHN#!GmCpvZsXy)nTj1V)5Eu-0f0V=I?lpiL!_i#DnB88QBNfi^`w zP7?lTl)yxIiV=_8-*2j{yjOAeF60LD>9lH%mzS3Y7AO442$1vf_0#(W=<(0bUyrr@ z;447l7g(!$xSxG}{cr^wfIW&h2-u^PM*>Wdgh?=gPRA&pz%9sEi~oXNj=x<0o(vy? z+imFn{`>Dfc>fQDg@qc8cI(!y`}gfnNI(Km8u=cM{NuYLlTQiJ$>uNNDbwf)^cix6 zr;qBen^f_*PK)+U0W#V6qe^EiNQckAs;a84uKw$P!Q+9;21T5c0#F22wk8*l)J7m|p{M|KT43l)jaP`Ce^v7Fh0U%vV7BA`S>O{0M8Vlm#pi514_2DB& zu)rWHDRRbTWo0c~xN!db`JtiVaEl|j$Q_{>Pr{#@LOe9Z`e)SinI!zV)-aMZ^Ow%< z3xOCtebmg$qyt**les8X60x4=^wDrL#=`-J~U`+X=(Ys zsTmRlXECl|8ESGMdt>j3&@*_M$&TkOARqu|6ilLr+gb1Hi;M+&gpwfb5)yE_yAHvu zhiOmF4`CmoMWLo#nySju0zHI_vdND#mTmdg1h(&(E>l!g^dJB6>(i&dK}0rE%)k5Y zJ1dv3#F#o^L7OwwFGgc3=))A4K>80KJ_erS6XIXowX>+W=tged_j%=5yKk@F$Ilx} zv+#5Y&<8SwxmDm98Htb~@QyaN58+5f3^U6Z+`}Ta4RXk#$nZpyQAEyYdR)9fCwM_x z36Nk;FZdSgU`2h~p$oSz72JijoEj7M^X)4(WTp6MRHB?SoIcZ$zb31-s;Rx-Z1(c= zkB*MPSPKu}389?={Yllu#RaQsrKc}I?uG8IZiKL4Q;jg=Rj z(}DaqdH8cblN)eSq4#gfIUSH97Na2YgLIWI(q3GY3u7+_L6qHX;srXRf=is?2k4>k zfluJ%jlRbl9n8WXKmKAwxT~uJ39`Tc{`>y^ehiw0hJ_;e1(LWAU`z!(k2ygTG$4hjwp4)*sCfa}>;ry~!vpRW&=5b@M_sIY1X z{xk?!Q^CC3sEeeko-a&P1TpLJ{3{o?08Lz*EK zoHdf*KUw~TK#Je#E}vK{(q`(nbQ^3&w7?B^?%FT--c5+^5Jf5M3O(YOcb;K+2f(L6`7P&f4&aOmfy)_Y5RKgafE9OXwy zFcqH#QEv9^U*OAhN(YlppJCK57v#@H7Gr45;E zNPDHAc#>wwv28cK;15`BRZShoE)|^0DQWLE#)Ss%-LP=eqC~7DG)tf9%in&}z`f>9 zlg$>Q!@64W8nu{P4>_KC`wf9yV$!y#R0vamJwITvAcC-~vokyATJDY9h|sXitc5FA zuFTBLjERmxOX20CWB93<32b<0M}v-L;WH7&LLV@&v%Bl;*>fL#^l?dP2~5cK>(^~~cD=9OACu_& z3_V?jZbNTRpP{$AyQ|M=?8Cp_KCA;~ga_Ja#H2H;#nMn$fA3y3l09JsCt&35-9Wo2cTF8**e`}*APQjz2} zIyMHq8A6PhCLu_;ioc1GA7_Sd85k%nE`I;R4^Mpcm8svjAT#65x8Fp58>FleQ~~mn zk3U!w;OjX*CZM>wqpQb6qf@S!XHCtfR;x;m_Ma1`7l`q%%r-`pPH-@@`HRIgYHDjb zIy%ww4@bmrM1(|^$Fz?wgZ=eAy?5H-Q^v!>=Sy$dZ2h$cQ@ueGrt{FaKel}*(n}wr z-Eiv{n46rGwC~OR2v069DY;uw(a_LXaTiM{Rh&J07Bderv$8gC+Pp9$L!*T=dX~R- z!j3}zp^rgB>U~SK1ZUW0Qu~GCjzm6L;%4b1h(?5CiMdaHP=)CR9-*GsnB>zDzJp-S z!hZ<;$4(!!$&{Cy_uhNIJAdK4hnvTW<;$@y1y-(u!4AV6YXKR$G4r~ww+D+e^}>el z?SoN|%?M|-so!k1TH0G%8ycHn*kiH_+GseC^=!A3Q7@VFI&U8zUmqPNDq;>J418Gk zh%bTV?~NOjRRf9gG)O{-@DWPktWseI6OKwpn z`lRS!Orc`)kYkT|q*Sn*lo0!o(P_mVo)rpcMs5t`X@QcWL38#*aBE1q4F4&DffN|_ zZ2!=Ucyt=Ux7e)J&0WVX7ah4&)YRS`6B_XH+6CK|r3UG}soyi>=`(%#+uYUD&|-ks z#NSUJ6C3O1p(1@ae)Ws%i&R_3Sbs6S08Zq$-h3-PBct?oaanm;ZCzb+OY@22C$3z+ zoHj3QL1yNuxCk)UYEEWz& zb8l}?Pmh7O&W^6Gu1+#nySnj!#cDO1O$d~@cdy1`rJ2_-FA=AV5imrwsWr&r1_Kn1 zWlH_7gPYmg8;LZqQ92F!uh$3ob4&y!dP67#Ci7t;8|Jkkx)}mXbMDB#5dEIV$>&4) zYc`on%gT=&Ir8my-}UtNWMpLQ-TOL5&XF#fo+lxeYR41h|Do_5A#i;def^p=_*P?I z$JHy%r@k`Xy))R?i@t=rTH8~QZ)#}{+rC2^5haskD(R#4P^ZpId2Y*=>gt;6d-u+r zJv)_Az+M0VKmbWZK~yg_H83a$@UL%Z*^K#Wzhr6EQg{6&+2 z4bgA3vLB%#7moJ#A>(*==IH0g>o@8pOC%#&QFoiSS^AJ@&&m&bQJ4%&k0;eHAwTpI zJvn0g%CUyd(x2pSg!EUm-zexmXtP1n{{9btIQi8{WYS-@Y}vc-{$%r}=aA)MaA=U? zlo1O8>)h0j&E3 z8^S(dl_O~$LPIe5&{K;P&G09CkvWgF8nEeglv@J{H2m~BJ?F|pPzj<(G@h8Ph$Mwb zs)tx-6^2M9FCQOp`*WX#IUM=HY)eezIdbIiXP6<6jud(p=DTAMsob=L5FIU{D%*)F;fAh}#xUld5UtdavAw0)u)+pHp)078J-6-2K zUEx7gP#V+*f1#v6RaRHzGbRdCJBR~O|ES*x+nCNNmVx?@?3s3U__m>;rq14PbIVU& zF0O6viU`#2Ts42^GZ`_#{_ym1B9IwPpJ~nC+ttk-y+$ORh>D5{2@aurp)AkNsUQ3U z1J*tJ?7~Hh>g($7RNN^pF1~s5Ch{+10_CMkS1K#3p!qWvEI?*dWIjdq45TE2*T)?` z8?J6t^{8TsAKKY%{7Gydr;GmNr7eh7L@4&JO75=vB}B--BQfb6nX;p>A0A2{ax3!< z2d2>_hK~cW(G&JfMuT~d%MN$Rq7+u8xXNID1RoF44f~4@5O8_S@FyDo844fGZePDK zHz)6d4?ehZ`3k(gtDaf8Z{M5Cmn}ok0oq|iI$(q6S1=KrgeM4d>Ibbhq{XlyA%<B!+Sb+4Y3xT(vk6*;ZCSI?*xA<7LJ53XHgG^G zm_0l&u@2@b*`}B{4I9HYP{un`;_1cx)MSU7)yDmFX~3l-52a5uvl!BG*I zddJy9g`NW5Vsnsxi`8=PUe%Y!kDoYk0<*J|lapV5<>gJAH~I(Y$-u?tAicwr|EEEI zj5RfF=e{)-7Y$j>qB0Mf`%N{~?caY3pEBA!H?>M4&D7Bc2~z?Cg4V2FU2^+&OG`82 z%}<>=H779<&M6Np1tu~3J`UpA%+Wuvo9pWv4j(#n^vL1%j`leT348bM-SHwtDk&|^ z0}?)&^g*um_z>OpB{6y*by=CohLcu{8j+K-qBcA5wwSDu@t z&qL_LMi9#nx_-m5|B1e{^e0k|tNsMMkzf07 zwVRjB-2v)^`(qY>^W#6==|7?PLtPf$Z8Y?m;O)rBT%gl=3pGblDsLmz|I&L75O9U` zCS7^B{v3vXPp)4sF3{@8TnD|Kl$?y!P-|;y3X6)aXJ0QWEJEO5L}UcqHc;O981nVq zF20S^$nXe+G$Du(9v((R;4-u9^HI@XnDea4rn>!-lVET;NXQ&z>3&wyT}9;R_~e-pi+BjFNUWjA4^}V1 z*xH#h-<&w{B_?IZ#76JlvwO$(9dK~Cxw(@t*-K7GbSf@APX6U5C#rr;2K>I#5>sWB zi**1WW1Ee#kPQx623i_>iwXjkE>nkwIs<*sdL<+zY<+%P)xCR{FJHNE{=%HZImrGO z6%_?m&1C&B=sMWk*nH^FA@r~68ym2O@2=f@cD}eXA|hO(%T&uJM9WL#J}=roSnt`` zVeB6Dex4D5US28$E<4DV!btfV)xxR9U&e*%qu3@>KeV;C-K(lb*B@@>jD?vJ z1~N_$r4Octs{Ax6FV%qAibOFmWJRAJI?WY%hLGo4jr8~oX(II-j8TeY^YKP*<+QZ< z&ph)?`JHlbGj(1Xu)yb$N$K>dQ(qqc5eXvS)jb-HfxqX<73|v%SqB^hW@e356Y{^(nRV9qVFvHG3z(@ zb!)4ukzDxj;UicpB{4Dil~-TcvUN+Ke}GW(Kh~cVA4hBO(P|?1={I5tZGdU9Sr8UN zp(8NYVXyZaDX5vY9ypv4(TvH9*l-t97%8O&oAn$FZNiL31es7wiFp8xkyeG_LW&H* zTt)mtqX2iaFD>2l1}8OY_`_8iHEen~A{9Fi@`(>$ zx_s&2!Ou#{N|0f1%a$!~z4caXTpXiMawW<>bLy{DaNbRe`WqAwh{e+3nL2*r%iC2= z2hZk52J7QO1Ax5L%))9xh_M_0BaWhLBKwKa+`)?_G}WNEES|t)w5%UMP<{;B5c5Z} zK<|s4qR*WYJ_^>}(|e)dE|%#ltZLMGYS%AJesN`5VpK5ZbWt&!8~^D}|B1%Gr+=Wd zw%Ir^5FQY`Ff$X8bYQ8FR2EkjSs|AgRnl?9JwO9wtmH}EWWWWNWldR8v#4&SVL@y@a^^uW^33vwNa;ATr z2F?JNG#+eiZ!;N<&`0hFV8Ggcy!szPm9eTEML1&y9^A@aT9~9dnubSqDm>1#h&3Xd z^?Dy9ebd1s?SpyN7cX8sbmUNZ`JJG^fUR4$y|DcS#5G{eKzn6C`GugEfl;+p6p8>#Hg& zzdG?%Qo@{V+h4$X<$}8Q-x;HSz$?TOeSYYR4?cLmqT&u>x?kG!5_*+b2!iIyO_=^4 zh5Tz(?os~U5qdAI7v$#df)Hj@Gp=V3XS8NTCih6amf)7G$K(OAQMPhsK9Gati%3Vf-Bn z{V@iJF$3@tHW+DeF~Cn!L}!!9U%L%B-ts>d`fz=kl^;cRZ@3|BLxY%SNDFvlQY8EhNOgzEW!dQr|1hGub}^H|i{t6giRnOjZ9KHo)AJl-FM0 zd-rZd{>}Vva?9dF1An@GnVwT&kn~b#gp8I!{BaM3R_w!uQzj!WQeF#jPpX@^Lsv;+ z1*PGaCK!A|-e$6U=)_s!BUR0{qMFaXzmZ#7r&hVI%Sd=-ZDx96gqKD|6Xcy9|LIQu ziN?RCsiU#IXK>I3GqK|m51>B(Kh|9}ubnC7hCyieWsg2aD)GF^96huOG=V zkl(+vt0OlrCp=S;T3|;4^ zkJ4pfog^2A$~!##Sv%1WsVaN#$4(&`C7lo>Wo@&hnPp@t88~TVO|w<0~p3B$Z#OGL9=PF zw-?z@U5SajiCgsR`1eTtFuwH*ep0Y<&Du3sVY0QQrKGg<>(i%`Q&JXWq@$f9{AQm1 z=`wU7-t)jmpOlrAqr1ikXg zEBp5EkBErCOc5F0Sm6u&(H2v3JWmf7Pb9#VHkk0pjYpO|A6Q}ATP=tmA=fj)Nd}Od z*@R_ST42w&wRW_3ws*F*wYDLG1kPoewTSG_6lKz9>Na8h@F6Q%^MD9#2K?c3CQBY6 zn%JpS2y*u4EhHoa!OjJRMOUs|LTY}jO!)3w?<`)t7>Sz+tr6eb5;5s{0s7A;+}Y(ZvvYDy|JIZ8-v+9UceTzVo2 z(?bx2PNnOPv=L7bECG=Y#0yUWe96D6lw1^3p~J+}huzA8oP-26aubOo`no_!xj^@E zSw>UZ-?x+R3HCE2$Jc2LP~Pw<@wDRubVY_C?eE*k_Z|sC3gw2tC6Cgh{u1r(!D08!{17s1RdD>{{VNebs*Bc_*tQI(*5f5P@ z!?dS|;+e5NAm-m;jleFEPXj47Xv1u{o^Asc7=*JK>kM{wcEXs&`y%NwzJ(2v*l#u? zYg^W$MK8Vd5*F)2th3TgOVWG)ZidLGSHc{%KB<0of4L47eqHt0Ig)X;wM0yw6d zn*#5%!ZJabDWMM{){zS1xy_r)%1WJsky@@RMA6ksy!}p6QWE-Llc4`+rv8M&5|T4H@&oO6v#+il#*5n9T@&H!9jABKsTGSrDvqc)j@4%Z^#70B z7mWG6_S$Pm)^_XWt^Auei;4>GRaGJQuCbx9_;$(pb7!}1dmdAp6XFy2-KVYo3VKti zMo)i|M*J~p@I$&A8{qL3I;Mls!{;|8SoiH_;Xh^V3mfqyKlm?+jdCz6KSTj1mH()S zs9igEA=V-;F7~ZA-;9imq~yYctc39Wh)ZYkJw6>Rf9XT^EOK`GP^gE{La^uIYKD(l zY!(Yv420c+oOqa+NLD@OD#D)ch8f?7`HE!HQ*sRiJtIF}AEKaf0?Qur9TC)r)l|sc zjCc@tcfc7in^RL$_rLwts%KV_t3s55g%-?mXe(#?r%V*5qz_hWfByOB^YinMA3Iu6 z--;y5apC@Rqe8$N?^&9tYE9(ZfZ~egQe8R*{-O5=s0C z82EKI_-3oMprZbhZ*nf&x@#V=ElrKuy*hpI+!&pwNdMyO_)mBGPXhi}m+DSkOOMfn z7`Wu5L`?7|5hlhyxRb7lo1*55UwQ$XGwL@lFVAN;Y?zyxT73KVjr@E#m+#)aTU%d; znI%YnclO-5)z3WhcYpVHiF4*CwVTT_tDhw@@Q!7{(Z7ldLK++eKvD*LX~N`({B-1* zvwy{o0)13QjO3AJn59yFM%s&=B(KUF@rAgk@jLI(I2S}&z?Q|hd=xwH#-|?&9`ma`m>+@EHfhmK4qqW{O)Ms zD;UXuCW*h}MW3ew|Hg)fx|$kv$+2KY)}kyBXSno1f8SfbQPDSOCwl*p-iy*0eV?U-p zW41J3lbVQ`EuSC)8(|`%izqe4`WfiV>YwQ-pB(BZkE+I^P{T zcSJ@7}B|w79V7V1FM^6$cdK1)+%S_U9m^O7<^9 z#wfU*^1VUiN#^AK3--7wv>H_ehJyDbH?8%_a#z-le2Zu;;{&ez$ceMWOe zQq-%@E?%3N=&$plWelAj|LIQu$-%#~&s5uLFj*{~K7Mftb1MO4ZHEv%1sh2Y?e&*XmQX~?e3J81QMRzxk*6+?(+MAK2gd_sh8T3Wect?A8_El9-h!%NH^lw6`z0cdH$^%2M->IkByz5p3aRGOEL7HLhlC;lshsDAFAKvn-ir! z#|9r`B-gHGfAHalSFc<#_Vuq`v*vIA_HUOhU4{yd;xg`59LPH>p)X>w~hyn*PYL?cwPi9~U1R6TLVq zYxCw!B_*XfIXTFmjv2Dy;o-m)TE4!%{_v5*$iu&O-P-i|3;g}{2wTI

{r#+bo0#)d^(mLv!I zc{2^19slW0|4GBYrPI*X-HX*_u-bfNcsSC_KYjWE)fVG?5!%Sm(C`K6>Fd_6yIWP6 zeR0Rv@|o97Uv~t10N(7x`iNhJf zBAOZ+1A>Eo|K9IvYif@jJAqvCyLRmi3<}1OwIpR?ProxvKHWUL;}cYSUsFd%)&AyR zY<+z+m`G%y8s`Q#v$41P>Lv5m=RNd#rqIZsj#>&6Ys1gB) zaEg30Nd#S{hCUc7D=ja@)C+ViQd8%tDYStwo$-(~%!;#)s*XqeCdw1vk);T1EaT zd}PRtR_dXPLh8v6fq!^R?!Qn{KM|5l(vRDCi+#%+q%6J3E^CQvQw1NqlM=li{ zzjC{^yDusv;N^80Tb8B<`uVui3WdPSsqtsJO=J2`8vbBoV@FR*S09E&5G@fD5`wr0 z@pVa0fY;8cpQQ$51o{oC7y*nPUY=22QP9sz7B6}J`R!P>Tc^`;m376;lur+Qdg|1v zGpD~W1%+S{SLg&HhC~{0XGOpQjo=LU^&D$AA3#-}7>BWM^GRurfx5DW}h4`TI1{2l1`&IBwsz zwW*=ui!Z*oQ&D#G=;83NP^1A8$>UL2sZtDE{+}lLpe*X3AfLG@a3eD**sqMrM=Fde zptaXv?df#24PwDHP)e$kQz}1*(^-_6`QnZpHMKPj^$jOaeLZh}+Qy9=y|93QP-Ubu zut~^1HT*>YPiaZXCm(ImU zoV|U)bl~c$8kk>5CW$1H+|!oY-)VtAYY@p65;bv{@(DLO3{Y&uS>E7D!5U8#yJofB zx_Ps_wDkPha|uavGSV}aEnAwAnSoV7Xeu)=Ldz`*hN{MkF{*wvcHZ)Y%)_vqc!581(tZ(ZM*8A*Qowj?; zg75&&48WyuX8fl+{U;ND8B#h#5Rh(=?jAbAVVF7do$DO_^Mi}M*V^k{&vW0^ zyic{}PBl&j8yolX$Ew0Wye#R_&=L+oL*zER$}rt=*8TkcakO|!EcvGEhs&P?l*xo7 z87|mll7=#02-uk4u>(FiZ!^IP?-L5YdJ(dtw}zzbW`Ecu{56OK@MjPps>r~G;y?19 zP!8bkWrRG6B?IKp{KF;@atn|s=wHBqtpuj#BR!|u zVcGWf!70K<)>#P~=eMjh?4lqd!Xu!_?lkh(EZ}#xhn7%dhckQytbfk7r(h-p?)gK6 zcaQ)5E1Kba^Owys7M!!S^&x|AAJJw%J)8;X4ftr7rG)rVmUkMr%fp@+*>g#S4y=8x z??J)z^}c<)+F!8X?LhEw)+<&UpN?MMF5+!)1&00jSSbd6|H7#R$xq86VPwu1*xd}R zkJ-uHT+z|3@gt`frg?Vs)e{LBvS0;$)?wRDfggckN2?B92)VJZXh=M#+|pbshz7p9 zXh`$<#wCN#^sV(Asul?(UHsY7(F%KGHzV51t3fNnhm`aC>eMXg$7%Y28Viyr5+{}Z zzqp`xBj}Cc)|78uh|}U z{|tg&##~)pW$@d{%r%z3YN1M<$C@Kk3WU5R{HCc%K%h~D=p$Vm3i#BCd}eo@2oTh1 z2n`T3NufG0o6D27y1E28qDqap{_41-bAbm_?6}8LXE+5}Zk6O5nhWL1S&Ey0N!XR} z{{v>ZSWfXT7aBqx>uO7+E_R+qSE9gnx)kJj47yWCSK#wouo+a@Lf2GR%Mkv`BBC$& z_~b;p?Io6j@w#M*5Bf@RxPIQj&-+CTDhBsNTzT*mt0J~i4|lhwrcFjB zcG!8_MfLq@>G!GAjSf;6agYd)vc-EKa$j(O=@S_q=7;TOY1EqHk9*YX_2|)kxvyl8 zVfCPpz7P@Q1{UDsHuty<<`+&$;9}u z@7=ss_2E!M*Pb2 zI`)f7110s>mL*Lk5}s5@UNJ|ikhA}j2KZ$93bpf+yu9LZwRgVG7WH91*ZkD|@AP4F zLQ(#;DwEg8q7kll?@3f&gW|;7i;5r!;st_}iD>=EAos$_vTTz5(CzDKY!ZV2JLY3($aD>f2;hi$^la2=I!`Op&^|I{syX{ z756lg{wil=G1!afUk*=Bwjgk4+bUi_DXIC6(c@zu?dzW^-%O;G!`aq(mznQtQ};S;9IWX`rEK z;L&jombW02mppg$s_K7(!oCW*s~X3aYRL@SRd{KF{R623Al$v7IM{Aw?*AH))E7I^ z`z`iRpr72ETaDt{j#rLpWHCW^^CR~Qd}gcgk+utV!%jWrk*Y!2F0}L=)7n=`IWK%N zu)I3*kK`}cV;nRGFhso=!S{k7R9pEEi%@ zCI<9muJ(P*qs5$yD)Bv1g#hteTf(m~fdo4=Rn_b8SF%BK=l|H*-qWXx6CgnydohG^ z?+20&QfM@ZFXeXPbkn1MBi72Rqe+ULfq>G!l=tTg4aY#<)#OPZJ5x>DKiMDMvCT7y z|2tcZ3~eqsNSJwpN6OV~ayx#yXJLcF_Qr3-j9PjvH7gV{QW~9R2T8rWT3Wmc=?WVf zK2J;_I5Te1(aNd6;^X7DCFCz-F|jAW2!;UuCV7Ko(W-ix82L*XD~Es*>R*H)otc@$Qa=+^n#dO}oa={Rf3|)v!>ITGL9pfQljqQ9J;%OZp;1j$CA>Y< z`wCDfv|f%c3}b2FZTi%GySHfgWk^P>=~$349Vlqb8W}SD_K5))pN0nunc-LwN99KF zX>Yeu43ks78%@g7qHH#MsY`nb3`{SZIDnU5Cwdm#4#>vL!P<_{v#+>dPSEQfS&7?0 zJG-Af&@aYB+BgL7tHvnaH>^bUsOK4$Idv~BTb^_MOPbPUN_ZTld++*<=o{$jK6GE; zZ+(x|&W_dDN^9PBo^X?k!@)*LWoblI)a}Dfg6CD+yHS=gYnu~Esb1>7z9bUf&8M;g zIj8dbS=-MW4s0!YUX8UK{Z?E7Qm&v{ZRLse4}@cr($+h^`Odr95m!xBGEtO?K^;aPGGiIqcV(1!=nBKI-Y~q0my7A=NwS@Jp?OP7 zlj9PelS)k)K6bhYSJWU-)=owfYQxw8#b zb$e2M4`*8!y*tx?mq7QmI6N|1LNDpxO-aL)Myv4|*5Cx97jpCl%Ju#4H9iX$HUkI8 z!+pitcDxU)vy+O7%J!X(FCB@MwRP#AKVO-W;?!nz3=MAyaTu`_!BMS7q{9GgVcQAj z&QI>#q^H%2%W$fz@7qA<$KvYRC9_Y@g2Qj+6``iw_@PW2~#ch}Fr8~xch2c@$LB>H?5?zKO@-tVua_#9>?(oUFC)YAqTD2uP* z(l3%6XJ=VHfR&pgOYrB0dYLaWo%KMJkf^usP{QY9@#9L=`;p!&z5mh!mIFnM4y}%{ z2yl81L?kIsD3jZfqsn}eBP5{c1g`Q`RB6sVg4@7y7Xo^t)$Ou1z0X!ejM037c zbPk$q>M3+p*H*CE$;Oba-yAW#efy*XV#75w3j3;Oo0)=4gKTH<%v9B-A+@}X0p&?I zEfm|Dv8=6kJ6e7I(486cjiMlqWe=Bw=iPznm9uZFkHz^vp+R%2I(xMG4pXfPCc8Pa9+w0v76`r81h}Y&tv=9zT6d}7 zOQy%{HXT~4YLVl#uIXI~e=Twvifif{tSk;$YpOD%Pf(tkLXk{=5u)3yaqGNn>!&U= z^9~*cr`IT96^PykEv`1U#aAmgIJlpdA1n=^8{8kI>=W_0c)Cx4F~ zecyU?-jKV-eczoH>f@sTg-(k+AiyeL;gTv9};*b-O;LndQ(zh-y9b6-tj>hY6rx_{T2+748bRDdLi z+qHf1`x!e&M+bg7U+)xPZOAfH66j&i%R3O2vj$ev{^W^6kGcX5@(6zpvax6#=)IgB z7sATL3J@58-Bbh~xqSBLCGh9?0r+?aQAtS;!t<$kn|bC3KT_U z97B3DKQi*_B=rdWR7f8dlZ0j9gwP`c;Jz2nUBIfETq*%h)TdH|l`9kJprsloX$X)N zNMCccW9fWo+U;y+*1vMFn8&f&gJfuQU#EKSOGbuQ@B8E&Ez=hnQk#2pO$$}UghNZV zX3-vR6A|^c3WIzF`J*;1+vD>%$W!UZ`0q1Z8vqjPh-Ct;cr54Gfq}vQPJH@=4r{G$ zSKEd4w^5g2)myRH^<#&WO(c9hxp7h^^eHZDa|jmRp>qH*j2d z3)&50IG0JbP&7`dQUcy8I}-`LhMN||5N0mezcl<^Si4SMX$1J{V9hYi<|A?Myy->K z!1WgP4DfTxhOH8Ws0JFu&<2W%>K}S039-Gc(QyBuFS|=W)#b=XP6vwISW8=+bE?>w zn~8bHuM-C;GLTZl@@9XYdY}Acj7(P7k2Qi~BBB4)M&ocult*;EZ;bTEb%zKOj;@y0 z^8liaV%Xxkcf2=Stf~wK&@c!yh|-912?{cctPL#^{wN(9?CLQ&pKBtW=rGv{MMK&! zG3qw^+;HDy!Ynp48mdP6PAm#XPulJaY`4U6Gt7nbhOu9xZb}smUhw8V)Cglh|Iy(b zunzlDu9x6Hb$(un&=3PJ|Dhmo$X|He)>}VYy;4%l8r(nHOODbQ`aVERo&o&$iqj2> z-d!o&=0S68IIjC7~Z_0++SC32-fVF2Y9#lA#>`C<9A!wQ3DcDfvy5W-ntn zE!SkX?J)+WQ;dZAG{ZKkfosAzw;wF})<+>P2lj^Se_p9C&zg8tjAtg`R%qr)kqY3z zTbSY5>Uyw*Ua?o2^K0Q`MBOCsR-a7g1hBYKAMs9c?GShA9I#)h8Q+4#UlLn?{VLd% zt{VslN3wDaaLZ|Hdv-sss5_XvKY8YWIdX9Us9fwd_fN+Y6B7?p8C@BBPT$;7oGWI=Ej(fW@%LslN>LnC^)JB(DbV+ zARF23Yv<6m(NrP_s*?$Uy&XIl_>ZBhi?GlBI3?`SM_R=V1{((4BP5&ygM-w0qYWY^ zFDjVu%n^y1Rhz6VQU*A8nyrq)=K8WJn`Z{g|e_7CFu|iiDK`>MM;k7#)w_8v^ zH*?)$*IS>NTkZm|2uT)`WI(Uja*Ik^ zt7NObj;eoCH*ZV}v)x5qK(=3f?Nds*Lz4~Er!C>Qi7~n=nRLKt5 zL01tWo-{7|&%bD5dLSEApws7C{_R5ueJs%`1tP5A-8LzA1 zdlC8aY`@tVjnetgfhd<8#p!14VnjKfifc zMDTuyv$k@YEcF2Dl`wC4y2I$^{ig%P^Q4>^AFe82ZzVaaUkj=g1zK(d_Pp*85P>c*fUk8&*L2+`wR_+gWGbb1fM8j%Pn2X|}A`HOip7n1aGBUCe1Q7I% z_*gaoKJ>RK>FFOi!^q}+&ed$F{t$>t$RwZTJPOxSkt!f;oI*<+{a9?#M3gyzW$q%wc8Y>cFp&4T47jAGx)Oj(K^{T^~)=#sbFGmP4Nix zDyBj8aDIy0$a?;S)O-G_6-8-A?sBJWzO&tiFg+LH6-?pK5Ac%ZXiQFSga$~Sh6V>a ztheqVJahxa{WIG`vZdkIG4qV|Sua`Ri#3Dz9Z}xQbfs2Zo)N5AZBapR6jTfvP&~ee zmTfdCPKssG^YWb`mfVFu_;(T}eTHrt`>FXs*`tL;;N=NNdwQVFN?LIAW>OpM`|>qZbWji|}Gs?HNqgZ(ayd62yopUO_D%gf2hE3K`s+#62H`>95? z%%q0fKA6{nMOPD?7)&`1@4X4XLb0Y(`%;K+jpf7h_$TG7ji*~LLMtr&+Fcldt{{22bXU~~-HNe8f zC12v{8iw}Dtl70`Q~RvI`lw{yTB}MwaPbMzv(j(zzU##zJjW-bs@2oc@xHpI8$S(w z*fxY+ryR0|weRZr_DViV?`ik{0`2_ z%|c008x6JhAc4Peh{=udG{#J$1OL;NB^LJj_`d-D2)m3_RN zxdaYQk5jl#7N(?yFMvcWfsxW=cvijQn_BF7A>ql%@iqE&3^{;=9B1#MI5G;u(rpXv z5o`u~i@ao)S!DQ+xKf!C6#?E{X)(35bGzFs(^3TkveMH@$O4>VdmiUT66q49=E|CZ zQ9#osff>KwL7g*J(w5N=n?CTl67@#~Uc@VkC>Z-3Z4X@5@|_!-Q~U(WN*czZZZJeVRGJz%S0kqSUu7mh-@lma>ysNqaC38- zOsYDLuNC38$lq{aIA$WX-KAcdHl!-Azw@2mgQbXYc`4@w>wQlK&?a;Gcvf>r<>$s+ zF>R`T*_wUVEk>dOsY$gWRa&L=GD4624Q1+^We%YSUU zTfM|9;*a>xT82y=@!Y%KHd67^IEW3mo6q)IDq|@m_>7S=QZAU7exsUP;>hiF*{C7V z$>C+iFUJVWDzw`p8toDf*nCO7@9V$jATZ;F;Ga9)s0J7v*LFBZ4FP_|6WI`#qhJ~31uB(Ak)d%%$R)2<`;0OT{y9S_Dd~GE%(MGAEh`~#hT)dP>;M$LKi7oFRv{-iqt@>1 zsFftnrS=|tVrsRD)TS&1iWl)AM_h>kBt9?*fO-N(M~Vb7gk2E zYMv3L%qNKT{)FzYpNDa4%6Po9tJ9FZy(9cQOx@&a8G5yi(w4tV`XA;`co8adm*oDc zusNBl-AO+E@KQosv0@PnVC#mvcM!xJce`YGDbXenndtKZiQ5;rFeB*-X`$aTn}%~n z{h%gDzZod`g-nlL95AO%vq>#uveXy44aQui1xWf{b1S`qt2#U@lzd~?=Hzf&;ic7F z`15(~TI}upCWZ1&RoAx?WaUnNL(qQ+9;o@j= zHpo!5L}LREGay!QNe0D@>`w15u&tJr+SqS2JMlG{$tWFSR>V{(sK`WU$N;;SJoHVn zY65D8tdzeZnOq_fXXWMY3P{T*r4>DKak~n1cXHJ6q2{wRZjz~VEgG$W&L>a0q37E`9=(AHaafs=;vl6YS#a`j%rz|Z^WE11b`%!+wlfJC0JYl@sq! zt3FD!mE-BvpVl{ThdvGjI#j!UEJlrYuaG0l4{j23(rcgczx~oVz(yh4wsWwlTX+fX zs@@rWE2aDy?fphz$Dp^|E+Fj(z@@g`ER};|D3monIYv%mEg;?Wk%2ovB}__%GR+Zj zyp5*+DC5V(X<3;ViQ|8XFszmX`FZ+8Yt^xnHly*-7Jo1Sd(&KxCNR=)h!RLX7B5!m!xBpH!*7 zGhFlD{gq89At7J<+Ul58NHe4Amf~qVvy9ay=Yh4C*AI|kmmd3soa#_9PUWYbYcVr; zIMnL!CURLh;U`#>&Y;xF&hTeh%TU;xZ-Egg;&GfmsFIHG47jPnCsMD%4MvDiq6?l< zQ$CBb0nZ?A`dQ>$H8t%`s2@<9fhQdg8$3kOsfSF$!agU-70b&mp*3*saMlG5DslXJ zM*AOCxuleMyxfH<e6g--6~-pD2xA22u@hvy4biuej16_~J~%MtF}N zIKBXNDAqts4v&_7S2*k6h2=Y&?IRCFkiXvJ@dWA%!hucaI zH@;#b3K2OxWm?ThY8LJx_AX?=4yUc@0VrJHQOZTDsYuaY(5r4t;%%Et<2p9%vOk%XrYEh@dqZ*(v)Ky@5JLPW0>R8({t zoWHoZp!W)pd?=h5%Gr1}e|Wf9_h7ide0Nt=TxbWnDx9AZJ=lr##1yp-x-blM_b_=O zl$U{C4upJ<1%8amSFEi0Gfn6?=)0+;k_ z!%u;+_H-;!1ID*mym7fy(BsNW_gRu>LmTPbXdRMEMpGz^9F@kLwX~@4^0l_Xl@Mfy;rXn*)gV z^VbL_TF_k1ae6wI2dMcufBnOUyUX8I9rwqR9#j3v zbO>32b4@qh*d;_!+R0Qi_iQGZ*M}}Wwo$fnj?wrga_Mjob6k3!a4=)aoaN*jYMAZb z&K+6bKAI|mK$~Z}O^A;Y&X2>Qhdia~}6<%ab8YCD^5mrod17lSc2kA%F1Tk37$)54Cjk%wtuNT=`ax#FkS80(F@*;|*mBK| zY@ACP#V!fNyaIU=bHV;uDdL}fc93M`C3;7GZ(ko+_fAh!lb(LRLsP@;(OSaNL+p;V zD7edo8fJ80*uTU@PR$L)D+6Gy@V7>jkVO&MIf}wePplyC@}Capp1Ovg4I?XA(ElOwCQr~QEh+S642fKBdgwKoujMO4;h)KShHKNK9U~`b+`7Qqv z)RuT8#sMR1>YQGxiUrTsvlv_^&d4@=>B25lz{kanxc49_aHeSN+j3#W3W3z82*L2=z53Jr%E=;dzf75j+6P{t%9S)XD!eJ%R7eG9{tHi z^u&Q8pQr*N)4oAp4c#yHsqhFZ-luPv9+9OPoL&mQtKuh7etLQ;Rt5L`DW5M}>>n7K z9mpiIdrAsi+@Vd5o3%_qXZ=O7)8lm8(eYWH3Gl;(&ObNel2Li3yu0C~kIzBPv>s2f z!vqHt0*x00Wi$0?pNq-pk5JsF)QIv|G}+*9s)o_4k@P2$zI}#3(oZ+c)S7 zR6YbTlVq^@obEF=s-pt72e{Sl?0*KT=l2h3FK__YQJEqR@*)(sfbO%^$SKXyb}G9Xt@L}4y4{}T?y3B+1wg^Vaex+6xD*g1)E!8IIw z&kj7lqCN~g62>~u9#}Vod$^ua3d4W*7Ye-ZTz&dx3)b&yLylhN5et!cZ#vO zF>DXOfOwev^0LxHq40c;XcSPQ!i4$BvXlLe|B?_KMZ`B5y6wVx8?AZr)PCKy`66mz zt3I+fHKF`eC7fI+{mt<8s=D-3R4^deHglva1JEx_0nLfi{I&{txie7$5EFu{pMu%Y z(40<#Z(sYIH;S!c#7z4A^|k6HNAmRfYBTp*!asG3z@n?FijrKG^JejZL4{1n^$_-g z3%$R&ksTG*ywg*I5f!?gLGE;$oVl1*{uYicNh|O@^AS8b>ONdPqbIy_jNYrcrBkXl zGqA$xH%}m$kH|$Q->NaCkleSi01v;43_6_Y?bu}==v&ISyo9^@_Z{&>sO(Z|-^$D1 z%d0dJMc-P7{UGn}<&ucj0;n8-xlk*NyB9kr>a&C8v^E{cx55Lngw6V8l zXJ!`i++xue--_9MQqz_epdNeENV&af&0BBS^6lZN7#Qrq_D&Rgk4~#mNiov*ih zXpS?-!Riv4hf{!;^3u{3)#B9_mxEP@j=g;!Sm7ZMZA#7MgL{@%M}-b?IP zVHn_CfbokQ&I5DI{1jTcdKKxu_@JW8b|zfLRDJ#N;|C%eQPlyH*~nURK->hKF4ql< z%`R?woQ-~0O7%kU?BP#hu%Q*VlV&)zy&V2pnP44I(j3GM#KnrfEW}GF2M%sT=+Ae? z2?Yle#*Ejf-yxi=)b6-DTU`_7A-Ms74ZnQ+JQ9 zT>XnNsc*1x4Q_ktHyQK@h6Eeh(7>B&2UjK$hTmT?mG*x!sl9vBGwvovFi8Z}YH{+5 z9cnOlQ|93yA60x!{!dgon$G=Gd~9;jm~@zA5}V7=wj+dTV7Pc~ZFzQK-IAE-7u98A2;U|YYno}&;fjvjqGRapQpX8xnyMBu3Xejn`{LSH(4dN16!1jT_=84T zq`REP&`Fs~W#FWxaL>kFvN^;)$0}FuOFPBl)~97@?m5@=4=)~^K#R@bH-dp6|IXsj zrpzLHLXF`JBc=D+S3@z%fREi`c+)e8>yGCguIf5iU1xL(VH*3wyFwwM$XD9a! zEAG`G5Cz(7g1RtVk$AG^V!aZLpAC=HL#_;{8eb2Bwp{A3AFgKFtIZXq)ORT1mncff zcgvRGw{KCpn(c%EzEscn9KS^26q@Kl{R?NCtH1*xK?%ouE>uBTOR*v@{z#yJSS6scaVlAnxmIvPL7Qtt0<4$O&6RT1%T*E z>&?t?N(nvt=fPMZ_h<3%m>&dk!W!NWMypPz`96=ENoIx#o2Fo?IcmO0I+hu3g3eav zV*s#2$lZy-w-JOfWYhO#;xPz$vN`f*D$O<9SLTbMKU!v;i+g8#SxX_YXcs2Xg;BiN z=V9F=-xT{d9`Xpky{}3hJU|7^3R0c=^XHGlgVJ*P^CnzBTKc2;OGG{4z8*AVI!s{u9qr$_ zY{pjp6S68sb#2dgebrO|gfNBIsP zJC-V8_e~SZJY0?)R`!q*;|RTRZ}~vji=OG^9x|3z|$$3JM1$Yn`99s znAsW4TyuyFE9M3YOrKY>-xfkH1F<6Bqx*jDB;~hTf&EoX^$4S9G`-BfMl-Kp{1n$Yz10VpG`>=Wy5KH?B_4#er`ZbkrEZ*r}AP`D;+1I~67}Md4 zj4k+94Aq?qY3j~q5q?{YHJL3MD2pJpZ=E%5j*e#1xL4y-V9}vre%Vrn$}`Zfz%Y7Z zc=k+LM9QW#t{GPN4Wp-A$}}4r_)Kfl@_O@-P_W)1WQnylgfeyivhHvmJ-A>$UXWGo zU*b*T<8cvZRs;bfqG`RZKiE7OI_gWUKfa>hIj|iSZQN%*^npQ)6sExD;qfw`OmOSK;xrsT%LJ@)K0G ztqu*_pU)##8}(bA_Ymzck_I6f(deksrQs%#X`Va8v%IV)58XcGU*GumPnKL9jQZm9KiIQkb#<%*&2jA z-1qW|&CA~1P}LHKWhtziez_gp)=nEAd$@Fjp7KssdiL;*Jq=~=l-%KsjX-@!B{*t| zYdUl~7KB)r*bwr_O$ylgel#hnY)DXug@yS@A@{R&(BITnp}V^Vf_(oU6y-re{@WyN z!XMn`hhJ~A<<9ZO=w$YGtp{eiK@MYaDR8cO_m#hVdCQ=ZDFQkd8SH|dZNlv2q45s|SAE zi&-m@E78+3jCoQCjC-M_C1Uc{7M{KLg}F9?@G{@q1?j&I>8+}1q})wrHhJc| zt=SjF2{4!rCNn)$@dZg%YV;2d7EH)xWMqkYOlJ1?OOL-kWb z(Gz@ZnGpKv-KqnQcwYS=Go{*wJwyYAvO!=5;HbPk5?r~L2%+xkrq>GD7Sy}1Wu`ZS& zn^HLDq(XS2_=M-Gd7Lq~?q%m`{%dz83ONwgVQTB^nlP@=SL+d^N6b*mj<6%-ws6dN z9?H+aI=7tiMz4n&8wQ8cGwQdZU+sBTuf^S68zhd~kcnbez;>VD9+3x0IAD z;t;;OQ;fJq(J0XnCp7+LjZ1Z(YmR%ILe8L?0rIcsy7iqMj7D4pEuP$^e!!HC6{u`0 zyE%QTLyTIEehrWiQ}17P^+sl!l5i;FF7eVlZqOn3IiQeus0d092e?vxc2 zBrwQDu(l~F`%xI9ew&tie^Mp5Y;*gt)XPB@j7Kuih7#wE#9d#Vn? z+p#l@P6Rzt=#A>Q`c9q83<_rXNIy@UbI*XB@`u^Bn^!~aA#a?EVxh$GIRfpA)9kV^ zylpU2DwTuvl|zkoSt)ZD;PwvTSN8Vy=EB`h(ywAQ?Cc#{343B6EDG;bC5AZ}W76xUWADhRa2$*N(`eM*O2d?9i1a3o)l` zHuI>q7`ZW&k~2&LwU;8^^?`>xLMpo;g;`mTkTI>wwPr7J{Xf{ses@Xwg3E%bZ~VUP zR^8vI>b8q`%jg(dGC&R>hi`cO{KkDSL%|HAlyM9D4yaU+5@302hjtqSL+8;61bJx%);N*VujpFk1{wgjs$a7>jwORF# zpoZZe1Fw?rwbPEfZ>Zcvq`{QC7A~of&la%tTlvHB&JnY}^ETNm%uM#y*7jC^;FnXB zCYcDo6DE+#$bJle*MT>kv-~1I=HB;tz3JrzvRr3zw$x&J6<+?PG-c2C@VmR8 z4;+V$3)+U83o8*ChH7dx0FsI&45Dq&`u%I%)M3aNJ(4_RM%cm9d~&kQr75R6r#-K{ zq3{FS48pc+njMSK91t4%Iw3?cj{R#eM|IY7bc0^B`?M7kWL#ISyksKXwkRNyY56FC z<<8^%7{cYzMB=_EI z-;T@Va?R(52P@=tdZlV6u^zzxdu%(lvu%67^Q%L6zclk+><#woEL;aV~i0>{Mf{;;lWuyDc^tGCUqqNspiE9LXOi{AF@W)J=mK{ zIyi)+A6AZ+SCb2D=I6$&p|@ERT^XIGSEj_5Ru|`XwijG!Y={~|50%8B`==GMfW+pD z_WRsb*w=|cN;ccE)4pFS2VIE2M}9=!!};d==3;}RWpioHb7wF*0NNJXC7db9aMJR< zOshhVm?VU1vN?gdOFVe_bq|?9Cs2|;to(zKWaJ;fecxc0HpRgC6l&?^?YCAyO{rA?jA*Yg3;Jvdt@Pq|~4 zfXEpB{o5zGYT#wQi1`&FH*g(RL0OFWFmXo(7q{0NCQdKgxmaQ zx-VzZAAV&SI?8FAD17xS(8x9V5Ei%PA^_L}~4BkUyz&FMZzY7ACK4kF4(%f+R8Nzdv}v-N>VP5yV1 znE6HyAMT&{>m$1KpIH?@=}i2^vR_Qvww*kl6%xrtE|!z9Qr^6hQg>_%0qqI^kIyoi znh4(&88K54MI!c22XA9^Auc1xr%L3S?A8;Gc~#c@2Jrg^Ygj<=x~OQDeikA*0&qXo z{wn^7J9C@-eLN)|%O+h|Ny_Wz&FZ1+=fJtS&44%i>@(O;~Fj?dqTp^YP5Ic#85! z1o58@UA!RLHSIp^yFYK71l&ePhljs^pT{q(n}LB%jlre2L~@m&-6cSSu}F(HxH`K6 zxYb}zvKnWgr)4*6Y%gs+Hn{3QG)fT!ijwm7_WJsQihNO4TF;(duQgv|X`D`2FM}fO z;g;NvY!*AEeI)&7*oe#_j|g|HHcAfIL6*SXdyx4ZUm*W~8yl8Z6wD zPZVoq(n`VG5OOQOH>m0C!Wxb*(=fgoAy!NoKx}XAs;@^ z&!3S$kBupS9@;kP=;$Ugn#4;IZy&Df^lI`Q?N_)`D$&H2Z#MJqR@c{~pCmuX(8ROlcmzsT8i^0wvFm|)$lg82 z0sSQzX^4~Ms|+Wt#6C4g#T{wK>I(XtuenWCb!31+$G1miDI5q(kgV*GkD0R*gV2KdH48ejy6|~$&}jL zX#@wrzO3?OzVrxwTJ#IcBNhAj4>XevPL78pfT2X2WhSQEd8Vd^x_E5%Pr~9b?7Ri7 zI@_aKNJz;3V6x9cBo^>lSz03qtVv2jAk#Qx2h!G6ug4+th_MG(Px4UnG9ZD6c^mB4 zTLS{1h?wwts}_)*pOaaekn}Y49-n$(mzPO9Dp-j)o#r<179BnuV%ptagN8P2_-*S= z@zUOS!Zz8M#jr1S;e=7aAAPATJ<{)tkXJ!T-#pre6X<9T!K2kNF60AC`P)Ut+C5I9I zRdbJRgyv`yscB}WiXyg>c-ETj;XFk$Ik1?TXXWG0kD?f~D{SeIu8!${Y}>XiDgx4=fRfVP9WzqWB@I&24bnMM(jW~Y4BZXVFw)W`UDDk!#MD2}`)&Uk zYs|vjb6?ka9>>1>U2h)q7Jwh#mmS%E2mbWeR=cexRZzKd$JD{5h~gCq zsL=@x&u&r_e7lxxO#(tqthB_9$3M$mkE!E@h#CI)E9hDrQ-YI; zFSeIF_AmHIwyPSy&jvxO{=Tty=i|$?d7I+aaMh6ZY)4j&w+RrD5klOu@uHZgosH^U z?kX}OdNV7P(5>HrWsJy->Z?WqyALe#xq}&m&OU5=3<0k94}N?)>b0^^$DxOnq5)BszdQln05%=XI1#D&YHp8uBhq$_g9x* z$HJ-WJY66ZvON1Pg+bQyZG@hhK)%)qd12o_0s_4=AWq^Zzi`Wt$z9b8X)c#z(eE)Zx2&4od*Twmlc>6>r~~YG&suZeaQCZ-w<3ddr+HpsnLwzVP)37%tZTqWrG4pqx`B?d=1Wzoq zM;hKonlwjrLa2oGJs*fQZTtKo=1;?}#UuKWiN!X8*A29{C5Pk6sSn`RTT|GU4ov8H zk`&YLtk8^{le@~Q{Z;@%<-=SWI^y_-@Yo84_0Z2chWNL~#>dBr zsFi8As9}ae0c9m@T%gz`om`*F2HwfPu@vo3g#U7dGp&;JnB7OB#9s(9H6@J2KJ(y*$|5K%Q;{-};~gn7rDb_~1odT+i)}EtJ?AJU&h(B(du% zR-FuQPdq)Z`f?%6u{J2g?DTU4X#THclBot4?~w-rXL_5@q7j(r&K&>^d`0sHhZbmf zB|Tc)*cF5d;XxjXpmdCNNh$JHn(VKST|0AAGo#MmSlKH1JvFKu$kpsxySHd?H+=ZF zZRV_ix@)Nb{i$?4I1w;>@g1W_pD8}|Swnjc56_0jyRL8Z zzxIdUS5=9{l5s1lOkxufrqrt+Y-bRjV7ydu9a=U29z4fQ-PPB4eUIrw~l9h`KoY04)*zn^-r6O20E8lm z={X&qRN6Z%P>!RI)qK-@zr&u0^I!JTLJ#Odk|={MWI2gFPslHY+YQ`EozS+$!od4I_`$?LuKkX-8*gK~qyxb4hz%-NC`-Hjcadn?@UMgH~RTy_2#( zik|ZOT%Z!NkNDan1~)3uZ^vZNNW&bZzqNO@!M7ZP_$Tj#Zi-vSwt49s>DEY+&{?elZ?Tq zP90`jXu6@vH?fX1hD*Y15@O<-kL6EpOZEn1M%c4dlag{1aOCA5eDlI`Gh{Zarxk_X z@;t{4pN`eB_Z`5vbAb!Y^7%n~W@k6dB72TAYCk!HI zUodYo`0I9WWNoe8(qo6Ni7>~a!C4M==du}1i{`YnOiW67yIRovmRc0-Jdsw){}qq? zu}BpDT$RD2Q^j1TQO8&VhRIziAHT8UOqYg&~Yw=$-NOD`{`H zF`baa>(yl4+2K=~SHDY4Y;v7QhL{(bV518A5=XB$=9X^v2?62bM%{t(^Czkz!9PpQ z#zteZXpom^%WGvV!66K0JC=Di^fftH@Bk?H#CI=c5L9^(0%yw`6T|3bH8+z6jd?AaThAf!3ev-IM;L?b2${fu#fgS$43+;7W`?^XivGvUtTKlTxD zc)#z9T$ZnDU#qCwSD^}3W>(28rho%@7|vK{m%*}l;Ex7#BxlOHdA}#yhb|0(4IO>` z{k^?hF)#MJ32MQcE+&%j=&4-VpC2MKX<~yVRwQc8Al}E&)6|_*Yn61mkld-CAVEM5 z2Q9xy)#u;uKkI*5ghkwknepAn;?Z;{h+6qDtSgq)GH^Mm@q#h|U2@SZFKVp=nn*OJ z)6=!k*SI(UB#0Fg?*HMyGH-Rs!xr#xp91gj;TRc3mt=^o$>gs74r7T^|E9uu%8g+| z^}FRW!8@zkhPv}{yljoZ(q|V885~5be!Fuf_u+FZv)9vSgoMF4%id#wFn9 zjzFjed-XV;CY2^DK;n%3mVCsp)vYI;i^qIjzGxqKu^ZCi_mGO8-Y5|QKgNHICFh32 zAgBNft)x%+2F-yF8XE}vFZ`cJ4i+6)+HD8B`F<`Q#l&t!@`;t@C_F0s{P3l#BkdI5 zIVh9pr*iL!z{vcpV|Q@vp{Yq}L|2EKOfx^Or<9bxfBSUyx*h+E$QMHcgO>B%(L?)0 zLf3e8#W{LMuhfP>xLKT)~}&hdoNr781mZ=rW2=*5l%EZ){N!<3`u zXzsXNp2tXep0x)f-vH5+XC`3fkuQJ}QE}{k0x@qm|+iTIhc@t0OVWGS2 z+AZn>s2#Jax9X4Vx`eN`l_ybvzE%!u{4ZpJ`#U%;c!&W^(^X#4R%q;cG5cr{_rs|A z)#s6?!J;4ESiR9(v@lZhN05lVDM6eIqC{DrpR|2LXgTU+vfY5utg?03B@9c`X?|?CtIr|K{1tjnB^cTbhHu5hm=Go)!&UCx&C-y%3C&I zD*Np4<=xzB!ydHe)d?b5wrBa^+X2(ZwOv|f8y7uTw1UDSXrvaBr9ItT1}Jpg2#?z) z6%FhRa*Kmg%Wq6>po*z^*1CgWf+dUXUogQ~1qFrQHNGX+NG*4Z<)VVa(DT=8)XgNM z&HMJPcmcOT-9K_5>ft1-(GV%*|FgCAltl!gJ&a_CS$1qPXLk!5RtCiK!+YGdI$m`* zR8B7bT}rfv>+r8f4(!c7N5zUzs_KH!#lFHGiZ{f>V4}pyU2bE@@9MTbbEl)bx=>KV zq>ST}0U-lbXMf8K)3-%(D?M7b`c-e6m?|Z-ptSISOi6!^<$&`R!+5g67q7`5e;tgY zi_b>})nf{0(z8B`WN)oW^Jb+`@N1O}bX$_ABPBZkE!oL#aare)CbQ|9Hvit}GB8!U zUgT=;B(1Is0)fg^V@jtxu--f=_)uxF0<1IHp>e*l<(x7(@y-|^yx+$AtiZ`(xi$_| zGAB8KXo8md*6!U&0L0qeAjl0N2;P_PN|3*yE%SLRA;a6oYK-c{`fw1Ea+w&lgWmfc zy**ksTKS%PH?^=qC%=adS);?k5wEOPz1vS&!U{&0ZE4NMdn0i9PSq@fWR=v=#pl?R z-ei|1dJ6WYlLStK4`ZZHvR2f1d4||AKUSB&s}Bf3gYK+*o}O6 z-HL}V5iS|kz4V!@#sPW9!$Z~a@vGsF*{#0dPK))CB_;N@)a)tu8QZsR^yo!lQOVG; zkK`4`V>=A**En@o*I-oUMcsuPPJF^HuI7#l>N~3+asnCo{Z8U; zjtY9)Ve&Sj4v#TT1OJ3v+c-sqxmg93U(QNC4HVadyxYu2ok9>`bmSd91^-fezwQdU zTgl6N-(>&lOIylOhUEjO6$uEtNiqaIHXXWlKiC-B8~VvF_3#ifGBcg}xo>0LyTdE1*mReYc$~4f3IH;(V_O47cT8fkYpTWSZ;JiK~HC;8? zAgP+@xVWg8gdNknB&5&Pts`|E1us9|TCKes&dB?5%$IqVw!a;C@iWK&8fOJHW*tGX zLV{&26Wg>CpOUa^ellIh;1IXY7QfXy{+bbFu%r%A^hWPGJ}4{m%Zv@k57$(1z_PdR zVnP2{+-G^#Kly0E>tu*an@4_&?!6uw2kJkfk(or6eT0qL=t7(x(k8a8q2X#^k=V(-!jC2Fv{>o9-6VL(+Q@=74?=;!{!{QQif1mR5B-q1Lf2(mwswNWck8mmn|M`92-9Lt*1$LP*S z{z+B)g~KQsT!#7W*}e3%`PIKTVehi}O{(s=M&Y;6uBn~I>+_pi3WW#iF%iC}aud&- zX~zbkmv;;5pEzWELc%Y8x6E7Bj%J+|YHCUl`ot#!Xkt)wyNu|;a#jpY<%avn(C7MQ zpIc$Cn;%trJL@<&1og2i*zw{u8$Dz+u<@n@sa~Q@QpJK_t)iz09pA6nfM{6#l|o7E zV(VgA*&imA3>{saPpzI0d*hV$_V#}aLu%fAf7h@collEfx6`3OuHWD$k9 z+(t+RHQL&CBbT#B^*9Sp{;95#=50i05av=OW&W)9#Ju{_Jg-A}>u>(4LespY`|k;6 z$TVMOtt+;07U%O07!iPa09YW8R;EDiA3)MZreh6XVDr^d0nme|PiJOl4Agyy@3!W( zZb!A?62<`S2*94PS=(pKWcr}{9xUtP*I0y9ic0De!xQPl7k=*rM<(jQf1EVGo89-E z5l-X)BL#WTryK#;h!7h-cn=C+FI_! zBwiTBnYEJ|m6rAxheaIoJd4b2nIJrU&~$`y>Fl@}FOY+yu_hlQ1;)0cylTPw z<}4#M(C5HdP!>I#-rpM=R-9B+Q;Uy}$0xv%7WZY8>5&b$P5yHr28BOkym6W*vi9A! z9SB&wt%(Bne7T^H@GvJ}o@s>TI7@47GW^d~UT(|ez-PS4LjqI2BusF%9CV4+W+l5?3B+}>K~ z{f!4vnr5o~quA|$HdrVyk3v}Ij?ha_VW;J>RbOeq&5S*Xe_R8Y^knXP&s-{MYU6V-4{Obv+64^ zhCP+b3EoEWF9cYn8HM!_ME0PtIHX^x1{M=w67uRRxizIRMT&zSeRmJ1|E>m}+}EQQ z;?T<4?vdf);gK=b9Do#>49Cfd*SGrmOD@Py?(y|jC8Gng)%$c@<5yxUF~I)HZ|0F^ zJ+3>BTS;V(192Pw0!C$T3=NhN0Nk%#Z8b>Q_(PrK73BDPz5jfW9HO0cd82GrMSr3N zcYxs@L@CNH5-dgS)2RG+BIOT?UHW9Ig}hyeB%lSXuFs*d7dJT)K7f`zF=`tqQU1RX z_%m$Fc^+|2mhp*?_JNcm=U%^B!jg@SY01Du#Ne{4d|}#BNt;KR*Lg7cxBvT>B2klL zRZBp0^bpz%HAa(9CH?3nIaLewhK7b_r^JGPQKGz|145V4i5NVc7f-*{P)P*C(V*)( zC4w4S)XV~NyBj4&Zgz5bK3iQ`_KR< z_6l}h%;{lLmXws_WbNeHskwJt_@~pqf4@(YQF`W1D-AyQm#EdJ{Pkx%Kw{WJ;%}$w zyN57$Q#aUF#{>DTQiV@=U?wR&{2$~ALG1T^gV*!DVd$RLe8~KKbKy_|x-w>~ ztD7b*Ep2SN_&8FNaalgBK3}Aiy%RzE$w8wl(AVCN@68bfK<*75ah&BvShpq4r8|0K zhQ`D`AYr6v2nMdyg*@8)bYj?OUeFVD@6^1Vjy{4$z5OHya7&o14y@@cs;aK;s%yWT z8tACcN4~k-B;ko>8KuDh409w$Gp1h-brp|?;R-zb<3DQTd_`h>G{F8oX;6D@e)zJNP9RhWazdv$~=8;FBjZ%Ie$ydnCo> z0L&?EZC#~>rDojP-y*^v?Gar>taV&ZDYC5dgMLyp5C>lrp0In5|3i3>OW(m5NO3cg z>E4wN0o&lyrwsg(A9bjuR?K(V41srjguwoRfzlFnm25sKE-3~!HnvpE z1l~5<{ft*qI*=1`$}rYc>zSL_I(|xz9x?jVFY3`e6L&n_P*5IaZb=-AkR?b8+!*I?=6{h_WG<$X5JeqOY~E~A#M%Ag^KS%cA~JtWEGo1 z%qHmD{Mo^TVAbd0t406^KfNzg4L5Z})iQ2Fi8HPNwzginLf!B0VGn4M%`h9L02g1Rv}ayem@a@Pk@Tvd;(GkG!{p`wh~=hTjOb4 zSf2Mj-BVNL4LbUJ*dHGLa7|ui0^ydD!cQ4`39rYBzPS{9jMwHYNjzn^FLh*Y4iaTG zmZZR2c3?oUxeenozEn@8g)DeS`X;S(yDN#RK)mnYwYKg8qbx8&Ei-^Gm_BuS63ech z?d>}T2J+$FjMjEiWqfB9{4=PwVFDR6-`G)py&P=Z?1Tm}%Mpe#3?*P;M&z}8`TUvW zil^i9{5@QP5PU#mx25v`SpZqYq?9fGr$4q}Ou(N&(5A~k+~P%yOJ=yFBnfo*0R6tTegVtwy$=H(N2kZJ(FyBy z7=FKn2L}i1sj5heH-^&^OIgH^m8^{jtG!u8FCDG!J)fc!_5bakM-qXY)lPF0ffZ=x z{?@;csS8b3#nM|_zE>sGgZ1$$3!5ABt)Cm*8-mmGk*g$AT%JkeExF)4qq~(=bCYpj^DHyrQiAqbl?|S`v@{u*pS< z!2N>;hXKl6g7v{P=^?qv!j{GxXrXiP2tP1FyvOYI_Bor67gAmdQ1{E;MiY`tqTv+> zY3p0uCogMzoM?v73tCLcbPt$$=vv1 z#M$0Pmj?^sA*`~3Bm2h>$76?%fR0()lF7{UBQ~sJ3@g8811`m7h6(NgaF|dQ@sYET zA97j?YM7d7kXgT_U3C3>zT}Mv;$8Ba{zSTWErH+uD8Tv1;1n?Yc>MU&Q|EiDR;Pys z^ijZL@aB*NHsMI`<%8J0`laNj$=jQI8u#oXT5A{`)I-0lPESvVCwW9Kb}>x8p6#0O zSUNoOWcF}J!MJ4(<7}l`zaBy%*eJQ4s0(dTs$ra;q5lwK- zzcRDwN-`A032@`+Y_OnxmTce~MoSuiGwZ$@MY&i+Ece{!m-lUMo5`008B=@bM!jmI zjFfguKO5C3+DAwt7$Ai!{d!PjpoZP|erd`-d{bVEAiyJGh$UFlF%BJ*EE7si!PGIKA1v4|E=Dp_sTf6Fz$$SPzgVue}?QFqm-1{yrZ-~ZrEl^tZnz*$f|7`d(3arm8T$bPQYzhvdkgSjKqNc zVIi5O3YOb~+?K+@Qg|tes=ajzhi#a9zxwy;&qJC2mXysi8=WO4?WgCS;v@;G=ap5h zb{=?!5*Oe)-z7%=S7NY!{5L*n*5P~kS(P%rD0i|pIM_(}Wj8n_wM|`dY+|l9yPNg+ z-Ms=Uub`mk&;&JCbu|_N4J#+>YKsp@(e0ptNyR#Kax@-f!~Tg9{9Cw0ZUwE7LwkRs zQ#Qar5I5i*fMmFlfdNx{9~;S+uOJ&>W@3qm*xoorz^|{al<|U>+PzlL#uW-O8s%%n z6tre63bN{B*D4}H?nRTAPaFBL6bVL&jHxKvhGIy$@DLZL5laPaY7 zzF&BumqAm+^U|JV=ejQFTF)QGcxZ*8tQ|?SM8(S%F{Z(MsjvKsq#m(711I!;`tMiL zyf9+%ctN`$30CyNznt;0oyMaDqd4XMPij*45k4*?Lv-$^_wz z!dIN_Ek1exmlU;GCp-HH?#r0(&TR#qKbfp?hcqRKWCEVpzaJf8myroYTZx`M4J#)3 zMm$wq#vkBA6Nsb>3MPIRNn5zV9RemE1z(=+q3Z8FzX$#~(c%r`!4uX{KzMx*9ApQn zl7a<5rjEwAHt}d5qgPgzVdsaAOCE!wVF#2ifqBf|Uyfi`SI6VC!)jKJ4G73g)9oU5 zr3H3xz9+)z0>}MKx4@?d7Z3}5lGN}3q#tDc!k3r@hu1N}!lK z1OFdaBTsCb1|sn{+B=yK3NPpB^Q46nUdrWLhH!iiJJklEuK~gtp>EG9KSgF6b-*T8 zxn<8{C5pWc9-6+WZzb$DZufa*0>8Uh*B|rEVzCfSJULfYp{}0RjczT*k_ZKfAU1E0 z-#_4GN=XFV#5+s9NRi*K#l^)>8=2;L|9<&?+m&vh0*y9{ZqEiNeT}wA-YwLtv>ney z!^;}nrh8*zV$l7d(1PBrUi#-Z1%;MYoPFgDhs(W3{y^t0U$g;G#$b2a;CvZiO zKe@=5IHB}XXz#Ejk&yHmnJ+L<^mf|r%bv~9;J~{cZAHa88EKQWy2YKupfA#sse#zf zpN}N{oAtYr2G1Am6y@-om(^BE`CaYoa%2z_yw{|Yk}|9XqD_1(<-7#=NQ z+g;XbMz2+tQR9yspq4P;ci~?+dsOM(=0jS4+zI;@D60VS0hZtt-@ja!YK`sdUbk|v zJ3XGK^a7;%CZ%t}3rjzqRj0B!H^*$etD?209V64$wbr%O#~QSwvk&;Hjx{=&+j~q3 z%H&uE?NIB5m+c~-yU=}KqU~SKbVLEH>`|R1 zQSM@TTh79y$K2~QkbA+303-ph(TS}WAL)J)lfqDqck32kbQZb~ZafKQ*92x$8b27y zh*=aojf#7MAwy?H>2xLr0NgDjP4BmJ?t=EaVBLSiEM?!h2!IR8`6^A zDR-f!(he-935oOW?Yb3mPJ<|(Rz7WG4Gj&}@V09Cx%XUVPl{3vAG742Uzs-iox9?p z^z59g{qwpK9?b@7rIQY#!R^t==4a|VbnB36^J^o+{Y9f2{9#0)cwVuUQ4rO8{Q03j zz;CIAi`q3u-0Lwd!;G7Qt!*vH67G%4>_qNzQq|QwSLD{GfTxQg*O`t-BWKO~4DBs!NwGxxjzujHei=lO+!_ZUa%TM;%q>s7;2VqQ4O3;IEybR)4~eYDv2_{KVf4 z5u|O5*GJN?anET!HF$n4CG+ryZ9^83K_x^Fw)}l-k(ov`x?sryTz_QA3e4L-JFTuM z?|l{Hn;oJ=$tCQFqXr3ev7uS?#X%~S0Fz?b_%xAmHVCy3q=VU#^)4m>wnIo)D5#Y* zrNJ6;pM?^(|16fs_v%gPcTN6*)?Ni=-%p6ix`!~h*R`4mtyo}De*NZWc_wDSU~CAw zkRwN&c_R88wRB7v^rd0*bZvuX?Rx2cQQ-sZL zmg05yQbLXidB+V@e%pPqZZA>I2`&FwPB2m+E-ub%KY3|6RNuahL|`easGxrj<3*-! zZ*OnBxGVBMmc)cQpmAEnZ~b5myNoM*3kQMNNHYo*{sFsQvrP@1V-LZ@L{&0pK(wAy z0x>J3?k&sw=1r^AjS)5j0p5#1BKfS;60Mk-lsT$a5YhAy6L8zwi~@_6dHed;x539m zz@zW^dJxDTYH0k!`E1oslJD*6A@&7J_o+{BvZAOBJbT*8sKE+nFSe>5YoB}qayJ)! z%)C>b2^?_PnGCdef1@*XV8-~PM1?uF;5amvdZ2rTKS-yHRI&i{3{y&75;>K0{pxuXTEOZ*L_SjQnZ`fRW_Em0YbNKvNHbUd3xXwfrENfVdEFYnjzrRP1ESqcg z&P>DBHNR)19F8c?Da!&Q4S_lcpdVK;>%UN)VaUs7B^|(4aYN7dtV3lVo77Y?%Qk9N zi^z1wkDJ%NJfAwEE zVJia6)Uw&l&9DV)8F8rA)^I=!?i4RcSRuAazlkUA(DzTyj1@cPO3r?Tf36JJlP9}* z2d{QZ2UJj2Dd*RZgw$g2$C7xcAl8Ro^&DZf+CIVDrjJj|S)8roNiEGD?6)yN|0LXy zVb=+QFf=DzLVUSHyn}c3HpgduaL7{wcC79o0dNBrx|zYl5Spl0I6PUmIQCdW1D;BF)c+$8uI3+pHt8=P@VVT>aVEz<>)5?m z!pSK1$dkd*?qN1?yLM|db7kq3!hL7{y$I*?yM=wQtD__6A|H!yoSrO@?6mLl44A?X z+EiN)mB$4i1V6PLfu5~2dh92R#f^bcVW7l1naaurW@jxyjmG+ijz!~ph^$)C(^=`Xno81YP^)>kmwKT z7d%;zE^_Xa(jzc5#0}jz2vBhKZ?9~s!aGOq60?2Eb7SHfDaR`gBo5uuK{3`$3wIv@ zKZTW4v9N%%)y0 zj>)DM{*LXxmME#fhZ{)}G9E;VGT;NFg*e(r<-6JCv+>KoIn#W1$Z$!ltu3x+_fmr$ z5wT=A9dc#+_qbL`nvlO_xU#Z*<)Q_DZcgYRwg05kaRKmcI)NRf5D~=p)efBiNCYDL z(FY#KW5*5u>+v_UB~tZgN=V5kY!or5%gDYVj%9VKMg6w(oU`Rw3I>aDw#gi?4yKOI z{JwySiXcY9p|FG8D}nr4#uRT+D*8OZ@w+jZ@9|^L+Yr!##?S9I^9mOAAHp#2|~O5L{8>DYNuLDDiX! zfO%VtGnuAy*{3QicJZMe$&gYkQ5ADhPVWZb}cnaOVWXE#L(p+N`Ny^mgcx~)v zXOJzQr-e^wJIM~N+AEEhJ64f1UlziZQmTZpgqFh#F}k9Bv5BB*>i1YCitF%VyQ(9e zHy#GN49tc`oxbiCT9;@*909fX{ceUCwOAlUr8j06#%EmOP?)|ok|h@?X;>Z1syRNmtj(9*w4=w2)e3A8{+58PnY3rX`3=dC2rIDmR)BhyBx;L1eIqN*0ki{bG zyq_7(T=niV6B)}C^O#umqi7WuL`a!#L^KX@Ks#r3gGgTMdZ-(ob#_oi%nFKI(oHSI z?1s22@>M+OyX8Yxp6q>m;HSU;cPW23A3&b^Tqb{3ms;xVJvN!(59Xbva}!PRt|w?w zYn8b&15W)6>hJLEDH;T3^o7k2)34m4g7lQs@7A#>Xeccj_)6&S2CKG zC3M}MHR@v0{AD*M0D8KHrZ9=1d96VhlA#=yIxy{14x)c2<>`=}UyB~Z9rbLcRkQ#K zPX!n9zB?k>7#a=~87UHXx3&xt7?L8A{OIH9?dpH}3m>$ksc)8%o142k(!6rIFbK52 z(RdGYmm9gOyv7>m=;#Znw@lN04SL)LPqo39D{ImAPvF%b1`6rH!4UkUcXLGsa00uEt?hpF*HF`a4P!ns+YJUT zZ8E0=#lI-^f4XFOXjg2^;Py!R<6yz^RM8S}Tq*=1N+xCCZoE5Tp?&HejfySgRFVvF zwN$-#y10@T?jK)doR*m}NKSMg5z?Kj?YtUsq%?E3ckXdpphaFpR-PGK`z*`zTWdmM zQLVpiDd4Kl0SACwerx`{ZaY`!jfYM2r=q$)bp<){XQS^eUlZOfau44omVy+YBl{L; zy;`a`7f3ZEgRgE5C(*US`^ywc5tp&i(eX*1e|VyzDAF@rFfd?mYJ!XFb)>cohPJo; zW@m@M=w8v$O&Q&18`Caz1&%Mh&JB$;-N*_Mg~NlFU+|Gvxd)4tsPngN-P8D-t{%;p zQJbGe2S0zF*JTzBPhZFhO4aBBOijD7F@Lpk#@neReD%S zk-3f&SYnF&rDYZ%o>=wUkA_g?UQuVhAq9-^FV<8Sv_e;YogDKyKGtn6CjO(VejcS7 zIrA&C9`O51MUp`QKtJI!_plkU+x?G`$5uY+q|q6@ z0<5jAxw-}&1B35qy>5RQ1bf^bMdteLz2RJD@E}oG<_?3j{$9`tPIv_{FgqR|T9})g za}K=yb-h1{dRRh@{85A)CrEg{u>8ETQ1BiTZ?Q-wop19=8c-h!B#V6*_R`3GfSw%J zx>l9BuG~+DY;g|7HGKN3|F0Q)oL4;A9s%f0@%hsom=Nn*{EfioMwo#av)L2c4I6Ox zyPS1AYDDF%SX#c7XLE1!g`8`c>a3=O&MYeoG60bfXoxB7zyGe z^`%%-cG{5pp$T#N1o{3C0H9RDV`5#PDtu#k<_fL&?7keNH1J{(5xK)UhM*9)$MsIE zfY5hTwIL|%V_Ijc8NKxvW3;R9JEPIXws&T(yc0Phs4Uyy)tTi^*9{Ty`ML=@Nc!gR za5sfn8P~vl{(F7?c583s%;?!OmT5&fst;%}Op0CL#e~~(+#5%lpq;Unjrq9+(9Nd8 z_1<{jBi9Ebw%An4JfuNEX+gnO8oAm1W2{MV%aHlx1lUW#e;BS)on*Wjq?eM&%|0LuFc(VqV^?qab1vvv$P?!K zv(wW7_{sI Vezphxp3qZi~aBRt*~Y zK$90#e|1!o=;Q3`(ieeC9{1te#Ap3B5%^FVox*HcU8lk*U)E>)ELB67xL91~Zfacl zeG{WDKvvu?ur60^IJ^OjNCXQB2?w=W?oTrep|18J=DE8}DrCo={;xq>lp-)3)87~` zNCt;>fn(#tepka@nZs5b*7ZI4LlHUBAhDc9D99GKtVm2cyDqRwE#71?BP2;(N! zQ=^Vm*P!4VSBX1ak!EXgr#tQ}?+tu`mhlxny;AGxTKCT6AU3wK;qdf&C z5i4!-(% z|6QQ`WQ82N?YP~zyTX1&e+A}T2@6zMh~8`FsaPQtyq9=}m?|~;TE^c`0zObEyMh(I zGrCP0tfsI{(}8OtD6>yGZf%E?l_ChQu_`JaM8v`J6SZ5QPMS%5v%rT8e2`e+4)#mL zdC>WzEpn5#&gdDyxR48a%A-_Sv^A-F5z-#*3??9^ZGv3jZvhe48v9(Cv}d@dOO5-# z7EJ&1F`H$wL=(@aTFpuifO`~~Q63jg$r0;#Y80odi{nmH?#9~;{ zmHr`1PX^7iq{%3E>uB+YO{a3w2>Gp-O`5wZHW;FXxU`v&t|60^<-<$ZER}cFu#GGw zQT7o^AsS_i1^j$V+Zpoh8F9^%fF4xR7NM8@ESbq3F+Y{++FMVhPpO|jYW`*3N(Pc< zw_@#6nGBPRShu5}!(GuoEKFPFs6QhLVl!)VXbDse1bO?w5SeIDJ-?#An!w{TGCJZ% z`~*{5CPepjWdD+n)n$IESp)IH0Yv8ggVoMu&(n=V_5HQGRmA=BFGFs9U9Y*l@$8L& z^R@K!bj8UpB*(RTW_Sh@Jgf$HJ1MaloKP4d0D86rAEZPBVhsX9?0mUU-~Ky72xV_9 z!YAf^-cr837&z9}kU}gj50$8KPI&(?A<$M*U%nOia&GofxNS);lUM3(>XU%zn6>9&{Y67Dt3F;ce7UBXz3ubZ~t2b$Y%)Qu=vIln1miFnk z)qwhV^5026J-$5dJMNin9op@d>If80dY3ytt`*ZL`~d!j8X-Ldw>8>lg^eE2Hs>4t z3dBhC2pD5&;q>xkspD=52!x@p0b3C_cj=rD1CyX`yUnN7>ZMn-ZDIC;4$C~{<;zU5 zWWd|M+9{=~y^2Y9Ev_JR0(QAwoQeA9u6(XOg3>S1s*#7xyc1T_fwtRMEKq9b3A?NX zodi1La*Yh7%bLW&Tr4CuH+I@ZTiEN5Pi}+#4^~SO@4z(MK@yr_p6rND(ftWX*>N<#Lw05m3gbSLf@jN>@^W{RDlDn}mmQ%SE_+NgDLq z|9!!R_=EO&J}ov_kD{aWH!l$AKXQ@Ngy?BsvCx#_hry&*MW-+CXN&7&H9**`)uGu> zvl#oaq(%)K9ZxMCB_zbn0uKjfOVwRhn})M;yT9xzSIsBG9|iii#ZgDM%S(;6mT&vp zm)l2}OSHS3L=*#?3Bmnts!1Sq~QsgxjQ&+Ws!O zl^yxx)F;QI$^z*-i&r^%s-;Am%|AfW9q#8FQ)&Sxi}ktd+^?Rel&JG(k16eL@M@<( z=4L%gxOOhDA9vgaR_R_wBAi`(bW4LOR2)An;Mj8sq9+K2shhJDbD+iI6iW)fhm+iX z9V^Kn+(t}7Aot;KIU^c9v6UCJ4@N(FNQ=^2+|R*GbTuQiO^?|>-U9Cbg`rRCBeTa@ z5}@@-&}D44YulVtg7==~UljJ&ni#^EIF;o@Pwg)YpentUQx1J$kza5$qf|EXYB0X` z^9eS9Wn6KRNc#t48sVM3Xo%FTu&JBh=~!E^dfaBc^^~FwRuyUo@c&d4279c<)Sid3Nv!C zdajs{!#6xfXyT=^sHCanzekM;J$c|SSI+iKENI0pj8!ZNG>hAv72uwxl`WP5Xo$)k z=PJ0$&Y<|OEMq3qc1yPkeFbc0I9XX+(Wkz8)s0m@TrI3L_c-O1xeG`Gob~T>^{S<>NXOwPUCzrAdiZr8b> zdj~XGC|1JfMARKF$4jRc;ckeSW{FA@_BmO+JaWud&lR_CG(2yIoej-Pisx4~{joL{ zoc0>(4DHx|y~fK`$~kHww6#kc8$Gc>4;oQY`i^=N@o?O5&+#vQ9X>a=7Ev7Hzh;`U zB5EPD68r~ih!Y#_z^y2_i{BK{T0aah-L-8#6&9o#%Avp+R z-EILm_AUPf+ir>-iasaydCVxHMrEhx9RRMiD}bJZfUNA(fIo3WIpm^Z8yz39a^^Fm zxfrh7mlhEBhqP;f*W(7_cz)~^MY`AIn~IAcV5Qh&!x4m>k!=3@K=?lfLg0y~_+(C3 z)WA>R(ydZrhr;9gNFn`G4!q28Bz|n+7#N7EAEN2Yh*G1@Jq^(KoNL_zq{~R$Qjx3p z`!z{$n4e%X)dlRjF+7q1l&rhc!HjD6{jikM!u3h;7lk%;LAF7K*|f+&!|nrX2Bg4N z;R42g75yOCR~+{yzoZp=wQ__OZSLvo`PO^}bxEXI8xdv@XvyN)|f8YOG5kx^yx<^P$BdH9frMtTuq!b1d5RmSU(cK70PP#!Fq@=q>ZDVZT zeSYWs{@&R+J3Ft}^E~hCzOKh*>8htMh&t#6sv(bkkQLfx)d5zf%FZi`=7HD}GxNP2 zn=*SF6^ICV?qrltG6dq;%U+9Sk^sNZ1jn**OCINSoQr=&!Py}}Etub;lD=mgSf4*H zZ+kW7``z(@!w|{){~aWWeG%9tQ`&(cH0WWjV)o160~tubzCYV(1`pgBnUjl;d6$HC z{Q<`*xQtMDb;Y&_v#h6CQR!$}CK3Tul{xr5Jtk3!bSL=#W+TF10&|rEjHFFNnM8W^ zR-x~ZqZLR#ULDzH(pfm{Zl`RaRm_jny(&(Z+P&mUyu!#TYyzlXA@^W&jb&0Ec z|0D<-|8;Gx`z`9UO7=LP3-fF`ksBHw2kicU{p~@Z(`}CYjljDuELIYG+6%C=V=s4d z1{KDWJTmE1J5-mjz&FS4tz|r>EhiV7GTEZguceiUbMw56l=Cc|3|75AvSD}+eZtf9 z4WwZTQKB!!{9Dc@rij3Sg^y8GRK;iVTBU8h)sSA)z@D?M1)}6)I+}tJY z_-sweE(z3(rU_D)jP^>XG7UH7=XJ_KNqt}VYG=8n5CG3isJ7d}IDnko>9 zf`9dSZJG=p&mL&K5dS)fOCZ$k*Hlq2J+3Mnl^>l=2Ka$~*cmd$oR5lTs|uB>^YL;m z&=NX|R4Mjy%s^^LC!YQj&$@_DMpHD|j@)bn6qd9Vbv^V)Zl6Oj!Lyl`=Fr;WUr$nX z=DYhzLW1Dvh=F?H;d?hUO;+FwylrgUMejZQU#1r&7TfQ8l3&3;Gke}pQj#c?M4$8r zpnQF@ayL<`T6d1I1Ezg7?6yK+4^M31$66p;7RG@jf3Q#awRFf=#X*)jue+-p)6s9v ziYw*gM`@ic$0>EH!Nx7MVT6;`)uUq#^(j(9F2|m z_({^mt)f;Vcay)*lD7_3qB)(Jo!FE#fo&2}N@swdMy6P=(8JwE{5jEGVAFYWpS^wR z{=U7%mMtmlwW`FcJzg9}dbOS*{e36n7Lcd+;-=So22Ay{Hucq(i#@|#kv6HR8^Bz! z?1O@Da>&yYcBU6lk6`~uC<`PY`H=pd=_BhDo*D2*EgeJ=4a5vmSKGC6N?^OYeD&F@ zh9de1!?y^=zvVWR<^dFqD!^XsJfQ+Sn*OmVgA-*yeydyP8T{W@Z9*z~#w{<^B<>`| zrzm=n(FK@%%)c5aDEtxZ@YRo(k$h_kkNOg)tZW`ad)BY^k6PW_FeuWyHutW1^6n^t zwWr;VNDE`^frK<(sgM}=d|C?zA}$xq(>4|sZr20ObH%;nL2_ZD>(tcLBFhT%HK2Ufb|`u9a6FZ_D`2&RU8zhj&ZM>5V$E>xNflNm1)NAkGyhU$*454^f|%(|CDZu4#QMQWE43#=D_rK9#gaPz*`>D0%>!Q^(n+P#B(bT%>+-U5hurc{^n zd_WcKeJ=)du!ieBx9}c_yKD5_YAjcZdT*XsEu%TIA>ZPF@DBUSzhg0?6!oJJ#=0Ru zhnPm*OLQ1XtxgBPHOk96_{ffq`}R2t>Zi7=Dv#dPPw5*+7MO+31C6@Bh5w9;M}L%R z-!}8V8~{Hof*;JG$lbiafCeMsix2P32%Qy!9=2nrG7{tC3RXK;vBKYRFm_pEW0wQ; z+skd;SZ?)GS9j+tNfe9|`*WBI)89gjNXS*O%#oQY%}CK*_%TQtA$r53p%1NIP=xLP z7^N^Vs4o!@AP9K(%XG)@6I1So6f#CQ@FjxGzW6d2@jUAJdD~qct$VxpOMI)CzNeDF z>Z-cXWK9$f*9(PshUJU&eczy8v)gBxKzB6qMm^{}oc4sMlR0TdwSvL*RuvERtYvx} z^5O9O_Ls9W*IJibsF}W&R+3#SD?M1F*Er_Zk$3;(UC~&~`S*(%S?Bp88S%iNypn#V zb`9)-2UB}@Oq`w`uh$SBF0Vu%?C>}4Cx(s;^U9E4VRvfxG}{8SbUE`)yzte-wAp&` z7G2NwAduxye~Z1+3ww=4nL|;#eBhfZQvf)I*Ukn!x8G0!|F5;74-h+;m*%^l>nHUv zr(IG~Qse4c=N^P}EaZ3h1KByulA}p-j;R};Y6!(#posr2W?X@8WQco1*rIoBZ2O`C zXH`y4GQh`l)ad`n(iAJ4j=tPS7o7)vEyTu`-fT4c4s>>;o9s8PXlZsQJw71|3*3BI zdX$vC1EYMJ0(~MDL4Z;68-Z~enC#%7aK7rn-V|b<6jXxn+*7tg-FEkC*O9kw-p4kU zW0TXgFJuWvlrA_QidC&}0dq)Vrb49pw{Hx#n*g{Rxq)B^YEzTThT6rXDses%RV>tF zGXg4h1Lj?=_4__ADc`y7?ihg$;8V|)a7f9;G=K_>IS$+%kHkIS9h^}R%WFAG6sM#l zOzqdyUJ46;5B=$s(D}ju%z66x^Hwo18^>J;16%ci-anjUb&2-lqWEsK6EWS(_vSMn z7INc8%E5G}Re#>*!PyPKvGS6Zz29|--+9cw5G`1Px^Hx=)6nMxpUvcaUrvvKo==DHDw90BXSHNSOT zEv?nLKNpt@00y`nxNeB$zO~zHpBKBK;a=Im>9H8Gd8gU*N!o)iwy4Jepo15KQS8PPmQ&TPd&t6{>SNtVQ9!u)}#dv=<^7T$- z1nT_x)>OMOOZ9FM>?aZqL+m8{)>M!nP8A8XwR~3NGtz}xQ_16Y z!{CIyWEuO7hokS5&Uc!Kj3|cn1%|1ir<0vG%hP|;CQ;riGNKdh=K)PHp+99Ywe+8e zn70_aw|=X~@b}2K#PWhm7?;6Y3~BM%xXj+fvJKKCoIdZWU_(Sw2Xj~{1?xZ@oGX?4 z`n7i4n~gY=9$X2|CuB49-b8l0K;6F$N>5%=PqiEQl7c zYP=Nc!l@=s-!LVCG>Y?nX9if9=1oC>mQIP8T1t-BUzJaGT+b1Ah8RdXFP!9^u5JAL zmfPDEx1s7^nzNjhi1Y`cm--LJWKRUCUSXD}=QXvpk8i#-ENFlID!#yLpT-6N|E%zj z5U80u%t<}X$v(|Ua~y3t8aL_`iXPP)b%Y)AS)`K1`~%q1$$ia68Grre;+ZMWQt>At`eN(LxxcG&QG|+lXg5!2TB}<}HDNwcV@} zR-LXrDY~K)Z$>>Gnho-(c;leJf8`$0`~vMna+qf~Z5n_^7vB-di_TH8^o$REL;c_E zH^(odSJ~V`Janac#Cm<719P^41eKc_;V1QE&!%#ToXj8bsM z-=>DkU*Rt&KFUzPsw`;yKHIIKuW*jILhq$@GX^|XGiW>n8U!7EsfpLU+W^{6x`57* zST9Q#VlX=cr?sT*rVZ+{RKMA_S2{SZvUn7s2dsC}b;IUjU;lWmz)Hu&+#2)vo`?cc zZc~Z2Jh;XBY_LSB-eNU}Q!;YO!*a%=*pUd{DZ1x=S)k<3^-U{e>3-#5^W_PT-T zYs4Rs%w%e?C?Rlm=a4cpY4Nf&NSO}#U1AnS!Q`be@_#8Q1mu)?_hVkzuv^9AJ~r+; zdAA4@cb=pR?UDZDX|ii3r8zcKkRGpz_v2su?^l~;BD#`3e}6(AQ1;lh-oOtwP$(RT zMnKIwzXZQco-bngslB3L(_XvjJ_;U)rgZi}x>p&YQFmQ#kd5stFz903eSI~s zv~<}?7;9qOz2~M>=Nz87;=)}WW1{$2XvkgOEMt;}1RUrHN*d;9D|5;VPfHa_9>m-i zAVPk`DQaP!J?QPm(}VaQ1~RiK4CXAGD9F<#=nm`oXib@)lZG#Sls#-6c_o%mrzMPH zP8w;DdyPoP$9{zeWV6vzI^_2HR5?#=K_(~ZBOHgvHZIEiXZ+F!t*k<&=>eZ^^5xth zrQ$Po2v`yJ)!#Am2t?Nn3gQL6)^+~eHe)xnXjJorA1^F<(p&K@RZLh|c;~xVHBo~H za>OqI1~@)~D$D=+paFb;Q-}5G(47%%k0HSbD8_blj`JPQTLo$^bmTMyLZSc~>;#p~ zHf*(!$G?LqDk(Wy2X1G(yP++f+HIebe?8?wa4(-kJN<-KaIzjmkA_@O88~UpMmY9% zNPILCm3o%k`OSmy@*4Q;_mGQ-<+r|~_}ZT5=grMN?yg^*u|1}Io$ywS|1H$%_-J-k zC=c{`jX3Dyp)kqn%!)P#qw)=Xd4bWuuD#y+!Y4(%7n<+dAFkP$g3!sDG-K$p#>U59 zZ>@e0VqM86A{~lc)Nx*aIAFvhSQ+ap`WqLCegXla$Y`XY9A(K!1@IK%MP1d8nr8w{ z2H5`SV7#7z|CLu&R)O!&G3dR$3DdPTIk}SKJOilrp`fE0=yOPCY$TF+W-^j`Z1ZFfj&+hurh#tC10P({ro z{Q&+44ssSP3=XCgFX5XeFIb?p{YMB(bNm6aEVdFQ5UL*NHFQ{sXIj}( zT+axc8rY~SM{C37N7NXyf?(Xp%<|vAb6Mn$|@7Oa#C$j|;A zyrsG3q$HE1;BBBtw-7+~90L;h*fkayh<`kJK@CZf=Kpeg(gsGPW1JV+Ax}aJa&mIa zF-U#U^)D<7Pog71hC^b@qGxa{)x3e(`hywPx4Pc6)v}UvI7!N`)_KuNd3$n?x1q+2 z(4R0L2?Ki1XH6I!)0zFJ?5#EbER_xUi=fW$=a-(Mg5b1Y!+N&*0(d9U-P`2cX?(^F ztA{E;pQAYp3WMHv54y^(tmLxK3cNX*R|h^6!C;X_42#l{Tkhv5DYFz=s zkV|i%;gP_>FkxZgclTu&|HD-M0RMIZ0s;)83%1V9 zmzcP|yp3KnhM>j>&cQx~f6Hfia*R69S`bZRSKdZ7I}lcg+5_#UO)kPWY|pmd)D>h3 zB2%H7r$suyv|dAo)|5Unee1&A=p)fVSUxf zhn*txXPDwwj3)-H%K}O2Q{;Te0|bro2eWBpnPA$QB`3s*i$ge7RXXDH84huqTbr)C zpDbsEaNYO6`g2eyiet^X7`WH{>kE489CPJo4t{vMre8H07D zW~J~@AEsc%O34fF+VR}Us`bXw%|VygS9SAuPv|4S!msFHP!GpKn&X@KZ&u@AkeD4O zuK;;rF_~Aarq9dxkG|7cJf$JbT`XPdMI|QOn(rhqgHmADa0peniH63Pp;1ZusVt=` zIeoqPMNtFSg;c-w;DXT-)&UI`0r=2L_hL%C)NWDgDR?#LsOvrDN=H{5H4^?1o-xzac&K~- znD8z5(UYD?>{8z&`tjEo-I!xy!Dk8r=$e`u_s&bCF;>Bvoz>PbfcF7V|27pECdP+T zl1umME|Z`xA}cb)?|<$kzSWCvYiYT~?s3r``%k;xcQwX$YoTfQ;0Y0r@D?jEKL~Ns zWfC1Dc+Sut%4P$>4@l#5-hq?WwX@%eUd{4d6kQ|gtKAkO*IJ=!>NL`T>r)NYnA9Rt z8c78?9+EH(Ey`Djdm<(9WtUi#c{`;fGWJW-q_@ zQd5&6AFa_U zcys-dfSh4Q-DT8W;#FvjlDKS&TLM)yzi(Cu22P$ze2`9;dsaBgZaPH7&Rm1ary42S zAEABUXQ7xa-gK=nm4d#5kYi@2lre{ttU$#1vfrBP_~f2$s4QOCN9LO(Dg9~lG*yL9 z#O~fCELe^3;!wMc2q6A<<(QX;=b;ROzFxmS+ePFX&RcHtIaZg~$ z*`af$9lp>HP><=4Dvg~En^w7It=pk@SZo{=%gGZ_%=HvVAZAKRfnNf3ttZFEy3d)c z&7|H+4q(V)CoTBXQWy0Y+b z&8B@>kI==GUT9kQ%b~4%AeBdz8e+l?ppR;9MBy|2t*DR5?6N`#%a62fF9*hqwFqm7!Y89aNv#0OXmd2z=_@)+)=_r}IEXBDtm3?pn8v zb@wCMqghtrg&DsAV{g=lgWc&a^=XxgkkI1NJ#HvG0CP8{${cJd%rhE zZ5B}zF5eLFV~8?Rv^+5!69YU_{}BfGl03Ga^k4^t>FWf)%C77$w3UB63@nE|qv(BN z=o+&*yS^4s(2X0-RU&zc^%dI*g-8Ag{~i^qHiyo{XV9#_sE8tdCHqfiIrM7i2kdDw zL3At~!^0+Jhj2me+)kB~vFZP30c>$>k+ez1DH@uzy;sCQlhx#C z`5m%7polI(I{!2Z9kcbY{WSU~`LIW39;1awGDsvT{-Ad7XXn`GucJ`e|4IiRK>=Qj z@2>wiB`?2Wc*PE~s)A}H@xOc-%_RhsnKuuy)zxngSMmW5qHC!1Het%$ZDZCaMjb%Q7?-eB9-S}_@e;c%EOi8g_ zZC`EkC|F1vqju08B)K zVLFOm8D=B-aN&%PpmY{mX#HB5)zOtRZ!J>Mo3=BYXSJR+ZPvoYb3aPUC7( z5vd-d9iE9bBJ-M64|^A{f%|;!g51N`tV&Uz0QVYGfJJvpw(+9|@0>9GD)*{v4i#3zUs9`R4NcCP) zh(2ud0^j;zGmmB9i$2_|JwAhaMsCUM3yn)lUU@M=|I@K2G-N<}$GBZ?x4PPjfyI=Y z<`>v4WboF0_x;(#=ws0om8^V}wcaFdH?i!gfu2bu>H28UuSp zO#{Yuy8hTWA*#Su3l>$mn41hH>`I+k4-!E=XnpvT&t>PS5;=HBRCIUaZ9$JWEo6+< zWjc)0ld`h2({r=aD|={+R;6qtUYS1u|9D9P{$cGM+*)3>-2-Nx;F1aZ?0y%KX#8ZBm?q`O~jD(Qn^%sp7Zq)*H<~ssuW&M&!Sxx zl9BjTD%M9mqwi%>*-OT^l?9UpLwwXik3wB*>b|sf*LL40Q z*Qcreb;)49vfNW{@|aI%@wdbRljeQ>z^&5!vu~*EVxa$j$45^s}IiR32oF* z-3gj8Zf)cen`mIQwNb-4Nr0@#{tTNdrY$HuE3tG%`WYfeKUFy9!Lw@+xo8 ztKF>3JufQ*anV6g;x%==qG_v^t*S^7O4F%!Nqq-2PwO#K7*$IJ@fxPOaIZBJp-#e($m(TUHBWvw7)$0 z)1~Z1VD}uQ%AI1f(QT*=Pzj%2u@j$?U5B95iQlb&U`G7ANB#k@z!xv995y5-<>sDW z+uYQ#=qgAJ^ZLwh%iJ3GgTJ49Kop$)9U3gnp#>0jgxW zkbBxmY2Ny?<&K*JZ=WE=>B{W&ece#?S+J^S$he8UrgJ0W%fdn+A~I; zy3KjWaet@j*G%Bt-=+n~zl(#%vm#!h@xiRHoiDq@GpBb*e%G^TzRq8+E4OKBcAz*M zucGJapIFFtJ4MVcHUIlj1y+Wk!fs7{^%er}R_~Uw6odo?>rF=YM9nYNx5gCgx8GCkGXkp-*WY^U;RK+R;3XE2-3`R}UD6UpLI=6IYD1uh_V z7?=py>dJX|cK3rYO&#i)`B%_05t}cw<^_zsJz49xQwO7FgK?g^nflJyHJSOX`S`1J zQvgs*Vz-EI!bifm%eSe zmofpH9xuoEP)CvHS zt)Lg9Kpa4fHa4s`S5?<_i*9k<-QA^#{<=J4s~7E4e-qIVMZC$Fy5HE81}60zR7J!s z5{Aiz-PIZCZv3gYJx;@3&D_^u6v!<1b_5$JQc;m3)74}v`8(?FYhWrlIYXUso$|z( zx0q`hzkHCUKAwZ}c3K4s)%70wMb_d+6Kmt%j8z!hEsOM0x|Iir3w$VOUQ9|7>RgFx zh*jrjUERH1X!eCa6kr=9Izt{i)9}3|>$s(SrREY^0eBuH?|%Tl`vsd)Isn(k0}-rrZs&Ba zt*&qef|hP$2ifU}e4BrY=$W24xXJpTQrG4r3EKO{sd;oR|@Wb z%%MBTa6Fp&FR+~otn+$meAv6XHJvQoX}UG(H%e0K(%$z)3MBX&c5uL*wJfsQ8TGK7 zm5m+S1+m$S@EhdFk5LH74pQDvJDMk(b$D3CnL&^U&)Lksac=6r^B2{IRXaS5){`m> zDOl7+=p`|DZ6dc@9fKWjiITgJ%YW(|tS7{lX}orMpe%R5XeK=Dt}Oy>FfRti(gBIePOtS>*kb$TJLH+22RIZ@ll$aF*@2hzK) zG1ca)vb9-tOtcw@=da~cv3{gx-n1w#I+S7^mJ~S$Tt*2Y=M%MM<#a0D>q}V4GBvlU z0n3~?#0Z^%2t%fArUwfhc+OOD6|=OMZv!BAmy&z}X8}k?q^qwFeVAMUgU`E=?GpNW zX+x*MO>}*`_xTrz9tki~?eCu##U{+lf2!w*T^7s}Z|Yvws{00Z*%PPDjEqcVzICR+ zOB~LRF$e9$P>RRB24kx=R=X(qObBuBUG!v>%-Uaxd@Omat2!6zkos0hQp&n6c#G7B zEk{dOLRTbb>+t{?{f8}*ffA$CjIzvLtSm9#O8ZY`@VdFpd|P55-LT{vT0=WopP zEx|7CI-CO|{X?uI@Op#%o>&+3#7e&sqWn=Lf*YmW#J~d#`9Uf$eCut~R(fIL3=Kp`-K9a|;_8 zQI_lNGogKzF0{OUkY#al`bDb1+0#xNZp7bj7v}`wSx%Kir++nlw#qxoXz!?E(zYtJ z?fE+1LqQ~^rnZH50ps~Q$`Y}(XbanT$@BK6iVDxZ@E2IOoV!a0CkR;`-0v$eOhsMxvXSQZ>Av4)0%T%{4tIv2o+!j2%T z+c}WES9)vBP_~_j&B}zqRey219-r1H$&ep2eAa)6sW@w3%?+XI&>i!)nD(`^aO7a# z8E^D}mX3)^=s%m`*E>&wJ{|DG(g(|DOR3*xP_AH0Q4_CUJ8>Oe3!kAMdS`4>~swg}z|EMGu_juSln3Y?Q&zn!R6 zoPeLm5@!w)+l`5P90_L)i_{I_c`_qU7efI2yM4qdGn&tAMAg(=eT3%j%~PqDkf@X7bvHv*^(z zs}$14AraWFJ7*2YI)w$xg9aFMs#nWKDOpc5`kx-Bw));IwE6@yiu3A!P~+_`WQkT@ z!CxRYe8E=z8$c6ju9X27&l~j{VM__3#yMO%XEe9|MG_rfZ-@;)>P)=kntS<-@xg}v zo|8fOzR);RYW?L6FzAykE|QZ}vX=|?^)uZe2T_u!&RGJ>O>$jvB#1{jDVd|p=?jdd zeWX)e4MEkbp>KSJx|)LCEM(X4)FiX3g080((rXPiJ;ZiLfAx`-ks_9_kU#y@<)*MRrOS3d85^UC{)JP70E-gTDN?1c5<`tsS#ml;AyiypUJQK zuUE7g7Mm^PW3wl|{Orp&?AFRLX-W%Iz!>U>2Pv?&msfy(gkIUiW(k#SqjfekDGrj} z#0QEptDEr6FeMV|?s|&jfcN-z>Qh5uPK*o)&j8&E_WfTo^TOTr408f5E-ppYff{`~ zxcfPnANsv{_^jsW+W&EdLG?R1r#*{Yr_eDc9?#)f33g_TmC;VEwdz@W9vQGycMqum zVcQ|TGdpnr&LsG)JQ=9LNB?W0GOwb|ot%3bJ3m*^*n_mTvy0y_-XJ}>KCGUpEWqgp zyX=}5hkHEnf#*Job3!OPl%pel^w7RC*c9U+0$tvhCwl&$ec6PCf^7)>u36#iWHU@VCjb2K8rR3# zH^V!)t{ldR6Qc@x+=HE~^_A_3_tvJc&0&*M=|YmW_m9$`Fdl5!S_va9o=xAZwVjaT zr-LRJ&s7;S9zP|(;0WT^^%&Yo-?Vc2L*Kc zdUGq423zqT8w$3zrcEV{ovM17s(rsR6W|&zt!&r6^Q=Ca^MnpfAUU@k2!~!BGgpFJISl+Yn@x@aHlkN0K4Wg9h zohQP4SLRe?O5e)G#~J25mZ^HXTfDr#M>V60zxll%ivF{>e|~`-s@l{u^QbF;Px{^u zW%oU5t26xYsH!CZC!-%{m&ha0?wIlW0nThb<#t*q)pQQy1Mc*t%Yv!M(lE@tKCB_w ztT+>&=?4|XX!bT0VEI#GQ53OdL4N*!GB2ol0Ed6S?5L~z-PuEeLTp>rbKga}C;uty z#P<4fYL~)X@E&vFwq5>+@1?`V4Fkd=Kih&fLyt6keHSY4&%ryJ^IvpLv`u4?sM>g7 z&yoQ(wI^K}+@rCAk>pTc8pPAXaufIy{?q(jsW27e92=s`)5G;2Bkz zB+ulP$+@Ur?wl!^U0$937g`J`Dc@2^qn=|g@E-4o};S*qbl zTU+CV>Hmnm0&I>WHb%@6lgu~EjDRunN|!1u5mT(_r+;HL?v1DgCi4HN;mMW0x)*Dg zo=gyxy1i!tRnWaYD}KVMsO*;V@e2jBEbF53))z{l|J`2MU@Jz(8-eG!v9#uWDCgzn zw)k4ZEBLlL83hFlsqEPUC~BqQ&2x6IOn=TZ2*ATVd!Kt+%~g);wgwI z@j1Q}626V?HMZOlWE0W6e8inG#4-Zu_5g6@-}u}x#1AE&y?MhmbL9OTN8{5p`que-viyKkB6^5-`}G=+!S4l(ccI|pW?lH z^kyjHDK{d5x#ZUIXGT!?G1bA#A#NQL_UeQ9QA7GH=Vvnj^%Rg6=z=-~1d15*D-a*o zBZGS+R39rMrxc^U_bh2l-=>DVia+7J9rdx)(*@&Zif!ZQDZnV-r#KMxy&eVrne7)+ z-~b~~SVkC;%hH8t=eD01UF#du@afXoQq|eRpIkuk&?L(g)Cd#v#&f&DOvv@g!9F`Z zP+Pkhfs5<65x9X(9M+p{G?22JufU(Dc?>DON(CzQLOjI0uMY(3rb0_TP^f(j%v&!F zU9e~_WLo54z9IDt_J4}N?Oa9g29Ij-RDcmGSn(wJl|6;_4Y zXguF{{`7=sM_DW32kYu1)~FEMJ85_LL14}sTuR#y*Z(%h*n2MLz;KvM@V|n-h}O=w zn^nZs;o;=}e9Y4d3_QK9pJ7pEmw$j%*8%U&JoptEt;yL^y!ZuZ{x0E$WO#{_5f&Hc zd&Y5chTCqS;n%pK!QBbMT!eLQhi!AK`A?ssf;u0i#YkD8uhZ4r<3!Ov-q^lfaqGMs z94wUwQO4^6u)M7wH+ZmDLVUz$f<;tsc6{z;W zYtB>5B|_QAGnHS-ZPkAZ)jQ`unu!S}B9>>3R$!sSH2c>`^%V-yeuXFK?Ea`jYu-S5 zHtSw!^1HdvBV|D2q`7p(lA}6lrVlK(rLzBox)Gtzb}OqY&HWEcrlc_a zE`mH}op9_QohM|Umx#p2f;MK6Z6ko*1a~pf8Me9nL zYPOT`Rv+U$aLkbN68(Z~;reS=_iULOB2X$~`PUb_$aky;z??!pwYz9e!?ka8gb7O)$gU_x>?Ie%_=>088*4hh`;=?IztDZ)li$3qo4jX z-K_3WnjCn?uWM!1>TJxDI1hc#3A30b}DY-c5czc|P`%pLx>)AYJq zZa5|hK>Cnu667yGI4XGtI_QZQ9UJSA>@eT>>3DzZnwx9Nd}`&wkd!a|Di%s2Mt9F9 zE|ufkvyOkqu_*}LE`##@b1!#yaC8eNH!)n!Kp81Ft?-v2D!9;G!2jVt&lswoge@wv zC0G0^?mzU<;KnVsQd1ayV?ZH;sZg3;QB8Z?A-<7jwIyZy?oBwXt_0Zq_-%=?YFmp= z;8Dpgr4*AqQ!k`bcE66SX7E7Jcr>ToTgc5mUu>J!XD~$AxkB4rl#l}BfUsuAgnTRy zZ&bFCem%xE(>>1CW7K0Sq5sf#uvyj%aLQFIF?syZHw=5){q&05+uQq>peYs{2f`-b zMAy8N=j}rEItMm@3exdh&j(+iqqrGP(aUztrr?JgXMiylNMNGU-X6Fj@@78>-5X}{ zt@{I+O;mpsPuTVPq(BVjukdE1y6}Gp8s}Im6QW84 zNxxdl<~t(Q%-o|va0B_y^8(H*++7Y1PQ<|IRb{@e7}()LNo&?bso3s@!+o3}ih8yG z;M}u=o15EsWyM8=+fL1o>)3;613&N)V_v0=HILA$}`n5t{z~6b53nw)5-?n>{=$;NGZ9C(1*a@L5DyuNfGt0}c5Y z+HkRgOPv0YyFtz#$97D%giCb6$=K&poW_-#)W=#KX9u;w24 z<(!Po^Evf=lmg&KaquJO0S393Vev^jVw=FUon-7wrV*FY!aaxC#kVd4^*AZpme^v~ z+VQ2<*&>0v^xT*9ks%*ZFg_r29Qs2l-^(AqQJ1$;787C)O?o10q#?@wFLyYG1Q zG!%`k`8bA^2O^56D`T=z{&!Uk3peW~`TYxoa7Ir4Mga|*w zGofN3RNTC;-~3MafguSa`|?)ng>fU1X)0gCz=50ZPcklAEFcWI8d_`7r5#7-jCeU} zG@y)O8a-Ej7S1m%{(X7jV!-W#=4L3d)WHqHv{vPslN}GUIuof)@rDTgp5EYkWV_G7 z7DVLIA|6#bH4YJ5wh-vEanT&9Rtf*GB1!|$U=)IW*$R<6P#n0P2&$tDW8cGV>1ZtD zY2&N|g{YMcrRWwbRq7p){i49$_l80tmr0PMt+PYdYOzHP&+euYT-_?mrvV0C{;kM1Le6DVVrwYl`BNJZ2RF?D6=uNa}F> z;#XI&PR*d*Oq&Z^vgS}RWhUn|N+J3QDYyQD4x%$Jl9Zi-lJeMF__@4;4Esnwct!#C zzTpyB(XJyCuIs#j`{%ll>HW`MiTjqhe91q)<&#=xb1Q@os4|g(6x(^D>p>Ia{CRq! z@6CE$oQqDfjDsc$u2=@~vO$zkoPbnl9W=v$C`A*GitNObzewhGOktR>okeQZNB-A9e;g zJ31NU=sYZ0E+-9HShZH!FzGvwWU%-Q?)Q6A0G5#$az7I)rLW|HuRmwodG}$LkGxYS zu?GlOkBjbDhE&3a_@(~I>erorbgh~Ky!mXa#>GAFaM{zo^`=d5&_pZbH#HmH<0s%^ zQuK$I%?@1*f9>VrB2?lts^B(NMG59!{OqZKPh>+#FCEt;=QnFl^9&O6C@#5kK#cU0 z1W;BoJ|;|EFOR8Md5R_t_2n2SjL5KRZY*rXc0d0rU)ud#Ao?dYm*-I$2WrC6QJZot zUzDl}J6SooK92~IH#Tz9bX=|$UzQulcp|gFo(9jZSy1xY%N|cd6707dtsu2NQgjH_ z**r!zHp_cC%b2Pwu;X23ojAr3rVpHH9Qd-L315IC`%?sweQ6d5Dfe>(%TqPbjhwP> zSXmjZQHHCdp?y>tPrD@yC0F`WxPY8nR16FE>+5X0VhBJr#7$04No_n_MszfqiUS|) zuf{Wl2Do;#LJ*H+65{Vk4gvBNf#evxhf6d*{pfu2+pexNPAqwYi?56~h#Y*28F4oU z^P9~64fxe~V`6IGx)Q(Z{rRMn+IDi8l{aF5Uke%Ve!cxKa<7!_r!`xO>hQ?KK(AMS z1v<{97-cMsQQ{V(fxU$RaHmCVFrnQ${8G|4)|XQ6qOxcc!hkfNR~IQ=uJHc8JJ9Ra z337^Bx0_QH{;qtAO=9YFQDDMI9xVF;@fizPY|X>%58#Am;GbdQHRUmyq3IsQdA0?Q zqmxg=@;!eLmzd>$EG-afptP5zgnql-Tn^6zVxD9_mh%CadaC$ zJ+-smpDq}?`H0b9r|A`J1O4ph!6 z*2&X=H~z^L3gWtbSDv2y%>PKt2dJML9_Dm|i_U8f*eC0c`%XqvUeDS6dX4q#e+8im zJhT=3tON8pR?~A+O-)1|nNX?Us3%Gm=e!{&NdX)XXCG}W1(-bV*S&n?P_YXA1iz&H z!68kpiD19R_fbnRGU9Z z2U0>lj8PsIzHcV33x~3BdmU|^@20AM_VcmGsPD09F0=nDDCo@wQs;5)WfbURXB|k( z6Stg1bvAy+CO-dN=a5lA>)vYNH&?LLJ|^XWoIXwB!?41cJ_9Vz4zvX z9DDD1aO}OEeSY`n`*{5PasE6Hj{DsA>wUeh>v=6rjIj>W$|AmhV3jp;IkB~Id(X$D z1hQ|>c^td(#Cc;q@AJPZzYbffI}FrG z>)jMU{IR&spCLk3-W*64^aDO=-MXD;c=WV2w-&SPr#N3nT8xj!#KQ174GorZYeFFn z&y2!IE>(xzM6ugvfa)wRA@Pvj%F1eeebfGYY+$>DtCHUuqc&otjvH2*llpzP%>Iyo z*56O$-AR>c)emJ;uAM9()wPZ9(jmp=yB{XsZLkQ7fHwRDKf!2YfTS@1vs^S@)PLMo zQSjHie!MTOvvpe*^4mg~OZBGO(90)(IU%;;bn$fJwXQS6H1ciE zs>HFakq?{HNvuS_ALay$5IU476V6pI{Kc9fcP`=y^hQLK(&Ei$U&QZ$EL+r063GQS zMwvN6B?D(eN|CfdB*l6m$XhqJaqq)c+^h{u$fV}md1o4%K7B8CD&Eka5$=k!6!YZvno|--WpCZ9u!bkgF z#rC#`iLah=m}(vdav@nUXQ++2q94P-*+?U141E}?@j_9wc zv@DJE?p&0=75^~dX~9peEAjJi0)Q8n@^A|+idOTbBd>6OfYz8C30}3{Ma;dMm7WFE zX}K;Md&XK8XH1y)-6F7?iFVvDS2N$avPGDXAM?oXw_HTm5t=zM@TAYoeNO<0g6MJhmv{c{>OVD%4aLTlR~tZj00c+9k73q zoS4_L+Sf>rMFlrU)J_j){!+wGMn(=9H!IAZVOhGPKu({(B+1+8nwy)4CcxREOZxKI z6ff>IK0l{(EsJRO5s_HMUq78LF&H0Ps5(sbX$B+HVX2AH$q6yjW8+5KlFuU~1-^?nz>_9^8k&J#zxu0L@GABr$KAl} zirgierYrrUns@vH8Xl;(cR)iGtaKE}o+SV_kxmc6bYn;OY=O`}{PtH_tIw-}Gh0fO z0QItGGdi6iovsMVK8(I?oFjMbd*+3*SS{5{?hNqOab|FgY`E{U@whpMnJt?6S}B7o z$jzYBw;<69P@fK$g5n zKX6OThpniAXM8VMvM6Z=bSNMC$6TkprQs;^L2s|9EUgn~Y` z^aB~$^6Ftv==21>B^{Mgd8X}hS&)!=v07Iw#@#T^>=p%voI_0<*- z2!p6Wd>rXpr8lIczS!RNWrA>UnS8(Z*+myqep4M5*!jXwii+R738iCwb`&Oi@C`i; zf56IWlyZ@-gPi&GXBuj^A60BvHOIKxaSmc*lb)EHn;(B~q(3t<69-diPU!9s5oiH| zne`bD@r+NQ){7%s|0vk51vgPFrim5`$Ww(!X|{S69F_*O&OEeOIVrS!Nchw2-%Wu# zxjZ|osjWo?^R!?Fx!O&m{8@wM-p5cVd?S`>i1U~(o{Crn@WB5%c((SLet}HkiZ1(Q^9B3Fu zBocXHc!H4caTq`wx`%CEZz!GAk(h#eL*!s92Cs1U%Yx8)>Av?E?n6#uVJ)l0dXBSI zxy8l1Qs2TM=xD{@k39MLJ=(>K_hBorri@#(L8l~%O&<(zIT_w&}YGN{R1JaMf$;rt{B+hBKYNwrUE&lqw-_-ugj`6!~{y4Un_PDv_+1eXgi| zeAke?(_SH;5d3URt?evVNJ2vVlap2O(G$qsL``Xz0ea}uhgJy`q~7D>p#a?XxsN>E zJnxvlJNzmNXmhu&sL$Ugcn0He1u-3e&;Ihp(l&CffENW9<)U71sqY#*w!YwWi2vbh zWo_xWRI@D$)P;3LvKbg8Lw!&YhEC1nq!obr$L7c5| z*EY?Jc=9J}(3mde%y8ybO#Pwj48?Ty8l^ zI=>rDV`O%Zjg1*I9wxMet%k{y@NNyQRN%`-7N-XD`3naFd|G

$ypzhOm2;Or(O71sR!200 z=uG*Di(xlr^D*qros@ndkkAt_;cQ&?5Rch~dbL*M9AyhZR_uY4ASG``k`N2?u-|ZB zAvE-;yKf=d&-aOD0wSUG-BIV$IqI;J8x+{?SGGFkhQr`6aPb|G`VAdP@s0KSKNioB zr=ZlBwe|SvNh?&W<0tg}ZfFSw@;m+*Ng&bz%|9)L+uL9gW*CfYbQ?DG-lFg9{aqfX ze+QczpT(lKK+H)2*HqNh(-o^N7Zwy06qa^{k-2LDw*+sinaywbti%V$sUX5lB_ZjU z^OcOyVuf@+!2nx|aPD#vdWI>1AGE#Q+dpV;Ys)7ffPxjGX>}b)Omt92m7x;i9iiDZ zsrV1+)omxSENX9y1ZT9hAg&JU`H~;f=hO6be%!T_^mW$HDf6Kes=vn!b&bI0Ehhy+ zf48jR^FJmN&IYUR9`iPBsZ+-C?W4t{MKBwNPJ~aJLpCsPb}FV}h0U~7pk=-!3ffZf zJ3Q)md@n%n-9|vt^vtH|n>YFZJIDZ@wH+!@-f*Ut_{m_5#i`8&Nw|a`b%b3D2oO6f zl-fD{lu^FP4HGLbIX=BrLINrk)ppyXSAdR>l8w1gd>ZR#TdWa?=6XOfwFz(tCt@N? zuF@vG{P?ZUL3#Y&ied&d-|M~gBNzT*<0MGXW5MI(vf{q!(gU5?1A(e~?n zGiMs9c3<=1iO77jIWA<7H|;OiorN+K^sDauHp_+;E?%p3OI|g&Fu+;t<@LFAf_ryR z^3u}K5{V(a2iSFEijTBBYHe`B`lOI)gwj#|z#W|8oySGs3++RBe;Q*Mm%yE(&rhCo zIf}XaG-aSfjZLEBb)lttMMnm`C&y||=8j)|lwa7raJ+E?i@zxxa4a90>~YTu!%`GV z<=W|O+qdXEo>$_d71q9zHFZ(v=STF<_77?bT8+62E^Wy}2WXNpm|0`?5KZt|Z4#!G z23nnaQi50reJNV_xYJZ!xv7ut5>6R~{B`lOURJxGbcO)4o#}Nu*$u$93%9QcQaBQ} zhb!)p1?l9cLHZ)3d{6f@(+2I8!bxgUZQ7~Tx_fjN0t+oxr#gDZn8MSc{^5Qf%zENs z^Wl=`lCOFGb!Ot*^i)ZAejn%eCSv?*Iw;g4E6QCx4>{%e3HCMY&k1$_5_gv&_$$HyM*6gm)sP`q zjr0ZFt-c#h3a0>hxxNg5iQ@kjyImeMZ62*W{qbZjVeG;~-6ipj0#vsF4^)mjLKgqv zoOP{l4D#!l!Tq27h&I9{BQDID=NZ3$OoREXV*5~1aqAna7In|I`UPem?>eqUZ=urx<0ni_TK<3!8UBotsEVus_`o3f*; z-N6FC!4)S!T|AhG1TO(CZom(!-l6pXyQ@HIq*Ch(wHpfPbtK5HRET0!C1N`bxau^D zgJ53LUiq-ESm46)*eT49h>Rp&)c-eq<7nCCo=Hew*Kw-uQ5pK9)d#^pLr`FfjC!J;**8kY7 z-Mcr|I@k-d=&@1nfG85Zj>Wi7s@+^u>Y+IW*^tvh8~1wle-ivGDG#D#+p^m@d8ML? zdQ?QusQg9y`uLwV?^Q)cMnVb4QHCEs9yH;es*3;%e1K&XzkIJ$XAl-Y+h!yn8u{ms zg|Trk4twLs1|+f_%DFSJ3k4 za=_u-RKZQr<1zejfRMUne+#QJhIGb#`q)^1_*%ugdu!&KhmMtl1C2s`k(besjwMO2 ziipSzUA|i*B#|Zgt!fXN1a|A~o(ZRIlR_d(lIG^EKU=8W#U{+QRWDaGMhROTUj8wp+n)(OB9_ zqp4kCLle(Exz1g)%=An1G>)Q0E;YcTN7yTgJVgEMcquZR&OkAPWko18G&yc4asN?{ zi>bO{>fb!G{i5Fd70S71Y{%^se+^~6<5Unp#4u`p#^{|<5x%Ksh-z!*9Vl0AuCiiQVO3f zikESc*sd^uSi|BqU%odWDXncX-p_!X^x8o72BJr^oFIf9wWm!DEiL|>C{@qKS?MEH zrMBfpVZ5F{K4vFnT!ApVfcGaj5v($sZN7gm$}A}OI-WoeCido`>TLRmOm@MVU*9@< zbYeqy=0;aI3sf9mm_PlhM9J{VuKi<`86oB(kbP=u%J;meSUA50=eGz zn9cOWL>PPyQ~hZdEG8i)BN`rO5J?>+9Ipu!>j@#AiPs7c}zCJfNJH`VzCWxEMf@ zT3FaSmonGX^nEUrEq>WL$%)i_cMtmD)P`)IC2LcAmLi)@fm2+u`5<73x#}a2-*M`3 zH_Kg7?q{}2#e)aboiTG1g@GAS=E$0Cx5#0}kv0g48WG-x>#4}0QP>r&s{1mF57C5V zHx!`NOtGtxY>B9Pd9sDYKiN(M+*S0ow>(6AgXFqJ;1?a8$u36YIgbWhnJg5L>VliU zE-wCvf0$^j3sk2d_BD$zZd+z*o}N+&-}&ij#`VpY>)R;r39FNGJLa0`>zelH$JREa zRy)(@79nDaVgqO1+$7<@UcJ5#N7v}pw?pYtTA<(7-g%OGwq}CzvKOoZl^n>KMyu71BD;@d^<9CwQ7*mMjLd*J&ec6Gn6BK{k4di7s;WL=9l(`3AsQ7km^n{@I z!=Xj{EEi|YtPl3KwpdwNi@FQoSy`Ds=0Ea~^wnHGR-S80C=@Fy)OGaq&ra#LRpx#B z6q5lusjhZ)6Rmv1{Z8Mpk0Yt?BApfFWbd#K%<4nE2w935J#OAGZ->0m&ov|jw31w{ z6I3Ntji%HX7|6`ka(wu^AbkYwpmPZ??j)8Vj_C@;tzZ9rIKsDxa6;ce6#jRwA>o3Z zfNa2aetMH{C&Fsl^uu3-(?9XN`7gKxU$hy1w5E;nkfYAi{S17xJb&2YhGX*twCr?G zBBl{9CRWHUuOr5hWp;6yGw6Ylo|R(>FEoG2Xf5<3HOq4{ zGa(c9<&KI$E-Bt6DoJ%tJ#ozLVRBEX>+4KwF^uTYTRjMZC;wv;_G2?{WXfYwXON}- zXg+x2EDuh8wZ{Aaqgd_awi>`}^-^WbNAr1m?jdNKOoz_eV?@O6_trs%NtfK4u3m;$ zw4xE8K1Va8zLwU>EcwkT(07^Ujxph%^yiOR!*<6;$;WjgUb$!{z3%H7cp@YS-i+N` zMUA5Kg8dVP6^_@aGJ4yg*L%A0pH(#+w7j@4DBBNX(6>M9>b~WHmP8$#ZQ%{b&J#1D zUbC?Zl=&QoL{$$xJKeD_?@}{@dJ)c%3RryyjsMYrfLyiBi>yFxfd-CT9WY`_B1e7#feHdK_`VigO8LE8h#=Q)dkqjNR)8dq@8V0D+asc+R z-f2GaxCLLtnDqW6+2D1f3BZ-!)7!I!2fD)kp9SDx=XFvD#&73>37eWu zg@vW^D?jOv3f($^a-T&7Pc{XhN2jfF6tF+Gpi+z7-0-pVKAd3#?1a&FPIuZGBU&=b zj@x766nob+M9Ne1bZ!}`oxvB7O=D{u>fF(OO-$q(3Ysx@nCyNI|67|_0tnz4?f(7? zgDfokyE|fQgfG>w$0Mc>qhvF6GPUL+k!FH3j=z04W4YXzzo;enLS8zVZN0FNmYF$< z{u7LSC-2BS^e4nz@6j`nwP)pPD<68aF)~bmpC$-m^kyBG!d*=~1_HBxefu=!j{l*e zNEahny5z?KmL`rST3TA)Y;-2VkDu`a7f5~+vHu~c)kgR2TaygvYwAhoF2Ui7$CLG-n2i7w9ioX)O0=0b>xg_;JKA)U=K;c%csr~y^Sz;H5kI`=5j zU`T{u97k-5^y=-Vn@du&1#Quoc)~tsIA0<_sA2qm>K`HW&nSbH*TKj8Gcz;Q!wQ!p z2NWWOk78M7{*^T3{MH$F1o84A%m-|()2SF3;7evBN*3)nC^;;nxE!Gv~6kJ%)a?)Df1=*Y^_9p71Z zP`2c^>hB-*W$D8QZO-@U%MrWJN}=X~9OA4GStTK?S83yzAZEsVulDFTyLCgN-y_G) zO)XcQUu&G7Xmg1;9k4&67_)H5x_?hZ`*#)RK;C4RHzr#K!nrg(Y;2(RiReT+{sSUVwcTHw^+>{|^^`VW0j_cMzj)2)M^U$`$a}eMpq#f- zAe}09&l&#x&8x~jSp}r9O4OS#eIrv--vRQU+{u=O9JK`T3YiYfa%*~G&CK`Lg~2oP6N3={G6VgpGc?LxOCKKz;^*Pv0W#dvB~m)txhb9vP$Aq<_f_mFp(|{o_iWsaph?5?Ii?X?#DT zFvWda!EBOHNYXwOPsK(-SMwy1K(}RcF)qLOn_YBpY73p;(6Cm`=z9UszvkQa(JP~) z6zt!Yf!0V5_peuJgRDwXoqMn6&^E|6I`G0JXTozIOGO7&E%x$92-X`KBWAtE#wKMYMGUlbtE_g9 z_4QPYI3L_$S-Y+4lEW3sGD;u+iFWYsXj&+}G9n!s+ra~-Io6tQuMZk`y@;~hu3_(U z$r_$8G*S(|{^&c-rISy%uTqBse%2 z=7mj`_4UP756j~asoqOaQb0(Ei^B&?-u)@m40<5pu&?YRq=fkV`Pqx)iX8kuy1f~H zhwgic7Q&&W#g}_tK!=(m6uS+6tFGZX&ID$ocD`?cJW?C$IkN4~QdIfwee2dONryQj z1CtFy6Q&9#%m+0a)r2^3cw{qOG5AlVJKBOJm+r!MWNuFPo&HEmTVqv`Oqi5z9r1d& zQ3_Gs2XknvUcMyL{|QAut(EFKs0fb(pDl5_?eL*U+;uRjEhuk(o{2AJlGL)Euc?4p zGj!VbT8{^#P@w*2zG|j8E>CNeCc=+7p$C1--mJgB_$ju7TlVW-L22>!&Q8l=n>Wa7 zZ6!L|oCU-)O$?8S0Ljg`Hk=9vJpjhD1ctSfGvPg>JTVvXFm;lbv8VyK3MyKw4*R_t z^64K(f-NoXwWM|^x!dTF@5>-d5e&KA$JKy!BevFneR;)X=H%K*9go4?YCBxYdK&2O zaPwPWZGC>ks(iXBrETKqm=IxKfOaCUY!YvY3tGsQnN z@$L5f6fi$EuTBjNag&izlhEFC0b1zM#zvjPyko;kkS5Gi!5R!u?1sVEQ4-|bN=`^4 zCguS+J};~ieC5K~b9$-OJ3lW^fS(^IUZDyN`%vM=$OTh!Rx30%z6IQ9_0G*E5?M)= z$03(UD7?D*njyc_LPKRqgOZ_TJHd$+mnnMg_Y1gA2hXXzrB0Z7HLT3GtWosU!y`bR zT!{IM^1vdB#P|es{rywWZrtVGEKuCL5BvvlZGZtNg?MmCGz1*fidMb*@cMyO5#Oi& zFtv7A?h4d;L*2(>Q4f9*A!LH>!sD-g@pqXottTFM!dX~AVi2>oNEwna9d3MjI_&T~ zLNgo~vK>oGdjGqUjx=eKsV=s`t zn`v%CL;Y52?VdRt=mQiJ`saElyy&hlRV}#3rjs|E4z2NuGWMYvt_VRP#ImwW57ZHDt#k%UIqH)F zK=>;xzt-1RPYNQm`P{fCF;SaZEXiUkR&+-EbzppcTQ?~ zZD-9!olsp}{ogbR#dkxWp~9my-fFa<@l^lWUz$B(7QD>gJej~`@OIWK5zGDdrnTneKxG@}0KVYKF-^4v*(rj`{AYo*G? z@H4pRPZ5k=D4j2iiHWWA^ZMv$$QYom=OH>)KUF*rK2?f6TIpP?BnD3Q9C4DHy+Uh_ z{5lFApdU*TjoI59j!^&|lk*uXe0YCpnEKDl(OyG>%V=VWJGS-T3Ts4=dVdd}xnE_36^Pw{D zL+`D2ir~t}h8hB-7# zRQrezC8fO~jb-dawznaU+KrpDTE=Y8k8Kvkb$OON4_m>l=Qf}NLPbFix*3ThPU@My zH`Lo?$F|N&5Ia9T)8Vzqq;P>coWO4D=N*e#CjhKY3+SaMwBD{WsIA=(DThC5ZT@TVdI5m@C;D}N9MHM zFN18#exM8g+&G6x-k9@y_5fKpTVg#_&ioCXB=EN_K0 zB@t?l^WC${#L^Q9XBQMVRQKpkDPMK7t#!g;H4a+V{)pe}ivEjE$cvY*uZ}Z{ELlri z&;2@7;`+63_w#VeUz$}j%J$yg{F`yPu!A(tsg}1_)m)Q}Cm?IF;&mr`e789%RinW& z;*d=sG7lr|LeDSGB_^aGyM|IoXH-P3MD5ROI^T1r!5;f+75VJYVv-To;|X32AgKdi z=)(o)PO0NvEbufq9fuM3DplB7SW-v)oul&LDG~QlZHH8<&g~`Y4oCi)^|uGSA0G$o z>mHL5nCqA?H>g3JAz~p2*uQi8FP~a+Ywy8<@}#vXDe<_(M2mjkUDM}TleQq+8LmB3 zvh(hlFm~%gg`A`sjYptvR=AyHH7WeL^T+WE4RnAAfq#8?`$M>ghi6*l~dy;5D7r!{5i5&MZxR z?H~4S!Vwq$baq+-jGVTcIJwBcT!+$Y*8;qx4bF9}x-e)H(^oeR?b`cpjEdnqpS1pY z;UnuHNJmGpfWJ|fn$Izu=L``ztY(6+mY-|2Y&-QRbOxy%DDg3-i}-^<4!16-M)h%Zc0C8kALoEJmA0n z=MBXC9;nP*dkys2p-ZUKhv1_VuVYG>(*tmuL348-ji)Pa?Z7@m)Z4~G(RfX1aFjpP z+S>ZP+bNQCL~1$kT1k_A|-&)4Um=xa#`&~HC!mk&7MXW}#83p{MU-4tW~2?_X`QN=i8&PJUklO30k@;6HX|u>HSI9@7%Z>-ulMF^)h} z;M@NoKd%ipB_AAg3bh<{EYV%Adi)lG5VLp7;J&AMg9Zi$Z(kIYCY)e;&ZvH+`f`5; z0lN0_)zv{{TVqA$71K{>Bnev{rEoE`#pKgA%*II-z!ak<0vtzL>?28Be>!K#EX>TV z(Dy}5<_2PAA8WxvVJ21-7&Jbh}y`y8uH z^CXbK`*FOzE<&z=0U0zS1JY1+e^<4{qhm~n>3b34?~tkYN_>$qTNI5Vx6v~;_!{#N z_GmQFy!9OWB<+uX!}V$CVuD~d0Zuy8RK6Z~@7_8j{j{bP9@89cAMPL8I`fCqjH zusiQYAOMuGaK?Z2n@9dP?S9yQ5pRllDg9z4PTurcLNcTixt&s!X7S1r5_zufL3578 zEnR*zocBH5HHG62WIY#LR1_6EnL)B#DsAkbo19qw_`$a8`g||R6gm~TN=x^-xH|8} zchTrrVV;lea&16GR)^Q1zq$&Hnw_%X8W zSL6O;!{Gyd9M)`L7vF8&^To_dWky}mSut~F{N>pq}0hb0P zCPIlgpu9bYUNc77GA>hRqu>6=>SGZt2%pWH9nF{Nqaql$Q#YDrSbD1WhJnq3JK$o9 zLe6=hkDPqZQvuoFim5yTYsHOBK?F})uw!MV6+#@Go4uQ=-KvTKB6$VP(^8MCvDv|) zY2}cZ)qP%!26Q|PW@`?4OOM=T0kL!^5CD2k;EZk;+Jc}biU5C;W(;8V(uq(H!T;4% zz=yb~x)C}`Q+zf|e*Vt1$RhOfZ_t%W0VRG=zj}hP&^7yuU$!g zgz@nj8b#-V*9gOFuO;!x5K|6Q(}>4^n1FtA&HmHc3WvjZ6UC~k ztAXtfr0;S52tIl#xU+qw(ix(y1)b2~SBlqg!KFaj=Llt@VI%=ESm;S;*wZ$2N^!Z} z7u%V7D00zr@jO+9{Xk(M!jJEGtpMA6cjvIEC#YLweiAox!MlA9g0VUs0z0f-0Y1LJ zp1ytj{0%0b87Dl>Ke*=}xZfW%YQw6r<=nRh8OdfE?S6hE?I(lp=g!P8cFMEaT#_Ha_qwQ zQuph{hG43u%=TJ#$ESiI{W+@|(gYW7^Var{+va$2oDkw8!`ol&n=SYjw;=@<`~7-$ zCh5m#Y2vg8jf&gRzo1E-Te0u~;L#O#X>@WY*Ofo`mt4(@@}d+q zytyQs{K?jh+D7c=UJw4pt&;_X!Bywt5Oyxv+SFa>3ZQO<(`{V!4hjN)krkDwEz7Q{ z@ba#6mIzFf@}BQ^+k>yuvpSk*U2Kf|H++inj` zk5B6Hr^jGVYg}I|BrCQ3ZcY(Z_(gBXXRf#S3w1U73E6_l71FEC&~Z(O`_HGnBK%wr zXVxdhX%VrYy9wf$SbBQk$gu$>uJLY_iZni%%>P~?+2fReT>w4eV-&I zDt27k+wZy8a1zRz?B-CEqlf3)tGn5B`5V^s|%EZUl zQ(jyu`1tXPoHdA*+MfwFNPH&T@!wH-in*2@=s4IK=kwH2>IVDBL`Di)abIEId zzaD;!Fak>1^M2|((skU(?BwK9q$(zPV`r===ApPiLTsPGo`O&7@G;Cf-o=?u z6#nA4A(MI$T^O35_E?JKB66I9uR+*+w%%|)Ty7Q&cB>MTl9&*el(1S(XR3zfNM&Ci zav=+mfNTV4mJrBV$u<01)+|{Qubq6LX8Vf@|YHWt0_G*Q) zl0U7Z-bRzF34o83ZR4mhA3PLZSCvOBH*#R;>0`ZtP60qcC+_nC@NE)-n)q=(fx!<;w&%WjU1f1()?1o+lTOJPW0t?96k0T;XiG6wsr`yA8YnE_q zUvabNp)V=|9v&5ix}X6CKL7nJ#fOENc@_>OZT(Zy(sBX1;9ayvKQ3#oqJOJp!jsW%Rrp%xc@CCj%Cp#YB- zD8zLEysr|I65pn`>tIOY1SlgVDJe7M{kh(E!nFg{z}8w|O=TfRS_uZx($H*J*+}T> z#W6ApyXM?XmJ6f?9lF2xh23nnGZ~{!dmPWmWf5s`A^AL~L=8cGrha3v>7B(PSQ6551pai-enaI@6=j7ZJQ52Spb8mG6bo z!x9!(pL`^qoeczggBwtro&c&^v2{^ifBJ{rpGSSB_wl8~pMMwdMzUxiW2a~2 z(PfvPt{^9h|3?ppUuNJGW|}=eyN(^1KR}N!TsSPMlb(Zvve1uItgMtREG#5_9&<}y zbngX7{#`%|d68<#FS3f8-H>gq7M*``yK;A@r4ke3dI;VO4EGPQ37`rPVT375M?TQ067#EB_h`1k1vOnxM0hbm_`%>qq4GB0e&|w_&2Z}Y`}eLS z_Q0Ex3`dUF39;)nJ<5a57a12%Yt^x6n+92{pwzYS&rz4+J zn<A$LvVwL(zs(N{UQPKq8$LPr_%mjFUbN}Qtzv7ow+0o*!!2+-k zrb_#JI$Bo_5`2jfm9?AirzYJyzzAYyGNU}HQP}r{he_R0zHrn%bU!oyLDgMno%1#0 zHz(WLF^;dlTpLSE&SV;B9a)UYweo{xhqpm)3ra7}=7Tg8W;xdKJB=YCCzV}eS&G45 z!AF0~p@h`VU^*!Y3E#_RBz$=s_BH`Oi+)s3H~(F!})qTTcj4zk>JBz(Of)Cu_aPN(&lI?zC>kVwYa7&6&Z7y&4Uo{AP~Xee zOCDaYFw^{|qT#?vPz)p5X6V*}+r>8FD7XrG76-`u`8(vy> zvF+u?%7ZAM2)N)m9J+X7HE)LXrxa`T8p+*YD|lS*j^)t=(@AW{2P_d5=8a=vbTG--)lj+TGe1>2b1nUy`YV#aiE0WfLK9(Ldi*}f z%zc;R-ry5n8DG@h7pA|@ju1r)Og0AxAkJp4dnTZt^ z8&X@bAusQKS7jr;6I~#Edi8IOo^gwC4#>%ATWm}|<+%d90@YbXEoELluOcBnyd9vc zem6HBN-xty2y3qLF=Cu=v#qC%;8`{$FgXQ3=R<42M%7;RiT0HRu6F* z34B&7)cLo}=?l({eB^PL+sNjN`yf^2M)iVc-UjT1)xQQl2HMQ{ufbc}ww*yc6?_=J zv~cVnm+z5h#ElgdN5X6=da+6vegp&zc4(xGkTWykPU%`SIv9BdBD>y8Lasb&8TJUG zuJB{cA_K3IY8yAePEj;?6F*$VN-c{QY~ey7n&R0fpN)Z4;Sru&a1g%b!;!E{Y$J05fwd zXit7@JYcxlX$fNF;NXB}-#$3njC8L6_ZP#jhz_CyWZ%S*w!(#}*Pn*G5xM^?L?M}Y z_cj?H=i%K8p@j!4w2ry6Qo|tMSJ5eDa*&|lAk%Lvfu?&47+^(^tty1yvw@RZ4`E(Y z21x;8IQk7H{1p7rXRuz84) z4_j~tJx9*Ij$hr3y}VTYE~3sN=^T2lpc@R22wZ~id1~AJvXq43FX-8Jg^iyRio-?7 zz3xBf=5re%r9f=F#;8GiIdgO4$R)9)KI{NIrsx#sX#%R%n`+s+riqRZ5|iDg`Q833E-l$Q}G_>qdVv? zzcyJ9HeW^XQtjphX5U8bmoKyk?B~R0^kxO}$q8ZFGB3!f06YKkG6+WO1lrTu2p5J- zo+e*00PE;t(6F8z78~I~WAym)QQdQl+e&N+HWgyWVS<7Ie^lvlY`t?1MUI{*J zFKvH5s@s1Zut7*k@opyDWMF28eX&^kat-y7O&t2&Kfa2MBk5bv8^J*)kZt9efSsKb zRMdQE1Qj)CT&P@>Y75>ZBU|~w%k_Ivb_=94Xd~v6!Q69eby}xa`uDco8GM^W(>fWA zEJ?Qe{RL0w(U!;P@tIh=Yl$MBAGB>YZf0~c4h&)b%|dbYNO@eECc_$|b8ZA_DI>bOSQ;Nhr`X9W8B=@} zHZU-7(id6|S+8PCgyvRcIwOfb|EqSrMALV6cFJ8ozErxj*cZ?rNuKxo@@217-W#wR z^oO3X2=rH1ADcAJNoi9rJz~Cy*bK4im@(&@H~Y=H19}{jmwaq`M(LC_s_g8X6tfKj z%*XzB)qR^*#AHMo;kDkDkd_LL^2)Z#mh3lt&r1hCaJ&`9h+CorSWKng{AM;+BvaXb z5!7{EQR_9`aQVY)C)c+bRvVtv25xd8^_H3N)Iu%F*PWRgMU!PN#;=lx-1@w{6J%Q? zHk~TSYc<*8I2B(tmKjSM6P2jc@B^Y5|L7g(TSV_-7L|4p0~cL957|=}S`7ae0Qr=W ztN@%Ut~G-o>%--imR2Ut?boG{XQdAF3jVF{V;{mCIpfczFzPW@sA2xD|8|Ken{t02xiES}huLL$oeztXwBl(+C$}Zf@#yXlmlkCeUVYZyzb^ z8@3Yrc0bIU^3qhTlQcBc3G%IAG*(hnd@tB`Tfo%2y|xfM!TwvWe;oV~clT;B3zWLx zh`k)&$wAF7xveJJCQ2;vB`TqZ#rrZ{=>C;Rrf3sT~<@tn|pJp zOYrctnITdBLBwmN-;lZ3Uv=EsrpNyFfBPvI^Tz$xdGm?iT(|{_D+;b4&t|^k>r&gi z#_d4zf>Kg8lt-#>32Z+WKKv9Vdx}nln9mvEjZkQY`}fkJL=0NS%F}b0#R-27e2}vh zE+{FdmP#*0dT98=^$YXK6|l5O?IF-Lv1km$kZV0?Sf-sm=}>)PnHT3w-$LE0aIyv! zytqFG6(j>!s^^uKp1(5`aL^bZ0pO`&n~I#bWf36Vr~WTU3Yh-r&h?|_i{B~;%dvH=%tV-bH{F$T|IT|usz=xC8!4fcWbLXGNac+jGH@< zhUWabGWWn;shKJaGu_W!|4+fjBTS=N?$yK9`%xSmuPiezl2y#a;kODcp-FnQA4T8L z8VSYkYsUTR?Et5yggt!(J+bx6G>M35R4vqXe@#A_QSFE3-JK|$-a8wV(+MS6 zr_EDB*PrQ4h0DeO3c9m1_j)#&8o-`CIH+NYJ^8=(zB8(+uUTK31PBBONR`l}$xnI{ zOsG->0YSkUA`q$yf{GBTfe?C?A`+UYfD#3)NGAcLqZCCU5Tu9_Kw<(R+{63cyVhOz z(_bCNTKV;=+&56B8a@wbvhqTdU7Q z%FVTBL(W~&$9sbb+`qUoJ3yA;0B#e`&#Rfs5)CN$_7S?Idxy_~fz&$V9q`W7*5Vo`d%;tplHxxlSancS-IJ+9bw~j_5UCyg!l+l*n4|nxV{vJCnne9wpvqHV^J2MGxA6G3Vt!wE!wv6BCCNH2vEaD(sNIv_J*V1N1(Q0{ zvP})yJxMtSieHkN2qn_Gb}EE2dI*;sY0$Rr80O%?gFqXvcsViFS1o^L~0 zwNiUcF0pd?>*;;?#rw}Wk1P{@LB)H@{dbglq zucM>AcU{L_SyfeHX6ictm2XX4N$n1q3_N%L9qr*k)p>-`MXFdC7rc&0cPb&=ln8po zzH4H#SQ7R7*2Lw%Kv57fn~PU2h9S~_?Q#q=1E{-LSGM8Qj9%x3m}+T*M0S zpN!AJ!AAPm(1C&B5unWBII9IE)vlg)l?&LLvQgO_JCeQ5vBlZ-r_c{#w9@ctPxnTs zl@1?lBLQ+p2D3}jbHv7MX*0V`hj?Ma8=qHKH#c*>uloZ5%V$o#?*6kDghjYM zdJx9CCo)Ovp;4*INmt5bh3XpS_>#OcXA(|zeTgNAk~GB{TnK9GN;(4+OH}a= z4hOG!R{3M#NT9+lEo5Ep-H%&RFq3s`0w%b!|73V1+TTB!wbZ~9UUHb-lU1{r${Z({ zCYo$btlVHkn0C0xdSmh*Jcwd5C4i0{cP75Q|9*Gz;pM;67v0aWm_yMmjo^BUW!w`^ zv!I820BOuTz(1l&-spXEUAT(TjgT`m3lF@UZW^T93Q8&SNHy9se`;>1-`alU%_q$r zs1o6s=wgW#eCpd0EA5l*F`ch11NYaCwOhqaZT;O?NQ_JtXP(i}AUG}uGtWR1CcCJe?BDU_ z9jt_nmpRRI74ekpTSfE5Zq@@Nge&u=)1^XjlYZwrJkM)-ox?CmNjMUjtdovEr>aX- z?Qv&$lmHDvqkc0Nceb~!4{XeeAO9e>c(zy8od1JYLa?-;hhx%}k;lyKutaDc z;)EV^{Nh?Oqhs^ys~dZhwult_3TmJ8tz9Sf#)j%H4Oe`1UO=;Gb!8Ppf9tm?usIX; z_ru1*mJTV@Iu>*q*FplylI@387yC+6WNd^kuoQp zn&m7glD{VH;yBKtdXudlqQ}0BruQEKjs#=CdRx<0>*x0qhhd&%a;#VghPOM^L%TRSvET;eO8I(`}ouF1|r6 zC#PqopQd=8;B0LPvA@#)UO4_jX-tuPgIf?b9(%;K)u%sSc31HcS?!qpc77Xckuk}j zl>RQKpjc_~%(I#o2Xg{^jrjUHZ|llA9JZBD$yu_i@X`rl-{(J~%_avfxIE9A9sb<= z(IfQkBlykxYQ3^jO>b-FN)oT7{Z|y~1VOPP};tLDu=>x;|qs=xyJ+>)aZmv3R zpQjtY0}Q(}!GwuqR$pJA;LisV!?DjqFl~C_qe+=*XAkMI+s`yjH#Y;E(;w8Hi$TMv z!+ZTYF#@CC07j%z0I-H@A(u}u7A2^JsNW_LHRl89kKerv1ZrR>sOm)(5wy-p!#AVh zFSj4JZ`uIS&e)}-z^p6Dy|340+Gd$JfTiPy6@Z8uRXDJZa@4$e7azYeURi;I#MxbC^ zNvW7*sy_sq_HzfVhE^JnYiDWKuv_e?y0~ z-q}+McUBn#)T3?Y0X!6-w(|rs_OcvJ`=8DMpZTz;82slM{RYA~qWTUHmkIh6G-PWA z9t-7#nAXK2i#Btc5nSm6pxSG3aWOwX?MwK^;*D>_l0xCHt$I3Y_eU|;j3uK|q_&Q> zUaefd43T!}^Gr!xI=rsewaV(bXLpG}F29uEoD+7N&FuZVah2z-YVqU}b9{yxMIv28 zc9Lo9vT@`;r$)4Qs_lp}LCFJf+u6_%>|7c`K|9=7G({I<=_M-zD+T9Cs4wcpY))wJ zHmyT?;toe?XOT6sq`m|sWL9SEr6UaCe}IulxRj(VWD58D@m9~ht8|4bQ8Ww~APVzS zw?2{0^S4LuL$=iCg_nfJ3np(~ZSsg@8-9vYeovTZ+Mc*}qO@Z?_`6_N5yohVKAA

nqMFO#}p|nGWcT` zNG-}#y|=FFX{?9)&OI_HVU0!oiLrmh{>CLbuY>7lW7S2T%>lTV{qT9Hc@RPCr%!a9$cxD(vl zn;~qFhNyGDsk^J_P#7&Q%+PWKH4vl^03yTCCBrs zkyR$fLeVJMv^(>&Z1Kt^!D5!=A27_<@zdE3Nx17JeIJGzXNujY&+b4M00}`UcuJh2 z=q-cK3~0BFRZ^y6S+ezICj+*1=tvf&5~QZ+>fx4-_&>j_v4Y08d!~G=LMrHQYU#P6 z%PFNwy$kd11-`ehBgdl@=a?_Ul#4L(+A%b}lx z(`G1}8qxLi*vHlBmb$;z%SQWmBrPr{Ag(3Ea|vd2Iv@F1;hT{s)*J7CMRl-ft4hka zpGRHhR9OAtcC8}g{EZj3KN_0e~1l-Nq$j zIWO~(-X>*UZ~2u+UWLSk99PPi^81Nw<7*(G5w|?i^mq~CdVYGnm*m^1EO^HW;jfI8 zYmd@lSaHJ`;MP;TFAoaw$RH*e@ll}t7mH^dma9OehkJu(n+IQULoa6d`$X$ISuEm( zn)>zq=W)~E!N+%Ny_|zqX0h0r^AkNrpH+8GEhL2iPE`PlT z#W=v5*i8$q@*;0bG!W=4%Njt;OPzl)KawDUyumRiNqpmo3w!>%N`jC>GXPGMWU=B^ zb^ZKw(a#L3x$Tvq*fiPM+)3q(Jo^9>w?>sB495UXHf09mISA}S=GBdWUJuP3|W1xmw z4O?`9eP_|wR;sni>?qahk)HK5-z(Hn3hPodA6)W{E;!Yxi_E;CaYC&Zl@jlr_t~IiDt;q8 zfL2AQugJ1Z%+!*@k=SOH84G)_rE;QTFhdevr(KN<4lPMBKJ%oa%>V<2H4w0ITdfs* zL=p7AiaZYGho4~*2nw!*)%4RU)joQmL z^v7vd+I6ULP%8POA_^j+ldCwg=}SKXJj)Y#0FS6Nr;pq^ zyuYIgqrH3q>6PYbfGBYH!O`#g&&ME#1Bn!9 zv(#1A$l^cp<@`RosT0zPUABNJS`U$gU!R6?Bv4Sd_Qz*hk zTszlnf5F0-yGvrCuy)V=Xt*|;J5pSMzoC0u%UM)1k0wIWSiN&s(KXxL6U1VKfTDMX zw8}=PAw|R)ssJa-u_FffrJ=H3fM^ldP?tX409Fo-c(!*oO894SwD!KKShcFVJWTxe z>h!~(oJhVk0L;t&M+)P|{3EV?7%GO|-Z3Itw5!`a&Jh(LJa|GX zd1)Oc{iqm2>Y<@j07bGJsxha4>ekskse#kfRy(c>L`sV;W?F`}A=E&REirLA^HgE8I3I`?oc z<|3n6E_NSQlFsL4A^A_H;w)Fr8YvV}9M5Q9FcUjd|Bh0@$9&|~7@<~m4>_!TYQmdK)^V=*t zZ)blB{t!mwDGjC@7n6$m*}~`~h@S0f z?xdT_oN1|__2)Cm>YTZh`A}CmDR?zfjzb1vs%CezZtsY8Kit?sP4WxQIu3v$u8NL8 z%1PP)LR-i%cFsU)Sn!Ggq zb4`Fj2T8&!)Yv>`GO@+G`a8=a`-;cHWcE@6OF>q z(Z)&9J;N48+ZPNK+HscAU~3}5`bhYj>B-AV3^bwOhYeG*=TElEj1`I@89P^duQGYr z0~7J7c;B3Rh$F-bxpG4qwS0CxBoD0_Va&urPb4{C^2Ah8=F5|R>R{$N=9C0s5SvSx z6sW`@SO6nJZ7vc_ctd2^b&{<_CcGJ4iQTr+aJiH>03+>~Cj92Y{5)cc45gVtGaWW5 z)l?HZ_ELrAz>#AQqu-ge54D9V+Q~*OQ(Na3MV;X7-oUR?)DY*RIoOP8ofBgV_B|9< zFdmr#Y}qi0WyLp8SDAb`f=Am{ET`k;7lwX`h!MDar{J@B5q>xD_h~tn~0ARiPlZ90kulS~}t76T2f*8iz+=kr@ zC~po(jRdn$OR!QC-YAagR>%e1>K9DGv*6!%D>NuphAlh}*d$x5>!!lKL5!rDh)C7A z%oQ&630-=OAEH#1fWFf`pP8P?ru0hpLMe zaJhozaQUHoyBiM(4J{>g=X=f$JGR#CrDSzNI~ntztVMKo`KJWq%Ew7SP$U@h5skI8 zz~yvoOZ-G)MT~2^%Ro^v?)vU$!LVUP?j*{*JL!jWk5`XHRhiXYOH?OLfdcGQB9ZOu z`_-AXG8Y?>T{@(0P&3f_36yIyq@HmSQto1YS3SLHC=jaOORYTyxL*Kjl;^&;!}X7) zv@bA8fybu|c9v)3&_He++av7}fFl6d3?K+byovb|9|q;=_fd)EzMY)n82aa@54O1TSt&>r1OwCHP8mx!xt}TviOZT%62z zlc&Y*m7PAP3W5_Nbxl?X-RXB|2Jp`^LBfvGaGQ#B1c?wQO%+%YVJMm?jsQT~8GD#S zP?K%2jNj&Nv8%Rg1OS-__HZ@Q)fk<~xy6UccFgu4(;BM>nL4&sg!J?CtUwuxMT#TU z$ZDj>?ZOxvN})LaCsmq_u1$qgt7EI;s^`{rzCEk@WIp1%Ur}>1`UkJ-of*-1&3116 zg~fX+PfQ+m^?pTV-%(#KIHQ5@?>Urw+qVSlV8Bd*jP)^;wy$n?gPxo#jCN559cmy{ zDDTG^j#l#TyQaY`^JuOB&bQ%{j7v>`v#F@i>=jAtU449lkN~2yu5ZeG*Pq->Jb?sB z0Z#um8M{p`DhgNvx6L8s&M)B=KNFH=sD7(W#6F>%hs5(D`c{`$O?;_s2c`0c z_ADs^-J5FF@0#@svs4Ix(w=*vlB|c})SP322@y}YLzA52Y=ElCP)NS~AdQchyr_qn zD;MpOf^!^N$0RwMxhEKRsI@JdEn5PR+CJir-9~kN@av3T!;^_OrYv}Tdn(&t;RWMuw!lxIP}L0 zqeCtzV29)G095e=@snKN4KQN-on!^nt^h}SIC1^)zOS1S7d8h_5bNlGV z)f1CP-P+4N3sTZzU@HHZKX*JgR`T+`>jYH>&f%7ZsF2@}-f=$D-g)Y|uX^P#Y44OB zw|Jgj&n>twD_A}>jGGsCP-~31sP%7LL)4)i%%K7Jg7`0>(g5jw1$lQtN`<##K~v3k zs6Wqm*w{fpHXTh=%CNftTEzmd|-&C>Q9_S12YIimYpRJR-W%BJvkX+w#N?2Yjo*>Yx>pS4J z!KaA3PnqXKvlOoMobml0Uy=}R+^vV<29w%XGmE_+;ebV&!*3z630WQ6NJ}8_A>6Ub zMFGs83oyNsh0((tiBr61zzq;=!W3_J+rGgW2N{I{4EzzVGeAJ(JYQ6c{K@{}*1p1` zld=(_-MFbvrnjiFUocxLc({avuQ4bYO1<;By!i$5tl2HE5rI?I!HvBhU0|3^!Z*(f zW6SQ7GO=O?^O=e$R`%sJyvU2~Ii2EsFV^~gybuLKx0lHeH~`pMe^nYzg6S$5#@r4> z0kG*_Lt2E-V?V2_U7C7N|MM$CHc>5xY|p*9d|<_K31$G)idB$Sj$##Y;5lBGXeB3y zxNzlYy7iRfsm99rqVdMLu!q)0fcmaE8y~bSzT@o{C&&b%AFBNzAah@uLl_ld>1|tp z%D`N(%Xt>-VRrR$CwbMm5E_5nK^E2^eX8Y}1;E4ON%8t?8cc?iTI?`!Z*Ikk9E&ZWoz z|MUoVE&s!gmAOCNe^M>7b17DNIy*tnU3I72>?=@!t literal 0 HcmV?d00001 diff --git a/docs/docs/game/introduction.md b/docs/docs/game/introduction.md index 44b281cf..1865319b 100644 --- a/docs/docs/game/introduction.md +++ b/docs/docs/game/introduction.md @@ -3,11 +3,9 @@ title: OceanBase 数据库大赛 --- # OceanBase 数据库大赛 -> ***注意*** 由于最新代码的事务模型与2022年已经不同,因此最新代码不能通过MiniOB-2022的训练营测试的basic用例,但是不影响做其它的用例测试。同学们遇到官方代码无法通过MiniOB-2022的basic用例,请忽略。 - ## 大赛介绍 -2022 OceanBase 数据库大赛是由中国计算机学会(CCF)数据库专业委员会指导,OceanBase 与蚂蚁技术研究院学术合作团队联合举办的数据库内核实战赛事。本次大赛主要面向全国爱好数据库的高校学生,以“竞技、交流、成长”为宗旨,搭建基于赛事的技术交流平台,促进高校创新人才培养机制,不仅帮助学生从0开始系统化学习数据库理论知识,提升学生数据库实践能力,更能帮助学生走向企业积累经验,促进国内数据库人才的发展,碰撞出创新的火花。 +2024 全国大学生计算机系统能力大赛|第四届 OceanBase 数据库大赛(以下简称“大赛”)是由系统能力培养研究专家组发起,全国高等学校计算机教育研究会、系统能力培养研究项目示范高校共同主办、OceanBase 承办,面向高校大学生的全国性数据库大赛。大赛以“竞技、交流、成长”为宗旨,并搭建技术交流平台,促进高校创新人才培养。不仅帮助学生从零开始系统化学习 OceanBase 数据库理论知识,提升学生数据库实践能力,还能帮助学生走向企业积累工程实操经验,助力国内数据库人才的发展。学生在大赛中碰撞出的技术创新火花也将点亮国内数据库的发展道路。 更多详情, 请参考 [OceanBase 大赛](https://open.oceanbase.com/competition/index) @@ -16,34 +14,25 @@ title: OceanBase 数据库大赛 训练营是一个自动化黑盒测试平台。同学们可以按照题目的描述要求,基于MiniOB实现相应的SQL功能,然后将自己的代码提交至训练营做测试验证,最终得到测试结果。 -在开始参加大赛或者训练营之前,需要创建自己的代码仓库,这里有一个github的使用说明:[大赛手把手入门教程](./github-instroduction.md) - -当前训练营有两个MiniOB的题库,其中MiniOB是2021年OceanBase大赛的题库,MiniOB-2022是2022年数据库大赛的题库。题库中都会有basic测试用例,是MiniOB官方代码中既有的功能,通常不需要同学们做修改。此题目的目的是为了检测在实现新功能时,不破坏现有的功能。 - -***注意*** 由于最新代码的事务模型与2022年已经不同,因此最新代码不能通过MiniOB-2022的训练营测试的basic用例,但是不影响做其它的用例测试。同学们遇到官方代码无法通过MiniOB-2022的basic用例,请忽略。 +在开始参加大赛或者训练营之前,需要创建自己的代码仓库,这里有一个github的使用说明:[大赛手把手入门教程](./github-introduction.md) 训练营的使用方法比较简单,使用手册参考:[训练营使用手册](https://ask.oceanbase.com/t/topic/35600372) 为了方便大家使用训练营时获取调试信息,这里有一个小手册:[训练营调试输出手册](./debug-output.md) -注意,在训练营开始前,需要注意自己的程序输出需要满足一定的要求,请参考: +注意,在训练开始前,需要注意自己的程序输出需要满足一定的要求,请参考: [提交测试需要满足的输出要求](./miniob-output-convention.md) -我们也收集了一些常见问题,可以参考:[常见问题](https://ask.oceanbase.com/t/topic/35601465) +我们也收集了一些常见问题,可以参考[参赛必读](https://ask.oceanbase.com/t/topic/35613714) 训练营建议: 训练营对同学们的大工程实战能力提升非常高,在现在有的几万行代码上需要添加非常多的功能,整个训练营完成后代码量很可观。因此,同学们在实现各种功能时,不要一直堆砌代码,需要不停的优化重构现有功能模块与架构,以使自己的代码能够稳步前进。 ## 赛题介绍 - -作为参考,这里有第一届数据库大赛的题目介绍: -[第一届数据库大赛题目介绍](./miniob_topics.md) +大赛开始后,赛题将在训练营中更新。在训练营中,我们也提供了往年大赛中 MiniOB 的题目,可供参考:[往年赛题](https://open.oceanbase.com/train) ## 赛题题解 -还有往届选手给出了一些题解: -- [date 测试说明](./miniob-test-comment-date.md) -- [date 实现解析](./miniob-date-implementation.md) -- [drop table 实现解析](./miniob-drop-table-implementation.md) +在 [从 0 到 1 数据库实践教程(2024)](https://open.oceanbase.com/course/427) 中,我们提供了`drop table`, `date` 两道题目的题解,可以参考。注意:MiniOB 的代码在不断更新,题解中的代码和最新 MiniOB 代码可能不完全一致,但大致思路是相同的。 diff --git a/docs/docs/game/miniob-vectordb.md b/docs/docs/game/miniob-vectordb.md new file mode 100644 index 00000000..7c1184e3 --- /dev/null +++ b/docs/docs/game/miniob-vectordb.md @@ -0,0 +1,209 @@ +--- +title: MiniOB 向量数据库 +--- +# MiniOB 向量数据库 + +## 向量搜索 + +向量搜索技术是非结构化数据检索的关键技术之一,通常通过近似最近邻搜索(Approximate Nearest Neighbor Search, ANN)的方式来在高维空间中进行检索,以此来找到满足要求的数据。向量搜索在检索相似的图片、音频和文本等方面发挥着关键作用。例如,在图像检索中,我们可以通过计算图像的特征向量,然后使用向量检索技术来找到与查询图像最相似的图像;在推荐系统中,我们可以通过计算用户和物品的特征向量,然后使用向量检索技术来找到与用户兴趣最相似的其他用户或物品。下面针对向量搜索技术的基本概念进行简要介绍。 + +### 向量(Vector)是什么 + +向量是一种表示多维特征的数据结构。每个向量由一组数值组成,这些数值通常对应于某种特定的特征或属性。例如,在图像处理中,一个向量可以表示图像的颜色、纹理等特征。为了更有效地管理非结构化数据,常见的做法是将其转换为向量表示,并存储在向量数据库中,这种转换过程通常被称为 Embedding。通过将文本、图像或其他非结构化数据映射到高维向量空间,我们可以捕捉数据的语义特征和潜在关系。单词、短语或整个文档以及图像、音频和其他类型的数据都可以表示成向量,例如,我们可以将下面的文本表示成向量: +``` +"West Highland White Terrier": [0.0296700,0.0231020,0.0166550,0.0642470,-0.0110980, ... ,0.0253750] +``` + +### 向量数据库是什么 + +向量数据库是可以高效存储/检索向量的数据库。向量数据库用专门的数据结构和算法来处理向量之间的相似性计算和查询。通过构建索引结构,向量数据库可以快速找到最相似的向量。 + +### 向量搜索的应用 + +向量在检索相似的图片、音频和文本等方面发挥着关键作用,这源于其数据属性和特征表示能力。在机器学习和数据科学领域,向量被广泛用于描述数据特征。以图片数据为例,我们可以将其表示为向量。在计算机中,图片本质上是由像素构成的二维矩阵。每个像素的亮度值可视为图片的一个特征,因此,我们可以将这些亮度值串联成一个高维向量,从而实现图片的向量化表示。这种向量化表示使我们能够利用向量空间中的距离和相似度度量方法来比较不同图片之间的相似程度。例如,欧氏距离可用于衡量两个图片向量间的像素差异,而余弦相似度则可测量它们的方向差异。通过计算向量间的距离或相似度,我们可以量化评估不同图片之间的相似程度。 + +除此之外,检索增强生成(Retrieval-Augmented Generation)已经成为大语言模型应用的范式之一。而向量数据库是 RAG 应用中重要组成部分,向量数据库的存储容量、召回精度和召回速度在很大程度上影响了大语言模型应用的服务质量。 + +## MiniOB 向量数据库赛题 + +本次赛题,需要选手在 MiniOB 的基础上实现向量数据库的基本功能,向量数据库的功能被拆解为如下几个题目。 + +### 题目一:向量类型基础功能 +* 向量类型 + * 语法:`vector(size)`,其中,size 表示向量的维度(必须指定) + * 最大支持维度为 16000(在基础功能中只需要支持最大 1000 维向量即可) + * 向量类型中的浮点数最多保留两位小数,并且去掉多余的0 +* 支持创建包含向量类型的表: +```sql +CREATE TABLE items (id int, embedding vector(3)); +``` +* 支持插入向量类型的记录(注意:这里需要支持将字符串类型的值转换为向量类型存储): +```sql +INSERT INTO items VALUES (1, '[1,2,3]'); +``` +* 支持向量类型的算术运算(加法(+),减法(-),乘法(*),比较运算): +```sql +select embedding + '[1.5,2.3,3.3]', embedding - '[1,2,3]', '[1,2,3]' - embedding from items where embedding > '[0,0,0]'; +``` +其中,算术运算为逐个元素运算,如 `[1,2,3] + [1,1,1] = [2,3,4]`;比较运算为逐个元素的字典序比较,如`[1,2,3]<[1,2,4], [2,1,2]>[1,2,2]` +* 支持距离表达式计算: + * l2_distance + * 语法:l2_distance(vector A, vector B) + * 计算公式:$[ D = \sqrt{\sum_{i=1}^{n} (A_{i} - B_{i})^2} ]$ + * cosine_distance: + * 语法:cosine_distance(vector A, vector B) + * 计算公式:$[ D = \frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{A}| |\mathbf{B}|} = \frac{\sum_{i=1}^{n} A_i B_i}{\sqrt{\sum_{i=1}^{n} A_i^2} \sqrt{\sum_{i=1}^{n} B_i^2}} ]$ + * inner_product: + * 语法:inner_product(vector A, vector B) + * 计算公式:$[ D = \mathbf{A} \cdot \mathbf{B} = a_1 b_1 + a_2 b_2 + ... + a_n b_n = \sum_{i=1}^{n} a_i b_i ]$ + * 距离表达式的计算精度为保留2位小数。 + +### 题目二:向量类型扩展 + +支持使用列表(如:`[1,2,3]`)来表示向量: +```sql +select embedding + [1.5,2.3,3.3], embedding - '[1,2,3]',[1,2,3] - embedding from items where embedding > [0,0,0]; +``` + +### 题目三:高维向量 + +* 需要支持最大 16000 维向量的存储和检索。 +* 不需要考虑在高维向量上建立向量索引。 +* 高维向量的存储可以参考 TEXT 类型的实现。 + +### 题目四:向量索引(一) +在本次赛题中,需要实现 IVF-Flat 向量索引,下面简单介绍 IVF-Flat 向量索引的工作原理及相关语法。 +IVF-Flat 是一种常见的高效近似最近邻(Approximate Nearest Neighbor,ANN)搜索算法,尤其适用于大型、高维向量数据集。它通过一种称为倒排文件索引(Inverted File Index)的机制来加速向量检索。IVF-Flat 的主要思想是将所有的高维向量分为多个簇,然后在每个簇内进行精确的向量搜索。这种方法通过减少需要比较的向量数量,大大提高了搜索速度。 + +具体来说,IVF-Flat 包括两个主要步骤: + +* 向量分组(簇划分):将所有向量通过聚类算法(如 K-Means)分为多个簇。每个簇都有一个中心点(质心),所有向量都分配到离它最近的质心。下面的左图表示将所有向量分为若干个簇。 + +* 倒排文件索引:建立一个倒排文件索引,将向量的索引存储在对应簇的列表中。然后,通过这个索引来快速锁定需要比较的向量集合。下面的右图表示向量索引检索的过程。 + +![ivfflat](images/ivfflat.png) +以图像搜索为例的 IVF-Flat 向量索引工作流程如下: +1. 首先使用 K-Means 算法将所有图像的特征向量分成 1000 个簇。每个簇表示一部分相似的图片。例如,簇 1 可能包含大部分是风景图像的向量,簇 2 可能包含大部分是人物图像的向量,以此类推。对于每个簇,向量索引都维护一个倒排文件索引,存储属于这个簇的所有图像的索引。 +比如,簇 1 对应的倒排文件索引可能包括 [image_23, image_45, image_78...],这些是属于簇 1 的图像的索引。 +1. 查询过程:用户指定一张新图像进行搜索。首先,将这张图片通过同样的特征提取模型转换成一个高维向量。然后,通过计算这个向量与1000个质心的距离,找到离它最近的几个质心(假设是前5个)。在这几个质心对应的簇中,你进一步进行精确的向量搜索,找到最相似的图像。 + + +向量索引语法: +```sql +CREATE VECTOR INDEX vector_idx +ON items (embedding) +WITH (distance=l2_distance, type=ivfflat, lists=245, probes=5); +``` +其中 embedding 是向量索引列,必须指定是 vector 类型,`VECTOR INDEX` 必须搭配使用。vector_idx 是向量索引名,`WITH` 后面为创建向量索引的基本参数, 括号内部是一个表达式列表 其中的 distance 表示距离算法,必须是 `inner_product`,`l2_distance`,`cosine_distance` 其中的一种,type 为索引算法类型,当前只支持 ivfflat。distance 和 type 必须指定。注意:所有的关键字都是大小写不敏感的。 + +邻近向量检索语法: +```sql +select column_name1,column_name2, ... from table_name order by vector_distance_func(vector_column_name, '[float0,float1,……]') limit K; +``` +* vector_distance_func是向量距离表达式: + * l2_distance + * inner_product + * cosine_distance +* 要求order by子句表达式必须是一个向量距离表达式,且目前只支持向量列与常量向量 +* 要求limit子句必须是一个整数常量表达式 + +本题目中只需要支持: +1. 创建 Ivf-Flat 向量索引(本题目不考察 ANN 查询)。 +2. 当查询为邻近向量检索且命中向量索引时,需要将 order by + limit 的查询计划改写为通过向量索引进行检索的查询计划。 + +向量索引检索的查询计划示例如下: +```sql +EXPLAIN SELECT C1, L2_DISTANCE(C1, '[1,2,3]') FROM TEST ORDER BY L2_DISTANCE('[1,2,3]', C1) LIMIT 3; + +Query Plan +OPERATOR(NAME) +PROJECT +└─VECTOR_INDEX_SCAN(V_I ON TEST) +``` + +### 题目五:向量索引题目(二) + +* 需要在没有索引的场景下,支持向量检索功能(即精确检索)。 +* 需要支持完整的向量检索功能(包括向量索引构建,向量索引查询)。 + +向量检索示例: +```sql +SELECT * FROM TAB_VEC ORDER BY L2_DISTANCE(B, '[1,2,3]') LIMIT 1; +``` + +### 题目六:ann-benchmarks + +[ann-benchmarks](https://github.com/erikbern/ann-benchmarks) 是一个用于评估近似最近邻(Approximate Nearest Neighbor, ANN)搜索算法性能的工具和框架。我们使用 ann-benchmarks 来测试 MiniOB 向量搜索相关功能。 +本地运行支持 MiniOB 的 ann-benchmarks 测试的步骤如下: + +赛题测试程序中运行的 ann-benchmarks 只针对 `fashion-mnist-784-euclidean` 数据集进行测试,`--runs` 参数为1,测试使用的 python 脚本与 [ann-benchmarks](https://github.com/nautaa/ann-benchmarks/tree/miniob_ann) 完全相同,指定向量索引参数 `probes = 5, lists = 245`。 +测试程序不对性能做过多的限制,满足如下要求即为通过: +1. 要求在 10 分钟内完成 ann-benchmarks 的整个运行(即包括:插入数据,创建索引,ANN 查询,不包括下载数据集的时间)。 +2. 要求 ANN 查询的每秒查询数(QPS)达到 100 qps +3. 要求 ANN 查询的召回率(recall)达到 0.90 +4. 考虑向量索引的内存占用,要求 ann-benchmarks 运行过程中 miniob 的最大内存占用不超过 1 GB。 + +注意: 需要对 MiniOB 代码进行修改,以支持运行 ann-benchmarks 测试(如MiniOB 现有的 MySQL 通讯协议需要兼容 ann-benchmarks 所使用的 pymysql)。 + +#### 在 MiniOB 上运行 ann-benchmark + +1. 下载 ann-benchmarks 代码 +``` +git clone https://github.com/nautaa/ann-benchmarks.git -b miniob_ann +``` +1. 安装所需 python 依赖 +``` +cd ann-benchmarks/ +pip install -r requirements.txt +``` +1. 以 mysql 通讯协议且监听 unix socket 的方式启动 miniob. +```bash +# 示例命令 +/root/miniob/build_release/bin/observer -s /tmp/miniob.sock -P mysql +``` +1. 运行 ann-benchmark. +注意:需要将 `algorithms/miniob/config.yml` 中的 `arg_groups: [{unix_socket: "/tmp/miniob.sock"}]` 修改为 miniob 实际使用的 unix socket 文件地址 +```bash +# 示例命令 +python3 run.py --dataset fashion-mnist-784-euclidean --docker-tag ann-benchmarks-miniob --local --timeout 100 --runs 1 +``` +1. 生成运行结果. +```bash +# 示例命令 +python3 plot.py --dataset fashion-mnist-784-euclidean +# 示例输出如下,其中每行结果倒数第一个值为该算法对应的QPS,每行结果倒数第二个值为该算法对应的召回率。 +writing output to results/fashion-mnist-784-euclidean.png +Computing knn metrics + 0: MiniOBVector() 0.968 167.476 +Computing knn metrics + 1: BruteForceBLAS() 1.000 355.359 +``` + +### MiniOB 向量数据库语法示例 + +```sql +-- 建表语句 +CREATE TABLE TEST (ID INT, C1 VECTOR(3), C2 VECTOR(3), C3 VECTOR(4)); + +-- 插入语句 +INSERT INTO TEST VALUES(1, '[1,1,1]', '[1,2,3]', '[1,2,3,4]'); + +-- 查询语句 +SELECT C1, C2, L2_DISTANCE(C1, C2), L2_DISTANCE('[1,1,1]', '[1,2,3]'), COSINE_DISTANCE('[1,1,1]', C2) FROM TEST; +SELECT C1, C2, C1 + '[1.5,2.3,3.3]', '[3.3,55.55,66.66]' - C2, C2 * C1 FROM TEST; + +-- 创建索引 +CREATE VECTOR INDEX V_I ON TAB_VEC(B) WITH(TYPE=IVFFLAT, DISTANCE=L2_DISTANCE, LISTS=3, PROBES=3); + +-- ANN 查询 +SELECT * FROM TAB_VEC ORDER BY L2_DISTANCE(B, '[1,2,3]') LIMIT 1; +``` + +## 参考资料 +[向量数据库](https://en.wikipedia.org/wiki/Vector_database) + +[pgvector](https://github.com/pgvector/pgvector) + +[ivfflat 原理介绍](https://www.timescale.com/blog/nearest-neighbor-indexes-what-are-ivfflat-indexes-in-pgvector-and-how-do-they-work/) + +[支持 MiniOB 的 ann-benchmarks fork 仓库](https://github.com/nautaa/ann-benchmarks/tree/miniob_ann) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index ac2bbd5f..8c8fbca5 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -45,9 +45,7 @@ nav: - game/miniob_topics.md - game/github-introduction.md - game/gitee-instructions.md - - game/miniob-test-comment-date.md - - game/miniob-date-implementation.md - - game/miniob-drop-table-implementation.md + - game/miniob-vectordb.md - 数据库实现简明教程: - lectures/copyright.md - lectures/lecture-1.md @@ -122,3 +120,11 @@ extra: markdown_extensions: - toc: permalink: true + - pymdownx.arithmatex: + generic: true + block_tag: 'pre' + +extra_javascript: + - ./assets/mathjax.js + - https://polyfill.io/v3/polyfill.min.js?features=es6 + - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js From 5a6b2ad51db13be5334b3a90ab7493a2be8ed411 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 17 Oct 2024 18:10:31 +0800 Subject: [PATCH 269/308] =?UTF-8?q?feat:=20=E8=A7=86=E5=9B=BE=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=8C=81=E4=B9=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/executor/create_view_executor.cpp | 34 +++- .../operator/view_scan_physical_operator.cpp | 74 ++++++- .../operator/view_scan_physical_operator.h | 19 +- src/observer/storage/common/meta_util.cpp | 5 + src/observer/storage/common/meta_util.h | 8 +- src/observer/storage/db/db.cpp | 60 +++++- src/observer/storage/db/db.h | 12 +- src/observer/storage/table/base_table.cpp | 101 ++++++++++ src/observer/storage/table/base_table.h | 116 ++--------- src/observer/storage/table/table.cpp | 6 +- src/observer/storage/table/table.h | 2 +- src/observer/storage/table/table_meta.cpp | 32 ++- src/observer/storage/table/table_meta.h | 19 +- src/observer/storage/table/view.cpp | 190 ++++++++++++++---- src/observer/storage/table/view.h | 29 ++- 15 files changed, 511 insertions(+), 196 deletions(-) create mode 100644 src/observer/storage/table/base_table.cpp diff --git a/src/observer/sql/executor/create_view_executor.cpp b/src/observer/sql/executor/create_view_executor.cpp index 7b47839e..4ffaca07 100644 --- a/src/observer/sql/executor/create_view_executor.cpp +++ b/src/observer/sql/executor/create_view_executor.cpp @@ -17,13 +17,27 @@ #include "session/session.h" #include "sql/stmt/create_table_stmt.h" #include "storage/db/db.h" -#include "sql/optimizer/logical_plan_generator.h" -#include "sql/operator/logical_operator.h" -#include "sql/operator/project_logical_operator.h" -#include "sql/optimizer/physical_plan_generator.h" #include "storage/trx/trx.h" #include "sql/stmt/create_view_stmt.h" +// 提取 AS 后的 SQL 语句 +std::string extract_select_sql(const std::string &createViewSql) +{ + std::string lowerSql = createViewSql; + common::str_to_lower(lowerSql); + + std::string asToken = " as "; + + auto pos = lowerSql.find(asToken); + if (pos == std::string::npos) { + return ""; + } + + // 计算实际 SQL 句子的起始位置 + auto actualPos = pos + asToken.length(); + return createViewSql.substr(actualPos); +} + RC CreateViewExecutor::execute(SQLStageEvent *sql_event) { RC rc; @@ -40,8 +54,16 @@ RC CreateViewExecutor::execute(SQLStageEvent *sql_event) "create view executor can not run this command: %d", static_cast(stmt->type())); - rc = session->get_current_db()->create_table( - table_name, std::move(create_view_stmt->attr_names()), select_stmt, StorageFormat::ROW_FORMAT); + auto select_sql = extract_select_sql(sql_event->sql()); + if (select_sql.empty()) { + return RC::SQL_SYNTAX; + } + + rc = session->get_current_db()->create_table(table_name, + std::move(create_view_stmt->attr_names()), + std::move(select_sql), + select_stmt, + StorageFormat::ROW_FORMAT); if (OB_FAIL(rc)) { return rc; } diff --git a/src/observer/sql/operator/view_scan_physical_operator.cpp b/src/observer/sql/operator/view_scan_physical_operator.cpp index 5aa710cc..04ffe336 100644 --- a/src/observer/sql/operator/view_scan_physical_operator.cpp +++ b/src/observer/sql/operator/view_scan_physical_operator.cpp @@ -13,15 +13,81 @@ #include "sql/operator/view_scan_physical_operator.h" #include "event/sql_debug.h" #include "storage/table/table.h" +#include "sql/expr/expression_tuple.h" +#include "storage/table/view.h" +#include "sql/stmt/select_stmt.h" +#include "sql/optimizer/logical_plan_generator.h" +#include "sql/optimizer/physical_plan_generator.h" -#include -#include +RC ViewScanPhysicalOperator::init() +{ + RC rc = RC::SUCCESS; + + auto select_sql = view_->select_sql(); + + ParsedSqlResult parsed_sql_result; + parse(select_sql.c_str(), &parsed_sql_result); -using namespace std; + if (parsed_sql_result.sql_nodes().empty()) { + LOG_ERROR("Parsing failed: No SQL nodes found"); + return RC::INTERNAL; + } + + if (parsed_sql_result.sql_nodes().size() > 1) { + LOG_WARN("got multi sql commands but only 1 will be handled"); + } + + std::unique_ptr sql_node = std::move(parsed_sql_result.sql_nodes().front()); + if (sql_node->flag == SCF_ERROR) { + LOG_ERROR("Syntax error in SQL"); + return RC::SQL_SYNTAX; + } + if (sql_node->flag != SCF_SELECT) { + LOG_ERROR("Unexpected SQL command type. Expected SELECT, got flag: %d", sql_node->flag); + return RC::INTERNAL; + } + + Stmt *stmt = nullptr; + rc = SelectStmt::create(view_->db(), sql_node->selection, stmt); + if (rc != RC::SUCCESS && rc != RC::UNIMPLEMENTED) { + LOG_WARN("Failed to create select statement. rc=%d:%s", rc, strrc(rc)); + return rc; + } + + auto select_stmt = dynamic_cast(stmt); + std::unique_ptr logical_oper = nullptr; + LogicalPlanGenerator::create(select_stmt, logical_oper); + + if (logical_oper == nullptr) { + LOG_ERROR("Failed to create logical plan"); + return RC::INTERNAL; + } + + std::unique_ptr physical_oper = nullptr; + PhysicalPlanGenerator::create(*logical_oper, physical_oper); + + if (physical_oper == nullptr) { + LOG_ERROR("Failed to create physical plan"); + return RC::INTERNAL; + } + + select_expr_ = std::move(physical_oper); + + return RC::SUCCESS; +} RC ViewScanPhysicalOperator::open(Trx *trx) { - RC rc = select_expr_->open(trx); + RC rc = RC::SUCCESS; + + if (select_expr_ == nullptr) { + rc = init(); + if (OB_FAIL(rc)) { + return rc; + } + } + + rc = select_expr_->open(trx); if (rc == RC::SUCCESS) { tuple_.set_schema(view_, view_->table_meta().field_metas()); } diff --git a/src/observer/sql/operator/view_scan_physical_operator.h b/src/observer/sql/operator/view_scan_physical_operator.h index 1716a225..80f1d226 100644 --- a/src/observer/sql/operator/view_scan_physical_operator.h +++ b/src/observer/sql/operator/view_scan_physical_operator.h @@ -15,12 +15,9 @@ #include "common/rc.h" #include "sql/operator/physical_operator.h" #include "storage/record/record_manager.h" -#include "common/types.h" #include "sql/expr/expression_tuple.h" #include "storage/table/view.h" -class View; - /** * @brief 视图扫描物理算子 * @ingroup PhysicalOperator @@ -28,13 +25,7 @@ class View; class ViewScanPhysicalOperator : public PhysicalOperator { public: - ViewScanPhysicalOperator(View *view) : view_(view) { select_expr_ = view_->select_oper().get(); } - - ViewScanPhysicalOperator(View *view, std::string alias) : view_(view) - { - tuple_.set_table_alias(alias); - select_expr_ = view_->select_oper().get(); - } + ViewScanPhysicalOperator(View *view, std::string alias) : view_(view) { tuple_.set_table_alias(alias); } ~ViewScanPhysicalOperator() override = default; @@ -53,13 +44,15 @@ class ViewScanPhysicalOperator : public PhysicalOperator private: RC filter(RowTuple &tuple, bool &result); + RC init(); + // 把查询的结果转为当前视图的记录,就相当于从视图表中取出来一个记录 RC next_record(); private: - View *view_ = nullptr; - Trx *trx_ = nullptr; - PhysicalOperator *select_expr_; + View *view_ = nullptr; + Trx *trx_ = nullptr; + std::unique_ptr select_expr_ = nullptr; Record current_record_; RowTuple tuple_; std::vector> predicates_; // TODO chang predicate to table tuple filter diff --git a/src/observer/storage/common/meta_util.cpp b/src/observer/storage/common/meta_util.cpp index 00f4c5ff..136bf8ce 100644 --- a/src/observer/storage/common/meta_util.cpp +++ b/src/observer/storage/common/meta_util.cpp @@ -28,6 +28,11 @@ string table_meta_file(const char *base_dir, const char *table_name) return filesystem::path(base_dir) / (string(table_name) + TABLE_META_SUFFIX); } +string vtable_meta_file(const char *base_dir, const char *table_name) +{ + return filesystem::path(base_dir) / (string(table_name) + VTABLE_META_SUFFIX); +} + string table_data_file(const char *base_dir, const char *table_name) { return filesystem::path(base_dir) / (string(table_name) + TABLE_DATA_SUFFIX); diff --git a/src/observer/storage/common/meta_util.h b/src/observer/storage/common/meta_util.h index 2eaacd61..4ef48a43 100644 --- a/src/observer/storage/common/meta_util.h +++ b/src/observer/storage/common/meta_util.h @@ -17,11 +17,15 @@ See the Mulan PSL v2 for more details. */ static constexpr const char *DB_META_SUFFIX = ".db"; static constexpr const char *TABLE_META_SUFFIX = ".table"; +static constexpr const char *VTABLE_META_SUFFIX = ".vtable"; static constexpr const char *TABLE_META_FILE_PATTERN = ".*\\.table$"; -static constexpr const char *TABLE_DATA_SUFFIX = ".data"; -static constexpr const char *TABLE_INDEX_SUFFIX = ".index"; +static constexpr const char *VTABLE_META_FILE_PATTERN = + ".*\\.vtable$"; // 视图的 meta 命名和基表不一样,用于持久化时做区分 +static constexpr const char *TABLE_DATA_SUFFIX = ".data"; +static constexpr const char *TABLE_INDEX_SUFFIX = ".index"; string db_meta_file(const char *base_dir, const char *db_name); string table_meta_file(const char *base_dir, const char *table_name); +string vtable_meta_file(const char *base_dir, const char *table_name); string table_data_file(const char *base_dir, const char *table_name); string table_index_file(const char *base_dir, const char *table_name, const char *index_name); diff --git a/src/observer/storage/db/db.cpp b/src/observer/storage/db/db.cpp index 0dd98f4e..a170a9f5 100644 --- a/src/observer/storage/db/db.cpp +++ b/src/observer/storage/db/db.cpp @@ -163,8 +163,8 @@ RC Db::create_table(const char *table_name, span attribut return RC::SUCCESS; } -RC Db::create_table(const char *table_name, std::vector attr_names, SelectStmt *select_stmt, - const StorageFormat storage_format) +RC Db::create_table(const char *table_name, std::vector attr_names, std::string select_sql, + SelectStmt *select_stmt, const StorageFormat storage_format) { RC rc = RC::SUCCESS; // check table_name @@ -174,7 +174,7 @@ RC Db::create_table(const char *table_name, std::vector attr_names, } // 文件路径可以移到Table模块 - string table_file_path = table_meta_file(path_.c_str(), table_name); + string table_file_path = vtable_meta_file(path_.c_str(), table_name); View *table = new View; int32_t table_id = next_table_id_++; rc = table->create(this, @@ -183,6 +183,7 @@ RC Db::create_table(const char *table_name, std::vector attr_names, table_name, path_.c_str(), std::move(attr_names), + std::move(select_sql), select_stmt, storage_format); if (rc != RC::SUCCESS) { @@ -241,7 +242,8 @@ BaseTable *Db::find_table(int32_t table_id) const RC Db::open_all_tables() { - vector table_meta_files; + std::vector table_meta_files; + std::vector view_meta_files; int ret = list_file(path_.c_str(), TABLE_META_FILE_PATTERN, table_meta_files); if (ret < 0) { @@ -249,10 +251,16 @@ RC Db::open_all_tables() return RC::IOERR_READ; } + ret = list_file(path_.c_str(), VTABLE_META_FILE_PATTERN, view_meta_files); + if (ret < 0) { + LOG_ERROR("Failed to list view meta files under %s.", path_.c_str()); + return RC::IOERR_READ; + } + RC rc = RC::SUCCESS; for (const string &filename : table_meta_files) { - Table *table = new Table(); - rc = table->open(this, filename.c_str(), path_.c_str()); + BaseTable *table = new Table(); + rc = table->open(this, filename.c_str(), path_.c_str()); if (rc != RC::SUCCESS) { delete table; LOG_ERROR("Failed to open table. filename=%s", filename.c_str()); @@ -270,10 +278,50 @@ RC Db::open_all_tables() if (table->table_id() >= next_table_id_) { next_table_id_ = table->table_id() + 1; } + opened_tables_[table->name()] = table; LOG_INFO("Open table: %s, file: %s", table->name(), filename.c_str()); } + for (const string &filename : view_meta_files) { + BaseTable *table = new View(); + // 视图的 open 只是初始化了元数据和查询 sql,成员变量未初始化 + rc = table->open(this, filename.c_str(), path_.c_str()); + if (rc != RC::SUCCESS) { + delete table; + LOG_ERROR("Failed to open table. filename=%s", filename.c_str()); + return rc; + } + + if (opened_tables_.count(table->name()) != 0) { + LOG_ERROR("Duplicate table with difference file name. table=%s, the other filename=%s", + table->name(), filename.c_str()); + // 在这里原本先删除table后调用table->name()方法,犯了use-after-free的错误 + delete table; + return RC::INTERNAL; + } + + if (table->table_id() >= next_table_id_) { + next_table_id_ = table->table_id() + 1; + } + + opened_tables_[table->name()] = table; + LOG_INFO("Open table: %s, file: %s", table->name(), filename.c_str()); + } + + // 在所有表都载入后,对于视图要手动调一下 init,初始化成员变量 + for (auto &[_, table] : opened_tables_) { + if (table->type() == TableType::View) { + auto view = dynamic_cast(table); + rc = view->init_member(); + if (OB_FAIL(rc)) { + LOG_ERROR("Failed to initialize view: %s", table->name()); + return rc; + } + LOG_INFO("Successfully initialized view: %s", table->name()); + } + } + LOG_INFO("All table have been opened. num=%d", opened_tables_.size()); return rc; } diff --git a/src/observer/storage/db/db.h b/src/observer/storage/db/db.h index ebae230d..9597a51e 100644 --- a/src/observer/storage/db/db.h +++ b/src/observer/storage/db/db.h @@ -68,8 +68,16 @@ class Db RC create_table(const char *table_name, span attributes, StorageFormat storage_format = StorageFormat::ROW_FORMAT); - RC create_table(const char *table_name, std::vector attr_names, SelectStmt *select_stmt, - StorageFormat storage_format); + /** + * @brief 创建一个视图 + * @param table_name 表名 + * @param attr_names 表的属性 + * @param select_sql 查询 sql + * @param select_stmt 查询 stmt + * @param storage_format 表的存储格式 + */ + RC create_table(const char *table_name, std::vector attr_names, std::string select_sql, + SelectStmt *select_stmt, StorageFormat storage_format); RC drop_table(const char *table_name); diff --git a/src/observer/storage/table/base_table.cpp b/src/observer/storage/table/base_table.cpp new file mode 100644 index 00000000..3ed85b3a --- /dev/null +++ b/src/observer/storage/table/base_table.cpp @@ -0,0 +1,101 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/17 * + * @Description : table base source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "base_table.h" + +RC BaseTable::set_value_to_record(char *record_data, const Value &value, const FieldMeta *field) +{ + size_t copy_len = field->len(); + const size_t data_len = value.length(); + if (field->type() == AttrType::CHARS || field->type() == AttrType::TEXTS) { + if (copy_len > data_len) { + copy_len = data_len + 1; + } + } + if (field->type() == AttrType::VECTORS) { + if (copy_len > data_len) { + copy_len = data_len; + } + } + // text 类型的话最多存 65535 字节,超出则报错 + memcpy(record_data + field->offset(), value.data(), copy_len); + return RC::SUCCESS; +} + +RC BaseTable::make_record(int value_num, const Value *values, Record &record) +{ + RC rc = RC::SUCCESS; + // 检查字段类型是否一致 + if (value_num + table_meta_.sys_field_num() != table_meta_.field_num()) { + LOG_WARN("Input values don't match the table's schema, table name:%s", table_meta_.name()); + return RC::SCHEMA_FIELD_MISSING; + } + + const int normal_field_start_index = table_meta_.sys_field_num(); + // 复制所有字段的值 + int record_size = table_meta_.record_size(); + char *record_data = (char *)malloc(record_size); + memset(record_data, 0, record_size); + + for (int i = 0; i < value_num && OB_SUCC(rc); i++) { + const FieldMeta *field = table_meta_.field(i + normal_field_start_index); + const Value &value = values[i]; + // 判断是否在 NOT NULL 字段设置 NULL 值 + if (value.is_null()) { + if (!field->nullable()) { + return RC::NOT_NULLABLE_VALUE; + } + record_data[field->offset() + field->len() - 1] = '1'; + } else { + Value real_value = value; + if (field->type() != value.attr_type()) { + if (field->type() == AttrType::TEXTS && value.attr_type() == AttrType::CHARS) { + // 对于超长文本通过借用的方法减少拷贝 + rc = real_value.borrow_text(value); + if (OB_FAIL(rc)) { + LOG_WARN("failed to borrow text value. table name:%s, field name:%s, value length:%d", + table_meta_.name(), field->name(), value.length()); + break; + } + } else { + // 插入不允许非目标类型的类型提升 + rc = Value::cast_to(value, field->type(), real_value, false); + if (OB_FAIL(rc)) { + LOG_WARN("failed to cast value. table name:%s, field name:%s, value:%s", + table_meta_.name(), field->name(), value.to_string().c_str()); + break; + } + } + } + // 进行长度校验 + if (real_value.length() > field->len() - field->nullable()) { + LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", + field->name(), + attr_type_to_string(field->type()), + field->offset(), + value.length(), + field->len()); + return RC::VALUE_TOO_LONG; + } + rc = set_value_to_record(record_data, real_value, field); + } + } + + if (OB_FAIL(rc)) { + LOG_WARN("failed to make record. table name:%s", table_meta_.name()); + free(record_data); + return rc; + } + + record.set_data_owner(record_data, record_size); + return RC::SUCCESS; +} diff --git a/src/observer/storage/table/base_table.h b/src/observer/storage/table/base_table.h index fe80d358..1673a4b7 100644 --- a/src/observer/storage/table/base_table.h +++ b/src/observer/storage/table/base_table.h @@ -12,30 +12,23 @@ #pragma once -#include - #include "storage/record/record.h" #include "storage/table/table_meta.h" #include "storage/buffer/disk_buffer_pool.h" class Db; -enum class TableType -{ - Unknown, - Table, - View -}; - class BaseTable { public: virtual ~BaseTable() = default; - TableType type() const { return type_; } + Db *db() const { return db_; } + TableType type() const { return table_meta_.table_type(); } int32_t table_id() const { return table_meta_.table_id(); } const TableMeta &table_meta() const { return table_meta_; } const char *name() const { return table_meta_.name(); } + bool is_mutable() const { return table_meta_.is_mutable(); } /** * @brief 根据给定的字段生成一个记录/行 @@ -44,93 +37,16 @@ class BaseTable * @param values 每个字段的值 * @param record 生成的记录数据 */ - RC make_record(int value_num, const Value *values, Record &record) - { - RC rc = RC::SUCCESS; - // 检查字段类型是否一致 - if (value_num + table_meta_.sys_field_num() != table_meta_.field_num()) { - LOG_WARN("Input values don't match the table's schema, table name:%s", table_meta_.name()); - return RC::SCHEMA_FIELD_MISSING; - } - - const int normal_field_start_index = table_meta_.sys_field_num(); - // 复制所有字段的值 - int record_size = table_meta_.record_size(); - char *record_data = (char *)malloc(record_size); - memset(record_data, 0, record_size); + RC make_record(int value_num, const Value *values, Record &record); - for (int i = 0; i < value_num && OB_SUCC(rc); i++) { - const FieldMeta *field = table_meta_.field(i + normal_field_start_index); - const Value &value = values[i]; - // 判断是否在 NOT NULL 字段设置 NULL 值 - if (value.is_null()) { - if (!field->nullable()) { - return RC::NOT_NULLABLE_VALUE; - } - record_data[field->offset() + field->len() - 1] = '1'; - } else { - Value real_value = value; - if (field->type() != value.attr_type()) { - if (field->type() == AttrType::TEXTS && value.attr_type() == AttrType::CHARS) { - // 对于超长文本通过借用的方法减少拷贝 - rc = real_value.borrow_text(value); - if (OB_FAIL(rc)) { - LOG_WARN("failed to borrow text value. table name:%s, field name:%s, value length:%d", - table_meta_.name(), field->name(), value.length()); - break; - } - } else { - // 插入不允许非目标类型的类型提升 - rc = Value::cast_to(value, field->type(), real_value, false); - if (OB_FAIL(rc)) { - LOG_WARN("failed to cast value. table name:%s, field name:%s, value:%s", - table_meta_.name(), field->name(), value.to_string().c_str()); - break; - } - } - } - // 进行长度校验 - if (real_value.length() > field->len() - field->nullable()) { - LOG_ERROR("Value length exceeds maximum allowed length for field. Field: %s, Type: %s, Offset: %d, Length: %d, Max Length: %d", - field->name(), - attr_type_to_string(field->type()), - field->offset(), - value.length(), - field->len()); - return RC::VALUE_TOO_LONG; - } - rc = set_value_to_record(record_data, real_value, field); - } - } + RC set_value_to_record(char *record_data, const Value &value, const FieldMeta *field); - if (OB_FAIL(rc)) { - LOG_WARN("failed to make record. table name:%s", table_meta_.name()); - free(record_data); - return rc; - } - - record.set_data_owner(record_data, record_size); - return RC::SUCCESS; - } - - RC set_value_to_record(char *record_data, const Value &value, const FieldMeta *field) - { - size_t copy_len = field->len(); - const size_t data_len = value.length(); - if (field->type() == AttrType::CHARS || field->type() == AttrType::TEXTS) { - if (copy_len > data_len) { - copy_len = data_len + 1; - } - } - if (field->type() == AttrType::VECTORS) { - if (copy_len > data_len) { - copy_len = data_len; - } - } - // text 类型的话最多存 65535 字节,超出则报错 - memcpy(record_data + field->offset(), value.data(), copy_len); - return RC::SUCCESS; - } + /** + * 打开一个表或视图 + * @param meta_file 保存表元数据的文件完整路径 + * @param base_dir 表所在的文件夹,表记录数据文件、索引数据文件存放位置 + */ + virtual RC open(Db *db, const char *meta_file, const char *base_dir) = 0; /** * @brief 可以在页面锁保护的情况下访问记录 @@ -151,13 +67,9 @@ class BaseTable virtual RC sync() = 0; - bool is_mutable() const { return mutable_; } - protected: - Db *db_ = nullptr; - string base_dir_; - bool mutable_ = true; // 当前仅对视图可用,是否是只读视图,即包括聚合函数或 groupby having 语句 - TableType type_ = TableType::Unknown; - TableMeta table_meta_ = TableMeta(); + Db *db_ = nullptr; + string base_dir_; + TableMeta table_meta_{}; DiskBufferPool *data_buffer_pool_ = nullptr; /// 数据文件关联的buffer pool }; diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index b5bb0d19..35553d66 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -92,7 +92,8 @@ RC Table::create(Db *db, int32_t table_id, const char *path, const char *name, c // 创建文件 const vector *trx_fields = db->trx_kit().trx_fields(); - if ((rc = table_meta_.init(table_id, name, trx_fields, attributes, storage_format)) != RC::SUCCESS) { + if ((rc = table_meta_.init(table_id, TableType::Table, true, name, trx_fields, attributes, storage_format)) != + RC::SUCCESS) { LOG_ERROR("Failed to init table meta. name:%s, ret:%d", name, rc); return rc; // delete table file } @@ -126,9 +127,6 @@ RC Table::create(Db *db, int32_t table_id, const char *path, const char *name, c return rc; } - // 表类型 - type_ = TableType::Table; - LOG_INFO("Successfully create table %s:%s", base_dir, name); return rc; } diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index 63cec481..f76564f2 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -62,7 +62,7 @@ class Table : public BaseTable * @param meta_file 保存表元数据的文件完整路径 * @param base_dir 表所在的文件夹,表记录数据文件、索引数据文件存放位置 */ - RC open(Db *db, const char *meta_file, const char *base_dir); + RC open(Db *db, const char *meta_file, const char *base_dir) override; /** * @brief 在当前的表中插入一条记录 diff --git a/src/observer/storage/table/table_meta.cpp b/src/observer/storage/table/table_meta.cpp index cf653e2d..bd130b61 100644 --- a/src/observer/storage/table/table_meta.cpp +++ b/src/observer/storage/table/table_meta.cpp @@ -21,6 +21,8 @@ See the Mulan PSL v2 for more details. */ #include "json/json.h" static const Json::StaticString FIELD_TABLE_ID("table_id"); +static const Json::StaticString FIELD_TABLE_TYPE("table_type"); +static const Json::StaticString FIELD_TABLE_MUTABLE("table_mutable"); static const Json::StaticString FIELD_TABLE_NAME("table_name"); static const Json::StaticString FIELD_STORAGE_FORMAT("storage_format"); static const Json::StaticString FIELD_FIELDS("fields"); @@ -28,6 +30,8 @@ static const Json::StaticString FIELD_INDEXES("indexes"); TableMeta::TableMeta(const TableMeta &other) : table_id_(other.table_id_), + table_type_(other.table_type_), + mutable_(other.mutable_), name_(other.name_), fields_(other.fields_), indexes_(other.indexes_), @@ -43,8 +47,8 @@ void TableMeta::swap(TableMeta &other) noexcept std::swap(record_size_, other.record_size_); } -RC TableMeta::init(int32_t table_id, const char *name, const std::vector *trx_fields, - span attributes, StorageFormat storage_format) +RC TableMeta::init(int32_t table_id, TableType table_type, bool is_mutable, const char *name, + const std::vector *trx_fields, span attributes, StorageFormat storage_format) { if (common::is_blank(name)) { LOG_ERROR("Name cannot be empty"); @@ -105,6 +109,8 @@ RC TableMeta::init(int32_t table_id, const char *name, const std::vector TableMeta::trx_fields() const { return span(fields_.data(), sys_field_num()); } const FieldMeta *TableMeta::field(int index) const { return &fields_[index]; } + const FieldMeta *TableMeta::field(const char *name) const { if (nullptr == name) { @@ -164,6 +171,7 @@ const FieldMeta *TableMeta::find_field_by_offset(int offset) const } return nullptr; } + int TableMeta::field_num() const { return fields_.size(); } int TableMeta::sys_field_num() const { return static_cast(trx_fields_.size()); } @@ -188,6 +196,8 @@ int TableMeta::serialize(std::ostream &ss) const { Json::Value table_value; table_value[FIELD_TABLE_ID] = table_id_; + table_value[FIELD_TABLE_TYPE] = static_cast(table_type_); + table_value[FIELD_TABLE_MUTABLE] = mutable_; table_value[FIELD_TABLE_NAME] = name_; table_value[FIELD_STORAGE_FORMAT] = static_cast(storage_format_); @@ -239,6 +249,22 @@ int TableMeta::deserialize(std::istream &is) int32_t table_id = table_id_value.asInt(); + const Json::Value &table_type_value = table_value[FIELD_TABLE_TYPE]; + if (!table_type_value.isInt()) { + LOG_ERROR("Invalid table type. json value=%s", table_id_value.toStyledString().c_str()); + return -1; + } + + int32_t table_type = table_type_value.asInt(); + + const Json::Value &table_mutable_value = table_value[FIELD_TABLE_MUTABLE]; + if (!table_mutable_value.isBool()) { + LOG_ERROR("Invalid table mutable. json value=%s", table_id_value.toStyledString().c_str()); + return -1; + } + + bool table_mutable = table_mutable_value.asBool(); + const Json::Value &table_name_value = table_value[FIELD_TABLE_NAME]; if (!table_name_value.isString()) { LOG_ERROR("Invalid table name. json value=%s", table_name_value.toStyledString().c_str()); @@ -280,6 +306,8 @@ int TableMeta::deserialize(std::istream &is) std::sort(fields.begin(), fields.end(), comparator); table_id_ = table_id; + table_type_ = static_cast(table_type); + mutable_ = table_mutable; storage_format_ = static_cast(storage_format); name_.swap(table_name); fields_.swap(fields); diff --git a/src/observer/storage/table/table_meta.h b/src/observer/storage/table/table_meta.h index 7036aa47..f542457a 100644 --- a/src/observer/storage/table/table_meta.h +++ b/src/observer/storage/table/table_meta.h @@ -24,6 +24,13 @@ See the Mulan PSL v2 for more details. */ #include "storage/field/field_meta.h" #include "storage/index/index_meta.h" +enum class TableType +{ + Unknown, + Table, + View +}; + /** * @brief 表元数据 * @@ -38,13 +45,16 @@ class TableMeta : public common::Serializable void swap(TableMeta &other) noexcept; - RC init(int32_t table_id, const char *name, const std::vector *trx_fields, - std::span attributes, StorageFormat storage_format); + RC init(int32_t table_id, TableType table_type, bool is_mutable, const char *name, + const std::vector *trx_fields, std::span attributes, + StorageFormat storage_format); RC add_index(const IndexMeta &index); public: int32_t table_id() const { return table_id_; } + TableType table_type() const { return table_type_; } + bool is_mutable() const { return mutable_; } const char *name() const; const FieldMeta *trx_field() const; const FieldMeta *field(int index) const; @@ -72,7 +82,10 @@ class TableMeta : public common::Serializable void desc(std::ostream &os) const; protected: - int32_t table_id_ = -1; + int32_t table_id_ = -1; + TableType table_type_ = TableType::Unknown; + bool mutable_ = true; // 当前仅对视图可用,是否是只读视图,即包括聚合函数或 groupby having 语句 + std::string name_; std::vector trx_fields_; std::vector fields_; // 包含sys_fields diff --git a/src/observer/storage/table/view.cpp b/src/observer/storage/table/view.cpp index 1193741e..ba678fea 100644 --- a/src/observer/storage/table/view.cpp +++ b/src/observer/storage/table/view.cpp @@ -15,11 +15,9 @@ #include "storage/table/view.h" #include "storage/common/meta_util.h" #include "sql/stmt/select_stmt.h" -#include "sql/optimizer/logical_plan_generator.h" -#include "sql/optimizer/physical_plan_generator.h" RC View::create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, - std::vector attr_names, SelectStmt *select_stmt, StorageFormat storage_format) + std::vector attr_names, std::string select_sql, SelectStmt *select_stmt, StorageFormat storage_format) { if (table_id < 0) { LOG_WARN("invalid table id. table_id=%d, table_name=%s", table_id, name); @@ -34,8 +32,8 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co RC rc = RC::SUCCESS; - auto tables = select_stmt->tables(); - tables_ = std::move(tables); + tables_ = select_stmt->tables(); + bool is_mutable = true; auto &query_exprs = select_stmt->query_expressions(); std::vector attr_infos(query_exprs.size()); @@ -58,6 +56,7 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co } } if (!find) { + LOG_ERROR("View field '%s' not found in any base tables", field_expr->name()); return RC::SCHEMA_FIELD_MISSING; } @@ -73,8 +72,9 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co field_index_[i] = {nullptr, -1}; if (query_expr->type() == ExprType::AGGREGATION) { - mutable_ = false; // 包含聚合函数的是只读视图 + is_mutable = false; // 包含聚合函数的是只读视图 } + attr_info.type = query_expr->value_type(); attr_info.name = attr_names.empty() ? (query_expr->has_alias() ? query_expr->alias() : query_expr->name()) : std::move(attr_names[i]); @@ -93,27 +93,12 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co // 包含 groupby 和 having 的是只读视图 if (!select_stmt->group_by().empty() || select_stmt->having_filter_stmt()) { - mutable_ = false; - } - - unique_ptr logical_oper = nullptr; - LogicalPlanGenerator::create(select_stmt, logical_oper); - if (!logical_oper) { - return RC::INTERNAL; - } - - unique_ptr physical_oper = nullptr; - PhysicalPlanGenerator::create(*logical_oper, physical_oper); - if (!physical_oper) { - return RC::INTERNAL; + is_mutable = false; } - // 查询物理算子 - select_oper_ = std::move(physical_oper); - // 使用 table_name.table 记录一个表的元数据 // 判断表文件是否已经存在 - int fd = open(path, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, 0600); + int fd = ::open(path, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, 0600); if (fd < 0) { if (EEXIST == errno) { LOG_ERROR("Failed to create table file, it has been created. %s, EEXIST, %s", path, strerror(errno)); @@ -127,7 +112,8 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co // 创建文件 const vector *trx_fields = db->trx_kit().trx_fields(); - if ((rc = table_meta_.init(table_id, name, trx_fields, attr_infos, storage_format)) != RC::SUCCESS) { + if ((rc = table_meta_.init(table_id, TableType::View, is_mutable, name, trx_fields, attr_infos, storage_format)) != + RC::SUCCESS) { LOG_ERROR("Failed to init table meta. name:%s, ret:%d", name, rc); return rc; // delete table file } @@ -143,12 +129,22 @@ RC View::create(Db *db, int32_t table_id, const char *path, const char *name, co table_meta_.serialize(fs); fs.close(); - // 只存储视图元数据,不存记录数据 db_ = db; base_dir_ = base_dir; - // 视图类型 - type_ = TableType::View; + select_sql_ = std::move(select_sql); + + // 存储数据文件 + string data_file = table_data_file(base_dir, name); + std::ofstream file(data_file, ios_base::out | ios_base::binary); + if (!file.is_open()) { + LOG_ERROR("Failed to open file for write. file name=%s, errmsg=%s", path, strerror(errno)); + return RC::IOERR_OPEN; + } + + // 写入查询 sql,存一条 sql 就行了 + file << select_sql_ << std::endl; + file.close(); LOG_INFO("Successfully create table %s:%s", base_dir, name); return rc; @@ -265,27 +261,13 @@ RC View::visit_record(const RID &rid, const function &visitor) { RC View::sync() { - RC rc = RC::SUCCESS; - // for (Index *index : indexes_) { - // rc = index->sync(); - // if (rc != RC::SUCCESS) { - // LOG_ERROR("Failed to flush index's pages. table=%s, index=%s, rc=%d:%s", - // name(), - // index->index_meta().name(), - // rc, - // strrc(rc)); - // return rc; - // } - // } - // - // rc = data_buffer_pool_->flush_all_pages(); - // LOG_INFO("Sync table over. table=%s", name()); - return rc; + LOG_INFO("Sync view over. view=%s", name()); + return RC::SUCCESS; } RC View::drop() { - auto rc = sync(); // 刷新所有脏页 + auto rc = sync(); if (rc != RC::SUCCESS) { return rc; } @@ -300,3 +282,123 @@ RC View::drop() return RC::SUCCESS; } + +RC View::open(Db *db, const char *meta_file, const char *base_dir) +{ + // 加载元数据文件 + fstream fs; + string meta_file_path = string(base_dir) + common::FILE_PATH_SPLIT_STR + meta_file; + fs.open(meta_file_path, ios_base::in | ios_base::binary); + if (!fs.is_open()) { + LOG_ERROR("Failed to open meta file for read. file name=%s, errmsg=%s", meta_file_path.c_str(), strerror(errno)); + return RC::IOERR_OPEN; + } + if (table_meta_.deserialize(fs) < 0) { + LOG_ERROR("Failed to deserialize table meta. file name=%s", meta_file_path.c_str()); + fs.close(); + return RC::INTERNAL; + } + fs.close(); + + db_ = db; + base_dir_ = base_dir; + + // 加载数据文件 + RC rc = init_data(); + if (rc != RC::SUCCESS) { + LOG_ERROR("Failed to open table %s due to init record handler failed.", base_dir); + // don't need to remove the data_file + return rc; + } + + return RC::SUCCESS; +} + +RC View::init_data() +{ + // 加载数据文件 + string data_file = table_data_file(base_dir_.c_str(), table_meta_.name()); + + // 先读出来查询 sql,构造查询 stmt + // 然后就可以初始化 tables 和建立字段映射 + + std::ifstream file(data_file); + + if (!file.is_open()) { + LOG_ERROR("Failed to open file for read. file name=%s, errmsg=%s", data_file.c_str(), strerror(errno)); + return RC::IOERR_OPEN; + } + + // 读取一整行,默认是读到空格就停了 + std::getline(file, select_sql_); + + return RC::SUCCESS; +} + +RC View::init_member() +{ + RC rc = RC::SUCCESS; + + ParsedSqlResult parsed_sql_result; + + parse(select_sql_.c_str(), &parsed_sql_result); + if (parsed_sql_result.sql_nodes().empty()) { + LOG_ERROR("Parsing failed: No SQL nodes found"); + return RC::INTERNAL; + } + + if (parsed_sql_result.sql_nodes().size() > 1) { + LOG_WARN("got multi sql commands but only 1 will be handled"); + } + + std::unique_ptr sql_node = std::move(parsed_sql_result.sql_nodes().front()); + if (sql_node->flag == SCF_ERROR) { + LOG_ERROR("Syntax error in SQL"); + return RC::SQL_SYNTAX; + } + if (sql_node->flag != SCF_SELECT) { + LOG_ERROR("Unexpected SQL command type. Expected SELECT, got flag: %d", sql_node->flag); + return RC::INTERNAL; + } + + Stmt *stmt = nullptr; + rc = SelectStmt::create(db_, sql_node->selection, stmt); + if (rc != RC::SUCCESS && rc != RC::UNIMPLEMENTED) { + LOG_WARN("Failed to create select stmt. rc=%d:%s", rc, strrc(rc)); + return rc; + } + + // 初始化成员变量 + auto select_stmt = dynamic_cast(stmt); + tables_ = select_stmt->tables(); + + auto &query_exprs = select_stmt->query_expressions(); + field_index_.resize(query_exprs.size()); + for (int i = 0; i < query_exprs.size(); ++i) { + auto &query_expr = query_exprs[i]; + if (query_expr->type() == ExprType::FIELD) { + auto field_expr = dynamic_cast(query_expr.get()); + + // 建立视图字段到基表字段的索引 + bool find = false; + for (auto &table : tables_) { + auto table_field_meta = table->table_meta().field(field_expr->name()); + // 当前视图字段在这个表 + if (table_field_meta != nullptr) { + field_index_[i] = {table, table_field_meta->field_id()}; + find = true; + break; + } + } + if (!find) { + LOG_ERROR("View field '%s' not found in any base tables", field_expr->name()); + return RC::SCHEMA_FIELD_MISSING; + } + } else { + // 表达式字段为无效索引 + field_index_[i] = {nullptr, -1}; + } + } + + return rc; +} diff --git a/src/observer/storage/table/view.h b/src/observer/storage/table/view.h index eb6cbaf8..64f65482 100644 --- a/src/observer/storage/table/view.h +++ b/src/observer/storage/table/view.h @@ -26,13 +26,28 @@ class View : public BaseTable * @param path 元数据保存的文件(完整路径) * @param name 表名 * @param base_dir 表数据存放的路径 - * @param attributes 字段 + * @param attr_names 字段 + * @param select_sql 查询 sql + * @param select_stmt 查询 stmt + * @param storage_format 存储格式,与基表一致 */ RC create(Db *db, int32_t table_id, const char *path, const char *name, const char *base_dir, - std::vector attr_names, SelectStmt *select_stmt, StorageFormat storage_format); + std::vector attr_names, std::string select_sql, SelectStmt *select_stmt, + StorageFormat storage_format); RC drop() override; + /** + * 打开一个视图 + * @param meta_file 保存表元数据的文件完整路径 + * @param base_dir 表所在的文件夹,表记录数据文件、索引数据文件存放位置 + */ + RC open(Db *db, const char *meta_file, const char *base_dir) override; + + RC init_data(); + + RC init_member(); + RC insert_record(Record &record) override; RC delete_record(const Record &record) override; RC delete_record(const RID &rid) override; @@ -42,13 +57,13 @@ class View : public BaseTable RC sync() override; - std::unique_ptr &select_oper() { return select_oper_; } + const std::string &select_sql() { return select_sql_; } bool has_join() { return tables_.size() > 1; } private: - // 视图的 field 对应 哪个物理表和对应的 field idx - std::vector> field_index_; - std::vector tables_; - std::unique_ptr select_oper_; // 存储了 select 的物理算子 + std::string select_sql_; // 持久化,运行时也只能存解析后的 sql,因为涉及独占资源的移动 + std::vector tables_; // 可能含视图和基表,所以要在所有表都加载好再处理 + // 视图的 field 对应 哪个物理表和对应的 field idx + std::vector> field_index_; // 持久化 }; From 7d965e9d8cc73a9c96374abe6bc0f4944c5f6724 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 18:38:49 +0800 Subject: [PATCH 270/308] =?UTF-8?q?client=E5=A4=9A=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/obclient/client.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/obclient/client.cpp b/src/obclient/client.cpp index d1653667..1808cbab 100644 --- a/src/obclient/client.cpp +++ b/src/obclient/client.cpp @@ -10,8 +10,6 @@ See the Mulan PSL v2 for more details. */ #if 1 -#if 1 - #include #include #include From f0c241cc9c303ac8204ecddc20c66a1e45ef7088 Mon Sep 17 00:00:00 2001 From: Koschei Date: Thu, 17 Oct 2024 18:43:35 +0800 Subject: [PATCH 271/308] =?UTF-8?q?feat:=20=E5=90=8C=E6=AD=A5=202024=20min?= =?UTF-8?q?iob=20=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/game/miniob-date-implementation.md | 165 ------------------ .../game/miniob-drop-table-implementation.md | 107 ------------ docs/docs/game/miniob-test-comment-date.md | 86 --------- src/observer/common/type/data_type.h | 2 +- src/observer/common/type/vector_type.h | 12 +- src/observer/common/value.h | 1 + .../storage/index/bplus_tree_index.cpp | 4 +- src/observer/storage/index/bplus_tree_index.h | 6 +- src/observer/storage/index/index.h | 12 ++ src/observer/storage/index/ivfflat_index.h | 49 ++++++ 10 files changed, 80 insertions(+), 364 deletions(-) delete mode 100644 docs/docs/game/miniob-date-implementation.md delete mode 100644 docs/docs/game/miniob-drop-table-implementation.md delete mode 100644 docs/docs/game/miniob-test-comment-date.md create mode 100644 src/observer/storage/index/ivfflat_index.h diff --git a/docs/docs/game/miniob-date-implementation.md b/docs/docs/game/miniob-date-implementation.md deleted file mode 100644 index a64fd51c..00000000 --- a/docs/docs/game/miniob-date-implementation.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: Date 实现解析 -author: caizj ---- - -# Date实现解析 - -> 此实现解析有往届选手提供。具体代码实现已经有所变更,因此仅供参考。 - -## DATE的存储 - - -一种实现方式:date以int类型的YYYYMMDD格式保存,比如2021-10-21,保存为整数就是2021\*1000 + 10\*100 + 21,在select展示时转成字符串YYYY-MM-DD格式,注意月份和天数要使用0填充。 - -在parse.cpp中,参考 - -```c++ -int value_init_date(Value* value, const char* v) { - value->type = DATES; - int y,m,d; - sscanf(v, "%d-%d-%d", &y, &m, &d);//not check return value eq 3, lex guarantee - bool b = check_date(y,m,d); - if(!b) return -1; - int dv = y*10000+m*100+d; - value->data = malloc(sizeof(dv));//TODO:check malloc failure - memcpy(value->data, &dv, sizeof(dv)); - return 0; -} -``` - -## 修改点 - -### 语法上修改支持 - -需要可匹配date的token词和DATE_STR值(一定要先于SSS,因为date的输入DATE_STR是SSS的子集) - -语法(yacc文件)上增加type,value里增加DATE_STR值 - -```c++ -[Dd][Aa][Tt][Ee] RETURN_TOKEN(DATE_T); // 增加DATE的token,需要在yacc文件中增加DATE_T的token - -{QUOTE}[0-9]{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01]){QUOTE} yylval->string=strdup(yytext); RETURN_TOKEN(DATE_STR); // 使用正则表达式过滤DATE。需要在yacc文件中增加 %token DATE_STR -``` - -同时,需要增加一个DATE类型,与INTS,FLOATS等含义相同: - -```c++ -// in parse_defs.h -typedef enum { UNDEFINED, CHARS, INTS, FLOATS, DATES, TEXTS, NULLS } AttrType; -``` - -### Date的合法性判断 - -输入日期的格式可以在词法分析时正则表达式里过滤掉。润年,大小月日期的合法性在普通代码中再做进一步判断。 - -在parse阶段,对date做校验,并格式化成int值保存(参考最前面的代码),同时对日期的合法性做校验,参考: - -```c++ -bool check_date(int y, int m, int d) -{ - static int mon[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; - bool leap = (y%400==0 || (y%100 && y%4==0)); - return y > 0 - && (m > 0)&&(m <= 12) - && (d > 0)&&(d <= ((m==2 && leap)?1:0) + mon[m]); -} -``` - -### 增加新的类型date枚举 - -代码里有多处和类型耦合地方(增加一个类型,要动很多处离散的代码,基础代码在这方面的可维护性不好) - -包括不限于,以下几处: - -- DefaultConditionFilter -需要增加DATES类型的数据对比。因为这里将date作为整数存储,那么可以直接当做INTS来对比,比如: - -```c++ - case INTS: - case DATES: { - // 没有考虑大小端问题 - // 对int和float,要考虑字节对齐问题,有些平台下直接转换可能会跪 - int left = *(int *)left_value; - int right = *(int *)right_value; - cmp_result = left - right; - } break; -``` - -- BplusTreeScanner -与 `DefaultConditionFilter` 类似,也需要支持DATE类型的对比,可以直接当做整数比较。参考其中一块代码: - -```c++ -case INTS:case DATES: { - i1 = *(int *) pdata; - i2 = *(int *) pkey; - if (i1 > i2) - return 1; - if (i1 < i2) - return -1; - if (i1 == i2) - return 0; - } - break; -``` - -- ATTR_TYPE_NAME(storage/common/field_meta.cpp) -保存元数据时,需要这里的信息,比较简单,参考: - -```c++ -const char *ATTR_TYPE_NAME[] = { - "undefined", - "chars", - "ints", - "floats", - "dates" -}; -``` - -- insert_record_from_file(storage/default/default_storage_stage.cpp) - -这个接口主要是为了支持从文件导入数据的,同样,实现可以与int类型保持一致。 - -```c++ -switch (field->type()) { - case INTS: case DATES:{ - deserialize_stream.clear(); // 清理stream的状态,防止多次解析出现异常 - deserialize_stream.str(file_value); - - int int_value; - deserialize_stream >> int_value; - if (!deserialize_stream || !deserialize_stream.eof()) { - errmsg << "need an integer but got '" << file_values[i] - << "' (field index:" << i << ")"; - - rc = RC::SCHEMA_FIELD_TYPE_MISMATCH; - } else { - value_init_integer(&record_values[i], int_value); - } - } -``` - -### Date select展示 - -TupleRecordConverter::add_record时做格式转换,需要按照输出要求,将日期类型数据,转换成合适的字符串。参考: - -```c++ -case DATES: { - int value = *(int*)(record + field_meta->offset()); - char buf[16] = {0}; - snprintf(buf,sizeof(buf),"%04d-%02d-%02d",value/10000, (value%10000)/100,value%100); // 注意这里月份和天数,不足两位时需要填充0 - tuple.add(buf,strlen(buf)); -} -break; -``` - -### 异常失败处理 - -只要输入的日期不合法,输出都是FAILURE\n。包括查询的where条件、插入的日期值、更新的值等。这里在解析时(parse.cpp)中就可以直接返回错误。 - -## 自测覆盖点 - -1. 日期输入,包括合法和非法日期格式。非法日期可以写单元测试做。 -2. 日期值比较=、 >、 <、 >=、 <= -3. 日期字段当索引。很多同学漏掉了这个点。 -4. 日期展示格式,注意月份和天数补充0 \ No newline at end of file diff --git a/docs/docs/game/miniob-drop-table-implementation.md b/docs/docs/game/miniob-drop-table-implementation.md deleted file mode 100644 index f7ad9351..00000000 --- a/docs/docs/game/miniob-drop-table-implementation.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: Drop table 实现解析 ---- - -# miniob - drop table 实现解析 - -> 此实现解析有往届选手提供。具体代码实现已经有所变更,因此仅供参考。 - -**代码部分主要添加在:** - -drop table 与create table相反,要清理掉所有创建表和表相关联的资源,比如描述表的文件、数据文件以及索引等相关数据和文件。 - -sql流转到default_storge阶段的时候,在处理sql的函数中,新增一个drop_table的case。 - -drop table就是删除表,在`create table t`时,会新建一个t.table文件,同时为了存储数据也会新建一个t.data文件存储下来。同时创建索引的时候,也会创建记录索引数据的文件,在删除表时也要一起删除掉。 - -那么删除表,就需要**删除t.table文件、t.data文件和关联的索引文件**。 - -同时由于buffer pool的存在,在新建表和插入数据的时候,会写入buffer pool缓存。所以drop table,不仅需要删除文件,也需要**清空buffer pool** ,防止在数据没落盘的时候,再建立同名表,仍然可以查询到数据。 - -如果建立了索引,比如t_id on t(id),那么也会新建一个t_id.index文件,也需要删除这个文件。 - -这些东西全部清空,那么就完成了drop table。 - -具体的代码实现如下: -在default_storage_stage.cpp 中的处理SQL语句的case中增加一个 - -```c++ - case SCF_DROP_TABLE: { - const DropTable& drop_table = sql->sstr[sql->q_size-1].drop_table; // 拿到要drop 的表 - rc = handler_->drop_table(current_db,drop_table.relation_name); // 调用drop table接口,drop table要在handler中实现 - snprintf(response,sizeof(response),"%s\n", rc == RC::SUCCESS ? "SUCCESS" : "FAILURE"); // 返回结果,带不带换行符都可以 - } -break; -``` - -在default_handler.cpp文件中,实现handler的drop_table接口: - -```c++ -RC DefaultHandler::drop_table(const char *dbname, const char *relation_name) { - Db *db = find_db(dbname); // 这是原有的代码,用来查找对应的数据库,不过目前只有一个库 - if(db == nullptr) { - return RC::SCHEMA_DB_NOT_OPENED; - } - return db->drop_table(relation_name); // 直接调用db的删掉接口 -} -``` - -在db.cpp中,实现drop_table接口 - -```c++ -RC Db::drop_table(const char* table_name) -{ - auto it = opened_tables_.find(table_name); - if (it == opened_tables_.end()) - { - return SCHEMA_TABLE_NOT_EXIST; // 找不到表,要返回错误,测试程序中也会校验这种场景 - } - Table* table = it->second; - RC rc = table->destroy(path_.c_str()); // 让表自己销毁资源 - if(rc != RC::SUCCESS) return rc; - - opened_tables_.erase(it); // 删除成功的话,从表list中将它删除 - delete table; - return RC::SUCCESS; -} -``` - -table.cpp中清理文件和相关数据 - -```c++ -RC Table::destroy(const char* dir) { - RC rc = sync();//刷新所有脏页 - - if(rc != RC::SUCCESS) return rc; - - std::string path = table_meta_file(dir, name()); - if(unlink(path.c_str()) != 0) { - LOG_ERROR("Failed to remove meta file=%s, errno=%d", path.c_str(), errno); - return RC::GENERIC_ERROR; - } - - std::string data_file = std::string(dir) + "/" + name() + TABLE_DATA_SUFFIX; - if(unlink(data_file.c_str()) != 0) { // 删除描述表元数据的文件 - LOG_ERROR("Failed to remove data file=%s, errno=%d", data_file.c_str(), errno); - return RC::GENERIC_ERROR; - } - - std::string text_data_file = std::string(dir) + "/" + name() + TABLE_TEXT_DATA_SUFFIX; - if(unlink(text_data_file.c_str()) != 0) { // 删除表实现text字段的数据文件(后续实现了text case时需要考虑,最开始可以不考虑这个逻辑) - LOG_ERROR("Failed to remove text data file=%s, errno=%d", text_data_file.c_str(), errno); - return RC::GENERIC_ERROR; - } - - const int index_num = table_meta_.index_num(); - for (int i = 0; i < index_num; i++) { // 清理所有的索引相关文件数据与索引元数据 - ((BplusTreeIndex*)indexes_[i])->close(); - const IndexMeta* index_meta = table_meta_.index(i); - std::string index_file = index_data_file(dir, name(), index_meta->name()); - if(unlink(index_file.c_str()) != 0) { - LOG_ERROR("Failed to remove index file=%s, errno=%d", index_file.c_str(), errno); - return RC::GENERIC_ERROR; - } - } - return RC::SUCCESS; -} -``` \ No newline at end of file diff --git a/docs/docs/game/miniob-test-comment-date.md b/docs/docs/game/miniob-test-comment-date.md deleted file mode 100644 index e6d55d14..00000000 --- a/docs/docs/game/miniob-test-comment-date.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Date 测试解说 ---- - -> 此实现解析有往届选手提供。具体代码实现已经有所变更,因此仅供参考。 - -miniob-date 测试解说 - -本篇文章针对在miniob中增加date字段类型做解析,希望可以帮助参加比赛的同学能够顺利通过。 - -# 题目描述 - -date测试不会超过2038年2月,不会小于1970年1月1号。注意处理非法的date输入,需要返回FAILURE。 - -## 测试示例 - -create table t(id int, birthday date); - -insert into t values(1, '2020-09-10'); - -insert into t values(2, '2021-1-2'); - -select * from t; - -> 注意:所有的字符都是英文。浏览器如果将英文字符转成中文字符,请留意。 - -# 如何选择date的存储长度 - -当前已经有的字段类型有:INTS/FLOATS/CHARS,这几个字段的内存大小都是4个字节。而题目中要求 date 类型,时间范围在1970年1月1日和2038年2月之间,说明date 字段也可以用4个字段来存储。这个原理可以参考time函数的说明,4个字节存储的时间戳,如果起始时间是1970年1月1日,那么将会在2038年某一天越界,而这一天是在2038年2月之后的。因此 date 字段也可以使用 `4 字节`存储。 - -使用4字节存储的好处还有,可以将4字节数据直接当做一个整数来处理,这样做比较运算时,也可以直接使用整数运算。 - - -# 如何解析date 相关SQL - -date作为一个关键字,可以直接在lex文件中添加。 - -\[Dd\]\[Aa\]\[Tt\]\[Ee\] RETURN_TOKEN(DATE); - -当然也需要增加token DATE。 - -对于日期数据,比如"2021-10-25",建议不要在词法解析和语法解析模块中写正则表达式来解析,因为它本身就是一个字符串。如果写正则表达式来解析,那就不能再将它作为普通字符串来处理,另外,正则表达式规则将会非常复杂,难以维护和扩展。比如我想让日期支持更多的格式:"2021/10/25","2021年10月25日";对与普通的字符串字段,理论上是能够接收"2021-10-25",这样的字符串作为参数去更新或插入的,如果在词法/语法解析中处理,那还需要处理使用日期更新字符串字段的场景。 - - - -# 需要考虑的场景 - -## 日期解析 - -需要判断类型为日期的地方,都需要按照一定格式去解析日期。当前输入格式年月日是按照'-'来分隔的,这样就非常简单了。将字符串分割为3个字符串,然后分别当成数字解析就可以。 - - - -## 日期是否合法 - -用字符串表示日期是有合法性要求的。比如2021-02-30,就不能算是正确的日期。 - -可能出现日期的地方有(不一定全面): - -- 插入数据的值; - -- 更新数据的值; - -- 比较条件中的日期; - -考虑再周全一点,可以支持一下聚合函数中有date数据类型。 - - - -## 建表 - -建表需要支持date类型字段 - -## 建索引 - -当前Miniob默认支持了B+-Tree索引,需要对这个索引做扩展。 - -## 日期比较 - -查询条件中可能有日期,查询可能是通过索引查询,也可能只是普通的查询。 - - - -## 输出格式 - -注意按照题目提示来输出 "YYYY-mm-dd",位数不够,需要用'0'填充。 diff --git a/src/observer/common/type/data_type.h b/src/observer/common/type/data_type.h index 33e88b4d..2e4508ec 100644 --- a/src/observer/common/type/data_type.h +++ b/src/observer/common/type/data_type.h @@ -20,7 +20,7 @@ class Value; /** * @brief 定义了数据类型相关的操作,比如比较运算、算术运算等 - * @defgroup 数据类型 + * @defgroup DataType * @details 数据类型定义的算术运算中,比如 add、subtract 等,将按照当前数据类型设置最终结果值的类型。 * 参与运算的参数类型不一定相同,不同的类型进行运算是否能够支持需要参考各个类型的实现。 */ diff --git a/src/observer/common/type/vector_type.h b/src/observer/common/type/vector_type.h index 094e445f..13e68b18 100644 --- a/src/observer/common/type/vector_type.h +++ b/src/observer/common/type/vector_type.h @@ -12,6 +12,10 @@ See the Mulan PSL v2 for more details. */ #include "common/type/data_type.h" +/** + * @brief 向量类型 + * @ingroup DataType + */ class VectorType : public DataType { public: @@ -28,4 +32,10 @@ class VectorType : public DataType int cast_cost(AttrType type) override; RC to_string(const Value &val, string &result) const override; -}; \ No newline at end of file + + RC add(const Value &left, const Value &right, Value &result) const override { return RC::UNIMPLEMENTED; } + + RC subtract(const Value &left, const Value &right, Value &result) const override { return RC::UNIMPLEMENTED; } + + RC multiply(const Value &left, const Value &right, Value &result) const override { return RC::UNIMPLEMENTED; } +}; diff --git a/src/observer/common/value.h b/src/observer/common/value.h index b0003b59..95d75046 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -42,6 +42,7 @@ class Value final friend class DateType; friend class NullType; friend class TextType; + friend class VectorType; Value() = default; diff --git a/src/observer/storage/index/bplus_tree_index.cpp b/src/observer/storage/index/bplus_tree_index.cpp index 00930b94..10eadcb4 100644 --- a/src/observer/storage/index/bplus_tree_index.cpp +++ b/src/observer/storage/index/bplus_tree_index.cpp @@ -19,7 +19,7 @@ See the Mulan PSL v2 for more details. */ BplusTreeIndex::~BplusTreeIndex() noexcept { close(); } -RC BplusTreeIndex::create(Table *table, const char *file_name, const IndexMeta &index_meta) +RC BplusTreeIndex::create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) { if (inited_) { LOG_WARN("Failed to create index due to the index has been created before. file_name:%s, index:%s", @@ -44,7 +44,7 @@ RC BplusTreeIndex::create(Table *table, const char *file_name, const IndexMeta & return RC::SUCCESS; } -RC BplusTreeIndex::open(Table *table, const char *file_name, const IndexMeta &index_meta) +RC BplusTreeIndex::open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) { if (inited_) { LOG_WARN("Failed to open index due to the index has been initedd before. file_name:%s, index:%s", diff --git a/src/observer/storage/index/bplus_tree_index.h b/src/observer/storage/index/bplus_tree_index.h index a0a25ac9..773ea7d7 100644 --- a/src/observer/storage/index/bplus_tree_index.h +++ b/src/observer/storage/index/bplus_tree_index.h @@ -27,8 +27,10 @@ class BplusTreeIndex : public Index BplusTreeIndex() = default; virtual ~BplusTreeIndex() noexcept; - RC create(Table *table, const char *file_name, const IndexMeta &index_meta); - RC open(Table *table, const char *file_name, const IndexMeta &index_meta); + RC create( + Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta = {}) override; + RC open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta = {}) override; + RC close(); RC insert_entry(const char *record, const RID *rid) override; diff --git a/src/observer/storage/index/index.h b/src/observer/storage/index/index.h index b610302d..a5601f95 100644 --- a/src/observer/storage/index/index.h +++ b/src/observer/storage/index/index.h @@ -40,6 +40,18 @@ class Index Index() = default; virtual ~Index() = default; + virtual RC create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) + { + return RC::UNSUPPORTED; + } + + virtual RC open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) + { + return RC::UNSUPPORTED; + } + + virtual bool is_vector_index() { return false; } + const IndexMeta &index_meta() const { return index_meta_; } /** diff --git a/src/observer/storage/index/ivfflat_index.h b/src/observer/storage/index/ivfflat_index.h new file mode 100644 index 00000000..7942520f --- /dev/null +++ b/src/observer/storage/index/ivfflat_index.h @@ -0,0 +1,49 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +#pragma once + +#include "storage/index/index.h" + +/** + * @brief ivfflat 向量索引 + * @ingroup Index + */ +class IvfflatIndex : public Index +{ +public: + IvfflatIndex() {}; + virtual ~IvfflatIndex() noexcept {}; + + RC create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) + { + return RC::UNIMPLEMENTED; + }; + RC open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) + { + + return RC::UNIMPLEMENTED; + }; + + vector ann_search(const vector &base_vector, size_t limit) { return vector(); } + + RC close() { return RC::UNIMPLEMENTED; } + + RC insert_entry(const char *record, const RID *rid) override { return RC::UNIMPLEMENTED; }; + RC delete_entry(const char *record, const RID *rid) override { return RC::UNIMPLEMENTED; }; + + RC sync() override { return RC::UNIMPLEMENTED; }; + +private: + bool inited_ = false; + Table *table_ = nullptr; + int lists_ = 1; + int probes_ = 1; +}; From 9e7aabf2283e76ff457a72fc949f680ebd24850c Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 18:49:14 +0800 Subject: [PATCH 272/308] =?UTF-8?q?=E4=BF=AE=E6=94=B9vector=5Fto=5Fstring?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 824a25dc..37576903 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -320,7 +320,8 @@ RC vector_to_string(const vector &args, Value &result) if (args[0].attr_type() != AttrType::VECTORS) { return RC::INVALID_ARGUMENT; } - return Value::cast_to(args[0], AttrType::CHARS, result); + result = Value(args[0].to_string().c_str()); + return RC::SUCCESS; } RC vector_dim(const vector &args, Value &result) From 7f8c65b0265b04a37d38ce6bfeb7fdcb02806160 Mon Sep 17 00:00:00 2001 From: root <503194395@qq.com> Date: Thu, 17 Oct 2024 10:51:18 +0000 Subject: [PATCH 273/308] =?UTF-8?q?size=5Ft=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/operator/insert_physical_operator.cpp | 4 ++-- src/observer/sql/operator/update_physical_operator.cpp | 4 ++-- src/observer/storage/index/bplus_tree.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/observer/sql/operator/insert_physical_operator.cpp b/src/observer/sql/operator/insert_physical_operator.cpp index d8f6130a..0c089623 100644 --- a/src/observer/sql/operator/insert_physical_operator.cpp +++ b/src/observer/sql/operator/insert_physical_operator.cpp @@ -25,7 +25,7 @@ RC InsertPhysicalOperator::open(Trx *trx) { RC rc; std::vector records(values_list_.size()); - for (int i = 0; i < values_list_.size(); ++i) { + for (size_t i = 0; i < values_list_.size(); ++i) { rc = table_->make_record(static_cast(values_list_[i].size()), values_list_[i].data(), records[i]); if (rc != RC::SUCCESS) { LOG_WARN("failed to make record. rc=%s", strrc(rc)); @@ -33,7 +33,7 @@ RC InsertPhysicalOperator::open(Trx *trx) } } - for (int i = 0; i < records.size(); ++i) { + for (size_t i = 0; i < records.size(); ++i) { rc = trx->insert_record(table_, records[i]); if (rc != RC::SUCCESS) { LOG_WARN("failed to insert record by transaction. rc=%s", strrc(rc)); diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index d8a6f055..0672597f 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -53,7 +53,7 @@ RC UpdatePhysicalOperator::open(Trx *trx) Value value; std::vector real_values(values_.size()); SubQueryExpr *sub_query_expr = nullptr; - for (int i = 0; i < values_.size(); ++i) { + for (size_t i = 0; i < values_.size(); ++i) { auto &value_expr = values_[i]; auto &field_meta = field_metas_[i]; @@ -125,7 +125,7 @@ RC UpdatePhysicalOperator::open(Trx *trx) // rid 得手动拷贝 new_record.set_rid(old_record.rid()); new_record.copy_data(old_record.data(), old_record.len()); - for (int i = 0; i < field_metas_.size(); ++i) { + for (size_t i = 0; i < field_metas_.size(); ++i) { if (field_metas_[i].nullable()) { auto null_offset = field_metas_[i].offset() + field_metas_[i].len() - 1; if (real_values[i].is_null()) { diff --git a/src/observer/storage/index/bplus_tree.h b/src/observer/storage/index/bplus_tree.h index 0d66ff8d..515ac79d 100644 --- a/src/observer/storage/index/bplus_tree.h +++ b/src/observer/storage/index/bplus_tree.h @@ -105,7 +105,7 @@ class KeyComparator { auto field_number = index_.fields().size(); auto &fields_offset = index_.fields_offset(); - for (int i = 0; i < field_number; i++) { + for (size_t i = 0; i < field_number; i++) { int offset = fields_offset[i]; auto &field = index_.fields()[i]; if (field.nullable()) { From f0e4a9fa8a2e6a9fa19d2a0fd1fc5fd86df419c6 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 19:12:57 +0800 Subject: [PATCH 274/308] =?UTF-8?q?=E6=96=B0=E5=A2=9Evector=5Fdistance?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 59 ++++++++++++++++++++++++---- src/observer/sql/builtin/builtin.h | 6 ++- src/observer/sql/expr/expression.cpp | 16 ++++++-- src/observer/sql/expr/expression.h | 4 +- 4 files changed, 71 insertions(+), 14 deletions(-) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 37576903..36c3e107 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -249,7 +249,15 @@ RC date_format(const vector &args, Value &result) return RC::SUCCESS; } -RC distance(const vector &args, Value &result) +namespace vector_distance { +enum class Type +{ + L2, + COSINE, + INNER, +}; + +RC distance(const std::vector &args, Value &result, Type type) { if (args.size() != 2) { return RC::INVALID_ARGUMENT; @@ -290,16 +298,51 @@ RC distance(const vector &args, Value &result) return RC::VECTOR_LENGTG_ARE_INCONSISTENT; } - float ans = 0.0; - for (int i = 0; i < v0_length; i++) { - float v0 = value0.get_vector_element(i); - float v1 = value1.get_vector_element(i); - ans += (v0 - v1) * (v0 - v1); + switch (type) { + case Type::L2: { + /* + * l2_distance + * 语法:l2_distance(vector A, vector B) + * 计算公式:$[ D = \sqrt{\sum_{i=1}^{n} (A_{i} - B_{i})^2} ]$ + */ + } break; + case Type::COSINE: { + /* + * cosine_distance: + * 语法:cosine_distance(vector A, vector B) + * 计算公式:$[ D = \frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{A}| |\mathbf{B}|} = \frac{\sum_{i=1}^{n} A_i * + * B_i}{\sqrt{\sum_{i=1}^{n} A_i^2} \sqrt{\sum_{i=1}^{n} B_i^2}} ]$ + */ + break; + } + case Type::INNER: { + /* + * inner_product: + * 语法:inner_product(vector A, vector B) + * 计算公式:$[ D = \mathbf{A} \cdot \mathbf{B} = a_1 b_1 + a_2 b_2 + ... + a_n b_n = \sum_{i=1}^{n} a_i b_i ]$ + */ + break; + } } - ans = std::sqrt(ans); - result = Value(ans); + return RC::SUCCESS; } +} // namespace vector_distance + +RC l2_distance(const vector &args, Value &result) +{ + return vector_distance::distance(args, result, vector_distance::Type::L2); +} + +RC cosine_distance(const vector &args, Value &result) +{ + return vector_distance::distance(args, result, vector_distance::Type::COSINE); +} + +RC inner_product(const vector &args, Value &result) +{ + return vector_distance::distance(args, result, vector_distance::Type::INNER); +} RC string_to_vector(const vector &args, Value &result) { diff --git a/src/observer/sql/builtin/builtin.h b/src/observer/sql/builtin/builtin.h index f60145bc..c021aa61 100644 --- a/src/observer/sql/builtin/builtin.h +++ b/src/observer/sql/builtin/builtin.h @@ -28,7 +28,11 @@ extern RC day(const vector &args, Value &result); extern RC date_format(const vector &args, Value &result); -extern RC distance(const vector &args, Value &result); +extern RC l2_distance(const vector &args, Value &result); + +extern RC cosine_distance(const vector &args, Value &result); + +extern RC inner_product(const vector &args, Value &result); extern RC string_to_vector(const vector &args, Value &result); diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 00a4fb73..15cece08 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -872,7 +872,9 @@ RC NormalFunctionExpr::type_from_string(const char *type_str, NormalFunctionExpr check_type("date_format", Type::DATE_FORMAT); check_type("length", Type::LENGTH); check_type("round", Type::ROUND); - check_type("distance", Type::DISTANCE); + check_type("l2_distance", Type::L2_DISTANCE); + check_type("cosine_distance", Type::COSINE_DISTANCE); + check_type("inner_product", Type::INNER_PRODUCT); check_type("string_to_vector", Type::STRING_TO_VECTOR); check_type("vector_to_string", Type::VECTOR_TO_STRING); check_type("vector_dim", Type::VECTOR_DIM); @@ -894,13 +896,15 @@ RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) case Type::LENGTH: return builtin::length(args_values_, result); case Type::ROUND: return builtin::round(args_values_, result); case Type::DATE_FORMAT: return builtin::date_format(args_values_, result); - case Type::DISTANCE: return builtin::distance(args_values_, result); case Type::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); case Type::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); case Type::VECTOR_DIM: return builtin::vector_dim(args_values_, result); case Type::YEAR: return builtin::year(args_values_, result); case Type::MONTH: return builtin::month(args_values_, result); case Type::DAY: return builtin::day(args_values_, result); + case Type::L2_DISTANCE: return builtin::l2_distance(args_values_, result); + case Type::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); + case Type::INNER_PRODUCT: return builtin::inner_product(args_values_, result); } return RC::INTERNAL; } @@ -920,13 +924,15 @@ RC NormalFunctionExpr::try_get_value(Value &result) const case Type::LENGTH: return builtin::length(args_values_, result); case Type::ROUND: return builtin::round(args_values_, result); case Type::DATE_FORMAT: return builtin::date_format(args_values_, result); - case Type::DISTANCE: return builtin::distance(args_values_, result); case Type::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); case Type::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); case Type::VECTOR_DIM: return builtin::vector_dim(args_values_, result); case Type::YEAR: return builtin::year(args_values_, result); case Type::MONTH: return builtin::month(args_values_, result); case Type::DAY: return builtin::day(args_values_, result); + case Type::L2_DISTANCE: return builtin::l2_distance(args_values_, result); + case Type::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); + case Type::INNER_PRODUCT: return builtin::inner_product(args_values_, result); } return RC::INTERNAL; } @@ -937,13 +943,15 @@ AttrType NormalFunctionExpr::value_type() const case Type::LENGTH: return AttrType::INTS; case Type::ROUND: return AttrType::FLOATS; case Type::DATE_FORMAT: return AttrType::CHARS; - case Type::DISTANCE: return AttrType::FLOATS; case Type::STRING_TO_VECTOR: return AttrType::VECTORS; case Type::VECTOR_TO_STRING: return AttrType::CHARS; case Type::VECTOR_DIM: return AttrType::INTS; case Type::YEAR: return AttrType::INTS; case Type::MONTH: return AttrType::INTS; case Type::DAY: return AttrType::INTS; + case Type::L2_DISTANCE: return AttrType::FLOATS; + case Type::COSINE_DISTANCE: return AttrType::FLOATS; + case Type::INNER_PRODUCT: return AttrType::FLOATS; } return AttrType::UNDEFINED; } diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 8efc5265..7866a242 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -472,7 +472,9 @@ class NormalFunctionExpr : public UnboundFunctionExpr MONTH, DAY, DATE_FORMAT, - DISTANCE, + L2_DISTANCE, + COSINE_DISTANCE, + INNER_PRODUCT, STRING_TO_VECTOR, VECTOR_TO_STRING, VECTOR_DIM, From 15995815e9088cfa00734a322886c9b1401df055 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 19:22:52 +0800 Subject: [PATCH 275/308] =?UTF-8?q?TODO:=20=E8=AE=A1=E7=AE=97=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E5=B9=B6=E8=B5=8B=E5=80=BC=E7=BB=99result?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 36c3e107..a07b8d65 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -298,6 +298,7 @@ RC distance(const std::vector &args, Value &result, Type type) return RC::VECTOR_LENGTG_ARE_INCONSISTENT; } + // TODO: 计算结果并赋值给result switch (type) { case Type::L2: { /* From 02934a48c26920814b3243f0a57d3bcb8f09b55b Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 19:26:56 +0800 Subject: [PATCH 276/308] =?UTF-8?q?TODO:=20=E8=AE=A1=E7=AE=97=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E5=B9=B6=E8=B5=8B=E5=80=BC=E7=BB=99result?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index a07b8d65..275b252e 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -306,7 +306,8 @@ RC distance(const std::vector &args, Value &result, Type type) * 语法:l2_distance(vector A, vector B) * 计算公式:$[ D = \sqrt{\sum_{i=1}^{n} (A_{i} - B_{i})^2} ]$ */ - } break; + return RC::INTERNAL; + } case Type::COSINE: { /* * cosine_distance: @@ -314,7 +315,7 @@ RC distance(const std::vector &args, Value &result, Type type) * 计算公式:$[ D = \frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{A}| |\mathbf{B}|} = \frac{\sum_{i=1}^{n} A_i * * B_i}{\sqrt{\sum_{i=1}^{n} A_i^2} \sqrt{\sum_{i=1}^{n} B_i^2}} ]$ */ - break; + return RC::INTERNAL; } case Type::INNER: { /* @@ -322,11 +323,12 @@ RC distance(const std::vector &args, Value &result, Type type) * 语法:inner_product(vector A, vector B) * 计算公式:$[ D = \mathbf{A} \cdot \mathbf{B} = a_1 b_1 + a_2 b_2 + ... + a_n b_n = \sum_{i=1}^{n} a_i b_i ]$ */ - break; + return RC::INTERNAL; + } + default: { + return RC::INTERNAL; } } - - return RC::SUCCESS; } } // namespace vector_distance From 722ec96752fa05643876d51ad9b0d0d3d2e41e03 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 19:37:20 +0800 Subject: [PATCH 277/308] =?UTF-8?q?=E4=BF=AE=E6=94=B9yacc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/parser/lex_sql.l | 7 +++---- src/observer/sql/parser/yacc_sql.y | 19 +------------------ 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 2336e248..ea93c2ae 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -111,13 +111,12 @@ ROLLBACK RETURN_TOKEN(TRX_ROLLBACK); INT RETURN_TOKEN(INT_T); CHAR RETURN_TOKEN(STRING_T); FLOAT RETURN_TOKEN(FLOAT_T); -DATE RETURN_TOKEN(DATE_T); // 增加 DATE 的 token -TEXT RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token -VECTOR RETURN_TOKEN(VECTOR_T); // 增加 VECTOR 的 token +DATE RETURN_TOKEN(DATE_T); +TEXT RETURN_TOKEN(TEXT_T); +VECTOR RETURN_TOKEN(VECTOR_T); UNIQUE RETURN_TOKEN(UNIQUE); NULL RETURN_TOKEN(NULL_T); NULLABLE RETURN_TOKEN(NULLABLE); -LOAD RETURN_TOKEN(LOAD); INFILE RETURN_TOKEN(INFILE); EXPLAIN RETURN_TOKEN(EXPLAIN); GROUP RETURN_TOKEN(GROUP); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 03ba7470..8e043f76 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -135,7 +135,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, NULLABLE HELP EXIT - DOT //QUOTE + DOT INTO VALUES FROM @@ -144,8 +144,6 @@ ParsedSqlNode *create_table_sql_node(char *table_name, OR SET ON - LOAD - // DATA INFILE EXPLAIN STORAGE @@ -246,7 +244,6 @@ ParsedSqlNode *create_table_sql_node(char *table_name, %type begin_stmt %type commit_stmt %type rollback_stmt -// %type load_data_stmt %type explain_stmt %type set_variable_stmt %type help_stmt @@ -289,7 +286,6 @@ command_wrapper: | begin_stmt | commit_stmt | rollback_stmt -// | load_data_stmt | explain_stmt | set_variable_stmt | help_stmt @@ -1079,19 +1075,6 @@ opt_limit: } ; -/* load_data_stmt: - LOAD DATA INFILE SSS INTO TABLE ID - { - char *tmp_file_name = common::substr($4, 1, strlen($4) - 2); - - $$ = new ParsedSqlNode(SCF_LOAD_DATA); - $$->load_data.relation_name = $7; - $$->load_data.file_name = tmp_file_name; - free($7); - free(tmp_file_name); - } - ;*/ - explain_stmt: EXPLAIN command_wrapper { From af101d0c31caacfd56d2dcb06bc09cc908fe35fd Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 20:33:31 +0800 Subject: [PATCH 278/308] =?UTF-8?q?=E5=AE=8C=E6=88=90list=E8=AF=AD?= =?UTF-8?q?=E6=B3=95=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.cpp | 2 +- src/observer/common/type/attr_type.h | 2 +- src/observer/common/type/list_type.cpp | 15 + src/observer/common/type/list_type.h | 20 + src/observer/common/value.cpp | 22 +- src/observer/common/value.h | 23 +- src/observer/net/sql_task_handler.h | 4 +- src/observer/sql/expr/expression.cpp | 2 +- src/observer/sql/parser/lex_sql.cpp | 3209 ++++++++--------- src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/lex_sql.l | 2 + src/observer/sql/parser/yacc_sql.cpp | 3207 ++++++++-------- src/observer/sql/parser/yacc_sql.hpp | 236 +- src/observer/sql/parser/yacc_sql.y | 5 + .../storage/buffer/double_write_buffer.cpp | 6 +- src/observer/storage/clog/log_buffer.h | 2 +- src/observer/storage/record/record.h | 2 +- src/observer/storage/record/record_manager.h | 16 +- src/observer/storage/table/table_meta.h | 2 +- src/observer/storage/table/view.h | 6 +- 20 files changed, 3445 insertions(+), 3340 deletions(-) create mode 100644 src/observer/common/type/list_type.cpp create mode 100644 src/observer/common/type/list_type.h diff --git a/src/observer/common/type/attr_type.cpp b/src/observer/common/type/attr_type.cpp index 2904297e..a15c6f3c 100644 --- a/src/observer/common/type/attr_type.cpp +++ b/src/observer/common/type/attr_type.cpp @@ -12,7 +12,7 @@ See the Mulan PSL v2 for more details. */ #include "common/type/attr_type.h" const char *ATTR_TYPE_NAME[] = { - "undefined", "chars", "ints", "floats", "booleans", "dates", "nulls", "texts", "vector"}; + "undefined", "chars", "ints", "floats", "booleans", "dates", "nulls", "texts", "vectors", "lists"}; const char *attr_type_to_string(AttrType type) { diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index 1c18834f..53759a43 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -25,7 +25,7 @@ enum class AttrType NULLS, ///< 空字段 TEXTS, ///< text 超长字段(4096字节) VECTORS, ///< 向量 - LIST, ///< 列表 + LISTS, ///< 列表 MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; diff --git a/src/observer/common/type/list_type.cpp b/src/observer/common/type/list_type.cpp new file mode 100644 index 00000000..4e76103b --- /dev/null +++ b/src/observer/common/type/list_type.cpp @@ -0,0 +1,15 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +// +// Created by 胡鑫 on 24-10-17. +// + +#include "list_type.h" diff --git a/src/observer/common/type/list_type.h b/src/observer/common/type/list_type.h new file mode 100644 index 00000000..8d932c1c --- /dev/null +++ b/src/observer/common/type/list_type.h @@ -0,0 +1,20 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +#pragma once + +// +// Created by 胡鑫 on 24-10-17. +// + +#include "common/type/data_type.h" + +class ListType : public DataType +{}; diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 6aecb976..46008086 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -32,6 +32,8 @@ Value::Value(bool val) { set_boolean(val); } Value::Value(const char *s, int len /*= 0*/) { set_string(s, len); } +Value::Value(ListValue, const vector &values) { set_list(values); } + Value::Value(const Value &other) { this->attr_type_ = other.attr_type_; @@ -243,6 +245,18 @@ void Value::set_vector(float *&array, size_t &length) own_data_ = true; } +void Value::set_list(const vector &val) +{ + attr_type_ = AttrType::LISTS; + length_ = 0; + for (auto &v : val) { + length_ += v.length_; + } + value_.list_value_ = new vector(val); + + own_data_ = true; +} + void Value::set_value(const Value &value) { switch (value.attr_type_) { @@ -276,7 +290,7 @@ void Value::set_string_from_other(const Value &other) if (own_data_ && other.value_.pointer_value_ != nullptr) { this->value_.pointer_value_ = new char[this->length_ + 1]; memcpy(this->value_.pointer_value_, other.value_.pointer_value_, this->length_); - this->value_.pointer_value_[this->length_] = '\0'; + reinterpret_cast(this->value_.pointer_value_)[this->length_] = '\0'; } } @@ -462,9 +476,3 @@ RC Value::borrow_text(const Value &v) } int Value::get_vector_length() const { return length_ / sizeof(float); } - -float Value::get_vector_element(int i) const -{ - auto ptr = value_.pointer_value_ + sizeof(float) * i; - return *(float *)(ptr); -} diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 95d75046..13977897 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -20,10 +20,17 @@ See the Mulan PSL v2 for more details. */ #include "common/type/data_type.h" #include "common/type/date_type.h" #include "common/type/text_type.h" +#include "common/type/list_type.h" class NullValue {}; +class VectorValue +{}; + +class ListValue +{}; + /** * @brief 属性的值 * @ingroup DataType @@ -43,6 +50,7 @@ class Value final friend class NullType; friend class TextType; friend class VectorType; + friend class ListType; Value() = default; @@ -55,6 +63,8 @@ class Value final explicit Value(float val); explicit Value(bool val); explicit Value(const char *s, int len = 0); + explicit Value(ListValue, const vector &values); + explicit Value(VectorValue, const vector &values); Value(const Value &other); Value(Value &&other); @@ -124,7 +134,6 @@ class Value final bool get_boolean() const; int get_date() const; int get_vector_length() const; - float get_vector_element(int i) const; bool is_null() const { return is_null_; } inline bool is_str() const { return attr_type_ == AttrType::CHARS; } @@ -143,6 +152,7 @@ class Value final void set_string(const char *s, int len = 0); void set_text(const char *s, int len = 65535); void set_vector(float *&array, size_t &length); + void set_list(const vector &val); void set_string_from_other(const Value &other); private: @@ -151,12 +161,15 @@ class Value final union Val { - int32_t int_value_; - float float_value_; - bool bool_value_; - char *pointer_value_; + int32_t int_value_; + float float_value_; + bool bool_value_; + char *pointer_value_; + std::vector *list_value_; } value_ = {.int_value_ = 0}; + static_assert(sizeof(std::vector *) == sizeof(char *)); + /// 是否申请并占有内存, 目前对于 CHARS 类型 own_data_ 为true, 其余类型 own_data_ 为false bool own_data_ = false; bool is_null_ = false; diff --git a/src/observer/net/sql_task_handler.h b/src/observer/net/sql_task_handler.h index b296fe35..e591f4ef 100644 --- a/src/observer/net/sql_task_handler.h +++ b/src/observer/net/sql_task_handler.h @@ -50,6 +50,6 @@ class SqlTaskHandler QueryCacheStage query_cache_stage_; /// 查询缓存阶段 ParseStage parse_stage_; /// 解析阶段。将SQL解析成语法树 ParsedSqlNode ResolveStage resolve_stage_; /// 解析阶段。将语法树解析成Stmt(statement) - OptimizeStage optimize_stage_; /// 优化阶段。将语句优化成执行计划,包含规则优化和物理优化 - ExecuteStage execute_stage_; /// 执行阶段 + OptimizeStage optimize_stage_; /// 优化阶段。将语句优化成执行计划,包含规则优化和物理优化 + ExecuteStage execute_stage_; /// 执行阶段 }; \ No newline at end of file diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 15cece08..2dc73bb7 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -248,7 +248,7 @@ RC ComparisonExpr::get_value(const Tuple &tuple, Value &value) return rc; } DEFER(if (nullptr != left_subquery_expr) left_subquery_expr->close(); - if (nullptr != right_subquery_expr) right_subquery_expr->close();); + if (nullptr != right_subquery_expr) right_subquery_expr->close();); // Get the value of the left expression rc = left_->get_value(tuple, left_value); diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 374316f0..fb366e7b 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -377,8 +377,8 @@ static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 80 -#define YY_END_OF_BUFFER 81 +#define YY_NUM_RULES 81 +#define YY_END_OF_BUFFER 82 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -386,242 +386,241 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[237] = {0, +static const flex_int16_t yy_accept[236] = {0, 0, 0, 0, 0, - 81, - 79, + 82, + 80, 1, 2, - 79, - 79, - 79, + 80, + 80, + 80, + 58, 59, - 60, - 75, - 73, - 61, + 76, 74, + 62, + 75, 6, - 76, + 77, 3, 5, + 67, + 63, + 69, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 60, + 61, + 81, 66, - 62, - 68, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 80, - 65, - 0, - 77, 0, 78, 0, + 79, + 0, 3, - 63, 64, - 67, - 72, - 72, - 72, - 50, - 72, + 65, + 68, + 73, + 73, + 73, 49, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 52, - 70, - 72, - 72, - 72, - 72, - 72, + 73, + 48, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 51, + 71, + 73, + 73, + 73, + 73, 15, 23, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, 4, 22, - 51, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, + 50, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, 33, - 72, - 72, - 72, - 72, - 69, - 72, - 72, - 72, - 72, + 73, + 73, + 73, + 70, + 73, + 73, + 73, + 73, 29, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, + 73, 19, 34, - 72, - 72, + 73, + 73, 36, - 72, + 73, 9, 11, - 72, + 73, 7, - 72, - 72, - 72, + 73, + 73, + 73, 20, - 72, - 72, + 73, + 73, 8, - 72, - 72, - 72, - 72, + 73, + 73, + 73, + 73, 25, - 57, - 71, + 56, 72, - 42, + 73, 40, - 72, - 72, - 72, + 73, + 73, + 73, 16, - 72, + 73, 17, - 72, + 73, 37, - 72, - 72, - 72, - 72, - 58, - 72, + 73, + 73, + 73, + 73, + 57, + 73, 30, - 72, - 72, - 72, - 72, - 72, + 73, + 73, + 73, + 73, + 73, 35, - 72, - 45, - 72, + 73, + 44, + 73, 14, - 72, - 56, - 72, - 46, + 73, + 55, + 73, + 45, + 73, - 72, - 48, - 72, - 72, - 72, + 47, + 73, + 73, + 73, 12, - 72, - 72, - 72, - 72, + 73, + 73, + 73, + 73, 21, 31, 10, 27, - 53, - 72, - 55, - 47, - 43, + 52, + 73, + 54, + 46, + 42, 24, - 72, - 72, + 73, + 73, 18, - 72, + 73, 13, 39, 28, 26, 38, - 44, - 72, - 72, - 54, + 43, + 73, + 73, + 53, 41, 32, 0}; @@ -717,19 +716,17 @@ static const YY_CHAR yy_ec[256] = {0, 43, 44, 45, + 46, 1, - 1, - 1, + 47, 1, 45, 1, - 46, - 47, 48, 49, - 50, 51, + 52, 53, 54, @@ -749,6 +746,8 @@ static const YY_CHAR yy_ec[256] = {0, 68, 69, 70, + 71, + 72, 45, 1, 1, @@ -885,7 +884,7 @@ static const YY_CHAR yy_ec[256] = {0, 1, 1}; -static const YY_CHAR yy_meta[71] = {0, +static const YY_CHAR yy_meta[73] = {0, 1, 1, 1, @@ -931,6 +930,8 @@ static const YY_CHAR yy_meta[71] = {0, 2, 2, 2, + 1, + 1, 2, 2, 2, @@ -957,497 +958,495 @@ static const YY_CHAR yy_meta[71] = {0, 2, 2}; -static const flex_int16_t yy_base[242] = {0, +static const flex_int16_t yy_base[241] = {0, 0, 0, 0, 0, - 645, - 646, - 646, - 646, - 626, 638, - 636, - 646, - 646, - 646, - 646, - 646, - 646, - 646, - 646, - 58, - 646, - 56, - 646, - 623, - 57, - 61, - 62, + 639, + 639, + 639, + 619, + 631, + 629, + 639, + 639, + 639, + 639, + 639, + 639, + 639, + 639, + 60, + 639, + 58, + 639, + 616, + 59, 63, 64, - 83, 65, + 66, + 90, + 67, + 116, 73, - 91, - 76, + 80, + 618, + 88, + 107, + 113, + 123, + 138, + 136, + 128, + 152, + 118, + 639, + 639, + 639, + 639, + 627, + 639, 625, - 117, - 119, - 115, - 103, - 142, - 134, - 129, - 174, - 112, - 646, - 646, - 634, - 646, - 632, - 646, - 622, - 71, - 646, - 646, - 646, + 639, + 615, + 81, + 639, + 639, + 639, 0, - 621, - 89, - 120, - 141, - 620, - 160, - 167, + 614, + 143, + 68, + 133, + 613, + 139, + 166, + 164, 168, - 146, - 158, + 156, 184, + 182, 191, - 186, - 193, + 187, + 188, 194, - 195, 196, - 201, - 188, - 254, - 619, - 190, - 220, + 186, + 198, + 244, + 612, 217, + 203, + 197, + 231, + 604, 219, - 218, - 618, - 223, - 228, - 249, - 239, - 247, - 250, - 274, + 237, + 245, 251, - 246, - 267, - 255, - 276, + 257, + 256, + 216, + 236, + 259, + 263, + 277, + 266, + 278, + 279, + 603, + 602, + + 601, + 294, + 284, + 283, 286, - 287, - 617, - 609, - 608, - - 289, - 293, - 307, + 306, 308, + 309, + 313, 310, - 311, 314, 312, - 313, - 316, - 318, - 327, - 330, - 331, - 317, + 322, + 323, 324, + 325, + 329, + 332, + 334, 336, - 335, + 344, + 351, 354, - 343, - 353, - 338, + 357, + 363, 361, - 371, - 364, + 600, + 367, 376, - 607, - 369, - 372, - 375, - 386, - 606, + 379, + 382, + 599, + 359, + 362, 387, - 390, 389, 392, - 394, - 398, + 396, + 393, + 390, 397, - 399, - 401, - 400, 404, - 413, - 605, - 604, - 416, - 409, - 602, - 415, - 601, - 600, - 423, + 406, + 407, 598, - 430, - 432, - 436, 596, - 442, - 446, + 424, + 408, + 595, + 410, 594, - 420, - 454, - 449, - 458, - 591, + 592, + 418, 590, - 589, - 460, - 588, - 463, - 469, - 466, - 476, - 586, - 481, + 430, + 427, + 436, + 585, + 409, + 420, + 584, + 439, + 448, + 446, + 450, 583, - 478, + 582, 581, + 447, + 473, + 452, + 455, 475, + 579, + 476, + 578, 477, - 493, + 575, + 458, + 480, + 484, + 488, + 574, 485, - 580, - 499, - 579, - 479, + 573, + 491, + 503, + 508, + 490, 505, - 507, - 492, - 511, - 578, - 495, - 576, - 245, - 565, - 522, - 563, + 571, + 501, + 568, + 487, + 566, + 519, + 497, 520, - 560, + 454, + 523, - 532, - 555, - 518, - 535, - 525, - 533, + 440, + 531, + 524, + 516, 537, - 539, - 543, + 530, + 533, + 538, 547, - 552, - 521, - 489, - 443, - 437, - 553, - 350, - 281, - 252, - 224, + 399, + 364, + 347, + 326, + 285, + 534, + 265, + 260, + 233, + 226, + 549, 551, + 225, + 550, + 224, + 223, + 202, + 192, + 108, + 95, 554, - 221, - 568, - 189, - 161, - 157, - 145, - 132, - 126, - 575, - 558, - 88, - 86, - 79, - 646, - 625, - 627, - 629, - 90, - 79}; + 562, + 93, + 85, + 84, + 639, + 620, + 622, + 624, + 91, + 84}; -static const flex_int16_t yy_def[242] = {0, - 236, +static const flex_int16_t yy_def[241] = {0, + 235, 1, - 237, - 237, - 236, - 236, - 236, 236, 236, + 235, + 235, + 235, + 235, + 235, + 237, 238, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, 239, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 236, - 236, - 238, - 236, 239, - 236, - 236, - 236, - 236, - 236, - 236, - 241, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 236, - 240, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 235, + 235, + 235, + 235, + 237, + 235, + 238, + 235, + 235, + 235, + 235, + 235, + 235, 240, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 235, + 239, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, + 239, 0, - 236, - 236, - 236, - 236, - 236}; + 235, + 235, + 235, + 235, + 235}; -static const flex_int16_t yy_nxt[717] = {0, +static const flex_int16_t yy_nxt[712] = {0, 6, 7, 8, @@ -1493,6 +1492,8 @@ static const flex_int16_t yy_nxt[717] = {0, 35, 35, 35, + 45, + 46, 25, 26, 27, @@ -1518,661 +1519,656 @@ static const flex_int16_t yy_nxt[717] = {0, 44, 35, 35, - 51, - 56, - 52, 53, + 58, 54, + 55, 56, - 56, - 56, - 56, - 56, - 56, - 62, - 66, - 51, - 60, - 52, - 67, - 56, - 63, 58, - 56, - 57, - 74, - 56, - 59, + 58, + 58, + 58, + 58, + 58, 64, - 75, - 56, - 65, 68, - - 56, - 73, - 56, - 56, - 61, - 56, - 69, + 58, 62, - 66, - 78, + 58, + 69, + 101, + 65, 60, - 99, + 59, + 53, + 58, + 54, + 61, + 66, + 58, + 58, + 67, 70, + 58, + 75, + 58, + 78, 63, 58, 71, - 56, - 74, - 72, - 59, + 58, + 79, 64, - 75, - 76, - 65, 68, - 56, + 80, + 62, + 81, + 69, + 101, + 65, + 60, + 72, + 58, + 58, 73, - 77, - 56, 61, - 56, - 69, - 56, - 56, - 78, - 85, - 99, - 97, + 66, + 74, + 58, + 67, 70, - 56, - 100, + 58, + 75, + 58, + 78, + 63, + 76, 71, - 56, + 58, 79, - 72, - 56, - 83, - 56, - 76, + 77, + 82, 80, - 84, + 58, 81, - 90, - 77, - 56, - 56, + 98, + 84, + 83, + 58, + 72, + 85, + 58, + 73, + 58, + 58, + 74, 91, - 82, - 56, - 56, + 86, + 58, + 102, 92, - 85, 93, - 97, - 86, - 101, - 100, 87, - 105, - 79, - 56, - 56, - 83, - 56, - 56, - 80, - 84, - 81, - 90, + 94, + 76, 88, - 56, - 56, - 91, + 100, + 58, + 77, 82, - 89, 103, + 58, + 95, + 98, + 84, + 83, + 96, + 89, + 85, + 58, + 97, + 58, + 90, + 58, + 91, + 86, + 104, + 102, 92, - 56, 93, - 102, - 86, - 101, - 94, 87, - 105, + 94, 106, + 88, + 100, + 107, + 105, + 58, + 103, + 58, 95, - 56, - 104, - 56, + 58, + 58, + 58, 96, - 56, - 56, - 56, - 56, - 88, - 56, - 56, - 56, - 56, 89, - 103, + 58, + 58, + 97, + 58, + 90, + 58, + 58, + 58, + 104, + 108, 110, - 107, - 56, - 102, - 123, - 117, - 94, + 58, + 58, 111, - 108, 106, - 95, + 113, 109, - 104, - 112, - 96, + 107, + 105, 114, + 112, + 117, 115, - 113, - 56, - 56, - 56, - 56, - 56, - 126, - 56, - 56, - 110, - 107, + 118, 116, - 56, - 123, - 117, + 58, + 58, + 125, + 58, + 126, + 127, + 136, + 58, + 58, + 58, + 58, 129, - 111, 108, - 128, + 110, 124, + 58, + 111, + 58, + 113, 109, - 125, - 112, - 56, + 58, + 58, 114, + 112, + 117, 115, - 113, - 127, - 130, - 56, - 56, - 56, - 126, - 56, - 56, - 56, - 56, - 116, - 56, - 56, - 218, - 129, - 133, - 138, - 128, - 124, 118, + 116, + 58, + 58, 125, - 119, - 131, - 134, - 56, - 135, + 128, + 126, 127, + 136, + 58, + 119, 130, - 140, 120, - 132, - 56, - 139, - 56, + 129, + 58, + 58, + 124, + 58, + 58, + 131, 121, - 122, + 58, 137, - 136, - 56, - 218, - 141, + 58, + 58, + 122, + 123, + 132, 133, + 139, 138, - - 56, - 56, - 118, - 56, - 119, - 131, - 134, - 56, + 141, 135, + 128, + 134, + 58, + 58, + 58, + 119, + 130, + 120, + 58, + 58, + 58, + + 58, 142, 143, + 131, + 121, + 145, + 137, 140, - 120, + 58, + 122, + 123, 132, - 145, + 133, 139, - 144, - 121, - 122, - 137, - 136, - 56, - 56, + 138, 141, - 56, - 56, - 56, - 56, - 56, + 135, + 147, + 134, + 146, + 58, + 144, + 58, + 58, + 58, 148, - 56, - 56, - 56, - 151, - 149, + 58, + 58, + 58, 142, 143, + 149, 150, - 56, - 147, 145, - 56, - 144, - 146, - 56, - 56, + 151, + 140, + 58, + 58, + 58, + 58, + 58, 156, - 152, 155, - 56, - 56, - 160, - 56, + 58, + 152, + 147, + 58, + 146, + 58, + 144, + 58, 153, 154, 148, - 159, - 56, - 162, - 151, - 149, 157, 158, + 160, + 162, + 58, + 149, 150, - 56, - 147, - 164, - 56, - 56, - 146, + 58, + 151, + 163, + 159, + 58, 161, - 166, + 164, + 58, 156, - 152, 155, - 56, + 58, + 152, + 58, 165, - 160, - 56, + 58, + 58, + 58, + 58, 153, 154, - 163, - 159, - 56, - 162, - 56, - 56, + 58, 157, 158, - 56, - 56, + 160, + 162, + 168, + 166, 169, - 164, 167, - 168, - 172, + 58, + 163, + 159, + 58, 161, - 166, + 164, + 58, 170, + 175, 171, - 56, - 56, + 174, + 58, 165, - 56, - 56, + 58, + 58, 173, - 56, - 163, - 56, - 174, - 177, - 56, - 56, - 56, - 56, - 56, - 181, + 58, + 58, + 176, + 172, + 58, + 58, + 180, + 58, + 168, + 166, 169, - 56, 167, - 168, - 172, - 178, - 56, + 58, + 177, + 58, + 58, + 58, + 58, + 58, 170, - 171, - 176, - 56, 175, - 56, - 56, - 173, - 179, - 180, - 56, + 171, 174, - 177, - 56, + 181, + 178, + 179, + 58, + 173, + 58, 182, - 183, + 176, + 172, + 58, 185, + 180, + 58, 184, - 181, + 193, + 58, + 183, 187, - 56, - 186, - 56, + 177, 188, - 178, - 191, - 56, - 56, - 176, + 190, + 58, + 186, + 194, + 58, + 58, + 192, 189, - 175, - 193, - 56, - 56, + 181, + 178, 179, - 180, - 56, - 190, - 196, - 56, + 58, + 58, + 58, 182, - 183, + 58, + 191, + 58, 185, + 58, + 58, 184, - 56, + 193, + 58, + 183, 187, - 192, - 186, - 56, + 202, 188, - 56, - 191, + 190, + 196, + 186, 194, - 56, 195, - 189, - 56, - 193, - 201, - 56, 197, - 198, - 203, - 190, - 196, - 56, - 56, - 56, - 56, - 56, - 199, - 56, 192, - 204, + 189, + 199, + 198, + 58, + 201, + 58, + 58, + 58, 200, - 56, - - 205, + 191, + 58, + 204, + 203, 206, - 194, - 56, - 195, + 58, + 58, + + 205, + 58, + 58, 202, - 56, - 56, - 201, - 56, + 58, + 58, + 196, + 208, + 210, + 195, 197, + 58, + 217, + 199, 198, - 203, - 56, + 58, + 201, + 58, 207, - 208, + 58, + 200, 209, - 212, - 210, - 56, - 199, - 56, - 211, + 58, 204, - 200, - 56, - 205, + 203, 206, + 212, + 214, + 205, + 211, + 58, 213, 215, - 214, - 202, - 56, - 217, - 56, - 56, - 56, - 222, + 58, + 58, + 208, + 210, + 58, + 58, 216, - 56, + 217, + 223, + 218, + 220, + 58, + 58, 207, - 208, + 58, + 58, 209, + 221, + 58, + 58, + 225, 212, - 210, - 219, - 56, - 56, + 214, + 226, 211, - 56, - 224, - 56, - 221, - 56, + 219, 213, 215, - 214, - 56, - 220, - 217, - 226, - 56, - 227, + 58, 222, + 58, + 58, + 58, + 229, 216, - 56, - 56, - 56, - 56, - 56, - 225, - 219, - 56, + 58, 223, - 56, + 218, + 220, + 231, 232, 224, - 56, - 221, - 56, - 228, - 231, - 56, - 229, - 220, - 230, - 226, - 235, 227, - 56, - 56, + 58, 233, - 56, - 56, - 56, - 56, + 221, + 230, + 58, 225, - 56, + 58, + 228, + 226, + 58, + 219, + 58, + 58, + 58, + 222, 234, - 223, + 58, + 58, + 229, + 58, + 58, + 58, + 58, + 58, - 56, - 232, - 56, - 56, - 56, - 56, - 228, 231, - 56, - 229, - 56, - 230, - 56, - 235, - 56, - 56, - 56, + 232, + 224, + 227, + 58, 233, - 56, - 56, - 56, - 56, - 56, - 56, - 234, - 45, - 45, - 47, - 47, - 49, - 49, - 98, - 56, - 56, - 56, - 56, - 98, - 50, - 48, - 56, - 55, - 50, - 48, - 46, - 236, - 5, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, + 58, + 230, + 58, + 58, + 58, + 228, + 58, + 58, + 58, + 58, + 58, + 99, + 58, + 234, + 47, + 47, + 49, + 49, + 51, + 51, + 58, + 58, + 58, + 99, + 52, + 50, + 58, + 57, + 52, + 50, + 48, + 235, + 5, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236}; + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235}; -static const flex_int16_t yy_chk[717] = {0, +static const flex_int16_t yy_chk[712] = {0, + 1, + 1, 1, 1, 1, @@ -2253,649 +2249,642 @@ static const flex_int16_t yy_chk[717] = {0, 28, 29, 31, - 241, + 61, 27, 28, - 52, + 240, 26, - 52, + 33, 28, - 32, + 61, 27, 25, + 239, + 54, 34, - 240, - 32, - 235, + 54, 25, 27, - 32, - 30, + 234, + 233, + 27, 28, - - 234, + 36, 31, - 233, - 58, - 26, + 30, 33, + 26, + 232, 29, + 229, + 33, 27, 28, 34, 26, - 58, + 36, 28, - 30, + 61, 27, 25, 30, - 39, - 32, + 37, + 228, 30, 25, 27, - 32, - 33, + 30, + 38, 27, 28, - 44, + 32, 31, + 44, 33, - 38, 26, - 36, + 32, 29, + 39, + 33, + 32, 37, - 59, 34, - 39, - 58, - 44, - 30, - 230, - 59, - 30, 42, 36, - 30, - 229, - 38, - 41, - 33, - 36, + 44, 38, 37, + 62, + 30, + 38, 41, - 33, - 60, + 30, 40, + 64, + 30, 41, - 37, - 228, - 65, - 42, 39, - 42, - 44, - 40, 60, - 59, - 40, - 65, - 36, - 227, - 66, - 38, 62, - 226, - 36, - 38, - 37, - 41, - 40, - 63, - 64, 41, - 37, - 40, - 63, 42, - 43, + 40, 42, - 62, + 32, 40, 60, 43, - 40, - 65, - 66, - 43, - 67, + 32, + 37, 64, - - 69, - 43, - 75, - 225, - 78, 68, + 43, + 44, + 38, + 37, + 43, 40, - 70, - 71, - 72, - 73, + 38, + 66, + 43, + 65, 40, - 63, - 69, 67, - 74, + 41, + 39, + 65, 62, - 78, - 75, - 43, - 69, + 41, + 42, + 40, + 42, 67, - 66, - 43, + 40, + 60, 68, - 64, + 66, 70, + 64, + 69, 43, + + 76, 72, 73, + 43, + 40, 71, - 80, - 82, - 81, - 79, - 223, - 80, - 84, - 220, - 69, - 67, + 227, + 43, 74, - 85, - 78, + 40, 75, - 84, - 69, - 67, 82, - 79, - 68, - 79, + 77, + 65, + 69, 70, - 87, + 226, + 81, + 71, + 67, 72, + 69, + 68, + 66, 73, 71, + 76, + 74, + 77, + 75, + 91, + 80, 81, 85, - 195, - 92, - 88, - 80, - 86, - 89, + 81, + 82, 91, + 225, + 224, + 222, 219, - 74, + 85, + 69, + 70, + 80, + 83, + 71, + 218, + 72, + 69, + 92, + 86, + 73, + 71, 76, - 94, - 195, - 84, + 74, + 77, + 75, + 78, 87, - 92, + 81, + 83, + 81, 82, - 79, - 76, - 79, - 76, - 86, + 91, 88, - 93, - 89, - 81, - 85, - 94, - 76, + 78, 86, + 78, + 85, 90, + 89, + 80, 93, - 95, - 76, - 76, - 91, - 90, - 218, - 195, - 95, + 217, 87, + 78, + 94, 92, - + 216, 96, - 97, - 76, - 101, - 76, - 86, + 78, + 78, + 87, 88, - 102, - 89, + 94, + 93, 96, + 90, + 83, + 89, + 95, 97, - 94, - 76, + 98, + 78, 86, + 78, + 104, + 103, + 214, + + 105, + 97, + 98, + 87, + 78, + 103, + 92, + 95, 102, + 78, + 78, + 87, + 88, + 94, 93, - 101, - 76, - 76, - 91, + 96, 90, - 103, - 104, - 95, 105, + 89, + 104, 106, - 108, - 109, + 102, 107, - 105, - 110, - 115, - 111, 108, + 110, 106, - 96, + 112, + 109, + 111, 97, + 98, 107, - 116, - 104, - 102, - 112, - 101, + 108, 103, + 109, + 95, 113, 114, + 115, + 116, + 213, + 113, 112, - 109, - 111, - 118, 117, - 116, - 122, - 110, 110, 105, - 115, - 120, 118, - 108, + 104, + 119, + 102, + 120, + 111, + 111, 106, - 113, 114, + 115, + 117, + 119, + 121, 107, - 217, - 104, + 108, + 212, + 109, 120, - 121, - 119, - 103, - 117, + 116, 122, - 112, - 109, - 111, - 123, + 118, 121, - 116, - 125, - 110, + 123, + 113, + 112, + 124, 110, - 119, - 115, + 133, + 122, + 126, + 134, + 125, + 211, + 111, + 111, 128, - 118, - 124, - 129, - 113, 114, - 130, - 126, + 115, + 117, + 119, 125, - 120, 123, + 126, 124, 129, - 117, - 122, - 126, + 120, + 116, + 130, + 118, + 121, + 131, 128, + 134, + 129, - 131, 133, - 121, 135, - 134, - 130, + 122, 136, - 119, - 137, + 140, 131, - 135, + 137, 139, + 135, + 130, 138, - 140, - 142, 141, 139, + 210, 125, - 143, 123, + 126, 124, - 129, + 142, 136, + 143, + 144, 148, - 126, + 159, + 150, 128, 134, - 144, + 129, 133, - 150, - 147, - 130, + 140, 137, 138, - 162, - 131, - 135, 153, - 140, + 131, + 160, 141, - 143, - 142, - 139, + 135, + 130, 147, - 155, 144, + 139, 156, + 143, + 159, + 155, + 142, 148, 136, + 150, 155, 157, - 215, - 134, - 150, - 133, + 147, + 160, + 162, + 201, 157, - 159, - 214, + 153, + 140, 137, 138, - 160, - 153, - 162, 164, - 140, - 141, - 143, - 142, + 169, 163, - 147, + 141, + 165, 156, + 171, 144, - 165, + 199, + 172, + 143, + 159, + 179, + 142, 148, - 169, + 172, + 150, 155, - 159, - 171, + 163, + 147, 160, - 150, - 173, + 162, + 164, 157, + 153, + 169, + 165, + 170, 171, - 172, - 163, - 164, 173, - 153, - 162, + 175, + 177, + 170, + 156, 180, - 174, + 175, + 173, + 179, 181, - 178, - 187, - 165, - 176, - 156, - 174, - 169, - 183, + 184, - 176, - 178, - 159, - 213, - 160, - 172, - 190, + 177, + 194, 182, - 171, - 193, + 172, + 189, + 186, 163, + 181, + 184, + 162, 164, - 173, - 185, + 197, + 194, + 169, + 165, + 192, + 171, + 187, 180, - 181, + 190, + 170, 182, - 187, - 183, 188, - 165, + 175, + 173, + 179, + 187, 189, - 185, - 174, - 169, - 191, - 176, - 178, + 177, + 186, + 204, 188, 190, - 189, - 172, - 203, - 193, - 199, - 212, - 197, + 196, + 198, + 181, + 184, + 200, 203, - 191, - 205, + 192, + 194, + 204, + 196, + 200, + 206, + 202, 180, - 181, + 207, + 215, 182, - 187, - 183, - 197, - 201, - 206, - 185, - 204, + 202, 205, - 207, - 201, 208, + 206, + 187, + 189, + 207, + 186, + 198, 188, 190, - 189, 209, - 199, - 193, - 207, - 210, - 208, 203, - 191, + 220, + 223, 221, - 211, - 216, - 222, - 202, - 206, - 197, - 232, + 215, + 192, + 230, 204, - 200, - 222, - 205, - 198, - 201, 196, - 209, + 200, 221, - 224, - 210, - 199, - 216, - 207, - 232, + 223, + 205, 208, 231, - 194, - 224, - 192, - 186, - 184, - 179, + 230, + 202, + 220, + 195, 206, - 177, + 193, + 209, + 207, + 191, + 198, + 185, + 183, + 178, + 203, 231, - 204, - - 175, - 222, - 170, + 176, + 174, + 215, 168, 167, 166, - 209, - 221, 161, - 210, 158, - 216, + + 221, + 223, + 205, + 208, 154, - 232, + 230, 152, + 220, 151, 149, - 224, 146, + 209, 145, 132, 127, + 101, 100, 99, + 84, 231, + 236, + 236, 237, 237, 238, 238, - 239, - 239, - 98, - 83, - 77, - 61, - 57, + 79, + 63, + 59, + 53, 51, 49, - 47, 35, 24, 11, 10, 9, 5, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236}; + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235, + 235}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2931,7 +2920,7 @@ extern double atof(); #define RETURN_TOKEN(token) \ LOG_DEBUG("%s", #token); \ return token -#line 731 "lex_sql.cpp" +#line 730 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -2940,7 +2929,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 740 "lex_sql.cpp" +#line 739 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -3216,7 +3205,7 @@ YY_DECL { #line 75 "lex_sql.l" -#line 1026 "lex_sql.cpp" +#line 1025 "lex_sql.cpp" while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ { @@ -3240,12 +3229,12 @@ YY_DECL } while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 237) + if (yy_current_state >= 236) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; - } while (yy_base[yy_current_state] != 646); + } while (yy_base[yy_current_state] != 639); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -3413,15 +3402,15 @@ YY_DECL YY_BREAK case 36: YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(DATE_T); // 增加 DATE 的 token + RETURN_TOKEN(DATE_T); YY_BREAK case 37: YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(TEXT_T); // 增加 TEXT 的 token + RETURN_TOKEN(TEXT_T); YY_BREAK case 38: YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(VECTOR_T); // 增加 VECTOR 的 token + RETURN_TOKEN(VECTOR_T); YY_BREAK case 39: YY_RULE_SETUP #line 117 "lex_sql.l" @@ -3437,95 +3426,95 @@ YY_DECL YY_BREAK case 42: YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(LOAD); + RETURN_TOKEN(INFILE); YY_BREAK case 43: YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(INFILE); + RETURN_TOKEN(EXPLAIN); YY_BREAK case 44: YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); + RETURN_TOKEN(GROUP); YY_BREAK case 45: YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(GROUP); + RETURN_TOKEN(LIMIT); YY_BREAK case 46: YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(LIMIT); + RETURN_TOKEN(HAVING); YY_BREAK case 47: YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(HAVING); + RETURN_TOKEN(ORDER); YY_BREAK case 48: YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(ORDER); + RETURN_TOKEN(BY); YY_BREAK case 49: YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(BY); + RETURN_TOKEN(AS); YY_BREAK case 50: YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(AS); + RETURN_TOKEN(ASC); YY_BREAK case 51: YY_RULE_SETUP #line 129 "lex_sql.l" - RETURN_TOKEN(ASC); + RETURN_TOKEN(IN); YY_BREAK case 52: YY_RULE_SETUP #line 130 "lex_sql.l" - RETURN_TOKEN(IN); + RETURN_TOKEN(EXISTS); YY_BREAK case 53: YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(EXISTS); + RETURN_TOKEN(STORAGE); YY_BREAK case 54: YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(STORAGE); + RETURN_TOKEN(FORMAT); YY_BREAK case 55: YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(FORMAT); + RETURN_TOKEN(INNER); YY_BREAK case 56: YY_RULE_SETUP #line 134 "lex_sql.l" - RETURN_TOKEN(INNER); + RETURN_TOKEN(JOIN); YY_BREAK case 57: YY_RULE_SETUP #line 135 "lex_sql.l" - RETURN_TOKEN(JOIN); + RETURN_TOKEN(VIEW); YY_BREAK case 58: YY_RULE_SETUP #line 136 "lex_sql.l" - RETURN_TOKEN(VIEW); + RETURN_TOKEN(LBRACE); YY_BREAK case 59: YY_RULE_SETUP #line 137 "lex_sql.l" - RETURN_TOKEN(LBRACE); + RETURN_TOKEN(RBRACE); YY_BREAK case 60: YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(RBRACE); + RETURN_TOKEN(LSBRACE); YY_BREAK case 61: YY_RULE_SETUP -#line 140 "lex_sql.l" - RETURN_TOKEN(COMMA); +#line 139 "lex_sql.l" + RETURN_TOKEN(RSBRACE); YY_BREAK case 62: YY_RULE_SETUP #line 141 "lex_sql.l" - RETURN_TOKEN(EQ); + RETURN_TOKEN(COMMA); YY_BREAK case 63: YY_RULE_SETUP #line 142 "lex_sql.l" - RETURN_TOKEN(LE); + RETURN_TOKEN(EQ); YY_BREAK case 64: YY_RULE_SETUP #line 143 "lex_sql.l" - RETURN_TOKEN(NE); + RETURN_TOKEN(LE); YY_BREAK case 65: YY_RULE_SETUP #line 144 "lex_sql.l" @@ -3533,69 +3522,73 @@ YY_DECL YY_BREAK case 66: YY_RULE_SETUP #line 145 "lex_sql.l" - RETURN_TOKEN(LT); + RETURN_TOKEN(NE); YY_BREAK case 67: YY_RULE_SETUP #line 146 "lex_sql.l" - RETURN_TOKEN(GE); + RETURN_TOKEN(LT); YY_BREAK case 68: YY_RULE_SETUP #line 147 "lex_sql.l" - RETURN_TOKEN(GT); + RETURN_TOKEN(GE); YY_BREAK case 69: YY_RULE_SETUP #line 148 "lex_sql.l" - RETURN_TOKEN(NOT); + RETURN_TOKEN(GT); YY_BREAK case 70: YY_RULE_SETUP #line 149 "lex_sql.l" - RETURN_TOKEN(IS); + RETURN_TOKEN(NOT); YY_BREAK case 71: YY_RULE_SETUP #line 150 "lex_sql.l" - RETURN_TOKEN(LIKE); + RETURN_TOKEN(IS); YY_BREAK case 72: YY_RULE_SETUP -#line 152 "lex_sql.l" +#line 151 "lex_sql.l" + RETURN_TOKEN(LIKE); + YY_BREAK + case 73: YY_RULE_SETUP +#line 153 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(ID); YY_BREAK - case 73: -#line 155 "lex_sql.l" case 74: #line 156 "lex_sql.l" case 75: #line 157 "lex_sql.l" - case 76: YY_RULE_SETUP -#line 157 "lex_sql.l" + case 76: +#line 158 "lex_sql.l" + case 77: YY_RULE_SETUP +#line 158 "lex_sql.l" { return yytext[0]; } YY_BREAK - case 77: - /* rule 77 can match eol */ + case 78: + /* rule 78 can match eol */ YY_RULE_SETUP -#line 158 "lex_sql.l" +#line 159 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK - case 78: - /* rule 78 can match eol */ + case 79: + /* rule 79 can match eol */ YY_RULE_SETUP -#line 159 "lex_sql.l" +#line 160 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK - case 79: YY_RULE_SETUP -#line 161 "lex_sql.l" + case 80: YY_RULE_SETUP +#line 162 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK - case 80: YY_RULE_SETUP -#line 162 "lex_sql.l" + case 81: YY_RULE_SETUP +#line 163 "lex_sql.l" ECHO; YY_BREAK -#line 1477 "lex_sql.cpp" +#line 1481 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -3860,7 +3853,7 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) } while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 237) + if (yy_current_state >= 236) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -3887,11 +3880,11 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y } while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 237) + if (yy_current_state >= 236) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 236); + yy_is_jam = (yy_current_state == 235); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -4698,6 +4691,6 @@ void yyfree(void *ptr, yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 162 "lex_sql.l" +#line 163 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 4b8524f1..c60e2d16 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -537,7 +537,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #undef yyTABLES_NAME #endif -#line 162 "lex_sql.l" +#line 163 "lex_sql.l" #line 548 "lex_sql.h" #undef yyIN_HEADER diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index ea93c2ae..3aaab5f3 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -135,6 +135,8 @@ JOIN RETURN_TOKEN(JOIN); VIEW RETURN_TOKEN(VIEW); "(" RETURN_TOKEN(LBRACE); ")" RETURN_TOKEN(RBRACE); +"[" RETURN_TOKEN(LSBRACE); +"]" RETURN_TOKEN(RSBRACE); "," RETURN_TOKEN(COMMA); "=" RETURN_TOKEN(EQ); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 6c1530f7..3e6983c8 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -193,115 +193,116 @@ enum yysymbol_kind_t YYSYMBOL_UPDATE = 23, /* UPDATE */ YYSYMBOL_LBRACE = 24, /* LBRACE */ YYSYMBOL_RBRACE = 25, /* RBRACE */ - YYSYMBOL_COMMA = 26, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 30, /* INT_T */ - YYSYMBOL_IN = 31, /* IN */ - YYSYMBOL_STRING_T = 32, /* STRING_T */ - YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ - YYSYMBOL_DATE_T = 34, /* DATE_T */ - YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_VECTOR_T = 36, /* VECTOR_T */ - YYSYMBOL_NOT = 37, /* NOT */ - YYSYMBOL_UNIQUE = 38, /* UNIQUE */ - YYSYMBOL_NULL_T = 39, /* NULL_T */ - YYSYMBOL_LIMIT = 40, /* LIMIT */ - YYSYMBOL_NULLABLE = 41, /* NULLABLE */ - YYSYMBOL_HELP = 42, /* HELP */ - YYSYMBOL_EXIT = 43, /* EXIT */ - YYSYMBOL_DOT = 44, /* DOT */ - YYSYMBOL_INTO = 45, /* INTO */ - YYSYMBOL_VALUES = 46, /* VALUES */ - YYSYMBOL_FROM = 47, /* FROM */ - YYSYMBOL_WHERE = 48, /* WHERE */ - YYSYMBOL_AND = 49, /* AND */ - YYSYMBOL_OR = 50, /* OR */ - YYSYMBOL_SET = 51, /* SET */ - YYSYMBOL_ON = 52, /* ON */ - YYSYMBOL_LOAD = 53, /* LOAD */ - YYSYMBOL_INFILE = 54, /* INFILE */ - YYSYMBOL_EXPLAIN = 55, /* EXPLAIN */ - YYSYMBOL_STORAGE = 56, /* STORAGE */ - YYSYMBOL_FORMAT = 57, /* FORMAT */ - YYSYMBOL_INNER = 58, /* INNER */ - YYSYMBOL_JOIN = 59, /* JOIN */ - YYSYMBOL_VIEW = 60, /* VIEW */ - YYSYMBOL_EQ = 61, /* EQ */ - YYSYMBOL_LT = 62, /* LT */ - YYSYMBOL_GT = 63, /* GT */ - YYSYMBOL_LE = 64, /* LE */ - YYSYMBOL_GE = 65, /* GE */ - YYSYMBOL_NE = 66, /* NE */ - YYSYMBOL_LIKE = 67, /* LIKE */ - YYSYMBOL_IS = 68, /* IS */ - YYSYMBOL_NUMBER = 69, /* NUMBER */ - YYSYMBOL_FLOAT = 70, /* FLOAT */ - YYSYMBOL_ID = 71, /* ID */ - YYSYMBOL_SSS = 72, /* SSS */ - YYSYMBOL_73_ = 73, /* '+' */ - YYSYMBOL_74_ = 74, /* '-' */ - YYSYMBOL_75_ = 75, /* '*' */ - YYSYMBOL_76_ = 76, /* '/' */ - YYSYMBOL_UMINUS = 77, /* UMINUS */ - YYSYMBOL_YYACCEPT = 78, /* $accept */ - YYSYMBOL_commands = 79, /* commands */ - YYSYMBOL_command_wrapper = 80, /* command_wrapper */ - YYSYMBOL_exit_stmt = 81, /* exit_stmt */ - YYSYMBOL_help_stmt = 82, /* help_stmt */ - YYSYMBOL_sync_stmt = 83, /* sync_stmt */ - YYSYMBOL_begin_stmt = 84, /* begin_stmt */ - YYSYMBOL_commit_stmt = 85, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 86, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 87, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 88, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 89, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 90, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 91, /* create_index_stmt */ - YYSYMBOL_opt_unique = 92, /* opt_unique */ - YYSYMBOL_attr_list = 93, /* attr_list */ - YYSYMBOL_drop_index_stmt = 94, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 95, /* create_table_stmt */ - YYSYMBOL_create_view_stmt = 96, /* create_view_stmt */ - YYSYMBOL_drop_view_stmt = 97, /* drop_view_stmt */ - YYSYMBOL_attr_def_list = 98, /* attr_def_list */ - YYSYMBOL_attr_def = 99, /* attr_def */ - YYSYMBOL_nullable_constraint = 100, /* nullable_constraint */ - YYSYMBOL_type = 101, /* type */ - YYSYMBOL_insert_stmt = 102, /* insert_stmt */ - YYSYMBOL_values_list = 103, /* values_list */ - YYSYMBOL_value_list = 104, /* value_list */ - YYSYMBOL_value = 105, /* value */ - YYSYMBOL_nonnegative_value = 106, /* nonnegative_value */ - YYSYMBOL_storage_format = 107, /* storage_format */ - YYSYMBOL_delete_stmt = 108, /* delete_stmt */ - YYSYMBOL_update_stmt = 109, /* update_stmt */ - YYSYMBOL_set_clauses = 110, /* set_clauses */ - YYSYMBOL_setClause = 111, /* setClause */ - YYSYMBOL_select_stmt = 112, /* select_stmt */ - YYSYMBOL_calc_stmt = 113, /* calc_stmt */ - YYSYMBOL_expression_list = 114, /* expression_list */ - YYSYMBOL_expression = 115, /* expression */ - YYSYMBOL_alias = 116, /* alias */ - YYSYMBOL_func_expr = 117, /* func_expr */ - YYSYMBOL_sub_query_expr = 118, /* sub_query_expr */ - YYSYMBOL_rel_attr = 119, /* rel_attr */ - YYSYMBOL_relation = 120, /* relation */ - YYSYMBOL_rel_list = 121, /* rel_list */ - YYSYMBOL_join_clauses = 122, /* join_clauses */ - YYSYMBOL_where = 123, /* where */ - YYSYMBOL_condition = 124, /* condition */ - YYSYMBOL_comp_op = 125, /* comp_op */ - YYSYMBOL_opt_order_by = 126, /* opt_order_by */ - YYSYMBOL_sort_list = 127, /* sort_list */ - YYSYMBOL_sort_unit = 128, /* sort_unit */ - YYSYMBOL_group_by = 129, /* group_by */ - YYSYMBOL_opt_having = 130, /* opt_having */ - YYSYMBOL_opt_limit = 131, /* opt_limit */ - YYSYMBOL_explain_stmt = 132, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 133, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 134 /* opt_semicolon */ + YYSYMBOL_LSBRACE = 26, /* LSBRACE */ + YYSYMBOL_RSBRACE = 27, /* RSBRACE */ + YYSYMBOL_COMMA = 28, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 29, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 30, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 31, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 32, /* INT_T */ + YYSYMBOL_IN = 33, /* IN */ + YYSYMBOL_STRING_T = 34, /* STRING_T */ + YYSYMBOL_FLOAT_T = 35, /* FLOAT_T */ + YYSYMBOL_DATE_T = 36, /* DATE_T */ + YYSYMBOL_TEXT_T = 37, /* TEXT_T */ + YYSYMBOL_VECTOR_T = 38, /* VECTOR_T */ + YYSYMBOL_NOT = 39, /* NOT */ + YYSYMBOL_UNIQUE = 40, /* UNIQUE */ + YYSYMBOL_NULL_T = 41, /* NULL_T */ + YYSYMBOL_LIMIT = 42, /* LIMIT */ + YYSYMBOL_NULLABLE = 43, /* NULLABLE */ + YYSYMBOL_HELP = 44, /* HELP */ + YYSYMBOL_EXIT = 45, /* EXIT */ + YYSYMBOL_DOT = 46, /* DOT */ + YYSYMBOL_INTO = 47, /* INTO */ + YYSYMBOL_VALUES = 48, /* VALUES */ + YYSYMBOL_FROM = 49, /* FROM */ + YYSYMBOL_WHERE = 50, /* WHERE */ + YYSYMBOL_AND = 51, /* AND */ + YYSYMBOL_OR = 52, /* OR */ + YYSYMBOL_SET = 53, /* SET */ + YYSYMBOL_ON = 54, /* ON */ + YYSYMBOL_INFILE = 55, /* INFILE */ + YYSYMBOL_EXPLAIN = 56, /* EXPLAIN */ + YYSYMBOL_STORAGE = 57, /* STORAGE */ + YYSYMBOL_FORMAT = 58, /* FORMAT */ + YYSYMBOL_INNER = 59, /* INNER */ + YYSYMBOL_JOIN = 60, /* JOIN */ + YYSYMBOL_VIEW = 61, /* VIEW */ + YYSYMBOL_EQ = 62, /* EQ */ + YYSYMBOL_LT = 63, /* LT */ + YYSYMBOL_GT = 64, /* GT */ + YYSYMBOL_LE = 65, /* LE */ + YYSYMBOL_GE = 66, /* GE */ + YYSYMBOL_NE = 67, /* NE */ + YYSYMBOL_LIKE = 68, /* LIKE */ + YYSYMBOL_IS = 69, /* IS */ + YYSYMBOL_NUMBER = 70, /* NUMBER */ + YYSYMBOL_FLOAT = 71, /* FLOAT */ + YYSYMBOL_ID = 72, /* ID */ + YYSYMBOL_SSS = 73, /* SSS */ + YYSYMBOL_74_ = 74, /* '+' */ + YYSYMBOL_75_ = 75, /* '-' */ + YYSYMBOL_76_ = 76, /* '*' */ + YYSYMBOL_77_ = 77, /* '/' */ + YYSYMBOL_UMINUS = 78, /* UMINUS */ + YYSYMBOL_YYACCEPT = 79, /* $accept */ + YYSYMBOL_commands = 80, /* commands */ + YYSYMBOL_command_wrapper = 81, /* command_wrapper */ + YYSYMBOL_exit_stmt = 82, /* exit_stmt */ + YYSYMBOL_help_stmt = 83, /* help_stmt */ + YYSYMBOL_sync_stmt = 84, /* sync_stmt */ + YYSYMBOL_begin_stmt = 85, /* begin_stmt */ + YYSYMBOL_commit_stmt = 86, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 87, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 88, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 89, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 90, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 91, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 92, /* create_index_stmt */ + YYSYMBOL_opt_unique = 93, /* opt_unique */ + YYSYMBOL_attr_list = 94, /* attr_list */ + YYSYMBOL_drop_index_stmt = 95, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 96, /* create_table_stmt */ + YYSYMBOL_create_view_stmt = 97, /* create_view_stmt */ + YYSYMBOL_drop_view_stmt = 98, /* drop_view_stmt */ + YYSYMBOL_attr_def_list = 99, /* attr_def_list */ + YYSYMBOL_attr_def = 100, /* attr_def */ + YYSYMBOL_nullable_constraint = 101, /* nullable_constraint */ + YYSYMBOL_type = 102, /* type */ + YYSYMBOL_insert_stmt = 103, /* insert_stmt */ + YYSYMBOL_values_list = 104, /* values_list */ + YYSYMBOL_value_list = 105, /* value_list */ + YYSYMBOL_value = 106, /* value */ + YYSYMBOL_nonnegative_value = 107, /* nonnegative_value */ + YYSYMBOL_storage_format = 108, /* storage_format */ + YYSYMBOL_delete_stmt = 109, /* delete_stmt */ + YYSYMBOL_update_stmt = 110, /* update_stmt */ + YYSYMBOL_set_clauses = 111, /* set_clauses */ + YYSYMBOL_setClause = 112, /* setClause */ + YYSYMBOL_select_stmt = 113, /* select_stmt */ + YYSYMBOL_calc_stmt = 114, /* calc_stmt */ + YYSYMBOL_expression_list = 115, /* expression_list */ + YYSYMBOL_expression = 116, /* expression */ + YYSYMBOL_alias = 117, /* alias */ + YYSYMBOL_func_expr = 118, /* func_expr */ + YYSYMBOL_sub_query_expr = 119, /* sub_query_expr */ + YYSYMBOL_rel_attr = 120, /* rel_attr */ + YYSYMBOL_relation = 121, /* relation */ + YYSYMBOL_rel_list = 122, /* rel_list */ + YYSYMBOL_join_clauses = 123, /* join_clauses */ + YYSYMBOL_where = 124, /* where */ + YYSYMBOL_condition = 125, /* condition */ + YYSYMBOL_comp_op = 126, /* comp_op */ + YYSYMBOL_opt_order_by = 127, /* opt_order_by */ + YYSYMBOL_sort_list = 128, /* sort_list */ + YYSYMBOL_sort_unit = 129, /* sort_unit */ + YYSYMBOL_group_by = 130, /* group_by */ + YYSYMBOL_opt_having = 131, /* opt_having */ + YYSYMBOL_opt_limit = 132, /* opt_limit */ + YYSYMBOL_explain_stmt = 133, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 134, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 135 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -606,21 +607,21 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 72 +#define YYFINAL 73 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 278 +#define YYLAST 288 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 78 +#define YYNTOKENS 79 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 57 /* YYNRULES -- Number of rules. */ -#define YYNRULES 149 +#define YYNRULES 150 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 265 +#define YYNSTATES 268 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 328 +#define YYMAXUTOK 329 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ @@ -671,12 +672,12 @@ static const yytype_int8 yytranslate[] = {0, 2, 2, 2, - 75, - 73, - 2, + 76, 74, 2, - 76, + 75, + 2, + 77, 2, 2, 2, @@ -957,13 +958,15 @@ static const yytype_int8 yytranslate[] = {0, 70, 71, 72, - 77}; + 73, + 78}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = {0, - 266, - 266, + 265, + 265, + 273, 274, 275, 276, @@ -982,106 +985,105 @@ static const yytype_int16 yyrline[] = {0, 289, 290, 291, + 292, 293, 294, - 295, - 296, - 300, - 306, - 311, - 317, - 323, - 329, - 335, - 342, - 348, - 356, - 366, - 381, - 382, - 386, - 392, - 401, - 411, - 415, - 419, - 423, - 427, - 434, - 442, - 454, - 464, - 467, - 480, - 498, - 527, - 531, - 535, - 540, + 298, + 304, + 309, + 315, + 321, + 327, + 333, + 340, + 346, + 354, + 364, + 379, + 380, + 384, + 390, + 399, + 409, + 413, + 417, + 421, + 425, + 432, + 440, + 452, + 462, + 465, + 478, + 496, + 525, + 529, + 533, + 538, + 544, + 545, 546, 547, 548, 549, - 550, - 551, - 555, - 565, - 579, - 585, - 592, - 598, - 606, - 609, - 613, - 620, - 624, - 628, - 634, - 641, - 644, - 651, - 663, - 677, - 682, - 689, - 699, - 737, - 770, - 776, - 785, - 788, - 797, - 813, - 816, - 819, - 822, - 825, - 833, - 836, - 841, - 847, - 850, - 853, - 856, - 863, - 866, - 869, - 874, - 881, - 888, - 893, - 903, - 909, - 919, - 936, - 943, - 955, - 958, - 964, - 968, - 975, - 979, - 986, + 553, + 563, + 577, + 583, + 590, + 596, + 604, + 607, + 611, + 618, + 622, + 626, + 632, + 635, + 642, + 645, + 652, + 664, + 678, + 683, + 690, + 700, + 738, + 771, + 777, + 786, + 789, + 798, + 814, + 817, + 820, + 823, + 826, + 834, + 837, + 842, + 848, + 851, + 854, + 857, + 864, + 867, + 870, + 875, + 882, + 889, + 894, + 904, + 910, + 920, + 937, + 944, + 956, + 959, + 965, + 969, + 976, + 980, 987, 988, 989, @@ -1095,22 +1097,23 @@ static const yytype_int16 yyrline[] = {0, 997, 998, 999, - 1004, - 1007, - 1015, - 1020, - 1028, - 1034, - 1040, - 1050, - 1053, - 1061, - 1064, - 1072, - 1075, - 1096, - 1104, - 1115}; + 1000, + 1005, + 1008, + 1016, + 1021, + 1029, + 1035, + 1041, + 1051, + 1054, + 1062, + 1065, + 1073, + 1076, + 1084, + 1092, + 1103}; #endif /** Accessing symbol of state STATE. */ @@ -1149,6 +1152,8 @@ static const char *const yytname[] = {"\"end of file\"", "UPDATE", "LBRACE", "RBRACE", + "LSBRACE", + "RSBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", @@ -1176,7 +1181,6 @@ static const char *const yytname[] = {"\"end of file\"", "OR", "SET", "ON", - "LOAD", "INFILE", "EXPLAIN", "STORAGE", @@ -1263,7 +1267,7 @@ static const char *const yytname[] = {"\"end of file\"", static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif -#define YYPACT_NINF (-145) +#define YYPACT_NINF (-190) #define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) @@ -1273,271 +1277,274 @@ static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysy /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {223, - 6, - 9, - -11, - -11, - -56, - 16, - -145, - -22, - -15, - -21, - -145, - -145, - -145, - -145, - -145, - -1, - 223, - 67, - 85, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, +static const yytype_int16 yypact[] = {232, + 4, + 5, + 136, + 136, + -50, + 14, + -190, + -17, 20, - -145, - 29, - 113, + -15, + -190, + -190, + -190, + -190, + -190, + 41, + 232, + 94, + 103, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + 43, + -190, + 70, + 106, + 72, + 73, + 77, 81, - 83, - 84, - 129, - -145, - -145, - -145, - -3, - -145, - -11, - -145, - -145, - -145, - 10, - -145, - -145, - -145, + 29, + -190, + -190, + -190, + -9, + -190, + 136, + -190, + -190, + -190, + 12, + -190, + -190, + -190, + 101, + -190, + -190, 109, - -145, - -145, - 110, + 83, 87, - 88, - 111, - 99, - -145, - -145, - -145, - -145, - -13, - 23, - 95, - -145, - 117, - -145, - -11, + 90, + 108, + -190, + -190, + -190, + -190, + -5, + 22, + 100, + -190, + 119, + -190, 136, - 142, - -11, - -20, - -145, - 101, - -145, - -11, - -11, - -11, - -11, - 144, - 102, - 102, - -7, - 123, - 103, - 66, + 149, + 150, + 49, + 105, + -190, + -190, + 136, + -45, + -190, 104, - 119, - 12, - 160, - 112, + -190, + 136, + 136, + 136, + 136, + 151, + 111, + 111, + -12, 128, - 116, - 109, - -145, - -145, - 156, - -145, - -145, - -145, - -27, - -27, - -145, - -145, - -11, - -145, - 4, - 123, - -145, 112, - 158, - 154, - -145, - 125, - -8, - -145, - 3, - -145, - -145, - 115, - 162, - 131, - 160, - -145, - -145, - 163, - 165, - 124, - -145, - -145, - -145, + 29, + 113, + 122, + 21, + 172, + 118, 137, - 176, - 195, - 181, - 66, - 183, - -145, - -145, - 11, - -145, - -145, - -145, - -145, - -145, - -145, - -145, + 120, + 101, + -190, + -190, + -190, + -190, + -190, + 29, + 168, + -190, + -190, + -190, + 58, + 58, + -190, + -190, + 136, + -190, + 31, + 128, + -190, + 118, 170, - 56, - 63, - -11, - -11, - 103, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - 55, - 104, - 185, - 140, - -145, - 112, - 208, - 190, - 102, - 102, - 221, - 222, - 186, - 90, - -145, - 210, - -145, - -145, - -145, - -145, - -11, - 154, - 154, - 33, - 33, - -145, - 166, - 197, - -145, - -145, - -145, 162, - 182, - -145, - -145, - 160, + -190, + 135, + -7, + -190, + -190, + 129, + 174, + 138, + 172, + -190, + -190, + 176, + 173, + 133, + -190, + -190, + -190, + -190, + 153, + 186, + 205, + 191, + 29, + 189, + -190, + -190, + 0, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + 180, + 62, + 89, + 136, + 136, 112, - 196, - 123, - 5, - -145, - -11, - 154, - 225, - 158, - -145, - 66, - 66, - 33, - -145, - 198, - 224, - -145, - -145, - 78, - -145, - 228, - 154, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + 8, + 113, 195, - -145, - 63, - 248, - 215, - 183, - -145, - 108, - 100, - 160, - -145, - -145, - -24, - -145, - -11, - 187, - -145, - -145, - -145, - -145, - 199, + 164, + -190, + 118, + 217, + 198, + 111, + 111, + 235, + 212, + 194, 28, - -145, - 231, - -145, - 102, - -145, - -145, - -11, - -145, - -145}; + 219, + -190, + -190, + -190, + -190, + 136, + 162, + 162, + -1, + -1, + -190, + 175, + 203, + -190, + -190, + -190, + 174, + 190, + -190, + -190, + 172, + 118, + 192, + 128, + 19, + -190, + 136, + 162, + 244, + 170, + -190, + 29, + -1, + -190, + 206, + 233, + -190, + -190, + 50, + -190, + 234, + 162, + 205, + -190, + 89, + 254, + 222, + 189, + 34, + 71, + 172, + -190, + -190, + 57, + -190, + 136, + 196, + -190, + -190, + -190, + -190, + 207, + 6, + -190, + 237, + -190, + 111, + -190, + -190, + 136, + -190, + -190}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero @@ -1545,8 +1552,8 @@ static const yytype_int16 yypact[] = {223, static const yytype_uint8 yydefact[] = {0, 37, 0, - 87, - 87, + 88, + 88, 0, 0, 27, @@ -1591,21 +1598,22 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 87, + 88, + 0, 75, 72, 73, - 107, + 108, 74, 0, - 98, - 96, - 85, - 102, - 100, - 101, + 99, 97, 86, + 103, + 101, + 102, + 98, + 87, 33, 32, 0, @@ -1613,35 +1621,37 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 147, + 148, 1, - 149, + 150, 2, - 76, + 77, 0, 0, 31, 0, 48, - 87, + 88, 0, 0, - 87, 0, - 95, 0, - 103, + 67, + 69, + 88, 0, + 96, 0, + 104, 0, 0, - 88, 0, 0, + 89, 0, - 114, 0, 0, + 115, 0, 0, 0, @@ -1650,31 +1660,35 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 106, - 94, 0, - 108, - 99, - 104, - 90, + 0, + 107, + 95, + 70, + 71, + 76, + 0, + 0, + 109, + 100, + 105, 91, 92, 93, - 87, - 109, - 102, - 114, + 94, + 88, + 110, + 103, + 115, 34, 0, 0, 0, - 78, - 0, - 114, - 80, + 79, 0, - 148, - 69, + 115, + 81, + 149, 0, 49, 0, @@ -1685,33 +1699,32 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 40, - 105, - 89, + 68, + 106, + 90, 0, - 110, - 141, + 111, + 142, 0, 0, 63, - 132, - 130, + 133, + 131, 0, - 120, 121, 122, 123, 124, 125, - 128, 126, + 129, + 127, 0, - 115, + 116, 0, 0, 0, - 79, - 70, - 71, + 80, 57, 58, 59, @@ -1729,46 +1742,44 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 143, + 144, 0, 0, - 67, 0, - 133, - 131, - 129, - 127, + 134, + 132, + 130, + 128, 0, 0, 0, - 117, + 118, + 83, 82, - 81, 0, 0, 55, 54, 52, 49, - 76, 77, + 78, 39, 0, 0, 0, - 114, - 102, - 111, - 87, + 115, + 103, + 112, + 88, 0, - 134, + 135, 0, 65, 0, - 0, - 116, - 118, + 117, 119, + 120, 0, 53, 50, @@ -1776,96 +1787,95 @@ static const yytype_uint8 yydefact[] = {0, 47, 0, 0, - 141, 142, - 144, - 0, + 143, 145, + 0, + 146, 64, - 68, 0, 56, 0, 42, 35, - 112, - 84, + 113, + 85, 0, 0, - 83, + 84, 66, 51, 41, 0, - 138, - 135, + 139, 136, - 146, + 137, + 147, 0, + 141, 140, - 139, 0, - 113, - 137}; + 114, + 138}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-145, - -145, - 242, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -113, - -145, - -145, - -145, - -145, - 53, - 86, - 19, - -145, - -145, - 42, - 41, - -95, - -97, +static const yytype_int16 yypgoto[] = {-190, + -190, + 251, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -190, + -124, + -190, + -190, + -190, + -190, 59, - -145, - -145, - -145, - 105, - -46, - -145, - -4, + 86, + 25, + -190, + -190, + 47, + -150, -54, - 209, - -145, - -145, - -145, - -88, - 91, - 13, - -116, - -144, + -46, + 60, + -190, + -190, + -190, 107, - -145, - 8, - -145, - 39, - -145, - -145, - -145, - -145, - -145}; + -47, + -190, + -4, + -55, + 214, + -190, + -190, + -190, + -94, + 84, + 16, + -127, + -189, + 110, + -190, + 17, + -190, + 45, + -190, + -190, + -190, + -190, + -190}; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = {0, @@ -1883,291 +1893,300 @@ static const yytype_int16 yydefgoto[] = {0, 29, 30, 45, - 140, + 147, 31, 32, 33, 34, - 178, - 134, - 206, - 176, + 184, + 141, + 211, + 182, 35, - 150, - 189, - 190, - 57, - 102, + 158, + 86, + 87, + 58, + 107, 36, 37, - 128, - 129, + 137, + 138, 38, 39, - 58, 59, - 146, 60, + 154, 61, 62, - 213, - 121, - 214, - 126, - 163, - 164, - 238, - 256, - 257, - 187, + 63, + 218, + 130, 219, - 250, + 135, + 171, + 172, + 242, + 259, + 260, + 193, + 224, + 253, 40, 41, - 74}; + 75}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = {63, - 86, - 132, - 82, +static const yytype_int16 yytable[] = {64, + 91, + 83, + 155, + 88, + 129, 131, - 147, - 120, - 122, - 87, - 87, - 148, - 100, - 167, - 49, - 87, - 64, - 136, - 123, - 166, + 195, + 156, + 197, + 175, + 263, + 132, + 229, + 230, + 89, + 92, 42, - 192, - 84, 46, - 67, + 105, 47, - 197, - 198, - 103, - 50, - 81, + 174, 65, + 92, + 264, + 143, + 108, + 120, 66, + 67, 68, - 260, - 254, - 114, - 115, - 116, - 117, + 121, + 207, + 198, + 240, + 92, + 133, + 90, + 82, + 123, 124, 125, - 85, - 193, - 101, + 126, + 134, 43, - 83, - 261, - 104, - 91, - 92, - 69, - 111, - 132, - 225, - 226, - 112, - 137, - 138, - 51, - 52, - 53, - 54, - 145, - 55, - 56, - 151, - 44, - 72, + 84, + 109, + 208, + 249, + 209, + 139, 210, - 48, + 106, + 226, + 246, + 50, + 118, 70, - 162, - 168, - 169, - 236, - 88, - 88, - 107, - 194, - 202, - 110, 88, - 243, - 89, - 90, - 91, - 92, - 152, - 73, - 246, - 180, - 75, - 203, - 153, - 204, - 81, - 205, + 254, + 144, + 145, + 118, 215, - 234, - 232, - 76, - 89, - 90, - 91, - 92, - 50, - 89, - 90, - 91, - 92, + 150, + 44, + 48, + 82, 199, - 200, - 197, - 198, - 144, - 221, - 222, - 154, - 155, - 156, - 157, - 158, + 69, + 51, 159, + 88, + 94, + 95, + 96, + 97, + 244, + 112, + 170, + 94, + 95, + 96, + 97, + 93, + 119, + 94, + 95, + 96, + 97, + 153, + 93, + 238, + 236, + 73, 160, - 161, - 132, - 132, - 240, - 77, - 89, - 90, - 91, - 92, - 251, - 222, - 51, + 186, + 220, + 82, 52, + 53, + 161, + 55, + 93, + 85, + 49, + 74, + 50, + 202, 203, - 54, + 208, + 88, + 209, + 71, + 210, + 76, + 257, 204, - 130, 205, - 224, - 162, - 162, - 170, - 81, - 171, - 172, - 173, - 174, - 175, + 115, + 116, 78, - 49, - 79, - 80, + 51, + 152, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 117, + 118, + 96, + 97, 94, 95, 96, 97, + 202, + 203, + 77, + 103, + 79, + 80, + 228, + 170, + 170, + 81, 99, - 108, - 98, - 151, - 162, - 231, - 105, - 109, + 52, + 53, + 54, + 55, + 101, + 56, + 57, + 100, + 102, + 49, + 176, 50, - 106, - 118, - 125, + 177, + 178, + 179, + 180, + 181, + 170, + 235, + 104, + 159, + 110, + 111, 113, - 119, + 114, + 122, + 51, + 134, 127, - 133, - 135, - 81, - 49, - 162, - 141, - 143, - 149, - 139, - 244, - 152, - 165, 142, - 177, - 181, - 182, - 153, - 179, + 88, + 170, + 128, + 136, + 140, + 49, + 247, 50, - 255, + 82, + 146, + 148, + 149, + 151, + 157, + 160, + 258, + 173, + 188, + 256, + 185, + 161, 183, - 184, - 253, 51, + 187, + 189, 52, 53, 54, - 185, 55, + 258, 56, - 186, - 188, - 195, - 255, + 57, + 190, 191, - 208, - 209, - 211, - 235, - 212, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 51, + 192, + 194, + 196, + 239, + 200, + 213, + 216, + 217, + 223, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, 52, 53, 54, - 217, 55, + 214, 56, + 57, 1, 2, - 220, - 218, - 223, + 222, + 225, 227, - 228, + 232, + 231, 237, - 101, + 106, 3, 4, 5, @@ -2176,157 +2195,164 @@ static const yytype_int16 yytable[] = {63, 8, 9, 10, - 197, - 233, - 242, + 241, + 202, + 245, + 248, + 251, 11, 12, 13, - 245, - 248, - 249, - 258, - 262, - 259, - 71, - 229, 252, - 239, - 207, - 241, + 265, + 261, + 262, + 72, + 212, + 255, + 233, + 243, + 234, + 98, + 221, 14, 15, - 230, - 93, - 196, - 264, + 266, + 0, 201, - 263, - 247, + 206, + 267, + 250, + 0, 16, 0, - 216, 0, 17}; static const yytype_int16 yycheck[] = {4, - 55, - 99, + 56, 49, + 130, + 50, 99, - 121, - 94, - 95, - 4, - 4, - 123, + 100, + 157, + 132, + 9, + 137, + 5, 24, - 128, + 202, + 203, 24, 4, - 71, - 4, - 24, - 26, 13, - 9, - 24, 13, - 45, + 24, 15, - 49, - 50, + 28, + 72, 4, - 39, - 17, + 18, + 4, + 4, + 72, 14, 15, 47, - 5, - 58, - 89, - 90, - 91, - 92, - 46, + 76, + 24, + 33, + 223, + 4, 48, - 44, - 31, - 56, - 38, + 46, + 17, + 94, + 95, + 96, + 97, + 50, + 40, 49, - 18, 24, + 39, + 237, + 41, + 104, + 43, + 57, + 25, + 4, + 26, + 28, + 72, + 104, + 25, + 107, + 108, + 28, + 187, + 118, + 61, + 61, + 17, + 68, + 49, + 41, + 9, + 118, + 74, 75, 76, - 71, - 71, - 149, - 197, - 198, + 77, + 227, + 82, + 134, + 74, 75, - 102, - 103, - 69, - 70, - 71, + 76, + 77, 72, - 58, + 89, 74, 75, - 9, - 60, + 76, + 77, + 59, + 72, + 219, + 217, 0, - 181, - 60, - 71, - 125, - 69, + 33, + 143, + 191, + 17, 70, - 218, - 71, - 71, - 81, - 67, - 24, - 84, 71, - 4, + 39, 73, - 74, + 72, 75, - 76, - 31, + 24, 3, - 233, - 136, - 71, - 37, - 37, + 26, + 51, + 52, 39, - 17, + 157, 41, - 185, - 214, - 212, + 72, + 43, + 72, + 59, + 172, + 173, + 70, 71, - 73, - 74, - 75, - 76, - 39, - 73, - 74, - 75, - 76, - 164, - 165, - 49, - 50, - 118, - 25, - 26, - 61, + 15, + 41, + 127, 62, 63, 64, @@ -2334,97 +2360,99 @@ static const yytype_int16 yycheck[] = {4, 66, 67, 68, - 222, - 223, - 222, - 15, - 73, + 69, + 27, + 28, + 76, + 77, 74, 75, 76, - 25, - 26, - 69, + 77, + 51, + 52, + 72, + 53, + 72, + 72, + 201, + 202, + 203, + 72, + 49, 70, - 37, + 71, 72, - 39, - 74, - 41, - 196, - 197, - 198, - 30, - 17, + 73, + 72, + 75, + 76, + 49, + 72, + 24, 32, - 33, + 26, 34, 35, 36, - 71, - 24, - 71, - 71, - 47, - 47, - 71, - 71, - 61, - 25, - 51, + 37, + 38, + 223, + 216, + 62, 9, - 218, - 211, - 71, + 72, + 54, 25, - 39, - 52, + 25, + 72, + 41, + 50, + 28, + 58, + 227, + 237, + 72, + 72, + 72, + 24, + 234, 26, - 48, - 71, - 71, - 71, - 71, - 57, 17, - 24, - 233, - 52, + 72, + 54, + 72, 25, 24, - 71, - 230, - 31, - 61, - 71, - 26, - 26, + 33, + 251, + 62, 25, - 37, - 61, + 246, + 62, 39, - 248, - 71, - 59, - 243, - 69, + 28, + 41, + 28, + 72, 70, 71, 72, - 26, - 74, + 73, + 265, 75, + 76, + 60, + 28, 10, 25, - 37, - 262, - 26, + 28, + 222, + 39, 25, - 71, 4, - 217, 24, - 61, + 11, 62, 63, 64, @@ -2436,18 +2464,19 @@ static const yytype_int16 yycheck[] = {4, 70, 71, 72, - 6, - 74, + 73, + 72, 75, + 76, 7, 8, - 46, - 11, + 6, + 48, 24, - 69, - 39, - 12, - 56, + 41, + 70, + 54, + 57, 16, 17, 18, @@ -2456,38 +2485,39 @@ static const yytype_int16 yycheck[] = {4, 21, 22, 23, - 49, - 52, + 12, + 51, 25, - 27, - 28, - 29, 25, 6, - 40, - 69, - 26, - 59, - 17, - 207, - 242, - 220, - 177, - 223, + 29, + 30, + 31, 42, - 43, - 208, - 59, - 162, + 28, + 70, + 60, + 17, + 183, + 245, + 212, + 225, + 213, + 60, + 191, + 44, + 45, 262, - 166, - 259, - 234, - 51, -1, - 185, + 170, + 174, + 265, + 238, -1, - 55}; + 53, + -1, + -1, + 56}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ @@ -2502,14 +2532,13 @@ static const yytype_uint8 yystos[] = {0, 21, 22, 23, - 27, - 28, 29, - 42, - 43, - 51, - 55, - 79, + 30, + 31, + 44, + 45, + 53, + 56, 80, 81, 82, @@ -2522,130 +2551,138 @@ static const yytype_uint8 yystos[] = {0, 89, 90, 91, - 94, + 92, 95, 96, 97, - 102, - 108, + 98, + 103, 109, - 112, + 110, 113, - 132, + 114, 133, + 134, 13, - 38, - 60, - 92, + 40, + 61, + 93, 13, 15, - 60, + 61, 24, - 39, - 69, + 26, + 41, 70, 71, 72, - 74, + 73, 75, - 106, - 114, + 76, + 107, 115, - 117, + 116, 118, 119, - 114, - 71, + 120, + 115, + 72, 14, 15, - 45, 47, - 71, - 71, - 80, + 49, + 72, + 72, + 81, 0, 3, - 134, - 71, - 71, + 135, + 72, + 72, 15, - 71, - 71, - 71, + 72, + 72, + 72, 17, - 112, - 114, - 24, - 44, + 113, 115, + 75, + 105, + 106, + 107, + 24, + 46, + 116, 4, - 71, - 73, + 72, 74, 75, 76, - 116, - 47, - 47, - 71, - 71, - 51, - 61, + 77, + 117, + 49, + 49, + 72, + 72, + 53, + 62, 24, - 56, - 107, + 57, + 108, 4, 24, - 71, - 52, - 114, + 72, + 54, + 115, 25, 25, - 114, - 71, - 75, + 70, 71, + 27, + 28, 115, - 115, - 115, - 115, - 26, - 71, - 120, + 72, + 76, + 72, + 116, + 116, + 116, + 116, + 28, + 72, + 121, + 122, 121, - 120, 24, - 46, 48, - 123, - 71, - 110, + 50, + 124, + 72, 111, - 74, - 105, + 112, 106, - 71, - 99, - 57, + 72, + 100, + 58, 4, - 112, - 112, - 71, - 93, - 52, - 71, + 113, + 113, + 72, + 94, + 54, + 72, + 106, 25, - 114, - 58, - 116, - 123, - 93, + 115, + 59, + 117, + 124, + 94, 24, - 103, + 104, 9, - 31, - 37, - 61, + 33, + 39, 62, 63, 64, @@ -2653,136 +2690,131 @@ static const yytype_uint8 yystos[] = {0, 66, 67, 68, - 115, - 124, - 125, - 61, - 26, - 123, 69, - 70, - 30, + 116, + 125, + 126, + 62, + 28, + 124, 32, - 33, 34, 35, 36, - 101, - 26, - 98, - 61, - 112, - 26, + 37, + 38, + 102, + 28, + 99, + 62, + 113, + 28, 25, - 71, - 59, - 26, + 72, + 60, + 28, 10, - 129, + 130, 25, - 104, 105, - 26, + 28, 9, - 31, - 67, - 37, - 125, - 49, - 50, - 115, - 115, - 111, + 33, + 68, + 39, + 126, + 51, + 52, + 116, + 116, + 112, 24, - 37, 39, 41, + 43, + 101, 100, - 99, 25, - 71, - 93, + 72, + 94, 4, 24, - 120, - 122, - 120, 121, + 123, + 121, + 122, 6, 11, - 130, - 46, + 131, + 48, 25, - 26, 24, - 115, - 124, - 124, - 69, - 39, - 98, - 107, - 112, - 93, - 52, - 123, - 114, + 116, + 125, + 125, + 70, + 41, + 99, + 108, + 113, + 94, + 54, 124, + 115, + 125, 12, - 126, - 103, - 105, + 127, 104, + 105, 25, 4, - 112, + 113, 25, - 124, - 129, + 125, + 130, 6, - 40, - 131, + 42, + 132, 25, - 100, - 112, - 58, - 115, - 127, - 128, - 69, + 101, + 113, 59, + 116, + 128, + 129, + 70, + 60, 5, 18, - 26, - 122, - 127}; + 28, + 123, + 128}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_uint8 yyr1[] = {0, - 78, 79, 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, 81, 82, 83, @@ -2795,80 +2827,80 @@ static const yytype_uint8 yyr1[] = {0, 90, 91, 92, - 92, 93, 93, 94, + 94, 95, - 95, - 95, - 95, - 95, + 96, + 96, + 96, 96, 96, 97, - 98, + 97, 98, 99, 99, 100, 100, - 100, - 100, - 101, - 101, 101, 101, 101, 101, 102, 102, + 102, + 102, + 102, + 102, 103, 103, 104, 104, 105, 105, - 105, - 106, 106, 106, 106, 107, 107, + 107, + 107, + 107, + 108, 108, 109, 110, - 110, 111, - 112, + 111, 112, 113, 113, 114, 114, - 114, - 115, - 115, - 115, - 115, - 115, - 115, - 115, - 115, - 115, 115, 115, 115, 116, 116, 116, + 116, + 116, + 116, + 116, + 116, + 116, + 116, + 116, + 116, + 117, + 117, 117, 118, 119, - 119, 120, - 121, + 120, 121, 122, 122, @@ -2876,29 +2908,29 @@ static const yytype_uint8 yyr1[] = {0, 123, 124, 124, - 124, - 124, - 125, - 125, - 125, - 125, - 125, - 125, - 125, - 125, - 125, - 125, 125, 125, 125, 125, 126, 126, + 126, + 126, + 126, + 126, + 126, + 126, + 126, + 126, + 126, + 126, + 126, + 126, 127, 127, 128, 128, - 128, + 129, 129, 129, 130, @@ -2906,8 +2938,10 @@ static const yytype_uint8 yyr1[] = {0, 131, 131, 132, + 132, 133, - 134}; + 134, + 135}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = {0, @@ -2986,6 +3020,7 @@ static const yytype_int8 yyr2[] = {0, 1, 1, 1, + 3, 0, 4, 4, @@ -3842,104 +3877,104 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YY_REDUCE_PRINT(yyn); switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 267 "yacc_sql.y" +#line 266 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1879 "yacc_sql.cpp" +#line 1885 "yacc_sql.cpp" break; case 25: /* exit_stmt: EXIT */ -#line 300 "yacc_sql.y" +#line 298 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1888 "yacc_sql.cpp" +#line 1894 "yacc_sql.cpp" break; case 26: /* help_stmt: HELP */ -#line 306 "yacc_sql.y" +#line 304 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1896 "yacc_sql.cpp" +#line 1902 "yacc_sql.cpp" break; case 27: /* sync_stmt: SYNC */ -#line 311 "yacc_sql.y" +#line 309 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1904 "yacc_sql.cpp" +#line 1910 "yacc_sql.cpp" break; case 28: /* begin_stmt: TRX_BEGIN */ -#line 317 "yacc_sql.y" +#line 315 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1912 "yacc_sql.cpp" +#line 1918 "yacc_sql.cpp" break; case 29: /* commit_stmt: TRX_COMMIT */ -#line 323 "yacc_sql.y" +#line 321 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1920 "yacc_sql.cpp" +#line 1926 "yacc_sql.cpp" break; case 30: /* rollback_stmt: TRX_ROLLBACK */ -#line 329 "yacc_sql.y" +#line 327 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1928 "yacc_sql.cpp" +#line 1934 "yacc_sql.cpp" break; case 31: /* drop_table_stmt: DROP TABLE ID */ -#line 335 "yacc_sql.y" +#line 333 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1938 "yacc_sql.cpp" +#line 1944 "yacc_sql.cpp" break; case 32: /* show_tables_stmt: SHOW TABLES */ -#line 342 "yacc_sql.y" +#line 340 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1946 "yacc_sql.cpp" +#line 1952 "yacc_sql.cpp" break; case 33: /* desc_table_stmt: DESC ID */ -#line 348 "yacc_sql.y" +#line 346 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1956 "yacc_sql.cpp" +#line 1962 "yacc_sql.cpp" break; case 34: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 357 "yacc_sql.y" +#line 355 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1967 "yacc_sql.cpp" +#line 1973 "yacc_sql.cpp" break; case 35: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 367 "yacc_sql.y" +#line 365 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -3951,48 +3986,48 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1983 "yacc_sql.cpp" +#line 1989 "yacc_sql.cpp" break; case 36: /* opt_unique: UNIQUE */ -#line 381 "yacc_sql.y" +#line 379 "yacc_sql.y" { (yyval.unique) = true; } -#line 1989 "yacc_sql.cpp" +#line 1995 "yacc_sql.cpp" break; case 37: /* opt_unique: %empty */ -#line 382 "yacc_sql.y" +#line 380 "yacc_sql.y" { (yyval.unique) = false; } -#line 1995 "yacc_sql.cpp" +#line 2001 "yacc_sql.cpp" break; case 38: /* attr_list: ID */ -#line 387 "yacc_sql.y" +#line 385 "yacc_sql.y" { (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 2005 "yacc_sql.cpp" +#line 2011 "yacc_sql.cpp" break; case 39: /* attr_list: ID COMMA attr_list */ -#line 393 "yacc_sql.y" +#line 391 "yacc_sql.y" { (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector (yyval.index_attr_list) ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2015 "yacc_sql.cpp" +#line 2021 "yacc_sql.cpp" break; case 40: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 402 "yacc_sql.y" +#line 400 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -4000,56 +4035,56 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2027 "yacc_sql.cpp" +#line 2033 "yacc_sql.cpp" break; case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ -#line 412 "yacc_sql.y" +#line 410 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node( (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2035 "yacc_sql.cpp" +#line 2041 "yacc_sql.cpp" break; case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ -#line 416 "yacc_sql.y" +#line 414 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node( (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2043 "yacc_sql.cpp" +#line 2049 "yacc_sql.cpp" break; case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 420 "yacc_sql.y" +#line 418 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node( (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2051 "yacc_sql.cpp" +#line 2057 "yacc_sql.cpp" break; case 44: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ -#line 424 "yacc_sql.y" +#line 422 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2059 "yacc_sql.cpp" +#line 2065 "yacc_sql.cpp" break; case 45: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ -#line 428 "yacc_sql.y" +#line 426 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2067 "yacc_sql.cpp" +#line 2073 "yacc_sql.cpp" break; case 46: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ -#line 435 "yacc_sql.y" +#line 433 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; @@ -4057,11 +4092,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } -#line 2079 "yacc_sql.cpp" +#line 2085 "yacc_sql.cpp" break; case 47: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ -#line 443 "yacc_sql.y" +#line 441 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; @@ -4070,29 +4105,29 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-5].string)); } -#line 2092 "yacc_sql.cpp" +#line 2098 "yacc_sql.cpp" break; case 48: /* drop_view_stmt: DROP VIEW ID */ -#line 455 "yacc_sql.y" +#line 453 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2102 "yacc_sql.cpp" +#line 2108 "yacc_sql.cpp" break; case 49: /* attr_def_list: %empty */ -#line 464 "yacc_sql.y" +#line 462 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2110 "yacc_sql.cpp" +#line 2116 "yacc_sql.cpp" break; case 50: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 468 "yacc_sql.y" +#line 466 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -4102,11 +4137,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2124 "yacc_sql.cpp" +#line 2130 "yacc_sql.cpp" break; case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 481 "yacc_sql.y" +#line 479 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->name = (yyvsp[-5].string); @@ -4124,11 +4159,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 2146 "yacc_sql.cpp" +#line 2152 "yacc_sql.cpp" break; case 52: /* attr_def: ID type nullable_constraint */ -#line 499 "yacc_sql.y" +#line 497 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -4154,91 +4189,91 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2176 "yacc_sql.cpp" +#line 2182 "yacc_sql.cpp" break; case 53: /* nullable_constraint: NOT NULL_T */ -#line 528 "yacc_sql.y" +#line 526 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2184 "yacc_sql.cpp" +#line 2190 "yacc_sql.cpp" break; case 54: /* nullable_constraint: NULLABLE */ -#line 532 "yacc_sql.y" +#line 530 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2192 "yacc_sql.cpp" +#line 2198 "yacc_sql.cpp" break; case 55: /* nullable_constraint: NULL_T */ -#line 536 "yacc_sql.y" +#line 534 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2200 "yacc_sql.cpp" +#line 2206 "yacc_sql.cpp" break; case 56: /* nullable_constraint: %empty */ -#line 540 "yacc_sql.y" +#line 538 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2208 "yacc_sql.cpp" +#line 2214 "yacc_sql.cpp" break; case 57: /* type: INT_T */ -#line 546 "yacc_sql.y" +#line 544 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2214 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; case 58: /* type: STRING_T */ -#line 547 "yacc_sql.y" +#line 545 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2220 "yacc_sql.cpp" +#line 2226 "yacc_sql.cpp" break; case 59: /* type: FLOAT_T */ -#line 548 "yacc_sql.y" +#line 546 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2226 "yacc_sql.cpp" +#line 2232 "yacc_sql.cpp" break; case 60: /* type: DATE_T */ -#line 549 "yacc_sql.y" +#line 547 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2232 "yacc_sql.cpp" +#line 2238 "yacc_sql.cpp" break; case 61: /* type: TEXT_T */ -#line 550 "yacc_sql.y" +#line 548 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2238 "yacc_sql.cpp" +#line 2244 "yacc_sql.cpp" break; case 62: /* type: VECTOR_T */ -#line 551 "yacc_sql.y" +#line 549 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::VECTORS); } -#line 2244 "yacc_sql.cpp" +#line 2250 "yacc_sql.cpp" break; case 63: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 556 "yacc_sql.y" +#line 554 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -4248,11 +4283,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2258 "yacc_sql.cpp" +#line 2264 "yacc_sql.cpp" break; case 64: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ -#line 566 "yacc_sql.y" +#line 564 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -4263,128 +4298,136 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 2273 "yacc_sql.cpp" +#line 2279 "yacc_sql.cpp" break; case 65: /* values_list: LBRACE value_list RBRACE */ -#line 580 "yacc_sql.y" +#line 578 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2283 "yacc_sql.cpp" +#line 2289 "yacc_sql.cpp" break; case 66: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 586 "yacc_sql.y" +#line 584 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2292 "yacc_sql.cpp" +#line 2298 "yacc_sql.cpp" break; case 67: /* value_list: value */ -#line 593 "yacc_sql.y" +#line 591 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2302 "yacc_sql.cpp" +#line 2308 "yacc_sql.cpp" break; case 68: /* value_list: value_list COMMA value */ -#line 599 "yacc_sql.y" +#line 597 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2311 "yacc_sql.cpp" +#line 2317 "yacc_sql.cpp" break; case 69: /* value: nonnegative_value */ -#line 606 "yacc_sql.y" +#line 604 "yacc_sql.y" { (yyval.value) = (yyvsp[0].value); } -#line 2319 "yacc_sql.cpp" +#line 2325 "yacc_sql.cpp" break; case 70: /* value: '-' NUMBER */ -#line 609 "yacc_sql.y" +#line 607 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2328 "yacc_sql.cpp" +#line 2334 "yacc_sql.cpp" break; case 71: /* value: '-' FLOAT */ -#line 613 "yacc_sql.y" +#line 611 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2337 "yacc_sql.cpp" +#line 2343 "yacc_sql.cpp" break; case 72: /* nonnegative_value: NUMBER */ -#line 620 "yacc_sql.y" +#line 618 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2346 "yacc_sql.cpp" +#line 2352 "yacc_sql.cpp" break; case 73: /* nonnegative_value: FLOAT */ -#line 624 "yacc_sql.y" +#line 622 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2355 "yacc_sql.cpp" +#line 2361 "yacc_sql.cpp" break; case 74: /* nonnegative_value: SSS */ -#line 628 "yacc_sql.y" +#line 626 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2366 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; case 75: /* nonnegative_value: NULL_T */ -#line 634 "yacc_sql.y" +#line 632 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2374 "yacc_sql.cpp" +#line 2380 "yacc_sql.cpp" + break; + + case 76: /* nonnegative_value: LSBRACE value_list RSBRACE */ +#line 635 "yacc_sql.y" + { + (yyval.value) = new Value(ListValue(), *(yyvsp[-1].value_list)); + } +#line 2388 "yacc_sql.cpp" break; - case 76: /* storage_format: %empty */ -#line 641 "yacc_sql.y" + case 77: /* storage_format: %empty */ +#line 642 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2382 "yacc_sql.cpp" +#line 2396 "yacc_sql.cpp" break; - case 77: /* storage_format: STORAGE FORMAT EQ ID */ -#line 645 "yacc_sql.y" + case 78: /* storage_format: STORAGE FORMAT EQ ID */ +#line 646 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2390 "yacc_sql.cpp" +#line 2404 "yacc_sql.cpp" break; - case 78: /* delete_stmt: DELETE FROM ID where */ -#line 652 "yacc_sql.y" + case 79: /* delete_stmt: DELETE FROM ID where */ +#line 653 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -4393,11 +4436,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2403 "yacc_sql.cpp" +#line 2417 "yacc_sql.cpp" break; - case 79: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 664 "yacc_sql.y" + case 80: /* update_stmt: UPDATE ID SET set_clauses where */ +#line 665 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -4408,39 +4451,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2418 "yacc_sql.cpp" +#line 2432 "yacc_sql.cpp" break; - case 80: /* set_clauses: setClause */ -#line 678 "yacc_sql.y" + case 81: /* set_clauses: setClause */ +#line 679 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2427 "yacc_sql.cpp" +#line 2441 "yacc_sql.cpp" break; - case 81: /* set_clauses: set_clauses COMMA setClause */ -#line 683 "yacc_sql.y" + case 82: /* set_clauses: set_clauses COMMA setClause */ +#line 684 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2435 "yacc_sql.cpp" +#line 2449 "yacc_sql.cpp" break; - case 82: /* setClause: ID EQ expression */ -#line 690 "yacc_sql.y" + case 83: /* setClause: ID EQ expression */ +#line 691 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2446 "yacc_sql.cpp" +#line 2460 "yacc_sql.cpp" break; - case 83: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ -#line 700 "yacc_sql.y" + case 84: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ +#line 701 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4478,11 +4521,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].limited_info); } } -#line 2488 "yacc_sql.cpp" +#line 2502 "yacc_sql.cpp" break; - case 84: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 738 "yacc_sql.y" + case 85: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ +#line 739 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4497,7 +4540,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if ((yyvsp[-2].join_clauses) != nullptr) { for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); - ++it) { + ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -4514,39 +4557,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2522 "yacc_sql.cpp" +#line 2536 "yacc_sql.cpp" break; - case 85: /* calc_stmt: CALC expression_list */ -#line 771 "yacc_sql.y" + case 86: /* calc_stmt: CALC expression_list */ +#line 772 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2532 "yacc_sql.cpp" +#line 2546 "yacc_sql.cpp" break; - case 86: /* calc_stmt: SELECT expression_list */ -#line 777 "yacc_sql.y" + case 87: /* calc_stmt: SELECT expression_list */ +#line 778 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2542 "yacc_sql.cpp" +#line 2556 "yacc_sql.cpp" break; - case 87: /* expression_list: %empty */ -#line 785 "yacc_sql.y" + case 88: /* expression_list: %empty */ +#line 786 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2550 "yacc_sql.cpp" +#line 2564 "yacc_sql.cpp" break; - case 88: /* expression_list: expression alias */ -#line 789 "yacc_sql.y" + case 89: /* expression_list: expression alias */ +#line 790 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4555,11 +4598,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2563 "yacc_sql.cpp" +#line 2577 "yacc_sql.cpp" break; - case 89: /* expression_list: expression alias COMMA expression_list */ -#line 798 "yacc_sql.y" + case 90: /* expression_list: expression alias COMMA expression_list */ +#line 799 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4572,47 +4615,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2580 "yacc_sql.cpp" +#line 2594 "yacc_sql.cpp" break; - case 90: /* expression: expression '+' expression */ -#line 813 "yacc_sql.y" + case 91: /* expression: expression '+' expression */ +#line 814 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2588 "yacc_sql.cpp" +#line 2602 "yacc_sql.cpp" break; - case 91: /* expression: expression '-' expression */ -#line 816 "yacc_sql.y" + case 92: /* expression: expression '-' expression */ +#line 817 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2596 "yacc_sql.cpp" +#line 2610 "yacc_sql.cpp" break; - case 92: /* expression: expression '*' expression */ -#line 819 "yacc_sql.y" + case 93: /* expression: expression '*' expression */ +#line 820 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2604 "yacc_sql.cpp" +#line 2618 "yacc_sql.cpp" break; - case 93: /* expression: expression '/' expression */ -#line 822 "yacc_sql.y" + case 94: /* expression: expression '/' expression */ +#line 823 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2612 "yacc_sql.cpp" +#line 2626 "yacc_sql.cpp" break; - case 94: /* expression: LBRACE expression_list RBRACE */ -#line 825 "yacc_sql.y" + case 95: /* expression: LBRACE expression_list RBRACE */ +#line 826 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -4621,123 +4664,123 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2625 "yacc_sql.cpp" +#line 2639 "yacc_sql.cpp" break; - case 95: /* expression: '-' expression */ -#line 833 "yacc_sql.y" + case 96: /* expression: '-' expression */ +#line 834 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2633 "yacc_sql.cpp" +#line 2647 "yacc_sql.cpp" break; - case 96: /* expression: nonnegative_value */ -#line 836 "yacc_sql.y" + case 97: /* expression: nonnegative_value */ +#line 837 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2643 "yacc_sql.cpp" +#line 2657 "yacc_sql.cpp" break; - case 97: /* expression: rel_attr */ -#line 841 "yacc_sql.y" + case 98: /* expression: rel_attr */ +#line 842 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2654 "yacc_sql.cpp" +#line 2668 "yacc_sql.cpp" break; - case 98: /* expression: '*' */ -#line 847 "yacc_sql.y" + case 99: /* expression: '*' */ +#line 848 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2662 "yacc_sql.cpp" +#line 2676 "yacc_sql.cpp" break; - case 99: /* expression: ID DOT '*' */ -#line 850 "yacc_sql.y" + case 100: /* expression: ID DOT '*' */ +#line 851 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2670 "yacc_sql.cpp" +#line 2684 "yacc_sql.cpp" break; - case 100: /* expression: func_expr */ -#line 853 "yacc_sql.y" + case 101: /* expression: func_expr */ +#line 854 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2678 "yacc_sql.cpp" +#line 2692 "yacc_sql.cpp" break; - case 101: /* expression: sub_query_expr */ -#line 856 "yacc_sql.y" + case 102: /* expression: sub_query_expr */ +#line 857 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2686 "yacc_sql.cpp" +#line 2700 "yacc_sql.cpp" break; - case 102: /* alias: %empty */ -#line 863 "yacc_sql.y" + case 103: /* alias: %empty */ +#line 864 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2694 "yacc_sql.cpp" +#line 2708 "yacc_sql.cpp" break; - case 103: /* alias: ID */ -#line 866 "yacc_sql.y" + case 104: /* alias: ID */ +#line 867 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2702 "yacc_sql.cpp" +#line 2716 "yacc_sql.cpp" break; - case 104: /* alias: AS ID */ -#line 869 "yacc_sql.y" + case 105: /* alias: AS ID */ +#line 870 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2710 "yacc_sql.cpp" +#line 2724 "yacc_sql.cpp" break; - case 105: /* func_expr: ID LBRACE expression_list RBRACE */ -#line 875 "yacc_sql.y" + case 106: /* func_expr: ID LBRACE expression_list RBRACE */ +#line 876 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2718 "yacc_sql.cpp" +#line 2732 "yacc_sql.cpp" break; - case 106: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 882 "yacc_sql.y" + case 107: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 883 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2726 "yacc_sql.cpp" +#line 2740 "yacc_sql.cpp" break; - case 107: /* rel_attr: ID */ -#line 888 "yacc_sql.y" + case 108: /* rel_attr: ID */ +#line 889 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2736 "yacc_sql.cpp" +#line 2750 "yacc_sql.cpp" break; - case 108: /* rel_attr: ID DOT ID */ -#line 893 "yacc_sql.y" + case 109: /* rel_attr: ID DOT ID */ +#line 894 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -4745,19 +4788,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2748 "yacc_sql.cpp" +#line 2762 "yacc_sql.cpp" break; - case 109: /* relation: ID */ -#line 903 "yacc_sql.y" + case 110: /* relation: ID */ +#line 904 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2756 "yacc_sql.cpp" +#line 2770 "yacc_sql.cpp" break; - case 110: /* rel_list: relation alias */ -#line 909 "yacc_sql.y" + case 111: /* rel_list: relation alias */ +#line 910 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if (nullptr != (yyvsp[0].string)) { @@ -4768,11 +4811,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2771 "yacc_sql.cpp" +#line 2785 "yacc_sql.cpp" break; - case 111: /* rel_list: relation alias COMMA rel_list */ -#line 919 "yacc_sql.y" + case 112: /* rel_list: relation alias COMMA rel_list */ +#line 920 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -4788,22 +4831,22 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-3].string)); } -#line 2790 "yacc_sql.cpp" +#line 2804 "yacc_sql.cpp" break; - case 112: /* join_clauses: relation ON condition */ -#line 937 "yacc_sql.y" + case 113: /* join_clauses: relation ON condition */ +#line 938 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2801 "yacc_sql.cpp" +#line 2815 "yacc_sql.cpp" break; - case 113: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 944 "yacc_sql.y" + case 114: /* join_clauses: relation ON condition INNER JOIN join_clauses */ +#line 945 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -4812,299 +4855,299 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2813 "yacc_sql.cpp" +#line 2827 "yacc_sql.cpp" break; - case 114: /* where: %empty */ -#line 955 "yacc_sql.y" + case 115: /* where: %empty */ +#line 956 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2821 "yacc_sql.cpp" +#line 2835 "yacc_sql.cpp" break; - case 115: /* where: WHERE condition */ -#line 958 "yacc_sql.y" + case 116: /* where: WHERE condition */ +#line 959 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2829 "yacc_sql.cpp" +#line 2843 "yacc_sql.cpp" break; - case 116: /* condition: expression comp_op expression */ -#line 965 "yacc_sql.y" + case 117: /* condition: expression comp_op expression */ +#line 966 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2837 "yacc_sql.cpp" +#line 2851 "yacc_sql.cpp" break; - case 117: /* condition: comp_op expression */ -#line 969 "yacc_sql.y" + case 118: /* condition: comp_op expression */ +#line 970 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); } -#line 2848 "yacc_sql.cpp" +#line 2862 "yacc_sql.cpp" break; - case 118: /* condition: condition AND condition */ -#line 976 "yacc_sql.y" + case 119: /* condition: condition AND condition */ +#line 977 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2856 "yacc_sql.cpp" +#line 2870 "yacc_sql.cpp" break; - case 119: /* condition: condition OR condition */ -#line 980 "yacc_sql.y" + case 120: /* condition: condition OR condition */ +#line 981 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2864 "yacc_sql.cpp" +#line 2878 "yacc_sql.cpp" break; - case 120: /* comp_op: EQ */ -#line 986 "yacc_sql.y" + case 121: /* comp_op: EQ */ +#line 987 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2870 "yacc_sql.cpp" +#line 2884 "yacc_sql.cpp" break; - case 121: /* comp_op: LT */ -#line 987 "yacc_sql.y" + case 122: /* comp_op: LT */ +#line 988 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2876 "yacc_sql.cpp" +#line 2890 "yacc_sql.cpp" break; - case 122: /* comp_op: GT */ -#line 988 "yacc_sql.y" + case 123: /* comp_op: GT */ +#line 989 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2882 "yacc_sql.cpp" +#line 2896 "yacc_sql.cpp" break; - case 123: /* comp_op: LE */ -#line 989 "yacc_sql.y" + case 124: /* comp_op: LE */ +#line 990 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2888 "yacc_sql.cpp" +#line 2902 "yacc_sql.cpp" break; - case 124: /* comp_op: GE */ -#line 990 "yacc_sql.y" + case 125: /* comp_op: GE */ +#line 991 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2894 "yacc_sql.cpp" +#line 2908 "yacc_sql.cpp" break; - case 125: /* comp_op: NE */ -#line 991 "yacc_sql.y" + case 126: /* comp_op: NE */ +#line 992 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2900 "yacc_sql.cpp" +#line 2914 "yacc_sql.cpp" break; - case 126: /* comp_op: IS */ -#line 992 "yacc_sql.y" + case 127: /* comp_op: IS */ +#line 993 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2906 "yacc_sql.cpp" +#line 2920 "yacc_sql.cpp" break; - case 127: /* comp_op: IS NOT */ -#line 993 "yacc_sql.y" + case 128: /* comp_op: IS NOT */ +#line 994 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2912 "yacc_sql.cpp" +#line 2926 "yacc_sql.cpp" break; - case 128: /* comp_op: LIKE */ -#line 994 "yacc_sql.y" + case 129: /* comp_op: LIKE */ +#line 995 "yacc_sql.y" { (yyval.comp) = LIKE_OP; } -#line 2918 "yacc_sql.cpp" +#line 2932 "yacc_sql.cpp" break; - case 129: /* comp_op: NOT LIKE */ -#line 995 "yacc_sql.y" + case 130: /* comp_op: NOT LIKE */ +#line 996 "yacc_sql.y" { (yyval.comp) = NOT_LIKE_OP; } -#line 2924 "yacc_sql.cpp" +#line 2938 "yacc_sql.cpp" break; - case 130: /* comp_op: IN */ -#line 996 "yacc_sql.y" + case 131: /* comp_op: IN */ +#line 997 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2930 "yacc_sql.cpp" +#line 2944 "yacc_sql.cpp" break; - case 131: /* comp_op: NOT IN */ -#line 997 "yacc_sql.y" + case 132: /* comp_op: NOT IN */ +#line 998 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2936 "yacc_sql.cpp" +#line 2950 "yacc_sql.cpp" break; - case 132: /* comp_op: EXISTS */ -#line 998 "yacc_sql.y" + case 133: /* comp_op: EXISTS */ +#line 999 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2942 "yacc_sql.cpp" +#line 2956 "yacc_sql.cpp" break; - case 133: /* comp_op: NOT EXISTS */ -#line 999 "yacc_sql.y" + case 134: /* comp_op: NOT EXISTS */ +#line 1000 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2948 "yacc_sql.cpp" +#line 2962 "yacc_sql.cpp" break; - case 134: /* opt_order_by: %empty */ -#line 1004 "yacc_sql.y" + case 135: /* opt_order_by: %empty */ +#line 1005 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2956 "yacc_sql.cpp" +#line 2970 "yacc_sql.cpp" break; - case 135: /* opt_order_by: ORDER BY sort_list */ -#line 1008 "yacc_sql.y" + case 136: /* opt_order_by: ORDER BY sort_list */ +#line 1009 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } -#line 2965 "yacc_sql.cpp" +#line 2979 "yacc_sql.cpp" break; - case 136: /* sort_list: sort_unit */ -#line 1016 "yacc_sql.y" + case 137: /* sort_list: sort_unit */ +#line 1017 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2974 "yacc_sql.cpp" +#line 2988 "yacc_sql.cpp" break; - case 137: /* sort_list: sort_unit COMMA sort_list */ -#line 1021 "yacc_sql.y" + case 138: /* sort_list: sort_unit COMMA sort_list */ +#line 1022 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2983 "yacc_sql.cpp" +#line 2997 "yacc_sql.cpp" break; - case 138: /* sort_unit: expression */ -#line 1029 "yacc_sql.y" + case 139: /* sort_unit: expression */ +#line 1030 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2993 "yacc_sql.cpp" +#line 3007 "yacc_sql.cpp" break; - case 139: /* sort_unit: expression DESC */ -#line 1035 "yacc_sql.y" + case 140: /* sort_unit: expression DESC */ +#line 1036 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 3003 "yacc_sql.cpp" +#line 3017 "yacc_sql.cpp" break; - case 140: /* sort_unit: expression ASC */ -#line 1041 "yacc_sql.y" + case 141: /* sort_unit: expression ASC */ +#line 1042 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3013 "yacc_sql.cpp" +#line 3027 "yacc_sql.cpp" break; - case 141: /* group_by: %empty */ -#line 1050 "yacc_sql.y" + case 142: /* group_by: %empty */ +#line 1051 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 3021 "yacc_sql.cpp" +#line 3035 "yacc_sql.cpp" break; - case 142: /* group_by: GROUP BY expression_list */ -#line 1054 "yacc_sql.y" + case 143: /* group_by: GROUP BY expression_list */ +#line 1055 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 3029 "yacc_sql.cpp" +#line 3043 "yacc_sql.cpp" break; - case 143: /* opt_having: %empty */ -#line 1061 "yacc_sql.y" + case 144: /* opt_having: %empty */ +#line 1062 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 3037 "yacc_sql.cpp" +#line 3051 "yacc_sql.cpp" break; - case 144: /* opt_having: HAVING condition */ -#line 1065 "yacc_sql.y" + case 145: /* opt_having: HAVING condition */ +#line 1066 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3045 "yacc_sql.cpp" +#line 3059 "yacc_sql.cpp" break; - case 145: /* opt_limit: %empty */ -#line 1072 "yacc_sql.y" + case 146: /* opt_limit: %empty */ +#line 1073 "yacc_sql.y" { (yyval.limited_info) = nullptr; } -#line 3053 "yacc_sql.cpp" +#line 3067 "yacc_sql.cpp" break; - case 146: /* opt_limit: LIMIT NUMBER */ -#line 1076 "yacc_sql.y" + case 147: /* opt_limit: LIMIT NUMBER */ +#line 1077 "yacc_sql.y" { (yyval.limited_info) = new LimitSqlNode(); (yyval.limited_info)->number = (yyvsp[0].number); } -#line 3062 "yacc_sql.cpp" +#line 3076 "yacc_sql.cpp" break; - case 147: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1097 "yacc_sql.y" + case 148: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1085 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3071 "yacc_sql.cpp" +#line 3085 "yacc_sql.cpp" break; - case 148: /* set_variable_stmt: SET ID EQ value */ -#line 1105 "yacc_sql.y" + case 149: /* set_variable_stmt: SET ID EQ value */ +#line 1093 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -5112,10 +5155,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3083 "yacc_sql.cpp" +#line 3097 "yacc_sql.cpp" break; -#line 3087 "yacc_sql.cpp" +#line 3101 "yacc_sql.cpp" default: break; } @@ -5314,7 +5357,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) return yyresult; } -#line 1117 "yacc_sql.y" +#line 1105 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index c7777d9b..a255b6d9 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -36,10 +36,10 @@ private implementation details that can be changed or removed. */ #ifndef YY_YY_YACC_SQL_HPP_INCLUDED -#define YY_YY_YACC_SQL_HPP_INCLUDED +# define YY_YY_YACC_SQL_HPP_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -#define YYDEBUG 0 +# define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; @@ -47,128 +47,130 @@ extern int yydebug; /* Token kinds. */ #ifndef YYTOKENTYPE -#define YYTOKENTYPE -enum yytokentype -{ - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - HAVING = 266, /* HAVING */ - ORDER = 267, /* ORDER */ - TABLE = 268, /* TABLE */ - TABLES = 269, /* TABLES */ - INDEX = 270, /* INDEX */ - CALC = 271, /* CALC */ - SELECT = 272, /* SELECT */ - DESC = 273, /* DESC */ - SHOW = 274, /* SHOW */ - SYNC = 275, /* SYNC */ - INSERT = 276, /* INSERT */ - DELETE = 277, /* DELETE */ - UPDATE = 278, /* UPDATE */ - LBRACE = 279, /* LBRACE */ - RBRACE = 280, /* RBRACE */ - COMMA = 281, /* COMMA */ - TRX_BEGIN = 282, /* TRX_BEGIN */ - TRX_COMMIT = 283, /* TRX_COMMIT */ - TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ - INT_T = 285, /* INT_T */ - IN = 286, /* IN */ - STRING_T = 287, /* STRING_T */ - FLOAT_T = 288, /* FLOAT_T */ - DATE_T = 289, /* DATE_T */ - TEXT_T = 290, /* TEXT_T */ - VECTOR_T = 291, /* VECTOR_T */ - NOT = 292, /* NOT */ - UNIQUE = 293, /* UNIQUE */ - NULL_T = 294, /* NULL_T */ - LIMIT = 295, /* LIMIT */ - NULLABLE = 296, /* NULLABLE */ - HELP = 297, /* HELP */ - EXIT = 298, /* EXIT */ - DOT = 299, /* DOT */ - INTO = 300, /* INTO */ - VALUES = 301, /* VALUES */ - FROM = 302, /* FROM */ - WHERE = 303, /* WHERE */ - AND = 304, /* AND */ - OR = 305, /* OR */ - SET = 306, /* SET */ - ON = 307, /* ON */ - LOAD = 308, /* LOAD */ - INFILE = 309, /* INFILE */ - EXPLAIN = 310, /* EXPLAIN */ - STORAGE = 311, /* STORAGE */ - FORMAT = 312, /* FORMAT */ - INNER = 313, /* INNER */ - JOIN = 314, /* JOIN */ - VIEW = 315, /* VIEW */ - EQ = 316, /* EQ */ - LT = 317, /* LT */ - GT = 318, /* GT */ - LE = 319, /* LE */ - GE = 320, /* GE */ - NE = 321, /* NE */ - LIKE = 322, /* LIKE */ - IS = 323, /* IS */ - NUMBER = 324, /* NUMBER */ - FLOAT = 325, /* FLOAT */ - ID = 326, /* ID */ - SSS = 327, /* SSS */ - UMINUS = 328 /* UMINUS */ -}; -typedef enum yytokentype yytoken_kind_t; +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + HAVING = 266, /* HAVING */ + ORDER = 267, /* ORDER */ + TABLE = 268, /* TABLE */ + TABLES = 269, /* TABLES */ + INDEX = 270, /* INDEX */ + CALC = 271, /* CALC */ + SELECT = 272, /* SELECT */ + DESC = 273, /* DESC */ + SHOW = 274, /* SHOW */ + SYNC = 275, /* SYNC */ + INSERT = 276, /* INSERT */ + DELETE = 277, /* DELETE */ + UPDATE = 278, /* UPDATE */ + LBRACE = 279, /* LBRACE */ + RBRACE = 280, /* RBRACE */ + LSBRACE = 281, /* LSBRACE */ + RSBRACE = 282, /* RSBRACE */ + COMMA = 283, /* COMMA */ + TRX_BEGIN = 284, /* TRX_BEGIN */ + TRX_COMMIT = 285, /* TRX_COMMIT */ + TRX_ROLLBACK = 286, /* TRX_ROLLBACK */ + INT_T = 287, /* INT_T */ + IN = 288, /* IN */ + STRING_T = 289, /* STRING_T */ + FLOAT_T = 290, /* FLOAT_T */ + DATE_T = 291, /* DATE_T */ + TEXT_T = 292, /* TEXT_T */ + VECTOR_T = 293, /* VECTOR_T */ + NOT = 294, /* NOT */ + UNIQUE = 295, /* UNIQUE */ + NULL_T = 296, /* NULL_T */ + LIMIT = 297, /* LIMIT */ + NULLABLE = 298, /* NULLABLE */ + HELP = 299, /* HELP */ + EXIT = 300, /* EXIT */ + DOT = 301, /* DOT */ + INTO = 302, /* INTO */ + VALUES = 303, /* VALUES */ + FROM = 304, /* FROM */ + WHERE = 305, /* WHERE */ + AND = 306, /* AND */ + OR = 307, /* OR */ + SET = 308, /* SET */ + ON = 309, /* ON */ + INFILE = 310, /* INFILE */ + EXPLAIN = 311, /* EXPLAIN */ + STORAGE = 312, /* STORAGE */ + FORMAT = 313, /* FORMAT */ + INNER = 314, /* INNER */ + JOIN = 315, /* JOIN */ + VIEW = 316, /* VIEW */ + EQ = 317, /* EQ */ + LT = 318, /* LT */ + GT = 319, /* GT */ + LE = 320, /* LE */ + GE = 321, /* GE */ + NE = 322, /* NE */ + LIKE = 323, /* LIKE */ + IS = 324, /* IS */ + NUMBER = 325, /* NUMBER */ + FLOAT = 326, /* FLOAT */ + ID = 327, /* ID */ + SSS = 328, /* SSS */ + UMINUS = 329 /* UMINUS */ + }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ -#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 166 "yacc_sql.y" - ParsedSqlNode *sql_node; - Value *value; - enum CompOp comp; - RelAttrSqlNode *rel_attr; - std::vector *attr_infos; - AttrInfoSqlNode *attr_info; - Expression *expression; - std::vector> *expression_list; - std::vector *value_list; - std::vector> *values_list; - SetClauseSqlNode *set_clause; - std::vector *set_clauses; - JoinSqlNode *join_clauses; - std::vector *rel_attr_list; - std::vector *relation_list; - OrderBySqlNode *orderby_unit; - std::vector *orderby_list; - LimitSqlNode *limited_info; - char *string; - int number; - float floats; - bool nullable_info; - std::vector *index_attr_list; - bool unique; - -#line 164 "yacc_sql.hpp" + ParsedSqlNode * sql_node; + Value * value; + enum CompOp comp; + RelAttrSqlNode * rel_attr; + std::vector * attr_infos; + AttrInfoSqlNode * attr_info; + Expression * expression; + std::vector> * expression_list; + std::vector * value_list; + std::vector> * values_list; + SetClauseSqlNode * set_clause; + std::vector * set_clauses; + JoinSqlNode * join_clauses; + std::vector * rel_attr_list; + std::vector * relation_list; + OrderBySqlNode * orderby_unit; + std::vector * orderby_list; + LimitSqlNode * limited_info; + char * string; + int number; + float floats; + bool nullable_info; + std::vector * index_attr_list; + bool unique; + +#line 165 "yacc_sql.hpp" + }; typedef union YYSTYPE YYSTYPE; -#define YYSTYPE_IS_TRIVIAL 1 -#define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ -#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { @@ -177,10 +179,14 @@ struct YYLTYPE int last_line; int last_column; }; -#define YYLTYPE_IS_DECLARED 1 -#define YYLTYPE_IS_TRIVIAL 1 +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 #endif -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner); + + + +int yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner); + #endif /* !YY_YY_YACC_SQL_HPP_INCLUDED */ diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 8e043f76..7d2f26c6 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -117,6 +117,8 @@ ParsedSqlNode *create_table_sql_node(char *table_name, UPDATE LBRACE RBRACE + LSBRACE + RSBRACE COMMA TRX_BEGIN TRX_COMMIT @@ -630,6 +632,9 @@ nonnegative_value: | NULL_T { $$ = new Value(NullValue()); } + | LSBRACE value_list RSBRACE { + $$ = new Value(ListValue(), *$2); + } ; storage_format: diff --git a/src/observer/storage/buffer/double_write_buffer.cpp b/src/observer/storage/buffer/double_write_buffer.cpp index f1120455..73447382 100644 --- a/src/observer/storage/buffer/double_write_buffer.cpp +++ b/src/observer/storage/buffer/double_write_buffer.cpp @@ -32,9 +32,9 @@ struct DoubleWritePage public: DoubleWritePageKey key; - int32_t page_index = -1; /// 页面在double write buffer文件中的页索引 - bool valid = true; /// 表示页面是否有效,在页面被删除时,需要同时标记磁盘上的值。 - Page page; + int32_t page_index = -1; /// 页面在double write buffer文件中的页索引 + bool valid = true; /// 表示页面是否有效,在页面被删除时,需要同时标记磁盘上的值。 + Page page; static const int32_t SIZE; }; diff --git a/src/observer/storage/clog/log_buffer.h b/src/observer/storage/clog/log_buffer.h index 77cfe575..3bda71eb 100644 --- a/src/observer/storage/clog/log_buffer.h +++ b/src/observer/storage/clog/log_buffer.h @@ -68,7 +68,7 @@ class LogEntryBuffer LSN flushed_lsn() const { return flushed_lsn_.load(); } private: - mutex mutex_; /// 当前数据结构一定会在多线程中访问,所以强制使用有效的锁,而不是有条件生效的common::Mutex + mutex mutex_; /// 当前数据结构一定会在多线程中访问,所以强制使用有效的锁,而不是有条件生效的common::Mutex deque entries_; /// 日志缓冲区 atomic bytes_; /// 当前缓冲区中的日志数据大小 diff --git a/src/observer/storage/record/record.h b/src/observer/storage/record/record.h index 705bfeef..fb557e87 100644 --- a/src/observer/storage/record/record.h +++ b/src/observer/storage/record/record.h @@ -309,7 +309,7 @@ class Record const std::vector> &base_rids() const { return base_rids_; } private: - RID rid_; // 存储基表的记录位置 + RID rid_; // 存储基表的记录位置 std::vector> base_rids_; // 用于视图存储当前记录由哪些基表的哪些记录组成 char *data_ = nullptr; diff --git a/src/observer/storage/record/record_manager.h b/src/observer/storage/record/record_manager.h index 8228464a..a7bae40c 100644 --- a/src/observer/storage/record/record_manager.h +++ b/src/observer/storage/record/record_manager.h @@ -262,11 +262,11 @@ class RecordPageHandler protected: DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前操作的buffer pool(文件) RecordLogHandler log_handler_; ///< 当前操作的日志处理器 - Frame *frame_ = nullptr; ///< 当前操作页面关联的frame(frame的更多概念可以参考buffer pool和frame) - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 当前的操作是否都是只读的 - PageHeader *page_header_ = nullptr; ///< 当前页面上页面头 - char *bitmap_ = nullptr; ///< 当前页面上record分配状态信息bitmap内存起始位置 - StorageFormat storage_format_; + Frame *frame_ = nullptr; ///< 当前操作页面关联的frame(frame的更多概念可以参考buffer pool和frame) + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 当前的操作是否都是只读的 + PageHeader *page_header_ = nullptr; ///< 当前页面上页面头 + char *bitmap_ = nullptr; ///< 当前页面上record分配状态信息bitmap内存起始位置 + StorageFormat storage_format_; protected: friend class RecordPageIterator; @@ -424,7 +424,7 @@ class RecordFileHandler DiskBufferPool *disk_buffer_pool_ = nullptr; LogHandler *log_handler_ = nullptr; ///< 记录日志的处理器 unordered_set free_pages_; ///< 没有填充满的页面集合 - common::Mutex lock_; ///< 当编译时增加-DCONCURRENCY=ON 选项时,才会真正的支持并发 + common::Mutex lock_; ///< 当编译时增加-DCONCURRENCY=ON 选项时,才会真正的支持并发 StorageFormat storage_format_; TableMeta *table_meta_; }; @@ -484,7 +484,7 @@ class RecordFileScanner DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前访问的文件 Trx *trx_ = nullptr; ///< 当前是哪个事务在遍历 LogHandler *log_handler_ = nullptr; - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 BufferPoolIterator bp_iterator_; ///< 遍历buffer pool的所有页面 ConditionFilter *condition_filter_ = nullptr; ///< 过滤record @@ -522,7 +522,7 @@ class ChunkFileScanner DiskBufferPool *disk_buffer_pool_ = nullptr; ///< 当前访问的文件 LogHandler *log_handler_ = nullptr; - ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 + ReadWriteMode rw_mode_ = ReadWriteMode::READ_WRITE; ///< 遍历出来的数据,是否可能对它做修改 BufferPoolIterator bp_iterator_; ///< 遍历buffer pool的所有页面 RecordPageHandler *record_page_handler_ = nullptr; ///< 处理文件某页面的记录 diff --git a/src/observer/storage/table/table_meta.h b/src/observer/storage/table/table_meta.h index f542457a..761456b9 100644 --- a/src/observer/storage/table/table_meta.h +++ b/src/observer/storage/table/table_meta.h @@ -84,7 +84,7 @@ class TableMeta : public common::Serializable protected: int32_t table_id_ = -1; TableType table_type_ = TableType::Unknown; - bool mutable_ = true; // 当前仅对视图可用,是否是只读视图,即包括聚合函数或 groupby having 语句 + bool mutable_ = true; // 当前仅对视图可用,是否是只读视图,即包括聚合函数或 groupby having 语句 std::string name_; std::vector trx_fields_; diff --git a/src/observer/storage/table/view.h b/src/observer/storage/table/view.h index 64f65482..dbc8a625 100644 --- a/src/observer/storage/table/view.h +++ b/src/observer/storage/table/view.h @@ -62,8 +62,8 @@ class View : public BaseTable bool has_join() { return tables_.size() > 1; } private: - std::string select_sql_; // 持久化,运行时也只能存解析后的 sql,因为涉及独占资源的移动 - std::vector tables_; // 可能含视图和基表,所以要在所有表都加载好再处理 - // 视图的 field 对应 哪个物理表和对应的 field idx + std::string select_sql_; // 持久化,运行时也只能存解析后的 sql,因为涉及独占资源的移动 + std::vector tables_; // 可能含视图和基表,所以要在所有表都加载好再处理 + // 视图的 field 对应 哪个物理表和对应的 field idx std::vector> field_index_; // 持久化 }; From 84e8123f3f293b72ea230efdd09fc92808f505a9 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 20:50:29 +0800 Subject: [PATCH 279/308] =?UTF-8?q?=E5=AE=8C=E6=88=90list=E8=AF=AD?= =?UTF-8?q?=E6=B3=95=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/data_type.cpp | 2 + src/observer/common/type/list_type.cpp | 18 + src/observer/common/type/list_type.h | 7 +- src/observer/common/value.h | 17 +- src/observer/sql/parser/lex_sql.cpp | 5619 ++++++++--------------- src/observer/sql/parser/lex_sql.h | 244 +- src/observer/sql/parser/yacc_sql.cpp | 5685 ++++++++---------------- src/observer/sql/parser/yacc_sql.hpp | 65 +- src/observer/sql/parser/yacc_sql.y | 4 + 9 files changed, 3814 insertions(+), 7847 deletions(-) diff --git a/src/observer/common/type/data_type.cpp b/src/observer/common/type/data_type.cpp index 5e832793..5651e2fd 100644 --- a/src/observer/common/type/data_type.cpp +++ b/src/observer/common/type/data_type.cpp @@ -15,6 +15,7 @@ See the Mulan PSL v2 for more details. */ #include "common/type/date_type.h" #include "common/type/null_type.h" #include "common/type/vector_type.h" +#include "common/type/list_type.h" array, static_cast(AttrType::MAXTYPE)> DataType::type_instances_ = { make_unique(AttrType::UNDEFINED), @@ -26,4 +27,5 @@ array, static_cast(AttrType::MAXTYPE)> DataType::type_ make_unique(), make_unique(), make_unique(), + make_unique(), }; diff --git a/src/observer/common/type/list_type.cpp b/src/observer/common/type/list_type.cpp index 4e76103b..0c7a5117 100644 --- a/src/observer/common/type/list_type.cpp +++ b/src/observer/common/type/list_type.cpp @@ -13,3 +13,21 @@ See the Mulan PSL v2 for more details. */ // #include "list_type.h" +#include "cassert" +#include "common/value.h" + +RC ListType::to_string(const Value &val, string &result) const +{ + assert(val.attr_type() == AttrType::LISTS); + auto &list = val.get_list(); + result = "["; + auto size = list.size(); + for (int i = 0; i < size; i++) { + result += list[i].to_string(); + if (i < size - 1) { + result += ", "; + } + } + result += "]"; + return RC::SUCCESS; +} diff --git a/src/observer/common/type/list_type.h b/src/observer/common/type/list_type.h index 8d932c1c..9d1cec91 100644 --- a/src/observer/common/type/list_type.h +++ b/src/observer/common/type/list_type.h @@ -17,4 +17,9 @@ See the Mulan PSL v2 for more details. */ #include "common/type/data_type.h" class ListType : public DataType -{}; +{ +public: + ListType() : DataType(AttrType::LISTS) {}; + + RC to_string(const Value &val, string &result) const override; +}; diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 13977897..a9b4cbed 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -128,14 +128,15 @@ class Value final * 获取对应的值 * 如果当前的类型与期望获取的类型不符,就会执行转换操作 */ - int get_int() const; - float get_float() const; - string get_string() const; - bool get_boolean() const; - int get_date() const; - int get_vector_length() const; - bool is_null() const { return is_null_; } - inline bool is_str() const { return attr_type_ == AttrType::CHARS; } + int get_int() const; + float get_float() const; + string get_string() const; + bool get_boolean() const; + int get_date() const; + int get_vector_length() const; + std::vector &get_list() const { return *value_.list_value_; } + bool is_null() const { return is_null_; } + inline bool is_str() const { return attr_type_ == AttrType::CHARS; } static int implicit_cast_cost(AttrType from, AttrType to) { diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index fb366e7b..658f415f 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -8,21 +8,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 25 "lex_sql.cpp" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -75,62 +77,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -154,12 +156,12 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -187,7 +189,7 @@ typedef void *yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin, yyscanner) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -205,7 +207,7 @@ typedef void *yyscan_t; /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -220,85 +222,88 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -307,55 +312,59 @@ struct yy_buffer_state * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -static void yyensure_buffer_stack(yyscan_t yyscanner); -static void yy_load_buffer_state(yyscan_t yyscanner); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -363,2528 +372,328 @@ typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state(yyscan_t yyscanner); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); -static int yy_get_next_buffer(yyscan_t yyscanner); -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t)(yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 81 #define YY_END_OF_BUFFER 82 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info -{ - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[236] = {0, - 0, - 0, - 0, - 0, - 82, - 80, - 1, - 2, - 80, - 80, - 80, - 58, - 59, - 76, - 74, - 62, - 75, - 6, - 77, - 3, - 5, - 67, - 63, - 69, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 60, - 61, - 81, - 66, - 0, - 78, - 0, - 79, - 0, - 3, - 64, - 65, - 68, - 73, - 73, - 73, - 49, - 73, - 48, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 51, - 71, - 73, - 73, - 73, - 73, - 15, - 23, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 4, - 22, - - 50, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 33, - 73, - 73, - 73, - 70, - 73, - 73, - 73, - 73, - 29, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 73, - 19, - 34, - 73, - 73, - 36, - 73, - 9, - 11, - 73, - 7, - 73, - 73, - 73, - 20, - 73, - 73, - 8, - 73, - 73, - 73, - 73, - 25, - 56, - 72, - 73, - 40, - 73, - 73, - 73, - 16, - 73, - 17, - 73, - 37, - 73, - 73, - 73, - 73, - 57, - 73, - 30, - 73, - 73, - 73, - 73, - 73, - 35, - 73, - 44, - 73, - 14, - 73, - 55, - 73, - 45, - 73, - - 47, - 73, - 73, - 73, - 12, - 73, - 73, - 73, - 73, - 21, - 31, - 10, - 27, - 52, - 73, - 54, - 46, - 42, - 24, - 73, - 73, - 18, - 73, - 13, - 39, - 28, - 26, - 38, - 43, - 73, - 73, - 53, - 41, - 32, - 0}; - -static const YY_CHAR yy_ec[256] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 3, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 4, - 5, - 1, - 1, - 1, - 1, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 15, - 1, - 16, - 17, - 18, - 19, - 1, - 1, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 1, - 47, - 1, - 45, - 1, - 48, - 49, - 50, - 51, - - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 45, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1}; - -static const YY_CHAR yy_meta[73] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2}; - -static const flex_int16_t yy_base[241] = {0, - 0, - 0, - 0, - 0, - 638, - 639, - 639, - 639, - 619, - 631, - 629, - 639, - 639, - 639, - 639, - 639, - 639, - 639, - 639, - 60, - 639, - 58, - 639, - 616, - 59, - 63, - 64, - 65, - 66, - 90, - 67, - 116, - 73, - 80, - 618, - 88, - 107, - 113, - 123, - 138, - 136, - 128, - 152, - 118, - 639, - 639, - 639, - 639, - 627, - 639, - 625, - 639, - 615, - 81, - 639, - 639, - 639, - 0, - 614, - 143, - 68, - 133, - 613, - 139, - 166, - 164, - 168, - 156, - 184, - 182, - 191, - 187, - 188, - 194, - 196, - 186, - 198, - 244, - 612, - 217, - 203, - 197, - 231, - 604, - 219, - 237, - 245, - 251, - 257, - 256, - 216, - 236, - 259, - 263, - 277, - 266, - 278, - 279, - 603, - 602, - - 601, - 294, - 284, - 283, - 286, - 306, - 308, - 309, - 313, - 310, - 314, - 312, - 322, - 323, - 324, - 325, - 329, - 332, - 334, - 336, - 344, - 351, - 354, - 357, - 363, - 361, - 600, - 367, - 376, - 379, - 382, - 599, - 359, - 362, - 387, - 389, - 392, - 396, - 393, - 390, - 397, - 404, - 406, - 407, - 598, - 596, - 424, - 408, - 595, - 410, - 594, - 592, - 418, - 590, - 430, - 427, - 436, - 585, - 409, - 420, - 584, - 439, - 448, - 446, - 450, - 583, - 582, - 581, - 447, - 473, - 452, - 455, - 475, - 579, - 476, - 578, - 477, - 575, - 458, - 480, - 484, - 488, - 574, - 485, - 573, - 491, - 503, - 508, - 490, - 505, - 571, - 501, - 568, - 487, - 566, - 519, - 497, - 520, - 454, - 523, - - 440, - 531, - 524, - 516, - 537, - 530, - 533, - 538, - 547, - 399, - 364, - 347, - 326, - 285, - 534, - 265, - 260, - 233, - 226, - 549, - 551, - 225, - 550, - 224, - 223, - 202, - 192, - 108, - 95, - 554, - 562, - 93, - 85, - 84, - 639, - 620, - 622, - 624, - 91, - 84}; - -static const flex_int16_t yy_def[241] = {0, - 235, - 1, - 236, - 236, - 235, - 235, - 235, - 235, - 235, - 237, - 238, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 235, - 235, - 235, - 235, - 237, - 235, - 238, - 235, - 235, - 235, - 235, - 235, - 235, - 240, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 235, - 239, - - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 239, - 0, - 235, - 235, - 235, - 235, - 235}; - -static const flex_int16_t yy_nxt[712] = {0, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 35, - 45, - 46, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 35, - 37, - 38, - 35, - 35, - 39, - 40, - 41, - 42, - 43, - 44, - 35, - 35, - 53, - 58, - 54, - 55, - 56, - 58, - 58, - 58, - 58, - 58, - 58, - 64, - 68, - 58, - 62, - 58, - 69, - 101, - 65, - 60, - 59, - 53, - 58, - 54, - 61, - 66, - 58, - 58, - - 67, - 70, - 58, - 75, - 58, - 78, - 63, - 58, - 71, - 58, - 79, - 64, - 68, - 80, - 62, - 81, - 69, - 101, - 65, - 60, - 72, - 58, - 58, - 73, - 61, - 66, - 74, - 58, - 67, - 70, - 58, - 75, - 58, - 78, - 63, - 76, - 71, - 58, - 79, - 77, - 82, - 80, - 58, - 81, - 98, - 84, - 83, - 58, - 72, - 85, - 58, - 73, - 58, - 58, - 74, - 91, - 86, - 58, - 102, - 92, - 93, - 87, - 94, - 76, - 88, - 100, - 58, - 77, - 82, - 103, - 58, - 95, - 98, - 84, - 83, - 96, - 89, - 85, - 58, - 97, - 58, - 90, - 58, - 91, - 86, - 104, - 102, - 92, - 93, - 87, - 94, - 106, - 88, - 100, - 107, - 105, - 58, - 103, - 58, - 95, - - 58, - 58, - 58, - 96, - 89, - 58, - 58, - 97, - 58, - 90, - 58, - 58, - 58, - 104, - 108, - 110, - 58, - 58, - 111, - 106, - 113, - 109, - 107, - 105, - 114, - 112, - 117, - 115, - 118, - 116, - 58, - 58, - 125, - 58, - 126, - 127, - 136, - 58, - 58, - 58, - 58, - 129, - 108, - 110, - 124, - 58, - 111, - 58, - 113, - 109, - 58, - 58, - 114, - 112, - 117, - 115, - 118, - 116, - 58, - 58, - 125, - 128, - 126, - 127, - 136, - 58, - 119, - 130, - 120, - 129, - 58, - 58, - 124, - 58, - 58, - 131, - 121, - 58, - 137, - 58, - 58, - 122, - 123, - 132, - 133, - 139, - 138, - 141, - 135, - 128, - 134, - 58, - 58, - 58, - 119, - 130, - 120, - 58, - 58, - 58, - - 58, - 142, - 143, - 131, - 121, - 145, - 137, - 140, - 58, - 122, - 123, - 132, - 133, - 139, - 138, - 141, - 135, - 147, - 134, - 146, - 58, - 144, - 58, - 58, - 58, - 148, - 58, - 58, - 58, - 142, - 143, - 149, - 150, - 145, - 151, - 140, - 58, - 58, - 58, - 58, - 58, - 156, - 155, - 58, - 152, - 147, - 58, - 146, - 58, - 144, - 58, - 153, - 154, - 148, - 157, - 158, - 160, - 162, - 58, - 149, - 150, - 58, - 151, - 163, - 159, - 58, - 161, - 164, - 58, - 156, - 155, - 58, - 152, - 58, - 165, - 58, - 58, - 58, - 58, - 153, - 154, - 58, - 157, - 158, - 160, - 162, - 168, - 166, - 169, - 167, - 58, - 163, - 159, - 58, - 161, - 164, - 58, - 170, - 175, - 171, - - 174, - 58, - 165, - 58, - 58, - 173, - 58, - 58, - 176, - 172, - 58, - 58, - 180, - 58, - 168, - 166, - 169, - 167, - 58, - 177, - 58, - 58, - 58, - 58, - 58, - 170, - 175, - 171, - 174, - 181, - 178, - 179, - 58, - 173, - 58, - 182, - 176, - 172, - 58, - 185, - 180, - 58, - 184, - 193, - 58, - 183, - 187, - 177, - 188, - 190, - 58, - 186, - 194, - 58, - 58, - 192, - 189, - 181, - 178, - 179, - 58, - 58, - 58, - 182, - 58, - 191, - 58, - 185, - 58, - 58, - 184, - 193, - 58, - 183, - 187, - 202, - 188, - 190, - 196, - 186, - 194, - 195, - 197, - 192, - 189, - 199, - 198, - 58, - 201, - 58, - 58, - 58, - 200, - 191, - 58, - 204, - 203, - 206, - 58, - 58, - - 205, - 58, - 58, - 202, - 58, - 58, - 196, - 208, - 210, - 195, - 197, - 58, - 217, - 199, - 198, - 58, - 201, - 58, - 207, - 58, - 200, - 209, - 58, - 204, - 203, - 206, - 212, - 214, - 205, - 211, - 58, - 213, - 215, - 58, - 58, - 208, - 210, - 58, - 58, - 216, - 217, - 223, - 218, - 220, - 58, - 58, - 207, - 58, - 58, - 209, - 221, - 58, - 58, - 225, - 212, - 214, - 226, - 211, - 219, - 213, - 215, - 58, - 222, - 58, - 58, - 58, - 229, - 216, - 58, - 223, - 218, - 220, - 231, - 232, - 224, - 227, - 58, - 233, - 221, - 230, - 58, - 225, - 58, - 228, - 226, - 58, - 219, - 58, - 58, - 58, - 222, - 234, - 58, - 58, - 229, - 58, - 58, - 58, - 58, - 58, - - 231, - 232, - 224, - 227, - 58, - 233, - 58, - 230, - 58, - 58, - 58, - 228, - 58, - 58, - 58, - 58, - 58, - 99, - 58, - 234, - 47, - 47, - 49, - 49, - 51, - 51, - 58, - 58, - 58, - 99, - 52, - 50, - 58, - 57, - 52, - 50, - 48, - 235, - 5, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235}; - -static const flex_int16_t yy_chk[712] = {0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 20, - 25, - 20, - 22, - 22, - 26, - 27, - 28, - 29, - 31, - 61, - 27, - 28, - 240, - 26, - 33, - 28, - 61, - 27, - 25, - 239, - 54, - 34, - 54, - 25, - 27, - 234, - 233, - - 27, - 28, - 36, - 31, - 30, - 33, - 26, - 232, - 29, - 229, - 33, - 27, - 28, - 34, - 26, - 36, - 28, - 61, - 27, - 25, - 30, - 37, - 228, - 30, - 25, - 27, - 30, - 38, - 27, - 28, - 32, - 31, - 44, - 33, - 26, - 32, - 29, - 39, - 33, - 32, - 37, - 34, - 42, - 36, - 44, - 38, - 37, - 62, - 30, - 38, - 41, - 30, - 40, - 64, - 30, - 41, - 39, - 60, - 62, - 41, - 42, - 40, - 42, - 32, - 40, - 60, - 43, - 32, - 37, - 64, - 68, - 43, - 44, - 38, - 37, - 43, - 40, - 38, - 66, - 43, - 65, - 40, - 67, - 41, - 39, - 65, - 62, - 41, - 42, - 40, - 42, - 67, - 40, - 60, - 68, - 66, - 70, - 64, - 69, - 43, - - 76, - 72, - 73, - 43, - 40, - 71, - 227, - 43, - 74, - 40, - 75, - 82, - 77, - 65, - 69, - 70, - 226, - 81, - 71, - 67, - 72, - 69, - 68, - 66, - 73, - 71, - 76, - 74, - 77, - 75, - 91, - 80, - 81, - 85, - 81, - 82, - 91, - 225, - 224, - 222, - 219, - 85, - 69, - 70, - 80, - 83, - 71, - 218, - 72, - 69, - 92, - 86, - 73, - 71, - 76, - 74, - 77, - 75, - 78, - 87, - 81, - 83, - 81, - 82, - 91, - 88, - 78, - 86, - 78, - 85, - 90, - 89, - 80, - 93, - 217, - 87, - 78, - 94, - 92, - 216, - 96, - 78, - 78, - 87, - 88, - 94, - 93, - 96, - 90, - 83, - 89, - 95, - 97, - 98, - 78, - 86, - 78, - 104, - 103, - 214, - - 105, - 97, - 98, - 87, - 78, - 103, - 92, - 95, - 102, - 78, - 78, - 87, - 88, - 94, - 93, - 96, - 90, - 105, - 89, - 104, - 106, - 102, - 107, - 108, - 110, - 106, - 112, - 109, - 111, - 97, - 98, - 107, - 108, - 103, - 109, - 95, - 113, - 114, - 115, - 116, - 213, - 113, - 112, - 117, - 110, - 105, - 118, - 104, - 119, - 102, - 120, - 111, - 111, - 106, - 114, - 115, - 117, - 119, - 121, - 107, - 108, - 212, - 109, - 120, - 116, - 122, - 118, - 121, - 123, - 113, - 112, - 124, - 110, - 133, - 122, - 126, - 134, - 125, - 211, - 111, - 111, - 128, - 114, - 115, - 117, - 119, - 125, - 123, - 126, - 124, - 129, - 120, - 116, - 130, - 118, - 121, - 131, - 128, - 134, - 129, - - 133, - 135, - 122, - 136, - 140, - 131, - 137, - 139, - 135, - 130, - 138, - 141, - 139, - 210, - 125, - 123, - 126, - 124, - 142, - 136, - 143, - 144, - 148, - 159, - 150, - 128, - 134, - 129, - 133, - 140, - 137, - 138, - 153, - 131, - 160, - 141, - 135, - 130, - 147, - 144, - 139, - 156, - 143, - 159, - 155, - 142, - 148, - 136, - 150, - 155, - 157, - 147, - 160, - 162, - 201, - 157, - 153, - 140, - 137, - 138, - 164, - 169, - 163, - 141, - 165, - 156, - 171, - 144, - 199, - 172, - 143, - 159, - 179, - 142, - 148, - 172, - 150, - 155, - 163, - 147, - 160, - 162, - 164, - 157, - 153, - 169, - 165, - 170, - 171, - 173, - 175, - 177, - 170, - 156, - 180, - 175, - 173, - 179, - 181, - 184, - - 177, - 194, - 182, - 172, - 189, - 186, - 163, - 181, - 184, - 162, - 164, - 197, - 194, - 169, - 165, - 192, - 171, - 187, - 180, - 190, - 170, - 182, - 188, - 175, - 173, - 179, - 187, - 189, - 177, - 186, - 204, - 188, - 190, - 196, - 198, - 181, - 184, - 200, - 203, - 192, - 194, - 204, - 196, - 200, - 206, - 202, - 180, - 207, - 215, - 182, - 202, - 205, - 208, - 206, - 187, - 189, - 207, - 186, - 198, - 188, - 190, - 209, - 203, - 220, - 223, - 221, - 215, - 192, - 230, - 204, - 196, - 200, - 221, - 223, - 205, - 208, - 231, - 230, - 202, - 220, - 195, - 206, - 193, - 209, - 207, - 191, - 198, - 185, - 183, - 178, - 203, - 231, - 176, - 174, - 215, - 168, - 167, - 166, - 161, - 158, - - 221, - 223, - 205, - 208, - 154, - 230, - 152, - 220, - 151, - 149, - 146, - 209, - 145, - 132, - 127, - 101, - 100, - 99, - 84, - 231, - 236, - 236, - 237, - 237, - 238, - 238, - 79, - 63, - 59, - 53, - 51, - 49, - 35, - 24, - 11, - 10, - 9, - 5, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235, - 235}; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[236] = + { 0, + 0, 0, 0, 0, 82, 80, 1, 2, 80, 80, + 80, 58, 59, 76, 74, 62, 75, 6, 77, 3, + 5, 67, 63, 69, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 60, 61, 81, 66, 0, 78, + 0, 79, 0, 3, 64, 65, 68, 73, 73, 73, + 49, 73, 48, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 51, 71, 73, + 73, 73, 73, 15, 23, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 4, 22, + + 50, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 33, 73, 73, 73, 70, 73, 73, 73, + 73, 29, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 19, 34, 73, 73, 36, 73, + 9, 11, 73, 7, 73, 73, 73, 20, 73, 73, + 8, 73, 73, 73, 73, 25, 56, 72, 73, 40, + 73, 73, 73, 16, 73, 17, 73, 37, 73, 73, + 73, 73, 57, 73, 30, 73, 73, 73, 73, 73, + 35, 73, 44, 73, 14, 73, 55, 73, 45, 73, + + 47, 73, 73, 73, 12, 73, 73, 73, 73, 21, + 31, 10, 27, 52, 73, 54, 46, 42, 24, 73, + 73, 18, 73, 13, 39, 28, 26, 38, 43, 73, + 73, 53, 41, 32, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 1, 1, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 1, 16, 17, + 18, 19, 1, 1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 1, 47, 1, 45, 1, 48, 49, 50, 51, + + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 45, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[73] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2 + } ; + +static const flex_int16_t yy_base[241] = + { 0, + 0, 0, 0, 0, 638, 639, 639, 639, 619, 631, + 629, 639, 639, 639, 639, 639, 639, 639, 639, 60, + 639, 58, 639, 616, 59, 63, 64, 65, 66, 90, + 67, 116, 73, 80, 618, 88, 107, 113, 123, 138, + 136, 128, 152, 118, 639, 639, 639, 639, 627, 639, + 625, 639, 615, 81, 639, 639, 639, 0, 614, 143, + 68, 133, 613, 139, 166, 164, 168, 156, 184, 182, + 191, 187, 188, 194, 196, 186, 198, 244, 612, 217, + 203, 197, 231, 604, 219, 237, 245, 251, 257, 256, + 216, 236, 259, 263, 277, 266, 278, 279, 603, 602, + + 601, 294, 284, 283, 286, 306, 308, 309, 313, 310, + 314, 312, 322, 323, 324, 325, 329, 332, 334, 336, + 344, 351, 354, 357, 363, 361, 600, 367, 376, 379, + 382, 599, 359, 362, 387, 389, 392, 396, 393, 390, + 397, 404, 406, 407, 598, 596, 424, 408, 595, 410, + 594, 592, 418, 590, 430, 427, 436, 585, 409, 420, + 584, 439, 448, 446, 450, 583, 582, 581, 447, 473, + 452, 455, 475, 579, 476, 578, 477, 575, 458, 480, + 484, 488, 574, 485, 573, 491, 503, 508, 490, 505, + 571, 501, 568, 487, 566, 519, 497, 520, 454, 523, + + 440, 531, 524, 516, 537, 530, 533, 538, 547, 399, + 364, 347, 326, 285, 534, 265, 260, 233, 226, 549, + 551, 225, 550, 224, 223, 202, 192, 108, 95, 554, + 562, 93, 85, 84, 639, 620, 622, 624, 91, 84 + } ; + +static const flex_int16_t yy_def[241] = + { 0, + 235, 1, 236, 236, 235, 235, 235, 235, 235, 237, + 238, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 235, 235, 235, 235, 237, 235, + 238, 235, 235, 235, 235, 235, 235, 240, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 235, 239, + + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 0, 235, 235, 235, 235, 235 + } ; + +static const flex_int16_t yy_nxt[712] = + { 0, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, + 43, 44, 35, 35, 35, 45, 46, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 35, + 37, 38, 35, 35, 39, 40, 41, 42, 43, 44, + 35, 35, 53, 58, 54, 55, 56, 58, 58, 58, + 58, 58, 58, 64, 68, 58, 62, 58, 69, 101, + 65, 60, 59, 53, 58, 54, 61, 66, 58, 58, + + 67, 70, 58, 75, 58, 78, 63, 58, 71, 58, + 79, 64, 68, 80, 62, 81, 69, 101, 65, 60, + 72, 58, 58, 73, 61, 66, 74, 58, 67, 70, + 58, 75, 58, 78, 63, 76, 71, 58, 79, 77, + 82, 80, 58, 81, 98, 84, 83, 58, 72, 85, + 58, 73, 58, 58, 74, 91, 86, 58, 102, 92, + 93, 87, 94, 76, 88, 100, 58, 77, 82, 103, + 58, 95, 98, 84, 83, 96, 89, 85, 58, 97, + 58, 90, 58, 91, 86, 104, 102, 92, 93, 87, + 94, 106, 88, 100, 107, 105, 58, 103, 58, 95, + + 58, 58, 58, 96, 89, 58, 58, 97, 58, 90, + 58, 58, 58, 104, 108, 110, 58, 58, 111, 106, + 113, 109, 107, 105, 114, 112, 117, 115, 118, 116, + 58, 58, 125, 58, 126, 127, 136, 58, 58, 58, + 58, 129, 108, 110, 124, 58, 111, 58, 113, 109, + 58, 58, 114, 112, 117, 115, 118, 116, 58, 58, + 125, 128, 126, 127, 136, 58, 119, 130, 120, 129, + 58, 58, 124, 58, 58, 131, 121, 58, 137, 58, + 58, 122, 123, 132, 133, 139, 138, 141, 135, 128, + 134, 58, 58, 58, 119, 130, 120, 58, 58, 58, + + 58, 142, 143, 131, 121, 145, 137, 140, 58, 122, + 123, 132, 133, 139, 138, 141, 135, 147, 134, 146, + 58, 144, 58, 58, 58, 148, 58, 58, 58, 142, + 143, 149, 150, 145, 151, 140, 58, 58, 58, 58, + 58, 156, 155, 58, 152, 147, 58, 146, 58, 144, + 58, 153, 154, 148, 157, 158, 160, 162, 58, 149, + 150, 58, 151, 163, 159, 58, 161, 164, 58, 156, + 155, 58, 152, 58, 165, 58, 58, 58, 58, 153, + 154, 58, 157, 158, 160, 162, 168, 166, 169, 167, + 58, 163, 159, 58, 161, 164, 58, 170, 175, 171, + + 174, 58, 165, 58, 58, 173, 58, 58, 176, 172, + 58, 58, 180, 58, 168, 166, 169, 167, 58, 177, + 58, 58, 58, 58, 58, 170, 175, 171, 174, 181, + 178, 179, 58, 173, 58, 182, 176, 172, 58, 185, + 180, 58, 184, 193, 58, 183, 187, 177, 188, 190, + 58, 186, 194, 58, 58, 192, 189, 181, 178, 179, + 58, 58, 58, 182, 58, 191, 58, 185, 58, 58, + 184, 193, 58, 183, 187, 202, 188, 190, 196, 186, + 194, 195, 197, 192, 189, 199, 198, 58, 201, 58, + 58, 58, 200, 191, 58, 204, 203, 206, 58, 58, + + 205, 58, 58, 202, 58, 58, 196, 208, 210, 195, + 197, 58, 217, 199, 198, 58, 201, 58, 207, 58, + 200, 209, 58, 204, 203, 206, 212, 214, 205, 211, + 58, 213, 215, 58, 58, 208, 210, 58, 58, 216, + 217, 223, 218, 220, 58, 58, 207, 58, 58, 209, + 221, 58, 58, 225, 212, 214, 226, 211, 219, 213, + 215, 58, 222, 58, 58, 58, 229, 216, 58, 223, + 218, 220, 231, 232, 224, 227, 58, 233, 221, 230, + 58, 225, 58, 228, 226, 58, 219, 58, 58, 58, + 222, 234, 58, 58, 229, 58, 58, 58, 58, 58, + + 231, 232, 224, 227, 58, 233, 58, 230, 58, 58, + 58, 228, 58, 58, 58, 58, 58, 99, 58, 234, + 47, 47, 49, 49, 51, 51, 58, 58, 58, 99, + 52, 50, 58, 57, 52, 50, 48, 235, 5, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235 + } ; + +static const flex_int16_t yy_chk[712] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 20, 25, 20, 22, 22, 26, 27, 28, + 29, 31, 61, 27, 28, 240, 26, 33, 28, 61, + 27, 25, 239, 54, 34, 54, 25, 27, 234, 233, + + 27, 28, 36, 31, 30, 33, 26, 232, 29, 229, + 33, 27, 28, 34, 26, 36, 28, 61, 27, 25, + 30, 37, 228, 30, 25, 27, 30, 38, 27, 28, + 32, 31, 44, 33, 26, 32, 29, 39, 33, 32, + 37, 34, 42, 36, 44, 38, 37, 62, 30, 38, + 41, 30, 40, 64, 30, 41, 39, 60, 62, 41, + 42, 40, 42, 32, 40, 60, 43, 32, 37, 64, + 68, 43, 44, 38, 37, 43, 40, 38, 66, 43, + 65, 40, 67, 41, 39, 65, 62, 41, 42, 40, + 42, 67, 40, 60, 68, 66, 70, 64, 69, 43, + + 76, 72, 73, 43, 40, 71, 227, 43, 74, 40, + 75, 82, 77, 65, 69, 70, 226, 81, 71, 67, + 72, 69, 68, 66, 73, 71, 76, 74, 77, 75, + 91, 80, 81, 85, 81, 82, 91, 225, 224, 222, + 219, 85, 69, 70, 80, 83, 71, 218, 72, 69, + 92, 86, 73, 71, 76, 74, 77, 75, 78, 87, + 81, 83, 81, 82, 91, 88, 78, 86, 78, 85, + 90, 89, 80, 93, 217, 87, 78, 94, 92, 216, + 96, 78, 78, 87, 88, 94, 93, 96, 90, 83, + 89, 95, 97, 98, 78, 86, 78, 104, 103, 214, + + 105, 97, 98, 87, 78, 103, 92, 95, 102, 78, + 78, 87, 88, 94, 93, 96, 90, 105, 89, 104, + 106, 102, 107, 108, 110, 106, 112, 109, 111, 97, + 98, 107, 108, 103, 109, 95, 113, 114, 115, 116, + 213, 113, 112, 117, 110, 105, 118, 104, 119, 102, + 120, 111, 111, 106, 114, 115, 117, 119, 121, 107, + 108, 212, 109, 120, 116, 122, 118, 121, 123, 113, + 112, 124, 110, 133, 122, 126, 134, 125, 211, 111, + 111, 128, 114, 115, 117, 119, 125, 123, 126, 124, + 129, 120, 116, 130, 118, 121, 131, 128, 134, 129, + + 133, 135, 122, 136, 140, 131, 137, 139, 135, 130, + 138, 141, 139, 210, 125, 123, 126, 124, 142, 136, + 143, 144, 148, 159, 150, 128, 134, 129, 133, 140, + 137, 138, 153, 131, 160, 141, 135, 130, 147, 144, + 139, 156, 143, 159, 155, 142, 148, 136, 150, 155, + 157, 147, 160, 162, 201, 157, 153, 140, 137, 138, + 164, 169, 163, 141, 165, 156, 171, 144, 199, 172, + 143, 159, 179, 142, 148, 172, 150, 155, 163, 147, + 160, 162, 164, 157, 153, 169, 165, 170, 171, 173, + 175, 177, 170, 156, 180, 175, 173, 179, 181, 184, + + 177, 194, 182, 172, 189, 186, 163, 181, 184, 162, + 164, 197, 194, 169, 165, 192, 171, 187, 180, 190, + 170, 182, 188, 175, 173, 179, 187, 189, 177, 186, + 204, 188, 190, 196, 198, 181, 184, 200, 203, 192, + 194, 204, 196, 200, 206, 202, 180, 207, 215, 182, + 202, 205, 208, 206, 187, 189, 207, 186, 198, 188, + 190, 209, 203, 220, 223, 221, 215, 192, 230, 204, + 196, 200, 221, 223, 205, 208, 231, 230, 202, 220, + 195, 206, 193, 209, 207, 191, 198, 185, 183, 178, + 203, 231, 176, 174, 215, 168, 167, 166, 161, 158, + + 221, 223, 205, 208, 154, 230, 152, 220, 151, 149, + 146, 209, 145, 132, 127, 101, 100, 99, 84, 231, + 236, 236, 237, 237, 238, 238, 79, 63, 59, 53, + 51, 49, 35, 24, 11, 10, 9, 5, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235 + } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2896,8 +705,8 @@ static const flex_int16_t yy_chk[712] = {0, #line 1 "lex_sql.l" #line 28 "lex_sql.l" -#include -#include +#include +#include /** * flex 代码包含三个部分,使用 %% 分隔 @@ -2911,15 +720,13 @@ static const flex_int16_t yy_chk[712] = {0, #include "yacc_sql.hpp" #ifndef register -#define register -#endif // register +#define register +#endif // register -extern int atoi(); +extern int atoi(); extern double atof(); -#define RETURN_TOKEN(token) \ - LOG_DEBUG("%s", #token); \ - return token +#define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token #line 730 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 @@ -2948,124 +755,124 @@ extern double atof(); /* Holds the entire state of the reentrant scanner. */ struct yyguts_t -{ - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE *yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char *yy_last_accepting_cpos; + { - int yylineno_r; - int yy_flex_debug_r; + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - char *yytext_r; - int yy_more_flag; - int yy_more_len; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; - YYSTYPE *yylval_r; + int yylineno_r; + int yy_flex_debug_r; - YYLTYPE *yylloc_r; + char *yytext_r; + int yy_more_flag; + int yy_more_len; -}; /* end struct yyguts_t */ + YYSTYPE * yylval_r; -static int yy_init_globals(yyscan_t yyscanner); + YYLTYPE * yylloc_r; -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -#define yylval yyg->yylval_r + }; /* end struct yyguts_t */ -#define yylloc yyg->yylloc_r +static int yy_init_globals ( yyscan_t yyscanner ); -int yylex_init(yyscan_t *scanner); + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner); +static int yyinput ( yyscan_t yyscanner ); #else -static int input(yyscan_t yyscanner); +static int input ( yyscan_t yyscanner ); #endif #endif @@ -3085,38 +892,42 @@ static int input(yyscan_t yyscanner); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) {} \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - yy_size_t n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -3135,7 +946,7 @@ static int input(yyscan_t yyscanner); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ @@ -3146,9 +957,11 @@ static int input(yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -3160,554 +973,644 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP YY_USER_ACTION +#define YY_RULE_SETUP \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + yylval = yylval_param; - yylloc = yylloc_param; + yylloc = yylloc_param; - if (!yyg->yy_init) { - yyg->yy_init = 1; + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!yyg->yy_start) - yyg->yy_start = 1; /* first start state */ + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_load_buffer_state(yyscanner); - } + yy_load_buffer_state( yyscanner ); + } - { + { #line 75 "lex_sql.l" + #line 1025 "lex_sql.cpp" - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 236) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_base[yy_current_state] != 639); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - if (yy_act == 0) { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - - case 1: YY_RULE_SETUP + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 236 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 639 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 77 "lex_sql.l" - // ignore whitespace - YY_BREAK - case 2: - /* rule 2 can match eol */ - YY_RULE_SETUP +// ignore whitespace + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP #line 78 "lex_sql.l" - ; - YY_BREAK - case 3: YY_RULE_SETUP +; + YY_BREAK +case 3: +YY_RULE_SETUP #line 80 "lex_sql.l" - yylval->number = atoi(yytext); - RETURN_TOKEN(NUMBER); - YY_BREAK - case 4: YY_RULE_SETUP +yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER); + YY_BREAK +case 4: +YY_RULE_SETUP #line 81 "lex_sql.l" - yylval->floats = (float)(atof(yytext)); - RETURN_TOKEN(FLOAT); - YY_BREAK - case 5: YY_RULE_SETUP +yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT); + YY_BREAK +case 5: +YY_RULE_SETUP #line 83 "lex_sql.l" - RETURN_TOKEN(SEMICOLON); - YY_BREAK - case 6: YY_RULE_SETUP +RETURN_TOKEN(SEMICOLON); + YY_BREAK +case 6: +YY_RULE_SETUP #line 84 "lex_sql.l" - RETURN_TOKEN(DOT); - YY_BREAK - case 7: YY_RULE_SETUP +RETURN_TOKEN(DOT); + YY_BREAK +case 7: +YY_RULE_SETUP #line 85 "lex_sql.l" - RETURN_TOKEN(EXIT); - YY_BREAK - case 8: YY_RULE_SETUP +RETURN_TOKEN(EXIT); + YY_BREAK +case 8: +YY_RULE_SETUP #line 86 "lex_sql.l" - RETURN_TOKEN(HELP); - YY_BREAK - case 9: YY_RULE_SETUP +RETURN_TOKEN(HELP); + YY_BREAK +case 9: +YY_RULE_SETUP #line 87 "lex_sql.l" - RETURN_TOKEN(DESC); - YY_BREAK - case 10: YY_RULE_SETUP +RETURN_TOKEN(DESC); + YY_BREAK +case 10: +YY_RULE_SETUP #line 88 "lex_sql.l" - RETURN_TOKEN(CREATE); - YY_BREAK - case 11: YY_RULE_SETUP +RETURN_TOKEN(CREATE); + YY_BREAK +case 11: +YY_RULE_SETUP #line 89 "lex_sql.l" - RETURN_TOKEN(DROP); - YY_BREAK - case 12: YY_RULE_SETUP +RETURN_TOKEN(DROP); + YY_BREAK +case 12: +YY_RULE_SETUP #line 90 "lex_sql.l" - RETURN_TOKEN(TABLE); - YY_BREAK - case 13: YY_RULE_SETUP +RETURN_TOKEN(TABLE); + YY_BREAK +case 13: +YY_RULE_SETUP #line 91 "lex_sql.l" - RETURN_TOKEN(TABLES); - YY_BREAK - case 14: YY_RULE_SETUP +RETURN_TOKEN(TABLES); + YY_BREAK +case 14: +YY_RULE_SETUP #line 92 "lex_sql.l" - RETURN_TOKEN(INDEX); - YY_BREAK - case 15: YY_RULE_SETUP +RETURN_TOKEN(INDEX); + YY_BREAK +case 15: +YY_RULE_SETUP #line 93 "lex_sql.l" - RETURN_TOKEN(ON); - YY_BREAK - case 16: YY_RULE_SETUP +RETURN_TOKEN(ON); + YY_BREAK +case 16: +YY_RULE_SETUP #line 94 "lex_sql.l" - RETURN_TOKEN(SHOW); - YY_BREAK - case 17: YY_RULE_SETUP +RETURN_TOKEN(SHOW); + YY_BREAK +case 17: +YY_RULE_SETUP #line 95 "lex_sql.l" - RETURN_TOKEN(SYNC); - YY_BREAK - case 18: YY_RULE_SETUP +RETURN_TOKEN(SYNC); + YY_BREAK +case 18: +YY_RULE_SETUP #line 96 "lex_sql.l" - RETURN_TOKEN(SELECT); - YY_BREAK - case 19: YY_RULE_SETUP +RETURN_TOKEN(SELECT); + YY_BREAK +case 19: +YY_RULE_SETUP #line 97 "lex_sql.l" - RETURN_TOKEN(CALC); - YY_BREAK - case 20: YY_RULE_SETUP +RETURN_TOKEN(CALC); + YY_BREAK +case 20: +YY_RULE_SETUP #line 98 "lex_sql.l" - RETURN_TOKEN(FROM); - YY_BREAK - case 21: YY_RULE_SETUP +RETURN_TOKEN(FROM); + YY_BREAK +case 21: +YY_RULE_SETUP #line 99 "lex_sql.l" - RETURN_TOKEN(WHERE); - YY_BREAK - case 22: YY_RULE_SETUP +RETURN_TOKEN(WHERE); + YY_BREAK +case 22: +YY_RULE_SETUP #line 100 "lex_sql.l" - RETURN_TOKEN(AND); - YY_BREAK - case 23: YY_RULE_SETUP +RETURN_TOKEN(AND); + YY_BREAK +case 23: +YY_RULE_SETUP #line 101 "lex_sql.l" - RETURN_TOKEN(OR); - YY_BREAK - case 24: YY_RULE_SETUP +RETURN_TOKEN(OR); + YY_BREAK +case 24: +YY_RULE_SETUP #line 102 "lex_sql.l" - RETURN_TOKEN(INSERT); - YY_BREAK - case 25: YY_RULE_SETUP +RETURN_TOKEN(INSERT); + YY_BREAK +case 25: +YY_RULE_SETUP #line 103 "lex_sql.l" - RETURN_TOKEN(INTO); - YY_BREAK - case 26: YY_RULE_SETUP +RETURN_TOKEN(INTO); + YY_BREAK +case 26: +YY_RULE_SETUP #line 104 "lex_sql.l" - RETURN_TOKEN(VALUES); - YY_BREAK - case 27: YY_RULE_SETUP +RETURN_TOKEN(VALUES); + YY_BREAK +case 27: +YY_RULE_SETUP #line 105 "lex_sql.l" - RETURN_TOKEN(DELETE); - YY_BREAK - case 28: YY_RULE_SETUP +RETURN_TOKEN(DELETE); + YY_BREAK +case 28: +YY_RULE_SETUP #line 106 "lex_sql.l" - RETURN_TOKEN(UPDATE); - YY_BREAK - case 29: YY_RULE_SETUP +RETURN_TOKEN(UPDATE); + YY_BREAK +case 29: +YY_RULE_SETUP #line 107 "lex_sql.l" - RETURN_TOKEN(SET); - YY_BREAK - case 30: YY_RULE_SETUP +RETURN_TOKEN(SET); + YY_BREAK +case 30: +YY_RULE_SETUP #line 108 "lex_sql.l" - RETURN_TOKEN(TRX_BEGIN); - YY_BREAK - case 31: YY_RULE_SETUP +RETURN_TOKEN(TRX_BEGIN); + YY_BREAK +case 31: +YY_RULE_SETUP #line 109 "lex_sql.l" - RETURN_TOKEN(TRX_COMMIT); - YY_BREAK - case 32: YY_RULE_SETUP +RETURN_TOKEN(TRX_COMMIT); + YY_BREAK +case 32: +YY_RULE_SETUP #line 110 "lex_sql.l" - RETURN_TOKEN(TRX_ROLLBACK); - YY_BREAK - case 33: YY_RULE_SETUP +RETURN_TOKEN(TRX_ROLLBACK); + YY_BREAK +case 33: +YY_RULE_SETUP #line 111 "lex_sql.l" - RETURN_TOKEN(INT_T); - YY_BREAK - case 34: YY_RULE_SETUP +RETURN_TOKEN(INT_T); + YY_BREAK +case 34: +YY_RULE_SETUP #line 112 "lex_sql.l" - RETURN_TOKEN(STRING_T); - YY_BREAK - case 35: YY_RULE_SETUP +RETURN_TOKEN(STRING_T); + YY_BREAK +case 35: +YY_RULE_SETUP #line 113 "lex_sql.l" - RETURN_TOKEN(FLOAT_T); - YY_BREAK - case 36: YY_RULE_SETUP +RETURN_TOKEN(FLOAT_T); + YY_BREAK +case 36: +YY_RULE_SETUP #line 114 "lex_sql.l" - RETURN_TOKEN(DATE_T); - YY_BREAK - case 37: YY_RULE_SETUP +RETURN_TOKEN(DATE_T); + YY_BREAK +case 37: +YY_RULE_SETUP #line 115 "lex_sql.l" - RETURN_TOKEN(TEXT_T); - YY_BREAK - case 38: YY_RULE_SETUP +RETURN_TOKEN(TEXT_T); + YY_BREAK +case 38: +YY_RULE_SETUP #line 116 "lex_sql.l" - RETURN_TOKEN(VECTOR_T); - YY_BREAK - case 39: YY_RULE_SETUP +RETURN_TOKEN(VECTOR_T); + YY_BREAK +case 39: +YY_RULE_SETUP #line 117 "lex_sql.l" - RETURN_TOKEN(UNIQUE); - YY_BREAK - case 40: YY_RULE_SETUP +RETURN_TOKEN(UNIQUE); + YY_BREAK +case 40: +YY_RULE_SETUP #line 118 "lex_sql.l" - RETURN_TOKEN(NULL_T); - YY_BREAK - case 41: YY_RULE_SETUP +RETURN_TOKEN(NULL_T); + YY_BREAK +case 41: +YY_RULE_SETUP #line 119 "lex_sql.l" - RETURN_TOKEN(NULLABLE); - YY_BREAK - case 42: YY_RULE_SETUP +RETURN_TOKEN(NULLABLE); + YY_BREAK +case 42: +YY_RULE_SETUP #line 120 "lex_sql.l" - RETURN_TOKEN(INFILE); - YY_BREAK - case 43: YY_RULE_SETUP +RETURN_TOKEN(INFILE); + YY_BREAK +case 43: +YY_RULE_SETUP #line 121 "lex_sql.l" - RETURN_TOKEN(EXPLAIN); - YY_BREAK - case 44: YY_RULE_SETUP +RETURN_TOKEN(EXPLAIN); + YY_BREAK +case 44: +YY_RULE_SETUP #line 122 "lex_sql.l" - RETURN_TOKEN(GROUP); - YY_BREAK - case 45: YY_RULE_SETUP +RETURN_TOKEN(GROUP); + YY_BREAK +case 45: +YY_RULE_SETUP #line 123 "lex_sql.l" - RETURN_TOKEN(LIMIT); - YY_BREAK - case 46: YY_RULE_SETUP +RETURN_TOKEN(LIMIT); + YY_BREAK +case 46: +YY_RULE_SETUP #line 124 "lex_sql.l" - RETURN_TOKEN(HAVING); - YY_BREAK - case 47: YY_RULE_SETUP +RETURN_TOKEN(HAVING); + YY_BREAK +case 47: +YY_RULE_SETUP #line 125 "lex_sql.l" - RETURN_TOKEN(ORDER); - YY_BREAK - case 48: YY_RULE_SETUP +RETURN_TOKEN(ORDER); + YY_BREAK +case 48: +YY_RULE_SETUP #line 126 "lex_sql.l" - RETURN_TOKEN(BY); - YY_BREAK - case 49: YY_RULE_SETUP +RETURN_TOKEN(BY); + YY_BREAK +case 49: +YY_RULE_SETUP #line 127 "lex_sql.l" - RETURN_TOKEN(AS); - YY_BREAK - case 50: YY_RULE_SETUP +RETURN_TOKEN(AS); + YY_BREAK +case 50: +YY_RULE_SETUP #line 128 "lex_sql.l" - RETURN_TOKEN(ASC); - YY_BREAK - case 51: YY_RULE_SETUP +RETURN_TOKEN(ASC); + YY_BREAK +case 51: +YY_RULE_SETUP #line 129 "lex_sql.l" - RETURN_TOKEN(IN); - YY_BREAK - case 52: YY_RULE_SETUP +RETURN_TOKEN(IN); + YY_BREAK +case 52: +YY_RULE_SETUP #line 130 "lex_sql.l" - RETURN_TOKEN(EXISTS); - YY_BREAK - case 53: YY_RULE_SETUP +RETURN_TOKEN(EXISTS); + YY_BREAK +case 53: +YY_RULE_SETUP #line 131 "lex_sql.l" - RETURN_TOKEN(STORAGE); - YY_BREAK - case 54: YY_RULE_SETUP +RETURN_TOKEN(STORAGE); + YY_BREAK +case 54: +YY_RULE_SETUP #line 132 "lex_sql.l" - RETURN_TOKEN(FORMAT); - YY_BREAK - case 55: YY_RULE_SETUP +RETURN_TOKEN(FORMAT); + YY_BREAK +case 55: +YY_RULE_SETUP #line 133 "lex_sql.l" - RETURN_TOKEN(INNER); - YY_BREAK - case 56: YY_RULE_SETUP +RETURN_TOKEN(INNER); + YY_BREAK +case 56: +YY_RULE_SETUP #line 134 "lex_sql.l" - RETURN_TOKEN(JOIN); - YY_BREAK - case 57: YY_RULE_SETUP +RETURN_TOKEN(JOIN); + YY_BREAK +case 57: +YY_RULE_SETUP #line 135 "lex_sql.l" - RETURN_TOKEN(VIEW); - YY_BREAK - case 58: YY_RULE_SETUP +RETURN_TOKEN(VIEW); + YY_BREAK +case 58: +YY_RULE_SETUP #line 136 "lex_sql.l" - RETURN_TOKEN(LBRACE); - YY_BREAK - case 59: YY_RULE_SETUP +RETURN_TOKEN(LBRACE); + YY_BREAK +case 59: +YY_RULE_SETUP #line 137 "lex_sql.l" - RETURN_TOKEN(RBRACE); - YY_BREAK - case 60: YY_RULE_SETUP +RETURN_TOKEN(RBRACE); + YY_BREAK +case 60: +YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(LSBRACE); - YY_BREAK - case 61: YY_RULE_SETUP +RETURN_TOKEN(LSBRACE); + YY_BREAK +case 61: +YY_RULE_SETUP #line 139 "lex_sql.l" - RETURN_TOKEN(RSBRACE); - YY_BREAK - case 62: YY_RULE_SETUP +RETURN_TOKEN(RSBRACE); + YY_BREAK +case 62: +YY_RULE_SETUP #line 141 "lex_sql.l" - RETURN_TOKEN(COMMA); - YY_BREAK - case 63: YY_RULE_SETUP +RETURN_TOKEN(COMMA); + YY_BREAK +case 63: +YY_RULE_SETUP #line 142 "lex_sql.l" - RETURN_TOKEN(EQ); - YY_BREAK - case 64: YY_RULE_SETUP +RETURN_TOKEN(EQ); + YY_BREAK +case 64: +YY_RULE_SETUP #line 143 "lex_sql.l" - RETURN_TOKEN(LE); - YY_BREAK - case 65: YY_RULE_SETUP +RETURN_TOKEN(LE); + YY_BREAK +case 65: +YY_RULE_SETUP #line 144 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 66: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 66: +YY_RULE_SETUP #line 145 "lex_sql.l" - RETURN_TOKEN(NE); - YY_BREAK - case 67: YY_RULE_SETUP +RETURN_TOKEN(NE); + YY_BREAK +case 67: +YY_RULE_SETUP #line 146 "lex_sql.l" - RETURN_TOKEN(LT); - YY_BREAK - case 68: YY_RULE_SETUP +RETURN_TOKEN(LT); + YY_BREAK +case 68: +YY_RULE_SETUP #line 147 "lex_sql.l" - RETURN_TOKEN(GE); - YY_BREAK - case 69: YY_RULE_SETUP +RETURN_TOKEN(GE); + YY_BREAK +case 69: +YY_RULE_SETUP #line 148 "lex_sql.l" - RETURN_TOKEN(GT); - YY_BREAK - case 70: YY_RULE_SETUP +RETURN_TOKEN(GT); + YY_BREAK +case 70: +YY_RULE_SETUP #line 149 "lex_sql.l" - RETURN_TOKEN(NOT); - YY_BREAK - case 71: YY_RULE_SETUP +RETURN_TOKEN(NOT); + YY_BREAK +case 71: +YY_RULE_SETUP #line 150 "lex_sql.l" - RETURN_TOKEN(IS); - YY_BREAK - case 72: YY_RULE_SETUP +RETURN_TOKEN(IS); + YY_BREAK +case 72: +YY_RULE_SETUP #line 151 "lex_sql.l" - RETURN_TOKEN(LIKE); - YY_BREAK - case 73: YY_RULE_SETUP +RETURN_TOKEN(LIKE); + YY_BREAK +case 73: +YY_RULE_SETUP #line 153 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(ID); - YY_BREAK - case 74: +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK +case 74: #line 156 "lex_sql.l" - case 75: +case 75: #line 157 "lex_sql.l" - case 76: +case 76: #line 158 "lex_sql.l" - case 77: YY_RULE_SETUP +case 77: +YY_RULE_SETUP #line 158 "lex_sql.l" - { - return yytext[0]; - } - YY_BREAK - case 78: - /* rule 78 can match eol */ - YY_RULE_SETUP +{ return yytext[0]; } + YY_BREAK +case 78: +/* rule 78 can match eol */ +YY_RULE_SETUP #line 159 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 79: - /* rule 79 can match eol */ - YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 79: +/* rule 79 can match eol */ +YY_RULE_SETUP #line 160 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(SSS); - YY_BREAK - case 80: YY_RULE_SETUP +yylval->string = strdup(yytext); RETURN_TOKEN(SSS); + YY_BREAK +case 80: +YY_RULE_SETUP #line 162 "lex_sql.l" - LOG_DEBUG("Unknown character [%c]",yytext[0]); - return yytext[0]; - YY_BREAK - case 81: YY_RULE_SETUP +LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; + YY_BREAK +case 81: +YY_RULE_SETUP #line 163 "lex_sql.l" - ECHO; - YY_BREAK +ECHO; + YY_BREAK #line 1481 "lex_sql.cpp" - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(STR): yyterminate(); - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if (yywrap(yyscanner)) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(STR): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3717,149 +1620,171 @@ YY_DECL * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(yyscan_t yyscanner) +static int yy_get_next_buffer (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else { - yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - yy_size_t new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if (yyg->yy_n_chars == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin, yyscanner); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = - (char *)yyrealloc((void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size, yyscanner); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(yyscan_t yyscanner) + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_current_state = yyg->yy_start; - - for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 236) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 236 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -3867,27 +1792,29 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 236) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 235); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 236 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 235); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT @@ -3896,133 +1823,141 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner) + static int yyinput (yyscan_t yyscanner) #else -static int input(yyscan_t yyscanner) + static int input (yyscan_t yyscanner) #endif { - int c; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin, yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap(yyscanner)) - return 0; - - if (!yyg->yy_did_buffer_switch_on_eof) - YY_NEW_FILE; + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *)yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file, yyscan_t yyscanner) + void yyrestart (FILE * input_file , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); - yy_load_buffer_state(yyscanner); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(yyscanner); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state(yyscan_t yyscanner) +static void yy_load_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -4031,105 +1966,105 @@ static void yy_load_buffer_state(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file, yyscanner); + yy_init_buffer( b, file , yyscanner); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!b) - return; + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf, yyscanner); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *)b, yyscanner); + yyfree( (void *) b , yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - yy_flush_buffer(b, yyscanner); + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - b->yy_input_file = file; - b->yy_fill_buffer = 1; + yy_flush_buffer( b , yyscanner); - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!b) - return; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(yyscanner); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -4138,95 +2073,99 @@ void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state(yyscan_t yyscanner) +void yypop_buffer_state (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; - } + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(yyscan_t yyscanner) +static void yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = - (struct yy_buffer_state **)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state *)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state **)yyrealloc( - yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state *), yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state *)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -4235,31 +2174,33 @@ static void yyensure_buffer_stack(yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b, yyscanner); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -4270,10 +2211,10 @@ YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner) * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - - return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -4283,175 +2224,177 @@ YY_BUFFER_STATE yy_scan_string(const char *yystr, yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, yy_size_t _yybytes_len, yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n, yyscanner); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n, yyscanner); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyextra; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno(yyscan_t yyscanner) +int yyget_lineno (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return 0; - - return yylineno; + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column(yyscan_t yyscanner) +int yyget_column (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - if (!YY_CURRENT_BUFFER) - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yycolumn; + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in(yyscan_t yyscanner) +FILE *yyget_in (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyin; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out(yyscan_t yyscanner) +FILE *yyget_out (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyout; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng(yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yyleng; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *yyget_text(yyscan_t yyscanner) +char *yyget_text (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yytext; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyextra = user_defined; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno(int _line_number, yyscan_t yyscanner) +void yyset_lineno (int _line_number , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_lineno called with no buffer"); - - yylineno = _line_number; + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; } /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column(int _column_no, yyscan_t yyscanner) +void yyset_column (int _column_no , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) - YY_FATAL_ERROR("yyset_column called with no buffer"); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yycolumn = _column_no; + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; } /** Set the input stream. This does not discard the current @@ -4460,80 +2403,80 @@ void yyset_column(int _column_no, yyscan_t yyscanner) * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str, yyscan_t yyscanner) +void yyset_in (FILE * _in_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyin = _in_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; } -void yyset_out(FILE *_out_str, yyscan_t yyscanner) +void yyset_out (FILE * _out_str , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yyout = _out_str; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; } -int yyget_debug(yyscan_t yyscanner) +int yyget_debug (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yy_flex_debug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void yyset_debug(int _bdebug, yyscan_t yyscanner) +void yyset_debug (int _bdebug , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yy_flex_debug = _bdebug; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ -YYSTYPE *yyget_lval(yyscan_t yyscanner) +YYSTYPE * yyget_lval (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylval; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner) +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylval = yylval_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } -YYLTYPE *yyget_lloc(yyscan_t yyscanner) +YYLTYPE *yyget_lloc (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - return yylloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; } - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner) + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - yylloc = yylloc_param; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; } - + /* User-visible API */ /* yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t *ptr_yy_globals) +int yylex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } /* yylex_init_extra has the same functionality as yylex_init, but follows the @@ -4543,94 +2486,94 @@ int yylex_init(yyscan_t *ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t *ptr_yy_globals) +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { - struct yyguts_t dummy_yyguts; + struct yyguts_t dummy_yyguts; - yyset_extra(yy_user_defined, &dummy_yyguts); + yyset_extra (yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - yyset_extra(yy_user_defined, *ptr_yy_globals); + yyset_extra (yy_user_defined, *ptr_yy_globals); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } -static int yy_init_globals(yyscan_t yyscanner) +static int yy_init_globals (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(yyscan_t yyscanner) +int yylex_destroy (yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack, yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack, yyscanner); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals(yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree(yyscanner, yyscanner); - yyscanner = NULL; - return 0; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; } /* @@ -4638,59 +2581,63 @@ int yylex_destroy(yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n, yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s, yyscan_t yyscanner) +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) { - int n; - for (n = 0; s[n]; ++n) - ; + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size, yyscan_t yyscanner) +void *yyalloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - return malloc(size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void *yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner) +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr, yyscan_t yyscanner) +void yyfree (void * ptr , yyscan_t yyscanner) { - struct yyguts_t *yyg = (struct yyguts_t *)yyscanner; - (void)yyg; - free((char *)ptr); /* see yyrealloc() for (char *) cast */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 163 "lex_sql.l" -void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } + +void scan_string(const char *str, yyscan_t scanner) { + yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); +} + diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index c60e2d16..12b7f68e 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,21 +12,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -79,62 +81,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -155,7 +157,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -195,72 +197,73 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -}; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -283,69 +286,69 @@ void yyfree(void *, yyscan_t yyscanner); #define YY_EXTRA_TYPE void * #endif -int yylex_init(yyscan_t *scanner); +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -373,9 +376,11 @@ static int yy_flex_strlen(const char *, yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -539,6 +544,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #line 163 "lex_sql.l" + #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 3e6983c8..4975c2eb 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -63,9 +63,13 @@ /* Pull parsers. */ #define YYPULL 1 + + + /* First part of user prologue. */ #line 2 "yacc_sql.y" + #include #include #include @@ -88,226 +92,238 @@ string token_name(const char *sql_string, YYLTYPE *llocp) int yyerror(YYLTYPE *llocp, const char *sql_string, ParsedSqlResult *sql_result, yyscan_t scanner, const char *msg) { std::unique_ptr error_sql_node = std::make_unique(SCF_ERROR); - error_sql_node->error.error_msg = msg; - error_sql_node->error.line = llocp->first_line; - error_sql_node->error.column = llocp->first_column; + error_sql_node->error.error_msg = msg; + error_sql_node->error.line = llocp->first_line; + error_sql_node->error.column = llocp->first_column; sql_result->add_sql_node(std::move(error_sql_node)); return 0; } -ArithmeticExpr *create_arithmetic_expression( - ArithmeticExpr::Type type, Expression *left, Expression *right, const char *sql_string, YYLTYPE *llocp) +ArithmeticExpr *create_arithmetic_expression(ArithmeticExpr::Type type, + Expression *left, + Expression *right, + const char *sql_string, + YYLTYPE *llocp) { ArithmeticExpr *expr = new ArithmeticExpr(type, left, right); expr->set_name(token_name(sql_string, llocp)); return expr; } -UnboundFunctionExpr *create_aggregate_expression( - const char *function_name, std::vector> child, const char *sql_string, YYLTYPE *llocp) +UnboundFunctionExpr *create_aggregate_expression(const char *function_name, + std::vector> child, + const char *sql_string, + YYLTYPE *llocp) { UnboundFunctionExpr *expr = new UnboundFunctionExpr(function_name, std::move(child)); expr->set_name(token_name(sql_string, llocp)); return expr; } -ParsedSqlNode *create_table_sql_node(char *table_name, AttrInfoSqlNode *attr_def, - std::vector *attrinfos, char *storage_format, ParsedSqlNode *create_table_select) +ParsedSqlNode *create_table_sql_node(char *table_name, + AttrInfoSqlNode* attr_def, + std::vector *attrinfos, + char* storage_format, + ParsedSqlNode *create_table_select) { - ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); - CreateTableSqlNode &create_table = parsed_sql_node->create_table; - create_table.relation_name = table_name; + ParsedSqlNode *parsed_sql_node = new ParsedSqlNode(SCF_CREATE_TABLE); + CreateTableSqlNode &create_table = parsed_sql_node->create_table; + create_table.relation_name = table_name; - if (attrinfos) { - create_table.attr_infos.swap(*attrinfos); - delete attrinfos; - } - if (attr_def) { - create_table.attr_infos.emplace_back(*attr_def); - std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); - delete attr_def; - } - if (storage_format != nullptr) { - create_table.storage_format = storage_format; - free(storage_format); - } + if (attrinfos) { + create_table.attr_infos.swap(*attrinfos); + delete attrinfos; + } + if (attr_def) { + create_table.attr_infos.emplace_back(*attr_def); + std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end()); + delete attr_def; + } + if (storage_format != nullptr) { + create_table.storage_format = storage_format; + free(storage_format); + } - if (create_table_select) { - create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); - } + if (create_table_select) { + create_table.create_table_select = std::make_unique(std::move(create_table_select->selection)); + } - return parsed_sql_node; + return parsed_sql_node; } #line 155 "yacc_sql.cpp" -#ifndef YY_CAST -#ifdef __cplusplus -#define YY_CAST(Type, Val) static_cast(Val) -#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast(Val) -#else -#define YY_CAST(Type, Val) ((Type)(Val)) -#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) -#endif -#endif -#ifndef YY_NULLPTR -#if defined __cplusplus -#if 201103L <= __cplusplus -#define YY_NULLPTR nullptr -#else -#define YY_NULLPTR 0 -#endif -#else -#define YY_NULLPTR ((void *)0) -#endif -#endif +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif #include "yacc_sql.hpp" /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_HAVING = 11, /* HAVING */ - YYSYMBOL_ORDER = 12, /* ORDER */ - YYSYMBOL_TABLE = 13, /* TABLE */ - YYSYMBOL_TABLES = 14, /* TABLES */ - YYSYMBOL_INDEX = 15, /* INDEX */ - YYSYMBOL_CALC = 16, /* CALC */ - YYSYMBOL_SELECT = 17, /* SELECT */ - YYSYMBOL_DESC = 18, /* DESC */ - YYSYMBOL_SHOW = 19, /* SHOW */ - YYSYMBOL_SYNC = 20, /* SYNC */ - YYSYMBOL_INSERT = 21, /* INSERT */ - YYSYMBOL_DELETE = 22, /* DELETE */ - YYSYMBOL_UPDATE = 23, /* UPDATE */ - YYSYMBOL_LBRACE = 24, /* LBRACE */ - YYSYMBOL_RBRACE = 25, /* RBRACE */ - YYSYMBOL_LSBRACE = 26, /* LSBRACE */ - YYSYMBOL_RSBRACE = 27, /* RSBRACE */ - YYSYMBOL_COMMA = 28, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 29, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 30, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 31, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 32, /* INT_T */ - YYSYMBOL_IN = 33, /* IN */ - YYSYMBOL_STRING_T = 34, /* STRING_T */ - YYSYMBOL_FLOAT_T = 35, /* FLOAT_T */ - YYSYMBOL_DATE_T = 36, /* DATE_T */ - YYSYMBOL_TEXT_T = 37, /* TEXT_T */ - YYSYMBOL_VECTOR_T = 38, /* VECTOR_T */ - YYSYMBOL_NOT = 39, /* NOT */ - YYSYMBOL_UNIQUE = 40, /* UNIQUE */ - YYSYMBOL_NULL_T = 41, /* NULL_T */ - YYSYMBOL_LIMIT = 42, /* LIMIT */ - YYSYMBOL_NULLABLE = 43, /* NULLABLE */ - YYSYMBOL_HELP = 44, /* HELP */ - YYSYMBOL_EXIT = 45, /* EXIT */ - YYSYMBOL_DOT = 46, /* DOT */ - YYSYMBOL_INTO = 47, /* INTO */ - YYSYMBOL_VALUES = 48, /* VALUES */ - YYSYMBOL_FROM = 49, /* FROM */ - YYSYMBOL_WHERE = 50, /* WHERE */ - YYSYMBOL_AND = 51, /* AND */ - YYSYMBOL_OR = 52, /* OR */ - YYSYMBOL_SET = 53, /* SET */ - YYSYMBOL_ON = 54, /* ON */ - YYSYMBOL_INFILE = 55, /* INFILE */ - YYSYMBOL_EXPLAIN = 56, /* EXPLAIN */ - YYSYMBOL_STORAGE = 57, /* STORAGE */ - YYSYMBOL_FORMAT = 58, /* FORMAT */ - YYSYMBOL_INNER = 59, /* INNER */ - YYSYMBOL_JOIN = 60, /* JOIN */ - YYSYMBOL_VIEW = 61, /* VIEW */ - YYSYMBOL_EQ = 62, /* EQ */ - YYSYMBOL_LT = 63, /* LT */ - YYSYMBOL_GT = 64, /* GT */ - YYSYMBOL_LE = 65, /* LE */ - YYSYMBOL_GE = 66, /* GE */ - YYSYMBOL_NE = 67, /* NE */ - YYSYMBOL_LIKE = 68, /* LIKE */ - YYSYMBOL_IS = 69, /* IS */ - YYSYMBOL_NUMBER = 70, /* NUMBER */ - YYSYMBOL_FLOAT = 71, /* FLOAT */ - YYSYMBOL_ID = 72, /* ID */ - YYSYMBOL_SSS = 73, /* SSS */ - YYSYMBOL_74_ = 74, /* '+' */ - YYSYMBOL_75_ = 75, /* '-' */ - YYSYMBOL_76_ = 76, /* '*' */ - YYSYMBOL_77_ = 77, /* '/' */ - YYSYMBOL_UMINUS = 78, /* UMINUS */ - YYSYMBOL_YYACCEPT = 79, /* $accept */ - YYSYMBOL_commands = 80, /* commands */ - YYSYMBOL_command_wrapper = 81, /* command_wrapper */ - YYSYMBOL_exit_stmt = 82, /* exit_stmt */ - YYSYMBOL_help_stmt = 83, /* help_stmt */ - YYSYMBOL_sync_stmt = 84, /* sync_stmt */ - YYSYMBOL_begin_stmt = 85, /* begin_stmt */ - YYSYMBOL_commit_stmt = 86, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 87, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 88, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 89, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 90, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 91, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 92, /* create_index_stmt */ - YYSYMBOL_opt_unique = 93, /* opt_unique */ - YYSYMBOL_attr_list = 94, /* attr_list */ - YYSYMBOL_drop_index_stmt = 95, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 96, /* create_table_stmt */ - YYSYMBOL_create_view_stmt = 97, /* create_view_stmt */ - YYSYMBOL_drop_view_stmt = 98, /* drop_view_stmt */ - YYSYMBOL_attr_def_list = 99, /* attr_def_list */ - YYSYMBOL_attr_def = 100, /* attr_def */ - YYSYMBOL_nullable_constraint = 101, /* nullable_constraint */ - YYSYMBOL_type = 102, /* type */ - YYSYMBOL_insert_stmt = 103, /* insert_stmt */ - YYSYMBOL_values_list = 104, /* values_list */ - YYSYMBOL_value_list = 105, /* value_list */ - YYSYMBOL_value = 106, /* value */ - YYSYMBOL_nonnegative_value = 107, /* nonnegative_value */ - YYSYMBOL_storage_format = 108, /* storage_format */ - YYSYMBOL_delete_stmt = 109, /* delete_stmt */ - YYSYMBOL_update_stmt = 110, /* update_stmt */ - YYSYMBOL_set_clauses = 111, /* set_clauses */ - YYSYMBOL_setClause = 112, /* setClause */ - YYSYMBOL_select_stmt = 113, /* select_stmt */ - YYSYMBOL_calc_stmt = 114, /* calc_stmt */ - YYSYMBOL_expression_list = 115, /* expression_list */ - YYSYMBOL_expression = 116, /* expression */ - YYSYMBOL_alias = 117, /* alias */ - YYSYMBOL_func_expr = 118, /* func_expr */ - YYSYMBOL_sub_query_expr = 119, /* sub_query_expr */ - YYSYMBOL_rel_attr = 120, /* rel_attr */ - YYSYMBOL_relation = 121, /* relation */ - YYSYMBOL_rel_list = 122, /* rel_list */ - YYSYMBOL_join_clauses = 123, /* join_clauses */ - YYSYMBOL_where = 124, /* where */ - YYSYMBOL_condition = 125, /* condition */ - YYSYMBOL_comp_op = 126, /* comp_op */ - YYSYMBOL_opt_order_by = 127, /* opt_order_by */ - YYSYMBOL_sort_list = 128, /* sort_list */ - YYSYMBOL_sort_unit = 129, /* sort_unit */ - YYSYMBOL_group_by = 130, /* group_by */ - YYSYMBOL_opt_having = 131, /* opt_having */ - YYSYMBOL_opt_limit = 132, /* opt_limit */ - YYSYMBOL_explain_stmt = 133, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 134, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 135 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_HAVING = 11, /* HAVING */ + YYSYMBOL_ORDER = 12, /* ORDER */ + YYSYMBOL_TABLE = 13, /* TABLE */ + YYSYMBOL_TABLES = 14, /* TABLES */ + YYSYMBOL_INDEX = 15, /* INDEX */ + YYSYMBOL_CALC = 16, /* CALC */ + YYSYMBOL_SELECT = 17, /* SELECT */ + YYSYMBOL_DESC = 18, /* DESC */ + YYSYMBOL_SHOW = 19, /* SHOW */ + YYSYMBOL_SYNC = 20, /* SYNC */ + YYSYMBOL_INSERT = 21, /* INSERT */ + YYSYMBOL_DELETE = 22, /* DELETE */ + YYSYMBOL_UPDATE = 23, /* UPDATE */ + YYSYMBOL_LBRACE = 24, /* LBRACE */ + YYSYMBOL_RBRACE = 25, /* RBRACE */ + YYSYMBOL_LSBRACE = 26, /* LSBRACE */ + YYSYMBOL_RSBRACE = 27, /* RSBRACE */ + YYSYMBOL_COMMA = 28, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 29, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 30, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 31, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 32, /* INT_T */ + YYSYMBOL_IN = 33, /* IN */ + YYSYMBOL_STRING_T = 34, /* STRING_T */ + YYSYMBOL_FLOAT_T = 35, /* FLOAT_T */ + YYSYMBOL_DATE_T = 36, /* DATE_T */ + YYSYMBOL_TEXT_T = 37, /* TEXT_T */ + YYSYMBOL_VECTOR_T = 38, /* VECTOR_T */ + YYSYMBOL_NOT = 39, /* NOT */ + YYSYMBOL_UNIQUE = 40, /* UNIQUE */ + YYSYMBOL_NULL_T = 41, /* NULL_T */ + YYSYMBOL_LIMIT = 42, /* LIMIT */ + YYSYMBOL_NULLABLE = 43, /* NULLABLE */ + YYSYMBOL_HELP = 44, /* HELP */ + YYSYMBOL_QUOTE = 45, /* QUOTE */ + YYSYMBOL_EXIT = 46, /* EXIT */ + YYSYMBOL_DOT = 47, /* DOT */ + YYSYMBOL_INTO = 48, /* INTO */ + YYSYMBOL_VALUES = 49, /* VALUES */ + YYSYMBOL_FROM = 50, /* FROM */ + YYSYMBOL_WHERE = 51, /* WHERE */ + YYSYMBOL_AND = 52, /* AND */ + YYSYMBOL_OR = 53, /* OR */ + YYSYMBOL_SET = 54, /* SET */ + YYSYMBOL_ON = 55, /* ON */ + YYSYMBOL_INFILE = 56, /* INFILE */ + YYSYMBOL_EXPLAIN = 57, /* EXPLAIN */ + YYSYMBOL_STORAGE = 58, /* STORAGE */ + YYSYMBOL_FORMAT = 59, /* FORMAT */ + YYSYMBOL_INNER = 60, /* INNER */ + YYSYMBOL_JOIN = 61, /* JOIN */ + YYSYMBOL_VIEW = 62, /* VIEW */ + YYSYMBOL_EQ = 63, /* EQ */ + YYSYMBOL_LT = 64, /* LT */ + YYSYMBOL_GT = 65, /* GT */ + YYSYMBOL_LE = 66, /* LE */ + YYSYMBOL_GE = 67, /* GE */ + YYSYMBOL_NE = 68, /* NE */ + YYSYMBOL_LIKE = 69, /* LIKE */ + YYSYMBOL_IS = 70, /* IS */ + YYSYMBOL_NUMBER = 71, /* NUMBER */ + YYSYMBOL_FLOAT = 72, /* FLOAT */ + YYSYMBOL_ID = 73, /* ID */ + YYSYMBOL_SSS = 74, /* SSS */ + YYSYMBOL_75_ = 75, /* '+' */ + YYSYMBOL_76_ = 76, /* '-' */ + YYSYMBOL_77_ = 77, /* '*' */ + YYSYMBOL_78_ = 78, /* '/' */ + YYSYMBOL_UMINUS = 79, /* UMINUS */ + YYSYMBOL_YYACCEPT = 80, /* $accept */ + YYSYMBOL_commands = 81, /* commands */ + YYSYMBOL_command_wrapper = 82, /* command_wrapper */ + YYSYMBOL_exit_stmt = 83, /* exit_stmt */ + YYSYMBOL_help_stmt = 84, /* help_stmt */ + YYSYMBOL_sync_stmt = 85, /* sync_stmt */ + YYSYMBOL_begin_stmt = 86, /* begin_stmt */ + YYSYMBOL_commit_stmt = 87, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 88, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 89, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 90, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 91, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 92, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 93, /* create_index_stmt */ + YYSYMBOL_opt_unique = 94, /* opt_unique */ + YYSYMBOL_attr_list = 95, /* attr_list */ + YYSYMBOL_drop_index_stmt = 96, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 97, /* create_table_stmt */ + YYSYMBOL_create_view_stmt = 98, /* create_view_stmt */ + YYSYMBOL_drop_view_stmt = 99, /* drop_view_stmt */ + YYSYMBOL_attr_def_list = 100, /* attr_def_list */ + YYSYMBOL_attr_def = 101, /* attr_def */ + YYSYMBOL_nullable_constraint = 102, /* nullable_constraint */ + YYSYMBOL_type = 103, /* type */ + YYSYMBOL_insert_stmt = 104, /* insert_stmt */ + YYSYMBOL_values_list = 105, /* values_list */ + YYSYMBOL_value_list = 106, /* value_list */ + YYSYMBOL_value = 107, /* value */ + YYSYMBOL_nonnegative_value = 108, /* nonnegative_value */ + YYSYMBOL_storage_format = 109, /* storage_format */ + YYSYMBOL_delete_stmt = 110, /* delete_stmt */ + YYSYMBOL_update_stmt = 111, /* update_stmt */ + YYSYMBOL_set_clauses = 112, /* set_clauses */ + YYSYMBOL_setClause = 113, /* setClause */ + YYSYMBOL_select_stmt = 114, /* select_stmt */ + YYSYMBOL_calc_stmt = 115, /* calc_stmt */ + YYSYMBOL_expression_list = 116, /* expression_list */ + YYSYMBOL_expression = 117, /* expression */ + YYSYMBOL_alias = 118, /* alias */ + YYSYMBOL_func_expr = 119, /* func_expr */ + YYSYMBOL_sub_query_expr = 120, /* sub_query_expr */ + YYSYMBOL_rel_attr = 121, /* rel_attr */ + YYSYMBOL_relation = 122, /* relation */ + YYSYMBOL_rel_list = 123, /* rel_list */ + YYSYMBOL_join_clauses = 124, /* join_clauses */ + YYSYMBOL_where = 125, /* where */ + YYSYMBOL_condition = 126, /* condition */ + YYSYMBOL_comp_op = 127, /* comp_op */ + YYSYMBOL_opt_order_by = 128, /* opt_order_by */ + YYSYMBOL_sort_list = 129, /* sort_list */ + YYSYMBOL_sort_unit = 130, /* sort_unit */ + YYSYMBOL_group_by = 131, /* group_by */ + YYSYMBOL_opt_having = 132, /* opt_having */ + YYSYMBOL_opt_limit = 133, /* opt_limit */ + YYSYMBOL_explain_stmt = 134, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 135, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 136 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; + + + #ifdef short -#undef short +# undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure @@ -315,11 +331,11 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ -#include /* INFRINGES ON USER NAME SPACE */ -#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_STDINT_H -#endif +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif /* Narrow types that promote to a signed type and that can represent a @@ -349,15 +365,16 @@ typedef short yytype_int16; (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux -#undef UINT_LEAST8_MAX -#undef UINT_LEAST16_MAX -#define UINT_LEAST8_MAX 255 -#define UINT_LEAST16_MAX 65535 +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; @@ -367,7 +384,8 @@ typedef short yytype_uint8; #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; @@ -376,38 +394,42 @@ typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T -#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -#define YYPTRDIFF_T __PTRDIFF_TYPE__ -#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -#elif defined PTRDIFF_MAX -#ifndef ptrdiff_t -#include /* INFRINGES ON USER NAME SPACE */ -#endif -#define YYPTRDIFF_T ptrdiff_t -#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -#else -#define YYPTRDIFF_T long -#define YYPTRDIFF_MAXIMUM LONG_MAX -#endif +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T -#ifdef __SIZE_TYPE__ -#define YYSIZE_T __SIZE_TYPE__ -#elif defined size_t -#define YYSIZE_T size_t -#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -#include /* INFRINGES ON USER NAME SPACE */ -#define YYSIZE_T size_t -#else -#define YYSIZE_T unsigned -#endif +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif #endif -#define YYSIZE_MAXIMUM \ - YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1))) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) /* Stored state numbers (used for stacks). */ typedef yytype_int16 yy_state_t; @@ -416,2713 +438,621 @@ typedef yytype_int16 yy_state_t; typedef int yy_state_fast_t; #ifndef YY_ -#if defined YYENABLE_NLS && YYENABLE_NLS -#if ENABLE_NLS -#include /* INFRINGES ON USER NAME SPACE */ -#define YY_(Msgid) dgettext("bison-runtime", Msgid) -#endif -#endif -#ifndef YY_ -#define YY_(Msgid) Msgid -#endif +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif #endif + #ifndef YY_ATTRIBUTE_PURE -#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_PURE __attribute__((__pure__)) -#else -#define YY_ATTRIBUTE_PURE -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define YY_ATTRIBUTE_UNUSED -#endif +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ -#if !defined lint || defined __GNUC__ -#define YY_USE(E) ((void)(E)) +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) #else -#define YY_USE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -#if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -#endif -#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") -#else -#define YY_INITIAL_VALUE(Value) Value +# define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -#define YY_IGNORE_MAYBE_UNINITIALIZED_END +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE -#define YY_INITIAL_VALUE(Value) /* Nothing. */ +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ -#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") -#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_BEGIN -#define YY_IGNORE_USELESS_CAST_END +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END #endif -#define YY_ASSERT(E) ((void)(0 && (E))) + +#define YY_ASSERT(E) ((void) (0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ -#ifdef YYSTACK_USE_ALLOCA -#if YYSTACK_USE_ALLOCA -#ifdef __GNUC__ -#define YYSTACK_ALLOC __builtin_alloca -#elif defined __BUILTIN_VA_ARG_INCR -#include /* INFRINGES ON USER NAME SPACE */ -#elif defined _AIX -#define YYSTACK_ALLOC __alloca -#elif defined _MSC_VER -#include /* INFRINGES ON USER NAME SPACE */ -#define alloca _alloca -#else -#define YYSTACK_ALLOC alloca -#if !defined _ALLOCA_H && !defined EXIT_SUCCESS -#include /* INFRINGES ON USER NAME SPACE */ -/* Use EXIT_SUCCESS as a witness for stdlib.h. */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#endif -#endif -#endif - -#ifdef YYSTACK_ALLOC -/* Pacify GCC's 'empty if-body' warning. */ -#define YYSTACK_FREE(Ptr) \ - do { /* empty */ \ - ; \ - } while (0) -#ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -#endif -#else -#define YYSTACK_ALLOC YYMALLOC -#define YYSTACK_FREE YYFREE -#ifndef YYSTACK_ALLOC_MAXIMUM -#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -#endif -#if (defined __cplusplus && !defined EXIT_SUCCESS && \ - !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) -#include /* INFRINGES ON USER NAME SPACE */ -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef YYMALLOC -#define YYMALLOC malloc -#if !defined malloc && !defined EXIT_SUCCESS -void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#ifndef YYFREE -#define YYFREE free -#if !defined free && !defined EXIT_SUCCESS -void free(void *); /* INFRINGES ON USER NAME SPACE */ -#endif -#endif -#endif +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif #endif /* 1 */ -#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ - defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ -#define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM) +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) -#define YYCOPY_NEEDED 1 +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -#define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF(*yyptr); \ - } while (0) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ -#ifndef YYCOPY -#if defined __GNUC__ && 1 < __GNUC__ -#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) -#else -#define YYCOPY(Dst, Src, Count) \ - do { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } while (0) -#endif -#endif +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 73 +#define YYFINAL 74 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 288 +#define YYLAST 298 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 79 +#define YYNTOKENS 80 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 57 +#define YYNNTS 57 /* YYNRULES -- Number of rules. */ -#define YYNRULES 150 +#define YYNRULES 151 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 268 +#define YYNSTATES 273 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 329 +#define YYMAXUTOK 330 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_int8 yytranslate[] = {0, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 76, - 74, - 2, - 75, - 2, - 77, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 78}; +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 77, 75, 2, 76, 2, 78, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 79 +}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = {0, - 265, - 265, - 273, - 274, - 275, - 276, - 277, - 278, - 279, - 280, - 281, - 282, - 283, - 284, - 285, - 286, - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 298, - 304, - 309, - 315, - 321, - 327, - 333, - 340, - 346, - 354, - 364, - 379, - 380, - 384, - 390, - 399, - 409, - 413, - 417, - 421, - 425, - 432, - 440, - 452, - 462, - 465, - 478, - 496, - 525, - 529, - 533, - 538, - 544, - 545, - 546, - 547, - 548, - 549, - 553, - 563, - 577, - 583, - 590, - 596, - 604, - 607, - 611, - 618, - 622, - 626, - 632, - 635, - 642, - 645, - 652, - 664, - 678, - 683, - 690, - 700, - 738, - 771, - 777, - 786, - 789, - 798, - 814, - 817, - 820, - 823, - 826, - 834, - 837, - 842, - 848, - 851, - 854, - 857, - 864, - 867, - 870, - 875, - 882, - 889, - 894, - 904, - 910, - 920, - 937, - 944, - 956, - 959, - 965, - 969, - 976, - 980, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1005, - 1008, - 1016, - 1021, - 1029, - 1035, - 1041, - 1051, - 1054, - 1062, - 1065, - 1073, - 1076, - 1084, - 1092, - 1103}; +static const yytype_int16 yyrline[] = +{ + 0, 266, 266, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 299, 305, 310, 316, 322, + 328, 334, 341, 347, 355, 365, 380, 381, 385, 391, + 400, 410, 414, 418, 422, 426, 433, 441, 453, 463, + 466, 479, 497, 526, 530, 534, 539, 545, 546, 547, + 548, 549, 550, 554, 564, 578, 584, 591, 597, 605, + 608, 612, 619, 623, 627, 633, 636, 639, 646, 649, + 656, 668, 682, 687, 694, 704, 742, 775, 781, 790, + 793, 802, 818, 821, 824, 827, 830, 838, 841, 846, + 852, 855, 858, 861, 868, 871, 874, 879, 886, 893, + 898, 908, 914, 924, 941, 948, 960, 963, 969, 973, + 980, 984, 991, 992, 993, 994, 995, 996, 997, 998, + 999, 1000, 1001, 1002, 1003, 1004, 1009, 1012, 1020, 1025, + 1033, 1039, 1045, 1055, 1058, 1066, 1069, 1077, 1080, 1088, + 1096, 1107 +}; #endif /** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = {"\"end of file\"", - "error", - "\"invalid token\"", - "SEMICOLON", - "AS", - "ASC", - "BY", - "CREATE", - "DROP", - "EXISTS", - "GROUP", - "HAVING", - "ORDER", - "TABLE", - "TABLES", - "INDEX", - "CALC", - "SELECT", - "DESC", - "SHOW", - "SYNC", - "INSERT", - "DELETE", - "UPDATE", - "LBRACE", - "RBRACE", - "LSBRACE", - "RSBRACE", - "COMMA", - "TRX_BEGIN", - "TRX_COMMIT", - "TRX_ROLLBACK", - "INT_T", - "IN", - "STRING_T", - "FLOAT_T", - "DATE_T", - "TEXT_T", - "VECTOR_T", - "NOT", - "UNIQUE", - "NULL_T", - "LIMIT", - "NULLABLE", - "HELP", - "EXIT", - "DOT", - "INTO", - "VALUES", - "FROM", - "WHERE", - "AND", - "OR", - "SET", - "ON", - "INFILE", - "EXPLAIN", - "STORAGE", - "FORMAT", - "INNER", - "JOIN", - "VIEW", - "EQ", - "LT", - "GT", - "LE", - "GE", - "NE", - "LIKE", - "IS", - "NUMBER", - "FLOAT", - "ID", - "SSS", - "'+'", - "'-'", - "'*'", - "'/'", - "UMINUS", - "$accept", - "commands", - "command_wrapper", - "exit_stmt", - "help_stmt", - "sync_stmt", - "begin_stmt", - "commit_stmt", - "rollback_stmt", - "drop_table_stmt", - "show_tables_stmt", - "desc_table_stmt", - "show_index_stmt", - "create_index_stmt", - "opt_unique", - "attr_list", - "drop_index_stmt", - "create_table_stmt", - "create_view_stmt", - "drop_view_stmt", - "attr_def_list", - "attr_def", - "nullable_constraint", - "type", - "insert_stmt", - "values_list", - "value_list", - "value", - "nonnegative_value", - "storage_format", - "delete_stmt", - "update_stmt", - "set_clauses", - "setClause", - "select_stmt", - "calc_stmt", - "expression_list", - "expression", - "alias", - "func_expr", - "sub_query_expr", - "rel_attr", - "relation", - "rel_list", - "join_clauses", - "where", - "condition", - "comp_op", - "opt_order_by", - "sort_list", - "sort_unit", - "group_by", - "opt_having", - "opt_limit", - "explain_stmt", - "set_variable_stmt", - "opt_semicolon", - YY_NULLPTR}; - -static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "SEMICOLON", "AS", + "ASC", "BY", "CREATE", "DROP", "EXISTS", "GROUP", "HAVING", "ORDER", + "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", + "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "LSBRACE", "RSBRACE", + "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", + "STRING_T", "FLOAT_T", "DATE_T", "TEXT_T", "VECTOR_T", "NOT", "UNIQUE", + "NULL_T", "LIMIT", "NULLABLE", "HELP", "QUOTE", "EXIT", "DOT", "INTO", + "VALUES", "FROM", "WHERE", "AND", "OR", "SET", "ON", "INFILE", "EXPLAIN", + "STORAGE", "FORMAT", "INNER", "JOIN", "VIEW", "EQ", "LT", "GT", "LE", + "GE", "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", + "'*'", "'/'", "UMINUS", "$accept", "commands", "command_wrapper", + "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", "commit_stmt", + "rollback_stmt", "drop_table_stmt", "show_tables_stmt", + "desc_table_stmt", "show_index_stmt", "create_index_stmt", "opt_unique", + "attr_list", "drop_index_stmt", "create_table_stmt", "create_view_stmt", + "drop_view_stmt", "attr_def_list", "attr_def", "nullable_constraint", + "type", "insert_stmt", "values_list", "value_list", "value", + "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", + "set_clauses", "setClause", "select_stmt", "calc_stmt", + "expression_list", "expression", "alias", "func_expr", "sub_query_expr", + "rel_attr", "relation", "rel_list", "join_clauses", "where", "condition", + "comp_op", "opt_order_by", "sort_list", "sort_unit", "group_by", + "opt_having", "opt_limit", "explain_stmt", "set_variable_stmt", + "opt_semicolon", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -#define YYPACT_NINF (-190) +#define YYPACT_NINF (-194) -#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yyn) 0 +#define yytable_value_is_error(Yyn) \ + 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {232, - 4, - 5, - 136, - 136, - -50, - 14, - -190, - -17, - 20, - -15, - -190, - -190, - -190, - -190, - -190, - 41, - 232, - 94, - 103, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - 43, - -190, - 70, - 106, - 72, - 73, - 77, - 81, - 29, - -190, - -190, - -190, - -9, - -190, - 136, - -190, - -190, - -190, - 12, - -190, - -190, - -190, - 101, - -190, - -190, - 109, - 83, - 87, - 90, - 108, - -190, - -190, - -190, - -190, - -5, - 22, - 100, - -190, - 119, - -190, - 136, - 149, - 150, - 49, - 105, - -190, - -190, - 136, - -45, - -190, - 104, - -190, - 136, - 136, - 136, - 136, - 151, - 111, - 111, - -12, - 128, - 112, - 29, - 113, - 122, - 21, - 172, - 118, - 137, - 120, - 101, - -190, - -190, - -190, - -190, - -190, - 29, - 168, - -190, - -190, - -190, - 58, - 58, - -190, - -190, - 136, - -190, - 31, - 128, - -190, - 118, - 170, - 162, - -190, - 135, - -7, - -190, - -190, - 129, - 174, - 138, - 172, - -190, - -190, - 176, - 173, - 133, - -190, - -190, - -190, - -190, - 153, - 186, - 205, - 191, - 29, - 189, - -190, - -190, - 0, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - 180, - 62, - 89, - 136, - 136, - 112, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - 8, - 113, - 195, - 164, - -190, - 118, - 217, - 198, - 111, - 111, - 235, - 212, - 194, - 28, - 219, - -190, - -190, - -190, - -190, - 136, - 162, - 162, - -1, - -1, - -190, - 175, - 203, - -190, - -190, - -190, - 174, - 190, - -190, - -190, - 172, - 118, - 192, - 128, - 19, - -190, - 136, - 162, - 244, - 170, - -190, - 29, - -1, - -190, - 206, - 233, - -190, - -190, - 50, - -190, - 234, - 162, - 205, - -190, - 89, - 254, - 222, - 189, - 34, - 71, - 172, - -190, - -190, - 57, - -190, - 136, - 196, - -190, - -190, - -190, - -190, - 207, - 6, - -190, - 237, - -190, - 111, - -190, - -190, - 136, - -190, - -190}; +static const yytype_int16 yypact[] = +{ + 241, 6, 5, 86, 86, -40, 103, -194, -22, -19, + -18, -194, -194, -194, -194, -194, -12, 241, 73, 66, + -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, + -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, + -194, -194, 2, -194, 19, 83, 36, 64, 68, 154, + 179, -194, 85, -194, -194, -3, -194, 86, -194, -194, + -194, 13, -194, -194, -194, 89, -194, -194, 105, 88, + 91, 102, 104, -194, -194, -194, -194, -8, 28, 92, + -194, 111, -194, 86, 143, 144, 57, 116, -194, -194, + 179, 86, -50, -194, 97, -194, 86, 86, 86, 86, + 145, 108, 108, -11, 124, 109, 179, 110, 117, 49, + 160, 112, 129, 114, 89, -194, -194, -194, -194, -194, + 179, 119, 163, -194, -194, -194, 71, 71, -194, -194, + 86, -194, 20, 124, -194, 112, 165, 170, -194, 128, + 0, -194, -194, 98, 169, 130, 160, -194, -194, 173, + 177, 125, -194, -194, 161, -194, -194, 146, 180, 200, + 187, 179, 185, -194, -194, 1, -194, -194, -194, -194, + -194, -194, -194, 178, 38, 101, 86, 86, 109, -194, + -194, -194, -194, -194, -194, -194, 15, 110, 191, 148, + -194, 112, 214, 195, -194, 108, 108, 216, 218, 183, + 32, 221, -194, -194, -194, -194, 86, 170, 170, 47, + 47, -194, 181, 213, -194, -194, -194, 169, 198, -194, + -194, 160, 112, 210, 124, 3, -194, 86, 170, 254, + 165, -194, 179, 47, -194, 215, 243, -194, -194, 55, + -194, 244, 170, 200, -194, 101, 267, 232, 185, 69, + 99, 160, -194, -194, -23, -194, 86, 204, -194, -194, + -194, -194, 217, 7, -194, 248, -194, 108, -194, -194, + 86, -194, -194 +}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = {0, - 37, - 0, - 88, - 88, - 0, - 0, - 27, - 0, - 0, - 0, - 28, - 29, - 30, - 26, - 25, - 0, - 0, - 0, - 0, - 24, - 23, - 17, - 18, - 19, - 20, - 9, - 10, - 11, - 14, - 12, - 13, - 8, - 15, - 16, - 5, - 7, - 6, - 3, - 4, - 21, - 22, - 0, - 36, - 0, - 0, - 0, - 0, - 0, - 88, - 0, - 75, - 72, - 73, - 108, - 74, - 0, - 99, - 97, - 86, - 103, - 101, - 102, - 98, - 87, - 33, - 32, - 0, - 0, - 0, - 0, - 0, - 148, - 1, - 150, - 2, - 77, - 0, - 0, - 31, - 0, - 48, - 88, - 0, - 0, - 0, - 0, - 67, - 69, - 88, - 0, - 96, - 0, - 104, - 0, - 0, - 0, - 0, - 89, - 0, - 0, - 0, - 115, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 107, - 95, - 70, - 71, - 76, - 0, - 0, - 109, - 100, - 105, - 91, - 92, - 93, - 94, - 88, - 110, - 103, - 115, - 34, - 0, - 0, - 0, - 79, - 0, - 115, - 81, - 149, - 0, - 49, - 0, - 0, - 45, - 46, - 38, - 0, - 0, - 40, - 68, - 106, - 90, - 0, - 111, - 142, - 0, - 0, - 63, - 133, - 131, - 0, - 121, - 122, - 123, - 124, - 125, - 126, - 129, - 127, - 0, - 116, - 0, - 0, - 0, - 80, - 57, - 58, - 59, - 60, - 61, - 62, - 56, - 0, - 0, - 0, - 44, - 0, - 0, - 0, - 0, - 0, - 0, - 144, - 0, - 0, - 0, - 134, - 132, - 130, - 128, - 0, - 0, - 0, - 118, - 83, - 82, - 0, - 0, - 55, - 54, - 52, - 49, - 77, - 78, - 39, - 0, - 0, - 0, - 115, - 103, - 112, - 88, - 0, - 135, - 0, - 65, - 0, - 117, - 119, - 120, - 0, - 53, - 50, - 43, - 47, - 0, - 0, - 142, - 143, - 145, - 0, - 146, - 64, - 0, - 56, - 0, - 42, - 35, - 113, - 85, - 0, - 0, - 84, - 66, - 51, - 41, - 0, - 139, - 136, - 137, - 147, - 0, - 141, - 140, - 0, - 114, - 138}; +static const yytype_uint8 yydefact[] = +{ + 0, 37, 0, 89, 89, 0, 0, 27, 0, 0, + 0, 28, 29, 30, 26, 25, 0, 0, 0, 0, + 24, 23, 17, 18, 19, 20, 9, 10, 11, 14, + 12, 13, 8, 15, 16, 5, 7, 6, 3, 4, + 21, 22, 0, 36, 0, 0, 0, 0, 0, 89, + 0, 75, 0, 72, 73, 109, 74, 0, 100, 98, + 87, 104, 102, 103, 99, 88, 33, 32, 0, 0, + 0, 0, 0, 149, 1, 151, 2, 78, 0, 0, + 31, 0, 48, 89, 0, 0, 0, 0, 67, 69, + 0, 89, 0, 97, 0, 105, 0, 0, 0, 0, + 90, 0, 0, 0, 116, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 108, 96, 70, 71, 76, + 0, 0, 0, 110, 101, 106, 92, 93, 94, 95, + 89, 111, 104, 116, 34, 0, 0, 0, 80, 0, + 116, 82, 150, 0, 49, 0, 0, 45, 46, 38, + 0, 0, 40, 68, 0, 107, 91, 0, 112, 143, + 0, 0, 63, 134, 132, 0, 122, 123, 124, 125, + 126, 127, 130, 128, 0, 117, 0, 0, 0, 81, + 57, 58, 59, 60, 61, 62, 56, 0, 0, 0, + 44, 0, 0, 0, 77, 0, 0, 0, 145, 0, + 0, 0, 135, 133, 131, 129, 0, 0, 0, 119, + 84, 83, 0, 0, 55, 54, 52, 49, 78, 79, + 39, 0, 0, 0, 116, 104, 113, 89, 0, 136, + 0, 65, 0, 118, 120, 121, 0, 53, 50, 43, + 47, 0, 0, 143, 144, 146, 0, 147, 64, 0, + 56, 0, 42, 35, 114, 86, 0, 0, 85, 66, + 51, 41, 0, 140, 137, 138, 148, 0, 142, 141, + 0, 115, 139 +}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-190, - -190, - 251, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -190, - -124, - -190, - -190, - -190, - -190, - 59, - 86, - 25, - -190, - -190, - 47, - -150, - -54, - -46, - 60, - -190, - -190, - -190, - 107, - -47, - -190, - -4, - -55, - 214, - -190, - -190, - -190, - -94, - 84, - 16, - -127, - -189, - 110, - -190, - 17, - -190, - 45, - -190, - -190, - -190, - -190, - -190}; +static const yytype_int16 yypgoto[] = +{ + -194, -194, 260, -194, -194, -194, -194, -194, -194, -194, + -194, -194, -194, -194, -194, -126, -194, -194, -194, -194, + 62, 93, 31, -194, -194, 52, -87, -84, -42, 65, + -194, -194, -194, 106, -47, -194, -4, -56, 225, -194, + -194, -194, -96, 94, 21, -129, -193, 115, -194, 22, + -194, 48, -194, -194, -194, -194, -194 +}; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = {0, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 45, - 147, - 31, - 32, - 33, - 34, - 184, - 141, - 211, - 182, - 35, - 158, - 86, - 87, - 58, - 107, - 36, - 37, - 137, - 138, - 38, - 39, - 59, - 60, - 154, - 61, - 62, - 63, - 218, - 130, - 219, - 135, - 171, - 172, - 242, - 259, - 260, - 193, - 224, - 253, - 40, - 41, - 75}; +static const yytype_int16 yydefgoto[] = +{ + 0, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 45, 150, 31, 32, 33, 34, + 188, 144, 216, 186, 35, 162, 87, 88, 59, 109, + 36, 37, 140, 141, 38, 39, 60, 61, 158, 62, + 63, 64, 223, 133, 224, 138, 175, 176, 247, 264, + 265, 198, 229, 258, 40, 41, 76 +}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = {64, - 91, - 83, - 155, - 88, - 129, - 131, - 195, - 156, - 197, - 175, - 263, - 132, - 229, - 230, - 89, - 92, - 42, - 46, - 105, - 47, - 174, - 65, - 92, - 264, - 143, - 108, - 120, - 66, - 67, - 68, - 121, - 207, - 198, - 240, - 92, - 133, - 90, - 82, - 123, - 124, - 125, - 126, - 134, - 43, - 84, - 109, - 208, - 249, - 209, - 139, - 210, - 106, - 226, - 246, - 50, - 118, - 70, - 88, - 254, - 144, - 145, - 118, - 215, - 150, - 44, - 48, - 82, - 199, - 69, - 51, - 159, - 88, - 94, - 95, - 96, - 97, - 244, - 112, - 170, - 94, - 95, - 96, - 97, - 93, - 119, - 94, - 95, - 96, - 97, - 153, - 93, - 238, - 236, - 73, - 160, - 186, - 220, - 82, - 52, - 53, - 161, - 55, - 93, - 85, - 49, - 74, - 50, - 202, - 203, - 208, - 88, - 209, - 71, - 210, - 76, - 257, - 204, - 205, - 115, - 116, - 78, - 51, - 152, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 117, - 118, - 96, - 97, - 94, - 95, - 96, - 97, - 202, - 203, - 77, - 103, - 79, - 80, - 228, - 170, - 170, - 81, - 99, - 52, - 53, - 54, - 55, - 101, - 56, - 57, - 100, - 102, - 49, - 176, - 50, - 177, - 178, - 179, - 180, - 181, - 170, - 235, - 104, - 159, - 110, - 111, - 113, - 114, - 122, - 51, - 134, - 127, - 142, - 88, - 170, - 128, - 136, - 140, - 49, - 247, - 50, - 82, - 146, - 148, - 149, - 151, - 157, - 160, - 258, - 173, - 188, - 256, - 185, - 161, - 183, - 51, - 187, - 189, - 52, - 53, - 54, - 55, - 258, - 56, - 57, - 190, - 191, - 192, - 194, - 196, - 239, - 200, - 213, - 216, - 217, - 223, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 52, - 53, - 54, - 55, - 214, - 56, - 57, - 1, - 2, - 222, - 225, - 227, - 232, - 231, - 237, - 106, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 241, - 202, - 245, - 248, - 251, - 11, - 12, - 13, - 252, - 265, - 261, - 262, - 72, - 212, - 255, - 233, - 243, - 234, - 98, - 221, - 14, - 15, - 266, - 0, - 201, - 206, - 267, - 250, - 0, - 16, - 0, - 0, - 17}; - -static const yytype_int16 yycheck[] = {4, - 56, - 49, - 130, - 50, - 99, - 100, - 157, - 132, - 9, - 137, - 5, - 24, - 202, - 203, - 24, - 4, - 13, - 13, - 24, - 15, - 28, - 72, - 4, - 18, - 4, - 4, - 72, - 14, - 15, - 47, - 76, - 24, - 33, - 223, - 4, - 48, - 46, - 17, - 94, - 95, - 96, - 97, - 50, - 40, - 49, - 24, - 39, - 237, - 41, - 104, - 43, - 57, - 25, - 4, - 26, - 28, - 72, - 104, - 25, - 107, - 108, - 28, - 187, - 118, - 61, - 61, - 17, - 68, - 49, - 41, - 9, - 118, - 74, - 75, - 76, - 77, - 227, - 82, - 134, - 74, - 75, - 76, - 77, - 72, - 89, - 74, - 75, - 76, - 77, - 59, - 72, - 219, - 217, - 0, - 33, - 143, - 191, - 17, - 70, - 71, - 39, - 73, - 72, - 75, - 24, - 3, - 26, - 51, - 52, - 39, - 157, - 41, - 72, - 43, - 72, - 59, - 172, - 173, - 70, - 71, - 15, - 41, - 127, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 27, - 28, - 76, - 77, - 74, - 75, - 76, - 77, - 51, - 52, - 72, - 53, - 72, - 72, - 201, - 202, - 203, - 72, - 49, - 70, - 71, - 72, - 73, - 72, - 75, - 76, - 49, - 72, - 24, - 32, - 26, - 34, - 35, - 36, - 37, - 38, - 223, - 216, - 62, - 9, - 72, - 54, - 25, - 25, - 72, - 41, - 50, - 28, - 58, - 227, - 237, - 72, - 72, - 72, - 24, - 234, - 26, - 17, - 72, - 54, - 72, - 25, - 24, - 33, - 251, - 62, - 25, - 246, - 62, - 39, - 28, - 41, - 28, - 72, - 70, - 71, - 72, - 73, - 265, - 75, - 76, - 60, - 28, - 10, - 25, - 28, - 222, - 39, - 25, - 4, - 24, - 11, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 72, - 75, - 76, - 7, - 8, - 6, - 48, - 24, - 41, - 70, - 54, - 57, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 12, - 51, - 25, - 25, - 6, - 29, - 30, - 31, - 42, - 28, - 70, - 60, - 17, - 183, - 245, - 212, - 225, - 213, - 60, - 191, - 44, - 45, - 262, - -1, - 170, - 174, - 265, - 238, - -1, - 53, - -1, - -1, - 56}; +static const yytype_int16 yytable[] = +{ + 65, 93, 84, 121, 159, 132, 134, 94, 89, 160, + 202, 179, 268, 135, 234, 235, 107, 94, 46, 42, + 47, 91, 142, 123, 94, 269, 69, 124, 178, 207, + 208, 70, 110, 66, 203, 245, 153, 262, 136, 212, + 126, 127, 128, 129, 92, 85, 43, 163, 89, 254, + 108, 137, 111, 146, 213, 71, 214, 231, 215, 251, + 120, 72, 147, 148, 89, 220, 83, 48, 44, 75, + 204, 164, 83, 74, 200, 77, 95, 165, 89, 114, + 157, 174, 96, 97, 98, 99, 95, 122, 96, 97, + 98, 99, 78, 95, 259, 243, 241, 120, 79, 190, + 225, 166, 167, 168, 169, 170, 171, 172, 173, 80, + 49, 90, 50, 96, 97, 98, 99, 67, 68, 89, + 209, 210, 96, 97, 98, 99, 156, 51, 117, 118, + 180, 52, 181, 182, 183, 184, 185, 81, 213, 101, + 214, 82, 215, 119, 120, 249, 154, 120, 98, 99, + 233, 174, 174, 207, 208, 102, 105, 53, 54, 55, + 56, 103, 57, 58, 104, 112, 113, 106, 115, 116, + 125, 83, 174, 130, 240, 137, 145, 83, 49, 163, + 50, 131, 139, 143, 151, 149, 174, 152, 155, 161, + 89, 177, 252, 189, 49, 51, 50, 187, 193, 52, + 263, 191, 192, 164, 261, 50, 194, 195, 196, 165, + 197, 51, 199, 201, 263, 52, 218, 205, 221, 222, + 51, 219, 227, 244, 52, 53, 54, 55, 56, 228, + 57, 58, 230, 166, 167, 168, 169, 170, 171, 172, + 173, 53, 54, 55, 56, 232, 57, 58, 1, 2, + 53, 54, 236, 56, 237, 86, 108, 3, 4, 5, + 6, 7, 8, 9, 10, 242, 246, 207, 250, 253, + 11, 12, 13, 256, 257, 266, 270, 73, 267, 238, + 217, 260, 248, 239, 211, 14, 100, 15, 271, 206, + 226, 255, 272, 0, 0, 16, 0, 0, 17 +}; + +static const yytype_int16 yycheck[] = +{ + 4, 57, 49, 90, 133, 101, 102, 4, 50, 135, + 9, 140, 5, 24, 207, 208, 24, 4, 13, 13, + 15, 24, 106, 73, 4, 18, 48, 77, 28, 52, + 53, 50, 4, 73, 33, 228, 120, 60, 49, 24, + 96, 97, 98, 99, 47, 49, 40, 9, 90, 242, + 58, 51, 24, 4, 39, 73, 41, 25, 43, 4, + 28, 73, 109, 110, 106, 191, 17, 62, 62, 3, + 69, 33, 17, 0, 161, 73, 73, 39, 120, 83, + 60, 137, 75, 76, 77, 78, 73, 91, 75, 76, + 77, 78, 73, 73, 25, 224, 222, 28, 15, 146, + 196, 63, 64, 65, 66, 67, 68, 69, 70, 73, + 24, 26, 26, 75, 76, 77, 78, 14, 15, 161, + 176, 177, 75, 76, 77, 78, 130, 41, 71, 72, + 32, 45, 34, 35, 36, 37, 38, 73, 39, 50, + 41, 73, 43, 27, 28, 232, 27, 28, 77, 78, + 206, 207, 208, 52, 53, 50, 54, 71, 72, 73, + 74, 73, 76, 77, 73, 73, 55, 63, 25, 25, + 73, 17, 228, 28, 221, 51, 59, 17, 24, 9, + 26, 73, 73, 73, 55, 73, 242, 73, 25, 24, + 232, 63, 239, 63, 24, 41, 26, 28, 73, 45, + 256, 28, 25, 33, 251, 26, 45, 61, 28, 39, + 10, 41, 25, 28, 270, 45, 25, 39, 4, 24, + 41, 73, 6, 227, 45, 71, 72, 73, 74, 11, + 76, 77, 49, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 24, 76, 77, 7, 8, + 71, 72, 71, 74, 41, 76, 58, 16, 17, 18, + 19, 20, 21, 22, 23, 55, 12, 52, 25, 25, + 29, 30, 31, 6, 42, 71, 28, 17, 61, 217, + 187, 250, 230, 218, 178, 44, 61, 46, 267, 174, + 196, 243, 270, -1, -1, 54, -1, -1, 57 +}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = {0, - 7, - 8, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 29, - 30, - 31, - 44, - 45, - 53, - 56, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 95, - 96, - 97, - 98, - 103, - 109, - 110, - 113, - 114, - 133, - 134, - 13, - 40, - 61, - 93, - 13, - 15, - 61, - 24, - 26, - 41, - 70, - 71, - 72, - 73, - 75, - 76, - 107, - 115, - 116, - 118, - 119, - 120, - 115, - 72, - 14, - 15, - 47, - 49, - 72, - 72, - 81, - 0, - 3, - 135, - 72, - 72, - 15, - 72, - 72, - 72, - 17, - 113, - 115, - 75, - 105, - 106, - 107, - 24, - 46, - 116, - 4, - 72, - 74, - 75, - 76, - 77, - 117, - 49, - 49, - 72, - 72, - 53, - 62, - 24, - 57, - 108, - 4, - 24, - 72, - 54, - 115, - 25, - 25, - 70, - 71, - 27, - 28, - 115, - 72, - 76, - 72, - 116, - 116, - 116, - 116, - 28, - 72, - 121, - 122, - 121, - 24, - 48, - 50, - 124, - 72, - 111, - 112, - 106, - 72, - 100, - 58, - 4, - 113, - 113, - 72, - 94, - 54, - 72, - 106, - 25, - 115, - 59, - 117, - 124, - 94, - 24, - 104, - 9, - 33, - 39, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 116, - 125, - 126, - 62, - 28, - 124, - 32, - 34, - 35, - 36, - 37, - 38, - 102, - 28, - 99, - 62, - 113, - 28, - 25, - 72, - 60, - 28, - 10, - 130, - 25, - 105, - 28, - 9, - 33, - 68, - 39, - 126, - 51, - 52, - 116, - 116, - 112, - 24, - 39, - 41, - 43, - 101, - 100, - 25, - 72, - 94, - 4, - 24, - 121, - 123, - 121, - 122, - 6, - 11, - 131, - 48, - 25, - 24, - 116, - 125, - 125, - 70, - 41, - 99, - 108, - 113, - 94, - 54, - 124, - 115, - 125, - 12, - 127, - 104, - 105, - 25, - 4, - 113, - 25, - 125, - 130, - 6, - 42, - 132, - 25, - 101, - 113, - 59, - 116, - 128, - 129, - 70, - 60, - 5, - 18, - 28, - 123, - 128}; +static const yytype_uint8 yystos[] = +{ + 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, + 23, 29, 30, 31, 44, 46, 54, 57, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 96, 97, 98, 99, 104, 110, 111, 114, 115, + 134, 135, 13, 40, 62, 94, 13, 15, 62, 24, + 26, 41, 45, 71, 72, 73, 74, 76, 77, 108, + 116, 117, 119, 120, 121, 116, 73, 14, 15, 48, + 50, 73, 73, 82, 0, 3, 136, 73, 73, 15, + 73, 73, 73, 17, 114, 116, 76, 106, 107, 108, + 26, 24, 47, 117, 4, 73, 75, 76, 77, 78, + 118, 50, 50, 73, 73, 54, 63, 24, 58, 109, + 4, 24, 73, 55, 116, 25, 25, 71, 72, 27, + 28, 106, 116, 73, 77, 73, 117, 117, 117, 117, + 28, 73, 122, 123, 122, 24, 49, 51, 125, 73, + 112, 113, 107, 73, 101, 59, 4, 114, 114, 73, + 95, 55, 73, 107, 27, 25, 116, 60, 118, 125, + 95, 24, 105, 9, 33, 39, 63, 64, 65, 66, + 67, 68, 69, 70, 117, 126, 127, 63, 28, 125, + 32, 34, 35, 36, 37, 38, 103, 28, 100, 63, + 114, 28, 25, 73, 45, 61, 28, 10, 131, 25, + 106, 28, 9, 33, 69, 39, 127, 52, 53, 117, + 117, 113, 24, 39, 41, 43, 102, 101, 25, 73, + 95, 4, 24, 122, 124, 122, 123, 6, 11, 132, + 49, 25, 24, 117, 126, 126, 71, 41, 100, 109, + 114, 95, 55, 125, 116, 126, 12, 128, 105, 106, + 25, 4, 114, 25, 126, 131, 6, 42, 133, 25, + 102, 114, 60, 117, 129, 130, 71, 61, 5, 18, + 28, 124, 129 +}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = {0, - 79, - 80, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 93, - 94, - 94, - 95, - 96, - 96, - 96, - 96, - 96, - 97, - 97, - 98, - 99, - 99, - 100, - 100, - 101, - 101, - 101, - 101, - 102, - 102, - 102, - 102, - 102, - 102, - 103, - 103, - 104, - 104, - 105, - 105, - 106, - 106, - 106, - 107, - 107, - 107, - 107, - 107, - 108, - 108, - 109, - 110, - 111, - 111, - 112, - 113, - 113, - 114, - 114, - 115, - 115, - 115, - 116, - 116, - 116, - 116, - 116, - 116, - 116, - 116, - 116, - 116, - 116, - 116, - 117, - 117, - 117, - 118, - 119, - 120, - 120, - 121, - 122, - 122, - 123, - 123, - 124, - 124, - 125, - 125, - 125, - 125, - 126, - 126, - 126, - 126, - 126, - 126, - 126, - 126, - 126, - 126, - 126, - 126, - 126, - 126, - 127, - 127, - 128, - 128, - 129, - 129, - 129, - 130, - 130, - 131, - 131, - 132, - 132, - 133, - 134, - 135}; +static const yytype_uint8 yyr1[] = +{ + 0, 80, 81, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 94, 95, 95, + 96, 97, 97, 97, 97, 97, 98, 98, 99, 100, + 100, 101, 101, 102, 102, 102, 102, 103, 103, 103, + 103, 103, 103, 104, 104, 105, 105, 106, 106, 107, + 107, 107, 108, 108, 108, 108, 108, 108, 109, 109, + 110, 111, 112, 112, 113, 114, 114, 115, 115, 116, + 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 118, 118, 118, 119, 120, 121, + 121, 122, 123, 123, 124, 124, 125, 125, 126, 126, + 126, 126, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 128, 128, 129, 129, + 130, 130, 130, 131, 131, 132, 132, 133, 133, 134, + 135, 136 +}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -static const yytype_int8 yyr2[] = {0, - 2, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 3, - 2, - 2, - 4, - 9, - 1, - 0, - 1, - 3, - 5, - 10, - 9, - 8, - 6, - 5, - 5, - 8, - 3, - 0, - 3, - 6, - 3, - 2, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 5, - 8, - 3, - 5, - 1, - 3, - 1, - 2, - 2, - 1, - 1, - 1, - 1, - 3, - 0, - 4, - 4, - 5, - 1, - 3, - 3, - 9, - 9, - 2, - 2, - 0, - 2, - 4, - 3, - 3, - 3, - 3, - 3, - 2, - 1, - 1, - 1, - 3, - 1, - 1, - 0, - 1, - 2, - 4, - 3, - 1, - 3, - 1, - 2, - 4, - 3, - 6, - 0, - 2, - 3, - 2, - 3, - 3, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 0, - 3, - 1, - 3, - 1, - 2, - 2, - 0, - 3, - 0, - 2, - 0, - 2, - 2, - 4, - 1}; - -enum +static const yytype_int8 yyr2[] = { - YYENOMEM = -2 + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 2, 2, 4, 9, 1, 0, 1, 3, + 5, 10, 9, 8, 6, 5, 5, 8, 3, 0, + 3, 6, 3, 2, 1, 1, 0, 1, 1, 1, + 1, 1, 1, 5, 8, 3, 5, 1, 3, 1, + 2, 2, 1, 1, 1, 1, 3, 5, 0, 4, + 4, 5, 1, 3, 3, 9, 9, 2, 2, 0, + 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, + 1, 3, 1, 1, 0, 1, 2, 4, 3, 1, + 3, 1, 2, 4, 3, 6, 0, 2, 3, 2, + 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, + 1, 2, 1, 2, 1, 2, 0, 3, 1, 3, + 1, 2, 2, 0, 3, 0, 2, 0, 2, 2, + 4, 1 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY) { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK(yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } else { \ - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) /* Backward compatibility with an undocumented macro. @@ -3134,131 +1064,151 @@ enum the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } else { \ - (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ - } \ - while (0) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* Enable debugging if requested. */ #if YYDEBUG -#ifndef YYFPRINTF -#include /* INFRINGES ON USER NAME SPACE */ -#define YYFPRINTF fprintf -#endif +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -#define YYDPRINTF(Args) \ - do { \ - if (yydebug) \ - YYFPRINTF Args; \ - } while (0) /* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YYLOCATION_PRINT +# ifndef YYLOCATION_PRINT -#if defined YY_LOCATION_PRINT +# if defined YY_LOCATION_PRINT -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) -#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - int res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) { - res += YYFPRINTF(yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF(yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) { - if (yylocp->first_line < yylocp->last_line) { - res += YYFPRINTF(yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF(yyo, ".%d", end_col); - } else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF(yyo, "-%d", end_col); - } + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } return res; } -#define YYLOCATION_PRINT yy_location_print_ +# define YYLOCATION_PRINT yy_location_print_ -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) -#else +# else -#define YYLOCATION_PRINT(File, Loc) ((void)0) -/* Temporary convenience wrapper in case some people defined the - undocumented and private YY_LOCATION_PRINT macros. */ -#define YY_LOCATION_PRINT YYLOCATION_PRINT +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT -#endif -#endif /* !defined YYLOCATION_PRINT */ +# endif +# endif /* !defined YYLOCATION_PRINT */ + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, sql_string, sql_result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ - do { \ - if (yydebug) { \ - YYFPRINTF(stderr, "%s ", Title); \ - yy_symbol_print(stderr, Kind, Value, Location, sql_string, sql_result, scanner); \ - YYFPRINTF(stderr, "\n"); \ - } \ - } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ -static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { FILE *yyoutput = yyo; - YY_USE(yyoutput); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ -static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, - YYLTYPE const *const yylocationp, const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YYLOCATION_PRINT(yyo, yylocationp); - YYFPRINTF(yyo, ": "); - yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); - YYFPRINTF(yyo, ")"); + YYLOCATION_PRINT (yyo, yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, sql_string, sql_result, scanner); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -3266,66 +1216,70 @@ static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *co | TOP (included). | `------------------------------------------------------------------*/ -static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { - YYFPRINTF(stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) { - int yybot = *yybottom; - YYFPRINTF(stderr, " %d", yybot); - } - YYFPRINTF(stderr, "\n"); + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); } -#define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print((Bottom), (Top)); \ - } while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, const char *sql_string, - ParsedSqlResult *sql_result, void *scanner) +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF(stderr, " $%d = ", yyi + 1); - yy_symbol_print(stderr, - YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), - sql_string, - sql_result, - scanner); - YYFPRINTF(stderr, "\n"); - } + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), sql_string, sql_result, scanner); + YYFPRINTF (stderr, "\n"); + } } -#define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print(yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ - } while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, sql_string, sql_result, scanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -#define YYDPRINTF(Args) ((void)0) -#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -#define YY_STACK_PRINT(Bottom, Top) -#define YY_REDUCE_PRINT(Rule) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ + /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -3336,15 +1290,16 @@ int yydebug; evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif + /* Context of a parse error. */ typedef struct { - yy_state_t *yyssp; + yy_state_t *yyssp; yysymbol_kind_t yytoken; - YYLTYPE *yylloc; + YYLTYPE *yylloc; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the @@ -3353,59 +1308,69 @@ typedef struct be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ -static int yypcontext_expected_tokens(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default(yyn)) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error(yytable[yyx + yyn])) { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST(yysymbol_kind_t, yyx); - } - } + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } + + + #ifndef yystrlen -#if defined __GLIBC__ && defined _STRING_H -#define yystrlen(S) (YY_CAST(YYPTRDIFF_T, strlen(S))) -#else +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ -static YYPTRDIFF_T yystrlen(const char *yystr) +static YYPTRDIFF_T +yystrlen (const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -#endif +# endif #endif #ifndef yystpcpy -#if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -#define yystpcpy stpcpy -#else +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -static char *yystpcpy(char *yydest, const char *yysrc) +static char * +yystpcpy (char *yydest, const char *yysrc) { - char *yyd = yydest; + char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') @@ -3413,7 +1378,7 @@ static char *yystpcpy(char *yydest, const char *yysrc) return yyd - 1; } -#endif +# endif #endif #ifndef yytnamerr @@ -3424,45 +1389,52 @@ static char *yystpcpy(char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr) +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) { - if (*yystr == '"') { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) { - case '\'': - case ',': goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes:; - } + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } if (yyres) - return yystpcpy(yyres, yystr) - yyres; + return yystpcpy (yyres, yystr) - yyres; else - return yystrlen(yystr); + return yystrlen (yystr); } #endif -static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; @@ -3489,17 +1461,19 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens(yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } return yycount; } @@ -3511,12 +1485,11 @@ static int yy_syntax_error_arguments(const yypcontext_t *yyctx, yysymbol_kind_t not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ -static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) { - enum - { - YYARGS_MAX = 5 - }; + enum { YYARGS_MAX = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", @@ -3526,13 +1499,16 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments(yyctx, yyarg, YYARGS_MAX); + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; - switch (yycount) { -#define YYCASE_(N, S) \ - case N: yyformat = S; break + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -3541,118 +1517,134 @@ static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypconte YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ - } + } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ - yysize = yystrlen(yyformat) - 2 * yycount + 1; + yysize = yystrlen (yyformat) - 2 * yycount + 1; { int yyi; - for (yyi = 0; yyi < yycount; ++yyi) { - YYPTRDIFF_T yysize1 = yysize + yytnamerr(YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } - if (*yymsg_alloc < yysize) { - *yymsg_alloc = 2 * yysize; - if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; - int yyi = 0; + int yyi = 0; while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr(yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } else { - ++yyp; - ++yyformat; - } + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } } return 0; } + /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, - const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - YY_USE(yyvaluep); - YY_USE(yylocationp); - YY_USE(sql_string); - YY_USE(sql_result); - YY_USE(scanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (sql_string); + YY_USE (sql_result); + YY_USE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE(yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + + + + /*----------. | yyparse. | `----------*/ -int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) +int +yyparse (const char * sql_string, ParsedSqlResult * sql_result, void * scanner) { - /* Lookahead token kind. */ - int yychar; - - /* The semantic value of the lookahead symbol. */ - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ - YY_INITIAL_VALUE(static YYSTYPE yyval_default;) - YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); - - /* Location data for the lookahead symbol. */ - static YYLTYPE yyloc_default -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = {1, 1, 1, 1} -#endif - ; - YYLTYPE yylloc = yyloc_default; +/* Lookahead token kind. */ +int yychar; - /* Number of syntax errors so far. */ - int yynerrs = 0; - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + /* Number of syntax errors so far. */ + int yynerrs = 0; - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; + + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; /* The return value of yyparse. */ @@ -3668,23 +1660,24 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YYLTYPE yyerror_range[3]; /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; + char yymsgbuf[128]; + char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - YYDPRINTF((stderr, "Starting parse\n")); + YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ @@ -3693,90 +1686,93 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) have just been pushed. So pushing a state here evens the stacks. */ yyssp++; + /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - YYDPRINTF((stderr, "Entering state %d\n", yystate)); - YY_ASSERT(0 <= yystate && yystate < YYNSTATES); + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST(yy_state_t, yystate); + *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else - { - /* Get the current used size of the three stacks, in elements. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -#if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow(YY_("memory exhausted"), - &yyss1, - yysize * YYSIZEOF(*yyssp), - &yyvs1, - yysize * YYSIZEOF(*yyvsp), - &yyls1, - yysize * YYSIZEOF(*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -#else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - YYNOMEM; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); - if (!yyptr) + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) YYNOMEM; - YYSTACK_RELOCATE(yyss_alloc, yyss); - YYSTACK_RELOCATE(yyvs_alloc, yyvs); - YYSTACK_RELOCATE(yyls_alloc, yyls); -#undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE(yyss1); - } -#endif + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + YYNOMEM; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); - YY_IGNORE_USELESS_CAST_END + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ @@ -3786,34 +1782,40 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default(yyn)) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == YYEMPTY) { - YYDPRINTF((stderr, "Reading a token\n")); - yychar = yylex(&yylval, &yylloc, scanner); - } + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } - if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF((stderr, "Now at end of input.\n")); - } else if (yychar == YYerror) { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { - yytoken = YYTRANSLATE(yychar); - YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); - } + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ @@ -3821,12 +1823,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; - if (yyn <= 0) { - if (yytable_value_is_error(yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } /* Count tokens shifted since error; after three, turn off error status. */ @@ -3834,7 +1837,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerrstatus--; /* Shift the lookahead token. */ - YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -3845,6 +1848,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yychar = YYEMPTY; goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -3854,6 +1858,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) goto yyerrlab; goto yyreduce; + /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ @@ -3869,265 +1874,256 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1 - yylen]; + yyval = yyvsp[1-yylen]; /* Default location. */ - YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); yyerror_range[1] = yyloc; - YY_REDUCE_PRINT(yyn); - switch (yyn) { - case 2: /* commands: command_wrapper opt_semicolon */ -#line 266 "yacc_sql.y" + YY_REDUCE_PRINT (yyn); + switch (yyn) { - std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); - sql_result->add_sql_node(std::move(sql_node)); - } -#line 1885 "yacc_sql.cpp" + case 2: /* commands: command_wrapper opt_semicolon */ +#line 267 "yacc_sql.y" + { + std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); + sql_result->add_sql_node(std::move(sql_node)); + } +#line 1892 "yacc_sql.cpp" break; - case 25: /* exit_stmt: EXIT */ -#line 298 "yacc_sql.y" - { + case 25: /* exit_stmt: EXIT */ +#line 299 "yacc_sql.y" + { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1894 "yacc_sql.cpp" +#line 1901 "yacc_sql.cpp" break; - case 26: /* help_stmt: HELP */ -#line 304 "yacc_sql.y" - { + case 26: /* help_stmt: HELP */ +#line 305 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1902 "yacc_sql.cpp" +#line 1909 "yacc_sql.cpp" break; - case 27: /* sync_stmt: SYNC */ -#line 309 "yacc_sql.y" - { + case 27: /* sync_stmt: SYNC */ +#line 310 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1910 "yacc_sql.cpp" +#line 1917 "yacc_sql.cpp" break; - case 28: /* begin_stmt: TRX_BEGIN */ -#line 315 "yacc_sql.y" - { + case 28: /* begin_stmt: TRX_BEGIN */ +#line 316 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1918 "yacc_sql.cpp" +#line 1925 "yacc_sql.cpp" break; - case 29: /* commit_stmt: TRX_COMMIT */ -#line 321 "yacc_sql.y" - { + case 29: /* commit_stmt: TRX_COMMIT */ +#line 322 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1926 "yacc_sql.cpp" +#line 1933 "yacc_sql.cpp" break; - case 30: /* rollback_stmt: TRX_ROLLBACK */ -#line 327 "yacc_sql.y" - { + case 30: /* rollback_stmt: TRX_ROLLBACK */ +#line 328 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1934 "yacc_sql.cpp" +#line 1941 "yacc_sql.cpp" break; - case 31: /* drop_table_stmt: DROP TABLE ID */ -#line 333 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); + case 31: /* drop_table_stmt: DROP TABLE ID */ +#line 334 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1944 "yacc_sql.cpp" +#line 1951 "yacc_sql.cpp" break; - case 32: /* show_tables_stmt: SHOW TABLES */ -#line 340 "yacc_sql.y" - { + case 32: /* show_tables_stmt: SHOW TABLES */ +#line 341 "yacc_sql.y" + { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1952 "yacc_sql.cpp" +#line 1959 "yacc_sql.cpp" break; - case 33: /* desc_table_stmt: DESC ID */ -#line 346 "yacc_sql.y" - { - (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); + case 33: /* desc_table_stmt: DESC ID */ +#line 347 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1962 "yacc_sql.cpp" +#line 1969 "yacc_sql.cpp" break; - case 34: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 355 "yacc_sql.y" + case 34: /* show_index_stmt: SHOW INDEX FROM relation */ +#line 356 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; - show_index.relation_name = (yyvsp[0].string); + show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1973 "yacc_sql.cpp" +#line 1980 "yacc_sql.cpp" break; - case 35: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 365 "yacc_sql.y" + case 35: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ +#line 366 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; - create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE - create_index.index_name = (yyvsp[-5].string); - create_index.relation_name = (yyvsp[-3].string); - create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 - delete (yyvsp[-1].index_attr_list); // 释放指针 + create_index.unique = (yyvsp[-7].unique); // 用 opt_unique 的返回值来确定是否 UNIQUE + create_index.index_name = (yyvsp[-5].string); + create_index.relation_name = (yyvsp[-3].string); + create_index.attribute_name.swap(*(yyvsp[-1].index_attr_list)); // $8 是 vector 类型 + delete (yyvsp[-1].index_attr_list); // 释放指针 free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1989 "yacc_sql.cpp" +#line 1996 "yacc_sql.cpp" break; - case 36: /* opt_unique: UNIQUE */ -#line 379 "yacc_sql.y" - { - (yyval.unique) = true; - } -#line 1995 "yacc_sql.cpp" + case 36: /* opt_unique: UNIQUE */ +#line 380 "yacc_sql.y" + { (yyval.unique) = true; } +#line 2002 "yacc_sql.cpp" break; - case 37: /* opt_unique: %empty */ -#line 380 "yacc_sql.y" - { - (yyval.unique) = false; - } -#line 2001 "yacc_sql.cpp" + case 37: /* opt_unique: %empty */ +#line 381 "yacc_sql.y" + { (yyval.unique) = false; } +#line 2008 "yacc_sql.cpp" break; - case 38: /* attr_list: ID */ -#line 385 "yacc_sql.y" + case 38: /* attr_list: ID */ +#line 386 "yacc_sql.y" { - (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector - (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector + (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector + (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 2011 "yacc_sql.cpp" +#line 2018 "yacc_sql.cpp" break; - case 39: /* attr_list: ID COMMA attr_list */ -#line 391 "yacc_sql.y" + case 39: /* attr_list: ID COMMA attr_list */ +#line 392 "yacc_sql.y" { - (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector - (yyval.index_attr_list) - ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 + (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector + (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2021 "yacc_sql.cpp" +#line 2028 "yacc_sql.cpp" break; - case 40: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 400 "yacc_sql.y" + case 40: /* drop_index_stmt: DROP INDEX ID ON ID */ +#line 401 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); - (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); + (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); (yyval.sql_node)->drop_index.relation_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2033 "yacc_sql.cpp" +#line 2040 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ -#line 410 "yacc_sql.y" + case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ +#line 411 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node( - (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2041 "yacc_sql.cpp" +#line 2048 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ -#line 414 "yacc_sql.y" + case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ +#line 415 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node( - (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2049 "yacc_sql.cpp" +#line 2056 "yacc_sql.cpp" break; - case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 418 "yacc_sql.y" + case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ +#line 419 "yacc_sql.y" { - (yyval.sql_node) = create_table_sql_node( - (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); + (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2057 "yacc_sql.cpp" +#line 2064 "yacc_sql.cpp" break; - case 44: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ -#line 422 "yacc_sql.y" + case 44: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ +#line 423 "yacc_sql.y" { - (yyval.sql_node) = - create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2065 "yacc_sql.cpp" +#line 2072 "yacc_sql.cpp" break; - case 45: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ -#line 426 "yacc_sql.y" + case 45: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ +#line 427 "yacc_sql.y" { - (yyval.sql_node) = - create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); + (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2073 "yacc_sql.cpp" +#line 2080 "yacc_sql.cpp" break; - case 46: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ -#line 433 "yacc_sql.y" + case 46: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ +#line 434 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; - create_view.relation_name = (yyvsp[-2].string); + create_view.relation_name = (yyvsp[-2].string); create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } -#line 2085 "yacc_sql.cpp" +#line 2092 "yacc_sql.cpp" break; - case 47: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ -#line 441 "yacc_sql.y" + case 47: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ +#line 442 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; - create_view.relation_name = (yyvsp[-5].string); - create_view.attribute_names = std::move(*(yyvsp[-3].index_attr_list)); + create_view.relation_name = (yyvsp[-5].string); + create_view.attribute_names = std::move(*(yyvsp[-3].index_attr_list)); create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-5].string)); } -#line 2098 "yacc_sql.cpp" +#line 2105 "yacc_sql.cpp" break; - case 48: /* drop_view_stmt: DROP VIEW ID */ -#line 453 "yacc_sql.y" + case 48: /* drop_view_stmt: DROP VIEW ID */ +#line 454 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); + (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2108 "yacc_sql.cpp" +#line 2115 "yacc_sql.cpp" break; - case 49: /* attr_def_list: %empty */ -#line 462 "yacc_sql.y" + case 49: /* attr_def_list: %empty */ +#line 463 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2116 "yacc_sql.cpp" +#line 2123 "yacc_sql.cpp" break; - case 50: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 466 "yacc_sql.y" + case 50: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 467 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -4137,13 +2133,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2130 "yacc_sql.cpp" +#line 2137 "yacc_sql.cpp" break; - case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 479 "yacc_sql.y" + case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ +#line 480 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->name = (yyvsp[-5].string); (yyval.attr_info)->type = (AttrType)(yyvsp[-4].number); if ((yyval.attr_info)->type == AttrType::CHARS) { @@ -4159,13 +2155,13 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 2152 "yacc_sql.cpp" +#line 2159 "yacc_sql.cpp" break; - case 52: /* attr_def: ID type nullable_constraint */ -#line 497 "yacc_sql.y" + case 52: /* attr_def: ID type nullable_constraint */ +#line 498 "yacc_sql.y" { - (yyval.attr_info) = new AttrInfoSqlNode; + (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); (yyval.attr_info)->name = (yyvsp[-2].string); if ((yyval.attr_info)->type == AttrType::INTS) { @@ -4189,93 +2185,81 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2182 "yacc_sql.cpp" +#line 2189 "yacc_sql.cpp" break; - case 53: /* nullable_constraint: NOT NULL_T */ -#line 526 "yacc_sql.y" + case 53: /* nullable_constraint: NOT NULL_T */ +#line 527 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2190 "yacc_sql.cpp" +#line 2197 "yacc_sql.cpp" break; - case 54: /* nullable_constraint: NULLABLE */ -#line 530 "yacc_sql.y" + case 54: /* nullable_constraint: NULLABLE */ +#line 531 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2198 "yacc_sql.cpp" +#line 2205 "yacc_sql.cpp" break; - case 55: /* nullable_constraint: NULL_T */ -#line 534 "yacc_sql.y" + case 55: /* nullable_constraint: NULL_T */ +#line 535 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2206 "yacc_sql.cpp" +#line 2213 "yacc_sql.cpp" break; - case 56: /* nullable_constraint: %empty */ -#line 538 "yacc_sql.y" + case 56: /* nullable_constraint: %empty */ +#line 539 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2214 "yacc_sql.cpp" +#line 2221 "yacc_sql.cpp" break; - case 57: /* type: INT_T */ -#line 544 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::INTS); - } -#line 2220 "yacc_sql.cpp" - break; - - case 58: /* type: STRING_T */ + case 57: /* type: INT_T */ #line 545 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::CHARS); - } -#line 2226 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::INTS); } +#line 2227 "yacc_sql.cpp" break; - case 59: /* type: FLOAT_T */ + case 58: /* type: STRING_T */ #line 546 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::FLOATS); - } -#line 2232 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::CHARS); } +#line 2233 "yacc_sql.cpp" break; - case 60: /* type: DATE_T */ + case 59: /* type: FLOAT_T */ #line 547 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::DATES); - } -#line 2238 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::FLOATS); } +#line 2239 "yacc_sql.cpp" break; - case 61: /* type: TEXT_T */ + case 60: /* type: DATE_T */ #line 548 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::TEXTS); - } -#line 2244 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::DATES); } +#line 2245 "yacc_sql.cpp" break; - case 62: /* type: VECTOR_T */ + case 61: /* type: TEXT_T */ #line 549 "yacc_sql.y" - { - (yyval.number) = static_cast(AttrType::VECTORS); - } -#line 2250 "yacc_sql.cpp" + { (yyval.number) = static_cast(AttrType::TEXTS); } +#line 2251 "yacc_sql.cpp" + break; + + case 62: /* type: VECTOR_T */ +#line 550 "yacc_sql.y" + { (yyval.number) = static_cast(AttrType::VECTORS); } +#line 2257 "yacc_sql.cpp" break; - case 63: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 554 "yacc_sql.y" + case 63: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 555 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); @@ -4283,166 +2267,174 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2264 "yacc_sql.cpp" +#line 2271 "yacc_sql.cpp" break; - case 64: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ -#line 564 "yacc_sql.y" + case 64: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ +#line 565 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); + (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); - (yyval.sql_node)->insertion.attr_names = std::move(*(yyvsp[-3].index_attr_list)); + (yyval.sql_node)->insertion.attr_names = std::move(*(yyvsp[-3].index_attr_list)); if ((yyvsp[0].values_list) != nullptr) { (yyval.sql_node)->insertion.values_list.swap(*(yyvsp[0].values_list)); delete (yyvsp[0].values_list); } free((yyvsp[-5].string)); } -#line 2279 "yacc_sql.cpp" +#line 2286 "yacc_sql.cpp" break; - case 65: /* values_list: LBRACE value_list RBRACE */ -#line 578 "yacc_sql.y" + case 65: /* values_list: LBRACE value_list RBRACE */ +#line 579 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2289 "yacc_sql.cpp" +#line 2296 "yacc_sql.cpp" break; - case 66: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 584 "yacc_sql.y" + case 66: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 585 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2298 "yacc_sql.cpp" +#line 2305 "yacc_sql.cpp" break; - case 67: /* value_list: value */ -#line 591 "yacc_sql.y" + case 67: /* value_list: value */ +#line 592 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2308 "yacc_sql.cpp" +#line 2315 "yacc_sql.cpp" break; - case 68: /* value_list: value_list COMMA value */ -#line 597 "yacc_sql.y" + case 68: /* value_list: value_list COMMA value */ +#line 598 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2317 "yacc_sql.cpp" +#line 2324 "yacc_sql.cpp" break; - case 69: /* value: nonnegative_value */ -#line 604 "yacc_sql.y" - { + case 69: /* value: nonnegative_value */ +#line 605 "yacc_sql.y" + { (yyval.value) = (yyvsp[0].value); } -#line 2325 "yacc_sql.cpp" +#line 2332 "yacc_sql.cpp" break; - case 70: /* value: '-' NUMBER */ -#line 607 "yacc_sql.y" - { + case 70: /* value: '-' NUMBER */ +#line 608 "yacc_sql.y" + { (yyval.value) = new Value(-(yyvsp[0].number)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } -#line 2334 "yacc_sql.cpp" +#line 2341 "yacc_sql.cpp" break; - case 71: /* value: '-' FLOAT */ -#line 611 "yacc_sql.y" - { + case 71: /* value: '-' FLOAT */ +#line 612 "yacc_sql.y" + { (yyval.value) = new Value(-(yyvsp[0].floats)); - (yyloc) = (yylsp[-1]); + (yyloc) = (yylsp[-1]); } -#line 2343 "yacc_sql.cpp" +#line 2350 "yacc_sql.cpp" break; - case 72: /* nonnegative_value: NUMBER */ -#line 618 "yacc_sql.y" - { + case 72: /* nonnegative_value: NUMBER */ +#line 619 "yacc_sql.y" + { (yyval.value) = new Value((yyvsp[0].number)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2352 "yacc_sql.cpp" +#line 2359 "yacc_sql.cpp" break; - case 73: /* nonnegative_value: FLOAT */ -#line 622 "yacc_sql.y" - { + case 73: /* nonnegative_value: FLOAT */ +#line 623 "yacc_sql.y" + { (yyval.value) = new Value((yyvsp[0].floats)); - (yyloc) = (yylsp[0]); + (yyloc) = (yylsp[0]); } -#line 2361 "yacc_sql.cpp" +#line 2368 "yacc_sql.cpp" break; - case 74: /* nonnegative_value: SSS */ -#line 626 "yacc_sql.y" - { - char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); + case 74: /* nonnegative_value: SSS */ +#line 627 "yacc_sql.y" + { + char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2372 "yacc_sql.cpp" +#line 2379 "yacc_sql.cpp" break; - case 75: /* nonnegative_value: NULL_T */ -#line 632 "yacc_sql.y" - { + case 75: /* nonnegative_value: NULL_T */ +#line 633 "yacc_sql.y" + { (yyval.value) = new Value(NullValue()); } -#line 2380 "yacc_sql.cpp" +#line 2387 "yacc_sql.cpp" break; - case 76: /* nonnegative_value: LSBRACE value_list RSBRACE */ -#line 635 "yacc_sql.y" - { + case 76: /* nonnegative_value: LSBRACE value_list RSBRACE */ +#line 636 "yacc_sql.y" + { (yyval.value) = new Value(ListValue(), *(yyvsp[-1].value_list)); } -#line 2388 "yacc_sql.cpp" +#line 2395 "yacc_sql.cpp" break; - case 77: /* storage_format: %empty */ -#line 642 "yacc_sql.y" + case 77: /* nonnegative_value: QUOTE LSBRACE value_list RSBRACE QUOTE */ +#line 639 "yacc_sql.y" + { + (yyval.value) = new Value(ListValue(), *(yyvsp[-2].value_list)); + } +#line 2403 "yacc_sql.cpp" + break; + + case 78: /* storage_format: %empty */ +#line 646 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2396 "yacc_sql.cpp" +#line 2411 "yacc_sql.cpp" break; - case 78: /* storage_format: STORAGE FORMAT EQ ID */ -#line 646 "yacc_sql.y" + case 79: /* storage_format: STORAGE FORMAT EQ ID */ +#line 650 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2404 "yacc_sql.cpp" +#line 2419 "yacc_sql.cpp" break; - case 79: /* delete_stmt: DELETE FROM ID where */ -#line 653 "yacc_sql.y" + case 80: /* delete_stmt: DELETE FROM ID where */ +#line 657 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); + (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); if ((yyvsp[0].expression) != nullptr) { (yyval.sql_node)->deletion.condition = std::unique_ptr((yyvsp[0].expression)); } free((yyvsp[-1].string)); } -#line 2417 "yacc_sql.cpp" +#line 2432 "yacc_sql.cpp" break; - case 80: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 665 "yacc_sql.y" + case 81: /* update_stmt: UPDATE ID SET set_clauses where */ +#line 669 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); + (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); (yyval.sql_node)->update.set_clauses.swap(*(yyvsp[-1].set_clauses)); if ((yyvsp[0].expression) != nullptr) { @@ -4451,39 +2443,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2432 "yacc_sql.cpp" +#line 2447 "yacc_sql.cpp" break; - case 81: /* set_clauses: setClause */ -#line 679 "yacc_sql.y" + case 82: /* set_clauses: setClause */ +#line 683 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2441 "yacc_sql.cpp" +#line 2456 "yacc_sql.cpp" break; - case 82: /* set_clauses: set_clauses COMMA setClause */ -#line 684 "yacc_sql.y" + case 83: /* set_clauses: set_clauses COMMA setClause */ +#line 688 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2449 "yacc_sql.cpp" +#line 2464 "yacc_sql.cpp" break; - case 83: /* setClause: ID EQ expression */ -#line 691 "yacc_sql.y" + case 84: /* setClause: ID EQ expression */ +#line 695 "yacc_sql.y" { - (yyval.set_clause) = new SetClauseSqlNode; + (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); - (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); + (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2460 "yacc_sql.cpp" +#line 2475 "yacc_sql.cpp" break; - case 84: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ -#line 701 "yacc_sql.y" + case 85: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ +#line 705 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4521,11 +2513,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].limited_info); } } -#line 2502 "yacc_sql.cpp" +#line 2517 "yacc_sql.cpp" break; - case 85: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 739 "yacc_sql.y" + case 86: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ +#line 743 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4539,8 +2531,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } if ((yyvsp[-2].join_clauses) != nullptr) { - for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); - ++it) { + for (auto it = (yyvsp[-2].join_clauses)->relations.rbegin(); it != (yyvsp[-2].join_clauses)->relations.rend(); ++it) { (yyval.sql_node)->selection.relations.emplace_back(std::move(*it)); } (yyval.sql_node)->selection.conditions = std::move((yyvsp[-2].join_clauses)->conditions); @@ -4548,8 +2539,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if ((yyvsp[-1].expression) != nullptr) { auto ptr = (yyval.sql_node)->selection.conditions.release(); - (yyval.sql_node)->selection.conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); + (yyval.sql_node)->selection.conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-1].expression)); } if ((yyvsp[0].expression_list) != nullptr) { @@ -4557,39 +2547,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2536 "yacc_sql.cpp" +#line 2551 "yacc_sql.cpp" break; - case 86: /* calc_stmt: CALC expression_list */ -#line 772 "yacc_sql.y" + case 87: /* calc_stmt: CALC expression_list */ +#line 776 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2546 "yacc_sql.cpp" +#line 2561 "yacc_sql.cpp" break; - case 87: /* calc_stmt: SELECT expression_list */ -#line 778 "yacc_sql.y" + case 88: /* calc_stmt: SELECT expression_list */ +#line 782 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2556 "yacc_sql.cpp" +#line 2571 "yacc_sql.cpp" break; - case 88: /* expression_list: %empty */ -#line 786 "yacc_sql.y" - { + case 89: /* expression_list: %empty */ +#line 790 "yacc_sql.y" + { (yyval.expression_list) = new std::vector>; } -#line 2564 "yacc_sql.cpp" +#line 2579 "yacc_sql.cpp" break; - case 89: /* expression_list: expression alias */ -#line 790 "yacc_sql.y" + case 90: /* expression_list: expression alias */ +#line 794 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4598,11 +2588,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2577 "yacc_sql.cpp" +#line 2592 "yacc_sql.cpp" break; - case 90: /* expression_list: expression alias COMMA expression_list */ -#line 799 "yacc_sql.y" + case 91: /* expression_list: expression alias COMMA expression_list */ +#line 803 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4612,51 +2602,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) if (nullptr != (yyvsp[-2].string)) { (yyvsp[-3].expression)->set_alias((yyvsp[-2].string)); } - (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); + (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2594 "yacc_sql.cpp" +#line 2609 "yacc_sql.cpp" break; - case 91: /* expression: expression '+' expression */ -#line 814 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 92: /* expression: expression '+' expression */ +#line 818 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2602 "yacc_sql.cpp" +#line 2617 "yacc_sql.cpp" break; - case 92: /* expression: expression '-' expression */ -#line 817 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 93: /* expression: expression '-' expression */ +#line 821 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2610 "yacc_sql.cpp" +#line 2625 "yacc_sql.cpp" break; - case 93: /* expression: expression '*' expression */ -#line 820 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 94: /* expression: expression '*' expression */ +#line 824 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2618 "yacc_sql.cpp" +#line 2633 "yacc_sql.cpp" break; - case 94: /* expression: expression '/' expression */ -#line 823 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); + case 95: /* expression: expression '/' expression */ +#line 827 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2626 "yacc_sql.cpp" +#line 2641 "yacc_sql.cpp" break; - case 95: /* expression: LBRACE expression_list RBRACE */ -#line 826 "yacc_sql.y" - { + case 96: /* expression: LBRACE expression_list RBRACE */ +#line 830 "yacc_sql.y" + { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); } else { @@ -4664,504 +2650,472 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2639 "yacc_sql.cpp" +#line 2654 "yacc_sql.cpp" break; - case 96: /* expression: '-' expression */ -#line 834 "yacc_sql.y" - { - (yyval.expression) = create_arithmetic_expression( - ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); + case 97: /* expression: '-' expression */ +#line 838 "yacc_sql.y" + { + (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2647 "yacc_sql.cpp" +#line 2662 "yacc_sql.cpp" break; - case 97: /* expression: nonnegative_value */ -#line 837 "yacc_sql.y" - { + case 98: /* expression: nonnegative_value */ +#line 841 "yacc_sql.y" + { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2657 "yacc_sql.cpp" +#line 2672 "yacc_sql.cpp" break; - case 98: /* expression: rel_attr */ -#line 842 "yacc_sql.y" - { + case 99: /* expression: rel_attr */ +#line 846 "yacc_sql.y" + { RelAttrSqlNode *node = (yyvsp[0].rel_attr); - (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); + (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2668 "yacc_sql.cpp" +#line 2683 "yacc_sql.cpp" break; - case 99: /* expression: '*' */ -#line 848 "yacc_sql.y" - { + case 100: /* expression: '*' */ +#line 852 "yacc_sql.y" + { (yyval.expression) = new StarExpr(); } -#line 2676 "yacc_sql.cpp" +#line 2691 "yacc_sql.cpp" break; - case 100: /* expression: ID DOT '*' */ -#line 851 "yacc_sql.y" - { + case 101: /* expression: ID DOT '*' */ +#line 855 "yacc_sql.y" + { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2684 "yacc_sql.cpp" +#line 2699 "yacc_sql.cpp" break; - case 101: /* expression: func_expr */ -#line 854 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr + case 102: /* expression: func_expr */ +#line 858 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2692 "yacc_sql.cpp" +#line 2707 "yacc_sql.cpp" break; - case 102: /* expression: sub_query_expr */ -#line 857 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr + case 103: /* expression: sub_query_expr */ +#line 861 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2700 "yacc_sql.cpp" +#line 2715 "yacc_sql.cpp" break; - case 103: /* alias: %empty */ -#line 864 "yacc_sql.y" - { + case 104: /* alias: %empty */ +#line 868 "yacc_sql.y" + { (yyval.string) = nullptr; } -#line 2708 "yacc_sql.cpp" +#line 2723 "yacc_sql.cpp" break; - case 104: /* alias: ID */ -#line 867 "yacc_sql.y" - { + case 105: /* alias: ID */ +#line 871 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2716 "yacc_sql.cpp" +#line 2731 "yacc_sql.cpp" break; - case 105: /* alias: AS ID */ -#line 870 "yacc_sql.y" - { + case 106: /* alias: AS ID */ +#line 874 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2724 "yacc_sql.cpp" +#line 2739 "yacc_sql.cpp" break; - case 106: /* func_expr: ID LBRACE expression_list RBRACE */ -#line 876 "yacc_sql.y" + case 107: /* func_expr: ID LBRACE expression_list RBRACE */ +#line 880 "yacc_sql.y" { - (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2732 "yacc_sql.cpp" +#line 2747 "yacc_sql.cpp" break; - case 107: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 883 "yacc_sql.y" + case 108: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 887 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2740 "yacc_sql.cpp" +#line 2755 "yacc_sql.cpp" break; - case 108: /* rel_attr: ID */ -#line 889 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 109: /* rel_attr: ID */ +#line 893 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2750 "yacc_sql.cpp" +#line 2765 "yacc_sql.cpp" break; - case 109: /* rel_attr: ID DOT ID */ -#line 894 "yacc_sql.y" - { - (yyval.rel_attr) = new RelAttrSqlNode; + case 110: /* rel_attr: ID DOT ID */ +#line 898 "yacc_sql.y" + { + (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2762 "yacc_sql.cpp" +#line 2777 "yacc_sql.cpp" break; - case 110: /* relation: ID */ -#line 904 "yacc_sql.y" - { + case 111: /* relation: ID */ +#line 908 "yacc_sql.y" + { (yyval.string) = (yyvsp[0].string); } -#line 2770 "yacc_sql.cpp" +#line 2785 "yacc_sql.cpp" break; - case 111: /* rel_list: relation alias */ -#line 910 "yacc_sql.y" - { + case 112: /* rel_list: relation alias */ +#line 914 "yacc_sql.y" + { (yyval.relation_list) = new std::vector(); - if (nullptr != (yyvsp[0].string)) { - (yyval.relation_list)->emplace_back((yyvsp[-1].string), (yyvsp[0].string)); + if(nullptr!=(yyvsp[0].string)){ + (yyval.relation_list)->emplace_back((yyvsp[-1].string),(yyvsp[0].string)); free((yyvsp[0].string)); - } else { + }else{ (yyval.relation_list)->emplace_back((yyvsp[-1].string)); } free((yyvsp[-1].string)); } -#line 2785 "yacc_sql.cpp" +#line 2800 "yacc_sql.cpp" break; - case 112: /* rel_list: relation alias COMMA rel_list */ -#line 920 "yacc_sql.y" - { + case 113: /* rel_list: relation alias COMMA rel_list */ +#line 924 "yacc_sql.y" + { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); } else { (yyval.relation_list) = new std::vector; } - if (nullptr != (yyvsp[-2].string)) { - (yyval.relation_list) - ->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string), (yyvsp[-2].string))); + if(nullptr!=(yyvsp[-2].string)){ + (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string),(yyvsp[-2].string))); free((yyvsp[-2].string)); - } else { + }else{ (yyval.relation_list)->insert((yyval.relation_list)->begin(), RelationNode((yyvsp[-3].string))); } free((yyvsp[-3].string)); } -#line 2804 "yacc_sql.cpp" +#line 2819 "yacc_sql.cpp" break; - case 113: /* join_clauses: relation ON condition */ -#line 938 "yacc_sql.y" + case 114: /* join_clauses: relation ON condition */ +#line 942 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2815 "yacc_sql.cpp" +#line 2830 "yacc_sql.cpp" break; - case 114: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 945 "yacc_sql.y" + case 115: /* join_clauses: relation ON condition INNER JOIN join_clauses */ +#line 949 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); auto ptr = (yyval.join_clauses)->conditions.release(); - (yyval.join_clauses)->conditions = - std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); + (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2827 "yacc_sql.cpp" +#line 2842 "yacc_sql.cpp" break; - case 115: /* where: %empty */ -#line 956 "yacc_sql.y" + case 116: /* where: %empty */ +#line 960 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2835 "yacc_sql.cpp" +#line 2850 "yacc_sql.cpp" break; - case 116: /* where: WHERE condition */ -#line 959 "yacc_sql.y" - { - (yyval.expression) = (yyvsp[0].expression); + case 117: /* where: WHERE condition */ +#line 963 "yacc_sql.y" + { + (yyval.expression) = (yyvsp[0].expression); } -#line 2843 "yacc_sql.cpp" +#line 2858 "yacc_sql.cpp" break; - case 117: /* condition: expression comp_op expression */ -#line 966 "yacc_sql.y" + case 118: /* condition: expression comp_op expression */ +#line 970 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2851 "yacc_sql.cpp" +#line 2866 "yacc_sql.cpp" break; - case 118: /* condition: comp_op expression */ -#line 970 "yacc_sql.y" + case 119: /* condition: comp_op expression */ +#line 974 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); - (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); + (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2862 "yacc_sql.cpp" +#line 2877 "yacc_sql.cpp" break; - case 119: /* condition: condition AND condition */ -#line 977 "yacc_sql.y" - { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); - } -#line 2870 "yacc_sql.cpp" - break; - - case 120: /* condition: condition OR condition */ + case 120: /* condition: condition AND condition */ #line 981 "yacc_sql.y" { - (yyval.expression) = - new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); - } -#line 2878 "yacc_sql.cpp" - break; - - case 121: /* comp_op: EQ */ -#line 987 "yacc_sql.y" - { - (yyval.comp) = EQUAL_TO; - } -#line 2884 "yacc_sql.cpp" - break; - - case 122: /* comp_op: LT */ -#line 988 "yacc_sql.y" - { - (yyval.comp) = LESS_THAN; - } -#line 2890 "yacc_sql.cpp" - break; - - case 123: /* comp_op: GT */ -#line 989 "yacc_sql.y" - { - (yyval.comp) = GREAT_THAN; + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2896 "yacc_sql.cpp" +#line 2885 "yacc_sql.cpp" break; - case 124: /* comp_op: LE */ -#line 990 "yacc_sql.y" + case 121: /* condition: condition OR condition */ +#line 985 "yacc_sql.y" { - (yyval.comp) = LESS_EQUAL; + (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2902 "yacc_sql.cpp" +#line 2893 "yacc_sql.cpp" break; - case 125: /* comp_op: GE */ + case 122: /* comp_op: EQ */ #line 991 "yacc_sql.y" - { - (yyval.comp) = GREAT_EQUAL; - } -#line 2908 "yacc_sql.cpp" + { (yyval.comp) = EQUAL_TO; } +#line 2899 "yacc_sql.cpp" break; - case 126: /* comp_op: NE */ + case 123: /* comp_op: LT */ #line 992 "yacc_sql.y" - { - (yyval.comp) = NOT_EQUAL; - } -#line 2914 "yacc_sql.cpp" + { (yyval.comp) = LESS_THAN; } +#line 2905 "yacc_sql.cpp" break; - case 127: /* comp_op: IS */ + case 124: /* comp_op: GT */ #line 993 "yacc_sql.y" - { - (yyval.comp) = IS_OP; - } -#line 2920 "yacc_sql.cpp" + { (yyval.comp) = GREAT_THAN; } +#line 2911 "yacc_sql.cpp" break; - case 128: /* comp_op: IS NOT */ + case 125: /* comp_op: LE */ #line 994 "yacc_sql.y" - { - (yyval.comp) = IS_NOT_OP; - } -#line 2926 "yacc_sql.cpp" + { (yyval.comp) = LESS_EQUAL; } +#line 2917 "yacc_sql.cpp" break; - case 129: /* comp_op: LIKE */ + case 126: /* comp_op: GE */ #line 995 "yacc_sql.y" - { - (yyval.comp) = LIKE_OP; - } -#line 2932 "yacc_sql.cpp" + { (yyval.comp) = GREAT_EQUAL; } +#line 2923 "yacc_sql.cpp" break; - case 130: /* comp_op: NOT LIKE */ + case 127: /* comp_op: NE */ #line 996 "yacc_sql.y" - { - (yyval.comp) = NOT_LIKE_OP; - } -#line 2938 "yacc_sql.cpp" + { (yyval.comp) = NOT_EQUAL; } +#line 2929 "yacc_sql.cpp" break; - case 131: /* comp_op: IN */ + case 128: /* comp_op: IS */ #line 997 "yacc_sql.y" - { - (yyval.comp) = IN_OP; - } -#line 2944 "yacc_sql.cpp" + { (yyval.comp) = IS_OP; } +#line 2935 "yacc_sql.cpp" break; - case 132: /* comp_op: NOT IN */ + case 129: /* comp_op: IS NOT */ #line 998 "yacc_sql.y" - { - (yyval.comp) = NOT_IN_OP; - } -#line 2950 "yacc_sql.cpp" + { (yyval.comp) = IS_NOT_OP; } +#line 2941 "yacc_sql.cpp" break; - case 133: /* comp_op: EXISTS */ + case 130: /* comp_op: LIKE */ #line 999 "yacc_sql.y" - { - (yyval.comp) = EXISTS_OP; - } -#line 2956 "yacc_sql.cpp" + { (yyval.comp) = LIKE_OP;} +#line 2947 "yacc_sql.cpp" break; - case 134: /* comp_op: NOT EXISTS */ + case 131: /* comp_op: NOT LIKE */ #line 1000 "yacc_sql.y" - { - (yyval.comp) = NOT_EXISTS_OP; - } -#line 2962 "yacc_sql.cpp" + {(yyval.comp) = NOT_LIKE_OP;} +#line 2953 "yacc_sql.cpp" break; - case 135: /* opt_order_by: %empty */ -#line 1005 "yacc_sql.y" + case 132: /* comp_op: IN */ +#line 1001 "yacc_sql.y" + { (yyval.comp) = IN_OP; } +#line 2959 "yacc_sql.cpp" + break; + + case 133: /* comp_op: NOT IN */ +#line 1002 "yacc_sql.y" + { (yyval.comp) = NOT_IN_OP; } +#line 2965 "yacc_sql.cpp" + break; + + case 134: /* comp_op: EXISTS */ +#line 1003 "yacc_sql.y" + { (yyval.comp) = EXISTS_OP; } +#line 2971 "yacc_sql.cpp" + break; + + case 135: /* comp_op: NOT EXISTS */ +#line 1004 "yacc_sql.y" + { (yyval.comp) = NOT_EXISTS_OP; } +#line 2977 "yacc_sql.cpp" + break; + + case 136: /* opt_order_by: %empty */ +#line 1009 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2970 "yacc_sql.cpp" +#line 2985 "yacc_sql.cpp" break; - case 136: /* opt_order_by: ORDER BY sort_list */ -#line 1009 "yacc_sql.y" + case 137: /* opt_order_by: ORDER BY sort_list */ +#line 1013 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); - std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); + std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2979 "yacc_sql.cpp" +#line 2994 "yacc_sql.cpp" break; - case 137: /* sort_list: sort_unit */ -#line 1017 "yacc_sql.y" - { + case 138: /* sort_list: sort_unit */ +#line 1021 "yacc_sql.y" + { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); - } -#line 2988 "yacc_sql.cpp" + } +#line 3003 "yacc_sql.cpp" break; - case 138: /* sort_list: sort_unit COMMA sort_list */ -#line 1022 "yacc_sql.y" - { + case 139: /* sort_list: sort_unit COMMA sort_list */ +#line 1026 "yacc_sql.y" + { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); - } -#line 2997 "yacc_sql.cpp" + } +#line 3012 "yacc_sql.cpp" break; - case 139: /* sort_unit: expression */ -#line 1030 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); + case 140: /* sort_unit: expression */ +#line 1034 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 3007 "yacc_sql.cpp" + } +#line 3022 "yacc_sql.cpp" break; - case 140: /* sort_unit: expression DESC */ -#line 1036 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 141: /* sort_unit: expression DESC */ +#line 1040 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; - } -#line 3017 "yacc_sql.cpp" + } +#line 3032 "yacc_sql.cpp" break; - case 141: /* sort_unit: expression ASC */ -#line 1042 "yacc_sql.y" - { - (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 - (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); + case 142: /* sort_unit: expression ASC */ +#line 1046 "yacc_sql.y" + { + (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 + (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; - } -#line 3027 "yacc_sql.cpp" + } +#line 3042 "yacc_sql.cpp" break; - case 142: /* group_by: %empty */ -#line 1051 "yacc_sql.y" + case 143: /* group_by: %empty */ +#line 1055 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 3035 "yacc_sql.cpp" +#line 3050 "yacc_sql.cpp" break; - case 143: /* group_by: GROUP BY expression_list */ -#line 1055 "yacc_sql.y" + case 144: /* group_by: GROUP BY expression_list */ +#line 1059 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 3043 "yacc_sql.cpp" +#line 3058 "yacc_sql.cpp" break; - case 144: /* opt_having: %empty */ -#line 1062 "yacc_sql.y" + case 145: /* opt_having: %empty */ +#line 1066 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 3051 "yacc_sql.cpp" +#line 3066 "yacc_sql.cpp" break; - case 145: /* opt_having: HAVING condition */ -#line 1066 "yacc_sql.y" + case 146: /* opt_having: HAVING condition */ +#line 1070 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3059 "yacc_sql.cpp" +#line 3074 "yacc_sql.cpp" break; - case 146: /* opt_limit: %empty */ -#line 1073 "yacc_sql.y" + case 147: /* opt_limit: %empty */ +#line 1077 "yacc_sql.y" { (yyval.limited_info) = nullptr; } -#line 3067 "yacc_sql.cpp" +#line 3082 "yacc_sql.cpp" break; - case 147: /* opt_limit: LIMIT NUMBER */ -#line 1077 "yacc_sql.y" + case 148: /* opt_limit: LIMIT NUMBER */ +#line 1081 "yacc_sql.y" { - (yyval.limited_info) = new LimitSqlNode(); + (yyval.limited_info) = new LimitSqlNode(); (yyval.limited_info)->number = (yyvsp[0].number); } -#line 3076 "yacc_sql.cpp" +#line 3091 "yacc_sql.cpp" break; - case 148: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1085 "yacc_sql.y" + case 149: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1089 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); + (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3085 "yacc_sql.cpp" +#line 3100 "yacc_sql.cpp" break; - case 149: /* set_variable_stmt: SET ID EQ value */ -#line 1093 "yacc_sql.y" + case 150: /* set_variable_stmt: SET ID EQ value */ +#line 1097 "yacc_sql.y" { - (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); + (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); (yyval.sql_node)->set_variable.value = *(yyvsp[0].value); free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3097 "yacc_sql.cpp" +#line 3112 "yacc_sql.cpp" break; -#line 3101 "yacc_sql.cpp" - default: break; - } +#line 3116 "yacc_sql.cpp" + + default: break; + } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. @@ -5173,9 +3127,9 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; @@ -5186,67 +3140,84 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; - const int yyi = yypgoto[yylhs] + *yyssp; - yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) { - ++yynerrs; - { - yypcontext_t yyctx = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) { - if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); - yymsg = YY_CAST(char *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, yymsg_alloc))); - if (yymsg) { - yysyntax_error_status = yysyntax_error(&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, sql_string, sql_result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + YYNOMEM; } - yyerror(&yylloc, sql_string, sql_result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - YYNOMEM; } - } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } else { - yydestruct("Error: discarding", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + yychar = YYEMPTY; + } } - } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; + /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ @@ -5259,40 +3230,45 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ - YYPOPSTACK(yylen); + YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT(yyss, yyssp); + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ - for (;;) { - yyn = yypact[yystate]; - if (!yypact_value_is_default(yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyerror_range[1] = *yylsp; - yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - yystate = *yyssp; - YY_STACK_PRINT(yyss, yyssp); - } + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; @@ -5300,14 +3276,15 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyerror_range[2] = yylloc; ++yylsp; - YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; + /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ @@ -5315,6 +3292,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 0; goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -5322,48 +3300,53 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) yyresult = 1; goto yyreturnlab; + /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: - yyerror(&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); + yyerror (&yylloc, sql_string, sql_result, scanner, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; + /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: - if (yychar != YYEMPTY) { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE(yychar); - yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); - } + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, sql_string, sql_result, scanner); + } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ - YYPOPSTACK(yylen); - YY_STACK_PRINT(yyss, yyssp); - while (yyssp != yyss) { - yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); - YYPOPSTACK(1); - } + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, sql_string, sql_result, scanner); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) - YYSTACK_FREE(yyss); + YYSTACK_FREE (yyss); #endif if (yymsg != yymsgbuf) - YYSTACK_FREE(yymsg); + YYSTACK_FREE (yymsg); return yyresult; } -#line 1105 "yacc_sql.y" +#line 1109 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); -int sql_parse(const char *s, ParsedSqlResult *sql_result) -{ +int sql_parse(const char *s, ParsedSqlResult *sql_result) { yyscan_t scanner; yylex_init(&scanner); scan_string(s, scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index a255b6d9..410331d8 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -96,36 +96,37 @@ extern int yydebug; LIMIT = 297, /* LIMIT */ NULLABLE = 298, /* NULLABLE */ HELP = 299, /* HELP */ - EXIT = 300, /* EXIT */ - DOT = 301, /* DOT */ - INTO = 302, /* INTO */ - VALUES = 303, /* VALUES */ - FROM = 304, /* FROM */ - WHERE = 305, /* WHERE */ - AND = 306, /* AND */ - OR = 307, /* OR */ - SET = 308, /* SET */ - ON = 309, /* ON */ - INFILE = 310, /* INFILE */ - EXPLAIN = 311, /* EXPLAIN */ - STORAGE = 312, /* STORAGE */ - FORMAT = 313, /* FORMAT */ - INNER = 314, /* INNER */ - JOIN = 315, /* JOIN */ - VIEW = 316, /* VIEW */ - EQ = 317, /* EQ */ - LT = 318, /* LT */ - GT = 319, /* GT */ - LE = 320, /* LE */ - GE = 321, /* GE */ - NE = 322, /* NE */ - LIKE = 323, /* LIKE */ - IS = 324, /* IS */ - NUMBER = 325, /* NUMBER */ - FLOAT = 326, /* FLOAT */ - ID = 327, /* ID */ - SSS = 328, /* SSS */ - UMINUS = 329 /* UMINUS */ + QUOTE = 300, /* QUOTE */ + EXIT = 301, /* EXIT */ + DOT = 302, /* DOT */ + INTO = 303, /* INTO */ + VALUES = 304, /* VALUES */ + FROM = 305, /* FROM */ + WHERE = 306, /* WHERE */ + AND = 307, /* AND */ + OR = 308, /* OR */ + SET = 309, /* SET */ + ON = 310, /* ON */ + INFILE = 311, /* INFILE */ + EXPLAIN = 312, /* EXPLAIN */ + STORAGE = 313, /* STORAGE */ + FORMAT = 314, /* FORMAT */ + INNER = 315, /* INNER */ + JOIN = 316, /* JOIN */ + VIEW = 317, /* VIEW */ + EQ = 318, /* EQ */ + LT = 319, /* LT */ + GT = 320, /* GT */ + LE = 321, /* LE */ + GE = 322, /* GE */ + NE = 323, /* NE */ + LIKE = 324, /* LIKE */ + IS = 325, /* IS */ + NUMBER = 326, /* NUMBER */ + FLOAT = 327, /* FLOAT */ + ID = 328, /* ID */ + SSS = 329, /* SSS */ + UMINUS = 330 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -134,7 +135,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 166 "yacc_sql.y" +#line 167 "yacc_sql.y" ParsedSqlNode * sql_node; Value * value; @@ -161,7 +162,7 @@ union YYSTYPE std::vector * index_attr_list; bool unique; -#line 165 "yacc_sql.hpp" +#line 166 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 7d2f26c6..c495ff8d 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -136,6 +136,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, LIMIT NULLABLE HELP + QUOTE EXIT DOT INTO @@ -635,6 +636,9 @@ nonnegative_value: | LSBRACE value_list RSBRACE { $$ = new Value(ListValue(), *$2); } + | QUOTE LSBRACE value_list RSBRACE QUOTE { + $$ = new Value(ListValue(), *$3); + } ; storage_format: From d381462b649dd8fcb93a43e44db6c5f3bb82dadf Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 22:06:29 +0800 Subject: [PATCH 280/308] =?UTF-8?q?=E5=AE=8C=E6=88=90vector=E7=9A=84?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/char_type.cpp | 3 +- src/observer/common/value.cpp | 14 +- src/observer/common/value.h | 13 +- src/observer/sql/parser/yacc_sql.cpp | 1216 +++++++++++++----------- src/observer/sql/parser/yacc_sql.hpp | 4 +- src/observer/sql/parser/yacc_sql.y | 60 +- 6 files changed, 712 insertions(+), 598 deletions(-) diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index 96c71482..3ccb2fb8 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -88,7 +88,8 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ return rc; } - result.set_vector(array, length); + // TODO: result.set_vector + return RC::INTERNAL; } break; default: return RC::UNIMPLEMENTED; } diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 46008086..ca8181f1 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -32,7 +32,9 @@ Value::Value(bool val) { set_boolean(val); } Value::Value(const char *s, int len /*= 0*/) { set_string(s, len); } -Value::Value(ListValue, const vector &values) { set_list(values); } +Value::Value(const vector &values) { set_list(values); } + +Value::Value(const vector &numbers) { set_vector(numbers); } Value::Value(const Value &other) { @@ -236,13 +238,11 @@ void Value::set_text(const char *s, int len /*= 65535*/) value_.pointer_value_[len] = '\0'; } } -void Value::set_vector(float *&array, size_t &length) -{ - attr_type_ = AttrType::VECTORS; - length_ = length; - value_.pointer_value_ = reinterpret_cast(array); - own_data_ = true; +void Value::set_vector(const std::vector &numbers) +{ + attr_type_ = AttrType::VECTORS; + // TODO: } void Value::set_list(const vector &val) diff --git a/src/observer/common/value.h b/src/observer/common/value.h index a9b4cbed..d6134f91 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -25,12 +25,6 @@ See the Mulan PSL v2 for more details. */ class NullValue {}; -class VectorValue -{}; - -class ListValue -{}; - /** * @brief 属性的值 * @ingroup DataType @@ -63,8 +57,8 @@ class Value final explicit Value(float val); explicit Value(bool val); explicit Value(const char *s, int len = 0); - explicit Value(ListValue, const vector &values); - explicit Value(VectorValue, const vector &values); + explicit Value(const vector &values); + explicit Value(const vector &numbers); Value(const Value &other); Value(Value &&other); @@ -152,7 +146,7 @@ class Value final void set_date(int val); void set_string(const char *s, int len = 0); void set_text(const char *s, int len = 65535); - void set_vector(float *&array, size_t &length); + void set_vector(const std::vector &numbers); void set_list(const vector &val); void set_string_from_other(const Value &other); @@ -167,6 +161,7 @@ class Value final bool bool_value_; char *pointer_value_; std::vector *list_value_; + std::vector *vector_value_; } value_ = {.int_value_ = 0}; static_assert(sizeof(std::vector *) == sizeof(char *)); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 4975c2eb..e55c2f47 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -285,37 +285,39 @@ enum yysymbol_kind_t YYSYMBOL_type = 103, /* type */ YYSYMBOL_insert_stmt = 104, /* insert_stmt */ YYSYMBOL_values_list = 105, /* values_list */ - YYSYMBOL_value_list = 106, /* value_list */ - YYSYMBOL_value = 107, /* value */ - YYSYMBOL_nonnegative_value = 108, /* nonnegative_value */ - YYSYMBOL_storage_format = 109, /* storage_format */ - YYSYMBOL_delete_stmt = 110, /* delete_stmt */ - YYSYMBOL_update_stmt = 111, /* update_stmt */ - YYSYMBOL_set_clauses = 112, /* set_clauses */ - YYSYMBOL_setClause = 113, /* setClause */ - YYSYMBOL_select_stmt = 114, /* select_stmt */ - YYSYMBOL_calc_stmt = 115, /* calc_stmt */ - YYSYMBOL_expression_list = 116, /* expression_list */ - YYSYMBOL_expression = 117, /* expression */ - YYSYMBOL_alias = 118, /* alias */ - YYSYMBOL_func_expr = 119, /* func_expr */ - YYSYMBOL_sub_query_expr = 120, /* sub_query_expr */ - YYSYMBOL_rel_attr = 121, /* rel_attr */ - YYSYMBOL_relation = 122, /* relation */ - YYSYMBOL_rel_list = 123, /* rel_list */ - YYSYMBOL_join_clauses = 124, /* join_clauses */ - YYSYMBOL_where = 125, /* where */ - YYSYMBOL_condition = 126, /* condition */ - YYSYMBOL_comp_op = 127, /* comp_op */ - YYSYMBOL_opt_order_by = 128, /* opt_order_by */ - YYSYMBOL_sort_list = 129, /* sort_list */ - YYSYMBOL_sort_unit = 130, /* sort_unit */ - YYSYMBOL_group_by = 131, /* group_by */ - YYSYMBOL_opt_having = 132, /* opt_having */ - YYSYMBOL_opt_limit = 133, /* opt_limit */ - YYSYMBOL_explain_stmt = 134, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 135, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 136 /* opt_semicolon */ + YYSYMBOL_digits = 106, /* digits */ + YYSYMBOL_digits_list = 107, /* digits_list */ + YYSYMBOL_value_list = 108, /* value_list */ + YYSYMBOL_value = 109, /* value */ + YYSYMBOL_nonnegative_value = 110, /* nonnegative_value */ + YYSYMBOL_storage_format = 111, /* storage_format */ + YYSYMBOL_delete_stmt = 112, /* delete_stmt */ + YYSYMBOL_update_stmt = 113, /* update_stmt */ + YYSYMBOL_set_clauses = 114, /* set_clauses */ + YYSYMBOL_set_clause = 115, /* set_clause */ + YYSYMBOL_select_stmt = 116, /* select_stmt */ + YYSYMBOL_calc_stmt = 117, /* calc_stmt */ + YYSYMBOL_expression_list = 118, /* expression_list */ + YYSYMBOL_expression = 119, /* expression */ + YYSYMBOL_alias = 120, /* alias */ + YYSYMBOL_func_expr = 121, /* func_expr */ + YYSYMBOL_sub_query_expr = 122, /* sub_query_expr */ + YYSYMBOL_rel_attr = 123, /* rel_attr */ + YYSYMBOL_relation = 124, /* relation */ + YYSYMBOL_rel_list = 125, /* rel_list */ + YYSYMBOL_join_clauses = 126, /* join_clauses */ + YYSYMBOL_where = 127, /* where */ + YYSYMBOL_condition = 128, /* condition */ + YYSYMBOL_comp_op = 129, /* comp_op */ + YYSYMBOL_opt_order_by = 130, /* opt_order_by */ + YYSYMBOL_sort_list = 131, /* sort_list */ + YYSYMBOL_sort_unit = 132, /* sort_unit */ + YYSYMBOL_group_by = 133, /* group_by */ + YYSYMBOL_opt_having = 134, /* opt_having */ + YYSYMBOL_opt_limit = 135, /* opt_limit */ + YYSYMBOL_explain_stmt = 136, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 137, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 138 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -646,16 +648,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 74 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 298 +#define YYLAST 300 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 80 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 57 +#define YYNNTS 59 /* YYNRULES -- Number of rules. */ -#define YYNRULES 151 +#define YYNRULES 159 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 273 +#define YYNSTATES 281 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 330 @@ -712,22 +714,22 @@ static const yytype_int8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 266, 266, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 299, 305, 310, 316, 322, - 328, 334, 341, 347, 355, 365, 380, 381, 385, 391, - 400, 410, 414, 418, 422, 426, 433, 441, 453, 463, - 466, 479, 497, 526, 530, 534, 539, 545, 546, 547, - 548, 549, 550, 554, 564, 578, 584, 591, 597, 605, - 608, 612, 619, 623, 627, 633, 636, 639, 646, 649, - 656, 668, 682, 687, 694, 704, 742, 775, 781, 790, - 793, 802, 818, 821, 824, 827, 830, 838, 841, 846, - 852, 855, 858, 861, 868, 871, 874, 879, 886, 893, - 898, 908, 914, 924, 941, 948, 960, 963, 969, 973, - 980, 984, 991, 992, 993, 994, 995, 996, 997, 998, - 999, 1000, 1001, 1002, 1003, 1004, 1009, 1012, 1020, 1025, - 1033, 1039, 1045, 1055, 1058, 1066, 1069, 1077, 1080, 1088, - 1096, 1107 + 0, 270, 270, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 303, 309, 314, 320, 326, + 332, 338, 345, 351, 359, 369, 384, 385, 389, 395, + 404, 414, 418, 422, 426, 430, 437, 445, 457, 467, + 470, 483, 501, 530, 534, 538, 543, 549, 550, 551, + 552, 553, 554, 558, 568, 582, 588, 595, 599, 603, + 607, 616, 619, 624, 632, 635, 641, 649, 652, 656, + 663, 667, 671, 677, 680, 683, 690, 693, 700, 712, + 726, 731, 738, 748, 786, 819, 825, 834, 837, 846, + 862, 865, 868, 871, 874, 882, 885, 890, 896, 899, + 902, 905, 912, 915, 918, 923, 930, 937, 942, 952, + 958, 968, 985, 992, 1004, 1007, 1013, 1017, 1024, 1028, + 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, + 1045, 1046, 1047, 1048, 1053, 1056, 1064, 1069, 1077, 1083, + 1089, 1099, 1102, 1110, 1113, 1121, 1124, 1132, 1140, 1151 }; #endif @@ -759,14 +761,14 @@ static const char *const yytname[] = "desc_table_stmt", "show_index_stmt", "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", "create_table_stmt", "create_view_stmt", "drop_view_stmt", "attr_def_list", "attr_def", "nullable_constraint", - "type", "insert_stmt", "values_list", "value_list", "value", - "nonnegative_value", "storage_format", "delete_stmt", "update_stmt", - "set_clauses", "setClause", "select_stmt", "calc_stmt", - "expression_list", "expression", "alias", "func_expr", "sub_query_expr", - "rel_attr", "relation", "rel_list", "join_clauses", "where", "condition", - "comp_op", "opt_order_by", "sort_list", "sort_unit", "group_by", - "opt_having", "opt_limit", "explain_stmt", "set_variable_stmt", - "opt_semicolon", YY_NULLPTR + "type", "insert_stmt", "values_list", "digits", "digits_list", + "value_list", "value", "nonnegative_value", "storage_format", + "delete_stmt", "update_stmt", "set_clauses", "set_clause", "select_stmt", + "calc_stmt", "expression_list", "expression", "alias", "func_expr", + "sub_query_expr", "rel_attr", "relation", "rel_list", "join_clauses", + "where", "condition", "comp_op", "opt_order_by", "sort_list", + "sort_unit", "group_by", "opt_having", "opt_limit", "explain_stmt", + "set_variable_stmt", "opt_semicolon", YY_NULLPTR }; static const char * @@ -776,7 +778,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-194) +#define YYPACT_NINF (-202) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -790,34 +792,35 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 241, 6, 5, 86, 86, -40, 103, -194, -22, -19, - -18, -194, -194, -194, -194, -194, -12, 241, 73, 66, - -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, - -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, - -194, -194, 2, -194, 19, 83, 36, 64, 68, 154, - 179, -194, 85, -194, -194, -3, -194, 86, -194, -194, - -194, 13, -194, -194, -194, 89, -194, -194, 105, 88, - 91, 102, 104, -194, -194, -194, -194, -8, 28, 92, - -194, 111, -194, 86, 143, 144, 57, 116, -194, -194, - 179, 86, -50, -194, 97, -194, 86, 86, 86, 86, - 145, 108, 108, -11, 124, 109, 179, 110, 117, 49, - 160, 112, 129, 114, 89, -194, -194, -194, -194, -194, - 179, 119, 163, -194, -194, -194, 71, 71, -194, -194, - 86, -194, 20, 124, -194, 112, 165, 170, -194, 128, - 0, -194, -194, 98, 169, 130, 160, -194, -194, 173, - 177, 125, -194, -194, 161, -194, -194, 146, 180, 200, - 187, 179, 185, -194, -194, 1, -194, -194, -194, -194, - -194, -194, -194, 178, 38, 101, 86, 86, 109, -194, - -194, -194, -194, -194, -194, -194, 15, 110, 191, 148, - -194, 112, 214, 195, -194, 108, 108, 216, 218, 183, - 32, 221, -194, -194, -194, -194, 86, 170, 170, 47, - 47, -194, 181, 213, -194, -194, -194, 169, 198, -194, - -194, 160, 112, 210, 124, 3, -194, 86, 170, 254, - 165, -194, 179, 47, -194, 215, 243, -194, -194, 55, - -194, 244, 170, 200, -194, 101, 267, 232, 185, 69, - 99, 160, -194, -194, -23, -194, 86, 204, -194, -194, - -194, -194, 217, 7, -194, 248, -194, 108, -194, -194, - 86, -194, -194 + 243, -2, 6, 147, 147, -53, 105, -202, -31, 15, + -29, -202, -202, -202, -202, -202, -17, 243, 94, 102, + -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, + -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, + -202, -202, 23, -202, 34, 107, 56, 58, 62, 91, + 28, -202, 83, -202, -202, 0, -202, 147, -202, -202, + -202, 5, -202, -202, -202, 76, -202, -202, 89, 88, + 96, 112, 116, -202, -202, -202, -202, -8, 29, 97, + -202, 128, -202, 147, 159, 160, 53, 106, -202, -202, + -44, 147, -6, -202, 113, -202, 147, 147, 147, 147, + 161, 114, 114, 2, 139, 118, 28, 120, 138, 35, + 182, 129, 146, 130, 76, -202, -202, -202, -202, -202, + 28, -202, -202, 66, -202, 121, 179, -202, -202, -202, + 73, 73, -202, -202, 147, -202, 4, 139, -202, 129, + 183, 172, -202, 143, -3, -202, -202, 140, 181, 151, + 182, -202, -202, 187, 185, 152, -202, -202, -202, -202, + 171, -44, -202, -202, 165, 199, 218, 204, 28, 202, + -202, -202, 1, -202, -202, -202, -202, -202, -202, -202, + 193, 77, 104, 147, 147, 118, -202, -202, -202, -202, + -202, -202, -202, 33, 120, 208, 174, -202, 129, 230, + 228, -202, -202, 114, 114, 247, 244, 205, 30, 232, + -202, -202, -202, -202, 147, 172, 172, 36, 36, -202, + 186, 217, -202, -202, -202, 181, 209, -202, -202, 182, + 129, 213, 139, 19, -202, 147, 172, 257, 183, -202, + 28, 36, -202, 219, 245, -202, -202, 42, -202, 250, + 172, 218, -202, 104, 270, 235, 202, 93, 54, 182, + -202, -202, -23, -202, 147, 207, -202, -202, -202, -202, + 220, 13, -202, 251, -202, 114, -202, -202, 147, -202, + -202 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -825,56 +828,57 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 37, 0, 89, 89, 0, 0, 27, 0, 0, + 0, 37, 0, 97, 97, 0, 0, 27, 0, 0, 0, 28, 29, 30, 26, 25, 0, 0, 0, 0, 24, 23, 17, 18, 19, 20, 9, 10, 11, 14, 12, 13, 8, 15, 16, 5, 7, 6, 3, 4, - 21, 22, 0, 36, 0, 0, 0, 0, 0, 89, - 0, 75, 0, 72, 73, 109, 74, 0, 100, 98, - 87, 104, 102, 103, 99, 88, 33, 32, 0, 0, - 0, 0, 0, 149, 1, 151, 2, 78, 0, 0, - 31, 0, 48, 89, 0, 0, 0, 0, 67, 69, - 0, 89, 0, 97, 0, 105, 0, 0, 0, 0, - 90, 0, 0, 0, 116, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 108, 96, 70, 71, 76, - 0, 0, 0, 110, 101, 106, 92, 93, 94, 95, - 89, 111, 104, 116, 34, 0, 0, 0, 80, 0, - 116, 82, 150, 0, 49, 0, 0, 45, 46, 38, - 0, 0, 40, 68, 0, 107, 91, 0, 112, 143, - 0, 0, 63, 134, 132, 0, 122, 123, 124, 125, - 126, 127, 130, 128, 0, 117, 0, 0, 0, 81, - 57, 58, 59, 60, 61, 62, 56, 0, 0, 0, - 44, 0, 0, 0, 77, 0, 0, 0, 145, 0, - 0, 0, 135, 133, 131, 129, 0, 0, 0, 119, - 84, 83, 0, 0, 55, 54, 52, 49, 78, 79, - 39, 0, 0, 0, 116, 104, 113, 89, 0, 136, - 0, 65, 0, 118, 120, 121, 0, 53, 50, 43, - 47, 0, 0, 143, 144, 146, 0, 147, 64, 0, - 56, 0, 42, 35, 114, 86, 0, 0, 85, 66, - 51, 41, 0, 140, 137, 138, 148, 0, 142, 141, - 0, 115, 139 + 21, 22, 0, 36, 0, 0, 0, 0, 0, 97, + 74, 83, 0, 80, 81, 117, 82, 0, 108, 106, + 95, 112, 110, 111, 107, 96, 33, 32, 0, 0, + 0, 0, 0, 157, 1, 159, 2, 86, 0, 0, + 31, 0, 48, 97, 0, 0, 0, 0, 75, 77, + 71, 97, 0, 105, 0, 113, 0, 0, 0, 0, + 98, 0, 0, 0, 124, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 116, 104, 78, 79, 84, + 0, 67, 69, 0, 72, 0, 0, 118, 109, 114, + 100, 101, 102, 103, 97, 119, 112, 124, 34, 0, + 0, 0, 88, 0, 124, 90, 158, 0, 49, 0, + 0, 45, 46, 38, 0, 0, 40, 76, 68, 70, + 0, 0, 115, 99, 0, 120, 151, 0, 74, 63, + 142, 140, 0, 130, 131, 132, 133, 134, 135, 138, + 136, 0, 125, 0, 0, 0, 89, 57, 58, 59, + 60, 61, 62, 56, 0, 0, 0, 44, 0, 0, + 0, 85, 73, 0, 0, 0, 153, 0, 0, 0, + 143, 141, 139, 137, 0, 0, 0, 127, 92, 91, + 0, 0, 55, 54, 52, 49, 86, 87, 39, 0, + 0, 0, 124, 112, 121, 97, 0, 144, 0, 65, + 74, 126, 128, 129, 0, 53, 50, 43, 47, 0, + 0, 151, 152, 154, 0, 155, 64, 0, 56, 0, + 42, 35, 122, 94, 0, 0, 93, 66, 51, 41, + 0, 148, 145, 146, 156, 0, 150, 149, 0, 123, + 147 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -194, -194, 260, -194, -194, -194, -194, -194, -194, -194, - -194, -194, -194, -194, -194, -126, -194, -194, -194, -194, - 62, 93, 31, -194, -194, 52, -87, -84, -42, 65, - -194, -194, -194, 106, -47, -194, -4, -56, 225, -194, - -194, -194, -96, 94, 21, -129, -193, 115, -194, 22, - -194, 48, -194, -194, -194, -194, -194 + -202, -202, 263, -202, -202, -202, -202, -202, -202, -202, + -202, -202, -202, -202, -202, -132, -202, -202, -202, -202, + 57, 90, 25, -202, -202, 47, 125, -202, -156, -84, + -45, 64, -202, -202, -202, 103, -47, -202, -4, -56, + 231, -202, -202, -202, -98, 87, 18, -131, -201, 115, + -202, 16, -202, 44, -202, -202, -202, -202, -202 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 45, 150, 31, 32, 33, 34, - 188, 144, 216, 186, 35, 162, 87, 88, 59, 109, - 36, 37, 140, 141, 38, 39, 60, 61, 158, 62, - 63, 64, 223, 133, 224, 138, 175, 176, 247, 264, - 265, 198, 229, 258, 40, 41, 76 + 27, 28, 29, 30, 45, 154, 31, 32, 33, 34, + 195, 148, 224, 193, 35, 169, 124, 125, 87, 88, + 59, 109, 36, 37, 144, 145, 38, 39, 60, 61, + 165, 62, 63, 64, 231, 137, 232, 142, 182, 183, + 255, 272, 273, 206, 237, 266, 40, 41, 76 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -882,70 +886,72 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 65, 93, 84, 121, 159, 132, 134, 94, 89, 160, - 202, 179, 268, 135, 234, 235, 107, 94, 46, 42, - 47, 91, 142, 123, 94, 269, 69, 124, 178, 207, - 208, 70, 110, 66, 203, 245, 153, 262, 136, 212, - 126, 127, 128, 129, 92, 85, 43, 163, 89, 254, - 108, 137, 111, 146, 213, 71, 214, 231, 215, 251, - 120, 72, 147, 148, 89, 220, 83, 48, 44, 75, - 204, 164, 83, 74, 200, 77, 95, 165, 89, 114, - 157, 174, 96, 97, 98, 99, 95, 122, 96, 97, - 98, 99, 78, 95, 259, 243, 241, 120, 79, 190, - 225, 166, 167, 168, 169, 170, 171, 172, 173, 80, - 49, 90, 50, 96, 97, 98, 99, 67, 68, 89, - 209, 210, 96, 97, 98, 99, 156, 51, 117, 118, - 180, 52, 181, 182, 183, 184, 185, 81, 213, 101, - 214, 82, 215, 119, 120, 249, 154, 120, 98, 99, - 233, 174, 174, 207, 208, 102, 105, 53, 54, 55, - 56, 103, 57, 58, 104, 112, 113, 106, 115, 116, - 125, 83, 174, 130, 240, 137, 145, 83, 49, 163, - 50, 131, 139, 143, 151, 149, 174, 152, 155, 161, - 89, 177, 252, 189, 49, 51, 50, 187, 193, 52, - 263, 191, 192, 164, 261, 50, 194, 195, 196, 165, - 197, 51, 199, 201, 263, 52, 218, 205, 221, 222, - 51, 219, 227, 244, 52, 53, 54, 55, 56, 228, - 57, 58, 230, 166, 167, 168, 169, 170, 171, 172, - 173, 53, 54, 55, 56, 232, 57, 58, 1, 2, - 53, 54, 236, 56, 237, 86, 108, 3, 4, 5, - 6, 7, 8, 9, 10, 242, 246, 207, 250, 253, - 11, 12, 13, 256, 257, 266, 270, 73, 267, 238, - 217, 260, 248, 239, 211, 14, 100, 15, 271, 206, - 226, 255, 272, 0, 0, 16, 0, 0, 17 + 65, 93, 84, 136, 138, 89, 166, 167, 94, 94, + 210, 42, 208, 186, 242, 243, 107, 69, 276, 46, + 66, 47, 146, 94, 91, 185, 139, 121, 122, 215, + 216, 277, 123, 110, 211, 253, 157, 270, 43, 150, + 130, 131, 132, 133, 71, 85, 259, 92, 141, 262, + 108, 140, 83, 111, 50, 239, 72, 220, 120, 83, + 44, 89, 151, 152, 164, 70, 228, 127, 48, 51, + 212, 128, 221, 52, 222, 89, 223, 95, 95, 114, + 96, 97, 98, 99, 257, 181, 170, 126, 96, 97, + 98, 99, 95, 221, 74, 222, 77, 223, 249, 53, + 54, 251, 56, 197, 86, 75, 233, 78, 83, 90, + 171, 96, 97, 98, 99, 49, 172, 50, 267, 67, + 68, 120, 79, 89, 117, 118, 101, 217, 218, 80, + 163, 81, 51, 119, 120, 82, 52, 158, 159, 102, + 173, 174, 175, 176, 177, 178, 179, 180, 160, 161, + 98, 99, 96, 97, 98, 99, 215, 216, 241, 181, + 181, 103, 53, 54, 55, 56, 105, 57, 58, 104, + 112, 49, 187, 50, 188, 189, 190, 191, 192, 106, + 181, 170, 248, 113, 115, 116, 129, 135, 51, 134, + 141, 143, 52, 147, 181, 89, 49, 149, 50, 83, + 260, 155, 153, 156, 162, 171, 184, 168, 271, 194, + 199, 172, 269, 51, 196, 198, 201, 52, 53, 54, + 55, 56, 271, 57, 58, 200, 203, 204, 205, 207, + 209, 252, 213, 226, 229, 173, 174, 175, 176, 177, + 178, 179, 180, 53, 54, 55, 56, 227, 57, 58, + 1, 2, 230, 235, 238, 236, 240, 244, 245, 3, + 4, 5, 6, 7, 8, 9, 10, 108, 250, 254, + 258, 215, 11, 12, 13, 261, 264, 265, 274, 278, + 73, 275, 246, 268, 225, 256, 202, 14, 219, 15, + 247, 234, 100, 279, 280, 263, 214, 16, 0, 0, + 17 }; static const yytype_int16 yycheck[] = { - 4, 57, 49, 90, 133, 101, 102, 4, 50, 135, - 9, 140, 5, 24, 207, 208, 24, 4, 13, 13, - 15, 24, 106, 73, 4, 18, 48, 77, 28, 52, - 53, 50, 4, 73, 33, 228, 120, 60, 49, 24, - 96, 97, 98, 99, 47, 49, 40, 9, 90, 242, - 58, 51, 24, 4, 39, 73, 41, 25, 43, 4, - 28, 73, 109, 110, 106, 191, 17, 62, 62, 3, - 69, 33, 17, 0, 161, 73, 73, 39, 120, 83, - 60, 137, 75, 76, 77, 78, 73, 91, 75, 76, - 77, 78, 73, 73, 25, 224, 222, 28, 15, 146, - 196, 63, 64, 65, 66, 67, 68, 69, 70, 73, - 24, 26, 26, 75, 76, 77, 78, 14, 15, 161, - 176, 177, 75, 76, 77, 78, 130, 41, 71, 72, - 32, 45, 34, 35, 36, 37, 38, 73, 39, 50, - 41, 73, 43, 27, 28, 232, 27, 28, 77, 78, - 206, 207, 208, 52, 53, 50, 54, 71, 72, 73, - 74, 73, 76, 77, 73, 73, 55, 63, 25, 25, - 73, 17, 228, 28, 221, 51, 59, 17, 24, 9, - 26, 73, 73, 73, 55, 73, 242, 73, 25, 24, - 232, 63, 239, 63, 24, 41, 26, 28, 73, 45, - 256, 28, 25, 33, 251, 26, 45, 61, 28, 39, - 10, 41, 25, 28, 270, 45, 25, 39, 4, 24, - 41, 73, 6, 227, 45, 71, 72, 73, 74, 11, - 76, 77, 49, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 24, 76, 77, 7, 8, - 71, 72, 71, 74, 41, 76, 58, 16, 17, 18, - 19, 20, 21, 22, 23, 55, 12, 52, 25, 25, - 29, 30, 31, 6, 42, 71, 28, 17, 61, 217, - 187, 250, 230, 218, 178, 44, 61, 46, 267, 174, - 196, 243, 270, -1, -1, 54, -1, -1, 57 + 4, 57, 49, 101, 102, 50, 137, 139, 4, 4, + 9, 13, 168, 144, 215, 216, 24, 48, 5, 13, + 73, 15, 106, 4, 24, 28, 24, 71, 72, 52, + 53, 18, 76, 4, 33, 236, 120, 60, 40, 4, + 96, 97, 98, 99, 73, 49, 4, 47, 51, 250, + 58, 49, 17, 24, 26, 25, 73, 24, 28, 17, + 62, 106, 109, 110, 60, 50, 198, 73, 62, 41, + 69, 77, 39, 45, 41, 120, 43, 73, 73, 83, + 75, 76, 77, 78, 240, 141, 9, 91, 75, 76, + 77, 78, 73, 39, 0, 41, 73, 43, 230, 71, + 72, 232, 74, 150, 76, 3, 204, 73, 17, 26, + 33, 75, 76, 77, 78, 24, 39, 26, 25, 14, + 15, 28, 15, 168, 71, 72, 50, 183, 184, 73, + 134, 73, 41, 27, 28, 73, 45, 71, 72, 50, + 63, 64, 65, 66, 67, 68, 69, 70, 27, 28, + 77, 78, 75, 76, 77, 78, 52, 53, 214, 215, + 216, 73, 71, 72, 73, 74, 54, 76, 77, 73, + 73, 24, 32, 26, 34, 35, 36, 37, 38, 63, + 236, 9, 229, 55, 25, 25, 73, 73, 41, 28, + 51, 73, 45, 73, 250, 240, 24, 59, 26, 17, + 247, 55, 73, 73, 25, 33, 63, 24, 264, 28, + 25, 39, 259, 41, 63, 28, 45, 45, 71, 72, + 73, 74, 278, 76, 77, 73, 61, 28, 10, 25, + 28, 235, 39, 25, 4, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 73, 76, 77, + 7, 8, 24, 6, 49, 11, 24, 71, 41, 16, + 17, 18, 19, 20, 21, 22, 23, 58, 55, 12, + 25, 52, 29, 30, 31, 25, 6, 42, 71, 28, + 17, 61, 225, 258, 194, 238, 161, 44, 185, 46, + 226, 204, 61, 275, 278, 251, 181, 54, -1, -1, + 57 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -955,31 +961,32 @@ static const yytype_uint8 yystos[] = 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, 23, 29, 30, 31, 44, 46, 54, 57, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 96, 97, 98, 99, 104, 110, 111, 114, 115, - 134, 135, 13, 40, 62, 94, 13, 15, 62, 24, - 26, 41, 45, 71, 72, 73, 74, 76, 77, 108, - 116, 117, 119, 120, 121, 116, 73, 14, 15, 48, - 50, 73, 73, 82, 0, 3, 136, 73, 73, 15, - 73, 73, 73, 17, 114, 116, 76, 106, 107, 108, - 26, 24, 47, 117, 4, 73, 75, 76, 77, 78, - 118, 50, 50, 73, 73, 54, 63, 24, 58, 109, - 4, 24, 73, 55, 116, 25, 25, 71, 72, 27, - 28, 106, 116, 73, 77, 73, 117, 117, 117, 117, - 28, 73, 122, 123, 122, 24, 49, 51, 125, 73, - 112, 113, 107, 73, 101, 59, 4, 114, 114, 73, - 95, 55, 73, 107, 27, 25, 116, 60, 118, 125, - 95, 24, 105, 9, 33, 39, 63, 64, 65, 66, - 67, 68, 69, 70, 117, 126, 127, 63, 28, 125, - 32, 34, 35, 36, 37, 38, 103, 28, 100, 63, - 114, 28, 25, 73, 45, 61, 28, 10, 131, 25, - 106, 28, 9, 33, 69, 39, 127, 52, 53, 117, - 117, 113, 24, 39, 41, 43, 102, 101, 25, 73, - 95, 4, 24, 122, 124, 122, 123, 6, 11, 132, - 49, 25, 24, 117, 126, 126, 71, 41, 100, 109, - 114, 95, 55, 125, 116, 126, 12, 128, 105, 106, - 25, 4, 114, 25, 126, 131, 6, 42, 133, 25, - 102, 114, 60, 117, 129, 130, 71, 61, 5, 18, - 28, 124, 129 + 93, 96, 97, 98, 99, 104, 112, 113, 116, 117, + 136, 137, 13, 40, 62, 94, 13, 15, 62, 24, + 26, 41, 45, 71, 72, 73, 74, 76, 77, 110, + 118, 119, 121, 122, 123, 118, 73, 14, 15, 48, + 50, 73, 73, 82, 0, 3, 138, 73, 73, 15, + 73, 73, 73, 17, 116, 118, 76, 108, 109, 110, + 26, 24, 47, 119, 4, 73, 75, 76, 77, 78, + 120, 50, 50, 73, 73, 54, 63, 24, 58, 111, + 4, 24, 73, 55, 118, 25, 25, 71, 72, 27, + 28, 71, 72, 76, 106, 107, 118, 73, 77, 73, + 119, 119, 119, 119, 28, 73, 124, 125, 124, 24, + 49, 51, 127, 73, 114, 115, 109, 73, 101, 59, + 4, 116, 116, 73, 95, 55, 73, 109, 71, 72, + 27, 28, 25, 118, 60, 120, 127, 95, 24, 105, + 9, 33, 39, 63, 64, 65, 66, 67, 68, 69, + 70, 119, 128, 129, 63, 28, 127, 32, 34, 35, + 36, 37, 38, 103, 28, 100, 63, 116, 28, 25, + 73, 45, 106, 61, 28, 10, 133, 25, 108, 28, + 9, 33, 69, 39, 129, 52, 53, 119, 119, 115, + 24, 39, 41, 43, 102, 101, 25, 73, 95, 4, + 24, 124, 126, 124, 125, 6, 11, 134, 49, 25, + 24, 119, 128, 128, 71, 41, 100, 111, 116, 95, + 55, 127, 118, 128, 12, 130, 105, 108, 25, 4, + 116, 25, 128, 133, 6, 42, 135, 25, 102, 116, + 60, 119, 131, 132, 71, 61, 5, 18, 28, 126, + 131 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -991,16 +998,16 @@ static const yytype_uint8 yyr1[] = 88, 89, 90, 91, 92, 93, 94, 94, 95, 95, 96, 97, 97, 97, 97, 97, 98, 98, 99, 100, 100, 101, 101, 102, 102, 102, 102, 103, 103, 103, - 103, 103, 103, 104, 104, 105, 105, 106, 106, 107, - 107, 107, 108, 108, 108, 108, 108, 108, 109, 109, - 110, 111, 112, 112, 113, 114, 114, 115, 115, 116, - 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 118, 118, 118, 119, 120, 121, - 121, 122, 123, 123, 124, 124, 125, 125, 126, 126, - 126, 126, 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 128, 128, 129, 129, - 130, 130, 130, 131, 131, 132, 132, 133, 133, 134, - 135, 136 + 103, 103, 103, 104, 104, 105, 105, 106, 106, 106, + 106, 107, 107, 107, 108, 108, 108, 109, 109, 109, + 110, 110, 110, 110, 110, 110, 111, 111, 112, 113, + 114, 114, 115, 116, 116, 117, 117, 118, 118, 118, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 120, 120, 120, 121, 122, 123, 123, 124, + 125, 125, 126, 126, 127, 127, 128, 128, 128, 128, + 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, + 129, 129, 129, 129, 130, 130, 131, 131, 132, 132, + 132, 133, 133, 134, 134, 135, 135, 136, 137, 138 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -1012,16 +1019,16 @@ static const yytype_int8 yyr2[] = 1, 3, 2, 2, 4, 9, 1, 0, 1, 3, 5, 10, 9, 8, 6, 5, 5, 8, 3, 0, 3, 6, 3, 2, 1, 1, 0, 1, 1, 1, - 1, 1, 1, 5, 8, 3, 5, 1, 3, 1, - 2, 2, 1, 1, 1, 1, 3, 5, 0, 4, - 4, 5, 1, 3, 3, 9, 9, 2, 2, 0, - 2, 4, 3, 3, 3, 3, 3, 2, 1, 1, - 1, 3, 1, 1, 0, 1, 2, 4, 3, 1, - 3, 1, 2, 4, 3, 6, 0, 2, 3, 2, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 2, 1, 2, 1, 2, 0, 3, 1, 3, - 1, 2, 2, 0, 3, 0, 2, 0, 2, 2, - 4, 1 + 1, 1, 1, 5, 8, 3, 5, 1, 2, 1, + 2, 0, 1, 3, 0, 1, 3, 1, 2, 2, + 1, 1, 1, 1, 3, 5, 0, 4, 4, 5, + 1, 3, 3, 9, 9, 2, 2, 0, 2, 4, + 3, 3, 3, 3, 3, 2, 1, 1, 1, 3, + 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, + 2, 4, 3, 6, 0, 2, 3, 2, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, + 1, 2, 1, 2, 0, 3, 1, 3, 1, 2, + 2, 0, 3, 0, 2, 0, 2, 2, 4, 1 }; @@ -1883,104 +1890,104 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 267 "yacc_sql.y" +#line 271 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1892 "yacc_sql.cpp" +#line 1899 "yacc_sql.cpp" break; case 25: /* exit_stmt: EXIT */ -#line 299 "yacc_sql.y" +#line 303 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1901 "yacc_sql.cpp" +#line 1908 "yacc_sql.cpp" break; case 26: /* help_stmt: HELP */ -#line 305 "yacc_sql.y" +#line 309 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1909 "yacc_sql.cpp" +#line 1916 "yacc_sql.cpp" break; case 27: /* sync_stmt: SYNC */ -#line 310 "yacc_sql.y" +#line 314 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1917 "yacc_sql.cpp" +#line 1924 "yacc_sql.cpp" break; case 28: /* begin_stmt: TRX_BEGIN */ -#line 316 "yacc_sql.y" +#line 320 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1925 "yacc_sql.cpp" +#line 1932 "yacc_sql.cpp" break; case 29: /* commit_stmt: TRX_COMMIT */ -#line 322 "yacc_sql.y" +#line 326 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1933 "yacc_sql.cpp" +#line 1940 "yacc_sql.cpp" break; case 30: /* rollback_stmt: TRX_ROLLBACK */ -#line 328 "yacc_sql.y" +#line 332 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1941 "yacc_sql.cpp" +#line 1948 "yacc_sql.cpp" break; case 31: /* drop_table_stmt: DROP TABLE ID */ -#line 334 "yacc_sql.y" +#line 338 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1951 "yacc_sql.cpp" +#line 1958 "yacc_sql.cpp" break; case 32: /* show_tables_stmt: SHOW TABLES */ -#line 341 "yacc_sql.y" +#line 345 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1959 "yacc_sql.cpp" +#line 1966 "yacc_sql.cpp" break; case 33: /* desc_table_stmt: DESC ID */ -#line 347 "yacc_sql.y" +#line 351 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1969 "yacc_sql.cpp" +#line 1976 "yacc_sql.cpp" break; case 34: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 356 "yacc_sql.y" +#line 360 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1980 "yacc_sql.cpp" +#line 1987 "yacc_sql.cpp" break; case 35: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 366 "yacc_sql.y" +#line 370 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1992,43 +1999,43 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1996 "yacc_sql.cpp" +#line 2003 "yacc_sql.cpp" break; case 36: /* opt_unique: UNIQUE */ -#line 380 "yacc_sql.y" +#line 384 "yacc_sql.y" { (yyval.unique) = true; } -#line 2002 "yacc_sql.cpp" +#line 2009 "yacc_sql.cpp" break; case 37: /* opt_unique: %empty */ -#line 381 "yacc_sql.y" +#line 385 "yacc_sql.y" { (yyval.unique) = false; } -#line 2008 "yacc_sql.cpp" +#line 2015 "yacc_sql.cpp" break; case 38: /* attr_list: ID */ -#line 386 "yacc_sql.y" +#line 390 "yacc_sql.y" { (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 2018 "yacc_sql.cpp" +#line 2025 "yacc_sql.cpp" break; case 39: /* attr_list: ID COMMA attr_list */ -#line 392 "yacc_sql.y" +#line 396 "yacc_sql.y" { (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2028 "yacc_sql.cpp" +#line 2035 "yacc_sql.cpp" break; case 40: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 401 "yacc_sql.y" +#line 405 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -2036,51 +2043,51 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2040 "yacc_sql.cpp" +#line 2047 "yacc_sql.cpp" break; case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ -#line 411 "yacc_sql.y" +#line 415 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2048 "yacc_sql.cpp" +#line 2055 "yacc_sql.cpp" break; case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ -#line 415 "yacc_sql.y" +#line 419 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2056 "yacc_sql.cpp" +#line 2063 "yacc_sql.cpp" break; case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 419 "yacc_sql.y" +#line 423 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2064 "yacc_sql.cpp" +#line 2071 "yacc_sql.cpp" break; case 44: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ -#line 423 "yacc_sql.y" +#line 427 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2072 "yacc_sql.cpp" +#line 2079 "yacc_sql.cpp" break; case 45: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ -#line 427 "yacc_sql.y" +#line 431 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2080 "yacc_sql.cpp" +#line 2087 "yacc_sql.cpp" break; case 46: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ -#line 434 "yacc_sql.y" +#line 438 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; @@ -2088,11 +2095,11 @@ YYLTYPE yylloc = yyloc_default; create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } -#line 2092 "yacc_sql.cpp" +#line 2099 "yacc_sql.cpp" break; case 47: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ -#line 442 "yacc_sql.y" +#line 446 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; @@ -2101,29 +2108,29 @@ YYLTYPE yylloc = yyloc_default; create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-5].string)); } -#line 2105 "yacc_sql.cpp" +#line 2112 "yacc_sql.cpp" break; case 48: /* drop_view_stmt: DROP VIEW ID */ -#line 454 "yacc_sql.y" +#line 458 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2115 "yacc_sql.cpp" +#line 2122 "yacc_sql.cpp" break; case 49: /* attr_def_list: %empty */ -#line 463 "yacc_sql.y" +#line 467 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2123 "yacc_sql.cpp" +#line 2130 "yacc_sql.cpp" break; case 50: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 467 "yacc_sql.y" +#line 471 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -2133,11 +2140,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2137 "yacc_sql.cpp" +#line 2144 "yacc_sql.cpp" break; case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 480 "yacc_sql.y" +#line 484 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->name = (yyvsp[-5].string); @@ -2155,11 +2162,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2159 "yacc_sql.cpp" +#line 2166 "yacc_sql.cpp" break; case 52: /* attr_def: ID type nullable_constraint */ -#line 498 "yacc_sql.y" +#line 502 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -2185,79 +2192,79 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2189 "yacc_sql.cpp" +#line 2196 "yacc_sql.cpp" break; case 53: /* nullable_constraint: NOT NULL_T */ -#line 527 "yacc_sql.y" +#line 531 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2197 "yacc_sql.cpp" +#line 2204 "yacc_sql.cpp" break; case 54: /* nullable_constraint: NULLABLE */ -#line 531 "yacc_sql.y" +#line 535 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2205 "yacc_sql.cpp" +#line 2212 "yacc_sql.cpp" break; case 55: /* nullable_constraint: NULL_T */ -#line 535 "yacc_sql.y" +#line 539 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2213 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; case 56: /* nullable_constraint: %empty */ -#line 539 "yacc_sql.y" +#line 543 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2221 "yacc_sql.cpp" +#line 2228 "yacc_sql.cpp" break; case 57: /* type: INT_T */ -#line 545 "yacc_sql.y" +#line 549 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2227 "yacc_sql.cpp" +#line 2234 "yacc_sql.cpp" break; case 58: /* type: STRING_T */ -#line 546 "yacc_sql.y" +#line 550 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2233 "yacc_sql.cpp" +#line 2240 "yacc_sql.cpp" break; case 59: /* type: FLOAT_T */ -#line 547 "yacc_sql.y" +#line 551 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2239 "yacc_sql.cpp" +#line 2246 "yacc_sql.cpp" break; case 60: /* type: DATE_T */ -#line 548 "yacc_sql.y" +#line 552 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2245 "yacc_sql.cpp" +#line 2252 "yacc_sql.cpp" break; case 61: /* type: TEXT_T */ -#line 549 "yacc_sql.y" +#line 553 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2251 "yacc_sql.cpp" +#line 2258 "yacc_sql.cpp" break; case 62: /* type: VECTOR_T */ -#line 550 "yacc_sql.y" +#line 554 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::VECTORS); } -#line 2257 "yacc_sql.cpp" +#line 2264 "yacc_sql.cpp" break; case 63: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 555 "yacc_sql.y" +#line 559 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2267,11 +2274,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2271 "yacc_sql.cpp" +#line 2278 "yacc_sql.cpp" break; case 64: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ -#line 565 "yacc_sql.y" +#line 569 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -2282,144 +2289,209 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2286 "yacc_sql.cpp" +#line 2293 "yacc_sql.cpp" break; case 65: /* values_list: LBRACE value_list RBRACE */ -#line 579 "yacc_sql.y" +#line 583 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2296 "yacc_sql.cpp" +#line 2303 "yacc_sql.cpp" break; case 66: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 585 "yacc_sql.y" +#line 589 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2305 "yacc_sql.cpp" +#line 2312 "yacc_sql.cpp" + break; + + case 67: /* digits: NUMBER */ +#line 596 "yacc_sql.y" + { + (yyval.digits) = float((yyvsp[0].number)); + } +#line 2320 "yacc_sql.cpp" + break; + + case 68: /* digits: '-' NUMBER */ +#line 600 "yacc_sql.y" + { + (yyval.digits) = float(-(yyvsp[0].number)); + } +#line 2328 "yacc_sql.cpp" break; - case 67: /* value_list: value */ -#line 592 "yacc_sql.y" + case 69: /* digits: FLOAT */ +#line 604 "yacc_sql.y" + { + (yyval.digits) = (yyvsp[0].floats); + } +#line 2336 "yacc_sql.cpp" + break; + + case 70: /* digits: '-' FLOAT */ +#line 608 "yacc_sql.y" + { + (yyval.digits) = (yyvsp[0].floats); + } +#line 2344 "yacc_sql.cpp" + break; + + case 71: /* digits_list: %empty */ +#line 616 "yacc_sql.y" + { + (yyval.digits_list) = new std::vector(); + } +#line 2352 "yacc_sql.cpp" + break; + + case 72: /* digits_list: digits */ +#line 620 "yacc_sql.y" + { + (yyval.digits_list) = new std::vector(); + (yyval.digits_list)->push_back((yyvsp[0].digits)); + } +#line 2361 "yacc_sql.cpp" + break; + + case 73: /* digits_list: digits_list COMMA digits */ +#line 625 "yacc_sql.y" + { + (yyval.digits_list)->push_back((yyvsp[0].digits)); + } +#line 2369 "yacc_sql.cpp" + break; + + case 74: /* value_list: %empty */ +#line 632 "yacc_sql.y" + { + (yyval.value_list) = new std::vector; + } +#line 2377 "yacc_sql.cpp" + break; + + case 75: /* value_list: value */ +#line 636 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2315 "yacc_sql.cpp" +#line 2387 "yacc_sql.cpp" break; - case 68: /* value_list: value_list COMMA value */ -#line 598 "yacc_sql.y" + case 76: /* value_list: value_list COMMA value */ +#line 642 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2324 "yacc_sql.cpp" +#line 2396 "yacc_sql.cpp" break; - case 69: /* value: nonnegative_value */ -#line 605 "yacc_sql.y" + case 77: /* value: nonnegative_value */ +#line 649 "yacc_sql.y" { (yyval.value) = (yyvsp[0].value); } -#line 2332 "yacc_sql.cpp" +#line 2404 "yacc_sql.cpp" break; - case 70: /* value: '-' NUMBER */ -#line 608 "yacc_sql.y" + case 78: /* value: '-' NUMBER */ +#line 652 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2341 "yacc_sql.cpp" +#line 2413 "yacc_sql.cpp" break; - case 71: /* value: '-' FLOAT */ -#line 612 "yacc_sql.y" + case 79: /* value: '-' FLOAT */ +#line 656 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2350 "yacc_sql.cpp" +#line 2422 "yacc_sql.cpp" break; - case 72: /* nonnegative_value: NUMBER */ -#line 619 "yacc_sql.y" + case 80: /* nonnegative_value: NUMBER */ +#line 663 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2359 "yacc_sql.cpp" +#line 2431 "yacc_sql.cpp" break; - case 73: /* nonnegative_value: FLOAT */ -#line 623 "yacc_sql.y" + case 81: /* nonnegative_value: FLOAT */ +#line 667 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2368 "yacc_sql.cpp" +#line 2440 "yacc_sql.cpp" break; - case 74: /* nonnegative_value: SSS */ -#line 627 "yacc_sql.y" + case 82: /* nonnegative_value: SSS */ +#line 671 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2379 "yacc_sql.cpp" +#line 2451 "yacc_sql.cpp" break; - case 75: /* nonnegative_value: NULL_T */ -#line 633 "yacc_sql.y" + case 83: /* nonnegative_value: NULL_T */ +#line 677 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2387 "yacc_sql.cpp" +#line 2459 "yacc_sql.cpp" break; - case 76: /* nonnegative_value: LSBRACE value_list RSBRACE */ -#line 636 "yacc_sql.y" + case 84: /* nonnegative_value: LSBRACE value_list RSBRACE */ +#line 680 "yacc_sql.y" { - (yyval.value) = new Value(ListValue(), *(yyvsp[-1].value_list)); + (yyval.value) = new Value(*(yyvsp[-1].value_list)); } -#line 2395 "yacc_sql.cpp" +#line 2467 "yacc_sql.cpp" break; - case 77: /* nonnegative_value: QUOTE LSBRACE value_list RSBRACE QUOTE */ -#line 639 "yacc_sql.y" - { - (yyval.value) = new Value(ListValue(), *(yyvsp[-2].value_list)); + case 85: /* nonnegative_value: QUOTE LSBRACE digits_list RSBRACE QUOTE */ +#line 683 "yacc_sql.y" + { + (yyval.value) = new Value(*(yyvsp[-2].digits_list)); } -#line 2403 "yacc_sql.cpp" +#line 2475 "yacc_sql.cpp" break; - case 78: /* storage_format: %empty */ -#line 646 "yacc_sql.y" + case 86: /* storage_format: %empty */ +#line 690 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2411 "yacc_sql.cpp" +#line 2483 "yacc_sql.cpp" break; - case 79: /* storage_format: STORAGE FORMAT EQ ID */ -#line 650 "yacc_sql.y" + case 87: /* storage_format: STORAGE FORMAT EQ ID */ +#line 694 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2419 "yacc_sql.cpp" +#line 2491 "yacc_sql.cpp" break; - case 80: /* delete_stmt: DELETE FROM ID where */ -#line 657 "yacc_sql.y" + case 88: /* delete_stmt: DELETE FROM ID where */ +#line 701 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2428,11 +2500,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2432 "yacc_sql.cpp" +#line 2504 "yacc_sql.cpp" break; - case 81: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 669 "yacc_sql.y" + case 89: /* update_stmt: UPDATE ID SET set_clauses where */ +#line 713 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2443,39 +2515,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2447 "yacc_sql.cpp" +#line 2519 "yacc_sql.cpp" break; - case 82: /* set_clauses: setClause */ -#line 683 "yacc_sql.y" + case 90: /* set_clauses: set_clause */ +#line 727 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2456 "yacc_sql.cpp" +#line 2528 "yacc_sql.cpp" break; - case 83: /* set_clauses: set_clauses COMMA setClause */ -#line 688 "yacc_sql.y" + case 91: /* set_clauses: set_clauses COMMA set_clause */ +#line 732 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2464 "yacc_sql.cpp" +#line 2536 "yacc_sql.cpp" break; - case 84: /* setClause: ID EQ expression */ -#line 695 "yacc_sql.y" + case 92: /* set_clause: ID EQ expression */ +#line 739 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2475 "yacc_sql.cpp" +#line 2547 "yacc_sql.cpp" break; - case 85: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ -#line 705 "yacc_sql.y" + case 93: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ +#line 749 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2513,11 +2585,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].limited_info); } } -#line 2517 "yacc_sql.cpp" +#line 2589 "yacc_sql.cpp" break; - case 86: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 743 "yacc_sql.y" + case 94: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ +#line 787 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2547,39 +2619,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2551 "yacc_sql.cpp" +#line 2623 "yacc_sql.cpp" break; - case 87: /* calc_stmt: CALC expression_list */ -#line 776 "yacc_sql.y" + case 95: /* calc_stmt: CALC expression_list */ +#line 820 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2561 "yacc_sql.cpp" +#line 2633 "yacc_sql.cpp" break; - case 88: /* calc_stmt: SELECT expression_list */ -#line 782 "yacc_sql.y" + case 96: /* calc_stmt: SELECT expression_list */ +#line 826 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2571 "yacc_sql.cpp" +#line 2643 "yacc_sql.cpp" break; - case 89: /* expression_list: %empty */ -#line 790 "yacc_sql.y" + case 97: /* expression_list: %empty */ +#line 834 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2579 "yacc_sql.cpp" +#line 2651 "yacc_sql.cpp" break; - case 90: /* expression_list: expression alias */ -#line 794 "yacc_sql.y" + case 98: /* expression_list: expression alias */ +#line 838 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2588,11 +2660,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2592 "yacc_sql.cpp" +#line 2664 "yacc_sql.cpp" break; - case 91: /* expression_list: expression alias COMMA expression_list */ -#line 803 "yacc_sql.y" + case 99: /* expression_list: expression alias COMMA expression_list */ +#line 847 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2605,43 +2677,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2609 "yacc_sql.cpp" +#line 2681 "yacc_sql.cpp" break; - case 92: /* expression: expression '+' expression */ -#line 818 "yacc_sql.y" + case 100: /* expression: expression '+' expression */ +#line 862 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2617 "yacc_sql.cpp" +#line 2689 "yacc_sql.cpp" break; - case 93: /* expression: expression '-' expression */ -#line 821 "yacc_sql.y" + case 101: /* expression: expression '-' expression */ +#line 865 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2625 "yacc_sql.cpp" +#line 2697 "yacc_sql.cpp" break; - case 94: /* expression: expression '*' expression */ -#line 824 "yacc_sql.y" + case 102: /* expression: expression '*' expression */ +#line 868 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2633 "yacc_sql.cpp" +#line 2705 "yacc_sql.cpp" break; - case 95: /* expression: expression '/' expression */ -#line 827 "yacc_sql.y" + case 103: /* expression: expression '/' expression */ +#line 871 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2641 "yacc_sql.cpp" +#line 2713 "yacc_sql.cpp" break; - case 96: /* expression: LBRACE expression_list RBRACE */ -#line 830 "yacc_sql.y" + case 104: /* expression: LBRACE expression_list RBRACE */ +#line 874 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2650,122 +2722,122 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2654 "yacc_sql.cpp" +#line 2726 "yacc_sql.cpp" break; - case 97: /* expression: '-' expression */ -#line 838 "yacc_sql.y" + case 105: /* expression: '-' expression */ +#line 882 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2662 "yacc_sql.cpp" +#line 2734 "yacc_sql.cpp" break; - case 98: /* expression: nonnegative_value */ -#line 841 "yacc_sql.y" + case 106: /* expression: nonnegative_value */ +#line 885 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2672 "yacc_sql.cpp" +#line 2744 "yacc_sql.cpp" break; - case 99: /* expression: rel_attr */ -#line 846 "yacc_sql.y" + case 107: /* expression: rel_attr */ +#line 890 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2683 "yacc_sql.cpp" +#line 2755 "yacc_sql.cpp" break; - case 100: /* expression: '*' */ -#line 852 "yacc_sql.y" + case 108: /* expression: '*' */ +#line 896 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2691 "yacc_sql.cpp" +#line 2763 "yacc_sql.cpp" break; - case 101: /* expression: ID DOT '*' */ -#line 855 "yacc_sql.y" + case 109: /* expression: ID DOT '*' */ +#line 899 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2699 "yacc_sql.cpp" +#line 2771 "yacc_sql.cpp" break; - case 102: /* expression: func_expr */ -#line 858 "yacc_sql.y" + case 110: /* expression: func_expr */ +#line 902 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2707 "yacc_sql.cpp" +#line 2779 "yacc_sql.cpp" break; - case 103: /* expression: sub_query_expr */ -#line 861 "yacc_sql.y" + case 111: /* expression: sub_query_expr */ +#line 905 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2715 "yacc_sql.cpp" +#line 2787 "yacc_sql.cpp" break; - case 104: /* alias: %empty */ -#line 868 "yacc_sql.y" + case 112: /* alias: %empty */ +#line 912 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2723 "yacc_sql.cpp" +#line 2795 "yacc_sql.cpp" break; - case 105: /* alias: ID */ -#line 871 "yacc_sql.y" + case 113: /* alias: ID */ +#line 915 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2731 "yacc_sql.cpp" +#line 2803 "yacc_sql.cpp" break; - case 106: /* alias: AS ID */ -#line 874 "yacc_sql.y" + case 114: /* alias: AS ID */ +#line 918 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2739 "yacc_sql.cpp" +#line 2811 "yacc_sql.cpp" break; - case 107: /* func_expr: ID LBRACE expression_list RBRACE */ -#line 880 "yacc_sql.y" + case 115: /* func_expr: ID LBRACE expression_list RBRACE */ +#line 924 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2747 "yacc_sql.cpp" +#line 2819 "yacc_sql.cpp" break; - case 108: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 887 "yacc_sql.y" + case 116: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 931 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2755 "yacc_sql.cpp" +#line 2827 "yacc_sql.cpp" break; - case 109: /* rel_attr: ID */ -#line 893 "yacc_sql.y" + case 117: /* rel_attr: ID */ +#line 937 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2765 "yacc_sql.cpp" +#line 2837 "yacc_sql.cpp" break; - case 110: /* rel_attr: ID DOT ID */ -#line 898 "yacc_sql.y" + case 118: /* rel_attr: ID DOT ID */ +#line 942 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2773,19 +2845,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2777 "yacc_sql.cpp" +#line 2849 "yacc_sql.cpp" break; - case 111: /* relation: ID */ -#line 908 "yacc_sql.y" + case 119: /* relation: ID */ +#line 952 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2785 "yacc_sql.cpp" +#line 2857 "yacc_sql.cpp" break; - case 112: /* rel_list: relation alias */ -#line 914 "yacc_sql.y" + case 120: /* rel_list: relation alias */ +#line 958 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2796,11 +2868,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2800 "yacc_sql.cpp" +#line 2872 "yacc_sql.cpp" break; - case 113: /* rel_list: relation alias COMMA rel_list */ -#line 924 "yacc_sql.y" + case 121: /* rel_list: relation alias COMMA rel_list */ +#line 968 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2815,22 +2887,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2819 "yacc_sql.cpp" +#line 2891 "yacc_sql.cpp" break; - case 114: /* join_clauses: relation ON condition */ -#line 942 "yacc_sql.y" + case 122: /* join_clauses: relation ON condition */ +#line 986 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2830 "yacc_sql.cpp" +#line 2902 "yacc_sql.cpp" break; - case 115: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 949 "yacc_sql.y" + case 123: /* join_clauses: relation ON condition INNER JOIN join_clauses */ +#line 993 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2838,269 +2910,269 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2842 "yacc_sql.cpp" +#line 2914 "yacc_sql.cpp" break; - case 116: /* where: %empty */ -#line 960 "yacc_sql.y" + case 124: /* where: %empty */ +#line 1004 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2850 "yacc_sql.cpp" +#line 2922 "yacc_sql.cpp" break; - case 117: /* where: WHERE condition */ -#line 963 "yacc_sql.y" + case 125: /* where: WHERE condition */ +#line 1007 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2858 "yacc_sql.cpp" +#line 2930 "yacc_sql.cpp" break; - case 118: /* condition: expression comp_op expression */ -#line 970 "yacc_sql.y" + case 126: /* condition: expression comp_op expression */ +#line 1014 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2866 "yacc_sql.cpp" +#line 2938 "yacc_sql.cpp" break; - case 119: /* condition: comp_op expression */ -#line 974 "yacc_sql.y" + case 127: /* condition: comp_op expression */ +#line 1018 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2877 "yacc_sql.cpp" +#line 2949 "yacc_sql.cpp" break; - case 120: /* condition: condition AND condition */ -#line 981 "yacc_sql.y" + case 128: /* condition: condition AND condition */ +#line 1025 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2885 "yacc_sql.cpp" +#line 2957 "yacc_sql.cpp" break; - case 121: /* condition: condition OR condition */ -#line 985 "yacc_sql.y" + case 129: /* condition: condition OR condition */ +#line 1029 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2893 "yacc_sql.cpp" +#line 2965 "yacc_sql.cpp" break; - case 122: /* comp_op: EQ */ -#line 991 "yacc_sql.y" + case 130: /* comp_op: EQ */ +#line 1035 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2899 "yacc_sql.cpp" +#line 2971 "yacc_sql.cpp" break; - case 123: /* comp_op: LT */ -#line 992 "yacc_sql.y" + case 131: /* comp_op: LT */ +#line 1036 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2905 "yacc_sql.cpp" +#line 2977 "yacc_sql.cpp" break; - case 124: /* comp_op: GT */ -#line 993 "yacc_sql.y" + case 132: /* comp_op: GT */ +#line 1037 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2911 "yacc_sql.cpp" +#line 2983 "yacc_sql.cpp" break; - case 125: /* comp_op: LE */ -#line 994 "yacc_sql.y" + case 133: /* comp_op: LE */ +#line 1038 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2917 "yacc_sql.cpp" +#line 2989 "yacc_sql.cpp" break; - case 126: /* comp_op: GE */ -#line 995 "yacc_sql.y" + case 134: /* comp_op: GE */ +#line 1039 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2923 "yacc_sql.cpp" +#line 2995 "yacc_sql.cpp" break; - case 127: /* comp_op: NE */ -#line 996 "yacc_sql.y" + case 135: /* comp_op: NE */ +#line 1040 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2929 "yacc_sql.cpp" +#line 3001 "yacc_sql.cpp" break; - case 128: /* comp_op: IS */ -#line 997 "yacc_sql.y" + case 136: /* comp_op: IS */ +#line 1041 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2935 "yacc_sql.cpp" +#line 3007 "yacc_sql.cpp" break; - case 129: /* comp_op: IS NOT */ -#line 998 "yacc_sql.y" + case 137: /* comp_op: IS NOT */ +#line 1042 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2941 "yacc_sql.cpp" +#line 3013 "yacc_sql.cpp" break; - case 130: /* comp_op: LIKE */ -#line 999 "yacc_sql.y" + case 138: /* comp_op: LIKE */ +#line 1043 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 2947 "yacc_sql.cpp" +#line 3019 "yacc_sql.cpp" break; - case 131: /* comp_op: NOT LIKE */ -#line 1000 "yacc_sql.y" + case 139: /* comp_op: NOT LIKE */ +#line 1044 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 2953 "yacc_sql.cpp" +#line 3025 "yacc_sql.cpp" break; - case 132: /* comp_op: IN */ -#line 1001 "yacc_sql.y" + case 140: /* comp_op: IN */ +#line 1045 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2959 "yacc_sql.cpp" +#line 3031 "yacc_sql.cpp" break; - case 133: /* comp_op: NOT IN */ -#line 1002 "yacc_sql.y" + case 141: /* comp_op: NOT IN */ +#line 1046 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2965 "yacc_sql.cpp" +#line 3037 "yacc_sql.cpp" break; - case 134: /* comp_op: EXISTS */ -#line 1003 "yacc_sql.y" + case 142: /* comp_op: EXISTS */ +#line 1047 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2971 "yacc_sql.cpp" +#line 3043 "yacc_sql.cpp" break; - case 135: /* comp_op: NOT EXISTS */ -#line 1004 "yacc_sql.y" + case 143: /* comp_op: NOT EXISTS */ +#line 1048 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2977 "yacc_sql.cpp" +#line 3049 "yacc_sql.cpp" break; - case 136: /* opt_order_by: %empty */ -#line 1009 "yacc_sql.y" + case 144: /* opt_order_by: %empty */ +#line 1053 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2985 "yacc_sql.cpp" +#line 3057 "yacc_sql.cpp" break; - case 137: /* opt_order_by: ORDER BY sort_list */ -#line 1013 "yacc_sql.y" + case 145: /* opt_order_by: ORDER BY sort_list */ +#line 1057 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 2994 "yacc_sql.cpp" +#line 3066 "yacc_sql.cpp" break; - case 138: /* sort_list: sort_unit */ -#line 1021 "yacc_sql.y" + case 146: /* sort_list: sort_unit */ +#line 1065 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 3003 "yacc_sql.cpp" +#line 3075 "yacc_sql.cpp" break; - case 139: /* sort_list: sort_unit COMMA sort_list */ -#line 1026 "yacc_sql.y" + case 147: /* sort_list: sort_unit COMMA sort_list */ +#line 1070 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 3012 "yacc_sql.cpp" +#line 3084 "yacc_sql.cpp" break; - case 140: /* sort_unit: expression */ -#line 1034 "yacc_sql.y" + case 148: /* sort_unit: expression */ +#line 1078 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3022 "yacc_sql.cpp" +#line 3094 "yacc_sql.cpp" break; - case 141: /* sort_unit: expression DESC */ -#line 1040 "yacc_sql.y" + case 149: /* sort_unit: expression DESC */ +#line 1084 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 3032 "yacc_sql.cpp" +#line 3104 "yacc_sql.cpp" break; - case 142: /* sort_unit: expression ASC */ -#line 1046 "yacc_sql.y" + case 150: /* sort_unit: expression ASC */ +#line 1090 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3042 "yacc_sql.cpp" +#line 3114 "yacc_sql.cpp" break; - case 143: /* group_by: %empty */ -#line 1055 "yacc_sql.y" + case 151: /* group_by: %empty */ +#line 1099 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 3050 "yacc_sql.cpp" +#line 3122 "yacc_sql.cpp" break; - case 144: /* group_by: GROUP BY expression_list */ -#line 1059 "yacc_sql.y" + case 152: /* group_by: GROUP BY expression_list */ +#line 1103 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 3058 "yacc_sql.cpp" +#line 3130 "yacc_sql.cpp" break; - case 145: /* opt_having: %empty */ -#line 1066 "yacc_sql.y" + case 153: /* opt_having: %empty */ +#line 1110 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 3066 "yacc_sql.cpp" +#line 3138 "yacc_sql.cpp" break; - case 146: /* opt_having: HAVING condition */ -#line 1070 "yacc_sql.y" + case 154: /* opt_having: HAVING condition */ +#line 1114 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3074 "yacc_sql.cpp" +#line 3146 "yacc_sql.cpp" break; - case 147: /* opt_limit: %empty */ -#line 1077 "yacc_sql.y" + case 155: /* opt_limit: %empty */ +#line 1121 "yacc_sql.y" { (yyval.limited_info) = nullptr; } -#line 3082 "yacc_sql.cpp" +#line 3154 "yacc_sql.cpp" break; - case 148: /* opt_limit: LIMIT NUMBER */ -#line 1081 "yacc_sql.y" + case 156: /* opt_limit: LIMIT NUMBER */ +#line 1125 "yacc_sql.y" { (yyval.limited_info) = new LimitSqlNode(); (yyval.limited_info)->number = (yyvsp[0].number); } -#line 3091 "yacc_sql.cpp" +#line 3163 "yacc_sql.cpp" break; - case 149: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1089 "yacc_sql.y" + case 157: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1133 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3100 "yacc_sql.cpp" +#line 3172 "yacc_sql.cpp" break; - case 150: /* set_variable_stmt: SET ID EQ value */ -#line 1097 "yacc_sql.y" + case 158: /* set_variable_stmt: SET ID EQ value */ +#line 1141 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -3108,11 +3180,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3112 "yacc_sql.cpp" +#line 3184 "yacc_sql.cpp" break; -#line 3116 "yacc_sql.cpp" +#line 3188 "yacc_sql.cpp" default: break; } @@ -3341,7 +3413,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1109 "yacc_sql.y" +#line 1153 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index 410331d8..bb067c1d 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -161,8 +161,10 @@ union YYSTYPE bool nullable_info; std::vector * index_attr_list; bool unique; + float digits; + std::vector * digits_list; -#line 166 "yacc_sql.hpp" +#line 168 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index c495ff8d..17fa9498 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -189,6 +189,8 @@ ParsedSqlNode *create_table_sql_node(char *table_name, bool nullable_info; std::vector * index_attr_list; bool unique; + float digits; + std::vector * digits_list; } %token NUMBER @@ -199,6 +201,8 @@ ParsedSqlNode *create_table_sql_node(char *table_name, /** type 定义了各种解析后的结果输出的是什么类型。类型对应了 union 中的定义的成员变量名称 **/ %type type +%type digits +%type digits_list %type value %type nonnegative_value %type relation @@ -220,7 +224,7 @@ ParsedSqlNode *create_table_sql_node(char *table_name, %type expression_list %type group_by %type opt_having -%type setClause +%type set_clause %type set_clauses %type join_clauses %type sort_unit @@ -587,8 +591,48 @@ values_list: delete $4; } +digits: + NUMBER + { + $$ = float($1); + } + | '-' NUMBER + { + $$ = float(-$2); + } + | FLOAT + { + $$ = $1; + } + | '-' FLOAT + { + $$ = $2; + } + ; + + +digits_list: + /* empty */ + { + $$ = new std::vector(); + } + | digits + { + $$ = new std::vector(); + $$->push_back($1); + } + | digits_list COMMA digits + { + $$->push_back($3); + } + ; + value_list: - value + /* empty */ + { + $$ = new std::vector; + } + | value { $$ = new std::vector; $$->emplace_back(*$1); @@ -634,10 +678,10 @@ nonnegative_value: $$ = new Value(NullValue()); } | LSBRACE value_list RSBRACE { - $$ = new Value(ListValue(), *$2); + $$ = new Value(*$2); } - | QUOTE LSBRACE value_list RSBRACE QUOTE { - $$ = new Value(ListValue(), *$3); + | QUOTE LSBRACE digits_list RSBRACE QUOTE { + $$ = new Value(*$3); } ; @@ -679,18 +723,18 @@ update_stmt: /* update 语句的语法解析树*/ ; set_clauses: - setClause + set_clause { $$ = new std::vector; $$->emplace_back(std::move(*$1)); } - | set_clauses COMMA setClause + | set_clauses COMMA set_clause { $$->emplace_back(std::move(*$3)); } ; -setClause: +set_clause: ID EQ expression { $$ = new SetClauseSqlNode; From d81575eda6a1289521e38e424b2aa39361204026 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 22:44:06 +0800 Subject: [PATCH 281/308] =?UTF-8?q?=E9=87=8D=E6=9E=84vector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/attr_type.h | 1 - src/observer/common/type/char_type.cpp | 3 +- src/observer/common/type/data_type.cpp | 2 - src/observer/common/type/list_type.cpp | 33 - src/observer/common/type/list_type.h | 25 - src/observer/common/value.cpp | 28 +- src/observer/common/value.h | 13 +- src/observer/sql/builtin/builtin.cpp | 13 +- src/observer/sql/builtin/builtin.h | 2 + src/observer/sql/expr/expression.cpp | 4 + src/observer/sql/expr/expression.h | 1 + src/observer/sql/parser/yacc_sql.cpp | 929 ++++++++++++------------- src/observer/sql/parser/yacc_sql.y | 5 +- 13 files changed, 494 insertions(+), 565 deletions(-) delete mode 100644 src/observer/common/type/list_type.cpp delete mode 100644 src/observer/common/type/list_type.h diff --git a/src/observer/common/type/attr_type.h b/src/observer/common/type/attr_type.h index 53759a43..1002d49b 100644 --- a/src/observer/common/type/attr_type.h +++ b/src/observer/common/type/attr_type.h @@ -25,7 +25,6 @@ enum class AttrType NULLS, ///< 空字段 TEXTS, ///< text 超长字段(4096字节) VECTORS, ///< 向量 - LISTS, ///< 列表 MAXTYPE, ///< 请在 UNDEFINED 与 MAXTYPE 之间增加新类型 }; diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index 3ccb2fb8..96c71482 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -88,8 +88,7 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ return rc; } - // TODO: result.set_vector - return RC::INTERNAL; + result.set_vector(array, length); } break; default: return RC::UNIMPLEMENTED; } diff --git a/src/observer/common/type/data_type.cpp b/src/observer/common/type/data_type.cpp index 5651e2fd..5e832793 100644 --- a/src/observer/common/type/data_type.cpp +++ b/src/observer/common/type/data_type.cpp @@ -15,7 +15,6 @@ See the Mulan PSL v2 for more details. */ #include "common/type/date_type.h" #include "common/type/null_type.h" #include "common/type/vector_type.h" -#include "common/type/list_type.h" array, static_cast(AttrType::MAXTYPE)> DataType::type_instances_ = { make_unique(AttrType::UNDEFINED), @@ -27,5 +26,4 @@ array, static_cast(AttrType::MAXTYPE)> DataType::type_ make_unique(), make_unique(), make_unique(), - make_unique(), }; diff --git a/src/observer/common/type/list_type.cpp b/src/observer/common/type/list_type.cpp deleted file mode 100644 index 0c7a5117..00000000 --- a/src/observer/common/type/list_type.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. -miniob is licensed under Mulan PSL v2. -You can use this software according to the terms and conditions of the Mulan PSL v2. -You may obtain a copy of Mulan PSL v2 at: - http://license.coscl.org.cn/MulanPSL2 -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -See the Mulan PSL v2 for more details. */ - -// -// Created by 胡鑫 on 24-10-17. -// - -#include "list_type.h" -#include "cassert" -#include "common/value.h" - -RC ListType::to_string(const Value &val, string &result) const -{ - assert(val.attr_type() == AttrType::LISTS); - auto &list = val.get_list(); - result = "["; - auto size = list.size(); - for (int i = 0; i < size; i++) { - result += list[i].to_string(); - if (i < size - 1) { - result += ", "; - } - } - result += "]"; - return RC::SUCCESS; -} diff --git a/src/observer/common/type/list_type.h b/src/observer/common/type/list_type.h deleted file mode 100644 index 9d1cec91..00000000 --- a/src/observer/common/type/list_type.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. -miniob is licensed under Mulan PSL v2. -You can use this software according to the terms and conditions of the Mulan PSL v2. -You may obtain a copy of Mulan PSL v2 at: - http://license.coscl.org.cn/MulanPSL2 -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -See the Mulan PSL v2 for more details. */ - -#pragma once - -// -// Created by 胡鑫 on 24-10-17. -// - -#include "common/type/data_type.h" - -class ListType : public DataType -{ -public: - ListType() : DataType(AttrType::LISTS) {}; - - RC to_string(const Value &val, string &result) const override; -}; diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index ca8181f1..3e167d7c 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -32,9 +32,7 @@ Value::Value(bool val) { set_boolean(val); } Value::Value(const char *s, int len /*= 0*/) { set_string(s, len); } -Value::Value(const vector &values) { set_list(values); } - -Value::Value(const vector &numbers) { set_vector(numbers); } +Value::Value(const vector &values) { set_list(values); } Value::Value(const Value &other) { @@ -239,20 +237,20 @@ void Value::set_text(const char *s, int len /*= 65535*/) } } -void Value::set_vector(const std::vector &numbers) +void Value::set_vector(float *&array, size_t &length) { - attr_type_ = AttrType::VECTORS; - // TODO: + attr_type_ = AttrType::VECTORS; + length_ = length; + value_.pointer_value_ = reinterpret_cast(array); + + own_data_ = true; } -void Value::set_list(const vector &val) +void Value::set_list(const vector &val) { - attr_type_ = AttrType::LISTS; - length_ = 0; - for (auto &v : val) { - length_ += v.length_; - } - value_.list_value_ = new vector(val); + attr_type_ = AttrType::VECTORS; + length_ = val.size() * sizeof(float); + value_.vector_value_ = new vector(val); own_data_ = true; } @@ -290,7 +288,7 @@ void Value::set_string_from_other(const Value &other) if (own_data_ && other.value_.pointer_value_ != nullptr) { this->value_.pointer_value_ = new char[this->length_ + 1]; memcpy(this->value_.pointer_value_, other.value_.pointer_value_, this->length_); - reinterpret_cast(this->value_.pointer_value_)[this->length_] = '\0'; + this->value_.pointer_value_[this->length_] = '\0'; } } @@ -474,5 +472,3 @@ RC Value::borrow_text(const Value &v) length_ = v.length_; return RC::SUCCESS; } - -int Value::get_vector_length() const { return length_ / sizeof(float); } diff --git a/src/observer/common/value.h b/src/observer/common/value.h index d6134f91..28ffcc1a 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -20,7 +20,6 @@ See the Mulan PSL v2 for more details. */ #include "common/type/data_type.h" #include "common/type/date_type.h" #include "common/type/text_type.h" -#include "common/type/list_type.h" class NullValue {}; @@ -44,7 +43,6 @@ class Value final friend class NullType; friend class TextType; friend class VectorType; - friend class ListType; Value() = default; @@ -57,8 +55,7 @@ class Value final explicit Value(float val); explicit Value(bool val); explicit Value(const char *s, int len = 0); - explicit Value(const vector &values); - explicit Value(const vector &numbers); + explicit Value(const vector &values); Value(const Value &other); Value(Value &&other); @@ -127,8 +124,7 @@ class Value final string get_string() const; bool get_boolean() const; int get_date() const; - int get_vector_length() const; - std::vector &get_list() const { return *value_.list_value_; } + std::vector &get_vector() const { return *value_.vector_value_; } bool is_null() const { return is_null_; } inline bool is_str() const { return attr_type_ == AttrType::CHARS; } @@ -146,8 +142,8 @@ class Value final void set_date(int val); void set_string(const char *s, int len = 0); void set_text(const char *s, int len = 65535); - void set_vector(const std::vector &numbers); - void set_list(const vector &val); + void set_vector(float *&array, size_t &length); + void set_list(const vector &val); void set_string_from_other(const Value &other); private: @@ -160,7 +156,6 @@ class Value final float float_value_; bool bool_value_; char *pointer_value_; - std::vector *list_value_; std::vector *vector_value_; } value_ = {.int_value_ = 0}; diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 275b252e..6b831726 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -12,6 +12,15 @@ See the Mulan PSL v2 for more details. */ namespace builtin { +RC _typeof(const vector &args, Value &result) +{ + if (args.size() != 1) { + return RC::INVALID_ARGUMENT; + } + result = Value(attr_type_to_string(args[0].attr_type())); + return RC::SUCCESS; +} + RC length(const vector &args, Value &result) { if (args.size() != 1) { @@ -292,8 +301,8 @@ RC distance(const std::vector &args, Value &result, Type type) return RC::INVALID_ARGUMENT; } - auto v0_length = value0.get_vector_length(); - auto v1_length = value1.get_vector_length(); + auto v0_length = value0.get_vector().size(); + auto v1_length = value1.get_vector().size(); if (v0_length != v1_length) { return RC::VECTOR_LENGTG_ARE_INCONSISTENT; } diff --git a/src/observer/sql/builtin/builtin.h b/src/observer/sql/builtin/builtin.h index c021aa61..255f72cf 100644 --- a/src/observer/sql/builtin/builtin.h +++ b/src/observer/sql/builtin/builtin.h @@ -16,6 +16,8 @@ See the Mulan PSL v2 for more details. */ namespace builtin { +extern RC _typeof(const vector &args, Value &result); + extern RC length(const vector &args, Value &result); extern RC round(const vector &args, Value &result); diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 2dc73bb7..3eec0209 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -866,6 +866,7 @@ ListExpr::ListExpr(std::vector &&exprs) RC NormalFunctionExpr::type_from_string(const char *type_str, NormalFunctionExpr::Type &type) { + check_type("typeof", Type::TYPEOF); check_type("day", Type::DAY); check_type("month", Type::MONTH); check_type("year", Type::YEAR); @@ -905,6 +906,7 @@ RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) case Type::L2_DISTANCE: return builtin::l2_distance(args_values_, result); case Type::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); case Type::INNER_PRODUCT: return builtin::inner_product(args_values_, result); + case Type::TYPEOF: return builtin::_typeof(args_values_, result); } return RC::INTERNAL; } @@ -933,6 +935,7 @@ RC NormalFunctionExpr::try_get_value(Value &result) const case Type::L2_DISTANCE: return builtin::l2_distance(args_values_, result); case Type::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); case Type::INNER_PRODUCT: return builtin::inner_product(args_values_, result); + case Type::TYPEOF: return builtin::_typeof(args_values_, result); } return RC::INTERNAL; } @@ -952,6 +955,7 @@ AttrType NormalFunctionExpr::value_type() const case Type::L2_DISTANCE: return AttrType::FLOATS; case Type::COSINE_DISTANCE: return AttrType::FLOATS; case Type::INNER_PRODUCT: return AttrType::FLOATS; + case Type::TYPEOF: return AttrType::CHARS; } return AttrType::UNDEFINED; } diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 7866a242..25254eb3 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -466,6 +466,7 @@ class NormalFunctionExpr : public UnboundFunctionExpr public: enum class Type { + TYPEOF, LENGTH, ROUND, YEAR, diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index e55c2f47..05724c67 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -646,18 +646,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 74 +#define YYFINAL 73 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 300 +#define YYLAST 290 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 80 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 59 /* YYNRULES -- Number of rules. */ -#define YYNRULES 159 +#define YYNRULES 158 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 281 +#define YYNSTATES 276 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 330 @@ -722,14 +722,14 @@ static const yytype_int16 yyrline[] = 470, 483, 501, 530, 534, 538, 543, 549, 550, 551, 552, 553, 554, 558, 568, 582, 588, 595, 599, 603, 607, 616, 619, 624, 632, 635, 641, 649, 652, 656, - 663, 667, 671, 677, 680, 683, 690, 693, 700, 712, - 726, 731, 738, 748, 786, 819, 825, 834, 837, 846, - 862, 865, 868, 871, 874, 882, 885, 890, 896, 899, - 902, 905, 912, 915, 918, 923, 930, 937, 942, 952, - 958, 968, 985, 992, 1004, 1007, 1013, 1017, 1024, 1028, - 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, - 1045, 1046, 1047, 1048, 1053, 1056, 1064, 1069, 1077, 1083, - 1089, 1099, 1102, 1110, 1113, 1121, 1124, 1132, 1140, 1151 + 663, 667, 671, 677, 680, 687, 690, 697, 709, 723, + 728, 735, 745, 783, 816, 822, 831, 834, 843, 859, + 862, 865, 868, 871, 879, 882, 887, 893, 896, 899, + 902, 909, 912, 915, 920, 927, 934, 939, 949, 955, + 965, 982, 989, 1001, 1004, 1010, 1014, 1021, 1025, 1032, + 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, + 1043, 1044, 1045, 1050, 1053, 1061, 1066, 1074, 1080, 1086, + 1096, 1099, 1107, 1110, 1118, 1121, 1129, 1137, 1148 }; #endif @@ -778,7 +778,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-202) +#define YYPACT_NINF (-128) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -792,35 +792,34 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 243, -2, 6, 147, 147, -53, 105, -202, -31, 15, - -29, -202, -202, -202, -202, -202, -17, 243, 94, 102, - -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, - -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, - -202, -202, 23, -202, 34, 107, 56, 58, 62, 91, - 28, -202, 83, -202, -202, 0, -202, 147, -202, -202, - -202, 5, -202, -202, -202, 76, -202, -202, 89, 88, - 96, 112, 116, -202, -202, -202, -202, -8, 29, 97, - -202, 128, -202, 147, 159, 160, 53, 106, -202, -202, - -44, 147, -6, -202, 113, -202, 147, 147, 147, 147, - 161, 114, 114, 2, 139, 118, 28, 120, 138, 35, - 182, 129, 146, 130, 76, -202, -202, -202, -202, -202, - 28, -202, -202, 66, -202, 121, 179, -202, -202, -202, - 73, 73, -202, -202, 147, -202, 4, 139, -202, 129, - 183, 172, -202, 143, -3, -202, -202, 140, 181, 151, - 182, -202, -202, 187, 185, 152, -202, -202, -202, -202, - 171, -44, -202, -202, 165, 199, 218, 204, 28, 202, - -202, -202, 1, -202, -202, -202, -202, -202, -202, -202, - 193, 77, 104, 147, 147, 118, -202, -202, -202, -202, - -202, -202, -202, 33, 120, 208, 174, -202, 129, 230, - 228, -202, -202, 114, 114, 247, 244, 205, 30, 232, - -202, -202, -202, -202, 147, 172, 172, 36, 36, -202, - 186, 217, -202, -202, -202, 181, 209, -202, -202, 182, - 129, 213, 139, 19, -202, 147, 172, 257, 183, -202, - 28, 36, -202, 219, 245, -202, -202, 42, -202, 250, - 172, 218, -202, 104, 270, 235, 202, 93, 54, 182, - -202, -202, -23, -202, 147, 207, -202, -202, -202, -202, - 220, 13, -202, 251, -202, 114, -202, -202, 147, -202, - -202 + 119, 10, 13, -6, -6, -58, 68, -128, -31, -28, + -46, -128, -128, -128, -128, -128, -44, 119, 37, 53, + -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, + -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, + -128, -128, -13, -128, -10, 61, 11, 22, 83, 138, + 25, -128, -128, -128, 1, -128, -6, -128, -128, -128, + 12, -128, -128, -128, 84, -128, -128, 110, 94, 104, + 131, 124, -128, -128, -128, -128, -11, 27, 123, -128, + 147, -128, -6, 174, 175, -128, -128, 42, -128, 102, + -6, -41, -128, 132, -128, -6, -6, -6, -6, 178, + 135, 135, -5, 165, 140, -17, 148, 158, 29, 202, + 149, 168, 164, 84, -128, -128, -128, -128, -128, 25, + 195, -128, -128, -128, 113, 113, -128, -128, -6, -128, + 4, 165, -128, 149, 216, 162, -128, 179, 2, -128, + 121, -128, -128, 146, 213, 180, 202, -128, -128, 217, + 219, 173, -128, -128, -128, -128, 186, 220, 239, 225, + -17, 223, -128, -128, 5, -128, -128, -128, -128, -128, + -128, -128, 214, 40, 145, -6, -6, 140, -128, -128, + -128, -128, -128, -128, -128, -128, -128, 127, 148, 227, + 181, -128, 149, 251, 232, 135, 135, 252, 246, 210, + 100, -128, 236, -128, -128, -128, -128, -6, 162, 162, + 69, 69, -128, 190, 221, -128, -128, -128, 213, 205, + -128, -128, 202, 149, 209, 165, 8, -128, -6, 162, + 253, 216, -128, -17, -17, 69, -128, 215, 241, -128, + -128, 35, -128, 243, 162, 239, -128, 145, 263, 228, + 223, -128, 144, 118, 202, -128, -128, 59, -128, -6, + 200, -128, -128, -128, -128, 211, 16, -128, 245, -128, + 135, -128, -128, -6, -128, -128 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -828,57 +827,56 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 37, 0, 97, 97, 0, 0, 27, 0, 0, + 0, 37, 0, 96, 96, 0, 0, 27, 0, 0, 0, 28, 29, 30, 26, 25, 0, 0, 0, 0, 24, 23, 17, 18, 19, 20, 9, 10, 11, 14, 12, 13, 8, 15, 16, 5, 7, 6, 3, 4, - 21, 22, 0, 36, 0, 0, 0, 0, 0, 97, - 74, 83, 0, 80, 81, 117, 82, 0, 108, 106, - 95, 112, 110, 111, 107, 96, 33, 32, 0, 0, - 0, 0, 0, 157, 1, 159, 2, 86, 0, 0, - 31, 0, 48, 97, 0, 0, 0, 0, 75, 77, - 71, 97, 0, 105, 0, 113, 0, 0, 0, 0, - 98, 0, 0, 0, 124, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 116, 104, 78, 79, 84, - 0, 67, 69, 0, 72, 0, 0, 118, 109, 114, - 100, 101, 102, 103, 97, 119, 112, 124, 34, 0, - 0, 0, 88, 0, 124, 90, 158, 0, 49, 0, - 0, 45, 46, 38, 0, 0, 40, 76, 68, 70, - 0, 0, 115, 99, 0, 120, 151, 0, 74, 63, - 142, 140, 0, 130, 131, 132, 133, 134, 135, 138, - 136, 0, 125, 0, 0, 0, 89, 57, 58, 59, - 60, 61, 62, 56, 0, 0, 0, 44, 0, 0, - 0, 85, 73, 0, 0, 0, 153, 0, 0, 0, - 143, 141, 139, 137, 0, 0, 0, 127, 92, 91, - 0, 0, 55, 54, 52, 49, 86, 87, 39, 0, - 0, 0, 124, 112, 121, 97, 0, 144, 0, 65, - 74, 126, 128, 129, 0, 53, 50, 43, 47, 0, - 0, 151, 152, 154, 0, 155, 64, 0, 56, 0, - 42, 35, 122, 94, 0, 0, 93, 66, 51, 41, - 0, 148, 145, 146, 156, 0, 150, 149, 0, 123, - 147 + 21, 22, 0, 36, 0, 0, 0, 0, 0, 96, + 71, 83, 80, 81, 116, 82, 0, 107, 105, 94, + 111, 109, 110, 106, 95, 33, 32, 0, 0, 0, + 0, 0, 156, 1, 158, 2, 85, 0, 0, 31, + 0, 48, 96, 0, 0, 67, 69, 0, 72, 0, + 96, 0, 104, 0, 112, 0, 0, 0, 0, 97, + 0, 0, 0, 123, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 115, 103, 68, 70, 84, 0, + 0, 117, 108, 113, 99, 100, 101, 102, 96, 118, + 111, 123, 34, 0, 0, 0, 87, 0, 123, 89, + 0, 157, 77, 0, 49, 0, 0, 45, 46, 38, + 0, 0, 40, 73, 114, 98, 0, 119, 150, 0, + 74, 63, 141, 139, 0, 129, 130, 131, 132, 133, + 134, 137, 135, 0, 124, 0, 0, 0, 88, 78, + 79, 57, 58, 59, 60, 61, 62, 56, 0, 0, + 0, 44, 0, 0, 0, 0, 0, 0, 152, 0, + 0, 75, 0, 142, 140, 138, 136, 0, 0, 0, + 126, 91, 90, 0, 0, 55, 54, 52, 49, 85, + 86, 39, 0, 0, 0, 123, 111, 120, 96, 0, + 143, 0, 65, 0, 74, 125, 127, 128, 0, 53, + 50, 43, 47, 0, 0, 150, 151, 153, 0, 154, + 64, 76, 0, 56, 0, 42, 35, 121, 93, 0, + 0, 92, 66, 51, 41, 0, 147, 144, 145, 155, + 0, 149, 148, 0, 122, 146 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -202, -202, 263, -202, -202, -202, -202, -202, -202, -202, - -202, -202, -202, -202, -202, -132, -202, -202, -202, -202, - 57, 90, 25, -202, -202, 47, 125, -202, -156, -84, - -45, 64, -202, -202, -202, 103, -47, -202, -4, -56, - 231, -202, -202, -202, -98, 87, 18, -131, -201, 115, - -202, 16, -202, 44, -202, -202, -202, -202, -202 + -128, -128, 257, -128, -128, -128, -128, -128, -128, -128, + -128, -128, -128, -128, -128, -123, -128, -128, -128, -128, + 57, 88, 24, -128, -128, 47, 160, -128, 46, -100, + -102, 62, -128, -128, -128, 105, -47, -128, -4, -55, + 224, -128, -128, -128, -94, 87, 15, -127, -86, 114, + -128, 17, -128, 41, -128, -128, -128, -128, -128 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 45, 154, 31, 32, 33, 34, - 195, 148, 224, 193, 35, 169, 124, 125, 87, 88, - 59, 109, 36, 37, 144, 145, 38, 39, 60, 61, - 165, 62, 63, 64, 231, 137, 232, 142, 182, 183, - 255, 272, 273, 206, 237, 266, 40, 41, 76 + 27, 28, 29, 30, 45, 150, 31, 32, 33, 34, + 189, 144, 217, 187, 35, 161, 88, 89, 200, 201, + 58, 108, 36, 37, 138, 139, 38, 39, 59, 60, + 157, 61, 62, 63, 224, 131, 225, 136, 174, 175, + 249, 267, 268, 198, 230, 261, 40, 41, 75 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -886,72 +884,70 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 65, 93, 84, 136, 138, 89, 166, 167, 94, 94, - 210, 42, 208, 186, 242, 243, 107, 69, 276, 46, - 66, 47, 146, 94, 91, 185, 139, 121, 122, 215, - 216, 277, 123, 110, 211, 253, 157, 270, 43, 150, - 130, 131, 132, 133, 71, 85, 259, 92, 141, 262, - 108, 140, 83, 111, 50, 239, 72, 220, 120, 83, - 44, 89, 151, 152, 164, 70, 228, 127, 48, 51, - 212, 128, 221, 52, 222, 89, 223, 95, 95, 114, - 96, 97, 98, 99, 257, 181, 170, 126, 96, 97, - 98, 99, 95, 221, 74, 222, 77, 223, 249, 53, - 54, 251, 56, 197, 86, 75, 233, 78, 83, 90, - 171, 96, 97, 98, 99, 49, 172, 50, 267, 67, - 68, 120, 79, 89, 117, 118, 101, 217, 218, 80, - 163, 81, 51, 119, 120, 82, 52, 158, 159, 102, - 173, 174, 175, 176, 177, 178, 179, 180, 160, 161, - 98, 99, 96, 97, 98, 99, 215, 216, 241, 181, - 181, 103, 53, 54, 55, 56, 105, 57, 58, 104, - 112, 49, 187, 50, 188, 189, 190, 191, 192, 106, - 181, 170, 248, 113, 115, 116, 129, 135, 51, 134, - 141, 143, 52, 147, 181, 89, 49, 149, 50, 83, - 260, 155, 153, 156, 162, 171, 184, 168, 271, 194, - 199, 172, 269, 51, 196, 198, 201, 52, 53, 54, - 55, 56, 271, 57, 58, 200, 203, 204, 205, 207, - 209, 252, 213, 226, 229, 173, 174, 175, 176, 177, - 178, 179, 180, 53, 54, 55, 56, 227, 57, 58, - 1, 2, 230, 235, 238, 236, 240, 244, 245, 3, - 4, 5, 6, 7, 8, 9, 10, 108, 250, 254, - 258, 215, 11, 12, 13, 261, 264, 265, 274, 278, - 73, 275, 246, 268, 225, 256, 202, 14, 219, 15, - 247, 234, 100, 279, 280, 263, 214, 16, 0, 0, - 17 + 64, 92, 83, 142, 158, 141, 130, 132, 93, 50, + 159, 178, 93, 106, 203, 65, 93, 68, 49, 133, + 50, 271, 69, 42, 51, 90, 46, 70, 47, 71, + 177, 109, 121, 146, 272, 51, 122, 73, 204, 254, + 124, 125, 126, 127, 134, 84, 82, 107, 91, 162, + 43, 110, 82, 135, 52, 53, 74, 55, 142, 140, + 76, 147, 148, 77, 156, 52, 53, 54, 55, 221, + 56, 57, 44, 163, 205, 48, 78, 94, 113, 164, + 173, 94, 66, 67, 79, 94, 120, 95, 96, 97, + 98, 95, 96, 97, 98, 80, 85, 86, 245, 191, + 243, 87, 226, 165, 166, 167, 168, 169, 170, 171, + 172, 208, 209, 116, 117, 95, 96, 97, 98, 265, + 210, 211, 236, 237, 155, 232, 1, 2, 233, 118, + 119, 142, 142, 251, 100, 3, 4, 5, 6, 7, + 8, 9, 10, 247, 95, 96, 97, 98, 11, 12, + 13, 213, 235, 173, 173, 82, 81, 214, 257, 215, + 101, 216, 49, 14, 50, 15, 214, 102, 215, 262, + 216, 162, 233, 16, 173, 242, 17, 103, 181, 51, + 182, 183, 184, 185, 186, 104, 49, 105, 50, 173, + 97, 98, 179, 180, 255, 163, 111, 208, 209, 114, + 115, 164, 112, 51, 266, 123, 128, 264, 129, 52, + 53, 54, 55, 137, 56, 57, 135, 145, 266, 82, + 154, 143, 149, 151, 246, 165, 166, 167, 168, 169, + 170, 171, 172, 52, 53, 54, 55, 152, 56, 57, + 160, 188, 176, 190, 193, 192, 194, 195, 196, 197, + 199, 202, 219, 206, 220, 222, 223, 229, 228, 231, + 234, 238, 239, 107, 244, 248, 253, 208, 256, 259, + 260, 269, 270, 273, 72, 240, 218, 263, 250, 153, + 252, 241, 212, 227, 99, 274, 258, 207, 0, 0, + 275 }; static const yytype_int16 yycheck[] = { - 4, 57, 49, 101, 102, 50, 137, 139, 4, 4, - 9, 13, 168, 144, 215, 216, 24, 48, 5, 13, - 73, 15, 106, 4, 24, 28, 24, 71, 72, 52, - 53, 18, 76, 4, 33, 236, 120, 60, 40, 4, - 96, 97, 98, 99, 73, 49, 4, 47, 51, 250, - 58, 49, 17, 24, 26, 25, 73, 24, 28, 17, - 62, 106, 109, 110, 60, 50, 198, 73, 62, 41, - 69, 77, 39, 45, 41, 120, 43, 73, 73, 83, - 75, 76, 77, 78, 240, 141, 9, 91, 75, 76, - 77, 78, 73, 39, 0, 41, 73, 43, 230, 71, - 72, 232, 74, 150, 76, 3, 204, 73, 17, 26, - 33, 75, 76, 77, 78, 24, 39, 26, 25, 14, - 15, 28, 15, 168, 71, 72, 50, 183, 184, 73, - 134, 73, 41, 27, 28, 73, 45, 71, 72, 50, - 63, 64, 65, 66, 67, 68, 69, 70, 27, 28, - 77, 78, 75, 76, 77, 78, 52, 53, 214, 215, - 216, 73, 71, 72, 73, 74, 54, 76, 77, 73, - 73, 24, 32, 26, 34, 35, 36, 37, 38, 63, - 236, 9, 229, 55, 25, 25, 73, 73, 41, 28, - 51, 73, 45, 73, 250, 240, 24, 59, 26, 17, - 247, 55, 73, 73, 25, 33, 63, 24, 264, 28, - 25, 39, 259, 41, 63, 28, 45, 45, 71, 72, - 73, 74, 278, 76, 77, 73, 61, 28, 10, 25, - 28, 235, 39, 25, 4, 63, 64, 65, 66, 67, + 4, 56, 49, 105, 131, 105, 100, 101, 4, 26, + 133, 138, 4, 24, 9, 73, 4, 48, 24, 24, + 26, 5, 50, 13, 41, 24, 13, 73, 15, 73, + 28, 4, 73, 4, 18, 41, 77, 0, 33, 4, + 95, 96, 97, 98, 49, 49, 17, 58, 47, 9, + 40, 24, 17, 51, 71, 72, 3, 74, 160, 76, + 73, 108, 109, 73, 60, 71, 72, 73, 74, 192, + 76, 77, 62, 33, 69, 62, 15, 73, 82, 39, + 135, 73, 14, 15, 73, 73, 90, 75, 76, 77, + 78, 75, 76, 77, 78, 73, 71, 72, 225, 146, + 223, 76, 196, 63, 64, 65, 66, 67, 68, 69, + 70, 52, 53, 71, 72, 75, 76, 77, 78, 60, + 175, 176, 208, 209, 128, 25, 7, 8, 28, 27, + 28, 233, 234, 233, 50, 16, 17, 18, 19, 20, + 21, 22, 23, 229, 75, 76, 77, 78, 29, 30, + 31, 24, 207, 208, 209, 17, 73, 39, 244, 41, + 50, 43, 24, 44, 26, 46, 39, 73, 41, 25, + 43, 9, 28, 54, 229, 222, 57, 73, 32, 41, + 34, 35, 36, 37, 38, 54, 24, 63, 26, 244, + 77, 78, 71, 72, 241, 33, 73, 52, 53, 25, + 25, 39, 55, 41, 259, 73, 28, 254, 73, 71, + 72, 73, 74, 73, 76, 77, 51, 59, 273, 17, + 25, 73, 73, 55, 228, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 73, 76, 77, - 7, 8, 24, 6, 49, 11, 24, 71, 41, 16, - 17, 18, 19, 20, 21, 22, 23, 58, 55, 12, - 25, 52, 29, 30, 31, 25, 6, 42, 71, 28, - 17, 61, 225, 258, 194, 238, 161, 44, 185, 46, - 226, 204, 61, 275, 278, 251, 181, 54, -1, -1, - 57 + 24, 28, 63, 63, 25, 28, 73, 61, 28, 10, + 25, 28, 25, 39, 73, 4, 24, 11, 6, 49, + 24, 71, 41, 58, 55, 12, 25, 52, 25, 6, + 42, 71, 61, 28, 17, 218, 188, 253, 231, 119, + 234, 219, 177, 196, 60, 270, 245, 173, -1, -1, + 273 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -963,30 +959,29 @@ static const yytype_uint8 yystos[] = 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 96, 97, 98, 99, 104, 112, 113, 116, 117, 136, 137, 13, 40, 62, 94, 13, 15, 62, 24, - 26, 41, 45, 71, 72, 73, 74, 76, 77, 110, - 118, 119, 121, 122, 123, 118, 73, 14, 15, 48, - 50, 73, 73, 82, 0, 3, 138, 73, 73, 15, - 73, 73, 73, 17, 116, 118, 76, 108, 109, 110, - 26, 24, 47, 119, 4, 73, 75, 76, 77, 78, - 120, 50, 50, 73, 73, 54, 63, 24, 58, 111, - 4, 24, 73, 55, 118, 25, 25, 71, 72, 27, - 28, 71, 72, 76, 106, 107, 118, 73, 77, 73, - 119, 119, 119, 119, 28, 73, 124, 125, 124, 24, - 49, 51, 127, 73, 114, 115, 109, 73, 101, 59, - 4, 116, 116, 73, 95, 55, 73, 109, 71, 72, - 27, 28, 25, 118, 60, 120, 127, 95, 24, 105, - 9, 33, 39, 63, 64, 65, 66, 67, 68, 69, - 70, 119, 128, 129, 63, 28, 127, 32, 34, 35, - 36, 37, 38, 103, 28, 100, 63, 116, 28, 25, - 73, 45, 106, 61, 28, 10, 133, 25, 108, 28, - 9, 33, 69, 39, 129, 52, 53, 119, 119, 115, - 24, 39, 41, 43, 102, 101, 25, 73, 95, 4, - 24, 124, 126, 124, 125, 6, 11, 134, 49, 25, - 24, 119, 128, 128, 71, 41, 100, 111, 116, 95, - 55, 127, 118, 128, 12, 130, 105, 108, 25, 4, - 116, 25, 128, 133, 6, 42, 135, 25, 102, 116, - 60, 119, 131, 132, 71, 61, 5, 18, 28, 126, - 131 + 26, 41, 71, 72, 73, 74, 76, 77, 110, 118, + 119, 121, 122, 123, 118, 73, 14, 15, 48, 50, + 73, 73, 82, 0, 3, 138, 73, 73, 15, 73, + 73, 73, 17, 116, 118, 71, 72, 76, 106, 107, + 24, 47, 119, 4, 73, 75, 76, 77, 78, 120, + 50, 50, 73, 73, 54, 63, 24, 58, 111, 4, + 24, 73, 55, 118, 25, 25, 71, 72, 27, 28, + 118, 73, 77, 73, 119, 119, 119, 119, 28, 73, + 124, 125, 124, 24, 49, 51, 127, 73, 114, 115, + 76, 109, 110, 73, 101, 59, 4, 116, 116, 73, + 95, 55, 73, 106, 25, 118, 60, 120, 127, 95, + 24, 105, 9, 33, 39, 63, 64, 65, 66, 67, + 68, 69, 70, 119, 128, 129, 63, 28, 127, 71, + 72, 32, 34, 35, 36, 37, 38, 103, 28, 100, + 63, 116, 28, 25, 73, 61, 28, 10, 133, 25, + 108, 109, 28, 9, 33, 69, 39, 129, 52, 53, + 119, 119, 115, 24, 39, 41, 43, 102, 101, 25, + 73, 95, 4, 24, 124, 126, 124, 125, 6, 11, + 134, 49, 25, 28, 24, 119, 128, 128, 71, 41, + 100, 111, 116, 95, 55, 127, 118, 128, 12, 130, + 105, 109, 108, 25, 4, 116, 25, 128, 133, 6, + 42, 135, 25, 102, 116, 60, 119, 131, 132, 71, + 61, 5, 18, 28, 126, 131 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -1000,14 +995,14 @@ static const yytype_uint8 yyr1[] = 100, 101, 101, 102, 102, 102, 102, 103, 103, 103, 103, 103, 103, 104, 104, 105, 105, 106, 106, 106, 106, 107, 107, 107, 108, 108, 108, 109, 109, 109, - 110, 110, 110, 110, 110, 110, 111, 111, 112, 113, - 114, 114, 115, 116, 116, 117, 117, 118, 118, 118, + 110, 110, 110, 110, 110, 111, 111, 112, 113, 114, + 114, 115, 116, 116, 117, 117, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 120, 120, 120, 121, 122, 123, 123, 124, - 125, 125, 126, 126, 127, 127, 128, 128, 128, 128, + 119, 120, 120, 120, 121, 122, 123, 123, 124, 125, + 125, 126, 126, 127, 127, 128, 128, 128, 128, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 130, 130, 131, 131, 132, 132, - 132, 133, 133, 134, 134, 135, 135, 136, 137, 138 + 129, 129, 129, 130, 130, 131, 131, 132, 132, 132, + 133, 133, 134, 134, 135, 135, 136, 137, 138 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -1021,14 +1016,14 @@ static const yytype_int8 yyr2[] = 3, 6, 3, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 5, 8, 3, 5, 1, 2, 1, 2, 0, 1, 3, 0, 1, 3, 1, 2, 2, - 1, 1, 1, 1, 3, 5, 0, 4, 4, 5, - 1, 3, 3, 9, 9, 2, 2, 0, 2, 4, - 3, 3, 3, 3, 3, 2, 1, 1, 1, 3, - 1, 1, 0, 1, 2, 4, 3, 1, 3, 1, - 2, 4, 3, 6, 0, 2, 3, 2, 3, 3, - 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, - 1, 2, 1, 2, 0, 3, 1, 3, 1, 2, - 2, 0, 3, 0, 2, 0, 2, 2, 4, 1 + 1, 1, 1, 1, 3, 0, 4, 4, 5, 1, + 3, 3, 9, 9, 2, 2, 0, 2, 4, 3, + 3, 3, 3, 3, 2, 1, 1, 1, 3, 1, + 1, 0, 1, 2, 4, 3, 1, 3, 1, 2, + 4, 3, 6, 0, 2, 3, 2, 3, 3, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, + 2, 1, 2, 0, 3, 1, 3, 1, 2, 2, + 0, 3, 0, 2, 0, 2, 2, 4, 1 }; @@ -1895,7 +1890,7 @@ YYLTYPE yylloc = yyloc_default; std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1899 "yacc_sql.cpp" +#line 1894 "yacc_sql.cpp" break; case 25: /* exit_stmt: EXIT */ @@ -1904,7 +1899,7 @@ YYLTYPE yylloc = yyloc_default; (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1908 "yacc_sql.cpp" +#line 1903 "yacc_sql.cpp" break; case 26: /* help_stmt: HELP */ @@ -1912,7 +1907,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1916 "yacc_sql.cpp" +#line 1911 "yacc_sql.cpp" break; case 27: /* sync_stmt: SYNC */ @@ -1920,7 +1915,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1924 "yacc_sql.cpp" +#line 1919 "yacc_sql.cpp" break; case 28: /* begin_stmt: TRX_BEGIN */ @@ -1928,7 +1923,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1932 "yacc_sql.cpp" +#line 1927 "yacc_sql.cpp" break; case 29: /* commit_stmt: TRX_COMMIT */ @@ -1936,7 +1931,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1940 "yacc_sql.cpp" +#line 1935 "yacc_sql.cpp" break; case 30: /* rollback_stmt: TRX_ROLLBACK */ @@ -1944,7 +1939,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1948 "yacc_sql.cpp" +#line 1943 "yacc_sql.cpp" break; case 31: /* drop_table_stmt: DROP TABLE ID */ @@ -1954,7 +1949,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1958 "yacc_sql.cpp" +#line 1953 "yacc_sql.cpp" break; case 32: /* show_tables_stmt: SHOW TABLES */ @@ -1962,7 +1957,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1966 "yacc_sql.cpp" +#line 1961 "yacc_sql.cpp" break; case 33: /* desc_table_stmt: DESC ID */ @@ -1972,7 +1967,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1976 "yacc_sql.cpp" +#line 1971 "yacc_sql.cpp" break; case 34: /* show_index_stmt: SHOW INDEX FROM relation */ @@ -1983,7 +1978,7 @@ YYLTYPE yylloc = yyloc_default; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1987 "yacc_sql.cpp" +#line 1982 "yacc_sql.cpp" break; case 35: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ @@ -1999,19 +1994,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2003 "yacc_sql.cpp" +#line 1998 "yacc_sql.cpp" break; case 36: /* opt_unique: UNIQUE */ #line 384 "yacc_sql.y" { (yyval.unique) = true; } -#line 2009 "yacc_sql.cpp" +#line 2004 "yacc_sql.cpp" break; case 37: /* opt_unique: %empty */ #line 385 "yacc_sql.y" { (yyval.unique) = false; } -#line 2015 "yacc_sql.cpp" +#line 2010 "yacc_sql.cpp" break; case 38: /* attr_list: ID */ @@ -2021,7 +2016,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 2025 "yacc_sql.cpp" +#line 2020 "yacc_sql.cpp" break; case 39: /* attr_list: ID COMMA attr_list */ @@ -2031,7 +2026,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2035 "yacc_sql.cpp" +#line 2030 "yacc_sql.cpp" break; case 40: /* drop_index_stmt: DROP INDEX ID ON ID */ @@ -2043,7 +2038,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2047 "yacc_sql.cpp" +#line 2042 "yacc_sql.cpp" break; case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ @@ -2051,7 +2046,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2055 "yacc_sql.cpp" +#line 2050 "yacc_sql.cpp" break; case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ @@ -2059,7 +2054,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2063 "yacc_sql.cpp" +#line 2058 "yacc_sql.cpp" break; case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ @@ -2067,7 +2062,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2071 "yacc_sql.cpp" +#line 2066 "yacc_sql.cpp" break; case 44: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ @@ -2075,7 +2070,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2079 "yacc_sql.cpp" +#line 2074 "yacc_sql.cpp" break; case 45: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ @@ -2083,7 +2078,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2087 "yacc_sql.cpp" +#line 2082 "yacc_sql.cpp" break; case 46: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ @@ -2095,7 +2090,7 @@ YYLTYPE yylloc = yyloc_default; create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } -#line 2099 "yacc_sql.cpp" +#line 2094 "yacc_sql.cpp" break; case 47: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ @@ -2108,7 +2103,7 @@ YYLTYPE yylloc = yyloc_default; create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-5].string)); } -#line 2112 "yacc_sql.cpp" +#line 2107 "yacc_sql.cpp" break; case 48: /* drop_view_stmt: DROP VIEW ID */ @@ -2118,7 +2113,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2122 "yacc_sql.cpp" +#line 2117 "yacc_sql.cpp" break; case 49: /* attr_def_list: %empty */ @@ -2126,7 +2121,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.attr_infos) = nullptr; } -#line 2130 "yacc_sql.cpp" +#line 2125 "yacc_sql.cpp" break; case 50: /* attr_def_list: COMMA attr_def attr_def_list */ @@ -2140,7 +2135,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2144 "yacc_sql.cpp" +#line 2139 "yacc_sql.cpp" break; case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ @@ -2162,7 +2157,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2166 "yacc_sql.cpp" +#line 2161 "yacc_sql.cpp" break; case 52: /* attr_def: ID type nullable_constraint */ @@ -2192,7 +2187,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2196 "yacc_sql.cpp" +#line 2191 "yacc_sql.cpp" break; case 53: /* nullable_constraint: NOT NULL_T */ @@ -2200,7 +2195,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2204 "yacc_sql.cpp" +#line 2199 "yacc_sql.cpp" break; case 54: /* nullable_constraint: NULLABLE */ @@ -2208,7 +2203,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2212 "yacc_sql.cpp" +#line 2207 "yacc_sql.cpp" break; case 55: /* nullable_constraint: NULL_T */ @@ -2216,7 +2211,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2220 "yacc_sql.cpp" +#line 2215 "yacc_sql.cpp" break; case 56: /* nullable_constraint: %empty */ @@ -2224,43 +2219,43 @@ YYLTYPE yylloc = yyloc_default; { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2228 "yacc_sql.cpp" +#line 2223 "yacc_sql.cpp" break; case 57: /* type: INT_T */ #line 549 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2234 "yacc_sql.cpp" +#line 2229 "yacc_sql.cpp" break; case 58: /* type: STRING_T */ #line 550 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2240 "yacc_sql.cpp" +#line 2235 "yacc_sql.cpp" break; case 59: /* type: FLOAT_T */ #line 551 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2246 "yacc_sql.cpp" +#line 2241 "yacc_sql.cpp" break; case 60: /* type: DATE_T */ #line 552 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2252 "yacc_sql.cpp" +#line 2247 "yacc_sql.cpp" break; case 61: /* type: TEXT_T */ #line 553 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2258 "yacc_sql.cpp" +#line 2253 "yacc_sql.cpp" break; case 62: /* type: VECTOR_T */ #line 554 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::VECTORS); } -#line 2264 "yacc_sql.cpp" +#line 2259 "yacc_sql.cpp" break; case 63: /* insert_stmt: INSERT INTO ID VALUES values_list */ @@ -2274,7 +2269,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2278 "yacc_sql.cpp" +#line 2273 "yacc_sql.cpp" break; case 64: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ @@ -2289,7 +2284,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2293 "yacc_sql.cpp" +#line 2288 "yacc_sql.cpp" break; case 65: /* values_list: LBRACE value_list RBRACE */ @@ -2299,7 +2294,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2303 "yacc_sql.cpp" +#line 2298 "yacc_sql.cpp" break; case 66: /* values_list: values_list COMMA LBRACE value_list RBRACE */ @@ -2308,7 +2303,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2312 "yacc_sql.cpp" +#line 2307 "yacc_sql.cpp" break; case 67: /* digits: NUMBER */ @@ -2316,7 +2311,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.digits) = float((yyvsp[0].number)); } -#line 2320 "yacc_sql.cpp" +#line 2315 "yacc_sql.cpp" break; case 68: /* digits: '-' NUMBER */ @@ -2324,7 +2319,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.digits) = float(-(yyvsp[0].number)); } -#line 2328 "yacc_sql.cpp" +#line 2323 "yacc_sql.cpp" break; case 69: /* digits: FLOAT */ @@ -2332,7 +2327,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.digits) = (yyvsp[0].floats); } -#line 2336 "yacc_sql.cpp" +#line 2331 "yacc_sql.cpp" break; case 70: /* digits: '-' FLOAT */ @@ -2340,7 +2335,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.digits) = (yyvsp[0].floats); } -#line 2344 "yacc_sql.cpp" +#line 2339 "yacc_sql.cpp" break; case 71: /* digits_list: %empty */ @@ -2348,7 +2343,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.digits_list) = new std::vector(); } -#line 2352 "yacc_sql.cpp" +#line 2347 "yacc_sql.cpp" break; case 72: /* digits_list: digits */ @@ -2357,7 +2352,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.digits_list) = new std::vector(); (yyval.digits_list)->push_back((yyvsp[0].digits)); } -#line 2361 "yacc_sql.cpp" +#line 2356 "yacc_sql.cpp" break; case 73: /* digits_list: digits_list COMMA digits */ @@ -2365,7 +2360,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.digits_list)->push_back((yyvsp[0].digits)); } -#line 2369 "yacc_sql.cpp" +#line 2364 "yacc_sql.cpp" break; case 74: /* value_list: %empty */ @@ -2373,7 +2368,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.value_list) = new std::vector; } -#line 2377 "yacc_sql.cpp" +#line 2372 "yacc_sql.cpp" break; case 75: /* value_list: value */ @@ -2383,7 +2378,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2387 "yacc_sql.cpp" +#line 2382 "yacc_sql.cpp" break; case 76: /* value_list: value_list COMMA value */ @@ -2392,7 +2387,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2396 "yacc_sql.cpp" +#line 2391 "yacc_sql.cpp" break; case 77: /* value: nonnegative_value */ @@ -2400,7 +2395,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.value) = (yyvsp[0].value); } -#line 2404 "yacc_sql.cpp" +#line 2399 "yacc_sql.cpp" break; case 78: /* value: '-' NUMBER */ @@ -2409,7 +2404,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2413 "yacc_sql.cpp" +#line 2408 "yacc_sql.cpp" break; case 79: /* value: '-' FLOAT */ @@ -2418,7 +2413,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2422 "yacc_sql.cpp" +#line 2417 "yacc_sql.cpp" break; case 80: /* nonnegative_value: NUMBER */ @@ -2427,7 +2422,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2431 "yacc_sql.cpp" +#line 2426 "yacc_sql.cpp" break; case 81: /* nonnegative_value: FLOAT */ @@ -2436,7 +2431,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2440 "yacc_sql.cpp" +#line 2435 "yacc_sql.cpp" break; case 82: /* nonnegative_value: SSS */ @@ -2447,7 +2442,7 @@ YYLTYPE yylloc = yyloc_default; free(tmp); free((yyvsp[0].string)); } -#line 2451 "yacc_sql.cpp" +#line 2446 "yacc_sql.cpp" break; case 83: /* nonnegative_value: NULL_T */ @@ -2455,43 +2450,35 @@ YYLTYPE yylloc = yyloc_default; { (yyval.value) = new Value(NullValue()); } -#line 2459 "yacc_sql.cpp" +#line 2454 "yacc_sql.cpp" break; - case 84: /* nonnegative_value: LSBRACE value_list RSBRACE */ + case 84: /* nonnegative_value: LSBRACE digits_list RSBRACE */ #line 680 "yacc_sql.y" - { - (yyval.value) = new Value(*(yyvsp[-1].value_list)); - } -#line 2467 "yacc_sql.cpp" - break; - - case 85: /* nonnegative_value: QUOTE LSBRACE digits_list RSBRACE QUOTE */ -#line 683 "yacc_sql.y" - { - (yyval.value) = new Value(*(yyvsp[-2].digits_list)); + { + (yyval.value) = new Value(*(yyvsp[-1].digits_list)); } -#line 2475 "yacc_sql.cpp" +#line 2462 "yacc_sql.cpp" break; - case 86: /* storage_format: %empty */ -#line 690 "yacc_sql.y" + case 85: /* storage_format: %empty */ +#line 687 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2483 "yacc_sql.cpp" +#line 2470 "yacc_sql.cpp" break; - case 87: /* storage_format: STORAGE FORMAT EQ ID */ -#line 694 "yacc_sql.y" + case 86: /* storage_format: STORAGE FORMAT EQ ID */ +#line 691 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2491 "yacc_sql.cpp" +#line 2478 "yacc_sql.cpp" break; - case 88: /* delete_stmt: DELETE FROM ID where */ -#line 701 "yacc_sql.y" + case 87: /* delete_stmt: DELETE FROM ID where */ +#line 698 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2500,11 +2487,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2504 "yacc_sql.cpp" +#line 2491 "yacc_sql.cpp" break; - case 89: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 713 "yacc_sql.y" + case 88: /* update_stmt: UPDATE ID SET set_clauses where */ +#line 710 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2515,39 +2502,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2519 "yacc_sql.cpp" +#line 2506 "yacc_sql.cpp" break; - case 90: /* set_clauses: set_clause */ -#line 727 "yacc_sql.y" + case 89: /* set_clauses: set_clause */ +#line 724 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2528 "yacc_sql.cpp" +#line 2515 "yacc_sql.cpp" break; - case 91: /* set_clauses: set_clauses COMMA set_clause */ -#line 732 "yacc_sql.y" + case 90: /* set_clauses: set_clauses COMMA set_clause */ +#line 729 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2536 "yacc_sql.cpp" +#line 2523 "yacc_sql.cpp" break; - case 92: /* set_clause: ID EQ expression */ -#line 739 "yacc_sql.y" + case 91: /* set_clause: ID EQ expression */ +#line 736 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2547 "yacc_sql.cpp" +#line 2534 "yacc_sql.cpp" break; - case 93: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ -#line 749 "yacc_sql.y" + case 92: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ +#line 746 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2585,11 +2572,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].limited_info); } } -#line 2589 "yacc_sql.cpp" +#line 2576 "yacc_sql.cpp" break; - case 94: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 787 "yacc_sql.y" + case 93: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ +#line 784 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2619,39 +2606,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2623 "yacc_sql.cpp" +#line 2610 "yacc_sql.cpp" break; - case 95: /* calc_stmt: CALC expression_list */ -#line 820 "yacc_sql.y" + case 94: /* calc_stmt: CALC expression_list */ +#line 817 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2633 "yacc_sql.cpp" +#line 2620 "yacc_sql.cpp" break; - case 96: /* calc_stmt: SELECT expression_list */ -#line 826 "yacc_sql.y" + case 95: /* calc_stmt: SELECT expression_list */ +#line 823 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2643 "yacc_sql.cpp" +#line 2630 "yacc_sql.cpp" break; - case 97: /* expression_list: %empty */ -#line 834 "yacc_sql.y" + case 96: /* expression_list: %empty */ +#line 831 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2651 "yacc_sql.cpp" +#line 2638 "yacc_sql.cpp" break; - case 98: /* expression_list: expression alias */ -#line 838 "yacc_sql.y" + case 97: /* expression_list: expression alias */ +#line 835 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2660,11 +2647,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2664 "yacc_sql.cpp" +#line 2651 "yacc_sql.cpp" break; - case 99: /* expression_list: expression alias COMMA expression_list */ -#line 847 "yacc_sql.y" + case 98: /* expression_list: expression alias COMMA expression_list */ +#line 844 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2677,43 +2664,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2681 "yacc_sql.cpp" +#line 2668 "yacc_sql.cpp" break; - case 100: /* expression: expression '+' expression */ -#line 862 "yacc_sql.y" + case 99: /* expression: expression '+' expression */ +#line 859 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2689 "yacc_sql.cpp" +#line 2676 "yacc_sql.cpp" break; - case 101: /* expression: expression '-' expression */ -#line 865 "yacc_sql.y" + case 100: /* expression: expression '-' expression */ +#line 862 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2697 "yacc_sql.cpp" +#line 2684 "yacc_sql.cpp" break; - case 102: /* expression: expression '*' expression */ -#line 868 "yacc_sql.y" + case 101: /* expression: expression '*' expression */ +#line 865 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2705 "yacc_sql.cpp" +#line 2692 "yacc_sql.cpp" break; - case 103: /* expression: expression '/' expression */ -#line 871 "yacc_sql.y" + case 102: /* expression: expression '/' expression */ +#line 868 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2713 "yacc_sql.cpp" +#line 2700 "yacc_sql.cpp" break; - case 104: /* expression: LBRACE expression_list RBRACE */ -#line 874 "yacc_sql.y" + case 103: /* expression: LBRACE expression_list RBRACE */ +#line 871 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2722,122 +2709,122 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2726 "yacc_sql.cpp" +#line 2713 "yacc_sql.cpp" break; - case 105: /* expression: '-' expression */ -#line 882 "yacc_sql.y" + case 104: /* expression: '-' expression */ +#line 879 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2734 "yacc_sql.cpp" +#line 2721 "yacc_sql.cpp" break; - case 106: /* expression: nonnegative_value */ -#line 885 "yacc_sql.y" + case 105: /* expression: nonnegative_value */ +#line 882 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2744 "yacc_sql.cpp" +#line 2731 "yacc_sql.cpp" break; - case 107: /* expression: rel_attr */ -#line 890 "yacc_sql.y" + case 106: /* expression: rel_attr */ +#line 887 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2755 "yacc_sql.cpp" +#line 2742 "yacc_sql.cpp" break; - case 108: /* expression: '*' */ -#line 896 "yacc_sql.y" + case 107: /* expression: '*' */ +#line 893 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2763 "yacc_sql.cpp" +#line 2750 "yacc_sql.cpp" break; - case 109: /* expression: ID DOT '*' */ -#line 899 "yacc_sql.y" + case 108: /* expression: ID DOT '*' */ +#line 896 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2771 "yacc_sql.cpp" +#line 2758 "yacc_sql.cpp" break; - case 110: /* expression: func_expr */ -#line 902 "yacc_sql.y" + case 109: /* expression: func_expr */ +#line 899 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2779 "yacc_sql.cpp" +#line 2766 "yacc_sql.cpp" break; - case 111: /* expression: sub_query_expr */ -#line 905 "yacc_sql.y" + case 110: /* expression: sub_query_expr */ +#line 902 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2787 "yacc_sql.cpp" +#line 2774 "yacc_sql.cpp" break; - case 112: /* alias: %empty */ -#line 912 "yacc_sql.y" + case 111: /* alias: %empty */ +#line 909 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2795 "yacc_sql.cpp" +#line 2782 "yacc_sql.cpp" break; - case 113: /* alias: ID */ -#line 915 "yacc_sql.y" + case 112: /* alias: ID */ +#line 912 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2803 "yacc_sql.cpp" +#line 2790 "yacc_sql.cpp" break; - case 114: /* alias: AS ID */ -#line 918 "yacc_sql.y" + case 113: /* alias: AS ID */ +#line 915 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2811 "yacc_sql.cpp" +#line 2798 "yacc_sql.cpp" break; - case 115: /* func_expr: ID LBRACE expression_list RBRACE */ -#line 924 "yacc_sql.y" + case 114: /* func_expr: ID LBRACE expression_list RBRACE */ +#line 921 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2819 "yacc_sql.cpp" +#line 2806 "yacc_sql.cpp" break; - case 116: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 931 "yacc_sql.y" + case 115: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 928 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2827 "yacc_sql.cpp" +#line 2814 "yacc_sql.cpp" break; - case 117: /* rel_attr: ID */ -#line 937 "yacc_sql.y" + case 116: /* rel_attr: ID */ +#line 934 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2837 "yacc_sql.cpp" +#line 2824 "yacc_sql.cpp" break; - case 118: /* rel_attr: ID DOT ID */ -#line 942 "yacc_sql.y" + case 117: /* rel_attr: ID DOT ID */ +#line 939 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2845,19 +2832,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2849 "yacc_sql.cpp" +#line 2836 "yacc_sql.cpp" break; - case 119: /* relation: ID */ -#line 952 "yacc_sql.y" + case 118: /* relation: ID */ +#line 949 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2857 "yacc_sql.cpp" +#line 2844 "yacc_sql.cpp" break; - case 120: /* rel_list: relation alias */ -#line 958 "yacc_sql.y" + case 119: /* rel_list: relation alias */ +#line 955 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2868,11 +2855,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2872 "yacc_sql.cpp" +#line 2859 "yacc_sql.cpp" break; - case 121: /* rel_list: relation alias COMMA rel_list */ -#line 968 "yacc_sql.y" + case 120: /* rel_list: relation alias COMMA rel_list */ +#line 965 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2887,22 +2874,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2891 "yacc_sql.cpp" +#line 2878 "yacc_sql.cpp" break; - case 122: /* join_clauses: relation ON condition */ -#line 986 "yacc_sql.y" + case 121: /* join_clauses: relation ON condition */ +#line 983 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2902 "yacc_sql.cpp" +#line 2889 "yacc_sql.cpp" break; - case 123: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 993 "yacc_sql.y" + case 122: /* join_clauses: relation ON condition INNER JOIN join_clauses */ +#line 990 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2910,269 +2897,269 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2914 "yacc_sql.cpp" +#line 2901 "yacc_sql.cpp" break; - case 124: /* where: %empty */ -#line 1004 "yacc_sql.y" + case 123: /* where: %empty */ +#line 1001 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2922 "yacc_sql.cpp" +#line 2909 "yacc_sql.cpp" break; - case 125: /* where: WHERE condition */ -#line 1007 "yacc_sql.y" + case 124: /* where: WHERE condition */ +#line 1004 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2930 "yacc_sql.cpp" +#line 2917 "yacc_sql.cpp" break; - case 126: /* condition: expression comp_op expression */ -#line 1014 "yacc_sql.y" + case 125: /* condition: expression comp_op expression */ +#line 1011 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2938 "yacc_sql.cpp" +#line 2925 "yacc_sql.cpp" break; - case 127: /* condition: comp_op expression */ -#line 1018 "yacc_sql.y" + case 126: /* condition: comp_op expression */ +#line 1015 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2949 "yacc_sql.cpp" +#line 2936 "yacc_sql.cpp" break; - case 128: /* condition: condition AND condition */ -#line 1025 "yacc_sql.y" + case 127: /* condition: condition AND condition */ +#line 1022 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2957 "yacc_sql.cpp" +#line 2944 "yacc_sql.cpp" break; - case 129: /* condition: condition OR condition */ -#line 1029 "yacc_sql.y" + case 128: /* condition: condition OR condition */ +#line 1026 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2965 "yacc_sql.cpp" +#line 2952 "yacc_sql.cpp" break; - case 130: /* comp_op: EQ */ -#line 1035 "yacc_sql.y" + case 129: /* comp_op: EQ */ +#line 1032 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2971 "yacc_sql.cpp" +#line 2958 "yacc_sql.cpp" break; - case 131: /* comp_op: LT */ -#line 1036 "yacc_sql.y" + case 130: /* comp_op: LT */ +#line 1033 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2977 "yacc_sql.cpp" +#line 2964 "yacc_sql.cpp" break; - case 132: /* comp_op: GT */ -#line 1037 "yacc_sql.y" + case 131: /* comp_op: GT */ +#line 1034 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2983 "yacc_sql.cpp" +#line 2970 "yacc_sql.cpp" break; - case 133: /* comp_op: LE */ -#line 1038 "yacc_sql.y" + case 132: /* comp_op: LE */ +#line 1035 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2989 "yacc_sql.cpp" +#line 2976 "yacc_sql.cpp" break; - case 134: /* comp_op: GE */ -#line 1039 "yacc_sql.y" + case 133: /* comp_op: GE */ +#line 1036 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2995 "yacc_sql.cpp" +#line 2982 "yacc_sql.cpp" break; - case 135: /* comp_op: NE */ -#line 1040 "yacc_sql.y" + case 134: /* comp_op: NE */ +#line 1037 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 3001 "yacc_sql.cpp" +#line 2988 "yacc_sql.cpp" break; - case 136: /* comp_op: IS */ -#line 1041 "yacc_sql.y" + case 135: /* comp_op: IS */ +#line 1038 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 3007 "yacc_sql.cpp" +#line 2994 "yacc_sql.cpp" break; - case 137: /* comp_op: IS NOT */ -#line 1042 "yacc_sql.y" + case 136: /* comp_op: IS NOT */ +#line 1039 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 3013 "yacc_sql.cpp" +#line 3000 "yacc_sql.cpp" break; - case 138: /* comp_op: LIKE */ -#line 1043 "yacc_sql.y" + case 137: /* comp_op: LIKE */ +#line 1040 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 3019 "yacc_sql.cpp" +#line 3006 "yacc_sql.cpp" break; - case 139: /* comp_op: NOT LIKE */ -#line 1044 "yacc_sql.y" + case 138: /* comp_op: NOT LIKE */ +#line 1041 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 3025 "yacc_sql.cpp" +#line 3012 "yacc_sql.cpp" break; - case 140: /* comp_op: IN */ -#line 1045 "yacc_sql.y" + case 139: /* comp_op: IN */ +#line 1042 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 3031 "yacc_sql.cpp" +#line 3018 "yacc_sql.cpp" break; - case 141: /* comp_op: NOT IN */ -#line 1046 "yacc_sql.y" + case 140: /* comp_op: NOT IN */ +#line 1043 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 3037 "yacc_sql.cpp" +#line 3024 "yacc_sql.cpp" break; - case 142: /* comp_op: EXISTS */ -#line 1047 "yacc_sql.y" + case 141: /* comp_op: EXISTS */ +#line 1044 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 3043 "yacc_sql.cpp" +#line 3030 "yacc_sql.cpp" break; - case 143: /* comp_op: NOT EXISTS */ -#line 1048 "yacc_sql.y" + case 142: /* comp_op: NOT EXISTS */ +#line 1045 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 3049 "yacc_sql.cpp" +#line 3036 "yacc_sql.cpp" break; - case 144: /* opt_order_by: %empty */ -#line 1053 "yacc_sql.y" + case 143: /* opt_order_by: %empty */ +#line 1050 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 3057 "yacc_sql.cpp" +#line 3044 "yacc_sql.cpp" break; - case 145: /* opt_order_by: ORDER BY sort_list */ -#line 1057 "yacc_sql.y" + case 144: /* opt_order_by: ORDER BY sort_list */ +#line 1054 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 3066 "yacc_sql.cpp" +#line 3053 "yacc_sql.cpp" break; - case 146: /* sort_list: sort_unit */ -#line 1065 "yacc_sql.y" + case 145: /* sort_list: sort_unit */ +#line 1062 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 3075 "yacc_sql.cpp" +#line 3062 "yacc_sql.cpp" break; - case 147: /* sort_list: sort_unit COMMA sort_list */ -#line 1070 "yacc_sql.y" + case 146: /* sort_list: sort_unit COMMA sort_list */ +#line 1067 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 3084 "yacc_sql.cpp" +#line 3071 "yacc_sql.cpp" break; - case 148: /* sort_unit: expression */ -#line 1078 "yacc_sql.y" + case 147: /* sort_unit: expression */ +#line 1075 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3094 "yacc_sql.cpp" +#line 3081 "yacc_sql.cpp" break; - case 149: /* sort_unit: expression DESC */ -#line 1084 "yacc_sql.y" + case 148: /* sort_unit: expression DESC */ +#line 1081 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 3104 "yacc_sql.cpp" +#line 3091 "yacc_sql.cpp" break; - case 150: /* sort_unit: expression ASC */ -#line 1090 "yacc_sql.y" + case 149: /* sort_unit: expression ASC */ +#line 1087 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3114 "yacc_sql.cpp" +#line 3101 "yacc_sql.cpp" break; - case 151: /* group_by: %empty */ -#line 1099 "yacc_sql.y" + case 150: /* group_by: %empty */ +#line 1096 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 3122 "yacc_sql.cpp" +#line 3109 "yacc_sql.cpp" break; - case 152: /* group_by: GROUP BY expression_list */ -#line 1103 "yacc_sql.y" + case 151: /* group_by: GROUP BY expression_list */ +#line 1100 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 3130 "yacc_sql.cpp" +#line 3117 "yacc_sql.cpp" break; - case 153: /* opt_having: %empty */ -#line 1110 "yacc_sql.y" + case 152: /* opt_having: %empty */ +#line 1107 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 3138 "yacc_sql.cpp" +#line 3125 "yacc_sql.cpp" break; - case 154: /* opt_having: HAVING condition */ -#line 1114 "yacc_sql.y" + case 153: /* opt_having: HAVING condition */ +#line 1111 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3146 "yacc_sql.cpp" +#line 3133 "yacc_sql.cpp" break; - case 155: /* opt_limit: %empty */ -#line 1121 "yacc_sql.y" + case 154: /* opt_limit: %empty */ +#line 1118 "yacc_sql.y" { (yyval.limited_info) = nullptr; } -#line 3154 "yacc_sql.cpp" +#line 3141 "yacc_sql.cpp" break; - case 156: /* opt_limit: LIMIT NUMBER */ -#line 1125 "yacc_sql.y" + case 155: /* opt_limit: LIMIT NUMBER */ +#line 1122 "yacc_sql.y" { (yyval.limited_info) = new LimitSqlNode(); (yyval.limited_info)->number = (yyvsp[0].number); } -#line 3163 "yacc_sql.cpp" +#line 3150 "yacc_sql.cpp" break; - case 157: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1133 "yacc_sql.y" + case 156: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1130 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3172 "yacc_sql.cpp" +#line 3159 "yacc_sql.cpp" break; - case 158: /* set_variable_stmt: SET ID EQ value */ -#line 1141 "yacc_sql.y" + case 157: /* set_variable_stmt: SET ID EQ value */ +#line 1138 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -3180,11 +3167,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3184 "yacc_sql.cpp" +#line 3171 "yacc_sql.cpp" break; -#line 3188 "yacc_sql.cpp" +#line 3175 "yacc_sql.cpp" default: break; } @@ -3413,7 +3400,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1153 "yacc_sql.y" +#line 1150 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 17fa9498..81907b66 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -677,12 +677,9 @@ nonnegative_value: | NULL_T { $$ = new Value(NullValue()); } - | LSBRACE value_list RSBRACE { + | LSBRACE digits_list RSBRACE { $$ = new Value(*$2); } - | QUOTE LSBRACE digits_list RSBRACE QUOTE { - $$ = new Value(*$3); - } ; storage_format: From 7b8753f6f10fb9f861fcf43bf2ac37d3a1f62a09 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Thu, 17 Oct 2024 23:46:39 +0800 Subject: [PATCH 282/308] float *vector_value_; --- src/observer/common/value.cpp | 25 ++- src/observer/common/value.h | 30 ++-- src/observer/sql/builtin/builtin.cpp | 4 +- src/observer/sql/parser/lex_sql.h | 244 +++++++++++++-------------- 4 files changed, 157 insertions(+), 146 deletions(-) diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 3e167d7c..3af040f3 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -32,7 +32,7 @@ Value::Value(bool val) { set_boolean(val); } Value::Value(const char *s, int len /*= 0*/) { set_string(s, len); } -Value::Value(const vector &values) { set_list(values); } +Value::Value(const vector &values) { set_vector(values); } Value::Value(const Value &other) { @@ -246,11 +246,14 @@ void Value::set_vector(float *&array, size_t &length) own_data_ = true; } -void Value::set_list(const vector &val) +void Value::set_vector(const vector &val) { - attr_type_ = AttrType::VECTORS; - length_ = val.size() * sizeof(float); - value_.vector_value_ = new vector(val); + attr_type_ = AttrType::VECTORS; + length_ = val.size() * sizeof(float); + value_.vector_value_ = new float[length_]; + for (size_t i = 0; i < val.size(); i++) { + value_.vector_value_[i] = val[i]; + } own_data_ = true; } @@ -472,3 +475,15 @@ RC Value::borrow_text(const Value &v) length_ = v.length_; return RC::SUCCESS; } + +int Value::get_vector_length() const +{ + assert(attr_type_ == AttrType::VECTORS); + return length_ / sizeof(float); +} + +float Value::get_vector_element(int i) const +{ + assert(attr_type_ == AttrType::VECTORS); + return value_.vector_value_[i]; +} diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 28ffcc1a..4841c7b1 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -20,6 +20,7 @@ See the Mulan PSL v2 for more details. */ #include "common/type/data_type.h" #include "common/type/date_type.h" #include "common/type/text_type.h" +#include class NullValue {}; @@ -119,14 +120,15 @@ class Value final * 获取对应的值 * 如果当前的类型与期望获取的类型不符,就会执行转换操作 */ - int get_int() const; - float get_float() const; - string get_string() const; - bool get_boolean() const; - int get_date() const; - std::vector &get_vector() const { return *value_.vector_value_; } - bool is_null() const { return is_null_; } - inline bool is_str() const { return attr_type_ == AttrType::CHARS; } + int get_int() const; + float get_float() const; + string get_string() const; + bool get_boolean() const; + int get_date() const; + int get_vector_length() const; + float get_vector_element(int i) const; + bool is_null() const { return is_null_; } + inline bool is_str() const { return attr_type_ == AttrType::CHARS; } static int implicit_cast_cost(AttrType from, AttrType to) { @@ -143,7 +145,7 @@ class Value final void set_string(const char *s, int len = 0); void set_text(const char *s, int len = 65535); void set_vector(float *&array, size_t &length); - void set_list(const vector &val); + void set_vector(const vector &val); void set_string_from_other(const Value &other); private: @@ -152,11 +154,11 @@ class Value final union Val { - int32_t int_value_; - float float_value_; - bool bool_value_; - char *pointer_value_; - std::vector *vector_value_; + int32_t int_value_; + float float_value_; + bool bool_value_; + char *pointer_value_; + float *vector_value_; } value_ = {.int_value_ = 0}; static_assert(sizeof(std::vector *) == sizeof(char *)); diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 6b831726..90f40199 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -301,8 +301,8 @@ RC distance(const std::vector &args, Value &result, Type type) return RC::INVALID_ARGUMENT; } - auto v0_length = value0.get_vector().size(); - auto v1_length = value1.get_vector().size(); + auto v0_length = value0.get_vector_length(); + auto v1_length = value1.get_vector_length(); if (v0_length != v1_length) { return RC::VECTOR_LENGTG_ARE_INCONSISTENT; } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 12b7f68e..c60e2d16 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,23 +12,21 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT \ - yycolumn = 0; +#define YY_USER_INIT yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ -do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ -} \ -while (0); +#define YY_USER_ACTION \ + do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ + } while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -81,62 +79,62 @@ while (0); /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -157,7 +155,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; +typedef void *yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -197,73 +195,72 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void yyrestart(FILE *input_file, yyscan_t yyscanner); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); +void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); +void yypop_buffer_state(yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *yyalloc(yy_size_t, yyscan_t yyscanner); +void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); +void yyfree(void *, yyscan_t yyscanner); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/1) +#define yywrap(yyscanner) (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -286,69 +283,69 @@ void yyfree ( void * , yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif -int yylex_init (yyscan_t* scanner); +int yylex_init(yyscan_t *scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int yylex_destroy(yyscan_t yyscanner); -int yyget_debug ( yyscan_t yyscanner ); +int yyget_debug(yyscan_t yyscanner); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *yyget_in(yyscan_t yyscanner); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void yyset_in(FILE *_in_str, yyscan_t yyscanner); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *yyget_out(yyscan_t yyscanner); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void yyset_out(FILE *_out_str, yyscan_t yyscanner); - yy_size_t yyget_leng ( yyscan_t yyscanner ); +yy_size_t yyget_leng(yyscan_t yyscanner); -char *yyget_text ( yyscan_t yyscanner ); +char *yyget_text(yyscan_t yyscanner); -int yyget_lineno ( yyscan_t yyscanner ); +int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column ( yyscan_t yyscanner ); +int yyget_column(yyscan_t yyscanner); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); +YYSTYPE *yyget_lval(yyscan_t yyscanner); -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); +void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); + +YYLTYPE *yyget_lloc(yyscan_t yyscanner); + +void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int yywrap(yyscan_t yyscanner); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int yywrap(yyscan_t yyscanner); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen(const char *, yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -376,11 +373,9 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -544,7 +539,6 @@ extern int yylex \ #line 163 "lex_sql.l" - #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ From efcf9339aedeea1716aefcfa6da60337267b4522 Mon Sep 17 00:00:00 2001 From: root <503194395@qq.com> Date: Thu, 17 Oct 2024 16:02:07 +0000 Subject: [PATCH 283/308] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=BA=86insert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/char_type.cpp | 2 +- src/observer/common/utils.cpp | 2 +- src/observer/common/utils.h | 2 +- src/observer/common/value.cpp | 27 +++++++++++++++++++------- src/observer/common/value.h | 5 +++-- 5 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index 96c71482..ef464c69 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -80,7 +80,7 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ } break; case AttrType::VECTORS: { float *array = nullptr; - size_t length = 0; + int length = 0; // 解析字符串为 float 数组 RC rc = parse_vector_from_string(val.value_.pointer_value_, array, length); diff --git a/src/observer/common/utils.cpp b/src/observer/common/utils.cpp index c2013537..acd0be05 100644 --- a/src/observer/common/utils.cpp +++ b/src/observer/common/utils.cpp @@ -55,7 +55,7 @@ RC parse_float_prefix(const char *str, float &result) return RC::SUCCESS; } -RC parse_vector_from_string(const char *str, float *&array, size_t &length) +RC parse_vector_from_string(const char *str, float *&array, int &length) { if (!str || *str != '[') { return RC::INVALID_ARGUMENT; diff --git a/src/observer/common/utils.h b/src/observer/common/utils.h index 119deb2d..a184b255 100644 --- a/src/observer/common/utils.h +++ b/src/observer/common/utils.h @@ -21,4 +21,4 @@ RC parse_date(const char *str, int &result); RC parse_float_prefix(const char *str, float &result); -RC parse_vector_from_string(const char *str, float *&array, size_t &length); +RC parse_vector_from_string(const char *str, float *&array, int &length); diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 3af040f3..8603a41e 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -30,7 +30,14 @@ Value::Value(float val) { set_float(val); } Value::Value(bool val) { set_boolean(val); } -Value::Value(const char *s, int len /*= 0*/) { set_string(s, len); } +Value::Value(const char *s, int len /*= 0*/) +{ + if (OB_SUCC(parse_vector_from_string(s, value_.vector_value_, length_))) { + set_vector(); + } else { + set_string(s, len); + } +} Value::Value(const vector &values) { set_vector(values); } @@ -154,8 +161,8 @@ void Value::set_data(char *data, int length) length_ = length; } break; case AttrType::VECTORS: { - value_.pointer_value_ = data; - length_ = length; + value_.vector_value_ = (float *)data; + length_ = length; } break; default: { LOG_WARN("unknown data type: %d", attr_type_); @@ -194,7 +201,11 @@ void Value::set_date(int val) value_.int_value_ = val; length_ = sizeof(val); } - +void Value::set_vector() +{ + attr_type_ = AttrType::VECTORS; + own_data_ = true; +} void Value::set_string(const char *s, int len /*= 0*/) { reset(); @@ -237,7 +248,7 @@ void Value::set_text(const char *s, int len /*= 65535*/) } } -void Value::set_vector(float *&array, size_t &length) +void Value::set_vector(float *&array, int &length) { attr_type_ = AttrType::VECTORS; length_ = length; @@ -298,11 +309,13 @@ void Value::set_string_from_other(const Value &other) const char *Value::data() const { switch (attr_type_) { - case AttrType::VECTORS: - case AttrType::CHARS: + case AttrType::CHARS: case AttrType::TEXTS: { return value_.pointer_value_; } break; + case AttrType::VECTORS: { + return (char *)value_.vector_value_; + } break; default: { return (const char *)&value_; } break; diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 4841c7b1..f2916b30 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -20,7 +20,7 @@ See the Mulan PSL v2 for more details. */ #include "common/type/data_type.h" #include "common/type/date_type.h" #include "common/type/text_type.h" -#include +#include "common/utils.h" class NullValue {}; @@ -144,8 +144,9 @@ class Value final void set_date(int val); void set_string(const char *s, int len = 0); void set_text(const char *s, int len = 65535); - void set_vector(float *&array, size_t &length); + void set_vector(float *&array, int &length); void set_vector(const vector &val); + void set_vector(); void set_string_from_other(const Value &other); private: From f2108fc51148c186f676f2ac93c5a67afc65b11e Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 00:03:31 +0800 Subject: [PATCH 284/308] =?UTF-8?q?=E5=AE=8C=E6=88=90l2=5Fdistance?= =?UTF-8?q?=EF=BC=8Ccosine=5Fdistance=EF=BC=8Cinner=5Fproduct?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 43 +++++++++++++++++-- .../sql/operator/calc_physical_operator.h | 6 ++- 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 90f40199..f3e7f16a 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -307,7 +307,6 @@ RC distance(const std::vector &args, Value &result, Type type) return RC::VECTOR_LENGTG_ARE_INCONSISTENT; } - // TODO: 计算结果并赋值给result switch (type) { case Type::L2: { /* @@ -315,7 +314,15 @@ RC distance(const std::vector &args, Value &result, Type type) * 语法:l2_distance(vector A, vector B) * 计算公式:$[ D = \sqrt{\sum_{i=1}^{n} (A_{i} - B_{i})^2} ]$ */ - return RC::INTERNAL; + float ans = 0.0; + for (int i = 0; i < v0_length; i++) { + float v0 = args[0].get_vector_element(i); + float v1 = args[1].get_vector_element(i); + ans += (v0 * v1) + (v0 * v1); + } + ans = sqrt(ans); + result = Value(ans); + return RC::SUCCESS; } case Type::COSINE: { /* @@ -324,7 +331,26 @@ RC distance(const std::vector &args, Value &result, Type type) * 计算公式:$[ D = \frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{A}| |\mathbf{B}|} = \frac{\sum_{i=1}^{n} A_i * * B_i}{\sqrt{\sum_{i=1}^{n} A_i^2} \sqrt{\sum_{i=1}^{n} B_i^2}} ]$ */ - return RC::INTERNAL; + float dot_product = 0.0; + float norm_v0 = 0.0; + float norm_v1 = 0.0; + + for (int i = 0; i < v0_length; i++) { + float v0 = args[0].get_vector_element(i); + float v1 = args[1].get_vector_element(i); + dot_product += v0 * v1; // 计算点积 + norm_v0 += v0 * v0; // 计算 v0 的模长平方 + norm_v1 += v1 * v1; // 计算 v1 的模长平方 + } + + if (norm_v0 == 0.0 || norm_v1 == 0.0) { + result = Value(NullValue()); + return RC::SUCCESS; // 避免除以 0 的情况 + } + + float cosine_similarity = dot_product / (sqrt(norm_v0) * sqrt(norm_v1)); + result = Value(cosine_similarity); + return RC::SUCCESS; } case Type::INNER: { /* @@ -332,7 +358,16 @@ RC distance(const std::vector &args, Value &result, Type type) * 语法:inner_product(vector A, vector B) * 计算公式:$[ D = \mathbf{A} \cdot \mathbf{B} = a_1 b_1 + a_2 b_2 + ... + a_n b_n = \sum_{i=1}^{n} a_i b_i ]$ */ - return RC::INTERNAL; + float dot_product = 0.0; + + for (int i = 0; i < v0_length; i++) { + float v0 = args[0].get_vector_element(i); + float v1 = args[1].get_vector_element(i); + dot_product += v0 * v1; // 对应元素相乘并求和 + } + + result = Value(dot_product); + return RC::SUCCESS; } default: { return RC::INTERNAL; diff --git a/src/observer/sql/operator/calc_physical_operator.h b/src/observer/sql/operator/calc_physical_operator.h index d7002c82..272e693c 100644 --- a/src/observer/sql/operator/calc_physical_operator.h +++ b/src/observer/sql/operator/calc_physical_operator.h @@ -62,7 +62,11 @@ class CalcPhysicalOperator : public PhysicalOperator RC tuple_schema(TupleSchema &schema) const override { for (const std::unique_ptr &expression : expressions_) { - schema.append_cell(expression->name()); + if (expression->has_alias()) { + schema.append_cell(expression->alias()); + } else { + schema.append_cell(expression->name()); + } } return RC::SUCCESS; } From 48daedbc0fd53860b02de4ca0fbee0e41b7ba8e7 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 00:24:06 +0800 Subject: [PATCH 285/308] add submodel miniob --- .gitmodules | 3 +++ deps/3rd/miniob | 1 + 2 files changed, 4 insertions(+) create mode 160000 deps/3rd/miniob diff --git a/.gitmodules b/.gitmodules index e88278f8..092668f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "deps/3rd/benchmark"] path = deps/3rd/benchmark url = https://github.com/google/benchmark +[submodule "deps/3rd/miniob"] + path = deps/3rd/miniob + url = https://github.com/oceanbase/miniob diff --git a/deps/3rd/miniob b/deps/3rd/miniob new file mode 160000 index 00000000..6f7d7406 --- /dev/null +++ b/deps/3rd/miniob @@ -0,0 +1 @@ +Subproject commit 6f7d74063db39b5bab5a6f9378f83536a5009e98 From c7673034170ee18ebe6ef7dcc78f7b7be9999e57 Mon Sep 17 00:00:00 2001 From: root <503194395@qq.com> Date: Thu, 17 Oct 2024 16:24:37 +0000 Subject: [PATCH 286/308] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=BA=86=E5=90=91?= =?UTF-8?q?=E9=87=8F=E7=9A=84=E5=8A=A0=E5=87=8F=E4=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/rc.h | 1 + src/observer/common/type/vector_type.cpp | 87 ++++++++++++++++++++++++ src/observer/common/type/vector_type.h | 6 +- src/observer/common/value.cpp | 10 +-- src/observer/common/value.h | 2 +- src/observer/sql/expr/expression.cpp | 4 ++ 6 files changed, 101 insertions(+), 9 deletions(-) diff --git a/src/observer/common/rc.h b/src/observer/common/rc.h index 8accb0e1..c9d05af3 100644 --- a/src/observer/common/rc.h +++ b/src/observer/common/rc.h @@ -83,6 +83,7 @@ See the Mulan PSL v2 for more details. */ DEFINE_RC(UNSUPPORTED) \ DEFINE_RC(VALUE_TOO_LONG) \ DEFINE_RC(VECTOR_LENGTG_ARE_INCONSISTENT) \ + DEFINE_RC(VECTOR_DIM_MISMATCH) \ DEFINE_RC(TO_LONG_SUBQUERY_EXPR) \ DEFINE_RC(NOT_NULLABLE_VALUE) \ DEFINE_RC(NOT_NULL_AFTER_IS) \ diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index b3755ce4..fe0de07b 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -46,3 +46,90 @@ RC VectorType::to_string(const Value &val, std::string &result) const return RC::SUCCESS; } + +RC VectorType::add(const Value &left, const Value &right, Value &result) const +{ + // 获取左向量和右向量的指针 + const float *left_data = reinterpret_cast(left.data()); + const float *right_data = reinterpret_cast(right.data()); + + // 获取向量的长度 + int left_count = left.length() / sizeof(float); + int right_count = right.length() / sizeof(float); + + // 确保两个向量的长度相同 + if (left_count != right_count) { + return RC::VECTOR_DIM_MISMATCH; // 长度不匹配,返回错误 + } + + // 创建一个新的结果向量 + float *result_data = new float[left_count]; + + // 执行逐元素加法 + for (int i = 0; i < left_count; ++i) { + result_data[i] = left_data[i] + right_data[i]; + } + + // 将结果存储到 result 中 + result.set_vector(result_data, left.length()); + + return RC::SUCCESS; +} + +RC VectorType::subtract(const Value &left, const Value &right, Value &result) const +{ + // 获取左向量和右向量的指针 + const float *left_data = reinterpret_cast(left.data()); + const float *right_data = reinterpret_cast(right.data()); + + // 获取向量的长度 + int left_count = left.length() / sizeof(float); + int right_count = right.length() / sizeof(float); + + // 确保两个向量的长度相同 + if (left_count != right_count) { + return RC::VECTOR_DIM_MISMATCH; // 长度不匹配,返回错误 + } + + // 创建一个新的结果向量 + float *result_data = new float[left_count]; + + // 执行逐元素减法 + for (int i = 0; i < left_count; ++i) { + result_data[i] = left_data[i] - right_data[i]; + } + + // 将结果存储到 result 中 + result.set_vector(result_data, left.length()); + + return RC::SUCCESS; +} + +RC VectorType::multiply(const Value &left, const Value &right, Value &result) const +{ + // 获取左向量和右向量的指针 + const float *left_data = reinterpret_cast(left.data()); + const float *right_data = reinterpret_cast(right.data()); + + // 获取向量的长度 + int left_count = left.length() / sizeof(float); + int right_count = right.length() / sizeof(float); + + // 确保两个向量的长度相同 + if (left_count != right_count) { + return RC::VECTOR_DIM_MISMATCH; // 长度不匹配,返回错误 + } + + // 创建一个新的结果向量 + float *result_data = new float[left_count]; + + // 执行逐元素乘法 + for (int i = 0; i < left_count; ++i) { + result_data[i] = left_data[i] * right_data[i]; + } + + // 将结果存储到 result 中 + result.set_vector(result_data, left.length()); + + return RC::SUCCESS; +} diff --git a/src/observer/common/type/vector_type.h b/src/observer/common/type/vector_type.h index 13e68b18..aa95c441 100644 --- a/src/observer/common/type/vector_type.h +++ b/src/observer/common/type/vector_type.h @@ -33,9 +33,9 @@ class VectorType : public DataType RC to_string(const Value &val, string &result) const override; - RC add(const Value &left, const Value &right, Value &result) const override { return RC::UNIMPLEMENTED; } + RC add(const Value &left, const Value &right, Value &result) const override ; - RC subtract(const Value &left, const Value &right, Value &result) const override { return RC::UNIMPLEMENTED; } + RC subtract(const Value &left, const Value &right, Value &result) const override ; - RC multiply(const Value &left, const Value &right, Value &result) const override { return RC::UNIMPLEMENTED; } + RC multiply(const Value &left, const Value &right, Value &result) const override ; }; diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 8603a41e..9f2d9382 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -248,11 +248,11 @@ void Value::set_text(const char *s, int len /*= 65535*/) } } -void Value::set_vector(float *&array, int &length) +void Value::set_vector(float *array, int length) { - attr_type_ = AttrType::VECTORS; - length_ = length; - value_.pointer_value_ = reinterpret_cast(array); + attr_type_ = AttrType::VECTORS; + length_ = length; + value_.vector_value_ = array; own_data_ = true; } @@ -309,7 +309,7 @@ void Value::set_string_from_other(const Value &other) const char *Value::data() const { switch (attr_type_) { - case AttrType::CHARS: + case AttrType::CHARS: case AttrType::TEXTS: { return value_.pointer_value_; } break; diff --git a/src/observer/common/value.h b/src/observer/common/value.h index f2916b30..35509f5c 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -144,7 +144,7 @@ class Value final void set_date(int val); void set_string(const char *s, int len = 0); void set_text(const char *s, int len = 65535); - void set_vector(float *&array, int &length); + void set_vector(float *array, int length); void set_vector(const vector &val); void set_vector(); void set_string_from_other(const Value &other); diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 3eec0209..829f7ff9 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -450,6 +450,10 @@ AttrType ArithmeticExpr::value_type() const return AttrType::INTS; } + if (left_->value_type() == AttrType::VECTORS && right_->value_type() == AttrType::VECTORS) { + return AttrType::VECTORS; + } + return AttrType::FLOATS; } From 1f99bf093a34c28d60a24d13296a5b4ba5222e1c Mon Sep 17 00:00:00 2001 From: root <503194395@qq.com> Date: Thu, 17 Oct 2024 16:36:43 +0000 Subject: [PATCH 287/308] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=BA=86=E5=90=91?= =?UTF-8?q?=E9=87=8F=E7=9A=84=E7=AE=80=E5=8D=95=E6=AF=94=E8=BE=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/vector_type.cpp | 29 +++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index fe0de07b..8eb6fc31 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -5,7 +5,34 @@ #include "common/type/vector_type.h" #include -int VectorType::compare(const Value &left, const Value &right) const { return DataType::compare(left, right); } +int VectorType::compare(const Value &left, const Value &right) const +{ + // 获取左向量和右向量的指针 + const float *left_data = reinterpret_cast(left.data()); + const float *right_data = reinterpret_cast(right.data()); + + // 获取向量的长度 + int left_count = left.length() / sizeof(float); + int right_count = right.length() / sizeof(float); + + // 如果向量长度不一致,先比较长度 + if (left_count != right_count) { + return (left_count < right_count) ? -1 : 1; + } + + // 逐元素比较两个向量 + for (int i = 0; i < left_count; ++i) { + if (left_data[i] < right_data[i]) { + return -1; // left 小于 right + } else if (left_data[i] > right_data[i]) { + return 1; // left 大于 right + } + } + + // 如果每个元素都相等,则两个向量相等 + return 0; +} + RC VectorType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const { if (type == AttrType::CHARS) { From ab1ffb875f86e9d89bb14b651d3bb4e6586650d8 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 00:43:14 +0800 Subject: [PATCH 288/308] =?UTF-8?q?=E4=BF=AE=E6=AD=A3L2=5Fdistance?= =?UTF-8?q?=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/3rd/googletest | 2 +- src/observer/sql/builtin/builtin.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/3rd/googletest b/deps/3rd/googletest index 71815bbf..df1544bc 160000 --- a/deps/3rd/googletest +++ b/deps/3rd/googletest @@ -1 +1 @@ -Subproject commit 71815bbf7de6e10c11821d654a2fae2cf42de0f7 +Subproject commit df1544bcee0c7ce35cd5ea0b3eb8cc81855a4140 diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index f3e7f16a..1fb4d769 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -318,7 +318,7 @@ RC distance(const std::vector &args, Value &result, Type type) for (int i = 0; i < v0_length; i++) { float v0 = args[0].get_vector_element(i); float v1 = args[1].get_vector_element(i); - ans += (v0 * v1) + (v0 * v1); + ans += (v0 - v1) * (v0 - v1); } ans = sqrt(ans); result = Value(ans); From 886ca28c0fcf6f80963e6b8f8dc2da29a21c6278 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 00:55:30 +0800 Subject: [PATCH 289/308] =?UTF-8?q?@Koschei(=E5=87=8F=E5=B0=91=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=85=BE=E8=AE=AF=E8=BD=AF=E4=BB=B6)=20=E8=B0=81?= =?UTF-8?q?=E8=AE=A9=E4=BD=A0=E4=B8=8D=E7=90=86=E6=88=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/char_type.cpp | 2 +- src/observer/common/type/vector_type.cpp | 8 +- src/observer/common/type/vector_type.h | 6 +- .../sql/operator/insert_physical_operator.cpp | 3 +- .../sql/operator/update_physical_operator.cpp | 3 +- src/observer/sql/parser/lex_sql.h | 244 +++++++++--------- 6 files changed, 137 insertions(+), 129 deletions(-) diff --git a/src/observer/common/type/char_type.cpp b/src/observer/common/type/char_type.cpp index ef464c69..4fd57869 100644 --- a/src/observer/common/type/char_type.cpp +++ b/src/observer/common/type/char_type.cpp @@ -80,7 +80,7 @@ RC CharType::cast_to(const Value &val, AttrType type, Value &result, bool allow_ } break; case AttrType::VECTORS: { float *array = nullptr; - int length = 0; + int length = 0; // 解析字符串为 float 数组 RC rc = parse_vector_from_string(val.value_.pointer_value_, array, length); diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index 8eb6fc31..346f2e9b 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -8,11 +8,11 @@ int VectorType::compare(const Value &left, const Value &right) const { // 获取左向量和右向量的指针 - const float *left_data = reinterpret_cast(left.data()); + const float *left_data = reinterpret_cast(left.data()); const float *right_data = reinterpret_cast(right.data()); // 获取向量的长度 - int left_count = left.length() / sizeof(float); + int left_count = left.length() / sizeof(float); int right_count = right.length() / sizeof(float); // 如果向量长度不一致,先比较长度 @@ -23,7 +23,7 @@ int VectorType::compare(const Value &left, const Value &right) const // 逐元素比较两个向量 for (int i = 0; i < left_count; ++i) { if (left_data[i] < right_data[i]) { - return -1; // left 小于 right + return -1; // left 小于 right } else if (left_data[i] > right_data[i]) { return 1; // left 大于 right } @@ -33,7 +33,7 @@ int VectorType::compare(const Value &left, const Value &right) const return 0; } -RC VectorType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const +RC VectorType::cast_to(const Value &val, AttrType type, Value &result, bool allow_type_promotion) const { if (type == AttrType::CHARS) { result = Value(val.to_string().c_str()); diff --git a/src/observer/common/type/vector_type.h b/src/observer/common/type/vector_type.h index aa95c441..8ea6578e 100644 --- a/src/observer/common/type/vector_type.h +++ b/src/observer/common/type/vector_type.h @@ -33,9 +33,9 @@ class VectorType : public DataType RC to_string(const Value &val, string &result) const override; - RC add(const Value &left, const Value &right, Value &result) const override ; + RC add(const Value &left, const Value &right, Value &result) const override; - RC subtract(const Value &left, const Value &right, Value &result) const override ; + RC subtract(const Value &left, const Value &right, Value &result) const override; - RC multiply(const Value &left, const Value &right, Value &result) const override ; + RC multiply(const Value &left, const Value &right, Value &result) const override; }; diff --git a/src/observer/sql/operator/insert_physical_operator.cpp b/src/observer/sql/operator/insert_physical_operator.cpp index 71acaf0e..77326416 100644 --- a/src/observer/sql/operator/insert_physical_operator.cpp +++ b/src/observer/sql/operator/insert_physical_operator.cpp @@ -33,7 +33,8 @@ RC InsertPhysicalOperator::open(Trx *trx) } } - for (size_t i = 0; i < records.size(); ++i) { + int size = static_cast(records.size()); + for (int i = 0; i < size; ++i) { rc = trx->insert_record(table_, records[i]); if (rc != RC::SUCCESS) { LOG_WARN("failed to insert record by transaction. rc=%s", strrc(rc)); diff --git a/src/observer/sql/operator/update_physical_operator.cpp b/src/observer/sql/operator/update_physical_operator.cpp index b1a291c1..da52e69a 100644 --- a/src/observer/sql/operator/update_physical_operator.cpp +++ b/src/observer/sql/operator/update_physical_operator.cpp @@ -54,7 +54,8 @@ RC UpdatePhysicalOperator::open(Trx *trx) Value value; std::vector real_values(values_.size()); SubQueryExpr *sub_query_expr = nullptr; - for (size_t i = 0; i < values_.size(); ++i) { + int size = static_cast(values_.size()); + for (int i = 0; i < size; ++i) { auto &value_expr = values_[i]; auto &field_meta = field_metas_[i]; diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index c60e2d16..12b7f68e 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -12,21 +12,23 @@ typedef int yy_size_t; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在每次运行yylex()最开始的地方 */ -#define YY_USER_INIT yycolumn = 0; +#define YY_USER_INIT \ + yycolumn = 0; /* 参考生成的lex_sql.cpp代码,这个宏定义会放在解析一个token之后,也可以在网上找到大量的参考资料 */ /* 我们在这里设置当前解析的token的位置信息,这样在yacc中就可以使用这些信息了 */ -#define YY_USER_ACTION \ - do { \ - yylloc->first_line = yylloc->last_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - yycolumn += yyleng; \ - } while (0); +#define YY_USER_ACTION \ +do { \ + yylloc->first_line = yylloc->last_line = yylineno; \ + yylloc->first_column = yycolumn; \ + yylloc->last_column = yylloc->first_column + yyleng - 1; \ + yycolumn += yyleng; \ +} \ +while (0); #line 29 "lex_sql.h" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -79,62 +81,62 @@ typedef int yy_size_t; /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; +typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; +typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -155,7 +157,7 @@ typedef unsigned int flex_uint32_t; /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T -typedef void *yyscan_t; +typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) @@ -195,72 +197,73 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state -{ - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -}; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart(FILE *input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char *yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, yy_size_t len, yyscan_t yyscanner); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); -void *yyalloc(yy_size_t, yyscan_t yyscanner); -void *yyrealloc(void *, yy_size_t, yyscan_t yyscanner); -void yyfree(void *, yyscan_t yyscanner); +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); /* Begin user sect3 */ -#define yywrap(yyscanner) (/*CONSTCOND*/ 1) +#define yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -283,69 +286,69 @@ void yyfree(void *, yyscan_t yyscanner); #define YY_EXTRA_TYPE void * #endif -int yylex_init(yyscan_t *scanner); +int yylex_init (yyscan_t* scanner); -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner); +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -int yyget_debug(yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -FILE *yyget_in(yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -void yyset_in(FILE *_in_str, yyscan_t yyscanner); +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); -FILE *yyget_out(yyscan_t yyscanner); +FILE *yyget_out ( yyscan_t yyscanner ); -void yyset_out(FILE *_out_str, yyscan_t yyscanner); +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); -yy_size_t yyget_leng(yyscan_t yyscanner); + yy_size_t yyget_leng ( yyscan_t yyscanner ); -char *yyget_text(yyscan_t yyscanner); +char *yyget_text ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); +int yyget_lineno ( yyscan_t yyscanner ); -void yyset_lineno(int _line_number, yyscan_t yyscanner); +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); -int yyget_column(yyscan_t yyscanner); +int yyget_column ( yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); +void yyset_column ( int _column_no , yyscan_t yyscanner ); -YYSTYPE *yyget_lval(yyscan_t yyscanner); +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); -void yyset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner); - -YYLTYPE *yyget_lloc(yyscan_t yyscanner); - -void yyset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner); +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -373,9 +376,11 @@ static int yy_flex_strlen(const char *, yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner); +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); -#define YY_DECL int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner) +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -539,6 +544,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #line 163 "lex_sql.l" + #line 548 "lex_sql.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ From 89981c8bec776dbf3dc3ebfb2d8cb68f5e1273a3 Mon Sep 17 00:00:00 2001 From: Koschei Date: Fri, 18 Oct 2024 01:04:11 +0800 Subject: [PATCH 290/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=BB=BA?= =?UTF-8?q?=E7=AB=8B=E5=90=91=E9=87=8F=E7=B4=A2=E5=BC=95=E7=9A=84=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 21 +- src/observer/sql/parser/lex_sql.cpp | 4757 +++++++++++++++-------- src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/lex_sql.l | 9 + src/observer/sql/parser/parse_defs.h | 31 +- src/observer/sql/parser/yacc_sql.cpp | 3758 +++++++++--------- src/observer/sql/parser/yacc_sql.hpp | 166 +- src/observer/sql/parser/yacc_sql.y | 67 + src/observer/storage/index/index_meta.h | 2 + 9 files changed, 5304 insertions(+), 3509 deletions(-) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 275b252e..ef70d344 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -9,6 +9,7 @@ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ #include "builtin.h" +#include "sql/parser/parse_defs.h" namespace builtin { @@ -250,14 +251,8 @@ RC date_format(const vector &args, Value &result) } namespace vector_distance { -enum class Type -{ - L2, - COSINE, - INNER, -}; -RC distance(const std::vector &args, Value &result, Type type) +RC distance(const std::vector &args, Value &result, VectorDistanceType type) { if (args.size() != 2) { return RC::INVALID_ARGUMENT; @@ -300,7 +295,7 @@ RC distance(const std::vector &args, Value &result, Type type) // TODO: 计算结果并赋值给result switch (type) { - case Type::L2: { + case VectorDistanceType::L2: { /* * l2_distance * 语法:l2_distance(vector A, vector B) @@ -308,7 +303,7 @@ RC distance(const std::vector &args, Value &result, Type type) */ return RC::INTERNAL; } - case Type::COSINE: { + case VectorDistanceType::COSINE: { /* * cosine_distance: * 语法:cosine_distance(vector A, vector B) @@ -317,7 +312,7 @@ RC distance(const std::vector &args, Value &result, Type type) */ return RC::INTERNAL; } - case Type::INNER: { + case VectorDistanceType::INNER: { /* * inner_product: * 语法:inner_product(vector A, vector B) @@ -334,17 +329,17 @@ RC distance(const std::vector &args, Value &result, Type type) RC l2_distance(const vector &args, Value &result) { - return vector_distance::distance(args, result, vector_distance::Type::L2); + return vector_distance::distance(args, result, VectorDistanceType::L2); } RC cosine_distance(const vector &args, Value &result) { - return vector_distance::distance(args, result, vector_distance::Type::COSINE); + return vector_distance::distance(args, result, VectorDistanceType::COSINE); } RC inner_product(const vector &args, Value &result) { - return vector_distance::distance(args, result, vector_distance::Type::INNER); + return vector_distance::distance(args, result, VectorDistanceType::INNER); } RC string_to_vector(const vector &args, Value &result) diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 374316f0..0c5d5907 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -377,8 +377,8 @@ static void yynoreturn yy_fatal_error(const char *msg, yyscan_t yyscanner); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 80 -#define YY_END_OF_BUFFER 81 +#define YY_NUM_RULES 89 +#define YY_END_OF_BUFFER 90 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -386,245 +386,306 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[237] = {0, +static const flex_int16_t yy_accept[296] = {0, 0, 0, 0, 0, - 81, - 79, + 90, + 88, 1, 2, - 79, - 79, - 79, - 59, - 60, - 75, - 73, - 61, - 74, + 88, + 88, + 88, + 68, + 69, + 84, + 82, + 70, + 83, 6, - 76, + 85, 3, 5, - 66, - 62, - 68, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 80, - 65, - 0, + 75, + 71, 77, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 89, + 74, 0, - 78, + 86, + 0, + 87, 0, 3, - 63, - 64, - 67, - 72, - 72, 72, + 73, + 76, + 81, + 81, + 81, 50, - 72, + 81, 49, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, 52, - 70, - 72, - 72, - 72, - 72, - 72, + 79, + 81, + 81, + 81, + 81, + 81, + 81, + 81, 15, 23, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + + 81, + 81, + 81, + 81, 4, 22, 51, - - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, 33, - 72, - 72, - 72, - 72, - 69, - 72, - 72, - 72, - 72, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 78, + 81, + 81, + 81, + 81, + 81, 29, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 72, - 19, - 34, - 72, - 72, - 36, - 72, - 9, - 11, - 72, - 7, - 72, - 72, - 72, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 19, + 34, + 81, + 81, + 81, + 36, + 81, + 9, + 81, + 11, + 81, + 7, + 81, + 81, + 81, 20, - 72, - 72, + 81, + 81, 8, - 72, - 72, - 72, - 72, + 81, + 81, + 81, + 81, 25, + 81, 57, - 71, - 72, + 81, + 80, + 81, + 81, 42, 40, - 72, - 72, - 72, + 81, + 81, + 81, + 81, 16, - 72, + 81, 17, - 72, + 81, 37, - 72, - 72, - 72, - 72, + + 61, + 81, + 81, + 81, + 81, 58, - 72, + 81, + 59, 30, - 72, - 72, - 72, - 72, - 72, + 81, + 81, + 81, + 81, + 81, + 81, + 81, 35, - 72, + 81, 45, - 72, + 81, 14, - 72, + 81, 56, - 72, + 81, + 81, + 81, 46, - - 72, + 62, + 81, 48, - 72, - 72, - 72, + 81, + 81, + 81, + 81, 12, - 72, - 72, - 72, - 72, + 81, + 81, + 81, + 81, 21, 31, + 81, 10, 27, + 81, 53, - 72, + 81, 55, 47, 43, + 81, 24, - 72, - 72, + 81, + 81, + 81, + 63, + 81, 18, - 72, + 81, 13, 39, 28, 26, 38, + 81, + 81, 44, - 72, - 72, + 81, + 64, + 81, + 81, + 81, 54, + 81, + 60, + 81, + 81, 41, 32, - 0}; + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 65, + 81, + 81, + 81, + 67, + 81, + 66, + 0 + +}; static const YY_CHAR yy_ec[256] = {0, 1, @@ -676,7 +737,7 @@ static const YY_CHAR yy_ec[256] = {0, 14, 15, 15, - 15, + 16, 15, 15, 15, @@ -685,13 +746,12 @@ static const YY_CHAR yy_ec[256] = {0, 15, 15, 1, - 16, 17, 18, 19, + 20, 1, 1, - 20, 21, 22, 23, @@ -717,19 +777,18 @@ static const YY_CHAR yy_ec[256] = {0, 43, 44, 45, + 46, 1, 1, 1, 1, - 45, - 1, - 46, 47, + 1, 48, 49, - 50, 51, + 52, 53, 54, @@ -749,7 +808,9 @@ static const YY_CHAR yy_ec[256] = {0, 68, 69, 70, - 45, + 71, + 72, + 46, 1, 1, 1, @@ -885,7 +946,7 @@ static const YY_CHAR yy_ec[256] = {0, 1, 1}; -static const YY_CHAR yy_meta[71] = {0, +static const YY_CHAR yy_meta[73] = {0, 1, 1, 1, @@ -901,6 +962,7 @@ static const YY_CHAR yy_meta[71] = {0, 1, 1, 2, + 2, 1, 1, 1, @@ -955,499 +1017,622 @@ static const YY_CHAR yy_meta[71] = {0, 2, 2, 2, + 2, 2}; -static const flex_int16_t yy_base[242] = {0, +static const flex_int16_t yy_base[301] = {0, 0, 0, 0, 0, - 645, - 646, - 646, - 646, - 626, - 638, - 636, - 646, - 646, - 646, - 646, - 646, - 646, - 646, - 646, + 154, + 1223, + 1223, + 1223, + 132, + 143, + 139, + 1223, + 1223, + 1223, + 1223, + 1223, + 1223, + 1223, + 1223, + 60, + 1223, 58, - 646, - 56, - 646, - 623, - 57, - 61, - 62, - 63, + 1223, + 118, 64, - 83, - 65, + 66, + 69, + 71, + 78, + 97, + 90, + 125, + 105, + 137, 73, - 91, - 76, - 625, - 117, - 119, - 115, - 103, - 142, - 134, - 129, + 149, + 145, + 153, + 160, + 166, + 181, + 179, 174, - 112, - 646, - 646, - 634, - 646, - 632, - 646, - 622, - 71, - 646, - 646, - 646, + 225, + 187, + 1223, + 1223, + 128, + 1223, + 110, + 1223, + 86, + 204, + 1223, + 1223, + 1223, 0, - 621, - 89, - 120, - 141, - 620, - 160, - 167, - 168, - 146, - 158, - 184, - 191, - 186, - 193, - 194, - 195, - 196, - 201, - 188, - 254, - 619, - 190, - 220, - 217, - 219, - 218, - 618, - 223, - 228, - 249, - 239, - 247, - 250, - 274, - 251, - 246, - 267, + 99, + 214, + 229, + 207, + 127, + 240, + 242, + 252, + 244, 255, - 276, - 286, - 287, - 617, - 609, - 608, - - 289, - 293, - 307, + 268, + 259, + 177, + 272, + 278, + 288, + 294, + 301, + 290, + 299, + 349, + 142, + 304, + 322, + 61, 308, - 310, - 311, - 314, - 312, - 313, - 316, - 318, - 327, + 328, 330, - 331, - 317, - 324, - 336, - 335, - 354, - 343, - 353, - 338, - 361, - 371, + 339, + 345, + 366, 364, - 376, - 607, 369, - 372, - 375, - 386, - 606, - 387, - 390, + 371, + 377, + 379, 389, - 392, - 394, - 398, - 397, - 399, - 401, - 400, - 404, - 413, - 605, - 604, - 416, + 391, + 393, + 406, + 403, 409, - 602, - 415, - 601, - 600, - 423, - 598, - 430, - 432, - 436, - 596, - 442, + 419, + + 429, + 431, + 433, 446, - 594, - 420, - 454, - 449, - 458, - 591, - 590, - 589, - 460, - 588, - 463, - 469, + 438, + 450, + 452, + 455, + 457, + 459, + 461, 466, + 472, + 474, 476, - 586, - 481, - 583, - 478, - 581, - 475, - 477, - 493, - 485, - 580, + 487, + 489, 499, - 579, - 479, - 505, - 507, - 492, - 511, - 578, - 495, - 576, - 245, - 565, - 522, - 563, - 520, - 560, - - 532, - 555, - 518, - 535, - 525, + 493, + 502, + 515, + 524, + 531, + 526, + 529, 533, - 537, + 550, 539, - 543, - 547, - 552, - 521, - 489, - 443, - 437, - 553, - 350, - 281, - 252, - 224, - 551, - 554, - 221, - 568, - 189, - 161, - 157, - 145, - 132, - 126, - 575, - 558, - 88, - 86, - 79, - 646, - 625, - 627, + 555, + 557, + 562, + 572, + 574, + 59, + 585, + 577, + 536, + 589, + 596, + 599, + 601, + 605, + 607, + 603, + 614, + 626, 629, - 90, - 79}; + 633, + 631, + 635, + 645, + 649, + 656, + 658, + 663, + 665, + 669, + 672, + 676, + 690, + 696, + 699, + 702, + 704, + 706, + 708, + 716, + 724, + 726, + 734, + 731, + 736, + 738, + 743, + 745, + 750, + 753, + 761, + 764, + 766, + 773, + 777, + 779, + 784, + 781, + 70, + 787, + 791, + 794, + 802, + 805, + 807, + 812, + 814, + 824, + 833, + 835, + 839, + 846, + 850, + + 852, + 854, + 860, + 862, + 864, + 866, + 869, + 873, + 875, + 877, + 881, + 886, + 888, + 894, + 892, + 900, + 903, + 908, + 919, + 926, + 921, + 934, + 930, + 936, + 945, + 210, + 947, + 949, + 952, + 954, + 956, + 963, + 966, + 972, + 974, + 982, + 989, + 976, + 993, + 1001, + 1003, + 1005, + 1008, + 1012, + 1014, + 1020, + 1023, + 1028, + 1030, + 1032, + 1034, + 1038, + 1040, + 222, + 1044, + 1046, + 1050, + 1052, + 1056, + 1059, + 1062, + 1067, + 1070, + 1072, + 1074, + 1076, + 1078, + 1080, + 1089, + 300, + 1094, + 1096, + 1098, + 1100, + 1105, + 1107, + 308, + 1115, + 1117, + 1119, + 1123, + 327, + 1121, + 1125, + 411, + 1128, + 1136, + 0, + 1147, + 1149, + 1152, + 1155, + 1157, + 1162, + 1223, + 1216, + 1218, + 1220, + 93, + 72 -static const flex_int16_t yy_def[242] = {0, - 236, - 1, - 237, - 237, - 236, - 236, - 236, - 236, - 236, - 238, - 239, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 236, - 236, - 238, - 236, - 239, - 236, - 236, - 236, - 236, - 236, - 236, - 241, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 236, - 240, - 240, +}; - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, - 240, +static const flex_int16_t yy_def[301] = {0, + 295, + 1, + 296, + 296, + 295, + 295, + 295, + 295, + 295, + 297, + 298, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 295, + 295, + 297, + 295, + 298, + 295, + 295, + 295, + 295, + 295, + 295, + 300, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 300, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + + 299, + 299, + 299, + 299, + 295, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 300, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 300, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 300, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 300, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 299, + 300, + 299, + 299, + 299, + 299, + 299, + 299, + 300, + 299, + 299, + 299, + 299, + 300, + 299, + 299, + 300, + 299, + 299, + 300, + 299, + 299, + 299, + 299, + 299, + 299, 0, - 236, - 236, - 236, - 236, - 236}; + 295, + 295, + 295, + 295, + 295 + +}; -static const flex_int16_t yy_nxt[717] = {0, +static const flex_int16_t yy_nxt[1296] = {0, 6, 7, 8, @@ -1463,6 +1648,7 @@ static const flex_int16_t yy_nxt[717] = {0, 18, 19, 20, + 20, 21, 22, 23, @@ -1482,14 +1668,15 @@ static const flex_int16_t yy_nxt[717] = {0, 35, 37, 38, - 35, - 35, 39, + 35, 40, 41, 42, 43, 44, + 45, + 35, 35, 35, 35, @@ -1508,671 +1695,1257 @@ static const flex_int16_t yy_nxt[717] = {0, 35, 37, 38, - 35, - 35, 39, + 35, 40, 41, 42, 43, 44, + 45, 35, 35, - 51, - 56, 52, + 57, + 53, 53, 54, - 56, - 56, - 56, - 56, - 56, - 56, - 62, - 66, - 51, - 60, - 52, - 67, - 56, + 55, + 57, + 57, + 57, + 57, + 186, + 57, + 57, + 57, + 57, + 57, + 57, 63, - 58, - 56, + 61, + 67, 57, - 74, - 56, - 59, - 64, - 75, - 56, - 65, + 57, + 58, 68, - - 56, - 73, - 56, - 56, - 61, - 56, + 64, + 59, + 226, 69, - 62, - 66, - 78, + + 105, + 105, 60, - 99, - 67, + 65, + 57, + 57, + 66, + 134, 70, + 186, + 62, + 57, + 57, + 57, + 57, + 51, 63, - 58, + 61, + 67, + 57, + 57, 71, - 56, - 74, - 72, - 59, + 68, 64, + 59, + 226, + 69, 75, - 76, + 72, + 60, 65, - 68, - 56, 73, - 77, - 56, - 61, - 56, - 69, - 56, - 56, - 78, - 85, - 99, - 97, + 49, + 66, + 74, 70, 56, - 100, - 71, - 56, + 62, + 78, + 57, + 57, + 57, + 57, 79, - 72, - 56, - 83, - 56, + 51, 76, 80, - 84, - 81, - 90, + 49, + 71, 77, - 56, - 56, - 91, + 47, + 57, + 57, + 295, + 75, + 72, + 57, + 57, + 73, + 57, + 57, + 74, + 295, + 57, 82, - 56, - 56, - 92, - 85, - 93, - 97, - 86, - 101, - 100, - 87, - 105, + 78, + 295, + 57, + 57, + 295, 79, - 56, - 56, - 83, - 56, - 56, + 81, + 76, 80, + 57, + 57, + 77, + 83, + 295, + 85, + 57, + 57, + 295, 84, - 81, - 90, - 88, - 56, - 56, - 91, - 82, - 89, - 103, - 92, - 56, - 93, - 102, + 295, 86, - 101, - 94, 87, - 105, - 106, + 295, + 57, + 57, + 88, + 57, + 57, + 57, + 57, + 57, + 57, + 89, + 81, 95, - 56, - 104, - 56, + 90, + 57, + 57, 96, - 56, - 56, - 56, - 56, + 83, + 91, + 85, + 98, + 92, + 99, + 84, + 118, + 86, + 87, + 103, + 104, + 52, 88, - 56, - 56, - 56, - 56, + 53, + 53, + 93, + 57, + 57, + 97, 89, + 94, + 95, + 90, + 57, + 57, + 96, + 295, + 91, + 108, + 98, + 92, + 99, + 106, + 118, + 57, + 57, 103, - 110, + 104, + 57, + 57, + 100, + 295, + 93, + 254, + 101, + 97, 107, - 56, - 102, - 123, - 117, 94, - 111, + 102, + 57, + 57, + 57, + 57, + 57, + 57, 108, + 270, + 110, + 295, 106, - 95, + 295, + 57, + 57, + 113, + 57, + 57, 109, - 104, + 100, + 57, + 57, + 254, + 101, + 295, + 107, + 295, + 102, + 295, + 57, + 57, + 111, + 295, + 57, + 57, + 270, + 110, 112, - 96, + 295, + 57, + 57, 114, - 115, 113, - 56, - 56, - 56, - 56, - 56, - 126, - 56, - 56, - 110, - 107, - 116, - 56, - 123, + 295, 117, - 129, - 111, - 108, - 128, - 124, 109, - 125, + 115, + + 119, + 295, + 57, + 57, + 57, + 57, + 116, + 120, + 57, + 57, + 295, + 111, + 121, + 57, + 57, + 57, + 57, 112, - 56, + 57, + 57, + 277, 114, + 57, + 57, + 117, + 122, 115, - 113, - 127, - 130, - 56, - 56, - 56, + 119, + 123, + 132, 126, - 56, - 56, - 56, - 56, + 125, + 295, 116, - 56, - 56, - 218, - 129, - 133, - 138, - 128, + 120, 124, - 118, - 125, - 119, - 131, - 134, - 56, + 57, + 57, 135, - 127, - 130, - 140, - 120, - 132, - 56, - 139, - 56, 121, - 122, - 137, 136, - 56, - 218, - 141, - 133, + 282, + 57, + 57, + 57, + 57, + 137, + 277, 138, - - 56, - 56, - 118, - 56, - 119, - 131, - 134, - 56, - 135, - 142, - 143, - 140, - 120, + 285, + 133, + 295, + 122, + 57, + 57, + 123, 132, - 145, + 126, + 125, + 57, + 57, + 295, + 124, + 57, + 57, + 135, + 295, + 136, + 282, 139, - 144, - 121, - 122, + 140, + 295, + 127, 137, - 136, - 56, - 56, + 128, + 138, + 285, + 133, + 57, + 57, + 57, + 57, + 129, + 57, + 57, + 57, + 57, + 130, + 131, 141, - 56, - 56, - 56, - 56, - 56, - 148, - 56, - 56, - 56, - 151, - 149, + 295, + 57, + 57, + 57, + 57, + 295, + 139, + 140, 142, + 127, + 143, - 150, - 56, - 147, + 128, + 144, + 57, + 57, + 57, + 57, + 57, + 57, + 129, 145, - 56, + 146, + 149, + 147, + 130, + 131, + 141, + 57, + 57, + 295, + 57, + 57, + 148, + 57, + 57, + 142, + 295, + 143, + 295, 144, + 295, + 152, + 153, + 57, + 57, + 288, + 150, + 145, 146, - 56, - 56, + 149, + 147, + 151, + 295, + 57, + 57, + 57, + 57, + 57, + 57, + 148, + 154, + 155, + 105, + 105, + 295, 156, + 295, + 157, 152, - 155, - 56, - 56, - 160, - 56, 153, + 57, + 57, + 288, + 150, + 57, + 57, + 57, + 57, + 151, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, 154, - 148, + 155, + 160, + 57, + 57, + 156, 159, - 56, - 162, - 151, - 149, 157, 158, - 150, - 56, - 147, + 57, + 57, + 57, + 57, + 57, + 57, 164, - 56, - 56, - 146, + 162, + 163, + 295, 161, - 166, - 156, - 152, - 155, - 56, + 295, 165, + 295, + + 166, + 57, + 57, + 57, + 57, + 295, 160, - 56, - 153, - 154, - 163, + 57, + 57, + 167, 159, - 56, - 162, - 56, - 56, - 157, + 295, 158, - 56, - 56, - 169, + 57, + 57, + 295, + 57, + 57, + 295, 164, - 167, - 168, - 172, + 162, + 163, + 295, 161, + 295, + 165, + 295, 166, + 168, + 57, + 57, 170, 171, - - 56, - 56, - 165, - 56, - 56, - 173, - 56, - 163, - 56, - 174, - 177, - 56, - 56, - 56, - 56, - 56, - 181, + 172, 169, - 56, + 173, 167, + 295, + 57, + 57, + 57, + 57, + 295, + 57, + 57, + 57, + 57, + 57, + 57, + 295, + 57, + 57, + 295, + 57, + 57, 168, - 172, - 178, - 56, + 174, + 177, 170, 171, - 176, - 56, - 175, - 56, - 56, + 172, + 169, 173, - 179, + 175, + 57, + 57, + 176, 180, - 56, + 178, + 57, + 57, + 57, + 57, + 295, + 179, + 189, + 57, + 57, + 295, + 181, + 295, + 182, + 295, 174, 177, - 56, - 182, + 295, + 57, + 57, + 57, + 57, + 175, + 57, + 57, + 176, + 180, + 178, 183, - 185, 184, + 295, + 57, + + 57, + 179, + 189, + 57, + 57, + 188, 181, + 185, + 182, 187, - 56, - 186, - 56, - 188, - 178, - 191, - 56, - 56, - 176, - 189, - 175, - 193, - 56, - 56, - 179, - 180, - 56, + 57, + 57, 190, - 196, - 56, - 182, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, 183, - 185, 184, - 56, - 187, 192, - 186, - 56, - 188, - 56, + 193, + 195, + 57, + 57, 191, + 295, + 188, + 295, + 185, + 295, + 187, + 295, 194, - 56, - 195, - 189, - 56, + 190, + 57, + 57, + 295, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 295, + 192, 193, - 201, - 56, - 197, + 195, 198, - 203, - 190, - 196, - 56, - 56, - 56, - 56, - 56, + 295, + 191, + 295, + 57, + 57, + 295, 199, - 56, - 192, - 204, - 200, - 56, - - 205, - 206, + 57, + 57, 194, - 56, - 195, - 202, - 56, - 56, - 201, - 56, 197, - 198, + 295, + 196, + 201, + 57, + 57, + 57, + 57, + 200, + 295, 203, - 56, - 207, - 208, - 209, - 212, - 210, - 56, + 57, + 57, + 57, + 57, + 295, + 198, + 57, + 57, + 202, + 57, + 57, + 295, 199, - 56, - 211, + 57, + 57, + 295, + 197, + 295, + 196, + 201, + 295, 204, + 208, + + 295, 200, - 56, 205, + 203, + 57, + 57, + 207, 206, - 213, - 215, - 214, + 295, + 209, + 57, + 57, 202, - 56, - 217, - 56, - 56, - 56, - 222, - 216, - 56, - 207, + 57, + 57, + 295, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 295, + 204, 208, + 210, + 295, + 205, + 57, + 57, + 295, + 207, + 206, + 211, 209, + 295, + 57, + 57, + 57, + 57, + 295, 212, + 214, + 57, + 57, + 213, + 57, + 57, + 57, + 57, + 57, + 57, 210, - 219, - 56, - 56, + 295, + 216, + 57, + 57, + 57, + 57, + 295, 211, - 56, - 224, - 56, - 221, - 56, - 213, - 215, + 218, + 57, + 57, + 295, + 57, + 57, + 295, + 212, 214, - 56, - 220, + 295, + 215, + 213, + 57, + 57, 217, - 226, - 56, - 227, - 222, + 57, + 57, + 57, + 57, + 295, 216, - 56, - 56, - 56, - 56, - 56, - 225, + 295, 219, - 56, + 220, + 57, + 57, + 295, + 218, + 57, + 57, + 57, + 57, + 57, + 57, + 222, + 57, + 57, + + 215, + 57, + 57, + 295, + 217, + 57, + 57, + 221, + 57, + 57, 223, - 56, - 232, + 295, + 219, + 220, 224, - 56, - 221, - 56, + 225, + 57, + 57, + 295, + 57, + 57, + 57, + 57, + 295, + 222, + 229, + 57, + 57, + 57, + 57, + 227, + 295, 228, + 295, + 221, + 232, 231, - 56, - 229, - 220, + 223, + 57, + 57, + 295, + 224, + 225, + 295, 230, - 226, - 235, - 227, - 56, - 56, + 295, 233, - 56, - 56, - 56, - 56, - 225, - 56, + 57, + 57, + 57, + 57, + 295, + 229, + 57, + 57, 234, - 223, - - 56, - 232, - 56, - 56, - 56, - 56, + 295, + 227, + 295, 228, + 57, + 57, + 232, 231, - 56, - 229, - 56, - 230, - 56, + 57, + 57, + 57, + 57, + 57, + 57, 235, - 56, - 56, - 56, + 230, + 295, 233, - 56, - 56, - 56, - 56, - 56, - 56, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, 234, - 45, - 45, - 47, - 47, - 49, - 49, - 98, - 56, - 56, - 56, - 56, - 98, - 50, + 57, + 57, + 295, + 238, + 57, + 57, + 57, + 57, + 57, + 57, + 240, + 236, + 57, + 57, + 235, + 239, + 237, + + 57, + 57, + 57, + 57, + 295, + 242, + 57, + 57, + 57, + 57, + 243, + 295, + 244, + 238, + 57, + 57, + 241, + 57, + 57, + 295, + 240, + 236, + 57, + 57, + 295, + 239, + 237, + 245, + 247, + 295, + 246, + 295, + 242, + 57, + 57, + 57, + 57, + 243, + 295, + 244, + 57, + 57, + 295, + 241, + 57, + 57, + 295, + 248, + 57, + 57, + 57, + 57, + 249, + 295, + 245, + 247, + 295, + 246, + 250, + 57, + 57, + 57, + 57, + 57, + 57, + 253, + 57, + 57, + 57, + 57, + 57, + 57, + 295, + 255, + 248, + 252, + 251, + 57, + 57, + 249, + 57, + 57, + 295, + 257, + 295, + 250, + 57, + 57, + 57, + 57, + 57, + 57, + 253, + 295, + 256, + 295, + 57, + 57, + 259, + 295, + + 255, + 295, + 252, + 57, + 57, + 258, + 261, + 57, + 57, + 295, + 257, + 295, + 260, + 262, + 263, + 57, + 57, + 57, + 57, + 57, + 57, + 256, + 57, + 57, + 295, + 259, + 57, + 57, + 57, + 57, + 264, + 295, + 258, + 261, + 57, + 57, + 266, + 57, + 57, + 260, + 262, + 263, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 295, + 265, + 57, + 57, + 57, + 57, + 267, + 264, + 57, + 57, + 57, + 57, + 295, + 266, + 57, + 57, + 57, + 57, + 295, + 268, + 57, + 57, + 272, + 57, + 57, + 271, + 57, + 57, + 295, + 269, + 273, + 57, + 57, + 267, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 268, + 274, + 295, + 272, + + 275, + 295, + 271, + 57, + 57, + 295, + 269, + 273, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 295, + 276, + 278, + 57, + 57, + 57, + 57, + 295, + 274, + 295, + 279, + 275, + 280, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 57, + 281, + 57, + 57, + 276, + 278, + 284, + 295, + 289, + 295, + 57, + 57, + 295, + 279, + 295, + 280, + 295, + 283, + 290, + 295, + 286, + 57, + 57, + 57, + 57, + 287, + 57, + 57, + 281, + 57, + 57, + 57, + 57, + 284, + 293, + 289, + 57, + 57, + 295, + 295, + 291, + 294, + 295, + 295, + 283, + 290, + 295, + 286, + 292, + 295, + 295, + 295, + 287, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + + 295, + 293, + 295, + 295, + 295, + 295, + 295, + 291, + 294, + 295, + 295, + 295, + 295, + 295, + 295, + 292, + 46, + 46, 48, - 56, - 55, - 50, 48, - 46, - 236, + 50, + 50, 5, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295 - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236}; +}; -static const flex_int16_t yy_chk[717] = {0, +static const flex_int16_t yy_chk[1296] = {0, + 1, + 1, 1, 1, 1, @@ -2244,658 +3017,1242 @@ static const flex_int16_t yy_chk[717] = {0, 1, 1, 20, - 25, + 300, + 20, 20, 22, 22, + 25, + 25, + 26, 26, + 134, 27, - 28, - 29, - 31, - 241, 27, 28, - 52, + 28, + 35, + 35, + 27, 26, - 52, 28, - 32, + 29, + 29, + 299, + 28, 27, 25, - 34, - 240, - 32, - 235, + 186, + 28, + + 52, + 52, 25, 27, - 32, - 30, + 31, + 31, 27, + 82, 28, - - 234, - 31, - 233, + 134, + 26, + 30, + 30, + 58, 58, + 50, + 27, 26, + 28, + 33, 33, 29, - 27, - 28, - 34, - 26, - 58, 28, - 30, 27, 25, - 30, - 39, - 32, + 186, + 28, + 31, 30, 25, 27, - 32, - 33, + 30, + 48, 27, + 30, 28, - 44, - 31, - 33, - 38, + 24, 26, - 36, + 33, + 32, + 32, + 62, + 62, + 33, + 11, + 32, + 33, + 10, 29, - 37, - 59, + 32, + 9, 34, - 39, - 58, - 44, + 34, + 5, + 31, 30, - 230, - 59, + 79, + 79, 30, - 42, - 36, + 37, + 37, 30, - 229, + 0, + 36, + 36, + 33, + 0, 38, - 41, + 38, + 0, + 33, + 34, + 32, 33, + 39, + 39, + 32, 36, - 38, + 0, 37, - 41, - 33, - 60, 40, - 41, + 40, + 0, + 36, + 0, 37, - 228, - 65, + 38, + 0, + 43, + 43, + 38, + 70, + 70, + 42, 42, + 41, + 41, 39, + 34, 42, - 44, - 40, - 60, - 59, + 40, - 65, + 45, + 45, + 42, 36, - 227, - 66, - 38, - 62, - 226, + 41, + 37, + 43, + 41, + 43, 36, - 38, + 70, 37, + 38, + 45, + 45, + 53, + 38, + 53, + 53, 41, - 40, - 63, - 64, + 61, + 61, + 42, + 39, 41, - 37, + 42, 40, - 63, + 59, + 59, 42, + 0, + 41, + 61, + 43, + 41, 43, + 59, + 70, + 44, + 44, + 45, + 45, + 60, + 60, + 44, + 0, + 41, + 226, + 44, 42, - 62, - 40, 60, - 43, - 40, + 41, + 44, + 63, + 63, + 64, + 64, + 66, + 66, + 61, + 254, + 64, + 0, + 59, + 0, + 65, 65, 66, - 43, 67, - 64, - + 67, + 63, + 44, 69, - 43, - 75, - 225, - 78, + 69, + 226, + 44, + 0, + 60, + 0, + 44, + 0, 68, - 40, - 70, + 68, + 65, + 0, + 71, 71, + 254, + 64, + 65, + 0, + 72, 72, - 73, - 40, - 63, - 69, - 67, - 74, - 62, - 78, - 75, - 43, - 69, 67, 66, - 43, + 0, + 69, + 63, 68, - 64, - 70, - 43, - 72, + + 71, + 0, + 73, 73, + 76, + 76, + 68, 71, + 74, + 74, + 0, + 65, + 72, + 77, + 77, + 75, + 75, + 65, 80, - 82, - 81, - 79, - 223, 80, - 84, - 220, - 69, + 270, 67, - 74, - 85, - 78, - 75, - 84, + 83, + 83, 69, - 67, - 82, - 79, - 68, - 79, - 70, - 87, - 72, 73, + 68, 71, + 74, + 80, + 77, + 76, + 0, + 68, + 71, + 75, 81, + 81, + 83, + 72, + 83, + 277, + 84, + 84, 85, - 195, - 92, - 88, - 80, + 85, + 83, + 270, + 84, + 282, + 81, + 0, + 73, + 86, 86, - 89, - 91, - 219, 74, + 80, + 77, 76, - 94, - 195, - 84, 87, - 92, - 82, - 79, - 76, - 79, - 76, + 87, + 0, + 75, + 78, + 78, + 83, + 0, + 83, + 277, + 85, 86, + 0, + 78, + 83, + 78, + 84, + 282, + 81, + 89, + 89, + 88, + 88, + 78, + 90, + 90, + 91, + 91, + 78, + 78, 88, + 0, + 92, + 92, 93, - 89, - 81, + 93, + 0, 85, - 94, - 76, 86, + 89, + 78, + 90, - 93, - 95, - 76, - 76, + 78, 91, - 90, - 218, - 195, + 94, + 94, + 95, 95, - 87, - 92, - 96, - 97, - 76, - 101, - 76, - 86, + 96, + 78, + 91, + 92, + 95, + 93, + 78, + 78, 88, - 102, + 98, + 98, + 0, + 97, + 97, + 94, + 99, + 99, 89, + 0, + 90, + 0, + 91, + 0, + 98, + 99, + 100, + 100, + 285, 96, + 91, + 92, + 95, + 93, 97, - 94, - 76, - 86, + 0, + 101, + 101, 102, - 93, + 102, + 103, + 103, + 94, + 100, 101, - 76, - 76, - 91, - 90, + 105, + 105, + 0, + 102, + 0, 103, + 98, + 99, 104, - 95, - 105, + 104, + 285, + 96, + 106, 106, + 107, + 107, + 97, + 108, 108, 109, - 107, - 105, + 109, + 110, 110, - 115, 111, - 108, - 106, - 96, - 97, - 107, - 116, - 104, - 102, - 112, + 111, + 100, 101, + 109, + 112, + 112, + 102, + 108, 103, + 104, + 113, 113, 114, - 112, - 109, + 114, + 115, + 115, + 113, 111, - 118, - 117, - 116, - 122, - 110, + 112, + 0, 110, - 105, + 0, + 114, + 0, + 115, - 120, - 118, + 116, + 116, + 117, + 117, + 0, + 109, + 119, + 119, + 116, 108, - 106, - 113, - 114, - 107, - 217, + 0, 104, + 118, + 118, + 0, + 120, 120, + 0, + 113, + 111, + 112, + 0, + 110, + 0, + 114, + 0, + 115, + 117, + 121, 121, 119, - 103, - 117, - 122, - 112, - 109, - 111, - 123, + 119, + 120, + 118, 121, 116, + 0, + 122, + 122, + 124, + 124, + 0, 125, - 110, - 110, - 119, - 115, + 125, + 123, + 123, + 126, + 126, + 0, + 137, + 137, + 0, + 128, 128, + 117, + 122, + 125, + 119, + 119, + 120, 118, + 121, + 123, + 127, + 127, 124, + 128, + 126, + 129, 129, - 113, - 114, 130, - 126, + 130, + 0, + 127, + 137, + 131, + 131, + 0, + 129, + 0, + 130, + 0, + 122, 125, - 120, + 0, + 132, + 132, + 133, + 133, 123, + 136, + 136, 124, - 129, - 117, - 122, - 126, 128, - + 126, 131, - 133, - 121, + 132, + 0, 135, - 134, - 130, - 136, - 119, + + 135, + 127, 137, - 131, + 138, + 138, + 136, + 129, + 133, + 130, 135, 139, + 139, 138, 140, - 142, + 140, 141, - 139, - 125, + 141, + 144, + 144, + 142, + 142, 143, - 123, - 124, - 129, - 136, - 148, - 126, - 128, - 134, + 143, + 131, + 132, + 141, + 142, 144, + 145, + 145, + 140, + 0, + 136, + 0, 133, - 150, - 147, - 130, - 137, - 138, - 162, - 131, + 0, 135, - 153, - 140, - 141, + 0, 143, + 138, + 146, + 146, + 0, + 147, + 147, + 149, + 149, + 148, + 148, + 150, + 150, + 0, + 141, 142, - 139, + 144, + 148, + 0, + 140, + 0, + 151, + 151, + 0, + 149, + 152, + 152, + 143, 147, + 0, + 146, + 151, + 153, + 153, + 154, + 154, + 150, + 0, + 153, + 155, 155, - 144, 156, + 156, + 0, 148, - 136, - 155, 157, - 215, - 134, - 150, - 133, 157, + 152, + 158, + 158, + 0, + 149, 159, - 214, - 137, - 138, - 160, + 159, + 0, + 147, + 0, + 146, + 151, + 0, + 154, + 158, + + 0, + 150, + 155, 153, + 160, + 160, + 157, + 156, + 0, + 159, + 161, + 161, + 152, 162, - 164, - 140, - 141, - 143, - 142, + 162, + 0, 163, - 147, - 156, - 144, + 163, + 164, + 164, 165, - 148, - 169, + 165, + 166, + 166, + 0, + 154, + 158, + 162, + 0, 155, + 167, + 167, + 0, + 157, + 156, + 163, 159, + 0, + 168, + 168, + 169, + 169, + 0, + 164, + 168, 171, - 160, - 150, - 173, - 157, 171, + 166, + 170, + 170, + 172, 172, - 163, - 164, 173, - 153, + 173, 162, - 180, + 0, + 172, 174, - 181, - 178, - 187, - 165, - 176, - 156, 174, - 169, - 183, - - 176, - 178, - 159, - 213, - 160, - 172, - 190, - 182, - 171, - 193, + 175, + 175, + 0, 163, + 174, + 176, + 176, + 0, + 177, + 177, + 0, 164, + 168, + 0, + 170, + 166, + 178, + 178, 173, - 185, + 179, + 179, + 180, 180, + 0, + 172, + 0, + 176, + 177, + 181, 181, + 0, + 174, + 182, 182, - 187, 183, + 183, + 185, + 185, + 180, + 184, + 184, + + 170, + 187, + 187, + 0, + 173, 188, - 165, + 188, + 179, 189, - 185, - 174, - 169, + 189, + 181, + 0, + 176, + 177, + 182, + 184, + 190, + 190, + 0, + 191, + 191, + 192, + 192, + 0, + 180, 191, - 176, - 178, + 193, + 193, + 194, + 194, 188, - 190, + 0, 189, - 172, - 203, + 0, + 179, + 194, 193, - 199, - 212, - 197, - 203, - 191, - 205, - 180, 181, + 195, + 195, + 0, 182, - 187, - 183, + 184, + 0, + 192, + 0, + 195, + 196, + 196, 197, - 201, - 206, - 185, - 204, - 205, - 207, - 201, - 208, + 197, + 0, + 191, + 198, + 198, + 197, + 0, 188, - 190, + 0, 189, - 209, 199, + 199, + 194, 193, - 207, - 210, - 208, - 203, - 191, - 221, - 211, - 216, - 222, + 200, + 200, + 201, + 201, + 202, 202, + 199, + 192, + 0, + 195, + 203, + 203, + 204, + 204, + 205, + 205, + 206, 206, 197, - 232, + 207, + 207, + 0, 204, - 200, - 222, - 205, - 198, - 201, - 196, + 208, + 208, + 209, 209, - 221, - 224, 210, + 210, + 207, + 202, + 211, + 211, 199, + 205, + 203, + + 212, + 212, + 213, + 213, + 0, + 211, + 215, + 215, + 214, + 214, + 212, + 0, + 213, + 204, 216, + 216, + 210, + 217, + 217, + 0, 207, - 232, - 208, - 231, - 194, - 224, - 192, - 186, - 184, - 179, - 206, - 177, - 231, - 204, - - 175, - 222, - 170, - 168, - 167, - 166, - 209, + 202, + 218, + 218, + 0, + 205, + 203, + 214, + 216, + 0, + 215, + 0, + 211, + 219, + 219, 221, - 161, + 221, + 212, + 0, + 213, + 220, + 220, + 0, 210, - 158, - 216, - 154, - 232, - 152, - 151, - 149, + 223, + 223, + 0, + 218, + 222, + 222, 224, - 146, - 145, - 132, - 127, - 100, - 99, - 231, - 237, - 237, - 238, - 238, - 239, - 239, - 98, - 83, - 77, - 61, - 57, - 51, - 49, - 47, - 35, - 24, - 11, - 10, - 9, - 5, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, + 224, + 220, + 0, + 214, + 216, + 0, + 215, + 222, + 225, + 225, + 227, + 227, + 228, + 228, + 225, + 229, + 229, + 230, + 230, + 231, + 231, + 0, + 229, + 218, + 224, + 223, + 232, + 232, + 220, + 233, + 233, + 0, + 232, + 0, + 222, + 234, + 234, + 235, + 235, + 238, + 238, + 225, + 0, + 231, + 0, 236, 236, + 234, + 0, + 229, + 0, + 224, + 237, + 237, + 233, 236, + 239, + 239, + 0, + 232, + 0, + 235, + 237, + 238, + 240, + 240, + 241, + 241, + 242, + 242, + 231, + 243, + 243, + 0, + 234, + 244, + 244, + 245, + 245, + 239, + 0, + 233, 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236, - 236}; + 246, + 246, + 245, + 247, + 247, + 235, + 237, + 238, + 248, + 248, + 249, + 249, + 250, + 250, + 251, + 251, + 0, + 242, + 252, + 252, + 253, + 253, + 247, + 239, + 255, + 255, + 256, + 256, + 0, + 245, + 257, + 257, + 258, + 258, + 0, + 251, + 259, + 259, + 257, + 260, + 260, + 255, + 261, + 261, + 0, + 253, + 259, + 262, + 262, + 247, + 263, + 263, + 264, + 264, + 265, + 265, + 266, + 266, + 267, + 267, + 268, + 268, + 251, + 265, + 0, + 257, + + 266, + 0, + 255, + 269, + 269, + 0, + 253, + 259, + 271, + 271, + 272, + 272, + 273, + 273, + 274, + 274, + 0, + 268, + 271, + 275, + 275, + 276, + 276, + 0, + 265, + 0, + 272, + 266, + 274, + 278, + 278, + 279, + 279, + 280, + 280, + 283, + 283, + 281, + 281, + 284, + 284, + 276, + 286, + 286, + 268, + 271, + 281, + 0, + 286, + 0, + 287, + 287, + 0, + 272, + 0, + 274, + 0, + 280, + 287, + 0, + 283, + 289, + 289, + 290, + 290, + 284, + 291, + 291, + 276, + 292, + 292, + 293, + 293, + 281, + 291, + 286, + 294, + 294, + 0, + 0, + 289, + 293, + 0, + 0, + 280, + 287, + 0, + 283, + 290, + 0, + 0, + 0, + 284, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + + 0, + 291, + 0, + 0, + 0, + 0, + 0, + 289, + 293, + 0, + 0, + 0, + 0, + 0, + 0, + 290, + 296, + 296, + 297, + 297, + 298, + 298, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295, + 295 + +}; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -2931,7 +4288,7 @@ extern double atof(); #define RETURN_TOKEN(token) \ LOG_DEBUG("%s", #token); \ return token -#line 731 "lex_sql.cpp" +#line 879 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -2940,7 +4297,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 740 "lex_sql.cpp" +#line 888 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -3216,7 +4573,7 @@ YY_DECL { #line 75 "lex_sql.l" -#line 1026 "lex_sql.cpp" +#line 1174 "lex_sql.cpp" while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ { @@ -3240,12 +4597,12 @@ YY_DECL } while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 237) + if (yy_current_state >= 296) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; - } while (yy_base[yy_current_state] != 646); + } while (yy_base[yy_current_state] != 1223); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -3505,97 +4862,133 @@ YY_DECL YY_BREAK case 59: YY_RULE_SETUP #line 137 "lex_sql.l" - RETURN_TOKEN(LBRACE); + RETURN_TOKEN(WITH); YY_BREAK case 60: YY_RULE_SETUP #line 138 "lex_sql.l" - RETURN_TOKEN(RBRACE); + RETURN_TOKEN(DISTANCE); YY_BREAK case 61: YY_RULE_SETUP -#line 140 "lex_sql.l" - RETURN_TOKEN(COMMA); +#line 139 "lex_sql.l" + RETURN_TOKEN(TYPE); YY_BREAK case 62: YY_RULE_SETUP -#line 141 "lex_sql.l" - RETURN_TOKEN(EQ); +#line 140 "lex_sql.l" + RETURN_TOKEN(LISTS); YY_BREAK case 63: YY_RULE_SETUP -#line 142 "lex_sql.l" - RETURN_TOKEN(LE); +#line 141 "lex_sql.l" + RETURN_TOKEN(PROBES); YY_BREAK case 64: YY_RULE_SETUP -#line 143 "lex_sql.l" - RETURN_TOKEN(NE); +#line 142 "lex_sql.l" + RETURN_TOKEN(IVFFLAT); YY_BREAK case 65: YY_RULE_SETUP -#line 144 "lex_sql.l" - RETURN_TOKEN(NE); +#line 143 "lex_sql.l" + RETURN_TOKEN(L2_DISTANCE); YY_BREAK case 66: YY_RULE_SETUP -#line 145 "lex_sql.l" - RETURN_TOKEN(LT); +#line 144 "lex_sql.l" + RETURN_TOKEN(COSINE_DISTANCE); YY_BREAK case 67: YY_RULE_SETUP -#line 146 "lex_sql.l" - RETURN_TOKEN(GE); +#line 145 "lex_sql.l" + RETURN_TOKEN(INNER_PRODUCT); YY_BREAK case 68: YY_RULE_SETUP -#line 147 "lex_sql.l" - RETURN_TOKEN(GT); +#line 146 "lex_sql.l" + RETURN_TOKEN(LBRACE); YY_BREAK case 69: YY_RULE_SETUP -#line 148 "lex_sql.l" - RETURN_TOKEN(NOT); +#line 147 "lex_sql.l" + RETURN_TOKEN(RBRACE); YY_BREAK case 70: YY_RULE_SETUP #line 149 "lex_sql.l" - RETURN_TOKEN(IS); + RETURN_TOKEN(COMMA); YY_BREAK case 71: YY_RULE_SETUP #line 150 "lex_sql.l" - RETURN_TOKEN(LIKE); + RETURN_TOKEN(EQ); YY_BREAK case 72: YY_RULE_SETUP +#line 151 "lex_sql.l" + RETURN_TOKEN(LE); + YY_BREAK + case 73: YY_RULE_SETUP #line 152 "lex_sql.l" - yylval->string = strdup(yytext); - RETURN_TOKEN(ID); + RETURN_TOKEN(NE); + YY_BREAK + case 74: YY_RULE_SETUP +#line 153 "lex_sql.l" + RETURN_TOKEN(NE); YY_BREAK - case 73: + case 75: YY_RULE_SETUP +#line 154 "lex_sql.l" + RETURN_TOKEN(LT); + YY_BREAK + case 76: YY_RULE_SETUP #line 155 "lex_sql.l" - case 74: + RETURN_TOKEN(GE); + YY_BREAK + case 77: YY_RULE_SETUP #line 156 "lex_sql.l" - case 75: -#line 157 "lex_sql.l" - case 76: YY_RULE_SETUP + RETURN_TOKEN(GT); + YY_BREAK + case 78: YY_RULE_SETUP #line 157 "lex_sql.l" + RETURN_TOKEN(NOT); + YY_BREAK + case 79: YY_RULE_SETUP +#line 158 "lex_sql.l" + RETURN_TOKEN(IS); + YY_BREAK + case 80: YY_RULE_SETUP +#line 159 "lex_sql.l" + RETURN_TOKEN(LIKE); + YY_BREAK + case 81: YY_RULE_SETUP +#line 161 "lex_sql.l" + yylval->string = strdup(yytext); + RETURN_TOKEN(ID); + YY_BREAK + case 82: +#line 164 "lex_sql.l" + case 83: +#line 165 "lex_sql.l" + case 84: +#line 166 "lex_sql.l" + case 85: YY_RULE_SETUP +#line 166 "lex_sql.l" { return yytext[0]; } YY_BREAK - case 77: - /* rule 77 can match eol */ + case 86: + /* rule 86 can match eol */ YY_RULE_SETUP -#line 158 "lex_sql.l" +#line 167 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK - case 78: - /* rule 78 can match eol */ + case 87: + /* rule 87 can match eol */ YY_RULE_SETUP -#line 159 "lex_sql.l" +#line 168 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK - case 79: YY_RULE_SETUP -#line 161 "lex_sql.l" + case 88: YY_RULE_SETUP +#line 170 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK - case 80: YY_RULE_SETUP -#line 162 "lex_sql.l" + case 89: YY_RULE_SETUP +#line 171 "lex_sql.l" ECHO; YY_BREAK -#line 1477 "lex_sql.cpp" +#line 1670 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -3860,7 +5253,7 @@ static yy_state_type yy_get_previous_state(yyscan_t yyscanner) } while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 237) + if (yy_current_state >= 296) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -3887,11 +5280,11 @@ static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t y } while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 237) + if (yy_current_state >= 296) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 236); + yy_is_jam = (yy_current_state == 295); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -4698,6 +6091,6 @@ void yyfree(void *ptr, yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 162 "lex_sql.l" +#line 171 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { yy_switch_to_buffer(yy_scan_string(str, scanner), scanner); } diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 4b8524f1..55c2c001 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -537,7 +537,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanne #undef yyTABLES_NAME #endif -#line 162 "lex_sql.l" +#line 171 "lex_sql.l" #line 548 "lex_sql.h" #undef yyIN_HEADER diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 2336e248..1f4dbac5 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -134,6 +134,15 @@ FORMAT RETURN_TOKEN(FORMAT); INNER RETURN_TOKEN(INNER); JOIN RETURN_TOKEN(JOIN); VIEW RETURN_TOKEN(VIEW); +WITH RETURN_TOKEN(WITH); +DISTANCE RETURN_TOKEN(DISTANCE); +TYPE RETURN_TOKEN(TYPE); +LISTS RETURN_TOKEN(LISTS); +PROBES RETURN_TOKEN(PROBES); +IVFFLAT RETURN_TOKEN(IVFFLAT); +L2_DISTANCE RETURN_TOKEN(L2_DISTANCE); +COSINE_DISTANCE RETURN_TOKEN(COSINE_DISTANCE); +INNER_PRODUCT RETURN_TOKEN(INNER_PRODUCT); "(" RETURN_TOKEN(LBRACE); ")" RETURN_TOKEN(RBRACE); diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 56bfbfb9..e84e5752 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -251,6 +251,28 @@ struct DropTableSqlNode std::string relation_name; ///< 要删除的表名 }; +enum class VectorDistanceType +{ + L2, + COSINE, + INNER, +}; + +enum class IndexType +{ + BPlusTreeIndex, + VectorIVFFlatIndex, // 目前就支持以上两种 + VectorHNSWIndex +}; + +struct VectorIndexConfig +{ + VectorDistanceType distance_type; ///< 距离度量 + IndexType index_type = IndexType::BPlusTreeIndex; ///< 索引类型,非向量索引情况默认为 b+ 树 + Value lists; ///< 列表数量 + Value probes; ///< 探测次数 +}; + /** * @brief 描述一个create index语句 * @ingroup SQLParser @@ -259,10 +281,11 @@ struct DropTableSqlNode */ struct CreateIndexSqlNode { - bool unique; ///< unique index - std::string index_name; ///< Index name - std::string relation_name; ///< Relation name - std::vector attribute_name; ///< Attribute name + bool unique; ///< unique index + std::string index_name; ///< Index name + std::string relation_name; ///< Relation name + std::vector attribute_name; ///< Attribute name + VectorIndexConfig vector_index_config; ///< 向量索引还有一些额外参数 }; /** diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 6c1530f7..144bdc07 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -166,142 +166,154 @@ ParsedSqlNode *create_table_sql_node(char *table_name, AttrInfoSqlNode *attr_def /* Symbol kind. */ enum yysymbol_kind_t { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ - YYSYMBOL_AS = 4, /* AS */ - YYSYMBOL_ASC = 5, /* ASC */ - YYSYMBOL_BY = 6, /* BY */ - YYSYMBOL_CREATE = 7, /* CREATE */ - YYSYMBOL_DROP = 8, /* DROP */ - YYSYMBOL_EXISTS = 9, /* EXISTS */ - YYSYMBOL_GROUP = 10, /* GROUP */ - YYSYMBOL_HAVING = 11, /* HAVING */ - YYSYMBOL_ORDER = 12, /* ORDER */ - YYSYMBOL_TABLE = 13, /* TABLE */ - YYSYMBOL_TABLES = 14, /* TABLES */ - YYSYMBOL_INDEX = 15, /* INDEX */ - YYSYMBOL_CALC = 16, /* CALC */ - YYSYMBOL_SELECT = 17, /* SELECT */ - YYSYMBOL_DESC = 18, /* DESC */ - YYSYMBOL_SHOW = 19, /* SHOW */ - YYSYMBOL_SYNC = 20, /* SYNC */ - YYSYMBOL_INSERT = 21, /* INSERT */ - YYSYMBOL_DELETE = 22, /* DELETE */ - YYSYMBOL_UPDATE = 23, /* UPDATE */ - YYSYMBOL_LBRACE = 24, /* LBRACE */ - YYSYMBOL_RBRACE = 25, /* RBRACE */ - YYSYMBOL_COMMA = 26, /* COMMA */ - YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ - YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ - YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ - YYSYMBOL_INT_T = 30, /* INT_T */ - YYSYMBOL_IN = 31, /* IN */ - YYSYMBOL_STRING_T = 32, /* STRING_T */ - YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ - YYSYMBOL_DATE_T = 34, /* DATE_T */ - YYSYMBOL_TEXT_T = 35, /* TEXT_T */ - YYSYMBOL_VECTOR_T = 36, /* VECTOR_T */ - YYSYMBOL_NOT = 37, /* NOT */ - YYSYMBOL_UNIQUE = 38, /* UNIQUE */ - YYSYMBOL_NULL_T = 39, /* NULL_T */ - YYSYMBOL_LIMIT = 40, /* LIMIT */ - YYSYMBOL_NULLABLE = 41, /* NULLABLE */ - YYSYMBOL_HELP = 42, /* HELP */ - YYSYMBOL_EXIT = 43, /* EXIT */ - YYSYMBOL_DOT = 44, /* DOT */ - YYSYMBOL_INTO = 45, /* INTO */ - YYSYMBOL_VALUES = 46, /* VALUES */ - YYSYMBOL_FROM = 47, /* FROM */ - YYSYMBOL_WHERE = 48, /* WHERE */ - YYSYMBOL_AND = 49, /* AND */ - YYSYMBOL_OR = 50, /* OR */ - YYSYMBOL_SET = 51, /* SET */ - YYSYMBOL_ON = 52, /* ON */ - YYSYMBOL_LOAD = 53, /* LOAD */ - YYSYMBOL_INFILE = 54, /* INFILE */ - YYSYMBOL_EXPLAIN = 55, /* EXPLAIN */ - YYSYMBOL_STORAGE = 56, /* STORAGE */ - YYSYMBOL_FORMAT = 57, /* FORMAT */ - YYSYMBOL_INNER = 58, /* INNER */ - YYSYMBOL_JOIN = 59, /* JOIN */ - YYSYMBOL_VIEW = 60, /* VIEW */ - YYSYMBOL_EQ = 61, /* EQ */ - YYSYMBOL_LT = 62, /* LT */ - YYSYMBOL_GT = 63, /* GT */ - YYSYMBOL_LE = 64, /* LE */ - YYSYMBOL_GE = 65, /* GE */ - YYSYMBOL_NE = 66, /* NE */ - YYSYMBOL_LIKE = 67, /* LIKE */ - YYSYMBOL_IS = 68, /* IS */ - YYSYMBOL_NUMBER = 69, /* NUMBER */ - YYSYMBOL_FLOAT = 70, /* FLOAT */ - YYSYMBOL_ID = 71, /* ID */ - YYSYMBOL_SSS = 72, /* SSS */ - YYSYMBOL_73_ = 73, /* '+' */ - YYSYMBOL_74_ = 74, /* '-' */ - YYSYMBOL_75_ = 75, /* '*' */ - YYSYMBOL_76_ = 76, /* '/' */ - YYSYMBOL_UMINUS = 77, /* UMINUS */ - YYSYMBOL_YYACCEPT = 78, /* $accept */ - YYSYMBOL_commands = 79, /* commands */ - YYSYMBOL_command_wrapper = 80, /* command_wrapper */ - YYSYMBOL_exit_stmt = 81, /* exit_stmt */ - YYSYMBOL_help_stmt = 82, /* help_stmt */ - YYSYMBOL_sync_stmt = 83, /* sync_stmt */ - YYSYMBOL_begin_stmt = 84, /* begin_stmt */ - YYSYMBOL_commit_stmt = 85, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 86, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 87, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 88, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 89, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 90, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 91, /* create_index_stmt */ - YYSYMBOL_opt_unique = 92, /* opt_unique */ - YYSYMBOL_attr_list = 93, /* attr_list */ - YYSYMBOL_drop_index_stmt = 94, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 95, /* create_table_stmt */ - YYSYMBOL_create_view_stmt = 96, /* create_view_stmt */ - YYSYMBOL_drop_view_stmt = 97, /* drop_view_stmt */ - YYSYMBOL_attr_def_list = 98, /* attr_def_list */ - YYSYMBOL_attr_def = 99, /* attr_def */ - YYSYMBOL_nullable_constraint = 100, /* nullable_constraint */ - YYSYMBOL_type = 101, /* type */ - YYSYMBOL_insert_stmt = 102, /* insert_stmt */ - YYSYMBOL_values_list = 103, /* values_list */ - YYSYMBOL_value_list = 104, /* value_list */ - YYSYMBOL_value = 105, /* value */ - YYSYMBOL_nonnegative_value = 106, /* nonnegative_value */ - YYSYMBOL_storage_format = 107, /* storage_format */ - YYSYMBOL_delete_stmt = 108, /* delete_stmt */ - YYSYMBOL_update_stmt = 109, /* update_stmt */ - YYSYMBOL_set_clauses = 110, /* set_clauses */ - YYSYMBOL_setClause = 111, /* setClause */ - YYSYMBOL_select_stmt = 112, /* select_stmt */ - YYSYMBOL_calc_stmt = 113, /* calc_stmt */ - YYSYMBOL_expression_list = 114, /* expression_list */ - YYSYMBOL_expression = 115, /* expression */ - YYSYMBOL_alias = 116, /* alias */ - YYSYMBOL_func_expr = 117, /* func_expr */ - YYSYMBOL_sub_query_expr = 118, /* sub_query_expr */ - YYSYMBOL_rel_attr = 119, /* rel_attr */ - YYSYMBOL_relation = 120, /* relation */ - YYSYMBOL_rel_list = 121, /* rel_list */ - YYSYMBOL_join_clauses = 122, /* join_clauses */ - YYSYMBOL_where = 123, /* where */ - YYSYMBOL_condition = 124, /* condition */ - YYSYMBOL_comp_op = 125, /* comp_op */ - YYSYMBOL_opt_order_by = 126, /* opt_order_by */ - YYSYMBOL_sort_list = 127, /* sort_list */ - YYSYMBOL_sort_unit = 128, /* sort_unit */ - YYSYMBOL_group_by = 129, /* group_by */ - YYSYMBOL_opt_having = 130, /* opt_having */ - YYSYMBOL_opt_limit = 131, /* opt_limit */ - YYSYMBOL_explain_stmt = 132, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 133, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 134 /* opt_semicolon */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SEMICOLON = 3, /* SEMICOLON */ + YYSYMBOL_AS = 4, /* AS */ + YYSYMBOL_ASC = 5, /* ASC */ + YYSYMBOL_BY = 6, /* BY */ + YYSYMBOL_CREATE = 7, /* CREATE */ + YYSYMBOL_DROP = 8, /* DROP */ + YYSYMBOL_EXISTS = 9, /* EXISTS */ + YYSYMBOL_GROUP = 10, /* GROUP */ + YYSYMBOL_HAVING = 11, /* HAVING */ + YYSYMBOL_ORDER = 12, /* ORDER */ + YYSYMBOL_TABLE = 13, /* TABLE */ + YYSYMBOL_TABLES = 14, /* TABLES */ + YYSYMBOL_INDEX = 15, /* INDEX */ + YYSYMBOL_CALC = 16, /* CALC */ + YYSYMBOL_SELECT = 17, /* SELECT */ + YYSYMBOL_DESC = 18, /* DESC */ + YYSYMBOL_SHOW = 19, /* SHOW */ + YYSYMBOL_SYNC = 20, /* SYNC */ + YYSYMBOL_INSERT = 21, /* INSERT */ + YYSYMBOL_DELETE = 22, /* DELETE */ + YYSYMBOL_UPDATE = 23, /* UPDATE */ + YYSYMBOL_LBRACE = 24, /* LBRACE */ + YYSYMBOL_RBRACE = 25, /* RBRACE */ + YYSYMBOL_COMMA = 26, /* COMMA */ + YYSYMBOL_TRX_BEGIN = 27, /* TRX_BEGIN */ + YYSYMBOL_TRX_COMMIT = 28, /* TRX_COMMIT */ + YYSYMBOL_TRX_ROLLBACK = 29, /* TRX_ROLLBACK */ + YYSYMBOL_INT_T = 30, /* INT_T */ + YYSYMBOL_IN = 31, /* IN */ + YYSYMBOL_STRING_T = 32, /* STRING_T */ + YYSYMBOL_FLOAT_T = 33, /* FLOAT_T */ + YYSYMBOL_DATE_T = 34, /* DATE_T */ + YYSYMBOL_TEXT_T = 35, /* TEXT_T */ + YYSYMBOL_VECTOR_T = 36, /* VECTOR_T */ + YYSYMBOL_NOT = 37, /* NOT */ + YYSYMBOL_UNIQUE = 38, /* UNIQUE */ + YYSYMBOL_NULL_T = 39, /* NULL_T */ + YYSYMBOL_LIMIT = 40, /* LIMIT */ + YYSYMBOL_NULLABLE = 41, /* NULLABLE */ + YYSYMBOL_HELP = 42, /* HELP */ + YYSYMBOL_EXIT = 43, /* EXIT */ + YYSYMBOL_DOT = 44, /* DOT */ + YYSYMBOL_INTO = 45, /* INTO */ + YYSYMBOL_VALUES = 46, /* VALUES */ + YYSYMBOL_FROM = 47, /* FROM */ + YYSYMBOL_WHERE = 48, /* WHERE */ + YYSYMBOL_AND = 49, /* AND */ + YYSYMBOL_OR = 50, /* OR */ + YYSYMBOL_SET = 51, /* SET */ + YYSYMBOL_ON = 52, /* ON */ + YYSYMBOL_LOAD = 53, /* LOAD */ + YYSYMBOL_INFILE = 54, /* INFILE */ + YYSYMBOL_EXPLAIN = 55, /* EXPLAIN */ + YYSYMBOL_STORAGE = 56, /* STORAGE */ + YYSYMBOL_FORMAT = 57, /* FORMAT */ + YYSYMBOL_INNER = 58, /* INNER */ + YYSYMBOL_JOIN = 59, /* JOIN */ + YYSYMBOL_VIEW = 60, /* VIEW */ + YYSYMBOL_WITH = 61, /* WITH */ + YYSYMBOL_DISTANCE = 62, /* DISTANCE */ + YYSYMBOL_TYPE = 63, /* TYPE */ + YYSYMBOL_LISTS = 64, /* LISTS */ + YYSYMBOL_PROBES = 65, /* PROBES */ + YYSYMBOL_IVFFLAT = 66, /* IVFFLAT */ + YYSYMBOL_L2_DISTANCE = 67, /* L2_DISTANCE */ + YYSYMBOL_COSINE_DISTANCE = 68, /* COSINE_DISTANCE */ + YYSYMBOL_INNER_PRODUCT = 69, /* INNER_PRODUCT */ + YYSYMBOL_EQ = 70, /* EQ */ + YYSYMBOL_LT = 71, /* LT */ + YYSYMBOL_GT = 72, /* GT */ + YYSYMBOL_LE = 73, /* LE */ + YYSYMBOL_GE = 74, /* GE */ + YYSYMBOL_NE = 75, /* NE */ + YYSYMBOL_LIKE = 76, /* LIKE */ + YYSYMBOL_IS = 77, /* IS */ + YYSYMBOL_NUMBER = 78, /* NUMBER */ + YYSYMBOL_FLOAT = 79, /* FLOAT */ + YYSYMBOL_ID = 80, /* ID */ + YYSYMBOL_SSS = 81, /* SSS */ + YYSYMBOL_82_ = 82, /* '+' */ + YYSYMBOL_83_ = 83, /* '-' */ + YYSYMBOL_84_ = 84, /* '*' */ + YYSYMBOL_85_ = 85, /* '/' */ + YYSYMBOL_UMINUS = 86, /* UMINUS */ + YYSYMBOL_YYACCEPT = 87, /* $accept */ + YYSYMBOL_commands = 88, /* commands */ + YYSYMBOL_command_wrapper = 89, /* command_wrapper */ + YYSYMBOL_exit_stmt = 90, /* exit_stmt */ + YYSYMBOL_help_stmt = 91, /* help_stmt */ + YYSYMBOL_sync_stmt = 92, /* sync_stmt */ + YYSYMBOL_begin_stmt = 93, /* begin_stmt */ + YYSYMBOL_commit_stmt = 94, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 95, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 96, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 97, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 98, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 99, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 100, /* create_index_stmt */ + YYSYMBOL_opt_unique = 101, /* opt_unique */ + YYSYMBOL_index_type = 102, /* index_type */ + YYSYMBOL_vector_index_config = 103, /* vector_index_config */ + YYSYMBOL_vector_distance_type = 104, /* vector_distance_type */ + YYSYMBOL_attr_list = 105, /* attr_list */ + YYSYMBOL_drop_index_stmt = 106, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 107, /* create_table_stmt */ + YYSYMBOL_create_view_stmt = 108, /* create_view_stmt */ + YYSYMBOL_drop_view_stmt = 109, /* drop_view_stmt */ + YYSYMBOL_attr_def_list = 110, /* attr_def_list */ + YYSYMBOL_attr_def = 111, /* attr_def */ + YYSYMBOL_nullable_constraint = 112, /* nullable_constraint */ + YYSYMBOL_type = 113, /* type */ + YYSYMBOL_insert_stmt = 114, /* insert_stmt */ + YYSYMBOL_values_list = 115, /* values_list */ + YYSYMBOL_value_list = 116, /* value_list */ + YYSYMBOL_value = 117, /* value */ + YYSYMBOL_nonnegative_value = 118, /* nonnegative_value */ + YYSYMBOL_storage_format = 119, /* storage_format */ + YYSYMBOL_delete_stmt = 120, /* delete_stmt */ + YYSYMBOL_update_stmt = 121, /* update_stmt */ + YYSYMBOL_set_clauses = 122, /* set_clauses */ + YYSYMBOL_setClause = 123, /* setClause */ + YYSYMBOL_select_stmt = 124, /* select_stmt */ + YYSYMBOL_calc_stmt = 125, /* calc_stmt */ + YYSYMBOL_expression_list = 126, /* expression_list */ + YYSYMBOL_expression = 127, /* expression */ + YYSYMBOL_alias = 128, /* alias */ + YYSYMBOL_func_expr = 129, /* func_expr */ + YYSYMBOL_sub_query_expr = 130, /* sub_query_expr */ + YYSYMBOL_rel_attr = 131, /* rel_attr */ + YYSYMBOL_relation = 132, /* relation */ + YYSYMBOL_rel_list = 133, /* rel_list */ + YYSYMBOL_join_clauses = 134, /* join_clauses */ + YYSYMBOL_where = 135, /* where */ + YYSYMBOL_condition = 136, /* condition */ + YYSYMBOL_comp_op = 137, /* comp_op */ + YYSYMBOL_opt_order_by = 138, /* opt_order_by */ + YYSYMBOL_sort_list = 139, /* sort_list */ + YYSYMBOL_sort_unit = 140, /* sort_unit */ + YYSYMBOL_group_by = 141, /* group_by */ + YYSYMBOL_opt_having = 142, /* opt_having */ + YYSYMBOL_opt_limit = 143, /* opt_limit */ + YYSYMBOL_explain_stmt = 144, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 145, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 146 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -606,21 +618,21 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 72 +#define YYFINAL 73 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 278 +#define YYLAST 311 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 78 +#define YYNTOKENS 87 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 57 +#define YYNNTS 60 /* YYNRULES -- Number of rules. */ -#define YYNRULES 149 +#define YYNRULES 156 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 265 +#define YYNSTATES 297 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 328 +#define YYMAXUTOK 337 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ @@ -671,12 +683,12 @@ static const yytype_int8 yytranslate[] = {0, 2, 2, 2, - 75, - 73, + 84, + 82, 2, - 74, + 83, 2, - 76, + 85, 2, 2, 2, @@ -957,160 +969,176 @@ static const yytype_int8 yytranslate[] = {0, 70, 71, 72, - 77}; + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 86}; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = {0, - 266, - 266, - 274, - 275, - 276, - 277, - 278, - 279, - 280, 281, - 282, - 283, - 284, - 285, - 286, - 287, - 288, + 281, 289, 290, 291, + 292, 293, 294, 295, 296, + 297, + 298, + 299, 300, + 301, + 302, + 303, + 304, + 305, 306, + 308, + 309, + 310, 311, - 317, - 323, - 329, - 335, - 342, - 348, - 356, - 366, + 315, + 321, + 326, + 332, + 338, + 344, + 350, + 357, + 363, + 371, 381, - 382, - 386, - 392, - 401, - 411, - 415, - 419, - 423, + 393, + 409, + 410, + 414, + 421, 427, - 434, + 438, 442, - 454, - 464, - 467, - 480, - 498, - 527, + 446, + 453, + 459, + 468, + 478, + 482, + 486, + 490, + 494, + 501, + 509, + 521, 531, - 535, - 540, - 546, + 534, 547, - 548, - 549, - 550, - 551, - 555, 565, - 579, - 585, - 592, + 594, 598, - 606, - 609, + 602, + 607, 613, - 620, - 624, - 628, - 634, - 641, - 644, - 651, - 663, - 677, - 682, - 689, - 699, - 737, - 770, - 776, - 785, - 788, - 797, - 813, - 816, - 819, - 822, - 825, - 833, - 836, - 841, - 847, - 850, - 853, - 856, - 863, - 866, - 869, - 874, - 881, - 888, - 893, + 614, + 615, + 616, + 617, + 618, + 622, + 632, + 646, + 652, + 659, + 665, + 673, + 676, + 680, + 687, + 691, + 695, + 701, + 708, + 711, + 718, + 730, + 744, + 749, + 756, + 766, + 804, + 837, + 843, + 852, + 855, + 864, + 880, + 883, + 886, + 889, + 892, + 900, 903, - 909, - 919, + 908, + 914, + 917, + 920, + 923, + 930, + 933, 936, - 943, + 941, + 948, 955, - 958, - 964, - 968, - 975, - 979, + 960, + 970, + 976, 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1004, - 1007, - 1015, - 1020, - 1028, - 1034, - 1040, - 1050, + 1003, + 1010, + 1022, + 1025, + 1031, + 1035, + 1042, + 1046, 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, 1061, + 1062, + 1063, 1064, - 1072, - 1075, - 1096, - 1104, - 1115}; + 1065, + 1066, + 1071, + 1074, + 1082, + 1087, + 1095, + 1101, + 1107, + 1117, + 1120, + 1128, + 1131, + 1139, + 1142, + 1163, + 1171, + 1182}; #endif /** Accessing symbol of state STATE. */ @@ -1184,6 +1212,15 @@ static const char *const yytname[] = {"\"end of file\"", "INNER", "JOIN", "VIEW", + "WITH", + "DISTANCE", + "TYPE", + "LISTS", + "PROBES", + "IVFFLAT", + "L2_DISTANCE", + "COSINE_DISTANCE", + "INNER_PRODUCT", "EQ", "LT", "GT", @@ -1216,6 +1253,9 @@ static const char *const yytname[] = {"\"end of file\"", "show_index_stmt", "create_index_stmt", "opt_unique", + "index_type", + "vector_index_config", + "vector_distance_type", "attr_list", "drop_index_stmt", "create_table_stmt", @@ -1263,7 +1303,7 @@ static const char *const yytname[] = {"\"end of file\"", static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif -#define YYPACT_NINF (-145) +#define YYPACT_NINF (-185) #define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) @@ -1273,280 +1313,312 @@ static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysy /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {223, - 6, - 9, - -11, - -11, - -56, - 16, - -145, +static const yytype_int16 yypact[] = {229, + 7, + 0, + 41, + 41, + -53, + 38, + -185, + -14, + -13, + -30, + -185, + -185, + -185, + -185, + -185, -22, - -15, - -21, - -145, - -145, - -145, - -145, - -145, - -1, - 223, - 67, - 85, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - 20, - -145, + 229, + 69, + 74, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + 3, + 66, + -185, + 17, + 88, 29, - 113, - 81, - 83, - 84, - 129, - -145, - -145, - -145, + 32, + 36, + 27, + -185, + -185, + -185, -3, - -145, - -11, - -145, - -145, - -145, - 10, - -145, - -145, - -145, - 109, - -145, - -145, - 110, - 87, - 88, - 111, - 99, - -145, - -145, - -145, - -145, - -13, - 23, - 95, - -145, - 117, - -145, - -11, - 136, - 142, - -11, - -20, - -145, - 101, - -145, - -11, - -11, - -11, - -11, - 144, - 102, - 102, + -185, + 41, + -185, + -185, + -185, + 4, + -185, + -185, + -185, + 44, + -185, + -185, + 71, + 43, + 53, + 84, + 75, + -185, + -185, + -185, + -185, -7, - 123, - 103, - 66, + 73, + 24, + 78, + -185, 104, - 119, - 12, - 160, + -185, + 41, + 138, + 148, + 41, + -54, + -185, + 97, + -185, + 41, + 41, + 41, + 41, + 155, + 106, + 106, + 1, + 139, 112, + 76, + 114, + 141, + 18, + 144, + 182, + 120, + 150, 128, - 116, - 109, - -145, - -145, - 156, - -145, - -145, - -145, - -27, - -27, - -145, - -145, - -11, - -145, - 4, - 123, - -145, + 44, + -185, + -185, + 184, + -185, + -185, + -185, + -23, + -23, + -185, + -185, + 41, + -185, + 5, + 139, + -185, + 120, + 186, + 151, + -185, + 142, + 16, + -185, + 93, + -185, + -185, + 132, + 185, + 143, + 182, + -185, + 134, + -185, + 189, + 191, + 140, + -185, + -185, + -185, + 174, + 212, + 207, + 214, + 76, + 215, + -185, + -185, + 2, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + 203, + 67, + 22, + 41, + 41, 112, - 158, - 154, - -145, - 125, - -8, - -145, - 3, - -145, - -145, - 115, - 162, - 131, - 160, - -145, - -145, - 163, - 165, - 124, - -145, - -145, - -145, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, 137, - 176, - 195, - 181, - 66, + 114, + 217, + 163, + -185, + 220, + 120, + 249, + 230, + 106, + 106, + 253, + 244, + 216, + 49, + -185, + 236, + -185, + -185, + -185, + -185, + 41, + 151, + 151, + 122, + 122, + -185, 183, - -145, - -145, - 11, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - 170, - 56, - 63, - -11, - -11, - 103, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - 55, - 104, + 224, + -185, + -185, + -185, 185, - 140, - -145, - 112, 208, - 190, - 102, - 102, - 221, - 222, + -185, + 120, + -185, + 182, + 120, + 213, + 139, + 10, + -185, + 41, + 151, + 254, 186, - 90, - -145, - 210, - -145, - -145, - -145, - -145, - -11, - 154, + -185, + 76, + 76, + 122, + -185, + 218, + 243, + -185, + -185, + 51, + 245, + -185, + 248, + 151, + 207, + -185, + 22, + 263, + 234, + 215, + -185, 154, - 33, - 33, - -145, - 166, - 197, - -145, - -145, - -145, - 162, + 95, 182, - -145, - -145, - 160, - 112, - 196, - 123, - 5, - -145, - -11, - 154, + -185, + 221, + -185, + -26, + -185, + 41, + 197, + -185, + -185, + -185, + -185, + 252, + 219, + 11, + -185, + 251, + -185, + 223, + -185, + 106, + -185, + -185, + 41, + 209, + -185, + -185, + 59, + -185, + -185, + -185, + 255, 225, - 158, - -145, - 66, - 66, - 33, - -145, - 198, - 224, - -145, - -145, - 78, - -145, + 222, + 227, + -185, + 158, + -185, + 226, 228, - 154, - 195, - -145, - 63, - 248, - 215, - 183, - -145, - 108, - 100, - 160, - -145, - -145, - -24, - -145, - -11, - 187, - -145, - -145, - -145, - -145, - 199, - 28, - -145, + 76, + 257, 231, - -145, - 102, - -145, - -145, - -11, - -145, - -145}; + 232, + 76, + 261, + -185}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = {0, - 37, + 38, 0, - 87, - 87, + 94, + 94, 0, 0, 27, @@ -1585,27 +1657,28 @@ static const yytype_uint8 yydefact[] = {0, 21, 22, 0, - 36, 0, + 37, 0, 0, 0, 0, - 87, - 75, - 72, - 73, - 107, - 74, 0, - 98, - 96, - 85, - 102, - 100, - 101, - 97, - 86, + 94, + 82, + 79, + 80, + 114, + 81, + 0, + 105, + 103, + 92, + 109, + 107, + 108, + 104, + 93, 33, 32, 0, @@ -1613,33 +1686,34 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 147, + 154, 1, - 149, + 156, 2, - 76, + 83, + 0, 0, 0, 31, 0, - 48, - 87, + 55, + 94, 0, 0, - 87, + 94, 0, - 95, + 102, 0, - 103, + 110, 0, 0, 0, 0, - 88, + 95, 0, 0, 0, - 114, + 121, 0, 0, 0, @@ -1650,222 +1724,255 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 106, - 94, 0, - 108, + 113, + 101, + 0, + 115, + 106, + 111, + 97, + 98, 99, - 104, - 90, - 91, - 92, - 93, - 87, + 100, + 94, + 116, 109, - 102, - 114, + 121, 34, 0, 0, 0, - 78, + 85, 0, - 114, - 80, + 121, + 87, 0, - 148, - 69, + 155, + 76, + 0, + 56, 0, - 49, 0, + 52, 0, + 53, 45, - 46, - 38, 0, 0, - 40, - 105, - 89, + 47, + 112, + 96, 0, - 110, - 141, + 117, + 148, 0, 0, - 63, - 132, + 70, + 139, + 137, + 0, + 127, + 128, + 129, 130, + 131, + 132, + 135, + 133, 0, - 120, - 121, 122, - 123, - 124, - 125, - 128, - 126, 0, - 115, 0, 0, + 86, + 77, + 78, + 64, + 65, + 66, + 67, + 68, + 69, + 63, 0, - 79, - 70, - 71, - 57, - 58, - 59, - 60, - 61, - 62, - 56, 0, 0, + 51, 0, - 44, 0, 0, 0, 0, 0, 0, - 143, + 150, 0, 0, - 67, + 74, 0, - 133, - 131, - 129, - 127, + 140, + 138, + 136, + 134, 0, 0, 0, - 117, - 82, - 81, + 124, + 89, + 88, 0, 0, - 55, - 54, - 52, - 49, - 76, - 77, - 39, + 62, + 61, + 59, + 56, + 83, + 84, 0, + 46, 0, 0, - 114, - 102, - 111, - 87, 0, - 134, + 121, + 109, + 118, + 94, 0, - 65, + 141, 0, + 72, 0, - 116, - 118, - 119, 0, - 53, + 123, + 125, + 126, + 0, + 60, + 57, 50, - 43, - 47, 0, + 54, 0, - 141, - 142, - 144, 0, - 145, - 64, - 68, + 148, + 149, + 151, 0, - 56, + 152, + 71, + 75, 0, - 42, - 35, - 112, - 84, + 63, 0, + 49, 0, - 83, - 66, - 51, - 41, + 35, + 119, + 91, 0, - 138, - 135, - 136, + 0, + 90, + 73, + 58, + 48, + 0, + 0, + 145, + 142, + 143, + 153, + 0, + 36, + 0, + 147, 146, 0, - 140, - 139, 0, - 113, - 137}; + 120, + 144, + 0, + 42, + 43, + 44, + 0, + 0, + 0, + 0, + 39, + 0, + 40, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 41}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-145, - -145, - 242, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -145, - -113, - -145, - -145, - -145, - -145, - 53, - 86, - 19, - -145, - -145, - 42, - 41, - -95, +static const yytype_int16 yypgoto[] = {-185, + -185, + 270, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -185, + -116, + -185, + -185, + -185, + -185, + 77, + 110, + 45, + -185, + -185, + 79, + 68, -97, - 59, - -145, - -145, - -145, - 105, - -46, - -145, + -99, + 82, + -185, + -185, + -185, + 129, + -47, + -185, -4, - -54, - 209, - -145, - -145, - -145, - -88, - 91, - 13, - -116, - -144, - 107, - -145, - 8, - -145, - 39, - -145, - -145, - -145, - -145, - -145}; + -55, + 240, + -185, + -185, + -185, + -90, + 111, + 33, + -119, + -184, + 145, + -185, + 31, + -185, + 65, + -185, + -185, + -185, + -185, + -185}; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = {0, @@ -1882,292 +1989,301 @@ static const yytype_int16 yydefgoto[] = {0, 28, 29, 30, - 45, - 140, + 46, + 286, + 269, + 281, + 144, 31, 32, 33, 34, - 178, - 134, - 206, - 176, + 182, + 137, + 211, + 180, 35, - 150, - 189, - 190, - 57, - 102, + 154, + 194, + 195, + 58, + 104, 36, 37, - 128, - 129, + 131, + 132, 38, 39, - 58, 59, - 146, 60, + 150, 61, 62, - 213, - 121, - 214, - 126, - 163, - 164, - 238, - 256, - 257, - 187, + 63, 219, - 250, + 124, + 220, + 129, + 167, + 168, + 245, + 265, + 266, + 192, + 225, + 258, 40, 41, - 74}; + 75}; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = {63, - 86, - 132, - 82, - 131, - 147, - 120, - 122, - 87, - 87, - 148, - 100, - 167, - 49, - 87, - 64, - 136, - 123, - 166, - 42, - 192, +static const yytype_int16 yytable[] = {64, + 88, + 135, 84, - 46, - 67, - 47, + 134, + 151, + 123, + 125, + 89, + 89, + 152, 197, + 171, + 47, + 89, + 48, + 271, + 102, + 231, + 232, + 42, + 86, + 139, + 202, + 203, + 126, + 114, + 65, + 106, + 272, + 115, + 68, + 263, 198, + 69, + 83, + 117, + 118, + 119, + 120, + 243, + 87, + 170, + 43, + 83, + 44, + 85, + 127, + 107, 103, + 70, 50, - 81, - 65, 66, - 68, - 260, + 67, + 135, + 250, 254, - 114, - 115, - 116, - 117, - 124, - 125, - 85, - 193, - 101, - 43, + 140, + 71, + 142, + 49, + 93, + 94, + 149, + 128, + 50, + 51, + 45, 83, - 261, - 104, + 73, + 216, + 202, + 203, + 166, + 227, + 228, + 155, + 74, + 199, + 110, + 51, + 77, + 113, + 76, + 90, + 90, 91, 92, - 69, - 111, - 132, - 225, - 226, - 112, - 137, - 138, - 51, - 52, - 53, - 54, - 145, - 55, - 56, - 151, - 44, - 72, - 210, - 48, - 70, - 162, - 168, - 169, - 236, - 88, - 88, - 107, - 194, - 202, - 110, - 88, - 243, - 89, - 90, - 91, - 92, - 152, - 73, - 246, - 180, - 75, - 203, - 153, - 204, - 81, - 205, - 215, - 234, - 232, - 76, - 89, - 90, - 91, - 92, - 50, - 89, + 93, + 94, 90, + 96, + 184, 91, 92, - 199, - 200, - 197, - 198, - 144, - 221, - 222, - 154, - 155, + 93, + 94, + 78, 156, + 237, + 221, + 241, + 239, + 79, 157, - 158, - 159, - 160, - 161, - 132, - 132, - 240, - 77, - 89, - 90, - 91, - 92, - 251, - 222, - 51, 52, - 203, + 53, 54, + 55, + 80, + 56, + 57, + 81, 204, - 130, 205, - 224, - 162, - 162, - 170, - 81, - 171, - 172, - 173, - 174, - 175, - 78, - 49, - 79, - 80, - 94, - 95, - 96, + 51, + 82, + 148, 97, - 99, - 108, + 52, + 53, + 54, + 55, 98, - 151, + 56, + 57, + 278, + 279, + 280, + 135, + 135, + 247, + 208, + 99, + 209, + 100, + 210, + 158, + 159, + 160, + 161, 162, - 231, + 163, + 164, + 165, + 101, + 230, + 166, + 166, + 91, + 92, + 93, + 94, 105, + 52, + 53, 109, - 50, - 106, - 118, - 125, - 113, - 119, - 127, + 55, + 108, 133, + 155, + 207, + 174, + 111, + 175, + 176, + 177, + 178, + 179, + 166, + 238, + 172, + 173, + 112, + 208, + 50, + 209, + 116, + 210, + 259, + 228, + 121, + 156, + 287, + 288, + 166, + 122, + 128, + 157, + 251, + 51, + 135, + 130, + 291, + 136, 135, - 81, - 49, - 162, 141, + 295, + 138, + 83, 143, - 149, - 139, - 244, - 152, - 165, - 142, - 177, - 181, - 182, + 264, + 145, + 261, + 91, + 92, + 93, + 94, + 146, + 147, 153, - 179, - 50, - 255, + 181, + 169, 183, - 184, - 253, - 51, - 52, - 53, - 54, 185, - 55, - 56, 186, - 188, - 195, - 255, + 187, 191, - 208, - 209, - 211, - 235, - 212, - 154, - 155, - 156, - 157, + 264, + 242, + 188, 158, 159, 160, 161, - 51, + 162, + 163, + 164, + 165, 52, 53, 54, - 217, 55, + 189, 56, + 57, 1, 2, - 220, - 218, - 223, - 227, - 228, - 237, - 101, + 190, + 193, + 200, + 196, + 213, + 214, + 215, 3, 4, 5, @@ -2176,278 +2292,311 @@ static const yytype_int16 yytable[] = {63, 8, 9, 10, - 197, - 233, - 242, + 217, + 218, + 224, 11, 12, 13, - 245, - 248, - 249, - 258, - 262, - 259, - 71, + 223, 229, + 233, + 226, + 234, + 103, + 240, + 244, + 202, + 249, + 256, 252, - 239, - 207, - 241, 14, 15, - 230, - 93, - 196, - 264, - 201, - 263, - 247, + 253, + 257, + 267, + 268, + 273, + 270, + 277, 16, + 282, + 262, + 292, + 17, + 274, + 296, + 72, + 283, + 235, + 289, + 212, + 284, + 285, + 260, + 236, + 293, + 248, + 290, + 206, + 95, + 222, + 294, + 275, + 276, + 246, + 255, + 0, 0, - 216, 0, - 17}; + 0, + 201}; static const yytype_int16 yycheck[] = {4, - 55, - 99, - 49, - 99, - 121, - 94, - 95, - 4, + 56, + 101, + 50, + 101, + 124, + 96, + 97, 4, - 123, - 24, - 128, - 24, 4, - 71, + 126, + 9, + 131, + 13, 4, + 15, + 5, 24, - 26, + 202, + 203, 13, - 9, 24, - 13, - 45, - 15, + 4, 49, 50, + 24, + 80, + 80, 4, - 39, - 17, - 14, - 15, - 47, - 5, + 18, + 84, + 45, 58, - 89, - 90, + 31, + 47, + 17, 91, 92, - 46, - 48, + 93, + 94, + 224, 44, - 31, - 56, + 26, + 36, + 17, 38, - 49, - 18, + 50, + 46, 24, - 75, - 76, - 71, - 71, - 149, - 197, - 198, - 75, - 102, - 103, - 69, - 70, - 71, - 72, - 58, - 74, - 75, - 9, - 60, - 0, - 181, - 60, - 71, - 125, - 69, - 70, - 218, - 71, - 71, - 81, - 67, + 56, + 80, 24, - 84, - 71, + 14, + 15, + 153, 4, - 73, - 74, - 75, - 76, - 31, - 3, - 233, - 136, - 71, - 37, - 37, + 240, + 104, + 80, + 106, + 60, + 84, + 85, + 58, + 48, + 24, 39, + 60, 17, - 41, - 185, - 214, - 212, - 71, - 73, - 74, - 75, - 76, - 39, - 73, - 74, - 75, - 76, - 164, - 165, + 0, + 186, 49, 50, - 118, + 128, 25, 26, - 61, - 62, - 63, - 64, - 65, - 66, + 9, + 3, + 76, + 83, + 39, + 15, + 86, + 80, + 80, + 80, + 82, + 83, + 84, + 85, + 80, + 47, + 139, + 82, + 83, + 84, + 85, + 80, + 31, + 215, + 190, + 220, + 218, + 15, + 37, + 78, + 79, + 80, + 81, + 80, + 83, + 84, + 80, + 168, + 169, + 39, + 80, + 121, + 47, + 78, + 79, + 80, + 81, + 80, + 83, + 84, 67, 68, - 222, - 223, - 222, - 15, + 69, + 228, + 229, + 228, + 37, + 80, + 39, + 51, + 41, + 70, + 71, + 72, 73, 74, 75, 76, - 25, - 26, - 69, + 77, 70, - 37, - 72, - 39, - 74, - 41, - 196, - 197, - 198, + 201, + 202, + 203, + 82, + 83, + 84, + 85, + 80, + 78, + 79, + 52, + 81, + 80, + 83, + 9, + 24, 30, - 17, + 25, 32, 33, 34, 35, 36, - 71, + 224, + 217, + 78, + 79, + 25, + 37, 24, - 71, - 71, - 47, - 47, - 71, - 71, - 61, + 39, + 80, + 41, 25, - 51, - 9, - 218, - 211, - 71, + 26, + 26, + 31, 25, - 39, - 52, 26, + 240, + 80, 48, - 71, - 71, - 71, - 71, + 37, + 236, + 39, + 290, + 80, + 290, + 80, + 294, + 52, + 294, 57, 17, - 24, - 233, + 80, + 256, 52, + 250, + 82, + 83, + 84, + 85, + 80, 25, 24, - 71, - 230, - 31, - 61, - 71, 26, + 70, + 70, + 80, 26, 25, - 37, - 61, - 39, - 248, - 71, - 59, - 243, - 69, + 10, + 273, + 223, + 80, 70, 71, 72, - 26, + 73, 74, 75, - 10, + 76, + 77, + 78, + 79, + 80, + 81, + 59, + 83, + 84, + 7, + 8, + 26, 25, 37, - 262, 26, 25, - 71, - 4, - 217, - 24, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 6, - 74, - 75, - 7, - 8, - 46, - 11, + 80, 24, - 69, - 39, - 12, - 56, 16, 17, 18, @@ -2456,38 +2605,65 @@ static const yytype_int16 yycheck[] = {4, 21, 22, 23, - 49, - 52, - 25, + 4, + 24, + 11, 27, 28, 29, + 6, + 24, + 78, + 46, + 39, + 56, + 52, + 12, + 49, 25, 6, - 40, - 69, - 26, - 59, - 17, - 207, - 242, - 220, - 177, - 223, + 25, 42, 43, - 208, + 25, + 40, + 78, + 24, + 26, 59, - 162, - 262, - 166, - 259, - 234, + 70, 51, + 26, + 61, + 26, + 55, + 62, + 25, + 17, + 63, + 212, + 64, + 181, + 70, + 66, + 249, + 213, + 65, + 229, + 70, + 170, + 60, + 190, + 70, + 270, + 273, + 226, + 241, + -1, -1, - 185, -1, - 55}; + -1, + 166}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ @@ -2509,405 +2685,444 @@ static const yytype_uint8 yystos[] = {0, 43, 51, 55, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, 88, 89, 90, 91, + 92, + 93, 94, 95, 96, 97, - 102, + 98, + 99, + 100, + 106, + 107, 108, 109, - 112, - 113, - 132, - 133, + 114, + 120, + 121, + 124, + 125, + 144, + 145, 13, + 36, 38, 60, - 92, + 101, 13, 15, 60, 24, 39, - 69, - 70, - 71, - 72, - 74, - 75, - 106, - 114, - 115, - 117, + 78, + 79, + 80, + 81, + 83, + 84, 118, - 119, - 114, - 71, + 126, + 127, + 129, + 130, + 131, + 126, + 80, 14, 15, 45, 47, - 71, - 71, 80, + 80, + 89, 0, 3, - 134, - 71, - 71, + 146, + 80, 15, - 71, - 71, - 71, + 80, + 15, + 80, + 80, + 80, 17, - 112, - 114, + 124, + 126, 24, 44, - 115, + 127, 4, - 71, - 73, - 74, - 75, - 76, - 116, + 80, + 82, + 83, + 84, + 85, + 128, 47, 47, - 71, - 71, + 80, + 80, 51, - 61, + 70, 24, 56, - 107, + 119, + 80, 4, 24, - 71, + 80, 52, - 114, + 126, 25, 25, - 114, - 71, - 75, - 71, - 115, - 115, - 115, - 115, + 126, + 80, + 84, + 80, + 127, + 127, + 127, + 127, 26, - 71, - 120, - 121, - 120, + 80, + 132, + 133, + 132, 24, 46, 48, + 135, + 80, + 122, 123, - 71, - 110, + 83, + 117, + 118, + 80, 111, - 74, - 105, - 106, - 71, - 99, 57, 4, - 112, - 112, - 71, - 93, + 124, 52, - 71, + 124, + 80, + 105, + 52, + 80, 25, - 114, + 126, 58, - 116, - 123, - 93, + 128, + 135, + 105, 24, - 103, + 115, 9, 31, 37, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 115, - 124, - 125, - 61, - 26, - 123, - 69, 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 127, + 136, + 137, + 70, + 26, + 135, + 78, + 79, 30, 32, 33, 34, 35, 36, - 101, + 113, 26, - 98, - 61, - 112, + 110, + 70, + 124, + 80, 26, 25, - 71, + 80, 59, 26, 10, - 129, + 141, 25, - 104, - 105, + 116, + 117, 26, 9, 31, - 67, + 76, 37, - 125, + 137, 49, 50, - 115, - 115, - 111, + 127, + 127, + 123, 24, 37, 39, 41, - 100, - 99, + 112, + 111, 25, - 71, - 93, + 80, + 24, + 105, 4, 24, - 120, - 122, - 120, - 121, + 132, + 134, + 132, + 133, 6, 11, - 130, + 142, 46, 25, 26, 24, - 115, - 124, - 124, - 69, + 127, + 136, + 136, + 78, 39, - 98, - 107, - 112, - 93, - 52, - 123, - 114, + 110, + 119, + 105, 124, - 12, - 126, - 103, 105, - 104, + 52, + 135, + 126, + 136, + 12, + 138, + 115, + 117, + 116, 25, 4, - 112, - 25, 124, - 129, + 25, + 25, + 136, + 141, 6, 40, - 131, + 143, 25, - 100, 112, + 124, + 61, 58, - 115, 127, - 128, - 69, + 139, + 140, + 78, + 24, + 103, 59, 5, 18, 26, - 122, - 127}; - -/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -static const yytype_uint8 yyr1[] = {0, - 78, - 79, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 80, - 81, - 82, - 83, - 84, - 85, - 86, + 62, + 134, + 139, + 70, + 67, + 68, + 69, + 104, + 26, + 63, + 70, + 66, + 102, + 25, + 26, + 64, + 70, + 117, + 26, + 65, + 70, + 117, + 25}; + +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ +static const yytype_uint8 yyr1[] = {0, 87, 88, 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, + 89, 90, 91, 92, - 92, - 93, 93, 94, 95, - 95, - 95, - 95, - 95, - 96, 96, 97, 98, - 98, 99, - 99, - 100, 100, 100, - 100, - 101, - 101, - 101, 101, 101, - 101, - 102, 102, 103, 103, 104, 104, - 105, + 104, 105, 105, 106, - 106, - 106, - 106, + 107, + 107, + 107, 107, 107, 108, + 108, 109, 110, 110, 111, + 111, + 112, + 112, 112, 112, 113, 113, + 113, + 113, + 113, + 113, 114, 114, - 114, - 115, 115, 115, - 115, - 115, - 115, - 115, - 115, - 115, - 115, - 115, - 115, - 116, 116, 116, 117, + 117, + 117, + 118, + 118, + 118, 118, 119, 119, 120, 121, - 121, 122, 122, 123, - 123, - 124, 124, 124, - 124, - 125, - 125, - 125, - 125, - 125, - 125, - 125, - 125, - 125, - 125, - 125, - 125, 125, 125, 126, 126, + 126, + 127, + 127, + 127, + 127, + 127, + 127, + 127, + 127, + 127, + 127, 127, 127, 128, 128, 128, 129, - 129, - 130, 130, 131, 131, 132, 133, - 134}; + 133, + 134, + 134, + 135, + 135, + 136, + 136, + 136, + 136, + 137, + 137, + 137, + 137, + 137, + 137, + 137, + 137, + 137, + 137, + 137, + 137, + 137, + 137, + 138, + 138, + 139, + 139, + 140, + 140, + 140, + 141, + 141, + 142, + 142, + 143, + 143, + 144, + 145, + 146}; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = {0, @@ -2946,9 +3161,16 @@ static const yytype_int8 yyr2[] = {0, 2, 4, 9, + 11, 1, 0, 1, + 9, + 17, + 1, + 1, + 1, + 1, 3, 5, 10, @@ -3842,104 +4064,104 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) YY_REDUCE_PRINT(yyn); switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 267 "yacc_sql.y" +#line 282 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1879 "yacc_sql.cpp" +#line 1914 "yacc_sql.cpp" break; case 25: /* exit_stmt: EXIT */ -#line 300 "yacc_sql.y" +#line 315 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1888 "yacc_sql.cpp" +#line 1923 "yacc_sql.cpp" break; case 26: /* help_stmt: HELP */ -#line 306 "yacc_sql.y" +#line 321 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1896 "yacc_sql.cpp" +#line 1931 "yacc_sql.cpp" break; case 27: /* sync_stmt: SYNC */ -#line 311 "yacc_sql.y" +#line 326 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1904 "yacc_sql.cpp" +#line 1939 "yacc_sql.cpp" break; case 28: /* begin_stmt: TRX_BEGIN */ -#line 317 "yacc_sql.y" +#line 332 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1912 "yacc_sql.cpp" +#line 1947 "yacc_sql.cpp" break; case 29: /* commit_stmt: TRX_COMMIT */ -#line 323 "yacc_sql.y" +#line 338 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1920 "yacc_sql.cpp" +#line 1955 "yacc_sql.cpp" break; case 30: /* rollback_stmt: TRX_ROLLBACK */ -#line 329 "yacc_sql.y" +#line 344 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1928 "yacc_sql.cpp" +#line 1963 "yacc_sql.cpp" break; case 31: /* drop_table_stmt: DROP TABLE ID */ -#line 335 "yacc_sql.y" +#line 350 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1938 "yacc_sql.cpp" +#line 1973 "yacc_sql.cpp" break; case 32: /* show_tables_stmt: SHOW TABLES */ -#line 342 "yacc_sql.y" +#line 357 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1946 "yacc_sql.cpp" +#line 1981 "yacc_sql.cpp" break; case 33: /* desc_table_stmt: DESC ID */ -#line 348 "yacc_sql.y" +#line 363 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1956 "yacc_sql.cpp" +#line 1991 "yacc_sql.cpp" break; case 34: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 357 "yacc_sql.y" +#line 372 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1967 "yacc_sql.cpp" +#line 2002 "yacc_sql.cpp" break; case 35: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 367 "yacc_sql.y" +#line 382 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -3951,48 +4173,120 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1983 "yacc_sql.cpp" +#line 2018 "yacc_sql.cpp" + break; + + case 36: /* create_index_stmt: CREATE VECTOR_T INDEX ID ON ID LBRACE attr_list RBRACE WITH vector_index_config */ +#line 394 "yacc_sql.y" + { + (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); + CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; + create_index.unique = false; // 向量索引不支持 + create_index.index_name = (yyvsp[-7].string); + create_index.relation_name = (yyvsp[-5].string); + create_index.attribute_name.swap(*(yyvsp[-3].index_attr_list)); // $8 是 vector 类型 + create_index.vector_index_config = std::move(*(yyvsp[0].vector_index_config)); + delete (yyvsp[-3].index_attr_list); // 释放指针 + free((yyvsp[-7].string)); + free((yyvsp[-5].string)); + } +#line 2035 "yacc_sql.cpp" break; - case 36: /* opt_unique: UNIQUE */ -#line 381 "yacc_sql.y" + case 37: /* opt_unique: UNIQUE */ +#line 409 "yacc_sql.y" { (yyval.unique) = true; } -#line 1989 "yacc_sql.cpp" +#line 2041 "yacc_sql.cpp" break; - case 37: /* opt_unique: %empty */ -#line 382 "yacc_sql.y" + case 38: /* opt_unique: %empty */ +#line 410 "yacc_sql.y" { (yyval.unique) = false; } -#line 1995 "yacc_sql.cpp" +#line 2047 "yacc_sql.cpp" + break; + + case 39: /* index_type: IVFFLAT */ +#line 415 "yacc_sql.y" + { + (yyval.index_type) = IndexType::VectorIVFFlatIndex; + } +#line 2055 "yacc_sql.cpp" + break; + + case 40: /* vector_index_config: LBRACE DISTANCE EQ vector_distance_type COMMA TYPE EQ index_type RBRACE */ +#line 422 "yacc_sql.y" + { + (yyval.vector_index_config) = new VectorIndexConfig; + (yyval.vector_index_config)->distance_type = (yyvsp[-5].vector_distance_type); + (yyval.vector_index_config)->index_type = (yyvsp[-1].index_type); + } +#line 2065 "yacc_sql.cpp" + break; + + case 41: /* vector_index_config: LBRACE DISTANCE EQ vector_distance_type COMMA TYPE EQ index_type COMMA LISTS EQ + value COMMA PROBES EQ value RBRACE */ +#line 428 "yacc_sql.y" + { + (yyval.vector_index_config) = new VectorIndexConfig; + (yyval.vector_index_config)->distance_type = (yyvsp[-13].vector_distance_type); + (yyval.vector_index_config)->index_type = (yyvsp[-9].index_type); + (yyval.vector_index_config)->lists = std::move(*(yyvsp[-5].value)); + (yyval.vector_index_config)->probes = std::move(*(yyvsp[-1].value)); + } +#line 2077 "yacc_sql.cpp" + break; + + case 42: /* vector_distance_type: L2_DISTANCE */ +#line 439 "yacc_sql.y" + { + (yyval.vector_distance_type) = VectorDistanceType::L2; + } +#line 2085 "yacc_sql.cpp" + break; + + case 43: /* vector_distance_type: COSINE_DISTANCE */ +#line 443 "yacc_sql.y" + { + (yyval.vector_distance_type) = VectorDistanceType::COSINE; + } +#line 2093 "yacc_sql.cpp" + break; + + case 44: /* vector_distance_type: INNER_PRODUCT */ +#line 447 "yacc_sql.y" + { + (yyval.vector_distance_type) = VectorDistanceType::INNER; + } +#line 2101 "yacc_sql.cpp" break; - case 38: /* attr_list: ID */ -#line 387 "yacc_sql.y" + case 45: /* attr_list: ID */ +#line 454 "yacc_sql.y" { (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 2005 "yacc_sql.cpp" +#line 2111 "yacc_sql.cpp" break; - case 39: /* attr_list: ID COMMA attr_list */ -#line 393 "yacc_sql.y" + case 46: /* attr_list: ID COMMA attr_list */ +#line 460 "yacc_sql.y" { (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector (yyval.index_attr_list) ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2015 "yacc_sql.cpp" +#line 2121 "yacc_sql.cpp" break; - case 40: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 402 "yacc_sql.y" + case 47: /* drop_index_stmt: DROP INDEX ID ON ID */ +#line 469 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -4000,56 +4294,56 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2027 "yacc_sql.cpp" +#line 2133 "yacc_sql.cpp" break; - case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ -#line 412 "yacc_sql.y" + case 48: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ +#line 479 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node( (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2035 "yacc_sql.cpp" +#line 2141 "yacc_sql.cpp" break; - case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ -#line 416 "yacc_sql.y" + case 49: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ +#line 483 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node( (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2043 "yacc_sql.cpp" +#line 2149 "yacc_sql.cpp" break; - case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 420 "yacc_sql.y" + case 50: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ +#line 487 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node( (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2051 "yacc_sql.cpp" +#line 2157 "yacc_sql.cpp" break; - case 44: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ -#line 424 "yacc_sql.y" + case 51: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ +#line 491 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2059 "yacc_sql.cpp" +#line 2165 "yacc_sql.cpp" break; - case 45: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ -#line 428 "yacc_sql.y" + case 52: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ +#line 495 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2067 "yacc_sql.cpp" +#line 2173 "yacc_sql.cpp" break; - case 46: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ -#line 435 "yacc_sql.y" + case 53: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ +#line 502 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; @@ -4057,11 +4351,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } -#line 2079 "yacc_sql.cpp" +#line 2185 "yacc_sql.cpp" break; - case 47: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ -#line 443 "yacc_sql.y" + case 54: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ +#line 510 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; @@ -4070,29 +4364,29 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-5].string)); } -#line 2092 "yacc_sql.cpp" +#line 2198 "yacc_sql.cpp" break; - case 48: /* drop_view_stmt: DROP VIEW ID */ -#line 455 "yacc_sql.y" + case 55: /* drop_view_stmt: DROP VIEW ID */ +#line 522 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2102 "yacc_sql.cpp" +#line 2208 "yacc_sql.cpp" break; - case 49: /* attr_def_list: %empty */ -#line 464 "yacc_sql.y" + case 56: /* attr_def_list: %empty */ +#line 531 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2110 "yacc_sql.cpp" +#line 2216 "yacc_sql.cpp" break; - case 50: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 468 "yacc_sql.y" + case 57: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 535 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -4102,11 +4396,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2124 "yacc_sql.cpp" +#line 2230 "yacc_sql.cpp" break; - case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 481 "yacc_sql.y" + case 58: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ +#line 548 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->name = (yyvsp[-5].string); @@ -4124,11 +4418,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 2146 "yacc_sql.cpp" +#line 2252 "yacc_sql.cpp" break; - case 52: /* attr_def: ID type nullable_constraint */ -#line 499 "yacc_sql.y" + case 59: /* attr_def: ID type nullable_constraint */ +#line 566 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -4154,91 +4448,91 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2176 "yacc_sql.cpp" +#line 2282 "yacc_sql.cpp" break; - case 53: /* nullable_constraint: NOT NULL_T */ -#line 528 "yacc_sql.y" + case 60: /* nullable_constraint: NOT NULL_T */ +#line 595 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2184 "yacc_sql.cpp" +#line 2290 "yacc_sql.cpp" break; - case 54: /* nullable_constraint: NULLABLE */ -#line 532 "yacc_sql.y" + case 61: /* nullable_constraint: NULLABLE */ +#line 599 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2192 "yacc_sql.cpp" +#line 2298 "yacc_sql.cpp" break; - case 55: /* nullable_constraint: NULL_T */ -#line 536 "yacc_sql.y" + case 62: /* nullable_constraint: NULL_T */ +#line 603 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2200 "yacc_sql.cpp" +#line 2306 "yacc_sql.cpp" break; - case 56: /* nullable_constraint: %empty */ -#line 540 "yacc_sql.y" + case 63: /* nullable_constraint: %empty */ +#line 607 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2208 "yacc_sql.cpp" +#line 2314 "yacc_sql.cpp" break; - case 57: /* type: INT_T */ -#line 546 "yacc_sql.y" + case 64: /* type: INT_T */ +#line 613 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2214 "yacc_sql.cpp" +#line 2320 "yacc_sql.cpp" break; - case 58: /* type: STRING_T */ -#line 547 "yacc_sql.y" + case 65: /* type: STRING_T */ +#line 614 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2220 "yacc_sql.cpp" +#line 2326 "yacc_sql.cpp" break; - case 59: /* type: FLOAT_T */ -#line 548 "yacc_sql.y" + case 66: /* type: FLOAT_T */ +#line 615 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2226 "yacc_sql.cpp" +#line 2332 "yacc_sql.cpp" break; - case 60: /* type: DATE_T */ -#line 549 "yacc_sql.y" + case 67: /* type: DATE_T */ +#line 616 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2232 "yacc_sql.cpp" +#line 2338 "yacc_sql.cpp" break; - case 61: /* type: TEXT_T */ -#line 550 "yacc_sql.y" + case 68: /* type: TEXT_T */ +#line 617 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2238 "yacc_sql.cpp" +#line 2344 "yacc_sql.cpp" break; - case 62: /* type: VECTOR_T */ -#line 551 "yacc_sql.y" + case 69: /* type: VECTOR_T */ +#line 618 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::VECTORS); } -#line 2244 "yacc_sql.cpp" +#line 2350 "yacc_sql.cpp" break; - case 63: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 556 "yacc_sql.y" + case 70: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 623 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -4248,11 +4542,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2258 "yacc_sql.cpp" +#line 2364 "yacc_sql.cpp" break; - case 64: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ -#line 566 "yacc_sql.y" + case 71: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ +#line 633 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -4263,128 +4557,128 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 2273 "yacc_sql.cpp" +#line 2379 "yacc_sql.cpp" break; - case 65: /* values_list: LBRACE value_list RBRACE */ -#line 580 "yacc_sql.y" + case 72: /* values_list: LBRACE value_list RBRACE */ +#line 647 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2283 "yacc_sql.cpp" +#line 2389 "yacc_sql.cpp" break; - case 66: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 586 "yacc_sql.y" + case 73: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 653 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2292 "yacc_sql.cpp" +#line 2398 "yacc_sql.cpp" break; - case 67: /* value_list: value */ -#line 593 "yacc_sql.y" + case 74: /* value_list: value */ +#line 660 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2302 "yacc_sql.cpp" +#line 2408 "yacc_sql.cpp" break; - case 68: /* value_list: value_list COMMA value */ -#line 599 "yacc_sql.y" + case 75: /* value_list: value_list COMMA value */ +#line 666 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2311 "yacc_sql.cpp" +#line 2417 "yacc_sql.cpp" break; - case 69: /* value: nonnegative_value */ -#line 606 "yacc_sql.y" + case 76: /* value: nonnegative_value */ +#line 673 "yacc_sql.y" { (yyval.value) = (yyvsp[0].value); } -#line 2319 "yacc_sql.cpp" +#line 2425 "yacc_sql.cpp" break; - case 70: /* value: '-' NUMBER */ -#line 609 "yacc_sql.y" + case 77: /* value: '-' NUMBER */ +#line 676 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2328 "yacc_sql.cpp" +#line 2434 "yacc_sql.cpp" break; - case 71: /* value: '-' FLOAT */ -#line 613 "yacc_sql.y" + case 78: /* value: '-' FLOAT */ +#line 680 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2337 "yacc_sql.cpp" +#line 2443 "yacc_sql.cpp" break; - case 72: /* nonnegative_value: NUMBER */ -#line 620 "yacc_sql.y" + case 79: /* nonnegative_value: NUMBER */ +#line 687 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2346 "yacc_sql.cpp" +#line 2452 "yacc_sql.cpp" break; - case 73: /* nonnegative_value: FLOAT */ -#line 624 "yacc_sql.y" + case 80: /* nonnegative_value: FLOAT */ +#line 691 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2355 "yacc_sql.cpp" +#line 2461 "yacc_sql.cpp" break; - case 74: /* nonnegative_value: SSS */ -#line 628 "yacc_sql.y" + case 81: /* nonnegative_value: SSS */ +#line 695 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2366 "yacc_sql.cpp" +#line 2472 "yacc_sql.cpp" break; - case 75: /* nonnegative_value: NULL_T */ -#line 634 "yacc_sql.y" + case 82: /* nonnegative_value: NULL_T */ +#line 701 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2374 "yacc_sql.cpp" +#line 2480 "yacc_sql.cpp" break; - case 76: /* storage_format: %empty */ -#line 641 "yacc_sql.y" + case 83: /* storage_format: %empty */ +#line 708 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2382 "yacc_sql.cpp" +#line 2488 "yacc_sql.cpp" break; - case 77: /* storage_format: STORAGE FORMAT EQ ID */ -#line 645 "yacc_sql.y" + case 84: /* storage_format: STORAGE FORMAT EQ ID */ +#line 712 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2390 "yacc_sql.cpp" +#line 2496 "yacc_sql.cpp" break; - case 78: /* delete_stmt: DELETE FROM ID where */ -#line 652 "yacc_sql.y" + case 85: /* delete_stmt: DELETE FROM ID where */ +#line 719 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -4393,11 +4687,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2403 "yacc_sql.cpp" +#line 2509 "yacc_sql.cpp" break; - case 79: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 664 "yacc_sql.y" + case 86: /* update_stmt: UPDATE ID SET set_clauses where */ +#line 731 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -4408,39 +4702,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2418 "yacc_sql.cpp" +#line 2524 "yacc_sql.cpp" break; - case 80: /* set_clauses: setClause */ -#line 678 "yacc_sql.y" + case 87: /* set_clauses: setClause */ +#line 745 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2427 "yacc_sql.cpp" +#line 2533 "yacc_sql.cpp" break; - case 81: /* set_clauses: set_clauses COMMA setClause */ -#line 683 "yacc_sql.y" + case 88: /* set_clauses: set_clauses COMMA setClause */ +#line 750 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2435 "yacc_sql.cpp" +#line 2541 "yacc_sql.cpp" break; - case 82: /* setClause: ID EQ expression */ -#line 690 "yacc_sql.y" + case 89: /* setClause: ID EQ expression */ +#line 757 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2446 "yacc_sql.cpp" +#line 2552 "yacc_sql.cpp" break; - case 83: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ -#line 700 "yacc_sql.y" + case 90: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ +#line 767 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4478,11 +4772,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].limited_info); } } -#line 2488 "yacc_sql.cpp" +#line 2594 "yacc_sql.cpp" break; - case 84: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 738 "yacc_sql.y" + case 91: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ +#line 805 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4514,39 +4808,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2522 "yacc_sql.cpp" +#line 2628 "yacc_sql.cpp" break; - case 85: /* calc_stmt: CALC expression_list */ -#line 771 "yacc_sql.y" + case 92: /* calc_stmt: CALC expression_list */ +#line 838 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2532 "yacc_sql.cpp" +#line 2638 "yacc_sql.cpp" break; - case 86: /* calc_stmt: SELECT expression_list */ -#line 777 "yacc_sql.y" + case 93: /* calc_stmt: SELECT expression_list */ +#line 844 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2542 "yacc_sql.cpp" +#line 2648 "yacc_sql.cpp" break; - case 87: /* expression_list: %empty */ -#line 785 "yacc_sql.y" + case 94: /* expression_list: %empty */ +#line 852 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2550 "yacc_sql.cpp" +#line 2656 "yacc_sql.cpp" break; - case 88: /* expression_list: expression alias */ -#line 789 "yacc_sql.y" + case 95: /* expression_list: expression alias */ +#line 856 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4555,11 +4849,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2563 "yacc_sql.cpp" +#line 2669 "yacc_sql.cpp" break; - case 89: /* expression_list: expression alias COMMA expression_list */ -#line 798 "yacc_sql.y" + case 96: /* expression_list: expression alias COMMA expression_list */ +#line 865 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4572,47 +4866,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2580 "yacc_sql.cpp" +#line 2686 "yacc_sql.cpp" break; - case 90: /* expression: expression '+' expression */ -#line 813 "yacc_sql.y" + case 97: /* expression: expression '+' expression */ +#line 880 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2588 "yacc_sql.cpp" +#line 2694 "yacc_sql.cpp" break; - case 91: /* expression: expression '-' expression */ -#line 816 "yacc_sql.y" + case 98: /* expression: expression '-' expression */ +#line 883 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2596 "yacc_sql.cpp" +#line 2702 "yacc_sql.cpp" break; - case 92: /* expression: expression '*' expression */ -#line 819 "yacc_sql.y" + case 99: /* expression: expression '*' expression */ +#line 886 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2604 "yacc_sql.cpp" +#line 2710 "yacc_sql.cpp" break; - case 93: /* expression: expression '/' expression */ -#line 822 "yacc_sql.y" + case 100: /* expression: expression '/' expression */ +#line 889 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2612 "yacc_sql.cpp" +#line 2718 "yacc_sql.cpp" break; - case 94: /* expression: LBRACE expression_list RBRACE */ -#line 825 "yacc_sql.y" + case 101: /* expression: LBRACE expression_list RBRACE */ +#line 892 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -4621,123 +4915,123 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2625 "yacc_sql.cpp" +#line 2731 "yacc_sql.cpp" break; - case 95: /* expression: '-' expression */ -#line 833 "yacc_sql.y" + case 102: /* expression: '-' expression */ +#line 900 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2633 "yacc_sql.cpp" +#line 2739 "yacc_sql.cpp" break; - case 96: /* expression: nonnegative_value */ -#line 836 "yacc_sql.y" + case 103: /* expression: nonnegative_value */ +#line 903 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2643 "yacc_sql.cpp" +#line 2749 "yacc_sql.cpp" break; - case 97: /* expression: rel_attr */ -#line 841 "yacc_sql.y" + case 104: /* expression: rel_attr */ +#line 908 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2654 "yacc_sql.cpp" +#line 2760 "yacc_sql.cpp" break; - case 98: /* expression: '*' */ -#line 847 "yacc_sql.y" + case 105: /* expression: '*' */ +#line 914 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2662 "yacc_sql.cpp" +#line 2768 "yacc_sql.cpp" break; - case 99: /* expression: ID DOT '*' */ -#line 850 "yacc_sql.y" + case 106: /* expression: ID DOT '*' */ +#line 917 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2670 "yacc_sql.cpp" +#line 2776 "yacc_sql.cpp" break; - case 100: /* expression: func_expr */ -#line 853 "yacc_sql.y" + case 107: /* expression: func_expr */ +#line 920 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2678 "yacc_sql.cpp" +#line 2784 "yacc_sql.cpp" break; - case 101: /* expression: sub_query_expr */ -#line 856 "yacc_sql.y" + case 108: /* expression: sub_query_expr */ +#line 923 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2686 "yacc_sql.cpp" +#line 2792 "yacc_sql.cpp" break; - case 102: /* alias: %empty */ -#line 863 "yacc_sql.y" + case 109: /* alias: %empty */ +#line 930 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2694 "yacc_sql.cpp" +#line 2800 "yacc_sql.cpp" break; - case 103: /* alias: ID */ -#line 866 "yacc_sql.y" + case 110: /* alias: ID */ +#line 933 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2702 "yacc_sql.cpp" +#line 2808 "yacc_sql.cpp" break; - case 104: /* alias: AS ID */ -#line 869 "yacc_sql.y" + case 111: /* alias: AS ID */ +#line 936 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2710 "yacc_sql.cpp" +#line 2816 "yacc_sql.cpp" break; - case 105: /* func_expr: ID LBRACE expression_list RBRACE */ -#line 875 "yacc_sql.y" + case 112: /* func_expr: ID LBRACE expression_list RBRACE */ +#line 942 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); } -#line 2718 "yacc_sql.cpp" +#line 2824 "yacc_sql.cpp" break; - case 106: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 882 "yacc_sql.y" + case 113: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 949 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2726 "yacc_sql.cpp" +#line 2832 "yacc_sql.cpp" break; - case 107: /* rel_attr: ID */ -#line 888 "yacc_sql.y" + case 114: /* rel_attr: ID */ +#line 955 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2736 "yacc_sql.cpp" +#line 2842 "yacc_sql.cpp" break; - case 108: /* rel_attr: ID DOT ID */ -#line 893 "yacc_sql.y" + case 115: /* rel_attr: ID DOT ID */ +#line 960 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -4745,19 +5039,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2748 "yacc_sql.cpp" +#line 2854 "yacc_sql.cpp" break; - case 109: /* relation: ID */ -#line 903 "yacc_sql.y" + case 116: /* relation: ID */ +#line 970 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2756 "yacc_sql.cpp" +#line 2862 "yacc_sql.cpp" break; - case 110: /* rel_list: relation alias */ -#line 909 "yacc_sql.y" + case 117: /* rel_list: relation alias */ +#line 976 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if (nullptr != (yyvsp[0].string)) { @@ -4768,11 +5062,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2771 "yacc_sql.cpp" +#line 2877 "yacc_sql.cpp" break; - case 111: /* rel_list: relation alias COMMA rel_list */ -#line 919 "yacc_sql.y" + case 118: /* rel_list: relation alias COMMA rel_list */ +#line 986 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -4788,22 +5082,22 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-3].string)); } -#line 2790 "yacc_sql.cpp" +#line 2896 "yacc_sql.cpp" break; - case 112: /* join_clauses: relation ON condition */ -#line 937 "yacc_sql.y" + case 119: /* join_clauses: relation ON condition */ +#line 1004 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2801 "yacc_sql.cpp" +#line 2907 "yacc_sql.cpp" break; - case 113: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 944 "yacc_sql.y" + case 120: /* join_clauses: relation ON condition INNER JOIN join_clauses */ +#line 1011 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -4812,299 +5106,299 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2813 "yacc_sql.cpp" +#line 2919 "yacc_sql.cpp" break; - case 114: /* where: %empty */ -#line 955 "yacc_sql.y" + case 121: /* where: %empty */ +#line 1022 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2821 "yacc_sql.cpp" +#line 2927 "yacc_sql.cpp" break; - case 115: /* where: WHERE condition */ -#line 958 "yacc_sql.y" + case 122: /* where: WHERE condition */ +#line 1025 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2829 "yacc_sql.cpp" +#line 2935 "yacc_sql.cpp" break; - case 116: /* condition: expression comp_op expression */ -#line 965 "yacc_sql.y" + case 123: /* condition: expression comp_op expression */ +#line 1032 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2837 "yacc_sql.cpp" +#line 2943 "yacc_sql.cpp" break; - case 117: /* condition: comp_op expression */ -#line 969 "yacc_sql.y" + case 124: /* condition: comp_op expression */ +#line 1036 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); } -#line 2848 "yacc_sql.cpp" +#line 2954 "yacc_sql.cpp" break; - case 118: /* condition: condition AND condition */ -#line 976 "yacc_sql.y" + case 125: /* condition: condition AND condition */ +#line 1043 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2856 "yacc_sql.cpp" +#line 2962 "yacc_sql.cpp" break; - case 119: /* condition: condition OR condition */ -#line 980 "yacc_sql.y" + case 126: /* condition: condition OR condition */ +#line 1047 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2864 "yacc_sql.cpp" +#line 2970 "yacc_sql.cpp" break; - case 120: /* comp_op: EQ */ -#line 986 "yacc_sql.y" + case 127: /* comp_op: EQ */ +#line 1053 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2870 "yacc_sql.cpp" +#line 2976 "yacc_sql.cpp" break; - case 121: /* comp_op: LT */ -#line 987 "yacc_sql.y" + case 128: /* comp_op: LT */ +#line 1054 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2876 "yacc_sql.cpp" +#line 2982 "yacc_sql.cpp" break; - case 122: /* comp_op: GT */ -#line 988 "yacc_sql.y" + case 129: /* comp_op: GT */ +#line 1055 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2882 "yacc_sql.cpp" +#line 2988 "yacc_sql.cpp" break; - case 123: /* comp_op: LE */ -#line 989 "yacc_sql.y" + case 130: /* comp_op: LE */ +#line 1056 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2888 "yacc_sql.cpp" +#line 2994 "yacc_sql.cpp" break; - case 124: /* comp_op: GE */ -#line 990 "yacc_sql.y" + case 131: /* comp_op: GE */ +#line 1057 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2894 "yacc_sql.cpp" +#line 3000 "yacc_sql.cpp" break; - case 125: /* comp_op: NE */ -#line 991 "yacc_sql.y" + case 132: /* comp_op: NE */ +#line 1058 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2900 "yacc_sql.cpp" +#line 3006 "yacc_sql.cpp" break; - case 126: /* comp_op: IS */ -#line 992 "yacc_sql.y" + case 133: /* comp_op: IS */ +#line 1059 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2906 "yacc_sql.cpp" +#line 3012 "yacc_sql.cpp" break; - case 127: /* comp_op: IS NOT */ -#line 993 "yacc_sql.y" + case 134: /* comp_op: IS NOT */ +#line 1060 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 2912 "yacc_sql.cpp" +#line 3018 "yacc_sql.cpp" break; - case 128: /* comp_op: LIKE */ -#line 994 "yacc_sql.y" + case 135: /* comp_op: LIKE */ +#line 1061 "yacc_sql.y" { (yyval.comp) = LIKE_OP; } -#line 2918 "yacc_sql.cpp" +#line 3024 "yacc_sql.cpp" break; - case 129: /* comp_op: NOT LIKE */ -#line 995 "yacc_sql.y" + case 136: /* comp_op: NOT LIKE */ +#line 1062 "yacc_sql.y" { (yyval.comp) = NOT_LIKE_OP; } -#line 2924 "yacc_sql.cpp" +#line 3030 "yacc_sql.cpp" break; - case 130: /* comp_op: IN */ -#line 996 "yacc_sql.y" + case 137: /* comp_op: IN */ +#line 1063 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 2930 "yacc_sql.cpp" +#line 3036 "yacc_sql.cpp" break; - case 131: /* comp_op: NOT IN */ -#line 997 "yacc_sql.y" + case 138: /* comp_op: NOT IN */ +#line 1064 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 2936 "yacc_sql.cpp" +#line 3042 "yacc_sql.cpp" break; - case 132: /* comp_op: EXISTS */ -#line 998 "yacc_sql.y" + case 139: /* comp_op: EXISTS */ +#line 1065 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 2942 "yacc_sql.cpp" +#line 3048 "yacc_sql.cpp" break; - case 133: /* comp_op: NOT EXISTS */ -#line 999 "yacc_sql.y" + case 140: /* comp_op: NOT EXISTS */ +#line 1066 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 2948 "yacc_sql.cpp" +#line 3054 "yacc_sql.cpp" break; - case 134: /* opt_order_by: %empty */ -#line 1004 "yacc_sql.y" + case 141: /* opt_order_by: %empty */ +#line 1071 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 2956 "yacc_sql.cpp" +#line 3062 "yacc_sql.cpp" break; - case 135: /* opt_order_by: ORDER BY sort_list */ -#line 1008 "yacc_sql.y" + case 142: /* opt_order_by: ORDER BY sort_list */ +#line 1075 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } -#line 2965 "yacc_sql.cpp" +#line 3071 "yacc_sql.cpp" break; - case 136: /* sort_list: sort_unit */ -#line 1016 "yacc_sql.y" + case 143: /* sort_list: sort_unit */ +#line 1083 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 2974 "yacc_sql.cpp" +#line 3080 "yacc_sql.cpp" break; - case 137: /* sort_list: sort_unit COMMA sort_list */ -#line 1021 "yacc_sql.y" + case 144: /* sort_list: sort_unit COMMA sort_list */ +#line 1088 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 2983 "yacc_sql.cpp" +#line 3089 "yacc_sql.cpp" break; - case 138: /* sort_unit: expression */ -#line 1029 "yacc_sql.y" + case 145: /* sort_unit: expression */ +#line 1096 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 2993 "yacc_sql.cpp" +#line 3099 "yacc_sql.cpp" break; - case 139: /* sort_unit: expression DESC */ -#line 1035 "yacc_sql.y" + case 146: /* sort_unit: expression DESC */ +#line 1102 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 3003 "yacc_sql.cpp" +#line 3109 "yacc_sql.cpp" break; - case 140: /* sort_unit: expression ASC */ -#line 1041 "yacc_sql.y" + case 147: /* sort_unit: expression ASC */ +#line 1108 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3013 "yacc_sql.cpp" +#line 3119 "yacc_sql.cpp" break; - case 141: /* group_by: %empty */ -#line 1050 "yacc_sql.y" + case 148: /* group_by: %empty */ +#line 1117 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 3021 "yacc_sql.cpp" +#line 3127 "yacc_sql.cpp" break; - case 142: /* group_by: GROUP BY expression_list */ -#line 1054 "yacc_sql.y" + case 149: /* group_by: GROUP BY expression_list */ +#line 1121 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 3029 "yacc_sql.cpp" +#line 3135 "yacc_sql.cpp" break; - case 143: /* opt_having: %empty */ -#line 1061 "yacc_sql.y" + case 150: /* opt_having: %empty */ +#line 1128 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 3037 "yacc_sql.cpp" +#line 3143 "yacc_sql.cpp" break; - case 144: /* opt_having: HAVING condition */ -#line 1065 "yacc_sql.y" + case 151: /* opt_having: HAVING condition */ +#line 1132 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3045 "yacc_sql.cpp" +#line 3151 "yacc_sql.cpp" break; - case 145: /* opt_limit: %empty */ -#line 1072 "yacc_sql.y" + case 152: /* opt_limit: %empty */ +#line 1139 "yacc_sql.y" { (yyval.limited_info) = nullptr; } -#line 3053 "yacc_sql.cpp" +#line 3159 "yacc_sql.cpp" break; - case 146: /* opt_limit: LIMIT NUMBER */ -#line 1076 "yacc_sql.y" + case 153: /* opt_limit: LIMIT NUMBER */ +#line 1143 "yacc_sql.y" { (yyval.limited_info) = new LimitSqlNode(); (yyval.limited_info)->number = (yyvsp[0].number); } -#line 3062 "yacc_sql.cpp" +#line 3168 "yacc_sql.cpp" break; - case 147: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1097 "yacc_sql.y" + case 154: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1164 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3071 "yacc_sql.cpp" +#line 3177 "yacc_sql.cpp" break; - case 148: /* set_variable_stmt: SET ID EQ value */ -#line 1105 "yacc_sql.y" + case 155: /* set_variable_stmt: SET ID EQ value */ +#line 1172 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -5112,10 +5406,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3083 "yacc_sql.cpp" +#line 3189 "yacc_sql.cpp" break; -#line 3087 "yacc_sql.cpp" +#line 3193 "yacc_sql.cpp" default: break; } @@ -5314,7 +5608,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) return yyresult; } -#line 1117 "yacc_sql.y" +#line 1184 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index c7777d9b..972b62cf 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -50,81 +50,90 @@ extern int yydebug; #define YYTOKENTYPE enum yytokentype { - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - SEMICOLON = 258, /* SEMICOLON */ - AS = 259, /* AS */ - ASC = 260, /* ASC */ - BY = 261, /* BY */ - CREATE = 262, /* CREATE */ - DROP = 263, /* DROP */ - EXISTS = 264, /* EXISTS */ - GROUP = 265, /* GROUP */ - HAVING = 266, /* HAVING */ - ORDER = 267, /* ORDER */ - TABLE = 268, /* TABLE */ - TABLES = 269, /* TABLES */ - INDEX = 270, /* INDEX */ - CALC = 271, /* CALC */ - SELECT = 272, /* SELECT */ - DESC = 273, /* DESC */ - SHOW = 274, /* SHOW */ - SYNC = 275, /* SYNC */ - INSERT = 276, /* INSERT */ - DELETE = 277, /* DELETE */ - UPDATE = 278, /* UPDATE */ - LBRACE = 279, /* LBRACE */ - RBRACE = 280, /* RBRACE */ - COMMA = 281, /* COMMA */ - TRX_BEGIN = 282, /* TRX_BEGIN */ - TRX_COMMIT = 283, /* TRX_COMMIT */ - TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ - INT_T = 285, /* INT_T */ - IN = 286, /* IN */ - STRING_T = 287, /* STRING_T */ - FLOAT_T = 288, /* FLOAT_T */ - DATE_T = 289, /* DATE_T */ - TEXT_T = 290, /* TEXT_T */ - VECTOR_T = 291, /* VECTOR_T */ - NOT = 292, /* NOT */ - UNIQUE = 293, /* UNIQUE */ - NULL_T = 294, /* NULL_T */ - LIMIT = 295, /* LIMIT */ - NULLABLE = 296, /* NULLABLE */ - HELP = 297, /* HELP */ - EXIT = 298, /* EXIT */ - DOT = 299, /* DOT */ - INTO = 300, /* INTO */ - VALUES = 301, /* VALUES */ - FROM = 302, /* FROM */ - WHERE = 303, /* WHERE */ - AND = 304, /* AND */ - OR = 305, /* OR */ - SET = 306, /* SET */ - ON = 307, /* ON */ - LOAD = 308, /* LOAD */ - INFILE = 309, /* INFILE */ - EXPLAIN = 310, /* EXPLAIN */ - STORAGE = 311, /* STORAGE */ - FORMAT = 312, /* FORMAT */ - INNER = 313, /* INNER */ - JOIN = 314, /* JOIN */ - VIEW = 315, /* VIEW */ - EQ = 316, /* EQ */ - LT = 317, /* LT */ - GT = 318, /* GT */ - LE = 319, /* LE */ - GE = 320, /* GE */ - NE = 321, /* NE */ - LIKE = 322, /* LIKE */ - IS = 323, /* IS */ - NUMBER = 324, /* NUMBER */ - FLOAT = 325, /* FLOAT */ - ID = 326, /* ID */ - SSS = 327, /* SSS */ - UMINUS = 328 /* UMINUS */ + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SEMICOLON = 258, /* SEMICOLON */ + AS = 259, /* AS */ + ASC = 260, /* ASC */ + BY = 261, /* BY */ + CREATE = 262, /* CREATE */ + DROP = 263, /* DROP */ + EXISTS = 264, /* EXISTS */ + GROUP = 265, /* GROUP */ + HAVING = 266, /* HAVING */ + ORDER = 267, /* ORDER */ + TABLE = 268, /* TABLE */ + TABLES = 269, /* TABLES */ + INDEX = 270, /* INDEX */ + CALC = 271, /* CALC */ + SELECT = 272, /* SELECT */ + DESC = 273, /* DESC */ + SHOW = 274, /* SHOW */ + SYNC = 275, /* SYNC */ + INSERT = 276, /* INSERT */ + DELETE = 277, /* DELETE */ + UPDATE = 278, /* UPDATE */ + LBRACE = 279, /* LBRACE */ + RBRACE = 280, /* RBRACE */ + COMMA = 281, /* COMMA */ + TRX_BEGIN = 282, /* TRX_BEGIN */ + TRX_COMMIT = 283, /* TRX_COMMIT */ + TRX_ROLLBACK = 284, /* TRX_ROLLBACK */ + INT_T = 285, /* INT_T */ + IN = 286, /* IN */ + STRING_T = 287, /* STRING_T */ + FLOAT_T = 288, /* FLOAT_T */ + DATE_T = 289, /* DATE_T */ + TEXT_T = 290, /* TEXT_T */ + VECTOR_T = 291, /* VECTOR_T */ + NOT = 292, /* NOT */ + UNIQUE = 293, /* UNIQUE */ + NULL_T = 294, /* NULL_T */ + LIMIT = 295, /* LIMIT */ + NULLABLE = 296, /* NULLABLE */ + HELP = 297, /* HELP */ + EXIT = 298, /* EXIT */ + DOT = 299, /* DOT */ + INTO = 300, /* INTO */ + VALUES = 301, /* VALUES */ + FROM = 302, /* FROM */ + WHERE = 303, /* WHERE */ + AND = 304, /* AND */ + OR = 305, /* OR */ + SET = 306, /* SET */ + ON = 307, /* ON */ + LOAD = 308, /* LOAD */ + INFILE = 309, /* INFILE */ + EXPLAIN = 310, /* EXPLAIN */ + STORAGE = 311, /* STORAGE */ + FORMAT = 312, /* FORMAT */ + INNER = 313, /* INNER */ + JOIN = 314, /* JOIN */ + VIEW = 315, /* VIEW */ + WITH = 316, /* WITH */ + DISTANCE = 317, /* DISTANCE */ + TYPE = 318, /* TYPE */ + LISTS = 319, /* LISTS */ + PROBES = 320, /* PROBES */ + IVFFLAT = 321, /* IVFFLAT */ + L2_DISTANCE = 322, /* L2_DISTANCE */ + COSINE_DISTANCE = 323, /* COSINE_DISTANCE */ + INNER_PRODUCT = 324, /* INNER_PRODUCT */ + EQ = 325, /* EQ */ + LT = 326, /* LT */ + GT = 327, /* GT */ + LE = 328, /* LE */ + GE = 329, /* GE */ + NE = 330, /* NE */ + LIKE = 331, /* LIKE */ + IS = 332, /* IS */ + NUMBER = 333, /* NUMBER */ + FLOAT = 334, /* FLOAT */ + ID = 335, /* ID */ + SSS = 336, /* SSS */ + UMINUS = 337 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -133,7 +142,7 @@ typedef enum yytokentype yytoken_kind_t; #if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 166 "yacc_sql.y" +#line 175 "yacc_sql.y" ParsedSqlNode *sql_node; Value *value; @@ -159,8 +168,11 @@ union YYSTYPE bool nullable_info; std::vector *index_attr_list; bool unique; + enum VectorDistanceType vector_distance_type; + enum IndexType index_type; + VectorIndexConfig *vector_index_config; -#line 164 "yacc_sql.hpp" +#line 176 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; #define YYSTYPE_IS_TRIVIAL 1 diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 03ba7470..23f899a9 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -153,6 +153,15 @@ ParsedSqlNode *create_table_sql_node(char *table_name, INNER JOIN VIEW + WITH + DISTANCE + TYPE + LISTS + PROBES + IVFFLAT + L2_DISTANCE + COSINE_DISTANCE + INNER_PRODUCT EQ LT GT @@ -188,6 +197,9 @@ ParsedSqlNode *create_table_sql_node(char *table_name, bool nullable_info; std::vector * index_attr_list; bool unique; + enum VectorDistanceType vector_distance_type; + enum IndexType index_type; + VectorIndexConfig * vector_index_config; } %token NUMBER @@ -228,6 +240,9 @@ ParsedSqlNode *create_table_sql_node(char *table_name, %type opt_limit %type attr_list %type opt_unique +%type index_type +%type vector_distance_type +%type vector_index_config %type calc_stmt %type select_stmt %type insert_stmt @@ -375,6 +390,19 @@ create_index_stmt: free($4); free($6); } + | CREATE VECTOR_T INDEX ID ON ID LBRACE attr_list RBRACE WITH vector_index_config + { + $$ = new ParsedSqlNode(SCF_CREATE_INDEX); + CreateIndexSqlNode &create_index = $$->create_index; + create_index.unique = false; // 向量索引不支持 + create_index.index_name = $4; + create_index.relation_name = $6; + create_index.attribute_name.swap(*$8); // $8 是 vector 类型 + create_index.vector_index_config = std::move(*$11); + delete $8; // 释放指针 + free($4); + free($6); + } ; opt_unique: @@ -382,6 +410,45 @@ opt_unique: | /* 空 */ { $$ = false; } ; +index_type: + IVFFLAT + { + $$ = IndexType::VectorIVFFlatIndex; + } + ; + +vector_index_config: + LBRACE DISTANCE EQ vector_distance_type COMMA TYPE EQ index_type RBRACE + { + $$ = new VectorIndexConfig; + $$->distance_type = $4; + $$->index_type = $8; + } + | LBRACE DISTANCE EQ vector_distance_type COMMA TYPE EQ index_type COMMA LISTS EQ value COMMA PROBES EQ value RBRACE + { + $$ = new VectorIndexConfig; + $$->distance_type = $4; + $$->index_type = $8; + $$->lists = std::move(*$12); + $$->probes = std::move(*$16); + } + ; + +vector_distance_type: + L2_DISTANCE + { + $$ = VectorDistanceType::L2; + } + | COSINE_DISTANCE + { + $$ = VectorDistanceType::COSINE; + } + | INNER_PRODUCT + { + $$ = VectorDistanceType::INNER; + } + ; + attr_list: ID { diff --git a/src/observer/storage/index/index_meta.h b/src/observer/storage/index/index_meta.h index a3f5a71a..b1a86d48 100644 --- a/src/observer/storage/index/index_meta.h +++ b/src/observer/storage/index/index_meta.h @@ -64,6 +64,7 @@ class IndexMeta } [[nodiscard]] const char *name() const { return name_.c_str(); } + IndexType type() const { return type_; } [[nodiscard]] int fields_total_len() const { return fields_total_len_; } [[nodiscard]] const vector &fields() const { return fields_; } [[nodiscard]] bool unique() const { return unique_; } @@ -71,6 +72,7 @@ class IndexMeta private: string name_; + IndexType type_; int fields_total_len_ = 0; vector fields_offset_; vector fields_; From 0e1ef1ba3f7786ce1222e79004fbc0b3dd46a79d Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 01:18:45 +0800 Subject: [PATCH 291/308] =?UTF-8?q?=E8=BF=99=E4=B8=AATODO=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E5=AE=9E=E7=8E=B0=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/table/table.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index f76564f2..15b0468b 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -77,7 +77,6 @@ class Table : public BaseTable RC recover_insert_record(Record &record); - // TODO refactor RC create_index(Trx *trx, const vector &field_meta, const char *index_name, bool unique); RC get_record_scanner(RecordFileScanner &scanner, Trx *trx, ReadWriteMode mode); From d56ebb2cfe654f78165030af49300cd831eaa9b8 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 12:21:06 +0800 Subject: [PATCH 292/308] =?UTF-8?q?=E4=BF=AE=E6=AD=A3vector=20to=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/vector_type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index 346f2e9b..9f955544 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -61,7 +61,7 @@ RC VectorType::to_string(const Value &val, std::string &result) const // 遍历数组元素并拼接成字符串 for (int i = 0; i < count; ++i) { if (i != 0) { - oss << ", "; // 在每个元素之间加逗号和空格 + oss << ","; // 在每个元素之间加逗号和空格 } oss << data[i]; // 将浮点数输出到字符串流 } From e5119dfad816abcbfb3e2fb91f5183f0b290c976 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 12:32:53 +0800 Subject: [PATCH 293/308] =?UTF-8?q?=E4=BF=AE=E6=AD=A3UnboundFunctionExpr?= =?UTF-8?q?=E8=A1=A8=E5=A4=B4=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/expr/expression.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index 25254eb3..bba7aa88 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -442,7 +442,7 @@ class UnboundFunctionExpr : public Expression for (size_t i = 0; i < args_.size(); i++) { str += args_[i]->name(); if (i < args_.size() - 1) { - str += ","; + str += ", "; } } str += ")"; From b6ed4982739bb9f2a7e9d5fb992e88d3a6375dfa Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 12:55:27 +0800 Subject: [PATCH 294/308] =?UTF-8?q?=E4=BF=AE=E6=AD=A3COSINE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/float_type.cpp | 4 ---- src/observer/sql/builtin/builtin.cpp | 9 +++++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/observer/common/type/float_type.cpp b/src/observer/common/type/float_type.cpp index 9be211d0..9c09b5c9 100644 --- a/src/observer/common/type/float_type.cpp +++ b/src/observer/common/type/float_type.cpp @@ -45,10 +45,6 @@ RC FloatType::multiply(const Value &left, const Value &right, Value &result) con RC FloatType::divide(const Value &left, const Value &right, Value &result) const { - if (right.get_float() < 0.0001 && right.get_float() > -0.0001) { - result.set_null(); - return RC::SUCCESS; - } if (right.get_float() > -EPSILON && right.get_float() < EPSILON) { result.set_null(); return RC::SUCCESS; diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 1fb4d769..d5129cdb 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -343,12 +343,17 @@ RC distance(const std::vector &args, Value &result, Type type) norm_v1 += v1 * v1; // 计算 v1 的模长平方 } - if (norm_v0 == 0.0 || norm_v1 == 0.0) { + if (std::abs(norm_v0) < EPSILON) { result = Value(NullValue()); return RC::SUCCESS; // 避免除以 0 的情况 } - float cosine_similarity = dot_product / (sqrt(norm_v0) * sqrt(norm_v1)); + if (std::abs(norm_v1) < EPSILON) { + result = Value(NullValue()); + return RC::SUCCESS; // 避免除以 0 的情况 + } + + float cosine_similarity = 1 - dot_product / (sqrt(norm_v0) * sqrt(norm_v1)); result = Value(cosine_similarity); return RC::SUCCESS; } From f4b61739458fd04d1f0c545cb017d9b6508d3e35 Mon Sep 17 00:00:00 2001 From: root <503194395@qq.com> Date: Fri, 18 Oct 2024 05:08:51 +0000 Subject: [PATCH 295/308] =?UTF-8?q?func=E7=9A=84=E5=90=8D=E5=AD=97?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/vector_type.cpp | 2 +- src/observer/sql/builtin/builtin.cpp | 6 +- src/observer/sql/expr/expression.cpp | 6 +- src/observer/sql/parser/expression_binder.cpp | 1 + src/observer/sql/parser/lex_sql.cpp | 35 ++-- src/observer/sql/parser/lex_sql.h | 11 +- src/observer/sql/parser/yacc_sql.cpp | 189 +++++++++--------- src/observer/sql/parser/yacc_sql.y | 1 + test/case/miniob_test.py | 3 +- 9 files changed, 126 insertions(+), 128 deletions(-) diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index 346f2e9b..84045e71 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -43,7 +43,7 @@ RC VectorType::cast_to(const Value &val, AttrType type, Value &result, bool allo } RC VectorType::set_value_from_str(Value &val, const string &data) const { - return DataType::set_value_from_str(val, data); + return RC::UNIMPLEMENTED; } int VectorType::cast_cost(AttrType type) { return DataType::cast_cost(type); } RC VectorType::to_string(const Value &val, std::string &result) const diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 1fb4d769..fad89723 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -343,12 +343,12 @@ RC distance(const std::vector &args, Value &result, Type type) norm_v1 += v1 * v1; // 计算 v1 的模长平方 } - if (norm_v0 == 0.0 || norm_v1 == 0.0) { + if (fabs(norm_v0) < EPSILON || fabs(norm_v1) < EPSILON) { result = Value(NullValue()); - return RC::SUCCESS; // 避免除以 0 的情况 + return RC::SUCCESS; } - float cosine_similarity = dot_product / (sqrt(norm_v0) * sqrt(norm_v1)); + float cosine_similarity = dot_product / (std::sqrt(norm_v0) * sqrt(norm_v1)); result = Value(cosine_similarity); return RC::SUCCESS; } diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 829f7ff9..896d9799 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -663,11 +663,7 @@ RC ArithmeticExpr::try_get_value(Value &value) const UnboundFunctionExpr::UnboundFunctionExpr(const char *aggregate_name, std::vector> child) : function_name_(aggregate_name), args_(std::move(child)) -{ - if (::Expression::name_empty()) { - Expression::set_name(to_string()); - } -} +{} //////////////////////////////////////////////////////////////////////////////// AggregateFunctionExpr::AggregateFunctionExpr(Type type, Expression *child) : aggregate_type_(type), child_(child) {} diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 89adfd46..35b24747 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -534,6 +534,7 @@ RC ExpressionBinder::bind_function_expression( auto func_expr = make_unique( func_type, unbound_function_expr->function_name(), std::move(unbound_function_expr->args())); func_expr->set_name(name); + func_expr->set_alias(unbound_function_expr->alias()); bound_expressions.emplace_back(std::move(func_expr)); return RC::SUCCESS; } diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 658f415f..0c0a00d4 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,4 +1,4 @@ -#line 1 "lex_sql.cpp" +#line 2 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -22,7 +22,7 @@ do { \ } \ while (0); -#line 25 "lex_sql.cpp" +#line 26 "lex_sql.cpp" #define YY_INT_ALIGNED short int @@ -93,7 +93,6 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -258,7 +257,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -335,7 +334,7 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -382,7 +381,7 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyleng = (int) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -766,8 +765,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; + int yy_n_chars; + int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -824,7 +823,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - yy_size_t yyget_leng ( yyscan_t yyscanner ); + int yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); @@ -903,7 +902,7 @@ static int input ( yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - yy_size_t n; \ + int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1667,7 +1666,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1681,7 +1680,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1739,7 +1738,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1846,7 +1845,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -2224,12 +2223,12 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - yy_size_t i; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); @@ -2273,7 +2272,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) do \ { \ /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ + int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ @@ -2341,7 +2340,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t yyget_leng (yyscan_t yyscanner) +int yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 12b7f68e..34cc3b65 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,7 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 5 "lex_sql.h" +#line 6 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -26,7 +26,7 @@ do { \ } \ while (0); -#line 29 "lex_sql.h" +#line 30 "lex_sql.h" #define YY_INT_ALIGNED short int @@ -97,7 +97,6 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -211,7 +210,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -255,7 +254,7 @@ void yypop_buffer_state ( yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -311,7 +310,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - yy_size_t yyget_leng ( yyscan_t yyscanner ); + int yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 05724c67..64d22685 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -725,11 +725,11 @@ static const yytype_int16 yyrline[] = 663, 667, 671, 677, 680, 687, 690, 697, 709, 723, 728, 735, 745, 783, 816, 822, 831, 834, 843, 859, 862, 865, 868, 871, 879, 882, 887, 893, 896, 899, - 902, 909, 912, 915, 920, 927, 934, 939, 949, 955, - 965, 982, 989, 1001, 1004, 1010, 1014, 1021, 1025, 1032, - 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, - 1043, 1044, 1045, 1050, 1053, 1061, 1066, 1074, 1080, 1086, - 1096, 1099, 1107, 1110, 1118, 1121, 1129, 1137, 1148 + 902, 909, 912, 915, 920, 928, 935, 940, 950, 956, + 966, 983, 990, 1002, 1005, 1011, 1015, 1022, 1026, 1033, + 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, + 1044, 1045, 1046, 1051, 1054, 1062, 1067, 1075, 1081, 1087, + 1097, 1100, 1108, 1111, 1119, 1122, 1130, 1138, 1149 }; #endif @@ -2801,30 +2801,31 @@ YYLTYPE yylloc = yyloc_default; #line 921 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); + (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2806 "yacc_sql.cpp" +#line 2807 "yacc_sql.cpp" break; case 115: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 928 "yacc_sql.y" +#line 929 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2814 "yacc_sql.cpp" +#line 2815 "yacc_sql.cpp" break; case 116: /* rel_attr: ID */ -#line 934 "yacc_sql.y" +#line 935 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2824 "yacc_sql.cpp" +#line 2825 "yacc_sql.cpp" break; case 117: /* rel_attr: ID DOT ID */ -#line 939 "yacc_sql.y" +#line 940 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2832,19 +2833,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2836 "yacc_sql.cpp" +#line 2837 "yacc_sql.cpp" break; case 118: /* relation: ID */ -#line 949 "yacc_sql.y" +#line 950 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2844 "yacc_sql.cpp" +#line 2845 "yacc_sql.cpp" break; case 119: /* rel_list: relation alias */ -#line 955 "yacc_sql.y" +#line 956 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2855,11 +2856,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2859 "yacc_sql.cpp" +#line 2860 "yacc_sql.cpp" break; case 120: /* rel_list: relation alias COMMA rel_list */ -#line 965 "yacc_sql.y" +#line 966 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2874,22 +2875,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2878 "yacc_sql.cpp" +#line 2879 "yacc_sql.cpp" break; case 121: /* join_clauses: relation ON condition */ -#line 983 "yacc_sql.y" +#line 984 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2889 "yacc_sql.cpp" +#line 2890 "yacc_sql.cpp" break; case 122: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 990 "yacc_sql.y" +#line 991 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2897,269 +2898,269 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2901 "yacc_sql.cpp" +#line 2902 "yacc_sql.cpp" break; case 123: /* where: %empty */ -#line 1001 "yacc_sql.y" +#line 1002 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2909 "yacc_sql.cpp" +#line 2910 "yacc_sql.cpp" break; case 124: /* where: WHERE condition */ -#line 1004 "yacc_sql.y" +#line 1005 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2917 "yacc_sql.cpp" +#line 2918 "yacc_sql.cpp" break; case 125: /* condition: expression comp_op expression */ -#line 1011 "yacc_sql.y" +#line 1012 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2925 "yacc_sql.cpp" +#line 2926 "yacc_sql.cpp" break; case 126: /* condition: comp_op expression */ -#line 1015 "yacc_sql.y" +#line 1016 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2936 "yacc_sql.cpp" +#line 2937 "yacc_sql.cpp" break; case 127: /* condition: condition AND condition */ -#line 1022 "yacc_sql.y" +#line 1023 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2944 "yacc_sql.cpp" +#line 2945 "yacc_sql.cpp" break; case 128: /* condition: condition OR condition */ -#line 1026 "yacc_sql.y" +#line 1027 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2952 "yacc_sql.cpp" +#line 2953 "yacc_sql.cpp" break; case 129: /* comp_op: EQ */ -#line 1032 "yacc_sql.y" +#line 1033 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2958 "yacc_sql.cpp" +#line 2959 "yacc_sql.cpp" break; case 130: /* comp_op: LT */ -#line 1033 "yacc_sql.y" +#line 1034 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2964 "yacc_sql.cpp" +#line 2965 "yacc_sql.cpp" break; case 131: /* comp_op: GT */ -#line 1034 "yacc_sql.y" +#line 1035 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2970 "yacc_sql.cpp" +#line 2971 "yacc_sql.cpp" break; case 132: /* comp_op: LE */ -#line 1035 "yacc_sql.y" +#line 1036 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2976 "yacc_sql.cpp" +#line 2977 "yacc_sql.cpp" break; case 133: /* comp_op: GE */ -#line 1036 "yacc_sql.y" +#line 1037 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2982 "yacc_sql.cpp" +#line 2983 "yacc_sql.cpp" break; case 134: /* comp_op: NE */ -#line 1037 "yacc_sql.y" +#line 1038 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2988 "yacc_sql.cpp" +#line 2989 "yacc_sql.cpp" break; case 135: /* comp_op: IS */ -#line 1038 "yacc_sql.y" +#line 1039 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2994 "yacc_sql.cpp" +#line 2995 "yacc_sql.cpp" break; case 136: /* comp_op: IS NOT */ -#line 1039 "yacc_sql.y" +#line 1040 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 3000 "yacc_sql.cpp" +#line 3001 "yacc_sql.cpp" break; case 137: /* comp_op: LIKE */ -#line 1040 "yacc_sql.y" +#line 1041 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 3006 "yacc_sql.cpp" +#line 3007 "yacc_sql.cpp" break; case 138: /* comp_op: NOT LIKE */ -#line 1041 "yacc_sql.y" +#line 1042 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 3012 "yacc_sql.cpp" +#line 3013 "yacc_sql.cpp" break; case 139: /* comp_op: IN */ -#line 1042 "yacc_sql.y" +#line 1043 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 3018 "yacc_sql.cpp" +#line 3019 "yacc_sql.cpp" break; case 140: /* comp_op: NOT IN */ -#line 1043 "yacc_sql.y" +#line 1044 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 3024 "yacc_sql.cpp" +#line 3025 "yacc_sql.cpp" break; case 141: /* comp_op: EXISTS */ -#line 1044 "yacc_sql.y" +#line 1045 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 3030 "yacc_sql.cpp" +#line 3031 "yacc_sql.cpp" break; case 142: /* comp_op: NOT EXISTS */ -#line 1045 "yacc_sql.y" +#line 1046 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 3036 "yacc_sql.cpp" +#line 3037 "yacc_sql.cpp" break; case 143: /* opt_order_by: %empty */ -#line 1050 "yacc_sql.y" +#line 1051 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 3044 "yacc_sql.cpp" +#line 3045 "yacc_sql.cpp" break; case 144: /* opt_order_by: ORDER BY sort_list */ -#line 1054 "yacc_sql.y" +#line 1055 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 3053 "yacc_sql.cpp" +#line 3054 "yacc_sql.cpp" break; case 145: /* sort_list: sort_unit */ -#line 1062 "yacc_sql.y" +#line 1063 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 3062 "yacc_sql.cpp" +#line 3063 "yacc_sql.cpp" break; case 146: /* sort_list: sort_unit COMMA sort_list */ -#line 1067 "yacc_sql.y" +#line 1068 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 3071 "yacc_sql.cpp" +#line 3072 "yacc_sql.cpp" break; case 147: /* sort_unit: expression */ -#line 1075 "yacc_sql.y" +#line 1076 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3081 "yacc_sql.cpp" +#line 3082 "yacc_sql.cpp" break; case 148: /* sort_unit: expression DESC */ -#line 1081 "yacc_sql.y" +#line 1082 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 3091 "yacc_sql.cpp" +#line 3092 "yacc_sql.cpp" break; case 149: /* sort_unit: expression ASC */ -#line 1087 "yacc_sql.y" +#line 1088 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3101 "yacc_sql.cpp" +#line 3102 "yacc_sql.cpp" break; case 150: /* group_by: %empty */ -#line 1096 "yacc_sql.y" +#line 1097 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 3109 "yacc_sql.cpp" +#line 3110 "yacc_sql.cpp" break; case 151: /* group_by: GROUP BY expression_list */ -#line 1100 "yacc_sql.y" +#line 1101 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 3117 "yacc_sql.cpp" +#line 3118 "yacc_sql.cpp" break; case 152: /* opt_having: %empty */ -#line 1107 "yacc_sql.y" +#line 1108 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 3125 "yacc_sql.cpp" +#line 3126 "yacc_sql.cpp" break; case 153: /* opt_having: HAVING condition */ -#line 1111 "yacc_sql.y" +#line 1112 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3133 "yacc_sql.cpp" +#line 3134 "yacc_sql.cpp" break; case 154: /* opt_limit: %empty */ -#line 1118 "yacc_sql.y" +#line 1119 "yacc_sql.y" { (yyval.limited_info) = nullptr; } -#line 3141 "yacc_sql.cpp" +#line 3142 "yacc_sql.cpp" break; case 155: /* opt_limit: LIMIT NUMBER */ -#line 1122 "yacc_sql.y" +#line 1123 "yacc_sql.y" { (yyval.limited_info) = new LimitSqlNode(); (yyval.limited_info)->number = (yyvsp[0].number); } -#line 3150 "yacc_sql.cpp" +#line 3151 "yacc_sql.cpp" break; case 156: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1130 "yacc_sql.y" +#line 1131 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3159 "yacc_sql.cpp" +#line 3160 "yacc_sql.cpp" break; case 157: /* set_variable_stmt: SET ID EQ value */ -#line 1138 "yacc_sql.y" +#line 1139 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -3167,11 +3168,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3171 "yacc_sql.cpp" +#line 3172 "yacc_sql.cpp" break; -#line 3175 "yacc_sql.cpp" +#line 3176 "yacc_sql.cpp" default: break; } @@ -3400,7 +3401,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1150 "yacc_sql.y" +#line 1151 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 81907b66..1d9e42ec 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -920,6 +920,7 @@ func_expr: ID LBRACE expression_list RBRACE { $$ = new UnboundFunctionExpr($1, std::move(*$3)); + $$->set_name(token_name(sql_string, &@$)); } ; diff --git a/test/case/miniob_test.py b/test/case/miniob_test.py index 4b5783a5..4d921fa1 100755 --- a/test/case/miniob_test.py +++ b/test/case/miniob_test.py @@ -51,6 +51,7 @@ python3 miniob_test.py --test-cases=primary-date python3 miniob_test.py --test-cases=primary-complex-sub-query python3 miniob_test.py --test-cases=primary-simple-sub-query +python3 miniob_test.py --test-cases=vectorized-basic 如果要运行多个测试用例,则在 --test-cases 参数中使用 ',' 分隔写多个即可 """ @@ -1059,7 +1060,7 @@ def compile(work_dir: str, build_dir: str, cmake_args: str, make_args: str, rebu make_command = ["make", "--silent", "-C", build_path] if isinstance(make_args, str): if not make_args: - make_command.append('-j4') + make_command.append('-j16') else: args = make_args.split(';') for arg in args: From 2ad38586b84e90c54801056bcded9e41f86a226d Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 13:17:58 +0800 Subject: [PATCH 296/308] if (copy_len / sizeof(float) != data_len / sizeof(float)) { return RC::VECTOR_DIM_MISMATCH; } --- src/observer/common/type/vector_type.cpp | 5 +--- src/observer/sql/builtin/builtin.cpp | 6 ++-- src/observer/sql/parser/lex_sql.cpp | 35 ++++++++++++----------- src/observer/sql/parser/lex_sql.h | 11 +++---- src/observer/storage/table/base_table.cpp | 3 ++ 5 files changed, 31 insertions(+), 29 deletions(-) diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index 0ae0acbd..d0f94def 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -41,10 +41,7 @@ RC VectorType::cast_to(const Value &val, AttrType type, Value &result, bool allo } return RC::INTERNAL; } -RC VectorType::set_value_from_str(Value &val, const string &data) const -{ - return RC::UNIMPLEMENTED; -} +RC VectorType::set_value_from_str(Value &val, const string &data) const { return RC::UNIMPLEMENTED; } int VectorType::cast_cost(AttrType type) { return DataType::cast_cost(type); } RC VectorType::to_string(const Value &val, std::string &result) const { diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 07b5d890..70f202c9 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -343,13 +343,13 @@ RC distance(const std::vector &args, Value &result, Type type) norm_v1 += v1 * v1; // 计算 v1 的模长平方 } - if (fabs(norm_v0) < EPSILON || fabs(norm_v1) < EPSILON) { + if (std::fabs(norm_v0) < EPSILON || std::fabs(norm_v1) < EPSILON) { result = Value(NullValue()); return RC::SUCCESS; // 避免除以 0 的情况 } - float cosine_similarity = 1 - dot_product / (sqrt(norm_v0) * sqrt(norm_v1)); - result = Value(cosine_similarity); + float cosine_similarity = dot_product / (std::sqrt(norm_v0) * std::sqrt(norm_v1)); + result = Value(1 - cosine_similarity); return RC::SUCCESS; } case Type::INNER: { diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 0c0a00d4..658f415f 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -1,4 +1,4 @@ -#line 2 "lex_sql.cpp" +#line 1 "lex_sql.cpp" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -22,7 +22,7 @@ do { \ } \ while (0); -#line 26 "lex_sql.cpp" +#line 25 "lex_sql.cpp" #define YY_INT_ALIGNED short int @@ -93,6 +93,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -257,7 +258,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -334,7 +335,7 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -381,7 +382,7 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -765,8 +766,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -823,7 +824,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); @@ -902,7 +903,7 @@ static int input ( yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1666,7 +1667,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1680,7 +1681,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1738,7 +1739,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1845,7 +1846,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -2223,12 +2224,12 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); @@ -2272,7 +2273,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ @@ -2340,7 +2341,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 34cc3b65..12b7f68e 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -2,7 +2,7 @@ #define yyHEADER_H 1 #define yyIN_HEADER 1 -#line 6 "lex_sql.h" +#line 5 "lex_sql.h" /* 这里的代码会被复制到lex_sql.cpp的最开始位置 定义yy_size_t的原因是因为flex生成的代码,会使用yy_size_t与其他类型的数字 @@ -26,7 +26,7 @@ do { \ } \ while (0); -#line 30 "lex_sql.h" +#line 29 "lex_sql.h" #define YY_INT_ALIGNED short int @@ -97,6 +97,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -210,7 +211,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -254,7 +255,7 @@ void yypop_buffer_state ( yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -310,7 +311,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); diff --git a/src/observer/storage/table/base_table.cpp b/src/observer/storage/table/base_table.cpp index 3ed85b3a..af764b2c 100644 --- a/src/observer/storage/table/base_table.cpp +++ b/src/observer/storage/table/base_table.cpp @@ -22,6 +22,9 @@ RC BaseTable::set_value_to_record(char *record_data, const Value &value, const F } } if (field->type() == AttrType::VECTORS) { + if (copy_len / sizeof(float) != data_len / sizeof(float)) { + return RC::VECTOR_DIM_MISMATCH; + } if (copy_len > data_len) { copy_len = data_len; } From 844a6db14b8d5a2877cfdeacbb2d0ae636c82957 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 13:29:15 +0800 Subject: [PATCH 297/308] =?UTF-8?q?=E5=90=91=E9=87=8F=E5=9C=A8to=5Fstring?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E5=8F=AA=E8=BE=93=E5=87=BA=E4=B8=A4?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/vector_type.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index d0f94def..a59aa42f 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -4,7 +4,9 @@ #include "common/type/vector_type.h" -#include +#include "common/value.h" +#include + int VectorType::compare(const Value &left, const Value &right) const { // 获取左向量和右向量的指针 @@ -60,7 +62,7 @@ RC VectorType::to_string(const Value &val, std::string &result) const if (i != 0) { oss << ","; // 在每个元素之间加逗号和空格 } - oss << data[i]; // 将浮点数输出到字符串流 + oss << std::fixed << std::setprecision(2) << data[i]; // 控制浮点数输出格式,最多两位小数 } oss << "]"; // 关闭数组的方括号 From 2eb1b464f5986e08a1768505ef4f092fff355973 Mon Sep 17 00:00:00 2001 From: root <503194395@qq.com> Date: Fri, 18 Oct 2024 05:50:20 +0000 Subject: [PATCH 298/308] =?UTF-8?q?vector=E6=9C=80=E9=AB=98=E6=94=AF?= =?UTF-8?q?=E6=8C=8116000=E7=BB=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/table/table.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 35553d66..18e99022 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -73,6 +73,13 @@ RC Table::create(Db *db, int32_t table_id, const char *path, const char *name, c LOG_WARN("Invalid arguments. table_name=%s, attribute_count=%d", name, attributes.size()); return RC::INVALID_ARGUMENT; } + for (const auto &att : attributes) { + if (att.type == AttrType::VECTORS) { + if (att.length > 16000 * sizeof(float) + 1) { + return RC::INVALID_ARGUMENT; + } + } + } RC rc = RC::SUCCESS; From e7e1a6007296d349ac2f6146e45bb96e780f0e75 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 14:00:21 +0800 Subject: [PATCH 299/308] =?UTF-8?q?=E5=90=91=E9=87=8F=E5=9C=A8to=5Fstring?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E5=8F=AA=E8=BE=93=E5=87=BA=E4=B8=A4?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/vector_type.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index a59aa42f..33b68050 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -62,7 +62,8 @@ RC VectorType::to_string(const Value &val, std::string &result) const if (i != 0) { oss << ","; // 在每个元素之间加逗号和空格 } - oss << std::fixed << std::setprecision(2) << data[i]; // 控制浮点数输出格式,最多两位小数 + float number = std::round(data[i] * 100.0) / 100.0; + oss << number; // 控制浮点数输出格式,最多两位小数 } oss << "]"; // 关闭数组的方括号 From cf78288a4d5c3ab40280aae0d9515644667a9c26 Mon Sep 17 00:00:00 2001 From: root <503194395@qq.com> Date: Fri, 18 Oct 2024 06:12:15 +0000 Subject: [PATCH 300/308] =?UTF-8?q?=E5=B0=8F=E6=95=B0=E7=82=B9=E5=90=8E?= =?UTF-8?q?=E9=9D=A2=E4=B8=A4=E4=BD=8D=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/vector_type.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/observer/common/type/vector_type.cpp b/src/observer/common/type/vector_type.cpp index 33b68050..8389ac28 100644 --- a/src/observer/common/type/vector_type.cpp +++ b/src/observer/common/type/vector_type.cpp @@ -62,8 +62,7 @@ RC VectorType::to_string(const Value &val, std::string &result) const if (i != 0) { oss << ","; // 在每个元素之间加逗号和空格 } - float number = std::round(data[i] * 100.0) / 100.0; - oss << number; // 控制浮点数输出格式,最多两位小数 + oss << common::double_to_str(data[i]); } oss << "]"; // 关闭数组的方括号 From fbf36e1e44f3cd19b51e036fd36ce7f009fe2ed3 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 20:25:00 +0800 Subject: [PATCH 301/308] =?UTF-8?q?=E4=BC=98=E5=8C=96order=5Fby?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/operator/order_by_logical_operator.h | 9 +-------- src/observer/sql/operator/order_by_physical_operator.cpp | 9 +-------- src/observer/sql/operator/order_by_physical_operator.h | 7 +------ src/observer/sql/optimizer/logical_plan_generator.cpp | 8 +------- src/observer/sql/optimizer/physical_plan_generator.cpp | 3 +-- 5 files changed, 5 insertions(+), 31 deletions(-) diff --git a/src/observer/sql/operator/order_by_logical_operator.h b/src/observer/sql/operator/order_by_logical_operator.h index 142fa540..648c16c3 100644 --- a/src/observer/sql/operator/order_by_logical_operator.h +++ b/src/observer/sql/operator/order_by_logical_operator.h @@ -23,19 +23,12 @@ See the Mulan PSL v2 for more details. */ class OrderByLogicalOperator : public LogicalOperator { public: - OrderByLogicalOperator(std::vector order_by, const std::vector exprs) - : order_by_(std::move(order_by)), exprs_(std::move(exprs)) - {} + OrderByLogicalOperator(std::vector order_by) : order_by_(std::move(order_by)) {} LogicalOperatorType type() const override { return LogicalOperatorType::ORDER_BY; } std::vector &order_by() { return order_by_; } - std::vector &exprs() { return exprs_; } - private: std::vector order_by_; - - /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr - std::vector exprs_; }; \ No newline at end of file diff --git a/src/observer/sql/operator/order_by_physical_operator.cpp b/src/observer/sql/operator/order_by_physical_operator.cpp index 9f3c4099..2ada8994 100644 --- a/src/observer/sql/operator/order_by_physical_operator.cpp +++ b/src/observer/sql/operator/order_by_physical_operator.cpp @@ -16,15 +16,8 @@ See the Mulan PSL v2 for more details. */ #include -OrderByPhysicalOperator::OrderByPhysicalOperator(vector order_by, vector exprs) - : order_by_(std::move(order_by)), exprs_(std::move(exprs)) +OrderByPhysicalOperator::OrderByPhysicalOperator(vector order_by) : order_by_(std::move(order_by)) { - vector expressions; - expressions.reserve(exprs_.size()); - for (auto &expr : exprs_) { - expressions.push_back(expr); - } - order_and_field_line = order_list([this](const order_line &cells_a, const order_line &cells_b) -> bool { auto order_size = order_by_.size(); auto &order_line_a = cells_a.first; diff --git a/src/observer/sql/operator/order_by_physical_operator.h b/src/observer/sql/operator/order_by_physical_operator.h index 5f901838..47d3d47b 100644 --- a/src/observer/sql/operator/order_by_physical_operator.h +++ b/src/observer/sql/operator/order_by_physical_operator.h @@ -21,7 +21,7 @@ See the Mulan PSL v2 for more details. */ class OrderByPhysicalOperator : public PhysicalOperator { public: - OrderByPhysicalOperator(std::vector order_by, std::vector exprs); + OrderByPhysicalOperator(std::vector order_by); virtual ~OrderByPhysicalOperator() = default; @@ -29,8 +29,6 @@ class OrderByPhysicalOperator : public PhysicalOperator std::vector &order_by() { return order_by_; } - std::vector &exprs() { return exprs_; } - RC fetch_and_sort_tables(); RC open(Trx *trx) override; RC next() override; @@ -41,9 +39,6 @@ class OrderByPhysicalOperator : public PhysicalOperator private: std::vector order_by_; - /// 在 create order by stmt 之前提取 select clause 后的 field_expr (非agg_expr 中的) 和 agg_expr - std::vector exprs_; - using order_line = pair, Tuple *>; using order_func = std::function; using order_list = std::priority_queue, order_func>; diff --git a/src/observer/sql/optimizer/logical_plan_generator.cpp b/src/observer/sql/optimizer/logical_plan_generator.cpp index eea2444d..516c8493 100644 --- a/src/observer/sql/optimizer/logical_plan_generator.cpp +++ b/src/observer/sql/optimizer/logical_plan_generator.cpp @@ -389,13 +389,7 @@ RC LogicalPlanGenerator::create_order_by_plan(SelectStmt *select_stmt, unique_pt return RC::SUCCESS; } - std::vector query_expressions; - for (auto &expr : select_stmt->query_expressions()) { - query_expressions.push_back(expr.get()); - } - - unique_ptr orderby_oper( - new OrderByLogicalOperator(std::move(select_stmt->order_by()), query_expressions)); + unique_ptr orderby_oper(new OrderByLogicalOperator(std::move(select_stmt->order_by()))); logical_operator = std::move(orderby_oper); return RC::SUCCESS; } diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index c54c6fb1..1f00bccf 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -438,8 +438,7 @@ RC PhysicalPlanGenerator::create_plan(OrderByLogicalOperator &logical_oper, std: } } - OrderByPhysicalOperator *orderby_operator = - new OrderByPhysicalOperator(std::move(logical_oper.order_by()), std::move(logical_oper.exprs())); + OrderByPhysicalOperator *orderby_operator = new OrderByPhysicalOperator(std::move(logical_oper.order_by())); if (child_phy_oper) { orderby_operator->add_child(std::move(child_phy_oper)); } From 82cb2b51f6be183ae31339abea05c3ffc4d257c7 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Fri, 18 Oct 2024 21:30:34 +0800 Subject: [PATCH 302/308] =?UTF-8?q?=E5=88=A0=E9=99=A4builtin::vector=5Fdis?= =?UTF-8?q?tance::Type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/sql/builtin/builtin.cpp | 20 +-- src/observer/sql/builtin/builtin.h | 26 ++++ src/observer/sql/expr/aggregate_hash_table.h | 4 +- src/observer/sql/expr/expression.cpp | 136 +++++++++--------- src/observer/sql/expr/expression.h | 48 ++----- .../aggregate_vec_physical_operator.cpp | 4 +- .../scalar_group_by_physical_operator.cpp | 2 +- src/observer/sql/parser/expression_binder.cpp | 26 ++-- 8 files changed, 131 insertions(+), 135 deletions(-) diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 70f202c9..07eade94 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -259,14 +259,8 @@ RC date_format(const vector &args, Value &result) } namespace vector_distance { -enum class Type -{ - L2, - COSINE, - INNER, -}; -RC distance(const std::vector &args, Value &result, Type type) +RC distance(const std::vector &args, Value &result, NormalFunctionType type) { if (args.size() != 2) { return RC::INVALID_ARGUMENT; @@ -308,7 +302,7 @@ RC distance(const std::vector &args, Value &result, Type type) } switch (type) { - case Type::L2: { + case NormalFunctionType::L2_DISTANCE: { /* * l2_distance * 语法:l2_distance(vector A, vector B) @@ -324,7 +318,7 @@ RC distance(const std::vector &args, Value &result, Type type) result = Value(ans); return RC::SUCCESS; } - case Type::COSINE: { + case NormalFunctionType::COSINE_DISTANCE: { /* * cosine_distance: * 语法:cosine_distance(vector A, vector B) @@ -352,7 +346,7 @@ RC distance(const std::vector &args, Value &result, Type type) result = Value(1 - cosine_similarity); return RC::SUCCESS; } - case Type::INNER: { + case NormalFunctionType::INNER_PRODUCT: { /* * inner_product: * 语法:inner_product(vector A, vector B) @@ -378,17 +372,17 @@ RC distance(const std::vector &args, Value &result, Type type) RC l2_distance(const vector &args, Value &result) { - return vector_distance::distance(args, result, vector_distance::Type::L2); + return vector_distance::distance(args, result, NormalFunctionType::L2_DISTANCE); } RC cosine_distance(const vector &args, Value &result) { - return vector_distance::distance(args, result, vector_distance::Type::COSINE); + return vector_distance::distance(args, result, NormalFunctionType::COSINE_DISTANCE); } RC inner_product(const vector &args, Value &result) { - return vector_distance::distance(args, result, vector_distance::Type::INNER); + return vector_distance::distance(args, result, NormalFunctionType::INNER_PRODUCT); } RC string_to_vector(const vector &args, Value &result) diff --git a/src/observer/sql/builtin/builtin.h b/src/observer/sql/builtin/builtin.h index 255f72cf..8717c475 100644 --- a/src/observer/sql/builtin/builtin.h +++ b/src/observer/sql/builtin/builtin.h @@ -16,6 +16,32 @@ See the Mulan PSL v2 for more details. */ namespace builtin { +enum NormalFunctionType +{ + TYPEOF, + LENGTH, + ROUND, + YEAR, + MONTH, + DAY, + DATE_FORMAT, + L2_DISTANCE, + COSINE_DISTANCE, + INNER_PRODUCT, + STRING_TO_VECTOR, + VECTOR_TO_STRING, + VECTOR_DIM, +}; + +enum AggregateFunctionType +{ + COUNT, + SUM, + AVG, + MAX, + MIN, +}; + extern RC _typeof(const vector &args, Value &result); extern RC length(const vector &args, Value &result); diff --git a/src/observer/sql/expr/aggregate_hash_table.h b/src/observer/sql/expr/aggregate_hash_table.h index f4df1687..cc65f5a1 100644 --- a/src/observer/sql/expr/aggregate_hash_table.h +++ b/src/observer/sql/expr/aggregate_hash_table.h @@ -96,8 +96,8 @@ class StandardAggregateHashTable : public AggregateHashTable private: /// group by values -> aggregate values - StandardHashTable aggr_values_; - std::vector aggr_types_; + StandardHashTable aggr_values_; + std::vector aggr_types_; }; /** diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 896d9799..236f9f13 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -666,9 +666,11 @@ UnboundFunctionExpr::UnboundFunctionExpr(const char *aggregate_name, std::vector {} //////////////////////////////////////////////////////////////////////////////// -AggregateFunctionExpr::AggregateFunctionExpr(Type type, Expression *child) : aggregate_type_(type), child_(child) {} +AggregateFunctionExpr::AggregateFunctionExpr(builtin::AggregateFunctionType type, Expression *child) + : aggregate_type_(type), child_(child) +{} -AggregateFunctionExpr::AggregateFunctionExpr(Type type, unique_ptr child) +AggregateFunctionExpr::AggregateFunctionExpr(builtin::AggregateFunctionType type, unique_ptr child) : aggregate_type_(type), child_(std::move(child)) {} @@ -699,23 +701,23 @@ unique_ptr AggregateFunctionExpr::create_aggregator() const { unique_ptr aggregator; switch (aggregate_type_) { - case Type::SUM: { + case builtin::AggregateFunctionType::SUM: { aggregator = make_unique(); break; } - case Type::COUNT: { + case builtin::AggregateFunctionType::COUNT: { aggregator = make_unique(); break; } - case Type::AVG: { + case builtin::AggregateFunctionType::AVG: { aggregator = make_unique(); break; } - case Type::MAX: { + case builtin::AggregateFunctionType::MAX: { aggregator = make_unique(); break; } - case Type::MIN: { + case builtin::AggregateFunctionType::MIN: { aggregator = make_unique(); break; } @@ -732,13 +734,13 @@ RC AggregateFunctionExpr::get_value(const Tuple &tuple, Value &value) return tuple.find_cell(TupleCellSpec(name()), value); } -RC AggregateFunctionExpr::type_from_string(const char *type_str, AggregateFunctionExpr::Type &type) +RC AggregateFunctionExpr::type_from_string(const char *type_str, builtin::AggregateFunctionType &type) { - check_type("sum", Type::SUM); - check_type("avg", Type::AVG); - check_type("max", Type::MAX); - check_type("min", Type::MIN); - check_type("count", Type::COUNT); + check_type("sum", builtin::AggregateFunctionType::SUM); + check_type("avg", builtin::AggregateFunctionType::AVG); + check_type("max", builtin::AggregateFunctionType::MAX); + check_type("min", builtin::AggregateFunctionType::MIN); + check_type("count", builtin::AggregateFunctionType::COUNT); return RC::INVALID_ARGUMENT; } @@ -864,21 +866,21 @@ ListExpr::ListExpr(std::vector &&exprs) exprs.clear(); } -RC NormalFunctionExpr::type_from_string(const char *type_str, NormalFunctionExpr::Type &type) -{ - check_type("typeof", Type::TYPEOF); - check_type("day", Type::DAY); - check_type("month", Type::MONTH); - check_type("year", Type::YEAR); - check_type("date_format", Type::DATE_FORMAT); - check_type("length", Type::LENGTH); - check_type("round", Type::ROUND); - check_type("l2_distance", Type::L2_DISTANCE); - check_type("cosine_distance", Type::COSINE_DISTANCE); - check_type("inner_product", Type::INNER_PRODUCT); - check_type("string_to_vector", Type::STRING_TO_VECTOR); - check_type("vector_to_string", Type::VECTOR_TO_STRING); - check_type("vector_dim", Type::VECTOR_DIM); +RC NormalFunctionExpr::type_from_string(const char *type_str, builtin::NormalFunctionType &type) +{ + check_type("typeof", builtin::NormalFunctionType::TYPEOF); + check_type("day", builtin::NormalFunctionType::DAY); + check_type("month", builtin::NormalFunctionType::MONTH); + check_type("year", builtin::NormalFunctionType::YEAR); + check_type("date_format", builtin::NormalFunctionType::DATE_FORMAT); + check_type("length", builtin::NormalFunctionType::LENGTH); + check_type("round", builtin::NormalFunctionType::ROUND); + check_type("l2_distance", builtin::NormalFunctionType::L2_DISTANCE); + check_type("cosine_distance", builtin::NormalFunctionType::COSINE_DISTANCE); + check_type("inner_product", builtin::NormalFunctionType::INNER_PRODUCT); + check_type("string_to_vector", builtin::NormalFunctionType::STRING_TO_VECTOR); + check_type("vector_to_string", builtin::NormalFunctionType::VECTOR_TO_STRING); + check_type("vector_dim", builtin::NormalFunctionType::VECTOR_DIM); return RC::INVALID_ARGUMENT; } @@ -894,19 +896,19 @@ RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) args_values_.push_back(value); } switch (type_) { - case Type::LENGTH: return builtin::length(args_values_, result); - case Type::ROUND: return builtin::round(args_values_, result); - case Type::DATE_FORMAT: return builtin::date_format(args_values_, result); - case Type::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); - case Type::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); - case Type::VECTOR_DIM: return builtin::vector_dim(args_values_, result); - case Type::YEAR: return builtin::year(args_values_, result); - case Type::MONTH: return builtin::month(args_values_, result); - case Type::DAY: return builtin::day(args_values_, result); - case Type::L2_DISTANCE: return builtin::l2_distance(args_values_, result); - case Type::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); - case Type::INNER_PRODUCT: return builtin::inner_product(args_values_, result); - case Type::TYPEOF: return builtin::_typeof(args_values_, result); + case builtin::NormalFunctionType::LENGTH: return builtin::length(args_values_, result); + case builtin::NormalFunctionType::ROUND: return builtin::round(args_values_, result); + case builtin::NormalFunctionType::DATE_FORMAT: return builtin::date_format(args_values_, result); + case builtin::NormalFunctionType::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); + case builtin::NormalFunctionType::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); + case builtin::NormalFunctionType::VECTOR_DIM: return builtin::vector_dim(args_values_, result); + case builtin::NormalFunctionType::YEAR: return builtin::year(args_values_, result); + case builtin::NormalFunctionType::MONTH: return builtin::month(args_values_, result); + case builtin::NormalFunctionType::DAY: return builtin::day(args_values_, result); + case builtin::NormalFunctionType::L2_DISTANCE: return builtin::l2_distance(args_values_, result); + case builtin::NormalFunctionType::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); + case builtin::NormalFunctionType::INNER_PRODUCT: return builtin::inner_product(args_values_, result); + case builtin::NormalFunctionType::TYPEOF: return builtin::_typeof(args_values_, result); } return RC::INTERNAL; } @@ -923,19 +925,19 @@ RC NormalFunctionExpr::try_get_value(Value &result) const args_values_.push_back(value); } switch (type_) { - case Type::LENGTH: return builtin::length(args_values_, result); - case Type::ROUND: return builtin::round(args_values_, result); - case Type::DATE_FORMAT: return builtin::date_format(args_values_, result); - case Type::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); - case Type::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); - case Type::VECTOR_DIM: return builtin::vector_dim(args_values_, result); - case Type::YEAR: return builtin::year(args_values_, result); - case Type::MONTH: return builtin::month(args_values_, result); - case Type::DAY: return builtin::day(args_values_, result); - case Type::L2_DISTANCE: return builtin::l2_distance(args_values_, result); - case Type::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); - case Type::INNER_PRODUCT: return builtin::inner_product(args_values_, result); - case Type::TYPEOF: return builtin::_typeof(args_values_, result); + case builtin::NormalFunctionType::LENGTH: return builtin::length(args_values_, result); + case builtin::NormalFunctionType::ROUND: return builtin::round(args_values_, result); + case builtin::NormalFunctionType::DATE_FORMAT: return builtin::date_format(args_values_, result); + case builtin::NormalFunctionType::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); + case builtin::NormalFunctionType::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); + case builtin::NormalFunctionType::VECTOR_DIM: return builtin::vector_dim(args_values_, result); + case builtin::NormalFunctionType::YEAR: return builtin::year(args_values_, result); + case builtin::NormalFunctionType::MONTH: return builtin::month(args_values_, result); + case builtin::NormalFunctionType::DAY: return builtin::day(args_values_, result); + case builtin::NormalFunctionType::L2_DISTANCE: return builtin::l2_distance(args_values_, result); + case builtin::NormalFunctionType::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); + case builtin::NormalFunctionType::INNER_PRODUCT: return builtin::inner_product(args_values_, result); + case builtin::NormalFunctionType::TYPEOF: return builtin::_typeof(args_values_, result); } return RC::INTERNAL; } @@ -943,19 +945,19 @@ RC NormalFunctionExpr::try_get_value(Value &result) const AttrType NormalFunctionExpr::value_type() const { switch (type_) { - case Type::LENGTH: return AttrType::INTS; - case Type::ROUND: return AttrType::FLOATS; - case Type::DATE_FORMAT: return AttrType::CHARS; - case Type::STRING_TO_VECTOR: return AttrType::VECTORS; - case Type::VECTOR_TO_STRING: return AttrType::CHARS; - case Type::VECTOR_DIM: return AttrType::INTS; - case Type::YEAR: return AttrType::INTS; - case Type::MONTH: return AttrType::INTS; - case Type::DAY: return AttrType::INTS; - case Type::L2_DISTANCE: return AttrType::FLOATS; - case Type::COSINE_DISTANCE: return AttrType::FLOATS; - case Type::INNER_PRODUCT: return AttrType::FLOATS; - case Type::TYPEOF: return AttrType::CHARS; + case builtin::NormalFunctionType::LENGTH: return AttrType::INTS; + case builtin::NormalFunctionType::ROUND: return AttrType::FLOATS; + case builtin::NormalFunctionType::DATE_FORMAT: return AttrType::CHARS; + case builtin::NormalFunctionType::STRING_TO_VECTOR: return AttrType::VECTORS; + case builtin::NormalFunctionType::VECTOR_TO_STRING: return AttrType::CHARS; + case builtin::NormalFunctionType::VECTOR_DIM: return AttrType::INTS; + case builtin::NormalFunctionType::YEAR: return AttrType::INTS; + case builtin::NormalFunctionType::MONTH: return AttrType::INTS; + case builtin::NormalFunctionType::DAY: return AttrType::INTS; + case builtin::NormalFunctionType::L2_DISTANCE: return AttrType::FLOATS; + case builtin::NormalFunctionType::COSINE_DISTANCE: return AttrType::FLOATS; + case builtin::NormalFunctionType::INNER_PRODUCT: return AttrType::FLOATS; + case builtin::NormalFunctionType::TYPEOF: return AttrType::CHARS; } return AttrType::UNDEFINED; } diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index bba7aa88..9d43ad90 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -464,32 +464,16 @@ class UnboundFunctionExpr : public Expression class NormalFunctionExpr : public UnboundFunctionExpr { public: - enum class Type - { - TYPEOF, - LENGTH, - ROUND, - YEAR, - MONTH, - DAY, - DATE_FORMAT, - L2_DISTANCE, - COSINE_DISTANCE, - INNER_PRODUCT, - STRING_TO_VECTOR, - VECTOR_TO_STRING, - VECTOR_DIM, - }; - - NormalFunctionExpr(Type type, const char *aggregate_name, std::vector> child) + NormalFunctionExpr( + builtin::NormalFunctionType type, const char *aggregate_name, std::vector> child) : ::UnboundFunctionExpr(aggregate_name, std::move(child)), type_(type) {} - static RC type_from_string(const char *type_str, Type &type); + static RC type_from_string(const char *type_str, builtin::NormalFunctionType &type); ExprType type() const override { return ExprType::NORMAL_FUNCTION; } - Type function_type() const { return type_; } + builtin::NormalFunctionType function_type() const { return type_; } AttrType value_type() const override; @@ -497,24 +481,14 @@ class NormalFunctionExpr : public UnboundFunctionExpr RC try_get_value(Value &value) const override; private: - Type type_; + builtin::NormalFunctionType type_; }; class AggregateFunctionExpr : public Expression { public: - enum class Type - { - COUNT, - SUM, - AVG, - MAX, - MIN, - }; - -public: - AggregateFunctionExpr(Type type, Expression *child); - AggregateFunctionExpr(Type type, std::unique_ptr child); + AggregateFunctionExpr(builtin::AggregateFunctionType type, Expression *child); + AggregateFunctionExpr(builtin::AggregateFunctionType type, std::unique_ptr child); virtual ~AggregateFunctionExpr() = default; bool equal(const Expression &other) const override; @@ -528,7 +502,7 @@ class AggregateFunctionExpr : public Expression RC get_column(Chunk &chunk, Column &column) override; - Type aggregate_type() const { return aggregate_type_; } + builtin::AggregateFunctionType aggregate_type() const { return aggregate_type_; } std::unique_ptr &child() { return child_; } @@ -536,11 +510,11 @@ class AggregateFunctionExpr : public Expression std::unique_ptr create_aggregator() const; - static RC type_from_string(const char *type_str, Type &type); + static RC type_from_string(const char *type_str, builtin::AggregateFunctionType &type); private: - Type aggregate_type_; - std::unique_ptr child_; + builtin::AggregateFunctionType aggregate_type_; + std::unique_ptr child_; }; class SubQueryExpr : public Expression diff --git a/src/observer/sql/operator/aggregate_vec_physical_operator.cpp b/src/observer/sql/operator/aggregate_vec_physical_operator.cpp index d9ccee03..d72098e1 100644 --- a/src/observer/sql/operator/aggregate_vec_physical_operator.cpp +++ b/src/observer/sql/operator/aggregate_vec_physical_operator.cpp @@ -35,7 +35,7 @@ AggregateVecPhysicalOperator::AggregateVecPhysicalOperator(vector ASSERT(expr->type() == ExprType::AGGREGATION, "expected an aggregation expression"); auto *aggregate_expr = static_cast(expr); - if (aggregate_expr->aggregate_type() == AggregateFunctionExpr::Type::SUM) { + if (aggregate_expr->aggregate_type() == builtin::AggregateFunctionType::SUM) { if (aggregate_expr->value_type() == AttrType::INTS) { void *aggr_value = malloc(sizeof(SumState)); ((SumState *)aggr_value)->value = 0; @@ -70,7 +70,7 @@ RC AggregateVecPhysicalOperator::open(Trx *trx) value_expressions_[aggr_idx]->get_column(chunk_, column); ASSERT(aggregate_expressions_[aggr_idx]->type() == ExprType::AGGREGATION, "expect aggregate expression"); auto *aggregate_expr = static_cast(aggregate_expressions_[aggr_idx]); - if (aggregate_expr->aggregate_type() == AggregateFunctionExpr::Type::SUM) { + if (aggregate_expr->aggregate_type() == builtin::AggregateFunctionType::SUM) { if (aggregate_expr->value_type() == AttrType::INTS) { update_aggregate_state, int>(aggr_values_.at(aggr_idx), column); } else if (aggregate_expr->value_type() == AttrType::FLOATS) { diff --git a/src/observer/sql/operator/scalar_group_by_physical_operator.cpp b/src/observer/sql/operator/scalar_group_by_physical_operator.cpp index d027ff8c..e41a4ad1 100644 --- a/src/observer/sql/operator/scalar_group_by_physical_operator.cpp +++ b/src/observer/sql/operator/scalar_group_by_physical_operator.cpp @@ -98,7 +98,7 @@ RC ScalarGroupByPhysicalOperator::next() } if (group_value_ == nullptr || emitted_) { auto *aggregate_expr = static_cast(aggregate_expressions_[0]); - if (aggregate_expr->aggregate_type() == AggregateFunctionExpr::Type::COUNT) { + if (aggregate_expr->aggregate_type() == builtin::AggregateFunctionType::COUNT) { Value val(0); auto Vlist = make_unique(); Vlist->set_cells(std::vector{val}); diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 35b24747..1ed8263e 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -429,11 +429,11 @@ RC check_aggregate_expression(AggregateFunctionExpr &expression) } // 校验数据类型与聚合类型是否匹配 - AggregateFunctionExpr::Type aggregate_type = expression.aggregate_type(); - AttrType child_value_type = child_expression->value_type(); + builtin::AggregateFunctionType aggregate_type = expression.aggregate_type(); + AttrType child_value_type = child_expression->value_type(); switch (aggregate_type) { - case AggregateFunctionExpr::Type::SUM: - case AggregateFunctionExpr::Type::AVG: { + case builtin::AggregateFunctionType::SUM: + case builtin::AggregateFunctionType::AVG: { // 仅支持数值类型 if (child_value_type != AttrType::INTS && child_value_type != AttrType::FLOATS) { LOG_WARN("invalid child value type for aggregate expression: %d", static_cast(child_value_type)); @@ -441,10 +441,10 @@ RC check_aggregate_expression(AggregateFunctionExpr &expression) } } break; - case AggregateFunctionExpr::Type::COUNT: + case builtin::AggregateFunctionType::COUNT: - case AggregateFunctionExpr::Type::MAX: - case AggregateFunctionExpr::Type::MIN: { + case builtin::AggregateFunctionType::MAX: + case builtin::AggregateFunctionType::MIN: { // 任何类型都支持 } break; } @@ -472,10 +472,10 @@ RC ExpressionBinder::bind_function_expression( return RC::SUCCESS; } - auto unbound_function_expr = static_cast(expr.get()); - const char *function_name = unbound_function_expr->function_name(); - AggregateFunctionExpr::Type aggregate_type; - RC rc = AggregateFunctionExpr::type_from_string(function_name, aggregate_type); + auto unbound_function_expr = static_cast(expr.get()); + const char *function_name = unbound_function_expr->function_name(); + builtin::AggregateFunctionType aggregate_type; + RC rc = AggregateFunctionExpr::type_from_string(function_name, aggregate_type); if (OB_SUCC(rc)) { if (unbound_function_expr->args().size() != 1) { return RC::INVALID_ARGUMENT; @@ -483,7 +483,7 @@ RC ExpressionBinder::bind_function_expression( unique_ptr &child_expr = unbound_function_expr->args().front(); vector> child_bound_expressions; - if (child_expr->type() == ExprType::STAR && aggregate_type == AggregateFunctionExpr::Type::COUNT) { + if (child_expr->type() == ExprType::STAR && aggregate_type == builtin::AggregateFunctionType::COUNT) { ValueExpr *value_expr = new ValueExpr(Value(1)); child_expr.reset(value_expr); // count(*) 输出星号 @@ -518,7 +518,7 @@ RC ExpressionBinder::bind_function_expression( return RC::SUCCESS; } - NormalFunctionExpr::Type func_type; + builtin::NormalFunctionType func_type; rc = NormalFunctionExpr::type_from_string(function_name, func_type); if (OB_SUCC(rc)) { vector> child_bound_expressions; From dcea3d27480291f76b3d333b5316cc9c92ec5e32 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 19 Oct 2024 01:26:58 +0800 Subject: [PATCH 303/308] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=90=91?= =?UTF-8?q?=E9=87=8F=E7=B4=A2=E5=BC=95=E6=9E=84=E5=BB=BA=E3=80=81=E7=B4=A2?= =?UTF-8?q?=E5=BC=95=E6=9F=A5=E8=AF=A2=E5=92=8C=E6=9F=A5=E8=AF=A2=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E6=94=B9=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/value.cpp | 10 + src/observer/common/value.h | 19 +- src/observer/sql/builtin/builtin.cpp | 59 +- src/observer/sql/builtin/builtin.h | 24 + .../sql/executor/create_index_executor.cpp | 21 +- src/observer/sql/expr/expression.cpp | 107 +- src/observer/sql/expr/expression.h | 32 +- .../operator/index_scan_physical_operator.h | 1 + .../sql/operator/physical_operator.cpp | 3 + src/observer/sql/operator/physical_operator.h | 1 + .../sql/operator/table_get_logical_operator.h | 16 + .../vector_scan_physical_operator.cpp | 128 + .../operator/vector_scan_physical_operator.h | 66 + .../sql/optimizer/physical_plan_generator.cpp | 18 + src/observer/sql/optimizer/rewriter.cpp | 2 + .../optimizer/vector_index_scan_rewrite.cpp | 109 + .../sql/optimizer/vector_index_scan_rewrite.h | 29 + src/observer/sql/parser/expression_binder.cpp | 2 +- src/observer/sql/parser/parse_defs.h | 7 - src/observer/sql/parser/yacc_sql.cpp | 2669 +++++++++-------- src/observer/sql/parser/yacc_sql.y | 9 + src/observer/sql/stmt/create_index_stmt.cpp | 34 +- src/observer/sql/stmt/create_index_stmt.h | 33 +- src/observer/storage/index/index.h | 7 +- src/observer/storage/index/index_meta.cpp | 9 +- src/observer/storage/index/index_meta.h | 6 +- src/observer/storage/index/ivfflat_index.cpp | 213 ++ src/observer/storage/index/ivfflat_index.h | 46 +- src/observer/storage/record/record.h | 6 +- src/observer/storage/table/table.cpp | 132 +- src/observer/storage/table/table.h | 8 +- 31 files changed, 2404 insertions(+), 1422 deletions(-) create mode 100644 src/observer/sql/operator/vector_scan_physical_operator.cpp create mode 100644 src/observer/sql/operator/vector_scan_physical_operator.h create mode 100644 src/observer/sql/optimizer/vector_index_scan_rewrite.cpp create mode 100644 src/observer/sql/optimizer/vector_index_scan_rewrite.h create mode 100644 src/observer/storage/index/ivfflat_index.cpp diff --git a/src/observer/common/value.cpp b/src/observer/common/value.cpp index 9f2d9382..c61bd070 100644 --- a/src/observer/common/value.cpp +++ b/src/observer/common/value.cpp @@ -489,6 +489,16 @@ RC Value::borrow_text(const Value &v) return RC::SUCCESS; } +std::vector Value::get_vector() const +{ + assert(attr_type_ == AttrType::VECTORS); + std::vector vector(get_vector_length()); + for (int i = 0; i < vector.size(); ++i) { + vector[i] = get_vector_element(i); + } + return vector; +} + int Value::get_vector_length() const { assert(attr_type_ == AttrType::VECTORS); diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 35509f5c..bd2057a7 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -120,15 +120,16 @@ class Value final * 获取对应的值 * 如果当前的类型与期望获取的类型不符,就会执行转换操作 */ - int get_int() const; - float get_float() const; - string get_string() const; - bool get_boolean() const; - int get_date() const; - int get_vector_length() const; - float get_vector_element(int i) const; - bool is_null() const { return is_null_; } - inline bool is_str() const { return attr_type_ == AttrType::CHARS; } + int get_int() const; + float get_float() const; + string get_string() const; + bool get_boolean() const; + int get_date() const; + std::vector get_vector() const; + int get_vector_length() const; + float get_vector_element(int i) const; + bool is_null() const { return is_null_; } + inline bool is_str() const { return attr_type_ == AttrType::CHARS; } static int implicit_cast_cost(AttrType from, AttrType to) { diff --git a/src/observer/sql/builtin/builtin.cpp b/src/observer/sql/builtin/builtin.cpp index 831fb30a..00526696 100644 --- a/src/observer/sql/builtin/builtin.cpp +++ b/src/observer/sql/builtin/builtin.cpp @@ -9,7 +9,6 @@ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ #include "builtin.h" -#include "sql/parser/parse_defs.h" namespace builtin { @@ -261,7 +260,7 @@ RC date_format(const vector &args, Value &result) namespace vector_distance { -RC distance(const std::vector &args, Value &result, VectorDistanceType type) +RC distance(const std::vector &args, Value &result, NormalFunctionType type) { if (args.size() != 2) { return RC::INVALID_ARGUMENT; @@ -303,7 +302,7 @@ RC distance(const std::vector &args, Value &result, VectorDistanceType ty } switch (type) { - case VectorDistanceType::L2: { + case NormalFunctionType::L2_DISTANCE: { /* * l2_distance * 语法:l2_distance(vector A, vector B) @@ -319,7 +318,7 @@ RC distance(const std::vector &args, Value &result, VectorDistanceType ty result = Value(ans); return RC::SUCCESS; } - case VectorDistanceType::COSINE: { + case NormalFunctionType::COSINE_DISTANCE: { /* * cosine_distance: * 语法:cosine_distance(vector A, vector B) @@ -347,7 +346,7 @@ RC distance(const std::vector &args, Value &result, VectorDistanceType ty result = Value(1 - cosine_similarity); return RC::SUCCESS; } - case VectorDistanceType::INNER: { + case NormalFunctionType::INNER_PRODUCT: { /* * inner_product: * 语法:inner_product(vector A, vector B) @@ -373,17 +372,61 @@ RC distance(const std::vector &args, Value &result, VectorDistanceType ty RC l2_distance(const vector &args, Value &result) { - return vector_distance::distance(args, result, VectorDistanceType::L2); + return vector_distance::distance(args, result, NormalFunctionType::L2_DISTANCE); } RC cosine_distance(const vector &args, Value &result) { - return vector_distance::distance(args, result, VectorDistanceType::COSINE); + return vector_distance::distance(args, result, NormalFunctionType::COSINE_DISTANCE); } RC inner_product(const vector &args, Value &result) { - return vector_distance::distance(args, result, VectorDistanceType::INNER); + return vector_distance::distance(args, result, NormalFunctionType::INNER_PRODUCT); +} + +// 向量索引调用以下方法 +// L2 距离(欧氏距离) +float l2_distance(const std::vector &a, const std::vector &b) +{ + float sum = 0.0; + for (size_t i = 0; i < a.size(); ++i) { + float diff = a[i] - b[i]; + sum += diff * diff; + } + return std::sqrt(sum); +} + +// 余弦距离 +float cosine_distance(const std::vector &a, const std::vector &b) +{ + float dotProduct = 0.0; + float normASquared = 0.0; + float normBSquared = 0.0; + + for (size_t i = 0; i < a.size(); ++i) { + dotProduct += a[i] * b[i]; + normASquared += a[i] * a[i]; + normBSquared += b[i] * b[i]; + } + + float denom = std::sqrt(normASquared) * std::sqrt(normBSquared); + if (denom == 0.0) { + return 1.0; // 避免除以 0 的情况 + } + + float cosineSimilarity = dotProduct / denom; + return 1.0 - cosineSimilarity; // 将相似度转变为距离 +} + +// 内积 +float inner_product(const std::vector &a, const std::vector &b) +{ + float product = 0.0; + for (size_t i = 0; i < a.size(); ++i) { + product += a[i] * b[i]; + } + return product; } RC string_to_vector(const vector &args, Value &result) diff --git a/src/observer/sql/builtin/builtin.h b/src/observer/sql/builtin/builtin.h index 255f72cf..1f8ae70e 100644 --- a/src/observer/sql/builtin/builtin.h +++ b/src/observer/sql/builtin/builtin.h @@ -14,6 +14,23 @@ See the Mulan PSL v2 for more details. */ #include "common/utils.h" #include +enum class NormalFunctionType +{ + TYPEOF, + LENGTH, + ROUND, + YEAR, + MONTH, + DAY, + DATE_FORMAT, + L2_DISTANCE, + COSINE_DISTANCE, + INNER_PRODUCT, + STRING_TO_VECTOR, + VECTOR_TO_STRING, + VECTOR_DIM, +}; + namespace builtin { extern RC _typeof(const vector &args, Value &result); @@ -36,6 +53,13 @@ extern RC cosine_distance(const vector &args, Value &result); extern RC inner_product(const vector &args, Value &result); +// 以下方法为向量索引中使用 +extern float l2_distance(const std::vector &a, const std::vector &b); + +extern float cosine_distance(const std::vector &a, const std::vector &b); + +extern float inner_product(const std::vector &a, const std::vector &b); + extern RC string_to_vector(const vector &args, Value &result); extern RC vector_to_string(const vector &args, Value &result); diff --git a/src/observer/sql/executor/create_index_executor.cpp b/src/observer/sql/executor/create_index_executor.cpp index a5e256d4..a955c473 100644 --- a/src/observer/sql/executor/create_index_executor.cpp +++ b/src/observer/sql/executor/create_index_executor.cpp @@ -32,6 +32,21 @@ RC CreateIndexExecutor::execute(SQLStageEvent *sql_event) Trx *trx = session->current_trx(); Table *table = create_index_stmt->table(); - return table->create_index( - trx, create_index_stmt->field_meta(), create_index_stmt->index_name().c_str(), create_index_stmt->unique()); -} \ No newline at end of file + + if (create_index_stmt->index_type() == IndexType::BPlusTreeIndex) { + return table->create_index(trx, + create_index_stmt->index_type(), + create_index_stmt->field_meta(), + create_index_stmt->index_name().c_str(), + create_index_stmt->unique()); + } + if (create_index_stmt->index_type() == IndexType::VectorIVFFlatIndex) { + return table->create_vector_index(trx, + create_index_stmt->index_type(), + create_index_stmt->field_meta(), + create_index_stmt->index_name().c_str(), + create_index_stmt->distance_type(), + create_index_stmt->options()); + } + return RC::UNSUPPORTED; +} diff --git a/src/observer/sql/expr/expression.cpp b/src/observer/sql/expr/expression.cpp index 065a030e..f77fee9c 100644 --- a/src/observer/sql/expr/expression.cpp +++ b/src/observer/sql/expr/expression.cpp @@ -864,21 +864,20 @@ ListExpr::ListExpr(std::vector &&exprs) exprs.clear(); } -RC NormalFunctionExpr::type_from_string(const char *type_str, NormalFunctionExpr::Type &type) -{ - check_type("typeof", Type::TYPEOF); - check_type("day", Type::DAY); - check_type("month", Type::MONTH); - check_type("year", Type::YEAR); - check_type("date_format", Type::DATE_FORMAT); - check_type("length", Type::LENGTH); - check_type("round", Type::ROUND); - check_type("l2_distance", Type::L2_DISTANCE); - check_type("cosine_distance", Type::COSINE_DISTANCE); - check_type("inner_product", Type::INNER_PRODUCT); - check_type("string_to_vector", Type::STRING_TO_VECTOR); - check_type("vector_to_string", Type::VECTOR_TO_STRING); - check_type("vector_dim", Type::VECTOR_DIM); +RC NormalFunctionExpr::type_from_string(const char *type_str, NormalFunctionType &type) +{ + check_type("typeof", NormalFunctionType::TYPEOF); + check_type("month", NormalFunctionType::MONTH); + check_type("year", NormalFunctionType::YEAR); + check_type("date_format", NormalFunctionType::DATE_FORMAT); + check_type("length", NormalFunctionType::LENGTH); + check_type("round", NormalFunctionType::ROUND); + check_type("l2_distance", NormalFunctionType::L2_DISTANCE); + check_type("cosine_distance", NormalFunctionType::COSINE_DISTANCE); + check_type("inner_product", NormalFunctionType::INNER_PRODUCT); + check_type("string_to_vector", NormalFunctionType::STRING_TO_VECTOR); + check_type("vector_to_string", NormalFunctionType::VECTOR_TO_STRING); + check_type("vector_dim", NormalFunctionType::VECTOR_DIM); return RC::INVALID_ARGUMENT; } @@ -894,19 +893,19 @@ RC NormalFunctionExpr::get_value(const Tuple &tuple, Value &result) args_values_.push_back(value); } switch (type_) { - case Type::LENGTH: return builtin::length(args_values_, result); - case Type::ROUND: return builtin::round(args_values_, result); - case Type::DATE_FORMAT: return builtin::date_format(args_values_, result); - case Type::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); - case Type::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); - case Type::VECTOR_DIM: return builtin::vector_dim(args_values_, result); - case Type::YEAR: return builtin::year(args_values_, result); - case Type::MONTH: return builtin::month(args_values_, result); - case Type::DAY: return builtin::day(args_values_, result); - case Type::L2_DISTANCE: return builtin::l2_distance(args_values_, result); - case Type::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); - case Type::INNER_PRODUCT: return builtin::inner_product(args_values_, result); - case Type::TYPEOF: return builtin::_typeof(args_values_, result); + case NormalFunctionType::LENGTH: return builtin::length(args_values_, result); + case NormalFunctionType::ROUND: return builtin::round(args_values_, result); + case NormalFunctionType::DATE_FORMAT: return builtin::date_format(args_values_, result); + case NormalFunctionType::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); + case NormalFunctionType::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); + case NormalFunctionType::VECTOR_DIM: return builtin::vector_dim(args_values_, result); + case NormalFunctionType::YEAR: return builtin::year(args_values_, result); + case NormalFunctionType::MONTH: return builtin::month(args_values_, result); + case NormalFunctionType::DAY: return builtin::day(args_values_, result); + case NormalFunctionType::L2_DISTANCE: return builtin::l2_distance(args_values_, result); + case NormalFunctionType::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); + case NormalFunctionType::INNER_PRODUCT: return builtin::inner_product(args_values_, result); + case NormalFunctionType::TYPEOF: return builtin::_typeof(args_values_, result); } return RC::INTERNAL; } @@ -923,19 +922,19 @@ RC NormalFunctionExpr::try_get_value(Value &result) const args_values_.push_back(value); } switch (type_) { - case Type::LENGTH: return builtin::length(args_values_, result); - case Type::ROUND: return builtin::round(args_values_, result); - case Type::DATE_FORMAT: return builtin::date_format(args_values_, result); - case Type::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); - case Type::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); - case Type::VECTOR_DIM: return builtin::vector_dim(args_values_, result); - case Type::YEAR: return builtin::year(args_values_, result); - case Type::MONTH: return builtin::month(args_values_, result); - case Type::DAY: return builtin::day(args_values_, result); - case Type::L2_DISTANCE: return builtin::l2_distance(args_values_, result); - case Type::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); - case Type::INNER_PRODUCT: return builtin::inner_product(args_values_, result); - case Type::TYPEOF: return builtin::_typeof(args_values_, result); + case NormalFunctionType::LENGTH: return builtin::length(args_values_, result); + case NormalFunctionType::ROUND: return builtin::round(args_values_, result); + case NormalFunctionType::DATE_FORMAT: return builtin::date_format(args_values_, result); + case NormalFunctionType::STRING_TO_VECTOR: return builtin::string_to_vector(args_values_, result); + case NormalFunctionType::VECTOR_TO_STRING: return builtin::vector_to_string(args_values_, result); + case NormalFunctionType::VECTOR_DIM: return builtin::vector_dim(args_values_, result); + case NormalFunctionType::YEAR: return builtin::year(args_values_, result); + case NormalFunctionType::MONTH: return builtin::month(args_values_, result); + case NormalFunctionType::DAY: return builtin::day(args_values_, result); + case NormalFunctionType::L2_DISTANCE: return builtin::l2_distance(args_values_, result); + case NormalFunctionType::COSINE_DISTANCE: return builtin::cosine_distance(args_values_, result); + case NormalFunctionType::INNER_PRODUCT: return builtin::inner_product(args_values_, result); + case NormalFunctionType::TYPEOF: return builtin::_typeof(args_values_, result); } return RC::INTERNAL; } @@ -943,19 +942,19 @@ RC NormalFunctionExpr::try_get_value(Value &result) const AttrType NormalFunctionExpr::value_type() const { switch (type_) { - case Type::LENGTH: return AttrType::INTS; - case Type::ROUND: return AttrType::FLOATS; - case Type::DATE_FORMAT: return AttrType::CHARS; - case Type::STRING_TO_VECTOR: return AttrType::VECTORS; - case Type::VECTOR_TO_STRING: return AttrType::CHARS; - case Type::VECTOR_DIM: return AttrType::INTS; - case Type::YEAR: return AttrType::INTS; - case Type::MONTH: return AttrType::INTS; - case Type::DAY: return AttrType::INTS; - case Type::L2_DISTANCE: return AttrType::FLOATS; - case Type::COSINE_DISTANCE: return AttrType::FLOATS; - case Type::INNER_PRODUCT: return AttrType::FLOATS; - case Type::TYPEOF: return AttrType::CHARS; + case NormalFunctionType::LENGTH: return AttrType::INTS; + case NormalFunctionType::ROUND: return AttrType::FLOATS; + case NormalFunctionType::DATE_FORMAT: return AttrType::CHARS; + case NormalFunctionType::STRING_TO_VECTOR: return AttrType::VECTORS; + case NormalFunctionType::VECTOR_TO_STRING: return AttrType::CHARS; + case NormalFunctionType::VECTOR_DIM: return AttrType::INTS; + case NormalFunctionType::YEAR: return AttrType::INTS; + case NormalFunctionType::MONTH: return AttrType::INTS; + case NormalFunctionType::DAY: return AttrType::INTS; + case NormalFunctionType::L2_DISTANCE: return AttrType::FLOATS; + case NormalFunctionType::COSINE_DISTANCE: return AttrType::FLOATS; + case NormalFunctionType::INNER_PRODUCT: return AttrType::FLOATS; + case NormalFunctionType::TYPEOF: return AttrType::CHARS; } return AttrType::UNDEFINED; } diff --git a/src/observer/sql/expr/expression.h b/src/observer/sql/expr/expression.h index bba7aa88..0ae485ae 100644 --- a/src/observer/sql/expr/expression.h +++ b/src/observer/sql/expr/expression.h @@ -464,32 +464,22 @@ class UnboundFunctionExpr : public Expression class NormalFunctionExpr : public UnboundFunctionExpr { public: - enum class Type - { - TYPEOF, - LENGTH, - ROUND, - YEAR, - MONTH, - DAY, - DATE_FORMAT, - L2_DISTANCE, - COSINE_DISTANCE, - INNER_PRODUCT, - STRING_TO_VECTOR, - VECTOR_TO_STRING, - VECTOR_DIM, - }; - - NormalFunctionExpr(Type type, const char *aggregate_name, std::vector> child) + NormalFunctionExpr( + NormalFunctionType type, const char *aggregate_name, std::vector> child) : ::UnboundFunctionExpr(aggregate_name, std::move(child)), type_(type) {} - static RC type_from_string(const char *type_str, Type &type); + static RC type_from_string(const char *type_str, NormalFunctionType &type); ExprType type() const override { return ExprType::NORMAL_FUNCTION; } - Type function_type() const { return type_; } + bool is_vector_distance_func() + { + return type_ == NormalFunctionType::L2_DISTANCE || type_ == NormalFunctionType::COSINE_DISTANCE || + type_ == NormalFunctionType::INNER_PRODUCT; + } + + NormalFunctionType function_type() const { return type_; } AttrType value_type() const override; @@ -497,7 +487,7 @@ class NormalFunctionExpr : public UnboundFunctionExpr RC try_get_value(Value &value) const override; private: - Type type_; + NormalFunctionType type_; }; class AggregateFunctionExpr : public Expression diff --git a/src/observer/sql/operator/index_scan_physical_operator.h b/src/observer/sql/operator/index_scan_physical_operator.h index fb7b8939..04347d19 100644 --- a/src/observer/sql/operator/index_scan_physical_operator.h +++ b/src/observer/sql/operator/index_scan_physical_operator.h @@ -25,6 +25,7 @@ See the Mulan PSL v2 for more details. */ class IndexScanPhysicalOperator : public PhysicalOperator { public: + // 实际上这个旧接口用不到了 IndexScanPhysicalOperator(Table *table, Index *index, ReadWriteMode mode, const Value *left_value, bool left_inclusive, const Value *right_value, bool right_inclusive); diff --git a/src/observer/sql/operator/physical_operator.cpp b/src/observer/sql/operator/physical_operator.cpp index 1ff4eeaf..f846778e 100644 --- a/src/observer/sql/operator/physical_operator.cpp +++ b/src/observer/sql/operator/physical_operator.cpp @@ -20,6 +20,9 @@ std::string physical_operator_type_name(PhysicalOperatorType type) case PhysicalOperatorType::TABLE_SCAN: return "TABLE_SCAN"; case PhysicalOperatorType::INDEX_SCAN: return "INDEX_SCAN"; case PhysicalOperatorType::VIEW_SCAN: return "VIEW_SCAN"; + case PhysicalOperatorType::VECTOR_INDEX_SCAN: return "VECTOR_INDEX_SCAN"; + case PhysicalOperatorType::LIMIT: return "LIMIT"; + case PhysicalOperatorType::ORDER_BY: return "ORDER_BY"; case PhysicalOperatorType::NESTED_LOOP_JOIN: return "NESTED_LOOP_JOIN"; case PhysicalOperatorType::EXPLAIN: return "EXPLAIN"; case PhysicalOperatorType::PREDICATE: return "PREDICATE"; diff --git a/src/observer/sql/operator/physical_operator.h b/src/observer/sql/operator/physical_operator.h index d9a0a7bb..30352523 100644 --- a/src/observer/sql/operator/physical_operator.h +++ b/src/observer/sql/operator/physical_operator.h @@ -41,6 +41,7 @@ enum class PhysicalOperatorType TABLE_SCAN_VEC, INDEX_SCAN, VIEW_SCAN, + VECTOR_INDEX_SCAN, NESTED_LOOP_JOIN, EXPLAIN, PREDICATE, diff --git a/src/observer/sql/operator/table_get_logical_operator.h b/src/observer/sql/operator/table_get_logical_operator.h index 66e2e151..4f173246 100644 --- a/src/observer/sql/operator/table_get_logical_operator.h +++ b/src/observer/sql/operator/table_get_logical_operator.h @@ -39,6 +39,17 @@ class TableGetLogicalOperator : public LogicalOperator std::string &table_alias() { return table_alias_; } + std::vector &base_vector() { return base_vector_; } + void set_base_vector(std::vector base_vector) { base_vector_ = std::move(base_vector); } + + size_t limit() const { return limit_; } + void set_limit(size_t limit) { limit_ = limit; } + + Index *index() const { return index_; } + void set_index(Index *index) { index_ = index; } + + bool is_vector_scan() { return !base_vector_.empty(); } + private: BaseTable *table_ = nullptr; std::string table_alias_; @@ -49,4 +60,9 @@ class TableGetLogicalOperator : public LogicalOperator // 不包含复杂的表达式运算,比如加减乘除、或者conjunction expression // 如果有多个表达式,他们的关系都是 AND std::vector> predicates_; + + // 向量索引参数 + Index *index_ = nullptr; + std::vector base_vector_; // 要比较的向量 + std::size_t limit_; // 输出多少个 }; diff --git a/src/observer/sql/operator/vector_scan_physical_operator.cpp b/src/observer/sql/operator/vector_scan_physical_operator.cpp new file mode 100644 index 00000000..18d87a1f --- /dev/null +++ b/src/observer/sql/operator/vector_scan_physical_operator.cpp @@ -0,0 +1,128 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/18 * + * @Description : VectorScanPhysicalOperator source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "storage/trx/trx.h" +#include "vector_scan_physical_operator.h" + +VectorScanPhysicalOperator::VectorScanPhysicalOperator(Table *table, std::string table_alias, Index *index, + std::vector base_vector, size_t limit, ReadWriteMode mode) + : table_(table), + index_(dynamic_cast(index)), + base_vector_(std::move(base_vector)), + limit_(limit), + mode_(mode) +{ + tuple_.set_table_alias(table_alias); +} + +RC VectorScanPhysicalOperator::open(Trx *trx) +{ + if (nullptr == table_ || nullptr == index_) { + return RC::INTERNAL; + } + + rids_ = index_->ann_search(base_vector_, limit_); + + record_handler_ = table_->record_handler(); + if (nullptr == record_handler_) { + LOG_WARN("invalid record handler"); + return RC::INTERNAL; + } + + tuple_.set_schema(table_, table_->table_meta().field_metas()); + + trx_ = trx; + return RC::SUCCESS; +} + +RC VectorScanPhysicalOperator::next() +{ + RC rc = RC::SUCCESS; + + if (cnt_ >= rids_.size()) { + return RC::RECORD_EOF; + } + + bool filter_result = false; + while (cnt_ < rids_.size()) { + auto rid = rids_[cnt_++]; + + rc = record_handler_->get_record(rid, current_record_); + if (OB_FAIL(rc)) { + LOG_TRACE("failed to get record. rid=%s, rc=%s", rid.to_string().c_str(), strrc(rc)); + return rc; + } + + LOG_TRACE("got a record. rid=%s", rid.to_string().c_str()); + + tuple_.set_record(¤t_record_); + rc = filter(tuple_, filter_result); + if (OB_FAIL(rc)) { + LOG_TRACE("failed to filter record. rc=%s", strrc(rc)); + return rc; + } + + if (!filter_result) { + LOG_TRACE("record filtered"); + continue; + } + + rc = trx_->visit_record(table_, current_record_, mode_); + if (rc == RC::RECORD_INVISIBLE) { + LOG_TRACE("record invisible"); + continue; + } else { + return rc; + } + } + + return rc; +} + +RC VectorScanPhysicalOperator::close() { return RC::SUCCESS; } + +Tuple *VectorScanPhysicalOperator::current_tuple() +{ + tuple_.set_record(¤t_record_); + return &tuple_; +} + +void VectorScanPhysicalOperator::set_predicates(std::vector> &&exprs) +{ + predicates_ = std::move(exprs); +} + +RC VectorScanPhysicalOperator::filter(RowTuple &tuple, bool &result) +{ + RC rc = RC::SUCCESS; + Value value; + for (std::unique_ptr &expr : predicates_) { + rc = expr->get_value(tuple, value); + if (rc != RC::SUCCESS) { + return rc; + } + + bool tmp_result = value.get_boolean(); + if (!tmp_result) { + result = false; + return rc; + } + } + + result = true; + return rc; +} + +std::string VectorScanPhysicalOperator::param() const +{ + return std::string(index_->index_meta().name()) + " ON " + table_->name(); +} diff --git a/src/observer/sql/operator/vector_scan_physical_operator.h b/src/observer/sql/operator/vector_scan_physical_operator.h new file mode 100644 index 00000000..2b453ba0 --- /dev/null +++ b/src/observer/sql/operator/vector_scan_physical_operator.h @@ -0,0 +1,66 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/18 * + * @Description : VectorScanPhysicalOperator header file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "sql/expr/tuple.h" +#include "sql/operator/physical_operator.h" +#include "storage/record/record_manager.h" +#include "storage/index/ivfflat_index.h" + +/** + * @brief 向量索引扫描物理算子 + * @ingroup PhysicalOperator + */ +class VectorScanPhysicalOperator : public PhysicalOperator +{ +public: + // 向量索引的构造方法 + VectorScanPhysicalOperator(Table *table, std::string table_alias, Index *index, std::vector base_vector, + size_t limit, ReadWriteMode mode); + + ~VectorScanPhysicalOperator() override = default; + + PhysicalOperatorType type() const override { return PhysicalOperatorType::VECTOR_INDEX_SCAN; } + + std::string param() const override; + + RC open(Trx *trx) override; + RC next() override; + RC close() override; + + Tuple *current_tuple() override; + + void set_predicates(std::vector> &&exprs); + +private: + // 与TableScanPhysicalOperator代码相同,可以优化 + RC filter(RowTuple &tuple, bool &result); + +private: + Trx *trx_ = nullptr; + Table *table_ = nullptr; + IvfflatIndex *index_ = nullptr; + std::vector rids_; // 向量近似扫描结果 + RecordFileHandler *record_handler_ = nullptr; + + const std::vector base_vector_; + size_t limit_; + size_t cnt_{0}; + + ReadWriteMode mode_ = ReadWriteMode::READ_WRITE; + + Record current_record_{}; + RowTuple tuple_; + + std::vector> predicates_; +}; diff --git a/src/observer/sql/optimizer/physical_plan_generator.cpp b/src/observer/sql/optimizer/physical_plan_generator.cpp index c54c6fb1..2364fe13 100644 --- a/src/observer/sql/optimizer/physical_plan_generator.cpp +++ b/src/observer/sql/optimizer/physical_plan_generator.cpp @@ -51,6 +51,8 @@ See the Mulan PSL v2 for more details. */ #include "sql/operator/update_physical_operator.h" #include "sql/operator/view_scan_physical_operator.h" +#include + using namespace std; RC PhysicalPlanGenerator::create(LogicalOperator &logical_operator, unique_ptr &oper) @@ -150,6 +152,22 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u if (base_table->type() == TableType::Table) { table = dynamic_cast

(base_table); + + // 是向量索引 + if (table_get_oper.is_vector_scan()) { + auto vector_scan_oper = new VectorScanPhysicalOperator(table, + std::move(table_get_oper.table_alias()), + table_get_oper.index(), + table_get_oper.base_vector(), + table_get_oper.limit(), + table_get_oper.read_write_mode()); + + vector_scan_oper->set_predicates(std::move(predicates)); + oper = unique_ptr(vector_scan_oper); + LOG_TRACE("Vector Index scan used on table: {}", table->name()); + return RC::SUCCESS; + } + for (auto &expr : predicates) { if (expr->type() == ExprType::COMPARISON) { auto comparison_expr = dynamic_cast(expr.get()); diff --git a/src/observer/sql/optimizer/rewriter.cpp b/src/observer/sql/optimizer/rewriter.cpp index 8d1cebce..02201f15 100644 --- a/src/observer/sql/optimizer/rewriter.cpp +++ b/src/observer/sql/optimizer/rewriter.cpp @@ -18,12 +18,14 @@ See the Mulan PSL v2 for more details. */ #include "sql/optimizer/expression_rewriter.h" #include "sql/optimizer/predicate_pushdown_rewriter.h" #include "sql/optimizer/predicate_rewrite.h" +#include "sql/optimizer/vector_index_scan_rewrite.h" Rewriter::Rewriter() { rewrite_rules_.emplace_back(new ExpressionRewriter); rewrite_rules_.emplace_back(new PredicateRewriteRule); rewrite_rules_.emplace_back(new PredicatePushdownRewriter); + rewrite_rules_.emplace_back(new VectorIndexScanRewrite); } RC Rewriter::rewrite(std::unique_ptr &oper, bool &change_made) diff --git a/src/observer/sql/optimizer/vector_index_scan_rewrite.cpp b/src/observer/sql/optimizer/vector_index_scan_rewrite.cpp new file mode 100644 index 00000000..7ac0a3c9 --- /dev/null +++ b/src/observer/sql/optimizer/vector_index_scan_rewrite.cpp @@ -0,0 +1,109 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/18 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include "sql/operator/logical_operator.h" +#include "sql/expr/tuple.h" +#include "sql/operator/limit_logical_operator.h" +#include "sql/operator/order_by_logical_operator.h" +#include "sql/operator/table_get_logical_operator.h" +#include "sql/optimizer/vector_index_scan_rewrite.h" + +RC VectorIndexScanRewrite::rewrite(std::unique_ptr &oper, bool &change_made) +{ + auto &child_opers = oper->children(); + if (child_opers.size() != 1) { + return RC::SUCCESS; + } + + auto &child_oper = child_opers.front(); + if (child_oper->type() != LogicalOperatorType::LIMIT && child_oper->type() != LogicalOperatorType::ORDER_BY) { + return RC::SUCCESS; + } + + // 有 limit 且 orderby 是向量 重写为向量索引 + if (child_oper->type() == LogicalOperatorType::LIMIT) { + auto &orderby_opers = child_oper->children(); + if (orderby_opers.size() != 1) { + return RC::SUCCESS; + } + + auto &orderby_oper = orderby_opers[0]; + if (orderby_oper->type() != LogicalOperatorType::ORDER_BY) { + return RC::SUCCESS; + } + + auto act_orderby_oper = dynamic_cast(orderby_oper.get()); + auto &orderby_node = act_orderby_oper->order_by(); + if (orderby_node.size() != 1 || !orderby_node[0].is_asc) { + return RC::SUCCESS; + } + + auto &expr = orderby_node[0].expr; + if (expr->type() == ExprType::NORMAL_FUNCTION) { + auto func_expr = dynamic_cast(expr.get()); + if (!func_expr->is_vector_distance_func()) { + return RC::SUCCESS; + } + + auto &table_scan_oper = orderby_oper->children()[0]; + if (table_scan_oper->type() != LogicalOperatorType::TABLE_GET) { + return RC::SUCCESS; + } + + auto table_get_oper = dynamic_cast(table_scan_oper.get()); + BaseTable *base_table = table_get_oper->table(); + if (base_table->type() != TableType::Table) { + return RC::SUCCESS; + } + + auto table = dynamic_cast
(base_table); + + // 找到向量列和常量向量,目前只支持向量列与常量向量 + FieldExpr *field_expr; + RowTuple tuple; + Value value; + + if (func_expr->args()[0]->type() == ExprType::FIELD) { + field_expr = dynamic_cast(func_expr->args()[0].get()); + func_expr->args()[1]->get_value(tuple, value); + } else { + field_expr = dynamic_cast(func_expr->args()[1].get()); + func_expr->args()[0]->get_value(tuple, value); + } + + // 检查该列上是否建立了索引 + auto &field = field_expr->field(); + + if (strcmp(table->name(), field.table_name()) != 0) { + return RC::SUCCESS; + } + + Index *index = table->find_vector_index(func_expr->function_type(), field.field_name()); + if (index == nullptr) { + return RC::SUCCESS; + } + + auto limit_oper = dynamic_cast(child_oper.get()); + + // 设置向量索引必要的参数 + table_get_oper->set_index(index); + table_get_oper->set_base_vector(value.get_vector()); + table_get_oper->set_limit(limit_oper->limit()); + + // 直接变成 proj table_get + oper->children()[0] = std::move(table_scan_oper); + change_made = true; + } + } + + return RC::SUCCESS; +} diff --git a/src/observer/sql/optimizer/vector_index_scan_rewrite.h b/src/observer/sql/optimizer/vector_index_scan_rewrite.h new file mode 100644 index 00000000..df22f307 --- /dev/null +++ b/src/observer/sql/optimizer/vector_index_scan_rewrite.h @@ -0,0 +1,29 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/18 * + * @Description : Brief description of the file's purpose * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#pragma once + +#include "sql/optimizer/rewrite_rule.h" + +/** + * @brief 向量索引重写规则 + * @ingroup Rewriter + * @details 识别 orderby limit 重写为向量索引 + */ +class VectorIndexScanRewrite : public RewriteRule +{ +public: + VectorIndexScanRewrite() = default; + virtual ~VectorIndexScanRewrite() = default; + + RC rewrite(std::unique_ptr &oper, bool &change_made) override; +}; diff --git a/src/observer/sql/parser/expression_binder.cpp b/src/observer/sql/parser/expression_binder.cpp index 35b24747..4d643001 100644 --- a/src/observer/sql/parser/expression_binder.cpp +++ b/src/observer/sql/parser/expression_binder.cpp @@ -518,7 +518,7 @@ RC ExpressionBinder::bind_function_expression( return RC::SUCCESS; } - NormalFunctionExpr::Type func_type; + NormalFunctionType func_type; rc = NormalFunctionExpr::type_from_string(function_name, func_type); if (OB_SUCC(rc)) { vector> child_bound_expressions; diff --git a/src/observer/sql/parser/parse_defs.h b/src/observer/sql/parser/parse_defs.h index 0b6902e1..57e251f0 100644 --- a/src/observer/sql/parser/parse_defs.h +++ b/src/observer/sql/parser/parse_defs.h @@ -251,13 +251,6 @@ struct DropTableSqlNode std::string relation_name; ///< 要删除的表名 }; -enum class VectorDistanceType -{ - L2, - COSINE, - INNER, -}; - enum class IndexType { BPlusTreeIndex, diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index de04e348..d2028a18 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -620,16 +620,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 74 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 317 +#define YYLAST 335 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 86 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 61 /* YYNRULES -- Number of rules. */ -#define YYNRULES 162 +#define YYNRULES 163 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 305 +#define YYNSTATES 321 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 336 @@ -1023,127 +1023,128 @@ static const yytype_int16 yyrline[] = {0, 412, 419, 426, - 438, - 444, + 435, + 447, 453, - 463, - 467, - 471, - 475, - 479, - 486, - 494, - 506, - 516, - 519, - 532, - 550, - 579, - 583, - 587, + 462, + 472, + 476, + 480, + 484, + 488, + 495, + 503, + 515, + 525, + 528, + 541, + 559, + 588, 592, - 598, - 599, - 600, + 596, 601, - 602, - 603, 607, - 617, - 631, - 637, - 644, - 648, - 652, - 656, - 664, - 667, - 672, - 680, - 683, + 608, + 609, + 610, + 611, + 612, + 616, + 626, + 640, + 646, + 653, + 657, + 661, + 665, + 673, + 676, + 681, 689, - 697, - 700, - 704, - 711, - 715, - 719, - 725, + 692, + 698, + 706, + 709, + 713, + 720, + 724, 728, - 735, - 738, - 745, - 757, - 771, - 776, - 783, - 793, - 831, - 864, - 870, + 734, + 737, + 744, + 747, + 754, + 766, + 780, + 785, + 792, + 802, + 840, + 873, 879, - 882, + 888, 891, - 907, - 910, - 913, + 900, 916, 919, - 927, - 930, - 935, - 941, + 922, + 925, + 928, + 936, + 939, 944, - 947, 950, - 957, - 960, - 963, - 968, - 976, - 983, - 988, - 998, - 1004, - 1014, - 1031, - 1038, - 1050, - 1053, + 953, + 956, + 959, + 966, + 969, + 972, + 977, + 985, + 992, + 997, + 1007, + 1013, + 1023, + 1040, + 1047, 1059, - 1063, - 1070, - 1074, - 1081, - 1082, + 1062, + 1068, + 1072, + 1079, 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, 1090, 1091, 1092, 1093, 1094, + 1095, + 1096, + 1097, + 1098, 1099, + 1100, + 1101, 1102, - 1110, - 1115, - 1123, - 1129, - 1135, - 1145, - 1148, - 1156, - 1159, - 1167, - 1170, - 1178, - 1186, - 1197}; + 1103, + 1108, + 1111, + 1119, + 1124, + 1132, + 1138, + 1144, + 1154, + 1157, + 1165, + 1168, + 1176, + 1179, + 1187, + 1195, + 1206}; #endif /** Accessing symbol of state STATE. */ @@ -1308,7 +1309,7 @@ static const char *const yytname[] = {"\"end of file\"", static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif -#define YYPACT_NINF (-200) +#define YYPACT_NINF (-187) #define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) @@ -1318,311 +1319,327 @@ static const char *yysymbol_name(yysymbol_kind_t yysymbol) { return yytname[yysy /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const yytype_int16 yypact[] = {241, - 17, - 13, - 37, - 37, - -29, - 19, - -200, - 10, - 36, - 24, - -200, - -200, - -200, - -200, - -200, - 28, - 241, - 112, - 115, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - 49, - 119, - -200, - 51, - 124, - 64, - 74, - 76, - -6, - 22, - -200, - -200, - -200, +static const yytype_int16 yypact[] = {240, + -2, + 9, + 72, + 72, + -62, + 42, + -187, + -25, + -19, -7, - -200, - 37, - -200, - -200, - -200, + -187, + -187, + -187, + -187, + -187, + 16, + 240, + 81, + 94, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + 25, + 106, + -187, + 46, + 117, + 63, + 69, + 74, + 142, + -23, + -187, + -187, + -187, + -8, + -187, + 72, + -187, + -187, + -187, 8, - -200, - -200, - -200, + -187, + -187, + -187, + 86, + -187, + -187, + 121, + 88, + 98, + 127, + 113, + -187, + -187, + -187, + -187, + -10, + 107, + 26, 111, - -200, - -200, + -187, 120, - 92, - 99, - 97, - 103, - -200, - -200, - -200, - -200, - -11, - 110, - 15, + -187, + 72, + 159, + 160, + -187, + -187, + 0, + -187, + 40, + 72, + -32, + -187, 114, - -200, - 127, - -200, - 37, - 166, - 167, - -200, - -200, - 44, - -200, - 68, - 37, - -30, - -200, - 122, - -200, - 37, - 37, - 37, - 37, - 174, - 125, - 125, - -1, - 155, - 128, + -187, 72, - 129, + 72, + 72, + 72, + 164, + 115, + 115, + -9, + 137, + 118, + 96, + 119, + 132, + 17, + 145, + 184, + 124, 150, - 20, - 157, - 193, - 135, - 160, + 131, + 86, + -187, + -187, + -187, + -187, + -187, + -23, + 187, + -187, + -187, + -187, + 32, + 32, + -187, + -187, + 72, + -187, + 14, 137, - 111, - -200, - -200, - -200, - -200, - -200, - 22, - 192, - -200, - -200, - -200, - 62, - 62, - -200, - -200, - 37, - -200, - 6, - 155, - -200, - 135, + -187, + 124, 194, - 164, - -200, - 151, - 3, - -200, - 70, - -200, - -200, - 149, - 191, + 163, + -187, + 154, + 1, + -187, + 57, + -187, + -187, + 109, + 198, + 158, + 184, + -187, 152, - 193, - -200, - 143, - -200, - 195, - 199, - 146, - -200, - -200, - -200, - -200, - 165, + -187, 201, - 217, - 206, - 72, - 204, - -200, - -200, - 18, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - 211, - 93, - 107, - 37, - 37, - 128, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - 101, - 129, - 220, - 172, - -200, - 228, - 135, - 249, - 230, - 125, - 125, - 250, - 244, - 216, - 31, - -200, + 219, + 170, + -187, + -187, + -187, + -187, + 189, + 223, 242, - -200, - -200, - -200, - -200, - 37, - 164, - 164, - -14, - -14, - -200, - 190, - 227, - -200, - -200, - -200, - 191, - 215, - -200, - 135, - -200, - 193, - 135, - 214, - 155, + 228, + 96, + 226, + -187, + -187, 4, - -200, - 37, - 164, - 262, - 194, - -200, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + 216, + 36, + 112, 72, 72, - -14, - -200, - 223, - 251, - -200, - -200, - 21, - 252, - -200, - 253, - 164, - 217, - -200, - 107, - 273, - 238, - 204, - -200, - 56, + 118, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, 90, - 193, - -200, - 218, - -200, - -31, - -200, - 37, - 205, - -200, - -200, - -200, - -200, - 259, - 225, - 27, - -200, - 256, - -200, - 224, - -200, - 125, - -200, - -200, - 37, - 221, - -200, - -200, - 210, + 119, + 239, + 186, + -187, + 243, + 124, + 262, + 244, + 115, + 115, + 266, 263, + 224, + 7, + -187, + 251, + -187, + -187, + -187, + -187, + 72, + 163, + 163, + 79, + 79, + -187, + 199, + 236, + -187, + -187, + -187, + 198, + 220, + -187, + 124, + -187, + 184, + 124, + 225, + 137, + 15, + -187, + 72, + 163, + 267, + 194, + -187, + 96, + 96, + 79, + -187, 229, - 231, - 233, - -200, - 113, - -200, + 257, + -187, + -187, + 49, + 258, + -187, + 260, + 163, + 242, + -187, + 112, + 281, + 246, 226, - 234, + -187, + 33, + 87, + 184, + -187, + 227, + -187, + -27, + -187, 72, + 212, + -187, + -187, + -187, + -187, + 268, + 230, + 2, + -187, 265, - 232, - 235, + -187, + 105, + -187, + 115, + -187, + -187, 72, + 231, + 232, + -187, + -187, + 217, + 234, + 270, + -187, 271, - -200}; + 238, + 241, + 235, + 237, + 234, + 233, + 48, + 279, + -187, + 245, + 247, + 248, + 249, + 96, + 96, + 280, + 282, + 252, + 253, + 254, + 255, + 96, + 96, + 284, + 289, + -187, + -187}; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero @@ -1630,8 +1647,8 @@ static const yytype_int16 yypact[] = {241, static const yytype_uint8 yydefact[] = {0, 38, 0, - 100, - 100, + 101, + 101, 0, 0, 27, @@ -1677,22 +1694,22 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 100, - 75, - 87, - 84, + 101, + 76, + 88, 85, - 120, 86, + 121, + 87, 0, - 111, - 109, - 98, - 115, - 113, - 114, + 112, 110, 99, + 116, + 114, + 115, + 111, + 100, 33, 32, 0, @@ -1700,39 +1717,39 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 160, + 161, 1, - 162, + 163, 2, - 89, + 90, 0, 0, 0, 31, 0, - 52, - 100, + 53, + 101, 0, 0, - 71, - 73, + 72, + 74, 0, - 76, + 77, 0, - 100, + 101, 0, - 108, + 109, 0, - 116, + 117, 0, 0, 0, 0, - 101, + 102, 0, 0, 0, - 127, + 128, 0, 0, 0, @@ -1744,85 +1761,85 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 119, - 107, - 72, - 74, - 88, + 120, + 108, + 73, + 75, + 89, 0, 0, - 121, - 112, - 117, - 103, + 122, + 113, + 118, 104, 105, 106, - 100, - 122, - 115, - 127, + 107, + 101, + 123, + 116, + 128, 34, 0, 0, 0, - 91, - 0, - 127, - 93, + 92, 0, - 161, - 81, + 128, + 94, 0, - 53, + 162, + 82, 0, + 54, 0, - 49, 0, 50, - 42, - 0, 0, - 44, - 77, - 118, - 102, + 51, + 43, 0, - 123, - 154, 0, + 45, 78, - 67, - 145, - 143, + 119, + 103, + 0, + 124, + 155, + 0, + 79, + 68, + 146, + 144, 0, - 133, 134, 135, 136, 137, 138, - 141, 139, + 142, + 140, 0, - 128, + 129, 0, 0, 0, - 92, - 82, + 93, 83, - 61, + 84, 62, 63, 64, 65, 66, - 60, + 67, + 61, 0, 0, 0, - 48, + 49, 0, 0, 0, @@ -1830,98 +1847,105 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 156, + 157, 0, 0, - 79, + 80, 0, - 146, - 144, - 142, - 140, + 147, + 145, + 143, + 141, 0, 0, 0, - 130, + 131, + 96, 95, - 94, 0, 0, + 60, 59, - 58, - 56, - 53, - 89, + 57, + 54, 90, + 91, 0, - 43, + 44, 0, 0, 0, - 127, - 115, - 124, - 100, + 128, + 116, + 125, + 101, 0, - 147, + 148, 0, - 69, + 70, 0, - 78, - 129, - 131, + 79, + 130, 132, + 133, 0, - 57, - 54, - 47, + 58, + 55, + 48, 0, - 51, + 52, 0, 0, - 154, 155, - 157, - 0, + 156, 158, - 68, - 80, 0, - 60, + 159, + 69, + 81, 0, - 46, + 61, + 0, + 47, 0, 35, - 125, - 97, + 126, + 98, 0, 0, - 96, - 70, - 55, - 45, + 97, + 71, + 56, + 46, 0, 0, - 151, - 148, + 152, 149, - 159, + 150, + 160, 0, 36, 0, + 154, 153, - 152, 0, 0, - 126, - 150, - 0, 0, + 127, + 151, 0, 0, 0, 39, 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, 40, 0, 0, @@ -1931,70 +1955,79 @@ static const yytype_uint8 yydefact[] = {0, 0, 0, 0, - 41}; + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 41, + 42}; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = {-200, - -200, - 280, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -200, - -132, - -200, - -200, - -200, - -200, - 79, - 116, - 45, - -200, - -200, - 69, - 185, - -200, - 71, - -102, - -104, - 85, - -200, - -200, - -200, - 131, +static const yytype_int16 yypgoto[] = {-187, + -187, + 278, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + -187, + 18, + -187, + -127, + -187, + -187, + -187, + -187, + 92, + 129, + 62, + -187, + -187, + 89, + 203, + -187, + 91, + -99, + -101, + 103, + -187, + -187, + -187, + 147, -48, - -200, + -187, -4, -56, - 254, - -200, - -200, - -200, - -96, - 109, - 32, - -125, - -199, - 139, - -200, - 30, - -200, - 65, - -200, - -200, - -200, - -200, - -200}; + 269, + -187, + -187, + -187, + -98, + 128, + 51, + -131, + -186, + 156, + -187, + 50, + -187, + 83, + -187, + -187, + -187, + -187, + -187}; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = {0, @@ -2012,7 +2045,7 @@ static const yytype_int16 yydefgoto[] = {0, 29, 30, 46, - 294, + 293, 280, 154, 31, @@ -2065,236 +2098,235 @@ static const yytype_int16 yydefgoto[] = {0, static const yytype_int16 yytable[] = {65, 94, 85, - 145, - 163, - 144, + 162, 133, 135, + 145, + 282, + 144, + 163, + 182, + 42, 95, - 162, - 95, - 84, - 95, + 208, 108, - 242, - 243, - 182, - 92, - 50, - 112, - 51, - 213, - 214, 136, + 92, + 66, + 95, + 95, + 283, 149, - 261, 47, - 208, + 69, 48, - 274, - 42, + 213, + 214, + 242, + 243, 181, - 282, - 67, - 68, - 52, - 254, - 84, + 112, + 70, + 238, + 274, 84, - 113, + 239, + 43, + 209, + 44, 93, + 137, 127, 128, 129, 130, - 283, + 166, 86, - 109, - 137, 124, - 66, - 209, - 265, + 109, + 254, + 113, 125, 138, - 43, - 238, - 44, - 69, + 261, + 87, + 88, + 67, + 68, + 270, + 89, + 45, 239, - 145, - 50, 150, - 51, + 145, 152, + 265, + 84, + 121, + 122, + 167, 227, + 49, + 71, + 302, 160, + 168, + 303, + 119, + 120, + 210, + 116, + 74, + 177, 97, 98, 99, 100, - 53, - 54, - 55, - 56, - 49, - 57, - 58, - 52, - 45, - 116, - 270, - 177, - 96, - 239, - 96, - 70, 96, 123, 97, 98, 99, 100, - 210, - 248, - 121, - 122, - 250, + 96, + 96, + 72, + 50, + 75, 51, - 87, - 88, + 248, + 252, 195, - 166, - 71, - 89, + 250, 232, - 252, - 72, + 77, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 52, + 218, + 99, + 100, 97, 98, 99, 100, - 74, - 52, - 53, - 54, - 55, - 56, - 75, - 57, - 58, - 119, - 120, + 78, + 51, 215, 216, - 218, - 167, + 79, + 219, 159, - 77, + 220, 219, - 79, + 221, 220, - 168, + 80, 221, - 78, + 183, + 184, + 102, + 52, 145, 145, 258, - 295, - 80, - 219, - 296, - 220, + 185, 81, - 221, - 99, - 100, - 183, - 184, + 186, + 187, + 188, + 189, + 190, + 82, 53, 54, - 106, + 55, 56, - 82, - 143, 83, + 57, + 58, 241, 177, 177, - 213, - 214, - 102, - 169, - 170, - 171, - 172, - 173, - 174, - 175, - 176, - 103, - 104, - 107, - 166, + 84, 97, 98, 99, 100, + 213, + 214, + 50, + 104, + 51, + 285, + 286, + 103, + 166, + 53, + 54, + 115, + 56, 105, + 143, 177, 249, - 185, - 115, - 186, - 187, - 188, - 189, - 190, - 50, - 111, - 51, + 106, + 107, + 52, 117, 118, + 111, + 50, + 138, + 51, 114, - 145, - 177, - 299, - 167, - 145, - 262, - 303, - 126, + 148, 131, - 168, + 126, 132, - 52, - 138, + 177, + 167, 140, 146, - 148, - 84, - 275, + 262, 151, - 272, + 84, + 168, 153, + 52, 155, + 145, + 145, + 309, + 310, 156, + 275, 158, + 272, + 145, + 145, + 317, + 318, 164, - 192, + 53, + 54, + 55, + 56, 180, - 194, - 196, - 197, - 198, - 199, - 200, - 202, + 57, + 58, + 192, + 194, 275, - 201, + 197, 253, - 204, - 207, + 196, 169, 170, 171, @@ -2307,18 +2339,18 @@ static const yytype_int16 yytable[] = {65, 54, 55, 56, - 224, + 198, 57, 58, 1, 2, + 199, + 200, + 201, + 202, + 204, + 207, 211, - 225, - 226, - 228, - 229, - 235, - 234, 3, 4, 5, @@ -2327,293 +2359,311 @@ static const yytype_int16 yytable[] = {65, 8, 9, 10, + 224, + 225, + 228, + 226, + 229, + 11, + 12, + 13, + 234, 237, + 235, 240, 244, 245, - 251, - 11, - 12, - 13, 109, 255, + 251, 213, 260, 263, + 14, 264, + 15, 267, 268, - 273, 278, + 273, + 281, 279, 284, - 14, - 281, - 15, - 285, + 16, + 73, + 291, + 17, + 294, + 295, 289, - 288, 290, + 292, + 296, + 298, 297, - 300, - 291, - 16, + 299, 304, - 73, - 17, + 311, + 319, + 312, + 305, 301, - 292, - 293, + 306, + 320, 246, - 298, - 302, + 300, + 307, + 308, + 313, + 314, + 223, 271, - 257, + 315, + 316, 157, - 223, + 257, 247, + 217, 233, + 101, 259, - 217, - 286, 287, - 101, 212, + 288, 266}; static const yytype_int16 yycheck[] = {4, 57, 50, - 107, - 136, - 107, + 134, 102, 103, + 107, + 5, + 107, + 136, + 141, + 13, 4, - 134, - 4, - 17, - 4, + 9, 24, - 213, - 214, - 141, 24, 24, + 79, 4, - 26, - 52, - 53, - 24, 4, + 18, 4, 13, - 9, + 48, 15, - 60, - 13, + 52, + 53, + 213, + 214, 28, - 5, - 14, - 15, - 41, - 235, - 17, + 4, + 50, + 25, + 60, 17, - 24, + 28, + 38, + 33, + 40, 47, + 49, 97, 98, 99, 100, - 18, + 9, 50, - 58, - 49, 79, - 79, - 33, - 251, + 58, + 235, + 24, 83, 51, - 38, + 4, + 77, + 78, + 14, + 15, 25, - 40, - 48, + 82, + 62, 28, - 164, - 24, 110, - 26, + 164, 112, + 251, + 17, + 27, + 28, + 33, 197, + 62, + 79, + 25, 60, - 81, - 82, - 83, - 84, + 39, + 28, 77, 78, - 79, - 80, - 62, + 75, + 84, + 0, + 138, + 81, 82, 83, - 41, - 62, 84, - 25, - 138, - 79, - 28, - 79, - 50, 79, 92, 81, 82, 83, 84, - 75, - 226, - 27, - 28, - 229, + 79, + 79, + 79, + 24, + 3, 26, - 77, - 78, + 226, + 231, 149, - 9, - 79, - 82, + 229, 201, - 231, 79, - 81, - 82, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 41, + 24, 83, 84, - 0, - 41, - 77, - 78, - 79, - 80, - 3, + 81, 82, 83, - 77, - 78, + 84, + 15, + 26, 179, 180, - 24, - 33, - 131, 79, 39, - 79, + 131, 41, 39, 43, + 41, 15, + 43, + 77, + 78, + 50, + 41, 239, 240, 239, - 25, - 15, - 39, - 28, - 41, + 32, + 79, + 34, + 35, + 36, + 37, + 38, 79, - 43, - 83, - 84, - 77, - 78, 77, 78, - 54, + 79, 80, 79, 82, - 79, + 83, 212, 213, 214, - 52, - 53, - 50, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 50, - 79, - 69, - 9, + 17, 81, 82, 83, 84, - 79, - 235, - 228, - 32, - 55, - 34, - 35, - 36, - 37, - 38, + 52, + 53, 24, 79, 26, + 64, + 65, + 50, + 9, + 77, + 78, + 55, + 80, + 79, + 82, + 235, + 228, + 54, + 69, + 41, 25, 25, 79, - 298, - 251, - 298, - 33, - 302, - 247, - 302, + 24, + 51, + 26, 79, + 59, 28, - 39, 79, - 41, - 51, + 79, + 251, + 33, 79, 79, - 59, - 17, - 267, + 247, 55, - 261, + 17, + 39, 79, + 41, 55, + 307, + 308, + 307, + 308, 79, + 267, 25, + 261, + 315, + 316, + 315, + 316, 24, - 28, - 69, - 69, + 77, + 78, 79, + 80, + 69, + 82, + 83, 28, - 25, - 79, - 61, - 10, + 69, 284, 28, 234, - 25, - 28, + 79, 69, 70, 71, @@ -2631,13 +2681,13 @@ static const yytype_int16 yycheck[] = {4, 83, 7, 8, - 39, 79, - 24, - 4, - 24, - 11, - 6, + 61, + 28, + 10, + 25, + 28, + 39, 16, 17, 18, @@ -2646,58 +2696,77 @@ static const yytype_int16 yycheck[] = {4, 21, 22, 23, - 49, + 25, + 79, + 4, + 24, 24, - 77, - 41, - 55, 29, 30, 31, + 6, + 49, + 11, + 24, + 77, + 41, 58, 12, + 55, 52, 25, 25, + 44, 25, + 46, 6, 42, - 63, 77, - 24, - 28, - 44, + 63, 61, - 46, - 64, - 79, - 69, - 28, - 66, + 24, 28, - 65, 54, - 25, 17, + 79, 57, - 67, + 28, + 28, + 69, 69, 68, + 65, + 69, + 64, + 69, + 28, + 28, + 25, + 28, + 66, + 79, + 66, + 25, 223, + 298, 69, 69, + 67, + 67, + 192, 260, - 237, + 69, + 69, 122, - 192, + 237, 224, + 181, 201, + 61, 240, - 181, 281, - 284, - 61, 177, + 284, 252}; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -2988,24 +3057,40 @@ static const yytype_uint8 yystos[] = {0, 18, 28, 64, + 65, 134, 139, 69, + 69, 79, + 68, + 101, + 28, 28, 65, + 64, + 69, 69, - 68, 101, + 79, 25, 28, + 28, 66, + 66, + 69, 69, 117, + 117, + 28, 28, 67, + 67, + 69, 69, 117, + 117, + 25, 25}; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -3051,6 +3136,7 @@ static const yytype_uint8 yyr1[] = {0, 101, 102, 102, + 102, 103, 103, 104, @@ -3216,6 +3302,7 @@ static const yytype_int8 yyr2[] = {0, 1, 9, 17, + 17, 1, 3, 5, @@ -4124,7 +4211,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1922 "yacc_sql.cpp" +#line 1932 "yacc_sql.cpp" break; case 25: /* exit_stmt: EXIT */ @@ -4133,7 +4220,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1931 "yacc_sql.cpp" +#line 1941 "yacc_sql.cpp" break; case 26: /* help_stmt: HELP */ @@ -4141,7 +4228,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1939 "yacc_sql.cpp" +#line 1949 "yacc_sql.cpp" break; case 27: /* sync_stmt: SYNC */ @@ -4149,7 +4236,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1947 "yacc_sql.cpp" +#line 1957 "yacc_sql.cpp" break; case 28: /* begin_stmt: TRX_BEGIN */ @@ -4157,7 +4244,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1955 "yacc_sql.cpp" +#line 1965 "yacc_sql.cpp" break; case 29: /* commit_stmt: TRX_COMMIT */ @@ -4165,7 +4252,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1963 "yacc_sql.cpp" +#line 1973 "yacc_sql.cpp" break; case 30: /* rollback_stmt: TRX_ROLLBACK */ @@ -4173,7 +4260,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1971 "yacc_sql.cpp" +#line 1981 "yacc_sql.cpp" break; case 31: /* drop_table_stmt: DROP TABLE ID */ @@ -4183,7 +4270,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1981 "yacc_sql.cpp" +#line 1991 "yacc_sql.cpp" break; case 32: /* show_tables_stmt: SHOW TABLES */ @@ -4191,7 +4278,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1989 "yacc_sql.cpp" +#line 1999 "yacc_sql.cpp" break; case 33: /* desc_table_stmt: DESC ID */ @@ -4201,7 +4288,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1999 "yacc_sql.cpp" +#line 2009 "yacc_sql.cpp" break; case 34: /* show_index_stmt: SHOW INDEX FROM relation */ @@ -4212,7 +4299,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2010 "yacc_sql.cpp" +#line 2020 "yacc_sql.cpp" break; case 35: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ @@ -4228,7 +4315,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 2026 "yacc_sql.cpp" +#line 2036 "yacc_sql.cpp" break; case 36: /* create_index_stmt: CREATE VECTOR_T INDEX ID ON ID LBRACE attr_list RBRACE WITH vector_index_config */ @@ -4245,7 +4332,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-7].string)); free((yyvsp[-5].string)); } -#line 2043 "yacc_sql.cpp" +#line 2053 "yacc_sql.cpp" break; case 37: /* opt_unique: UNIQUE */ @@ -4253,7 +4340,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.unique) = true; } -#line 2049 "yacc_sql.cpp" +#line 2059 "yacc_sql.cpp" break; case 38: /* opt_unique: %empty */ @@ -4261,7 +4348,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.unique) = false; } -#line 2055 "yacc_sql.cpp" +#line 2065 "yacc_sql.cpp" break; case 39: /* index_type: IVFFLAT */ @@ -4269,7 +4356,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) { (yyval.index_type) = IndexType::VectorIVFFlatIndex; } -#line 2063 "yacc_sql.cpp" +#line 2073 "yacc_sql.cpp" break; case 40: /* vector_index_config: LBRACE DISTANCE EQ ID COMMA TYPE EQ index_type RBRACE */ @@ -4280,7 +4367,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.vector_index_config)->index_type = (yyvsp[-1].index_type); free((yyvsp[-5].string)); } -#line 2074 "yacc_sql.cpp" +#line 2084 "yacc_sql.cpp" break; case 41: /* vector_index_config: LBRACE DISTANCE EQ ID COMMA TYPE EQ index_type COMMA LISTS EQ value COMMA PROBES EQ @@ -4294,32 +4381,46 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.vector_index_config)->probes = std::move(*(yyvsp[-1].value)); free((yyvsp[-13].string)); } -#line 2087 "yacc_sql.cpp" +#line 2097 "yacc_sql.cpp" + break; + + case 42: /* vector_index_config: LBRACE TYPE EQ index_type COMMA DISTANCE EQ ID COMMA LISTS EQ value COMMA PROBES EQ + value RBRACE */ +#line 436 "yacc_sql.y" + { + (yyval.vector_index_config) = new VectorIndexConfig; + (yyval.vector_index_config)->distance_fn = (yyvsp[-9].string); + (yyval.vector_index_config)->index_type = (yyvsp[-13].index_type); + (yyval.vector_index_config)->lists = std::move(*(yyvsp[-5].value)); + (yyval.vector_index_config)->probes = std::move(*(yyvsp[-1].value)); + free((yyvsp[-9].string)); + } +#line 2110 "yacc_sql.cpp" break; - case 42: /* attr_list: ID */ -#line 439 "yacc_sql.y" + case 43: /* attr_list: ID */ +#line 448 "yacc_sql.y" { (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 2097 "yacc_sql.cpp" +#line 2120 "yacc_sql.cpp" break; - case 43: /* attr_list: ID COMMA attr_list */ -#line 445 "yacc_sql.y" + case 44: /* attr_list: ID COMMA attr_list */ +#line 454 "yacc_sql.y" { (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector (yyval.index_attr_list) ->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2107 "yacc_sql.cpp" +#line 2130 "yacc_sql.cpp" break; - case 44: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 454 "yacc_sql.y" + case 45: /* drop_index_stmt: DROP INDEX ID ON ID */ +#line 463 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -4327,56 +4428,56 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2119 "yacc_sql.cpp" +#line 2142 "yacc_sql.cpp" break; - case 45: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ -#line 464 "yacc_sql.y" + case 46: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ +#line 473 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node( (yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2127 "yacc_sql.cpp" +#line 2150 "yacc_sql.cpp" break; - case 46: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ -#line 468 "yacc_sql.y" + case 47: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ +#line 477 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node( (yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2135 "yacc_sql.cpp" +#line 2158 "yacc_sql.cpp" break; - case 47: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 472 "yacc_sql.y" + case 48: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ +#line 481 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node( (yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2143 "yacc_sql.cpp" +#line 2166 "yacc_sql.cpp" break; - case 48: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ -#line 476 "yacc_sql.y" + case 49: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ +#line 485 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2151 "yacc_sql.cpp" +#line 2174 "yacc_sql.cpp" break; - case 49: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ -#line 480 "yacc_sql.y" + case 50: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ +#line 489 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2159 "yacc_sql.cpp" +#line 2182 "yacc_sql.cpp" break; - case 50: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ -#line 487 "yacc_sql.y" + case 51: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ +#line 496 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; @@ -4384,11 +4485,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } -#line 2171 "yacc_sql.cpp" +#line 2194 "yacc_sql.cpp" break; - case 51: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ -#line 495 "yacc_sql.y" + case 52: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ +#line 504 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; @@ -4397,29 +4498,29 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-5].string)); } -#line 2184 "yacc_sql.cpp" +#line 2207 "yacc_sql.cpp" break; - case 52: /* drop_view_stmt: DROP VIEW ID */ -#line 507 "yacc_sql.y" + case 53: /* drop_view_stmt: DROP VIEW ID */ +#line 516 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2194 "yacc_sql.cpp" +#line 2217 "yacc_sql.cpp" break; - case 53: /* attr_def_list: %empty */ -#line 516 "yacc_sql.y" + case 54: /* attr_def_list: %empty */ +#line 525 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2202 "yacc_sql.cpp" +#line 2225 "yacc_sql.cpp" break; - case 54: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 520 "yacc_sql.y" + case 55: /* attr_def_list: COMMA attr_def attr_def_list */ +#line 529 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -4429,11 +4530,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2216 "yacc_sql.cpp" +#line 2239 "yacc_sql.cpp" break; - case 55: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 533 "yacc_sql.y" + case 56: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ +#line 542 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->name = (yyvsp[-5].string); @@ -4451,11 +4552,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 2238 "yacc_sql.cpp" +#line 2261 "yacc_sql.cpp" break; - case 56: /* attr_def: ID type nullable_constraint */ -#line 551 "yacc_sql.y" + case 57: /* attr_def: ID type nullable_constraint */ +#line 560 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -4481,91 +4582,91 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2268 "yacc_sql.cpp" +#line 2291 "yacc_sql.cpp" break; - case 57: /* nullable_constraint: NOT NULL_T */ -#line 580 "yacc_sql.y" + case 58: /* nullable_constraint: NOT NULL_T */ +#line 589 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2276 "yacc_sql.cpp" +#line 2299 "yacc_sql.cpp" break; - case 58: /* nullable_constraint: NULLABLE */ -#line 584 "yacc_sql.y" + case 59: /* nullable_constraint: NULLABLE */ +#line 593 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2284 "yacc_sql.cpp" +#line 2307 "yacc_sql.cpp" break; - case 59: /* nullable_constraint: NULL_T */ -#line 588 "yacc_sql.y" + case 60: /* nullable_constraint: NULL_T */ +#line 597 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2292 "yacc_sql.cpp" +#line 2315 "yacc_sql.cpp" break; - case 60: /* nullable_constraint: %empty */ -#line 592 "yacc_sql.y" + case 61: /* nullable_constraint: %empty */ +#line 601 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2300 "yacc_sql.cpp" +#line 2323 "yacc_sql.cpp" break; - case 61: /* type: INT_T */ -#line 598 "yacc_sql.y" + case 62: /* type: INT_T */ +#line 607 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2306 "yacc_sql.cpp" +#line 2329 "yacc_sql.cpp" break; - case 62: /* type: STRING_T */ -#line 599 "yacc_sql.y" + case 63: /* type: STRING_T */ +#line 608 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2312 "yacc_sql.cpp" +#line 2335 "yacc_sql.cpp" break; - case 63: /* type: FLOAT_T */ -#line 600 "yacc_sql.y" + case 64: /* type: FLOAT_T */ +#line 609 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2318 "yacc_sql.cpp" +#line 2341 "yacc_sql.cpp" break; - case 64: /* type: DATE_T */ -#line 601 "yacc_sql.y" + case 65: /* type: DATE_T */ +#line 610 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2324 "yacc_sql.cpp" +#line 2347 "yacc_sql.cpp" break; - case 65: /* type: TEXT_T */ -#line 602 "yacc_sql.y" + case 66: /* type: TEXT_T */ +#line 611 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2330 "yacc_sql.cpp" +#line 2353 "yacc_sql.cpp" break; - case 66: /* type: VECTOR_T */ -#line 603 "yacc_sql.y" + case 67: /* type: VECTOR_T */ +#line 612 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::VECTORS); } -#line 2336 "yacc_sql.cpp" +#line 2359 "yacc_sql.cpp" break; - case 67: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 608 "yacc_sql.y" + case 68: /* insert_stmt: INSERT INTO ID VALUES values_list */ +#line 617 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -4575,11 +4676,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-2].string)); } -#line 2350 "yacc_sql.cpp" +#line 2373 "yacc_sql.cpp" break; - case 68: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ -#line 618 "yacc_sql.y" + case 69: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ +#line 627 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -4590,201 +4691,201 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-5].string)); } -#line 2365 "yacc_sql.cpp" +#line 2388 "yacc_sql.cpp" break; - case 69: /* values_list: LBRACE value_list RBRACE */ -#line 632 "yacc_sql.y" + case 70: /* values_list: LBRACE value_list RBRACE */ +#line 641 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2375 "yacc_sql.cpp" +#line 2398 "yacc_sql.cpp" break; - case 70: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 638 "yacc_sql.y" + case 71: /* values_list: values_list COMMA LBRACE value_list RBRACE */ +#line 647 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2384 "yacc_sql.cpp" +#line 2407 "yacc_sql.cpp" break; - case 71: /* digits: NUMBER */ -#line 645 "yacc_sql.y" + case 72: /* digits: NUMBER */ +#line 654 "yacc_sql.y" { (yyval.digits) = float((yyvsp[0].number)); } -#line 2392 "yacc_sql.cpp" +#line 2415 "yacc_sql.cpp" break; - case 72: /* digits: '-' NUMBER */ -#line 649 "yacc_sql.y" + case 73: /* digits: '-' NUMBER */ +#line 658 "yacc_sql.y" { (yyval.digits) = float(-(yyvsp[0].number)); } -#line 2400 "yacc_sql.cpp" +#line 2423 "yacc_sql.cpp" break; - case 73: /* digits: FLOAT */ -#line 653 "yacc_sql.y" + case 74: /* digits: FLOAT */ +#line 662 "yacc_sql.y" { (yyval.digits) = (yyvsp[0].floats); } -#line 2408 "yacc_sql.cpp" +#line 2431 "yacc_sql.cpp" break; - case 74: /* digits: '-' FLOAT */ -#line 657 "yacc_sql.y" + case 75: /* digits: '-' FLOAT */ +#line 666 "yacc_sql.y" { (yyval.digits) = (yyvsp[0].floats); } -#line 2416 "yacc_sql.cpp" +#line 2439 "yacc_sql.cpp" break; - case 75: /* digits_list: %empty */ -#line 664 "yacc_sql.y" + case 76: /* digits_list: %empty */ +#line 673 "yacc_sql.y" { (yyval.digits_list) = new std::vector(); } -#line 2424 "yacc_sql.cpp" +#line 2447 "yacc_sql.cpp" break; - case 76: /* digits_list: digits */ -#line 668 "yacc_sql.y" + case 77: /* digits_list: digits */ +#line 677 "yacc_sql.y" { (yyval.digits_list) = new std::vector(); (yyval.digits_list)->push_back((yyvsp[0].digits)); } -#line 2433 "yacc_sql.cpp" +#line 2456 "yacc_sql.cpp" break; - case 77: /* digits_list: digits_list COMMA digits */ -#line 673 "yacc_sql.y" + case 78: /* digits_list: digits_list COMMA digits */ +#line 682 "yacc_sql.y" { (yyval.digits_list)->push_back((yyvsp[0].digits)); } -#line 2441 "yacc_sql.cpp" +#line 2464 "yacc_sql.cpp" break; - case 78: /* value_list: %empty */ -#line 680 "yacc_sql.y" + case 79: /* value_list: %empty */ +#line 689 "yacc_sql.y" { (yyval.value_list) = new std::vector; } -#line 2449 "yacc_sql.cpp" +#line 2472 "yacc_sql.cpp" break; - case 79: /* value_list: value */ -#line 684 "yacc_sql.y" + case 80: /* value_list: value */ +#line 693 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2459 "yacc_sql.cpp" +#line 2482 "yacc_sql.cpp" break; - case 80: /* value_list: value_list COMMA value */ -#line 690 "yacc_sql.y" + case 81: /* value_list: value_list COMMA value */ +#line 699 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2468 "yacc_sql.cpp" +#line 2491 "yacc_sql.cpp" break; - case 81: /* value: nonnegative_value */ -#line 697 "yacc_sql.y" + case 82: /* value: nonnegative_value */ +#line 706 "yacc_sql.y" { (yyval.value) = (yyvsp[0].value); } -#line 2476 "yacc_sql.cpp" +#line 2499 "yacc_sql.cpp" break; - case 82: /* value: '-' NUMBER */ -#line 700 "yacc_sql.y" + case 83: /* value: '-' NUMBER */ +#line 709 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2485 "yacc_sql.cpp" +#line 2508 "yacc_sql.cpp" break; - case 83: /* value: '-' FLOAT */ -#line 704 "yacc_sql.y" + case 84: /* value: '-' FLOAT */ +#line 713 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2494 "yacc_sql.cpp" +#line 2517 "yacc_sql.cpp" break; - case 84: /* nonnegative_value: NUMBER */ -#line 711 "yacc_sql.y" + case 85: /* nonnegative_value: NUMBER */ +#line 720 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2503 "yacc_sql.cpp" +#line 2526 "yacc_sql.cpp" break; - case 85: /* nonnegative_value: FLOAT */ -#line 715 "yacc_sql.y" + case 86: /* nonnegative_value: FLOAT */ +#line 724 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2512 "yacc_sql.cpp" +#line 2535 "yacc_sql.cpp" break; - case 86: /* nonnegative_value: SSS */ -#line 719 "yacc_sql.y" + case 87: /* nonnegative_value: SSS */ +#line 728 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string), 1, strlen((yyvsp[0].string)) - 2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2523 "yacc_sql.cpp" +#line 2546 "yacc_sql.cpp" break; - case 87: /* nonnegative_value: NULL_T */ -#line 725 "yacc_sql.y" + case 88: /* nonnegative_value: NULL_T */ +#line 734 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2531 "yacc_sql.cpp" +#line 2554 "yacc_sql.cpp" break; - case 88: /* nonnegative_value: LSBRACE digits_list RSBRACE */ -#line 728 "yacc_sql.y" + case 89: /* nonnegative_value: LSBRACE digits_list RSBRACE */ +#line 737 "yacc_sql.y" { (yyval.value) = new Value(*(yyvsp[-1].digits_list)); } -#line 2539 "yacc_sql.cpp" +#line 2562 "yacc_sql.cpp" break; - case 89: /* storage_format: %empty */ -#line 735 "yacc_sql.y" + case 90: /* storage_format: %empty */ +#line 744 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2547 "yacc_sql.cpp" +#line 2570 "yacc_sql.cpp" break; - case 90: /* storage_format: STORAGE FORMAT EQ ID */ -#line 739 "yacc_sql.y" + case 91: /* storage_format: STORAGE FORMAT EQ ID */ +#line 748 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2555 "yacc_sql.cpp" +#line 2578 "yacc_sql.cpp" break; - case 91: /* delete_stmt: DELETE FROM ID where */ -#line 746 "yacc_sql.y" + case 92: /* delete_stmt: DELETE FROM ID where */ +#line 755 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -4793,11 +4894,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2568 "yacc_sql.cpp" +#line 2591 "yacc_sql.cpp" break; - case 92: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 758 "yacc_sql.y" + case 93: /* update_stmt: UPDATE ID SET set_clauses where */ +#line 767 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -4808,39 +4909,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2583 "yacc_sql.cpp" +#line 2606 "yacc_sql.cpp" break; - case 93: /* set_clauses: set_clause */ -#line 772 "yacc_sql.y" + case 94: /* set_clauses: set_clause */ +#line 781 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2592 "yacc_sql.cpp" +#line 2615 "yacc_sql.cpp" break; - case 94: /* set_clauses: set_clauses COMMA set_clause */ -#line 777 "yacc_sql.y" + case 95: /* set_clauses: set_clauses COMMA set_clause */ +#line 786 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2600 "yacc_sql.cpp" +#line 2623 "yacc_sql.cpp" break; - case 95: /* set_clause: ID EQ expression */ -#line 784 "yacc_sql.y" + case 96: /* set_clause: ID EQ expression */ +#line 793 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2611 "yacc_sql.cpp" +#line 2634 "yacc_sql.cpp" break; - case 96: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ -#line 794 "yacc_sql.y" + case 97: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ +#line 803 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4878,11 +4979,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].limited_info); } } -#line 2653 "yacc_sql.cpp" +#line 2676 "yacc_sql.cpp" break; - case 97: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 832 "yacc_sql.y" + case 98: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ +#line 841 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -4914,39 +5015,39 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) delete (yyvsp[0].expression_list); } } -#line 2687 "yacc_sql.cpp" +#line 2710 "yacc_sql.cpp" break; - case 98: /* calc_stmt: CALC expression_list */ -#line 865 "yacc_sql.y" + case 99: /* calc_stmt: CALC expression_list */ +#line 874 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2697 "yacc_sql.cpp" +#line 2720 "yacc_sql.cpp" break; - case 99: /* calc_stmt: SELECT expression_list */ -#line 871 "yacc_sql.y" + case 100: /* calc_stmt: SELECT expression_list */ +#line 880 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2707 "yacc_sql.cpp" +#line 2730 "yacc_sql.cpp" break; - case 100: /* expression_list: %empty */ -#line 879 "yacc_sql.y" + case 101: /* expression_list: %empty */ +#line 888 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2715 "yacc_sql.cpp" +#line 2738 "yacc_sql.cpp" break; - case 101: /* expression_list: expression alias */ -#line 883 "yacc_sql.y" + case 102: /* expression_list: expression alias */ +#line 892 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -4955,11 +5056,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2728 "yacc_sql.cpp" +#line 2751 "yacc_sql.cpp" break; - case 102: /* expression_list: expression alias COMMA expression_list */ -#line 892 "yacc_sql.y" + case 103: /* expression_list: expression alias COMMA expression_list */ +#line 901 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -4972,47 +5073,47 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) (yyval.expression_list)->emplace((yyval.expression_list)->begin(), std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2745 "yacc_sql.cpp" +#line 2768 "yacc_sql.cpp" break; - case 103: /* expression: expression '+' expression */ -#line 907 "yacc_sql.y" + case 104: /* expression: expression '+' expression */ +#line 916 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2753 "yacc_sql.cpp" +#line 2776 "yacc_sql.cpp" break; - case 104: /* expression: expression '-' expression */ -#line 910 "yacc_sql.y" + case 105: /* expression: expression '-' expression */ +#line 919 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2761 "yacc_sql.cpp" +#line 2784 "yacc_sql.cpp" break; - case 105: /* expression: expression '*' expression */ -#line 913 "yacc_sql.y" + case 106: /* expression: expression '*' expression */ +#line 922 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2769 "yacc_sql.cpp" +#line 2792 "yacc_sql.cpp" break; - case 106: /* expression: expression '/' expression */ -#line 916 "yacc_sql.y" + case 107: /* expression: expression '/' expression */ +#line 925 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2777 "yacc_sql.cpp" +#line 2800 "yacc_sql.cpp" break; - case 107: /* expression: LBRACE expression_list RBRACE */ -#line 919 "yacc_sql.y" + case 108: /* expression: LBRACE expression_list RBRACE */ +#line 928 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -5021,124 +5122,124 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2790 "yacc_sql.cpp" +#line 2813 "yacc_sql.cpp" break; - case 108: /* expression: '-' expression */ -#line 927 "yacc_sql.y" + case 109: /* expression: '-' expression */ +#line 936 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression( ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2798 "yacc_sql.cpp" +#line 2821 "yacc_sql.cpp" break; - case 109: /* expression: nonnegative_value */ -#line 930 "yacc_sql.y" + case 110: /* expression: nonnegative_value */ +#line 939 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2808 "yacc_sql.cpp" +#line 2831 "yacc_sql.cpp" break; - case 110: /* expression: rel_attr */ -#line 935 "yacc_sql.y" + case 111: /* expression: rel_attr */ +#line 944 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2819 "yacc_sql.cpp" +#line 2842 "yacc_sql.cpp" break; - case 111: /* expression: '*' */ -#line 941 "yacc_sql.y" + case 112: /* expression: '*' */ +#line 950 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2827 "yacc_sql.cpp" +#line 2850 "yacc_sql.cpp" break; - case 112: /* expression: ID DOT '*' */ -#line 944 "yacc_sql.y" + case 113: /* expression: ID DOT '*' */ +#line 953 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2835 "yacc_sql.cpp" +#line 2858 "yacc_sql.cpp" break; - case 113: /* expression: func_expr */ -#line 947 "yacc_sql.y" + case 114: /* expression: func_expr */ +#line 956 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2843 "yacc_sql.cpp" +#line 2866 "yacc_sql.cpp" break; - case 114: /* expression: sub_query_expr */ -#line 950 "yacc_sql.y" + case 115: /* expression: sub_query_expr */ +#line 959 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2851 "yacc_sql.cpp" +#line 2874 "yacc_sql.cpp" break; - case 115: /* alias: %empty */ -#line 957 "yacc_sql.y" + case 116: /* alias: %empty */ +#line 966 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2859 "yacc_sql.cpp" +#line 2882 "yacc_sql.cpp" break; - case 116: /* alias: ID */ -#line 960 "yacc_sql.y" + case 117: /* alias: ID */ +#line 969 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2867 "yacc_sql.cpp" +#line 2890 "yacc_sql.cpp" break; - case 117: /* alias: AS ID */ -#line 963 "yacc_sql.y" + case 118: /* alias: AS ID */ +#line 972 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2875 "yacc_sql.cpp" +#line 2898 "yacc_sql.cpp" break; - case 118: /* func_expr: ID LBRACE expression_list RBRACE */ -#line 969 "yacc_sql.y" + case 119: /* func_expr: ID LBRACE expression_list RBRACE */ +#line 978 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2884 "yacc_sql.cpp" +#line 2907 "yacc_sql.cpp" break; - case 119: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 977 "yacc_sql.y" + case 120: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 986 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2892 "yacc_sql.cpp" +#line 2915 "yacc_sql.cpp" break; - case 120: /* rel_attr: ID */ -#line 983 "yacc_sql.y" + case 121: /* rel_attr: ID */ +#line 992 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2902 "yacc_sql.cpp" +#line 2925 "yacc_sql.cpp" break; - case 121: /* rel_attr: ID DOT ID */ -#line 988 "yacc_sql.y" + case 122: /* rel_attr: ID DOT ID */ +#line 997 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -5146,19 +5247,19 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2914 "yacc_sql.cpp" +#line 2937 "yacc_sql.cpp" break; - case 122: /* relation: ID */ -#line 998 "yacc_sql.y" + case 123: /* relation: ID */ +#line 1007 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2922 "yacc_sql.cpp" +#line 2945 "yacc_sql.cpp" break; - case 123: /* rel_list: relation alias */ -#line 1004 "yacc_sql.y" + case 124: /* rel_list: relation alias */ +#line 1013 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if (nullptr != (yyvsp[0].string)) { @@ -5169,11 +5270,11 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-1].string)); } -#line 2937 "yacc_sql.cpp" +#line 2960 "yacc_sql.cpp" break; - case 124: /* rel_list: relation alias COMMA rel_list */ -#line 1014 "yacc_sql.y" + case 125: /* rel_list: relation alias COMMA rel_list */ +#line 1023 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -5189,22 +5290,22 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) } free((yyvsp[-3].string)); } -#line 2956 "yacc_sql.cpp" +#line 2979 "yacc_sql.cpp" break; - case 125: /* join_clauses: relation ON condition */ -#line 1032 "yacc_sql.y" + case 126: /* join_clauses: relation ON condition */ +#line 1041 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2967 "yacc_sql.cpp" +#line 2990 "yacc_sql.cpp" break; - case 126: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 1039 "yacc_sql.y" + case 127: /* join_clauses: relation ON condition INNER JOIN join_clauses */ +#line 1048 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -5213,299 +5314,299 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2979 "yacc_sql.cpp" +#line 3002 "yacc_sql.cpp" break; - case 127: /* where: %empty */ -#line 1050 "yacc_sql.y" + case 128: /* where: %empty */ +#line 1059 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2987 "yacc_sql.cpp" +#line 3010 "yacc_sql.cpp" break; - case 128: /* where: WHERE condition */ -#line 1053 "yacc_sql.y" + case 129: /* where: WHERE condition */ +#line 1062 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2995 "yacc_sql.cpp" +#line 3018 "yacc_sql.cpp" break; - case 129: /* condition: expression comp_op expression */ -#line 1060 "yacc_sql.y" + case 130: /* condition: expression comp_op expression */ +#line 1069 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 3003 "yacc_sql.cpp" +#line 3026 "yacc_sql.cpp" break; - case 130: /* condition: comp_op expression */ -#line 1064 "yacc_sql.y" + case 131: /* condition: comp_op expression */ +#line 1073 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), temp_expr, (yyvsp[0].expression)); } -#line 3014 "yacc_sql.cpp" +#line 3037 "yacc_sql.cpp" break; - case 131: /* condition: condition AND condition */ -#line 1071 "yacc_sql.y" + case 132: /* condition: condition AND condition */ +#line 1080 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 3022 "yacc_sql.cpp" +#line 3045 "yacc_sql.cpp" break; - case 132: /* condition: condition OR condition */ -#line 1075 "yacc_sql.y" + case 133: /* condition: condition OR condition */ +#line 1084 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 3030 "yacc_sql.cpp" +#line 3053 "yacc_sql.cpp" break; - case 133: /* comp_op: EQ */ -#line 1081 "yacc_sql.y" + case 134: /* comp_op: EQ */ +#line 1090 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 3036 "yacc_sql.cpp" +#line 3059 "yacc_sql.cpp" break; - case 134: /* comp_op: LT */ -#line 1082 "yacc_sql.y" + case 135: /* comp_op: LT */ +#line 1091 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 3042 "yacc_sql.cpp" +#line 3065 "yacc_sql.cpp" break; - case 135: /* comp_op: GT */ -#line 1083 "yacc_sql.y" + case 136: /* comp_op: GT */ +#line 1092 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 3048 "yacc_sql.cpp" +#line 3071 "yacc_sql.cpp" break; - case 136: /* comp_op: LE */ -#line 1084 "yacc_sql.y" + case 137: /* comp_op: LE */ +#line 1093 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 3054 "yacc_sql.cpp" +#line 3077 "yacc_sql.cpp" break; - case 137: /* comp_op: GE */ -#line 1085 "yacc_sql.y" + case 138: /* comp_op: GE */ +#line 1094 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 3060 "yacc_sql.cpp" +#line 3083 "yacc_sql.cpp" break; - case 138: /* comp_op: NE */ -#line 1086 "yacc_sql.y" + case 139: /* comp_op: NE */ +#line 1095 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 3066 "yacc_sql.cpp" +#line 3089 "yacc_sql.cpp" break; - case 139: /* comp_op: IS */ -#line 1087 "yacc_sql.y" + case 140: /* comp_op: IS */ +#line 1096 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 3072 "yacc_sql.cpp" +#line 3095 "yacc_sql.cpp" break; - case 140: /* comp_op: IS NOT */ -#line 1088 "yacc_sql.y" + case 141: /* comp_op: IS NOT */ +#line 1097 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 3078 "yacc_sql.cpp" +#line 3101 "yacc_sql.cpp" break; - case 141: /* comp_op: LIKE */ -#line 1089 "yacc_sql.y" + case 142: /* comp_op: LIKE */ +#line 1098 "yacc_sql.y" { (yyval.comp) = LIKE_OP; } -#line 3084 "yacc_sql.cpp" +#line 3107 "yacc_sql.cpp" break; - case 142: /* comp_op: NOT LIKE */ -#line 1090 "yacc_sql.y" + case 143: /* comp_op: NOT LIKE */ +#line 1099 "yacc_sql.y" { (yyval.comp) = NOT_LIKE_OP; } -#line 3090 "yacc_sql.cpp" +#line 3113 "yacc_sql.cpp" break; - case 143: /* comp_op: IN */ -#line 1091 "yacc_sql.y" + case 144: /* comp_op: IN */ +#line 1100 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 3096 "yacc_sql.cpp" +#line 3119 "yacc_sql.cpp" break; - case 144: /* comp_op: NOT IN */ -#line 1092 "yacc_sql.y" + case 145: /* comp_op: NOT IN */ +#line 1101 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 3102 "yacc_sql.cpp" +#line 3125 "yacc_sql.cpp" break; - case 145: /* comp_op: EXISTS */ -#line 1093 "yacc_sql.y" + case 146: /* comp_op: EXISTS */ +#line 1102 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 3108 "yacc_sql.cpp" +#line 3131 "yacc_sql.cpp" break; - case 146: /* comp_op: NOT EXISTS */ -#line 1094 "yacc_sql.y" + case 147: /* comp_op: NOT EXISTS */ +#line 1103 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 3114 "yacc_sql.cpp" +#line 3137 "yacc_sql.cpp" break; - case 147: /* opt_order_by: %empty */ -#line 1099 "yacc_sql.y" + case 148: /* opt_order_by: %empty */ +#line 1108 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 3122 "yacc_sql.cpp" +#line 3145 "yacc_sql.cpp" break; - case 148: /* opt_order_by: ORDER BY sort_list */ -#line 1103 "yacc_sql.y" + case 149: /* opt_order_by: ORDER BY sort_list */ +#line 1112 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(), (yyval.orderby_list)->end()); } -#line 3131 "yacc_sql.cpp" +#line 3154 "yacc_sql.cpp" break; - case 149: /* sort_list: sort_unit */ -#line 1111 "yacc_sql.y" + case 150: /* sort_list: sort_unit */ +#line 1120 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 3140 "yacc_sql.cpp" +#line 3163 "yacc_sql.cpp" break; - case 150: /* sort_list: sort_unit COMMA sort_list */ -#line 1116 "yacc_sql.y" + case 151: /* sort_list: sort_unit COMMA sort_list */ +#line 1125 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 3149 "yacc_sql.cpp" +#line 3172 "yacc_sql.cpp" break; - case 151: /* sort_unit: expression */ -#line 1124 "yacc_sql.y" + case 152: /* sort_unit: expression */ +#line 1133 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3159 "yacc_sql.cpp" +#line 3182 "yacc_sql.cpp" break; - case 152: /* sort_unit: expression DESC */ -#line 1130 "yacc_sql.y" + case 153: /* sort_unit: expression DESC */ +#line 1139 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 3169 "yacc_sql.cpp" +#line 3192 "yacc_sql.cpp" break; - case 153: /* sort_unit: expression ASC */ -#line 1136 "yacc_sql.y" + case 154: /* sort_unit: expression ASC */ +#line 1145 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3179 "yacc_sql.cpp" +#line 3202 "yacc_sql.cpp" break; - case 154: /* group_by: %empty */ -#line 1145 "yacc_sql.y" + case 155: /* group_by: %empty */ +#line 1154 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 3187 "yacc_sql.cpp" +#line 3210 "yacc_sql.cpp" break; - case 155: /* group_by: GROUP BY expression_list */ -#line 1149 "yacc_sql.y" + case 156: /* group_by: GROUP BY expression_list */ +#line 1158 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 3195 "yacc_sql.cpp" +#line 3218 "yacc_sql.cpp" break; - case 156: /* opt_having: %empty */ -#line 1156 "yacc_sql.y" + case 157: /* opt_having: %empty */ +#line 1165 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 3203 "yacc_sql.cpp" +#line 3226 "yacc_sql.cpp" break; - case 157: /* opt_having: HAVING condition */ -#line 1160 "yacc_sql.y" + case 158: /* opt_having: HAVING condition */ +#line 1169 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3211 "yacc_sql.cpp" +#line 3234 "yacc_sql.cpp" break; - case 158: /* opt_limit: %empty */ -#line 1167 "yacc_sql.y" + case 159: /* opt_limit: %empty */ +#line 1176 "yacc_sql.y" { (yyval.limited_info) = nullptr; } -#line 3219 "yacc_sql.cpp" +#line 3242 "yacc_sql.cpp" break; - case 159: /* opt_limit: LIMIT NUMBER */ -#line 1171 "yacc_sql.y" + case 160: /* opt_limit: LIMIT NUMBER */ +#line 1180 "yacc_sql.y" { (yyval.limited_info) = new LimitSqlNode(); (yyval.limited_info)->number = (yyvsp[0].number); } -#line 3228 "yacc_sql.cpp" +#line 3251 "yacc_sql.cpp" break; - case 160: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1179 "yacc_sql.y" + case 161: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1188 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3237 "yacc_sql.cpp" +#line 3260 "yacc_sql.cpp" break; - case 161: /* set_variable_stmt: SET ID EQ value */ -#line 1187 "yacc_sql.y" + case 162: /* set_variable_stmt: SET ID EQ value */ +#line 1196 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -5513,10 +5614,10 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3249 "yacc_sql.cpp" +#line 3272 "yacc_sql.cpp" break; -#line 3253 "yacc_sql.cpp" +#line 3276 "yacc_sql.cpp" default: break; } @@ -5715,7 +5816,7 @@ int yyparse(const char *sql_string, ParsedSqlResult *sql_result, void *scanner) return yyresult; } -#line 1199 "yacc_sql.y" +#line 1208 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index c16ece4f..33d5fca1 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -432,6 +432,15 @@ vector_index_config: $$->probes = std::move(*$16); free($4); } + | LBRACE TYPE EQ index_type COMMA DISTANCE EQ ID COMMA LISTS EQ value COMMA PROBES EQ value RBRACE + { + $$ = new VectorIndexConfig; + $$->distance_fn = $8; + $$->index_type = $4; + $$->lists = std::move(*$12); + $$->probes = std::move(*$16); + free($8); + } ; attr_list: diff --git a/src/observer/sql/stmt/create_index_stmt.cpp b/src/observer/sql/stmt/create_index_stmt.cpp index 05ad3cb7..fc8de69f 100644 --- a/src/observer/sql/stmt/create_index_stmt.cpp +++ b/src/observer/sql/stmt/create_index_stmt.cpp @@ -60,6 +60,38 @@ RC CreateIndexStmt::create(Db *db, const CreateIndexSqlNode &create_index, Stmt return RC::SCHEMA_INDEX_NAME_REPEAT; } - stmt = new CreateIndexStmt(table, field_metas, create_index.index_name, create_index.unique); + auto config = create_index.vector_index_config; + + auto index_type = config.index_type; + if (index_type == IndexType::BPlusTreeIndex) { + stmt = new CreateIndexStmt(table, index_type, field_metas, create_index.index_name, create_index.unique); + } else if (index_type == IndexType::VectorIVFFlatIndex) { + // 解析距离度量方法,后续单独提取出去 + auto distance_type_str = common::str_to_lower(config.distance_fn); + NormalFunctionType distance_type; + if (distance_type_str == "l2_distance") { + distance_type = NormalFunctionType::L2_DISTANCE; + } else if (distance_type_str == "inner_product") { + distance_type = NormalFunctionType::INNER_PRODUCT; + } else if (distance_type_str == "cosine_distance") { + distance_type = NormalFunctionType::COSINE_DISTANCE; + } else { + return RC::UNSUPPORTED; + } + + // 没有参数,使用默认参数 + if (config.lists.attr_type() == AttrType::UNDEFINED && config.probes.attr_type() == AttrType::UNDEFINED) { + stmt = new CreateIndexStmt(table, index_type, field_metas, create_index.index_name, distance_type); + } else if (config.lists.attr_type() == AttrType::INTS && config.probes.attr_type() == AttrType::INTS) { + std::vector options(2); + options[0] = config.lists.get_int(); + options[1] = config.probes.get_int(); + stmt = new CreateIndexStmt( + table, index_type, field_metas, create_index.index_name, distance_type, std::move(options)); + } else { + return RC::INVALID_ARGUMENT; + } + } + return RC::SUCCESS; } diff --git a/src/observer/sql/stmt/create_index_stmt.h b/src/observer/sql/stmt/create_index_stmt.h index 03e4c8d7..37112660 100644 --- a/src/observer/sql/stmt/create_index_stmt.h +++ b/src/observer/sql/stmt/create_index_stmt.h @@ -18,6 +18,7 @@ See the Mulan PSL v2 for more details. */ #include "sql/stmt/stmt.h" #include "storage/table/table_meta.h" +#include "sql/expr/expression.h" struct CreateIndexSqlNode; class Table; @@ -30,11 +31,23 @@ class FieldMeta; class CreateIndexStmt : public Stmt { public: - CreateIndexStmt(Table *table, const vector &field_meta, const std::string &index_name, bool unique) - : table_(table), field_meta_(field_meta), index_name_(index_name), unique_(unique) + CreateIndexStmt(Table *table, IndexType index_type, const vector &field_meta, + const std::string &index_name, bool unique) + : table_(table), index_type_(index_type), field_meta_(field_meta), index_name_(index_name), unique_(unique) {} - virtual ~CreateIndexStmt() = default; + // 向量索引 + CreateIndexStmt(Table *table, IndexType index_type, const vector &field_meta, + const std::string &index_name, NormalFunctionType distance_type, std::vector options = {}) + : table_(table), + index_type_(index_type), + field_meta_(field_meta), + index_name_(index_name), + distance_type_(distance_type), + options_(std::move(options)) + {} + + ~CreateIndexStmt() override = default; StmtType type() const override { return StmtType::CREATE_INDEX; } @@ -42,13 +55,19 @@ class CreateIndexStmt : public Stmt const vector &field_meta() const { return field_meta_; } const std::string &index_name() const { return index_name_; } bool unique() const { return unique_; } + IndexType index_type() const { return index_type_; } + NormalFunctionType distance_type() const { return distance_type_; } + const std::vector &options() const { return options_; } public: static RC create(Db *db, const CreateIndexSqlNode &create_index, Stmt *&stmt); private: - Table *table_ = nullptr; - vector field_meta_; - std::string index_name_; - bool unique_; + Table *table_ = nullptr; + IndexType index_type_; + vector field_meta_; + std::string index_name_; + bool unique_ = false; + NormalFunctionType distance_type_; + std::vector options_; }; diff --git a/src/observer/storage/index/index.h b/src/observer/storage/index/index.h index a5601f95..8f1a18e4 100644 --- a/src/observer/storage/index/index.h +++ b/src/observer/storage/index/index.h @@ -50,7 +50,7 @@ class Index return RC::UNSUPPORTED; } - virtual bool is_vector_index() { return false; } + virtual bool is_vector_index() { return index_meta_.index_type() == IndexType::VectorIVFFlatIndex; } const IndexMeta &index_meta() const { return index_meta_; } @@ -81,7 +81,10 @@ class Index * @param right_inclusive 是否包含右边界 */ virtual IndexScanner *create_scanner(const char *left_key, int left_len, bool left_inclusive, const char *right_key, - int right_len, bool right_inclusive) = 0; + int right_len, bool right_inclusive) + { + return nullptr; + } /** * @brief 同步索引数据到磁盘 diff --git a/src/observer/storage/index/index_meta.cpp b/src/observer/storage/index/index_meta.cpp index 3aff8a7a..cd004aae 100644 --- a/src/observer/storage/index/index_meta.cpp +++ b/src/observer/storage/index/index_meta.cpp @@ -10,9 +10,10 @@ See the Mulan PSL v2 for more details. */ #include "index_meta.h" -RC IndexMeta::init(const char *name, const vector &fields, bool unique) +RC IndexMeta::init(const char *name, IndexType index_type, const vector &fields, bool unique) { name_ = name; + index_type_ = index_type; fields_total_len_ = 0; fields_ = fields; unique_ = unique; @@ -42,6 +43,7 @@ string IndexMeta::to_string() const void IndexMeta::to_json(Json::Value &json_value) const { json_value["name"] = name_; + json_value["index_type"] = static_cast(index_type_); json_value["fields_total_len"] = fields_total_len_; json_value["unique"] = unique_; @@ -62,12 +64,13 @@ void IndexMeta::to_json(Json::Value &json_value) const RC IndexMeta::from_json(const Json::Value &json_value, IndexMeta &index) { - if (!json_value.isMember("name") || !json_value.isMember("fields") || !json_value.isMember("fields_total_len") || - !json_value.isMember("fields_offset")) { + if (!json_value.isMember("name") || !json_value.isMember("index_type") || !json_value.isMember("fields") || + !json_value.isMember("fields_total_len") || !json_value.isMember("fields_offset")) { return RC::INVALID_ARGUMENT; } index.name_ = json_value["name"].asString(); + index.index_type_ = static_cast(json_value["index_type"].asInt()); index.fields_total_len_ = json_value["fields_total_len"].asInt(); index.unique_ = json_value["unique"].asBool(); diff --git a/src/observer/storage/index/index_meta.h b/src/observer/storage/index/index_meta.h index b1a86d48..6f420252 100644 --- a/src/observer/storage/index/index_meta.h +++ b/src/observer/storage/index/index_meta.h @@ -38,7 +38,7 @@ class IndexMeta public: IndexMeta() = default; - [[nodiscard]] RC init(const char *name, const vector &fields, bool unique); + [[nodiscard]] RC init(const char *name, IndexType index_type, const vector &fields, bool unique = false); void desc(ostream &os) const { os << to_string(); } @@ -64,7 +64,7 @@ class IndexMeta } [[nodiscard]] const char *name() const { return name_.c_str(); } - IndexType type() const { return type_; } + IndexType index_type() const { return index_type_; } [[nodiscard]] int fields_total_len() const { return fields_total_len_; } [[nodiscard]] const vector &fields() const { return fields_; } [[nodiscard]] bool unique() const { return unique_; } @@ -72,7 +72,7 @@ class IndexMeta private: string name_; - IndexType type_; + IndexType index_type_; int fields_total_len_ = 0; vector fields_offset_; vector fields_; diff --git a/src/observer/storage/index/ivfflat_index.cpp b/src/observer/storage/index/ivfflat_index.cpp new file mode 100644 index 00000000..d87c371e --- /dev/null +++ b/src/observer/storage/index/ivfflat_index.cpp @@ -0,0 +1,213 @@ +/*************************************************************** + * * + * @Author : Koschei * + * @Email : nitianzero@gmail.com * + * @Date : 2024/10/18 * + * @Description : ivfflat index source file * + * * + * Copyright (c) 2024 Koschei * + * All rights reserved. * + * * + ***************************************************************/ + +#include + +#include "storage/index/ivfflat_index.h" + +using Vector = std::vector; + +void vector_add(Vector &a, const Vector &b) +{ + for (size_t i = 0; i < a.size(); i++) { + a[i] += b[i]; + } +} + +void vector_scalar_div(Vector &a, float x) +{ + for (auto &y : a) { + y /= x; + } +} + +// 计算两个向量之间的距离 +float compute_distance(const Vector &a, const Vector &b, NormalFunctionType dist_fn) +{ + switch (dist_fn) { + case NormalFunctionType::L2_DISTANCE: return builtin::l2_distance(a, b); + case NormalFunctionType::COSINE_DISTANCE: return builtin::cosine_distance(a, b); + case NormalFunctionType::INNER_PRODUCT: return builtin::inner_product(a, b); + default: return 0; + } +} + +// 找到离给定向量最近的质心 +auto find_centroid(const Vector &vec, const std::vector ¢roids, NormalFunctionType dist_fn) -> size_t +{ + size_t best_index = 0; + float min_distance = std::numeric_limits::max(); + for (size_t i = 0; i < centroids.size(); i++) { + float distance = compute_distance(vec, centroids[i], dist_fn); + if (distance < min_distance) { + min_distance = distance; + best_index = i; + } + } + return best_index; +} + +// 根据数据和旧质心计算新质心 +auto find_centroids(const std::vector> &data, const std::vector ¢roids, + NormalFunctionType dist_fn) -> std::vector +{ + std::vector new_centroids(centroids.size(), Vector(centroids[0].size(), 0.0)); + std::vector counts(centroids.size(), 0); + + // 聚类点累加 + for (const auto &[vec, rid] : data) { + size_t index = find_centroid(vec, centroids, dist_fn); + vector_add(new_centroids[index], vec); + counts[index]++; + } + + // 计算平均值作为新质心 + for (size_t i = 0; i < new_centroids.size(); i++) { + if (counts[i] > 0) { + vector_scalar_div(new_centroids[i], counts[i]); + } else { + new_centroids[i] = centroids[i]; // 无数据点的运行质心 + } + } + return new_centroids; +} + +RC IvfflatIndex::create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) +{ + if (inited_) { + LOG_WARN("Failed to create index due to the index has been created before. file_name:%s, index:%s", + file_name, index_meta.to_string().c_str()); + return RC::RECORD_OPENNED; + } + + Index::init(index_meta); + + // 暂时先不支持持久化 + // BufferPoolManager &bpm = table->db()->buffer_pool_manager(); + // RC rc = index_handler_.create(table->db()->log_handler(), bpm, file_name, index_meta); + // if (RC::SUCCESS != rc) { + // LOG_WARN("Failed to create index_handler, file_name:%s, index:%s, rc:%s", + // file_name, index_meta.to_string().c_str(), strrc(rc)); + // return rc; + // } + + inited_ = true; + table_ = table; + field_meta_ = field_meta; + LOG_INFO("Successfully create index, file_name:%s, index:%s", + file_name, index_meta.to_string().c_str()); + return RC::SUCCESS; +} + +RC IvfflatIndex::open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) +{ + return RC::SUCCESS; +} + +RC IvfflatIndex::close() { return RC::SUCCESS; } + +RC IvfflatIndex::build_index( + std::vector> &initial_data, NormalFunctionType distance_fn, const std::vector &options) +{ + // 初始化距离度量函数 + distance_fn_ = distance_fn; + + // 初始化参数 + lists_ = options[0]; + probes_ = options[1]; + + if (initial_data.empty()) { + return RC::SUCCESS; + } + + std::mt19937 gen(std::random_device{}()); + std::uniform_int_distribution<> dis(0, initial_data.size() - 1); + + // 随机选择初始质心 + centroids_.resize(lists_); + for (auto ¢roid : centroids_) { + centroid = initial_data[dis(gen)].first; + } + + // 迭代更新质心直到收敛 + bool changed = true; + while (changed) { + changed = false; + auto new_centroids = find_centroids(initial_data, centroids_, distance_fn_); + + // 检查质心是否发生变化 + for (size_t i = 0; i < lists_; i++) { + if (compute_distance(new_centroids[i], centroids_[i], distance_fn_) > 1e-4) { + changed = true; + } + centroids_[i] = new_centroids[i]; + } + } + + // 将数据点分配到最近的质心 + centroids_buckets_.resize(lists_); + for (auto &[vec, rid] : initial_data) { + size_t index = find_centroid(vec, centroids_, distance_fn_); + centroids_buckets_[index].emplace_back(std::move(vec), rid); + } + + return RC::SUCCESS; +} + +std::vector IvfflatIndex::ann_search(const std::vector &base_vector, size_t limit) +{ + std::vector> candidates; + + // 探测一定数量的列表并收集候选结果 + for (size_t i = 0; i < probes_; i++) { + for (const auto &[vec, rid] : centroids_buckets_[i]) { + float dist = compute_distance(base_vector, vec, distance_fn_); + candidates.emplace_back(dist, rid); + } + } + + // 根据距离排序并选取前 limit 个结果 + std::sort(candidates.begin(), candidates.end(), [&](const std::pair &a, const std::pair &b) { + return a.first < b.first; // 按距离升序排序 + }); + + auto size = std::min(candidates.size(), limit); + std::vector result(size); + for (size_t i = 0; i < size; i++) { + result[i] = candidates[i].second; + } + + return result; +} + +Vector IvfflatIndex::get_vector(const char *record) +{ + int size = field_meta_.len() / sizeof(float); + Vector vector(size); + // 直接将记录位置调整为适当的浮点数指针 + const float *data = reinterpret_cast(record + field_meta_.offset()); + // 使用标准库函数来进行快速的内存复制 + std::copy(data, data + size, vector.begin()); + return vector; +} + +RC IvfflatIndex::insert_entry(const char *record, const RID *rid) +{ + Vector vector = get_vector(record); + size_t index = find_centroid(vector, centroids_, this->distance_fn_); + centroids_buckets_[index].emplace_back(std::move(vector), *rid); + return RC::SUCCESS; +} + +RC IvfflatIndex::delete_entry(const char *record, const RID *rid) { return RC::SUCCESS; } + +RC IvfflatIndex::sync() { return RC::SUCCESS; } diff --git a/src/observer/storage/index/ivfflat_index.h b/src/observer/storage/index/ivfflat_index.h index 7942520f..644c4b42 100644 --- a/src/observer/storage/index/ivfflat_index.h +++ b/src/observer/storage/index/ivfflat_index.h @@ -11,6 +11,7 @@ See the Mulan PSL v2 for more details. */ #pragma once #include "storage/index/index.h" +#include "sql/builtin/builtin.h" /** * @brief ivfflat 向量索引 @@ -19,31 +20,46 @@ See the Mulan PSL v2 for more details. */ class IvfflatIndex : public Index { public: - IvfflatIndex() {}; - virtual ~IvfflatIndex() noexcept {}; + using Vector = std::vector; - RC create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) - { - return RC::UNIMPLEMENTED; - }; - RC open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) - { + IvfflatIndex() = default; + ~IvfflatIndex() noexcept override = default; - return RC::UNIMPLEMENTED; - }; + RC create(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) override; - vector ann_search(const vector &base_vector, size_t limit) { return vector(); } + RC open(Table *table, const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta) override; - RC close() { return RC::UNIMPLEMENTED; } + RC close(); - RC insert_entry(const char *record, const RID *rid) override { return RC::UNIMPLEMENTED; }; - RC delete_entry(const char *record, const RID *rid) override { return RC::UNIMPLEMENTED; }; + std::vector ann_search(const std::vector &base_vector, size_t limit); - RC sync() override { return RC::UNIMPLEMENTED; }; + Vector get_vector(const char *record); + + RC insert_entry(const char *record, const RID *rid) override; + + RC delete_entry(const char *record, const RID *rid) override; + + RC sync() override; + + RC build_index(std::vector> &initial_data, NormalFunctionType distance_fn, + const std::vector &options); + + NormalFunctionType distance_fn() { return distance_fn_; } private: bool inited_ = false; Table *table_ = nullptr; int lists_ = 1; int probes_ = 1; + + FieldMeta field_meta_; // 建立索引字段元数据 + + // 距离度量函数 + NormalFunctionType distance_fn_; + + // 质心 + std::vector centroids_; + + // 每个质心周围的点 + std::vector>> centroids_buckets_; }; diff --git a/src/observer/storage/record/record.h b/src/observer/storage/record/record.h index 705bfeef..64886b43 100644 --- a/src/observer/storage/record/record.h +++ b/src/observer/storage/record/record.h @@ -281,7 +281,11 @@ class Record char *data = new char[data_len]; memcpy(data, data_ + field_offset, data_len); value.set_data(data, data_len); - delete[] data; + + // vector 不释放内存 + if (!(field_meta.type() == AttrType::VECTORS)) { + delete[] data; + } return RC::SUCCESS; } diff --git a/src/observer/storage/table/table.cpp b/src/observer/storage/table/table.cpp index 18e99022..c457158a 100644 --- a/src/observer/storage/table/table.cpp +++ b/src/observer/storage/table/table.cpp @@ -33,6 +33,8 @@ See the Mulan PSL v2 for more details. */ #include "storage/table/table.h" #include "storage/trx/trx.h" #include "storage/db/db.h" +#include "storage/index/ivfflat_index.h" +#include "sql/expr/expression.h" Table::~Table() { @@ -333,7 +335,8 @@ RC Table::get_chunk_scanner(ChunkFileScanner &scanner, Trx *trx, ReadWriteMode m return rc; } -RC Table::create_index(Trx *trx, const vector &field_meta, const char *index_name, bool unique) +RC Table::create_index( + Trx *trx, IndexType index_type, const vector &field_meta, const char *index_name, bool unique) { if (common::is_blank(index_name)) { LOG_INFO("Invalid input arguments, table name is %s, index_name is blank or attribute_name is blank", name()); @@ -342,7 +345,7 @@ RC Table::create_index(Trx *trx, const vector &field_meta, const char IndexMeta new_index_meta; - RC rc = new_index_meta.init(index_name, field_meta, unique); + RC rc = new_index_meta.init(index_name, index_type, field_meta, unique); if (rc != RC::SUCCESS) { LOG_INFO("Failed to init IndexMeta in table:%s, index:%s", name(), new_index_meta.to_string().c_str()); @@ -431,6 +434,113 @@ RC Table::create_index(Trx *trx, const vector &field_meta, const char return rc; } +RC Table::create_vector_index(Trx *trx, IndexType index_type, const vector &field_meta, + const char *index_name, NormalFunctionType distance_type, const std::vector &options) +{ + if (common::is_blank(index_name)) { + LOG_INFO("Invalid input arguments, table name is %s, index_name is blank or attribute_name is blank", name()); + return RC::INVALID_ARGUMENT; + } + + IndexMeta new_index_meta; + + RC rc = new_index_meta.init(index_name, index_type, field_meta); + if (rc != RC::SUCCESS) { + LOG_INFO("Failed to init IndexMeta in table:%s, index:%s", + name(), new_index_meta.to_string().c_str()); + return rc; + } + + // 创建索引相关数据 + auto index = new IvfflatIndex(); + string index_file = table_index_file(base_dir_.c_str(), name(), index_name); + rc = index->create(this, index_file.c_str(), new_index_meta, field_meta[0]); + if (rc != RC::SUCCESS) { + delete index; + LOG_ERROR("Failed to create Ivfflat index. file name=%s, rc=%d:%s", index_file.c_str(), rc, strrc(rc)); + return rc; + } + + // 遍历当前的所有数据,插入这个索引 + RecordFileScanner scanner; + rc = get_record_scanner(scanner, trx, ReadWriteMode::READ_ONLY); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to create scanner while creating vector index. table=%s, index=%s, rc=%s", + name(), index_name, strrc(rc)); + return rc; + } + + // 一次性把某向量类型列数据都读出来 + Record record; + std::vector, RID>> data; + while (OB_SUCC(rc = scanner.next(record))) { + Value value; + // 目前向量仅在一列上建立索引 + rc = record.get_field(field_meta[0], value); + if (OB_FAIL(rc)) { + return rc; + } + data.emplace_back(value.get_vector(), record.rid()); + } + + if (RC::RECORD_EOF == rc) { + rc = RC::SUCCESS; + } else { + LOG_WARN("failed to get record while creating index. table=%s, index=%s, rc=%s", + name(), index_name, strrc(rc)); + return rc; + } + + scanner.close_scan(); + + // 建立向量索引 + index->build_index(data, distance_type, options); + + LOG_INFO("inserted all records into new index. table=%s, index=%s", name(), index_name); + + indexes_.emplace_back(index); + + /// 接下来将这个索引放到表的元数据中 + TableMeta new_table_meta(table_meta_); + rc = new_table_meta.add_index(new_index_meta); + if (rc != RC::SUCCESS) { + LOG_ERROR("Failed to add index (%s) on table (%s). error=%d:%s", index_name, name(), rc, strrc(rc)); + return rc; + } + + /// 内存中有一份元数据,磁盘文件也有一份元数据。修改磁盘文件时,先创建一个临时文件,写入完成后再rename为正式文件 + /// 这样可以防止文件内容不完整 + // 创建元数据临时文件 + string tmp_file = table_meta_file(base_dir_.c_str(), name()) + ".tmp"; + fstream fs; + fs.open(tmp_file, ios_base::out | ios_base::binary | ios_base::trunc); + if (!fs.is_open()) { + LOG_ERROR("Failed to open file for write. file name=%s, errmsg=%s", tmp_file.c_str(), strerror(errno)); + return RC::IOERR_OPEN; // 创建索引中途出错,要做还原操作 + } + if (new_table_meta.serialize(fs) < 0) { + LOG_ERROR("Failed to dump new table meta to file: %s. sys err=%d:%s", tmp_file.c_str(), errno, strerror(errno)); + return RC::IOERR_WRITE; + } + fs.close(); + + // 覆盖原始元数据文件 + string meta_file = table_meta_file(base_dir_.c_str(), name()); + + int ret = rename(tmp_file.c_str(), meta_file.c_str()); + if (ret != 0) { + LOG_ERROR("Failed to rename tmp meta file (%s) to normal meta file (%s) while creating index (%s) on table (%s). " + "system error=%d:%s", + tmp_file.c_str(), meta_file.c_str(), index_name, name(), errno, strerror(errno)); + return RC::IOERR_WRITE; + } + + table_meta_.swap(new_table_meta); + + LOG_INFO("Successfully added a new index (%s) on the table (%s)", index_name, name()); + return rc; +} + RC Table::delete_record(const RID &rid) { RC rc = RC::SUCCESS; @@ -520,6 +630,7 @@ Index *Table::find_index(const char *index_name) const } return nullptr; } + Index *Table::find_index_by_field(const char *field_name) const { for (const auto &index : indexes_) { @@ -533,6 +644,23 @@ Index *Table::find_index_by_field(const char *field_name) const return nullptr; } +// 对向量距离类型,索引字段进行检查 +Index *Table::find_vector_index(NormalFunctionType distance_fn, const char *field_name) const +{ + for (const auto &index : indexes_) { + if (index->is_vector_index()) { + auto vector_index = dynamic_cast(index); + if (vector_index->distance_fn() == distance_fn) { + auto name = index->index_meta().fields().front().name(); + if (0 == strcmp(name, field_name)) { + return index; + } + } + } + } + return nullptr; +} + RC Table::sync() { RC rc = RC::SUCCESS; diff --git a/src/observer/storage/table/table.h b/src/observer/storage/table/table.h index 15b0468b..a9feb4ce 100644 --- a/src/observer/storage/table/table.h +++ b/src/observer/storage/table/table.h @@ -17,6 +17,7 @@ See the Mulan PSL v2 for more details. */ #include "storage/table/base_table.h" #include "common/types.h" #include "common/lang/span.h" +#include "sql/builtin/builtin.h" struct RID; class Record; @@ -77,7 +78,11 @@ class Table : public BaseTable RC recover_insert_record(Record &record); - RC create_index(Trx *trx, const vector &field_meta, const char *index_name, bool unique); + RC create_index( + Trx *trx, IndexType index_type, const vector &field_meta, const char *index_name, bool unique); + + RC create_vector_index(Trx *trx, IndexType index_type, const vector &field_meta, const char *index_name, + NormalFunctionType distance_type, const std::vector &options); RC get_record_scanner(RecordFileScanner &scanner, Trx *trx, ReadWriteMode mode); @@ -109,6 +114,7 @@ class Table : public BaseTable public: Index *find_index(const char *index_name) const; Index *find_index_by_field(const char *field_name) const; + Index *find_vector_index(NormalFunctionType distance_fn, const char *field_name) const; private: RecordFileHandler *record_handler_ = nullptr; /// 记录操作 From b638f7dd13e40401d0529814f79431bdc1f4db33 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 19 Oct 2024 02:35:45 +0800 Subject: [PATCH 304/308] =?UTF-8?q?=E6=96=B0=E5=A2=9Eboolean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/data_type.cpp | 4 +- src/observer/common/value.h | 1 + src/observer/sql/parser/lex_sql.cpp | 547 +++++----- src/observer/sql/parser/lex_sql.h | 2 +- src/observer/sql/parser/lex_sql.l | 2 + src/observer/sql/parser/yacc_sql.cpp | 1337 ++++++++++++------------ src/observer/sql/parser/yacc_sql.hpp | 90 +- src/observer/sql/parser/yacc_sql.y | 8 + 8 files changed, 1021 insertions(+), 970 deletions(-) diff --git a/src/observer/common/type/data_type.cpp b/src/observer/common/type/data_type.cpp index 5e832793..561b8269 100644 --- a/src/observer/common/type/data_type.cpp +++ b/src/observer/common/type/data_type.cpp @@ -12,7 +12,7 @@ See the Mulan PSL v2 for more details. */ #include "common/type/float_type.h" #include "common/type/integer_type.h" #include "common/type/data_type.h" -#include "common/type/date_type.h" +#include "common/type/boolean_type.h" #include "common/type/null_type.h" #include "common/type/vector_type.h" @@ -21,7 +21,7 @@ array, static_cast(AttrType::MAXTYPE)> DataType::type_ make_unique(), make_unique(), make_unique(), - make_unique(AttrType::BOOLEANS), + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/src/observer/common/value.h b/src/observer/common/value.h index 35509f5c..34c2eca0 100644 --- a/src/observer/common/value.h +++ b/src/observer/common/value.h @@ -20,6 +20,7 @@ See the Mulan PSL v2 for more details. */ #include "common/type/data_type.h" #include "common/type/date_type.h" #include "common/type/text_type.h" +#include "common/type/boolean_type.h" #include "common/utils.h" class NullValue diff --git a/src/observer/sql/parser/lex_sql.cpp b/src/observer/sql/parser/lex_sql.cpp index 658f415f..d591f90d 100644 --- a/src/observer/sql/parser/lex_sql.cpp +++ b/src/observer/sql/parser/lex_sql.cpp @@ -386,8 +386,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 81 -#define YY_END_OF_BUFFER 82 +#define YY_NUM_RULES 83 +#define YY_END_OF_BUFFER 84 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -395,34 +395,35 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[236] = +static const flex_int16_t yy_accept[243] = { 0, - 0, 0, 0, 0, 82, 80, 1, 2, 80, 80, - 80, 58, 59, 76, 74, 62, 75, 6, 77, 3, - 5, 67, 63, 69, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 60, 61, 81, 66, 0, 78, - 0, 79, 0, 3, 64, 65, 68, 73, 73, 73, - 49, 73, 48, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 51, 71, 73, - 73, 73, 73, 15, 23, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 4, 22, - - 50, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 33, 73, 73, 73, 70, 73, 73, 73, - 73, 29, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 19, 34, 73, 73, 36, 73, - 9, 11, 73, 7, 73, 73, 73, 20, 73, 73, - 8, 73, 73, 73, 73, 25, 56, 72, 73, 40, - 73, 73, 73, 16, 73, 17, 73, 37, 73, 73, - 73, 73, 57, 73, 30, 73, 73, 73, 73, 73, - 35, 73, 44, 73, 14, 73, 55, 73, 45, 73, - - 47, 73, 73, 73, 12, 73, 73, 73, 73, 21, - 31, 10, 27, 52, 73, 54, 46, 42, 24, 73, - 73, 18, 73, 13, 39, 28, 26, 38, 43, 73, - 73, 53, 41, 32, 0 + 0, 0, 0, 0, 84, 82, 1, 2, 82, 82, + 82, 60, 61, 78, 76, 64, 77, 6, 79, 3, + 5, 69, 65, 71, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 62, 63, 83, 68, 0, 80, + 0, 81, 0, 3, 66, 67, 70, 75, 75, 75, + 49, 75, 48, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 51, 73, + 75, 75, 75, 75, 15, 23, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + + 4, 22, 50, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 33, 75, 75, 75, 72, + 75, 75, 75, 75, 29, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 19, 34, + 75, 75, 36, 75, 9, 11, 75, 7, 75, 75, + 75, 75, 20, 75, 75, 8, 75, 75, 75, 75, + 25, 56, 74, 75, 40, 75, 75, 75, 16, 75, + 17, 75, 37, 58, 75, 75, 75, 75, 57, 75, + 30, 75, 75, 75, 75, 75, 59, 35, 75, 44, + + 75, 14, 75, 55, 75, 45, 75, 47, 75, 75, + 75, 12, 75, 75, 75, 75, 21, 31, 10, 27, + 52, 75, 54, 46, 42, 24, 75, 75, 18, 75, + 13, 39, 28, 26, 38, 43, 75, 75, 53, 41, + 32, 0 } ; static const YY_CHAR yy_ec[256] = @@ -469,67 +470,69 @@ static const YY_CHAR yy_meta[73] = 2, 2 } ; -static const flex_int16_t yy_base[241] = +static const flex_int16_t yy_base[248] = { 0, - 0, 0, 0, 0, 638, 639, 639, 639, 619, 631, - 629, 639, 639, 639, 639, 639, 639, 639, 639, 60, - 639, 58, 639, 616, 59, 63, 64, 65, 66, 90, - 67, 116, 73, 80, 618, 88, 107, 113, 123, 138, - 136, 128, 152, 118, 639, 639, 639, 639, 627, 639, - 625, 639, 615, 81, 639, 639, 639, 0, 614, 143, - 68, 133, 613, 139, 166, 164, 168, 156, 184, 182, - 191, 187, 188, 194, 196, 186, 198, 244, 612, 217, - 203, 197, 231, 604, 219, 237, 245, 251, 257, 256, - 216, 236, 259, 263, 277, 266, 278, 279, 603, 602, - - 601, 294, 284, 283, 286, 306, 308, 309, 313, 310, - 314, 312, 322, 323, 324, 325, 329, 332, 334, 336, - 344, 351, 354, 357, 363, 361, 600, 367, 376, 379, - 382, 599, 359, 362, 387, 389, 392, 396, 393, 390, - 397, 404, 406, 407, 598, 596, 424, 408, 595, 410, - 594, 592, 418, 590, 430, 427, 436, 585, 409, 420, - 584, 439, 448, 446, 450, 583, 582, 581, 447, 473, - 452, 455, 475, 579, 476, 578, 477, 575, 458, 480, - 484, 488, 574, 485, 573, 491, 503, 508, 490, 505, - 571, 501, 568, 487, 566, 519, 497, 520, 454, 523, - - 440, 531, 524, 516, 537, 530, 533, 538, 547, 399, - 364, 347, 326, 285, 534, 265, 260, 233, 226, 549, - 551, 225, 550, 224, 223, 202, 192, 108, 95, 554, - 562, 93, 85, 84, 639, 620, 622, 624, 91, 84 + 0, 0, 0, 0, 659, 660, 660, 660, 640, 652, + 650, 660, 660, 660, 660, 660, 660, 660, 660, 60, + 660, 58, 660, 637, 59, 63, 64, 65, 66, 90, + 67, 116, 73, 80, 639, 88, 107, 113, 128, 133, + 139, 118, 169, 143, 660, 660, 660, 660, 648, 660, + 646, 660, 636, 81, 660, 660, 660, 0, 635, 150, + 68, 141, 634, 151, 179, 171, 156, 168, 181, 177, + 187, 198, 194, 199, 203, 208, 191, 215, 260, 633, + 205, 219, 209, 223, 632, 229, 238, 247, 211, 253, + 248, 251, 252, 244, 273, 279, 274, 281, 292, 293, + + 631, 630, 629, 276, 303, 304, 305, 319, 323, 325, + 313, 307, 321, 331, 328, 335, 336, 339, 333, 346, + 337, 361, 363, 365, 369, 364, 349, 371, 377, 628, + 366, 388, 389, 391, 627, 392, 393, 394, 396, 399, + 407, 403, 409, 413, 417, 421, 427, 432, 617, 616, + 422, 430, 612, 431, 611, 609, 434, 608, 456, 436, + 446, 457, 607, 439, 453, 606, 437, 464, 472, 474, + 605, 604, 603, 460, 492, 479, 475, 488, 602, 500, + 601, 502, 600, 597, 485, 467, 504, 507, 596, 506, + 593, 503, 521, 528, 517, 518, 583, 564, 520, 535, + + 534, 516, 542, 514, 532, 468, 546, 426, 548, 536, + 550, 547, 557, 562, 563, 569, 420, 343, 342, 341, + 309, 549, 295, 277, 275, 256, 574, 575, 243, 576, + 240, 226, 201, 146, 130, 108, 578, 577, 93, 85, + 84, 660, 635, 637, 639, 91, 84 } ; -static const flex_int16_t yy_def[241] = +static const flex_int16_t yy_def[248] = { 0, - 235, 1, 236, 236, 235, 235, 235, 235, 235, 237, - 238, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 235, 235, 235, 235, 237, 235, - 238, 235, 235, 235, 235, 235, 235, 240, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 235, 239, - - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 0, 235, 235, 235, 235, 235 + 242, 1, 243, 243, 242, 242, 242, 242, 242, 244, + 245, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 242, 242, 242, 242, 244, 242, + 245, 242, 242, 242, 242, 242, 242, 247, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + + 242, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 0, 242, 242, 242, 242, 242 } ; -static const flex_int16_t yy_nxt[712] = +static const flex_int16_t yy_nxt[733] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -539,80 +542,82 @@ static const flex_int16_t yy_nxt[712] = 28, 29, 30, 31, 32, 33, 34, 35, 36, 35, 37, 38, 35, 35, 39, 40, 41, 42, 43, 44, 35, 35, 53, 58, 54, 55, 56, 58, 58, 58, - 58, 58, 58, 64, 68, 58, 62, 58, 69, 101, + 58, 58, 58, 64, 68, 58, 62, 58, 69, 103, 65, 60, 59, 53, 58, 54, 61, 66, 58, 58, - 67, 70, 58, 75, 58, 78, 63, 58, 71, 58, - 79, 64, 68, 80, 62, 81, 69, 101, 65, 60, - 72, 58, 58, 73, 61, 66, 74, 58, 67, 70, - 58, 75, 58, 78, 63, 76, 71, 58, 79, 77, - 82, 80, 58, 81, 98, 84, 83, 58, 72, 85, - 58, 73, 58, 58, 74, 91, 86, 58, 102, 92, - 93, 87, 94, 76, 88, 100, 58, 77, 82, 103, - 58, 95, 98, 84, 83, 96, 89, 85, 58, 97, - 58, 90, 58, 91, 86, 104, 102, 92, 93, 87, - 94, 106, 88, 100, 107, 105, 58, 103, 58, 95, - - 58, 58, 58, 96, 89, 58, 58, 97, 58, 90, - 58, 58, 58, 104, 108, 110, 58, 58, 111, 106, - 113, 109, 107, 105, 114, 112, 117, 115, 118, 116, - 58, 58, 125, 58, 126, 127, 136, 58, 58, 58, - 58, 129, 108, 110, 124, 58, 111, 58, 113, 109, - 58, 58, 114, 112, 117, 115, 118, 116, 58, 58, - 125, 128, 126, 127, 136, 58, 119, 130, 120, 129, - 58, 58, 124, 58, 58, 131, 121, 58, 137, 58, - 58, 122, 123, 132, 133, 139, 138, 141, 135, 128, - 134, 58, 58, 58, 119, 130, 120, 58, 58, 58, - - 58, 142, 143, 131, 121, 145, 137, 140, 58, 122, - 123, 132, 133, 139, 138, 141, 135, 147, 134, 146, - 58, 144, 58, 58, 58, 148, 58, 58, 58, 142, - 143, 149, 150, 145, 151, 140, 58, 58, 58, 58, - 58, 156, 155, 58, 152, 147, 58, 146, 58, 144, - 58, 153, 154, 148, 157, 158, 160, 162, 58, 149, - 150, 58, 151, 163, 159, 58, 161, 164, 58, 156, - 155, 58, 152, 58, 165, 58, 58, 58, 58, 153, - 154, 58, 157, 158, 160, 162, 168, 166, 169, 167, - 58, 163, 159, 58, 161, 164, 58, 170, 175, 171, - - 174, 58, 165, 58, 58, 173, 58, 58, 176, 172, - 58, 58, 180, 58, 168, 166, 169, 167, 58, 177, - 58, 58, 58, 58, 58, 170, 175, 171, 174, 181, - 178, 179, 58, 173, 58, 182, 176, 172, 58, 185, - 180, 58, 184, 193, 58, 183, 187, 177, 188, 190, - 58, 186, 194, 58, 58, 192, 189, 181, 178, 179, - 58, 58, 58, 182, 58, 191, 58, 185, 58, 58, - 184, 193, 58, 183, 187, 202, 188, 190, 196, 186, - 194, 195, 197, 192, 189, 199, 198, 58, 201, 58, - 58, 58, 200, 191, 58, 204, 203, 206, 58, 58, - - 205, 58, 58, 202, 58, 58, 196, 208, 210, 195, - 197, 58, 217, 199, 198, 58, 201, 58, 207, 58, - 200, 209, 58, 204, 203, 206, 212, 214, 205, 211, - 58, 213, 215, 58, 58, 208, 210, 58, 58, 216, - 217, 223, 218, 220, 58, 58, 207, 58, 58, 209, - 221, 58, 58, 225, 212, 214, 226, 211, 219, 213, - 215, 58, 222, 58, 58, 58, 229, 216, 58, 223, - 218, 220, 231, 232, 224, 227, 58, 233, 221, 230, - 58, 225, 58, 228, 226, 58, 219, 58, 58, 58, - 222, 234, 58, 58, 229, 58, 58, 58, 58, 58, - - 231, 232, 224, 227, 58, 233, 58, 230, 58, 58, - 58, 228, 58, 58, 58, 58, 58, 99, 58, 234, - 47, 47, 49, 49, 51, 51, 58, 58, 58, 99, - 52, 50, 58, 57, 52, 50, 48, 235, 5, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235 + 67, 70, 58, 76, 58, 79, 63, 58, 71, 72, + 80, 64, 68, 81, 62, 82, 69, 103, 65, 60, + 73, 58, 58, 74, 61, 66, 75, 58, 67, 70, + 58, 76, 58, 79, 63, 77, 71, 72, 80, 78, + 83, 81, 58, 82, 58, 85, 84, 58, 73, 86, + 95, 74, 96, 58, 75, 58, 88, 58, 92, 89, + 58, 87, 93, 77, 58, 58, 104, 78, 83, 100, + 58, 90, 102, 85, 84, 94, 91, 86, 95, 108, + 96, 105, 58, 58, 88, 58, 92, 89, 97, 87, + 93, 58, 98, 58, 104, 58, 99, 100, 106, 90, + + 102, 58, 107, 94, 91, 58, 109, 108, 58, 105, + 112, 110, 58, 58, 113, 58, 97, 58, 111, 58, + 98, 114, 58, 58, 99, 58, 106, 116, 115, 58, + 107, 120, 127, 58, 109, 117, 118, 58, 112, 110, + 58, 119, 113, 58, 136, 121, 111, 130, 128, 114, + 129, 132, 58, 131, 58, 116, 115, 58, 58, 120, + 127, 58, 58, 117, 118, 58, 58, 58, 133, 119, + 58, 139, 136, 121, 58, 130, 128, 134, 129, 132, + 138, 131, 122, 141, 123, 135, 137, 58, 58, 58, + 58, 58, 124, 58, 140, 58, 133, 125, 126, 139, + + 142, 143, 145, 148, 144, 134, 58, 58, 138, 58, + 122, 141, 123, 135, 137, 146, 147, 58, 58, 58, + 124, 58, 140, 58, 149, 125, 126, 58, 142, 143, + 145, 148, 144, 58, 155, 58, 151, 58, 152, 58, + 150, 156, 58, 146, 147, 58, 153, 58, 154, 58, + 58, 58, 149, 58, 161, 58, 58, 58, 157, 158, + 58, 159, 155, 58, 151, 160, 152, 162, 150, 156, + 163, 166, 164, 165, 153, 58, 154, 58, 58, 58, + 58, 172, 161, 58, 167, 58, 157, 158, 169, 159, + 168, 58, 170, 160, 173, 162, 175, 171, 163, 166, + + 164, 165, 58, 58, 174, 58, 58, 58, 58, 172, + 58, 176, 167, 58, 178, 181, 169, 58, 168, 177, + 170, 58, 173, 58, 175, 171, 182, 58, 186, 180, + 184, 58, 174, 179, 58, 58, 58, 183, 185, 176, + 58, 58, 178, 181, 58, 58, 58, 177, 58, 192, + 58, 58, 187, 58, 182, 188, 186, 180, 184, 197, + 58, 179, 189, 190, 191, 183, 185, 58, 193, 194, + 58, 58, 195, 200, 58, 196, 199, 192, 58, 202, + 187, 58, 58, 188, 198, 201, 58, 197, 58, 58, + 189, 190, 191, 58, 203, 209, 193, 194, 206, 58, + + 195, 200, 58, 196, 199, 214, 58, 202, 204, 210, + 205, 207, 198, 201, 58, 208, 58, 58, 58, 211, + 58, 58, 203, 209, 213, 212, 206, 215, 58, 217, + 58, 58, 58, 214, 58, 58, 204, 210, 205, 207, + 216, 218, 58, 208, 219, 222, 58, 211, 58, 58, + 58, 220, 213, 212, 221, 215, 58, 217, 223, 224, + 58, 58, 58, 58, 58, 225, 227, 228, 216, 218, + 226, 58, 219, 222, 229, 230, 58, 58, 58, 220, + 232, 236, 221, 58, 231, 233, 223, 224, 58, 58, + 58, 58, 58, 225, 227, 228, 238, 58, 226, 239, + + 234, 240, 229, 230, 237, 235, 241, 58, 232, 236, + 58, 58, 231, 233, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 238, 58, 58, 239, 234, 240, + 58, 58, 237, 235, 241, 47, 47, 49, 49, 51, + 51, 58, 58, 58, 58, 101, 58, 58, 58, 58, + 101, 52, 50, 58, 57, 52, 50, 48, 242, 5, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242 } ; -static const flex_int16_t yy_chk[712] = +static const flex_int16_t yy_chk[733] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -622,77 +627,79 @@ static const flex_int16_t yy_chk[712] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, 20, 22, 22, 26, 27, 28, - 29, 31, 61, 27, 28, 240, 26, 33, 28, 61, - 27, 25, 239, 54, 34, 54, 25, 27, 234, 233, + 29, 31, 61, 27, 28, 247, 26, 33, 28, 61, + 27, 25, 246, 54, 34, 54, 25, 27, 241, 240, - 27, 28, 36, 31, 30, 33, 26, 232, 29, 229, + 27, 28, 36, 31, 30, 33, 26, 239, 29, 30, 33, 27, 28, 34, 26, 36, 28, 61, 27, 25, - 30, 37, 228, 30, 25, 27, 30, 38, 27, 28, - 32, 31, 44, 33, 26, 32, 29, 39, 33, 32, - 37, 34, 42, 36, 44, 38, 37, 62, 30, 38, - 41, 30, 40, 64, 30, 41, 39, 60, 62, 41, - 42, 40, 42, 32, 40, 60, 43, 32, 37, 64, - 68, 43, 44, 38, 37, 43, 40, 38, 66, 43, - 65, 40, 67, 41, 39, 65, 62, 41, 42, 40, - 42, 67, 40, 60, 68, 66, 70, 64, 69, 43, - - 76, 72, 73, 43, 40, 71, 227, 43, 74, 40, - 75, 82, 77, 65, 69, 70, 226, 81, 71, 67, - 72, 69, 68, 66, 73, 71, 76, 74, 77, 75, - 91, 80, 81, 85, 81, 82, 91, 225, 224, 222, - 219, 85, 69, 70, 80, 83, 71, 218, 72, 69, - 92, 86, 73, 71, 76, 74, 77, 75, 78, 87, - 81, 83, 81, 82, 91, 88, 78, 86, 78, 85, - 90, 89, 80, 93, 217, 87, 78, 94, 92, 216, - 96, 78, 78, 87, 88, 94, 93, 96, 90, 83, - 89, 95, 97, 98, 78, 86, 78, 104, 103, 214, - - 105, 97, 98, 87, 78, 103, 92, 95, 102, 78, - 78, 87, 88, 94, 93, 96, 90, 105, 89, 104, - 106, 102, 107, 108, 110, 106, 112, 109, 111, 97, - 98, 107, 108, 103, 109, 95, 113, 114, 115, 116, - 213, 113, 112, 117, 110, 105, 118, 104, 119, 102, - 120, 111, 111, 106, 114, 115, 117, 119, 121, 107, - 108, 212, 109, 120, 116, 122, 118, 121, 123, 113, - 112, 124, 110, 133, 122, 126, 134, 125, 211, 111, - 111, 128, 114, 115, 117, 119, 125, 123, 126, 124, - 129, 120, 116, 130, 118, 121, 131, 128, 134, 129, - - 133, 135, 122, 136, 140, 131, 137, 139, 135, 130, - 138, 141, 139, 210, 125, 123, 126, 124, 142, 136, - 143, 144, 148, 159, 150, 128, 134, 129, 133, 140, - 137, 138, 153, 131, 160, 141, 135, 130, 147, 144, - 139, 156, 143, 159, 155, 142, 148, 136, 150, 155, - 157, 147, 160, 162, 201, 157, 153, 140, 137, 138, - 164, 169, 163, 141, 165, 156, 171, 144, 199, 172, - 143, 159, 179, 142, 148, 172, 150, 155, 163, 147, - 160, 162, 164, 157, 153, 169, 165, 170, 171, 173, - 175, 177, 170, 156, 180, 175, 173, 179, 181, 184, - - 177, 194, 182, 172, 189, 186, 163, 181, 184, 162, - 164, 197, 194, 169, 165, 192, 171, 187, 180, 190, - 170, 182, 188, 175, 173, 179, 187, 189, 177, 186, - 204, 188, 190, 196, 198, 181, 184, 200, 203, 192, - 194, 204, 196, 200, 206, 202, 180, 207, 215, 182, - 202, 205, 208, 206, 187, 189, 207, 186, 198, 188, - 190, 209, 203, 220, 223, 221, 215, 192, 230, 204, - 196, 200, 221, 223, 205, 208, 231, 230, 202, 220, - 195, 206, 193, 209, 207, 191, 198, 185, 183, 178, - 203, 231, 176, 174, 215, 168, 167, 166, 161, 158, - - 221, 223, 205, 208, 154, 230, 152, 220, 151, 149, - 146, 209, 145, 132, 127, 101, 100, 99, 84, 231, - 236, 236, 237, 237, 238, 238, 79, 63, 59, 53, - 51, 49, 35, 24, 11, 10, 9, 5, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235 + 30, 37, 236, 30, 25, 27, 30, 38, 27, 28, + 32, 31, 42, 33, 26, 32, 29, 30, 33, 32, + 37, 34, 39, 36, 235, 38, 37, 40, 30, 38, + 42, 30, 42, 41, 30, 62, 40, 44, 41, 40, + 234, 39, 41, 32, 60, 64, 62, 32, 37, 44, + 67, 40, 60, 38, 37, 41, 40, 38, 42, 67, + 42, 64, 68, 43, 40, 66, 41, 40, 43, 39, + 41, 70, 43, 65, 62, 69, 43, 44, 65, 40, + + 60, 71, 66, 41, 40, 77, 68, 67, 73, 64, + 70, 69, 72, 74, 71, 233, 43, 75, 69, 81, + 43, 71, 76, 83, 43, 89, 65, 73, 72, 78, + 66, 77, 81, 82, 68, 74, 75, 84, 70, 69, + 232, 76, 71, 86, 89, 78, 69, 83, 82, 71, + 82, 86, 87, 84, 231, 73, 72, 229, 94, 77, + 81, 88, 91, 74, 75, 92, 93, 90, 87, 76, + 226, 92, 89, 78, 79, 83, 82, 88, 82, 86, + 91, 84, 79, 94, 79, 88, 90, 95, 97, 225, + 104, 224, 79, 96, 93, 98, 87, 79, 79, 92, + + 95, 96, 98, 104, 97, 88, 99, 100, 91, 223, + 79, 94, 79, 88, 90, 99, 100, 105, 106, 107, + 79, 112, 93, 221, 105, 79, 79, 111, 95, 96, + 98, 104, 97, 108, 111, 113, 107, 109, 108, 110, + 106, 112, 115, 99, 100, 114, 109, 119, 110, 116, + 117, 121, 105, 118, 116, 220, 219, 218, 113, 113, + 120, 114, 111, 127, 107, 115, 108, 117, 106, 112, + 118, 121, 119, 120, 109, 122, 110, 123, 126, 124, + 131, 127, 116, 125, 122, 128, 113, 113, 124, 114, + 123, 129, 125, 115, 128, 117, 131, 126, 118, 121, + + 119, 120, 132, 133, 129, 134, 136, 137, 138, 127, + 139, 132, 122, 140, 134, 138, 124, 142, 123, 133, + 125, 141, 128, 143, 131, 126, 139, 144, 143, 137, + 141, 145, 129, 136, 217, 146, 151, 140, 142, 132, + 208, 147, 134, 138, 152, 154, 148, 133, 157, 151, + 160, 167, 144, 164, 139, 145, 143, 137, 141, 160, + 161, 136, 146, 147, 148, 140, 142, 165, 152, 154, + 159, 162, 157, 164, 174, 159, 162, 151, 168, 167, + 144, 186, 206, 145, 161, 165, 169, 160, 170, 177, + 146, 147, 148, 176, 168, 177, 152, 154, 174, 185, + + 157, 164, 178, 159, 162, 186, 175, 167, 169, 178, + 170, 175, 161, 165, 180, 176, 182, 192, 187, 180, + 190, 188, 168, 177, 185, 182, 174, 187, 204, 190, + 202, 195, 196, 186, 199, 193, 169, 178, 170, 175, + 188, 192, 194, 176, 193, 196, 205, 180, 201, 200, + 210, 194, 185, 182, 195, 187, 203, 190, 199, 201, + 207, 212, 209, 222, 211, 203, 207, 209, 188, 192, + 205, 213, 193, 196, 210, 211, 214, 215, 198, 194, + 213, 222, 195, 216, 212, 214, 199, 201, 227, 228, + 230, 238, 237, 203, 207, 209, 228, 197, 205, 230, + + 215, 237, 210, 211, 227, 216, 238, 191, 213, 222, + 189, 184, 212, 214, 183, 181, 179, 173, 172, 171, + 166, 163, 158, 156, 228, 155, 153, 230, 215, 237, + 150, 149, 227, 216, 238, 243, 243, 244, 244, 245, + 245, 135, 130, 103, 102, 101, 85, 80, 63, 59, + 53, 51, 49, 35, 24, 11, 10, 9, 5, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242 } ; /* The intent behind this definition is that it'll catch @@ -727,7 +734,7 @@ extern int atoi(); extern double atof(); #define RETURN_TOKEN(token) LOG_DEBUG("%s", #token);return token -#line 730 "lex_sql.cpp" +#line 737 "lex_sql.cpp" /* Prevent the need for linking with -lfl */ #define YY_NO_INPUT 1 /* 不区分大小写 */ @@ -736,7 +743,7 @@ extern double atof(); /* 1. 匹配的规则长的优先 */ /* 2. 写在最前面的优先 */ /* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */ -#line 739 "lex_sql.cpp" +#line 746 "lex_sql.cpp" #define INITIAL 0 #define STR 1 @@ -1022,7 +1029,7 @@ YY_DECL #line 75 "lex_sql.l" -#line 1025 "lex_sql.cpp" +#line 1032 "lex_sql.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1049,13 +1056,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 236 ) + if ( yy_current_state >= 243 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 639 ); + while ( yy_base[yy_current_state] != 660 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1368,117 +1375,127 @@ RETURN_TOKEN(VIEW); case 58: YY_RULE_SETUP #line 136 "lex_sql.l" -RETURN_TOKEN(LBRACE); +RETURN_TOKEN(TRUE); YY_BREAK case 59: YY_RULE_SETUP #line 137 "lex_sql.l" -RETURN_TOKEN(RBRACE); +RETURN_TOKEN(FALSE); YY_BREAK case 60: YY_RULE_SETUP #line 138 "lex_sql.l" -RETURN_TOKEN(LSBRACE); +RETURN_TOKEN(LBRACE); YY_BREAK case 61: YY_RULE_SETUP #line 139 "lex_sql.l" -RETURN_TOKEN(RSBRACE); +RETURN_TOKEN(RBRACE); YY_BREAK case 62: YY_RULE_SETUP -#line 141 "lex_sql.l" -RETURN_TOKEN(COMMA); +#line 140 "lex_sql.l" +RETURN_TOKEN(LSBRACE); YY_BREAK case 63: YY_RULE_SETUP -#line 142 "lex_sql.l" -RETURN_TOKEN(EQ); +#line 141 "lex_sql.l" +RETURN_TOKEN(RSBRACE); YY_BREAK case 64: YY_RULE_SETUP #line 143 "lex_sql.l" -RETURN_TOKEN(LE); +RETURN_TOKEN(COMMA); YY_BREAK case 65: YY_RULE_SETUP #line 144 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(EQ); YY_BREAK case 66: YY_RULE_SETUP #line 145 "lex_sql.l" -RETURN_TOKEN(NE); +RETURN_TOKEN(LE); YY_BREAK case 67: YY_RULE_SETUP #line 146 "lex_sql.l" -RETURN_TOKEN(LT); +RETURN_TOKEN(NE); YY_BREAK case 68: YY_RULE_SETUP #line 147 "lex_sql.l" -RETURN_TOKEN(GE); +RETURN_TOKEN(NE); YY_BREAK case 69: YY_RULE_SETUP #line 148 "lex_sql.l" -RETURN_TOKEN(GT); +RETURN_TOKEN(LT); YY_BREAK case 70: YY_RULE_SETUP #line 149 "lex_sql.l" -RETURN_TOKEN(NOT); +RETURN_TOKEN(GE); YY_BREAK case 71: YY_RULE_SETUP #line 150 "lex_sql.l" -RETURN_TOKEN(IS); +RETURN_TOKEN(GT); YY_BREAK case 72: YY_RULE_SETUP #line 151 "lex_sql.l" -RETURN_TOKEN(LIKE); +RETURN_TOKEN(NOT); YY_BREAK case 73: YY_RULE_SETUP -#line 153 "lex_sql.l" -yylval->string=strdup(yytext); RETURN_TOKEN(ID); +#line 152 "lex_sql.l" +RETURN_TOKEN(IS); YY_BREAK case 74: -#line 156 "lex_sql.l" +YY_RULE_SETUP +#line 153 "lex_sql.l" +RETURN_TOKEN(LIKE); + YY_BREAK case 75: -#line 157 "lex_sql.l" +YY_RULE_SETUP +#line 155 "lex_sql.l" +yylval->string=strdup(yytext); RETURN_TOKEN(ID); + YY_BREAK case 76: #line 158 "lex_sql.l" case 77: +#line 159 "lex_sql.l" +case 78: +#line 160 "lex_sql.l" +case 79: YY_RULE_SETUP -#line 158 "lex_sql.l" +#line 160 "lex_sql.l" { return yytext[0]; } YY_BREAK -case 78: -/* rule 78 can match eol */ +case 80: +/* rule 80 can match eol */ YY_RULE_SETUP -#line 159 "lex_sql.l" +#line 161 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 79: -/* rule 79 can match eol */ +case 81: +/* rule 81 can match eol */ YY_RULE_SETUP -#line 160 "lex_sql.l" +#line 162 "lex_sql.l" yylval->string = strdup(yytext); RETURN_TOKEN(SSS); YY_BREAK -case 80: +case 82: YY_RULE_SETUP -#line 162 "lex_sql.l" +#line 164 "lex_sql.l" LOG_DEBUG("Unknown character [%c]",yytext[0]); return yytext[0]; YY_BREAK -case 81: +case 83: YY_RULE_SETUP -#line 163 "lex_sql.l" +#line 165 "lex_sql.l" ECHO; YY_BREAK -#line 1481 "lex_sql.cpp" +#line 1498 "lex_sql.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(STR): yyterminate(); @@ -1778,7 +1795,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 236 ) + if ( yy_current_state >= 243 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1807,11 +1824,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 236 ) + if ( yy_current_state >= 243 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 235); + yy_is_jam = (yy_current_state == 242); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2634,7 +2651,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 163 "lex_sql.l" +#line 165 "lex_sql.l" void scan_string(const char *str, yyscan_t scanner) { diff --git a/src/observer/sql/parser/lex_sql.h b/src/observer/sql/parser/lex_sql.h index 12b7f68e..e8e3ab89 100644 --- a/src/observer/sql/parser/lex_sql.h +++ b/src/observer/sql/parser/lex_sql.h @@ -542,7 +542,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 163 "lex_sql.l" +#line 165 "lex_sql.l" #line 548 "lex_sql.h" diff --git a/src/observer/sql/parser/lex_sql.l b/src/observer/sql/parser/lex_sql.l index 3aaab5f3..fa1a2176 100644 --- a/src/observer/sql/parser/lex_sql.l +++ b/src/observer/sql/parser/lex_sql.l @@ -133,6 +133,8 @@ FORMAT RETURN_TOKEN(FORMAT); INNER RETURN_TOKEN(INNER); JOIN RETURN_TOKEN(JOIN); VIEW RETURN_TOKEN(VIEW); +TRUE RETURN_TOKEN(TRUE); +FALSE RETURN_TOKEN(FALSE); "(" RETURN_TOKEN(LBRACE); ")" RETURN_TOKEN(RBRACE); "[" RETURN_TOKEN(LSBRACE); diff --git a/src/observer/sql/parser/yacc_sql.cpp b/src/observer/sql/parser/yacc_sql.cpp index 64d22685..08a10a81 100644 --- a/src/observer/sql/parser/yacc_sql.cpp +++ b/src/observer/sql/parser/yacc_sql.cpp @@ -213,111 +213,113 @@ enum yysymbol_kind_t YYSYMBOL_TRX_ROLLBACK = 31, /* TRX_ROLLBACK */ YYSYMBOL_INT_T = 32, /* INT_T */ YYSYMBOL_IN = 33, /* IN */ - YYSYMBOL_STRING_T = 34, /* STRING_T */ - YYSYMBOL_FLOAT_T = 35, /* FLOAT_T */ - YYSYMBOL_DATE_T = 36, /* DATE_T */ - YYSYMBOL_TEXT_T = 37, /* TEXT_T */ - YYSYMBOL_VECTOR_T = 38, /* VECTOR_T */ - YYSYMBOL_NOT = 39, /* NOT */ - YYSYMBOL_UNIQUE = 40, /* UNIQUE */ - YYSYMBOL_NULL_T = 41, /* NULL_T */ - YYSYMBOL_LIMIT = 42, /* LIMIT */ - YYSYMBOL_NULLABLE = 43, /* NULLABLE */ - YYSYMBOL_HELP = 44, /* HELP */ - YYSYMBOL_QUOTE = 45, /* QUOTE */ - YYSYMBOL_EXIT = 46, /* EXIT */ - YYSYMBOL_DOT = 47, /* DOT */ - YYSYMBOL_INTO = 48, /* INTO */ - YYSYMBOL_VALUES = 49, /* VALUES */ - YYSYMBOL_FROM = 50, /* FROM */ - YYSYMBOL_WHERE = 51, /* WHERE */ - YYSYMBOL_AND = 52, /* AND */ - YYSYMBOL_OR = 53, /* OR */ - YYSYMBOL_SET = 54, /* SET */ - YYSYMBOL_ON = 55, /* ON */ - YYSYMBOL_INFILE = 56, /* INFILE */ - YYSYMBOL_EXPLAIN = 57, /* EXPLAIN */ - YYSYMBOL_STORAGE = 58, /* STORAGE */ - YYSYMBOL_FORMAT = 59, /* FORMAT */ - YYSYMBOL_INNER = 60, /* INNER */ - YYSYMBOL_JOIN = 61, /* JOIN */ - YYSYMBOL_VIEW = 62, /* VIEW */ - YYSYMBOL_EQ = 63, /* EQ */ - YYSYMBOL_LT = 64, /* LT */ - YYSYMBOL_GT = 65, /* GT */ - YYSYMBOL_LE = 66, /* LE */ - YYSYMBOL_GE = 67, /* GE */ - YYSYMBOL_NE = 68, /* NE */ - YYSYMBOL_LIKE = 69, /* LIKE */ - YYSYMBOL_IS = 70, /* IS */ - YYSYMBOL_NUMBER = 71, /* NUMBER */ - YYSYMBOL_FLOAT = 72, /* FLOAT */ - YYSYMBOL_ID = 73, /* ID */ - YYSYMBOL_SSS = 74, /* SSS */ - YYSYMBOL_75_ = 75, /* '+' */ - YYSYMBOL_76_ = 76, /* '-' */ - YYSYMBOL_77_ = 77, /* '*' */ - YYSYMBOL_78_ = 78, /* '/' */ - YYSYMBOL_UMINUS = 79, /* UMINUS */ - YYSYMBOL_YYACCEPT = 80, /* $accept */ - YYSYMBOL_commands = 81, /* commands */ - YYSYMBOL_command_wrapper = 82, /* command_wrapper */ - YYSYMBOL_exit_stmt = 83, /* exit_stmt */ - YYSYMBOL_help_stmt = 84, /* help_stmt */ - YYSYMBOL_sync_stmt = 85, /* sync_stmt */ - YYSYMBOL_begin_stmt = 86, /* begin_stmt */ - YYSYMBOL_commit_stmt = 87, /* commit_stmt */ - YYSYMBOL_rollback_stmt = 88, /* rollback_stmt */ - YYSYMBOL_drop_table_stmt = 89, /* drop_table_stmt */ - YYSYMBOL_show_tables_stmt = 90, /* show_tables_stmt */ - YYSYMBOL_desc_table_stmt = 91, /* desc_table_stmt */ - YYSYMBOL_show_index_stmt = 92, /* show_index_stmt */ - YYSYMBOL_create_index_stmt = 93, /* create_index_stmt */ - YYSYMBOL_opt_unique = 94, /* opt_unique */ - YYSYMBOL_attr_list = 95, /* attr_list */ - YYSYMBOL_drop_index_stmt = 96, /* drop_index_stmt */ - YYSYMBOL_create_table_stmt = 97, /* create_table_stmt */ - YYSYMBOL_create_view_stmt = 98, /* create_view_stmt */ - YYSYMBOL_drop_view_stmt = 99, /* drop_view_stmt */ - YYSYMBOL_attr_def_list = 100, /* attr_def_list */ - YYSYMBOL_attr_def = 101, /* attr_def */ - YYSYMBOL_nullable_constraint = 102, /* nullable_constraint */ - YYSYMBOL_type = 103, /* type */ - YYSYMBOL_insert_stmt = 104, /* insert_stmt */ - YYSYMBOL_values_list = 105, /* values_list */ - YYSYMBOL_digits = 106, /* digits */ - YYSYMBOL_digits_list = 107, /* digits_list */ - YYSYMBOL_value_list = 108, /* value_list */ - YYSYMBOL_value = 109, /* value */ - YYSYMBOL_nonnegative_value = 110, /* nonnegative_value */ - YYSYMBOL_storage_format = 111, /* storage_format */ - YYSYMBOL_delete_stmt = 112, /* delete_stmt */ - YYSYMBOL_update_stmt = 113, /* update_stmt */ - YYSYMBOL_set_clauses = 114, /* set_clauses */ - YYSYMBOL_set_clause = 115, /* set_clause */ - YYSYMBOL_select_stmt = 116, /* select_stmt */ - YYSYMBOL_calc_stmt = 117, /* calc_stmt */ - YYSYMBOL_expression_list = 118, /* expression_list */ - YYSYMBOL_expression = 119, /* expression */ - YYSYMBOL_alias = 120, /* alias */ - YYSYMBOL_func_expr = 121, /* func_expr */ - YYSYMBOL_sub_query_expr = 122, /* sub_query_expr */ - YYSYMBOL_rel_attr = 123, /* rel_attr */ - YYSYMBOL_relation = 124, /* relation */ - YYSYMBOL_rel_list = 125, /* rel_list */ - YYSYMBOL_join_clauses = 126, /* join_clauses */ - YYSYMBOL_where = 127, /* where */ - YYSYMBOL_condition = 128, /* condition */ - YYSYMBOL_comp_op = 129, /* comp_op */ - YYSYMBOL_opt_order_by = 130, /* opt_order_by */ - YYSYMBOL_sort_list = 131, /* sort_list */ - YYSYMBOL_sort_unit = 132, /* sort_unit */ - YYSYMBOL_group_by = 133, /* group_by */ - YYSYMBOL_opt_having = 134, /* opt_having */ - YYSYMBOL_opt_limit = 135, /* opt_limit */ - YYSYMBOL_explain_stmt = 136, /* explain_stmt */ - YYSYMBOL_set_variable_stmt = 137, /* set_variable_stmt */ - YYSYMBOL_opt_semicolon = 138 /* opt_semicolon */ + YYSYMBOL_TRUE = 34, /* TRUE */ + YYSYMBOL_FALSE = 35, /* FALSE */ + YYSYMBOL_STRING_T = 36, /* STRING_T */ + YYSYMBOL_FLOAT_T = 37, /* FLOAT_T */ + YYSYMBOL_DATE_T = 38, /* DATE_T */ + YYSYMBOL_TEXT_T = 39, /* TEXT_T */ + YYSYMBOL_VECTOR_T = 40, /* VECTOR_T */ + YYSYMBOL_NOT = 41, /* NOT */ + YYSYMBOL_UNIQUE = 42, /* UNIQUE */ + YYSYMBOL_NULL_T = 43, /* NULL_T */ + YYSYMBOL_LIMIT = 44, /* LIMIT */ + YYSYMBOL_NULLABLE = 45, /* NULLABLE */ + YYSYMBOL_HELP = 46, /* HELP */ + YYSYMBOL_QUOTE = 47, /* QUOTE */ + YYSYMBOL_EXIT = 48, /* EXIT */ + YYSYMBOL_DOT = 49, /* DOT */ + YYSYMBOL_INTO = 50, /* INTO */ + YYSYMBOL_VALUES = 51, /* VALUES */ + YYSYMBOL_FROM = 52, /* FROM */ + YYSYMBOL_WHERE = 53, /* WHERE */ + YYSYMBOL_AND = 54, /* AND */ + YYSYMBOL_OR = 55, /* OR */ + YYSYMBOL_SET = 56, /* SET */ + YYSYMBOL_ON = 57, /* ON */ + YYSYMBOL_INFILE = 58, /* INFILE */ + YYSYMBOL_EXPLAIN = 59, /* EXPLAIN */ + YYSYMBOL_STORAGE = 60, /* STORAGE */ + YYSYMBOL_FORMAT = 61, /* FORMAT */ + YYSYMBOL_INNER = 62, /* INNER */ + YYSYMBOL_JOIN = 63, /* JOIN */ + YYSYMBOL_VIEW = 64, /* VIEW */ + YYSYMBOL_EQ = 65, /* EQ */ + YYSYMBOL_LT = 66, /* LT */ + YYSYMBOL_GT = 67, /* GT */ + YYSYMBOL_LE = 68, /* LE */ + YYSYMBOL_GE = 69, /* GE */ + YYSYMBOL_NE = 70, /* NE */ + YYSYMBOL_LIKE = 71, /* LIKE */ + YYSYMBOL_IS = 72, /* IS */ + YYSYMBOL_NUMBER = 73, /* NUMBER */ + YYSYMBOL_FLOAT = 74, /* FLOAT */ + YYSYMBOL_ID = 75, /* ID */ + YYSYMBOL_SSS = 76, /* SSS */ + YYSYMBOL_77_ = 77, /* '+' */ + YYSYMBOL_78_ = 78, /* '-' */ + YYSYMBOL_79_ = 79, /* '*' */ + YYSYMBOL_80_ = 80, /* '/' */ + YYSYMBOL_UMINUS = 81, /* UMINUS */ + YYSYMBOL_YYACCEPT = 82, /* $accept */ + YYSYMBOL_commands = 83, /* commands */ + YYSYMBOL_command_wrapper = 84, /* command_wrapper */ + YYSYMBOL_exit_stmt = 85, /* exit_stmt */ + YYSYMBOL_help_stmt = 86, /* help_stmt */ + YYSYMBOL_sync_stmt = 87, /* sync_stmt */ + YYSYMBOL_begin_stmt = 88, /* begin_stmt */ + YYSYMBOL_commit_stmt = 89, /* commit_stmt */ + YYSYMBOL_rollback_stmt = 90, /* rollback_stmt */ + YYSYMBOL_drop_table_stmt = 91, /* drop_table_stmt */ + YYSYMBOL_show_tables_stmt = 92, /* show_tables_stmt */ + YYSYMBOL_desc_table_stmt = 93, /* desc_table_stmt */ + YYSYMBOL_show_index_stmt = 94, /* show_index_stmt */ + YYSYMBOL_create_index_stmt = 95, /* create_index_stmt */ + YYSYMBOL_opt_unique = 96, /* opt_unique */ + YYSYMBOL_attr_list = 97, /* attr_list */ + YYSYMBOL_drop_index_stmt = 98, /* drop_index_stmt */ + YYSYMBOL_create_table_stmt = 99, /* create_table_stmt */ + YYSYMBOL_create_view_stmt = 100, /* create_view_stmt */ + YYSYMBOL_drop_view_stmt = 101, /* drop_view_stmt */ + YYSYMBOL_attr_def_list = 102, /* attr_def_list */ + YYSYMBOL_attr_def = 103, /* attr_def */ + YYSYMBOL_nullable_constraint = 104, /* nullable_constraint */ + YYSYMBOL_type = 105, /* type */ + YYSYMBOL_insert_stmt = 106, /* insert_stmt */ + YYSYMBOL_values_list = 107, /* values_list */ + YYSYMBOL_digits = 108, /* digits */ + YYSYMBOL_digits_list = 109, /* digits_list */ + YYSYMBOL_value_list = 110, /* value_list */ + YYSYMBOL_value = 111, /* value */ + YYSYMBOL_nonnegative_value = 112, /* nonnegative_value */ + YYSYMBOL_storage_format = 113, /* storage_format */ + YYSYMBOL_delete_stmt = 114, /* delete_stmt */ + YYSYMBOL_update_stmt = 115, /* update_stmt */ + YYSYMBOL_set_clauses = 116, /* set_clauses */ + YYSYMBOL_set_clause = 117, /* set_clause */ + YYSYMBOL_select_stmt = 118, /* select_stmt */ + YYSYMBOL_calc_stmt = 119, /* calc_stmt */ + YYSYMBOL_expression_list = 120, /* expression_list */ + YYSYMBOL_expression = 121, /* expression */ + YYSYMBOL_alias = 122, /* alias */ + YYSYMBOL_func_expr = 123, /* func_expr */ + YYSYMBOL_sub_query_expr = 124, /* sub_query_expr */ + YYSYMBOL_rel_attr = 125, /* rel_attr */ + YYSYMBOL_relation = 126, /* relation */ + YYSYMBOL_rel_list = 127, /* rel_list */ + YYSYMBOL_join_clauses = 128, /* join_clauses */ + YYSYMBOL_where = 129, /* where */ + YYSYMBOL_condition = 130, /* condition */ + YYSYMBOL_comp_op = 131, /* comp_op */ + YYSYMBOL_opt_order_by = 132, /* opt_order_by */ + YYSYMBOL_sort_list = 133, /* sort_list */ + YYSYMBOL_sort_unit = 134, /* sort_unit */ + YYSYMBOL_group_by = 135, /* group_by */ + YYSYMBOL_opt_having = 136, /* opt_having */ + YYSYMBOL_opt_limit = 137, /* opt_limit */ + YYSYMBOL_explain_stmt = 138, /* explain_stmt */ + YYSYMBOL_set_variable_stmt = 139, /* set_variable_stmt */ + YYSYMBOL_opt_semicolon = 140 /* opt_semicolon */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -646,21 +648,21 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 73 +#define YYFINAL 75 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 290 +#define YYLAST 298 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 80 +#define YYNTOKENS 82 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 59 /* YYNRULES -- Number of rules. */ -#define YYNRULES 158 +#define YYNRULES 160 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 276 +#define YYNSTATES 278 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 330 +#define YYMAXUTOK 332 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -678,7 +680,7 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 77, 75, 2, 76, 2, 78, 2, 2, + 2, 2, 79, 77, 2, 78, 2, 80, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -707,29 +709,30 @@ static const yytype_int8 yytranslate[] = 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 79 + 75, 76, 81 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 270, 270, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 303, 309, 314, 320, 326, - 332, 338, 345, 351, 359, 369, 384, 385, 389, 395, - 404, 414, 418, 422, 426, 430, 437, 445, 457, 467, - 470, 483, 501, 530, 534, 538, 543, 549, 550, 551, - 552, 553, 554, 558, 568, 582, 588, 595, 599, 603, - 607, 616, 619, 624, 632, 635, 641, 649, 652, 656, - 663, 667, 671, 677, 680, 687, 690, 697, 709, 723, - 728, 735, 745, 783, 816, 822, 831, 834, 843, 859, - 862, 865, 868, 871, 879, 882, 887, 893, 896, 899, - 902, 909, 912, 915, 920, 928, 935, 940, 950, 956, - 966, 983, 990, 1002, 1005, 1011, 1015, 1022, 1026, 1033, - 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, - 1044, 1045, 1046, 1051, 1054, 1062, 1067, 1075, 1081, 1087, - 1097, 1100, 1108, 1111, 1119, 1122, 1130, 1138, 1149 + 0, 272, 272, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 305, 311, 316, 322, 328, + 334, 340, 347, 353, 361, 371, 386, 387, 391, 397, + 406, 416, 420, 424, 428, 432, 439, 447, 459, 469, + 472, 485, 503, 532, 536, 540, 545, 551, 552, 553, + 554, 555, 556, 560, 570, 584, 590, 597, 601, 605, + 609, 618, 621, 626, 634, 637, 643, 651, 654, 658, + 665, 669, 673, 679, 682, 685, 688, 695, 698, 705, + 717, 731, 736, 743, 753, 791, 824, 830, 839, 842, + 851, 867, 870, 873, 876, 879, 887, 890, 895, 901, + 904, 907, 910, 917, 920, 923, 928, 936, 943, 948, + 958, 964, 974, 991, 998, 1010, 1013, 1019, 1023, 1030, + 1034, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, + 1050, 1051, 1052, 1053, 1054, 1059, 1062, 1070, 1075, 1083, + 1089, 1095, 1105, 1108, 1116, 1119, 1127, 1130, 1138, 1146, + 1157 }; #endif @@ -750,14 +753,14 @@ static const char *const yytname[] = "TABLE", "TABLES", "INDEX", "CALC", "SELECT", "DESC", "SHOW", "SYNC", "INSERT", "DELETE", "UPDATE", "LBRACE", "RBRACE", "LSBRACE", "RSBRACE", "COMMA", "TRX_BEGIN", "TRX_COMMIT", "TRX_ROLLBACK", "INT_T", "IN", - "STRING_T", "FLOAT_T", "DATE_T", "TEXT_T", "VECTOR_T", "NOT", "UNIQUE", - "NULL_T", "LIMIT", "NULLABLE", "HELP", "QUOTE", "EXIT", "DOT", "INTO", - "VALUES", "FROM", "WHERE", "AND", "OR", "SET", "ON", "INFILE", "EXPLAIN", - "STORAGE", "FORMAT", "INNER", "JOIN", "VIEW", "EQ", "LT", "GT", "LE", - "GE", "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", "SSS", "'+'", "'-'", - "'*'", "'/'", "UMINUS", "$accept", "commands", "command_wrapper", - "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", "commit_stmt", - "rollback_stmt", "drop_table_stmt", "show_tables_stmt", + "TRUE", "FALSE", "STRING_T", "FLOAT_T", "DATE_T", "TEXT_T", "VECTOR_T", + "NOT", "UNIQUE", "NULL_T", "LIMIT", "NULLABLE", "HELP", "QUOTE", "EXIT", + "DOT", "INTO", "VALUES", "FROM", "WHERE", "AND", "OR", "SET", "ON", + "INFILE", "EXPLAIN", "STORAGE", "FORMAT", "INNER", "JOIN", "VIEW", "EQ", + "LT", "GT", "LE", "GE", "NE", "LIKE", "IS", "NUMBER", "FLOAT", "ID", + "SSS", "'+'", "'-'", "'*'", "'/'", "UMINUS", "$accept", "commands", + "command_wrapper", "exit_stmt", "help_stmt", "sync_stmt", "begin_stmt", + "commit_stmt", "rollback_stmt", "drop_table_stmt", "show_tables_stmt", "desc_table_stmt", "show_index_stmt", "create_index_stmt", "opt_unique", "attr_list", "drop_index_stmt", "create_table_stmt", "create_view_stmt", "drop_view_stmt", "attr_def_list", "attr_def", "nullable_constraint", @@ -778,7 +781,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-128) +#define YYPACT_NINF (-199) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -792,34 +795,34 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 119, 10, 13, -6, -6, -58, 68, -128, -31, -28, - -46, -128, -128, -128, -128, -128, -44, 119, 37, 53, - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -13, -128, -10, 61, 11, 22, 83, 138, - 25, -128, -128, -128, 1, -128, -6, -128, -128, -128, - 12, -128, -128, -128, 84, -128, -128, 110, 94, 104, - 131, 124, -128, -128, -128, -128, -11, 27, 123, -128, - 147, -128, -6, 174, 175, -128, -128, 42, -128, 102, - -6, -41, -128, 132, -128, -6, -6, -6, -6, 178, - 135, 135, -5, 165, 140, -17, 148, 158, 29, 202, - 149, 168, 164, 84, -128, -128, -128, -128, -128, 25, - 195, -128, -128, -128, 113, 113, -128, -128, -6, -128, - 4, 165, -128, 149, 216, 162, -128, 179, 2, -128, - 121, -128, -128, 146, 213, 180, 202, -128, -128, 217, - 219, 173, -128, -128, -128, -128, 186, 220, 239, 225, - -17, 223, -128, -128, 5, -128, -128, -128, -128, -128, - -128, -128, 214, 40, 145, -6, -6, 140, -128, -128, - -128, -128, -128, -128, -128, -128, -128, 127, 148, 227, - 181, -128, 149, 251, 232, 135, 135, 252, 246, 210, - 100, -128, 236, -128, -128, -128, -128, -6, 162, 162, - 69, 69, -128, 190, 221, -128, -128, -128, 213, 205, - -128, -128, 202, 149, 209, 165, 8, -128, -6, 162, - 253, 216, -128, -17, -17, 69, -128, 215, 241, -128, - -128, 35, -128, 243, 162, 239, -128, 145, 263, 228, - 223, -128, 144, 118, 202, -128, -128, 59, -128, -6, - 200, -128, -128, -128, -128, 211, 16, -128, 245, -128, - 135, -128, -128, -6, -128, -128 + 121, 8, 14, 219, 219, -55, 80, -199, -20, 44, + -23, -199, -199, -199, -199, -199, 45, 121, 66, 127, + -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, + -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, + -199, -199, 49, -199, 61, 134, 86, 87, 89, 139, + -18, -199, -199, -199, -199, -199, -10, -199, 219, -199, + -199, -199, 12, -199, -199, -199, 114, -199, -199, 116, + 95, 96, 122, 118, -199, -199, -199, -199, -6, 27, + 104, -199, 124, -199, 219, 159, 160, -199, -199, 40, + -199, 107, 219, 22, -199, 111, -199, 219, 219, 219, + 219, 164, 113, 113, -5, 138, 119, -9, 125, 132, + 20, 182, 126, 145, 128, 114, -199, -199, -199, -199, + -199, -18, 185, -199, -199, -199, 67, 67, -199, -199, + 219, -199, 11, 138, -199, 126, 183, 163, -199, 144, + 0, -199, 84, -199, -199, 184, 197, 146, 182, -199, + -199, 199, 215, 169, -199, -199, -199, -199, 186, 218, + 237, 223, -9, 222, -199, -199, -1, -199, -199, -199, + -199, -199, -199, -199, 210, 38, 105, 219, 219, 119, + -199, -199, -199, -199, -199, -199, -199, -199, -199, 16, + 125, 227, 180, -199, 126, 252, 233, 113, 113, 253, + 247, 209, 10, -199, 239, -199, -199, -199, -199, 219, + 163, 163, -3, -3, -199, 188, 221, -199, -199, -199, + 197, 205, -199, -199, 182, 126, 211, 138, 18, -199, + 219, 163, 254, 183, -199, -9, -9, -3, -199, 213, + 244, -199, -199, 32, -199, 245, 163, 237, -199, 105, + 265, 228, 222, -199, 120, 82, 182, -199, -199, 57, + -199, 219, 200, -199, -199, -199, -199, 212, 5, -199, + 246, -199, 113, -199, -199, 219, -199, -199 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -827,56 +830,56 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 37, 0, 96, 96, 0, 0, 27, 0, 0, + 0, 37, 0, 98, 98, 0, 0, 27, 0, 0, 0, 28, 29, 30, 26, 25, 0, 0, 0, 0, 24, 23, 17, 18, 19, 20, 9, 10, 11, 14, 12, 13, 8, 15, 16, 5, 7, 6, 3, 4, - 21, 22, 0, 36, 0, 0, 0, 0, 0, 96, - 71, 83, 80, 81, 116, 82, 0, 107, 105, 94, - 111, 109, 110, 106, 95, 33, 32, 0, 0, 0, - 0, 0, 156, 1, 158, 2, 85, 0, 0, 31, - 0, 48, 96, 0, 0, 67, 69, 0, 72, 0, - 96, 0, 104, 0, 112, 0, 0, 0, 0, 97, - 0, 0, 0, 123, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 115, 103, 68, 70, 84, 0, - 0, 117, 108, 113, 99, 100, 101, 102, 96, 118, - 111, 123, 34, 0, 0, 0, 87, 0, 123, 89, - 0, 157, 77, 0, 49, 0, 0, 45, 46, 38, - 0, 0, 40, 73, 114, 98, 0, 119, 150, 0, - 74, 63, 141, 139, 0, 129, 130, 131, 132, 133, - 134, 137, 135, 0, 124, 0, 0, 0, 88, 78, - 79, 57, 58, 59, 60, 61, 62, 56, 0, 0, - 0, 44, 0, 0, 0, 0, 0, 0, 152, 0, - 0, 75, 0, 142, 140, 138, 136, 0, 0, 0, - 126, 91, 90, 0, 0, 55, 54, 52, 49, 85, - 86, 39, 0, 0, 0, 123, 111, 120, 96, 0, - 143, 0, 65, 0, 74, 125, 127, 128, 0, 53, - 50, 43, 47, 0, 0, 150, 151, 153, 0, 154, - 64, 76, 0, 56, 0, 42, 35, 121, 93, 0, - 0, 92, 66, 51, 41, 0, 147, 144, 145, 155, - 0, 149, 148, 0, 122, 146 + 21, 22, 0, 36, 0, 0, 0, 0, 0, 98, + 71, 83, 84, 85, 80, 81, 118, 82, 0, 109, + 107, 96, 113, 111, 112, 108, 97, 33, 32, 0, + 0, 0, 0, 0, 158, 1, 160, 2, 87, 0, + 0, 31, 0, 48, 98, 0, 0, 67, 69, 0, + 72, 0, 98, 0, 106, 0, 114, 0, 0, 0, + 0, 99, 0, 0, 0, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 117, 105, 68, 70, + 86, 0, 0, 119, 110, 115, 101, 102, 103, 104, + 98, 120, 113, 125, 34, 0, 0, 0, 89, 0, + 125, 91, 0, 159, 77, 0, 49, 0, 0, 45, + 46, 38, 0, 0, 40, 73, 116, 100, 0, 121, + 152, 0, 74, 63, 143, 141, 0, 131, 132, 133, + 134, 135, 136, 139, 137, 0, 126, 0, 0, 0, + 90, 78, 79, 57, 58, 59, 60, 61, 62, 56, + 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, + 154, 0, 0, 75, 0, 144, 142, 140, 138, 0, + 0, 0, 128, 93, 92, 0, 0, 55, 54, 52, + 49, 87, 88, 39, 0, 0, 0, 125, 113, 122, + 98, 0, 145, 0, 65, 0, 74, 127, 129, 130, + 0, 53, 50, 43, 47, 0, 0, 152, 153, 155, + 0, 156, 64, 76, 0, 56, 0, 42, 35, 123, + 95, 0, 0, 94, 66, 51, 41, 0, 149, 146, + 147, 157, 0, 151, 150, 0, 124, 148 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -128, -128, 257, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -123, -128, -128, -128, -128, - 57, 88, 24, -128, -128, 47, 160, -128, 46, -100, - -102, 62, -128, -128, -128, 105, -47, -128, -4, -55, - 224, -128, -128, -128, -94, 87, 15, -127, -86, 114, - -128, 17, -128, 41, -128, -128, -128, -128, -128 + -199, -199, 259, -199, -199, -199, -199, -199, -199, -199, + -199, -199, -199, -199, -199, -126, -199, -199, -199, -199, + 58, 90, 24, -199, -199, 48, 156, -199, 46, -102, + -104, 62, -199, -199, -199, 106, -48, -199, -4, -56, + 224, -199, -199, -199, -96, 91, 15, -129, -198, 109, + -199, 13, -199, 43, -199, -199, -199, -199, -199 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 45, 150, 31, 32, 33, 34, - 189, 144, 217, 187, 35, 161, 88, 89, 200, 201, - 58, 108, 36, 37, 138, 139, 38, 39, 59, 60, - 157, 61, 62, 63, 224, 131, 225, 136, 174, 175, - 249, 267, 268, 198, 230, 261, 40, 41, 75 + 27, 28, 29, 30, 45, 152, 31, 32, 33, 34, + 191, 146, 219, 189, 35, 163, 90, 91, 202, 203, + 60, 110, 36, 37, 140, 141, 38, 39, 61, 62, + 159, 63, 64, 65, 226, 133, 227, 138, 176, 177, + 251, 269, 270, 200, 232, 263, 40, 41, 77 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -884,70 +887,70 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 64, 92, 83, 142, 158, 141, 130, 132, 93, 50, - 159, 178, 93, 106, 203, 65, 93, 68, 49, 133, - 50, 271, 69, 42, 51, 90, 46, 70, 47, 71, - 177, 109, 121, 146, 272, 51, 122, 73, 204, 254, - 124, 125, 126, 127, 134, 84, 82, 107, 91, 162, - 43, 110, 82, 135, 52, 53, 74, 55, 142, 140, - 76, 147, 148, 77, 156, 52, 53, 54, 55, 221, - 56, 57, 44, 163, 205, 48, 78, 94, 113, 164, - 173, 94, 66, 67, 79, 94, 120, 95, 96, 97, - 98, 95, 96, 97, 98, 80, 85, 86, 245, 191, - 243, 87, 226, 165, 166, 167, 168, 169, 170, 171, - 172, 208, 209, 116, 117, 95, 96, 97, 98, 265, - 210, 211, 236, 237, 155, 232, 1, 2, 233, 118, - 119, 142, 142, 251, 100, 3, 4, 5, 6, 7, - 8, 9, 10, 247, 95, 96, 97, 98, 11, 12, - 13, 213, 235, 173, 173, 82, 81, 214, 257, 215, - 101, 216, 49, 14, 50, 15, 214, 102, 215, 262, - 216, 162, 233, 16, 173, 242, 17, 103, 181, 51, - 182, 183, 184, 185, 186, 104, 49, 105, 50, 173, - 97, 98, 179, 180, 255, 163, 111, 208, 209, 114, - 115, 164, 112, 51, 266, 123, 128, 264, 129, 52, - 53, 54, 55, 137, 56, 57, 135, 145, 266, 82, - 154, 143, 149, 151, 246, 165, 166, 167, 168, 169, - 170, 171, 172, 52, 53, 54, 55, 152, 56, 57, - 160, 188, 176, 190, 193, 192, 194, 195, 196, 197, - 199, 202, 219, 206, 220, 222, 223, 229, 228, 231, - 234, 238, 239, 107, 244, 248, 253, 208, 256, 259, - 260, 269, 270, 273, 72, 240, 218, 263, 250, 153, - 252, 241, 212, 227, 99, 274, 258, 207, 0, 0, - 275 + 66, 85, 94, 144, 160, 143, 132, 134, 205, 161, + 273, 180, 238, 239, 92, 95, 95, 50, 108, 135, + 67, 42, 95, 274, 148, 51, 52, 46, 179, 47, + 70, 111, 206, 249, 53, 234, 256, 84, 235, 93, + 215, 126, 127, 128, 129, 86, 136, 164, 259, 84, + 43, 112, 72, 137, 109, 87, 88, 216, 144, 217, + 89, 218, 149, 150, 54, 55, 75, 57, 223, 142, + 207, 165, 44, 158, 97, 98, 99, 100, 48, 166, + 115, 175, 97, 98, 99, 100, 96, 96, 122, 97, + 98, 99, 100, 96, 68, 69, 71, 123, 247, 245, + 193, 124, 228, 167, 168, 169, 170, 171, 172, 173, + 174, 210, 211, 118, 119, 97, 98, 99, 100, 267, + 73, 212, 213, 216, 78, 217, 157, 218, 1, 2, + 76, 144, 144, 253, 120, 121, 79, 3, 4, 5, + 6, 7, 8, 9, 10, 264, 99, 100, 235, 80, + 11, 12, 13, 237, 175, 175, 84, 181, 182, 210, + 211, 81, 82, 49, 83, 50, 102, 14, 103, 15, + 104, 105, 164, 51, 52, 175, 244, 16, 106, 113, + 17, 114, 53, 107, 116, 117, 125, 49, 131, 50, + 175, 137, 130, 147, 139, 257, 165, 51, 52, 84, + 145, 151, 153, 154, 166, 268, 53, 162, 266, 178, + 156, 192, 54, 55, 56, 57, 183, 58, 59, 268, + 184, 185, 186, 187, 188, 190, 248, 194, 167, 168, + 169, 170, 171, 172, 173, 174, 54, 55, 56, 57, + 195, 58, 59, 49, 196, 50, 198, 199, 201, 197, + 204, 208, 221, 51, 52, 222, 224, 225, 231, 230, + 233, 240, 53, 236, 241, 109, 250, 210, 246, 255, + 258, 261, 262, 271, 275, 272, 74, 155, 242, 265, + 220, 252, 254, 243, 209, 214, 101, 276, 277, 229, + 260, 0, 54, 55, 56, 57, 0, 58, 59 }; static const yytype_int16 yycheck[] = { - 4, 56, 49, 105, 131, 105, 100, 101, 4, 26, - 133, 138, 4, 24, 9, 73, 4, 48, 24, 24, - 26, 5, 50, 13, 41, 24, 13, 73, 15, 73, - 28, 4, 73, 4, 18, 41, 77, 0, 33, 4, - 95, 96, 97, 98, 49, 49, 17, 58, 47, 9, - 40, 24, 17, 51, 71, 72, 3, 74, 160, 76, - 73, 108, 109, 73, 60, 71, 72, 73, 74, 192, - 76, 77, 62, 33, 69, 62, 15, 73, 82, 39, - 135, 73, 14, 15, 73, 73, 90, 75, 76, 77, - 78, 75, 76, 77, 78, 73, 71, 72, 225, 146, - 223, 76, 196, 63, 64, 65, 66, 67, 68, 69, - 70, 52, 53, 71, 72, 75, 76, 77, 78, 60, - 175, 176, 208, 209, 128, 25, 7, 8, 28, 27, - 28, 233, 234, 233, 50, 16, 17, 18, 19, 20, - 21, 22, 23, 229, 75, 76, 77, 78, 29, 30, - 31, 24, 207, 208, 209, 17, 73, 39, 244, 41, - 50, 43, 24, 44, 26, 46, 39, 73, 41, 25, - 43, 9, 28, 54, 229, 222, 57, 73, 32, 41, - 34, 35, 36, 37, 38, 54, 24, 63, 26, 244, - 77, 78, 71, 72, 241, 33, 73, 52, 53, 25, - 25, 39, 55, 41, 259, 73, 28, 254, 73, 71, - 72, 73, 74, 73, 76, 77, 51, 59, 273, 17, - 25, 73, 73, 55, 228, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 73, 76, 77, - 24, 28, 63, 63, 25, 28, 73, 61, 28, 10, - 25, 28, 25, 39, 73, 4, 24, 11, 6, 49, - 24, 71, 41, 58, 55, 12, 25, 52, 25, 6, - 42, 71, 61, 28, 17, 218, 188, 253, 231, 119, - 234, 219, 177, 196, 60, 270, 245, 173, -1, -1, - 273 + 4, 49, 58, 107, 133, 107, 102, 103, 9, 135, + 5, 140, 210, 211, 24, 4, 4, 26, 24, 24, + 75, 13, 4, 18, 4, 34, 35, 13, 28, 15, + 50, 4, 33, 231, 43, 25, 4, 17, 28, 49, + 24, 97, 98, 99, 100, 49, 51, 9, 246, 17, + 42, 24, 75, 53, 60, 73, 74, 41, 162, 43, + 78, 45, 110, 111, 73, 74, 0, 76, 194, 78, + 71, 33, 64, 62, 77, 78, 79, 80, 64, 41, + 84, 137, 77, 78, 79, 80, 75, 75, 92, 77, + 78, 79, 80, 75, 14, 15, 52, 75, 227, 225, + 148, 79, 198, 65, 66, 67, 68, 69, 70, 71, + 72, 54, 55, 73, 74, 77, 78, 79, 80, 62, + 75, 177, 178, 41, 75, 43, 130, 45, 7, 8, + 3, 235, 236, 235, 27, 28, 75, 16, 17, 18, + 19, 20, 21, 22, 23, 25, 79, 80, 28, 15, + 29, 30, 31, 209, 210, 211, 17, 73, 74, 54, + 55, 75, 75, 24, 75, 26, 52, 46, 52, 48, + 75, 75, 9, 34, 35, 231, 224, 56, 56, 75, + 59, 57, 43, 65, 25, 25, 75, 24, 75, 26, + 246, 53, 28, 61, 75, 243, 33, 34, 35, 17, + 75, 75, 57, 75, 41, 261, 43, 24, 256, 65, + 25, 65, 73, 74, 75, 76, 32, 78, 79, 275, + 36, 37, 38, 39, 40, 28, 230, 28, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 25, 78, 79, 24, 75, 26, 28, 10, 25, 63, + 28, 41, 25, 34, 35, 75, 4, 24, 11, 6, + 51, 73, 43, 24, 43, 60, 12, 54, 57, 25, + 25, 6, 44, 73, 28, 63, 17, 121, 220, 255, + 190, 233, 236, 221, 175, 179, 62, 272, 275, 198, + 247, -1, 73, 74, 75, 76, -1, 78, 79 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -955,54 +958,55 @@ static const yytype_int16 yycheck[] = static const yytype_uint8 yystos[] = { 0, 7, 8, 16, 17, 18, 19, 20, 21, 22, - 23, 29, 30, 31, 44, 46, 54, 57, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 96, 97, 98, 99, 104, 112, 113, 116, 117, - 136, 137, 13, 40, 62, 94, 13, 15, 62, 24, - 26, 41, 71, 72, 73, 74, 76, 77, 110, 118, - 119, 121, 122, 123, 118, 73, 14, 15, 48, 50, - 73, 73, 82, 0, 3, 138, 73, 73, 15, 73, - 73, 73, 17, 116, 118, 71, 72, 76, 106, 107, - 24, 47, 119, 4, 73, 75, 76, 77, 78, 120, - 50, 50, 73, 73, 54, 63, 24, 58, 111, 4, - 24, 73, 55, 118, 25, 25, 71, 72, 27, 28, - 118, 73, 77, 73, 119, 119, 119, 119, 28, 73, - 124, 125, 124, 24, 49, 51, 127, 73, 114, 115, - 76, 109, 110, 73, 101, 59, 4, 116, 116, 73, - 95, 55, 73, 106, 25, 118, 60, 120, 127, 95, - 24, 105, 9, 33, 39, 63, 64, 65, 66, 67, - 68, 69, 70, 119, 128, 129, 63, 28, 127, 71, - 72, 32, 34, 35, 36, 37, 38, 103, 28, 100, - 63, 116, 28, 25, 73, 61, 28, 10, 133, 25, - 108, 109, 28, 9, 33, 69, 39, 129, 52, 53, - 119, 119, 115, 24, 39, 41, 43, 102, 101, 25, - 73, 95, 4, 24, 124, 126, 124, 125, 6, 11, - 134, 49, 25, 28, 24, 119, 128, 128, 71, 41, - 100, 111, 116, 95, 55, 127, 118, 128, 12, 130, - 105, 109, 108, 25, 4, 116, 25, 128, 133, 6, - 42, 135, 25, 102, 116, 60, 119, 131, 132, 71, - 61, 5, 18, 28, 126, 131 + 23, 29, 30, 31, 46, 48, 56, 59, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 98, 99, 100, 101, 106, 114, 115, 118, 119, + 138, 139, 13, 42, 64, 96, 13, 15, 64, 24, + 26, 34, 35, 43, 73, 74, 75, 76, 78, 79, + 112, 120, 121, 123, 124, 125, 120, 75, 14, 15, + 50, 52, 75, 75, 84, 0, 3, 140, 75, 75, + 15, 75, 75, 75, 17, 118, 120, 73, 74, 78, + 108, 109, 24, 49, 121, 4, 75, 77, 78, 79, + 80, 122, 52, 52, 75, 75, 56, 65, 24, 60, + 113, 4, 24, 75, 57, 120, 25, 25, 73, 74, + 27, 28, 120, 75, 79, 75, 121, 121, 121, 121, + 28, 75, 126, 127, 126, 24, 51, 53, 129, 75, + 116, 117, 78, 111, 112, 75, 103, 61, 4, 118, + 118, 75, 97, 57, 75, 108, 25, 120, 62, 122, + 129, 97, 24, 107, 9, 33, 41, 65, 66, 67, + 68, 69, 70, 71, 72, 121, 130, 131, 65, 28, + 129, 73, 74, 32, 36, 37, 38, 39, 40, 105, + 28, 102, 65, 118, 28, 25, 75, 63, 28, 10, + 135, 25, 110, 111, 28, 9, 33, 71, 41, 131, + 54, 55, 121, 121, 117, 24, 41, 43, 45, 104, + 103, 25, 75, 97, 4, 24, 126, 128, 126, 127, + 6, 11, 136, 51, 25, 28, 24, 121, 130, 130, + 73, 43, 102, 113, 118, 97, 57, 129, 120, 130, + 12, 132, 107, 111, 110, 25, 4, 118, 25, 130, + 135, 6, 44, 137, 25, 104, 118, 62, 121, 133, + 134, 73, 63, 5, 18, 28, 128, 133 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_uint8 yyr1[] = { - 0, 80, 81, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 94, 95, 95, - 96, 97, 97, 97, 97, 97, 98, 98, 99, 100, - 100, 101, 101, 102, 102, 102, 102, 103, 103, 103, - 103, 103, 103, 104, 104, 105, 105, 106, 106, 106, - 106, 107, 107, 107, 108, 108, 108, 109, 109, 109, - 110, 110, 110, 110, 110, 111, 111, 112, 113, 114, - 114, 115, 116, 116, 117, 117, 118, 118, 118, 119, - 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 120, 120, 120, 121, 122, 123, 123, 124, 125, - 125, 126, 126, 127, 127, 128, 128, 128, 128, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 129, 130, 130, 131, 131, 132, 132, 132, - 133, 133, 134, 134, 135, 135, 136, 137, 138 + 0, 82, 83, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 96, 97, 97, + 98, 99, 99, 99, 99, 99, 100, 100, 101, 102, + 102, 103, 103, 104, 104, 104, 104, 105, 105, 105, + 105, 105, 105, 106, 106, 107, 107, 108, 108, 108, + 108, 109, 109, 109, 110, 110, 110, 111, 111, 111, + 112, 112, 112, 112, 112, 112, 112, 113, 113, 114, + 115, 116, 116, 117, 118, 118, 119, 119, 120, 120, + 120, 121, 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 122, 122, 122, 123, 124, 125, 125, + 126, 127, 127, 128, 128, 129, 129, 130, 130, 130, + 130, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 132, 132, 133, 133, 134, + 134, 134, 135, 135, 136, 136, 137, 137, 138, 139, + 140 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -1016,14 +1020,15 @@ static const yytype_int8 yyr2[] = 3, 6, 3, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 5, 8, 3, 5, 1, 2, 1, 2, 0, 1, 3, 0, 1, 3, 1, 2, 2, - 1, 1, 1, 1, 3, 0, 4, 4, 5, 1, - 3, 3, 9, 9, 2, 2, 0, 2, 4, 3, - 3, 3, 3, 3, 2, 1, 1, 1, 3, 1, - 1, 0, 1, 2, 4, 3, 1, 3, 1, 2, - 4, 3, 6, 0, 2, 3, 2, 3, 3, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, - 2, 1, 2, 0, 3, 1, 3, 1, 2, 2, - 0, 3, 0, 2, 0, 2, 2, 4, 1 + 1, 1, 1, 1, 1, 1, 3, 0, 4, 4, + 5, 1, 3, 3, 9, 9, 2, 2, 0, 2, + 4, 3, 3, 3, 3, 3, 2, 1, 1, 1, + 3, 1, 1, 0, 1, 2, 4, 3, 1, 3, + 1, 2, 4, 3, 6, 0, 2, 3, 2, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 2, 1, 2, 1, 2, 0, 3, 1, 3, 1, + 2, 2, 0, 3, 0, 2, 0, 2, 2, 4, + 1 }; @@ -1885,104 +1890,104 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* commands: command_wrapper opt_semicolon */ -#line 271 "yacc_sql.y" +#line 273 "yacc_sql.y" { std::unique_ptr sql_node = std::unique_ptr((yyvsp[-1].sql_node)); sql_result->add_sql_node(std::move(sql_node)); } -#line 1894 "yacc_sql.cpp" +#line 1899 "yacc_sql.cpp" break; case 25: /* exit_stmt: EXIT */ -#line 303 "yacc_sql.y" +#line 305 "yacc_sql.y" { (void)yynerrs; // 这么写为了消除yynerrs未使用的告警。如果你有更好的方法欢迎提PR (yyval.sql_node) = new ParsedSqlNode(SCF_EXIT); } -#line 1903 "yacc_sql.cpp" +#line 1908 "yacc_sql.cpp" break; case 26: /* help_stmt: HELP */ -#line 309 "yacc_sql.y" +#line 311 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_HELP); } -#line 1911 "yacc_sql.cpp" +#line 1916 "yacc_sql.cpp" break; case 27: /* sync_stmt: SYNC */ -#line 314 "yacc_sql.y" +#line 316 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SYNC); } -#line 1919 "yacc_sql.cpp" +#line 1924 "yacc_sql.cpp" break; case 28: /* begin_stmt: TRX_BEGIN */ -#line 320 "yacc_sql.y" +#line 322 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_BEGIN); } -#line 1927 "yacc_sql.cpp" +#line 1932 "yacc_sql.cpp" break; case 29: /* commit_stmt: TRX_COMMIT */ -#line 326 "yacc_sql.y" +#line 328 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_COMMIT); } -#line 1935 "yacc_sql.cpp" +#line 1940 "yacc_sql.cpp" break; case 30: /* rollback_stmt: TRX_ROLLBACK */ -#line 332 "yacc_sql.y" +#line 334 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_ROLLBACK); } -#line 1943 "yacc_sql.cpp" +#line 1948 "yacc_sql.cpp" break; case 31: /* drop_table_stmt: DROP TABLE ID */ -#line 338 "yacc_sql.y" +#line 340 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_TABLE); (yyval.sql_node)->drop_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1953 "yacc_sql.cpp" +#line 1958 "yacc_sql.cpp" break; case 32: /* show_tables_stmt: SHOW TABLES */ -#line 345 "yacc_sql.y" +#line 347 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_TABLES); } -#line 1961 "yacc_sql.cpp" +#line 1966 "yacc_sql.cpp" break; case 33: /* desc_table_stmt: DESC ID */ -#line 351 "yacc_sql.y" +#line 353 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DESC_TABLE); (yyval.sql_node)->desc_table.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1971 "yacc_sql.cpp" +#line 1976 "yacc_sql.cpp" break; case 34: /* show_index_stmt: SHOW INDEX FROM relation */ -#line 360 "yacc_sql.y" +#line 362 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SHOW_INDEX); ShowIndexSqlNode &show_index = (yyval.sql_node)->show_index; show_index.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 1982 "yacc_sql.cpp" +#line 1987 "yacc_sql.cpp" break; case 35: /* create_index_stmt: CREATE opt_unique INDEX ID ON ID LBRACE attr_list RBRACE */ -#line 370 "yacc_sql.y" +#line 372 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_INDEX); CreateIndexSqlNode &create_index = (yyval.sql_node)->create_index; @@ -1994,43 +1999,43 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-5].string)); free((yyvsp[-3].string)); } -#line 1998 "yacc_sql.cpp" +#line 2003 "yacc_sql.cpp" break; case 36: /* opt_unique: UNIQUE */ -#line 384 "yacc_sql.y" +#line 386 "yacc_sql.y" { (yyval.unique) = true; } -#line 2004 "yacc_sql.cpp" +#line 2009 "yacc_sql.cpp" break; case 37: /* opt_unique: %empty */ -#line 385 "yacc_sql.y" +#line 387 "yacc_sql.y" { (yyval.unique) = false; } -#line 2010 "yacc_sql.cpp" +#line 2015 "yacc_sql.cpp" break; case 38: /* attr_list: ID */ -#line 390 "yacc_sql.y" +#line 392 "yacc_sql.y" { (yyval.index_attr_list) = new std::vector; // 创建一个新的 vector (yyval.index_attr_list)->emplace_back((yyvsp[0].string)); // 将列名加入 vector free((yyvsp[0].string)); } -#line 2020 "yacc_sql.cpp" +#line 2025 "yacc_sql.cpp" break; case 39: /* attr_list: ID COMMA attr_list */ -#line 396 "yacc_sql.y" +#line 398 "yacc_sql.y" { (yyval.index_attr_list) = (yyvsp[0].index_attr_list); // 使用现有的 vector (yyval.index_attr_list)->emplace((yyval.index_attr_list)->begin(), (yyvsp[-2].string)); // 将新列名加入 vector 开头 free((yyvsp[-2].string)); } -#line 2030 "yacc_sql.cpp" +#line 2035 "yacc_sql.cpp" break; case 40: /* drop_index_stmt: DROP INDEX ID ON ID */ -#line 405 "yacc_sql.y" +#line 407 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_INDEX); (yyval.sql_node)->drop_index.index_name = (yyvsp[-2].string); @@ -2038,51 +2043,51 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2042 "yacc_sql.cpp" +#line 2047 "yacc_sql.cpp" break; case 41: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format AS select_stmt */ -#line 415 "yacc_sql.y" +#line 417 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-7].string), (yyvsp[-5].attr_info), (yyvsp[-4].attr_infos), (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2050 "yacc_sql.cpp" +#line 2055 "yacc_sql.cpp" break; case 42: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format select_stmt */ -#line 419 "yacc_sql.y" +#line 421 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-6].string), (yyvsp[-4].attr_info), (yyvsp[-3].attr_infos), (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2058 "yacc_sql.cpp" +#line 2063 "yacc_sql.cpp" break; case 43: /* create_table_stmt: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE storage_format */ -#line 423 "yacc_sql.y" +#line 425 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-5].string), (yyvsp[-3].attr_info), (yyvsp[-2].attr_infos), (yyvsp[0].string), nullptr); } -#line 2066 "yacc_sql.cpp" +#line 2071 "yacc_sql.cpp" break; case 44: /* create_table_stmt: CREATE TABLE ID storage_format AS select_stmt */ -#line 427 "yacc_sql.y" +#line 429 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-3].string), nullptr, nullptr, (yyvsp[-2].string), (yyvsp[0].sql_node)); } -#line 2074 "yacc_sql.cpp" +#line 2079 "yacc_sql.cpp" break; case 45: /* create_table_stmt: CREATE TABLE ID storage_format select_stmt */ -#line 431 "yacc_sql.y" +#line 433 "yacc_sql.y" { (yyval.sql_node) = create_table_sql_node((yyvsp[-2].string), nullptr, nullptr, (yyvsp[-1].string), (yyvsp[0].sql_node)); } -#line 2082 "yacc_sql.cpp" +#line 2087 "yacc_sql.cpp" break; case 46: /* create_view_stmt: CREATE VIEW ID AS select_stmt */ -#line 438 "yacc_sql.y" +#line 440 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; @@ -2090,11 +2095,11 @@ YYLTYPE yylloc = yyloc_default; create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-2].string)); } -#line 2094 "yacc_sql.cpp" +#line 2099 "yacc_sql.cpp" break; case 47: /* create_view_stmt: CREATE VIEW ID LBRACE attr_list RBRACE AS select_stmt */ -#line 446 "yacc_sql.y" +#line 448 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CREATE_VIEW); CreateViewSqlNode &create_view = (yyval.sql_node)->create_view; @@ -2103,29 +2108,29 @@ YYLTYPE yylloc = yyloc_default; create_view.create_view_select = std::make_unique(std::move((yyvsp[0].sql_node)->selection)); free((yyvsp[-5].string)); } -#line 2107 "yacc_sql.cpp" +#line 2112 "yacc_sql.cpp" break; case 48: /* drop_view_stmt: DROP VIEW ID */ -#line 458 "yacc_sql.y" +#line 460 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DROP_VIEW); (yyval.sql_node)->drop_view.relation_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2117 "yacc_sql.cpp" +#line 2122 "yacc_sql.cpp" break; case 49: /* attr_def_list: %empty */ -#line 467 "yacc_sql.y" +#line 469 "yacc_sql.y" { (yyval.attr_infos) = nullptr; } -#line 2125 "yacc_sql.cpp" +#line 2130 "yacc_sql.cpp" break; case 50: /* attr_def_list: COMMA attr_def attr_def_list */ -#line 471 "yacc_sql.y" +#line 473 "yacc_sql.y" { if ((yyvsp[0].attr_infos) != nullptr) { (yyval.attr_infos) = (yyvsp[0].attr_infos); @@ -2135,11 +2140,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info)); delete (yyvsp[-1].attr_info); } -#line 2139 "yacc_sql.cpp" +#line 2144 "yacc_sql.cpp" break; case 51: /* attr_def: ID type LBRACE NUMBER RBRACE nullable_constraint */ -#line 484 "yacc_sql.y" +#line 486 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->name = (yyvsp[-5].string); @@ -2157,11 +2162,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2161 "yacc_sql.cpp" +#line 2166 "yacc_sql.cpp" break; case 52: /* attr_def: ID type nullable_constraint */ -#line 502 "yacc_sql.y" +#line 504 "yacc_sql.y" { (yyval.attr_info) = new AttrInfoSqlNode; (yyval.attr_info)->type = (AttrType)(yyvsp[-1].number); @@ -2187,79 +2192,79 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2191 "yacc_sql.cpp" +#line 2196 "yacc_sql.cpp" break; case 53: /* nullable_constraint: NOT NULL_T */ -#line 531 "yacc_sql.y" +#line 533 "yacc_sql.y" { (yyval.nullable_info) = false; // NOT NULL 对应的可空性为 false } -#line 2199 "yacc_sql.cpp" +#line 2204 "yacc_sql.cpp" break; case 54: /* nullable_constraint: NULLABLE */ -#line 535 "yacc_sql.y" +#line 537 "yacc_sql.y" { (yyval.nullable_info) = true; // NULLABLE 对应的可空性为 true 2022 } -#line 2207 "yacc_sql.cpp" +#line 2212 "yacc_sql.cpp" break; case 55: /* nullable_constraint: NULL_T */ -#line 539 "yacc_sql.y" +#line 541 "yacc_sql.y" { (yyval.nullable_info) = true; // NULL 对应的可空性也为 true 2023 } -#line 2215 "yacc_sql.cpp" +#line 2220 "yacc_sql.cpp" break; case 56: /* nullable_constraint: %empty */ -#line 543 "yacc_sql.y" +#line 545 "yacc_sql.y" { (yyval.nullable_info) = true; // 默认情况为 NULL } -#line 2223 "yacc_sql.cpp" +#line 2228 "yacc_sql.cpp" break; case 57: /* type: INT_T */ -#line 549 "yacc_sql.y" +#line 551 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::INTS); } -#line 2229 "yacc_sql.cpp" +#line 2234 "yacc_sql.cpp" break; case 58: /* type: STRING_T */ -#line 550 "yacc_sql.y" +#line 552 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::CHARS); } -#line 2235 "yacc_sql.cpp" +#line 2240 "yacc_sql.cpp" break; case 59: /* type: FLOAT_T */ -#line 551 "yacc_sql.y" +#line 553 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::FLOATS); } -#line 2241 "yacc_sql.cpp" +#line 2246 "yacc_sql.cpp" break; case 60: /* type: DATE_T */ -#line 552 "yacc_sql.y" +#line 554 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::DATES); } -#line 2247 "yacc_sql.cpp" +#line 2252 "yacc_sql.cpp" break; case 61: /* type: TEXT_T */ -#line 553 "yacc_sql.y" +#line 555 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::TEXTS); } -#line 2253 "yacc_sql.cpp" +#line 2258 "yacc_sql.cpp" break; case 62: /* type: VECTOR_T */ -#line 554 "yacc_sql.y" +#line 556 "yacc_sql.y" { (yyval.number) = static_cast(AttrType::VECTORS); } -#line 2259 "yacc_sql.cpp" +#line 2264 "yacc_sql.cpp" break; case 63: /* insert_stmt: INSERT INTO ID VALUES values_list */ -#line 559 "yacc_sql.y" +#line 561 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-2].string); @@ -2269,11 +2274,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-2].string)); } -#line 2273 "yacc_sql.cpp" +#line 2278 "yacc_sql.cpp" break; case 64: /* insert_stmt: INSERT INTO ID LBRACE attr_list RBRACE VALUES values_list */ -#line 569 "yacc_sql.y" +#line 571 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_INSERT); (yyval.sql_node)->insertion.relation_name = (yyvsp[-5].string); @@ -2284,201 +2289,217 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-5].string)); } -#line 2288 "yacc_sql.cpp" +#line 2293 "yacc_sql.cpp" break; case 65: /* values_list: LBRACE value_list RBRACE */ -#line 583 "yacc_sql.y" +#line 585 "yacc_sql.y" { (yyval.values_list) = new std::vector>; (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2298 "yacc_sql.cpp" +#line 2303 "yacc_sql.cpp" break; case 66: /* values_list: values_list COMMA LBRACE value_list RBRACE */ -#line 589 "yacc_sql.y" +#line 591 "yacc_sql.y" { (yyval.values_list)->emplace_back(*(yyvsp[-1].value_list)); delete (yyvsp[-1].value_list); } -#line 2307 "yacc_sql.cpp" +#line 2312 "yacc_sql.cpp" break; case 67: /* digits: NUMBER */ -#line 596 "yacc_sql.y" +#line 598 "yacc_sql.y" { (yyval.digits) = float((yyvsp[0].number)); } -#line 2315 "yacc_sql.cpp" +#line 2320 "yacc_sql.cpp" break; case 68: /* digits: '-' NUMBER */ -#line 600 "yacc_sql.y" +#line 602 "yacc_sql.y" { (yyval.digits) = float(-(yyvsp[0].number)); } -#line 2323 "yacc_sql.cpp" +#line 2328 "yacc_sql.cpp" break; case 69: /* digits: FLOAT */ -#line 604 "yacc_sql.y" +#line 606 "yacc_sql.y" { (yyval.digits) = (yyvsp[0].floats); } -#line 2331 "yacc_sql.cpp" +#line 2336 "yacc_sql.cpp" break; case 70: /* digits: '-' FLOAT */ -#line 608 "yacc_sql.y" +#line 610 "yacc_sql.y" { (yyval.digits) = (yyvsp[0].floats); } -#line 2339 "yacc_sql.cpp" +#line 2344 "yacc_sql.cpp" break; case 71: /* digits_list: %empty */ -#line 616 "yacc_sql.y" +#line 618 "yacc_sql.y" { (yyval.digits_list) = new std::vector(); } -#line 2347 "yacc_sql.cpp" +#line 2352 "yacc_sql.cpp" break; case 72: /* digits_list: digits */ -#line 620 "yacc_sql.y" +#line 622 "yacc_sql.y" { (yyval.digits_list) = new std::vector(); (yyval.digits_list)->push_back((yyvsp[0].digits)); } -#line 2356 "yacc_sql.cpp" +#line 2361 "yacc_sql.cpp" break; case 73: /* digits_list: digits_list COMMA digits */ -#line 625 "yacc_sql.y" +#line 627 "yacc_sql.y" { (yyval.digits_list)->push_back((yyvsp[0].digits)); } -#line 2364 "yacc_sql.cpp" +#line 2369 "yacc_sql.cpp" break; case 74: /* value_list: %empty */ -#line 632 "yacc_sql.y" +#line 634 "yacc_sql.y" { (yyval.value_list) = new std::vector; } -#line 2372 "yacc_sql.cpp" +#line 2377 "yacc_sql.cpp" break; case 75: /* value_list: value */ -#line 636 "yacc_sql.y" +#line 638 "yacc_sql.y" { (yyval.value_list) = new std::vector; (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2382 "yacc_sql.cpp" +#line 2387 "yacc_sql.cpp" break; case 76: /* value_list: value_list COMMA value */ -#line 642 "yacc_sql.y" +#line 644 "yacc_sql.y" { (yyval.value_list)->emplace_back(*(yyvsp[0].value)); delete (yyvsp[0].value); } -#line 2391 "yacc_sql.cpp" +#line 2396 "yacc_sql.cpp" break; case 77: /* value: nonnegative_value */ -#line 649 "yacc_sql.y" +#line 651 "yacc_sql.y" { (yyval.value) = (yyvsp[0].value); } -#line 2399 "yacc_sql.cpp" +#line 2404 "yacc_sql.cpp" break; case 78: /* value: '-' NUMBER */ -#line 652 "yacc_sql.y" +#line 654 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].number)); (yyloc) = (yylsp[-1]); } -#line 2408 "yacc_sql.cpp" +#line 2413 "yacc_sql.cpp" break; case 79: /* value: '-' FLOAT */ -#line 656 "yacc_sql.y" +#line 658 "yacc_sql.y" { (yyval.value) = new Value(-(yyvsp[0].floats)); (yyloc) = (yylsp[-1]); } -#line 2417 "yacc_sql.cpp" +#line 2422 "yacc_sql.cpp" break; case 80: /* nonnegative_value: NUMBER */ -#line 663 "yacc_sql.y" +#line 665 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].number)); (yyloc) = (yylsp[0]); } -#line 2426 "yacc_sql.cpp" +#line 2431 "yacc_sql.cpp" break; case 81: /* nonnegative_value: FLOAT */ -#line 667 "yacc_sql.y" +#line 669 "yacc_sql.y" { (yyval.value) = new Value((yyvsp[0].floats)); (yyloc) = (yylsp[0]); } -#line 2435 "yacc_sql.cpp" +#line 2440 "yacc_sql.cpp" break; case 82: /* nonnegative_value: SSS */ -#line 671 "yacc_sql.y" +#line 673 "yacc_sql.y" { char *tmp = common::substr((yyvsp[0].string),1,strlen((yyvsp[0].string))-2); (yyval.value) = new Value(tmp); free(tmp); free((yyvsp[0].string)); } -#line 2446 "yacc_sql.cpp" +#line 2451 "yacc_sql.cpp" + break; + + case 83: /* nonnegative_value: TRUE */ +#line 679 "yacc_sql.y" + { + (yyval.value) = new Value(true); + } +#line 2459 "yacc_sql.cpp" + break; + + case 84: /* nonnegative_value: FALSE */ +#line 682 "yacc_sql.y" + { + (yyval.value) = new Value(false); + } +#line 2467 "yacc_sql.cpp" break; - case 83: /* nonnegative_value: NULL_T */ -#line 677 "yacc_sql.y" + case 85: /* nonnegative_value: NULL_T */ +#line 685 "yacc_sql.y" { (yyval.value) = new Value(NullValue()); } -#line 2454 "yacc_sql.cpp" +#line 2475 "yacc_sql.cpp" break; - case 84: /* nonnegative_value: LSBRACE digits_list RSBRACE */ -#line 680 "yacc_sql.y" + case 86: /* nonnegative_value: LSBRACE digits_list RSBRACE */ +#line 688 "yacc_sql.y" { (yyval.value) = new Value(*(yyvsp[-1].digits_list)); } -#line 2462 "yacc_sql.cpp" +#line 2483 "yacc_sql.cpp" break; - case 85: /* storage_format: %empty */ -#line 687 "yacc_sql.y" + case 87: /* storage_format: %empty */ +#line 695 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2470 "yacc_sql.cpp" +#line 2491 "yacc_sql.cpp" break; - case 86: /* storage_format: STORAGE FORMAT EQ ID */ -#line 691 "yacc_sql.y" + case 88: /* storage_format: STORAGE FORMAT EQ ID */ +#line 699 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2478 "yacc_sql.cpp" +#line 2499 "yacc_sql.cpp" break; - case 87: /* delete_stmt: DELETE FROM ID where */ -#line 698 "yacc_sql.y" + case 89: /* delete_stmt: DELETE FROM ID where */ +#line 706 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_DELETE); (yyval.sql_node)->deletion.relation_name = (yyvsp[-1].string); @@ -2487,11 +2508,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2491 "yacc_sql.cpp" +#line 2512 "yacc_sql.cpp" break; - case 88: /* update_stmt: UPDATE ID SET set_clauses where */ -#line 710 "yacc_sql.y" + case 90: /* update_stmt: UPDATE ID SET set_clauses where */ +#line 718 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_UPDATE); (yyval.sql_node)->update.relation_name = (yyvsp[-3].string); @@ -2502,39 +2523,39 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-3].string)); delete (yyvsp[-1].set_clauses); } -#line 2506 "yacc_sql.cpp" +#line 2527 "yacc_sql.cpp" break; - case 89: /* set_clauses: set_clause */ -#line 724 "yacc_sql.y" + case 91: /* set_clauses: set_clause */ +#line 732 "yacc_sql.y" { (yyval.set_clauses) = new std::vector; (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2515 "yacc_sql.cpp" +#line 2536 "yacc_sql.cpp" break; - case 90: /* set_clauses: set_clauses COMMA set_clause */ -#line 729 "yacc_sql.y" + case 92: /* set_clauses: set_clauses COMMA set_clause */ +#line 737 "yacc_sql.y" { (yyval.set_clauses)->emplace_back(std::move(*(yyvsp[0].set_clause))); } -#line 2523 "yacc_sql.cpp" +#line 2544 "yacc_sql.cpp" break; - case 91: /* set_clause: ID EQ expression */ -#line 736 "yacc_sql.y" + case 93: /* set_clause: ID EQ expression */ +#line 744 "yacc_sql.y" { (yyval.set_clause) = new SetClauseSqlNode; (yyval.set_clause)->field_name = (yyvsp[-2].string); (yyval.set_clause)->value = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2534 "yacc_sql.cpp" +#line 2555 "yacc_sql.cpp" break; - case 92: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ -#line 746 "yacc_sql.y" + case 94: /* select_stmt: SELECT expression_list FROM rel_list where group_by opt_having opt_order_by opt_limit */ +#line 754 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2572,11 +2593,11 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].limited_info); } } -#line 2576 "yacc_sql.cpp" +#line 2597 "yacc_sql.cpp" break; - case 93: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ -#line 784 "yacc_sql.y" + case 95: /* select_stmt: SELECT expression_list FROM relation INNER JOIN join_clauses where group_by */ +#line 792 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SELECT); if ((yyvsp[-7].expression_list) != nullptr) { @@ -2606,39 +2627,39 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].expression_list); } } -#line 2610 "yacc_sql.cpp" +#line 2631 "yacc_sql.cpp" break; - case 94: /* calc_stmt: CALC expression_list */ -#line 817 "yacc_sql.y" + case 96: /* calc_stmt: CALC expression_list */ +#line 825 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2620 "yacc_sql.cpp" +#line 2641 "yacc_sql.cpp" break; - case 95: /* calc_stmt: SELECT expression_list */ -#line 823 "yacc_sql.y" + case 97: /* calc_stmt: SELECT expression_list */ +#line 831 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_CALC); (yyval.sql_node)->calc.expressions.swap(*(yyvsp[0].expression_list)); delete (yyvsp[0].expression_list); } -#line 2630 "yacc_sql.cpp" +#line 2651 "yacc_sql.cpp" break; - case 96: /* expression_list: %empty */ -#line 831 "yacc_sql.y" + case 98: /* expression_list: %empty */ +#line 839 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; } -#line 2638 "yacc_sql.cpp" +#line 2659 "yacc_sql.cpp" break; - case 97: /* expression_list: expression alias */ -#line 835 "yacc_sql.y" + case 99: /* expression_list: expression alias */ +#line 843 "yacc_sql.y" { (yyval.expression_list) = new std::vector>; if (nullptr != (yyvsp[0].string)) { @@ -2647,11 +2668,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace_back((yyvsp[-1].expression)); free((yyvsp[0].string)); } -#line 2651 "yacc_sql.cpp" +#line 2672 "yacc_sql.cpp" break; - case 98: /* expression_list: expression alias COMMA expression_list */ -#line 844 "yacc_sql.y" + case 100: /* expression_list: expression alias COMMA expression_list */ +#line 852 "yacc_sql.y" { if ((yyvsp[0].expression_list) != nullptr) { (yyval.expression_list) = (yyvsp[0].expression_list); @@ -2664,43 +2685,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.expression_list)->emplace((yyval.expression_list)->begin(),std::move((yyvsp[-3].expression))); free((yyvsp[-2].string)); } -#line 2668 "yacc_sql.cpp" +#line 2689 "yacc_sql.cpp" break; - case 99: /* expression: expression '+' expression */ -#line 859 "yacc_sql.y" + case 101: /* expression: expression '+' expression */ +#line 867 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::ADD, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2676 "yacc_sql.cpp" +#line 2697 "yacc_sql.cpp" break; - case 100: /* expression: expression '-' expression */ -#line 862 "yacc_sql.y" + case 102: /* expression: expression '-' expression */ +#line 870 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::SUB, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2684 "yacc_sql.cpp" +#line 2705 "yacc_sql.cpp" break; - case 101: /* expression: expression '*' expression */ -#line 865 "yacc_sql.y" + case 103: /* expression: expression '*' expression */ +#line 873 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::MUL, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2692 "yacc_sql.cpp" +#line 2713 "yacc_sql.cpp" break; - case 102: /* expression: expression '/' expression */ -#line 868 "yacc_sql.y" + case 104: /* expression: expression '/' expression */ +#line 876 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::DIV, (yyvsp[-2].expression), (yyvsp[0].expression), sql_string, &(yyloc)); } -#line 2700 "yacc_sql.cpp" +#line 2721 "yacc_sql.cpp" break; - case 103: /* expression: LBRACE expression_list RBRACE */ -#line 871 "yacc_sql.y" + case 105: /* expression: LBRACE expression_list RBRACE */ +#line 879 "yacc_sql.y" { if ((yyvsp[-1].expression_list)->size() == 1) { (yyval.expression) = (yyvsp[-1].expression_list)->front().get(); @@ -2709,123 +2730,123 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2713 "yacc_sql.cpp" +#line 2734 "yacc_sql.cpp" break; - case 104: /* expression: '-' expression */ -#line 879 "yacc_sql.y" + case 106: /* expression: '-' expression */ +#line 887 "yacc_sql.y" { (yyval.expression) = create_arithmetic_expression(ArithmeticExpr::Type::NEGATIVE, (yyvsp[0].expression), nullptr, sql_string, &(yyloc)); } -#line 2721 "yacc_sql.cpp" +#line 2742 "yacc_sql.cpp" break; - case 105: /* expression: nonnegative_value */ -#line 882 "yacc_sql.y" + case 107: /* expression: nonnegative_value */ +#line 890 "yacc_sql.y" { (yyval.expression) = new ValueExpr(*(yyvsp[0].value)); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].value); } -#line 2731 "yacc_sql.cpp" +#line 2752 "yacc_sql.cpp" break; - case 106: /* expression: rel_attr */ -#line 887 "yacc_sql.y" + case 108: /* expression: rel_attr */ +#line 895 "yacc_sql.y" { RelAttrSqlNode *node = (yyvsp[0].rel_attr); (yyval.expression) = new UnboundFieldExpr(node->relation_name, node->attribute_name); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); delete (yyvsp[0].rel_attr); } -#line 2742 "yacc_sql.cpp" +#line 2763 "yacc_sql.cpp" break; - case 107: /* expression: '*' */ -#line 893 "yacc_sql.y" + case 109: /* expression: '*' */ +#line 901 "yacc_sql.y" { (yyval.expression) = new StarExpr(); } -#line 2750 "yacc_sql.cpp" +#line 2771 "yacc_sql.cpp" break; - case 108: /* expression: ID DOT '*' */ -#line 896 "yacc_sql.y" + case 110: /* expression: ID DOT '*' */ +#line 904 "yacc_sql.y" { (yyval.expression) = new StarExpr((yyvsp[-2].string)); } -#line 2758 "yacc_sql.cpp" +#line 2779 "yacc_sql.cpp" break; - case 109: /* expression: func_expr */ -#line 899 "yacc_sql.y" + case 111: /* expression: func_expr */ +#line 907 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // AggrFuncExpr } -#line 2766 "yacc_sql.cpp" +#line 2787 "yacc_sql.cpp" break; - case 110: /* expression: sub_query_expr */ -#line 902 "yacc_sql.y" + case 112: /* expression: sub_query_expr */ +#line 910 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); // SubQueryExpr } -#line 2774 "yacc_sql.cpp" +#line 2795 "yacc_sql.cpp" break; - case 111: /* alias: %empty */ -#line 909 "yacc_sql.y" + case 113: /* alias: %empty */ +#line 917 "yacc_sql.y" { (yyval.string) = nullptr; } -#line 2782 "yacc_sql.cpp" +#line 2803 "yacc_sql.cpp" break; - case 112: /* alias: ID */ -#line 912 "yacc_sql.y" + case 114: /* alias: ID */ +#line 920 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2790 "yacc_sql.cpp" +#line 2811 "yacc_sql.cpp" break; - case 113: /* alias: AS ID */ -#line 915 "yacc_sql.y" + case 115: /* alias: AS ID */ +#line 923 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2798 "yacc_sql.cpp" +#line 2819 "yacc_sql.cpp" break; - case 114: /* func_expr: ID LBRACE expression_list RBRACE */ -#line 921 "yacc_sql.y" + case 116: /* func_expr: ID LBRACE expression_list RBRACE */ +#line 929 "yacc_sql.y" { (yyval.expression) = new UnboundFunctionExpr((yyvsp[-3].string), std::move(*(yyvsp[-1].expression_list))); (yyval.expression)->set_name(token_name(sql_string, &(yyloc))); } -#line 2807 "yacc_sql.cpp" +#line 2828 "yacc_sql.cpp" break; - case 115: /* sub_query_expr: LBRACE select_stmt RBRACE */ -#line 929 "yacc_sql.y" + case 117: /* sub_query_expr: LBRACE select_stmt RBRACE */ +#line 937 "yacc_sql.y" { (yyval.expression) = new SubQueryExpr((yyvsp[-1].sql_node)->selection); } -#line 2815 "yacc_sql.cpp" +#line 2836 "yacc_sql.cpp" break; - case 116: /* rel_attr: ID */ -#line 935 "yacc_sql.y" + case 118: /* rel_attr: ID */ +#line 943 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->attribute_name = (yyvsp[0].string); free((yyvsp[0].string)); } -#line 2825 "yacc_sql.cpp" +#line 2846 "yacc_sql.cpp" break; - case 117: /* rel_attr: ID DOT ID */ -#line 940 "yacc_sql.y" + case 119: /* rel_attr: ID DOT ID */ +#line 948 "yacc_sql.y" { (yyval.rel_attr) = new RelAttrSqlNode; (yyval.rel_attr)->relation_name = (yyvsp[-2].string); @@ -2833,19 +2854,19 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); free((yyvsp[0].string)); } -#line 2837 "yacc_sql.cpp" +#line 2858 "yacc_sql.cpp" break; - case 118: /* relation: ID */ -#line 950 "yacc_sql.y" + case 120: /* relation: ID */ +#line 958 "yacc_sql.y" { (yyval.string) = (yyvsp[0].string); } -#line 2845 "yacc_sql.cpp" +#line 2866 "yacc_sql.cpp" break; - case 119: /* rel_list: relation alias */ -#line 956 "yacc_sql.y" + case 121: /* rel_list: relation alias */ +#line 964 "yacc_sql.y" { (yyval.relation_list) = new std::vector(); if(nullptr!=(yyvsp[0].string)){ @@ -2856,11 +2877,11 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-1].string)); } -#line 2860 "yacc_sql.cpp" +#line 2881 "yacc_sql.cpp" break; - case 120: /* rel_list: relation alias COMMA rel_list */ -#line 966 "yacc_sql.y" + case 122: /* rel_list: relation alias COMMA rel_list */ +#line 974 "yacc_sql.y" { if ((yyvsp[0].relation_list) != nullptr) { (yyval.relation_list) = (yyvsp[0].relation_list); @@ -2875,22 +2896,22 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[-3].string)); } -#line 2879 "yacc_sql.cpp" +#line 2900 "yacc_sql.cpp" break; - case 121: /* join_clauses: relation ON condition */ -#line 984 "yacc_sql.y" + case 123: /* join_clauses: relation ON condition */ +#line 992 "yacc_sql.y" { (yyval.join_clauses) = new JoinSqlNode; (yyval.join_clauses)->relations.emplace_back((yyvsp[-2].string)); (yyval.join_clauses)->conditions = std::unique_ptr((yyvsp[0].expression)); free((yyvsp[-2].string)); } -#line 2890 "yacc_sql.cpp" +#line 2911 "yacc_sql.cpp" break; - case 122: /* join_clauses: relation ON condition INNER JOIN join_clauses */ -#line 991 "yacc_sql.y" + case 124: /* join_clauses: relation ON condition INNER JOIN join_clauses */ +#line 999 "yacc_sql.y" { (yyval.join_clauses) = (yyvsp[0].join_clauses); (yyval.join_clauses)->relations.emplace_back((yyvsp[-5].string)); @@ -2898,269 +2919,269 @@ YYLTYPE yylloc = yyloc_default; (yyval.join_clauses)->conditions = std::make_unique(ConjunctionExpr::Type::AND, ptr, (yyvsp[-3].expression)); free((yyvsp[-5].string)); } -#line 2902 "yacc_sql.cpp" +#line 2923 "yacc_sql.cpp" break; - case 123: /* where: %empty */ -#line 1002 "yacc_sql.y" + case 125: /* where: %empty */ +#line 1010 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 2910 "yacc_sql.cpp" +#line 2931 "yacc_sql.cpp" break; - case 124: /* where: WHERE condition */ -#line 1005 "yacc_sql.y" + case 126: /* where: WHERE condition */ +#line 1013 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 2918 "yacc_sql.cpp" +#line 2939 "yacc_sql.cpp" break; - case 125: /* condition: expression comp_op expression */ -#line 1012 "yacc_sql.y" + case 127: /* condition: expression comp_op expression */ +#line 1020 "yacc_sql.y" { (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp), (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2926 "yacc_sql.cpp" +#line 2947 "yacc_sql.cpp" break; - case 126: /* condition: comp_op expression */ -#line 1016 "yacc_sql.y" + case 128: /* condition: comp_op expression */ +#line 1024 "yacc_sql.y" { Value val; val.set_null(true); ValueExpr *temp_expr = new ValueExpr(val); (yyval.expression) = new ComparisonExpr((yyvsp[-1].comp),temp_expr, (yyvsp[0].expression)); } -#line 2937 "yacc_sql.cpp" +#line 2958 "yacc_sql.cpp" break; - case 127: /* condition: condition AND condition */ -#line 1023 "yacc_sql.y" + case 129: /* condition: condition AND condition */ +#line 1031 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::AND, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2945 "yacc_sql.cpp" +#line 2966 "yacc_sql.cpp" break; - case 128: /* condition: condition OR condition */ -#line 1027 "yacc_sql.y" + case 130: /* condition: condition OR condition */ +#line 1035 "yacc_sql.y" { (yyval.expression) = new ConjunctionExpr(ConjunctionExpr::Type::OR, (yyvsp[-2].expression), (yyvsp[0].expression)); } -#line 2953 "yacc_sql.cpp" +#line 2974 "yacc_sql.cpp" break; - case 129: /* comp_op: EQ */ -#line 1033 "yacc_sql.y" + case 131: /* comp_op: EQ */ +#line 1041 "yacc_sql.y" { (yyval.comp) = EQUAL_TO; } -#line 2959 "yacc_sql.cpp" +#line 2980 "yacc_sql.cpp" break; - case 130: /* comp_op: LT */ -#line 1034 "yacc_sql.y" + case 132: /* comp_op: LT */ +#line 1042 "yacc_sql.y" { (yyval.comp) = LESS_THAN; } -#line 2965 "yacc_sql.cpp" +#line 2986 "yacc_sql.cpp" break; - case 131: /* comp_op: GT */ -#line 1035 "yacc_sql.y" + case 133: /* comp_op: GT */ +#line 1043 "yacc_sql.y" { (yyval.comp) = GREAT_THAN; } -#line 2971 "yacc_sql.cpp" +#line 2992 "yacc_sql.cpp" break; - case 132: /* comp_op: LE */ -#line 1036 "yacc_sql.y" + case 134: /* comp_op: LE */ +#line 1044 "yacc_sql.y" { (yyval.comp) = LESS_EQUAL; } -#line 2977 "yacc_sql.cpp" +#line 2998 "yacc_sql.cpp" break; - case 133: /* comp_op: GE */ -#line 1037 "yacc_sql.y" + case 135: /* comp_op: GE */ +#line 1045 "yacc_sql.y" { (yyval.comp) = GREAT_EQUAL; } -#line 2983 "yacc_sql.cpp" +#line 3004 "yacc_sql.cpp" break; - case 134: /* comp_op: NE */ -#line 1038 "yacc_sql.y" + case 136: /* comp_op: NE */ +#line 1046 "yacc_sql.y" { (yyval.comp) = NOT_EQUAL; } -#line 2989 "yacc_sql.cpp" +#line 3010 "yacc_sql.cpp" break; - case 135: /* comp_op: IS */ -#line 1039 "yacc_sql.y" + case 137: /* comp_op: IS */ +#line 1047 "yacc_sql.y" { (yyval.comp) = IS_OP; } -#line 2995 "yacc_sql.cpp" +#line 3016 "yacc_sql.cpp" break; - case 136: /* comp_op: IS NOT */ -#line 1040 "yacc_sql.y" + case 138: /* comp_op: IS NOT */ +#line 1048 "yacc_sql.y" { (yyval.comp) = IS_NOT_OP; } -#line 3001 "yacc_sql.cpp" +#line 3022 "yacc_sql.cpp" break; - case 137: /* comp_op: LIKE */ -#line 1041 "yacc_sql.y" + case 139: /* comp_op: LIKE */ +#line 1049 "yacc_sql.y" { (yyval.comp) = LIKE_OP;} -#line 3007 "yacc_sql.cpp" +#line 3028 "yacc_sql.cpp" break; - case 138: /* comp_op: NOT LIKE */ -#line 1042 "yacc_sql.y" + case 140: /* comp_op: NOT LIKE */ +#line 1050 "yacc_sql.y" {(yyval.comp) = NOT_LIKE_OP;} -#line 3013 "yacc_sql.cpp" +#line 3034 "yacc_sql.cpp" break; - case 139: /* comp_op: IN */ -#line 1043 "yacc_sql.y" + case 141: /* comp_op: IN */ +#line 1051 "yacc_sql.y" { (yyval.comp) = IN_OP; } -#line 3019 "yacc_sql.cpp" +#line 3040 "yacc_sql.cpp" break; - case 140: /* comp_op: NOT IN */ -#line 1044 "yacc_sql.y" + case 142: /* comp_op: NOT IN */ +#line 1052 "yacc_sql.y" { (yyval.comp) = NOT_IN_OP; } -#line 3025 "yacc_sql.cpp" +#line 3046 "yacc_sql.cpp" break; - case 141: /* comp_op: EXISTS */ -#line 1045 "yacc_sql.y" + case 143: /* comp_op: EXISTS */ +#line 1053 "yacc_sql.y" { (yyval.comp) = EXISTS_OP; } -#line 3031 "yacc_sql.cpp" +#line 3052 "yacc_sql.cpp" break; - case 142: /* comp_op: NOT EXISTS */ -#line 1046 "yacc_sql.y" + case 144: /* comp_op: NOT EXISTS */ +#line 1054 "yacc_sql.y" { (yyval.comp) = NOT_EXISTS_OP; } -#line 3037 "yacc_sql.cpp" +#line 3058 "yacc_sql.cpp" break; - case 143: /* opt_order_by: %empty */ -#line 1051 "yacc_sql.y" + case 145: /* opt_order_by: %empty */ +#line 1059 "yacc_sql.y" { (yyval.orderby_list) = nullptr; } -#line 3045 "yacc_sql.cpp" +#line 3066 "yacc_sql.cpp" break; - case 144: /* opt_order_by: ORDER BY sort_list */ -#line 1055 "yacc_sql.y" + case 146: /* opt_order_by: ORDER BY sort_list */ +#line 1063 "yacc_sql.y" { (yyval.orderby_list) = (yyvsp[0].orderby_list); std::reverse((yyval.orderby_list)->begin(),(yyval.orderby_list)->end()); } -#line 3054 "yacc_sql.cpp" +#line 3075 "yacc_sql.cpp" break; - case 145: /* sort_list: sort_unit */ -#line 1063 "yacc_sql.y" + case 147: /* sort_list: sort_unit */ +#line 1071 "yacc_sql.y" { (yyval.orderby_list) = new std::vector; (yyval.orderby_list)->emplace_back(std::move(*(yyvsp[0].orderby_unit))); } -#line 3063 "yacc_sql.cpp" +#line 3084 "yacc_sql.cpp" break; - case 146: /* sort_list: sort_unit COMMA sort_list */ -#line 1068 "yacc_sql.y" + case 148: /* sort_list: sort_unit COMMA sort_list */ +#line 1076 "yacc_sql.y" { (yyvsp[0].orderby_list)->emplace_back(std::move(*(yyvsp[-2].orderby_unit))); (yyval.orderby_list) = (yyvsp[0].orderby_list); } -#line 3072 "yacc_sql.cpp" +#line 3093 "yacc_sql.cpp" break; - case 147: /* sort_unit: expression */ -#line 1076 "yacc_sql.y" + case 149: /* sort_unit: expression */ +#line 1084 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[0].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3082 "yacc_sql.cpp" +#line 3103 "yacc_sql.cpp" break; - case 148: /* sort_unit: expression DESC */ -#line 1082 "yacc_sql.y" + case 150: /* sort_unit: expression DESC */ +#line 1090 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = false; } -#line 3092 "yacc_sql.cpp" +#line 3113 "yacc_sql.cpp" break; - case 149: /* sort_unit: expression ASC */ -#line 1088 "yacc_sql.y" + case 151: /* sort_unit: expression ASC */ +#line 1096 "yacc_sql.y" { (yyval.orderby_unit) = new OrderBySqlNode(); // 默认是升序 (yyval.orderby_unit)->expr = std::unique_ptr((yyvsp[-1].expression)); (yyval.orderby_unit)->is_asc = true; } -#line 3102 "yacc_sql.cpp" +#line 3123 "yacc_sql.cpp" break; - case 150: /* group_by: %empty */ -#line 1097 "yacc_sql.y" + case 152: /* group_by: %empty */ +#line 1105 "yacc_sql.y" { (yyval.expression_list) = nullptr; } -#line 3110 "yacc_sql.cpp" +#line 3131 "yacc_sql.cpp" break; - case 151: /* group_by: GROUP BY expression_list */ -#line 1101 "yacc_sql.y" + case 153: /* group_by: GROUP BY expression_list */ +#line 1109 "yacc_sql.y" { (yyval.expression_list) = (yyvsp[0].expression_list); } -#line 3118 "yacc_sql.cpp" +#line 3139 "yacc_sql.cpp" break; - case 152: /* opt_having: %empty */ -#line 1108 "yacc_sql.y" + case 154: /* opt_having: %empty */ +#line 1116 "yacc_sql.y" { (yyval.expression) = nullptr; } -#line 3126 "yacc_sql.cpp" +#line 3147 "yacc_sql.cpp" break; - case 153: /* opt_having: HAVING condition */ -#line 1112 "yacc_sql.y" + case 155: /* opt_having: HAVING condition */ +#line 1120 "yacc_sql.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3134 "yacc_sql.cpp" +#line 3155 "yacc_sql.cpp" break; - case 154: /* opt_limit: %empty */ -#line 1119 "yacc_sql.y" + case 156: /* opt_limit: %empty */ +#line 1127 "yacc_sql.y" { (yyval.limited_info) = nullptr; } -#line 3142 "yacc_sql.cpp" +#line 3163 "yacc_sql.cpp" break; - case 155: /* opt_limit: LIMIT NUMBER */ -#line 1123 "yacc_sql.y" + case 157: /* opt_limit: LIMIT NUMBER */ +#line 1131 "yacc_sql.y" { (yyval.limited_info) = new LimitSqlNode(); (yyval.limited_info)->number = (yyvsp[0].number); } -#line 3151 "yacc_sql.cpp" +#line 3172 "yacc_sql.cpp" break; - case 156: /* explain_stmt: EXPLAIN command_wrapper */ -#line 1131 "yacc_sql.y" + case 158: /* explain_stmt: EXPLAIN command_wrapper */ +#line 1139 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_EXPLAIN); (yyval.sql_node)->explain.sql_node = std::unique_ptr((yyvsp[0].sql_node)); } -#line 3160 "yacc_sql.cpp" +#line 3181 "yacc_sql.cpp" break; - case 157: /* set_variable_stmt: SET ID EQ value */ -#line 1139 "yacc_sql.y" + case 159: /* set_variable_stmt: SET ID EQ value */ +#line 1147 "yacc_sql.y" { (yyval.sql_node) = new ParsedSqlNode(SCF_SET_VARIABLE); (yyval.sql_node)->set_variable.name = (yyvsp[-2].string); @@ -3168,11 +3189,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].string)); delete (yyvsp[0].value); } -#line 3172 "yacc_sql.cpp" +#line 3193 "yacc_sql.cpp" break; -#line 3176 "yacc_sql.cpp" +#line 3197 "yacc_sql.cpp" default: break; } @@ -3401,7 +3422,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1151 "yacc_sql.y" +#line 1159 "yacc_sql.y" //_____________________________________________________________________ extern void scan_string(const char *str, yyscan_t scanner); diff --git a/src/observer/sql/parser/yacc_sql.hpp b/src/observer/sql/parser/yacc_sql.hpp index bb067c1d..04d85142 100644 --- a/src/observer/sql/parser/yacc_sql.hpp +++ b/src/observer/sql/parser/yacc_sql.hpp @@ -85,48 +85,50 @@ extern int yydebug; TRX_ROLLBACK = 286, /* TRX_ROLLBACK */ INT_T = 287, /* INT_T */ IN = 288, /* IN */ - STRING_T = 289, /* STRING_T */ - FLOAT_T = 290, /* FLOAT_T */ - DATE_T = 291, /* DATE_T */ - TEXT_T = 292, /* TEXT_T */ - VECTOR_T = 293, /* VECTOR_T */ - NOT = 294, /* NOT */ - UNIQUE = 295, /* UNIQUE */ - NULL_T = 296, /* NULL_T */ - LIMIT = 297, /* LIMIT */ - NULLABLE = 298, /* NULLABLE */ - HELP = 299, /* HELP */ - QUOTE = 300, /* QUOTE */ - EXIT = 301, /* EXIT */ - DOT = 302, /* DOT */ - INTO = 303, /* INTO */ - VALUES = 304, /* VALUES */ - FROM = 305, /* FROM */ - WHERE = 306, /* WHERE */ - AND = 307, /* AND */ - OR = 308, /* OR */ - SET = 309, /* SET */ - ON = 310, /* ON */ - INFILE = 311, /* INFILE */ - EXPLAIN = 312, /* EXPLAIN */ - STORAGE = 313, /* STORAGE */ - FORMAT = 314, /* FORMAT */ - INNER = 315, /* INNER */ - JOIN = 316, /* JOIN */ - VIEW = 317, /* VIEW */ - EQ = 318, /* EQ */ - LT = 319, /* LT */ - GT = 320, /* GT */ - LE = 321, /* LE */ - GE = 322, /* GE */ - NE = 323, /* NE */ - LIKE = 324, /* LIKE */ - IS = 325, /* IS */ - NUMBER = 326, /* NUMBER */ - FLOAT = 327, /* FLOAT */ - ID = 328, /* ID */ - SSS = 329, /* SSS */ - UMINUS = 330 /* UMINUS */ + TRUE = 289, /* TRUE */ + FALSE = 290, /* FALSE */ + STRING_T = 291, /* STRING_T */ + FLOAT_T = 292, /* FLOAT_T */ + DATE_T = 293, /* DATE_T */ + TEXT_T = 294, /* TEXT_T */ + VECTOR_T = 295, /* VECTOR_T */ + NOT = 296, /* NOT */ + UNIQUE = 297, /* UNIQUE */ + NULL_T = 298, /* NULL_T */ + LIMIT = 299, /* LIMIT */ + NULLABLE = 300, /* NULLABLE */ + HELP = 301, /* HELP */ + QUOTE = 302, /* QUOTE */ + EXIT = 303, /* EXIT */ + DOT = 304, /* DOT */ + INTO = 305, /* INTO */ + VALUES = 306, /* VALUES */ + FROM = 307, /* FROM */ + WHERE = 308, /* WHERE */ + AND = 309, /* AND */ + OR = 310, /* OR */ + SET = 311, /* SET */ + ON = 312, /* ON */ + INFILE = 313, /* INFILE */ + EXPLAIN = 314, /* EXPLAIN */ + STORAGE = 315, /* STORAGE */ + FORMAT = 316, /* FORMAT */ + INNER = 317, /* INNER */ + JOIN = 318, /* JOIN */ + VIEW = 319, /* VIEW */ + EQ = 320, /* EQ */ + LT = 321, /* LT */ + GT = 322, /* GT */ + LE = 323, /* LE */ + GE = 324, /* GE */ + NE = 325, /* NE */ + LIKE = 326, /* LIKE */ + IS = 327, /* IS */ + NUMBER = 328, /* NUMBER */ + FLOAT = 329, /* FLOAT */ + ID = 330, /* ID */ + SSS = 331, /* SSS */ + UMINUS = 332 /* UMINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -135,7 +137,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 167 "yacc_sql.y" +#line 169 "yacc_sql.y" ParsedSqlNode * sql_node; Value * value; @@ -164,7 +166,7 @@ union YYSTYPE float digits; std::vector * digits_list; -#line 168 "yacc_sql.hpp" +#line 170 "yacc_sql.hpp" }; typedef union YYSTYPE YYSTYPE; diff --git a/src/observer/sql/parser/yacc_sql.y b/src/observer/sql/parser/yacc_sql.y index 1d9e42ec..00a232f5 100644 --- a/src/observer/sql/parser/yacc_sql.y +++ b/src/observer/sql/parser/yacc_sql.y @@ -125,6 +125,8 @@ ParsedSqlNode *create_table_sql_node(char *table_name, TRX_ROLLBACK INT_T IN + TRUE + FALSE STRING_T FLOAT_T DATE_T @@ -674,6 +676,12 @@ nonnegative_value: free(tmp); free($1); } + | TRUE { + $$ = new Value(true); + } + | FALSE { + $$ = new Value(false); + } | NULL_T { $$ = new Value(NullValue()); } From ed101d00b75b7bc8deb503852a80cdbc1a0d9ac8 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 19 Oct 2024 02:35:59 +0800 Subject: [PATCH 305/308] =?UTF-8?q?=E6=96=B0=E5=A2=9Eboolean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/common/type/boolean_type.cpp | 22 ++++++++++++++++++ src/observer/common/type/boolean_type.h | 28 +++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 src/observer/common/type/boolean_type.cpp create mode 100644 src/observer/common/type/boolean_type.h diff --git a/src/observer/common/type/boolean_type.cpp b/src/observer/common/type/boolean_type.cpp new file mode 100644 index 00000000..4417d28a --- /dev/null +++ b/src/observer/common/type/boolean_type.cpp @@ -0,0 +1,22 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +// +// Created by 胡鑫 on 24-10-19. +// + +#include "boolean_type.h" +#include "common/value.h" + +RC BooleanType::to_string(const Value &val, string &result) const +{ + result = val.get_boolean() ? "TRUE" : "FALSE"; + return RC::SUCCESS; +} diff --git a/src/observer/common/type/boolean_type.h b/src/observer/common/type/boolean_type.h new file mode 100644 index 00000000..c039f345 --- /dev/null +++ b/src/observer/common/type/boolean_type.h @@ -0,0 +1,28 @@ +/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. +miniob is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. */ + +#pragma once + +#include "common/rc.h" +#include "common/type/data_type.h" + +// +// Created by 胡鑫 on 24-10-19. +// + +class BooleanType : public DataType +{ +public: + BooleanType() : DataType(AttrType::BOOLEANS) {} + + virtual ~BooleanType() = default; + + RC to_string(const Value &val, string &result) const override; +}; From b26ffd18b8ac4497c1654d284069a84b9a170028 Mon Sep 17 00:00:00 2001 From: HuXin0817 <202219120810@stu.cdut.edu.cn> Date: Sat, 19 Oct 2024 03:13:02 +0800 Subject: [PATCH 306/308] =?UTF-8?q?=E6=9B=B4=E6=96=B0order=20by=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/obclient/client_order_by.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/obclient/client_order_by.cpp b/src/obclient/client_order_by.cpp index 5bed8aa1..f13df4e3 100644 --- a/src/obclient/client_order_by.cpp +++ b/src/obclient/client_order_by.cpp @@ -265,7 +265,7 @@ int main(int argc, char *argv[]) const char *order_by_sql = "SELECT * FROM big_order_by_0, big_order_by_1, big_order_by_2, big_order_by_3 " "ORDER BY big_order_by_0.addr, big_order_by_2.num, big_order_by_0.price, " "big_order_by_3.id, big_order_by_1.id, big_order_by_1.num, big_order_by_0.id, " - "big_order_by_0.birthday;"; + "big_order_by_0.birthday LIMIT 1;"; send_sql(sockfd, order_by_sql); // Close the socket From 3df6d282d8e0b7b49f61023f354d06113458b84f Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 19 Oct 2024 04:29:21 +0800 Subject: [PATCH 307/308] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E4=B8=8E=20p?= =?UTF-8?q?ymysql=20=E9=80=9A=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/net/mysql_communicator.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/observer/net/mysql_communicator.cpp b/src/observer/net/mysql_communicator.cpp index b4be7ee0..6936e0bd 100644 --- a/src/observer/net/mysql_communicator.cpp +++ b/src/observer/net/mysql_communicator.cpp @@ -677,6 +677,18 @@ RC MysqlCommunicator::read_event(SessionEvent *&event) return handle_version_comment(need_disconnect); } + if (query_packet.query.find("SET NAMES utf8mb4") != string::npos) { + /// 该设置暂时不支持 + OkPacket ok_packet(sequence_id_); + rc = send_packet(ok_packet); + if (rc != RC::SUCCESS) { + LOG_WARN("failed to send ok packet. command=%d, addr=%s, error=%s", command_type, addr(), strrc(rc)); + return rc; + } + writer_->flush(); + return rc; + } + event = new SessionEvent(this); event->set_query(query_packet.query); } else { From 1001bade42667e167925e86f6a83712195d49ccd Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 19 Oct 2024 12:22:25 +0800 Subject: [PATCH 308/308] =?UTF-8?q?perf:=20=E6=94=B9=E8=BF=9B=20ann=20sear?= =?UTF-8?q?ch=20=E7=AE=97=E6=B3=95=EF=BC=8C=E6=98=BE=E8=91=97=E6=8F=90?= =?UTF-8?q?=E9=AB=98=E5=8F=AC=E5=9B=9E=E7=8E=87=E8=87=B3=2096%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/storage/index/ivfflat_index.cpp | 33 ++++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/observer/storage/index/ivfflat_index.cpp b/src/observer/storage/index/ivfflat_index.cpp index d87c371e..1857af12 100644 --- a/src/observer/storage/index/ivfflat_index.cpp +++ b/src/observer/storage/index/ivfflat_index.cpp @@ -14,6 +14,8 @@ #include "storage/index/ivfflat_index.h" +#define MAX_ITERATIONS 5 + using Vector = std::vector; void vector_add(Vector &a, const Vector &b) @@ -139,18 +141,21 @@ RC IvfflatIndex::build_index( } // 迭代更新质心直到收敛 - bool changed = true; - while (changed) { + size_t cnt = 0; // 迭代次数 + bool changed = true; + while (changed && cnt < MAX_ITERATIONS) { changed = false; auto new_centroids = find_centroids(initial_data, centroids_, distance_fn_); // 检查质心是否发生变化 for (size_t i = 0; i < lists_; i++) { - if (compute_distance(new_centroids[i], centroids_[i], distance_fn_) > 1e-4) { + if (compute_distance(new_centroids[i], centroids_[i], distance_fn_) > 0.01) { changed = true; } - centroids_[i] = new_centroids[i]; + centroids_[i] = std::move(new_centroids[i]); } + + ++cnt; } // 将数据点分配到最近的质心 @@ -165,11 +170,27 @@ RC IvfflatIndex::build_index( std::vector IvfflatIndex::ann_search(const std::vector &base_vector, size_t limit) { + std::vector> centroid_distances; + + // 计算与所有簇中心的距离 + for (size_t i = 0; i < centroids_.size(); i++) { + float dist = compute_distance(base_vector, centroids_[i], distance_fn_); + centroid_distances.emplace_back(dist, i); + } + + // 找到最近的 probes_ 个簇 + std::sort(centroid_distances.begin(), + centroid_distances.end(), + [&](const std::pair &a, const std::pair &b) { + return a.first < b.first; // 按距离升序排序 + }); + std::vector> candidates; - // 探测一定数量的列表并收集候选结果 + // 探测最近的 probes_ 个簇 for (size_t i = 0; i < probes_; i++) { - for (const auto &[vec, rid] : centroids_buckets_[i]) { + size_t cluster_index = centroid_distances[i].second; + for (const auto &[vec, rid] : centroids_buckets_[cluster_index]) { float dist = compute_distance(base_vector, vec, distance_fn_); candidates.emplace_back(dist, rid); }